From 7500c0eecf513a5474e37255efd010770b7dd361 Mon Sep 17 00:00:00 2001 From: Kevin Welton Date: Wed, 1 Mar 2017 14:07:45 -0800 Subject: [PATCH] C++/WinRT February 2017 release for Windows Anniversary SDK --- 10.0.14393.0/Samples/AsyncReader/Main.cpp | 8 +- 10.0.14393.0/Samples/Blocks/App.cpp | 2 +- .../Blocks/Assets/SmallLogo.scale-100.png | Bin 329 -> 526 bytes 10.0.14393.0/Samples/JustCoroutines/Main.cpp | 2 +- 10.0.14393.0/Samples/Ocr/Main.cpp | 2 +- 10.0.14393.0/Samples/Syndication/Main.cpp | 2 +- 10.0.14393.0/Samples/Video/App.cpp | 2 +- .../Video/Assets/SmallLogo.scale-100.png | Bin 329 -> 526 bytes .../XamlCode/Assets/SmallLogo.scale-100.png | Bin 329 -> 526 bytes .../Windows.ApplicationModel.Activation.h | 1503 +- .../Windows.ApplicationModel.AppExtensions.h | 354 +- .../Windows.ApplicationModel.AppService.h | 328 +- ...nModel.Appointments.AppointmentsProvider.h | 235 +- ...plicationModel.Appointments.DataProvider.h | 715 +- .../Windows.ApplicationModel.Appointments.h | 1966 +- .../Windows.ApplicationModel.Background.h | 1896 +- ...indows.ApplicationModel.Calls.Background.h | 142 +- .../Windows.ApplicationModel.Calls.Provider.h | 151 +- .../winrt/Windows.ApplicationModel.Calls.h | 1581 +- .../winrt/Windows.ApplicationModel.Chat.h | 2226 +- ...s.ApplicationModel.CommunicationBlocking.h | 95 +- ...s.ApplicationModel.Contacts.DataProvider.h | 243 +- ...ndows.ApplicationModel.Contacts.Provider.h | 122 +- .../winrt/Windows.ApplicationModel.Contacts.h | 3447 ++- .../winrt/Windows.ApplicationModel.Core.h | 571 +- ...licationModel.DataTransfer.DragDrop.Core.h | 311 +- ...s.ApplicationModel.DataTransfer.DragDrop.h | 9 +- ...pplicationModel.DataTransfer.ShareTarget.h | 152 +- .../Windows.ApplicationModel.DataTransfer.h | 1141 +- ...dows.ApplicationModel.Email.DataProvider.h | 1509 +- .../winrt/Windows.ApplicationModel.Email.h | 3006 +- ...cationModel.ExtendedExecution.Foreground.h | 93 +- ...ndows.ApplicationModel.ExtendedExecution.h | 101 +- .../Windows.ApplicationModel.LockScreen.h | 260 +- .../Windows.ApplicationModel.Preview.Notes.h | 171 +- .../Windows.ApplicationModel.Resources.Core.h | 569 +- ...ws.ApplicationModel.Resources.Management.h | 165 +- .../Windows.ApplicationModel.Resources.h | 133 +- .../Windows.ApplicationModel.Search.Core.h | 241 +- .../winrt/Windows.ApplicationModel.Search.h | 663 +- ...ows.ApplicationModel.SocialInfo.Provider.h | 191 +- .../Windows.ApplicationModel.SocialInfo.h | 487 +- ...ApplicationModel.Store.LicenseManagement.h | 119 +- ...cationModel.Store.Preview.InstallControl.h | 517 +- .../Windows.ApplicationModel.Store.Preview.h | 393 +- .../winrt/Windows.ApplicationModel.Store.h | 875 +- ...plicationModel.UserDataAccounts.Provider.h | 151 +- ...ationModel.UserDataAccounts.SystemAccess.h | 553 +- ...indows.ApplicationModel.UserDataAccounts.h | 359 +- .../Windows.ApplicationModel.VoiceCommands.h | 570 +- .../Windows.ApplicationModel.Wallet.System.h | 101 +- .../winrt/Windows.ApplicationModel.Wallet.h | 842 +- 10.0.14393.0/winrt/Windows.ApplicationModel.h | 1038 +- 10.0.14393.0/winrt/Windows.Data.Html.h | 29 +- 10.0.14393.0/winrt/Windows.Data.Json.h | 409 +- 10.0.14393.0/winrt/Windows.Data.Pdf.h | 284 +- 10.0.14393.0/winrt/Windows.Data.Text.h | 669 +- 10.0.14393.0/winrt/Windows.Data.Xml.Dom.h | 1200 +- 10.0.14393.0/winrt/Windows.Data.Xml.Xsl.h | 66 +- .../winrt/Windows.Devices.Adc.Provider.h | 78 +- 10.0.14393.0/winrt/Windows.Devices.Adc.h | 134 +- 10.0.14393.0/winrt/Windows.Devices.AllJoyn.h | 1577 +- .../winrt/Windows.Devices.Background.h | 80 +- .../Windows.Devices.Bluetooth.Advertisement.h | 701 +- .../Windows.Devices.Bluetooth.Background.h | 223 +- ...evices.Bluetooth.GenericAttributeProfile.h | 1267 +- .../winrt/Windows.Devices.Bluetooth.Rfcomm.h | 375 +- .../winrt/Windows.Devices.Bluetooth.h | 958 +- 10.0.14393.0/winrt/Windows.Devices.Custom.h | 155 +- .../winrt/Windows.Devices.Enumeration.Pnp.h | 256 +- .../winrt/Windows.Devices.Enumeration.h | 1221 +- .../Windows.Devices.Geolocation.Geofencing.h | 255 +- .../winrt/Windows.Devices.Geolocation.h | 853 +- .../winrt/Windows.Devices.Gpio.Provider.h | 147 +- 10.0.14393.0/winrt/Windows.Devices.Gpio.h | 186 +- .../Windows.Devices.HumanInterfaceDevice.h | 714 +- .../winrt/Windows.Devices.I2c.Provider.h | 151 +- 10.0.14393.0/winrt/Windows.Devices.I2c.h | 237 +- 10.0.14393.0/winrt/Windows.Devices.Input.h | 263 +- 10.0.14393.0/winrt/Windows.Devices.Lights.h | 134 +- 10.0.14393.0/winrt/Windows.Devices.Midi.h | 787 +- .../Windows.Devices.Perception.Provider.h | 576 +- .../winrt/Windows.Devices.Perception.h | 2104 +- .../winrt/Windows.Devices.PointOfService.h | 3488 ++- 10.0.14393.0/winrt/Windows.Devices.Portable.h | 59 +- 10.0.14393.0/winrt/Windows.Devices.Power.h | 140 +- .../Windows.Devices.Printers.Extensions.h | 335 +- 10.0.14393.0/winrt/Windows.Devices.Printers.h | 100 +- .../winrt/Windows.Devices.Pwm.Provider.h | 74 +- 10.0.14393.0/winrt/Windows.Devices.Pwm.h | 143 +- 10.0.14393.0/winrt/Windows.Devices.Radios.h | 106 +- 10.0.14393.0/winrt/Windows.Devices.Scanners.h | 464 +- .../winrt/Windows.Devices.Sensors.Custom.h | 152 +- 10.0.14393.0/winrt/Windows.Devices.Sensors.h | 2482 +- .../Windows.Devices.SerialCommunication.h | 277 +- .../winrt/Windows.Devices.SmartCards.h | 1553 +- 10.0.14393.0/winrt/Windows.Devices.Sms.h | 1543 +- .../winrt/Windows.Devices.Spi.Provider.h | 172 +- 10.0.14393.0/winrt/Windows.Devices.Spi.h | 286 +- 10.0.14393.0/winrt/Windows.Devices.Usb.h | 1234 +- 10.0.14393.0/winrt/Windows.Devices.WiFi.h | 267 +- .../Windows.Devices.WiFiDirect.Services.h | 605 +- .../winrt/Windows.Devices.WiFiDirect.h | 524 +- 10.0.14393.0/winrt/Windows.Devices.h | 117 +- .../winrt/Windows.Embedded.DeviceLockdown.h | 69 +- .../winrt/Windows.Foundation.Collections.h | 45 +- .../winrt/Windows.Foundation.Diagnostics.h | 1668 +- .../winrt/Windows.Foundation.Metadata.h | 128 +- 10.0.14393.0/winrt/Windows.Foundation.h | 2311 +- .../winrt/Windows.Gaming.Input.Custom.h | 252 +- .../Windows.Gaming.Input.ForceFeedback.h | 271 +- 10.0.14393.0/winrt/Windows.Gaming.Input.h | 421 +- .../Windows.Gaming.Preview.GamesEnumeration.h | 127 +- 10.0.14393.0/winrt/Windows.Gaming.UI.h | 64 +- .../winrt/Windows.Globalization.Collation.h | 68 +- ...Windows.Globalization.DateTimeFormatting.h | 272 +- .../winrt/Windows.Globalization.Fonts.h | 171 +- .../Windows.Globalization.NumberFormatting.h | 595 +- ...dows.Globalization.PhoneNumberFormatting.h | 236 +- 10.0.14393.0/winrt/Windows.Globalization.h | 2601 +- .../Windows.Graphics.DirectX.Direct3D11.h | 37 +- 10.0.14393.0/winrt/Windows.Graphics.DirectX.h | 9 +- 10.0.14393.0/winrt/Windows.Graphics.Display.h | 319 +- 10.0.14393.0/winrt/Windows.Graphics.Effects.h | 41 +- .../winrt/Windows.Graphics.Holographic.h | 406 +- 10.0.14393.0/winrt/Windows.Graphics.Imaging.h | 899 +- .../Windows.Graphics.Printing.OptionDetails.h | 460 +- .../winrt/Windows.Graphics.Printing.h | 755 +- .../winrt/Windows.Graphics.Printing3D.h | 1499 +- 10.0.14393.0/winrt/Windows.Management.Core.h | 47 +- .../Windows.Management.Deployment.Preview.h | 61 +- .../winrt/Windows.Management.Deployment.h | 673 +- .../winrt/Windows.Management.Orchestration.h | 68 +- .../winrt/Windows.Management.Workplace.h | 66 +- 10.0.14393.0/winrt/Windows.Media.Audio.h | 1806 +- .../winrt/Windows.Media.Capture.Core.h | 134 +- .../winrt/Windows.Media.Capture.Frames.h | 761 +- 10.0.14393.0/winrt/Windows.Media.Capture.h | 2472 +- 10.0.14393.0/winrt/Windows.Media.Casting.h | 386 +- .../winrt/Windows.Media.ClosedCaptioning.h | 84 +- .../winrt/Windows.Media.ContentRestrictions.h | 215 +- 10.0.14393.0/winrt/Windows.Media.Core.h | 3122 +- .../winrt/Windows.Media.Devices.Core.h | 791 +- 10.0.14393.0/winrt/Windows.Media.Devices.h | 2093 +- .../winrt/Windows.Media.DialProtocol.h | 355 +- 10.0.14393.0/winrt/Windows.Media.Editing.h | 642 +- 10.0.14393.0/winrt/Windows.Media.Effects.h | 706 +- .../winrt/Windows.Media.FaceAnalysis.h | 205 +- 10.0.14393.0/winrt/Windows.Media.Import.h | 1025 +- .../winrt/Windows.Media.MediaProperties.h | 967 +- 10.0.14393.0/winrt/Windows.Media.Ocr.h | 186 +- 10.0.14393.0/winrt/Windows.Media.PlayTo.h | 824 +- 10.0.14393.0/winrt/Windows.Media.Playback.h | 2664 +- 10.0.14393.0/winrt/Windows.Media.Playlists.h | 75 +- .../Windows.Media.Protection.PlayReady.h | 1709 +- 10.0.14393.0/winrt/Windows.Media.Protection.h | 401 +- 10.0.14393.0/winrt/Windows.Media.Render.h | 9 +- .../winrt/Windows.Media.SpeechRecognition.h | 962 +- .../winrt/Windows.Media.SpeechSynthesis.h | 156 +- .../winrt/Windows.Media.Streaming.Adaptive.h | 687 +- .../winrt/Windows.Media.Transcoding.h | 171 +- 10.0.14393.0/winrt/Windows.Media.h | 1569 +- .../Windows.Networking.BackgroundTransfer.h | 1024 +- .../winrt/Windows.Networking.Connectivity.h | 1228 +- .../Windows.Networking.NetworkOperators.h | 2341 +- .../winrt/Windows.Networking.Proximity.h | 595 +- .../Windows.Networking.PushNotifications.h | 242 +- ...indows.Networking.ServiceDiscovery.Dnssd.h | 243 +- .../winrt/Windows.Networking.Sockets.h | 1870 +- 10.0.14393.0/winrt/Windows.Networking.Vpn.h | 1978 +- 10.0.14393.0/winrt/Windows.Networking.h | 197 +- .../Windows.Perception.Automation.Core.h | 23 +- .../winrt/Windows.Perception.People.h | 48 +- .../Windows.Perception.Spatial.Surfaces.h | 307 +- .../winrt/Windows.Perception.Spatial.h | 590 +- 10.0.14393.0/winrt/Windows.Perception.h | 57 +- .../winrt/Windows.Phone.ApplicationModel.h | 23 +- .../Windows.Phone.Devices.Notification.h | 51 +- .../winrt/Windows.Phone.Devices.Power.h | 69 +- .../Windows.Phone.Management.Deployment.h | 281 +- .../winrt/Windows.Phone.Media.Devices.h | 70 +- .../Windows.Phone.Notification.Management.h | 1398 +- ...s.Phone.PersonalInformation.Provisioning.h | 87 +- .../winrt/Windows.Phone.PersonalInformation.h | 878 +- .../winrt/Windows.Phone.Speech.Recognition.h | 9 +- .../winrt/Windows.Phone.StartScreen.h | 154 +- .../winrt/Windows.Phone.System.Power.h | 55 +- .../winrt/Windows.Phone.System.Profile.h | 23 +- ...one.System.UserProfile.GameServices.Core.h | 112 +- 10.0.14393.0/winrt/Windows.Phone.System.h | 35 +- 10.0.14393.0/winrt/Windows.Phone.UI.Input.h | 111 +- ...ws.Security.Authentication.Identity.Core.h | 303 +- ...ecurity.Authentication.Identity.Provider.h | 368 +- ...Windows.Security.Authentication.Identity.h | 103 +- ...Windows.Security.Authentication.OnlineId.h | 258 +- ...Windows.Security.Authentication.Web.Core.h | 501 +- ...ows.Security.Authentication.Web.Provider.h | 673 +- .../Windows.Security.Authentication.Web.h | 112 +- .../winrt/Windows.Security.Credentials.UI.h | 261 +- .../winrt/Windows.Security.Credentials.h | 577 +- ...ndows.Security.Cryptography.Certificates.h | 1742 +- .../Windows.Security.Cryptography.Core.h | 1597 +- ...ows.Security.Cryptography.DataProtection.h | 75 +- .../winrt/Windows.Security.Cryptography.h | 109 +- .../winrt/Windows.Security.EnterpriseData.h | 942 +- ....Security.ExchangeActiveSyncProvisioning.h | 271 +- .../winrt/Windows.Services.Maps.Guidance.h | 840 +- .../winrt/Windows.Services.Maps.LocalSearch.h | 297 +- 10.0.14393.0/winrt/Windows.Services.Maps.h | 773 +- 10.0.14393.0/winrt/Windows.Services.Store.h | 1395 +- .../winrt/Windows.Storage.AccessCache.h | 259 +- .../winrt/Windows.Storage.BulkAccess.h | 236 +- .../winrt/Windows.Storage.Compression.h | 105 +- .../winrt/Windows.Storage.FileProperties.h | 697 +- .../winrt/Windows.Storage.Pickers.Provider.h | 389 +- 10.0.14393.0/winrt/Windows.Storage.Pickers.h | 420 +- 10.0.14393.0/winrt/Windows.Storage.Provider.h | 237 +- 10.0.14393.0/winrt/Windows.Storage.Search.h | 852 +- 10.0.14393.0/winrt/Windows.Storage.Streams.h | 734 +- 10.0.14393.0/winrt/Windows.Storage.h | 2223 +- .../winrt/Windows.System.Diagnostics.h | 330 +- 10.0.14393.0/winrt/Windows.System.Display.h | 33 +- .../winrt/Windows.System.Power.Diagnostics.h | 53 +- 10.0.14393.0/winrt/Windows.System.Power.h | 295 +- ...ndows.System.Profile.SystemManufacturers.h | 25 +- 10.0.14393.0/winrt/Windows.System.Profile.h | 413 +- .../winrt/Windows.System.RemoteDesktop.h | 23 +- .../winrt/Windows.System.RemoteSystems.h | 445 +- .../winrt/Windows.System.Threading.Core.h | 143 +- 10.0.14393.0/winrt/Windows.System.Threading.h | 117 +- .../winrt/Windows.System.UserProfile.h | 381 +- 10.0.14393.0/winrt/Windows.System.h | 1482 +- .../winrt/Windows.UI.ApplicationSettings.h | 501 +- .../winrt/Windows.UI.Composition.Effects.h | 71 +- .../Windows.UI.Composition.Interactions.h | 782 +- 10.0.14393.0/winrt/Windows.UI.Composition.h | 2948 +- .../winrt/Windows.UI.Core.AnimationMetrics.h | 213 +- 10.0.14393.0/winrt/Windows.UI.Core.h | 1784 +- .../winrt/Windows.UI.Input.Inking.Core.h | 249 +- 10.0.14393.0/winrt/Windows.UI.Input.Inking.h | 1213 +- .../Windows.UI.Input.Preview.Injection.h | 328 +- 10.0.14393.0/winrt/Windows.UI.Input.Spatial.h | 1036 +- 10.0.14393.0/winrt/Windows.UI.Input.h | 1687 +- .../Windows.UI.Notifications.Management.h | 85 +- 10.0.14393.0/winrt/Windows.UI.Notifications.h | 1952 +- 10.0.14393.0/winrt/Windows.UI.Popups.h | 287 +- 10.0.14393.0/winrt/Windows.UI.StartScreen.h | 818 +- 10.0.14393.0/winrt/Windows.UI.Text.Core.h | 819 +- 10.0.14393.0/winrt/Windows.UI.Text.h | 1082 +- .../winrt/Windows.UI.ViewManagement.h | 1329 +- 10.0.14393.0/winrt/Windows.UI.WebUI.Core.h | 440 +- 10.0.14393.0/winrt/Windows.UI.WebUI.h | 775 +- .../winrt/Windows.UI.Xaml.Automation.Peers.h | 3725 ++- .../Windows.UI.Xaml.Automation.Provider.h | 1076 +- .../winrt/Windows.UI.Xaml.Automation.Text.h | 9 +- .../winrt/Windows.UI.Xaml.Automation.h | 2027 +- .../winrt/Windows.UI.Xaml.Controls.Maps.h | 3348 ++- .../Windows.UI.Xaml.Controls.Primitives.h | 4254 ++- 10.0.14393.0/winrt/Windows.UI.Xaml.Controls.h | 24558 +++++++++++----- 10.0.14393.0/winrt/Windows.UI.Xaml.Data.h | 1076 +- .../winrt/Windows.UI.Xaml.Documents.h | 2094 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Hosting.h | 233 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Input.h | 1230 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Interop.h | 280 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Markup.h | 641 +- .../winrt/Windows.UI.Xaml.Media.Animation.h | 4512 ++- .../winrt/Windows.UI.Xaml.Media.Imaging.h | 636 +- .../winrt/Windows.UI.Xaml.Media.Media3D.h | 394 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Media.h | 3188 +- .../winrt/Windows.UI.Xaml.Navigation.h | 293 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Printing.h | 210 +- .../winrt/Windows.UI.Xaml.Resources.h | 89 +- 10.0.14393.0/winrt/Windows.UI.Xaml.Shapes.h | 605 +- 10.0.14393.0/winrt/Windows.UI.Xaml.h | 5256 +++- 10.0.14393.0/winrt/Windows.UI.h | 1057 +- 10.0.14393.0/winrt/Windows.Web.AtomPub.h | 225 +- .../winrt/Windows.Web.Http.Diagnostics.h | 350 +- 10.0.14393.0/winrt/Windows.Web.Http.Filters.h | 291 +- 10.0.14393.0/winrt/Windows.Web.Http.Headers.h | 2679 +- 10.0.14393.0/winrt/Windows.Web.Http.h | 937 +- 10.0.14393.0/winrt/Windows.Web.Syndication.h | 1283 +- 10.0.14393.0/winrt/Windows.Web.h | 39 +- 10.0.14393.0/winrt/base.h | 13861 ++++++--- .../internal/Windows.ApplicationModel.0.h | 37 +- .../internal/Windows.ApplicationModel.1.h | 339 +- .../internal/Windows.ApplicationModel.2.h | 355 +- .../internal/Windows.ApplicationModel.3.h | 12 +- .../Windows.ApplicationModel.Activation.0.h | 67 +- .../Windows.ApplicationModel.Activation.1.h | 563 +- .../Windows.ApplicationModel.Activation.2.h | 571 +- .../Windows.ApplicationModel.Activation.3.h | 4 +- ...Windows.ApplicationModel.AppExtensions.0.h | 17 +- ...Windows.ApplicationModel.AppExtensions.1.h | 109 +- ...Windows.ApplicationModel.AppExtensions.2.h | 115 +- ...Windows.ApplicationModel.AppExtensions.3.h | 6 +- .../Windows.ApplicationModel.AppService.0.h | 19 +- .../Windows.ApplicationModel.AppService.1.h | 113 +- .../Windows.ApplicationModel.AppService.2.h | 121 +- .../Windows.ApplicationModel.AppService.3.h | 6 +- .../Windows.ApplicationModel.Appointments.0.h | 40 +- .../Windows.ApplicationModel.Appointments.1.h | 496 +- .../Windows.ApplicationModel.Appointments.2.h | 517 +- .../Windows.ApplicationModel.Appointments.3.h | 20 +- ...odel.Appointments.AppointmentsProvider.0.h | 14 +- ...odel.Appointments.AppointmentsProvider.1.h | 69 +- ...odel.Appointments.AppointmentsProvider.2.h | 70 +- ...odel.Appointments.AppointmentsProvider.3.h | 4 +- ...icationModel.Appointments.DataProvider.0.h | 23 +- ...icationModel.Appointments.DataProvider.1.h | 197 +- ...icationModel.Appointments.DataProvider.2.h | 208 +- ...icationModel.Appointments.DataProvider.3.h | 4 +- .../Windows.ApplicationModel.Background.0.h | 94 +- .../Windows.ApplicationModel.Background.1.h | 727 +- .../Windows.ApplicationModel.Background.2.h | 747 +- .../Windows.ApplicationModel.Background.3.h | 30 +- .../Windows.ApplicationModel.Calls.0.h | 42 +- .../Windows.ApplicationModel.Calls.1.h | 490 +- .../Windows.ApplicationModel.Calls.2.h | 505 +- .../Windows.ApplicationModel.Calls.3.h | 16 +- ...dows.ApplicationModel.Calls.Background.0.h | 13 +- ...dows.ApplicationModel.Calls.Background.1.h | 46 +- ...dows.ApplicationModel.Calls.Background.2.h | 47 +- ...dows.ApplicationModel.Calls.Background.3.h | 4 +- ...indows.ApplicationModel.Calls.Provider.0.h | 14 +- ...indows.ApplicationModel.Calls.Provider.1.h | 57 +- ...indows.ApplicationModel.Calls.Provider.2.h | 58 +- ...indows.ApplicationModel.Calls.Provider.3.h | 4 +- .../Windows.ApplicationModel.Chat.0.h | 59 +- .../Windows.ApplicationModel.Chat.1.h | 656 +- .../Windows.ApplicationModel.Chat.2.h | 704 +- .../Windows.ApplicationModel.Chat.3.h | 16 +- ...ApplicationModel.CommunicationBlocking.0.h | 12 +- ...ApplicationModel.CommunicationBlocking.1.h | 36 +- ...ApplicationModel.CommunicationBlocking.2.h | 47 +- ...ApplicationModel.CommunicationBlocking.3.h | 10 +- .../Windows.ApplicationModel.Contacts.0.h | 73 +- .../Windows.ApplicationModel.Contacts.1.h | 863 +- .../Windows.ApplicationModel.Contacts.2.h | 917 +- .../Windows.ApplicationModel.Contacts.3.h | 40 +- ...ApplicationModel.Contacts.DataProvider.0.h | 15 +- ...ApplicationModel.Contacts.DataProvider.1.h | 75 +- ...ApplicationModel.Contacts.DataProvider.2.h | 76 +- ...ApplicationModel.Contacts.DataProvider.3.h | 4 +- ...ows.ApplicationModel.Contacts.Provider.0.h | 12 +- ...ows.ApplicationModel.Contacts.Provider.1.h | 39 +- ...ows.ApplicationModel.Contacts.Provider.2.h | 45 +- ...ows.ApplicationModel.Contacts.Provider.3.h | 4 +- .../Windows.ApplicationModel.Core.0.h | 27 +- .../Windows.ApplicationModel.Core.1.h | 237 +- .../Windows.ApplicationModel.Core.2.h | 239 +- .../Windows.ApplicationModel.Core.3.h | 14 +- .../Windows.ApplicationModel.DataTransfer.0.h | 38 +- .../Windows.ApplicationModel.DataTransfer.1.h | 364 +- .../Windows.ApplicationModel.DataTransfer.2.h | 394 +- .../Windows.ApplicationModel.DataTransfer.3.h | 20 +- ...ApplicationModel.DataTransfer.DragDrop.0.h | 9 +- ...ApplicationModel.DataTransfer.DragDrop.1.h | 9 +- ...ApplicationModel.DataTransfer.DragDrop.2.h | 4 +- ...ApplicationModel.DataTransfer.DragDrop.3.h | 4 +- ...cationModel.DataTransfer.DragDrop.Core.0.h | 18 +- ...cationModel.DataTransfer.DragDrop.Core.1.h | 111 +- ...cationModel.DataTransfer.DragDrop.Core.2.h | 112 +- ...cationModel.DataTransfer.DragDrop.Core.3.h | 4 +- ...licationModel.DataTransfer.ShareTarget.0.h | 12 +- ...licationModel.DataTransfer.ShareTarget.1.h | 45 +- ...licationModel.DataTransfer.ShareTarget.2.h | 46 +- ...licationModel.DataTransfer.ShareTarget.3.h | 4 +- .../Windows.ApplicationModel.Email.0.h | 63 +- .../Windows.ApplicationModel.Email.1.h | 810 +- .../Windows.ApplicationModel.Email.2.h | 851 +- .../Windows.ApplicationModel.Email.3.h | 18 +- ...ws.ApplicationModel.Email.DataProvider.0.h | 41 +- ...ws.ApplicationModel.Email.DataProvider.1.h | 431 +- ...ws.ApplicationModel.Email.DataProvider.2.h | 467 +- ...ws.ApplicationModel.Email.DataProvider.3.h | 4 +- ...ows.ApplicationModel.ExtendedExecution.0.h | 11 +- ...ows.ApplicationModel.ExtendedExecution.1.h | 33 +- ...ows.ApplicationModel.ExtendedExecution.2.h | 36 +- ...ows.ApplicationModel.ExtendedExecution.3.h | 4 +- ...tionModel.ExtendedExecution.Foreground.0.h | 11 +- ...tionModel.ExtendedExecution.Foreground.1.h | 31 +- ...tionModel.ExtendedExecution.Foreground.2.h | 34 +- ...tionModel.ExtendedExecution.Foreground.3.h | 4 +- .../Windows.ApplicationModel.LockScreen.0.h | 15 +- .../Windows.ApplicationModel.LockScreen.1.h | 93 +- .../Windows.ApplicationModel.LockScreen.2.h | 98 +- .../Windows.ApplicationModel.LockScreen.3.h | 4 +- ...Windows.ApplicationModel.Preview.Notes.0.h | 13 +- ...Windows.ApplicationModel.Preview.Notes.1.h | 62 +- ...Windows.ApplicationModel.Preview.Notes.2.h | 63 +- ...Windows.ApplicationModel.Preview.Notes.3.h | 4 +- .../Windows.ApplicationModel.Resources.0.h | 14 +- .../Windows.ApplicationModel.Resources.1.h | 51 +- .../Windows.ApplicationModel.Resources.2.h | 54 +- .../Windows.ApplicationModel.Resources.3.h | 12 +- ...indows.ApplicationModel.Resources.Core.0.h | 21 +- ...indows.ApplicationModel.Resources.Core.1.h | 145 +- ...indows.ApplicationModel.Resources.Core.2.h | 192 +- ...indows.ApplicationModel.Resources.Core.3.h | 14 +- ....ApplicationModel.Resources.Management.0.h | 14 +- ....ApplicationModel.Resources.Management.1.h | 55 +- ....ApplicationModel.Resources.Management.2.h | 71 +- ....ApplicationModel.Resources.Management.3.h | 4 +- .../Windows.ApplicationModel.Search.0.h | 27 +- .../Windows.ApplicationModel.Search.1.h | 219 +- .../Windows.ApplicationModel.Search.2.h | 231 +- .../Windows.ApplicationModel.Search.3.h | 26 +- .../Windows.ApplicationModel.Search.Core.0.h | 13 +- .../Windows.ApplicationModel.Search.Core.1.h | 65 +- .../Windows.ApplicationModel.Search.Core.2.h | 66 +- .../Windows.ApplicationModel.Search.Core.3.h | 4 +- .../Windows.ApplicationModel.SocialInfo.0.h | 15 +- .../Windows.ApplicationModel.SocialInfo.1.h | 111 +- .../Windows.ApplicationModel.SocialInfo.2.h | 112 +- .../Windows.ApplicationModel.SocialInfo.3.h | 4 +- ...s.ApplicationModel.SocialInfo.Provider.0.h | 12 +- ...s.ApplicationModel.SocialInfo.Provider.1.h | 46 +- ...s.ApplicationModel.SocialInfo.Provider.2.h | 47 +- ...s.ApplicationModel.SocialInfo.Provider.3.h | 12 +- .../Windows.ApplicationModel.Store.0.h | 32 +- .../Windows.ApplicationModel.Store.1.h | 263 +- .../Windows.ApplicationModel.Store.2.h | 291 +- .../Windows.ApplicationModel.Store.3.h | 40 +- ...plicationModel.Store.LicenseManagement.0.h | 12 +- ...plicationModel.Store.LicenseManagement.1.h | 38 +- ...plicationModel.Store.LicenseManagement.2.h | 54 +- ...plicationModel.Store.LicenseManagement.3.h | 6 +- ...Windows.ApplicationModel.Store.Preview.0.h | 17 +- ...Windows.ApplicationModel.Store.Preview.1.h | 103 +- ...Windows.ApplicationModel.Store.Preview.2.h | 119 +- ...Windows.ApplicationModel.Store.Preview.3.h | 24 +- ...tionModel.Store.Preview.InstallControl.0.h | 17 +- ...tionModel.Store.Preview.InstallControl.1.h | 137 +- ...tionModel.Store.Preview.InstallControl.2.h | 141 +- ...tionModel.Store.Preview.InstallControl.3.h | 4 +- ...dows.ApplicationModel.UserDataAccounts.0.h | 18 +- ...dows.ApplicationModel.UserDataAccounts.1.h | 110 +- ...dows.ApplicationModel.UserDataAccounts.2.h | 136 +- ...dows.ApplicationModel.UserDataAccounts.3.h | 8 +- ...icationModel.UserDataAccounts.Provider.0.h | 14 +- ...icationModel.UserDataAccounts.Provider.1.h | 54 +- ...icationModel.UserDataAccounts.Provider.2.h | 60 +- ...icationModel.UserDataAccounts.Provider.3.h | 4 +- ...ionModel.UserDataAccounts.SystemAccess.0.h | 13 +- ...ionModel.UserDataAccounts.SystemAccess.1.h | 128 +- ...ionModel.UserDataAccounts.SystemAccess.2.h | 144 +- ...ionModel.UserDataAccounts.SystemAccess.3.h | 12 +- ...Windows.ApplicationModel.VoiceCommands.0.h | 21 +- ...Windows.ApplicationModel.VoiceCommands.1.h | 159 +- ...Windows.ApplicationModel.VoiceCommands.2.h | 181 +- ...Windows.ApplicationModel.VoiceCommands.3.h | 8 +- .../Windows.ApplicationModel.Wallet.0.h | 22 +- .../Windows.ApplicationModel.Wallet.1.h | 212 +- .../Windows.ApplicationModel.Wallet.2.h | 218 +- .../Windows.ApplicationModel.Wallet.3.h | 12 +- ...Windows.ApplicationModel.Wallet.System.0.h | 12 +- ...Windows.ApplicationModel.Wallet.System.1.h | 39 +- ...Windows.ApplicationModel.Wallet.System.2.h | 45 +- ...Windows.ApplicationModel.Wallet.System.3.h | 4 +- .../winrt/internal/Windows.Data.Html.0.h | 10 +- .../winrt/internal/Windows.Data.Html.1.h | 12 +- .../winrt/internal/Windows.Data.Html.2.h | 13 +- .../winrt/internal/Windows.Data.Html.3.h | 6 +- .../winrt/internal/Windows.Data.Json.0.h | 18 +- .../winrt/internal/Windows.Data.Json.1.h | 111 +- .../winrt/internal/Windows.Data.Json.2.h | 114 +- .../winrt/internal/Windows.Data.Json.3.h | 18 +- .../winrt/internal/Windows.Data.Pdf.0.h | 14 +- .../winrt/internal/Windows.Data.Pdf.1.h | 75 +- .../winrt/internal/Windows.Data.Pdf.2.h | 78 +- .../winrt/internal/Windows.Data.Pdf.3.h | 8 +- .../winrt/internal/Windows.Data.Text.0.h | 29 +- .../winrt/internal/Windows.Data.Text.1.h | 205 +- .../winrt/internal/Windows.Data.Text.2.h | 244 +- .../winrt/internal/Windows.Data.Text.3.h | 22 +- .../winrt/internal/Windows.Data.Xml.Dom.0.h | 32 +- .../winrt/internal/Windows.Data.Xml.Dom.1.h | 345 +- .../winrt/internal/Windows.Data.Xml.Dom.2.h | 307 +- .../winrt/internal/Windows.Data.Xml.Dom.3.h | 4 +- .../winrt/internal/Windows.Data.Xml.Xsl.0.h | 12 +- .../winrt/internal/Windows.Data.Xml.Xsl.1.h | 30 +- .../winrt/internal/Windows.Data.Xml.Xsl.2.h | 31 +- .../winrt/internal/Windows.Data.Xml.Xsl.3.h | 4 +- .../winrt/internal/Windows.Devices.0.h | 13 +- .../winrt/internal/Windows.Devices.1.h | 43 +- .../winrt/internal/Windows.Devices.2.h | 44 +- .../winrt/internal/Windows.Devices.3.h | 4 +- .../winrt/internal/Windows.Devices.Adc.0.h | 13 +- .../winrt/internal/Windows.Devices.Adc.1.h | 48 +- .../winrt/internal/Windows.Devices.Adc.2.h | 56 +- .../winrt/internal/Windows.Devices.Adc.3.h | 4 +- .../internal/Windows.Devices.Adc.Provider.0.h | 11 +- .../internal/Windows.Devices.Adc.Provider.1.h | 30 +- .../internal/Windows.Devices.Adc.Provider.2.h | 36 +- .../internal/Windows.Devices.Adc.Provider.3.h | 4 +- .../internal/Windows.Devices.AllJoyn.0.h | 57 +- .../internal/Windows.Devices.AllJoyn.1.h | 520 +- .../internal/Windows.Devices.AllJoyn.2.h | 557 +- .../internal/Windows.Devices.AllJoyn.3.h | 30 +- .../internal/Windows.Devices.Background.0.h | 11 +- .../internal/Windows.Devices.Background.1.h | 24 +- .../internal/Windows.Devices.Background.2.h | 25 +- .../internal/Windows.Devices.Background.3.h | 4 +- .../internal/Windows.Devices.Bluetooth.0.h | 25 +- .../internal/Windows.Devices.Bluetooth.1.h | 279 +- .../internal/Windows.Devices.Bluetooth.2.h | 299 +- .../internal/Windows.Devices.Bluetooth.3.h | 12 +- ...indows.Devices.Bluetooth.Advertisement.0.h | 25 +- ...indows.Devices.Bluetooth.Advertisement.1.h | 221 +- ...indows.Devices.Bluetooth.Advertisement.2.h | 222 +- ...indows.Devices.Bluetooth.Advertisement.3.h | 4 +- .../Windows.Devices.Bluetooth.Background.0.h | 15 +- .../Windows.Devices.Bluetooth.Background.1.h | 69 +- .../Windows.Devices.Bluetooth.Background.2.h | 75 +- .../Windows.Devices.Bluetooth.Background.3.h | 4 +- ...ices.Bluetooth.GenericAttributeProfile.0.h | 29 +- ...ices.Bluetooth.GenericAttributeProfile.1.h | 355 +- ...ices.Bluetooth.GenericAttributeProfile.2.h | 378 +- ...ices.Bluetooth.GenericAttributeProfile.3.h | 6 +- .../Windows.Devices.Bluetooth.Rfcomm.0.h | 20 +- .../Windows.Devices.Bluetooth.Rfcomm.1.h | 126 +- .../Windows.Devices.Bluetooth.Rfcomm.2.h | 134 +- .../Windows.Devices.Bluetooth.Rfcomm.3.h | 6 +- .../winrt/internal/Windows.Devices.Custom.0.h | 14 +- .../winrt/internal/Windows.Devices.Custom.1.h | 56 +- .../winrt/internal/Windows.Devices.Custom.2.h | 57 +- .../winrt/internal/Windows.Devices.Custom.3.h | 6 +- .../internal/Windows.Devices.Enumeration.0.h | 39 +- .../internal/Windows.Devices.Enumeration.1.h | 388 +- .../internal/Windows.Devices.Enumeration.2.h | 419 +- .../internal/Windows.Devices.Enumeration.3.h | 24 +- .../Windows.Devices.Enumeration.Pnp.0.h | 13 +- .../Windows.Devices.Enumeration.Pnp.1.h | 80 +- .../Windows.Devices.Enumeration.Pnp.2.h | 101 +- .../Windows.Devices.Enumeration.Pnp.3.h | 14 +- .../internal/Windows.Devices.Geolocation.0.h | 35 +- .../internal/Windows.Devices.Geolocation.1.h | 291 +- .../internal/Windows.Devices.Geolocation.2.h | 302 +- .../internal/Windows.Devices.Geolocation.3.h | 18 +- ...Windows.Devices.Geolocation.Geofencing.0.h | 14 +- ...Windows.Devices.Geolocation.Geofencing.1.h | 75 +- ...Windows.Devices.Geolocation.Geofencing.2.h | 79 +- ...Windows.Devices.Geolocation.Geofencing.3.h | 12 +- .../winrt/internal/Windows.Devices.Gpio.0.h | 14 +- .../winrt/internal/Windows.Devices.Gpio.1.h | 64 +- .../winrt/internal/Windows.Devices.Gpio.2.h | 72 +- .../winrt/internal/Windows.Devices.Gpio.3.h | 4 +- .../Windows.Devices.Gpio.Provider.0.h | 14 +- .../Windows.Devices.Gpio.Provider.1.h | 61 +- .../Windows.Devices.Gpio.Provider.2.h | 67 +- .../Windows.Devices.Gpio.Provider.3.h | 4 +- .../Windows.Devices.HumanInterfaceDevice.0.h | 21 +- .../Windows.Devices.HumanInterfaceDevice.1.h | 188 +- .../Windows.Devices.HumanInterfaceDevice.2.h | 211 +- .../Windows.Devices.HumanInterfaceDevice.3.h | 6 +- .../winrt/internal/Windows.Devices.I2c.0.h | 15 +- .../winrt/internal/Windows.Devices.I2c.1.h | 72 +- .../winrt/internal/Windows.Devices.I2c.2.h | 80 +- .../winrt/internal/Windows.Devices.I2c.3.h | 8 +- .../internal/Windows.Devices.I2c.Provider.0.h | 13 +- .../internal/Windows.Devices.I2c.Provider.1.h | 50 +- .../internal/Windows.Devices.I2c.Provider.2.h | 58 +- .../internal/Windows.Devices.I2c.Provider.3.h | 4 +- .../winrt/internal/Windows.Devices.Input.0.h | 18 +- .../winrt/internal/Windows.Devices.Input.1.h | 98 +- .../winrt/internal/Windows.Devices.Input.2.h | 109 +- .../winrt/internal/Windows.Devices.Input.3.h | 4 +- .../winrt/internal/Windows.Devices.Lights.0.h | 12 +- .../winrt/internal/Windows.Devices.Lights.1.h | 43 +- .../winrt/internal/Windows.Devices.Lights.2.h | 46 +- .../winrt/internal/Windows.Devices.Lights.3.h | 6 +- .../winrt/internal/Windows.Devices.Midi.0.h | 38 +- .../winrt/internal/Windows.Devices.Midi.1.h | 290 +- .../winrt/internal/Windows.Devices.Midi.2.h | 293 +- .../winrt/internal/Windows.Devices.Midi.3.h | 8 +- .../internal/Windows.Devices.Perception.0.h | 50 +- .../internal/Windows.Devices.Perception.1.h | 662 +- .../internal/Windows.Devices.Perception.2.h | 664 +- .../internal/Windows.Devices.Perception.3.h | 10 +- .../Windows.Devices.Perception.Provider.0.h | 28 +- .../Windows.Devices.Perception.Provider.1.h | 195 +- .../Windows.Devices.Perception.Provider.2.h | 210 +- .../Windows.Devices.Perception.Provider.3.h | 18 +- .../Windows.Devices.PointOfService.0.h | 65 +- .../Windows.Devices.PointOfService.1.h | 949 +- .../Windows.Devices.PointOfService.2.h | 982 +- .../Windows.Devices.PointOfService.3.h | 12 +- .../internal/Windows.Devices.Portable.0.h | 11 +- .../internal/Windows.Devices.Portable.1.h | 23 +- .../internal/Windows.Devices.Portable.2.h | 24 +- .../internal/Windows.Devices.Portable.3.h | 6 +- .../winrt/internal/Windows.Devices.Power.0.h | 12 +- .../winrt/internal/Windows.Devices.Power.1.h | 43 +- .../winrt/internal/Windows.Devices.Power.2.h | 44 +- .../winrt/internal/Windows.Devices.Power.3.h | 6 +- .../internal/Windows.Devices.Printers.0.h | 12 +- .../internal/Windows.Devices.Printers.1.h | 33 +- .../internal/Windows.Devices.Printers.2.h | 34 +- .../internal/Windows.Devices.Printers.3.h | 6 +- .../Windows.Devices.Printers.Extensions.0.h | 19 +- .../Windows.Devices.Printers.Extensions.1.h | 125 +- .../Windows.Devices.Printers.Extensions.2.h | 116 +- .../Windows.Devices.Printers.Extensions.3.h | 6 +- .../winrt/internal/Windows.Devices.Pwm.0.h | 13 +- .../winrt/internal/Windows.Devices.Pwm.1.h | 51 +- .../winrt/internal/Windows.Devices.Pwm.2.h | 59 +- .../winrt/internal/Windows.Devices.Pwm.3.h | 4 +- .../internal/Windows.Devices.Pwm.Provider.0.h | 11 +- .../internal/Windows.Devices.Pwm.Provider.1.h | 30 +- .../internal/Windows.Devices.Pwm.Provider.2.h | 36 +- .../internal/Windows.Devices.Pwm.Provider.3.h | 4 +- .../winrt/internal/Windows.Devices.Radios.0.h | 11 +- .../winrt/internal/Windows.Devices.Radios.1.h | 33 +- .../winrt/internal/Windows.Devices.Radios.2.h | 39 +- .../winrt/internal/Windows.Devices.Radios.3.h | 6 +- .../internal/Windows.Devices.Scanners.0.h | 16 +- .../internal/Windows.Devices.Scanners.1.h | 123 +- .../internal/Windows.Devices.Scanners.2.h | 129 +- .../internal/Windows.Devices.Scanners.3.h | 6 +- .../internal/Windows.Devices.Sensors.0.h | 97 +- .../internal/Windows.Devices.Sensors.1.h | 953 +- .../internal/Windows.Devices.Sensors.2.h | 980 +- .../internal/Windows.Devices.Sensors.3.h | 10 +- .../Windows.Devices.Sensors.Custom.0.h | 13 +- .../Windows.Devices.Sensors.Custom.1.h | 51 +- .../Windows.Devices.Sensors.Custom.2.h | 63 +- .../Windows.Devices.Sensors.Custom.3.h | 6 +- .../Windows.Devices.SerialCommunication.0.h | 13 +- .../Windows.Devices.SerialCommunication.1.h | 78 +- .../Windows.Devices.SerialCommunication.2.h | 81 +- .../Windows.Devices.SerialCommunication.3.h | 8 +- .../internal/Windows.Devices.SmartCards.0.h | 50 +- .../internal/Windows.Devices.SmartCards.1.h | 490 +- .../internal/Windows.Devices.SmartCards.2.h | 550 +- .../internal/Windows.Devices.SmartCards.3.h | 18 +- .../winrt/internal/Windows.Devices.Sms.0.h | 41 +- .../winrt/internal/Windows.Devices.Sms.1.h | 411 +- .../winrt/internal/Windows.Devices.Sms.2.h | 441 +- .../winrt/internal/Windows.Devices.Sms.3.h | 50 +- .../winrt/internal/Windows.Devices.Spi.0.h | 16 +- .../winrt/internal/Windows.Devices.Spi.1.h | 87 +- .../winrt/internal/Windows.Devices.Spi.2.h | 100 +- .../winrt/internal/Windows.Devices.Spi.3.h | 10 +- .../internal/Windows.Devices.Spi.Provider.0.h | 14 +- .../internal/Windows.Devices.Spi.Provider.1.h | 62 +- .../internal/Windows.Devices.Spi.Provider.2.h | 70 +- .../internal/Windows.Devices.Spi.Provider.3.h | 4 +- .../winrt/internal/Windows.Devices.Usb.0.h | 37 +- .../winrt/internal/Windows.Devices.Usb.1.h | 360 +- .../winrt/internal/Windows.Devices.Usb.2.h | 418 +- .../winrt/internal/Windows.Devices.Usb.3.h | 6 +- .../winrt/internal/Windows.Devices.WiFi.0.h | 14 +- .../winrt/internal/Windows.Devices.WiFi.1.h | 74 +- .../winrt/internal/Windows.Devices.WiFi.2.h | 85 +- .../winrt/internal/Windows.Devices.WiFi.3.h | 6 +- .../internal/Windows.Devices.WiFiDirect.0.h | 25 +- .../internal/Windows.Devices.WiFiDirect.1.h | 188 +- .../internal/Windows.Devices.WiFiDirect.2.h | 198 +- .../internal/Windows.Devices.WiFiDirect.3.h | 8 +- .../Windows.Devices.WiFiDirect.Services.0.h | 20 +- .../Windows.Devices.WiFiDirect.Services.1.h | 175 +- .../Windows.Devices.WiFiDirect.Services.2.h | 183 +- .../Windows.Devices.WiFiDirect.Services.3.h | 12 +- .../Windows.Embedded.DeviceLockdown.0.h | 11 +- .../Windows.Embedded.DeviceLockdown.1.h | 24 +- .../Windows.Embedded.DeviceLockdown.2.h | 30 +- .../Windows.Embedded.DeviceLockdown.3.h | 4 +- .../winrt/internal/Windows.Foundation.0.h | 83 +- .../winrt/internal/Windows.Foundation.1.h | 296 +- .../winrt/internal/Windows.Foundation.2.h | 277 +- .../winrt/internal/Windows.Foundation.3.h | 58 +- .../Windows.Foundation.Collections.0.h | 10 +- .../Windows.Foundation.Collections.1.h | 12 +- .../Windows.Foundation.Collections.2.h | 28 +- .../Windows.Foundation.Collections.3.h | 4 +- .../Windows.Foundation.Diagnostics.0.h | 32 +- .../Windows.Foundation.Diagnostics.1.h | 388 +- .../Windows.Foundation.Diagnostics.2.h | 391 +- .../Windows.Foundation.Diagnostics.3.h | 20 +- .../internal/Windows.Foundation.Metadata.0.h | 10 +- .../internal/Windows.Foundation.Metadata.1.h | 21 +- .../internal/Windows.Foundation.Metadata.2.h | 22 +- .../internal/Windows.Foundation.Metadata.3.h | 24 +- .../winrt/internal/Windows.Gaming.Input.0.h | 20 +- .../winrt/internal/Windows.Gaming.Input.1.h | 161 +- .../winrt/internal/Windows.Gaming.Input.2.h | 182 +- .../winrt/internal/Windows.Gaming.Input.3.h | 4 +- .../internal/Windows.Gaming.Input.Custom.0.h | 18 +- .../internal/Windows.Gaming.Input.Custom.1.h | 101 +- .../internal/Windows.Gaming.Input.Custom.2.h | 99 +- .../internal/Windows.Gaming.Input.Custom.3.h | 4 +- .../Windows.Gaming.Input.ForceFeedback.0.h | 17 +- .../Windows.Gaming.Input.ForceFeedback.1.h | 96 +- .../Windows.Gaming.Input.ForceFeedback.2.h | 97 +- .../Windows.Gaming.Input.ForceFeedback.3.h | 4 +- ...indows.Gaming.Preview.GamesEnumeration.0.h | 13 +- ...indows.Gaming.Preview.GamesEnumeration.1.h | 42 +- ...indows.Gaming.Preview.GamesEnumeration.2.h | 65 +- ...indows.Gaming.Preview.GamesEnumeration.3.h | 10 +- .../winrt/internal/Windows.Gaming.UI.0.h | 10 +- .../winrt/internal/Windows.Gaming.UI.1.h | 25 +- .../winrt/internal/Windows.Gaming.UI.2.h | 24 +- .../winrt/internal/Windows.Gaming.UI.3.h | 12 +- .../winrt/internal/Windows.Globalization.0.h | 31 +- .../winrt/internal/Windows.Globalization.1.h | 533 +- .../winrt/internal/Windows.Globalization.2.h | 544 +- .../winrt/internal/Windows.Globalization.3.h | 26 +- .../Windows.Globalization.Collation.0.h | 11 +- .../Windows.Globalization.Collation.1.h | 22 +- .../Windows.Globalization.Collation.2.h | 28 +- .../Windows.Globalization.Collation.3.h | 4 +- ...ndows.Globalization.DateTimeFormatting.0.h | 13 +- ...ndows.Globalization.DateTimeFormatting.1.h | 65 +- ...ndows.Globalization.DateTimeFormatting.2.h | 71 +- ...ndows.Globalization.DateTimeFormatting.3.h | 14 +- .../internal/Windows.Globalization.Fonts.0.h | 12 +- .../internal/Windows.Globalization.Fonts.1.h | 44 +- .../internal/Windows.Globalization.Fonts.2.h | 45 +- .../internal/Windows.Globalization.Fonts.3.h | 6 +- ...Windows.Globalization.NumberFormatting.0.h | 27 +- ...Windows.Globalization.NumberFormatting.1.h | 206 +- ...Windows.Globalization.NumberFormatting.2.h | 212 +- ...Windows.Globalization.NumberFormatting.3.h | 16 +- ...ws.Globalization.PhoneNumberFormatting.0.h | 14 +- ...ws.Globalization.PhoneNumberFormatting.1.h | 63 +- ...ws.Globalization.PhoneNumberFormatting.2.h | 66 +- ...ws.Globalization.PhoneNumberFormatting.3.h | 18 +- .../internal/Windows.Graphics.DirectX.0.h | 9 +- .../internal/Windows.Graphics.DirectX.1.h | 9 +- .../internal/Windows.Graphics.DirectX.2.h | 4 +- .../internal/Windows.Graphics.DirectX.3.h | 4 +- .../Windows.Graphics.DirectX.Direct3D11.0.h | 11 +- .../Windows.Graphics.DirectX.Direct3D11.1.h | 21 +- .../Windows.Graphics.DirectX.Direct3D11.2.h | 24 +- .../Windows.Graphics.DirectX.Direct3D11.3.h | 4 +- .../internal/Windows.Graphics.Display.0.h | 16 +- .../internal/Windows.Graphics.Display.1.h | 128 +- .../internal/Windows.Graphics.Display.2.h | 123 +- .../internal/Windows.Graphics.Display.3.h | 60 +- .../internal/Windows.Graphics.Effects.0.h | 11 +- .../internal/Windows.Graphics.Effects.1.h | 21 +- .../internal/Windows.Graphics.Effects.2.h | 22 +- .../internal/Windows.Graphics.Effects.3.h | 4 +- .../internal/Windows.Graphics.Holographic.0.h | 18 +- .../internal/Windows.Graphics.Holographic.1.h | 121 +- .../internal/Windows.Graphics.Holographic.2.h | 132 +- .../internal/Windows.Graphics.Holographic.3.h | 4 +- .../internal/Windows.Graphics.Imaging.0.h | 27 +- .../internal/Windows.Graphics.Imaging.1.h | 254 +- .../internal/Windows.Graphics.Imaging.2.h | 264 +- .../internal/Windows.Graphics.Imaging.3.h | 8 +- .../internal/Windows.Graphics.Printing.0.h | 31 +- .../internal/Windows.Graphics.Printing.1.h | 272 +- .../internal/Windows.Graphics.Printing.2.h | 273 +- .../internal/Windows.Graphics.Printing.3.h | 6 +- ...indows.Graphics.Printing.OptionDetails.0.h | 20 +- ...indows.Graphics.Printing.OptionDetails.1.h | 137 +- ...indows.Graphics.Printing.OptionDetails.2.h | 145 +- ...indows.Graphics.Printing.OptionDetails.3.h | 4 +- .../internal/Windows.Graphics.Printing3D.0.h | 49 +- .../internal/Windows.Graphics.Printing3D.1.h | 476 +- .../internal/Windows.Graphics.Printing3D.2.h | 479 +- .../internal/Windows.Graphics.Printing3D.3.h | 6 +- .../internal/Windows.Management.Core.0.h | 11 +- .../internal/Windows.Management.Core.1.h | 20 +- .../internal/Windows.Management.Core.2.h | 21 +- .../internal/Windows.Management.Core.3.h | 6 +- .../Windows.Management.Deployment.0.h | 17 +- .../Windows.Management.Deployment.1.h | 137 +- .../Windows.Management.Deployment.2.h | 173 +- .../Windows.Management.Deployment.3.h | 4 +- .../Windows.Management.Deployment.Preview.0.h | 11 +- .../Windows.Management.Deployment.Preview.1.h | 22 +- .../Windows.Management.Deployment.Preview.2.h | 23 +- .../Windows.Management.Deployment.Preview.3.h | 6 +- .../Windows.Management.Orchestration.0.h | 12 +- .../Windows.Management.Orchestration.1.h | 29 +- .../Windows.Management.Orchestration.2.h | 32 +- .../Windows.Management.Orchestration.3.h | 4 +- .../internal/Windows.Management.Workplace.0.h | 12 +- .../internal/Windows.Management.Workplace.1.h | 33 +- .../internal/Windows.Management.Workplace.2.h | 34 +- .../internal/Windows.Management.Workplace.3.h | 4 +- 10.0.14393.0/winrt/internal/Windows.Media.0.h | 41 +- 10.0.14393.0/winrt/internal/Windows.Media.1.h | 509 +- 10.0.14393.0/winrt/internal/Windows.Media.2.h | 494 +- 10.0.14393.0/winrt/internal/Windows.Media.3.h | 96 +- .../winrt/internal/Windows.Media.Audio.0.h | 52 +- .../winrt/internal/Windows.Media.Audio.1.h | 583 +- .../winrt/internal/Windows.Media.Audio.2.h | 595 +- .../winrt/internal/Windows.Media.Audio.3.h | 4 +- .../winrt/internal/Windows.Media.Capture.0.h | 65 +- .../winrt/internal/Windows.Media.Capture.1.h | 777 +- .../winrt/internal/Windows.Media.Capture.2.h | 787 +- .../winrt/internal/Windows.Media.Capture.3.h | 16 +- .../internal/Windows.Media.Capture.Core.0.h | 12 +- .../internal/Windows.Media.Capture.Core.1.h | 45 +- .../internal/Windows.Media.Capture.Core.2.h | 46 +- .../internal/Windows.Media.Capture.Core.3.h | 4 +- .../internal/Windows.Media.Capture.Frames.0.h | 25 +- .../internal/Windows.Media.Capture.Frames.1.h | 214 +- .../internal/Windows.Media.Capture.Frames.2.h | 235 +- .../internal/Windows.Media.Capture.Frames.3.h | 6 +- .../winrt/internal/Windows.Media.Casting.0.h | 17 +- .../winrt/internal/Windows.Media.Casting.1.h | 119 +- .../winrt/internal/Windows.Media.Casting.2.h | 122 +- .../winrt/internal/Windows.Media.Casting.3.h | 6 +- .../Windows.Media.ClosedCaptioning.0.h | 10 +- .../Windows.Media.ClosedCaptioning.1.h | 23 +- .../Windows.Media.ClosedCaptioning.2.h | 24 +- .../Windows.Media.ClosedCaptioning.3.h | 4 +- .../Windows.Media.ContentRestrictions.0.h | 14 +- .../Windows.Media.ContentRestrictions.1.h | 67 +- .../Windows.Media.ContentRestrictions.2.h | 68 +- .../Windows.Media.ContentRestrictions.3.h | 6 +- .../winrt/internal/Windows.Media.Core.0.h | 82 +- .../winrt/internal/Windows.Media.Core.1.h | 1003 +- .../winrt/internal/Windows.Media.Core.2.h | 1027 +- .../winrt/internal/Windows.Media.Core.3.h | 18 +- .../winrt/internal/Windows.Media.Devices.0.h | 57 +- .../winrt/internal/Windows.Media.Devices.1.h | 628 +- .../winrt/internal/Windows.Media.Devices.2.h | 696 +- .../winrt/internal/Windows.Media.Devices.3.h | 22 +- .../internal/Windows.Media.Devices.Core.0.h | 28 +- .../internal/Windows.Media.Devices.Core.1.h | 235 +- .../internal/Windows.Media.Devices.Core.2.h | 238 +- .../internal/Windows.Media.Devices.Core.3.h | 4 +- .../internal/Windows.Media.DialProtocol.0.h | 18 +- .../internal/Windows.Media.DialProtocol.1.h | 113 +- .../internal/Windows.Media.DialProtocol.2.h | 114 +- .../internal/Windows.Media.DialProtocol.3.h | 8 +- .../winrt/internal/Windows.Media.Editing.0.h | 22 +- .../winrt/internal/Windows.Media.Editing.1.h | 180 +- .../winrt/internal/Windows.Media.Editing.2.h | 200 +- .../winrt/internal/Windows.Media.Editing.3.h | 4 +- .../winrt/internal/Windows.Media.Effects.0.h | 28 +- .../winrt/internal/Windows.Media.Effects.1.h | 230 +- .../winrt/internal/Windows.Media.Effects.2.h | 254 +- .../winrt/internal/Windows.Media.Effects.3.h | 24 +- .../internal/Windows.Media.FaceAnalysis.0.h | 14 +- .../internal/Windows.Media.FaceAnalysis.1.h | 63 +- .../internal/Windows.Media.FaceAnalysis.2.h | 69 +- .../internal/Windows.Media.FaceAnalysis.3.h | 4 +- .../winrt/internal/Windows.Media.Import.0.h | 25 +- .../winrt/internal/Windows.Media.Import.1.h | 269 +- .../winrt/internal/Windows.Media.Import.2.h | 307 +- .../winrt/internal/Windows.Media.Import.3.h | 6 +- .../Windows.Media.MediaProperties.0.h | 28 +- .../Windows.Media.MediaProperties.1.h | 279 +- .../Windows.Media.MediaProperties.2.h | 284 +- .../Windows.Media.MediaProperties.3.h | 8 +- .../winrt/internal/Windows.Media.Ocr.0.h | 14 +- .../winrt/internal/Windows.Media.Ocr.1.h | 57 +- .../winrt/internal/Windows.Media.Ocr.2.h | 73 +- .../winrt/internal/Windows.Media.Ocr.3.h | 4 +- .../winrt/internal/Windows.Media.PlayTo.0.h | 31 +- .../winrt/internal/Windows.Media.PlayTo.1.h | 278 +- .../winrt/internal/Windows.Media.PlayTo.2.h | 296 +- .../winrt/internal/Windows.Media.PlayTo.3.h | 28 +- .../winrt/internal/Windows.Media.Playback.0.h | 65 +- .../winrt/internal/Windows.Media.Playback.1.h | 891 +- .../winrt/internal/Windows.Media.Playback.2.h | 893 +- .../winrt/internal/Windows.Media.Playback.3.h | 6 +- .../internal/Windows.Media.Playlists.0.h | 11 +- .../internal/Windows.Media.Playlists.1.h | 24 +- .../internal/Windows.Media.Playlists.2.h | 25 +- .../internal/Windows.Media.Playlists.3.h | 4 +- .../internal/Windows.Media.Protection.0.h | 25 +- .../internal/Windows.Media.Protection.1.h | 150 +- .../internal/Windows.Media.Protection.2.h | 159 +- .../internal/Windows.Media.Protection.3.h | 10 +- .../Windows.Media.Protection.PlayReady.0.h | 59 +- .../Windows.Media.Protection.PlayReady.1.h | 577 +- .../Windows.Media.Protection.PlayReady.2.h | 610 +- .../Windows.Media.Protection.PlayReady.3.h | 24 +- .../winrt/internal/Windows.Media.Render.0.h | 13 +- .../winrt/internal/Windows.Media.Render.1.h | 9 +- .../winrt/internal/Windows.Media.Render.2.h | 4 +- .../winrt/internal/Windows.Media.Render.3.h | 4 +- .../Windows.Media.SpeechRecognition.0.h | 36 +- .../Windows.Media.SpeechRecognition.1.h | 315 +- .../Windows.Media.SpeechRecognition.2.h | 338 +- .../Windows.Media.SpeechRecognition.3.h | 14 +- .../Windows.Media.SpeechSynthesis.0.h | 13 +- .../Windows.Media.SpeechSynthesis.1.h | 47 +- .../Windows.Media.SpeechSynthesis.2.h | 62 +- .../Windows.Media.SpeechSynthesis.3.h | 4 +- .../Windows.Media.Streaming.Adaptive.0.h | 22 +- .../Windows.Media.Streaming.Adaptive.1.h | 194 +- .../Windows.Media.Streaming.Adaptive.2.h | 202 +- .../Windows.Media.Streaming.Adaptive.3.h | 10 +- .../internal/Windows.Media.Transcoding.0.h | 12 +- .../internal/Windows.Media.Transcoding.1.h | 48 +- .../internal/Windows.Media.Transcoding.2.h | 49 +- .../internal/Windows.Media.Transcoding.3.h | 4 +- .../winrt/internal/Windows.Networking.0.h | 14 +- .../winrt/internal/Windows.Networking.1.h | 60 +- .../winrt/internal/Windows.Networking.2.h | 63 +- .../winrt/internal/Windows.Networking.3.h | 10 +- .../Windows.Networking.BackgroundTransfer.0.h | 41 +- .../Windows.Networking.BackgroundTransfer.1.h | 356 +- .../Windows.Networking.BackgroundTransfer.2.h | 385 +- .../Windows.Networking.BackgroundTransfer.3.h | 20 +- .../Windows.Networking.Connectivity.0.h | 41 +- .../Windows.Networking.Connectivity.1.h | 378 +- .../Windows.Networking.Connectivity.2.h | 434 +- .../Windows.Networking.Connectivity.3.h | 12 +- .../Windows.Networking.NetworkOperators.0.h | 72 +- .../Windows.Networking.NetworkOperators.1.h | 735 +- .../Windows.Networking.NetworkOperators.2.h | 789 +- .../Windows.Networking.NetworkOperators.3.h | 24 +- .../internal/Windows.Networking.Proximity.0.h | 24 +- .../internal/Windows.Networking.Proximity.1.h | 190 +- .../internal/Windows.Networking.Proximity.2.h | 202 +- .../internal/Windows.Networking.Proximity.3.h | 26 +- .../Windows.Networking.PushNotifications.0.h | 15 +- .../Windows.Networking.PushNotifications.1.h | 74 +- .../Windows.Networking.PushNotifications.2.h | 75 +- .../Windows.Networking.PushNotifications.3.h | 8 +- ...dows.Networking.ServiceDiscovery.Dnssd.0.h | 13 +- ...dows.Networking.ServiceDiscovery.Dnssd.1.h | 73 +- ...dows.Networking.ServiceDiscovery.Dnssd.2.h | 79 +- ...dows.Networking.ServiceDiscovery.Dnssd.3.h | 6 +- .../internal/Windows.Networking.Sockets.0.h | 64 +- .../internal/Windows.Networking.Sockets.1.h | 620 +- .../internal/Windows.Networking.Sockets.2.h | 635 +- .../internal/Windows.Networking.Sockets.3.h | 16 +- .../winrt/internal/Windows.Networking.Vpn.0.h | 59 +- .../winrt/internal/Windows.Networking.Vpn.1.h | 629 +- .../winrt/internal/Windows.Networking.Vpn.2.h | 639 +- .../winrt/internal/Windows.Networking.Vpn.3.h | 14 +- .../winrt/internal/Windows.Perception.0.h | 11 +- .../winrt/internal/Windows.Perception.1.h | 22 +- .../winrt/internal/Windows.Perception.2.h | 23 +- .../winrt/internal/Windows.Perception.3.h | 4 +- .../Windows.Perception.Automation.Core.0.h | 10 +- .../Windows.Perception.Automation.Core.1.h | 12 +- .../Windows.Perception.Automation.Core.2.h | 13 +- .../Windows.Perception.Automation.Core.3.h | 4 +- .../internal/Windows.Perception.People.0.h | 10 +- .../internal/Windows.Perception.People.1.h | 14 +- .../internal/Windows.Perception.People.2.h | 15 +- .../internal/Windows.Perception.People.3.h | 4 +- .../internal/Windows.Perception.Spatial.0.h | 25 +- .../internal/Windows.Perception.Spatial.1.h | 192 +- .../internal/Windows.Perception.Spatial.2.h | 208 +- .../internal/Windows.Perception.Spatial.3.h | 6 +- .../Windows.Perception.Spatial.Surfaces.0.h | 16 +- .../Windows.Perception.Spatial.Surfaces.1.h | 95 +- .../Windows.Perception.Spatial.Surfaces.2.h | 116 +- .../Windows.Perception.Spatial.Surfaces.3.h | 4 +- .../Windows.Phone.ApplicationModel.0.h | 10 +- .../Windows.Phone.ApplicationModel.1.h | 12 +- .../Windows.Phone.ApplicationModel.2.h | 13 +- .../Windows.Phone.ApplicationModel.3.h | 4 +- .../Windows.Phone.Devices.Notification.0.h | 11 +- .../Windows.Phone.Devices.Notification.1.h | 22 +- .../Windows.Phone.Devices.Notification.2.h | 23 +- .../Windows.Phone.Devices.Notification.3.h | 4 +- .../internal/Windows.Phone.Devices.Power.0.h | 11 +- .../internal/Windows.Phone.Devices.Power.1.h | 28 +- .../internal/Windows.Phone.Devices.Power.2.h | 29 +- .../internal/Windows.Phone.Devices.Power.3.h | 4 +- .../Windows.Phone.Management.Deployment.0.h | 16 +- .../Windows.Phone.Management.Deployment.1.h | 83 +- .../Windows.Phone.Management.Deployment.2.h | 119 +- .../Windows.Phone.Management.Deployment.3.h | 16 +- .../internal/Windows.Phone.Media.Devices.0.h | 11 +- .../internal/Windows.Phone.Media.Devices.1.h | 29 +- .../internal/Windows.Phone.Media.Devices.2.h | 30 +- .../internal/Windows.Phone.Media.Devices.3.h | 4 +- .../Windows.Phone.Notification.Management.0.h | 37 +- .../Windows.Phone.Notification.Management.1.h | 387 +- .../Windows.Phone.Notification.Management.2.h | 423 +- .../Windows.Phone.Notification.Management.3.h | 38 +- .../Windows.Phone.PersonalInformation.0.h | 22 +- .../Windows.Phone.PersonalInformation.1.h | 212 +- .../Windows.Phone.PersonalInformation.2.h | 229 +- .../Windows.Phone.PersonalInformation.3.h | 4 +- ...Phone.PersonalInformation.Provisioning.0.h | 12 +- ...Phone.PersonalInformation.Provisioning.1.h | 35 +- ...Phone.PersonalInformation.Provisioning.2.h | 62 +- ...Phone.PersonalInformation.Provisioning.3.h | 12 +- .../Windows.Phone.Speech.Recognition.0.h | 9 +- .../Windows.Phone.Speech.Recognition.1.h | 9 +- .../Windows.Phone.Speech.Recognition.2.h | 4 +- .../Windows.Phone.Speech.Recognition.3.h | 4 +- .../internal/Windows.Phone.StartScreen.0.h | 12 +- .../internal/Windows.Phone.StartScreen.1.h | 42 +- .../internal/Windows.Phone.StartScreen.2.h | 43 +- .../internal/Windows.Phone.StartScreen.3.h | 6 +- .../winrt/internal/Windows.Phone.System.0.h | 11 +- .../winrt/internal/Windows.Phone.System.1.h | 21 +- .../winrt/internal/Windows.Phone.System.2.h | 22 +- .../winrt/internal/Windows.Phone.System.3.h | 4 +- .../internal/Windows.Phone.System.Power.0.h | 11 +- .../internal/Windows.Phone.System.Power.1.h | 27 +- .../internal/Windows.Phone.System.Power.2.h | 28 +- .../internal/Windows.Phone.System.Power.3.h | 8 +- .../internal/Windows.Phone.System.Profile.0.h | 10 +- .../internal/Windows.Phone.System.Profile.1.h | 12 +- .../internal/Windows.Phone.System.Profile.2.h | 14 +- .../internal/Windows.Phone.System.Profile.3.h | 8 +- ...e.System.UserProfile.GameServices.Core.0.h | 12 +- ...e.System.UserProfile.GameServices.Core.1.h | 40 +- ...e.System.UserProfile.GameServices.Core.2.h | 43 +- ...e.System.UserProfile.GameServices.Core.3.h | 4 +- .../winrt/internal/Windows.Phone.UI.Input.0.h | 13 +- .../winrt/internal/Windows.Phone.UI.Input.1.h | 53 +- .../winrt/internal/Windows.Phone.UI.Input.2.h | 54 +- .../winrt/internal/Windows.Phone.UI.Input.3.h | 4 +- ...ndows.Security.Authentication.Identity.0.h | 12 +- ...ndows.Security.Authentication.Identity.1.h | 34 +- ...ndows.Security.Authentication.Identity.2.h | 40 +- ...ndows.Security.Authentication.Identity.3.h | 4 +- ....Security.Authentication.Identity.Core.0.h | 15 +- ....Security.Authentication.Identity.Core.1.h | 78 +- ....Security.Authentication.Identity.Core.2.h | 89 +- ....Security.Authentication.Identity.Core.3.h | 4 +- ...urity.Authentication.Identity.Provider.0.h | 18 +- ...urity.Authentication.Identity.Provider.1.h | 106 +- ...urity.Authentication.Identity.Provider.2.h | 112 +- ...urity.Authentication.Identity.Provider.3.h | 14 +- ...ndows.Security.Authentication.OnlineId.0.h | 14 +- ...ndows.Security.Authentication.OnlineId.1.h | 65 +- ...ndows.Security.Authentication.OnlineId.2.h | 81 +- ...ndows.Security.Authentication.OnlineId.3.h | 8 +- .../Windows.Security.Authentication.Web.0.h | 12 +- .../Windows.Security.Authentication.Web.1.h | 38 +- .../Windows.Security.Authentication.Web.2.h | 39 +- .../Windows.Security.Authentication.Web.3.h | 4 +- ...ndows.Security.Authentication.Web.Core.0.h | 22 +- ...ndows.Security.Authentication.Web.Core.1.h | 156 +- ...ndows.Security.Authentication.Web.Core.2.h | 172 +- ...ndows.Security.Authentication.Web.Core.3.h | 28 +- ...s.Security.Authentication.Web.Provider.0.h | 30 +- ...s.Security.Authentication.Web.Provider.1.h | 225 +- ...s.Security.Authentication.Web.Provider.2.h | 241 +- ...s.Security.Authentication.Web.Provider.3.h | 20 +- .../internal/Windows.Security.Credentials.0.h | 24 +- .../internal/Windows.Security.Credentials.1.h | 171 +- .../internal/Windows.Security.Credentials.2.h | 197 +- .../internal/Windows.Security.Credentials.3.h | 16 +- .../Windows.Security.Credentials.UI.0.h | 13 +- .../Windows.Security.Credentials.UI.1.h | 67 +- .../Windows.Security.Credentials.UI.2.h | 68 +- .../Windows.Security.Credentials.UI.3.h | 10 +- .../Windows.Security.Cryptography.0.h | 10 +- .../Windows.Security.Cryptography.1.h | 22 +- .../Windows.Security.Cryptography.2.h | 23 +- .../Windows.Security.Cryptography.3.h | 12 +- ...ows.Security.Cryptography.Certificates.0.h | 49 +- ...ows.Security.Cryptography.Certificates.1.h | 514 +- ...ows.Security.Cryptography.Certificates.2.h | 520 +- ...ows.Security.Cryptography.Certificates.3.h | 26 +- .../Windows.Security.Cryptography.Core.0.h | 39 +- .../Windows.Security.Cryptography.Core.1.h | 418 +- .../Windows.Security.Cryptography.Core.2.h | 424 +- .../Windows.Security.Cryptography.Core.3.h | 18 +- ...s.Security.Cryptography.DataProtection.0.h | 11 +- ...s.Security.Cryptography.DataProtection.1.h | 24 +- ...s.Security.Cryptography.DataProtection.2.h | 25 +- ...s.Security.Cryptography.DataProtection.3.h | 6 +- .../Windows.Security.EnterpriseData.0.h | 36 +- .../Windows.Security.EnterpriseData.1.h | 263 +- .../Windows.Security.EnterpriseData.2.h | 272 +- .../Windows.Security.EnterpriseData.3.h | 66 +- ...ecurity.ExchangeActiveSyncProvisioning.0.h | 26 +- ...ecurity.ExchangeActiveSyncProvisioning.1.h | 79 +- ...ecurity.ExchangeActiveSyncProvisioning.2.h | 80 +- ...ecurity.ExchangeActiveSyncProvisioning.3.h | 4 +- .../winrt/internal/Windows.Services.Maps.0.h | 29 +- .../winrt/internal/Windows.Services.Maps.1.h | 239 +- .../winrt/internal/Windows.Services.Maps.2.h | 270 +- .../winrt/internal/Windows.Services.Maps.3.h | 20 +- .../Windows.Services.Maps.Guidance.0.h | 25 +- .../Windows.Services.Maps.Guidance.1.h | 259 +- .../Windows.Services.Maps.Guidance.2.h | 272 +- .../Windows.Services.Maps.Guidance.3.h | 4 +- .../Windows.Services.Maps.LocalSearch.0.h | 16 +- .../Windows.Services.Maps.LocalSearch.1.h | 86 +- .../Windows.Services.Maps.LocalSearch.2.h | 97 +- .../Windows.Services.Maps.LocalSearch.3.h | 6 +- .../winrt/internal/Windows.Services.Store.0.h | 34 +- .../winrt/internal/Windows.Services.Store.1.h | 354 +- .../winrt/internal/Windows.Services.Store.2.h | 402 +- .../winrt/internal/Windows.Services.Store.3.h | 8 +- .../winrt/internal/Windows.Storage.0.h | 60 +- .../winrt/internal/Windows.Storage.1.h | 610 +- .../winrt/internal/Windows.Storage.2.h | 655 +- .../winrt/internal/Windows.Storage.3.h | 80 +- .../internal/Windows.Storage.AccessCache.0.h | 14 +- .../internal/Windows.Storage.AccessCache.1.h | 68 +- .../internal/Windows.Storage.AccessCache.2.h | 74 +- .../internal/Windows.Storage.AccessCache.3.h | 4 +- .../internal/Windows.Storage.BulkAccess.0.h | 12 +- .../internal/Windows.Storage.BulkAccess.1.h | 65 +- .../internal/Windows.Storage.BulkAccess.2.h | 78 +- .../internal/Windows.Storage.BulkAccess.3.h | 4 +- .../internal/Windows.Storage.Compression.0.h | 13 +- .../internal/Windows.Storage.Compression.1.h | 41 +- .../internal/Windows.Storage.Compression.2.h | 46 +- .../internal/Windows.Storage.Compression.3.h | 4 +- .../Windows.Storage.FileProperties.0.h | 18 +- .../Windows.Storage.FileProperties.1.h | 165 +- .../Windows.Storage.FileProperties.2.h | 179 +- .../Windows.Storage.FileProperties.3.h | 4 +- .../internal/Windows.Storage.Pickers.0.h | 18 +- .../internal/Windows.Storage.Pickers.1.h | 121 +- .../internal/Windows.Storage.Pickers.2.h | 127 +- .../internal/Windows.Storage.Pickers.3.h | 6 +- .../Windows.Storage.Pickers.Provider.0.h | 18 +- .../Windows.Storage.Pickers.Provider.1.h | 119 +- .../Windows.Storage.Pickers.Provider.2.h | 126 +- .../Windows.Storage.Pickers.Provider.3.h | 6 +- .../internal/Windows.Storage.Provider.0.h | 16 +- .../internal/Windows.Storage.Provider.1.h | 86 +- .../internal/Windows.Storage.Provider.2.h | 87 +- .../internal/Windows.Storage.Provider.3.h | 6 +- .../winrt/internal/Windows.Storage.Search.0.h | 25 +- .../winrt/internal/Windows.Storage.Search.1.h | 240 +- .../winrt/internal/Windows.Storage.Search.2.h | 287 +- .../winrt/internal/Windows.Storage.Search.3.h | 8 +- .../internal/Windows.Storage.Streams.0.h | 26 +- .../internal/Windows.Storage.Streams.1.h | 222 +- .../internal/Windows.Storage.Streams.2.h | 225 +- .../internal/Windows.Storage.Streams.3.h | 4 +- .../winrt/internal/Windows.System.0.h | 45 +- .../winrt/internal/Windows.System.1.h | 476 +- .../winrt/internal/Windows.System.2.h | 485 +- .../winrt/internal/Windows.System.3.h | 34 +- .../internal/Windows.System.Diagnostics.0.h | 17 +- .../internal/Windows.System.Diagnostics.1.h | 99 +- .../internal/Windows.System.Diagnostics.2.h | 105 +- .../internal/Windows.System.Diagnostics.3.h | 4 +- .../winrt/internal/Windows.System.Display.0.h | 10 +- .../winrt/internal/Windows.System.Display.1.h | 13 +- .../winrt/internal/Windows.System.Display.2.h | 14 +- .../winrt/internal/Windows.System.Display.3.h | 4 +- .../winrt/internal/Windows.System.Power.0.h | 12 +- .../winrt/internal/Windows.System.Power.1.h | 100 +- .../winrt/internal/Windows.System.Power.2.h | 85 +- .../winrt/internal/Windows.System.Power.3.h | 40 +- .../Windows.System.Power.Diagnostics.0.h | 11 +- .../Windows.System.Power.Diagnostics.1.h | 25 +- .../Windows.System.Power.Diagnostics.2.h | 26 +- .../Windows.System.Power.Diagnostics.3.h | 4 +- .../winrt/internal/Windows.System.Profile.0.h | 19 +- .../winrt/internal/Windows.System.Profile.1.h | 130 +- .../winrt/internal/Windows.System.Profile.2.h | 142 +- .../winrt/internal/Windows.System.Profile.3.h | 10 +- ...ows.System.Profile.SystemManufacturers.0.h | 10 +- ...ows.System.Profile.SystemManufacturers.1.h | 12 +- ...ows.System.Profile.SystemManufacturers.2.h | 13 +- ...ows.System.Profile.SystemManufacturers.3.h | 4 +- .../internal/Windows.System.RemoteDesktop.0.h | 10 +- .../internal/Windows.System.RemoteDesktop.1.h | 12 +- .../internal/Windows.System.RemoteDesktop.2.h | 13 +- .../internal/Windows.System.RemoteDesktop.3.h | 4 +- .../internal/Windows.System.RemoteSystems.0.h | 25 +- .../internal/Windows.System.RemoteSystems.1.h | 170 +- .../internal/Windows.System.RemoteSystems.2.h | 186 +- .../internal/Windows.System.RemoteSystems.3.h | 8 +- .../internal/Windows.System.Threading.0.h | 15 +- .../internal/Windows.System.Threading.1.h | 40 +- .../internal/Windows.System.Threading.2.h | 47 +- .../internal/Windows.System.Threading.3.h | 10 +- .../Windows.System.Threading.Core.0.h | 14 +- .../Windows.System.Threading.Core.1.h | 46 +- .../Windows.System.Threading.Core.2.h | 49 +- .../Windows.System.Threading.Core.3.h | 14 +- .../internal/Windows.System.UserProfile.0.h | 20 +- .../internal/Windows.System.UserProfile.1.h | 131 +- .../internal/Windows.System.UserProfile.2.h | 152 +- .../internal/Windows.System.UserProfile.3.h | 8 +- 10.0.14393.0/winrt/internal/Windows.UI.0.h | 13 +- 10.0.14393.0/winrt/internal/Windows.UI.1.h | 177 +- 10.0.14393.0/winrt/internal/Windows.UI.2.h | 178 +- 10.0.14393.0/winrt/internal/Windows.UI.3.h | 4 +- .../Windows.UI.ApplicationSettings.0.h | 32 +- .../Windows.UI.ApplicationSettings.1.h | 191 +- .../Windows.UI.ApplicationSettings.2.h | 201 +- .../Windows.UI.ApplicationSettings.3.h | 24 +- .../winrt/internal/Windows.UI.Composition.0.h | 79 +- .../winrt/internal/Windows.UI.Composition.1.h | 909 +- .../winrt/internal/Windows.UI.Composition.2.h | 942 +- .../winrt/internal/Windows.UI.Composition.3.h | 6 +- .../Windows.UI.Composition.Effects.0.h | 10 +- .../Windows.UI.Composition.Effects.1.h | 21 +- .../Windows.UI.Composition.Effects.2.h | 24 +- .../Windows.UI.Composition.Effects.3.h | 4 +- .../Windows.UI.Composition.Interactions.0.h | 28 +- .../Windows.UI.Composition.Interactions.1.h | 245 +- .../Windows.UI.Composition.Interactions.2.h | 269 +- .../Windows.UI.Composition.Interactions.3.h | 4 +- .../winrt/internal/Windows.UI.Core.0.h | 57 +- .../winrt/internal/Windows.UI.Core.1.h | 685 +- .../winrt/internal/Windows.UI.Core.2.h | 668 +- .../winrt/internal/Windows.UI.Core.3.h | 10 +- .../Windows.UI.Core.AnimationMetrics.0.h | 14 +- .../Windows.UI.Core.AnimationMetrics.1.h | 61 +- .../Windows.UI.Core.AnimationMetrics.2.h | 67 +- .../Windows.UI.Core.AnimationMetrics.3.h | 4 +- .../winrt/internal/Windows.UI.Input.0.h | 45 +- .../winrt/internal/Windows.UI.Input.1.h | 548 +- .../winrt/internal/Windows.UI.Input.2.h | 553 +- .../winrt/internal/Windows.UI.Input.3.h | 8 +- .../internal/Windows.UI.Input.Inking.0.h | 37 +- .../internal/Windows.UI.Input.Inking.1.h | 394 +- .../internal/Windows.UI.Input.Inking.2.h | 433 +- .../internal/Windows.UI.Input.Inking.3.h | 4 +- .../internal/Windows.UI.Input.Inking.Core.0.h | 14 +- .../internal/Windows.UI.Input.Inking.Core.1.h | 99 +- .../internal/Windows.UI.Input.Inking.Core.2.h | 100 +- .../internal/Windows.UI.Input.Inking.Core.3.h | 4 +- .../Windows.UI.Input.Preview.Injection.0.h | 15 +- .../Windows.UI.Input.Preview.Injection.1.h | 101 +- .../Windows.UI.Input.Preview.Injection.2.h | 132 +- .../Windows.UI.Input.Preview.Injection.3.h | 4 +- .../internal/Windows.UI.Input.Spatial.0.h | 38 +- .../internal/Windows.UI.Input.Spatial.1.h | 372 +- .../internal/Windows.UI.Input.Spatial.2.h | 378 +- .../internal/Windows.UI.Input.Spatial.3.h | 4 +- .../internal/Windows.UI.Notifications.0.h | 151 +- .../internal/Windows.UI.Notifications.1.h | 604 +- .../internal/Windows.UI.Notifications.2.h | 635 +- .../internal/Windows.UI.Notifications.3.h | 18 +- .../Windows.UI.Notifications.Management.0.h | 11 +- .../Windows.UI.Notifications.Management.1.h | 30 +- .../Windows.UI.Notifications.Management.2.h | 36 +- .../Windows.UI.Notifications.Management.3.h | 4 +- .../winrt/internal/Windows.UI.Popups.0.h | 15 +- .../winrt/internal/Windows.UI.Popups.1.h | 77 +- .../winrt/internal/Windows.UI.Popups.2.h | 74 +- .../winrt/internal/Windows.UI.Popups.3.h | 16 +- .../winrt/internal/Windows.UI.StartScreen.0.h | 28 +- .../winrt/internal/Windows.UI.StartScreen.1.h | 222 +- .../winrt/internal/Windows.UI.StartScreen.2.h | 233 +- .../winrt/internal/Windows.UI.StartScreen.3.h | 18 +- .../winrt/internal/Windows.UI.Text.0.h | 17 +- .../winrt/internal/Windows.UI.Text.1.h | 273 +- .../winrt/internal/Windows.UI.Text.2.h | 274 +- .../winrt/internal/Windows.UI.Text.3.h | 4 +- .../winrt/internal/Windows.UI.Text.Core.0.h | 27 +- .../winrt/internal/Windows.UI.Text.Core.1.h | 264 +- .../winrt/internal/Windows.UI.Text.Core.2.h | 268 +- .../winrt/internal/Windows.UI.Text.Core.3.h | 4 +- .../internal/Windows.UI.ViewManagement.0.h | 44 +- .../internal/Windows.UI.ViewManagement.1.h | 451 +- .../internal/Windows.UI.ViewManagement.2.h | 450 +- .../internal/Windows.UI.ViewManagement.3.h | 14 +- .../winrt/internal/Windows.UI.WebUI.0.h | 26 +- .../winrt/internal/Windows.UI.WebUI.1.h | 161 +- .../winrt/internal/Windows.UI.WebUI.2.h | 182 +- .../winrt/internal/Windows.UI.WebUI.3.h | 28 +- .../winrt/internal/Windows.UI.WebUI.Core.0.h | 24 +- .../winrt/internal/Windows.UI.WebUI.Core.1.h | 158 +- .../winrt/internal/Windows.UI.WebUI.Core.2.h | 165 +- .../winrt/internal/Windows.UI.WebUI.Core.3.h | 8 +- .../winrt/internal/Windows.UI.Xaml.0.h | 159 +- .../winrt/internal/Windows.UI.Xaml.1.h | 1858 +- .../winrt/internal/Windows.UI.Xaml.2.h | 1848 +- .../winrt/internal/Windows.UI.Xaml.3.h | 102 +- .../winrt/internal/Windows.UI.Xaml.4.h | 70 +- .../winrt/internal/Windows.UI.Xaml.5.h | 36 +- .../internal/Windows.UI.Xaml.Automation.0.h | 67 +- .../internal/Windows.UI.Xaml.Automation.1.h | 650 +- .../internal/Windows.UI.Xaml.Automation.2.h | 662 +- .../internal/Windows.UI.Xaml.Automation.3.h | 24 +- .../Windows.UI.Xaml.Automation.Peers.0.h | 176 +- .../Windows.UI.Xaml.Automation.Peers.1.h | 1680 +- .../Windows.UI.Xaml.Automation.Peers.2.h | 1531 +- .../Windows.UI.Xaml.Automation.Peers.3.h | 20 +- .../Windows.UI.Xaml.Automation.Peers.4.h | 197 +- .../Windows.UI.Xaml.Automation.Peers.5.h | 18 +- .../Windows.UI.Xaml.Automation.Provider.0.h | 45 +- .../Windows.UI.Xaml.Automation.Provider.1.h | 433 +- .../Windows.UI.Xaml.Automation.Provider.2.h | 425 +- .../Windows.UI.Xaml.Automation.Provider.3.h | 4 +- .../Windows.UI.Xaml.Automation.Text.0.h | 9 +- .../Windows.UI.Xaml.Automation.Text.1.h | 9 +- .../Windows.UI.Xaml.Automation.Text.2.h | 4 +- .../Windows.UI.Xaml.Automation.Text.3.h | 4 +- .../internal/Windows.UI.Xaml.Controls.0.h | 575 +- .../internal/Windows.UI.Xaml.Controls.1.h | 8139 ++++- .../internal/Windows.UI.Xaml.Controls.2.h | 7733 +---- .../internal/Windows.UI.Xaml.Controls.3.h | 132 +- .../internal/Windows.UI.Xaml.Controls.4.h | 264 +- .../internal/Windows.UI.Xaml.Controls.5.h | 10 +- .../Windows.UI.Xaml.Controls.Maps.0.h | 84 +- .../Windows.UI.Xaml.Controls.Maps.1.h | 1094 +- .../Windows.UI.Xaml.Controls.Maps.2.h | 1075 +- .../Windows.UI.Xaml.Controls.Maps.3.h | 12 +- .../Windows.UI.Xaml.Controls.Maps.5.h | 24 +- .../Windows.UI.Xaml.Controls.Primitives.0.h | 110 +- .../Windows.UI.Xaml.Controls.Primitives.1.h | 1400 +- .../Windows.UI.Xaml.Controls.Primitives.2.h | 1362 +- .../Windows.UI.Xaml.Controls.Primitives.3.h | 44 +- .../Windows.UI.Xaml.Controls.Primitives.4.h | 17 +- .../Windows.UI.Xaml.Controls.Primitives.5.h | 10 +- .../winrt/internal/Windows.UI.Xaml.Data.0.h | 42 +- .../winrt/internal/Windows.UI.Xaml.Data.1.h | 420 +- .../winrt/internal/Windows.UI.Xaml.Data.2.h | 388 +- .../winrt/internal/Windows.UI.Xaml.Data.3.h | 14 +- .../winrt/internal/Windows.UI.Xaml.Data.5.h | 18 +- .../internal/Windows.UI.Xaml.Documents.0.h | 47 +- .../internal/Windows.UI.Xaml.Documents.1.h | 576 +- .../internal/Windows.UI.Xaml.Documents.2.h | 570 +- .../internal/Windows.UI.Xaml.Documents.3.h | 4 +- .../internal/Windows.UI.Xaml.Documents.4.h | 5 +- .../internal/Windows.UI.Xaml.Documents.5.h | 4 +- .../internal/Windows.UI.Xaml.Hosting.0.h | 17 +- .../internal/Windows.UI.Xaml.Hosting.1.h | 91 +- .../internal/Windows.UI.Xaml.Hosting.2.h | 90 +- .../internal/Windows.UI.Xaml.Hosting.3.h | 4 +- .../winrt/internal/Windows.UI.Xaml.Input.0.h | 54 +- .../winrt/internal/Windows.UI.Xaml.Input.1.h | 443 +- .../winrt/internal/Windows.UI.Xaml.Input.2.h | 459 +- .../winrt/internal/Windows.UI.Xaml.Input.3.h | 54 +- .../winrt/internal/Windows.UI.Xaml.Input.5.h | 6 +- .../internal/Windows.UI.Xaml.Interop.0.h | 19 +- .../internal/Windows.UI.Xaml.Interop.1.h | 123 +- .../internal/Windows.UI.Xaml.Interop.2.h | 109 +- .../internal/Windows.UI.Xaml.Interop.3.h | 12 +- .../internal/Windows.UI.Xaml.Interop.5.h | 6 +- .../winrt/internal/Windows.UI.Xaml.Markup.0.h | 21 +- .../winrt/internal/Windows.UI.Xaml.Markup.1.h | 220 +- .../winrt/internal/Windows.UI.Xaml.Markup.2.h | 159 +- .../winrt/internal/Windows.UI.Xaml.Markup.3.h | 44 +- .../winrt/internal/Windows.UI.Xaml.Media.0.h | 113 +- .../winrt/internal/Windows.UI.Xaml.Media.1.h | 1126 +- .../winrt/internal/Windows.UI.Xaml.Media.2.h | 1141 +- .../winrt/internal/Windows.UI.Xaml.Media.3.h | 22 +- .../winrt/internal/Windows.UI.Xaml.Media.4.h | 19 +- .../winrt/internal/Windows.UI.Xaml.Media.5.h | 18 +- .../Windows.UI.Xaml.Media.Animation.0.h | 151 +- .../Windows.UI.Xaml.Media.Animation.1.h | 1573 +- .../Windows.UI.Xaml.Media.Animation.2.h | 1559 +- .../Windows.UI.Xaml.Media.Animation.3.h | 8 +- .../Windows.UI.Xaml.Media.Animation.4.h | 14 +- .../Windows.UI.Xaml.Media.Animation.5.h | 14 +- .../Windows.UI.Xaml.Media.Imaging.0.h | 33 +- .../Windows.UI.Xaml.Media.Imaging.1.h | 261 +- .../Windows.UI.Xaml.Media.Imaging.2.h | 260 +- .../Windows.UI.Xaml.Media.Imaging.3.h | 8 +- .../Windows.UI.Xaml.Media.Imaging.4.h | 7 +- .../Windows.UI.Xaml.Media.Imaging.5.h | 8 +- .../Windows.UI.Xaml.Media.Media3D.0.h | 17 +- .../Windows.UI.Xaml.Media.Media3D.1.h | 122 +- .../Windows.UI.Xaml.Media.Media3D.2.h | 121 +- .../Windows.UI.Xaml.Media.Media3D.3.h | 4 +- .../Windows.UI.Xaml.Media.Media3D.5.h | 6 +- .../internal/Windows.UI.Xaml.Navigation.0.h | 22 +- .../internal/Windows.UI.Xaml.Navigation.1.h | 114 +- .../internal/Windows.UI.Xaml.Navigation.2.h | 116 +- .../internal/Windows.UI.Xaml.Navigation.3.h | 26 +- .../internal/Windows.UI.Xaml.Printing.0.h | 18 +- .../internal/Windows.UI.Xaml.Printing.1.h | 87 +- .../internal/Windows.UI.Xaml.Printing.2.h | 92 +- .../internal/Windows.UI.Xaml.Printing.3.h | 16 +- .../internal/Windows.UI.Xaml.Printing.5.h | 6 +- .../internal/Windows.UI.Xaml.Resources.0.h | 13 +- .../internal/Windows.UI.Xaml.Resources.1.h | 44 +- .../internal/Windows.UI.Xaml.Resources.2.h | 40 +- .../internal/Windows.UI.Xaml.Resources.3.h | 4 +- .../internal/Windows.UI.Xaml.Resources.4.h | 11 +- .../internal/Windows.UI.Xaml.Resources.5.h | 4 +- .../winrt/internal/Windows.UI.Xaml.Shapes.0.h | 25 +- .../winrt/internal/Windows.UI.Xaml.Shapes.1.h | 206 +- .../winrt/internal/Windows.UI.Xaml.Shapes.2.h | 203 +- .../winrt/internal/Windows.UI.Xaml.Shapes.3.h | 4 +- .../winrt/internal/Windows.UI.Xaml.Shapes.5.h | 4 +- 10.0.14393.0/winrt/internal/Windows.Web.0.h | 11 +- 10.0.14393.0/winrt/internal/Windows.Web.1.h | 21 +- 10.0.14393.0/winrt/internal/Windows.Web.2.h | 22 +- 10.0.14393.0/winrt/internal/Windows.Web.3.h | 4 +- .../winrt/internal/Windows.Web.AtomPub.0.h | 14 +- .../winrt/internal/Windows.Web.AtomPub.1.h | 62 +- .../winrt/internal/Windows.Web.AtomPub.2.h | 85 +- .../winrt/internal/Windows.Web.AtomPub.3.h | 4 +- .../winrt/internal/Windows.Web.Http.0.h | 31 +- .../winrt/internal/Windows.Web.Http.1.h | 269 +- .../winrt/internal/Windows.Web.Http.2.h | 314 +- .../winrt/internal/Windows.Web.Http.3.h | 22 +- .../internal/Windows.Web.Http.Diagnostics.0.h | 16 +- .../internal/Windows.Web.Http.Diagnostics.1.h | 103 +- .../internal/Windows.Web.Http.Diagnostics.2.h | 109 +- .../internal/Windows.Web.Http.Diagnostics.3.h | 4 +- .../internal/Windows.Web.Http.Filters.0.h | 16 +- .../internal/Windows.Web.Http.Filters.1.h | 99 +- .../internal/Windows.Web.Http.Filters.2.h | 107 +- .../internal/Windows.Web.Http.Filters.3.h | 4 +- .../internal/Windows.Web.Http.Headers.0.h | 75 +- .../internal/Windows.Web.Http.Headers.1.h | 750 +- .../internal/Windows.Web.Http.Headers.2.h | 753 +- .../internal/Windows.Web.Http.Headers.3.h | 122 +- .../internal/Windows.Web.Syndication.0.h | 32 +- .../internal/Windows.Web.Syndication.1.h | 329 +- .../internal/Windows.Web.Syndication.2.h | 330 +- .../internal/Windows.Web.Syndication.3.h | 30 +- 10.0.14393.0/winrt/ppl.h | 18 +- Breaking Changes.md | 38 + README.md | 14 +- 1403 files changed, 242274 insertions(+), 144710 deletions(-) create mode 100644 Breaking Changes.md diff --git a/10.0.14393.0/Samples/AsyncReader/Main.cpp b/10.0.14393.0/Samples/AsyncReader/Main.cpp index efcf1a3b7..d487796b2 100644 --- a/10.0.14393.0/Samples/AsyncReader/Main.cpp +++ b/10.0.14393.0/Samples/AsyncReader/Main.cpp @@ -7,13 +7,13 @@ struct file { file(wchar_t const * const filename) : m_handle(create(filename)), - m_io(get(m_handle)) + m_io(get_abi(m_handle)) { } auto read(uint64_t const offset, void * const buffer, size_t const size) { - return m_io.start([=, handle = get(m_handle)](OVERLAPPED & overlapped) + return m_io.start([=, handle = get_abi(m_handle)](OVERLAPPED & overlapped) { overlapped.Offset = static_cast(offset); overlapped.OffsetHigh = offset >> 32; @@ -47,7 +47,7 @@ struct file } }; - using file_handle = handle; + using file_handle = impl::handle; static file_handle create(wchar_t const * const filename) { @@ -89,7 +89,7 @@ IAsyncAction sample() int main() { - initialize(); + init_apartment(); sample().get(); } diff --git a/10.0.14393.0/Samples/Blocks/App.cpp b/10.0.14393.0/Samples/Blocks/App.cpp index 9dcea7482..fbf188f93 100644 --- a/10.0.14393.0/Samples/Blocks/App.cpp +++ b/10.0.14393.0/Samples/Blocks/App.cpp @@ -25,7 +25,7 @@ struct App : implements { } - void Load(hstring_ref) + void Load(hstring_view) { } diff --git a/10.0.14393.0/Samples/Blocks/Assets/SmallLogo.scale-100.png b/10.0.14393.0/Samples/Blocks/Assets/SmallLogo.scale-100.png index 1eb0d9d528c42f132872e8af4dc563081b0b9aff..f3fc56a0e5cf3b2ee668f666c2ef9240c1f0a4ab 100644 GIT binary patch literal 526 zcmV+p0`dKcP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0i#JoK~z{r-PyrS z!$1&)VF!f*=*TsY15gG~N1zPg05!NH3INH>vplPKv}@1qj8`_l^b{f-^l26Q!lCc` zW=~y>ue&LnaMyLi>sD*qc6gO14E+`tk|)f+{HC30zr(xw9cjYPcZtO{=Dfg&(O#MaB>IhJLR-K~Sk4t) z3f5vdH*^U&7t6VzbHSxp&Wz3hTd|x8tp$5wxni^i?2YA$&`aR8uv|8J4!ky&%R;BX zwXmET9Rt_Kaw>ET{6wpb~AL_LcOn$+q QkN^Mx07*qoM6N<$f=Vpm2LJ#7 literal 329 zcmV-P0k-~$P)q$gGRCwC#*X;?zAP@%N+|i#I!$mrh zlQ>KU$Rdu>|JH&931_?y6Djl{gb>4nCV5pzDJ?S!mq|4ZejKj%i@j$H{#ML~2Y{DF z$=}bKPaz+UGt{v(4CTQQXym}&iW8{s!ew~XIE7NLjQpy#I2S$rous$~?f%DHT#B*+ zq=#!zc5=0FEqWFpB%UE(L807on!pidHPLgYO}XEgorrg;PB=8ipgQ5u5`&g_MQaRd zaU7Ao8XQMuuN21-s0PPTs1%38x_Yl3Fs-|Y4!C-;M-8 AsyncSample() int main() { - initialize(); + init_apartment(); try { diff --git a/10.0.14393.0/Samples/Syndication/Main.cpp b/10.0.14393.0/Samples/Syndication/Main.cpp index ccc543610..f5d15f016 100644 --- a/10.0.14393.0/Samples/Syndication/Main.cpp +++ b/10.0.14393.0/Samples/Syndication/Main.cpp @@ -21,7 +21,7 @@ IAsyncAction Sample() int main() { - initialize(); + init_apartment(); Sample().get(); } diff --git a/10.0.14393.0/Samples/Video/App.cpp b/10.0.14393.0/Samples/Video/App.cpp index 3d1ecb76a..3d6d133f4 100644 --- a/10.0.14393.0/Samples/Video/App.cpp +++ b/10.0.14393.0/Samples/Video/App.cpp @@ -22,7 +22,7 @@ struct App : implements { } - void Load(hstring_ref) + void Load(hstring_view) { } diff --git a/10.0.14393.0/Samples/Video/Assets/SmallLogo.scale-100.png b/10.0.14393.0/Samples/Video/Assets/SmallLogo.scale-100.png index 1eb0d9d528c42f132872e8af4dc563081b0b9aff..f3fc56a0e5cf3b2ee668f666c2ef9240c1f0a4ab 100644 GIT binary patch literal 526 zcmV+p0`dKcP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0i#JoK~z{r-PyrS z!$1&)VF!f*=*TsY15gG~N1zPg05!NH3INH>vplPKv}@1qj8`_l^b{f-^l26Q!lCc` zW=~y>ue&LnaMyLi>sD*qc6gO14E+`tk|)f+{HC30zr(xw9cjYPcZtO{=Dfg&(O#MaB>IhJLR-K~Sk4t) z3f5vdH*^U&7t6VzbHSxp&Wz3hTd|x8tp$5wxni^i?2YA$&`aR8uv|8J4!ky&%R;BX zwXmET9Rt_Kaw>ET{6wpb~AL_LcOn$+q QkN^Mx07*qoM6N<$f=Vpm2LJ#7 literal 329 zcmV-P0k-~$P)q$gGRCwC#*X;?zAP@%N+|i#I!$mrh zlQ>KU$Rdu>|JH&931_?y6Djl{gb>4nCV5pzDJ?S!mq|4ZejKj%i@j$H{#ML~2Y{DF z$=}bKPaz+UGt{v(4CTQQXym}&iW8{s!ew~XIE7NLjQpy#I2S$rous$~?f%DHT#B*+ zq=#!zc5=0FEqWFpB%UE(L807on!pidHPLgYO}XEgorrg;PB=8ipgQ5u5`&g_MQaRd zaU7Ao8XQMuuN21-s0PPTs1%38x_Yl3Fs-|Y4!C-;M-8Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0i#JoK~z{r-PyrS z!$1&)VF!f*=*TsY15gG~N1zPg05!NH3INH>vplPKv}@1qj8`_l^b{f-^l26Q!lCc` zW=~y>ue&LnaMyLi>sD*qc6gO14E+`tk|)f+{HC30zr(xw9cjYPcZtO{=Dfg&(O#MaB>IhJLR-K~Sk4t) z3f5vdH*^U&7t6VzbHSxp&Wz3hTd|x8tp$5wxni^i?2YA$&`aR8uv|8J4!ky&%R;BX zwXmET9Rt_Kaw>ET{6wpb~AL_LcOn$+q QkN^Mx07*qoM6N<$f=Vpm2LJ#7 literal 329 zcmV-P0k-~$P)q$gGRCwC#*X;?zAP@%N+|i#I!$mrh zlQ>KU$Rdu>|JH&931_?y6Djl{gb>4nCV5pzDJ?S!mq|4ZejKj%i@j$H{#ML~2Y{DF z$=}bKPaz+UGt{v(4CTQQXym}&iW8{s!ew~XIE7NLjQpy#I2S$rous$~?f%DHT#B*+ zq=#!zc5=0FEqWFpB%UE(L807on!pidHPLgYO}XEgorrg;PB=8ipgQ5u5`&g_MQaRd zaU7Ao8XQMuuN21-s0PPTs1%38x_Yl3Fs-|Y4!C-;M-8 : { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -52,7 +56,8 @@ struct produce : { try { - *value = detach(this->shim().PreviousExecutionState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousExecutionState()); return S_OK; } catch (...) @@ -61,11 +66,12 @@ struct produce : } } - HRESULT __stdcall get_SplashScreen(abi_arg_out value) noexcept override + HRESULT __stdcall get_SplashScreen(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SplashScreen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SplashScreen()); return S_OK; } catch (...) @@ -79,11 +85,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -101,7 +108,8 @@ struct produceshim().CurrentlyShownApplicationViewId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentlyShownApplicationViewId()); return S_OK; } catch (...) @@ -114,11 +122,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Verb(abi_arg_out value) noexcept override + HRESULT __stdcall get_Verb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Verb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verb()); return S_OK; } catch (...) @@ -132,11 +141,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AddAppointmentOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_AddAppointmentOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AddAppointmentOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddAppointmentOperation()); return S_OK; } catch (...) @@ -150,11 +160,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RemoveAppointmentOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoveAppointmentOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoveAppointmentOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoveAppointmentOperation()); return S_OK; } catch (...) @@ -168,11 +179,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ReplaceAppointmentOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReplaceAppointmentOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReplaceAppointmentOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReplaceAppointmentOperation()); return S_OK; } catch (...) @@ -186,11 +198,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InstanceStartDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InstanceStartDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InstanceStartDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceStartDate()); return S_OK; } catch (...) @@ -200,11 +213,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalId()); return S_OK; } catch (...) @@ -214,11 +228,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RoamingId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoamingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingId()); return S_OK; } catch (...) @@ -232,11 +247,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TimeToShow(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimeToShow(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeToShow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeToShow()); return S_OK; } catch (...) @@ -245,11 +261,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -262,11 +279,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TaskInstance(abi_arg_out value) noexcept override + HRESULT __stdcall get_TaskInstance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TaskInstance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaskInstance()); return S_OK; } catch (...) @@ -280,11 +298,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CachedFileUpdaterUI(abi_arg_out value) noexcept override + HRESULT __stdcall get_CachedFileUpdaterUI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CachedFileUpdaterUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CachedFileUpdaterUI()); return S_OK; } catch (...) @@ -298,11 +317,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VideoDeviceController(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceController()); return S_OK; } catch (...) @@ -312,11 +332,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_VideoDeviceExtension(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceExtension()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceExtension()); return S_OK; } catch (...) @@ -330,11 +351,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Verb(abi_arg_out value) noexcept override + HRESULT __stdcall get_Verb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Verb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verb()); return S_OK; } catch (...) @@ -348,11 +370,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -362,11 +385,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceUserId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceUserId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUserId()); return S_OK; } catch (...) @@ -376,11 +400,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -394,11 +419,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Address(abi_arg_out value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -408,11 +434,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -426,11 +453,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -440,11 +468,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceUserId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceUserId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUserId()); return S_OK; } catch (...) @@ -454,11 +483,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -472,11 +502,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ContactPickerUI(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactPickerUI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactPickerUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactPickerUI()); return S_OK; } catch (...) @@ -490,11 +521,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -504,11 +536,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceUserId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceUserId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUserId()); return S_OK; } catch (...) @@ -518,11 +551,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -536,11 +570,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -550,11 +585,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceUserId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceUserId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUserId()); return S_OK; } catch (...) @@ -564,11 +600,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -582,11 +619,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Verb(abi_arg_out value) noexcept override + HRESULT __stdcall get_Verb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Verb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verb()); return S_OK; } catch (...) @@ -600,11 +638,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ContinuationData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContinuationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContinuationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContinuationData()); return S_OK; } catch (...) @@ -618,11 +657,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceInformationId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformationId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformationId()); return S_OK; } catch (...) @@ -632,11 +672,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Verb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Verb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verb()); return S_OK; } catch (...) @@ -650,11 +691,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -668,11 +710,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppName()); return S_OK; } catch (...) @@ -686,11 +729,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Files(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Files(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Files()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Files()); return S_OK; } catch (...) @@ -700,11 +744,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Verb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Verb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verb()); return S_OK; } catch (...) @@ -718,11 +763,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CallerPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallerPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallerPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerPackageFamilyName()); return S_OK; } catch (...) @@ -736,11 +782,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NeighboringFilesQuery(abi_arg_out value) noexcept override + HRESULT __stdcall get_NeighboringFilesQuery(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NeighboringFilesQuery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NeighboringFilesQuery()); return S_OK; } catch (...) @@ -754,11 +801,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FileOpenPickerUI(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileOpenPickerUI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileOpenPickerUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileOpenPickerUI()); return S_OK; } catch (...) @@ -772,11 +820,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CallerPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallerPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallerPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerPackageFamilyName()); return S_OK; } catch (...) @@ -790,11 +839,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Files(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Files(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Files()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Files()); return S_OK; } catch (...) @@ -808,11 +858,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FileSavePickerUI(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileSavePickerUI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileSavePickerUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileSavePickerUI()); return S_OK; } catch (...) @@ -826,11 +877,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CallerPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallerPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallerPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerPackageFamilyName()); return S_OK; } catch (...) @@ -840,11 +892,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EnterpriseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnterpriseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnterpriseId()); return S_OK; } catch (...) @@ -858,11 +911,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_File(abi_arg_out value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -876,11 +930,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Folder(abi_arg_out value) noexcept override + HRESULT __stdcall get_Folder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Folder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Folder()); return S_OK; } catch (...) @@ -894,11 +949,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -908,11 +964,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TileId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileId()); return S_OK; } catch (...) @@ -926,11 +983,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TileActivatedInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_TileActivatedInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileActivatedInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileActivatedInfo()); return S_OK; } catch (...) @@ -944,11 +1002,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Info(abi_arg_out value) noexcept override + HRESULT __stdcall get_Info(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Info()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Info()); return S_OK; } catch (...) @@ -962,11 +1021,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CallUI(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallUI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallUI()); return S_OK; } catch (...) @@ -980,11 +1040,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PickerOperationId(abi_arg_out value) noexcept override + HRESULT __stdcall get_PickerOperationId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PickerOperationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PickerOperationId()); return S_OK; } catch (...) @@ -1002,7 +1063,8 @@ struct produceshim().PrelaunchActivated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrelaunchActivated()); return S_OK; } catch (...) @@ -1015,11 +1077,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Workflow(abi_arg_out value) noexcept override + HRESULT __stdcall get_Workflow(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Workflow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Workflow()); return S_OK; } catch (...) @@ -1033,11 +1096,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Configuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -1051,11 +1115,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -1069,11 +1134,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CallerPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallerPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallerPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerPackageFamilyName()); return S_OK; } catch (...) @@ -1083,11 +1149,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1101,11 +1168,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ProtocolForResultsOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProtocolForResultsOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtocolForResultsOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolForResultsOperation()); return S_OK; } catch (...) @@ -1119,11 +1187,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SharedContext(abi_arg_out value) noexcept override + HRESULT __stdcall get_SharedContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SharedContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharedContext()); return S_OK; } catch (...) @@ -1137,11 +1206,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -1151,11 +1221,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1169,11 +1240,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LinguisticDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -1187,11 +1259,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ShareOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShareOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShareOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShareOperation()); return S_OK; } catch (...) @@ -1205,11 +1278,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ImageLocation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageLocation()); return S_OK; } catch (...) @@ -1218,11 +1292,12 @@ struct produce : produc } } - HRESULT __stdcall add_Dismissed(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Dismissed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Dismissed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Dismissed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1235,6 +1310,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Dismissed(cookie); return S_OK; } @@ -1248,11 +1324,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_RecentlyShownNotifications(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RecentlyShownNotifications(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RecentlyShownNotifications()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecentlyShownNotifications()); return S_OK; } catch (...) @@ -1266,11 +1343,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Argument(abi_arg_out argument) noexcept override + HRESULT __stdcall get_Argument(impl::abi_arg_out argument) noexcept override { try { - *argument = detach(this->shim().Argument()); + typename D::abi_guard guard(this->shim()); + *argument = detach_abi(this->shim().Argument()); return S_OK; } catch (...) @@ -1280,11 +1358,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UserInput(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserInput()); return S_OK; } catch (...) @@ -1298,11 +1377,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Operation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Operation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Operation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Operation()); return S_OK; } catch (...) @@ -1316,11 +1396,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ViewSwitcher(abi_arg_out value) noexcept override + HRESULT __stdcall get_ViewSwitcher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ViewSwitcher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewSwitcher()); return S_OK; } catch (...) @@ -1334,11 +1415,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Result(abi_arg_out value) noexcept override + HRESULT __stdcall get_Result(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -1352,11 +1434,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ItemId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemId()); return S_OK; } catch (...) @@ -1370,7 +1453,8 @@ struct produceshim().ActionKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActionKind()); return S_OK; } catch (...) @@ -1379,11 +1463,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ActionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActionId()); return S_OK; } catch (...) @@ -1397,11 +1482,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Operation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Operation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Operation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Operation()); return S_OK; } catch (...) @@ -1415,11 +1501,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebAuthenticationResult(abi_arg_out result) noexcept override + HRESULT __stdcall get_WebAuthenticationResult(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WebAuthenticationResult()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WebAuthenticationResult()); return S_OK; } catch (...) @@ -1437,594 +1524,1496 @@ namespace Windows::ApplicationModel::Activation { template Windows::Foundation::Rect impl_ISplashScreen::ImageLocation() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ImageLocation(put(value))); + check_hresult(WINRT_SHIM(ISplashScreen)->get_ImageLocation(put_abi(value))); return value; } -template event_token impl_ISplashScreen::Dismissed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ISplashScreen::Dismissed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Dismissed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISplashScreen)->add_Dismissed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ISplashScreen::Dismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ISplashScreen::Dismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Activation::ISplashScreen::remove_Dismissed, Dismissed(handler)); } template void impl_ISplashScreen::Dismissed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Dismissed(cookie)); + check_hresult(WINRT_SHIM(ISplashScreen)->remove_Dismissed(cookie)); } template Windows::ApplicationModel::Activation::ActivationKind impl_IActivatedEventArgs::Kind() const { Windows::ApplicationModel::Activation::ActivationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IActivatedEventArgs)->get_Kind(&value)); return value; } template Windows::ApplicationModel::Activation::ApplicationExecutionState impl_IActivatedEventArgs::PreviousExecutionState() const { Windows::ApplicationModel::Activation::ApplicationExecutionState value {}; - check_hresult(static_cast(static_cast(*this))->get_PreviousExecutionState(&value)); + check_hresult(WINRT_SHIM(IActivatedEventArgs)->get_PreviousExecutionState(&value)); return value; } template Windows::ApplicationModel::Activation::SplashScreen impl_IActivatedEventArgs::SplashScreen() const { Windows::ApplicationModel::Activation::SplashScreen value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SplashScreen(put(value))); + check_hresult(WINRT_SHIM(IActivatedEventArgs)->get_SplashScreen(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderActivatedEventArgs::Verb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Verb(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderActivatedEventArgs)->get_Verb(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation impl_IAppointmentsProviderAddAppointmentActivatedEventArgs::AddAppointmentOperation() const { Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AddAppointmentOperation(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderAddAppointmentActivatedEventArgs)->get_AddAppointmentOperation(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation impl_IAppointmentsProviderReplaceAppointmentActivatedEventArgs::ReplaceAppointmentOperation() const { Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ReplaceAppointmentOperation(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderReplaceAppointmentActivatedEventArgs)->get_ReplaceAppointmentOperation(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation impl_IAppointmentsProviderRemoveAppointmentActivatedEventArgs::RemoveAppointmentOperation() const { Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoveAppointmentOperation(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderRemoveAppointmentActivatedEventArgs)->get_RemoveAppointmentOperation(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::InstanceStartDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InstanceStartDate(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs)->get_InstanceStartDate(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::LocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs)->get_LocalId(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs::RoamingId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RoamingId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs)->get_RoamingId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAppointmentsProviderShowTimeFrameActivatedEventArgs::TimeToShow() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeToShow(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderShowTimeFrameActivatedEventArgs)->get_TimeToShow(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IAppointmentsProviderShowTimeFrameActivatedEventArgs::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderShowTimeFrameActivatedEventArgs)->get_Duration(put_abi(value))); return value; } template Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderOperation impl_IUserDataAccountProviderActivatedEventArgs::Operation() const { Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderOperation value; - check_hresult(static_cast(static_cast(*this))->get_Operation(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountProviderActivatedEventArgs)->get_Operation(put_abi(value))); return value; } template Windows::System::User impl_IActivatedEventArgsWithUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IActivatedEventArgsWithUser)->get_User(put_abi(value))); return value; } template int32_t impl_IApplicationViewActivatedEventArgs::CurrentlyShownApplicationViewId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentlyShownApplicationViewId(&value)); + check_hresult(WINRT_SHIM(IApplicationViewActivatedEventArgs)->get_CurrentlyShownApplicationViewId(&value)); return value; } template Windows::UI::ViewManagement::ActivationViewSwitcher impl_IViewSwitcherProvider::ViewSwitcher() const { Windows::UI::ViewManagement::ActivationViewSwitcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ViewSwitcher(put(value))); + check_hresult(WINRT_SHIM(IViewSwitcherProvider)->get_ViewSwitcher(put_abi(value))); return value; } template bool impl_IPrelaunchActivatedEventArgs::PrelaunchActivated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PrelaunchActivated(&value)); + check_hresult(WINRT_SHIM(IPrelaunchActivatedEventArgs)->get_PrelaunchActivated(&value)); return value; } template hstring impl_ILaunchActivatedEventArgs::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(ILaunchActivatedEventArgs)->get_Arguments(put_abi(value))); return value; } template hstring impl_ILaunchActivatedEventArgs::TileId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TileId(put(value))); + check_hresult(WINRT_SHIM(ILaunchActivatedEventArgs)->get_TileId(put_abi(value))); return value; } template Windows::ApplicationModel::Activation::TileActivatedInfo impl_ILaunchActivatedEventArgs2::TileActivatedInfo() const { Windows::ApplicationModel::Activation::TileActivatedInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TileActivatedInfo(put(value))); + check_hresult(WINRT_SHIM(ILaunchActivatedEventArgs2)->get_TileActivatedInfo(put_abi(value))); return value; } template hstring impl_ISearchActivatedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchActivatedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchActivatedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchActivatedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails impl_ISearchActivatedEventArgsWithLinguisticDetails::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchActivatedEventArgsWithLinguisticDetails)->get_LinguisticDetails(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::ShareTarget::ShareOperation impl_IShareTargetActivatedEventArgs::ShareOperation() const { Windows::ApplicationModel::DataTransfer::ShareTarget::ShareOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShareOperation(put(value))); + check_hresult(WINRT_SHIM(IShareTargetActivatedEventArgs)->get_ShareOperation(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IFileActivatedEventArgs::Files() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Files(put(value))); + check_hresult(WINRT_SHIM(IFileActivatedEventArgs)->get_Files(put_abi(value))); return value; } template hstring impl_IFileActivatedEventArgs::Verb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Verb(put(value))); + check_hresult(WINRT_SHIM(IFileActivatedEventArgs)->get_Verb(put_abi(value))); return value; } template Windows::Storage::Search::StorageFileQueryResult impl_IFileActivatedEventArgsWithNeighboringFiles::NeighboringFilesQuery() const { Windows::Storage::Search::StorageFileQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NeighboringFilesQuery(put(value))); + check_hresult(WINRT_SHIM(IFileActivatedEventArgsWithNeighboringFiles)->get_NeighboringFilesQuery(put_abi(value))); return value; } template hstring impl_IFileActivatedEventArgsWithCallerPackageFamilyName::CallerPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallerPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IFileActivatedEventArgsWithCallerPackageFamilyName)->get_CallerPackageFamilyName(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IProtocolActivatedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IProtocolActivatedEventArgs)->get_Uri(put_abi(value))); return value; } template hstring impl_IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData::CallerPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallerPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData)->get_CallerPackageFamilyName(put_abi(value))); return value; } template Windows::Foundation::Collections::ValueSet impl_IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData::Data() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData)->get_Data(put_abi(value))); return value; } template Windows::System::ProtocolForResultsOperation impl_IProtocolForResultsActivatedEventArgs::ProtocolForResultsOperation() const { Windows::System::ProtocolForResultsOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtocolForResultsOperation(put(value))); + check_hresult(WINRT_SHIM(IProtocolForResultsActivatedEventArgs)->get_ProtocolForResultsOperation(put_abi(value))); return value; } template Windows::Storage::Pickers::Provider::FileOpenPickerUI impl_IFileOpenPickerActivatedEventArgs::FileOpenPickerUI() const { Windows::Storage::Pickers::Provider::FileOpenPickerUI value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FileOpenPickerUI(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerActivatedEventArgs)->get_FileOpenPickerUI(put_abi(value))); return value; } template hstring impl_IFileOpenPickerActivatedEventArgs2::CallerPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallerPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerActivatedEventArgs2)->get_CallerPackageFamilyName(put_abi(value))); return value; } template Windows::Storage::Pickers::Provider::FileSavePickerUI impl_IFileSavePickerActivatedEventArgs::FileSavePickerUI() const { Windows::Storage::Pickers::Provider::FileSavePickerUI value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FileSavePickerUI(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerActivatedEventArgs)->get_FileSavePickerUI(put_abi(value))); return value; } template hstring impl_IFileSavePickerActivatedEventArgs2::CallerPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallerPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerActivatedEventArgs2)->get_CallerPackageFamilyName(put_abi(value))); return value; } template hstring impl_IFileSavePickerActivatedEventArgs2::EnterpriseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnterpriseId(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerActivatedEventArgs2)->get_EnterpriseId(put_abi(value))); return value; } template Windows::Storage::Provider::CachedFileUpdaterUI impl_ICachedFileUpdaterActivatedEventArgs::CachedFileUpdaterUI() const { Windows::Storage::Provider::CachedFileUpdaterUI value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CachedFileUpdaterUI(put(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterActivatedEventArgs)->get_CachedFileUpdaterUI(put_abi(value))); return value; } template hstring impl_IDeviceActivatedEventArgs::DeviceInformationId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformationId(put(value))); + check_hresult(WINRT_SHIM(IDeviceActivatedEventArgs)->get_DeviceInformationId(put_abi(value))); return value; } template hstring impl_IDeviceActivatedEventArgs::Verb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Verb(put(value))); + check_hresult(WINRT_SHIM(IDeviceActivatedEventArgs)->get_Verb(put_abi(value))); return value; } template hstring impl_IPickerReturnedActivatedEventArgs::PickerOperationId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PickerOperationId(put(value))); + check_hresult(WINRT_SHIM(IPickerReturnedActivatedEventArgs)->get_PickerOperationId(put_abi(value))); return value; } -template Windows::IInspectable impl_IRestrictedLaunchActivatedEventArgs::SharedContext() const +template Windows::Foundation::IInspectable impl_IRestrictedLaunchActivatedEventArgs::SharedContext() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SharedContext(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRestrictedLaunchActivatedEventArgs)->get_SharedContext(put_abi(value))); return value; } -template Windows::IInspectable impl_ILockScreenActivatedEventArgs::Info() const +template Windows::Foundation::IInspectable impl_ILockScreenActivatedEventArgs::Info() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Info(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ILockScreenActivatedEventArgs)->get_Info(put_abi(value))); return value; } template Windows::Foundation::Collections::ValueSet impl_IContinuationActivatedEventArgs::ContinuationData() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContinuationData(put(value))); + check_hresult(WINRT_SHIM(IContinuationActivatedEventArgs)->get_ContinuationData(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IFileOpenPickerContinuationEventArgs::Files() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Files(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerContinuationEventArgs)->get_Files(put_abi(value))); return value; } template Windows::Storage::StorageFile impl_IFileSavePickerContinuationEventArgs::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerContinuationEventArgs)->get_File(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IFolderPickerContinuationEventArgs::Folder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Folder(put(value))); + check_hresult(WINRT_SHIM(IFolderPickerContinuationEventArgs)->get_Folder(put_abi(value))); return value; } template Windows::Security::Authentication::Web::WebAuthenticationResult impl_IWebAuthenticationBrokerContinuationEventArgs::WebAuthenticationResult() const { Windows::Security::Authentication::Web::WebAuthenticationResult result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAuthenticationResult(put(result))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerContinuationEventArgs)->get_WebAuthenticationResult(put_abi(result))); return result; } template Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation impl_IWebAccountProviderActivatedEventArgs::Operation() const { Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation value; - check_hresult(static_cast(static_cast(*this))->get_Operation(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderActivatedEventArgs)->get_Operation(put_abi(value))); return value; } template hstring impl_IToastNotificationActivatedEventArgs::Argument() const { hstring argument; - check_hresult(static_cast(static_cast(*this))->get_Argument(put(argument))); + check_hresult(WINRT_SHIM(IToastNotificationActivatedEventArgs)->get_Argument(put_abi(argument))); return argument; } template Windows::Foundation::Collections::ValueSet impl_IToastNotificationActivatedEventArgs::UserInput() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UserInput(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationActivatedEventArgs)->get_UserInput(put_abi(value))); return value; } template hstring impl_IDialReceiverActivatedEventArgs::AppName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppName(put(value))); + check_hresult(WINRT_SHIM(IDialReceiverActivatedEventArgs)->get_AppName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ITileActivatedInfo::RecentlyShownNotifications() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RecentlyShownNotifications(put(value))); + check_hresult(WINRT_SHIM(ITileActivatedInfo)->get_RecentlyShownNotifications(put_abi(value))); return value; } template Windows::ApplicationModel::Background::IBackgroundTaskInstance impl_IBackgroundActivatedEventArgs::TaskInstance() const { Windows::ApplicationModel::Background::IBackgroundTaskInstance value; - check_hresult(static_cast(static_cast(*this))->get_TaskInstance(put(value))); + check_hresult(WINRT_SHIM(IBackgroundActivatedEventArgs)->get_TaskInstance(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IDevicePairingActivatedEventArgs::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IDevicePairingActivatedEventArgs)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionResult impl_IVoiceCommandActivatedEventArgs::Result() const { Windows::Media::SpeechRecognition::SpeechRecognitionResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Result(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandActivatedEventArgs)->get_Result(put_abi(value))); return value; } template Windows::Devices::Printers::Extensions::PrintTaskConfiguration impl_IPrintTaskSettingsActivatedEventArgs::Configuration() const { Windows::Devices::Printers::Extensions::PrintTaskConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskSettingsActivatedEventArgs)->get_Configuration(put_abi(value))); return value; } template Windows::Devices::Printers::Extensions::Print3DWorkflow impl_IPrint3DWorkflowActivatedEventArgs::Workflow() const { Windows::Devices::Printers::Extensions::Print3DWorkflow value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Workflow(put(value))); + check_hresult(WINRT_SHIM(IPrint3DWorkflowActivatedEventArgs)->get_Workflow(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::LockScreenCallUI impl_ILockScreenCallActivatedEventArgs::CallUI() const { Windows::ApplicationModel::Calls::LockScreenCallUI value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CallUI(put(value))); + check_hresult(WINRT_SHIM(ILockScreenCallActivatedEventArgs)->get_CallUI(put_abi(value))); return value; } -template Windows::IInspectable impl_ICameraSettingsActivatedEventArgs::VideoDeviceController() const +template Windows::Foundation::IInspectable impl_ICameraSettingsActivatedEventArgs::VideoDeviceController() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceController(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICameraSettingsActivatedEventArgs)->get_VideoDeviceController(put_abi(value))); return value; } -template Windows::IInspectable impl_ICameraSettingsActivatedEventArgs::VideoDeviceExtension() const +template Windows::Foundation::IInspectable impl_ICameraSettingsActivatedEventArgs::VideoDeviceExtension() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceExtension(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICameraSettingsActivatedEventArgs)->get_VideoDeviceExtension(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Provider::ContactPickerUI impl_IContactPickerActivatedEventArgs::ContactPickerUI() const { Windows::ApplicationModel::Contacts::Provider::ContactPickerUI value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContactPickerUI(put(value))); + check_hresult(WINRT_SHIM(IContactPickerActivatedEventArgs)->get_ContactPickerUI(put_abi(value))); return value; } template hstring impl_IContactActivatedEventArgs::Verb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Verb(put(value))); + check_hresult(WINRT_SHIM(IContactActivatedEventArgs)->get_Verb(put_abi(value))); return value; } template hstring impl_IContactCallActivatedEventArgs::ServiceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IContactCallActivatedEventArgs)->get_ServiceId(put_abi(value))); return value; } template hstring impl_IContactCallActivatedEventArgs::ServiceUserId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceUserId(put(value))); + check_hresult(WINRT_SHIM(IContactCallActivatedEventArgs)->get_ServiceUserId(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactCallActivatedEventArgs::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactCallActivatedEventArgs)->get_Contact(put_abi(value))); return value; } template hstring impl_IContactMessageActivatedEventArgs::ServiceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IContactMessageActivatedEventArgs)->get_ServiceId(put_abi(value))); return value; } template hstring impl_IContactMessageActivatedEventArgs::ServiceUserId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceUserId(put(value))); + check_hresult(WINRT_SHIM(IContactMessageActivatedEventArgs)->get_ServiceUserId(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactMessageActivatedEventArgs::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactMessageActivatedEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactAddress impl_IContactMapActivatedEventArgs::Address() const { Windows::ApplicationModel::Contacts::ContactAddress value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IContactMapActivatedEventArgs)->get_Address(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactMapActivatedEventArgs::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactMapActivatedEventArgs)->get_Contact(put_abi(value))); return value; } template hstring impl_IContactPostActivatedEventArgs::ServiceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IContactPostActivatedEventArgs)->get_ServiceId(put_abi(value))); return value; } template hstring impl_IContactPostActivatedEventArgs::ServiceUserId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceUserId(put(value))); + check_hresult(WINRT_SHIM(IContactPostActivatedEventArgs)->get_ServiceUserId(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactPostActivatedEventArgs::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactPostActivatedEventArgs)->get_Contact(put_abi(value))); return value; } template hstring impl_IContactVideoCallActivatedEventArgs::ServiceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IContactVideoCallActivatedEventArgs)->get_ServiceId(put_abi(value))); return value; } template hstring impl_IContactVideoCallActivatedEventArgs::ServiceUserId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceUserId(put(value))); + check_hresult(WINRT_SHIM(IContactVideoCallActivatedEventArgs)->get_ServiceUserId(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactVideoCallActivatedEventArgs::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactVideoCallActivatedEventArgs)->get_Contact(put_abi(value))); return value; } template hstring impl_IContactsProviderActivatedEventArgs::Verb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Verb(put(value))); + check_hresult(WINRT_SHIM(IContactsProviderActivatedEventArgs)->get_Verb(put_abi(value))); return value; } template hstring impl_IWalletActionActivatedEventArgs::ItemId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ItemId(put(value))); + check_hresult(WINRT_SHIM(IWalletActionActivatedEventArgs)->get_ItemId(put_abi(value))); return value; } template Windows::ApplicationModel::Wallet::WalletActionKind impl_IWalletActionActivatedEventArgs::ActionKind() const { Windows::ApplicationModel::Wallet::WalletActionKind value {}; - check_hresult(static_cast(static_cast(*this))->get_ActionKind(&value)); + check_hresult(WINRT_SHIM(IWalletActionActivatedEventArgs)->get_ActionKind(&value)); return value; } template hstring impl_IWalletActionActivatedEventArgs::ActionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ActionId(put(value))); + check_hresult(WINRT_SHIM(IWalletActionActivatedEventArgs)->get_ActionId(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IActivatedEventArgsWithUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IApplicationViewActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderAddAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderRemoveAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderReplaceAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IAppointmentsProviderShowTimeFrameActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IBackgroundActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ICachedFileUpdaterActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ICameraSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactMapActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactMessageActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactPostActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactVideoCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContactsProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IContinuationActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IDeviceActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IDevicePairingActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IDialReceiverActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileActivatedEventArgsWithCallerPackageFamilyName & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileActivatedEventArgsWithNeighboringFiles & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileOpenPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileOpenPickerActivatedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileOpenPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileSavePickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileSavePickerActivatedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFileSavePickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IFolderPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ILaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ILaunchActivatedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ILockScreenActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ILockScreenCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IPickerReturnedActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IPrelaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IPrint3DWorkflowActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IPrintTaskSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IProtocolActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IProtocolForResultsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IRestrictedLaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ISearchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ISearchActivatedEventArgsWithLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IShareTargetActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ISplashScreen & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ITileActivatedInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IToastNotificationActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IUserDataAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IViewSwitcherProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IVoiceCommandActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IWalletActionActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IWebAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::IWebAuthenticationBrokerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::AppointmentsProviderAddAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::AppointmentsProviderRemoveAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::AppointmentsProviderReplaceAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::AppointmentsProviderShowAppointmentDetailsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::AppointmentsProviderShowTimeFrameActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::BackgroundActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::CachedFileUpdaterActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::CameraSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactMapActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactMessageActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactPostActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ContactVideoCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::DeviceActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::DevicePairingActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::DialReceiverActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FileActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FileOpenPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FileOpenPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FileSavePickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FileSavePickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::FolderPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::LaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::LockScreenActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::LockScreenCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::PickerReturnedActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::Print3DWorkflowActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::PrintTaskSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ProtocolForResultsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::RestrictedLaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::SearchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ShareTargetActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::SplashScreen & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::TileActivatedInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::ToastNotificationActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::UserDataAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::VoiceCommandActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::WalletActionActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::WebAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Activation::WebAuthenticationBrokerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.AppExtensions.h b/10.0.14393.0/winrt/Windows.ApplicationModel.AppExtensions.h index e3fd68cd0..2ed155abc 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.AppExtensions.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.AppExtensions.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : pro } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : pro } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce : pro } } - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : pro } } - HRESULT __stdcall get_AppInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppInfo()); return S_OK; } catch (...) @@ -86,11 +94,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetExtensionPropertiesAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetExtensionPropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetExtensionPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetExtensionPropertiesAsync()); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetPublicFolderAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPublicFolderAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPublicFolderAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPublicFolderAsync()); return S_OK; } catch (...) @@ -118,11 +128,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_FindAllAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -132,11 +143,12 @@ struct produce packageFullName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestRemovePackageAsync(impl::abi_arg_in packageFullName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestRemovePackageAsync(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestRemovePackageAsync(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -146,11 +158,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageInstalled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageInstalled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageInstalled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -163,6 +176,7 @@ struct produceshim()); this->shim().PackageInstalled(token); return S_OK; } @@ -172,11 +186,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageUpdating(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageUpdating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageUpdating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -189,6 +204,7 @@ struct produceshim()); this->shim().PackageUpdating(token); return S_OK; } @@ -198,11 +214,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -215,6 +232,7 @@ struct produceshim()); this->shim().PackageUpdated(token); return S_OK; } @@ -224,11 +242,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageUninstalling(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageUninstalling(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageUninstalling(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -241,6 +260,7 @@ struct produceshim()); this->shim().PackageUninstalling(token); return S_OK; } @@ -250,11 +270,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -267,6 +288,7 @@ struct produceshim()); this->shim().PackageStatusChanged(token); return S_OK; } @@ -280,11 +302,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Open(abi_arg_in appExtensionName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Open(impl::abi_arg_in appExtensionName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Open(*reinterpret_cast(&appExtensionName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Open(*reinterpret_cast(&appExtensionName))); return S_OK; } catch (...) @@ -298,11 +321,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppExtensionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppExtensionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppExtensionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppExtensionName()); return S_OK; } catch (...) @@ -312,11 +336,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -326,11 +351,12 @@ struct produce> values) noexcept override + HRESULT __stdcall get_Extensions(impl::abi_arg_out> values) noexcept override { try { - *values = detach(this->shim().Extensions()); + typename D::abi_guard guard(this->shim()); + *values = detach_abi(this->shim().Extensions()); return S_OK; } catch (...) @@ -344,11 +370,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppExtensionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppExtensionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppExtensionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppExtensionName()); return S_OK; } catch (...) @@ -358,11 +385,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -376,11 +404,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppExtensionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppExtensionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppExtensionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppExtensionName()); return S_OK; } catch (...) @@ -390,11 +419,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -408,11 +438,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppExtensionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppExtensionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppExtensionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppExtensionName()); return S_OK; } catch (...) @@ -422,11 +453,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -436,11 +468,12 @@ struct produce> values) noexcept override + HRESULT __stdcall get_Extensions(impl::abi_arg_out> values) noexcept override { try { - *values = detach(this->shim().Extensions()); + typename D::abi_guard guard(this->shim()); + *values = detach_abi(this->shim().Extensions()); return S_OK; } catch (...) @@ -454,11 +487,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppExtensionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppExtensionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppExtensionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppExtensionName()); return S_OK; } catch (...) @@ -468,11 +502,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -487,31 +522,31 @@ struct produce Windows::ApplicationModel::AppExtensions::AppExtensionCatalog impl_IAppExtensionCatalogStatics::Open(hstring_ref appExtensionName) const +template Windows::ApplicationModel::AppExtensions::AppExtensionCatalog impl_IAppExtensionCatalogStatics::Open(hstring_view appExtensionName) const { Windows::ApplicationModel::AppExtensions::AppExtensionCatalog value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Open(get(appExtensionName), put(value))); + check_hresult(WINRT_SHIM(IAppExtensionCatalogStatics)->abi_Open(get_abi(appExtensionName), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IAppExtensionCatalog::FindAllAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->abi_FindAllAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppExtensionCatalog::RequestRemovePackageAsync(hstring_ref packageFullName) const +template Windows::Foundation::IAsyncOperation impl_IAppExtensionCatalog::RequestRemovePackageAsync(hstring_view packageFullName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestRemovePackageAsync(get(packageFullName), put(operation))); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->abi_RequestRemovePackageAsync(get_abi(packageFullName), put_abi(operation))); return operation; } template event_token impl_IAppExtensionCatalog::PackageInstalled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageInstalled(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->add_PackageInstalled(get_abi(handler), &token)); return token; } @@ -522,13 +557,13 @@ template event_revoker impl_IAppExtensionCata template void impl_IAppExtensionCatalog::PackageInstalled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageInstalled(token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->remove_PackageInstalled(token)); } template event_token impl_IAppExtensionCatalog::PackageUpdating(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageUpdating(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->add_PackageUpdating(get_abi(handler), &token)); return token; } @@ -539,13 +574,13 @@ template event_revoker impl_IAppExtensionCata template void impl_IAppExtensionCatalog::PackageUpdating(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageUpdating(token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->remove_PackageUpdating(token)); } template event_token impl_IAppExtensionCatalog::PackageUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->add_PackageUpdated(get_abi(handler), &token)); return token; } @@ -556,13 +591,13 @@ template event_revoker impl_IAppExtensionCata template void impl_IAppExtensionCatalog::PackageUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageUpdated(token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->remove_PackageUpdated(token)); } template event_token impl_IAppExtensionCatalog::PackageUninstalling(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageUninstalling(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->add_PackageUninstalling(get_abi(handler), &token)); return token; } @@ -573,13 +608,13 @@ template event_revoker impl_IAppExtensionCata template void impl_IAppExtensionCatalog::PackageUninstalling(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageUninstalling(token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->remove_PackageUninstalling(token)); } template event_token impl_IAppExtensionCatalog::PackageStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->add_PackageStatusChanged(get_abi(handler), &token)); return token; } @@ -590,143 +625,143 @@ template event_revoker impl_IAppExtensionCata template void impl_IAppExtensionCatalog::PackageStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageStatusChanged(token)); + check_hresult(WINRT_SHIM(IAppExtensionCatalog)->remove_PackageStatusChanged(token)); } template hstring impl_IAppExtension::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IAppExtension)->get_Id(put_abi(value))); return value; } template hstring impl_IAppExtension::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IAppExtension)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IAppExtension::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IAppExtension)->get_Description(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtension::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtension)->get_Package(put_abi(value))); return value; } template Windows::ApplicationModel::AppInfo impl_IAppExtension::AppInfo() const { Windows::ApplicationModel::AppInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppInfo(put(value))); + check_hresult(WINRT_SHIM(IAppExtension)->get_AppInfo(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAppExtension::GetExtensionPropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetExtensionPropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppExtension)->abi_GetExtensionPropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAppExtension::GetPublicFolderAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPublicFolderAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppExtension)->abi_GetPublicFolderAsync(put_abi(operation))); return operation; } template hstring impl_IAppExtensionPackageInstalledEventArgs::AppExtensionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppExtensionName(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageInstalledEventArgs)->get_AppExtensionName(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtensionPackageInstalledEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageInstalledEventArgs)->get_Package(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppExtensionPackageInstalledEventArgs::Extensions() const { Windows::Foundation::Collections::IVectorView values; - check_hresult(static_cast(static_cast(*this))->get_Extensions(put(values))); + check_hresult(WINRT_SHIM(IAppExtensionPackageInstalledEventArgs)->get_Extensions(put_abi(values))); return values; } template hstring impl_IAppExtensionPackageUpdatingEventArgs::AppExtensionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppExtensionName(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUpdatingEventArgs)->get_AppExtensionName(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtensionPackageUpdatingEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUpdatingEventArgs)->get_Package(put_abi(value))); return value; } template hstring impl_IAppExtensionPackageUpdatedEventArgs::AppExtensionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppExtensionName(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUpdatedEventArgs)->get_AppExtensionName(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtensionPackageUpdatedEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUpdatedEventArgs)->get_Package(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppExtensionPackageUpdatedEventArgs::Extensions() const { Windows::Foundation::Collections::IVectorView values; - check_hresult(static_cast(static_cast(*this))->get_Extensions(put(values))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUpdatedEventArgs)->get_Extensions(put_abi(values))); return values; } template hstring impl_IAppExtensionPackageUninstallingEventArgs::AppExtensionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppExtensionName(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUninstallingEventArgs)->get_AppExtensionName(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtensionPackageUninstallingEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageUninstallingEventArgs)->get_Package(put_abi(value))); return value; } template hstring impl_IAppExtensionPackageStatusChangedEventArgs::AppExtensionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppExtensionName(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageStatusChangedEventArgs)->get_AppExtensionName(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IAppExtensionPackageStatusChangedEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IAppExtensionPackageStatusChangedEventArgs)->get_Package(put_abi(value))); return value; } -inline Windows::ApplicationModel::AppExtensions::AppExtensionCatalog AppExtensionCatalog::Open(hstring_ref appExtensionName) +inline Windows::ApplicationModel::AppExtensions::AppExtensionCatalog AppExtensionCatalog::Open(hstring_view appExtensionName) { return get_activation_factory().Open(appExtensionName); } @@ -734,3 +769,140 @@ inline Windows::ApplicationModel::AppExtensions::AppExtensionCatalog AppExtensio } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtension & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionCatalog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionCatalogStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionPackageInstalledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionPackageStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionPackageUninstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionPackageUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::IAppExtensionPackageUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtension & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionCatalog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionPackageInstalledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionPackageStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionPackageUninstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionPackageUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppExtensions::AppExtensionPackageUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.AppService.h b/10.0.14393.0/winrt/Windows.ApplicationModel.AppService.h index c0d362bdf..3b6638175 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.AppService.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.AppService.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.RemoteSystems.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_FindAppServiceProvidersAsync(abi_arg_in appServiceName, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAppServiceProvidersAsync(impl::abi_arg_in appServiceName, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAppServiceProvidersAsync(*reinterpret_cast(&appServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAppServiceProvidersAsync(*reinterpret_cast(&appServiceName))); return S_OK; } catch (...) @@ -40,7 +44,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -53,11 +58,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppServiceName()); return S_OK; } catch (...) @@ -67,10 +73,11 @@ struct produce } } - HRESULT __stdcall put_AppServiceName(abi_arg_in value) noexcept override + HRESULT __stdcall put_AppServiceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppServiceName(*reinterpret_cast(&value)); return S_OK; } @@ -80,11 +87,12 @@ struct produce } } - HRESULT __stdcall get_PackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -94,10 +102,11 @@ struct produce } } - HRESULT __stdcall put_PackageFamilyName(abi_arg_in value) noexcept override + HRESULT __stdcall put_PackageFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PackageFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -107,11 +116,12 @@ struct produce } } - HRESULT __stdcall abi_OpenAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenAsync()); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce } } - HRESULT __stdcall abi_SendMessageAsync(abi_arg_in message, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendMessageAsync(impl::abi_arg_in message, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce } } - HRESULT __stdcall add_RequestReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RequestReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RequestReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RequestReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -152,6 +164,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestReceived(token); return S_OK; } @@ -161,11 +174,12 @@ struct produce } } - HRESULT __stdcall add_ServiceClosed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ServiceClosed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ServiceClosed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ServiceClosed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -178,6 +192,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceClosed(token); return S_OK; } @@ -191,11 +206,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_OpenRemoteAsync(abi_arg_in remoteSystemConnectionRequest, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenRemoteAsync(impl::abi_arg_in remoteSystemConnectionRequest, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenRemoteAsync(*reinterpret_cast(&remoteSystemConnectionRequest))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenRemoteAsync(*reinterpret_cast(&remoteSystemConnectionRequest))); return S_OK; } catch (...) @@ -205,11 +221,12 @@ struct produce } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -219,10 +236,11 @@ struct produce } } - HRESULT __stdcall put_User(abi_arg_in value) noexcept override + HRESULT __stdcall put_User(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().User(*reinterpret_cast(&value)); return S_OK; } @@ -240,6 +258,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -253,11 +272,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -267,11 +287,12 @@ struct produce : p } } - HRESULT __stdcall abi_SendResponseAsync(abi_arg_in message, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendResponseAsync(impl::abi_arg_in message, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendResponseAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendResponseAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -285,11 +306,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -299,11 +321,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -317,11 +340,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -335,7 +359,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -348,11 +373,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -362,11 +388,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CallerPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallerPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerPackageFamilyName()); return S_OK; } catch (...) @@ -376,11 +403,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppServiceConnection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppServiceConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppServiceConnection()); return S_OK; } catch (...) @@ -398,7 +426,8 @@ struct produceshim().IsRemoteSystemConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRemoteSystemConnection()); return S_OK; } catch (...) @@ -414,154 +443,154 @@ namespace Windows::ApplicationModel::AppService { template void impl_IAppServiceDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IAppServiceDeferral)->abi_Complete()); } template Windows::ApplicationModel::AppService::AppServiceClosedStatus impl_IAppServiceClosedEventArgs::Status() const { Windows::ApplicationModel::AppService::AppServiceClosedStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAppServiceClosedEventArgs)->get_Status(&value)); return value; } template Windows::ApplicationModel::AppService::AppServiceRequest impl_IAppServiceRequestReceivedEventArgs::Request() const { Windows::ApplicationModel::AppService::AppServiceRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppServiceRequestReceivedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::ApplicationModel::AppService::AppServiceDeferral impl_IAppServiceRequestReceivedEventArgs::GetDeferral() const { Windows::ApplicationModel::AppService::AppServiceDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppServiceRequestReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAppServiceConnection2::OpenRemoteAsync(const Windows::System::RemoteSystems::RemoteSystemConnectionRequest & remoteSystemConnectionRequest) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenRemoteAsync(get(remoteSystemConnectionRequest), put(operation))); + check_hresult(WINRT_SHIM(IAppServiceConnection2)->abi_OpenRemoteAsync(get_abi(remoteSystemConnectionRequest), put_abi(operation))); return operation; } template Windows::System::User impl_IAppServiceConnection2::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection2)->get_User(put_abi(value))); return value; } template void impl_IAppServiceConnection2::User(const Windows::System::User & value) const { - check_hresult(static_cast(static_cast(*this))->put_User(get(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection2)->put_User(get_abi(value))); } template hstring impl_IAppServiceTriggerDetails::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IAppServiceTriggerDetails)->get_Name(put_abi(value))); return value; } template hstring impl_IAppServiceTriggerDetails::CallerPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallerPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IAppServiceTriggerDetails)->get_CallerPackageFamilyName(put_abi(value))); return value; } template Windows::ApplicationModel::AppService::AppServiceConnection impl_IAppServiceTriggerDetails::AppServiceConnection() const { Windows::ApplicationModel::AppService::AppServiceConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppServiceConnection(put(value))); + check_hresult(WINRT_SHIM(IAppServiceTriggerDetails)->get_AppServiceConnection(put_abi(value))); return value; } template bool impl_IAppServiceTriggerDetails2::IsRemoteSystemConnection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRemoteSystemConnection(&value)); + check_hresult(WINRT_SHIM(IAppServiceTriggerDetails2)->get_IsRemoteSystemConnection(&value)); return value; } template Windows::Foundation::Collections::ValueSet impl_IAppServiceRequest::Message() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IAppServiceRequest)->get_Message(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAppServiceRequest::SendResponseAsync(const Windows::Foundation::Collections::ValueSet & message) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendResponseAsync(get(message), put(operation))); + check_hresult(WINRT_SHIM(IAppServiceRequest)->abi_SendResponseAsync(get_abi(message), put_abi(operation))); return operation; } template Windows::Foundation::Collections::ValueSet impl_IAppServiceResponse::Message() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IAppServiceResponse)->get_Message(put_abi(value))); return value; } template Windows::ApplicationModel::AppService::AppServiceResponseStatus impl_IAppServiceResponse::Status() const { Windows::ApplicationModel::AppService::AppServiceResponseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAppServiceResponse)->get_Status(&value)); return value; } -template Windows::Foundation::IAsyncOperation> impl_IAppServiceCatalogStatics::FindAppServiceProvidersAsync(hstring_ref appServiceName) const +template Windows::Foundation::IAsyncOperation> impl_IAppServiceCatalogStatics::FindAppServiceProvidersAsync(hstring_view appServiceName) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAppServiceProvidersAsync(get(appServiceName), put(operation))); + check_hresult(WINRT_SHIM(IAppServiceCatalogStatics)->abi_FindAppServiceProvidersAsync(get_abi(appServiceName), put_abi(operation))); return operation; } template hstring impl_IAppServiceConnection::AppServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppServiceName(put(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->get_AppServiceName(put_abi(value))); return value; } -template void impl_IAppServiceConnection::AppServiceName(hstring_ref value) const +template void impl_IAppServiceConnection::AppServiceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AppServiceName(get(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->put_AppServiceName(get_abi(value))); } template hstring impl_IAppServiceConnection::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->get_PackageFamilyName(put_abi(value))); return value; } -template void impl_IAppServiceConnection::PackageFamilyName(hstring_ref value) const +template void impl_IAppServiceConnection::PackageFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PackageFamilyName(get(value))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->put_PackageFamilyName(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IAppServiceConnection::OpenAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->abi_OpenAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAppServiceConnection::SendMessageAsync(const Windows::Foundation::Collections::ValueSet & message) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAsync(get(message), put(operation))); + check_hresult(WINRT_SHIM(IAppServiceConnection)->abi_SendMessageAsync(get_abi(message), put_abi(operation))); return operation; } template event_token impl_IAppServiceConnection::RequestReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RequestReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppServiceConnection)->add_RequestReceived(get_abi(handler), &token)); return token; } @@ -572,13 +601,13 @@ template event_revoker impl_IAppServiceConne template void impl_IAppServiceConnection::RequestReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RequestReceived(token)); + check_hresult(WINRT_SHIM(IAppServiceConnection)->remove_RequestReceived(token)); } template event_token impl_IAppServiceConnection::ServiceClosed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ServiceClosed(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppServiceConnection)->add_ServiceClosed(get_abi(handler), &token)); return token; } @@ -589,10 +618,10 @@ template event_revoker impl_IAppServiceConne template void impl_IAppServiceConnection::ServiceClosed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ServiceClosed(token)); + check_hresult(WINRT_SHIM(IAppServiceConnection)->remove_ServiceClosed(token)); } -inline Windows::Foundation::IAsyncOperation> AppServiceCatalog::FindAppServiceProvidersAsync(hstring_ref appServiceName) +inline Windows::Foundation::IAsyncOperation> AppServiceCatalog::FindAppServiceProvidersAsync(hstring_view appServiceName) { return get_activation_factory().FindAppServiceProvidersAsync(appServiceName); } @@ -604,3 +633,158 @@ inline AppServiceConnection::AppServiceConnection() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceCatalogStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceConnection2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceRequestReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceRequestReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppService::AppServiceTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.AppointmentsProvider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.AppointmentsProvider.h index ee9c4eed3..bb7d73524 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.AppointmentsProvider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.AppointmentsProvider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.Appointments.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Appointments.AppointmentsProvider.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AppointmentInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentInformation()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SourcePackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePackageFamilyName()); return S_OK; } catch (...) @@ -43,10 +48,11 @@ struct produce itemId) noexcept override + HRESULT __stdcall abi_ReportCompleted(impl::abi_arg_in itemId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&itemId)); return S_OK; } @@ -60,6 +66,7 @@ struct produceshim()); this->shim().ReportCanceled(); return S_OK; } @@ -69,10 +76,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&value)); return S_OK; } @@ -86,6 +94,7 @@ struct produceshim()); this->shim().DismissUI(); return S_OK; } @@ -99,11 +108,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AddAppointment(abi_arg_out value) noexcept override + HRESULT __stdcall get_AddAppointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AddAppointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddAppointment()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReplaceAppointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReplaceAppointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReplaceAppointment()); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemoveAppointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoveAppointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoveAppointment()); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ShowTimeFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowTimeFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowTimeFrame()); return S_OK; } catch (...) @@ -159,11 +172,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ShowAppointmentDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShowAppointmentDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowAppointmentDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowAppointmentDetails()); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentId()); return S_OK; } catch (...) @@ -191,11 +206,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_InstanceStartDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InstanceStartDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceStartDate()); return S_OK; } catch (...) @@ -205,11 +221,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SourcePackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePackageFamilyName()); return S_OK; } catch (...) @@ -223,6 +240,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -236,6 +254,7 @@ struct produceshim()); this->shim().ReportCanceled(); return S_OK; } @@ -245,10 +264,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&value)); return S_OK; } @@ -262,6 +282,7 @@ struct produceshim()); this->shim().DismissUI(); return S_OK; } @@ -275,11 +296,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentId()); return S_OK; } catch (...) @@ -289,11 +311,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppointmentInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentInformation()); return S_OK; } catch (...) @@ -303,11 +326,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_InstanceStartDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InstanceStartDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceStartDate()); return S_OK; } catch (...) @@ -317,11 +341,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SourcePackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePackageFamilyName()); return S_OK; } catch (...) @@ -331,10 +356,11 @@ struct produce itemId) noexcept override + HRESULT __stdcall abi_ReportCompleted(impl::abi_arg_in itemId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&itemId)); return S_OK; } @@ -348,6 +374,7 @@ struct produceshim()); this->shim().ReportCanceled(); return S_OK; } @@ -357,10 +384,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&value)); return S_OK; } @@ -374,6 +402,7 @@ struct produceshim()); this->shim().DismissUI(); return S_OK; } @@ -391,159 +420,159 @@ namespace Windows::ApplicationModel::Appointments::AppointmentsProvider { template hstring impl_IAppointmentsProviderLaunchActionVerbsStatics::AddAppointment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AddAppointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderLaunchActionVerbsStatics)->get_AddAppointment(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderLaunchActionVerbsStatics::ReplaceAppointment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ReplaceAppointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderLaunchActionVerbsStatics)->get_ReplaceAppointment(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderLaunchActionVerbsStatics::RemoveAppointment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoveAppointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderLaunchActionVerbsStatics)->get_RemoveAppointment(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderLaunchActionVerbsStatics::ShowTimeFrame() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ShowTimeFrame(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderLaunchActionVerbsStatics)->get_ShowTimeFrame(put_abi(value))); return value; } template hstring impl_IAppointmentsProviderLaunchActionVerbsStatics2::ShowAppointmentDetails() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ShowAppointmentDetails(put(value))); + check_hresult(WINRT_SHIM(IAppointmentsProviderLaunchActionVerbsStatics2)->get_ShowAppointmentDetails(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::Appointment impl_IAddAppointmentOperation::AppointmentInformation() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppointmentInformation(put(value))); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->get_AppointmentInformation(put_abi(value))); return value; } template hstring impl_IAddAppointmentOperation::SourcePackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourcePackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->get_SourcePackageFamilyName(put_abi(value))); return value; } -template void impl_IAddAppointmentOperation::ReportCompleted(hstring_ref itemId) const +template void impl_IAddAppointmentOperation::ReportCompleted(hstring_view itemId) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted(get(itemId))); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->abi_ReportCompleted(get_abi(itemId))); } template void impl_IAddAppointmentOperation::ReportCanceled() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCanceled()); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->abi_ReportCanceled()); } -template void impl_IAddAppointmentOperation::ReportError(hstring_ref value) const +template void impl_IAddAppointmentOperation::ReportError(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportError(get(value))); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->abi_ReportError(get_abi(value))); } template void impl_IAddAppointmentOperation::DismissUI() const { - check_hresult(static_cast(static_cast(*this))->abi_DismissUI()); + check_hresult(WINRT_SHIM(IAddAppointmentOperation)->abi_DismissUI()); } template hstring impl_IReplaceAppointmentOperation::AppointmentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentId(put(value))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->get_AppointmentId(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::Appointment impl_IReplaceAppointmentOperation::AppointmentInformation() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppointmentInformation(put(value))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->get_AppointmentInformation(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IReplaceAppointmentOperation::InstanceStartDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InstanceStartDate(put(value))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->get_InstanceStartDate(put_abi(value))); return value; } template hstring impl_IReplaceAppointmentOperation::SourcePackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourcePackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->get_SourcePackageFamilyName(put_abi(value))); return value; } -template void impl_IReplaceAppointmentOperation::ReportCompleted(hstring_ref itemId) const +template void impl_IReplaceAppointmentOperation::ReportCompleted(hstring_view itemId) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted(get(itemId))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->abi_ReportCompleted(get_abi(itemId))); } template void impl_IReplaceAppointmentOperation::ReportCanceled() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCanceled()); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->abi_ReportCanceled()); } -template void impl_IReplaceAppointmentOperation::ReportError(hstring_ref value) const +template void impl_IReplaceAppointmentOperation::ReportError(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportError(get(value))); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->abi_ReportError(get_abi(value))); } template void impl_IReplaceAppointmentOperation::DismissUI() const { - check_hresult(static_cast(static_cast(*this))->abi_DismissUI()); + check_hresult(WINRT_SHIM(IReplaceAppointmentOperation)->abi_DismissUI()); } template hstring impl_IRemoveAppointmentOperation::AppointmentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentId(put(value))); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->get_AppointmentId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IRemoveAppointmentOperation::InstanceStartDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InstanceStartDate(put(value))); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->get_InstanceStartDate(put_abi(value))); return value; } template hstring impl_IRemoveAppointmentOperation::SourcePackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourcePackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->get_SourcePackageFamilyName(put_abi(value))); return value; } template void impl_IRemoveAppointmentOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->abi_ReportCompleted()); } template void impl_IRemoveAppointmentOperation::ReportCanceled() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCanceled()); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->abi_ReportCanceled()); } -template void impl_IRemoveAppointmentOperation::ReportError(hstring_ref value) const +template void impl_IRemoveAppointmentOperation::ReportError(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportError(get(value))); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->abi_ReportError(get_abi(value))); } template void impl_IRemoveAppointmentOperation::DismissUI() const { - check_hresult(static_cast(static_cast(*this))->abi_DismissUI()); + check_hresult(WINRT_SHIM(IRemoveAppointmentOperation)->abi_DismissUI()); } inline hstring AppointmentsProviderLaunchActionVerbs::AddAppointment() @@ -574,3 +603,77 @@ inline hstring AppointmentsProviderLaunchActionVerbs::ShowAppointmentDetails() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::IAddAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::IAppointmentsProviderLaunchActionVerbsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::IAppointmentsProviderLaunchActionVerbsStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::IRemoveAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::IReplaceAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.DataProvider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.DataProvider.h index 20ab16a03..7efa96764 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.DataProvider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.DataProvider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Appointments.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppointmentLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentLocalId()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_AppointmentOriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppointmentOriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentOriginalStartTime()); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -90,7 +98,8 @@ struct produceshim().NotifyInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotifyInvitees()); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -145,11 +157,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -163,11 +176,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Appointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appointment()); return S_OK; } catch (...) @@ -195,7 +210,8 @@ struct produceshim().NotifyInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotifyInvitees()); return S_OK; } catch (...) @@ -204,11 +220,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ChangedProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ChangedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangedProperties()); return S_OK; } catch (...) @@ -218,11 +235,12 @@ struct produce createdOrUpdatedAppointment, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_in createdOrUpdatedAppointment, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync(*reinterpret_cast(&createdOrUpdatedAppointment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync(*reinterpret_cast(&createdOrUpdatedAppointment))); return S_OK; } catch (...) @@ -232,11 +250,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -250,11 +269,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -264,11 +284,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -282,11 +303,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -296,11 +318,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppointmentLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentLocalId()); return S_OK; } catch (...) @@ -310,11 +333,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_AppointmentOriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppointmentOriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentOriginalStartTime()); return S_OK; } catch (...) @@ -324,11 +348,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Invitees(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Invitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invitees()); return S_OK; } catch (...) @@ -338,11 +363,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -352,11 +378,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ForwardHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForwardHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardHeader()); return S_OK; } catch (...) @@ -366,11 +393,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -380,11 +408,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -394,11 +423,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -412,11 +442,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -426,11 +457,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -444,11 +476,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -458,11 +491,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppointmentLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentLocalId()); return S_OK; } catch (...) @@ -472,11 +506,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_AppointmentOriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppointmentOriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentOriginalStartTime()); return S_OK; } catch (...) @@ -486,11 +521,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewStartTime()); return S_OK; } catch (...) @@ -499,11 +535,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDuration()); return S_OK; } catch (...) @@ -512,11 +549,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -526,11 +564,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -540,11 +579,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -554,11 +594,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -572,11 +613,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -586,11 +628,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -604,11 +647,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -618,11 +662,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -632,11 +677,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -650,11 +696,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -664,11 +711,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -682,11 +730,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendarLocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendarLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendarLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendarLocalId()); return S_OK; } catch (...) @@ -696,11 +745,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppointmentLocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentLocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentLocalId()); return S_OK; } catch (...) @@ -710,11 +760,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_AppointmentOriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppointmentOriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentOriginalStartTime()); return S_OK; } catch (...) @@ -728,7 +779,8 @@ struct produceshim().Response()); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -737,11 +789,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -751,11 +804,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -769,7 +823,8 @@ struct produceshim().SendUpdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SendUpdate()); return S_OK; } catch (...) @@ -778,11 +833,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -792,11 +848,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -810,11 +867,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -824,11 +882,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -842,11 +901,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_SyncRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SyncRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SyncRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SyncRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -859,6 +919,7 @@ struct produceshim()); this->shim().SyncRequested(token); return S_OK; } @@ -868,11 +929,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_CreateOrUpdateAppointmentRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CreateOrUpdateAppointmentRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CreateOrUpdateAppointmentRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -885,6 +947,7 @@ struct produceshim()); this->shim().CreateOrUpdateAppointmentRequested(token); return S_OK; } @@ -894,11 +957,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_CancelMeetingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CancelMeetingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CancelMeetingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -911,6 +975,7 @@ struct produceshim()); this->shim().CancelMeetingRequested(token); return S_OK; } @@ -920,11 +985,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ForwardMeetingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ForwardMeetingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ForwardMeetingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -937,6 +1003,7 @@ struct produceshim()); this->shim().ForwardMeetingRequested(token); return S_OK; } @@ -946,11 +1013,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProposeNewTimeForMeetingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProposeNewTimeForMeetingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProposeNewTimeForMeetingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -963,6 +1031,7 @@ struct produceshim()); this->shim().ProposeNewTimeForMeetingRequested(token); return S_OK; } @@ -972,11 +1041,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_UpdateMeetingResponseRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UpdateMeetingResponseRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UpdateMeetingResponseRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -989,6 +1059,7 @@ struct produceshim()); this->shim().UpdateMeetingResponseRequested(token); return S_OK; } @@ -1002,6 +1073,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -1015,11 +1087,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Connection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Connection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Connection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Connection()); return S_OK; } catch (...) @@ -1037,14 +1110,14 @@ namespace Windows::ApplicationModel::Appointments::DataProvider { template Windows::ApplicationModel::Appointments::DataProvider::AppointmentDataProviderConnection impl_IAppointmentDataProviderTriggerDetails::Connection() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentDataProviderConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Connection(put(value))); + check_hresult(WINRT_SHIM(IAppointmentDataProviderTriggerDetails)->get_Connection(put_abi(value))); return value; } template event_token impl_IAppointmentDataProviderConnection::SyncRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SyncRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_SyncRequested(get_abi(handler), &token)); return token; } @@ -1055,13 +1128,13 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::SyncRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SyncRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_SyncRequested(token)); } template event_token impl_IAppointmentDataProviderConnection::CreateOrUpdateAppointmentRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CreateOrUpdateAppointmentRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_CreateOrUpdateAppointmentRequested(get_abi(handler), &token)); return token; } @@ -1072,13 +1145,13 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::CreateOrUpdateAppointmentRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CreateOrUpdateAppointmentRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_CreateOrUpdateAppointmentRequested(token)); } template event_token impl_IAppointmentDataProviderConnection::CancelMeetingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CancelMeetingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_CancelMeetingRequested(get_abi(handler), &token)); return token; } @@ -1089,13 +1162,13 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::CancelMeetingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CancelMeetingRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_CancelMeetingRequested(token)); } template event_token impl_IAppointmentDataProviderConnection::ForwardMeetingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ForwardMeetingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_ForwardMeetingRequested(get_abi(handler), &token)); return token; } @@ -1106,13 +1179,13 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::ForwardMeetingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ForwardMeetingRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_ForwardMeetingRequested(token)); } template event_token impl_IAppointmentDataProviderConnection::ProposeNewTimeForMeetingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProposeNewTimeForMeetingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_ProposeNewTimeForMeetingRequested(get_abi(handler), &token)); return token; } @@ -1123,13 +1196,13 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::ProposeNewTimeForMeetingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProposeNewTimeForMeetingRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_ProposeNewTimeForMeetingRequested(token)); } template event_token impl_IAppointmentDataProviderConnection::UpdateMeetingResponseRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UpdateMeetingResponseRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->add_UpdateMeetingResponseRequested(get_abi(handler), &token)); return token; } @@ -1140,406 +1213,660 @@ template event_revoker impl_IAp template void impl_IAppointmentDataProviderConnection::UpdateMeetingResponseRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UpdateMeetingResponseRequested(token)); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->remove_UpdateMeetingResponseRequested(token)); } template void impl_IAppointmentDataProviderConnection::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IAppointmentDataProviderConnection)->abi_Start()); } template hstring impl_IAppointmentCalendarSyncManagerSyncRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManagerSyncRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarSyncManagerSyncRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManagerSyncRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarSyncManagerSyncRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManagerSyncRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::Appointment impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::Appointment() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->get_Appointment(put_abi(value))); return value; } template bool impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::NotifyInvitees() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NotifyInvitees(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->get_NotifyInvitees(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::ChangedProperties() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ChangedProperties(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->get_ChangedProperties(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::ReportCompletedAsync(const Windows::ApplicationModel::Appointments::Appointment & createdOrUpdatedAppointment) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(get(createdOrUpdatedAppointment), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->abi_ReportCompletedAsync(get_abi(createdOrUpdatedAppointment), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarCreateOrUpdateAppointmentRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IAppointmentCalendarCancelMeetingRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarCancelMeetingRequest::AppointmentLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_AppointmentLocalId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAppointmentCalendarCancelMeetingRequest::AppointmentOriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentOriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_AppointmentOriginalStartTime(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarCancelMeetingRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarCancelMeetingRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_Comment(put_abi(value))); return value; } template bool impl_IAppointmentCalendarCancelMeetingRequest::NotifyInvitees() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NotifyInvitees(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->get_NotifyInvitees(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarCancelMeetingRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarCancelMeetingRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IAppointmentCalendarForwardMeetingRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarForwardMeetingRequest::AppointmentLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_AppointmentLocalId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAppointmentCalendarForwardMeetingRequest::AppointmentOriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentOriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_AppointmentOriginalStartTime(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppointmentCalendarForwardMeetingRequest::Invitees() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Invitees(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_Invitees(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarForwardMeetingRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarForwardMeetingRequest::ForwardHeader() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ForwardHeader(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_ForwardHeader(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarForwardMeetingRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->get_Comment(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarForwardMeetingRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarForwardMeetingRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::AppointmentLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_AppointmentLocalId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::AppointmentOriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentOriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_AppointmentOriginalStartTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::NewStartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_NewStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_NewStartTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::NewDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NewDuration(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_NewDuration(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->get_Comment(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarProposeNewTimeForMeetingRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IAppointmentCalendarUpdateMeetingResponseRequest::AppointmentCalendarLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendarLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_AppointmentCalendarLocalId(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarUpdateMeetingResponseRequest::AppointmentLocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentLocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_AppointmentLocalId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAppointmentCalendarUpdateMeetingResponseRequest::AppointmentOriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentOriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_AppointmentOriginalStartTime(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentParticipantResponse impl_IAppointmentCalendarUpdateMeetingResponseRequest::Response() const { Windows::ApplicationModel::Appointments::AppointmentParticipantResponse response {}; - check_hresult(static_cast(static_cast(*this))->get_Response(&response)); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_Response(&response)); return response; } template hstring impl_IAppointmentCalendarUpdateMeetingResponseRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IAppointmentCalendarUpdateMeetingResponseRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_Comment(put_abi(value))); return value; } template bool impl_IAppointmentCalendarUpdateMeetingResponseRequest::SendUpdate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SendUpdate(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->get_SendUpdate(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarUpdateMeetingResponseRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendarUpdateMeetingResponseRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarSyncManagerSyncRequest impl_IAppointmentCalendarSyncManagerSyncRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarSyncManagerSyncRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManagerSyncRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarSyncManagerSyncRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManagerSyncRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCreateOrUpdateAppointmentRequest impl_IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCreateOrUpdateAppointmentRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCancelMeetingRequest impl_IAppointmentCalendarCancelMeetingRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCancelMeetingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarCancelMeetingRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarCancelMeetingRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarForwardMeetingRequest impl_IAppointmentCalendarForwardMeetingRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarForwardMeetingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarForwardMeetingRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarForwardMeetingRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarProposeNewTimeForMeetingRequest impl_IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarProposeNewTimeForMeetingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarUpdateMeetingResponseRequest impl_IAppointmentCalendarUpdateMeetingResponseRequestEventArgs::Request() const { Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarUpdateMeetingResponseRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAppointmentCalendarUpdateMeetingResponseRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarUpdateMeetingResponseRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarCancelMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarCancelMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarCreateOrUpdateAppointmentRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarForwardMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarForwardMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarProposeNewTimeForMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarUpdateMeetingResponseRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentCalendarUpdateMeetingResponseRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::IAppointmentDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCancelMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCancelMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCreateOrUpdateAppointmentRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarForwardMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarForwardMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarProposeNewTimeForMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarUpdateMeetingResponseRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentCalendarUpdateMeetingResponseRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::DataProvider::AppointmentDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.h index 8feb2ae07..494a22802 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Appointments.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Popups.3.h" #include "internal/Windows.System.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -31,10 +35,11 @@ struct produce : produ } } - HRESULT __stdcall put_StartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -44,11 +49,12 @@ struct produce : produ } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -57,10 +63,11 @@ struct produce : produ } } - HRESULT __stdcall put_Duration(abi_arg_in value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -70,11 +77,12 @@ struct produce : produ } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -84,10 +92,11 @@ struct produce : produ } } - HRESULT __stdcall put_Location(abi_arg_in value) noexcept override + HRESULT __stdcall put_Location(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return S_OK; } @@ -97,11 +106,12 @@ struct produce : produ } } - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -111,10 +121,11 @@ struct produce : produ } } - HRESULT __stdcall put_Subject(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subject(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subject(*reinterpret_cast(&value)); return S_OK; } @@ -124,11 +135,12 @@ struct produce : produ } } - HRESULT __stdcall get_Details(abi_arg_out value) noexcept override + HRESULT __stdcall get_Details(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Details()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Details()); return S_OK; } catch (...) @@ -138,10 +150,11 @@ struct produce : produ } } - HRESULT __stdcall put_Details(abi_arg_in value) noexcept override + HRESULT __stdcall put_Details(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Details(*reinterpret_cast(&value)); return S_OK; } @@ -151,11 +164,12 @@ struct produce : produ } } - HRESULT __stdcall get_Reminder(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Reminder(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Reminder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reminder()); return S_OK; } catch (...) @@ -165,10 +179,11 @@ struct produce : produ } } - HRESULT __stdcall put_Reminder(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Reminder(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Reminder(*reinterpret_cast *>(&value)); return S_OK; } @@ -178,11 +193,12 @@ struct produce : produ } } - HRESULT __stdcall get_Organizer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Organizer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Organizer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Organizer()); return S_OK; } catch (...) @@ -192,10 +208,11 @@ struct produce : produ } } - HRESULT __stdcall put_Organizer(abi_arg_in value) noexcept override + HRESULT __stdcall put_Organizer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Organizer(*reinterpret_cast(&value)); return S_OK; } @@ -205,11 +222,12 @@ struct produce : produ } } - HRESULT __stdcall get_Invitees(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Invitees(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Invitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invitees()); return S_OK; } catch (...) @@ -219,11 +237,12 @@ struct produce : produ } } - HRESULT __stdcall get_Recurrence(abi_arg_out value) noexcept override + HRESULT __stdcall get_Recurrence(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Recurrence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recurrence()); return S_OK; } catch (...) @@ -233,10 +252,11 @@ struct produce : produ } } - HRESULT __stdcall put_Recurrence(abi_arg_in value) noexcept override + HRESULT __stdcall put_Recurrence(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Recurrence(*reinterpret_cast(&value)); return S_OK; } @@ -250,7 +270,8 @@ struct produce : produ { try { - *value = detach(this->shim().BusyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusyStatus()); return S_OK; } catch (...) @@ -263,6 +284,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().BusyStatus(value); return S_OK; } @@ -276,7 +298,8 @@ struct produce : produ { try { - *value = detach(this->shim().AllDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllDay()); return S_OK; } catch (...) @@ -289,6 +312,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllDay(value); return S_OK; } @@ -302,7 +326,8 @@ struct produce : produ { try { - *value = detach(this->shim().Sensitivity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sensitivity()); return S_OK; } catch (...) @@ -315,6 +340,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Sensitivity(value); return S_OK; } @@ -324,11 +350,12 @@ struct produce : produ } } - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -338,10 +365,11 @@ struct produce : produ } } - HRESULT __stdcall put_Uri(abi_arg_in value) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return S_OK; } @@ -355,11 +383,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_LocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalId()); return S_OK; } catch (...) @@ -369,11 +398,12 @@ struct produce : prod } } - HRESULT __stdcall get_CalendarId(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarId()); return S_OK; } catch (...) @@ -383,11 +413,12 @@ struct produce : prod } } - HRESULT __stdcall get_RoamingId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoamingId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoamingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingId()); return S_OK; } catch (...) @@ -397,10 +428,11 @@ struct produce : prod } } - HRESULT __stdcall put_RoamingId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RoamingId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RoamingId(*reinterpret_cast(&value)); return S_OK; } @@ -410,11 +442,12 @@ struct produce : prod } } - HRESULT __stdcall get_OriginalStartTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalStartTime()); return S_OK; } catch (...) @@ -428,7 +461,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsResponseRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResponseRequested()); return S_OK; } catch (...) @@ -441,6 +475,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsResponseRequested(value); return S_OK; } @@ -454,7 +489,8 @@ struct produce : prod { try { - *value = detach(this->shim().AllowNewTimeProposal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowNewTimeProposal()); return S_OK; } catch (...) @@ -467,6 +503,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowNewTimeProposal(value); return S_OK; } @@ -476,11 +513,12 @@ struct produce : prod } } - HRESULT __stdcall get_OnlineMeetingLink(abi_arg_out value) noexcept override + HRESULT __stdcall get_OnlineMeetingLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnlineMeetingLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnlineMeetingLink()); return S_OK; } catch (...) @@ -490,10 +528,11 @@ struct produce : prod } } - HRESULT __stdcall put_OnlineMeetingLink(abi_arg_in value) noexcept override + HRESULT __stdcall put_OnlineMeetingLink(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnlineMeetingLink(*reinterpret_cast(&value)); return S_OK; } @@ -503,11 +542,12 @@ struct produce : prod } } - HRESULT __stdcall get_ReplyTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ReplyTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReplyTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReplyTime()); return S_OK; } catch (...) @@ -517,10 +557,11 @@ struct produce : prod } } - HRESULT __stdcall put_ReplyTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ReplyTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReplyTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -534,7 +575,8 @@ struct produce : prod { try { - *value = detach(this->shim().UserResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserResponse()); return S_OK; } catch (...) @@ -547,6 +589,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().UserResponse(value); return S_OK; } @@ -560,7 +603,8 @@ struct produce : prod { try { - *value = detach(this->shim().HasInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasInvitees()); return S_OK; } catch (...) @@ -573,7 +617,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsCanceledMeeting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceledMeeting()); return S_OK; } catch (...) @@ -586,6 +631,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCanceledMeeting(value); return S_OK; } @@ -599,7 +645,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsOrganizedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOrganizedByUser()); return S_OK; } catch (...) @@ -612,6 +659,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsOrganizedByUser(value); return S_OK; } @@ -629,7 +677,8 @@ struct produce : prod { try { - *value = detach(this->shim().ChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeNumber()); return S_OK; } catch (...) @@ -642,7 +691,8 @@ struct produce : prod { try { - *value = detach(this->shim().RemoteChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteChangeNumber()); return S_OK; } catch (...) @@ -655,6 +705,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteChangeNumber(value); return S_OK; } @@ -668,7 +719,8 @@ struct produce : prod { try { - *value = detach(this->shim().DetailsKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetailsKind()); return S_OK; } catch (...) @@ -681,6 +733,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().DetailsKind(value); return S_OK; } @@ -694,11 +747,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DisplayColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayColor()); return S_OK; } catch (...) @@ -707,11 +761,12 @@ struct produce } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -721,10 +776,11 @@ struct produce } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -734,11 +790,12 @@ struct produce } } - HRESULT __stdcall get_LocalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalId()); return S_OK; } catch (...) @@ -752,7 +809,8 @@ struct produce { try { - *value = detach(this->shim().IsHidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHidden()); return S_OK; } catch (...) @@ -765,7 +823,8 @@ struct produce { try { - *value = detach(this->shim().OtherAppReadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppReadAccess()); return S_OK; } catch (...) @@ -778,6 +837,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppReadAccess(value); return S_OK; } @@ -791,7 +851,8 @@ struct produce { try { - *value = detach(this->shim().OtherAppWriteAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppWriteAccess()); return S_OK; } catch (...) @@ -804,6 +865,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppWriteAccess(value); return S_OK; } @@ -813,11 +875,12 @@ struct produce } } - HRESULT __stdcall get_SourceDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDisplayName()); return S_OK; } catch (...) @@ -831,7 +894,8 @@ struct produce { try { - *value = detach(this->shim().SummaryCardView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SummaryCardView()); return S_OK; } catch (...) @@ -844,6 +908,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SummaryCardView(value); return S_OK; } @@ -853,11 +918,12 @@ struct produce } } - HRESULT __stdcall abi_FindAppointmentsAsync(abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentsAsync(impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); return S_OK; } catch (...) @@ -867,11 +933,12 @@ struct produce } } - HRESULT __stdcall abi_FindAppointmentsAsyncWithOptions(abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_in options, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentsAsyncWithOptions(impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_in options, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -881,11 +948,12 @@ struct produce } } - HRESULT __stdcall abi_FindExceptionsFromMasterAsync(abi_arg_in masterLocalId, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindExceptionsFromMasterAsync(impl::abi_arg_in masterLocalId, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindExceptionsFromMasterAsync(*reinterpret_cast(&masterLocalId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindExceptionsFromMasterAsync(*reinterpret_cast(&masterLocalId))); return S_OK; } catch (...) @@ -895,11 +963,12 @@ struct produce } } - HRESULT __stdcall abi_FindAllInstancesAsync(abi_arg_in masterLocalId, abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllInstancesAsync(impl::abi_arg_in masterLocalId, impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllInstancesAsync(*reinterpret_cast(&masterLocalId), *reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllInstancesAsync(*reinterpret_cast(&masterLocalId), *reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); return S_OK; } catch (...) @@ -909,11 +978,12 @@ struct produce } } - HRESULT __stdcall abi_FindAllInstancesAsyncWithOptions(abi_arg_in masterLocalId, abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_in pOptions, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllInstancesAsyncWithOptions(impl::abi_arg_in masterLocalId, impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_in pOptions, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllInstancesAsync(*reinterpret_cast(&masterLocalId), *reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&pOptions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllInstancesAsync(*reinterpret_cast(&masterLocalId), *reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&pOptions))); return S_OK; } catch (...) @@ -923,11 +993,12 @@ struct produce } } - HRESULT __stdcall abi_GetAppointmentAsync(abi_arg_in localId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAppointmentAsync(impl::abi_arg_in localId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAppointmentAsync(*reinterpret_cast(&localId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppointmentAsync(*reinterpret_cast(&localId))); return S_OK; } catch (...) @@ -937,11 +1008,12 @@ struct produce } } - HRESULT __stdcall abi_GetAppointmentInstanceAsync(abi_arg_in localId, abi_arg_in instanceStartTime, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAppointmentInstanceAsync(impl::abi_arg_in localId, impl::abi_arg_in instanceStartTime, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); return S_OK; } catch (...) @@ -951,11 +1023,12 @@ struct produce } } - HRESULT __stdcall abi_FindUnexpandedAppointmentsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindUnexpandedAppointmentsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindUnexpandedAppointmentsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindUnexpandedAppointmentsAsync()); return S_OK; } catch (...) @@ -965,11 +1038,12 @@ struct produce } } - HRESULT __stdcall abi_FindUnexpandedAppointmentsAsyncWithOptions(abi_arg_in options, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindUnexpandedAppointmentsAsyncWithOptions(impl::abi_arg_in options, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindUnexpandedAppointmentsAsync(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindUnexpandedAppointmentsAsync(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -979,11 +1053,12 @@ struct produce } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -993,11 +1068,12 @@ struct produce } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -1007,11 +1083,12 @@ struct produce } } - HRESULT __stdcall abi_DeleteAppointmentAsync(abi_arg_in localId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_DeleteAppointmentAsync(impl::abi_arg_in localId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().DeleteAppointmentAsync(*reinterpret_cast(&localId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().DeleteAppointmentAsync(*reinterpret_cast(&localId))); return S_OK; } catch (...) @@ -1021,11 +1098,12 @@ struct produce } } - HRESULT __stdcall abi_DeleteAppointmentInstanceAsync(abi_arg_in localId, abi_arg_in instanceStartTime, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_DeleteAppointmentInstanceAsync(impl::abi_arg_in localId, impl::abi_arg_in instanceStartTime, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().DeleteAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().DeleteAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); return S_OK; } catch (...) @@ -1035,11 +1113,12 @@ struct produce } } - HRESULT __stdcall abi_SaveAppointmentAsync(abi_arg_in pAppointment, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_SaveAppointmentAsync(impl::abi_arg_in pAppointment, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().SaveAppointmentAsync(*reinterpret_cast(&pAppointment))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().SaveAppointmentAsync(*reinterpret_cast(&pAppointment))); return S_OK; } catch (...) @@ -1053,11 +1132,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_SyncManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_SyncManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SyncManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SyncManager()); return S_OK; } catch (...) @@ -1067,11 +1147,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -1081,10 +1162,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -1094,10 +1176,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayColor(*reinterpret_cast(&value)); return S_OK; } @@ -1111,6 +1194,7 @@ struct produceshim()); this->shim().IsHidden(value); return S_OK; } @@ -1120,11 +1204,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -1138,7 +1223,8 @@ struct produceshim().CanCreateOrUpdateAppointments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanCreateOrUpdateAppointments()); return S_OK; } catch (...) @@ -1151,6 +1237,7 @@ struct produceshim()); this->shim().CanCreateOrUpdateAppointments(value); return S_OK; } @@ -1164,7 +1251,8 @@ struct produceshim().CanCancelMeetings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanCancelMeetings()); return S_OK; } catch (...) @@ -1177,6 +1265,7 @@ struct produceshim()); this->shim().CanCancelMeetings(value); return S_OK; } @@ -1190,7 +1279,8 @@ struct produceshim().CanForwardMeetings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanForwardMeetings()); return S_OK; } catch (...) @@ -1203,6 +1293,7 @@ struct produceshim()); this->shim().CanForwardMeetings(value); return S_OK; } @@ -1216,7 +1307,8 @@ struct produceshim().CanProposeNewTimeForMeetings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanProposeNewTimeForMeetings()); return S_OK; } catch (...) @@ -1229,6 +1321,7 @@ struct produceshim()); this->shim().CanProposeNewTimeForMeetings(value); return S_OK; } @@ -1242,7 +1335,8 @@ struct produceshim().CanUpdateMeetingResponses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanUpdateMeetingResponses()); return S_OK; } catch (...) @@ -1255,6 +1349,7 @@ struct produceshim()); this->shim().CanUpdateMeetingResponses(value); return S_OK; } @@ -1268,7 +1363,8 @@ struct produceshim().CanNotifyInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanNotifyInvitees()); return S_OK; } catch (...) @@ -1281,6 +1377,7 @@ struct produceshim()); this->shim().CanNotifyInvitees(value); return S_OK; } @@ -1294,7 +1391,8 @@ struct produceshim().MustNofityInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MustNofityInvitees()); return S_OK; } catch (...) @@ -1307,6 +1405,7 @@ struct produceshim()); this->shim().MustNofityInvitees(value); return S_OK; } @@ -1316,11 +1415,12 @@ struct produce appointment, bool notifyInvitees, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryCreateOrUpdateAppointmentAsync(impl::abi_arg_in appointment, bool notifyInvitees, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryCreateOrUpdateAppointmentAsync(*reinterpret_cast(&appointment), notifyInvitees)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCreateOrUpdateAppointmentAsync(*reinterpret_cast(&appointment), notifyInvitees)); return S_OK; } catch (...) @@ -1330,11 +1430,12 @@ struct produce meeting, abi_arg_in subject, abi_arg_in comment, bool notifyInvitees, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryCancelMeetingAsync(impl::abi_arg_in meeting, impl::abi_arg_in subject, impl::abi_arg_in comment, bool notifyInvitees, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryCancelMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&subject), *reinterpret_cast(&comment), notifyInvitees)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCancelMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&subject), *reinterpret_cast(&comment), notifyInvitees)); return S_OK; } catch (...) @@ -1344,11 +1445,12 @@ struct produce meeting, abi_arg_in> invitees, abi_arg_in subject, abi_arg_in forwardHeader, abi_arg_in comment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryForwardMeetingAsync(impl::abi_arg_in meeting, impl::abi_arg_in> invitees, impl::abi_arg_in subject, impl::abi_arg_in forwardHeader, impl::abi_arg_in comment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryForwardMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast *>(&invitees), *reinterpret_cast(&subject), *reinterpret_cast(&forwardHeader), *reinterpret_cast(&comment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryForwardMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast *>(&invitees), *reinterpret_cast(&subject), *reinterpret_cast(&forwardHeader), *reinterpret_cast(&comment))); return S_OK; } catch (...) @@ -1358,11 +1460,12 @@ struct produce meeting, abi_arg_in newStartTime, abi_arg_in newDuration, abi_arg_in subject, abi_arg_in comment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryProposeNewTimeForMeetingAsync(impl::abi_arg_in meeting, impl::abi_arg_in newStartTime, impl::abi_arg_in newDuration, impl::abi_arg_in subject, impl::abi_arg_in comment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryProposeNewTimeForMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&newStartTime), *reinterpret_cast(&newDuration), *reinterpret_cast(&subject), *reinterpret_cast(&comment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryProposeNewTimeForMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&newStartTime), *reinterpret_cast(&newDuration), *reinterpret_cast(&subject), *reinterpret_cast(&comment))); return S_OK; } catch (...) @@ -1372,11 +1475,12 @@ struct produce meeting, Windows::ApplicationModel::Appointments::AppointmentParticipantResponse response, abi_arg_in subject, abi_arg_in comment, bool sendUpdate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryUpdateMeetingResponseAsync(impl::abi_arg_in meeting, Windows::ApplicationModel::Appointments::AppointmentParticipantResponse response, impl::abi_arg_in subject, impl::abi_arg_in comment, bool sendUpdate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryUpdateMeetingResponseAsync(*reinterpret_cast(&meeting), response, *reinterpret_cast(&subject), *reinterpret_cast(&comment), sendUpdate)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryUpdateMeetingResponseAsync(*reinterpret_cast(&meeting), response, *reinterpret_cast(&subject), *reinterpret_cast(&comment), sendUpdate)); return S_OK; } catch (...) @@ -1390,11 +1494,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RegisterSyncManagerAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_RegisterSyncManagerAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().RegisterSyncManagerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterSyncManagerAsync()); return S_OK; } catch (...) @@ -1412,7 +1517,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1421,11 +1527,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LastSuccessfulSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastSuccessfulSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSuccessfulSyncTime()); return S_OK; } catch (...) @@ -1434,11 +1541,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LastAttemptedSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastAttemptedSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastAttemptedSyncTime()); return S_OK; } catch (...) @@ -1447,11 +1555,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_SyncAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SyncAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SyncAsync()); return S_OK; } catch (...) @@ -1461,11 +1570,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SyncStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1478,6 +1588,7 @@ struct produceshim()); this->shim().SyncStatusChanged(token); return S_OK; } @@ -1495,6 +1606,7 @@ struct produceshim()); this->shim().Status(value); return S_OK; } @@ -1504,10 +1616,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_LastSuccessfulSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastSuccessfulSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -1517,10 +1630,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_LastAttemptedSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastAttemptedSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -1538,7 +1652,8 @@ struct produceshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1547,11 +1662,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -1564,11 +1680,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Appointment(abi_arg_out value) noexcept override + HRESULT __stdcall get_Appointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appointment()); return S_OK; } catch (...) @@ -1578,11 +1695,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ExceptionProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExceptionProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExceptionProperties()); return S_OK; } catch (...) @@ -1596,7 +1714,8 @@ struct produceshim().IsDeleted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeleted()); return S_OK; } catch (...) @@ -1613,7 +1732,8 @@ struct produce { try { - *value = detach(this->shim().Role()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Role()); return S_OK; } catch (...) @@ -1626,6 +1746,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Role(value); return S_OK; } @@ -1639,7 +1760,8 @@ struct produce { try { - *value = detach(this->shim().Response()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -1652,6 +1774,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Response(value); return S_OK; } @@ -1665,11 +1788,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_ShowAddAppointmentAsync(abi_arg_in appointment, abi_arg_in selection, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowAddAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1679,11 +1803,12 @@ struct produce appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowAddAppointmentWithPlacementAsync(impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1693,11 +1818,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1707,11 +1833,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1721,11 +1848,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAndDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -1735,11 +1863,12 @@ struct produce appointmentId, abi_arg_in selection, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1749,11 +1878,12 @@ struct produce appointmentId, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1763,11 +1893,12 @@ struct produce appointmentId, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAndDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -1777,11 +1908,12 @@ struct produce timeToShow, abi_arg_in duration, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowTimeFrameAsync(impl::abi_arg_in timeToShow, impl::abi_arg_in duration, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowTimeFrameAsync(*reinterpret_cast(&timeToShow), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowTimeFrameAsync(*reinterpret_cast(&timeToShow), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -1791,11 +1923,12 @@ struct produce appointmentId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsAsync(impl::abi_arg_in appointmentId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId))); return S_OK; } catch (...) @@ -1805,11 +1938,12 @@ struct produce appointmentId, abi_arg_in instanceStartDate, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsWithDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in instanceStartDate, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -1819,11 +1953,12 @@ struct produce appointment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowEditNewAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); return S_OK; } catch (...) @@ -1833,11 +1968,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Appointments::AppointmentStoreAccessType options, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(options)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(options)); return S_OK; } catch (...) @@ -1847,11 +1983,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -1865,11 +2002,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ShowAddAppointmentAsync(abi_arg_in appointment, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowAddAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1879,11 +2017,12 @@ struct produce appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowAddAppointmentWithPlacementAsync(impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1893,11 +2032,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1907,11 +2047,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1921,11 +2062,12 @@ struct produce appointmentId, abi_arg_in appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAndDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -1935,11 +2077,12 @@ struct produce appointmentId, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1949,11 +2092,12 @@ struct produce appointmentId, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -1963,11 +2107,12 @@ struct produce appointmentId, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAndDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -1977,11 +2122,12 @@ struct produce timeToShow, abi_arg_in duration, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowTimeFrameAsync(impl::abi_arg_in timeToShow, impl::abi_arg_in duration, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowTimeFrameAsync(*reinterpret_cast(&timeToShow), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowTimeFrameAsync(*reinterpret_cast(&timeToShow), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -1995,11 +2141,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ShowAppointmentDetailsAsync(abi_arg_in appointmentId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsAsync(impl::abi_arg_in appointmentId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId))); return S_OK; } catch (...) @@ -2009,11 +2156,12 @@ struct produce appointmentId, abi_arg_in instanceStartDate, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsWithDateAsync(impl::abi_arg_in appointmentId, impl::abi_arg_in instanceStartDate, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&appointmentId), *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -2023,11 +2171,12 @@ struct produce appointment, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowEditNewAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); return S_OK; } catch (...) @@ -2037,11 +2186,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Appointments::AppointmentStoreAccessType options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStoreAsync(options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStoreAsync(options)); return S_OK; } catch (...) @@ -2055,11 +2205,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -2073,11 +2224,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2087,10 +2239,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -2100,11 +2253,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -2114,10 +2268,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Address(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Address(*reinterpret_cast(&value)); return S_OK; } @@ -2131,11 +2286,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -2145,11 +2301,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -2159,11 +2316,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -2173,11 +2331,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -2187,11 +2346,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Reminder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reminder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reminder()); return S_OK; } catch (...) @@ -2201,11 +2361,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BusyStatus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BusyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusyStatus()); return S_OK; } catch (...) @@ -2215,11 +2376,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sensitivity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sensitivity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sensitivity()); return S_OK; } catch (...) @@ -2229,11 +2391,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OriginalStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalStartTime()); return S_OK; } catch (...) @@ -2243,11 +2406,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsResponseRequested(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsResponseRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResponseRequested()); return S_OK; } catch (...) @@ -2257,11 +2421,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AllowNewTimeProposal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllowNewTimeProposal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowNewTimeProposal()); return S_OK; } catch (...) @@ -2271,11 +2436,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AllDay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllDay()); return S_OK; } catch (...) @@ -2285,11 +2451,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Details(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Details()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Details()); return S_OK; } catch (...) @@ -2299,11 +2466,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OnlineMeetingLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnlineMeetingLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnlineMeetingLink()); return S_OK; } catch (...) @@ -2313,11 +2481,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReplyTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReplyTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReplyTime()); return S_OK; } catch (...) @@ -2327,11 +2496,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Organizer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Organizer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Organizer()); return S_OK; } catch (...) @@ -2341,11 +2511,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UserResponse(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserResponse()); return S_OK; } catch (...) @@ -2355,11 +2526,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HasInvitees(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasInvitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasInvitees()); return S_OK; } catch (...) @@ -2369,11 +2541,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsCanceledMeeting(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCanceledMeeting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceledMeeting()); return S_OK; } catch (...) @@ -2383,11 +2556,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsOrganizedByUser(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOrganizedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOrganizedByUser()); return S_OK; } catch (...) @@ -2397,11 +2571,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Recurrence(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Recurrence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recurrence()); return S_OK; } catch (...) @@ -2411,11 +2586,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -2425,11 +2601,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Invitees(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Invitees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invitees()); return S_OK; } catch (...) @@ -2439,11 +2616,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DefaultProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DefaultProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultProperties()); return S_OK; } catch (...) @@ -2457,11 +2635,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ChangeNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeNumber()); return S_OK; } catch (...) @@ -2471,11 +2650,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemoteChangeNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteChangeNumber()); return S_OK; } catch (...) @@ -2485,11 +2665,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DetailsKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DetailsKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetailsKind()); return S_OK; } catch (...) @@ -2507,7 +2688,8 @@ struct produceshim().Unit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unit()); return S_OK; } catch (...) @@ -2520,6 +2702,7 @@ struct produceshim()); this->shim().Unit(value); return S_OK; } @@ -2529,11 +2712,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Occurrences(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Occurrences()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Occurrences()); return S_OK; } catch (...) @@ -2543,10 +2727,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_Occurrences(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Occurrences(*reinterpret_cast *>(&value)); return S_OK; } @@ -2556,11 +2741,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Until(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Until()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Until()); return S_OK; } catch (...) @@ -2570,10 +2756,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_Until(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Until(*reinterpret_cast *>(&value)); return S_OK; } @@ -2587,7 +2774,8 @@ struct produceshim().Interval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Interval()); return S_OK; } catch (...) @@ -2600,6 +2788,7 @@ struct produceshim()); this->shim().Interval(value); return S_OK; } @@ -2613,7 +2802,8 @@ struct produceshim().DaysOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DaysOfWeek()); return S_OK; } catch (...) @@ -2626,6 +2816,7 @@ struct produceshim()); this->shim().DaysOfWeek(value); return S_OK; } @@ -2639,7 +2830,8 @@ struct produceshim().WeekOfMonth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekOfMonth()); return S_OK; } catch (...) @@ -2652,6 +2844,7 @@ struct produceshim()); this->shim().WeekOfMonth(value); return S_OK; } @@ -2665,7 +2858,8 @@ struct produceshim().Month()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Month()); return S_OK; } catch (...) @@ -2678,6 +2872,7 @@ struct produceshim()); this->shim().Month(value); return S_OK; } @@ -2691,7 +2886,8 @@ struct produceshim().Day()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Day()); return S_OK; } catch (...) @@ -2704,6 +2900,7 @@ struct produceshim()); this->shim().Day(value); return S_OK; } @@ -2721,7 +2918,8 @@ struct produceshim().RecurrenceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecurrenceType()); return S_OK; } catch (...) @@ -2730,11 +2928,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TimeZone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeZone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeZone()); return S_OK; } catch (...) @@ -2744,10 +2943,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TimeZone(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TimeZone(*reinterpret_cast(&value)); return S_OK; } @@ -2761,11 +2961,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CalendarIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifier()); return S_OK; } catch (...) @@ -2779,11 +2980,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -2793,11 +2995,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateAppointmentCalendarAsync(abi_arg_in name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateAppointmentCalendarAsync(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateAppointmentCalendarAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateAppointmentCalendarAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -2807,11 +3010,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAppointmentCalendarAsync(abi_arg_in calendarId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAppointmentCalendarAsync(impl::abi_arg_in calendarId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAppointmentCalendarAsync(*reinterpret_cast(&calendarId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppointmentCalendarAsync(*reinterpret_cast(&calendarId))); return S_OK; } catch (...) @@ -2821,11 +3025,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAppointmentAsync(abi_arg_in localId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAppointmentAsync(impl::abi_arg_in localId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAppointmentAsync(*reinterpret_cast(&localId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppointmentAsync(*reinterpret_cast(&localId))); return S_OK; } catch (...) @@ -2835,11 +3040,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAppointmentInstanceAsync(abi_arg_in localId, abi_arg_in instanceStartTime, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAppointmentInstanceAsync(impl::abi_arg_in localId, impl::abi_arg_in instanceStartTime, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppointmentInstanceAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartTime))); return S_OK; } catch (...) @@ -2849,11 +3055,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAppointmentCalendarsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentCalendarsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentCalendarsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentCalendarsAsync()); return S_OK; } catch (...) @@ -2863,11 +3070,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAppointmentCalendarsAsyncWithOptions(Windows::ApplicationModel::Appointments::FindAppointmentCalendarsOptions options, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentCalendarsAsyncWithOptions(Windows::ApplicationModel::Appointments::FindAppointmentCalendarsOptions options, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentCalendarsAsync(options)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentCalendarsAsync(options)); return S_OK; } catch (...) @@ -2877,11 +3085,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAppointmentsAsync(abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentsAsync(impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength))); return S_OK; } catch (...) @@ -2891,11 +3100,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAppointmentsAsyncWithOptions(abi_arg_in rangeStart, abi_arg_in rangeLength, abi_arg_in options, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentsAsyncWithOptions(impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength, impl::abi_arg_in options, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentsAsync(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -2905,11 +3115,12 @@ struct produce : } } - HRESULT __stdcall abi_FindConflictAsync(abi_arg_in appointment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindConflictAsync(impl::abi_arg_in appointment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindConflictAsync(*reinterpret_cast(&appointment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindConflictAsync(*reinterpret_cast(&appointment))); return S_OK; } catch (...) @@ -2919,11 +3130,12 @@ struct produce : } } - HRESULT __stdcall abi_FindConflictAsyncWithInstanceStart(abi_arg_in appointment, abi_arg_in instanceStartTime, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindConflictAsyncWithInstanceStart(impl::abi_arg_in appointment, impl::abi_arg_in instanceStartTime, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindConflictAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&instanceStartTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindConflictAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&instanceStartTime))); return S_OK; } catch (...) @@ -2933,11 +3145,12 @@ struct produce : } } - HRESULT __stdcall abi_MoveAppointmentAsync(abi_arg_in appointment, abi_arg_in destinationCalendar, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_MoveAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_in destinationCalendar, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().MoveAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&destinationCalendar))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().MoveAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&destinationCalendar))); return S_OK; } catch (...) @@ -2947,11 +3160,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowAddAppointmentAsync(abi_arg_in appointment, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowAddAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAddAppointmentAsync(*reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -2961,11 +3175,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowReplaceAppointmentAsync(abi_arg_in localId, abi_arg_in appointment, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentAsync(impl::abi_arg_in localId, impl::abi_arg_in appointment, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -2975,11 +3190,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAndDateAsync(abi_arg_in localId, abi_arg_in appointment, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowReplaceAppointmentWithPlacementAndDateAsync(impl::abi_arg_in localId, impl::abi_arg_in appointment, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowReplaceAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&appointment), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -2989,11 +3205,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowRemoveAppointmentAsync(abi_arg_in localId, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentAsync(impl::abi_arg_in localId, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -3003,11 +3220,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAndDateAsync(abi_arg_in localId, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in instanceStartDate, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowRemoveAppointmentWithPlacementAndDateAsync(impl::abi_arg_in localId, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in instanceStartDate, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowRemoveAppointmentAsync(*reinterpret_cast(&localId), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -3017,11 +3235,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowAppointmentDetailsAsync(abi_arg_in localId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsAsync(impl::abi_arg_in localId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&localId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&localId))); return S_OK; } catch (...) @@ -3031,11 +3250,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowAppointmentDetailsWithDateAsync(abi_arg_in localId, abi_arg_in instanceStartDate, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowAppointmentDetailsWithDateAsync(impl::abi_arg_in localId, impl::abi_arg_in instanceStartDate, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartDate))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowAppointmentDetailsAsync(*reinterpret_cast(&localId), *reinterpret_cast(&instanceStartDate))); return S_OK; } catch (...) @@ -3045,11 +3265,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowEditNewAppointmentAsync(abi_arg_in appointment, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowEditNewAppointmentAsync(impl::abi_arg_in appointment, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowEditNewAppointmentAsync(*reinterpret_cast(&appointment))); return S_OK; } catch (...) @@ -3059,11 +3280,12 @@ struct produce : } } - HRESULT __stdcall abi_FindLocalIdsFromRoamingIdAsync(abi_arg_in roamingId, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindLocalIdsFromRoamingIdAsync(impl::abi_arg_in roamingId, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindLocalIdsFromRoamingIdAsync(*reinterpret_cast(&roamingId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindLocalIdsFromRoamingIdAsync(*reinterpret_cast(&roamingId))); return S_OK; } catch (...) @@ -3077,11 +3299,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall add_StoreChanged(abi_arg_in> pHandler, event_token * pToken) noexcept override + HRESULT __stdcall add_StoreChanged(impl::abi_arg_in> pHandler, event_token * pToken) noexcept override { try { - *pToken = detach(this->shim().StoreChanged(*reinterpret_cast *>(&pHandler))); + typename D::abi_guard guard(this->shim()); + *pToken = detach_abi(this->shim().StoreChanged(*reinterpret_cast *>(&pHandler))); return S_OK; } catch (...) @@ -3094,6 +3317,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().StoreChanged(token); return S_OK; } @@ -3103,11 +3327,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateAppointmentCalendarInAccountAsync(abi_arg_in name, abi_arg_in userDataAccountId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateAppointmentCalendarInAccountAsync(impl::abi_arg_in name, impl::abi_arg_in userDataAccountId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateAppointmentCalendarAsync(*reinterpret_cast(&name), *reinterpret_cast(&userDataAccountId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateAppointmentCalendarAsync(*reinterpret_cast(&name), *reinterpret_cast(&userDataAccountId))); return S_OK; } catch (...) @@ -3121,11 +3346,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Appointment(abi_arg_out value) noexcept override + HRESULT __stdcall get_Appointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appointment()); return S_OK; } catch (...) @@ -3139,7 +3365,8 @@ struct produceshim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -3152,11 +3379,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppointmentCalendar(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentCalendar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentCalendar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentCalendar()); return S_OK; } catch (...) @@ -3170,11 +3398,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -3188,6 +3417,7 @@ struct produceshim()); this->shim().AcceptChanges(); return S_OK; } @@ -3197,10 +3427,11 @@ struct produce lastChangeToAccept) noexcept override + HRESULT __stdcall abi_AcceptChangesThrough(impl::abi_arg_in lastChangeToAccept) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChangesThrough(*reinterpret_cast(&lastChangeToAccept)); return S_OK; } @@ -3214,11 +3445,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetChangeReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetChangeReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetChangeReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetChangeReader()); return S_OK; } catch (...) @@ -3232,6 +3464,7 @@ struct produceshim()); this->shim().Enable(); return S_OK; } @@ -3245,6 +3478,7 @@ struct produceshim()); this->shim().Reset(); return S_OK; } @@ -3262,6 +3496,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -3275,11 +3510,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -3297,11 +3533,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CalendarIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_CalendarIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CalendarIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIds()); return S_OK; } catch (...) @@ -3311,11 +3548,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_FetchProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FetchProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FetchProperties()); return S_OK; } catch (...) @@ -3329,7 +3567,8 @@ struct produceshim().IncludeHidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeHidden()); return S_OK; } catch (...) @@ -3342,6 +3581,7 @@ struct produceshim()); this->shim().IncludeHidden(value); return S_OK; } @@ -3355,7 +3595,8 @@ struct produceshim().MaxCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxCount()); return S_OK; } catch (...) @@ -3368,6 +3609,7 @@ struct produceshim()); this->shim().MaxCount(value); return S_OK; } @@ -3385,1523 +3627,1523 @@ namespace Windows::ApplicationModel::Appointments { template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowAddAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAppointmentAsync(get(appointment), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowAddAppointmentAsync(get_abi(appointment), get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowAddAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAppointmentWithPlacementAsync(get(appointment), get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowAddAppointmentWithPlacementAsync(get_abi(appointment), get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentAsync(get(appointmentId), get(appointment), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowReplaceAppointmentAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentWithPlacementAsync(get(appointmentId), get(appointment), get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowReplaceAppointmentWithPlacementAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get(appointmentId), get(appointment), get(selection), preferredPlacement, get(instanceStartDate), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentAsync(get(appointmentId), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowRemoveAppointmentAsync(get_abi(appointmentId), get_abi(selection), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentWithPlacementAsync(get(appointmentId), get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowRemoveAppointmentWithPlacementAsync(get_abi(appointmentId), get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get(appointmentId), get(selection), preferredPlacement, get(instanceStartDate), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get_abi(appointmentId), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IAppointmentManagerStatics::ShowTimeFrameAsync(const Windows::Foundation::DateTime & timeToShow, const Windows::Foundation::TimeSpan & duration) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowTimeFrameAsync(get(timeToShow), get(duration), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics)->abi_ShowTimeFrameAsync(get_abi(timeToShow), get_abi(duration), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IAppointmentManagerStatics2::ShowAppointmentDetailsAsync(hstring_ref appointmentId) const +template Windows::Foundation::IAsyncAction impl_IAppointmentManagerStatics2::ShowAppointmentDetailsAsync(hstring_view appointmentId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsAsync(get(appointmentId), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics2)->abi_ShowAppointmentDetailsAsync(get_abi(appointmentId), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IAppointmentManagerStatics2::ShowAppointmentDetailsAsync(hstring_ref appointmentId, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncAction impl_IAppointmentManagerStatics2::ShowAppointmentDetailsAsync(hstring_view appointmentId, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsWithDateAsync(get(appointmentId), get(instanceStartDate), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics2)->abi_ShowAppointmentDetailsWithDateAsync(get_abi(appointmentId), get_abi(instanceStartDate), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics2::ShowEditNewAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowEditNewAppointmentAsync(get(appointment), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics2)->abi_ShowEditNewAppointmentAsync(get_abi(appointment), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerStatics2::RequestStoreAsync(Windows::ApplicationModel::Appointments::AppointmentStoreAccessType options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(options, put(operation))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics2)->abi_RequestStoreAsync(options, put_abi(operation))); return operation; } template Windows::ApplicationModel::Appointments::AppointmentManagerForUser impl_IAppointmentManagerStatics3::GetForUser(const Windows::System::User & user) const { Windows::ApplicationModel::Appointments::AppointmentManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerStatics3)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowAddAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAppointmentAsync(get(appointment), get(selection), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowAddAppointmentAsync(get_abi(appointment), get_abi(selection), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowAddAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAppointmentWithPlacementAsync(get(appointment), get(selection), preferredPlacement, put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowAddAppointmentWithPlacementAsync(get_abi(appointment), get_abi(selection), preferredPlacement, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentAsync(get(appointmentId), get(appointment), get(selection), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowReplaceAppointmentAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentWithPlacementAsync(get(appointmentId), get(appointment), get(selection), preferredPlacement, put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowReplaceAppointmentWithPlacementAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), preferredPlacement, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get(appointmentId), get(appointment), get(selection), preferredPlacement, get(instanceStartDate), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get_abi(appointmentId), get_abi(appointment), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentAsync(get(appointmentId), get(selection), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowRemoveAppointmentAsync(get_abi(appointmentId), get_abi(selection), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentWithPlacementAsync(get(appointmentId), get(selection), preferredPlacement, put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowRemoveAppointmentWithPlacementAsync(get_abi(appointmentId), get_abi(selection), preferredPlacement, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get(appointmentId), get(selection), preferredPlacement, get(instanceStartDate), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get_abi(appointmentId), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentManagerForUser::ShowTimeFrameAsync(const Windows::Foundation::DateTime & timeToShow, const Windows::Foundation::TimeSpan & duration) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowTimeFrameAsync(get(timeToShow), get(duration), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowTimeFrameAsync(get_abi(timeToShow), get_abi(duration), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IAppointmentManagerForUser::ShowAppointmentDetailsAsync(hstring_ref appointmentId) const +template Windows::Foundation::IAsyncAction impl_IAppointmentManagerForUser::ShowAppointmentDetailsAsync(hstring_view appointmentId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsAsync(get(appointmentId), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowAppointmentDetailsAsync(get_abi(appointmentId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IAppointmentManagerForUser::ShowAppointmentDetailsAsync(hstring_ref appointmentId, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncAction impl_IAppointmentManagerForUser::ShowAppointmentDetailsAsync(hstring_view appointmentId, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsWithDateAsync(get(appointmentId), get(instanceStartDate), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowAppointmentDetailsWithDateAsync(get_abi(appointmentId), get_abi(instanceStartDate), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::ShowEditNewAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowEditNewAppointmentAsync(get(appointment), put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_ShowEditNewAppointmentAsync(get_abi(appointment), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentManagerForUser::RequestStoreAsync(Windows::ApplicationModel::Appointments::AppointmentStoreAccessType options) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(options, put(result))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->abi_RequestStoreAsync(options, put_abi(result))); return result; } template Windows::System::User impl_IAppointmentManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IAppointmentManagerForUser)->get_User(put_abi(value))); return value; } template hstring impl_IAppointmentParticipant::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IAppointmentParticipant)->get_DisplayName(put_abi(value))); return value; } -template void impl_IAppointmentParticipant::DisplayName(hstring_ref value) const +template void impl_IAppointmentParticipant::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IAppointmentParticipant)->put_DisplayName(get_abi(value))); } template hstring impl_IAppointmentParticipant::Address() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IAppointmentParticipant)->get_Address(put_abi(value))); return value; } -template void impl_IAppointmentParticipant::Address(hstring_ref value) const +template void impl_IAppointmentParticipant::Address(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Address(get(value))); + check_hresult(WINRT_SHIM(IAppointmentParticipant)->put_Address(get_abi(value))); } template Windows::ApplicationModel::Appointments::AppointmentParticipantRole impl_IAppointmentInvitee::Role() const { Windows::ApplicationModel::Appointments::AppointmentParticipantRole value {}; - check_hresult(static_cast(static_cast(*this))->get_Role(&value)); + check_hresult(WINRT_SHIM(IAppointmentInvitee)->get_Role(&value)); return value; } template void impl_IAppointmentInvitee::Role(Windows::ApplicationModel::Appointments::AppointmentParticipantRole value) const { - check_hresult(static_cast(static_cast(*this))->put_Role(value)); + check_hresult(WINRT_SHIM(IAppointmentInvitee)->put_Role(value)); } template Windows::ApplicationModel::Appointments::AppointmentParticipantResponse impl_IAppointmentInvitee::Response() const { Windows::ApplicationModel::Appointments::AppointmentParticipantResponse value {}; - check_hresult(static_cast(static_cast(*this))->get_Response(&value)); + check_hresult(WINRT_SHIM(IAppointmentInvitee)->get_Response(&value)); return value; } template void impl_IAppointmentInvitee::Response(Windows::ApplicationModel::Appointments::AppointmentParticipantResponse value) const { - check_hresult(static_cast(static_cast(*this))->put_Response(value)); + check_hresult(WINRT_SHIM(IAppointmentInvitee)->put_Response(value)); } template Windows::ApplicationModel::Appointments::AppointmentRecurrenceUnit impl_IAppointmentRecurrence::Unit() const { Windows::ApplicationModel::Appointments::AppointmentRecurrenceUnit value {}; - check_hresult(static_cast(static_cast(*this))->get_Unit(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Unit(&value)); return value; } template void impl_IAppointmentRecurrence::Unit(Windows::ApplicationModel::Appointments::AppointmentRecurrenceUnit value) const { - check_hresult(static_cast(static_cast(*this))->put_Unit(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Unit(value)); } template Windows::Foundation::IReference impl_IAppointmentRecurrence::Occurrences() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Occurrences(put(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Occurrences(put_abi(value))); return value; } -template void impl_IAppointmentRecurrence::Occurrences(const Windows::Foundation::IReference & value) const +template void impl_IAppointmentRecurrence::Occurrences(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Occurrences(get(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Occurrences(get_abi(value))); } template Windows::Foundation::IReference impl_IAppointmentRecurrence::Until() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Until(put(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Until(put_abi(value))); return value; } -template void impl_IAppointmentRecurrence::Until(const Windows::Foundation::IReference & value) const +template void impl_IAppointmentRecurrence::Until(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Until(get(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Until(get_abi(value))); } template uint32_t impl_IAppointmentRecurrence::Interval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Interval(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Interval(&value)); return value; } template void impl_IAppointmentRecurrence::Interval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Interval(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Interval(value)); } template Windows::ApplicationModel::Appointments::AppointmentDaysOfWeek impl_IAppointmentRecurrence::DaysOfWeek() const { Windows::ApplicationModel::Appointments::AppointmentDaysOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_DaysOfWeek(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_DaysOfWeek(&value)); return value; } template void impl_IAppointmentRecurrence::DaysOfWeek(Windows::ApplicationModel::Appointments::AppointmentDaysOfWeek value) const { - check_hresult(static_cast(static_cast(*this))->put_DaysOfWeek(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_DaysOfWeek(value)); } template Windows::ApplicationModel::Appointments::AppointmentWeekOfMonth impl_IAppointmentRecurrence::WeekOfMonth() const { Windows::ApplicationModel::Appointments::AppointmentWeekOfMonth value {}; - check_hresult(static_cast(static_cast(*this))->get_WeekOfMonth(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_WeekOfMonth(&value)); return value; } template void impl_IAppointmentRecurrence::WeekOfMonth(Windows::ApplicationModel::Appointments::AppointmentWeekOfMonth value) const { - check_hresult(static_cast(static_cast(*this))->put_WeekOfMonth(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_WeekOfMonth(value)); } template uint32_t impl_IAppointmentRecurrence::Month() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Month(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Month(&value)); return value; } template void impl_IAppointmentRecurrence::Month(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Month(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Month(value)); } template uint32_t impl_IAppointmentRecurrence::Day() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Day(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->get_Day(&value)); return value; } template void impl_IAppointmentRecurrence::Day(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Day(value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence)->put_Day(value)); } template Windows::ApplicationModel::Appointments::RecurrenceType impl_IAppointmentRecurrence2::RecurrenceType() const { Windows::ApplicationModel::Appointments::RecurrenceType value {}; - check_hresult(static_cast(static_cast(*this))->get_RecurrenceType(&value)); + check_hresult(WINRT_SHIM(IAppointmentRecurrence2)->get_RecurrenceType(&value)); return value; } template hstring impl_IAppointmentRecurrence2::TimeZone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TimeZone(put(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence2)->get_TimeZone(put_abi(value))); return value; } -template void impl_IAppointmentRecurrence2::TimeZone(hstring_ref value) const +template void impl_IAppointmentRecurrence2::TimeZone(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TimeZone(get(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence2)->put_TimeZone(get_abi(value))); } template hstring impl_IAppointmentRecurrence3::CalendarIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifier(put(value))); + check_hresult(WINRT_SHIM(IAppointmentRecurrence3)->get_CalendarIdentifier(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAppointment::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_StartTime(put_abi(value))); return value; } template void impl_IAppointment::StartTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_StartTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IAppointment::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Duration(put_abi(value))); return value; } template void impl_IAppointment::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Duration(get_abi(value))); } template hstring impl_IAppointment::Location() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Location(put_abi(value))); return value; } -template void impl_IAppointment::Location(hstring_ref value) const +template void impl_IAppointment::Location(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Location(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Location(get_abi(value))); } template hstring impl_IAppointment::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Subject(put_abi(value))); return value; } -template void impl_IAppointment::Subject(hstring_ref value) const +template void impl_IAppointment::Subject(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subject(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Subject(get_abi(value))); } template hstring impl_IAppointment::Details() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Details(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Details(put_abi(value))); return value; } -template void impl_IAppointment::Details(hstring_ref value) const +template void impl_IAppointment::Details(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Details(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Details(get_abi(value))); } template Windows::Foundation::IReference impl_IAppointment::Reminder() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Reminder(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Reminder(put_abi(value))); return value; } -template void impl_IAppointment::Reminder(const Windows::Foundation::IReference & value) const +template void impl_IAppointment::Reminder(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Reminder(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Reminder(get_abi(value))); } template Windows::ApplicationModel::Appointments::AppointmentOrganizer impl_IAppointment::Organizer() const { Windows::ApplicationModel::Appointments::AppointmentOrganizer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Organizer(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Organizer(put_abi(value))); return value; } template void impl_IAppointment::Organizer(const Windows::ApplicationModel::Appointments::AppointmentOrganizer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Organizer(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Organizer(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IAppointment::Invitees() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Invitees(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Invitees(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentRecurrence impl_IAppointment::Recurrence() const { Windows::ApplicationModel::Appointments::AppointmentRecurrence value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Recurrence(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Recurrence(put_abi(value))); return value; } template void impl_IAppointment::Recurrence(const Windows::ApplicationModel::Appointments::AppointmentRecurrence & value) const { - check_hresult(static_cast(static_cast(*this))->put_Recurrence(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Recurrence(get_abi(value))); } template Windows::ApplicationModel::Appointments::AppointmentBusyStatus impl_IAppointment::BusyStatus() const { Windows::ApplicationModel::Appointments::AppointmentBusyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_BusyStatus(&value)); + check_hresult(WINRT_SHIM(IAppointment)->get_BusyStatus(&value)); return value; } template void impl_IAppointment::BusyStatus(Windows::ApplicationModel::Appointments::AppointmentBusyStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_BusyStatus(value)); + check_hresult(WINRT_SHIM(IAppointment)->put_BusyStatus(value)); } template bool impl_IAppointment::AllDay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllDay(&value)); + check_hresult(WINRT_SHIM(IAppointment)->get_AllDay(&value)); return value; } template void impl_IAppointment::AllDay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllDay(value)); + check_hresult(WINRT_SHIM(IAppointment)->put_AllDay(value)); } template Windows::ApplicationModel::Appointments::AppointmentSensitivity impl_IAppointment::Sensitivity() const { Windows::ApplicationModel::Appointments::AppointmentSensitivity value {}; - check_hresult(static_cast(static_cast(*this))->get_Sensitivity(&value)); + check_hresult(WINRT_SHIM(IAppointment)->get_Sensitivity(&value)); return value; } template void impl_IAppointment::Sensitivity(Windows::ApplicationModel::Appointments::AppointmentSensitivity value) const { - check_hresult(static_cast(static_cast(*this))->put_Sensitivity(value)); + check_hresult(WINRT_SHIM(IAppointment)->put_Sensitivity(value)); } template Windows::Foundation::Uri impl_IAppointment::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IAppointment)->get_Uri(put_abi(value))); return value; } template void impl_IAppointment::Uri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(value))); + check_hresult(WINRT_SHIM(IAppointment)->put_Uri(get_abi(value))); } template hstring impl_IAppointment2::LocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_LocalId(put_abi(value))); return value; } template hstring impl_IAppointment2::CalendarId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CalendarId(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_CalendarId(put_abi(value))); return value; } template hstring impl_IAppointment2::RoamingId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RoamingId(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_RoamingId(put_abi(value))); return value; } -template void impl_IAppointment2::RoamingId(hstring_ref value) const +template void impl_IAppointment2::RoamingId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RoamingId(get(value))); + check_hresult(WINRT_SHIM(IAppointment2)->put_RoamingId(get_abi(value))); } template Windows::Foundation::IReference impl_IAppointment2::OriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_OriginalStartTime(put_abi(value))); return value; } template bool impl_IAppointment2::IsResponseRequested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsResponseRequested(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_IsResponseRequested(&value)); return value; } template void impl_IAppointment2::IsResponseRequested(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsResponseRequested(value)); + check_hresult(WINRT_SHIM(IAppointment2)->put_IsResponseRequested(value)); } template bool impl_IAppointment2::AllowNewTimeProposal() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowNewTimeProposal(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_AllowNewTimeProposal(&value)); return value; } template void impl_IAppointment2::AllowNewTimeProposal(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowNewTimeProposal(value)); + check_hresult(WINRT_SHIM(IAppointment2)->put_AllowNewTimeProposal(value)); } template hstring impl_IAppointment2::OnlineMeetingLink() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OnlineMeetingLink(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_OnlineMeetingLink(put_abi(value))); return value; } -template void impl_IAppointment2::OnlineMeetingLink(hstring_ref value) const +template void impl_IAppointment2::OnlineMeetingLink(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OnlineMeetingLink(get(value))); + check_hresult(WINRT_SHIM(IAppointment2)->put_OnlineMeetingLink(get_abi(value))); } template Windows::Foundation::IReference impl_IAppointment2::ReplyTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ReplyTime(put(value))); + check_hresult(WINRT_SHIM(IAppointment2)->get_ReplyTime(put_abi(value))); return value; } -template void impl_IAppointment2::ReplyTime(const Windows::Foundation::IReference & value) const +template void impl_IAppointment2::ReplyTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ReplyTime(get(value))); + check_hresult(WINRT_SHIM(IAppointment2)->put_ReplyTime(get_abi(value))); } template Windows::ApplicationModel::Appointments::AppointmentParticipantResponse impl_IAppointment2::UserResponse() const { Windows::ApplicationModel::Appointments::AppointmentParticipantResponse value {}; - check_hresult(static_cast(static_cast(*this))->get_UserResponse(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_UserResponse(&value)); return value; } template void impl_IAppointment2::UserResponse(Windows::ApplicationModel::Appointments::AppointmentParticipantResponse value) const { - check_hresult(static_cast(static_cast(*this))->put_UserResponse(value)); + check_hresult(WINRT_SHIM(IAppointment2)->put_UserResponse(value)); } template bool impl_IAppointment2::HasInvitees() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasInvitees(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_HasInvitees(&value)); return value; } template bool impl_IAppointment2::IsCanceledMeeting() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceledMeeting(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_IsCanceledMeeting(&value)); return value; } template void impl_IAppointment2::IsCanceledMeeting(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCanceledMeeting(value)); + check_hresult(WINRT_SHIM(IAppointment2)->put_IsCanceledMeeting(value)); } template bool impl_IAppointment2::IsOrganizedByUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOrganizedByUser(&value)); + check_hresult(WINRT_SHIM(IAppointment2)->get_IsOrganizedByUser(&value)); return value; } template void impl_IAppointment2::IsOrganizedByUser(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOrganizedByUser(value)); + check_hresult(WINRT_SHIM(IAppointment2)->put_IsOrganizedByUser(value)); } template uint64_t impl_IAppointment3::ChangeNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeNumber(&value)); + check_hresult(WINRT_SHIM(IAppointment3)->get_ChangeNumber(&value)); return value; } template uint64_t impl_IAppointment3::RemoteChangeNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteChangeNumber(&value)); + check_hresult(WINRT_SHIM(IAppointment3)->get_RemoteChangeNumber(&value)); return value; } template void impl_IAppointment3::RemoteChangeNumber(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteChangeNumber(value)); + check_hresult(WINRT_SHIM(IAppointment3)->put_RemoteChangeNumber(value)); } template Windows::ApplicationModel::Appointments::AppointmentDetailsKind impl_IAppointment3::DetailsKind() const { Windows::ApplicationModel::Appointments::AppointmentDetailsKind value {}; - check_hresult(static_cast(static_cast(*this))->get_DetailsKind(&value)); + check_hresult(WINRT_SHIM(IAppointment3)->get_DetailsKind(&value)); return value; } template void impl_IAppointment3::DetailsKind(Windows::ApplicationModel::Appointments::AppointmentDetailsKind value) const { - check_hresult(static_cast(static_cast(*this))->put_DetailsKind(value)); + check_hresult(WINRT_SHIM(IAppointment3)->put_DetailsKind(value)); } template Windows::Foundation::Collections::IVector impl_IFindAppointmentsOptions::CalendarIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_CalendarIds(put(value))); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->get_CalendarIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IFindAppointmentsOptions::FetchProperties() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FetchProperties(put(value))); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->get_FetchProperties(put_abi(value))); return value; } template bool impl_IFindAppointmentsOptions::IncludeHidden() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeHidden(&value)); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->get_IncludeHidden(&value)); return value; } template void impl_IFindAppointmentsOptions::IncludeHidden(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncludeHidden(value)); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->put_IncludeHidden(value)); } template uint32_t impl_IFindAppointmentsOptions::MaxCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxCount(&value)); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->get_MaxCount(&value)); return value; } template void impl_IFindAppointmentsOptions::MaxCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxCount(value)); + check_hresult(WINRT_SHIM(IFindAppointmentsOptions)->put_MaxCount(value)); } template Windows::UI::Color impl_IAppointmentCalendar::DisplayColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayColor(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_DisplayColor(put_abi(value))); return value; } template hstring impl_IAppointmentCalendar::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_DisplayName(put_abi(value))); return value; } -template void impl_IAppointmentCalendar::DisplayName(hstring_ref value) const +template void impl_IAppointmentCalendar::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->put_DisplayName(get_abi(value))); } template hstring impl_IAppointmentCalendar::LocalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_LocalId(put_abi(value))); return value; } template bool impl_IAppointmentCalendar::IsHidden() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHidden(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_IsHidden(&value)); return value; } template Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppReadAccess impl_IAppointmentCalendar::OtherAppReadAccess() const { Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppReadAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppReadAccess(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_OtherAppReadAccess(&value)); return value; } template void impl_IAppointmentCalendar::OtherAppReadAccess(Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppReadAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppReadAccess(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->put_OtherAppReadAccess(value)); } template Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppWriteAccess impl_IAppointmentCalendar::OtherAppWriteAccess() const { Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppWriteAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppWriteAccess(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_OtherAppWriteAccess(&value)); return value; } template void impl_IAppointmentCalendar::OtherAppWriteAccess(Windows::ApplicationModel::Appointments::AppointmentCalendarOtherAppWriteAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppWriteAccess(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->put_OtherAppWriteAccess(value)); } template hstring impl_IAppointmentCalendar::SourceDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceDisplayName(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_SourceDisplayName(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentSummaryCardView impl_IAppointmentCalendar::SummaryCardView() const { Windows::ApplicationModel::Appointments::AppointmentSummaryCardView value {}; - check_hresult(static_cast(static_cast(*this))->get_SummaryCardView(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->get_SummaryCardView(&value)); return value; } template void impl_IAppointmentCalendar::SummaryCardView(Windows::ApplicationModel::Appointments::AppointmentSummaryCardView value) const { - check_hresult(static_cast(static_cast(*this))->put_SummaryCardView(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->put_SummaryCardView(value)); } template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAppointmentsAsync(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentsAsync(get(rangeStart), get(rangeLength), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindAppointmentsAsync(get_abi(rangeStart), get_abi(rangeLength), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAppointmentsAsync(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength, const Windows::ApplicationModel::Appointments::FindAppointmentsOptions & options) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentsAsyncWithOptions(get(rangeStart), get(rangeLength), get(options), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindAppointmentsAsyncWithOptions(get_abi(rangeStart), get_abi(rangeLength), get_abi(options), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindExceptionsFromMasterAsync(hstring_ref masterLocalId) const +template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindExceptionsFromMasterAsync(hstring_view masterLocalId) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindExceptionsFromMasterAsync(get(masterLocalId), put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindExceptionsFromMasterAsync(get_abi(masterLocalId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAllInstancesAsync(hstring_ref masterLocalId, const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const +template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAllInstancesAsync(hstring_view masterLocalId, const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllInstancesAsync(get(masterLocalId), get(rangeStart), get(rangeLength), put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindAllInstancesAsync(get_abi(masterLocalId), get_abi(rangeStart), get_abi(rangeLength), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAllInstancesAsync(hstring_ref masterLocalId, const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength, const Windows::ApplicationModel::Appointments::FindAppointmentsOptions & pOptions) const +template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindAllInstancesAsync(hstring_view masterLocalId, const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength, const Windows::ApplicationModel::Appointments::FindAppointmentsOptions & pOptions) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllInstancesAsyncWithOptions(get(masterLocalId), get(rangeStart), get(rangeLength), get(pOptions), put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindAllInstancesAsyncWithOptions(get_abi(masterLocalId), get_abi(rangeStart), get_abi(rangeLength), get_abi(pOptions), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar::GetAppointmentAsync(hstring_ref localId) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar::GetAppointmentAsync(hstring_view localId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppointmentAsync(get(localId), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_GetAppointmentAsync(get_abi(localId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar::GetAppointmentInstanceAsync(hstring_ref localId, const Windows::Foundation::DateTime & instanceStartTime) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar::GetAppointmentInstanceAsync(hstring_view localId, const Windows::Foundation::DateTime & instanceStartTime) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppointmentInstanceAsync(get(localId), get(instanceStartTime), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_GetAppointmentInstanceAsync(get_abi(localId), get_abi(instanceStartTime), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindUnexpandedAppointmentsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindUnexpandedAppointmentsAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindUnexpandedAppointmentsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentCalendar::FindUnexpandedAppointmentsAsync(const Windows::ApplicationModel::Appointments::FindAppointmentsOptions & options) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindUnexpandedAppointmentsAsyncWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_FindUnexpandedAppointmentsAsyncWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::DeleteAsync() const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_DeleteAsync(put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::SaveAsync() const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_SaveAsync(put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::DeleteAppointmentAsync(hstring_ref localId) const +template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::DeleteAppointmentAsync(hstring_view localId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAppointmentAsync(get(localId), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_DeleteAppointmentAsync(get_abi(localId), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::DeleteAppointmentInstanceAsync(hstring_ref localId, const Windows::Foundation::DateTime & instanceStartTime) const +template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::DeleteAppointmentInstanceAsync(hstring_view localId, const Windows::Foundation::DateTime & instanceStartTime) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAppointmentInstanceAsync(get(localId), get(instanceStartTime), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_DeleteAppointmentInstanceAsync(get_abi(localId), get_abi(instanceStartTime), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar::SaveAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & pAppointment) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_SaveAppointmentAsync(get(pAppointment), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentCalendar)->abi_SaveAppointmentAsync(get_abi(pAppointment), put_abi(asyncAction))); return asyncAction; } template Windows::ApplicationModel::Appointments::AppointmentCalendarSyncManager impl_IAppointmentCalendar2::SyncManager() const { Windows::ApplicationModel::Appointments::AppointmentCalendarSyncManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SyncManager(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_SyncManager(put_abi(value))); return value; } template hstring impl_IAppointmentCalendar2::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_RemoteId(put_abi(value))); return value; } -template void impl_IAppointmentCalendar2::RemoteId(hstring_ref value) const +template void impl_IAppointmentCalendar2::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_RemoteId(get_abi(value))); } template void impl_IAppointmentCalendar2::DisplayColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayColor(get(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_DisplayColor(get_abi(value))); } template void impl_IAppointmentCalendar2::IsHidden(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHidden(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_IsHidden(value)); } template hstring impl_IAppointmentCalendar2::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_UserDataAccountId(put_abi(value))); return value; } template bool impl_IAppointmentCalendar2::CanCreateOrUpdateAppointments() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanCreateOrUpdateAppointments(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanCreateOrUpdateAppointments(&value)); return value; } template void impl_IAppointmentCalendar2::CanCreateOrUpdateAppointments(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanCreateOrUpdateAppointments(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanCreateOrUpdateAppointments(value)); } template bool impl_IAppointmentCalendar2::CanCancelMeetings() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanCancelMeetings(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanCancelMeetings(&value)); return value; } template void impl_IAppointmentCalendar2::CanCancelMeetings(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanCancelMeetings(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanCancelMeetings(value)); } template bool impl_IAppointmentCalendar2::CanForwardMeetings() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanForwardMeetings(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanForwardMeetings(&value)); return value; } template void impl_IAppointmentCalendar2::CanForwardMeetings(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanForwardMeetings(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanForwardMeetings(value)); } template bool impl_IAppointmentCalendar2::CanProposeNewTimeForMeetings() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanProposeNewTimeForMeetings(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanProposeNewTimeForMeetings(&value)); return value; } template void impl_IAppointmentCalendar2::CanProposeNewTimeForMeetings(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanProposeNewTimeForMeetings(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanProposeNewTimeForMeetings(value)); } template bool impl_IAppointmentCalendar2::CanUpdateMeetingResponses() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanUpdateMeetingResponses(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanUpdateMeetingResponses(&value)); return value; } template void impl_IAppointmentCalendar2::CanUpdateMeetingResponses(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanUpdateMeetingResponses(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanUpdateMeetingResponses(value)); } template bool impl_IAppointmentCalendar2::CanNotifyInvitees() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanNotifyInvitees(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_CanNotifyInvitees(&value)); return value; } template void impl_IAppointmentCalendar2::CanNotifyInvitees(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanNotifyInvitees(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_CanNotifyInvitees(value)); } template bool impl_IAppointmentCalendar2::MustNofityInvitees() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MustNofityInvitees(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->get_MustNofityInvitees(&value)); return value; } template void impl_IAppointmentCalendar2::MustNofityInvitees(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MustNofityInvitees(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->put_MustNofityInvitees(value)); } template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryCreateOrUpdateAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, bool notifyInvitees) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateOrUpdateAppointmentAsync(get(appointment), notifyInvitees, put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->abi_TryCreateOrUpdateAppointmentAsync(get_abi(appointment), notifyInvitees, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryCancelMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, hstring_ref subject, hstring_ref comment, bool notifyInvitees) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryCancelMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, hstring_view subject, hstring_view comment, bool notifyInvitees) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryCancelMeetingAsync(get(meeting), get(subject), get(comment), notifyInvitees, put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->abi_TryCancelMeetingAsync(get_abi(meeting), get_abi(subject), get_abi(comment), notifyInvitees, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryForwardMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, const Windows::Foundation::Collections::IIterable & invitees, hstring_ref subject, hstring_ref forwardHeader, hstring_ref comment) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryForwardMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, iterable invitees, hstring_view subject, hstring_view forwardHeader, hstring_view comment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryForwardMeetingAsync(get(meeting), get(invitees), get(subject), get(forwardHeader), get(comment), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->abi_TryForwardMeetingAsync(get_abi(meeting), get_abi(invitees), get_abi(subject), get_abi(forwardHeader), get_abi(comment), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryProposeNewTimeForMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, const Windows::Foundation::DateTime & newStartTime, const Windows::Foundation::TimeSpan & newDuration, hstring_ref subject, hstring_ref comment) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryProposeNewTimeForMeetingAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, const Windows::Foundation::DateTime & newStartTime, const Windows::Foundation::TimeSpan & newDuration, hstring_view subject, hstring_view comment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryProposeNewTimeForMeetingAsync(get(meeting), get(newStartTime), get(newDuration), get(subject), get(comment), put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->abi_TryProposeNewTimeForMeetingAsync(get_abi(meeting), get_abi(newStartTime), get_abi(newDuration), get_abi(subject), get_abi(comment), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryUpdateMeetingResponseAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, Windows::ApplicationModel::Appointments::AppointmentParticipantResponse response, hstring_ref subject, hstring_ref comment, bool sendUpdate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendar2::TryUpdateMeetingResponseAsync(const Windows::ApplicationModel::Appointments::Appointment & meeting, Windows::ApplicationModel::Appointments::AppointmentParticipantResponse response, hstring_view subject, hstring_view comment, bool sendUpdate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdateMeetingResponseAsync(get(meeting), response, get(subject), get(comment), sendUpdate, put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar2)->abi_TryUpdateMeetingResponseAsync(get_abi(meeting), response, get_abi(subject), get_abi(comment), sendUpdate, put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentCalendar3::RegisterSyncManagerAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterSyncManagerAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendar3)->abi_RegisterSyncManagerAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Appointments::AppointmentCalendarSyncStatus impl_IAppointmentCalendarSyncManager::Status() const { Windows::ApplicationModel::Appointments::AppointmentCalendarSyncStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->get_Status(&value)); return value; } template Windows::Foundation::DateTime impl_IAppointmentCalendarSyncManager::LastSuccessfulSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSuccessfulSyncTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->get_LastSuccessfulSyncTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAppointmentCalendarSyncManager::LastAttemptedSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastAttemptedSyncTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->get_LastAttemptedSyncTime(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAppointmentCalendarSyncManager::SyncAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SyncAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->abi_SyncAsync(put_abi(result))); return result; } -template event_token impl_IAppointmentCalendarSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAppointmentCalendarSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SyncStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->add_SyncStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IAppointmentCalendarSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAppointmentCalendarSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Appointments::IAppointmentCalendarSyncManager::remove_SyncStatusChanged, SyncStatusChanged(handler)); } template void impl_IAppointmentCalendarSyncManager::SyncStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SyncStatusChanged(token)); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager)->remove_SyncStatusChanged(token)); } template void impl_IAppointmentCalendarSyncManager2::Status(Windows::ApplicationModel::Appointments::AppointmentCalendarSyncStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager2)->put_Status(value)); } template void impl_IAppointmentCalendarSyncManager2::LastSuccessfulSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastSuccessfulSyncTime(get(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager2)->put_LastSuccessfulSyncTime(get_abi(value))); } template void impl_IAppointmentCalendarSyncManager2::LastAttemptedSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastAttemptedSyncTime(get(value))); + check_hresult(WINRT_SHIM(IAppointmentCalendarSyncManager2)->put_LastAttemptedSyncTime(get_abi(value))); } template hstring impl_IAppointmentPropertiesStatics::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Subject(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Location() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Location(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::StartTime() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_StartTime(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Duration() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Duration(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Reminder() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Reminder(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Reminder(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::BusyStatus() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BusyStatus(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_BusyStatus(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Sensitivity() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sensitivity(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Sensitivity(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::OriginalStartTime() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_OriginalStartTime(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::IsResponseRequested() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsResponseRequested(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_IsResponseRequested(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::AllowNewTimeProposal() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AllowNewTimeProposal(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_AllowNewTimeProposal(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::AllDay() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AllDay(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_AllDay(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Details() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Details(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Details(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::OnlineMeetingLink() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OnlineMeetingLink(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_OnlineMeetingLink(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::ReplyTime() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ReplyTime(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_ReplyTime(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Organizer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Organizer(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Organizer(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::UserResponse() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserResponse(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_UserResponse(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::HasInvitees() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HasInvitees(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_HasInvitees(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::IsCanceledMeeting() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsCanceledMeeting(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_IsCanceledMeeting(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::IsOrganizedByUser() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsOrganizedByUser(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_IsOrganizedByUser(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Recurrence() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Recurrence(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Recurrence(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Uri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Uri(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics::Invitees() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Invitees(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_Invitees(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAppointmentPropertiesStatics::DefaultProperties() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DefaultProperties(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics)->get_DefaultProperties(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics2::ChangeNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ChangeNumber(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics2)->get_ChangeNumber(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics2::RemoteChangeNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteChangeNumber(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics2)->get_RemoteChangeNumber(put_abi(value))); return value; } template hstring impl_IAppointmentPropertiesStatics2::DetailsKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DetailsKind(put(value))); + check_hresult(WINRT_SHIM(IAppointmentPropertiesStatics2)->get_DetailsKind(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentConflictType impl_IAppointmentConflictResult::Type() const { Windows::ApplicationModel::Appointments::AppointmentConflictType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IAppointmentConflictResult)->get_Type(&value)); return value; } template Windows::Foundation::DateTime impl_IAppointmentConflictResult::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(IAppointmentConflictResult)->get_Date(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::Appointment impl_IAppointmentStoreChange::Appointment() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentStoreChange)->get_Appointment(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::AppointmentStoreChangeType impl_IAppointmentStoreChange::ChangeType() const { Windows::ApplicationModel::Appointments::AppointmentStoreChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IAppointmentStoreChange)->get_ChangeType(&value)); return value; } template Windows::ApplicationModel::Appointments::AppointmentCalendar impl_IAppointmentStoreChange2::AppointmentCalendar() const { Windows::ApplicationModel::Appointments::AppointmentCalendar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppointmentCalendar(put(value))); + check_hresult(WINRT_SHIM(IAppointmentStoreChange2)->get_AppointmentCalendar(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentStoreChangeReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeReader)->abi_ReadBatchAsync(put_abi(result))); return result; } template void impl_IAppointmentStoreChangeReader::AcceptChanges() const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChanges()); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeReader)->abi_AcceptChanges()); } template void impl_IAppointmentStoreChangeReader::AcceptChangesThrough(const Windows::ApplicationModel::Appointments::AppointmentStoreChange & lastChangeToAccept) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChangesThrough(get(lastChangeToAccept))); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeReader)->abi_AcceptChangesThrough(get_abi(lastChangeToAccept))); } template Windows::ApplicationModel::Appointments::AppointmentStoreChangeReader impl_IAppointmentStoreChangeTracker::GetChangeReader() const { Windows::ApplicationModel::Appointments::AppointmentStoreChangeReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChangeReader(put(value))); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeTracker)->abi_GetChangeReader(put_abi(value))); return value; } template void impl_IAppointmentStoreChangeTracker::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeTracker)->abi_Enable()); } template void impl_IAppointmentStoreChangeTracker::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IAppointmentStoreChangeTracker)->abi_Reset()); } template Windows::ApplicationModel::Appointments::AppointmentStoreChangedDeferral impl_IAppointmentStoreChangedEventArgs::GetDeferral() const { Windows::ApplicationModel::Appointments::AppointmentStoreChangedDeferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IAppointmentStoreChangedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template void impl_IAppointmentStoreChangedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IAppointmentStoreChangedDeferral)->abi_Complete()); } template Windows::ApplicationModel::Appointments::AppointmentStoreChangeTracker impl_IAppointmentStore::ChangeTracker() const { Windows::ApplicationModel::Appointments::AppointmentStoreChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IAppointmentStore)->get_ChangeTracker(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::CreateAppointmentCalendarAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::CreateAppointmentCalendarAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateAppointmentCalendarAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_CreateAppointmentCalendarAsync(get_abi(name), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentCalendarAsync(hstring_ref calendarId) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentCalendarAsync(hstring_view calendarId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppointmentCalendarAsync(get(calendarId), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_GetAppointmentCalendarAsync(get_abi(calendarId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentAsync(hstring_ref localId) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentAsync(hstring_view localId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppointmentAsync(get(localId), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_GetAppointmentAsync(get_abi(localId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentInstanceAsync(hstring_ref localId, const Windows::Foundation::DateTime & instanceStartTime) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::GetAppointmentInstanceAsync(hstring_view localId, const Windows::Foundation::DateTime & instanceStartTime) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppointmentInstanceAsync(get(localId), get(instanceStartTime), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_GetAppointmentInstanceAsync(get_abi(localId), get_abi(instanceStartTime), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindAppointmentCalendarsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentCalendarsAsync(put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindAppointmentCalendarsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindAppointmentCalendarsAsync(Windows::ApplicationModel::Appointments::FindAppointmentCalendarsOptions options) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentCalendarsAsyncWithOptions(options, put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindAppointmentCalendarsAsyncWithOptions(options, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindAppointmentsAsync(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentsAsync(get(rangeStart), get(rangeLength), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindAppointmentsAsync(get_abi(rangeStart), get_abi(rangeLength), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindAppointmentsAsync(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength, const Windows::ApplicationModel::Appointments::FindAppointmentsOptions & options) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentsAsyncWithOptions(get(rangeStart), get(rangeLength), get(options), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindAppointmentsAsyncWithOptions(get_abi(rangeStart), get_abi(rangeLength), get_abi(options), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::FindConflictAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindConflictAsync(get(appointment), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindConflictAsync(get_abi(appointment), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::FindConflictAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::DateTime & instanceStartTime) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindConflictAsyncWithInstanceStart(get(appointment), get(instanceStartTime), put(result))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindConflictAsyncWithInstanceStart(get_abi(appointment), get_abi(instanceStartTime), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IAppointmentStore::MoveAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::ApplicationModel::Appointments::AppointmentCalendar & destinationCalendar) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_MoveAppointmentAsync(get(appointment), get(destinationCalendar), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_MoveAppointmentAsync(get_abi(appointment), get_abi(destinationCalendar), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowAddAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAppointmentAsync(get(appointment), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowAddAppointmentAsync(get_abi(appointment), get_abi(selection), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowReplaceAppointmentAsync(hstring_ref localId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowReplaceAppointmentAsync(hstring_view localId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentAsync(get(localId), get(appointment), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowReplaceAppointmentAsync(get_abi(localId), get_abi(appointment), get_abi(selection), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowReplaceAppointmentAsync(hstring_ref localId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowReplaceAppointmentAsync(hstring_view localId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get(localId), get(appointment), get(selection), preferredPlacement, get(instanceStartDate), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowReplaceAppointmentWithPlacementAndDateAsync(get_abi(localId), get_abi(appointment), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowRemoveAppointmentAsync(hstring_ref localId, const Windows::Foundation::Rect & selection) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowRemoveAppointmentAsync(hstring_view localId, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentAsync(get(localId), get(selection), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowRemoveAppointmentAsync(get_abi(localId), get_abi(selection), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowRemoveAppointmentAsync(hstring_ref localId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowRemoveAppointmentAsync(hstring_view localId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get(localId), get(selection), preferredPlacement, get(instanceStartDate), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowRemoveAppointmentWithPlacementAndDateAsync(get_abi(localId), get_abi(selection), preferredPlacement, get_abi(instanceStartDate), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IAppointmentStore::ShowAppointmentDetailsAsync(hstring_ref localId) const +template Windows::Foundation::IAsyncAction impl_IAppointmentStore::ShowAppointmentDetailsAsync(hstring_view localId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsAsync(get(localId), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowAppointmentDetailsAsync(get_abi(localId), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IAppointmentStore::ShowAppointmentDetailsAsync(hstring_ref localId, const Windows::Foundation::DateTime & instanceStartDate) const +template Windows::Foundation::IAsyncAction impl_IAppointmentStore::ShowAppointmentDetailsAsync(hstring_view localId, const Windows::Foundation::DateTime & instanceStartDate) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowAppointmentDetailsWithDateAsync(get(localId), get(instanceStartDate), put(asyncAction))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowAppointmentDetailsWithDateAsync(get_abi(localId), get_abi(instanceStartDate), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_IAppointmentStore::ShowEditNewAppointmentAsync(const Windows::ApplicationModel::Appointments::Appointment & appointment) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowEditNewAppointmentAsync(get(appointment), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_ShowEditNewAppointmentAsync(get_abi(appointment), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindLocalIdsFromRoamingIdAsync(hstring_ref roamingId) const +template Windows::Foundation::IAsyncOperation> impl_IAppointmentStore::FindLocalIdsFromRoamingIdAsync(hstring_view roamingId) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindLocalIdsFromRoamingIdAsync(get(roamingId), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore)->abi_FindLocalIdsFromRoamingIdAsync(get_abi(roamingId), put_abi(operation))); return operation; } template event_token impl_IAppointmentStore2::StoreChanged(const Windows::Foundation::TypedEventHandler & pHandler) const { event_token pToken {}; - check_hresult(static_cast(static_cast(*this))->add_StoreChanged(get(pHandler), &pToken)); + check_hresult(WINRT_SHIM(IAppointmentStore2)->add_StoreChanged(get_abi(pHandler), &pToken)); return pToken; } @@ -4912,34 +5154,34 @@ template event_revoker impl_IAppointmentStore2< template void impl_IAppointmentStore2::StoreChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StoreChanged(token)); + check_hresult(WINRT_SHIM(IAppointmentStore2)->remove_StoreChanged(token)); } -template Windows::Foundation::IAsyncOperation impl_IAppointmentStore2::CreateAppointmentCalendarAsync(hstring_ref name, hstring_ref userDataAccountId) const +template Windows::Foundation::IAsyncOperation impl_IAppointmentStore2::CreateAppointmentCalendarAsync(hstring_view name, hstring_view userDataAccountId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateAppointmentCalendarInAccountAsync(get(name), get(userDataAccountId), put(operation))); + check_hresult(WINRT_SHIM(IAppointmentStore2)->abi_CreateAppointmentCalendarInAccountAsync(get_abi(name), get_abi(userDataAccountId), put_abi(operation))); return operation; } template Windows::ApplicationModel::Appointments::Appointment impl_IAppointmentException::Appointment() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appointment(put(value))); + check_hresult(WINRT_SHIM(IAppointmentException)->get_Appointment(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppointmentException::ExceptionProperties() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ExceptionProperties(put(value))); + check_hresult(WINRT_SHIM(IAppointmentException)->get_ExceptionProperties(put_abi(value))); return value; } template bool impl_IAppointmentException::IsDeleted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDeleted(&value)); + check_hresult(WINRT_SHIM(IAppointmentException)->get_IsDeleted(&value)); return value; } @@ -4961,32 +5203,32 @@ inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowAdd return get_activation_factory().ShowAddAppointmentAsync(appointment, selection, preferredPlacement); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection) { return get_activation_factory().ShowReplaceAppointmentAsync(appointmentId, appointment, selection); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) { return get_activation_factory().ShowReplaceAppointmentAsync(appointmentId, appointment, selection, preferredPlacement); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_ref appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowReplaceAppointmentAsync(hstring_view appointmentId, const Windows::ApplicationModel::Appointments::Appointment & appointment, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) { return get_activation_factory().ShowReplaceAppointmentAsync(appointmentId, appointment, selection, preferredPlacement, instanceStartDate); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection) { return get_activation_factory().ShowRemoveAppointmentAsync(appointmentId, selection); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) { return get_activation_factory().ShowRemoveAppointmentAsync(appointmentId, selection, preferredPlacement); } -inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_ref appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) +inline Windows::Foundation::IAsyncOperation AppointmentManager::ShowRemoveAppointmentAsync(hstring_view appointmentId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::Foundation::DateTime & instanceStartDate) { return get_activation_factory().ShowRemoveAppointmentAsync(appointmentId, selection, preferredPlacement, instanceStartDate); } @@ -4996,12 +5238,12 @@ inline Windows::Foundation::IAsyncAction AppointmentManager::ShowTimeFrameAsync( return get_activation_factory().ShowTimeFrameAsync(timeToShow, duration); } -inline Windows::Foundation::IAsyncAction AppointmentManager::ShowAppointmentDetailsAsync(hstring_ref appointmentId) +inline Windows::Foundation::IAsyncAction AppointmentManager::ShowAppointmentDetailsAsync(hstring_view appointmentId) { return get_activation_factory().ShowAppointmentDetailsAsync(appointmentId); } -inline Windows::Foundation::IAsyncAction AppointmentManager::ShowAppointmentDetailsAsync(hstring_ref appointmentId, const Windows::Foundation::DateTime & instanceStartDate) +inline Windows::Foundation::IAsyncAction AppointmentManager::ShowAppointmentDetailsAsync(hstring_view appointmentId, const Windows::Foundation::DateTime & instanceStartDate) { return get_activation_factory().ShowAppointmentDetailsAsync(appointmentId, instanceStartDate); } @@ -5166,3 +5408,437 @@ inline FindAppointmentsOptions::FindAppointmentsOptions() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointment2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointment3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentCalendar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentCalendar2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentCalendar3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentCalendarSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentCalendarSyncManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentConflictResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentException & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentInvitee & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentParticipant & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentPropertiesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentRecurrence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentRecurrence2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentRecurrence3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChange2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IAppointmentStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::IFindAppointmentsOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::Appointment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentCalendar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentCalendarSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentConflictResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentException & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentInvitee & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentOrganizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentRecurrence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::AppointmentStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Appointments::FindAppointmentsOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Background.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Background.h index ebdb4bdb1..e5f1c189c 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Background.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Background.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" @@ -40,7 +43,7 @@ template BackgroundTaskCanceledEventHandler::Background inline void BackgroundTaskCanceledEventHandler::operator()(const Windows::ApplicationModel::Background::IBackgroundTaskInstance & sender, Windows::ApplicationModel::Background::BackgroundTaskCancellationReason reason) const { - check_hresult((*this)->abi_Invoke(get(sender), reason)); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), reason)); } template BackgroundTaskCompletedEventHandler::BackgroundTaskCompletedEventHandler(L lambda) : @@ -57,7 +60,7 @@ template BackgroundTaskCompletedEventHandler::Backgroun inline void BackgroundTaskCompletedEventHandler::operator()(const Windows::ApplicationModel::Background::BackgroundTaskRegistration & sender, const Windows::ApplicationModel::Background::BackgroundTaskCompletedEventArgs & args) const { - check_hresult((*this)->abi_Invoke(get(sender), get(args))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(args))); } template BackgroundTaskProgressEventHandler::BackgroundTaskProgressEventHandler(L lambda) : @@ -74,7 +77,7 @@ template BackgroundTaskProgressEventHandler::Background inline void BackgroundTaskProgressEventHandler::operator()(const Windows::ApplicationModel::Background::BackgroundTaskRegistration & sender, const Windows::ApplicationModel::Background::BackgroundTaskProgressEventArgs & args) const { - check_hresult((*this)->abi_Invoke(get(sender), get(args))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(args))); } } @@ -84,11 +87,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_SubscribedActivities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SubscribedActivities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SubscribedActivities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubscribedActivities()); return S_OK; } catch (...) @@ -102,7 +106,8 @@ struct produce { try { - *value = detach(this->shim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -111,11 +116,12 @@ struct produce } } - HRESULT __stdcall get_SupportedActivities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedActivities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedActivities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedActivities()); return S_OK; } catch (...) @@ -129,7 +135,8 @@ struct produce { try { - *value = detach(this->shim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -142,11 +149,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t reportIntervalInMilliseconds, abi_arg_out activityTrigger) noexcept override + HRESULT __stdcall abi_Create(uint32_t reportIntervalInMilliseconds, impl::abi_arg_out activityTrigger) noexcept override { try { - *activityTrigger = detach(this->shim().Create(reportIntervalInMilliseconds)); + typename D::abi_guard guard(this->shim()); + *activityTrigger = detach_abi(this->shim().Create(reportIntervalInMilliseconds)); return S_OK; } catch (...) @@ -160,11 +168,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -178,7 +187,8 @@ struct produceshim().GetAccessStatus()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetAccessStatus()); return S_OK; } catch (...) @@ -191,11 +201,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync()); return S_OK; } catch (...) @@ -205,11 +216,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestAsyncWithArguments(abi_arg_in arguments, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncWithArguments(impl::abi_arg_in arguments, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -223,11 +235,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -249,11 +262,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -263,11 +277,12 @@ struct produce applicationId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessForApplicationAsync(impl::abi_arg_in applicationId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -281,6 +296,7 @@ struct produceshim()); this->shim().RemoveAccess(); return S_OK; } @@ -290,10 +306,11 @@ struct produce applicationId) noexcept override + HRESULT __stdcall abi_RemoveAccessForApplication(impl::abi_arg_in applicationId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAccess(*reinterpret_cast(&applicationId)); return S_OK; } @@ -307,7 +324,8 @@ struct produceshim().GetAccessStatus()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetAccessStatus()); return S_OK; } catch (...) @@ -316,11 +334,12 @@ struct produce applicationId, Windows::ApplicationModel::Background::BackgroundAccessStatus * status) noexcept override + HRESULT __stdcall abi_GetAccessStatusForApplication(impl::abi_arg_in applicationId, Windows::ApplicationModel::Background::BackgroundAccessStatus * status) noexcept override { try { - *status = detach(this->shim().GetAccessStatus(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetAccessStatus(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -333,10 +352,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Run(abi_arg_in taskInstance) noexcept override + HRESULT __stdcall abi_Run(impl::abi_arg_in taskInstance) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Run(*reinterpret_cast(&taskInstance)); return S_OK; } @@ -350,10 +370,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall put_TaskEntryPoint(abi_arg_in value) noexcept override + HRESULT __stdcall put_TaskEntryPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TaskEntryPoint(*reinterpret_cast(&value)); return S_OK; } @@ -363,11 +384,12 @@ struct produce } } - HRESULT __stdcall get_TaskEntryPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_TaskEntryPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TaskEntryPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaskEntryPoint()); return S_OK; } catch (...) @@ -377,10 +399,11 @@ struct produce } } - HRESULT __stdcall abi_SetTrigger(abi_arg_in trigger) noexcept override + HRESULT __stdcall abi_SetTrigger(impl::abi_arg_in trigger) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetTrigger(*reinterpret_cast(&trigger)); return S_OK; } @@ -390,10 +413,11 @@ struct produce } } - HRESULT __stdcall abi_AddCondition(abi_arg_in condition) noexcept override + HRESULT __stdcall abi_AddCondition(impl::abi_arg_in condition) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddCondition(*reinterpret_cast(&condition)); return S_OK; } @@ -403,10 +427,11 @@ struct produce } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -416,11 +441,12 @@ struct produce } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -430,11 +456,12 @@ struct produce } } - HRESULT __stdcall abi_Register(abi_arg_out task) noexcept override + HRESULT __stdcall abi_Register(impl::abi_arg_out task) noexcept override { try { - *task = detach(this->shim().Register()); + typename D::abi_guard guard(this->shim()); + *task = detach_abi(this->shim().Register()); return S_OK; } catch (...) @@ -452,6 +479,7 @@ struct produceshim()); this->shim().CancelOnConditionLoss(value); return S_OK; } @@ -465,7 +493,8 @@ struct produceshim().CancelOnConditionLoss()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CancelOnConditionLoss()); return S_OK; } catch (...) @@ -482,6 +511,7 @@ struct produceshim()); this->shim().IsNetworkRequested(value); return S_OK; } @@ -495,7 +525,8 @@ struct produceshim().IsNetworkRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNetworkRequested()); return S_OK; } catch (...) @@ -512,7 +543,8 @@ struct produceshim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -525,6 +557,7 @@ struct produceshim()); this->shim().CheckResult(); return S_OK; } @@ -542,6 +575,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -559,7 +593,8 @@ struct produceshim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -568,11 +603,12 @@ struct produce task) noexcept override + HRESULT __stdcall get_Task(impl::abi_arg_out task) noexcept override { try { - *task = detach(this->shim().Task()); + typename D::abi_guard guard(this->shim()); + *task = detach_abi(this->shim().Task()); return S_OK; } catch (...) @@ -586,7 +622,8 @@ struct produceshim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -599,6 +636,7 @@ struct produceshim()); this->shim().Progress(value); return S_OK; } @@ -608,11 +646,12 @@ struct produce triggerDetails) noexcept override + HRESULT __stdcall get_TriggerDetails(impl::abi_arg_out triggerDetails) noexcept override { try { - *triggerDetails = detach(this->shim().TriggerDetails()); + typename D::abi_guard guard(this->shim()); + *triggerDetails = detach_abi(this->shim().TriggerDetails()); return S_OK; } catch (...) @@ -622,11 +661,12 @@ struct produce cancelHandler, event_token * cookie) noexcept override + HRESULT __stdcall add_Canceled(impl::abi_arg_in cancelHandler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Canceled(*reinterpret_cast(&cancelHandler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Canceled(*reinterpret_cast(&cancelHandler))); return S_OK; } catch (...) @@ -639,6 +679,7 @@ struct produceshim()); this->shim().Canceled(cookie); return S_OK; } @@ -652,7 +693,8 @@ struct produceshim().SuspendedCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuspendedCount()); return S_OK; } catch (...) @@ -661,11 +703,12 @@ struct produce deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -683,7 +726,8 @@ struct produceshim().GetThrottleCount(counter)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetThrottleCount(counter)); return S_OK; } catch (...) @@ -696,11 +740,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -718,7 +763,8 @@ struct produceshim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -731,7 +777,8 @@ struct produceshim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -748,7 +795,8 @@ struct produceshim().TaskId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaskId()); return S_OK; } catch (...) @@ -757,11 +805,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -771,11 +820,12 @@ struct produce handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Progress(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Progress(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Progress(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -788,6 +838,7 @@ struct produceshim()); this->shim().Progress(cookie); return S_OK; } @@ -797,11 +848,12 @@ struct produce handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Completed(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Completed(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -814,6 +866,7 @@ struct produceshim()); this->shim().Completed(cookie); return S_OK; } @@ -827,6 +880,7 @@ struct produceshim()); this->shim().Unregister(cancelTask); return S_OK; } @@ -840,11 +894,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Trigger(abi_arg_out value) noexcept override + HRESULT __stdcall get_Trigger(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Trigger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Trigger()); return S_OK; } catch (...) @@ -858,11 +913,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AllTasks(abi_arg_out> tasks) noexcept override + HRESULT __stdcall get_AllTasks(impl::abi_arg_out> tasks) noexcept override { try { - *tasks = detach(this->shim().AllTasks()); + typename D::abi_guard guard(this->shim()); + *tasks = detach_abi(this->shim().AllTasks()); return S_OK; } catch (...) @@ -884,7 +940,8 @@ struct produceshim().CurrentBackgroundWorkCost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentBackgroundWorkCost()); return S_OK; } catch (...) @@ -897,11 +954,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Advertisement(abi_arg_out value) noexcept override + HRESULT __stdcall get_Advertisement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Advertisement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisement()); return S_OK; } catch (...) @@ -915,11 +973,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MinSamplingInterval(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinSamplingInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinSamplingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinSamplingInterval()); return S_OK; } catch (...) @@ -928,11 +987,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxSamplingInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSamplingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSamplingInterval()); return S_OK; } catch (...) @@ -941,11 +1001,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinOutOfRangeTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinOutOfRangeTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinOutOfRangeTimeout()); return S_OK; } catch (...) @@ -954,11 +1015,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxOutOfRangeTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxOutOfRangeTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOutOfRangeTimeout()); return S_OK; } catch (...) @@ -967,11 +1029,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SignalStrengthFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignalStrengthFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignalStrengthFilter()); return S_OK; } catch (...) @@ -981,10 +1044,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SignalStrengthFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SignalStrengthFilter(*reinterpret_cast(&value)); return S_OK; } @@ -994,11 +1058,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AdvertisementFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvertisementFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisementFilter()); return S_OK; } catch (...) @@ -1008,10 +1073,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AdvertisementFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AdvertisementFilter(*reinterpret_cast(&value)); return S_OK; } @@ -1033,7 +1099,8 @@ struct produceshim().UpdateTarget()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTarget()); return S_OK; } catch (...) @@ -1042,11 +1109,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UpdateRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpdateRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateRequest()); return S_OK; } catch (...) @@ -1060,7 +1128,8 @@ struct produceshim().CanRequestUserInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRequestUserInput()); return S_OK; } catch (...) @@ -1089,11 +1158,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WaitInterval(abi_arg_out waitInterval) noexcept override + HRESULT __stdcall get_WaitInterval(impl::abi_arg_out waitInterval) noexcept override { try { - *waitInterval = detach(this->shim().WaitInterval()); + typename D::abi_guard guard(this->shim()); + *waitInterval = detach_abi(this->shim().WaitInterval()); return S_OK; } catch (...) @@ -1106,11 +1176,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in waitInterval, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in waitInterval, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&waitInterval))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&waitInterval))); return S_OK; } catch (...) @@ -1124,11 +1195,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1142,7 +1214,8 @@ struct produceshim().CanMaintainConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMaintainConnection()); return S_OK; } catch (...) @@ -1155,7 +1228,8 @@ struct produceshim().MaintainConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaintainConnection()); return S_OK; } catch (...) @@ -1168,6 +1242,7 @@ struct produceshim()); this->shim().MaintainConnection(value); return S_OK; } @@ -1181,11 +1256,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> deviceChangeTrigger) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> deviceChangeTrigger) noexcept override { try { - *deviceChangeTrigger = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *deviceChangeTrigger = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1199,11 +1275,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TriggerQualifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_TriggerQualifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TriggerQualifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriggerQualifier()); return S_OK; } catch (...) @@ -1217,7 +1294,8 @@ struct produceshim().OneShot()); + typename D::abi_guard guard(this->shim()); + *oneShot = detach_abi(this->shim().OneShot()); return S_OK; } catch (...) @@ -1230,11 +1308,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in triggerQualifier, bool oneShot, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in triggerQualifier, bool oneShot, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&triggerQualifier), oneShot)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&triggerQualifier), oneShot)); return S_OK; } catch (...) @@ -1248,11 +1327,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAsyncSimple(abi_arg_in deviceId, abi_arg_in expectedDuration, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncSimple(impl::abi_arg_in deviceId, impl::abi_arg_in expectedDuration, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&expectedDuration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&expectedDuration))); return S_OK; } catch (...) @@ -1262,11 +1342,12 @@ struct produce deviceId, abi_arg_in expectedDuration, abi_arg_in arguments, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncWithArguments(impl::abi_arg_in deviceId, impl::abi_arg_in expectedDuration, impl::abi_arg_in arguments, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&expectedDuration), *reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&expectedDuration), *reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -1280,11 +1361,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAsyncSimple(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncSimple(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1294,11 +1376,12 @@ struct produce : pr } } - HRESULT __stdcall abi_RequestAsyncWithArguments(abi_arg_in deviceId, abi_arg_in arguments, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncWithArguments(impl::abi_arg_in deviceId, impl::abi_arg_in arguments, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -1320,11 +1403,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Characteristic(abi_arg_out value) noexcept override + HRESULT __stdcall get_Characteristic(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Characteristic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Characteristic()); return S_OK; } catch (...) @@ -1338,11 +1422,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in characteristic, abi_arg_out gattCharacteristicNotificationTrigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in characteristic, impl::abi_arg_out gattCharacteristicNotificationTrigger) noexcept override { try { - *gattCharacteristicNotificationTrigger = detach(this->shim().Create(*reinterpret_cast(&characteristic))); + typename D::abi_guard guard(this->shim()); + *gattCharacteristicNotificationTrigger = detach_abi(this->shim().Create(*reinterpret_cast(&characteristic))); return S_OK; } catch (...) @@ -1360,7 +1445,8 @@ struct produce : pro { try { - *triggerType = detach(this->shim().TriggerType()); + typename D::abi_guard guard(this->shim()); + *triggerType = detach_abi(this->shim().TriggerType()); return S_OK; } catch (...) @@ -1373,11 +1459,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::LocationTriggerType triggerType, abi_arg_out locationTrigger) noexcept override + HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::LocationTriggerType triggerType, impl::abi_arg_out locationTrigger) noexcept override { try { - *locationTrigger = detach(this->shim().Create(triggerType)); + typename D::abi_guard guard(this->shim()); + *locationTrigger = detach_abi(this->shim().Create(triggerType)); return S_OK; } catch (...) @@ -1395,7 +1482,8 @@ struct produce : { try { - *freshnessTime = detach(this->shim().FreshnessTime()); + typename D::abi_guard guard(this->shim()); + *freshnessTime = detach_abi(this->shim().FreshnessTime()); return S_OK; } catch (...) @@ -1408,7 +1496,8 @@ struct produce : { try { - *oneShot = detach(this->shim().OneShot()); + typename D::abi_guard guard(this->shim()); + *oneShot = detach_abi(this->shim().OneShot()); return S_OK; } catch (...) @@ -1421,11 +1510,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t freshnessTime, bool oneShot, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(uint32_t freshnessTime, bool oneShot, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(freshnessTime, oneShot)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(freshnessTime, oneShot)); return S_OK; } catch (...) @@ -1439,11 +1529,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync()); return S_OK; } catch (...) @@ -1453,11 +1544,12 @@ struct produce arguments, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAsyncWithArguments(impl::abi_arg_in arguments, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAsync(*reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAsync(*reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -1475,11 +1567,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -1493,11 +1586,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in networkAccountId, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in networkAccountId, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -1515,7 +1609,8 @@ struct produce : produc { try { - *value = detach(this->shim().OneShot()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OneShot()); return S_OK; } catch (...) @@ -1528,7 +1623,8 @@ struct produce : produc { try { - *result = detach(this->shim().TriggerType()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TriggerType()); return S_OK; } catch (...) @@ -1541,11 +1637,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::ApplicationModel::Calls::Background::PhoneTriggerType type, bool oneShot, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::ApplicationModel::Calls::Background::PhoneTriggerType type, bool oneShot, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(type, oneShot)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(type, oneShot)); return S_OK; } catch (...) @@ -1559,11 +1656,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in applicationId, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in applicationId, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1581,11 +1679,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InboundConnection(abi_arg_out value) noexcept override + HRESULT __stdcall get_InboundConnection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InboundConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundConnection()); return S_OK; } catch (...) @@ -1595,11 +1694,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OutboundConnection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutboundConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundConnection()); return S_OK; } catch (...) @@ -1613,7 +1713,8 @@ struct produceshim().AllowMultipleConnections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowMultipleConnections()); return S_OK; } catch (...) @@ -1626,6 +1727,7 @@ struct produceshim()); this->shim().AllowMultipleConnections(value); return S_OK; } @@ -1639,7 +1741,8 @@ struct produceshim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -1652,6 +1755,7 @@ struct produceshim()); this->shim().ProtectionLevel(value); return S_OK; } @@ -1661,11 +1765,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemoteHostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteHostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteHostName()); return S_OK; } catch (...) @@ -1675,10 +1780,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RemoteHostName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteHostName(*reinterpret_cast(&value)); return S_OK; } @@ -1700,11 +1806,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in threshold, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in threshold, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&threshold))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&threshold))); return S_OK; } catch (...) @@ -1722,7 +1829,8 @@ struct produce : pr { try { - *triggerType = detach(this->shim().TriggerType()); + typename D::abi_guard guard(this->shim()); + *triggerType = detach_abi(this->shim().TriggerType()); return S_OK; } catch (...) @@ -1735,11 +1843,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Devices::SmartCards::SmartCardTriggerType triggerType, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(Windows::Devices::SmartCards::SmartCardTriggerType triggerType, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(triggerType)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(triggerType)); return S_OK; } catch (...) @@ -1753,11 +1862,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in filterRules, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in filterRules, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&filterRules))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&filterRules))); return S_OK; } catch (...) @@ -1775,7 +1885,8 @@ struct produce { try { - *value = detach(this->shim().IsWakeFromLowPowerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWakeFromLowPowerSupported()); return S_OK; } catch (...) @@ -1792,11 +1903,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in storageLibrary, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in storageLibrary, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&storageLibrary))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&storageLibrary))); return S_OK; } catch (...) @@ -1806,11 +1918,12 @@ struct produce> storageLibraries, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromLibraries(impl::abi_arg_in> storageLibraries, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromLibraries(*reinterpret_cast *>(&storageLibraries))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromLibraries(*reinterpret_cast *>(&storageLibraries))); return S_OK; } catch (...) @@ -1828,7 +1941,8 @@ struct produce : pro { try { - *conditionType = detach(this->shim().ConditionType()); + typename D::abi_guard guard(this->shim()); + *conditionType = detach_abi(this->shim().ConditionType()); return S_OK; } catch (...) @@ -1841,11 +1955,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::SystemConditionType conditionType, abi_arg_out condition) noexcept override + HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::SystemConditionType conditionType, impl::abi_arg_out condition) noexcept override { try { - *condition = detach(this->shim().Create(conditionType)); + typename D::abi_guard guard(this->shim()); + *condition = detach_abi(this->shim().Create(conditionType)); return S_OK; } catch (...) @@ -1863,7 +1978,8 @@ struct produce : produ { try { - *oneShot = detach(this->shim().OneShot()); + typename D::abi_guard guard(this->shim()); + *oneShot = detach_abi(this->shim().OneShot()); return S_OK; } catch (...) @@ -1876,7 +1992,8 @@ struct produce : produ { try { - *triggerType = detach(this->shim().TriggerType()); + typename D::abi_guard guard(this->shim()); + *triggerType = detach_abi(this->shim().TriggerType()); return S_OK; } catch (...) @@ -1889,11 +2006,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::SystemTriggerType triggerType, bool oneShot, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(Windows::ApplicationModel::Background::SystemTriggerType triggerType, bool oneShot, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(triggerType, oneShot)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(triggerType, oneShot)); return S_OK; } catch (...) @@ -1911,7 +2029,8 @@ struct produce : produce { try { - *freshnessTime = detach(this->shim().FreshnessTime()); + typename D::abi_guard guard(this->shim()); + *freshnessTime = detach_abi(this->shim().FreshnessTime()); return S_OK; } catch (...) @@ -1924,7 +2043,8 @@ struct produce : produce { try { - *oneShot = detach(this->shim().OneShot()); + typename D::abi_guard guard(this->shim()); + *oneShot = detach_abi(this->shim().OneShot()); return S_OK; } catch (...) @@ -1937,11 +2057,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t freshnessTime, bool oneShot, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(uint32_t freshnessTime, bool oneShot, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(freshnessTime, oneShot)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(freshnessTime, oneShot)); return S_OK; } catch (...) @@ -1955,11 +2076,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in applicationId, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in applicationId, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1973,11 +2095,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in applicationId, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in applicationId, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1991,11 +2114,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::UI::Notifications::NotificationKinds notificationKinds, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_Create(Windows::UI::Notifications::NotificationKinds notificationKinds, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().Create(notificationKinds)); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().Create(notificationKinds)); return S_OK; } catch (...) @@ -2013,85 +2137,85 @@ namespace Windows::ApplicationModel::Background { template Windows::Foundation::Collections::ValueSet impl_IApplicationTriggerDetails::Arguments() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IApplicationTriggerDetails)->get_Arguments(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBackgroundExecutionManagerStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(operation))); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_RequestAccessAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundExecutionManagerStatics::RequestAccessAsync(hstring_ref applicationId) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundExecutionManagerStatics::RequestAccessAsync(hstring_view applicationId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessForApplicationAsync(get(applicationId), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_RequestAccessForApplicationAsync(get_abi(applicationId), put_abi(operation))); return operation; } template void impl_IBackgroundExecutionManagerStatics::RemoveAccess() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAccess()); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_RemoveAccess()); } -template void impl_IBackgroundExecutionManagerStatics::RemoveAccess(hstring_ref applicationId) const +template void impl_IBackgroundExecutionManagerStatics::RemoveAccess(hstring_view applicationId) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAccessForApplication(get(applicationId))); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_RemoveAccessForApplication(get_abi(applicationId))); } template Windows::ApplicationModel::Background::BackgroundAccessStatus impl_IBackgroundExecutionManagerStatics::GetAccessStatus() const { Windows::ApplicationModel::Background::BackgroundAccessStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessStatus(&status)); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_GetAccessStatus(&status)); return status; } -template Windows::ApplicationModel::Background::BackgroundAccessStatus impl_IBackgroundExecutionManagerStatics::GetAccessStatus(hstring_ref applicationId) const +template Windows::ApplicationModel::Background::BackgroundAccessStatus impl_IBackgroundExecutionManagerStatics::GetAccessStatus(hstring_view applicationId) const { Windows::ApplicationModel::Background::BackgroundAccessStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessStatusForApplication(get(applicationId), &status)); + check_hresult(WINRT_SHIM(IBackgroundExecutionManagerStatics)->abi_GetAccessStatusForApplication(get_abi(applicationId), &status)); return status; } template GUID impl_IBackgroundTaskInstance::InstanceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->get_InstanceId(&value)); return value; } template Windows::ApplicationModel::Background::BackgroundTaskRegistration impl_IBackgroundTaskInstance::Task() const { Windows::ApplicationModel::Background::BackgroundTaskRegistration task { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Task(put(task))); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->get_Task(put_abi(task))); return task; } template uint32_t impl_IBackgroundTaskInstance::Progress() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->get_Progress(&value)); return value; } template void impl_IBackgroundTaskInstance::Progress(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Progress(value)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->put_Progress(value)); } -template Windows::IInspectable impl_IBackgroundTaskInstance::TriggerDetails() const +template Windows::Foundation::IInspectable impl_IBackgroundTaskInstance::TriggerDetails() const { - Windows::IInspectable triggerDetails; - check_hresult(static_cast(static_cast(*this))->get_TriggerDetails(put(triggerDetails))); + Windows::Foundation::IInspectable triggerDetails; + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->get_TriggerDetails(put_abi(triggerDetails))); return triggerDetails; } template event_token impl_IBackgroundTaskInstance::Canceled(const Windows::ApplicationModel::Background::BackgroundTaskCanceledEventHandler & cancelHandler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Canceled(get(cancelHandler), &cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->add_Canceled(get_abi(cancelHandler), &cookie)); return cookie; } @@ -2102,72 +2226,72 @@ template event_revoker impl_IBackgroundTas template void impl_IBackgroundTaskInstance::Canceled(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Canceled(cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->remove_Canceled(cookie)); } template uint32_t impl_IBackgroundTaskInstance::SuspendedCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SuspendedCount(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->get_SuspendedCount(&value)); return value; } template Windows::ApplicationModel::Background::BackgroundTaskDeferral impl_IBackgroundTaskInstance::GetDeferral() const { Windows::ApplicationModel::Background::BackgroundTaskDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::ApplicationModel::Background::BackgroundWorkCostValue impl_IBackgroundWorkCostStatics::CurrentBackgroundWorkCost() const { Windows::ApplicationModel::Background::BackgroundWorkCostValue value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentBackgroundWorkCost(&value)); + check_hresult(WINRT_SHIM(IBackgroundWorkCostStatics)->get_CurrentBackgroundWorkCost(&value)); return value; } template void impl_IBackgroundTaskDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IBackgroundTaskDeferral)->abi_Complete()); } template uint32_t impl_IBackgroundTaskInstance2::GetThrottleCount(Windows::ApplicationModel::Background::BackgroundTaskThrottleCounter counter) const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetThrottleCount(counter, &value)); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance2)->abi_GetThrottleCount(counter, &value)); return value; } template Windows::System::User impl_IBackgroundTaskInstance4::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskInstance4)->get_User(put_abi(value))); return value; } template void impl_IBackgroundTask::Run(const Windows::ApplicationModel::Background::IBackgroundTaskInstance & taskInstance) const { - check_hresult(static_cast(static_cast(*this))->abi_Run(get(taskInstance))); + check_hresult(WINRT_SHIM(IBackgroundTask)->abi_Run(get_abi(taskInstance))); } template GUID impl_IBackgroundTaskRegistration::TaskId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TaskId(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->get_TaskId(&value)); return value; } template hstring impl_IBackgroundTaskRegistration::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->get_Name(put_abi(value))); return value; } template event_token impl_IBackgroundTaskRegistration::Progress(const Windows::ApplicationModel::Background::BackgroundTaskProgressEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Progress(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->add_Progress(get_abi(handler), &cookie)); return cookie; } @@ -2178,13 +2302,13 @@ template event_revoker impl_IBackgroun template void impl_IBackgroundTaskRegistration::Progress(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Progress(cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->remove_Progress(cookie)); } template event_token impl_IBackgroundTaskRegistration::Completed(const Windows::ApplicationModel::Background::BackgroundTaskCompletedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->add_Completed(get_abi(handler), &cookie)); return cookie; } @@ -2195,636 +2319,636 @@ template event_revoker impl_IBackgroun template void impl_IBackgroundTaskRegistration::Completed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(cookie)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->remove_Completed(cookie)); } template void impl_IBackgroundTaskRegistration::Unregister(bool cancelTask) const { - check_hresult(static_cast(static_cast(*this))->abi_Unregister(cancelTask)); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration)->abi_Unregister(cancelTask)); } template Windows::ApplicationModel::Background::IBackgroundTrigger impl_IBackgroundTaskRegistration2::Trigger() const { Windows::ApplicationModel::Background::IBackgroundTrigger value; - check_hresult(static_cast(static_cast(*this))->get_Trigger(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistration2)->get_Trigger(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IApplicationTrigger::RequestAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsync(put(result))); + check_hresult(WINRT_SHIM(IApplicationTrigger)->abi_RequestAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IApplicationTrigger::RequestAsync(const Windows::Foundation::Collections::ValueSet & arguments) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncWithArguments(get(arguments), put(result))); + check_hresult(WINRT_SHIM(IApplicationTrigger)->abi_RequestAsyncWithArguments(get_abi(arguments), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMediaProcessingTrigger::RequestAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsync(put(result))); + check_hresult(WINRT_SHIM(IMediaProcessingTrigger)->abi_RequestAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMediaProcessingTrigger::RequestAsync(const Windows::Foundation::Collections::ValueSet & arguments) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncWithArguments(get(arguments), put(result))); + check_hresult(WINRT_SHIM(IMediaProcessingTrigger)->abi_RequestAsyncWithArguments(get_abi(arguments), put_abi(result))); return result; } template Windows::Foundation::Collections::IMapView impl_IBackgroundTaskRegistrationStatics::AllTasks() const { Windows::Foundation::Collections::IMapView tasks; - check_hresult(static_cast(static_cast(*this))->get_AllTasks(put(tasks))); + check_hresult(WINRT_SHIM(IBackgroundTaskRegistrationStatics)->get_AllTasks(put_abi(tasks))); return tasks; } -template void impl_IBackgroundTaskBuilder::TaskEntryPoint(hstring_ref value) const +template void impl_IBackgroundTaskBuilder::TaskEntryPoint(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TaskEntryPoint(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->put_TaskEntryPoint(get_abi(value))); } template hstring impl_IBackgroundTaskBuilder::TaskEntryPoint() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TaskEntryPoint(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->get_TaskEntryPoint(put_abi(value))); return value; } template void impl_IBackgroundTaskBuilder::SetTrigger(const Windows::ApplicationModel::Background::IBackgroundTrigger & trigger) const { - check_hresult(static_cast(static_cast(*this))->abi_SetTrigger(get(trigger))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->abi_SetTrigger(get_abi(trigger))); } template void impl_IBackgroundTaskBuilder::AddCondition(const Windows::ApplicationModel::Background::IBackgroundCondition & condition) const { - check_hresult(static_cast(static_cast(*this))->abi_AddCondition(get(condition))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->abi_AddCondition(get_abi(condition))); } -template void impl_IBackgroundTaskBuilder::Name(hstring_ref value) const +template void impl_IBackgroundTaskBuilder::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->put_Name(get_abi(value))); } template hstring impl_IBackgroundTaskBuilder::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->get_Name(put_abi(value))); return value; } template Windows::ApplicationModel::Background::BackgroundTaskRegistration impl_IBackgroundTaskBuilder::Register() const { Windows::ApplicationModel::Background::BackgroundTaskRegistration task { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Register(put(task))); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder)->abi_Register(put_abi(task))); return task; } template void impl_IBackgroundTaskBuilder2::CancelOnConditionLoss(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CancelOnConditionLoss(value)); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder2)->put_CancelOnConditionLoss(value)); } template bool impl_IBackgroundTaskBuilder2::CancelOnConditionLoss() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CancelOnConditionLoss(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder2)->get_CancelOnConditionLoss(&value)); return value; } template void impl_IBackgroundTaskBuilder3::IsNetworkRequested(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsNetworkRequested(value)); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder3)->put_IsNetworkRequested(value)); } template bool impl_IBackgroundTaskBuilder3::IsNetworkRequested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNetworkRequested(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskBuilder3)->get_IsNetworkRequested(&value)); return value; } template GUID impl_IBackgroundTaskCompletedEventArgs::InstanceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskCompletedEventArgs)->get_InstanceId(&value)); return value; } template void impl_IBackgroundTaskCompletedEventArgs::CheckResult() const { - check_hresult(static_cast(static_cast(*this))->abi_CheckResult()); + check_hresult(WINRT_SHIM(IBackgroundTaskCompletedEventArgs)->abi_CheckResult()); } template GUID impl_IBackgroundTaskProgressEventArgs::InstanceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskProgressEventArgs)->get_InstanceId(&value)); return value; } template uint32_t impl_IBackgroundTaskProgressEventArgs::Progress() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IBackgroundTaskProgressEventArgs)->get_Progress(&value)); return value; } template Windows::Foundation::TimeSpan impl_IContentPrefetchTrigger::WaitInterval() const { Windows::Foundation::TimeSpan waitInterval {}; - check_hresult(static_cast(static_cast(*this))->get_WaitInterval(put(waitInterval))); + check_hresult(WINRT_SHIM(IContentPrefetchTrigger)->get_WaitInterval(put_abi(waitInterval))); return waitInterval; } template Windows::ApplicationModel::Background::ContentPrefetchTrigger impl_IContentPrefetchTriggerFactory::Create(const Windows::Foundation::TimeSpan & waitInterval) const { Windows::ApplicationModel::Background::ContentPrefetchTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(waitInterval), put(trigger))); + check_hresult(WINRT_SHIM(IContentPrefetchTriggerFactory)->abi_Create(get_abi(waitInterval), put_abi(trigger))); return trigger; } template Windows::ApplicationModel::Background::SmsMessageReceivedTrigger impl_ISmsMessageReceivedTriggerFactory::Create(const Windows::Devices::Sms::SmsFilterRules & filterRules) const { Windows::ApplicationModel::Background::SmsMessageReceivedTrigger value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(filterRules), put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerFactory)->abi_Create(get_abi(filterRules), put_abi(value))); return value; } template Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger impl_IStorageLibraryContentChangedTriggerStatics::Create(const Windows::Storage::StorageLibrary & storageLibrary) const { Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(storageLibrary), put(result))); + check_hresult(WINRT_SHIM(IStorageLibraryContentChangedTriggerStatics)->abi_Create(get_abi(storageLibrary), put_abi(result))); return result; } -template Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger impl_IStorageLibraryContentChangedTriggerStatics::CreateFromLibraries(const Windows::Foundation::Collections::IIterable & storageLibraries) const +template Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger impl_IStorageLibraryContentChangedTriggerStatics::CreateFromLibraries(iterable storageLibraries) const { Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLibraries(get(storageLibraries), put(result))); + check_hresult(WINRT_SHIM(IStorageLibraryContentChangedTriggerStatics)->abi_CreateFromLibraries(get_abi(storageLibraries), put_abi(result))); return result; } template bool impl_ISystemTrigger::OneShot() const { bool oneShot {}; - check_hresult(static_cast(static_cast(*this))->get_OneShot(&oneShot)); + check_hresult(WINRT_SHIM(ISystemTrigger)->get_OneShot(&oneShot)); return oneShot; } template Windows::ApplicationModel::Background::SystemTriggerType impl_ISystemTrigger::TriggerType() const { Windows::ApplicationModel::Background::SystemTriggerType triggerType {}; - check_hresult(static_cast(static_cast(*this))->get_TriggerType(&triggerType)); + check_hresult(WINRT_SHIM(ISystemTrigger)->get_TriggerType(&triggerType)); return triggerType; } template Windows::ApplicationModel::Background::SystemTrigger impl_ISystemTriggerFactory::Create(Windows::ApplicationModel::Background::SystemTriggerType triggerType, bool oneShot) const { Windows::ApplicationModel::Background::SystemTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(triggerType, oneShot, put(trigger))); + check_hresult(WINRT_SHIM(ISystemTriggerFactory)->abi_Create(triggerType, oneShot, put_abi(trigger))); return trigger; } template Windows::ApplicationModel::Background::SystemConditionType impl_ISystemCondition::ConditionType() const { Windows::ApplicationModel::Background::SystemConditionType conditionType {}; - check_hresult(static_cast(static_cast(*this))->get_ConditionType(&conditionType)); + check_hresult(WINRT_SHIM(ISystemCondition)->get_ConditionType(&conditionType)); return conditionType; } template Windows::ApplicationModel::Background::SystemCondition impl_ISystemConditionFactory::Create(Windows::ApplicationModel::Background::SystemConditionType conditionType) const { Windows::ApplicationModel::Background::SystemCondition condition { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(conditionType, put(condition))); + check_hresult(WINRT_SHIM(ISystemConditionFactory)->abi_Create(conditionType, put_abi(condition))); return condition; } template hstring impl_INetworkOperatorNotificationTrigger::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationTrigger)->get_NetworkAccountId(put_abi(value))); return value; } -template Windows::ApplicationModel::Background::NetworkOperatorNotificationTrigger impl_INetworkOperatorNotificationTriggerFactory::Create(hstring_ref networkAccountId) const +template Windows::ApplicationModel::Background::NetworkOperatorNotificationTrigger impl_INetworkOperatorNotificationTriggerFactory::Create(hstring_view networkAccountId) const { Windows::ApplicationModel::Background::NetworkOperatorNotificationTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(networkAccountId), put(trigger))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationTriggerFactory)->abi_Create(get_abi(networkAccountId), put_abi(trigger))); return trigger; } template hstring impl_IDeviceManufacturerNotificationTrigger::TriggerQualifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TriggerQualifier(put(value))); + check_hresult(WINRT_SHIM(IDeviceManufacturerNotificationTrigger)->get_TriggerQualifier(put_abi(value))); return value; } template bool impl_IDeviceManufacturerNotificationTrigger::OneShot() const { bool oneShot {}; - check_hresult(static_cast(static_cast(*this))->get_OneShot(&oneShot)); + check_hresult(WINRT_SHIM(IDeviceManufacturerNotificationTrigger)->get_OneShot(&oneShot)); return oneShot; } -template Windows::ApplicationModel::Background::DeviceManufacturerNotificationTrigger impl_IDeviceManufacturerNotificationTriggerFactory::Create(hstring_ref triggerQualifier, bool oneShot) const +template Windows::ApplicationModel::Background::DeviceManufacturerNotificationTrigger impl_IDeviceManufacturerNotificationTriggerFactory::Create(hstring_view triggerQualifier, bool oneShot) const { Windows::ApplicationModel::Background::DeviceManufacturerNotificationTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(triggerQualifier), oneShot, put(trigger))); + check_hresult(WINRT_SHIM(IDeviceManufacturerNotificationTriggerFactory)->abi_Create(get_abi(triggerQualifier), oneShot, put_abi(trigger))); return trigger; } template Windows::Storage::Provider::CachedFileTarget impl_ICachedFileUpdaterTriggerDetails::UpdateTarget() const { Windows::Storage::Provider::CachedFileTarget value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateTarget(&value)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterTriggerDetails)->get_UpdateTarget(&value)); return value; } template Windows::Storage::Provider::FileUpdateRequest impl_ICachedFileUpdaterTriggerDetails::UpdateRequest() const { Windows::Storage::Provider::FileUpdateRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UpdateRequest(put(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterTriggerDetails)->get_UpdateRequest(put_abi(value))); return value; } template bool impl_ICachedFileUpdaterTriggerDetails::CanRequestUserInput() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanRequestUserInput(&value)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterTriggerDetails)->get_CanRequestUserInput(&value)); return value; } template uint32_t impl_ITimeTrigger::FreshnessTime() const { uint32_t freshnessTime {}; - check_hresult(static_cast(static_cast(*this))->get_FreshnessTime(&freshnessTime)); + check_hresult(WINRT_SHIM(ITimeTrigger)->get_FreshnessTime(&freshnessTime)); return freshnessTime; } template bool impl_ITimeTrigger::OneShot() const { bool oneShot {}; - check_hresult(static_cast(static_cast(*this))->get_OneShot(&oneShot)); + check_hresult(WINRT_SHIM(ITimeTrigger)->get_OneShot(&oneShot)); return oneShot; } template Windows::ApplicationModel::Background::TimeTrigger impl_ITimeTriggerFactory::Create(uint32_t freshnessTime, bool oneShot) const { Windows::ApplicationModel::Background::TimeTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(freshnessTime, oneShot, put(trigger))); + check_hresult(WINRT_SHIM(ITimeTriggerFactory)->abi_Create(freshnessTime, oneShot, put_abi(trigger))); return trigger; } template uint32_t impl_IMaintenanceTrigger::FreshnessTime() const { uint32_t freshnessTime {}; - check_hresult(static_cast(static_cast(*this))->get_FreshnessTime(&freshnessTime)); + check_hresult(WINRT_SHIM(IMaintenanceTrigger)->get_FreshnessTime(&freshnessTime)); return freshnessTime; } template bool impl_IMaintenanceTrigger::OneShot() const { bool oneShot {}; - check_hresult(static_cast(static_cast(*this))->get_OneShot(&oneShot)); + check_hresult(WINRT_SHIM(IMaintenanceTrigger)->get_OneShot(&oneShot)); return oneShot; } template Windows::ApplicationModel::Background::MaintenanceTrigger impl_IMaintenanceTriggerFactory::Create(uint32_t freshnessTime, bool oneShot) const { Windows::ApplicationModel::Background::MaintenanceTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(freshnessTime, oneShot, put(trigger))); + check_hresult(WINRT_SHIM(IMaintenanceTriggerFactory)->abi_Create(freshnessTime, oneShot, put_abi(trigger))); return trigger; } -template Windows::Foundation::IAsyncOperation impl_IDeviceUseTrigger::RequestAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IDeviceUseTrigger::RequestAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncSimple(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IDeviceUseTrigger)->abi_RequestAsyncSimple(get_abi(deviceId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IDeviceUseTrigger::RequestAsync(hstring_ref deviceId, hstring_ref arguments) const +template Windows::Foundation::IAsyncOperation impl_IDeviceUseTrigger::RequestAsync(hstring_view deviceId, hstring_view arguments) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncWithArguments(get(deviceId), get(arguments), put(result))); + check_hresult(WINRT_SHIM(IDeviceUseTrigger)->abi_RequestAsyncWithArguments(get_abi(deviceId), get_abi(arguments), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IDeviceServicingTrigger::RequestAsync(hstring_ref deviceId, const Windows::Foundation::TimeSpan & expectedDuration) const +template Windows::Foundation::IAsyncOperation impl_IDeviceServicingTrigger::RequestAsync(hstring_view deviceId, const Windows::Foundation::TimeSpan & expectedDuration) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncSimple(get(deviceId), get(expectedDuration), put(result))); + check_hresult(WINRT_SHIM(IDeviceServicingTrigger)->abi_RequestAsyncSimple(get_abi(deviceId), get_abi(expectedDuration), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IDeviceServicingTrigger::RequestAsync(hstring_ref deviceId, const Windows::Foundation::TimeSpan & expectedDuration, hstring_ref arguments) const +template Windows::Foundation::IAsyncOperation impl_IDeviceServicingTrigger::RequestAsync(hstring_view deviceId, const Windows::Foundation::TimeSpan & expectedDuration, hstring_view arguments) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAsyncWithArguments(get(deviceId), get(expectedDuration), get(arguments), put(result))); + check_hresult(WINRT_SHIM(IDeviceServicingTrigger)->abi_RequestAsyncWithArguments(get_abi(deviceId), get_abi(expectedDuration), get_abi(arguments), put_abi(result))); return result; } template Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation impl_IRfcommConnectionTrigger::InboundConnection() const { Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InboundConnection(put(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->get_InboundConnection(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation impl_IRfcommConnectionTrigger::OutboundConnection() const { Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutboundConnection(put(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->get_OutboundConnection(put_abi(value))); return value; } template bool impl_IRfcommConnectionTrigger::AllowMultipleConnections() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowMultipleConnections(&value)); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->get_AllowMultipleConnections(&value)); return value; } template void impl_IRfcommConnectionTrigger::AllowMultipleConnections(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowMultipleConnections(value)); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->put_AllowMultipleConnections(value)); } template Windows::Networking::Sockets::SocketProtectionLevel impl_IRfcommConnectionTrigger::ProtectionLevel() const { Windows::Networking::Sockets::SocketProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->get_ProtectionLevel(&value)); return value; } template void impl_IRfcommConnectionTrigger::ProtectionLevel(Windows::Networking::Sockets::SocketProtectionLevel value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectionLevel(value)); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->put_ProtectionLevel(value)); } template Windows::Networking::HostName impl_IRfcommConnectionTrigger::RemoteHostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteHostName(put(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->get_RemoteHostName(put_abi(value))); return value; } template void impl_IRfcommConnectionTrigger::RemoteHostName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteHostName(get(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTrigger)->put_RemoteHostName(get_abi(value))); } template hstring impl_IDeviceConnectionChangeTrigger::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTrigger)->get_DeviceId(put_abi(value))); return value; } template bool impl_IDeviceConnectionChangeTrigger::CanMaintainConnection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanMaintainConnection(&value)); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTrigger)->get_CanMaintainConnection(&value)); return value; } template bool impl_IDeviceConnectionChangeTrigger::MaintainConnection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MaintainConnection(&value)); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTrigger)->get_MaintainConnection(&value)); return value; } template void impl_IDeviceConnectionChangeTrigger::MaintainConnection(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MaintainConnection(value)); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTrigger)->put_MaintainConnection(value)); } -template Windows::Foundation::IAsyncOperation impl_IDeviceConnectionChangeTriggerStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IDeviceConnectionChangeTriggerStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation deviceChangeTrigger; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(deviceChangeTrigger))); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTriggerStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(deviceChangeTrigger))); return deviceChangeTrigger; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic impl_IGattCharacteristicNotificationTrigger::Characteristic() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Characteristic(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristicNotificationTrigger)->get_Characteristic(put_abi(value))); return value; } template Windows::ApplicationModel::Background::GattCharacteristicNotificationTrigger impl_IGattCharacteristicNotificationTriggerFactory::Create(const Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic & characteristic) const { Windows::ApplicationModel::Background::GattCharacteristicNotificationTrigger gattCharacteristicNotificationTrigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(characteristic), put(gattCharacteristicNotificationTrigger))); + check_hresult(WINRT_SHIM(IGattCharacteristicNotificationTriggerFactory)->abi_Create(get_abi(characteristic), put_abi(gattCharacteristicNotificationTrigger))); return gattCharacteristicNotificationTrigger; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcherTrigger::MinSamplingInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MinSamplingInterval(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_MinSamplingInterval(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcherTrigger::MaxSamplingInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSamplingInterval(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_MaxSamplingInterval(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcherTrigger::MinOutOfRangeTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MinOutOfRangeTimeout(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_MinOutOfRangeTimeout(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcherTrigger::MaxOutOfRangeTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxOutOfRangeTimeout(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_MaxOutOfRangeTimeout(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter impl_IBluetoothLEAdvertisementWatcherTrigger::SignalStrengthFilter() const { Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SignalStrengthFilter(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_SignalStrengthFilter(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementWatcherTrigger::SignalStrengthFilter(const Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter & value) const { - check_hresult(static_cast(static_cast(*this))->put_SignalStrengthFilter(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->put_SignalStrengthFilter(get_abi(value))); } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter impl_IBluetoothLEAdvertisementWatcherTrigger::AdvertisementFilter() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AdvertisementFilter(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->get_AdvertisementFilter(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementWatcherTrigger::AdvertisementFilter(const Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter & value) const { - check_hresult(static_cast(static_cast(*this))->put_AdvertisementFilter(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTrigger)->put_AdvertisementFilter(get_abi(value))); } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement impl_IBluetoothLEAdvertisementPublisherTrigger::Advertisement() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Advertisement(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherTrigger)->get_Advertisement(put_abi(value))); return value; } template Windows::ApplicationModel::Background::LocationTriggerType impl_ILocationTrigger::TriggerType() const { Windows::ApplicationModel::Background::LocationTriggerType triggerType {}; - check_hresult(static_cast(static_cast(*this))->get_TriggerType(&triggerType)); + check_hresult(WINRT_SHIM(ILocationTrigger)->get_TriggerType(&triggerType)); return triggerType; } template Windows::ApplicationModel::Background::LocationTrigger impl_ILocationTriggerFactory::Create(Windows::ApplicationModel::Background::LocationTriggerType triggerType) const { Windows::ApplicationModel::Background::LocationTrigger locationTrigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(triggerType, put(locationTrigger))); + check_hresult(WINRT_SHIM(ILocationTriggerFactory)->abi_Create(triggerType, put_abi(locationTrigger))); return locationTrigger; } template Windows::Foundation::Collections::IVector impl_IActivitySensorTrigger::SubscribedActivities() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SubscribedActivities(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorTrigger)->get_SubscribedActivities(put_abi(value))); return value; } template uint32_t impl_IActivitySensorTrigger::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IActivitySensorTrigger)->get_ReportInterval(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IActivitySensorTrigger::SupportedActivities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedActivities(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorTrigger)->get_SupportedActivities(put_abi(value))); return value; } template uint32_t impl_IActivitySensorTrigger::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IActivitySensorTrigger)->get_MinimumReportInterval(&value)); return value; } template Windows::ApplicationModel::Background::ActivitySensorTrigger impl_IActivitySensorTriggerFactory::Create(uint32_t reportIntervalInMilliseconds) const { Windows::ApplicationModel::Background::ActivitySensorTrigger activityTrigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(reportIntervalInMilliseconds, put(activityTrigger))); + check_hresult(WINRT_SHIM(IActivitySensorTriggerFactory)->abi_Create(reportIntervalInMilliseconds, put_abi(activityTrigger))); return activityTrigger; } template Windows::ApplicationModel::Background::SensorDataThresholdTrigger impl_ISensorDataThresholdTriggerFactory::Create(const Windows::Devices::Sensors::ISensorDataThreshold & threshold) const { Windows::ApplicationModel::Background::SensorDataThresholdTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(threshold), put(trigger))); + check_hresult(WINRT_SHIM(ISensorDataThresholdTriggerFactory)->abi_Create(get_abi(threshold), put_abi(trigger))); return trigger; } template bool impl_ISocketActivityTrigger::IsWakeFromLowPowerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWakeFromLowPowerSupported(&value)); + check_hresult(WINRT_SHIM(ISocketActivityTrigger)->get_IsWakeFromLowPowerSupported(&value)); return value; } -template Windows::ApplicationModel::Background::PushNotificationTrigger impl_IPushNotificationTriggerFactory::Create(hstring_ref applicationId) const +template Windows::ApplicationModel::Background::PushNotificationTrigger impl_IPushNotificationTriggerFactory::Create(hstring_view applicationId) const { Windows::ApplicationModel::Background::PushNotificationTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(applicationId), put(trigger))); + check_hresult(WINRT_SHIM(IPushNotificationTriggerFactory)->abi_Create(get_abi(applicationId), put_abi(trigger))); return trigger; } -template Windows::ApplicationModel::Background::ToastNotificationHistoryChangedTrigger impl_IToastNotificationHistoryChangedTriggerFactory::Create(hstring_ref applicationId) const +template Windows::ApplicationModel::Background::ToastNotificationHistoryChangedTrigger impl_IToastNotificationHistoryChangedTriggerFactory::Create(hstring_view applicationId) const { Windows::ApplicationModel::Background::ToastNotificationHistoryChangedTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(applicationId), put(trigger))); + check_hresult(WINRT_SHIM(IToastNotificationHistoryChangedTriggerFactory)->abi_Create(get_abi(applicationId), put_abi(trigger))); return trigger; } -template Windows::ApplicationModel::Background::ToastNotificationActionTrigger impl_IToastNotificationActionTriggerFactory::Create(hstring_ref applicationId) const +template Windows::ApplicationModel::Background::ToastNotificationActionTrigger impl_IToastNotificationActionTriggerFactory::Create(hstring_view applicationId) const { Windows::ApplicationModel::Background::ToastNotificationActionTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(applicationId), put(trigger))); + check_hresult(WINRT_SHIM(IToastNotificationActionTriggerFactory)->abi_Create(get_abi(applicationId), put_abi(trigger))); return trigger; } template Windows::ApplicationModel::Background::UserNotificationChangedTrigger impl_IUserNotificationChangedTriggerFactory::Create(Windows::UI::Notifications::NotificationKinds notificationKinds) const { Windows::ApplicationModel::Background::UserNotificationChangedTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(notificationKinds, put(trigger))); + check_hresult(WINRT_SHIM(IUserNotificationChangedTriggerFactory)->abi_Create(notificationKinds, put_abi(trigger))); return trigger; } template Windows::Foundation::IAsyncOperation impl_IAlarmApplicationManagerStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(operation))); + check_hresult(WINRT_SHIM(IAlarmApplicationManagerStatics)->abi_RequestAccessAsync(put_abi(operation))); return operation; } template Windows::ApplicationModel::Background::AlarmAccessStatus impl_IAlarmApplicationManagerStatics::GetAccessStatus() const { Windows::ApplicationModel::Background::AlarmAccessStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessStatus(&status)); + check_hresult(WINRT_SHIM(IAlarmApplicationManagerStatics)->abi_GetAccessStatus(&status)); return status; } template bool impl_IPhoneTrigger::OneShot() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_OneShot(&value)); + check_hresult(WINRT_SHIM(IPhoneTrigger)->get_OneShot(&value)); return value; } template Windows::ApplicationModel::Calls::Background::PhoneTriggerType impl_IPhoneTrigger::TriggerType() const { Windows::ApplicationModel::Calls::Background::PhoneTriggerType result {}; - check_hresult(static_cast(static_cast(*this))->get_TriggerType(&result)); + check_hresult(WINRT_SHIM(IPhoneTrigger)->get_TriggerType(&result)); return result; } template Windows::ApplicationModel::Background::PhoneTrigger impl_IPhoneTriggerFactory::Create(Windows::ApplicationModel::Calls::Background::PhoneTriggerType type, bool oneShot) const { Windows::ApplicationModel::Background::PhoneTrigger result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(type, oneShot, put(result))); + check_hresult(WINRT_SHIM(IPhoneTriggerFactory)->abi_Create(type, oneShot, put_abi(result))); return result; } template Windows::Devices::SmartCards::SmartCardTriggerType impl_ISmartCardTrigger::TriggerType() const { Windows::Devices::SmartCards::SmartCardTriggerType triggerType {}; - check_hresult(static_cast(static_cast(*this))->get_TriggerType(&triggerType)); + check_hresult(WINRT_SHIM(ISmartCardTrigger)->get_TriggerType(&triggerType)); return triggerType; } template Windows::ApplicationModel::Background::SmartCardTrigger impl_ISmartCardTriggerFactory::Create(Windows::Devices::SmartCards::SmartCardTriggerType triggerType) const { Windows::ApplicationModel::Background::SmartCardTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(triggerType, put(trigger))); + check_hresult(WINRT_SHIM(ISmartCardTriggerFactory)->abi_Create(triggerType, put_abi(trigger))); return trigger; } @@ -2855,7 +2979,7 @@ inline Windows::Foundation::IAsyncOperation().RequestAccessAsync(); } -inline Windows::Foundation::IAsyncOperation BackgroundExecutionManager::RequestAccessAsync(hstring_ref applicationId) +inline Windows::Foundation::IAsyncOperation BackgroundExecutionManager::RequestAccessAsync(hstring_view applicationId) { return get_activation_factory().RequestAccessAsync(applicationId); } @@ -2865,7 +2989,7 @@ inline void BackgroundExecutionManager::RemoveAccess() get_activation_factory().RemoveAccess(); } -inline void BackgroundExecutionManager::RemoveAccess(hstring_ref applicationId) +inline void BackgroundExecutionManager::RemoveAccess(hstring_view applicationId) { get_activation_factory().RemoveAccess(applicationId); } @@ -2875,7 +2999,7 @@ inline Windows::ApplicationModel::Background::BackgroundAccessStatus BackgroundE return get_activation_factory().GetAccessStatus(); } -inline Windows::ApplicationModel::Background::BackgroundAccessStatus BackgroundExecutionManager::GetAccessStatus(hstring_ref applicationId) +inline Windows::ApplicationModel::Background::BackgroundAccessStatus BackgroundExecutionManager::GetAccessStatus(hstring_view applicationId) { return get_activation_factory().GetAccessStatus(applicationId); } @@ -2930,12 +3054,12 @@ inline ContentPrefetchTrigger::ContentPrefetchTrigger(const Windows::Foundation: ContentPrefetchTrigger(get_activation_factory().Create(waitInterval)) {} -inline Windows::Foundation::IAsyncOperation DeviceConnectionChangeTrigger::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation DeviceConnectionChangeTrigger::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } -inline DeviceManufacturerNotificationTrigger::DeviceManufacturerNotificationTrigger(hstring_ref triggerQualifier, bool oneShot) : +inline DeviceManufacturerNotificationTrigger::DeviceManufacturerNotificationTrigger(hstring_view triggerQualifier, bool oneShot) : DeviceManufacturerNotificationTrigger(get_activation_factory().Create(triggerQualifier, oneShot)) {} @@ -2987,7 +3111,7 @@ inline NetworkOperatorHotspotAuthenticationTrigger::NetworkOperatorHotspotAuthen NetworkOperatorHotspotAuthenticationTrigger(activate_instance()) {} -inline NetworkOperatorNotificationTrigger::NetworkOperatorNotificationTrigger(hstring_ref networkAccountId) : +inline NetworkOperatorNotificationTrigger::NetworkOperatorNotificationTrigger(hstring_view networkAccountId) : NetworkOperatorNotificationTrigger(get_activation_factory().Create(networkAccountId)) {} @@ -2999,7 +3123,7 @@ inline PushNotificationTrigger::PushNotificationTrigger() : PushNotificationTrigger(activate_instance()) {} -inline PushNotificationTrigger::PushNotificationTrigger(hstring_ref applicationId) : +inline PushNotificationTrigger::PushNotificationTrigger(hstring_view applicationId) : PushNotificationTrigger(get_activation_factory().Create(applicationId)) {} @@ -3036,7 +3160,7 @@ inline Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigge return get_activation_factory().Create(storageLibrary); } -inline Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger::CreateFromLibraries(const Windows::Foundation::Collections::IIterable & storageLibraries) +inline Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger::CreateFromLibraries(iterable storageLibraries) { return get_activation_factory().CreateFromLibraries(storageLibraries); } @@ -3057,7 +3181,7 @@ inline ToastNotificationActionTrigger::ToastNotificationActionTrigger() : ToastNotificationActionTrigger(activate_instance()) {} -inline ToastNotificationActionTrigger::ToastNotificationActionTrigger(hstring_ref applicationId) : +inline ToastNotificationActionTrigger::ToastNotificationActionTrigger(hstring_view applicationId) : ToastNotificationActionTrigger(get_activation_factory().Create(applicationId)) {} @@ -3065,7 +3189,7 @@ inline ToastNotificationHistoryChangedTrigger::ToastNotificationHistoryChangedTr ToastNotificationHistoryChangedTrigger(activate_instance()) {} -inline ToastNotificationHistoryChangedTrigger::ToastNotificationHistoryChangedTrigger(hstring_ref applicationId) : +inline ToastNotificationHistoryChangedTrigger::ToastNotificationHistoryChangedTrigger(hstring_view applicationId) : ToastNotificationHistoryChangedTrigger(get_activation_factory().Create(applicationId)) {} @@ -3076,3 +3200,1121 @@ inline UserNotificationChangedTrigger::UserNotificationChangedTrigger(Windows::U } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IActivitySensorTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IActivitySensorTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IAlarmApplicationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IApplicationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IApplicationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IAppointmentStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundCondition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundExecutionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskBuilder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskBuilder2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskBuilder3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskProgressEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskRegistration2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTaskRegistrationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBackgroundWorkCostStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBluetoothLEAdvertisementPublisherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IBluetoothLEAdvertisementWatcherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ICachedFileUpdaterTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ICachedFileUpdaterTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IChatMessageNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IChatMessageReceivedNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ICommunicationBlockingAppSetAsActiveTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IContactStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IContentPrefetchTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IContentPrefetchTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceConnectionChangeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceConnectionChangeTriggerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceManufacturerNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceManufacturerNotificationTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceServicingTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceUseTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IDeviceWatcherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IEmailStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IGattCharacteristicNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IGattCharacteristicNotificationTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ILocationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ILocationTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IMaintenanceTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IMaintenanceTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IMediaProcessingTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::INetworkOperatorHotspotAuthenticationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::INetworkOperatorNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::INetworkOperatorNotificationTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IPhoneTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IPhoneTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IPushNotificationTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IRcsEndUserMessageAvailableTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IRfcommConnectionTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISecondaryAuthenticationFactorAuthenticationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISensorDataThresholdTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISensorDataThresholdTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISmartCardTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISmartCardTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISmsMessageReceivedTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISocketActivityTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IStorageLibraryContentChangedTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IStorageLibraryContentChangedTriggerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISystemCondition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISystemConditionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISystemTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ISystemTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ITimeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ITimeTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IToastNotificationActionTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IToastNotificationHistoryChangedTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::IUserNotificationChangedTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ActivitySensorTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ApplicationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ApplicationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::AppointmentStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BackgroundTaskBuilder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BackgroundTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BackgroundTaskDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BackgroundTaskProgressEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BluetoothLEAdvertisementPublisherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::BluetoothLEAdvertisementWatcherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::CachedFileUpdaterTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::CachedFileUpdaterTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ChatMessageNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ChatMessageReceivedNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::CommunicationBlockingAppSetAsActiveTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ContactStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ContentPrefetchTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::DeviceConnectionChangeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::DeviceManufacturerNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::DeviceServicingTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::DeviceUseTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::DeviceWatcherTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::EmailStoreNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::GattCharacteristicNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::LocationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MaintenanceTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MediaProcessingTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MobileBroadbandDeviceServiceNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MobileBroadbandPinLockStateChangeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MobileBroadbandRadioStateChangeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::MobileBroadbandRegistrationStateChangeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::NetworkOperatorHotspotAuthenticationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::NetworkOperatorNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::PhoneTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::PushNotificationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::RcsEndUserMessageAvailableTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::RfcommConnectionTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SecondaryAuthenticationFactorAuthenticationTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SensorDataThresholdTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SmartCardTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SmsMessageReceivedTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SocketActivityTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::StorageLibraryContentChangedTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SystemCondition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::SystemTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::TimeTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ToastNotificationActionTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::ToastNotificationHistoryChangedTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Background::UserNotificationChangedTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Background.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Background.h index c14ec1a65..ba4e86f27 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Background.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Background.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.Calls.Background.3.h" #include "Windows.ApplicationModel.Calls.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_PhoneNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -31,7 +35,8 @@ struct produceshim().LineId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineId()); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produceshim().CallBlockedReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallBlockedReason()); return S_OK; } catch (...) @@ -61,7 +67,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -70,11 +77,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -92,7 +100,8 @@ struct produceshim().LineId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LineId()); return S_OK; } catch (...) @@ -105,7 +114,8 @@ struct produceshim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -118,7 +128,8 @@ struct produceshim().HasLinePropertyChanged(lineProperty)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().HasLinePropertyChanged(lineProperty)); return S_OK; } catch (...) @@ -135,7 +146,8 @@ struct produceshim().LineId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LineId()); return S_OK; } catch (...) @@ -148,7 +160,8 @@ struct produceshim().VoicemailCount()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().VoicemailCount()); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_OperatorMessage(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OperatorMessage()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OperatorMessage()); return S_OK; } catch (...) @@ -179,80 +193,154 @@ namespace Windows::ApplicationModel::Calls::Background { template hstring impl_IPhoneCallBlockedTriggerDetails::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallBlockedTriggerDetails)->get_PhoneNumber(put_abi(value))); return value; } template GUID impl_IPhoneCallBlockedTriggerDetails::LineId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LineId(&value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockedTriggerDetails)->get_LineId(&value)); return value; } template Windows::ApplicationModel::Calls::Background::PhoneCallBlockedReason impl_IPhoneCallBlockedTriggerDetails::CallBlockedReason() const { Windows::ApplicationModel::Calls::Background::PhoneCallBlockedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_CallBlockedReason(&value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockedTriggerDetails)->get_CallBlockedReason(&value)); return value; } template GUID impl_IPhoneCallOriginDataRequestTriggerDetails::RequestId() const { GUID result {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&result)); + check_hresult(WINRT_SHIM(IPhoneCallOriginDataRequestTriggerDetails)->get_RequestId(&result)); return result; } template hstring impl_IPhoneCallOriginDataRequestTriggerDetails::PhoneNumber() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallOriginDataRequestTriggerDetails)->get_PhoneNumber(put_abi(result))); return result; } template GUID impl_IPhoneNewVoicemailMessageTriggerDetails::LineId() const { GUID result {}; - check_hresult(static_cast(static_cast(*this))->get_LineId(&result)); + check_hresult(WINRT_SHIM(IPhoneNewVoicemailMessageTriggerDetails)->get_LineId(&result)); return result; } template int32_t impl_IPhoneNewVoicemailMessageTriggerDetails::VoicemailCount() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_VoicemailCount(&result)); + check_hresult(WINRT_SHIM(IPhoneNewVoicemailMessageTriggerDetails)->get_VoicemailCount(&result)); return result; } template hstring impl_IPhoneNewVoicemailMessageTriggerDetails::OperatorMessage() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_OperatorMessage(put(result))); + check_hresult(WINRT_SHIM(IPhoneNewVoicemailMessageTriggerDetails)->get_OperatorMessage(put_abi(result))); return result; } template GUID impl_IPhoneLineChangedTriggerDetails::LineId() const { GUID result {}; - check_hresult(static_cast(static_cast(*this))->get_LineId(&result)); + check_hresult(WINRT_SHIM(IPhoneLineChangedTriggerDetails)->get_LineId(&result)); return result; } template Windows::ApplicationModel::Calls::Background::PhoneLineChangeKind impl_IPhoneLineChangedTriggerDetails::ChangeType() const { Windows::ApplicationModel::Calls::Background::PhoneLineChangeKind result {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&result)); + check_hresult(WINRT_SHIM(IPhoneLineChangedTriggerDetails)->get_ChangeType(&result)); return result; } template bool impl_IPhoneLineChangedTriggerDetails::HasLinePropertyChanged(Windows::ApplicationModel::Calls::Background::PhoneLineProperties lineProperty) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_HasLinePropertyChanged(lineProperty, &result)); + check_hresult(WINRT_SHIM(IPhoneLineChangedTriggerDetails)->abi_HasLinePropertyChanged(lineProperty, &result)); return result; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::IPhoneCallBlockedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::IPhoneCallOriginDataRequestTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::IPhoneLineChangedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::IPhoneNewVoicemailMessageTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::PhoneCallBlockedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::PhoneCallOriginDataRequestTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::PhoneLineChangedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Background::PhoneNewVoicemailMessageTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Provider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Provider.h index 8761d6a6c..7d524c612 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Provider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Calls.Provider.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Category(abi_arg_out value) noexcept override + HRESULT __stdcall get_Category(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -29,10 +33,11 @@ struct produce } } - HRESULT __stdcall put_Category(abi_arg_in value) noexcept override + HRESULT __stdcall put_Category(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Category(*reinterpret_cast(&value)); return S_OK; } @@ -42,11 +47,12 @@ struct produce } } - HRESULT __stdcall get_CategoryDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_CategoryDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CategoryDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CategoryDescription()); return S_OK; } catch (...) @@ -56,10 +62,11 @@ struct produce } } - HRESULT __stdcall put_CategoryDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_CategoryDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CategoryDescription(*reinterpret_cast(&value)); return S_OK; } @@ -69,11 +76,12 @@ struct produce } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -83,10 +91,11 @@ struct produce } } - HRESULT __stdcall put_Location(abi_arg_in value) noexcept override + HRESULT __stdcall put_Location(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return S_OK; } @@ -100,11 +109,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -114,10 +124,11 @@ struct produce } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -131,11 +142,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayPicture(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayPicture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayPicture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayPicture()); return S_OK; } catch (...) @@ -145,10 +157,11 @@ struct produce } } - HRESULT __stdcall put_DisplayPicture(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayPicture(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayPicture(*reinterpret_cast(&value)); return S_OK; } @@ -166,7 +179,8 @@ struct produceshim().IsCurrentAppActiveCallOriginApp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCurrentAppActiveCallOriginApp()); return S_OK; } catch (...) @@ -179,6 +193,7 @@ struct produceshim()); this->shim().ShowPhoneCallOriginSettingsUI(); return S_OK; } @@ -188,10 +203,11 @@ struct produce callOrigin) noexcept override + HRESULT __stdcall abi_SetCallOrigin(GUID requestId, impl::abi_arg_in callOrigin) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetCallOrigin(requestId, *reinterpret_cast(&callOrigin)); return S_OK; } @@ -205,11 +221,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestSetAsActiveCallOriginAppAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestSetAsActiveCallOriginAppAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestSetAsActiveCallOriginAppAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestSetAsActiveCallOriginAppAsync()); return S_OK; } catch (...) @@ -227,84 +244,84 @@ namespace Windows::ApplicationModel::Calls::Provider { template hstring impl_IPhoneCallOrigin::Category() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Category(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->get_Category(put_abi(value))); return value; } -template void impl_IPhoneCallOrigin::Category(hstring_ref value) const +template void impl_IPhoneCallOrigin::Category(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Category(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->put_Category(get_abi(value))); } template hstring impl_IPhoneCallOrigin::CategoryDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CategoryDescription(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->get_CategoryDescription(put_abi(value))); return value; } -template void impl_IPhoneCallOrigin::CategoryDescription(hstring_ref value) const +template void impl_IPhoneCallOrigin::CategoryDescription(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CategoryDescription(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->put_CategoryDescription(get_abi(value))); } template hstring impl_IPhoneCallOrigin::Location() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->get_Location(put_abi(value))); return value; } -template void impl_IPhoneCallOrigin::Location(hstring_ref value) const +template void impl_IPhoneCallOrigin::Location(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Location(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin)->put_Location(get_abi(value))); } template hstring impl_IPhoneCallOrigin2::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin2)->get_DisplayName(put_abi(value))); return value; } -template void impl_IPhoneCallOrigin2::DisplayName(hstring_ref value) const +template void impl_IPhoneCallOrigin2::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin2)->put_DisplayName(get_abi(value))); } template Windows::Storage::StorageFile impl_IPhoneCallOrigin3::DisplayPicture() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayPicture(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin3)->get_DisplayPicture(put_abi(value))); return value; } template void impl_IPhoneCallOrigin3::DisplayPicture(const Windows::Storage::StorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayPicture(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallOrigin3)->put_DisplayPicture(get_abi(value))); } template bool impl_IPhoneCallOriginManagerStatics::IsCurrentAppActiveCallOriginApp() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCurrentAppActiveCallOriginApp(&value)); + check_hresult(WINRT_SHIM(IPhoneCallOriginManagerStatics)->get_IsCurrentAppActiveCallOriginApp(&value)); return value; } template void impl_IPhoneCallOriginManagerStatics::ShowPhoneCallOriginSettingsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowPhoneCallOriginSettingsUI()); + check_hresult(WINRT_SHIM(IPhoneCallOriginManagerStatics)->abi_ShowPhoneCallOriginSettingsUI()); } template void impl_IPhoneCallOriginManagerStatics::SetCallOrigin(GUID requestId, const Windows::ApplicationModel::Calls::Provider::PhoneCallOrigin & callOrigin) const { - check_hresult(static_cast(static_cast(*this))->abi_SetCallOrigin(requestId, get(callOrigin))); + check_hresult(WINRT_SHIM(IPhoneCallOriginManagerStatics)->abi_SetCallOrigin(requestId, get_abi(callOrigin))); } template Windows::Foundation::IAsyncOperation impl_IPhoneCallOriginManagerStatics2::RequestSetAsActiveCallOriginAppAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestSetAsActiveCallOriginAppAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallOriginManagerStatics2)->abi_RequestSetAsActiveCallOriginAppAsync(put_abi(result))); return result; } @@ -335,3 +352,59 @@ inline Windows::Foundation::IAsyncOperation PhoneCallOriginManager::Reques } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::IPhoneCallOrigin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::IPhoneCallOrigin2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::IPhoneCallOrigin3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::IPhoneCallOriginManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::IPhoneCallOriginManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::Provider::PhoneCallOrigin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.h index c9f85d4ff..c5428d2f8 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Calls.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.System.3.h" @@ -22,7 +25,8 @@ struct produce : prod { try { - *value = detach(this->shim().AcceptedMedia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptedMedia()); return S_OK; } catch (...) @@ -39,7 +43,8 @@ struct produce : prod { try { - *value = detach(this->shim().RejectReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RejectReason()); return S_OK; } catch (...) @@ -56,7 +61,8 @@ struct produce : { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -73,6 +79,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -86,11 +93,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -100,11 +108,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -121,6 +130,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Dismiss(); return S_OK; } @@ -130,11 +140,12 @@ struct produce : produce } } - HRESULT __stdcall add_EndRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EndRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EndRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EndRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -147,6 +158,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().EndRequested(token); return S_OK; } @@ -156,11 +168,12 @@ struct produce : produce } } - HRESULT __stdcall add_Closed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -173,6 +186,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Closed(token); return S_OK; } @@ -182,11 +196,12 @@ struct produce : produce } } - HRESULT __stdcall get_CallTitle(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallTitle()); return S_OK; } catch (...) @@ -196,10 +211,11 @@ struct produce : produce } } - HRESULT __stdcall put_CallTitle(abi_arg_in value) noexcept override + HRESULT __stdcall put_CallTitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CallTitle(*reinterpret_cast(&value)); return S_OK; } @@ -217,7 +233,8 @@ struct produce : prod { try { - *value = detach(this->shim().Muted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Muted()); return S_OK; } catch (...) @@ -234,7 +251,8 @@ struct produce : { try { - *value = detach(this->shim().BlockUnknownNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlockUnknownNumbers()); return S_OK; } catch (...) @@ -247,6 +265,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().BlockUnknownNumbers(value); return S_OK; } @@ -260,7 +279,8 @@ struct produce : { try { - *value = detach(this->shim().BlockPrivateNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlockPrivateNumbers()); return S_OK; } catch (...) @@ -273,6 +293,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().BlockPrivateNumbers(value); return S_OK; } @@ -282,11 +303,12 @@ struct produce : } } - HRESULT __stdcall abi_SetCallBlockingListAsync(abi_arg_in> phoneNumberList, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SetCallBlockingListAsync(impl::abi_arg_in> phoneNumberList, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SetCallBlockingListAsync(*reinterpret_cast *>(&phoneNumberList))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetCallBlockingListAsync(*reinterpret_cast *>(&phoneNumberList))); return S_OK; } catch (...) @@ -300,11 +322,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -314,11 +337,12 @@ struct produce : pr } } - HRESULT __stdcall get_Address(abi_arg_out value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -328,10 +352,11 @@ struct produce : pr } } - HRESULT __stdcall put_Address(abi_arg_in value) noexcept override + HRESULT __stdcall put_Address(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Address(*reinterpret_cast(&value)); return S_OK; } @@ -341,11 +366,12 @@ struct produce : pr } } - HRESULT __stdcall get_Duration(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -355,10 +381,11 @@ struct produce : pr } } - HRESULT __stdcall put_Duration(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast *>(&value)); return S_OK; } @@ -372,7 +399,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsCallerIdBlocked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCallerIdBlocked()); return S_OK; } catch (...) @@ -385,6 +413,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCallerIdBlocked(value); return S_OK; } @@ -398,7 +427,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsEmergency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEmergency()); return S_OK; } catch (...) @@ -411,6 +441,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsEmergency(value); return S_OK; } @@ -424,7 +455,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsIncoming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIncoming()); return S_OK; } catch (...) @@ -437,6 +469,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsIncoming(value); return S_OK; } @@ -450,7 +483,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsMissed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMissed()); return S_OK; } catch (...) @@ -463,6 +497,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsMissed(value); return S_OK; } @@ -476,7 +511,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsRinging()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRinging()); return S_OK; } catch (...) @@ -489,6 +525,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRinging(value); return S_OK; } @@ -502,7 +539,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsSeen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeen()); return S_OK; } catch (...) @@ -515,6 +553,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSeen(value); return S_OK; } @@ -528,7 +567,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsSuppressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuppressed()); return S_OK; } catch (...) @@ -541,6 +581,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSuppressed(value); return S_OK; } @@ -554,7 +595,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsVoicemail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVoicemail()); return S_OK; } catch (...) @@ -567,6 +609,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsVoicemail(value); return S_OK; } @@ -580,7 +623,8 @@ struct produce : pr { try { - *value = detach(this->shim().Media()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Media()); return S_OK; } catch (...) @@ -593,6 +637,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Media(value); return S_OK; } @@ -606,7 +651,8 @@ struct produce : pr { try { - *value = detach(this->shim().OtherAppReadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppReadAccess()); return S_OK; } catch (...) @@ -619,6 +665,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppReadAccess(value); return S_OK; } @@ -628,11 +675,12 @@ struct produce : pr } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -642,10 +690,11 @@ struct produce : pr } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -655,11 +704,12 @@ struct produce : pr } } - HRESULT __stdcall get_SourceDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDisplayName()); return S_OK; } catch (...) @@ -669,11 +719,12 @@ struct produce : pr } } - HRESULT __stdcall get_SourceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceId()); return S_OK; } catch (...) @@ -683,10 +734,11 @@ struct produce : pr } } - HRESULT __stdcall put_SourceId(abi_arg_in value) noexcept override + HRESULT __stdcall put_SourceId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceId(*reinterpret_cast(&value)); return S_OK; } @@ -700,7 +752,8 @@ struct produce : pr { try { - *value = detach(this->shim().SourceIdKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceIdKind()); return S_OK; } catch (...) @@ -713,6 +766,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceIdKind(value); return S_OK; } @@ -722,11 +776,12 @@ struct produce : pr } } - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -735,10 +790,11 @@ struct produce : pr } } - HRESULT __stdcall put_StartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -752,11 +808,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ContactId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactId()); return S_OK; } catch (...) @@ -766,10 +823,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContactId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactId(*reinterpret_cast(&value)); return S_OK; } @@ -779,11 +837,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -793,10 +852,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -806,11 +866,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RawAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawAddress()); return S_OK; } catch (...) @@ -820,10 +881,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RawAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RawAddress(*reinterpret_cast(&value)); return S_OK; } @@ -837,7 +899,8 @@ struct produceshim().RawAddressKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawAddressKind()); return S_OK; } catch (...) @@ -850,6 +913,7 @@ struct produceshim()); this->shim().RawAddressKind(value); return S_OK; } @@ -863,11 +927,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&rawAddress), rawAddressKind)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&rawAddress), rawAddressKind)); return S_OK; } catch (...) @@ -885,7 +950,8 @@ struct produceshim().DesiredMedia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredMedia()); return S_OK; } catch (...) @@ -898,6 +964,7 @@ struct produceshim()); this->shim().DesiredMedia(value); return S_OK; } @@ -907,11 +974,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SourceIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SourceIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceIds()); return S_OK; } catch (...) @@ -925,11 +993,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -943,11 +1012,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -957,11 +1027,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -975,11 +1046,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -993,11 +1065,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -1011,11 +1084,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetEntryAsync(abi_arg_in callHistoryEntryId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetEntryAsync(impl::abi_arg_in callHistoryEntryId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetEntryAsync(*reinterpret_cast(&callHistoryEntryId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetEntryAsync(*reinterpret_cast(&callHistoryEntryId))); return S_OK; } catch (...) @@ -1025,11 +1099,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetEntryReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetEntryReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetEntryReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetEntryReader()); return S_OK; } catch (...) @@ -1039,11 +1114,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetEntryReaderWithOptions(abi_arg_in queryOptions, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetEntryReaderWithOptions(impl::abi_arg_in queryOptions, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetEntryReader(*reinterpret_cast(&queryOptions))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetEntryReader(*reinterpret_cast(&queryOptions))); return S_OK; } catch (...) @@ -1053,11 +1129,12 @@ struct produce : pr } } - HRESULT __stdcall abi_SaveEntryAsync(abi_arg_in callHistoryEntry, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveEntryAsync(impl::abi_arg_in callHistoryEntry, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveEntryAsync(*reinterpret_cast(&callHistoryEntry))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveEntryAsync(*reinterpret_cast(&callHistoryEntry))); return S_OK; } catch (...) @@ -1067,11 +1144,12 @@ struct produce : pr } } - HRESULT __stdcall abi_DeleteEntryAsync(abi_arg_in callHistoryEntry, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteEntryAsync(impl::abi_arg_in callHistoryEntry, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteEntryAsync(*reinterpret_cast(&callHistoryEntry))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteEntryAsync(*reinterpret_cast(&callHistoryEntry))); return S_OK; } catch (...) @@ -1081,11 +1159,12 @@ struct produce : pr } } - HRESULT __stdcall abi_DeleteEntriesAsync(abi_arg_in> callHistoryEntries, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteEntriesAsync(impl::abi_arg_in> callHistoryEntries, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteEntriesAsync(*reinterpret_cast *>(&callHistoryEntries))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteEntriesAsync(*reinterpret_cast *>(&callHistoryEntries))); return S_OK; } catch (...) @@ -1095,11 +1174,12 @@ struct produce : pr } } - HRESULT __stdcall abi_MarkEntryAsSeenAsync(abi_arg_in callHistoryEntry, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkEntryAsSeenAsync(impl::abi_arg_in callHistoryEntry, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkEntryAsSeenAsync(*reinterpret_cast(&callHistoryEntry))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkEntryAsSeenAsync(*reinterpret_cast(&callHistoryEntry))); return S_OK; } catch (...) @@ -1109,11 +1189,12 @@ struct produce : pr } } - HRESULT __stdcall abi_MarkEntriesAsSeenAsync(abi_arg_in> callHistoryEntries, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkEntriesAsSeenAsync(impl::abi_arg_in> callHistoryEntries, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkEntriesAsSeenAsync(*reinterpret_cast *>(&callHistoryEntries))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkEntriesAsSeenAsync(*reinterpret_cast *>(&callHistoryEntries))); return S_OK; } catch (...) @@ -1123,11 +1204,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetUnseenCountAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetUnseenCountAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetUnseenCountAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetUnseenCountAsync()); return S_OK; } catch (...) @@ -1137,11 +1219,12 @@ struct produce : pr } } - HRESULT __stdcall abi_MarkAllAsSeenAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkAllAsSeenAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkAllAsSeenAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkAllAsSeenAsync()); return S_OK; } catch (...) @@ -1151,11 +1234,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetSourcesUnseenCountAsync(abi_arg_in> sourceIds, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetSourcesUnseenCountAsync(impl::abi_arg_in> sourceIds, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetSourcesUnseenCountAsync(*reinterpret_cast *>(&sourceIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSourcesUnseenCountAsync(*reinterpret_cast *>(&sourceIds))); return S_OK; } catch (...) @@ -1165,11 +1249,12 @@ struct produce : pr } } - HRESULT __stdcall abi_MarkSourcesAsSeenAsync(abi_arg_in> sourceIds, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkSourcesAsSeenAsync(impl::abi_arg_in> sourceIds, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkSourcesAsSeenAsync(*reinterpret_cast *>(&sourceIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkSourcesAsSeenAsync(*reinterpret_cast *>(&sourceIds))); return S_OK; } catch (...) @@ -1183,10 +1268,11 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_ShowPhoneCallUI(abi_arg_in phoneNumber, abi_arg_in displayName) noexcept override + HRESULT __stdcall abi_ShowPhoneCallUI(impl::abi_arg_in phoneNumber, impl::abi_arg_in displayName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowPhoneCallUI(*reinterpret_cast(&phoneNumber), *reinterpret_cast(&displayName)); return S_OK; } @@ -1200,11 +1286,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall add_CallStateChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CallStateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CallStateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CallStateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1217,6 +1304,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().CallStateChanged(token); return S_OK; } @@ -1230,7 +1318,8 @@ struct produce : { try { - *value = detach(this->shim().IsCallActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCallActive()); return S_OK; } catch (...) @@ -1243,7 +1332,8 @@ struct produce : { try { - *value = detach(this->shim().IsCallIncoming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCallIncoming()); return S_OK; } catch (...) @@ -1256,6 +1346,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowPhoneCallSettingsUI(); return S_OK; } @@ -1265,11 +1356,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -1283,11 +1375,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_IsEmergencyPhoneNumberAsync(abi_arg_in number, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_IsEmergencyPhoneNumberAsync(impl::abi_arg_in number, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().IsEmergencyPhoneNumberAsync(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsEmergencyPhoneNumberAsync(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -1297,11 +1390,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDefaultLineAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultLineAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultLineAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultLineAsync()); return S_OK; } catch (...) @@ -1311,11 +1405,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RequestLineWatcher(abi_arg_out result) noexcept override + HRESULT __stdcall abi_RequestLineWatcher(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().RequestLineWatcher()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestLineWatcher()); return S_OK; } catch (...) @@ -1333,7 +1428,8 @@ struct produce { try { - *pValue = detach(this->shim().IsVideoCallingCapable()); + typename D::abi_guard guard(this->shim()); + *pValue = detach_abi(this->shim().IsVideoCallingCapable()); return S_OK; } catch (...) @@ -1346,11 +1442,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetCapabilitiesAsync(abi_arg_in phoneNumber, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetCapabilitiesAsync(impl::abi_arg_in phoneNumber, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetCapabilitiesAsync(*reinterpret_cast(&phoneNumber))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCapabilitiesAsync(*reinterpret_cast(&phoneNumber))); return S_OK; } catch (...) @@ -1364,11 +1461,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Number(abi_arg_out value) noexcept override + HRESULT __stdcall get_Number(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Number()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Number()); return S_OK; } catch (...) @@ -1378,10 +1476,11 @@ struct produce : produce } } - HRESULT __stdcall put_Number(abi_arg_in value) noexcept override + HRESULT __stdcall put_Number(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Number(*reinterpret_cast(&value)); return S_OK; } @@ -1391,11 +1490,12 @@ struct produce : produce } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1405,10 +1505,11 @@ struct produce : produce } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -1418,11 +1519,12 @@ struct produce : produce } } - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -1432,10 +1534,11 @@ struct produce : produce } } - HRESULT __stdcall put_Contact(abi_arg_in value) noexcept override + HRESULT __stdcall put_Contact(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Contact(*reinterpret_cast(&value)); return S_OK; } @@ -1445,11 +1548,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContactPhone(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactPhone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactPhone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactPhone()); return S_OK; } catch (...) @@ -1459,10 +1563,11 @@ struct produce : produce } } - HRESULT __stdcall put_ContactPhone(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContactPhone(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactPhone(*reinterpret_cast(&value)); return S_OK; } @@ -1476,7 +1581,8 @@ struct produce : produce { try { - *value = detach(this->shim().Media()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Media()); return S_OK; } catch (...) @@ -1489,6 +1595,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Media(value); return S_OK; } @@ -1502,7 +1609,8 @@ struct produce : produce { try { - *value = detach(this->shim().AudioEndpoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEndpoint()); return S_OK; } catch (...) @@ -1515,6 +1623,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioEndpoint(value); return S_OK; } @@ -1528,11 +1637,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall add_LineChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LineChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LineChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LineChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1545,6 +1655,7 @@ struct produce : produce_baseshim()); this->shim().LineChanged(token); return S_OK; } @@ -1558,7 +1669,8 @@ struct produce : produce_baseshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1567,11 +1679,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayColor()); return S_OK; } catch (...) @@ -1584,7 +1697,8 @@ struct produce : produce_baseshim().NetworkState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkState()); return S_OK; } catch (...) @@ -1593,11 +1707,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1607,11 +1722,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Voicemail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Voicemail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Voicemail()); return S_OK; } catch (...) @@ -1621,11 +1737,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NetworkName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkName()); return S_OK; } catch (...) @@ -1635,11 +1752,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CellularDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CellularDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularDetails()); return S_OK; } catch (...) @@ -1653,7 +1771,8 @@ struct produce : produce_baseshim().Transport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Transport()); return S_OK; } catch (...) @@ -1666,7 +1785,8 @@ struct produce : produce_baseshim().CanDial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanDial()); return S_OK; } catch (...) @@ -1679,7 +1799,8 @@ struct produce : produce_baseshim().SupportsTile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsTile()); return S_OK; } catch (...) @@ -1688,11 +1809,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoCallingCapabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoCallingCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoCallingCapabilities()); return S_OK; } catch (...) @@ -1702,11 +1824,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LineConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineConfiguration()); return S_OK; } catch (...) @@ -1716,11 +1839,12 @@ struct produce : produce_base number, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_IsImmediateDialNumberAsync(impl::abi_arg_in number, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().IsImmediateDialNumberAsync(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsImmediateDialNumberAsync(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -1730,10 +1854,11 @@ struct produce : produce_base number, abi_arg_in displayName) noexcept override + HRESULT __stdcall abi_Dial(impl::abi_arg_in number, impl::abi_arg_in displayName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Dial(*reinterpret_cast(&number), *reinterpret_cast(&displayName)); return S_OK; } @@ -1743,10 +1868,11 @@ struct produce : produce_base options) noexcept override + HRESULT __stdcall abi_DialWithOptions(impl::abi_arg_in options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DialWithOptions(*reinterpret_cast(&options)); return S_OK; } @@ -1764,7 +1890,8 @@ struct produce : { try { - *value = detach(this->shim().SimState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SimState()); return S_OK; } catch (...) @@ -1777,7 +1904,8 @@ struct produce : { try { - *value = detach(this->shim().SimSlotIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SimSlotIndex()); return S_OK; } catch (...) @@ -1790,7 +1918,8 @@ struct produce : { try { - *value = detach(this->shim().IsModemOn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsModemOn()); return S_OK; } catch (...) @@ -1803,7 +1932,8 @@ struct produce : { try { - *value = detach(this->shim().RegistrationRejectCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegistrationRejectCode()); return S_OK; } catch (...) @@ -1812,11 +1942,12 @@ struct produce : } } - HRESULT __stdcall abi_GetNetworkOperatorDisplayText(Windows::ApplicationModel::Calls::PhoneLineNetworkOperatorDisplayTextLocation location, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNetworkOperatorDisplayText(Windows::ApplicationModel::Calls::PhoneLineNetworkOperatorDisplayTextLocation location, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNetworkOperatorDisplayText(location)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkOperatorDisplayText(location)); return S_OK; } catch (...) @@ -1834,7 +1965,8 @@ struct produce : p { try { - *value = detach(this->shim().IsVideoCallingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVideoCallingEnabled()); return S_OK; } catch (...) @@ -1843,11 +1975,12 @@ struct produce : p } } - HRESULT __stdcall get_ExtendedProperties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -1861,11 +1994,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(GUID lineId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(GUID lineId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(lineId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(lineId)); return S_OK; } catch (...) @@ -1883,6 +2017,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -1896,6 +2031,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -1905,11 +2041,12 @@ struct produce : produce } } - HRESULT __stdcall add_LineAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LineAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LineAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LineAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1922,6 +2059,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LineAdded(token); return S_OK; } @@ -1931,11 +2069,12 @@ struct produce : produce } } - HRESULT __stdcall add_LineRemoved(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LineRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LineRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LineRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1948,6 +2087,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LineRemoved(token); return S_OK; } @@ -1957,11 +2097,12 @@ struct produce : produce } } - HRESULT __stdcall add_LineUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LineUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LineUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LineUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1974,6 +2115,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LineUpdated(token); return S_OK; } @@ -1983,11 +2125,12 @@ struct produce : produce } } - HRESULT __stdcall add_EnumerationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2000,6 +2143,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -2009,11 +2153,12 @@ struct produce : produce } } - HRESULT __stdcall add_Stopped(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2026,6 +2171,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Stopped(token); return S_OK; } @@ -2039,7 +2185,8 @@ struct produce : produce { try { - *status = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2056,7 +2203,8 @@ struct produce { try { - *value = detach(this->shim().LineId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineId()); return S_OK; } catch (...) @@ -2069,11 +2217,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Number(abi_arg_out value) noexcept override + HRESULT __stdcall get_Number(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Number()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Number()); return S_OK; } catch (...) @@ -2087,7 +2236,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MessageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageCount()); return S_OK; } catch (...) @@ -2100,7 +2250,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -2109,11 +2260,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_DialVoicemailAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DialVoicemailAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DialVoicemailAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DialVoicemailAsync()); return S_OK; } catch (...) @@ -2127,11 +2279,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_ReserveCallResourcesAsync(abi_arg_in taskEntryPoint, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReserveCallResourcesAsync(impl::abi_arg_in taskEntryPoint, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReserveCallResourcesAsync(*reinterpret_cast(&taskEntryPoint))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReserveCallResourcesAsync(*reinterpret_cast(&taskEntryPoint))); return S_OK; } catch (...) @@ -2141,11 +2294,12 @@ struct produce : prod } } - HRESULT __stdcall add_MuteStateChanged(abi_arg_in> muteChangeHandler, event_token * token) noexcept override + HRESULT __stdcall add_MuteStateChanged(impl::abi_arg_in> muteChangeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().MuteStateChanged(*reinterpret_cast *>(&muteChangeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MuteStateChanged(*reinterpret_cast *>(&muteChangeHandler))); return S_OK; } catch (...) @@ -2158,6 +2312,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().MuteStateChanged(token); return S_OK; } @@ -2167,11 +2322,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestNewIncomingCall(abi_arg_in context, abi_arg_in contactName, abi_arg_in contactNumber, abi_arg_in contactImage, abi_arg_in serviceName, abi_arg_in brandingImage, abi_arg_in callDetails, abi_arg_in ringtone, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, abi_arg_in ringTimeout, abi_arg_out call) noexcept override + HRESULT __stdcall abi_RequestNewIncomingCall(impl::abi_arg_in context, impl::abi_arg_in contactName, impl::abi_arg_in contactNumber, impl::abi_arg_in contactImage, impl::abi_arg_in serviceName, impl::abi_arg_in brandingImage, impl::abi_arg_in callDetails, impl::abi_arg_in ringtone, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, impl::abi_arg_in ringTimeout, impl::abi_arg_out call) noexcept override { try { - *call = detach(this->shim().RequestNewIncomingCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&contactNumber), *reinterpret_cast(&contactImage), *reinterpret_cast(&serviceName), *reinterpret_cast(&brandingImage), *reinterpret_cast(&callDetails), *reinterpret_cast(&ringtone), media, *reinterpret_cast(&ringTimeout))); + typename D::abi_guard guard(this->shim()); + *call = detach_abi(this->shim().RequestNewIncomingCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&contactNumber), *reinterpret_cast(&contactImage), *reinterpret_cast(&serviceName), *reinterpret_cast(&brandingImage), *reinterpret_cast(&callDetails), *reinterpret_cast(&ringtone), media, *reinterpret_cast(&ringTimeout))); return S_OK; } catch (...) @@ -2181,11 +2337,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestNewOutgoingCall(abi_arg_in context, abi_arg_in contactName, abi_arg_in serviceName, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, abi_arg_out call) noexcept override + HRESULT __stdcall abi_RequestNewOutgoingCall(impl::abi_arg_in context, impl::abi_arg_in contactName, impl::abi_arg_in serviceName, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, impl::abi_arg_out call) noexcept override { try { - *call = detach(this->shim().RequestNewOutgoingCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&serviceName), media)); + typename D::abi_guard guard(this->shim()); + *call = detach_abi(this->shim().RequestNewOutgoingCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&serviceName), media)); return S_OK; } catch (...) @@ -2199,6 +2356,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyMuted(); return S_OK; } @@ -2212,6 +2370,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyUnmuted(); return S_OK; } @@ -2221,11 +2380,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestOutgoingUpgradeToVideoCall(GUID callUpgradeGuid, abi_arg_in context, abi_arg_in contactName, abi_arg_in serviceName, abi_arg_out call) noexcept override + HRESULT __stdcall abi_RequestOutgoingUpgradeToVideoCall(GUID callUpgradeGuid, impl::abi_arg_in context, impl::abi_arg_in contactName, impl::abi_arg_in serviceName, impl::abi_arg_out call) noexcept override { try { - *call = detach(this->shim().RequestOutgoingUpgradeToVideoCall(callUpgradeGuid, *reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&serviceName))); + typename D::abi_guard guard(this->shim()); + *call = detach_abi(this->shim().RequestOutgoingUpgradeToVideoCall(callUpgradeGuid, *reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&serviceName))); return S_OK; } catch (...) @@ -2235,11 +2395,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestIncomingUpgradeToVideoCall(abi_arg_in context, abi_arg_in contactName, abi_arg_in contactNumber, abi_arg_in contactImage, abi_arg_in serviceName, abi_arg_in brandingImage, abi_arg_in callDetails, abi_arg_in ringtone, abi_arg_in ringTimeout, abi_arg_out call) noexcept override + HRESULT __stdcall abi_RequestIncomingUpgradeToVideoCall(impl::abi_arg_in context, impl::abi_arg_in contactName, impl::abi_arg_in contactNumber, impl::abi_arg_in contactImage, impl::abi_arg_in serviceName, impl::abi_arg_in brandingImage, impl::abi_arg_in callDetails, impl::abi_arg_in ringtone, impl::abi_arg_in ringTimeout, impl::abi_arg_out call) noexcept override { try { - *call = detach(this->shim().RequestIncomingUpgradeToVideoCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&contactNumber), *reinterpret_cast(&contactImage), *reinterpret_cast(&serviceName), *reinterpret_cast(&brandingImage), *reinterpret_cast(&callDetails), *reinterpret_cast(&ringtone), *reinterpret_cast(&ringTimeout))); + typename D::abi_guard guard(this->shim()); + *call = detach_abi(this->shim().RequestIncomingUpgradeToVideoCall(*reinterpret_cast(&context), *reinterpret_cast(&contactName), *reinterpret_cast(&contactNumber), *reinterpret_cast(&contactImage), *reinterpret_cast(&serviceName), *reinterpret_cast(&brandingImage), *reinterpret_cast(&callDetails), *reinterpret_cast(&ringtone), *reinterpret_cast(&ringTimeout))); return S_OK; } catch (...) @@ -2253,6 +2414,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().TerminateCellularCall(callUpgradeGuid); return S_OK; } @@ -2266,6 +2428,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().CancelUpgrade(callUpgradeGuid); return S_OK; } @@ -2279,11 +2442,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out coordinator) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out coordinator) noexcept override { try { - *coordinator = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *coordinator = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -2297,11 +2461,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall add_EndRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EndRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EndRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EndRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2314,6 +2479,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().EndRequested(token); return S_OK; } @@ -2323,11 +2489,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_HoldRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_HoldRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HoldRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HoldRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2340,6 +2507,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().HoldRequested(token); return S_OK; } @@ -2349,11 +2517,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_ResumeRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ResumeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ResumeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ResumeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2366,6 +2535,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ResumeRequested(token); return S_OK; } @@ -2375,11 +2545,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_AnswerRequested(abi_arg_in> acceptHandler, event_token * token) noexcept override + HRESULT __stdcall add_AnswerRequested(impl::abi_arg_in> acceptHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().AnswerRequested(*reinterpret_cast *>(&acceptHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AnswerRequested(*reinterpret_cast *>(&acceptHandler))); return S_OK; } catch (...) @@ -2392,6 +2563,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().AnswerRequested(token); return S_OK; } @@ -2401,11 +2573,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_RejectRequested(abi_arg_in> rejectHandler, event_token * token) noexcept override + HRESULT __stdcall add_RejectRequested(impl::abi_arg_in> rejectHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().RejectRequested(*reinterpret_cast *>(&rejectHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RejectRequested(*reinterpret_cast *>(&rejectHandler))); return S_OK; } catch (...) @@ -2418,6 +2591,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().RejectRequested(token); return S_OK; } @@ -2431,6 +2605,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyCallHeld(); return S_OK; } @@ -2444,6 +2619,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyCallActive(); return S_OK; } @@ -2457,6 +2633,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyCallEnded(); return S_OK; } @@ -2466,11 +2643,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ContactName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactName()); return S_OK; } catch (...) @@ -2480,10 +2658,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_ContactName(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContactName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactName(*reinterpret_cast(&value)); return S_OK; } @@ -2493,11 +2672,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -2506,10 +2686,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_StartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -2523,7 +2704,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().CallMedia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallMedia()); return S_OK; } catch (...) @@ -2536,6 +2718,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().CallMedia(value); return S_OK; } @@ -2549,6 +2732,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyCallReady(); return S_OK; } @@ -2566,28 +2750,28 @@ namespace Windows::ApplicationModel::Calls { template Windows::ApplicationModel::Calls::VoipPhoneCallState impl_ICallStateChangeEventArgs::State() const { Windows::ApplicationModel::Calls::VoipPhoneCallState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ICallStateChangeEventArgs)->get_State(&value)); return value; } template Windows::ApplicationModel::Calls::VoipPhoneCallMedia impl_ICallAnswerEventArgs::AcceptedMedia() const { Windows::ApplicationModel::Calls::VoipPhoneCallMedia value {}; - check_hresult(static_cast(static_cast(*this))->get_AcceptedMedia(&value)); + check_hresult(WINRT_SHIM(ICallAnswerEventArgs)->get_AcceptedMedia(&value)); return value; } template Windows::ApplicationModel::Calls::VoipPhoneCallRejectReason impl_ICallRejectEventArgs::RejectReason() const { Windows::ApplicationModel::Calls::VoipPhoneCallRejectReason value {}; - check_hresult(static_cast(static_cast(*this))->get_RejectReason(&value)); + check_hresult(WINRT_SHIM(ICallRejectEventArgs)->get_RejectReason(&value)); return value; } template event_token impl_IVoipPhoneCall::EndRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EndRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->add_EndRequested(get_abi(handler), &token)); return token; } @@ -2598,13 +2782,13 @@ template event_revoker impl_IVoipPhoneCall::EndR template void impl_IVoipPhoneCall::EndRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EndRequested(token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->remove_EndRequested(token)); } template event_token impl_IVoipPhoneCall::HoldRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HoldRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->add_HoldRequested(get_abi(handler), &token)); return token; } @@ -2615,13 +2799,13 @@ template event_revoker impl_IVoipPhoneCall::Hold template void impl_IVoipPhoneCall::HoldRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HoldRequested(token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->remove_HoldRequested(token)); } template event_token impl_IVoipPhoneCall::ResumeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ResumeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->add_ResumeRequested(get_abi(handler), &token)); return token; } @@ -2632,13 +2816,13 @@ template event_revoker impl_IVoipPhoneCall::Resu template void impl_IVoipPhoneCall::ResumeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ResumeRequested(token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->remove_ResumeRequested(token)); } template event_token impl_IVoipPhoneCall::AnswerRequested(const Windows::Foundation::TypedEventHandler & acceptHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AnswerRequested(get(acceptHandler), &token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->add_AnswerRequested(get_abi(acceptHandler), &token)); return token; } @@ -2649,13 +2833,13 @@ template event_revoker impl_IVoipPhoneCall::Answ template void impl_IVoipPhoneCall::AnswerRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AnswerRequested(token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->remove_AnswerRequested(token)); } template event_token impl_IVoipPhoneCall::RejectRequested(const Windows::Foundation::TypedEventHandler & rejectHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RejectRequested(get(rejectHandler), &token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->add_RejectRequested(get_abi(rejectHandler), &token)); return token; } @@ -2666,83 +2850,83 @@ template event_revoker impl_IVoipPhoneCall::Reje template void impl_IVoipPhoneCall::RejectRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RejectRequested(token)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->remove_RejectRequested(token)); } template void impl_IVoipPhoneCall::NotifyCallHeld() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyCallHeld()); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->abi_NotifyCallHeld()); } template void impl_IVoipPhoneCall::NotifyCallActive() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyCallActive()); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->abi_NotifyCallActive()); } template void impl_IVoipPhoneCall::NotifyCallEnded() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyCallEnded()); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->abi_NotifyCallEnded()); } template hstring impl_IVoipPhoneCall::ContactName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactName(put(value))); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->get_ContactName(put_abi(value))); return value; } -template void impl_IVoipPhoneCall::ContactName(hstring_ref value) const +template void impl_IVoipPhoneCall::ContactName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactName(get(value))); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->put_ContactName(get_abi(value))); } template Windows::Foundation::DateTime impl_IVoipPhoneCall::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->get_StartTime(put_abi(value))); return value; } template void impl_IVoipPhoneCall::StartTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->put_StartTime(get_abi(value))); } template Windows::ApplicationModel::Calls::VoipPhoneCallMedia impl_IVoipPhoneCall::CallMedia() const { Windows::ApplicationModel::Calls::VoipPhoneCallMedia value {}; - check_hresult(static_cast(static_cast(*this))->get_CallMedia(&value)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->get_CallMedia(&value)); return value; } template void impl_IVoipPhoneCall::CallMedia(Windows::ApplicationModel::Calls::VoipPhoneCallMedia value) const { - check_hresult(static_cast(static_cast(*this))->put_CallMedia(value)); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->put_CallMedia(value)); } template void impl_IVoipPhoneCall::NotifyCallReady() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyCallReady()); + check_hresult(WINRT_SHIM(IVoipPhoneCall)->abi_NotifyCallReady()); } template bool impl_IMuteChangeEventArgs::Muted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Muted(&value)); + check_hresult(WINRT_SHIM(IMuteChangeEventArgs)->get_Muted(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IVoipCallCoordinator::ReserveCallResourcesAsync(hstring_ref taskEntryPoint) const +template Windows::Foundation::IAsyncOperation impl_IVoipCallCoordinator::ReserveCallResourcesAsync(hstring_view taskEntryPoint) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReserveCallResourcesAsync(get(taskEntryPoint), put(operation))); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_ReserveCallResourcesAsync(get_abi(taskEntryPoint), put_abi(operation))); return operation; } template event_token impl_IVoipCallCoordinator::MuteStateChanged(const Windows::Foundation::TypedEventHandler & muteChangeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MuteStateChanged(get(muteChangeHandler), &token)); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->add_MuteStateChanged(get_abi(muteChangeHandler), &token)); return token; } @@ -2753,491 +2937,491 @@ template event_revoker impl_IVoipCallCoordina template void impl_IVoipCallCoordinator::MuteStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MuteStateChanged(token)); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->remove_MuteStateChanged(token)); } -template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestNewIncomingCall(hstring_ref context, hstring_ref contactName, hstring_ref contactNumber, const Windows::Foundation::Uri & contactImage, hstring_ref serviceName, const Windows::Foundation::Uri & brandingImage, hstring_ref callDetails, const Windows::Foundation::Uri & ringtone, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, const Windows::Foundation::TimeSpan & ringTimeout) const +template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestNewIncomingCall(hstring_view context, hstring_view contactName, hstring_view contactNumber, const Windows::Foundation::Uri & contactImage, hstring_view serviceName, const Windows::Foundation::Uri & brandingImage, hstring_view callDetails, const Windows::Foundation::Uri & ringtone, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media, const Windows::Foundation::TimeSpan & ringTimeout) const { Windows::ApplicationModel::Calls::VoipPhoneCall call { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestNewIncomingCall(get(context), get(contactName), get(contactNumber), get(contactImage), get(serviceName), get(brandingImage), get(callDetails), get(ringtone), media, get(ringTimeout), put(call))); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_RequestNewIncomingCall(get_abi(context), get_abi(contactName), get_abi(contactNumber), get_abi(contactImage), get_abi(serviceName), get_abi(brandingImage), get_abi(callDetails), get_abi(ringtone), media, get_abi(ringTimeout), put_abi(call))); return call; } -template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestNewOutgoingCall(hstring_ref context, hstring_ref contactName, hstring_ref serviceName, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media) const +template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestNewOutgoingCall(hstring_view context, hstring_view contactName, hstring_view serviceName, Windows::ApplicationModel::Calls::VoipPhoneCallMedia media) const { Windows::ApplicationModel::Calls::VoipPhoneCall call { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestNewOutgoingCall(get(context), get(contactName), get(serviceName), media, put(call))); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_RequestNewOutgoingCall(get_abi(context), get_abi(contactName), get_abi(serviceName), media, put_abi(call))); return call; } template void impl_IVoipCallCoordinator::NotifyMuted() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyMuted()); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_NotifyMuted()); } template void impl_IVoipCallCoordinator::NotifyUnmuted() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyUnmuted()); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_NotifyUnmuted()); } -template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestOutgoingUpgradeToVideoCall(GUID callUpgradeGuid, hstring_ref context, hstring_ref contactName, hstring_ref serviceName) const +template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestOutgoingUpgradeToVideoCall(GUID callUpgradeGuid, hstring_view context, hstring_view contactName, hstring_view serviceName) const { Windows::ApplicationModel::Calls::VoipPhoneCall call { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestOutgoingUpgradeToVideoCall(callUpgradeGuid, get(context), get(contactName), get(serviceName), put(call))); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_RequestOutgoingUpgradeToVideoCall(callUpgradeGuid, get_abi(context), get_abi(contactName), get_abi(serviceName), put_abi(call))); return call; } -template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestIncomingUpgradeToVideoCall(hstring_ref context, hstring_ref contactName, hstring_ref contactNumber, const Windows::Foundation::Uri & contactImage, hstring_ref serviceName, const Windows::Foundation::Uri & brandingImage, hstring_ref callDetails, const Windows::Foundation::Uri & ringtone, const Windows::Foundation::TimeSpan & ringTimeout) const +template Windows::ApplicationModel::Calls::VoipPhoneCall impl_IVoipCallCoordinator::RequestIncomingUpgradeToVideoCall(hstring_view context, hstring_view contactName, hstring_view contactNumber, const Windows::Foundation::Uri & contactImage, hstring_view serviceName, const Windows::Foundation::Uri & brandingImage, hstring_view callDetails, const Windows::Foundation::Uri & ringtone, const Windows::Foundation::TimeSpan & ringTimeout) const { Windows::ApplicationModel::Calls::VoipPhoneCall call { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestIncomingUpgradeToVideoCall(get(context), get(contactName), get(contactNumber), get(contactImage), get(serviceName), get(brandingImage), get(callDetails), get(ringtone), get(ringTimeout), put(call))); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_RequestIncomingUpgradeToVideoCall(get_abi(context), get_abi(contactName), get_abi(contactNumber), get_abi(contactImage), get_abi(serviceName), get_abi(brandingImage), get_abi(callDetails), get_abi(ringtone), get_abi(ringTimeout), put_abi(call))); return call; } template void impl_IVoipCallCoordinator::TerminateCellularCall(GUID callUpgradeGuid) const { - check_hresult(static_cast(static_cast(*this))->abi_TerminateCellularCall(callUpgradeGuid)); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_TerminateCellularCall(callUpgradeGuid)); } template void impl_IVoipCallCoordinator::CancelUpgrade(GUID callUpgradeGuid) const { - check_hresult(static_cast(static_cast(*this))->abi_CancelUpgrade(callUpgradeGuid)); + check_hresult(WINRT_SHIM(IVoipCallCoordinator)->abi_CancelUpgrade(callUpgradeGuid)); } template Windows::ApplicationModel::Calls::VoipCallCoordinator impl_IVoipCallCoordinatorStatics::GetDefault() const { Windows::ApplicationModel::Calls::VoipCallCoordinator coordinator { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(coordinator))); + check_hresult(WINRT_SHIM(IVoipCallCoordinatorStatics)->abi_GetDefault(put_abi(coordinator))); return coordinator; } template hstring impl_IPhoneCallHistoryEntry::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_Id(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress impl_IPhoneCallHistoryEntry::Address() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_Address(put_abi(value))); return value; } template void impl_IPhoneCallHistoryEntry::Address(const Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress & value) const { - check_hresult(static_cast(static_cast(*this))->put_Address(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_Address(get_abi(value))); } template Windows::Foundation::IReference impl_IPhoneCallHistoryEntry::Duration() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_Duration(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntry::Duration(const Windows::Foundation::IReference & value) const +template void impl_IPhoneCallHistoryEntry::Duration(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_Duration(get_abi(value))); } template bool impl_IPhoneCallHistoryEntry::IsCallerIdBlocked() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCallerIdBlocked(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsCallerIdBlocked(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsCallerIdBlocked(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCallerIdBlocked(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsCallerIdBlocked(value)); } template bool impl_IPhoneCallHistoryEntry::IsEmergency() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEmergency(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsEmergency(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsEmergency(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEmergency(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsEmergency(value)); } template bool impl_IPhoneCallHistoryEntry::IsIncoming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIncoming(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsIncoming(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsIncoming(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIncoming(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsIncoming(value)); } template bool impl_IPhoneCallHistoryEntry::IsMissed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMissed(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsMissed(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsMissed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMissed(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsMissed(value)); } template bool impl_IPhoneCallHistoryEntry::IsRinging() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRinging(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsRinging(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsRinging(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRinging(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsRinging(value)); } template bool impl_IPhoneCallHistoryEntry::IsSeen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSeen(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsSeen(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsSeen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSeen(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsSeen(value)); } template bool impl_IPhoneCallHistoryEntry::IsSuppressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSuppressed(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsSuppressed(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsSuppressed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSuppressed(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsSuppressed(value)); } template bool impl_IPhoneCallHistoryEntry::IsVoicemail() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVoicemail(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_IsVoicemail(&value)); return value; } template void impl_IPhoneCallHistoryEntry::IsVoicemail(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsVoicemail(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_IsVoicemail(value)); } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryMedia impl_IPhoneCallHistoryEntry::Media() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryMedia value {}; - check_hresult(static_cast(static_cast(*this))->get_Media(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_Media(&value)); return value; } template void impl_IPhoneCallHistoryEntry::Media(Windows::ApplicationModel::Calls::PhoneCallHistoryEntryMedia value) const { - check_hresult(static_cast(static_cast(*this))->put_Media(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_Media(value)); } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryOtherAppReadAccess impl_IPhoneCallHistoryEntry::OtherAppReadAccess() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryOtherAppReadAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppReadAccess(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_OtherAppReadAccess(&value)); return value; } template void impl_IPhoneCallHistoryEntry::OtherAppReadAccess(Windows::ApplicationModel::Calls::PhoneCallHistoryEntryOtherAppReadAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppReadAccess(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_OtherAppReadAccess(value)); } template hstring impl_IPhoneCallHistoryEntry::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_RemoteId(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntry::RemoteId(hstring_ref value) const +template void impl_IPhoneCallHistoryEntry::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_RemoteId(get_abi(value))); } template hstring impl_IPhoneCallHistoryEntry::SourceDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceDisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_SourceDisplayName(put_abi(value))); return value; } template hstring impl_IPhoneCallHistoryEntry::SourceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceId(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_SourceId(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntry::SourceId(hstring_ref value) const +template void impl_IPhoneCallHistoryEntry::SourceId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceId(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_SourceId(get_abi(value))); } template Windows::ApplicationModel::Calls::PhoneCallHistorySourceIdKind impl_IPhoneCallHistoryEntry::SourceIdKind() const { Windows::ApplicationModel::Calls::PhoneCallHistorySourceIdKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceIdKind(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_SourceIdKind(&value)); return value; } template void impl_IPhoneCallHistoryEntry::SourceIdKind(Windows::ApplicationModel::Calls::PhoneCallHistorySourceIdKind value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceIdKind(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_SourceIdKind(value)); } template Windows::Foundation::DateTime impl_IPhoneCallHistoryEntry::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->get_StartTime(put_abi(value))); return value; } template void impl_IPhoneCallHistoryEntry::StartTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntry)->put_StartTime(get_abi(value))); } template hstring impl_IPhoneCallHistoryEntryAddress::ContactId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactId(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->get_ContactId(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntryAddress::ContactId(hstring_ref value) const +template void impl_IPhoneCallHistoryEntryAddress::ContactId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactId(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->put_ContactId(get_abi(value))); } template hstring impl_IPhoneCallHistoryEntryAddress::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->get_DisplayName(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntryAddress::DisplayName(hstring_ref value) const +template void impl_IPhoneCallHistoryEntryAddress::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->put_DisplayName(get_abi(value))); } template hstring impl_IPhoneCallHistoryEntryAddress::RawAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RawAddress(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->get_RawAddress(put_abi(value))); return value; } -template void impl_IPhoneCallHistoryEntryAddress::RawAddress(hstring_ref value) const +template void impl_IPhoneCallHistoryEntryAddress::RawAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RawAddress(get(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->put_RawAddress(get_abi(value))); } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind impl_IPhoneCallHistoryEntryAddress::RawAddressKind() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind value {}; - check_hresult(static_cast(static_cast(*this))->get_RawAddressKind(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->get_RawAddressKind(&value)); return value; } template void impl_IPhoneCallHistoryEntryAddress::RawAddressKind(Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind value) const { - check_hresult(static_cast(static_cast(*this))->put_RawAddressKind(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddress)->put_RawAddressKind(value)); } -template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress impl_IPhoneCallHistoryEntryAddressFactory::Create(hstring_ref rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind) const +template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress impl_IPhoneCallHistoryEntryAddressFactory::Create(hstring_view rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind) const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(rawAddress), rawAddressKind, put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryAddressFactory)->abi_Create(get_abi(rawAddress), rawAddressKind, put_abi(result))); return result; } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryQueryDesiredMedia impl_IPhoneCallHistoryEntryQueryOptions::DesiredMedia() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryQueryDesiredMedia value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredMedia(&value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryQueryOptions)->get_DesiredMedia(&value)); return value; } template void impl_IPhoneCallHistoryEntryQueryOptions::DesiredMedia(Windows::ApplicationModel::Calls::PhoneCallHistoryEntryQueryDesiredMedia value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredMedia(value)); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryQueryOptions)->put_DesiredMedia(value)); } template Windows::Foundation::Collections::IVector impl_IPhoneCallHistoryEntryQueryOptions::SourceIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SourceIds(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryQueryOptions)->get_SourceIds(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IPhoneCallHistoryEntryReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryEntryReader)->abi_ReadBatchAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryStore::GetEntryAsync(hstring_ref callHistoryEntryId) const +template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryStore::GetEntryAsync(hstring_view callHistoryEntryId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetEntryAsync(get(callHistoryEntryId), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_GetEntryAsync(get_abi(callHistoryEntryId), put_abi(result))); return result; } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryReader impl_IPhoneCallHistoryStore::GetEntryReader() const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEntryReader(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_GetEntryReader(put_abi(result))); return result; } template Windows::ApplicationModel::Calls::PhoneCallHistoryEntryReader impl_IPhoneCallHistoryStore::GetEntryReader(const Windows::ApplicationModel::Calls::PhoneCallHistoryEntryQueryOptions & queryOptions) const { Windows::ApplicationModel::Calls::PhoneCallHistoryEntryReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEntryReaderWithOptions(get(queryOptions), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_GetEntryReaderWithOptions(get_abi(queryOptions), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::SaveEntryAsync(const Windows::ApplicationModel::Calls::PhoneCallHistoryEntry & callHistoryEntry) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveEntryAsync(get(callHistoryEntry), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_SaveEntryAsync(get_abi(callHistoryEntry), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::DeleteEntryAsync(const Windows::ApplicationModel::Calls::PhoneCallHistoryEntry & callHistoryEntry) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteEntryAsync(get(callHistoryEntry), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_DeleteEntryAsync(get_abi(callHistoryEntry), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::DeleteEntriesAsync(const Windows::Foundation::Collections::IIterable & callHistoryEntries) const +template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::DeleteEntriesAsync(iterable callHistoryEntries) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteEntriesAsync(get(callHistoryEntries), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_DeleteEntriesAsync(get_abi(callHistoryEntries), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkEntryAsSeenAsync(const Windows::ApplicationModel::Calls::PhoneCallHistoryEntry & callHistoryEntry) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkEntryAsSeenAsync(get(callHistoryEntry), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_MarkEntryAsSeenAsync(get_abi(callHistoryEntry), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkEntriesAsSeenAsync(const Windows::Foundation::Collections::IIterable & callHistoryEntries) const +template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkEntriesAsSeenAsync(iterable callHistoryEntries) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkEntriesAsSeenAsync(get(callHistoryEntries), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_MarkEntriesAsSeenAsync(get_abi(callHistoryEntries), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryStore::GetUnseenCountAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetUnseenCountAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_GetUnseenCountAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkAllAsSeenAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkAllAsSeenAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_MarkAllAsSeenAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryStore::GetSourcesUnseenCountAsync(const Windows::Foundation::Collections::IIterable & sourceIds) const +template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryStore::GetSourcesUnseenCountAsync(iterable sourceIds) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetSourcesUnseenCountAsync(get(sourceIds), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_GetSourcesUnseenCountAsync(get_abi(sourceIds), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkSourcesAsSeenAsync(const Windows::Foundation::Collections::IIterable & sourceIds) const +template Windows::Foundation::IAsyncAction impl_IPhoneCallHistoryStore::MarkSourcesAsSeenAsync(iterable sourceIds) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkSourcesAsSeenAsync(get(sourceIds), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryStore)->abi_MarkSourcesAsSeenAsync(get_abi(sourceIds), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryManagerStatics::RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryManagerStatics)->abi_RequestStoreAsync(accessType, put_abi(result))); return result; } template Windows::ApplicationModel::Calls::PhoneCallHistoryManagerForUser impl_IPhoneCallHistoryManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::ApplicationModel::Calls::PhoneCallHistoryManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPhoneCallHistoryManagerForUser::RequestStoreAsync(Windows::ApplicationModel::Calls::PhoneCallHistoryStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryManagerForUser)->abi_RequestStoreAsync(accessType, put_abi(result))); return result; } template Windows::System::User impl_IPhoneCallHistoryManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallHistoryManagerForUser)->get_User(put_abi(value))); return value; } template void impl_ILockScreenCallEndCallDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ILockScreenCallEndCallDeferral)->abi_Complete()); } template Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral impl_ILockScreenCallEndRequestedEventArgs::GetDeferral() const { Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ILockScreenCallEndRequestedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ILockScreenCallEndRequestedEventArgs::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(ILockScreenCallEndRequestedEventArgs)->get_Deadline(put_abi(value))); return value; } template void impl_ILockScreenCallUI::Dismiss() const { - check_hresult(static_cast(static_cast(*this))->abi_Dismiss()); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->abi_Dismiss()); } template event_token impl_ILockScreenCallUI::EndRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EndRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->add_EndRequested(get_abi(handler), &token)); return token; } @@ -3248,347 +3432,347 @@ template event_revoker impl_ILockScreenCallUI template void impl_ILockScreenCallUI::EndRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EndRequested(token)); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->remove_EndRequested(token)); } -template event_token impl_ILockScreenCallUI::Closed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILockScreenCallUI::Closed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->add_Closed(get_abi(handler), &token)); return token; } -template event_revoker impl_ILockScreenCallUI::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILockScreenCallUI::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Calls::ILockScreenCallUI::remove_Closed, Closed(handler)); } template void impl_ILockScreenCallUI::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->remove_Closed(token)); } template hstring impl_ILockScreenCallUI::CallTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallTitle(put(value))); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->get_CallTitle(put_abi(value))); return value; } -template void impl_ILockScreenCallUI::CallTitle(hstring_ref value) const +template void impl_ILockScreenCallUI::CallTitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CallTitle(get(value))); + check_hresult(WINRT_SHIM(ILockScreenCallUI)->put_CallTitle(get_abi(value))); } template hstring impl_IPhoneVoicemail::Number() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Number(put(value))); + check_hresult(WINRT_SHIM(IPhoneVoicemail)->get_Number(put_abi(value))); return value; } template int32_t impl_IPhoneVoicemail::MessageCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageCount(&value)); + check_hresult(WINRT_SHIM(IPhoneVoicemail)->get_MessageCount(&value)); return value; } template Windows::ApplicationModel::Calls::PhoneVoicemailType impl_IPhoneVoicemail::Type() const { Windows::ApplicationModel::Calls::PhoneVoicemailType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPhoneVoicemail)->get_Type(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IPhoneVoicemail::DialVoicemailAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DialVoicemailAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneVoicemail)->abi_DialVoicemailAsync(put_abi(result))); return result; } template hstring impl_IPhoneDialOptions::Number() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Number(put(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_Number(put_abi(value))); return value; } -template void impl_IPhoneDialOptions::Number(hstring_ref value) const +template void impl_IPhoneDialOptions::Number(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Number(get(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_Number(get_abi(value))); } template hstring impl_IPhoneDialOptions::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_DisplayName(put_abi(value))); return value; } -template void impl_IPhoneDialOptions::DisplayName(hstring_ref value) const +template void impl_IPhoneDialOptions::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_DisplayName(get_abi(value))); } template Windows::ApplicationModel::Contacts::Contact impl_IPhoneDialOptions::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_Contact(put_abi(value))); return value; } template void impl_IPhoneDialOptions::Contact(const Windows::ApplicationModel::Contacts::Contact & value) const { - check_hresult(static_cast(static_cast(*this))->put_Contact(get(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_Contact(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactPhone impl_IPhoneDialOptions::ContactPhone() const { Windows::ApplicationModel::Contacts::ContactPhone value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContactPhone(put(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_ContactPhone(put_abi(value))); return value; } template void impl_IPhoneDialOptions::ContactPhone(const Windows::ApplicationModel::Contacts::ContactPhone & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactPhone(get(value))); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_ContactPhone(get_abi(value))); } template Windows::ApplicationModel::Calls::PhoneCallMedia impl_IPhoneDialOptions::Media() const { Windows::ApplicationModel::Calls::PhoneCallMedia value {}; - check_hresult(static_cast(static_cast(*this))->get_Media(&value)); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_Media(&value)); return value; } template void impl_IPhoneDialOptions::Media(Windows::ApplicationModel::Calls::PhoneCallMedia value) const { - check_hresult(static_cast(static_cast(*this))->put_Media(value)); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_Media(value)); } template Windows::ApplicationModel::Calls::PhoneAudioRoutingEndpoint impl_IPhoneDialOptions::AudioEndpoint() const { Windows::ApplicationModel::Calls::PhoneAudioRoutingEndpoint value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioEndpoint(&value)); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->get_AudioEndpoint(&value)); return value; } template void impl_IPhoneDialOptions::AudioEndpoint(Windows::ApplicationModel::Calls::PhoneAudioRoutingEndpoint value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioEndpoint(value)); + check_hresult(WINRT_SHIM(IPhoneDialOptions)->put_AudioEndpoint(value)); } template Windows::ApplicationModel::Calls::PhoneSimState impl_IPhoneLineCellularDetails::SimState() const { Windows::ApplicationModel::Calls::PhoneSimState value {}; - check_hresult(static_cast(static_cast(*this))->get_SimState(&value)); + check_hresult(WINRT_SHIM(IPhoneLineCellularDetails)->get_SimState(&value)); return value; } template int32_t impl_IPhoneLineCellularDetails::SimSlotIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SimSlotIndex(&value)); + check_hresult(WINRT_SHIM(IPhoneLineCellularDetails)->get_SimSlotIndex(&value)); return value; } template bool impl_IPhoneLineCellularDetails::IsModemOn() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsModemOn(&value)); + check_hresult(WINRT_SHIM(IPhoneLineCellularDetails)->get_IsModemOn(&value)); return value; } template int32_t impl_IPhoneLineCellularDetails::RegistrationRejectCode() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RegistrationRejectCode(&value)); + check_hresult(WINRT_SHIM(IPhoneLineCellularDetails)->get_RegistrationRejectCode(&value)); return value; } template hstring impl_IPhoneLineCellularDetails::GetNetworkOperatorDisplayText(Windows::ApplicationModel::Calls::PhoneLineNetworkOperatorDisplayTextLocation location) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkOperatorDisplayText(location, put(value))); + check_hresult(WINRT_SHIM(IPhoneLineCellularDetails)->abi_GetNetworkOperatorDisplayText(location, put_abi(value))); return value; } -template event_token impl_IPhoneLine::LineChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPhoneLine::LineChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LineChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLine)->add_LineChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPhoneLine::LineChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPhoneLine::LineChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Calls::IPhoneLine::remove_LineChanged, LineChanged(handler)); } template void impl_IPhoneLine::LineChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LineChanged(token)); + check_hresult(WINRT_SHIM(IPhoneLine)->remove_LineChanged(token)); } template GUID impl_IPhoneLine::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IPhoneLine)->get_Id(&value)); return value; } template Windows::UI::Color impl_IPhoneLine::DisplayColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayColor(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_DisplayColor(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneNetworkState impl_IPhoneLine::NetworkState() const { Windows::ApplicationModel::Calls::PhoneNetworkState value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkState(&value)); + check_hresult(WINRT_SHIM(IPhoneLine)->get_NetworkState(&value)); return value; } template hstring impl_IPhoneLine::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_DisplayName(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneVoicemail impl_IPhoneLine::Voicemail() const { Windows::ApplicationModel::Calls::PhoneVoicemail value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Voicemail(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_Voicemail(put_abi(value))); return value; } template hstring impl_IPhoneLine::NetworkName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkName(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_NetworkName(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneLineCellularDetails impl_IPhoneLine::CellularDetails() const { Windows::ApplicationModel::Calls::PhoneLineCellularDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CellularDetails(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_CellularDetails(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneLineTransport impl_IPhoneLine::Transport() const { Windows::ApplicationModel::Calls::PhoneLineTransport value {}; - check_hresult(static_cast(static_cast(*this))->get_Transport(&value)); + check_hresult(WINRT_SHIM(IPhoneLine)->get_Transport(&value)); return value; } template bool impl_IPhoneLine::CanDial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanDial(&value)); + check_hresult(WINRT_SHIM(IPhoneLine)->get_CanDial(&value)); return value; } template bool impl_IPhoneLine::SupportsTile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsTile(&value)); + check_hresult(WINRT_SHIM(IPhoneLine)->get_SupportsTile(&value)); return value; } template Windows::ApplicationModel::Calls::PhoneCallVideoCapabilities impl_IPhoneLine::VideoCallingCapabilities() const { Windows::ApplicationModel::Calls::PhoneCallVideoCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoCallingCapabilities(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_VideoCallingCapabilities(put_abi(value))); return value; } template Windows::ApplicationModel::Calls::PhoneLineConfiguration impl_IPhoneLine::LineConfiguration() const { Windows::ApplicationModel::Calls::PhoneLineConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineConfiguration(put(value))); + check_hresult(WINRT_SHIM(IPhoneLine)->get_LineConfiguration(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IPhoneLine::IsImmediateDialNumberAsync(hstring_ref number) const +template Windows::Foundation::IAsyncOperation impl_IPhoneLine::IsImmediateDialNumberAsync(hstring_view number) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_IsImmediateDialNumberAsync(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneLine)->abi_IsImmediateDialNumberAsync(get_abi(number), put_abi(result))); return result; } -template void impl_IPhoneLine::Dial(hstring_ref number, hstring_ref displayName) const +template void impl_IPhoneLine::Dial(hstring_view number, hstring_view displayName) const { - check_hresult(static_cast(static_cast(*this))->abi_Dial(get(number), get(displayName))); + check_hresult(WINRT_SHIM(IPhoneLine)->abi_Dial(get_abi(number), get_abi(displayName))); } template void impl_IPhoneLine::DialWithOptions(const Windows::ApplicationModel::Calls::PhoneDialOptions & options) const { - check_hresult(static_cast(static_cast(*this))->abi_DialWithOptions(get(options))); + check_hresult(WINRT_SHIM(IPhoneLine)->abi_DialWithOptions(get_abi(options))); } -template Windows::Foundation::IAsyncOperation impl_IPhoneCallStore::IsEmergencyPhoneNumberAsync(hstring_ref number) const +template Windows::Foundation::IAsyncOperation impl_IPhoneCallStore::IsEmergencyPhoneNumberAsync(hstring_view number) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_IsEmergencyPhoneNumberAsync(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallStore)->abi_IsEmergencyPhoneNumberAsync(get_abi(number), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPhoneCallStore::GetDefaultLineAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultLineAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallStore)->abi_GetDefaultLineAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Calls::PhoneLineWatcher impl_IPhoneCallStore::RequestLineWatcher() const { Windows::ApplicationModel::Calls::PhoneLineWatcher result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestLineWatcher(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallStore)->abi_RequestLineWatcher(put_abi(result))); return result; } template bool impl_IPhoneLineConfiguration::IsVideoCallingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVideoCallingEnabled(&value)); + check_hresult(WINRT_SHIM(IPhoneLineConfiguration)->get_IsVideoCallingEnabled(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IPhoneLineConfiguration::ExtendedProperties() const +template Windows::Foundation::Collections::IMapView impl_IPhoneLineConfiguration::ExtendedProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPhoneLineConfiguration)->get_ExtendedProperties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPhoneLineStatics::FromIdAsync(GUID lineId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(lineId, put(result))); + check_hresult(WINRT_SHIM(IPhoneLineStatics)->abi_FromIdAsync(lineId, put_abi(result))); return result; } template void impl_IPhoneLineWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->abi_Start()); } template void impl_IPhoneLineWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->abi_Stop()); } template event_token impl_IPhoneLineWatcher::LineAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LineAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->add_LineAdded(get_abi(handler), &token)); return token; } @@ -3599,13 +3783,13 @@ template event_revoker impl_IPhoneLineWatcher template void impl_IPhoneLineWatcher::LineAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LineAdded(token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->remove_LineAdded(token)); } template event_token impl_IPhoneLineWatcher::LineRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LineRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->add_LineRemoved(get_abi(handler), &token)); return token; } @@ -3616,13 +3800,13 @@ template event_revoker impl_IPhoneLineWatcher template void impl_IPhoneLineWatcher::LineRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LineRemoved(token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->remove_LineRemoved(token)); } template event_token impl_IPhoneLineWatcher::LineUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LineUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->add_LineUpdated(get_abi(handler), &token)); return token; } @@ -3633,147 +3817,147 @@ template event_revoker impl_IPhoneLineWatcher template void impl_IPhoneLineWatcher::LineUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LineUpdated(token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->remove_LineUpdated(token)); } -template event_token impl_IPhoneLineWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPhoneLineWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPhoneLineWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPhoneLineWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Calls::IPhoneLineWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPhoneLineWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IPhoneLineWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPhoneLineWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPhoneLineWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPhoneLineWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Calls::IPhoneLineWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPhoneLineWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->remove_Stopped(token)); } template Windows::ApplicationModel::Calls::PhoneLineWatcherStatus impl_IPhoneLineWatcher::Status() const { Windows::ApplicationModel::Calls::PhoneLineWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IPhoneLineWatcher)->get_Status(&status)); return status; } template GUID impl_IPhoneLineWatcherEventArgs::LineId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LineId(&value)); + check_hresult(WINRT_SHIM(IPhoneLineWatcherEventArgs)->get_LineId(&value)); return value; } -template void impl_IPhoneCallManagerStatics::ShowPhoneCallUI(hstring_ref phoneNumber, hstring_ref displayName) const +template void impl_IPhoneCallManagerStatics::ShowPhoneCallUI(hstring_view phoneNumber, hstring_view displayName) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowPhoneCallUI(get(phoneNumber), get(displayName))); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics)->abi_ShowPhoneCallUI(get_abi(phoneNumber), get_abi(displayName))); } -template event_token impl_IPhoneCallManagerStatics2::CallStateChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPhoneCallManagerStatics2::CallStateChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CallStateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->add_CallStateChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPhoneCallManagerStatics2::CallStateChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPhoneCallManagerStatics2::CallStateChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Calls::IPhoneCallManagerStatics2::remove_CallStateChanged, CallStateChanged(handler)); } template void impl_IPhoneCallManagerStatics2::CallStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CallStateChanged(token)); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->remove_CallStateChanged(token)); } template bool impl_IPhoneCallManagerStatics2::IsCallActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCallActive(&value)); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->get_IsCallActive(&value)); return value; } template bool impl_IPhoneCallManagerStatics2::IsCallIncoming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCallIncoming(&value)); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->get_IsCallIncoming(&value)); return value; } template void impl_IPhoneCallManagerStatics2::ShowPhoneCallSettingsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowPhoneCallSettingsUI()); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->abi_ShowPhoneCallSettingsUI()); } template Windows::Foundation::IAsyncOperation impl_IPhoneCallManagerStatics2::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(result))); + check_hresult(WINRT_SHIM(IPhoneCallManagerStatics2)->abi_RequestStoreAsync(put_abi(result))); return result; } template bool impl_IPhoneCallVideoCapabilities::IsVideoCallingCapable() const { bool pValue {}; - check_hresult(static_cast(static_cast(*this))->get_IsVideoCallingCapable(&pValue)); + check_hresult(WINRT_SHIM(IPhoneCallVideoCapabilities)->get_IsVideoCallingCapable(&pValue)); return pValue; } -template Windows::Foundation::IAsyncOperation impl_IPhoneCallVideoCapabilitiesManagerStatics::GetCapabilitiesAsync(hstring_ref phoneNumber) const +template Windows::Foundation::IAsyncOperation impl_IPhoneCallVideoCapabilitiesManagerStatics::GetCapabilitiesAsync(hstring_view phoneNumber) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetCapabilitiesAsync(get(phoneNumber), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallVideoCapabilitiesManagerStatics)->abi_GetCapabilitiesAsync(get_abi(phoneNumber), put_abi(result))); return result; } template bool impl_IPhoneCallBlockingStatics::BlockUnknownNumbers() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BlockUnknownNumbers(&value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockingStatics)->get_BlockUnknownNumbers(&value)); return value; } template void impl_IPhoneCallBlockingStatics::BlockUnknownNumbers(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BlockUnknownNumbers(value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockingStatics)->put_BlockUnknownNumbers(value)); } template bool impl_IPhoneCallBlockingStatics::BlockPrivateNumbers() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BlockPrivateNumbers(&value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockingStatics)->get_BlockPrivateNumbers(&value)); return value; } template void impl_IPhoneCallBlockingStatics::BlockPrivateNumbers(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BlockPrivateNumbers(value)); + check_hresult(WINRT_SHIM(IPhoneCallBlockingStatics)->put_BlockPrivateNumbers(value)); } -template Windows::Foundation::IAsyncOperation impl_IPhoneCallBlockingStatics::SetCallBlockingListAsync(const Windows::Foundation::Collections::IIterable & phoneNumberList) const +template Windows::Foundation::IAsyncOperation impl_IPhoneCallBlockingStatics::SetCallBlockingListAsync(iterable phoneNumberList) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SetCallBlockingListAsync(get(phoneNumberList), put(result))); + check_hresult(WINRT_SHIM(IPhoneCallBlockingStatics)->abi_SetCallBlockingListAsync(get_abi(phoneNumberList), put_abi(result))); return result; } @@ -3797,7 +3981,7 @@ inline void PhoneCallBlocking::BlockPrivateNumbers(bool value) get_activation_factory().BlockPrivateNumbers(value); } -inline Windows::Foundation::IAsyncOperation PhoneCallBlocking::SetCallBlockingListAsync(const Windows::Foundation::Collections::IIterable & phoneNumberList) +inline Windows::Foundation::IAsyncOperation PhoneCallBlocking::SetCallBlockingListAsync(iterable phoneNumberList) { return get_activation_factory().SetCallBlockingListAsync(phoneNumberList); } @@ -3810,7 +3994,7 @@ inline PhoneCallHistoryEntryAddress::PhoneCallHistoryEntryAddress() : PhoneCallHistoryEntryAddress(activate_instance()) {} -inline PhoneCallHistoryEntryAddress::PhoneCallHistoryEntryAddress(hstring_ref rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind) : +inline PhoneCallHistoryEntryAddress::PhoneCallHistoryEntryAddress(hstring_view rawAddress, Windows::ApplicationModel::Calls::PhoneCallHistoryEntryRawAddressKind rawAddressKind) : PhoneCallHistoryEntryAddress(get_activation_factory().Create(rawAddress, rawAddressKind)) {} @@ -3828,17 +4012,17 @@ inline Windows::ApplicationModel::Calls::PhoneCallHistoryManagerForUser PhoneCal return get_activation_factory().GetForUser(user); } -inline void PhoneCallManager::ShowPhoneCallUI(hstring_ref phoneNumber, hstring_ref displayName) +inline void PhoneCallManager::ShowPhoneCallUI(hstring_view phoneNumber, hstring_view displayName) { get_activation_factory().ShowPhoneCallUI(phoneNumber, displayName); } -inline event_token PhoneCallManager::CallStateChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PhoneCallManager::CallStateChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().CallStateChanged(handler); } -inline factory_event_revoker PhoneCallManager::CallStateChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PhoneCallManager::CallStateChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::ApplicationModel::Calls::IPhoneCallManagerStatics2::remove_CallStateChanged, factory.CallStateChanged(handler) }; @@ -3869,7 +4053,7 @@ inline Windows::Foundation::IAsyncOperation().RequestStoreAsync(); } -inline Windows::Foundation::IAsyncOperation PhoneCallVideoCapabilitiesManager::GetCapabilitiesAsync(hstring_ref phoneNumber) +inline Windows::Foundation::IAsyncOperation PhoneCallVideoCapabilitiesManager::GetCapabilitiesAsync(hstring_view phoneNumber) { return get_activation_factory().GetCapabilitiesAsync(phoneNumber); } @@ -3891,3 +4075,518 @@ inline Windows::ApplicationModel::Calls::VoipCallCoordinator VoipCallCoordinator } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ICallAnswerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ICallRejectEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ICallStateChangeEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndCallDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IMuteChangeEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallBlockingStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryEntryAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryEntryAddressFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryEntryQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryEntryReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallHistoryStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallVideoCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneCallVideoCapabilitiesManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneDialOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLineCellularDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLineConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLineStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLineWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneLineWatcherEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IPhoneVoicemail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IVoipCallCoordinator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IVoipCallCoordinatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::IVoipPhoneCall & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::CallAnswerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::CallRejectEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::CallStateChangeEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::LockScreenCallEndRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::LockScreenCallUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::MuteChangeEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryEntryAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryEntryQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryEntryReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallHistoryStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneCallVideoCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneDialOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneLineCellularDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneLineConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneLineWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneLineWatcherEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::PhoneVoicemail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::VoipCallCoordinator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Calls::VoipPhoneCall & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Chat.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Chat.h index 90628e1a2..5d0f9c6bc 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Chat.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Chat.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.MediaProperties.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -22,7 +25,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsOnline()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsOnline()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsChatCapable()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsChatCapable()); return S_OK; } catch (...) @@ -48,7 +53,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsFileTransferCapable()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsFileTransferCapable()); return S_OK; } catch (...) @@ -61,7 +67,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsGeoLocationPushCapable()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsGeoLocationPushCapable()); return S_OK; } catch (...) @@ -74,7 +81,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsIntegratedMessagingCapable()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsIntegratedMessagingCapable()); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetCachedCapabilitiesAsync(abi_arg_in address, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetCachedCapabilitiesAsync(impl::abi_arg_in address, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetCachedCapabilitiesAsync(*reinterpret_cast(&address))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCachedCapabilitiesAsync(*reinterpret_cast(&address))); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce address, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetCapabilitiesFromNetworkAsync(impl::abi_arg_in address, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetCapabilitiesFromNetworkAsync(*reinterpret_cast(&address))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCapabilitiesFromNetworkAsync(*reinterpret_cast(&address))); return S_OK; } catch (...) @@ -123,7 +133,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().HasUnreadMessages()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().HasUnreadMessages()); return S_OK; } catch (...) @@ -132,11 +143,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Id(abi_arg_out result) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -146,11 +158,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Subject(abi_arg_out result) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -160,10 +173,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Subject(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subject(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subject(*reinterpret_cast(&value)); return S_OK; } @@ -177,7 +191,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsConversationMuted()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsConversationMuted()); return S_OK; } catch (...) @@ -190,6 +205,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsConversationMuted(value); return S_OK; } @@ -199,11 +215,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MostRecentMessageId(abi_arg_out result) noexcept override + HRESULT __stdcall get_MostRecentMessageId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MostRecentMessageId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MostRecentMessageId()); return S_OK; } catch (...) @@ -213,11 +230,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Participants(abi_arg_out> result) noexcept override + HRESULT __stdcall get_Participants(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().Participants()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Participants()); return S_OK; } catch (...) @@ -227,11 +245,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ThreadingInfo(abi_arg_out result) noexcept override + HRESULT __stdcall get_ThreadingInfo(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ThreadingInfo()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ThreadingInfo()); return S_OK; } catch (...) @@ -241,11 +260,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -255,11 +275,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetMessageReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader()); return S_OK; } catch (...) @@ -269,11 +290,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_MarkAllMessagesAsReadAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkAllMessagesAsReadAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkMessagesAsReadAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkMessagesAsReadAsync()); return S_OK; } catch (...) @@ -283,11 +305,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_MarkMessagesAsReadAsync(abi_arg_in value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkMessagesAsReadAsync(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkMessagesAsReadAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkMessagesAsReadAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -297,11 +320,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -311,10 +335,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_NotifyLocalParticipantComposing(abi_arg_in transportId, abi_arg_in participantAddress, bool isComposing) noexcept override + HRESULT __stdcall abi_NotifyLocalParticipantComposing(impl::abi_arg_in transportId, impl::abi_arg_in participantAddress, bool isComposing) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyLocalParticipantComposing(*reinterpret_cast(&transportId), *reinterpret_cast(&participantAddress), isComposing); return S_OK; } @@ -324,10 +349,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_NotifyRemoteParticipantComposing(abi_arg_in transportId, abi_arg_in participantAddress, bool isComposing) noexcept override + HRESULT __stdcall abi_NotifyRemoteParticipantComposing(impl::abi_arg_in transportId, impl::abi_arg_in participantAddress, bool isComposing) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyRemoteParticipantComposing(*reinterpret_cast(&transportId), *reinterpret_cast(&participantAddress), isComposing); return S_OK; } @@ -337,11 +363,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_RemoteParticipantComposingChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemoteParticipantComposingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemoteParticipantComposingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemoteParticipantComposingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -354,6 +381,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteParticipantComposingChanged(token); return S_OK; } @@ -371,7 +399,8 @@ struct produce : produce { try { - *result = detach(this->shim().CanModifyParticipants()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanModifyParticipants()); return S_OK; } catch (...) @@ -384,6 +413,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanModifyParticipants(value); return S_OK; } @@ -397,11 +427,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -411,11 +442,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync(count)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync(count)); return S_OK; } catch (...) @@ -429,11 +461,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ContactId(abi_arg_out result) noexcept override + HRESULT __stdcall get_ContactId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ContactId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ContactId()); return S_OK; } catch (...) @@ -443,10 +476,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContactId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactId(*reinterpret_cast(&value)); return S_OK; } @@ -456,11 +490,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_Custom(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Custom()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Custom()); return S_OK; } catch (...) @@ -470,10 +505,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Custom(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Custom(*reinterpret_cast(&value)); return S_OK; } @@ -483,11 +519,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_ConversationId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ConversationId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConversationId()); return S_OK; } catch (...) @@ -497,10 +534,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ConversationId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConversationId(*reinterpret_cast(&value)); return S_OK; } @@ -510,11 +548,12 @@ struct produce> result) noexcept override + HRESULT __stdcall get_Participants(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().Participants()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Participants()); return S_OK; } catch (...) @@ -528,7 +567,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -541,6 +581,7 @@ struct produceshim()); this->shim().Kind(value); return S_OK; } @@ -558,7 +599,8 @@ struct produce : produce_baseshim().ItemKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ItemKind()); return S_OK; } catch (...) @@ -571,11 +613,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Attachments(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Attachments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Attachments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Attachments()); return S_OK; } catch (...) @@ -585,11 +628,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Body(abi_arg_out value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -599,10 +643,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Body(abi_arg_in value) noexcept override + HRESULT __stdcall put_Body(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Body(*reinterpret_cast(&value)); return S_OK; } @@ -612,11 +657,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_From(abi_arg_out value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -626,11 +672,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -644,7 +691,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsForwardingDisabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsForwardingDisabled()); return S_OK; } catch (...) @@ -657,7 +705,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsIncoming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIncoming()); return S_OK; } catch (...) @@ -670,7 +719,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsRead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRead()); return S_OK; } catch (...) @@ -679,11 +729,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_LocalTimestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalTimestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalTimestamp()); return S_OK; } catch (...) @@ -692,11 +743,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_NetworkTimestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkTimestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkTimestamp()); return S_OK; } catch (...) @@ -705,11 +757,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Recipients(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Recipients(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Recipients()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recipients()); return S_OK; } catch (...) @@ -719,11 +772,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_RecipientSendStatuses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RecipientSendStatuses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RecipientSendStatuses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecipientSendStatuses()); return S_OK; } catch (...) @@ -737,7 +791,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -746,11 +801,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -760,11 +816,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TransportFriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportFriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportFriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportFriendlyName()); return S_OK; } catch (...) @@ -774,11 +831,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TransportId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportId()); return S_OK; } catch (...) @@ -788,10 +846,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_TransportId(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransportId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransportId(*reinterpret_cast(&value)); return S_OK; } @@ -809,7 +868,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().EstimatedDownloadSize()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EstimatedDownloadSize()); return S_OK; } catch (...) @@ -822,6 +882,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().EstimatedDownloadSize(value); return S_OK; } @@ -831,10 +892,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_From(abi_arg_in value) noexcept override + HRESULT __stdcall put_From(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().From(*reinterpret_cast(&value)); return S_OK; } @@ -848,7 +910,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsAutoReply()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsAutoReply()); return S_OK; } catch (...) @@ -861,6 +924,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsAutoReply(value); return S_OK; } @@ -874,6 +938,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsForwardingDisabled(value); return S_OK; } @@ -887,7 +952,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsReplyDisabled()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsReplyDisabled()); return S_OK; } catch (...) @@ -900,6 +966,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsIncoming(value); return S_OK; } @@ -913,6 +980,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRead(value); return S_OK; } @@ -926,7 +994,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsSeen()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSeen()); return S_OK; } catch (...) @@ -939,6 +1008,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSeen(value); return S_OK; } @@ -952,7 +1022,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsSimMessage()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSimMessage()); return S_OK; } catch (...) @@ -961,10 +1032,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_LocalTimestamp(abi_arg_in value) noexcept override + HRESULT __stdcall put_LocalTimestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LocalTimestamp(*reinterpret_cast(&value)); return S_OK; } @@ -978,7 +1050,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().MessageKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MessageKind()); return S_OK; } catch (...) @@ -991,6 +1064,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageKind(value); return S_OK; } @@ -1004,7 +1078,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().MessageOperatorKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MessageOperatorKind()); return S_OK; } catch (...) @@ -1017,6 +1092,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageOperatorKind(value); return S_OK; } @@ -1026,10 +1102,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_NetworkTimestamp(abi_arg_in value) noexcept override + HRESULT __stdcall put_NetworkTimestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NetworkTimestamp(*reinterpret_cast(&value)); return S_OK; } @@ -1043,7 +1120,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsReceivedDuringQuietHours()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsReceivedDuringQuietHours()); return S_OK; } catch (...) @@ -1056,6 +1134,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsReceivedDuringQuietHours(value); return S_OK; } @@ -1065,10 +1144,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -1082,6 +1162,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Status(value); return S_OK; } @@ -1091,10 +1172,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Subject(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subject(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subject(*reinterpret_cast(&value)); return S_OK; } @@ -1108,7 +1190,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().ShouldSuppressNotification()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShouldSuppressNotification()); return S_OK; } catch (...) @@ -1121,6 +1204,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ShouldSuppressNotification(value); return S_OK; } @@ -1130,11 +1214,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ThreadingInfo(abi_arg_out result) noexcept override + HRESULT __stdcall get_ThreadingInfo(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ThreadingInfo()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ThreadingInfo()); return S_OK; } catch (...) @@ -1144,10 +1229,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ThreadingInfo(abi_arg_in value) noexcept override + HRESULT __stdcall put_ThreadingInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ThreadingInfo(*reinterpret_cast(&value)); return S_OK; } @@ -1157,11 +1243,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RecipientsDeliveryInfos(abi_arg_out> result) noexcept override + HRESULT __stdcall get_RecipientsDeliveryInfos(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RecipientsDeliveryInfos()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RecipientsDeliveryInfos()); return S_OK; } catch (...) @@ -1175,11 +1262,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -1193,11 +1281,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_SyncId(abi_arg_out result) noexcept override + HRESULT __stdcall get_SyncId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SyncId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SyncId()); return S_OK; } catch (...) @@ -1207,10 +1296,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_SyncId(abi_arg_in value) noexcept override + HRESULT __stdcall put_SyncId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SyncId(*reinterpret_cast(&value)); return S_OK; } @@ -1224,11 +1314,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_DataStreamReference(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataStreamReference(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataStreamReference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataStreamReference()); return S_OK; } catch (...) @@ -1238,10 +1329,11 @@ struct produce : pro } } - HRESULT __stdcall put_DataStreamReference(abi_arg_in value) noexcept override + HRESULT __stdcall put_DataStreamReference(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DataStreamReference(*reinterpret_cast(&value)); return S_OK; } @@ -1255,7 +1347,8 @@ struct produce : pro { try { - *value = detach(this->shim().GroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupId()); return S_OK; } catch (...) @@ -1268,6 +1361,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupId(value); return S_OK; } @@ -1277,11 +1371,12 @@ struct produce : pro } } - HRESULT __stdcall get_MimeType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MimeType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MimeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MimeType()); return S_OK; } catch (...) @@ -1291,10 +1386,11 @@ struct produce : pro } } - HRESULT __stdcall put_MimeType(abi_arg_in value) noexcept override + HRESULT __stdcall put_MimeType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MimeType(*reinterpret_cast(&value)); return S_OK; } @@ -1304,11 +1400,12 @@ struct produce : pro } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1318,10 +1415,11 @@ struct produce : pro } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -1335,11 +1433,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Thumbnail(abi_arg_out result) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1349,10 +1448,11 @@ struct produce : pr } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -1366,7 +1466,8 @@ struct produce : pr { try { - *result = detach(this->shim().TransferProgress()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransferProgress()); return S_OK; } catch (...) @@ -1379,6 +1480,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferProgress(value); return S_OK; } @@ -1388,11 +1490,12 @@ struct produce : pr } } - HRESULT __stdcall get_OriginalFileName(abi_arg_out result) noexcept override + HRESULT __stdcall get_OriginalFileName(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OriginalFileName()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OriginalFileName()); return S_OK; } catch (...) @@ -1402,10 +1505,11 @@ struct produce : pr } } - HRESULT __stdcall put_OriginalFileName(abi_arg_in value) noexcept override + HRESULT __stdcall put_OriginalFileName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OriginalFileName(*reinterpret_cast(&value)); return S_OK; } @@ -1419,11 +1523,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateChatMessageAttachment(abi_arg_in mimeType, abi_arg_in dataStreamReference, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateChatMessageAttachment(impl::abi_arg_in mimeType, impl::abi_arg_in dataStreamReference, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateChatMessageAttachment(*reinterpret_cast(&mimeType), *reinterpret_cast(&dataStreamReference))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateChatMessageAttachment(*reinterpret_cast(&mimeType), *reinterpret_cast(&dataStreamReference))); return S_OK; } catch (...) @@ -1437,11 +1542,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_MarkMessageAsBlockedAsync(abi_arg_in localChatMessageId, bool blocked, abi_arg_out value) noexcept override + HRESULT __stdcall abi_MarkMessageAsBlockedAsync(impl::abi_arg_in localChatMessageId, bool blocked, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MarkMessageAsBlockedAsync(*reinterpret_cast(&localChatMessageId), blocked)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MarkMessageAsBlockedAsync(*reinterpret_cast(&localChatMessageId), blocked)); return S_OK; } catch (...) @@ -1459,7 +1565,8 @@ struct produce : produce { try { - *value = detach(this->shim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -1468,11 +1575,12 @@ struct produce : produce } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -1490,6 +1598,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChanges(); return S_OK; } @@ -1499,10 +1608,11 @@ struct produce : p } } - HRESULT __stdcall abi_AcceptChangesThrough(abi_arg_in lastChangeToAcknowledge) noexcept override + HRESULT __stdcall abi_AcceptChangesThrough(impl::abi_arg_in lastChangeToAcknowledge) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChangesThrough(*reinterpret_cast(&lastChangeToAcknowledge)); return S_OK; } @@ -1512,11 +1622,12 @@ struct produce : p } } - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -1534,6 +1645,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Enable(); return S_OK; } @@ -1543,11 +1655,12 @@ struct produce : } } - HRESULT __stdcall abi_GetChangeReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetChangeReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetChangeReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetChangeReader()); return S_OK; } catch (...) @@ -1561,6 +1674,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(); return S_OK; } @@ -1578,6 +1692,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1591,11 +1706,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1609,11 +1725,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_RegisterTransportAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterTransportAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterTransportAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterTransportAsync()); return S_OK; } catch (...) @@ -1623,11 +1740,12 @@ struct produce } } - HRESULT __stdcall abi_GetTransportAsync(abi_arg_in transportId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetTransportAsync(impl::abi_arg_in transportId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetTransportAsync(*reinterpret_cast(&transportId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTransportAsync(*reinterpret_cast(&transportId))); return S_OK; } catch (...) @@ -1641,11 +1759,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetTransportsAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetTransportsAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetTransportsAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTransportsAsync()); return S_OK; } catch (...) @@ -1655,11 +1774,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -1669,11 +1789,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowComposeSmsMessageAsync(abi_arg_in message, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ShowComposeSmsMessageAsync(impl::abi_arg_in message, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowComposeSmsMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowComposeSmsMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -1687,6 +1808,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowSmsSettings(); return S_OK; } @@ -1700,11 +1822,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_RequestSyncManagerAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestSyncManagerAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestSyncManagerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestSyncManagerAsync()); return S_OK; } catch (...) @@ -1718,11 +1841,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ChatMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChatMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChatMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChatMessage()); return S_OK; } catch (...) @@ -1740,7 +1864,8 @@ struct produceshim().ShouldDisplayToast()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShouldDisplayToast()); return S_OK; } catch (...) @@ -1753,7 +1878,8 @@ struct produceshim().ShouldUpdateDetailText()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShouldUpdateDetailText()); return S_OK; } catch (...) @@ -1766,7 +1892,8 @@ struct produceshim().ShouldUpdateBadge()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShouldUpdateBadge()); return S_OK; } catch (...) @@ -1779,7 +1906,8 @@ struct produceshim().ShouldUpdateActionCenter()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShouldUpdateActionCenter()); return S_OK; } catch (...) @@ -1792,11 +1920,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -1810,11 +1939,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync(count)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync(count)); return S_OK; } catch (...) @@ -1828,11 +1958,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -1842,11 +1973,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_DeleteMessageAsync(abi_arg_in localMessageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DeleteMessageAsync(impl::abi_arg_in localMessageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeleteMessageAsync(*reinterpret_cast(&localMessageId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeleteMessageAsync(*reinterpret_cast(&localMessageId))); return S_OK; } catch (...) @@ -1856,11 +1988,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_DownloadMessageAsync(abi_arg_in localChatMessageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DownloadMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DownloadMessageAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadMessageAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -1870,11 +2003,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetMessageAsync(abi_arg_in localChatMessageId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetMessageAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetMessageAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -1884,11 +2018,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetMessageReader1(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetMessageReader1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetMessageReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetMessageReader()); return S_OK; } catch (...) @@ -1898,11 +2033,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetMessageReader2(abi_arg_in recentTimeLimit, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetMessageReader2(impl::abi_arg_in recentTimeLimit, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetMessageReader(*reinterpret_cast(&recentTimeLimit))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetMessageReader(*reinterpret_cast(&recentTimeLimit))); return S_OK; } catch (...) @@ -1912,11 +2048,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_MarkMessageReadAsync(abi_arg_in localChatMessageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_MarkMessageReadAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MarkMessageReadAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MarkMessageReadAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -1926,11 +2063,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_RetrySendMessageAsync(abi_arg_in localChatMessageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_RetrySendMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RetrySendMessageAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetrySendMessageAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -1940,11 +2078,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SendMessageAsync(abi_arg_in chatMessage, abi_arg_out value) noexcept override + HRESULT __stdcall abi_SendMessageAsync(impl::abi_arg_in chatMessage, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SendMessageAsync(*reinterpret_cast(&chatMessage))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SendMessageAsync(*reinterpret_cast(&chatMessage))); return S_OK; } catch (...) @@ -1954,11 +2093,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ValidateMessage(abi_arg_in chatMessage, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ValidateMessage(impl::abi_arg_in chatMessage, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValidateMessage(*reinterpret_cast(&chatMessage))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValidateMessage(*reinterpret_cast(&chatMessage))); return S_OK; } catch (...) @@ -1968,11 +2108,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_MessageChanged(abi_arg_in> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_MessageChanged(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().MessageChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MessageChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1985,6 +2126,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageChanged(value); return S_OK; } @@ -1998,11 +2140,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_ForwardMessageAsync(abi_arg_in localChatMessageId, abi_arg_in> addresses, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ForwardMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_in> addresses, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ForwardMessageAsync(*reinterpret_cast(&localChatMessageId), *reinterpret_cast *>(&addresses))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ForwardMessageAsync(*reinterpret_cast(&localChatMessageId), *reinterpret_cast *>(&addresses))); return S_OK; } catch (...) @@ -2012,11 +2155,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetConversationAsync(abi_arg_in conversationId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetConversationAsync(impl::abi_arg_in conversationId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetConversationAsync(*reinterpret_cast(&conversationId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationAsync(*reinterpret_cast(&conversationId))); return S_OK; } catch (...) @@ -2026,11 +2170,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetConversationForTransportsAsync(abi_arg_in conversationId, abi_arg_in> transportIds, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetConversationForTransportsAsync(impl::abi_arg_in conversationId, impl::abi_arg_in> transportIds, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetConversationAsync(*reinterpret_cast(&conversationId), *reinterpret_cast *>(&transportIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationAsync(*reinterpret_cast(&conversationId), *reinterpret_cast *>(&transportIds))); return S_OK; } catch (...) @@ -2040,11 +2185,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetConversationFromThreadingInfoAsync(abi_arg_in threadingInfo, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetConversationFromThreadingInfoAsync(impl::abi_arg_in threadingInfo, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetConversationFromThreadingInfoAsync(*reinterpret_cast(&threadingInfo))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationFromThreadingInfoAsync(*reinterpret_cast(&threadingInfo))); return S_OK; } catch (...) @@ -2054,11 +2200,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetConversationReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader()); return S_OK; } catch (...) @@ -2068,11 +2215,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetConversationForTransportsReader(abi_arg_in> transportIds, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationForTransportsReader(impl::abi_arg_in> transportIds, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader(*reinterpret_cast *>(&transportIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader(*reinterpret_cast *>(&transportIds))); return S_OK; } catch (...) @@ -2082,11 +2230,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetMessageByRemoteIdAsync(abi_arg_in transportId, abi_arg_in remoteId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageByRemoteIdAsync(impl::abi_arg_in transportId, impl::abi_arg_in remoteId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageByRemoteIdAsync(*reinterpret_cast(&transportId), *reinterpret_cast(&remoteId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageByRemoteIdAsync(*reinterpret_cast(&transportId), *reinterpret_cast(&remoteId))); return S_OK; } catch (...) @@ -2096,11 +2245,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetUnseenCountAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetUnseenCountAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetUnseenCountAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetUnseenCountAsync()); return S_OK; } catch (...) @@ -2110,11 +2260,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetUnseenCountForTransportsReaderAsync(abi_arg_in> transportIds, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetUnseenCountForTransportsReaderAsync(impl::abi_arg_in> transportIds, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetUnseenCountAsync(*reinterpret_cast *>(&transportIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetUnseenCountAsync(*reinterpret_cast *>(&transportIds))); return S_OK; } catch (...) @@ -2124,11 +2275,12 @@ struct produce : produce } } - HRESULT __stdcall abi_MarkAsSeenAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkAsSeenAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkAsSeenAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkAsSeenAsync()); return S_OK; } catch (...) @@ -2138,11 +2290,12 @@ struct produce : produce } } - HRESULT __stdcall abi_MarkAsSeenForTransportsAsync(abi_arg_in> transportIds, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkAsSeenForTransportsAsync(impl::abi_arg_in> transportIds, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkAsSeenAsync(*reinterpret_cast *>(&transportIds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkAsSeenAsync(*reinterpret_cast *>(&transportIds))); return S_OK; } catch (...) @@ -2152,11 +2305,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetSearchReader(abi_arg_in value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetSearchReader(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSearchReader(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSearchReader(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -2166,11 +2320,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SaveMessageAsync(abi_arg_in chatMessage, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveMessageAsync(impl::abi_arg_in chatMessage, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveMessageAsync(*reinterpret_cast(&chatMessage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveMessageAsync(*reinterpret_cast(&chatMessage))); return S_OK; } catch (...) @@ -2180,11 +2335,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TryCancelDownloadMessageAsync(abi_arg_in localChatMessageId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryCancelDownloadMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryCancelDownloadMessageAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCancelDownloadMessageAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -2194,11 +2350,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TryCancelSendMessageAsync(abi_arg_in localChatMessageId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryCancelSendMessageAsync(impl::abi_arg_in localChatMessageId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryCancelSendMessageAsync(*reinterpret_cast(&localChatMessageId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCancelSendMessageAsync(*reinterpret_cast(&localChatMessageId))); return S_OK; } catch (...) @@ -2208,11 +2365,12 @@ struct produce : produce } } - HRESULT __stdcall add_StoreChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StoreChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StoreChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StoreChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2225,6 +2383,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().StoreChanged(token); return S_OK; } @@ -2238,11 +2397,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetMessageBySyncIdAsync(abi_arg_in syncId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageBySyncIdAsync(impl::abi_arg_in syncId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageBySyncIdAsync(*reinterpret_cast(&syncId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageBySyncIdAsync(*reinterpret_cast(&syncId))); return S_OK; } catch (...) @@ -2256,11 +2416,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out result) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2274,7 +2435,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -2291,7 +2453,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsAppSetAsNotificationProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAppSetAsNotificationProvider()); return S_OK; } catch (...) @@ -2304,7 +2467,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -2313,11 +2477,12 @@ struct produce : prod } } - HRESULT __stdcall get_TransportFriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportFriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportFriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportFriendlyName()); return S_OK; } catch (...) @@ -2327,11 +2492,12 @@ struct produce : prod } } - HRESULT __stdcall get_TransportId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportId()); return S_OK; } catch (...) @@ -2341,11 +2507,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestSetAsNotificationProviderAsync(abi_arg_out value) noexcept override + HRESULT __stdcall abi_RequestSetAsNotificationProviderAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestSetAsNotificationProviderAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestSetAsNotificationProviderAsync()); return S_OK; } catch (...) @@ -2359,11 +2526,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Configuration(abi_arg_out result) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -2377,7 +2545,8 @@ struct produce : pro { try { - *result = detach(this->shim().TransportKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportKind()); return S_OK; } catch (...) @@ -2394,7 +2563,8 @@ struct produceshim().MaxAttachmentCount()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxAttachmentCount()); return S_OK; } catch (...) @@ -2407,7 +2577,8 @@ struct produceshim().MaxMessageSizeInKilobytes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxMessageSizeInKilobytes()); return S_OK; } catch (...) @@ -2420,7 +2591,8 @@ struct produceshim().MaxRecipientCount()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxRecipientCount()); return S_OK; } catch (...) @@ -2429,11 +2601,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_SupportedVideoFormat(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SupportedVideoFormat()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedVideoFormat()); return S_OK; } catch (...) @@ -2443,11 +2616,12 @@ struct produce> result) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -2461,11 +2635,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MaxPartCount(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MaxPartCount(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxPartCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPartCount()); return S_OK; } catch (...) @@ -2475,11 +2650,12 @@ struct produce } } - HRESULT __stdcall get_PartCount(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PartCount(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PartCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartCount()); return S_OK; } catch (...) @@ -2489,11 +2665,12 @@ struct produce } } - HRESULT __stdcall get_RemainingCharacterCountInPart(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemainingCharacterCountInPart(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemainingCharacterCountInPart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingCharacterCountInPart()); return S_OK; } catch (...) @@ -2507,7 +2684,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2520,11 +2698,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_SearchString(abi_arg_out result) noexcept override + HRESULT __stdcall get_SearchString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SearchString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SearchString()); return S_OK; } catch (...) @@ -2534,10 +2713,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_SearchString(abi_arg_in value) noexcept override + HRESULT __stdcall put_SearchString(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchString(*reinterpret_cast(&value)); return S_OK; } @@ -2551,11 +2731,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_TransportAddress(abi_arg_out result) noexcept override + HRESULT __stdcall get_TransportAddress(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TransportAddress()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportAddress()); return S_OK; } catch (...) @@ -2565,10 +2746,11 @@ struct produce : } } - HRESULT __stdcall put_TransportAddress(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransportAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransportAddress(*reinterpret_cast(&value)); return S_OK; } @@ -2578,11 +2760,12 @@ struct produce : } } - HRESULT __stdcall get_DeliveryTime(abi_arg_out> result) noexcept override + HRESULT __stdcall get_DeliveryTime(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DeliveryTime()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeliveryTime()); return S_OK; } catch (...) @@ -2592,10 +2775,11 @@ struct produce : } } - HRESULT __stdcall put_DeliveryTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_DeliveryTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeliveryTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2605,11 +2789,12 @@ struct produce : } } - HRESULT __stdcall get_ReadTime(abi_arg_out> result) noexcept override + HRESULT __stdcall get_ReadTime(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ReadTime()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadTime()); return S_OK; } catch (...) @@ -2619,10 +2804,11 @@ struct produce : } } - HRESULT __stdcall put_ReadTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ReadTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2636,7 +2822,8 @@ struct produce : { try { - *result = detach(this->shim().TransportErrorCodeCategory()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportErrorCodeCategory()); return S_OK; } catch (...) @@ -2649,7 +2836,8 @@ struct produce : { try { - *result = detach(this->shim().TransportInterpretedErrorCode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportInterpretedErrorCode()); return S_OK; } catch (...) @@ -2662,7 +2850,8 @@ struct produce : { try { - *result = detach(this->shim().TransportErrorCode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportErrorCode()); return S_OK; } catch (...) @@ -2675,7 +2864,8 @@ struct produce : { try { - *result = detach(this->shim().IsErrorPermanent()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsErrorPermanent()); return S_OK; } catch (...) @@ -2688,7 +2878,8 @@ struct produce : { try { - *result = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2701,11 +2892,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -2715,11 +2907,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ReadBatchWithCountAsync(int32_t count, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync(count)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync(count)); return S_OK; } catch (...) @@ -2737,7 +2930,8 @@ struct produce : pro { try { - *result = detach(this->shim().IsSyncEnabled()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSyncEnabled()); return S_OK; } catch (...) @@ -2750,6 +2944,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSyncEnabled(value); return S_OK; } @@ -2763,7 +2958,8 @@ struct produce : pro { try { - *result = detach(this->shim().RestoreHistorySpan()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RestoreHistorySpan()); return S_OK; } catch (...) @@ -2776,6 +2972,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().RestoreHistorySpan(value); return S_OK; } @@ -2789,11 +2986,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Configuration(abi_arg_out result) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -2803,11 +3001,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_AssociateAccountAsync(abi_arg_in webAccount, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AssociateAccountAsync(impl::abi_arg_in webAccount, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AssociateAccountAsync(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AssociateAccountAsync(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -2817,11 +3016,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_UnassociateAccountAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnassociateAccountAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnassociateAccountAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnassociateAccountAsync()); return S_OK; } catch (...) @@ -2831,11 +3031,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_IsAccountAssociated(abi_arg_in webAccount, bool * result) noexcept override + HRESULT __stdcall abi_IsAccountAssociated(impl::abi_arg_in webAccount, bool * result) noexcept override { try { - *result = detach(this->shim().IsAccountAssociated(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsAccountAssociated(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -2848,6 +3049,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().StartSync(); return S_OK; } @@ -2857,11 +3059,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetConfigurationAsync(abi_arg_in configuration, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SetConfigurationAsync(impl::abi_arg_in configuration, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SetConfigurationAsync(*reinterpret_cast(&configuration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetConfigurationAsync(*reinterpret_cast(&configuration))); return S_OK; } catch (...) @@ -2875,11 +3078,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_TransportId(abi_arg_out result) noexcept override + HRESULT __stdcall get_TransportId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TransportId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportId()); return S_OK; } catch (...) @@ -2889,11 +3093,12 @@ struct produce : produce } } - HRESULT __stdcall get_Title(abi_arg_out result) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -2903,11 +3108,12 @@ struct produce : produce } } - HRESULT __stdcall get_Text(abi_arg_out result) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -2921,7 +3127,8 @@ struct produce : produce { try { - *result = detach(this->shim().IsPinRequired()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsPinRequired()); return S_OK; } catch (...) @@ -2930,11 +3137,12 @@ struct produce : produce } } - HRESULT __stdcall get_Actions(abi_arg_out> result) noexcept override + HRESULT __stdcall get_Actions(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().Actions()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Actions()); return S_OK; } catch (...) @@ -2944,11 +3152,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SendResponseAsync(abi_arg_in action, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SendResponseAsync(impl::abi_arg_in action, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SendResponseAsync(*reinterpret_cast(&action))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendResponseAsync(*reinterpret_cast(&action))); return S_OK; } catch (...) @@ -2958,11 +3167,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SendResponseWithPinAsync(abi_arg_in action, abi_arg_in pin, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SendResponseWithPinAsync(impl::abi_arg_in action, impl::abi_arg_in pin, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SendResponseWithPinAsync(*reinterpret_cast(&action), *reinterpret_cast(&pin))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendResponseWithPinAsync(*reinterpret_cast(&action), *reinterpret_cast(&pin))); return S_OK; } catch (...) @@ -2976,11 +3186,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Label(abi_arg_out result) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -2998,7 +3209,8 @@ struct produceshim().IsMessageAvailable()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsMessageAvailable()); return S_OK; } catch (...) @@ -3007,11 +3219,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -3025,11 +3238,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -3039,11 +3253,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -3057,11 +3272,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_MessageAvailableChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_MessageAvailableChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MessageAvailableChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MessageAvailableChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3074,6 +3290,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageAvailableChanged(token); return S_OK; } @@ -3087,11 +3304,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetEndUserMessageManager(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetEndUserMessageManager(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetEndUserMessageManager()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetEndUserMessageManager()); return S_OK; } catch (...) @@ -3101,11 +3319,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetTransportsAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetTransportsAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetTransportsAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTransportsAsync()); return S_OK; } catch (...) @@ -3115,11 +3334,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetTransportAsync(abi_arg_in transportId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetTransportAsync(impl::abi_arg_in transportId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetTransportAsync(*reinterpret_cast(&transportId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTransportAsync(*reinterpret_cast(&transportId))); return S_OK; } catch (...) @@ -3129,11 +3349,12 @@ struct produce : produce } } - HRESULT __stdcall abi_LeaveConversationAsync(abi_arg_in conversation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_LeaveConversationAsync(impl::abi_arg_in conversation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeaveConversationAsync(*reinterpret_cast(&conversation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeaveConversationAsync(*reinterpret_cast(&conversation))); return S_OK; } catch (...) @@ -3151,7 +3372,8 @@ struct produceshim().ServiceKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ServiceKind()); return S_OK; } catch (...) @@ -3164,11 +3386,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ExtendedProperties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -3182,7 +3405,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -3191,11 +3415,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TransportFriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportFriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportFriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportFriendlyName()); return S_OK; } catch (...) @@ -3205,11 +3430,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TransportId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportId()); return S_OK; } catch (...) @@ -3219,11 +3445,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Configuration(abi_arg_out result) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -3237,7 +3464,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsStoreAndForwardEnabled(serviceKind)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsStoreAndForwardEnabled(serviceKind)); return S_OK; } catch (...) @@ -3250,7 +3478,8 @@ struct produce : produce_base { try { - *result = detach(this->shim().IsServiceKindSupported(serviceKind)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsServiceKindSupported(serviceKind)); return S_OK; } catch (...) @@ -3259,11 +3488,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_ServiceKindSupportedChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ServiceKindSupportedChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ServiceKindSupportedChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ServiceKindSupportedChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3276,6 +3506,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceKindSupportedChanged(token); return S_OK; } @@ -3293,7 +3524,8 @@ struct produce : { try { - *result = detach(this->shim().MaxAttachmentCount()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxAttachmentCount()); return S_OK; } catch (...) @@ -3306,7 +3538,8 @@ struct produce : { try { - *result = detach(this->shim().MaxMessageSizeInKilobytes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxMessageSizeInKilobytes()); return S_OK; } catch (...) @@ -3319,7 +3552,8 @@ struct produce : { try { - *result = detach(this->shim().MaxGroupMessageSizeInKilobytes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxGroupMessageSizeInKilobytes()); return S_OK; } catch (...) @@ -3332,7 +3566,8 @@ struct produce : { try { - *result = detach(this->shim().MaxRecipientCount()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxRecipientCount()); return S_OK; } catch (...) @@ -3345,7 +3580,8 @@ struct produce : { try { - *result = detach(this->shim().MaxFileSizeInKilobytes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MaxFileSizeInKilobytes()); return S_OK; } catch (...) @@ -3358,7 +3594,8 @@ struct produce : { try { - *result = detach(this->shim().WarningFileSizeInKilobytes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WarningFileSizeInKilobytes()); return S_OK; } catch (...) @@ -3371,11 +3608,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_TransportId(abi_arg_out result) noexcept override + HRESULT __stdcall get_TransportId(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TransportId()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransportId()); return S_OK; } catch (...) @@ -3385,11 +3623,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_ParticipantAddress(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ParticipantAddress()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ParticipantAddress()); return S_OK; } catch (...) @@ -3403,7 +3642,8 @@ struct produceshim().IsComposing()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsComposing()); return S_OK; } catch (...) @@ -3420,545 +3660,545 @@ namespace Windows::ApplicationModel::Chat { template bool impl_IChatMessageTransport::IsAppSetAsNotificationProvider() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAppSetAsNotificationProvider(&value)); + check_hresult(WINRT_SHIM(IChatMessageTransport)->get_IsAppSetAsNotificationProvider(&value)); return value; } template bool impl_IChatMessageTransport::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IChatMessageTransport)->get_IsActive(&value)); return value; } template hstring impl_IChatMessageTransport::TransportFriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportFriendlyName(put(value))); + check_hresult(WINRT_SHIM(IChatMessageTransport)->get_TransportFriendlyName(put_abi(value))); return value; } template hstring impl_IChatMessageTransport::TransportId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportId(put(value))); + check_hresult(WINRT_SHIM(IChatMessageTransport)->get_TransportId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IChatMessageTransport::RequestSetAsNotificationProviderAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_RequestSetAsNotificationProviderAsync(put(value))); + check_hresult(WINRT_SHIM(IChatMessageTransport)->abi_RequestSetAsNotificationProviderAsync(put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageTransportConfiguration impl_IChatMessageTransport2::Configuration() const { Windows::ApplicationModel::Chat::ChatMessageTransportConfiguration result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(result))); + check_hresult(WINRT_SHIM(IChatMessageTransport2)->get_Configuration(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatMessageTransportKind impl_IChatMessageTransport2::TransportKind() const { Windows::ApplicationModel::Chat::ChatMessageTransportKind result {}; - check_hresult(static_cast(static_cast(*this))->get_TransportKind(&result)); + check_hresult(WINRT_SHIM(IChatMessageTransport2)->get_TransportKind(&result)); return result; } template int32_t impl_IChatMessageTransportConfiguration::MaxAttachmentCount() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAttachmentCount(&result)); + check_hresult(WINRT_SHIM(IChatMessageTransportConfiguration)->get_MaxAttachmentCount(&result)); return result; } template int32_t impl_IChatMessageTransportConfiguration::MaxMessageSizeInKilobytes() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxMessageSizeInKilobytes(&result)); + check_hresult(WINRT_SHIM(IChatMessageTransportConfiguration)->get_MaxMessageSizeInKilobytes(&result)); return result; } template int32_t impl_IChatMessageTransportConfiguration::MaxRecipientCount() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxRecipientCount(&result)); + check_hresult(WINRT_SHIM(IChatMessageTransportConfiguration)->get_MaxRecipientCount(&result)); return result; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IChatMessageTransportConfiguration::SupportedVideoFormat() const { Windows::Media::MediaProperties::MediaEncodingProfile result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportedVideoFormat(put(result))); + check_hresult(WINRT_SHIM(IChatMessageTransportConfiguration)->get_SupportedVideoFormat(put_abi(result))); return result; } -template Windows::Foundation::Collections::IMapView impl_IChatMessageTransportConfiguration::ExtendedProperties() const +template Windows::Foundation::Collections::IMapView impl_IChatMessageTransportConfiguration::ExtendedProperties() const { - Windows::Foundation::Collections::IMapView result; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(result))); + Windows::Foundation::Collections::IMapView result; + check_hresult(WINRT_SHIM(IChatMessageTransportConfiguration)->get_ExtendedProperties(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatMessageChangeType impl_IChatMessageChange::ChangeType() const { Windows::ApplicationModel::Chat::ChatMessageChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IChatMessageChange)->get_ChangeType(&value)); return value; } template Windows::ApplicationModel::Chat::ChatMessage impl_IChatMessageChange::Message() const { Windows::ApplicationModel::Chat::ChatMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IChatMessageChange)->get_Message(put_abi(value))); return value; } template void impl_IChatMessageChangeReader::AcceptChanges() const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChanges()); + check_hresult(WINRT_SHIM(IChatMessageChangeReader)->abi_AcceptChanges()); } template void impl_IChatMessageChangeReader::AcceptChangesThrough(const Windows::ApplicationModel::Chat::ChatMessageChange & lastChangeToAcknowledge) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChangesThrough(get(lastChangeToAcknowledge))); + check_hresult(WINRT_SHIM(IChatMessageChangeReader)->abi_AcceptChangesThrough(get_abi(lastChangeToAcknowledge))); } template Windows::Foundation::IAsyncOperation> impl_IChatMessageChangeReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(value))); + check_hresult(WINRT_SHIM(IChatMessageChangeReader)->abi_ReadBatchAsync(put_abi(value))); return value; } template void impl_IChatMessageChangeTracker::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IChatMessageChangeTracker)->abi_Enable()); } template Windows::ApplicationModel::Chat::ChatMessageChangeReader impl_IChatMessageChangeTracker::GetChangeReader() const { Windows::ApplicationModel::Chat::ChatMessageChangeReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChangeReader(put(value))); + check_hresult(WINRT_SHIM(IChatMessageChangeTracker)->abi_GetChangeReader(put_abi(value))); return value; } template void impl_IChatMessageChangeTracker::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IChatMessageChangeTracker)->abi_Reset()); } template Windows::Foundation::IReference impl_IChatMessageValidationResult::MaxPartCount() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxPartCount(put(value))); + check_hresult(WINRT_SHIM(IChatMessageValidationResult)->get_MaxPartCount(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IChatMessageValidationResult::PartCount() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PartCount(put(value))); + check_hresult(WINRT_SHIM(IChatMessageValidationResult)->get_PartCount(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IChatMessageValidationResult::RemainingCharacterCountInPart() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RemainingCharacterCountInPart(put(value))); + check_hresult(WINRT_SHIM(IChatMessageValidationResult)->get_RemainingCharacterCountInPart(put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageValidationStatus impl_IChatMessageValidationResult::Status() const { Windows::ApplicationModel::Chat::ChatMessageValidationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IChatMessageValidationResult)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IChatMessage::Attachments() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Attachments(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_Attachments(put_abi(value))); return value; } template hstring impl_IChatMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_Body(put_abi(value))); return value; } -template void impl_IChatMessage::Body(hstring_ref value) const +template void impl_IChatMessage::Body(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Body(get(value))); + check_hresult(WINRT_SHIM(IChatMessage)->put_Body(get_abi(value))); } template hstring impl_IChatMessage::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_From(put_abi(value))); return value; } template hstring impl_IChatMessage::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_Id(put_abi(value))); return value; } template bool impl_IChatMessage::IsForwardingDisabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsForwardingDisabled(&value)); + check_hresult(WINRT_SHIM(IChatMessage)->get_IsForwardingDisabled(&value)); return value; } template bool impl_IChatMessage::IsIncoming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIncoming(&value)); + check_hresult(WINRT_SHIM(IChatMessage)->get_IsIncoming(&value)); return value; } template bool impl_IChatMessage::IsRead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRead(&value)); + check_hresult(WINRT_SHIM(IChatMessage)->get_IsRead(&value)); return value; } template Windows::Foundation::DateTime impl_IChatMessage::LocalTimestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LocalTimestamp(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_LocalTimestamp(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IChatMessage::NetworkTimestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkTimestamp(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_NetworkTimestamp(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IChatMessage::Recipients() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Recipients(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_Recipients(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IChatMessage::RecipientSendStatuses() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_RecipientSendStatuses(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_RecipientSendStatuses(put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageStatus impl_IChatMessage::Status() const { Windows::ApplicationModel::Chat::ChatMessageStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IChatMessage)->get_Status(&value)); return value; } template hstring impl_IChatMessage::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_Subject(put_abi(value))); return value; } template hstring impl_IChatMessage::TransportFriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportFriendlyName(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_TransportFriendlyName(put_abi(value))); return value; } template hstring impl_IChatMessage::TransportId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportId(put(value))); + check_hresult(WINRT_SHIM(IChatMessage)->get_TransportId(put_abi(value))); return value; } -template void impl_IChatMessage::TransportId(hstring_ref value) const +template void impl_IChatMessage::TransportId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TransportId(get(value))); + check_hresult(WINRT_SHIM(IChatMessage)->put_TransportId(get_abi(value))); } template hstring impl_IChatMessage3::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IChatMessage3)->get_RemoteId(put_abi(value))); return value; } template uint64_t impl_IChatMessage2::EstimatedDownloadSize() const { uint64_t result {}; - check_hresult(static_cast(static_cast(*this))->get_EstimatedDownloadSize(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_EstimatedDownloadSize(&result)); return result; } template void impl_IChatMessage2::EstimatedDownloadSize(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_EstimatedDownloadSize(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_EstimatedDownloadSize(value)); } -template void impl_IChatMessage2::From(hstring_ref value) const +template void impl_IChatMessage2::From(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_From(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_From(get_abi(value))); } template bool impl_IChatMessage2::IsAutoReply() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsAutoReply(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_IsAutoReply(&result)); return result; } template void impl_IChatMessage2::IsAutoReply(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAutoReply(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsAutoReply(value)); } template void impl_IChatMessage2::IsForwardingDisabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsForwardingDisabled(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsForwardingDisabled(value)); } template bool impl_IChatMessage2::IsReplyDisabled() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsReplyDisabled(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_IsReplyDisabled(&result)); return result; } template void impl_IChatMessage2::IsIncoming(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIncoming(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsIncoming(value)); } template void impl_IChatMessage2::IsRead(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRead(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsRead(value)); } template bool impl_IChatMessage2::IsSeen() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsSeen(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_IsSeen(&result)); return result; } template void impl_IChatMessage2::IsSeen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSeen(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsSeen(value)); } template bool impl_IChatMessage2::IsSimMessage() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsSimMessage(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_IsSimMessage(&result)); return result; } template void impl_IChatMessage2::LocalTimestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LocalTimestamp(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_LocalTimestamp(get_abi(value))); } template Windows::ApplicationModel::Chat::ChatMessageKind impl_IChatMessage2::MessageKind() const { Windows::ApplicationModel::Chat::ChatMessageKind result {}; - check_hresult(static_cast(static_cast(*this))->get_MessageKind(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_MessageKind(&result)); return result; } template void impl_IChatMessage2::MessageKind(Windows::ApplicationModel::Chat::ChatMessageKind value) const { - check_hresult(static_cast(static_cast(*this))->put_MessageKind(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_MessageKind(value)); } template Windows::ApplicationModel::Chat::ChatMessageOperatorKind impl_IChatMessage2::MessageOperatorKind() const { Windows::ApplicationModel::Chat::ChatMessageOperatorKind result {}; - check_hresult(static_cast(static_cast(*this))->get_MessageOperatorKind(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_MessageOperatorKind(&result)); return result; } template void impl_IChatMessage2::MessageOperatorKind(Windows::ApplicationModel::Chat::ChatMessageOperatorKind value) const { - check_hresult(static_cast(static_cast(*this))->put_MessageOperatorKind(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_MessageOperatorKind(value)); } template void impl_IChatMessage2::NetworkTimestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_NetworkTimestamp(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_NetworkTimestamp(get_abi(value))); } template bool impl_IChatMessage2::IsReceivedDuringQuietHours() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsReceivedDuringQuietHours(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_IsReceivedDuringQuietHours(&result)); return result; } template void impl_IChatMessage2::IsReceivedDuringQuietHours(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsReceivedDuringQuietHours(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_IsReceivedDuringQuietHours(value)); } -template void impl_IChatMessage2::RemoteId(hstring_ref value) const +template void impl_IChatMessage2::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_RemoteId(get_abi(value))); } template void impl_IChatMessage2::Status(Windows::ApplicationModel::Chat::ChatMessageStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_Status(value)); } -template void impl_IChatMessage2::Subject(hstring_ref value) const +template void impl_IChatMessage2::Subject(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subject(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_Subject(get_abi(value))); } template bool impl_IChatMessage2::ShouldSuppressNotification() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldSuppressNotification(&result)); + check_hresult(WINRT_SHIM(IChatMessage2)->get_ShouldSuppressNotification(&result)); return result; } template void impl_IChatMessage2::ShouldSuppressNotification(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShouldSuppressNotification(value)); + check_hresult(WINRT_SHIM(IChatMessage2)->put_ShouldSuppressNotification(value)); } template Windows::ApplicationModel::Chat::ChatConversationThreadingInfo impl_IChatMessage2::ThreadingInfo() const { Windows::ApplicationModel::Chat::ChatConversationThreadingInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ThreadingInfo(put(result))); + check_hresult(WINRT_SHIM(IChatMessage2)->get_ThreadingInfo(put_abi(result))); return result; } template void impl_IChatMessage2::ThreadingInfo(const Windows::ApplicationModel::Chat::ChatConversationThreadingInfo & value) const { - check_hresult(static_cast(static_cast(*this))->put_ThreadingInfo(get(value))); + check_hresult(WINRT_SHIM(IChatMessage2)->put_ThreadingInfo(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IChatMessage2::RecipientsDeliveryInfos() const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->get_RecipientsDeliveryInfos(put(result))); + check_hresult(WINRT_SHIM(IChatMessage2)->get_RecipientsDeliveryInfos(put_abi(result))); return result; } template hstring impl_IChatMessage4::SyncId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_SyncId(put(result))); + check_hresult(WINRT_SHIM(IChatMessage4)->get_SyncId(put_abi(result))); return result; } -template void impl_IChatMessage4::SyncId(hstring_ref value) const +template void impl_IChatMessage4::SyncId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SyncId(get(value))); + check_hresult(WINRT_SHIM(IChatMessage4)->put_SyncId(get_abi(value))); } template hstring impl_IChatQueryOptions::SearchString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_SearchString(put(result))); + check_hresult(WINRT_SHIM(IChatQueryOptions)->get_SearchString(put_abi(result))); return result; } -template void impl_IChatQueryOptions::SearchString(hstring_ref value) const +template void impl_IChatQueryOptions::SearchString(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchString(get(value))); + check_hresult(WINRT_SHIM(IChatQueryOptions)->put_SearchString(get_abi(value))); } template Windows::ApplicationModel::Chat::ChatMessageChangeTracker impl_IChatMessageStore::ChangeTracker() const { Windows::ApplicationModel::Chat::ChatMessageChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->get_ChangeTracker(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IChatMessageStore::DeleteMessageAsync(hstring_ref localMessageId) const +template Windows::Foundation::IAsyncAction impl_IChatMessageStore::DeleteMessageAsync(hstring_view localMessageId) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DeleteMessageAsync(get(localMessageId), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_DeleteMessageAsync(get_abi(localMessageId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IChatMessageStore::DownloadMessageAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncAction impl_IChatMessageStore::DownloadMessageAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DownloadMessageAsync(get(localChatMessageId), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_DownloadMessageAsync(get_abi(localChatMessageId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore::GetMessageAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore::GetMessageAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageAsync(get(localChatMessageId), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_GetMessageAsync(get_abi(localChatMessageId), put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageReader impl_IChatMessageStore::GetMessageReader() const { Windows::ApplicationModel::Chat::ChatMessageReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader1(put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_GetMessageReader1(put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageReader impl_IChatMessageStore::GetMessageReader(const Windows::Foundation::TimeSpan & recentTimeLimit) const { Windows::ApplicationModel::Chat::ChatMessageReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader2(get(recentTimeLimit), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_GetMessageReader2(get_abi(recentTimeLimit), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IChatMessageStore::MarkMessageReadAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncAction impl_IChatMessageStore::MarkMessageReadAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_MarkMessageReadAsync(get(localChatMessageId), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_MarkMessageReadAsync(get_abi(localChatMessageId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IChatMessageStore::RetrySendMessageAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncAction impl_IChatMessageStore::RetrySendMessageAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_RetrySendMessageAsync(get(localChatMessageId), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_RetrySendMessageAsync(get_abi(localChatMessageId), put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IChatMessageStore::SendMessageAsync(const Windows::ApplicationModel::Chat::ChatMessage & chatMessage) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAsync(get(chatMessage), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_SendMessageAsync(get_abi(chatMessage), put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessageValidationResult impl_IChatMessageStore::ValidateMessage(const Windows::ApplicationModel::Chat::ChatMessage & chatMessage) const { Windows::ApplicationModel::Chat::ChatMessageValidationResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ValidateMessage(get(chatMessage), put(value))); + check_hresult(WINRT_SHIM(IChatMessageStore)->abi_ValidateMessage(get_abi(chatMessage), put_abi(value))); return value; } template event_token impl_IChatMessageStore::MessageChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_MessageChanged(get(value), &returnValue)); + check_hresult(WINRT_SHIM(IChatMessageStore)->add_MessageChanged(get_abi(value), &returnValue)); return returnValue; } @@ -3969,118 +4209,118 @@ template event_revoker impl_IChatMessageStore template void impl_IChatMessageStore::MessageChanged(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageChanged(value)); + check_hresult(WINRT_SHIM(IChatMessageStore)->remove_MessageChanged(value)); } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::ForwardMessageAsync(hstring_ref localChatMessageId, const Windows::Foundation::Collections::IIterable & addresses) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::ForwardMessageAsync(hstring_view localChatMessageId, iterable addresses) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ForwardMessageAsync(get(localChatMessageId), get(addresses), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_ForwardMessageAsync(get_abi(localChatMessageId), get_abi(addresses), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetConversationAsync(hstring_ref conversationId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetConversationAsync(hstring_view conversationId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationAsync(get(conversationId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetConversationAsync(get_abi(conversationId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetConversationAsync(hstring_ref conversationId, const Windows::Foundation::Collections::IIterable & transportIds) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetConversationAsync(hstring_view conversationId, iterable transportIds) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationForTransportsAsync(get(conversationId), get(transportIds), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetConversationForTransportsAsync(get_abi(conversationId), get_abi(transportIds), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetConversationFromThreadingInfoAsync(const Windows::ApplicationModel::Chat::ChatConversationThreadingInfo & threadingInfo) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationFromThreadingInfoAsync(get(threadingInfo), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetConversationFromThreadingInfoAsync(get_abi(threadingInfo), put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatConversationReader impl_IChatMessageStore2::GetConversationReader() const { Windows::ApplicationModel::Chat::ChatConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReader(put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetConversationReader(put_abi(result))); return result; } -template Windows::ApplicationModel::Chat::ChatConversationReader impl_IChatMessageStore2::GetConversationReader(const Windows::Foundation::Collections::IIterable & transportIds) const +template Windows::ApplicationModel::Chat::ChatConversationReader impl_IChatMessageStore2::GetConversationReader(iterable transportIds) const { Windows::ApplicationModel::Chat::ChatConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationForTransportsReader(get(transportIds), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetConversationForTransportsReader(get_abi(transportIds), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetMessageByRemoteIdAsync(hstring_ref transportId, hstring_ref remoteId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetMessageByRemoteIdAsync(hstring_view transportId, hstring_view remoteId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageByRemoteIdAsync(get(transportId), get(remoteId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetMessageByRemoteIdAsync(get_abi(transportId), get_abi(remoteId), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetUnseenCountAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetUnseenCountAsync(put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetUnseenCountAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetUnseenCountAsync(const Windows::Foundation::Collections::IIterable & transportIds) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::GetUnseenCountAsync(iterable transportIds) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetUnseenCountForTransportsReaderAsync(get(transportIds), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetUnseenCountForTransportsReaderAsync(get_abi(transportIds), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatMessageStore2::MarkAsSeenAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkAsSeenAsync(put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_MarkAsSeenAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IChatMessageStore2::MarkAsSeenAsync(const Windows::Foundation::Collections::IIterable & transportIds) const +template Windows::Foundation::IAsyncAction impl_IChatMessageStore2::MarkAsSeenAsync(iterable transportIds) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkAsSeenForTransportsAsync(get(transportIds), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_MarkAsSeenForTransportsAsync(get_abi(transportIds), put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatSearchReader impl_IChatMessageStore2::GetSearchReader(const Windows::ApplicationModel::Chat::ChatQueryOptions & value) const { Windows::ApplicationModel::Chat::ChatSearchReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSearchReader(get(value), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_GetSearchReader(get_abi(value), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatMessageStore2::SaveMessageAsync(const Windows::ApplicationModel::Chat::ChatMessage & chatMessage) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveMessageAsync(get(chatMessage), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_SaveMessageAsync(get_abi(chatMessage), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::TryCancelDownloadMessageAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::TryCancelDownloadMessageAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryCancelDownloadMessageAsync(get(localChatMessageId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_TryCancelDownloadMessageAsync(get_abi(localChatMessageId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::TryCancelSendMessageAsync(hstring_ref localChatMessageId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore2::TryCancelSendMessageAsync(hstring_view localChatMessageId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryCancelSendMessageAsync(get(localChatMessageId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore2)->abi_TryCancelSendMessageAsync(get_abi(localChatMessageId), put_abi(result))); return result; } template event_token impl_IChatMessageStore2::StoreChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StoreChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IChatMessageStore2)->add_StoreChanged(get_abi(handler), &token)); return token; } @@ -4091,554 +4331,554 @@ template event_revoker impl_IChatMessageStore2< template void impl_IChatMessageStore2::StoreChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StoreChanged(token)); + check_hresult(WINRT_SHIM(IChatMessageStore2)->remove_StoreChanged(token)); } -template Windows::Foundation::IAsyncOperation impl_IChatMessageStore3::GetMessageBySyncIdAsync(hstring_ref syncId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageStore3::GetMessageBySyncIdAsync(hstring_view syncId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageBySyncIdAsync(get(syncId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageStore3)->abi_GetMessageBySyncIdAsync(get_abi(syncId), put_abi(result))); return result; } template hstring impl_IChatMessageStoreChangedEventArgs::Id() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Id(put(result))); + check_hresult(WINRT_SHIM(IChatMessageStoreChangedEventArgs)->get_Id(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatStoreChangedEventKind impl_IChatMessageStoreChangedEventArgs::Kind() const { Windows::ApplicationModel::Chat::ChatStoreChangedEventKind result {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&result)); + check_hresult(WINRT_SHIM(IChatMessageStoreChangedEventArgs)->get_Kind(&result)); return result; } template Windows::ApplicationModel::Chat::ChatMessageChangedDeferral impl_IChatMessageChangedEventArgs::GetDeferral() const { Windows::ApplicationModel::Chat::ChatMessageChangedDeferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IChatMessageChangedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template void impl_IChatMessageChangedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IChatMessageChangedDeferral)->abi_Complete()); } -template Windows::Foundation::IAsyncAction impl_IChatMessageBlockingStatic::MarkMessageAsBlockedAsync(hstring_ref localChatMessageId, bool blocked) const +template Windows::Foundation::IAsyncAction impl_IChatMessageBlockingStatic::MarkMessageAsBlockedAsync(hstring_view localChatMessageId, bool blocked) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_MarkMessageAsBlockedAsync(get(localChatMessageId), blocked, put(value))); + check_hresult(WINRT_SHIM(IChatMessageBlockingStatic)->abi_MarkMessageAsBlockedAsync(get_abi(localChatMessageId), blocked, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IChatMessageManagerStatic::GetTransportsAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetTransportsAsync(put(value))); + check_hresult(WINRT_SHIM(IChatMessageManagerStatic)->abi_GetTransportsAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IChatMessageManagerStatic::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(value))); + check_hresult(WINRT_SHIM(IChatMessageManagerStatic)->abi_RequestStoreAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IChatMessageManagerStatic::ShowComposeSmsMessageAsync(const Windows::ApplicationModel::Chat::ChatMessage & message) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ShowComposeSmsMessageAsync(get(message), put(value))); + check_hresult(WINRT_SHIM(IChatMessageManagerStatic)->abi_ShowComposeSmsMessageAsync(get_abi(message), put_abi(value))); return value; } template void impl_IChatMessageManagerStatic::ShowSmsSettings() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowSmsSettings()); + check_hresult(WINRT_SHIM(IChatMessageManagerStatic)->abi_ShowSmsSettings()); } template Windows::Foundation::IAsyncOperation impl_IChatMessageManager2Statics::RegisterTransportAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterTransportAsync(put(result))); + check_hresult(WINRT_SHIM(IChatMessageManager2Statics)->abi_RegisterTransportAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatMessageManager2Statics::GetTransportAsync(hstring_ref transportId) const +template Windows::Foundation::IAsyncOperation impl_IChatMessageManager2Statics::GetTransportAsync(hstring_view transportId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetTransportAsync(get(transportId), put(result))); + check_hresult(WINRT_SHIM(IChatMessageManager2Statics)->abi_GetTransportAsync(get_abi(transportId), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IChatMessageManagerStatics3::RequestSyncManagerAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestSyncManagerAsync(put(result))); + check_hresult(WINRT_SHIM(IChatMessageManagerStatics3)->abi_RequestSyncManagerAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IChatMessageReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(value))); + check_hresult(WINRT_SHIM(IChatMessageReader)->abi_ReadBatchAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IChatMessageReader2::ReadBatchAsync(int32_t count) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchWithCountAsync(count, put(result))); + check_hresult(WINRT_SHIM(IChatMessageReader2)->abi_ReadBatchWithCountAsync(count, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IChatSearchReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IChatSearchReader)->abi_ReadBatchAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IChatSearchReader::ReadBatchAsync(int32_t count) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchWithCountAsync(count, put(result))); + check_hresult(WINRT_SHIM(IChatSearchReader)->abi_ReadBatchWithCountAsync(count, put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatItemKind impl_IChatItem::ItemKind() const { Windows::ApplicationModel::Chat::ChatItemKind result {}; - check_hresult(static_cast(static_cast(*this))->get_ItemKind(&result)); + check_hresult(WINRT_SHIM(IChatItem)->get_ItemKind(&result)); return result; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IChatMessageAttachment::DataStreamReference() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_DataStreamReference(put(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->get_DataStreamReference(put_abi(value))); return value; } template void impl_IChatMessageAttachment::DataStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_DataStreamReference(get(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->put_DataStreamReference(get_abi(value))); } template uint32_t impl_IChatMessageAttachment::GroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupId(&value)); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->get_GroupId(&value)); return value; } template void impl_IChatMessageAttachment::GroupId(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupId(value)); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->put_GroupId(value)); } template hstring impl_IChatMessageAttachment::MimeType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MimeType(put(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->get_MimeType(put_abi(value))); return value; } -template void impl_IChatMessageAttachment::MimeType(hstring_ref value) const +template void impl_IChatMessageAttachment::MimeType(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MimeType(get(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->put_MimeType(get_abi(value))); } template hstring impl_IChatMessageAttachment::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->get_Text(put_abi(value))); return value; } -template void impl_IChatMessageAttachment::Text(hstring_ref value) const +template void impl_IChatMessageAttachment::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment)->put_Text(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IChatMessageAttachment2::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference result; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(result))); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->get_Thumbnail(put_abi(result))); return result; } template void impl_IChatMessageAttachment2::Thumbnail(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->put_Thumbnail(get_abi(value))); } template double impl_IChatMessageAttachment2::TransferProgress() const { double result {}; - check_hresult(static_cast(static_cast(*this))->get_TransferProgress(&result)); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->get_TransferProgress(&result)); return result; } template void impl_IChatMessageAttachment2::TransferProgress(double value) const { - check_hresult(static_cast(static_cast(*this))->put_TransferProgress(value)); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->put_TransferProgress(value)); } template hstring impl_IChatMessageAttachment2::OriginalFileName() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_OriginalFileName(put(result))); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->get_OriginalFileName(put_abi(result))); return result; } -template void impl_IChatMessageAttachment2::OriginalFileName(hstring_ref value) const +template void impl_IChatMessageAttachment2::OriginalFileName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OriginalFileName(get(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachment2)->put_OriginalFileName(get_abi(value))); } -template Windows::ApplicationModel::Chat::ChatMessageAttachment impl_IChatMessageAttachmentFactory::CreateChatMessageAttachment(hstring_ref mimeType, const Windows::Storage::Streams::IRandomAccessStreamReference & dataStreamReference) const +template Windows::ApplicationModel::Chat::ChatMessageAttachment impl_IChatMessageAttachmentFactory::CreateChatMessageAttachment(hstring_view mimeType, const Windows::Storage::Streams::IRandomAccessStreamReference & dataStreamReference) const { Windows::ApplicationModel::Chat::ChatMessageAttachment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateChatMessageAttachment(get(mimeType), get(dataStreamReference), put(value))); + check_hresult(WINRT_SHIM(IChatMessageAttachmentFactory)->abi_CreateChatMessageAttachment(get_abi(mimeType), get_abi(dataStreamReference), put_abi(value))); return value; } template Windows::ApplicationModel::Chat::ChatMessage impl_IChatMessageNotificationTriggerDetails::ChatMessage() const { Windows::ApplicationModel::Chat::ChatMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChatMessage(put(value))); + check_hresult(WINRT_SHIM(IChatMessageNotificationTriggerDetails)->get_ChatMessage(put_abi(value))); return value; } template bool impl_IChatMessageNotificationTriggerDetails2::ShouldDisplayToast() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldDisplayToast(&result)); + check_hresult(WINRT_SHIM(IChatMessageNotificationTriggerDetails2)->get_ShouldDisplayToast(&result)); return result; } template bool impl_IChatMessageNotificationTriggerDetails2::ShouldUpdateDetailText() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldUpdateDetailText(&result)); + check_hresult(WINRT_SHIM(IChatMessageNotificationTriggerDetails2)->get_ShouldUpdateDetailText(&result)); return result; } template bool impl_IChatMessageNotificationTriggerDetails2::ShouldUpdateBadge() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldUpdateBadge(&result)); + check_hresult(WINRT_SHIM(IChatMessageNotificationTriggerDetails2)->get_ShouldUpdateBadge(&result)); return result; } template bool impl_IChatMessageNotificationTriggerDetails2::ShouldUpdateActionCenter() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldUpdateActionCenter(&result)); + check_hresult(WINRT_SHIM(IChatMessageNotificationTriggerDetails2)->get_ShouldUpdateActionCenter(&result)); return result; } template bool impl_IChatCapabilities::IsOnline() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnline(&result)); + check_hresult(WINRT_SHIM(IChatCapabilities)->get_IsOnline(&result)); return result; } template bool impl_IChatCapabilities::IsChatCapable() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsChatCapable(&result)); + check_hresult(WINRT_SHIM(IChatCapabilities)->get_IsChatCapable(&result)); return result; } template bool impl_IChatCapabilities::IsFileTransferCapable() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsFileTransferCapable(&result)); + check_hresult(WINRT_SHIM(IChatCapabilities)->get_IsFileTransferCapable(&result)); return result; } template bool impl_IChatCapabilities::IsGeoLocationPushCapable() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsGeoLocationPushCapable(&result)); + check_hresult(WINRT_SHIM(IChatCapabilities)->get_IsGeoLocationPushCapable(&result)); return result; } template bool impl_IChatCapabilities::IsIntegratedMessagingCapable() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsIntegratedMessagingCapable(&result)); + check_hresult(WINRT_SHIM(IChatCapabilities)->get_IsIntegratedMessagingCapable(&result)); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatCapabilitiesManagerStatics::GetCachedCapabilitiesAsync(hstring_ref address) const +template Windows::Foundation::IAsyncOperation impl_IChatCapabilitiesManagerStatics::GetCachedCapabilitiesAsync(hstring_view address) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetCachedCapabilitiesAsync(get(address), put(result))); + check_hresult(WINRT_SHIM(IChatCapabilitiesManagerStatics)->abi_GetCachedCapabilitiesAsync(get_abi(address), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IChatCapabilitiesManagerStatics::GetCapabilitiesFromNetworkAsync(hstring_ref address) const +template Windows::Foundation::IAsyncOperation impl_IChatCapabilitiesManagerStatics::GetCapabilitiesFromNetworkAsync(hstring_view address) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetCapabilitiesFromNetworkAsync(get(address), put(result))); + check_hresult(WINRT_SHIM(IChatCapabilitiesManagerStatics)->abi_GetCapabilitiesFromNetworkAsync(get_abi(address), put_abi(result))); return result; } template hstring impl_IChatRecipientDeliveryInfo::TransportAddress() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_TransportAddress(put(result))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_TransportAddress(put_abi(result))); return result; } -template void impl_IChatRecipientDeliveryInfo::TransportAddress(hstring_ref value) const +template void impl_IChatRecipientDeliveryInfo::TransportAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TransportAddress(get(value))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->put_TransportAddress(get_abi(value))); } template Windows::Foundation::IReference impl_IChatRecipientDeliveryInfo::DeliveryTime() const { Windows::Foundation::IReference result; - check_hresult(static_cast(static_cast(*this))->get_DeliveryTime(put(result))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_DeliveryTime(put_abi(result))); return result; } -template void impl_IChatRecipientDeliveryInfo::DeliveryTime(const Windows::Foundation::IReference & value) const +template void impl_IChatRecipientDeliveryInfo::DeliveryTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DeliveryTime(get(value))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->put_DeliveryTime(get_abi(value))); } template Windows::Foundation::IReference impl_IChatRecipientDeliveryInfo::ReadTime() const { Windows::Foundation::IReference result; - check_hresult(static_cast(static_cast(*this))->get_ReadTime(put(result))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_ReadTime(put_abi(result))); return result; } -template void impl_IChatRecipientDeliveryInfo::ReadTime(const Windows::Foundation::IReference & value) const +template void impl_IChatRecipientDeliveryInfo::ReadTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadTime(get(value))); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->put_ReadTime(get_abi(value))); } template Windows::ApplicationModel::Chat::ChatTransportErrorCodeCategory impl_IChatRecipientDeliveryInfo::TransportErrorCodeCategory() const { Windows::ApplicationModel::Chat::ChatTransportErrorCodeCategory result {}; - check_hresult(static_cast(static_cast(*this))->get_TransportErrorCodeCategory(&result)); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_TransportErrorCodeCategory(&result)); return result; } template Windows::ApplicationModel::Chat::ChatTransportInterpretedErrorCode impl_IChatRecipientDeliveryInfo::TransportInterpretedErrorCode() const { Windows::ApplicationModel::Chat::ChatTransportInterpretedErrorCode result {}; - check_hresult(static_cast(static_cast(*this))->get_TransportInterpretedErrorCode(&result)); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_TransportInterpretedErrorCode(&result)); return result; } template int32_t impl_IChatRecipientDeliveryInfo::TransportErrorCode() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_TransportErrorCode(&result)); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_TransportErrorCode(&result)); return result; } template bool impl_IChatRecipientDeliveryInfo::IsErrorPermanent() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsErrorPermanent(&result)); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_IsErrorPermanent(&result)); return result; } template Windows::ApplicationModel::Chat::ChatMessageStatus impl_IChatRecipientDeliveryInfo::Status() const { Windows::ApplicationModel::Chat::ChatMessageStatus result {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&result)); + check_hresult(WINRT_SHIM(IChatRecipientDeliveryInfo)->get_Status(&result)); return result; } template hstring impl_IChatConversationThreadingInfo::ContactId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_ContactId(put(result))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->get_ContactId(put_abi(result))); return result; } -template void impl_IChatConversationThreadingInfo::ContactId(hstring_ref value) const +template void impl_IChatConversationThreadingInfo::ContactId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactId(get(value))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->put_ContactId(get_abi(value))); } template hstring impl_IChatConversationThreadingInfo::Custom() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Custom(put(result))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->get_Custom(put_abi(result))); return result; } -template void impl_IChatConversationThreadingInfo::Custom(hstring_ref value) const +template void impl_IChatConversationThreadingInfo::Custom(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Custom(get(value))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->put_Custom(get_abi(value))); } template hstring impl_IChatConversationThreadingInfo::ConversationId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_ConversationId(put(result))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->get_ConversationId(put_abi(result))); return result; } -template void impl_IChatConversationThreadingInfo::ConversationId(hstring_ref value) const +template void impl_IChatConversationThreadingInfo::ConversationId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ConversationId(get(value))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->put_ConversationId(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IChatConversationThreadingInfo::Participants() const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->get_Participants(put(result))); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->get_Participants(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatConversationThreadingKind impl_IChatConversationThreadingInfo::Kind() const { Windows::ApplicationModel::Chat::ChatConversationThreadingKind result {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&result)); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->get_Kind(&result)); return result; } template void impl_IChatConversationThreadingInfo::Kind(Windows::ApplicationModel::Chat::ChatConversationThreadingKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IChatConversationThreadingInfo)->put_Kind(value)); } template Windows::Foundation::IAsyncOperation> impl_IChatConversationReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IChatConversationReader)->abi_ReadBatchAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IChatConversationReader::ReadBatchAsync(int32_t count) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchWithCountAsync(count, put(result))); + check_hresult(WINRT_SHIM(IChatConversationReader)->abi_ReadBatchWithCountAsync(count, put_abi(result))); return result; } template bool impl_IChatConversation::HasUnreadMessages() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_HasUnreadMessages(&result)); + check_hresult(WINRT_SHIM(IChatConversation)->get_HasUnreadMessages(&result)); return result; } template hstring impl_IChatConversation::Id() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Id(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->get_Id(put_abi(result))); return result; } template hstring impl_IChatConversation::Subject() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->get_Subject(put_abi(result))); return result; } -template void impl_IChatConversation::Subject(hstring_ref value) const +template void impl_IChatConversation::Subject(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subject(get(value))); + check_hresult(WINRT_SHIM(IChatConversation)->put_Subject(get_abi(value))); } template bool impl_IChatConversation::IsConversationMuted() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsConversationMuted(&result)); + check_hresult(WINRT_SHIM(IChatConversation)->get_IsConversationMuted(&result)); return result; } template void impl_IChatConversation::IsConversationMuted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsConversationMuted(value)); + check_hresult(WINRT_SHIM(IChatConversation)->put_IsConversationMuted(value)); } template hstring impl_IChatConversation::MostRecentMessageId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_MostRecentMessageId(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->get_MostRecentMessageId(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IChatConversation::Participants() const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->get_Participants(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->get_Participants(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatConversationThreadingInfo impl_IChatConversation::ThreadingInfo() const { Windows::ApplicationModel::Chat::ChatConversationThreadingInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ThreadingInfo(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->get_ThreadingInfo(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatConversation::DeleteAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->abi_DeleteAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Chat::ChatMessageReader impl_IChatConversation::GetMessageReader() const { Windows::ApplicationModel::Chat::ChatMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->abi_GetMessageReader(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatConversation::MarkMessagesAsReadAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkAllMessagesAsReadAsync(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->abi_MarkAllMessagesAsReadAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatConversation::MarkMessagesAsReadAsync(const Windows::Foundation::DateTime & value) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkMessagesAsReadAsync(get(value), put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->abi_MarkMessagesAsReadAsync(get_abi(value), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatConversation::SaveAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(result))); + check_hresult(WINRT_SHIM(IChatConversation)->abi_SaveAsync(put_abi(result))); return result; } -template void impl_IChatConversation::NotifyLocalParticipantComposing(hstring_ref transportId, hstring_ref participantAddress, bool isComposing) const +template void impl_IChatConversation::NotifyLocalParticipantComposing(hstring_view transportId, hstring_view participantAddress, bool isComposing) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyLocalParticipantComposing(get(transportId), get(participantAddress), isComposing)); + check_hresult(WINRT_SHIM(IChatConversation)->abi_NotifyLocalParticipantComposing(get_abi(transportId), get_abi(participantAddress), isComposing)); } -template void impl_IChatConversation::NotifyRemoteParticipantComposing(hstring_ref transportId, hstring_ref participantAddress, bool isComposing) const +template void impl_IChatConversation::NotifyRemoteParticipantComposing(hstring_view transportId, hstring_view participantAddress, bool isComposing) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyRemoteParticipantComposing(get(transportId), get(participantAddress), isComposing)); + check_hresult(WINRT_SHIM(IChatConversation)->abi_NotifyRemoteParticipantComposing(get_abi(transportId), get_abi(participantAddress), isComposing)); } template event_token impl_IChatConversation::RemoteParticipantComposingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemoteParticipantComposingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IChatConversation)->add_RemoteParticipantComposingChanged(get_abi(handler), &token)); return token; } @@ -4649,194 +4889,194 @@ template event_revoker impl_IChatConversation template void impl_IChatConversation::RemoteParticipantComposingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemoteParticipantComposingChanged(token)); + check_hresult(WINRT_SHIM(IChatConversation)->remove_RemoteParticipantComposingChanged(token)); } template bool impl_IChatConversation2::CanModifyParticipants() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_CanModifyParticipants(&result)); + check_hresult(WINRT_SHIM(IChatConversation2)->get_CanModifyParticipants(&result)); return result; } template void impl_IChatConversation2::CanModifyParticipants(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanModifyParticipants(value)); + check_hresult(WINRT_SHIM(IChatConversation2)->put_CanModifyParticipants(value)); } template hstring impl_IRemoteParticipantComposingChangedEventArgs::TransportId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_TransportId(put(result))); + check_hresult(WINRT_SHIM(IRemoteParticipantComposingChangedEventArgs)->get_TransportId(put_abi(result))); return result; } template hstring impl_IRemoteParticipantComposingChangedEventArgs::ParticipantAddress() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_ParticipantAddress(put(result))); + check_hresult(WINRT_SHIM(IRemoteParticipantComposingChangedEventArgs)->get_ParticipantAddress(put_abi(result))); return result; } template bool impl_IRemoteParticipantComposingChangedEventArgs::IsComposing() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsComposing(&result)); + check_hresult(WINRT_SHIM(IRemoteParticipantComposingChangedEventArgs)->get_IsComposing(&result)); return result; } template Windows::ApplicationModel::Chat::ChatSyncConfiguration impl_IChatSyncManager::Configuration() const { Windows::ApplicationModel::Chat::ChatSyncConfiguration result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(result))); + check_hresult(WINRT_SHIM(IChatSyncManager)->get_Configuration(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatSyncManager::AssociateAccountAsync(const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AssociateAccountAsync(get(webAccount), put(result))); + check_hresult(WINRT_SHIM(IChatSyncManager)->abi_AssociateAccountAsync(get_abi(webAccount), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IChatSyncManager::UnassociateAccountAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UnassociateAccountAsync(put(result))); + check_hresult(WINRT_SHIM(IChatSyncManager)->abi_UnassociateAccountAsync(put_abi(result))); return result; } template bool impl_IChatSyncManager::IsAccountAssociated(const Windows::Security::Credentials::WebAccount & webAccount) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsAccountAssociated(get(webAccount), &result)); + check_hresult(WINRT_SHIM(IChatSyncManager)->abi_IsAccountAssociated(get_abi(webAccount), &result)); return result; } template void impl_IChatSyncManager::StartSync() const { - check_hresult(static_cast(static_cast(*this))->abi_StartSync()); + check_hresult(WINRT_SHIM(IChatSyncManager)->abi_StartSync()); } template Windows::Foundation::IAsyncAction impl_IChatSyncManager::SetConfigurationAsync(const Windows::ApplicationModel::Chat::ChatSyncConfiguration & configuration) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SetConfigurationAsync(get(configuration), put(result))); + check_hresult(WINRT_SHIM(IChatSyncManager)->abi_SetConfigurationAsync(get_abi(configuration), put_abi(result))); return result; } template bool impl_IChatSyncConfiguration::IsSyncEnabled() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsSyncEnabled(&result)); + check_hresult(WINRT_SHIM(IChatSyncConfiguration)->get_IsSyncEnabled(&result)); return result; } template void impl_IChatSyncConfiguration::IsSyncEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSyncEnabled(value)); + check_hresult(WINRT_SHIM(IChatSyncConfiguration)->put_IsSyncEnabled(value)); } template Windows::ApplicationModel::Chat::ChatRestoreHistorySpan impl_IChatSyncConfiguration::RestoreHistorySpan() const { Windows::ApplicationModel::Chat::ChatRestoreHistorySpan result {}; - check_hresult(static_cast(static_cast(*this))->get_RestoreHistorySpan(&result)); + check_hresult(WINRT_SHIM(IChatSyncConfiguration)->get_RestoreHistorySpan(&result)); return result; } template void impl_IChatSyncConfiguration::RestoreHistorySpan(Windows::ApplicationModel::Chat::ChatRestoreHistorySpan value) const { - check_hresult(static_cast(static_cast(*this))->put_RestoreHistorySpan(value)); + check_hresult(WINRT_SHIM(IChatSyncConfiguration)->put_RestoreHistorySpan(value)); } template Windows::ApplicationModel::Chat::RcsServiceKind impl_IRcsServiceKindSupportedChangedEventArgs::ServiceKind() const { Windows::ApplicationModel::Chat::RcsServiceKind result {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceKind(&result)); + check_hresult(WINRT_SHIM(IRcsServiceKindSupportedChangedEventArgs)->get_ServiceKind(&result)); return result; } template Windows::ApplicationModel::Chat::RcsEndUserMessageManager impl_IRcsManagerStatics::GetEndUserMessageManager() const { Windows::ApplicationModel::Chat::RcsEndUserMessageManager result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEndUserMessageManager(put(result))); + check_hresult(WINRT_SHIM(IRcsManagerStatics)->abi_GetEndUserMessageManager(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IRcsManagerStatics::GetTransportsAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetTransportsAsync(put(value))); + check_hresult(WINRT_SHIM(IRcsManagerStatics)->abi_GetTransportsAsync(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IRcsManagerStatics::GetTransportAsync(hstring_ref transportId) const +template Windows::Foundation::IAsyncOperation impl_IRcsManagerStatics::GetTransportAsync(hstring_view transportId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetTransportAsync(get(transportId), put(result))); + check_hresult(WINRT_SHIM(IRcsManagerStatics)->abi_GetTransportAsync(get_abi(transportId), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IRcsManagerStatics::LeaveConversationAsync(const Windows::ApplicationModel::Chat::ChatConversation & conversation) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_LeaveConversationAsync(get(conversation), put(value))); + check_hresult(WINRT_SHIM(IRcsManagerStatics)->abi_LeaveConversationAsync(get_abi(conversation), put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IRcsTransport::ExtendedProperties() const +template Windows::Foundation::Collections::IMapView impl_IRcsTransport::ExtendedProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IRcsTransport)->get_ExtendedProperties(put_abi(value))); return value; } template bool impl_IRcsTransport::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IRcsTransport)->get_IsActive(&value)); return value; } template hstring impl_IRcsTransport::TransportFriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportFriendlyName(put(value))); + check_hresult(WINRT_SHIM(IRcsTransport)->get_TransportFriendlyName(put_abi(value))); return value; } template hstring impl_IRcsTransport::TransportId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TransportId(put(value))); + check_hresult(WINRT_SHIM(IRcsTransport)->get_TransportId(put_abi(value))); return value; } template Windows::ApplicationModel::Chat::RcsTransportConfiguration impl_IRcsTransport::Configuration() const { Windows::ApplicationModel::Chat::RcsTransportConfiguration result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(result))); + check_hresult(WINRT_SHIM(IRcsTransport)->get_Configuration(put_abi(result))); return result; } template bool impl_IRcsTransport::IsStoreAndForwardEnabled(Windows::ApplicationModel::Chat::RcsServiceKind serviceKind) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsStoreAndForwardEnabled(serviceKind, &result)); + check_hresult(WINRT_SHIM(IRcsTransport)->abi_IsStoreAndForwardEnabled(serviceKind, &result)); return result; } template bool impl_IRcsTransport::IsServiceKindSupported(Windows::ApplicationModel::Chat::RcsServiceKind serviceKind) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsServiceKindSupported(serviceKind, &result)); + check_hresult(WINRT_SHIM(IRcsTransport)->abi_IsServiceKindSupported(serviceKind, &result)); return result; } template event_token impl_IRcsTransport::ServiceKindSupportedChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ServiceKindSupportedChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IRcsTransport)->add_ServiceKindSupportedChanged(get_abi(handler), &token)); return token; } @@ -4847,55 +5087,55 @@ template event_revoker impl_IRcsTransport::Servic template void impl_IRcsTransport::ServiceKindSupportedChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ServiceKindSupportedChanged(token)); + check_hresult(WINRT_SHIM(IRcsTransport)->remove_ServiceKindSupportedChanged(token)); } template int32_t impl_IRcsTransportConfiguration::MaxAttachmentCount() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAttachmentCount(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_MaxAttachmentCount(&result)); return result; } template int32_t impl_IRcsTransportConfiguration::MaxMessageSizeInKilobytes() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxMessageSizeInKilobytes(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_MaxMessageSizeInKilobytes(&result)); return result; } template int32_t impl_IRcsTransportConfiguration::MaxGroupMessageSizeInKilobytes() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxGroupMessageSizeInKilobytes(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_MaxGroupMessageSizeInKilobytes(&result)); return result; } template int32_t impl_IRcsTransportConfiguration::MaxRecipientCount() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxRecipientCount(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_MaxRecipientCount(&result)); return result; } template int32_t impl_IRcsTransportConfiguration::MaxFileSizeInKilobytes() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_MaxFileSizeInKilobytes(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_MaxFileSizeInKilobytes(&result)); return result; } template int32_t impl_IRcsTransportConfiguration::WarningFileSizeInKilobytes() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->get_WarningFileSizeInKilobytes(&result)); + check_hresult(WINRT_SHIM(IRcsTransportConfiguration)->get_WarningFileSizeInKilobytes(&result)); return result; } template event_token impl_IRcsEndUserMessageManager::MessageAvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MessageAvailableChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IRcsEndUserMessageManager)->add_MessageAvailableChanged(get_abi(handler), &token)); return token; } @@ -4906,99 +5146,99 @@ template event_revoker impl_IRcsEndUserM template void impl_IRcsEndUserMessageManager::MessageAvailableChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageAvailableChanged(token)); + check_hresult(WINRT_SHIM(IRcsEndUserMessageManager)->remove_MessageAvailableChanged(token)); } template hstring impl_IRcsEndUserMessageAction::Label() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Label(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessageAction)->get_Label(put_abi(result))); return result; } template hstring impl_IRcsEndUserMessage::TransportId() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_TransportId(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->get_TransportId(put_abi(result))); return result; } template hstring impl_IRcsEndUserMessage::Title() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Title(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->get_Title(put_abi(result))); return result; } template hstring impl_IRcsEndUserMessage::Text() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_Text(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->get_Text(put_abi(result))); return result; } template bool impl_IRcsEndUserMessage::IsPinRequired() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsPinRequired(&result)); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->get_IsPinRequired(&result)); return result; } template Windows::Foundation::Collections::IVectorView impl_IRcsEndUserMessage::Actions() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_Actions(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->get_Actions(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IRcsEndUserMessage::SendResponseAsync(const Windows::ApplicationModel::Chat::RcsEndUserMessageAction & action) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SendResponseAsync(get(action), put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->abi_SendResponseAsync(get_abi(action), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IRcsEndUserMessage::SendResponseWithPinAsync(const Windows::ApplicationModel::Chat::RcsEndUserMessageAction & action, hstring_ref pin) const +template Windows::Foundation::IAsyncAction impl_IRcsEndUserMessage::SendResponseWithPinAsync(const Windows::ApplicationModel::Chat::RcsEndUserMessageAction & action, hstring_view pin) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SendResponseWithPinAsync(get(action), get(pin), put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessage)->abi_SendResponseWithPinAsync(get_abi(action), get_abi(pin), put_abi(result))); return result; } template bool impl_IRcsEndUserMessageAvailableEventArgs::IsMessageAvailable() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->get_IsMessageAvailable(&result)); + check_hresult(WINRT_SHIM(IRcsEndUserMessageAvailableEventArgs)->get_IsMessageAvailable(&result)); return result; } template Windows::ApplicationModel::Chat::RcsEndUserMessage impl_IRcsEndUserMessageAvailableEventArgs::Message() const { Windows::ApplicationModel::Chat::RcsEndUserMessage result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(result))); + check_hresult(WINRT_SHIM(IRcsEndUserMessageAvailableEventArgs)->get_Message(put_abi(result))); return result; } template hstring impl_IRcsEndUserMessageAvailableTriggerDetails::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IRcsEndUserMessageAvailableTriggerDetails)->get_Title(put_abi(value))); return value; } template hstring impl_IRcsEndUserMessageAvailableTriggerDetails::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IRcsEndUserMessageAvailableTriggerDetails)->get_Text(put_abi(value))); return value; } -inline Windows::Foundation::IAsyncOperation ChatCapabilitiesManager::GetCachedCapabilitiesAsync(hstring_ref address) +inline Windows::Foundation::IAsyncOperation ChatCapabilitiesManager::GetCachedCapabilitiesAsync(hstring_view address) { return get_activation_factory().GetCachedCapabilitiesAsync(address); } -inline Windows::Foundation::IAsyncOperation ChatCapabilitiesManager::GetCapabilitiesFromNetworkAsync(hstring_ref address) +inline Windows::Foundation::IAsyncOperation ChatCapabilitiesManager::GetCapabilitiesFromNetworkAsync(hstring_view address) { return get_activation_factory().GetCapabilitiesFromNetworkAsync(address); } @@ -5011,11 +5251,11 @@ inline ChatMessage::ChatMessage() : ChatMessage(activate_instance()) {} -inline ChatMessageAttachment::ChatMessageAttachment(hstring_ref mimeType, const Windows::Storage::Streams::IRandomAccessStreamReference & dataStreamReference) : +inline ChatMessageAttachment::ChatMessageAttachment(hstring_view mimeType, const Windows::Storage::Streams::IRandomAccessStreamReference & dataStreamReference) : ChatMessageAttachment(get_activation_factory().CreateChatMessageAttachment(mimeType, dataStreamReference)) {} -inline Windows::Foundation::IAsyncAction ChatMessageBlocking::MarkMessageAsBlockedAsync(hstring_ref localChatMessageId, bool blocked) +inline Windows::Foundation::IAsyncAction ChatMessageBlocking::MarkMessageAsBlockedAsync(hstring_view localChatMessageId, bool blocked) { return get_activation_factory().MarkMessageAsBlockedAsync(localChatMessageId, blocked); } @@ -5025,7 +5265,7 @@ inline Windows::Foundation::IAsyncOperation ChatMessageManager::Registe return get_activation_factory().RegisterTransportAsync(); } -inline Windows::Foundation::IAsyncOperation ChatMessageManager::GetTransportAsync(hstring_ref transportId) +inline Windows::Foundation::IAsyncOperation ChatMessageManager::GetTransportAsync(hstring_view transportId) { return get_activation_factory().GetTransportAsync(transportId); } @@ -5073,7 +5313,7 @@ inline Windows::Foundation::IAsyncOperation().GetTransportsAsync(); } -inline Windows::Foundation::IAsyncOperation RcsManager::GetTransportAsync(hstring_ref transportId) +inline Windows::Foundation::IAsyncOperation RcsManager::GetTransportAsync(hstring_view transportId) { return get_activation_factory().GetTransportAsync(transportId); } @@ -5086,3 +5326,743 @@ inline Windows::Foundation::IAsyncAction RcsManager::LeaveConversationAsync(cons } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatCapabilitiesManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatConversation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatConversation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatConversationReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatConversationThreadingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessage3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessage4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageAttachment2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageAttachmentFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageBlockingStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageManager2Statics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageManagerStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageNotificationTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageReader2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageStore3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageTransport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageTransport2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageTransportConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatMessageValidationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatRecipientDeliveryInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatSearchReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatSyncConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IChatSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsEndUserMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsEndUserMessageAction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsEndUserMessageAvailableEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsEndUserMessageAvailableTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsEndUserMessageManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsServiceKindSupportedChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsTransport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRcsTransportConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::IRemoteParticipantComposingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatConversation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatConversationReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatConversationThreadingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageTransport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageTransportConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatMessageValidationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatRecipientDeliveryInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatSearchReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatSyncConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::ChatSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsEndUserMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsEndUserMessageAction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsEndUserMessageAvailableEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsEndUserMessageAvailableTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsEndUserMessageManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsServiceKindSupportedChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsTransport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RcsTransportConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Chat::RemoteParticipantComposingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.CommunicationBlocking.h b/10.0.14393.0/winrt/Windows.ApplicationModel.CommunicationBlocking.h index c762c0ded..fbf42e77d 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.CommunicationBlocking.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.CommunicationBlocking.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.ApplicationModel.CommunicationBlocking.3.h" @@ -19,7 +22,8 @@ struct produceshim().IsBlockingActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBlockingActive()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce number, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_IsBlockedNumberAsync(impl::abi_arg_in number, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().IsBlockedNumberAsync(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsBlockedNumberAsync(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce> phoneNumbers, bool * value) noexcept override + HRESULT __stdcall abi_ShowBlockNumbersUI(impl::abi_arg_in> phoneNumbers, bool * value) noexcept override { try { - *value = detach(this->shim().ShowBlockNumbersUI(*reinterpret_cast *>(&phoneNumbers))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowBlockNumbersUI(*reinterpret_cast *>(&phoneNumbers))); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce> phoneNumbers, bool * value) noexcept override + HRESULT __stdcall abi_ShowUnblockNumbersUI(impl::abi_arg_in> phoneNumbers, bool * value) noexcept override { try { - *value = detach(this->shim().ShowUnblockNumbersUI(*reinterpret_cast *>(&phoneNumbers))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowUnblockNumbersUI(*reinterpret_cast *>(&phoneNumbers))); return S_OK; } catch (...) @@ -72,6 +79,7 @@ struct produceshim()); this->shim().ShowBlockedCallsUI(); return S_OK; } @@ -85,6 +93,7 @@ struct produceshim()); this->shim().ShowBlockedMessagesUI(); return S_OK; } @@ -102,7 +111,8 @@ struct produceshim().IsCurrentAppActiveBlockingApp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCurrentAppActiveBlockingApp()); return S_OK; } catch (...) @@ -115,6 +125,7 @@ struct produceshim()); this->shim().ShowCommunicationBlockingSettingsUI(); return S_OK; } @@ -128,11 +139,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestSetAsActiveBlockingAppAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestSetAsActiveBlockingAppAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestSetAsActiveBlockingAppAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestSetAsActiveBlockingAppAsync()); return S_OK; } catch (...) @@ -150,58 +162,58 @@ namespace Windows::ApplicationModel::CommunicationBlocking { template bool impl_ICommunicationBlockingAppManagerStatics::IsCurrentAppActiveBlockingApp() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCurrentAppActiveBlockingApp(&value)); + check_hresult(WINRT_SHIM(ICommunicationBlockingAppManagerStatics)->get_IsCurrentAppActiveBlockingApp(&value)); return value; } template void impl_ICommunicationBlockingAppManagerStatics::ShowCommunicationBlockingSettingsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowCommunicationBlockingSettingsUI()); + check_hresult(WINRT_SHIM(ICommunicationBlockingAppManagerStatics)->abi_ShowCommunicationBlockingSettingsUI()); } template Windows::Foundation::IAsyncOperation impl_ICommunicationBlockingAppManagerStatics2::RequestSetAsActiveBlockingAppAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestSetAsActiveBlockingAppAsync(put(result))); + check_hresult(WINRT_SHIM(ICommunicationBlockingAppManagerStatics2)->abi_RequestSetAsActiveBlockingAppAsync(put_abi(result))); return result; } template bool impl_ICommunicationBlockingAccessManagerStatics::IsBlockingActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBlockingActive(&value)); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->get_IsBlockingActive(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_ICommunicationBlockingAccessManagerStatics::IsBlockedNumberAsync(hstring_ref number) const +template Windows::Foundation::IAsyncOperation impl_ICommunicationBlockingAccessManagerStatics::IsBlockedNumberAsync(hstring_view number) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_IsBlockedNumberAsync(get(number), put(result))); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->abi_IsBlockedNumberAsync(get_abi(number), put_abi(result))); return result; } -template bool impl_ICommunicationBlockingAccessManagerStatics::ShowBlockNumbersUI(const Windows::Foundation::Collections::IIterable & phoneNumbers) const +template bool impl_ICommunicationBlockingAccessManagerStatics::ShowBlockNumbersUI(iterable phoneNumbers) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ShowBlockNumbersUI(get(phoneNumbers), &value)); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->abi_ShowBlockNumbersUI(get_abi(phoneNumbers), &value)); return value; } -template bool impl_ICommunicationBlockingAccessManagerStatics::ShowUnblockNumbersUI(const Windows::Foundation::Collections::IIterable & phoneNumbers) const +template bool impl_ICommunicationBlockingAccessManagerStatics::ShowUnblockNumbersUI(iterable phoneNumbers) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ShowUnblockNumbersUI(get(phoneNumbers), &value)); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->abi_ShowUnblockNumbersUI(get_abi(phoneNumbers), &value)); return value; } template void impl_ICommunicationBlockingAccessManagerStatics::ShowBlockedCallsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowBlockedCallsUI()); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->abi_ShowBlockedCallsUI()); } template void impl_ICommunicationBlockingAccessManagerStatics::ShowBlockedMessagesUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowBlockedMessagesUI()); + check_hresult(WINRT_SHIM(ICommunicationBlockingAccessManagerStatics)->abi_ShowBlockedMessagesUI()); } inline bool CommunicationBlockingAccessManager::IsBlockingActive() @@ -209,17 +221,17 @@ inline bool CommunicationBlockingAccessManager::IsBlockingActive() return get_activation_factory().IsBlockingActive(); } -inline Windows::Foundation::IAsyncOperation CommunicationBlockingAccessManager::IsBlockedNumberAsync(hstring_ref number) +inline Windows::Foundation::IAsyncOperation CommunicationBlockingAccessManager::IsBlockedNumberAsync(hstring_view number) { return get_activation_factory().IsBlockedNumberAsync(number); } -inline bool CommunicationBlockingAccessManager::ShowBlockNumbersUI(const Windows::Foundation::Collections::IIterable & phoneNumbers) +inline bool CommunicationBlockingAccessManager::ShowBlockNumbersUI(iterable phoneNumbers) { return get_activation_factory().ShowBlockNumbersUI(phoneNumbers); } -inline bool CommunicationBlockingAccessManager::ShowUnblockNumbersUI(const Windows::Foundation::Collections::IIterable & phoneNumbers) +inline bool CommunicationBlockingAccessManager::ShowUnblockNumbersUI(iterable phoneNumbers) { return get_activation_factory().ShowUnblockNumbersUI(phoneNumbers); } @@ -252,3 +264,32 @@ inline Windows::Foundation::IAsyncOperation CommunicationBlockingAppManage } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAppManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAppManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.DataProvider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.DataProvider.h index ea4ba399b..477b904e8 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.DataProvider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.DataProvider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Contacts.3.h" #include "internal/Windows.ApplicationModel.Contacts.DataProvider.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_SyncRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SyncRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SyncRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SyncRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -32,6 +36,7 @@ struct produceshim()); this->shim().SyncRequested(token); return S_OK; } @@ -41,11 +46,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ServerSearchReadBatchRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ServerSearchReadBatchRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ServerSearchReadBatchRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -58,6 +64,7 @@ struct produceshim()); this->shim().ServerSearchReadBatchRequested(token); return S_OK; } @@ -71,6 +78,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -84,11 +92,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Connection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Connection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Connection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Connection()); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SessionId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SessionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContactListId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactListId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactListId()); return S_OK; } catch (...) @@ -130,11 +141,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Options(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -148,7 +160,8 @@ struct produceshim().SuggestedBatchSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedBatchSize()); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce contact, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveContactAsync(impl::abi_arg_in contact, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveContactAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveContactAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(Windows::ApplicationModel::Contacts::ContactBatchStatus batchStatus, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync(batchStatus)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync(batchStatus)); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -235,11 +253,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ContactListId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactListId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactListId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactListId()); return S_OK; } catch (...) @@ -249,11 +268,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -263,11 +283,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -281,11 +302,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -295,11 +317,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -317,14 +340,14 @@ namespace Windows::ApplicationModel::Contacts::DataProvider { template Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection impl_IContactDataProviderTriggerDetails::Connection() const { Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Connection(put(value))); + check_hresult(WINRT_SHIM(IContactDataProviderTriggerDetails)->get_Connection(put_abi(value))); return value; } template event_token impl_IContactDataProviderConnection::SyncRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SyncRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IContactDataProviderConnection)->add_SyncRequested(get_abi(handler), &token)); return token; } @@ -335,13 +358,13 @@ template event_revoker impl_IContac template void impl_IContactDataProviderConnection::SyncRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SyncRequested(token)); + check_hresult(WINRT_SHIM(IContactDataProviderConnection)->remove_SyncRequested(token)); } template event_token impl_IContactDataProviderConnection::ServerSearchReadBatchRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ServerSearchReadBatchRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IContactDataProviderConnection)->add_ServerSearchReadBatchRequested(get_abi(handler), &token)); return token; } @@ -352,112 +375,222 @@ template event_revoker impl_IContac template void impl_IContactDataProviderConnection::ServerSearchReadBatchRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ServerSearchReadBatchRequested(token)); + check_hresult(WINRT_SHIM(IContactDataProviderConnection)->remove_ServerSearchReadBatchRequested(token)); } template void impl_IContactDataProviderConnection::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IContactDataProviderConnection)->abi_Start()); } template hstring impl_IContactListSyncManagerSyncRequest::ContactListId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactListId(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncManagerSyncRequest)->get_ContactListId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IContactListSyncManagerSyncRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IContactListSyncManagerSyncRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IContactListSyncManagerSyncRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IContactListSyncManagerSyncRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IContactListServerSearchReadBatchRequest::SessionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SessionId(put(value))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->get_SessionId(put_abi(value))); return value; } template hstring impl_IContactListServerSearchReadBatchRequest::ContactListId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactListId(put(value))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->get_ContactListId(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactQueryOptions impl_IContactListServerSearchReadBatchRequest::Options() const { Windows::ApplicationModel::Contacts::ContactQueryOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Options(put(value))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->get_Options(put_abi(value))); return value; } template uint32_t impl_IContactListServerSearchReadBatchRequest::SuggestedBatchSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SuggestedBatchSize(&value)); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->get_SuggestedBatchSize(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IContactListServerSearchReadBatchRequest::SaveContactAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveContactAsync(get(contact), put(result))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->abi_SaveContactAsync(get_abi(contact), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IContactListServerSearchReadBatchRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IContactListServerSearchReadBatchRequest::ReportFailedAsync(Windows::ApplicationModel::Contacts::ContactBatchStatus batchStatus) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(batchStatus, put(result))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequest)->abi_ReportFailedAsync(batchStatus, put_abi(result))); return result; } template Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest impl_IContactListSyncManagerSyncRequestEventArgs::Request() const { Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncManagerSyncRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IContactListSyncManagerSyncRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncManagerSyncRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest impl_IContactListServerSearchReadBatchRequestEventArgs::Request() const { Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IContactListServerSearchReadBatchRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IContactListServerSearchReadBatchRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListServerSearchReadBatchRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::IContactListSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListServerSearchReadBatchRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::DataProvider::ContactListSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.Provider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.Provider.h index 1ea3c657d..4addd94f3 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.Provider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.Contacts.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AddContact(abi_arg_in id, abi_arg_in contact, Windows::ApplicationModel::Contacts::Provider::AddContactResult * result) noexcept override + HRESULT __stdcall abi_AddContact(impl::abi_arg_in id, impl::abi_arg_in contact, Windows::ApplicationModel::Contacts::Provider::AddContactResult * result) noexcept override { try { - *result = detach(this->shim().AddContact(*reinterpret_cast(&id), *reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AddContact(*reinterpret_cast(&id), *reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -29,10 +33,11 @@ struct produce id) noexcept override + HRESULT __stdcall abi_RemoveContact(impl::abi_arg_in id) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveContact(*reinterpret_cast(&id)); return S_OK; } @@ -42,11 +47,12 @@ struct produce id, bool * isContained) noexcept override + HRESULT __stdcall abi_ContainsContact(impl::abi_arg_in id, bool * isContained) noexcept override { try { - *isContained = detach(this->shim().ContainsContact(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *isContained = detach_abi(this->shim().ContainsContact(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DesiredFields(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredFields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFields()); return S_OK; } catch (...) @@ -73,7 +80,8 @@ struct produceshim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ContactRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ContactRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContactRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -99,6 +108,7 @@ struct produceshim()); this->shim().ContactRemoved(token); return S_OK; } @@ -112,11 +122,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddContact(abi_arg_in contact, Windows::ApplicationModel::Contacts::Provider::AddContactResult * result) noexcept override + HRESULT __stdcall abi_AddContact(impl::abi_arg_in contact, Windows::ApplicationModel::Contacts::Provider::AddContactResult * result) noexcept override { try { - *result = detach(this->shim().AddContact(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AddContact(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -125,11 +136,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DesiredFieldsWithContactFieldType(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredFieldsWithContactFieldType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFieldsWithContactFieldType()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -165,47 +178,47 @@ namespace Windows::ApplicationModel::Contacts::Provider { template hstring impl_IContactRemovedEventArgs::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactRemovedEventArgs)->get_Id(put_abi(value))); return value; } -template Windows::ApplicationModel::Contacts::Provider::AddContactResult impl_IContactPickerUI::AddContact(hstring_ref id, const Windows::ApplicationModel::Contacts::Contact & contact) const +template Windows::ApplicationModel::Contacts::Provider::AddContactResult impl_IContactPickerUI::AddContact(hstring_view id, const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::ApplicationModel::Contacts::Provider::AddContactResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_AddContact(get(id), get(contact), &result)); + check_hresult(WINRT_SHIM(IContactPickerUI)->abi_AddContact(get_abi(id), get_abi(contact), &result)); return result; } -template void impl_IContactPickerUI::RemoveContact(hstring_ref id) const +template void impl_IContactPickerUI::RemoveContact(hstring_view id) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveContact(get(id))); + check_hresult(WINRT_SHIM(IContactPickerUI)->abi_RemoveContact(get_abi(id))); } -template bool impl_IContactPickerUI::ContainsContact(hstring_ref id) const +template bool impl_IContactPickerUI::ContainsContact(hstring_view id) const { bool isContained {}; - check_hresult(static_cast(static_cast(*this))->abi_ContainsContact(get(id), &isContained)); + check_hresult(WINRT_SHIM(IContactPickerUI)->abi_ContainsContact(get_abi(id), &isContained)); return isContained; } template Windows::Foundation::Collections::IVectorView impl_IContactPickerUI::DesiredFields() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DesiredFields(put(value))); + check_hresult(WINRT_SHIM(IContactPickerUI)->get_DesiredFields(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactSelectionMode impl_IContactPickerUI::SelectionMode() const { Windows::ApplicationModel::Contacts::ContactSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(IContactPickerUI)->get_SelectionMode(&value)); return value; } template event_token impl_IContactPickerUI::ContactRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContactRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IContactPickerUI)->add_ContactRemoved(get_abi(handler), &token)); return token; } @@ -216,23 +229,70 @@ template event_revoker impl_IContactPickerUI:: template void impl_IContactPickerUI::ContactRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContactRemoved(token)); + check_hresult(WINRT_SHIM(IContactPickerUI)->remove_ContactRemoved(token)); } template Windows::ApplicationModel::Contacts::Provider::AddContactResult impl_IContactPickerUI2::AddContact(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::ApplicationModel::Contacts::Provider::AddContactResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_AddContact(get(contact), &result)); + check_hresult(WINRT_SHIM(IContactPickerUI2)->abi_AddContact(get_abi(contact), &result)); return result; } template Windows::Foundation::Collections::IVector impl_IContactPickerUI2::DesiredFieldsWithContactFieldType() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DesiredFieldsWithContactFieldType(put(value))); + check_hresult(WINRT_SHIM(IContactPickerUI2)->get_DesiredFieldsWithContactFieldType(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Provider::IContactPickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Provider::IContactPickerUI2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Provider::IContactRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Provider::ContactPickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Provider::ContactRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.h index 3ae43e431..692bbe7f4 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Contacts.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.ViewManagement.3.h" #include "internal/Windows.Foundation.3.h" @@ -20,11 +23,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_FindRawContactsAsync(abi_arg_in contact, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindRawContactsAsync(impl::abi_arg_in contact, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindRawContactsAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindRawContactsAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce } } - HRESULT __stdcall abi_TryLinkContactsAsync(abi_arg_in primaryContact, abi_arg_in secondaryContact, abi_arg_out> contact) noexcept override + HRESULT __stdcall abi_TryLinkContactsAsync(impl::abi_arg_in primaryContact, impl::abi_arg_in secondaryContact, impl::abi_arg_out> contact) noexcept override { try { - *contact = detach(this->shim().TryLinkContactsAsync(*reinterpret_cast(&primaryContact), *reinterpret_cast(&secondaryContact))); + typename D::abi_guard guard(this->shim()); + *contact = detach_abi(this->shim().TryLinkContactsAsync(*reinterpret_cast(&primaryContact), *reinterpret_cast(&secondaryContact))); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce } } - HRESULT __stdcall abi_UnlinkRawContactAsync(abi_arg_in contact, abi_arg_out value) noexcept override + HRESULT __stdcall abi_UnlinkRawContactAsync(impl::abi_arg_in contact, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnlinkRawContactAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnlinkRawContactAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce } } - HRESULT __stdcall abi_TrySetPreferredSourceForPictureAsync(abi_arg_in aggregateContact, abi_arg_in rawContact, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TrySetPreferredSourceForPictureAsync(impl::abi_arg_in aggregateContact, impl::abi_arg_in rawContact, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TrySetPreferredSourceForPictureAsync(*reinterpret_cast(&aggregateContact), *reinterpret_cast(&rawContact))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrySetPreferredSourceForPictureAsync(*reinterpret_cast(&aggregateContact), *reinterpret_cast(&rawContact))); return S_OK; } catch (...) @@ -80,11 +87,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_SetRemoteIdentificationInformationAsync(abi_arg_in contactListId, abi_arg_in remoteSourceId, abi_arg_in accountId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SetRemoteIdentificationInformationAsync(impl::abi_arg_in contactListId, impl::abi_arg_in remoteSourceId, impl::abi_arg_in accountId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SetRemoteIdentificationInformationAsync(*reinterpret_cast(&contactListId), *reinterpret_cast(&remoteSourceId), *reinterpret_cast(&accountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetRemoteIdentificationInformationAsync(*reinterpret_cast(&contactListId), *reinterpret_cast(&remoteSourceId), *reinterpret_cast(&accountId))); return S_OK; } catch (...) @@ -98,11 +106,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -112,10 +121,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -125,11 +135,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -139,10 +150,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -152,11 +164,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Fields(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Fields(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Fields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fields()); return S_OK; } catch (...) @@ -170,11 +183,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -184,10 +198,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Id(abi_arg_in value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -197,11 +212,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Notes(abi_arg_out value) noexcept override + HRESULT __stdcall get_Notes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Notes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Notes()); return S_OK; } catch (...) @@ -211,10 +227,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Notes(abi_arg_in value) noexcept override + HRESULT __stdcall put_Notes(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Notes(*reinterpret_cast(&value)); return S_OK; } @@ -224,11 +241,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Phones(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Phones(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Phones()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Phones()); return S_OK; } catch (...) @@ -238,11 +256,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Emails(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Emails(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Emails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Emails()); return S_OK; } catch (...) @@ -252,11 +271,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Addresses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Addresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Addresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Addresses()); return S_OK; } catch (...) @@ -266,11 +286,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ConnectedServiceAccounts(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ConnectedServiceAccounts(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ConnectedServiceAccounts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectedServiceAccounts()); return S_OK; } catch (...) @@ -280,11 +301,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ImportantDates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ImportantDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ImportantDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportantDates()); return S_OK; } catch (...) @@ -294,11 +316,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DataSuppliers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DataSuppliers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DataSuppliers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataSuppliers()); return S_OK; } catch (...) @@ -308,11 +331,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_JobInfo(abi_arg_out> value) noexcept override + HRESULT __stdcall get_JobInfo(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().JobInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JobInfo()); return S_OK; } catch (...) @@ -322,11 +346,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SignificantOthers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SignificantOthers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SignificantOthers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignificantOthers()); return S_OK; } catch (...) @@ -336,11 +361,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Websites(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Websites(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Websites()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Websites()); return S_OK; } catch (...) @@ -350,11 +376,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ProviderProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProviderProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderProperties()); return S_OK; } catch (...) @@ -368,11 +395,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_ContactListId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactListId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactListId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactListId()); return S_OK; } catch (...) @@ -382,11 +410,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayPictureUserUpdateTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayPictureUserUpdateTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayPictureUserUpdateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayPictureUserUpdateTime()); return S_OK; } catch (...) @@ -395,10 +424,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayPictureUserUpdateTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayPictureUserUpdateTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayPictureUserUpdateTime(*reinterpret_cast(&value)); return S_OK; } @@ -412,7 +442,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsMe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMe()); return S_OK; } catch (...) @@ -421,11 +452,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AggregateId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AggregateId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AggregateId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AggregateId()); return S_OK; } catch (...) @@ -435,11 +467,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -449,10 +482,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -462,11 +496,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RingToneToken(abi_arg_out value) noexcept override + HRESULT __stdcall get_RingToneToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RingToneToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RingToneToken()); return S_OK; } catch (...) @@ -476,10 +511,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RingToneToken(abi_arg_in value) noexcept override + HRESULT __stdcall put_RingToneToken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RingToneToken(*reinterpret_cast(&value)); return S_OK; } @@ -493,7 +529,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsDisplayPictureManuallySet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisplayPictureManuallySet()); return S_OK; } catch (...) @@ -502,11 +539,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LargeDisplayPicture(abi_arg_out value) noexcept override + HRESULT __stdcall get_LargeDisplayPicture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LargeDisplayPicture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeDisplayPicture()); return S_OK; } catch (...) @@ -516,11 +554,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SmallDisplayPicture(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmallDisplayPicture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmallDisplayPicture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallDisplayPicture()); return S_OK; } catch (...) @@ -530,11 +569,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SourceDisplayPicture(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDisplayPicture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDisplayPicture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDisplayPicture()); return S_OK; } catch (...) @@ -544,10 +584,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_SourceDisplayPicture(abi_arg_in value) noexcept override + HRESULT __stdcall put_SourceDisplayPicture(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceDisplayPicture(*reinterpret_cast(&value)); return S_OK; } @@ -557,11 +598,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TextToneToken(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextToneToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextToneToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextToneToken()); return S_OK; } catch (...) @@ -571,10 +613,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TextToneToken(abi_arg_in value) noexcept override + HRESULT __stdcall put_TextToneToken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextToneToken(*reinterpret_cast(&value)); return S_OK; } @@ -588,7 +631,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsAggregate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAggregate()); return S_OK; } catch (...) @@ -597,11 +641,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FullName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FullName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullName()); return S_OK; } catch (...) @@ -611,11 +656,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayNameOverride(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayNameOverride(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayNameOverride()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayNameOverride()); return S_OK; } catch (...) @@ -625,10 +671,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayNameOverride(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayNameOverride(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayNameOverride(*reinterpret_cast(&value)); return S_OK; } @@ -638,11 +685,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Nickname(abi_arg_out value) noexcept override + HRESULT __stdcall get_Nickname(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Nickname()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nickname()); return S_OK; } catch (...) @@ -652,10 +700,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Nickname(abi_arg_in value) noexcept override + HRESULT __stdcall put_Nickname(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Nickname(*reinterpret_cast(&value)); return S_OK; } @@ -665,11 +714,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SortName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SortName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SortName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SortName()); return S_OK; } catch (...) @@ -683,11 +733,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_StreetAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_StreetAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreetAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreetAddress()); return S_OK; } catch (...) @@ -697,10 +748,11 @@ struct produce : produc } } - HRESULT __stdcall put_StreetAddress(abi_arg_in value) noexcept override + HRESULT __stdcall put_StreetAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StreetAddress(*reinterpret_cast(&value)); return S_OK; } @@ -710,11 +762,12 @@ struct produce : produc } } - HRESULT __stdcall get_Locality(abi_arg_out value) noexcept override + HRESULT __stdcall get_Locality(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Locality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locality()); return S_OK; } catch (...) @@ -724,10 +777,11 @@ struct produce : produc } } - HRESULT __stdcall put_Locality(abi_arg_in value) noexcept override + HRESULT __stdcall put_Locality(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Locality(*reinterpret_cast(&value)); return S_OK; } @@ -737,11 +791,12 @@ struct produce : produc } } - HRESULT __stdcall get_Region(abi_arg_out value) noexcept override + HRESULT __stdcall get_Region(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Region()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Region()); return S_OK; } catch (...) @@ -751,10 +806,11 @@ struct produce : produc } } - HRESULT __stdcall put_Region(abi_arg_in value) noexcept override + HRESULT __stdcall put_Region(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Region(*reinterpret_cast(&value)); return S_OK; } @@ -764,11 +820,12 @@ struct produce : produc } } - HRESULT __stdcall get_Country(abi_arg_out value) noexcept override + HRESULT __stdcall get_Country(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Country()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Country()); return S_OK; } catch (...) @@ -778,10 +835,11 @@ struct produce : produc } } - HRESULT __stdcall put_Country(abi_arg_in value) noexcept override + HRESULT __stdcall put_Country(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Country(*reinterpret_cast(&value)); return S_OK; } @@ -791,11 +849,12 @@ struct produce : produc } } - HRESULT __stdcall get_PostalCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_PostalCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostalCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostalCode()); return S_OK; } catch (...) @@ -805,10 +864,11 @@ struct produce : produc } } - HRESULT __stdcall put_PostalCode(abi_arg_in value) noexcept override + HRESULT __stdcall put_PostalCode(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PostalCode(*reinterpret_cast(&value)); return S_OK; } @@ -822,7 +882,8 @@ struct produce : produc { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -835,6 +896,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Kind(value); return S_OK; } @@ -844,11 +906,12 @@ struct produce : produc } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -858,10 +921,11 @@ struct produce : produc } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -875,11 +939,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -889,11 +954,12 @@ struct produce : pro } } - HRESULT __stdcall get_AnnotationListId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnnotationListId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationListId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationListId()); return S_OK; } catch (...) @@ -903,11 +969,12 @@ struct produce : pro } } - HRESULT __stdcall get_ContactId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactId()); return S_OK; } catch (...) @@ -917,10 +984,11 @@ struct produce : pro } } - HRESULT __stdcall put_ContactId(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContactId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactId(*reinterpret_cast(&value)); return S_OK; } @@ -930,11 +998,12 @@ struct produce : pro } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -944,10 +1013,11 @@ struct produce : pro } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -961,7 +1031,8 @@ struct produce : pro { try { - *value = detach(this->shim().SupportedOperations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedOperations()); return S_OK; } catch (...) @@ -974,6 +1045,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportedOperations(value); return S_OK; } @@ -987,7 +1059,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsDisabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisabled()); return S_OK; } catch (...) @@ -996,11 +1069,12 @@ struct produce : pro } } - HRESULT __stdcall get_ProviderProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProviderProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderProperties()); return S_OK; } catch (...) @@ -1014,11 +1088,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1028,11 +1103,12 @@ struct produce : } } - HRESULT __stdcall get_ProviderPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProviderPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderPackageFamilyName()); return S_OK; } catch (...) @@ -1042,11 +1118,12 @@ struct produce : } } - HRESULT __stdcall get_UserDataAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -1056,11 +1133,12 @@ struct produce : } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out value) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -1070,11 +1148,12 @@ struct produce : } } - HRESULT __stdcall abi_TrySaveAnnotationAsync(abi_arg_in annotation, abi_arg_out> ppResult) noexcept override + HRESULT __stdcall abi_TrySaveAnnotationAsync(impl::abi_arg_in annotation, impl::abi_arg_out> ppResult) noexcept override { try { - *ppResult = detach(this->shim().TrySaveAnnotationAsync(*reinterpret_cast(&annotation))); + typename D::abi_guard guard(this->shim()); + *ppResult = detach_abi(this->shim().TrySaveAnnotationAsync(*reinterpret_cast(&annotation))); return S_OK; } catch (...) @@ -1084,11 +1163,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAnnotationAsync(abi_arg_in annotationId, abi_arg_out> annotation) noexcept override + HRESULT __stdcall abi_GetAnnotationAsync(impl::abi_arg_in annotationId, impl::abi_arg_out> annotation) noexcept override { try { - *annotation = detach(this->shim().GetAnnotationAsync(*reinterpret_cast(&annotationId))); + typename D::abi_guard guard(this->shim()); + *annotation = detach_abi(this->shim().GetAnnotationAsync(*reinterpret_cast(&annotationId))); return S_OK; } catch (...) @@ -1098,11 +1178,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAnnotationsByRemoteIdAsync(abi_arg_in remoteId, abi_arg_out>> annotations) noexcept override + HRESULT __stdcall abi_FindAnnotationsByRemoteIdAsync(impl::abi_arg_in remoteId, impl::abi_arg_out>> annotations) noexcept override { try { - *annotations = detach(this->shim().FindAnnotationsByRemoteIdAsync(*reinterpret_cast(&remoteId))); + typename D::abi_guard guard(this->shim()); + *annotations = detach_abi(this->shim().FindAnnotationsByRemoteIdAsync(*reinterpret_cast(&remoteId))); return S_OK; } catch (...) @@ -1112,11 +1193,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAnnotationsAsync(abi_arg_out>> annotations) noexcept override + HRESULT __stdcall abi_FindAnnotationsAsync(impl::abi_arg_out>> annotations) noexcept override { try { - *annotations = detach(this->shim().FindAnnotationsAsync()); + typename D::abi_guard guard(this->shim()); + *annotations = detach_abi(this->shim().FindAnnotationsAsync()); return S_OK; } catch (...) @@ -1126,11 +1208,12 @@ struct produce : } } - HRESULT __stdcall abi_DeleteAnnotationAsync(abi_arg_in annotation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DeleteAnnotationAsync(impl::abi_arg_in annotation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeleteAnnotationAsync(*reinterpret_cast(&annotation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeleteAnnotationAsync(*reinterpret_cast(&annotation))); return S_OK; } catch (...) @@ -1144,11 +1227,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_FindContactIdsByEmailAsync(abi_arg_in emailAddress, abi_arg_out>> contactIds) noexcept override + HRESULT __stdcall abi_FindContactIdsByEmailAsync(impl::abi_arg_in emailAddress, impl::abi_arg_out>> contactIds) noexcept override { try { - *contactIds = detach(this->shim().FindContactIdsByEmailAsync(*reinterpret_cast(&emailAddress))); + typename D::abi_guard guard(this->shim()); + *contactIds = detach_abi(this->shim().FindContactIdsByEmailAsync(*reinterpret_cast(&emailAddress))); return S_OK; } catch (...) @@ -1158,11 +1242,12 @@ struct produce } } - HRESULT __stdcall abi_FindContactIdsByPhoneNumberAsync(abi_arg_in phoneNumber, abi_arg_out>> contactIds) noexcept override + HRESULT __stdcall abi_FindContactIdsByPhoneNumberAsync(impl::abi_arg_in phoneNumber, impl::abi_arg_out>> contactIds) noexcept override { try { - *contactIds = detach(this->shim().FindContactIdsByPhoneNumberAsync(*reinterpret_cast(&phoneNumber))); + typename D::abi_guard guard(this->shim()); + *contactIds = detach_abi(this->shim().FindContactIdsByPhoneNumberAsync(*reinterpret_cast(&phoneNumber))); return S_OK; } catch (...) @@ -1172,11 +1257,12 @@ struct produce } } - HRESULT __stdcall abi_FindAnnotationsForContactAsync(abi_arg_in contact, abi_arg_out>> annotations) noexcept override + HRESULT __stdcall abi_FindAnnotationsForContactAsync(impl::abi_arg_in contact, impl::abi_arg_out>> annotations) noexcept override { try { - *annotations = detach(this->shim().FindAnnotationsForContactAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *annotations = detach_abi(this->shim().FindAnnotationsForContactAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -1186,11 +1272,12 @@ struct produce } } - HRESULT __stdcall abi_DisableAnnotationAsync(abi_arg_in annotation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DisableAnnotationAsync(impl::abi_arg_in annotation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisableAnnotationAsync(*reinterpret_cast(&annotation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisableAnnotationAsync(*reinterpret_cast(&annotation))); return S_OK; } catch (...) @@ -1200,11 +1287,12 @@ struct produce } } - HRESULT __stdcall abi_CreateAnnotationListAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateAnnotationListAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateAnnotationListAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAnnotationListAsync()); return S_OK; } catch (...) @@ -1214,11 +1302,12 @@ struct produce } } - HRESULT __stdcall abi_CreateAnnotationListInAccountAsync(abi_arg_in userDataAccountId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateAnnotationListInAccountAsync(impl::abi_arg_in userDataAccountId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateAnnotationListAsync(*reinterpret_cast(&userDataAccountId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAnnotationListAsync(*reinterpret_cast(&userDataAccountId))); return S_OK; } catch (...) @@ -1228,11 +1317,12 @@ struct produce } } - HRESULT __stdcall abi_GetAnnotationListAsync(abi_arg_in annotationListId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetAnnotationListAsync(impl::abi_arg_in annotationListId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAnnotationListAsync(*reinterpret_cast(&annotationListId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAnnotationListAsync(*reinterpret_cast(&annotationListId))); return S_OK; } catch (...) @@ -1242,11 +1332,12 @@ struct produce } } - HRESULT __stdcall abi_FindAnnotationListsAsync(abi_arg_out>> lists) noexcept override + HRESULT __stdcall abi_FindAnnotationListsAsync(impl::abi_arg_out>> lists) noexcept override { try { - *lists = detach(this->shim().FindAnnotationListsAsync()); + typename D::abi_guard guard(this->shim()); + *lists = detach_abi(this->shim().FindAnnotationListsAsync()); return S_OK; } catch (...) @@ -1260,11 +1351,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Contacts(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Contacts(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Contacts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contacts()); return S_OK; } catch (...) @@ -1278,7 +1370,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1291,10 +1384,11 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_SetData(abi_arg_in contact) noexcept override + HRESULT __stdcall abi_SetData(impl::abi_arg_in contact) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetData(*reinterpret_cast(&contact)); return S_OK; } @@ -1312,7 +1406,8 @@ struct produce : pr { try { - *value = detach(this->shim().HeaderKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderKind()); return S_OK; } catch (...) @@ -1325,6 +1420,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderKind(value); return S_OK; } @@ -1338,7 +1434,8 @@ struct produce : pr { try { - *value = detach(this->shim().InitialTabKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialTabKind()); return S_OK; } catch (...) @@ -1351,6 +1448,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialTabKind(value); return S_OK; } @@ -1364,11 +1462,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ServerSearchContactListIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerSearchContactListIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerSearchContactListIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerSearchContactListIds()); return S_OK; } catch (...) @@ -1386,7 +1485,8 @@ struct produce : produce { try { - *value = detach(this->shim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -1395,11 +1495,12 @@ struct produce : produce } } - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -1417,6 +1518,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChanges(); return S_OK; } @@ -1426,10 +1528,11 @@ struct produce : p } } - HRESULT __stdcall abi_AcceptChangesThrough(abi_arg_in lastChangeToAccept) noexcept override + HRESULT __stdcall abi_AcceptChangesThrough(impl::abi_arg_in lastChangeToAccept) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChangesThrough(*reinterpret_cast(&lastChangeToAccept)); return S_OK; } @@ -1439,11 +1542,12 @@ struct produce : p } } - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -1461,6 +1565,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Enable(); return S_OK; } @@ -1470,11 +1575,12 @@ struct produce : } } - HRESULT __stdcall abi_GetChangeReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetChangeReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetChangeReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetChangeReader()); return S_OK; } catch (...) @@ -1488,6 +1594,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(); return S_OK; } @@ -1505,6 +1612,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1518,11 +1626,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1536,11 +1645,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1550,10 +1660,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -1563,11 +1674,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceName()); return S_OK; } catch (...) @@ -1577,10 +1689,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ServiceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceName(*reinterpret_cast(&value)); return S_OK; } @@ -1594,11 +1707,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Day(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Day(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Day()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Day()); return S_OK; } catch (...) @@ -1608,10 +1722,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Day(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Day(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Day(*reinterpret_cast *>(&value)); return S_OK; } @@ -1621,11 +1736,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Month(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Month(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Month()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Month()); return S_OK; } catch (...) @@ -1635,10 +1751,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Month(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Month(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Month(*reinterpret_cast *>(&value)); return S_OK; } @@ -1648,11 +1765,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Year(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Year(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Year()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Year()); return S_OK; } catch (...) @@ -1662,10 +1780,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Year(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Year(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Year(*reinterpret_cast *>(&value)); return S_OK; } @@ -1679,7 +1798,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -1692,6 +1812,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Kind(value); return S_OK; } @@ -1701,11 +1822,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1715,10 +1837,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -1732,11 +1855,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Address(abi_arg_out value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -1746,10 +1870,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Address(abi_arg_in value) noexcept override + HRESULT __stdcall put_Address(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Address(*reinterpret_cast(&value)); return S_OK; } @@ -1763,7 +1888,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -1776,6 +1902,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Kind(value); return S_OK; } @@ -1785,11 +1912,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1799,10 +1927,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -1820,7 +1949,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1833,7 +1963,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -1842,11 +1973,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1856,11 +1988,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1874,11 +2007,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateField_Default(abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateField_Default(impl::abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateField(*reinterpret_cast(&value), type)); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateField(*reinterpret_cast(&value), type)); return S_OK; } catch (...) @@ -1888,11 +2022,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateField_Category(abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateField_Category(impl::abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateField(*reinterpret_cast(&value), type, category)); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateField(*reinterpret_cast(&value), type, category)); return S_OK; } catch (...) @@ -1902,11 +2037,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateField_Custom(abi_arg_in name, abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateField_Custom(impl::abi_arg_in name, impl::abi_arg_in value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateField(*reinterpret_cast(&name), *reinterpret_cast(&value), type, category)); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateField(*reinterpret_cast(&name), *reinterpret_cast(&value), type, category)); return S_OK; } catch (...) @@ -1920,11 +2056,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1934,11 +2071,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetThumbnailAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailAsync()); return S_OK; } catch (...) @@ -1948,11 +2086,12 @@ struct produce : pr } } - HRESULT __stdcall get_Emails(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Emails(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Emails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Emails()); return S_OK; } catch (...) @@ -1962,11 +2101,12 @@ struct produce : pr } } - HRESULT __stdcall get_PhoneNumbers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumbers()); return S_OK; } catch (...) @@ -1976,11 +2116,12 @@ struct produce : pr } } - HRESULT __stdcall get_Locations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Locations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Locations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locations()); return S_OK; } catch (...) @@ -1990,11 +2131,12 @@ struct produce : pr } } - HRESULT __stdcall get_InstantMessages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InstantMessages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InstantMessages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstantMessages()); return S_OK; } catch (...) @@ -2004,11 +2146,12 @@ struct produce : pr } } - HRESULT __stdcall get_CustomFields(abi_arg_out> value) noexcept override + HRESULT __stdcall get_CustomFields(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CustomFields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomFields()); return S_OK; } catch (...) @@ -2018,11 +2161,12 @@ struct produce : pr } } - HRESULT __stdcall abi_QueryCustomFields(abi_arg_in customName, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_QueryCustomFields(impl::abi_arg_in customName, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().QueryCustomFields(*reinterpret_cast(&customName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryCustomFields(*reinterpret_cast(&customName))); return S_OK; } catch (...) @@ -2036,11 +2180,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_UserName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserName()); return S_OK; } catch (...) @@ -2050,11 +2195,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Service(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Service()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Service()); return S_OK; } catch (...) @@ -2064,11 +2210,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayText()); return S_OK; } catch (...) @@ -2078,11 +2225,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LaunchUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LaunchUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LaunchUri()); return S_OK; } catch (...) @@ -2096,11 +2244,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstantMessage_Default(abi_arg_in userName, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateInstantMessage_Default(impl::abi_arg_in userName, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateInstantMessage(*reinterpret_cast(&userName))); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateInstantMessage(*reinterpret_cast(&userName))); return S_OK; } catch (...) @@ -2110,11 +2259,12 @@ struct produce userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateInstantMessage_Category(impl::abi_arg_in userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateInstantMessage(*reinterpret_cast(&userName), category)); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateInstantMessage(*reinterpret_cast(&userName), category)); return S_OK; } catch (...) @@ -2124,11 +2274,12 @@ struct produce userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_in service, abi_arg_in displayText, abi_arg_in verb, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateInstantMessage_All(impl::abi_arg_in userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_in service, impl::abi_arg_in displayText, impl::abi_arg_in verb, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateInstantMessage(*reinterpret_cast(&userName), category, *reinterpret_cast(&service), *reinterpret_cast(&displayText), *reinterpret_cast(&verb))); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateInstantMessage(*reinterpret_cast(&userName), category, *reinterpret_cast(&service), *reinterpret_cast(&displayText), *reinterpret_cast(&verb))); return S_OK; } catch (...) @@ -2142,11 +2293,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CompanyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompanyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompanyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyName()); return S_OK; } catch (...) @@ -2156,10 +2308,11 @@ struct produce : produc } } - HRESULT __stdcall put_CompanyName(abi_arg_in value) noexcept override + HRESULT __stdcall put_CompanyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompanyName(*reinterpret_cast(&value)); return S_OK; } @@ -2169,11 +2322,12 @@ struct produce : produc } } - HRESULT __stdcall get_CompanyYomiName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompanyYomiName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompanyYomiName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyYomiName()); return S_OK; } catch (...) @@ -2183,10 +2337,11 @@ struct produce : produc } } - HRESULT __stdcall put_CompanyYomiName(abi_arg_in value) noexcept override + HRESULT __stdcall put_CompanyYomiName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompanyYomiName(*reinterpret_cast(&value)); return S_OK; } @@ -2196,11 +2351,12 @@ struct produce : produc } } - HRESULT __stdcall get_Department(abi_arg_out value) noexcept override + HRESULT __stdcall get_Department(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Department()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Department()); return S_OK; } catch (...) @@ -2210,10 +2366,11 @@ struct produce : produc } } - HRESULT __stdcall put_Department(abi_arg_in value) noexcept override + HRESULT __stdcall put_Department(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Department(*reinterpret_cast(&value)); return S_OK; } @@ -2223,11 +2380,12 @@ struct produce : produc } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -2237,10 +2395,11 @@ struct produce : produc } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -2250,11 +2409,12 @@ struct produce : produc } } - HRESULT __stdcall get_Manager(abi_arg_out value) noexcept override + HRESULT __stdcall get_Manager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Manager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manager()); return S_OK; } catch (...) @@ -2264,10 +2424,11 @@ struct produce : produc } } - HRESULT __stdcall put_Manager(abi_arg_in value) noexcept override + HRESULT __stdcall put_Manager(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Manager(*reinterpret_cast(&value)); return S_OK; } @@ -2277,11 +2438,12 @@ struct produce : produc } } - HRESULT __stdcall get_Office(abi_arg_out value) noexcept override + HRESULT __stdcall get_Office(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Office()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Office()); return S_OK; } catch (...) @@ -2291,10 +2453,11 @@ struct produce : produc } } - HRESULT __stdcall put_Office(abi_arg_in value) noexcept override + HRESULT __stdcall put_Office(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Office(*reinterpret_cast(&value)); return S_OK; } @@ -2304,11 +2467,12 @@ struct produce : produc } } - HRESULT __stdcall get_CompanyAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompanyAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompanyAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyAddress()); return S_OK; } catch (...) @@ -2318,10 +2482,11 @@ struct produce : produc } } - HRESULT __stdcall put_CompanyAddress(abi_arg_in value) noexcept override + HRESULT __stdcall put_CompanyAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompanyAddress(*reinterpret_cast(&value)); return S_OK; } @@ -2331,11 +2496,12 @@ struct produce : produc } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -2345,10 +2511,11 @@ struct produce : produc } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -2362,11 +2529,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Call(abi_arg_out value) noexcept override + HRESULT __stdcall get_Call(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Call()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Call()); return S_OK; } catch (...) @@ -2376,11 +2544,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -2390,11 +2559,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Map(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Map()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Map()); return S_OK; } catch (...) @@ -2404,11 +2574,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Post(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Post()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Post()); return S_OK; } catch (...) @@ -2418,11 +2589,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_VideoCall(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoCall()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoCall()); return S_OK; } catch (...) @@ -2436,11 +2608,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2450,11 +2623,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2464,10 +2638,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -2477,11 +2652,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SourceDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDisplayName()); return S_OK; } catch (...) @@ -2495,7 +2671,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsHidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHidden()); return S_OK; } catch (...) @@ -2508,6 +2685,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsHidden(value); return S_OK; } @@ -2521,7 +2699,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().OtherAppReadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppReadAccess()); return S_OK; } catch (...) @@ -2534,6 +2713,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppReadAccess(value); return S_OK; } @@ -2547,7 +2727,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().OtherAppWriteAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppWriteAccess()); return S_OK; } catch (...) @@ -2560,6 +2741,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppWriteAccess(value); return S_OK; } @@ -2569,11 +2751,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -2583,11 +2766,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SyncManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_SyncManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SyncManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SyncManager()); return S_OK; } catch (...) @@ -2601,7 +2785,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SupportsServerSearch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsServerSearch()); return S_OK; } catch (...) @@ -2610,11 +2795,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_UserDataAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -2624,11 +2810,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_ContactChanged(abi_arg_in> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_ContactChanged(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContactChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContactChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2641,6 +2828,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactChanged(value); return S_OK; } @@ -2650,11 +2838,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -2664,11 +2853,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -2678,11 +2868,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetContactFromRemoteIdAsync(abi_arg_in remoteId, abi_arg_out> contact) noexcept override + HRESULT __stdcall abi_GetContactFromRemoteIdAsync(impl::abi_arg_in remoteId, impl::abi_arg_out> contact) noexcept override { try { - *contact = detach(this->shim().GetContactFromRemoteIdAsync(*reinterpret_cast(&remoteId))); + typename D::abi_guard guard(this->shim()); + *contact = detach_abi(this->shim().GetContactFromRemoteIdAsync(*reinterpret_cast(&remoteId))); return S_OK; } catch (...) @@ -2692,11 +2883,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetMeContactAsync(abi_arg_out> meContact) noexcept override + HRESULT __stdcall abi_GetMeContactAsync(impl::abi_arg_out> meContact) noexcept override { try { - *meContact = detach(this->shim().GetMeContactAsync()); + typename D::abi_guard guard(this->shim()); + *meContact = detach_abi(this->shim().GetMeContactAsync()); return S_OK; } catch (...) @@ -2706,11 +2898,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetContactReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetContactReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetContactReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetContactReader()); return S_OK; } catch (...) @@ -2720,11 +2913,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetContactReaderWithOptions(abi_arg_in options, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetContactReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetContactReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetContactReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -2734,11 +2928,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SaveContactAsync(abi_arg_in contact, abi_arg_out value) noexcept override + HRESULT __stdcall abi_SaveContactAsync(impl::abi_arg_in contact, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaveContactAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaveContactAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -2748,11 +2943,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_DeleteContactAsync(abi_arg_in contact, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DeleteContactAsync(impl::abi_arg_in contact, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeleteContactAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeleteContactAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -2762,11 +2958,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetContactAsync(abi_arg_in contactId, abi_arg_out> contacts) noexcept override + HRESULT __stdcall abi_GetContactAsync(impl::abi_arg_in contactId, impl::abi_arg_out> contacts) noexcept override { try { - *contacts = detach(this->shim().GetContactAsync(*reinterpret_cast(&contactId))); + typename D::abi_guard guard(this->shim()); + *contacts = detach_abi(this->shim().GetContactAsync(*reinterpret_cast(&contactId))); return S_OK; } catch (...) @@ -2780,11 +2977,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_RegisterSyncManagerAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_RegisterSyncManagerAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().RegisterSyncManagerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterSyncManagerAsync()); return S_OK; } catch (...) @@ -2798,6 +2996,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportsServerSearch(value); return S_OK; } @@ -2807,11 +3006,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SyncConstraints(abi_arg_out value) noexcept override + HRESULT __stdcall get_SyncConstraints(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SyncConstraints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SyncConstraints()); return S_OK; } catch (...) @@ -2829,7 +3029,8 @@ struct produceshim().CanSyncDescriptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSyncDescriptions()); return S_OK; } catch (...) @@ -2842,6 +3043,7 @@ struct produceshim()); this->shim().CanSyncDescriptions(value); return S_OK; } @@ -2851,11 +3053,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxHomePhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxHomePhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxHomePhoneNumbers()); return S_OK; } catch (...) @@ -2865,10 +3068,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxHomePhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxHomePhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -2878,11 +3082,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxMobilePhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxMobilePhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxMobilePhoneNumbers()); return S_OK; } catch (...) @@ -2892,10 +3097,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxMobilePhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxMobilePhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -2905,11 +3111,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxWorkPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxWorkPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWorkPhoneNumbers()); return S_OK; } catch (...) @@ -2919,10 +3126,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxWorkPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxWorkPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -2932,11 +3140,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxOtherPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxOtherPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOtherPhoneNumbers()); return S_OK; } catch (...) @@ -2946,10 +3155,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxOtherPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxOtherPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -2959,11 +3169,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxPagerPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxPagerPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPagerPhoneNumbers()); return S_OK; } catch (...) @@ -2973,10 +3184,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxPagerPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxPagerPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -2986,11 +3198,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxBusinessFaxPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxBusinessFaxPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxBusinessFaxPhoneNumbers()); return S_OK; } catch (...) @@ -3000,10 +3213,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxBusinessFaxPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxBusinessFaxPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -3013,11 +3227,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxHomeFaxPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxHomeFaxPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxHomeFaxPhoneNumbers()); return S_OK; } catch (...) @@ -3027,10 +3242,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxHomeFaxPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxHomeFaxPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -3040,11 +3256,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxCompanyPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxCompanyPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxCompanyPhoneNumbers()); return S_OK; } catch (...) @@ -3054,10 +3271,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxCompanyPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxCompanyPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -3067,11 +3285,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxAssistantPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxAssistantPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAssistantPhoneNumbers()); return S_OK; } catch (...) @@ -3081,10 +3300,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxAssistantPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxAssistantPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -3094,11 +3314,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxRadioPhoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxRadioPhoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxRadioPhoneNumbers()); return S_OK; } catch (...) @@ -3108,10 +3329,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxRadioPhoneNumbers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxRadioPhoneNumbers(*reinterpret_cast *>(&value)); return S_OK; } @@ -3121,11 +3343,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxPersonalEmailAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxPersonalEmailAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPersonalEmailAddresses()); return S_OK; } catch (...) @@ -3135,10 +3358,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxPersonalEmailAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxPersonalEmailAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3148,11 +3372,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxWorkEmailAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxWorkEmailAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWorkEmailAddresses()); return S_OK; } catch (...) @@ -3162,10 +3387,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxWorkEmailAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxWorkEmailAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3175,11 +3401,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxOtherEmailAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxOtherEmailAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOtherEmailAddresses()); return S_OK; } catch (...) @@ -3189,10 +3416,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxOtherEmailAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxOtherEmailAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3202,11 +3430,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxHomeAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxHomeAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxHomeAddresses()); return S_OK; } catch (...) @@ -3216,10 +3445,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxHomeAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxHomeAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3229,11 +3459,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxWorkAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxWorkAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWorkAddresses()); return S_OK; } catch (...) @@ -3243,10 +3474,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxWorkAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxWorkAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3256,11 +3488,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxOtherAddresses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxOtherAddresses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOtherAddresses()); return S_OK; } catch (...) @@ -3270,10 +3503,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxOtherAddresses(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxOtherAddresses(*reinterpret_cast *>(&value)); return S_OK; } @@ -3283,11 +3517,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxBirthdayDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxBirthdayDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxBirthdayDates()); return S_OK; } catch (...) @@ -3297,10 +3532,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxBirthdayDates(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxBirthdayDates(*reinterpret_cast *>(&value)); return S_OK; } @@ -3310,11 +3546,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxAnniversaryDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxAnniversaryDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAnniversaryDates()); return S_OK; } catch (...) @@ -3324,10 +3561,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxAnniversaryDates(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxAnniversaryDates(*reinterpret_cast *>(&value)); return S_OK; } @@ -3337,11 +3575,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxOtherDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxOtherDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOtherDates()); return S_OK; } catch (...) @@ -3351,10 +3590,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxOtherDates(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxOtherDates(*reinterpret_cast *>(&value)); return S_OK; } @@ -3364,11 +3604,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxOtherRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxOtherRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOtherRelationships()); return S_OK; } catch (...) @@ -3378,10 +3619,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxOtherRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxOtherRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3391,11 +3633,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxSpouseRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxSpouseRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSpouseRelationships()); return S_OK; } catch (...) @@ -3405,10 +3648,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxSpouseRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxSpouseRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3418,11 +3662,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxPartnerRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxPartnerRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPartnerRelationships()); return S_OK; } catch (...) @@ -3432,10 +3677,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxPartnerRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxPartnerRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3445,11 +3691,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxSiblingRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxSiblingRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSiblingRelationships()); return S_OK; } catch (...) @@ -3459,10 +3706,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxSiblingRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxSiblingRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3472,11 +3720,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxParentRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxParentRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxParentRelationships()); return S_OK; } catch (...) @@ -3486,10 +3735,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxParentRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxParentRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3499,11 +3749,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxChildRelationships(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxChildRelationships()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxChildRelationships()); return S_OK; } catch (...) @@ -3513,10 +3764,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxChildRelationships(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxChildRelationships(*reinterpret_cast *>(&value)); return S_OK; } @@ -3526,11 +3778,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxJobInfo(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxJobInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxJobInfo()); return S_OK; } catch (...) @@ -3540,10 +3793,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxJobInfo(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxJobInfo(*reinterpret_cast *>(&value)); return S_OK; } @@ -3553,11 +3807,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxWebsites(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxWebsites()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWebsites()); return S_OK; } catch (...) @@ -3567,10 +3822,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_MaxWebsites(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxWebsites(*reinterpret_cast *>(&value)); return S_OK; } @@ -3588,7 +3844,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -3597,11 +3854,12 @@ struct produce } } - HRESULT __stdcall get_LastSuccessfulSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastSuccessfulSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastSuccessfulSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSuccessfulSyncTime()); return S_OK; } catch (...) @@ -3610,11 +3868,12 @@ struct produce } } - HRESULT __stdcall get_LastAttemptedSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastAttemptedSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastAttemptedSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastAttemptedSyncTime()); return S_OK; } catch (...) @@ -3623,11 +3882,12 @@ struct produce } } - HRESULT __stdcall abi_SyncAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SyncAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SyncAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SyncAsync()); return S_OK; } catch (...) @@ -3637,11 +3897,12 @@ struct produce } } - HRESULT __stdcall add_SyncStatusChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SyncStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3654,6 +3915,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SyncStatusChanged(token); return S_OK; } @@ -3671,6 +3933,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Status(value); return S_OK; } @@ -3680,10 +3943,11 @@ struct produce } } - HRESULT __stdcall put_LastSuccessfulSyncTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastSuccessfulSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastSuccessfulSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -3693,10 +3957,11 @@ struct produce } } - HRESULT __stdcall put_LastAttemptedSyncTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastAttemptedSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastAttemptedSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -3710,11 +3975,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_UnstructuredAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_UnstructuredAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnstructuredAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnstructuredAddress()); return S_OK; } catch (...) @@ -3724,11 +3990,12 @@ struct produce : } } - HRESULT __stdcall get_Street(abi_arg_out value) noexcept override + HRESULT __stdcall get_Street(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Street()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Street()); return S_OK; } catch (...) @@ -3738,11 +4005,12 @@ struct produce : } } - HRESULT __stdcall get_City(abi_arg_out value) noexcept override + HRESULT __stdcall get_City(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().City()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().City()); return S_OK; } catch (...) @@ -3752,11 +4020,12 @@ struct produce : } } - HRESULT __stdcall get_Region(abi_arg_out value) noexcept override + HRESULT __stdcall get_Region(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Region()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Region()); return S_OK; } catch (...) @@ -3766,11 +4035,12 @@ struct produce : } } - HRESULT __stdcall get_Country(abi_arg_out value) noexcept override + HRESULT __stdcall get_Country(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Country()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Country()); return S_OK; } catch (...) @@ -3780,11 +4050,12 @@ struct produce : } } - HRESULT __stdcall get_PostalCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_PostalCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostalCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostalCode()); return S_OK; } catch (...) @@ -3798,11 +4069,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateLocation_Default(abi_arg_in unstructuredAddress, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateLocation_Default(impl::abi_arg_in unstructuredAddress, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress))); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress))); return S_OK; } catch (...) @@ -3812,11 +4084,12 @@ struct produce unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateLocation_Category(impl::abi_arg_in unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress), category)); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress), category)); return S_OK; } catch (...) @@ -3826,11 +4099,12 @@ struct produce unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, abi_arg_in street, abi_arg_in city, abi_arg_in region, abi_arg_in country, abi_arg_in postalCode, abi_arg_out field) noexcept override + HRESULT __stdcall abi_CreateLocation_All(impl::abi_arg_in unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, impl::abi_arg_in street, impl::abi_arg_in city, impl::abi_arg_in region, impl::abi_arg_in country, impl::abi_arg_in postalCode, impl::abi_arg_out field) noexcept override { try { - *field = detach(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress), category, *reinterpret_cast(&street), *reinterpret_cast(&city), *reinterpret_cast(®ion), *reinterpret_cast(&country), *reinterpret_cast(&postalCode))); + typename D::abi_guard guard(this->shim()); + *field = detach_abi(this->shim().CreateLocation(*reinterpret_cast(&unstructuredAddress), category, *reinterpret_cast(&street), *reinterpret_cast(&city), *reinterpret_cast(®ion), *reinterpret_cast(&country), *reinterpret_cast(&postalCode))); return S_OK; } catch (...) @@ -3844,11 +4118,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ConvertContactToVCardAsync(abi_arg_in contact, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConvertContactToVCardAsync(impl::abi_arg_in contact, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -3858,11 +4133,12 @@ struct produce : } } - HRESULT __stdcall abi_ConvertContactToVCardAsyncWithMaxBytes(abi_arg_in contact, uint32_t maxBytes, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConvertContactToVCardAsyncWithMaxBytes(impl::abi_arg_in contact, uint32_t maxBytes, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact), maxBytes)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact), maxBytes)); return S_OK; } catch (...) @@ -3872,11 +4148,12 @@ struct produce : } } - HRESULT __stdcall abi_ConvertVCardToContactAsync(abi_arg_in vCard, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConvertVCardToContactAsync(impl::abi_arg_in vCard, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConvertVCardToContactAsync(*reinterpret_cast(&vCard))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConvertVCardToContactAsync(*reinterpret_cast(&vCard))); return S_OK; } catch (...) @@ -3886,11 +4163,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -3900,11 +4178,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAnnotationStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAnnotationStoreAsync(accessType)); return S_OK; } catch (...) @@ -3918,7 +4197,8 @@ struct produce : { try { - *value = detach(this->shim().SystemDisplayNameOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemDisplayNameOrder()); return S_OK; } catch (...) @@ -3931,6 +4211,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemDisplayNameOrder(value); return S_OK; } @@ -3944,7 +4225,8 @@ struct produce : { try { - *value = detach(this->shim().SystemSortOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemSortOrder()); return S_OK; } catch (...) @@ -3957,6 +4239,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemSortOrder(value); return S_OK; } @@ -3966,11 +4249,12 @@ struct produce : } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -3984,10 +4268,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ShowContactCard(abi_arg_in contact, abi_arg_in selection) noexcept override + HRESULT __stdcall abi_ShowContactCard(impl::abi_arg_in contact, impl::abi_arg_in selection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection)); return S_OK; } @@ -3997,10 +4282,11 @@ struct produce : } } - HRESULT __stdcall abi_ShowContactCardWithPlacement(abi_arg_in contact, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override + HRESULT __stdcall abi_ShowContactCardWithPlacement(impl::abi_arg_in contact, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement); return S_OK; } @@ -4010,11 +4296,12 @@ struct produce : } } - HRESULT __stdcall abi_ShowDelayLoadedContactCard(abi_arg_in contact, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out dataLoader) noexcept override + HRESULT __stdcall abi_ShowDelayLoadedContactCard(impl::abi_arg_in contact, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out dataLoader) noexcept override { try { - *dataLoader = detach(this->shim().ShowDelayLoadedContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *dataLoader = detach_abi(this->shim().ShowDelayLoadedContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -4028,11 +4315,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> store) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> store) noexcept override { try { - *store = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *store = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -4046,11 +4334,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_ConvertContactToVCardAsync(abi_arg_in contact, abi_arg_out> vCard) noexcept override + HRESULT __stdcall abi_ConvertContactToVCardAsync(impl::abi_arg_in contact, impl::abi_arg_out> vCard) noexcept override { try { - *vCard = detach(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *vCard = detach_abi(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -4060,11 +4349,12 @@ struct produce } } - HRESULT __stdcall abi_ConvertContactToVCardAsyncWithMaxBytes(abi_arg_in contact, uint32_t maxBytes, abi_arg_out> vCard) noexcept override + HRESULT __stdcall abi_ConvertContactToVCardAsyncWithMaxBytes(impl::abi_arg_in contact, uint32_t maxBytes, impl::abi_arg_out> vCard) noexcept override { try { - *vCard = detach(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact), maxBytes)); + typename D::abi_guard guard(this->shim()); + *vCard = detach_abi(this->shim().ConvertContactToVCardAsync(*reinterpret_cast(&contact), maxBytes)); return S_OK; } catch (...) @@ -4074,11 +4364,12 @@ struct produce } } - HRESULT __stdcall abi_ConvertVCardToContactAsync(abi_arg_in vCard, abi_arg_out> contact) noexcept override + HRESULT __stdcall abi_ConvertVCardToContactAsync(impl::abi_arg_in vCard, impl::abi_arg_out> contact) noexcept override { try { - *contact = detach(this->shim().ConvertVCardToContactAsync(*reinterpret_cast(&vCard))); + typename D::abi_guard guard(this->shim()); + *contact = detach_abi(this->shim().ConvertVCardToContactAsync(*reinterpret_cast(&vCard))); return S_OK; } catch (...) @@ -4088,11 +4379,12 @@ struct produce } } - HRESULT __stdcall abi_RequestStoreAsyncWithAccessType(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType, abi_arg_out> store) noexcept override + HRESULT __stdcall abi_RequestStoreAsyncWithAccessType(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType, impl::abi_arg_out> store) noexcept override { try { - *store = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *store = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -4102,11 +4394,12 @@ struct produce } } - HRESULT __stdcall abi_RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType, abi_arg_out> store) noexcept override + HRESULT __stdcall abi_RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType, impl::abi_arg_out> store) noexcept override { try { - *store = detach(this->shim().RequestAnnotationStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *store = detach_abi(this->shim().RequestAnnotationStoreAsync(accessType)); return S_OK; } catch (...) @@ -4120,7 +4413,8 @@ struct produce { try { - *result = detach(this->shim().IsShowContactCardSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsShowContactCardSupported()); return S_OK; } catch (...) @@ -4129,10 +4423,11 @@ struct produce } } - HRESULT __stdcall abi_ShowContactCardWithOptions(abi_arg_in contact, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in contactCardOptions) noexcept override + HRESULT __stdcall abi_ShowContactCardWithOptions(impl::abi_arg_in contact, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in contactCardOptions) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&contactCardOptions)); return S_OK; } @@ -4146,7 +4441,8 @@ struct produce { try { - *result = detach(this->shim().IsShowDelayLoadedContactCardSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsShowDelayLoadedContactCardSupported()); return S_OK; } catch (...) @@ -4155,11 +4451,12 @@ struct produce } } - HRESULT __stdcall abi_ShowDelayLoadedContactCardWithOptions(abi_arg_in contact, abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_in contactCardOptions, abi_arg_out dataLoader) noexcept override + HRESULT __stdcall abi_ShowDelayLoadedContactCardWithOptions(impl::abi_arg_in contact, impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_in contactCardOptions, impl::abi_arg_out dataLoader) noexcept override { try { - *dataLoader = detach(this->shim().ShowDelayLoadedContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&contactCardOptions))); + typename D::abi_guard guard(this->shim()); + *dataLoader = detach_abi(this->shim().ShowDelayLoadedContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&selection), preferredPlacement, *reinterpret_cast(&contactCardOptions))); return S_OK; } catch (...) @@ -4169,10 +4466,11 @@ struct produce } } - HRESULT __stdcall abi_ShowFullContactCard(abi_arg_in contact, abi_arg_in fullContactCardOptions) noexcept override + HRESULT __stdcall abi_ShowFullContactCard(impl::abi_arg_in contact, impl::abi_arg_in fullContactCardOptions) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowFullContactCard(*reinterpret_cast(&contact), *reinterpret_cast(&fullContactCardOptions)); return S_OK; } @@ -4186,7 +4484,8 @@ struct produce { try { - *value = detach(this->shim().SystemDisplayNameOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemDisplayNameOrder()); return S_OK; } catch (...) @@ -4199,6 +4498,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemDisplayNameOrder(value); return S_OK; } @@ -4212,7 +4512,8 @@ struct produce { try { - *value = detach(this->shim().SystemSortOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemSortOrder()); return S_OK; } catch (...) @@ -4225,6 +4526,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemSortOrder(value); return S_OK; } @@ -4238,11 +4540,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -4260,7 +4563,8 @@ struct produce : pr { try { - *value = detach(this->shim().Field()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Field()); return S_OK; } catch (...) @@ -4269,11 +4573,12 @@ struct produce : pr } } - HRESULT __stdcall get_Segments(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Segments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Segments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Segments()); return S_OK; } catch (...) @@ -4283,11 +4588,12 @@ struct produce : pr } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -4301,11 +4607,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_FirstName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstName()); return S_OK; } catch (...) @@ -4315,10 +4622,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_FirstName(abi_arg_in value) noexcept override + HRESULT __stdcall put_FirstName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstName(*reinterpret_cast(&value)); return S_OK; } @@ -4328,11 +4636,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_LastName(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastName()); return S_OK; } catch (...) @@ -4342,10 +4651,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_LastName(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastName(*reinterpret_cast(&value)); return S_OK; } @@ -4355,11 +4665,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MiddleName(abi_arg_out value) noexcept override + HRESULT __stdcall get_MiddleName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MiddleName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MiddleName()); return S_OK; } catch (...) @@ -4369,10 +4680,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_MiddleName(abi_arg_in value) noexcept override + HRESULT __stdcall put_MiddleName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MiddleName(*reinterpret_cast(&value)); return S_OK; } @@ -4382,11 +4694,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_YomiGivenName(abi_arg_out value) noexcept override + HRESULT __stdcall get_YomiGivenName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiGivenName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiGivenName()); return S_OK; } catch (...) @@ -4396,10 +4709,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_YomiGivenName(abi_arg_in value) noexcept override + HRESULT __stdcall put_YomiGivenName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().YomiGivenName(*reinterpret_cast(&value)); return S_OK; } @@ -4409,11 +4723,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_YomiFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_YomiFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiFamilyName()); return S_OK; } catch (...) @@ -4423,10 +4738,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_YomiFamilyName(abi_arg_in value) noexcept override + HRESULT __stdcall put_YomiFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().YomiFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -4436,11 +4752,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HonorificNameSuffix(abi_arg_out value) noexcept override + HRESULT __stdcall get_HonorificNameSuffix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificNameSuffix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificNameSuffix()); return S_OK; } catch (...) @@ -4450,10 +4767,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_HonorificNameSuffix(abi_arg_in value) noexcept override + HRESULT __stdcall put_HonorificNameSuffix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HonorificNameSuffix(*reinterpret_cast(&value)); return S_OK; } @@ -4463,11 +4781,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HonorificNamePrefix(abi_arg_out value) noexcept override + HRESULT __stdcall get_HonorificNamePrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificNamePrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificNamePrefix()); return S_OK; } catch (...) @@ -4477,10 +4796,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_HonorificNamePrefix(abi_arg_in value) noexcept override + HRESULT __stdcall put_HonorificNamePrefix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HonorificNamePrefix(*reinterpret_cast(&value)); return S_OK; } @@ -4490,11 +4810,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -4504,11 +4825,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_YomiDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_YomiDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiDisplayName()); return S_OK; } catch (...) @@ -4522,11 +4844,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Number(abi_arg_out value) noexcept override + HRESULT __stdcall get_Number(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Number()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Number()); return S_OK; } catch (...) @@ -4536,10 +4859,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Number(abi_arg_in value) noexcept override + HRESULT __stdcall put_Number(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Number(*reinterpret_cast(&value)); return S_OK; } @@ -4553,7 +4877,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -4566,6 +4891,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Kind(value); return S_OK; } @@ -4575,11 +4901,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -4589,10 +4916,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -4606,11 +4934,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_CommitButtonText(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommitButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommitButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommitButtonText()); return S_OK; } catch (...) @@ -4620,10 +4949,11 @@ struct produce : produce } } - HRESULT __stdcall put_CommitButtonText(abi_arg_in value) noexcept override + HRESULT __stdcall put_CommitButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -4637,7 +4967,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -4650,6 +4981,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionMode(value); return S_OK; } @@ -4659,11 +4991,12 @@ struct produce : produce } } - HRESULT __stdcall get_DesiredFields(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredFields(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredFields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFields()); return S_OK; } catch (...) @@ -4673,11 +5006,12 @@ struct produce : produce } } - HRESULT __stdcall abi_PickSingleContactAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PickSingleContactAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PickSingleContactAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PickSingleContactAsync()); return S_OK; } catch (...) @@ -4687,11 +5021,12 @@ struct produce : produce } } - HRESULT __stdcall abi_PickMultipleContactsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_PickMultipleContactsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().PickMultipleContactsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PickMultipleContactsAsync()); return S_OK; } catch (...) @@ -4705,11 +5040,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_DesiredFieldsWithContactFieldType(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredFieldsWithContactFieldType(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredFieldsWithContactFieldType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFieldsWithContactFieldType()); return S_OK; } catch (...) @@ -4719,11 +5055,12 @@ struct produce : produc } } - HRESULT __stdcall abi_PickContactAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PickContactAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PickContactAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PickContactAsync()); return S_OK; } catch (...) @@ -4733,11 +5070,12 @@ struct produce : produc } } - HRESULT __stdcall abi_PickContactsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_PickContactsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().PickContactsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PickContactsAsync()); return S_OK; } catch (...) @@ -4751,11 +5089,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_TextSearch(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextSearch(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextSearch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextSearch()); return S_OK; } catch (...) @@ -4765,11 +5104,12 @@ struct produce : p } } - HRESULT __stdcall get_ContactListIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ContactListIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ContactListIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactListIds()); return S_OK; } catch (...) @@ -4783,7 +5123,8 @@ struct produce : p { try { - *value = detach(this->shim().IncludeContactsFromHiddenLists()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeContactsFromHiddenLists()); return S_OK; } catch (...) @@ -4796,6 +5137,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().IncludeContactsFromHiddenLists(value); return S_OK; } @@ -4809,7 +5151,8 @@ struct produce : p { try { - *value = detach(this->shim().DesiredFields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFields()); return S_OK; } catch (...) @@ -4822,6 +5165,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredFields(value); return S_OK; } @@ -4835,7 +5179,8 @@ struct produce : p { try { - *value = detach(this->shim().DesiredOperations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredOperations()); return S_OK; } catch (...) @@ -4848,6 +5193,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredOperations(value); return S_OK; } @@ -4857,11 +5203,12 @@ struct produce : p } } - HRESULT __stdcall get_AnnotationListIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AnnotationListIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AnnotationListIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationListIds()); return S_OK; } catch (...) @@ -4875,11 +5222,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithText(abi_arg_in text, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithText(impl::abi_arg_in text, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithText(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithText(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -4889,11 +5237,12 @@ struct produce text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithTextAndFields(impl::abi_arg_in text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithTextAndFields(*reinterpret_cast(&text), fields)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithTextAndFields(*reinterpret_cast(&text), fields)); return S_OK; } catch (...) @@ -4911,7 +5260,8 @@ struct produce { try { - *value = detach(this->shim().Fields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fields()); return S_OK; } catch (...) @@ -4924,6 +5274,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Fields(value); return S_OK; } @@ -4933,11 +5284,12 @@ struct produce } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -4947,10 +5299,11 @@ struct produce } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -4964,7 +5317,8 @@ struct produce { try { - *value = detach(this->shim().SearchScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchScope()); return S_OK; } catch (...) @@ -4977,6 +5331,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchScope(value); return S_OK; } @@ -4990,11 +5345,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -5004,11 +5360,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetMatchingPropertiesWithMatchReason(abi_arg_in contact, abi_arg_out> ppRetVal) noexcept override + HRESULT __stdcall abi_GetMatchingPropertiesWithMatchReason(impl::abi_arg_in contact, impl::abi_arg_out> ppRetVal) noexcept override { try { - *ppRetVal = detach(this->shim().GetMatchingPropertiesWithMatchReason(*reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *ppRetVal = detach_abi(this->shim().GetMatchingPropertiesWithMatchReason(*reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -5022,11 +5379,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -5036,10 +5394,11 @@ struct produce } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -5049,11 +5408,12 @@ struct produce } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -5063,10 +5423,11 @@ struct produce } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -5084,7 +5445,8 @@ struct produceshim().Relationship()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Relationship()); return S_OK; } catch (...) @@ -5097,6 +5459,7 @@ struct produceshim()); this->shim().Relationship(value); return S_OK; } @@ -5110,11 +5473,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindContactsAsync(abi_arg_out>> contacts) noexcept override + HRESULT __stdcall abi_FindContactsAsync(impl::abi_arg_out>> contacts) noexcept override { try { - *contacts = detach(this->shim().FindContactsAsync()); + typename D::abi_guard guard(this->shim()); + *contacts = detach_abi(this->shim().FindContactsAsync()); return S_OK; } catch (...) @@ -5124,11 +5488,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindContactsWithSearchTextAsync(abi_arg_in searchText, abi_arg_out>> contacts) noexcept override + HRESULT __stdcall abi_FindContactsWithSearchTextAsync(impl::abi_arg_in searchText, impl::abi_arg_out>> contacts) noexcept override { try { - *contacts = detach(this->shim().FindContactsAsync(*reinterpret_cast(&searchText))); + typename D::abi_guard guard(this->shim()); + *contacts = detach_abi(this->shim().FindContactsAsync(*reinterpret_cast(&searchText))); return S_OK; } catch (...) @@ -5138,11 +5503,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetContactAsync(abi_arg_in contactId, abi_arg_out> contacts) noexcept override + HRESULT __stdcall abi_GetContactAsync(impl::abi_arg_in contactId, impl::abi_arg_out> contacts) noexcept override { try { - *contacts = detach(this->shim().GetContactAsync(*reinterpret_cast(&contactId))); + typename D::abi_guard guard(this->shim()); + *contacts = detach_abi(this->shim().GetContactAsync(*reinterpret_cast(&contactId))); return S_OK; } catch (...) @@ -5156,11 +5522,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -5170,11 +5537,12 @@ struct produce : produce } } - HRESULT __stdcall add_ContactChanged(abi_arg_in> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_ContactChanged(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContactChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContactChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -5187,6 +5555,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ContactChanged(value); return S_OK; } @@ -5196,11 +5565,12 @@ struct produce : produce } } - HRESULT __stdcall get_AggregateContactManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_AggregateContactManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AggregateContactManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AggregateContactManager()); return S_OK; } catch (...) @@ -5210,11 +5580,12 @@ struct produce : produce } } - HRESULT __stdcall abi_FindContactListsAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindContactListsAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindContactListsAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindContactListsAsync()); return S_OK; } catch (...) @@ -5224,11 +5595,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetContactListAsync(abi_arg_in contactListId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetContactListAsync(impl::abi_arg_in contactListId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetContactListAsync(*reinterpret_cast(&contactListId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetContactListAsync(*reinterpret_cast(&contactListId))); return S_OK; } catch (...) @@ -5238,11 +5610,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateContactListAsync(abi_arg_in displayName, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateContactListAsync(impl::abi_arg_in displayName, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateContactListAsync(*reinterpret_cast(&displayName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateContactListAsync(*reinterpret_cast(&displayName))); return S_OK; } catch (...) @@ -5252,11 +5625,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetMeContactAsync(abi_arg_out> meContact) noexcept override + HRESULT __stdcall abi_GetMeContactAsync(impl::abi_arg_out> meContact) noexcept override { try { - *meContact = detach(this->shim().GetMeContactAsync()); + typename D::abi_guard guard(this->shim()); + *meContact = detach_abi(this->shim().GetMeContactAsync()); return S_OK; } catch (...) @@ -5266,11 +5640,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetContactReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetContactReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetContactReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetContactReader()); return S_OK; } catch (...) @@ -5280,11 +5655,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetContactReaderWithOptions(abi_arg_in options, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetContactReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetContactReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetContactReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -5294,11 +5670,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateContactListInAccountAsync(abi_arg_in displayName, abi_arg_in userDataAccountId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateContactListInAccountAsync(impl::abi_arg_in displayName, impl::abi_arg_in userDataAccountId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateContactListAsync(*reinterpret_cast(&displayName), *reinterpret_cast(&userDataAccountId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateContactListAsync(*reinterpret_cast(&displayName), *reinterpret_cast(&userDataAccountId))); return S_OK; } catch (...) @@ -5316,11 +5693,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -5330,10 +5708,11 @@ struct produce : produc } } - HRESULT __stdcall put_Uri(abi_arg_in value) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return S_OK; } @@ -5343,11 +5722,12 @@ struct produce : produc } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -5357,10 +5737,11 @@ struct produce : produc } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -5374,11 +5755,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_RawValue(abi_arg_out value) noexcept override + HRESULT __stdcall get_RawValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawValue()); return S_OK; } catch (...) @@ -5388,10 +5770,11 @@ struct produce : produ } } - HRESULT __stdcall put_RawValue(abi_arg_in value) noexcept override + HRESULT __stdcall put_RawValue(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RawValue(*reinterpret_cast(&value)); return S_OK; } @@ -5409,7 +5792,8 @@ struct produce { try { - *value = detach(this->shim().DesiredRemainingView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredRemainingView()); return S_OK; } catch (...) @@ -5422,6 +5806,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredRemainingView(value); return S_OK; } @@ -5435,11 +5820,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Email(abi_arg_out value) noexcept override + HRESULT __stdcall get_Email(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Email()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Email()); return S_OK; } catch (...) @@ -5449,11 +5835,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -5463,11 +5850,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -5477,11 +5865,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_InstantMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstantMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstantMessage()); return S_OK; } catch (...) @@ -5491,11 +5880,12 @@ struct produce name, Windows::ApplicationModel::Contacts::ContactFieldType * type) noexcept override + HRESULT __stdcall abi_ConvertNameToType(impl::abi_arg_in name, Windows::ApplicationModel::Contacts::ContactFieldType * type) noexcept override { try { - *type = detach(this->shim().ConvertNameToType(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().ConvertNameToType(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -5504,11 +5894,12 @@ struct produce name) noexcept override + HRESULT __stdcall abi_ConvertTypeToName(Windows::ApplicationModel::Contacts::ContactFieldType type, impl::abi_arg_out name) noexcept override { try { - *name = detach(this->shim().ConvertTypeToName(type)); + typename D::abi_guard guard(this->shim()); + *name = detach_abi(this->shim().ConvertTypeToName(type)); return S_OK; } catch (...) @@ -5526,483 +5917,483 @@ namespace Windows::ApplicationModel::Contacts { template Windows::ApplicationModel::Contacts::ContactCardHeaderKind impl_IContactCardOptions::HeaderKind() const { Windows::ApplicationModel::Contacts::ContactCardHeaderKind value {}; - check_hresult(static_cast(static_cast(*this))->get_HeaderKind(&value)); + check_hresult(WINRT_SHIM(IContactCardOptions)->get_HeaderKind(&value)); return value; } template void impl_IContactCardOptions::HeaderKind(Windows::ApplicationModel::Contacts::ContactCardHeaderKind value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderKind(value)); + check_hresult(WINRT_SHIM(IContactCardOptions)->put_HeaderKind(value)); } template Windows::ApplicationModel::Contacts::ContactCardTabKind impl_IContactCardOptions::InitialTabKind() const { Windows::ApplicationModel::Contacts::ContactCardTabKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialTabKind(&value)); + check_hresult(WINRT_SHIM(IContactCardOptions)->get_InitialTabKind(&value)); return value; } template void impl_IContactCardOptions::InitialTabKind(Windows::ApplicationModel::Contacts::ContactCardTabKind value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialTabKind(value)); + check_hresult(WINRT_SHIM(IContactCardOptions)->put_InitialTabKind(value)); } template Windows::Foundation::Collections::IVector impl_IContactCardOptions2::ServerSearchContactListIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ServerSearchContactListIds(put(value))); + check_hresult(WINRT_SHIM(IContactCardOptions2)->get_ServerSearchContactListIds(put_abi(value))); return value; } template Windows::UI::ViewManagement::ViewSizePreference impl_IFullContactCardOptions::DesiredRemainingView() const { Windows::UI::ViewManagement::ViewSizePreference value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredRemainingView(&value)); + check_hresult(WINRT_SHIM(IFullContactCardOptions)->get_DesiredRemainingView(&value)); return value; } template void impl_IFullContactCardOptions::DesiredRemainingView(Windows::UI::ViewManagement::ViewSizePreference value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredRemainingView(value)); + check_hresult(WINRT_SHIM(IFullContactCardOptions)->put_DesiredRemainingView(value)); } template void impl_IContactManagerStatics::ShowContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::Foundation::Rect & selection) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContactCard(get(contact), get(selection))); + check_hresult(WINRT_SHIM(IContactManagerStatics)->abi_ShowContactCard(get_abi(contact), get_abi(selection))); } template void impl_IContactManagerStatics::ShowContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContactCardWithPlacement(get(contact), get(selection), preferredPlacement)); + check_hresult(WINRT_SHIM(IContactManagerStatics)->abi_ShowContactCardWithPlacement(get_abi(contact), get_abi(selection), preferredPlacement)); } template Windows::ApplicationModel::Contacts::ContactCardDelayedDataLoader impl_IContactManagerStatics::ShowDelayLoadedContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::ApplicationModel::Contacts::ContactCardDelayedDataLoader dataLoader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ShowDelayLoadedContactCard(get(contact), get(selection), preferredPlacement, put(dataLoader))); + check_hresult(WINRT_SHIM(IContactManagerStatics)->abi_ShowDelayLoadedContactCard(get_abi(contact), get_abi(selection), preferredPlacement, put_abi(dataLoader))); return dataLoader; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics2::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation store; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(store))); + check_hresult(WINRT_SHIM(IContactManagerStatics2)->abi_RequestStoreAsync(put_abi(store))); return store; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics3::ConvertContactToVCardAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncOperation vCard; - check_hresult(static_cast(static_cast(*this))->abi_ConvertContactToVCardAsync(get(contact), put(vCard))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ConvertContactToVCardAsync(get_abi(contact), put_abi(vCard))); return vCard; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics3::ConvertContactToVCardAsync(const Windows::ApplicationModel::Contacts::Contact & contact, uint32_t maxBytes) const { Windows::Foundation::IAsyncOperation vCard; - check_hresult(static_cast(static_cast(*this))->abi_ConvertContactToVCardAsyncWithMaxBytes(get(contact), maxBytes, put(vCard))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ConvertContactToVCardAsyncWithMaxBytes(get_abi(contact), maxBytes, put_abi(vCard))); return vCard; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics3::ConvertVCardToContactAsync(const Windows::Storage::Streams::IRandomAccessStreamReference & vCard) const { Windows::Foundation::IAsyncOperation contact; - check_hresult(static_cast(static_cast(*this))->abi_ConvertVCardToContactAsync(get(vCard), put(contact))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ConvertVCardToContactAsync(get_abi(vCard), put_abi(contact))); return contact; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics3::RequestStoreAsync(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation store; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsyncWithAccessType(accessType, put(store))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_RequestStoreAsyncWithAccessType(accessType, put_abi(store))); return store; } template Windows::Foundation::IAsyncOperation impl_IContactManagerStatics3::RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation store; - check_hresult(static_cast(static_cast(*this))->abi_RequestAnnotationStoreAsync(accessType, put(store))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_RequestAnnotationStoreAsync(accessType, put_abi(store))); return store; } template bool impl_IContactManagerStatics3::IsShowContactCardSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsShowContactCardSupported(&result)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_IsShowContactCardSupported(&result)); return result; } template void impl_IContactManagerStatics3::ShowContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::ApplicationModel::Contacts::ContactCardOptions & contactCardOptions) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContactCardWithOptions(get(contact), get(selection), preferredPlacement, get(contactCardOptions))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ShowContactCardWithOptions(get_abi(contact), get_abi(selection), preferredPlacement, get_abi(contactCardOptions))); } template bool impl_IContactManagerStatics3::IsShowDelayLoadedContactCardSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsShowDelayLoadedContactCardSupported(&result)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_IsShowDelayLoadedContactCardSupported(&result)); return result; } template Windows::ApplicationModel::Contacts::ContactCardDelayedDataLoader impl_IContactManagerStatics3::ShowDelayLoadedContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement, const Windows::ApplicationModel::Contacts::ContactCardOptions & contactCardOptions) const { Windows::ApplicationModel::Contacts::ContactCardDelayedDataLoader dataLoader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ShowDelayLoadedContactCardWithOptions(get(contact), get(selection), preferredPlacement, get(contactCardOptions), put(dataLoader))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ShowDelayLoadedContactCardWithOptions(get_abi(contact), get_abi(selection), preferredPlacement, get_abi(contactCardOptions), put_abi(dataLoader))); return dataLoader; } template void impl_IContactManagerStatics3::ShowFullContactCard(const Windows::ApplicationModel::Contacts::Contact & contact, const Windows::ApplicationModel::Contacts::FullContactCardOptions & fullContactCardOptions) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowFullContactCard(get(contact), get(fullContactCardOptions))); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->abi_ShowFullContactCard(get_abi(contact), get_abi(fullContactCardOptions))); } template Windows::ApplicationModel::Contacts::ContactNameOrder impl_IContactManagerStatics3::SystemDisplayNameOrder() const { Windows::ApplicationModel::Contacts::ContactNameOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemDisplayNameOrder(&value)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->get_SystemDisplayNameOrder(&value)); return value; } template void impl_IContactManagerStatics3::SystemDisplayNameOrder(Windows::ApplicationModel::Contacts::ContactNameOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemDisplayNameOrder(value)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->put_SystemDisplayNameOrder(value)); } template Windows::ApplicationModel::Contacts::ContactNameOrder impl_IContactManagerStatics3::SystemSortOrder() const { Windows::ApplicationModel::Contacts::ContactNameOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemSortOrder(&value)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->get_SystemSortOrder(&value)); return value; } template void impl_IContactManagerStatics3::SystemSortOrder(Windows::ApplicationModel::Contacts::ContactNameOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemSortOrder(value)); + check_hresult(WINRT_SHIM(IContactManagerStatics3)->put_SystemSortOrder(value)); } template Windows::ApplicationModel::Contacts::ContactManagerForUser impl_IContactManagerStatics4::GetForUser(const Windows::System::User & user) const { Windows::ApplicationModel::Contacts::ContactManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IContactManagerStatics4)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IContactManagerForUser::ConvertContactToVCardAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConvertContactToVCardAsync(get(contact), put(result))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->abi_ConvertContactToVCardAsync(get_abi(contact), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IContactManagerForUser::ConvertContactToVCardAsync(const Windows::ApplicationModel::Contacts::Contact & contact, uint32_t maxBytes) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConvertContactToVCardAsyncWithMaxBytes(get(contact), maxBytes, put(result))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->abi_ConvertContactToVCardAsyncWithMaxBytes(get_abi(contact), maxBytes, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IContactManagerForUser::ConvertVCardToContactAsync(const Windows::Storage::Streams::IRandomAccessStreamReference & vCard) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConvertVCardToContactAsync(get(vCard), put(result))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->abi_ConvertVCardToContactAsync(get_abi(vCard), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IContactManagerForUser::RequestStoreAsync(Windows::ApplicationModel::Contacts::ContactStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->abi_RequestStoreAsync(accessType, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IContactManagerForUser::RequestAnnotationStoreAsync(Windows::ApplicationModel::Contacts::ContactAnnotationStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAnnotationStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->abi_RequestAnnotationStoreAsync(accessType, put_abi(result))); return result; } template Windows::ApplicationModel::Contacts::ContactNameOrder impl_IContactManagerForUser::SystemDisplayNameOrder() const { Windows::ApplicationModel::Contacts::ContactNameOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemDisplayNameOrder(&value)); + check_hresult(WINRT_SHIM(IContactManagerForUser)->get_SystemDisplayNameOrder(&value)); return value; } template void impl_IContactManagerForUser::SystemDisplayNameOrder(Windows::ApplicationModel::Contacts::ContactNameOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemDisplayNameOrder(value)); + check_hresult(WINRT_SHIM(IContactManagerForUser)->put_SystemDisplayNameOrder(value)); } template Windows::ApplicationModel::Contacts::ContactNameOrder impl_IContactManagerForUser::SystemSortOrder() const { Windows::ApplicationModel::Contacts::ContactNameOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemSortOrder(&value)); + check_hresult(WINRT_SHIM(IContactManagerForUser)->get_SystemSortOrder(&value)); return value; } template void impl_IContactManagerForUser::SystemSortOrder(Windows::ApplicationModel::Contacts::ContactNameOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemSortOrder(value)); + check_hresult(WINRT_SHIM(IContactManagerForUser)->put_SystemSortOrder(value)); } template Windows::System::User impl_IContactManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IContactManagerForUser)->get_User(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IAggregateContactManager::FindRawContactsAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindRawContactsAsync(get(contact), put(value))); + check_hresult(WINRT_SHIM(IAggregateContactManager)->abi_FindRawContactsAsync(get_abi(contact), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAggregateContactManager::TryLinkContactsAsync(const Windows::ApplicationModel::Contacts::Contact & primaryContact, const Windows::ApplicationModel::Contacts::Contact & secondaryContact) const { Windows::Foundation::IAsyncOperation contact; - check_hresult(static_cast(static_cast(*this))->abi_TryLinkContactsAsync(get(primaryContact), get(secondaryContact), put(contact))); + check_hresult(WINRT_SHIM(IAggregateContactManager)->abi_TryLinkContactsAsync(get_abi(primaryContact), get_abi(secondaryContact), put_abi(contact))); return contact; } template Windows::Foundation::IAsyncAction impl_IAggregateContactManager::UnlinkRawContactAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_UnlinkRawContactAsync(get(contact), put(value))); + check_hresult(WINRT_SHIM(IAggregateContactManager)->abi_UnlinkRawContactAsync(get_abi(contact), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAggregateContactManager::TrySetPreferredSourceForPictureAsync(const Windows::ApplicationModel::Contacts::Contact & aggregateContact, const Windows::ApplicationModel::Contacts::Contact & rawContact) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_TrySetPreferredSourceForPictureAsync(get(aggregateContact), get(rawContact), put(value))); + check_hresult(WINRT_SHIM(IAggregateContactManager)->abi_TrySetPreferredSourceForPictureAsync(get_abi(aggregateContact), get_abi(rawContact), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IAggregateContactManager2::SetRemoteIdentificationInformationAsync(hstring_ref contactListId, hstring_ref remoteSourceId, hstring_ref accountId) const +template Windows::Foundation::IAsyncAction impl_IAggregateContactManager2::SetRemoteIdentificationInformationAsync(hstring_view contactListId, hstring_view remoteSourceId, hstring_view accountId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SetRemoteIdentificationInformationAsync(get(contactListId), get(remoteSourceId), get(accountId), put(result))); + check_hresult(WINRT_SHIM(IAggregateContactManager2)->abi_SetRemoteIdentificationInformationAsync(get_abi(contactListId), get_abi(remoteSourceId), get_abi(accountId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindContactIdsByEmailAsync(hstring_ref emailAddress) const +template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindContactIdsByEmailAsync(hstring_view emailAddress) const { Windows::Foundation::IAsyncOperation> contactIds; - check_hresult(static_cast(static_cast(*this))->abi_FindContactIdsByEmailAsync(get(emailAddress), put(contactIds))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_FindContactIdsByEmailAsync(get_abi(emailAddress), put_abi(contactIds))); return contactIds; } -template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindContactIdsByPhoneNumberAsync(hstring_ref phoneNumber) const +template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindContactIdsByPhoneNumberAsync(hstring_view phoneNumber) const { Windows::Foundation::IAsyncOperation> contactIds; - check_hresult(static_cast(static_cast(*this))->abi_FindContactIdsByPhoneNumberAsync(get(phoneNumber), put(contactIds))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_FindContactIdsByPhoneNumberAsync(get_abi(phoneNumber), put_abi(contactIds))); return contactIds; } template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindAnnotationsForContactAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncOperation> annotations; - check_hresult(static_cast(static_cast(*this))->abi_FindAnnotationsForContactAsync(get(contact), put(annotations))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_FindAnnotationsForContactAsync(get_abi(contact), put_abi(annotations))); return annotations; } template Windows::Foundation::IAsyncAction impl_IContactAnnotationStore::DisableAnnotationAsync(const Windows::ApplicationModel::Contacts::ContactAnnotation & annotation) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DisableAnnotationAsync(get(annotation), put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_DisableAnnotationAsync(get_abi(annotation), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactAnnotationStore::CreateAnnotationListAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateAnnotationListAsync(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_CreateAnnotationListAsync(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactAnnotationStore::CreateAnnotationListAsync(hstring_ref userDataAccountId) const +template Windows::Foundation::IAsyncOperation impl_IContactAnnotationStore::CreateAnnotationListAsync(hstring_view userDataAccountId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateAnnotationListInAccountAsync(get(userDataAccountId), put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_CreateAnnotationListInAccountAsync(get_abi(userDataAccountId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactAnnotationStore::GetAnnotationListAsync(hstring_ref annotationListId) const +template Windows::Foundation::IAsyncOperation impl_IContactAnnotationStore::GetAnnotationListAsync(hstring_view annotationListId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotationListAsync(get(annotationListId), put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_GetAnnotationListAsync(get_abi(annotationListId), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationStore::FindAnnotationListsAsync() const { Windows::Foundation::IAsyncOperation> lists; - check_hresult(static_cast(static_cast(*this))->abi_FindAnnotationListsAsync(put(lists))); + check_hresult(WINRT_SHIM(IContactAnnotationStore)->abi_FindAnnotationListsAsync(put_abi(lists))); return lists; } template hstring impl_IContactAnnotationList::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->get_Id(put_abi(value))); return value; } template hstring impl_IContactAnnotationList::ProviderPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProviderPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->get_ProviderPackageFamilyName(put_abi(value))); return value; } template hstring impl_IContactAnnotationList::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->get_UserDataAccountId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IContactAnnotationList::DeleteAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_DeleteAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactAnnotationList::TrySaveAnnotationAsync(const Windows::ApplicationModel::Contacts::ContactAnnotation & annotation) const { Windows::Foundation::IAsyncOperation ppResult; - check_hresult(static_cast(static_cast(*this))->abi_TrySaveAnnotationAsync(get(annotation), put(ppResult))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_TrySaveAnnotationAsync(get_abi(annotation), put_abi(ppResult))); return ppResult; } -template Windows::Foundation::IAsyncOperation impl_IContactAnnotationList::GetAnnotationAsync(hstring_ref annotationId) const +template Windows::Foundation::IAsyncOperation impl_IContactAnnotationList::GetAnnotationAsync(hstring_view annotationId) const { Windows::Foundation::IAsyncOperation annotation; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotationAsync(get(annotationId), put(annotation))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_GetAnnotationAsync(get_abi(annotationId), put_abi(annotation))); return annotation; } -template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationList::FindAnnotationsByRemoteIdAsync(hstring_ref remoteId) const +template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationList::FindAnnotationsByRemoteIdAsync(hstring_view remoteId) const { Windows::Foundation::IAsyncOperation> annotations; - check_hresult(static_cast(static_cast(*this))->abi_FindAnnotationsByRemoteIdAsync(get(remoteId), put(annotations))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_FindAnnotationsByRemoteIdAsync(get_abi(remoteId), put_abi(annotations))); return annotations; } template Windows::Foundation::IAsyncOperation> impl_IContactAnnotationList::FindAnnotationsAsync() const { Windows::Foundation::IAsyncOperation> annotations; - check_hresult(static_cast(static_cast(*this))->abi_FindAnnotationsAsync(put(annotations))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_FindAnnotationsAsync(put_abi(annotations))); return annotations; } template Windows::Foundation::IAsyncAction impl_IContactAnnotationList::DeleteAnnotationAsync(const Windows::ApplicationModel::Contacts::ContactAnnotation & annotation) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAnnotationAsync(get(annotation), put(value))); + check_hresult(WINRT_SHIM(IContactAnnotationList)->abi_DeleteAnnotationAsync(get_abi(annotation), put_abi(value))); return value; } template hstring impl_IContactAnnotation::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_Id(put_abi(value))); return value; } template hstring impl_IContactAnnotation::AnnotationListId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AnnotationListId(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_AnnotationListId(put_abi(value))); return value; } template hstring impl_IContactAnnotation::ContactId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactId(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_ContactId(put_abi(value))); return value; } -template void impl_IContactAnnotation::ContactId(hstring_ref value) const +template void impl_IContactAnnotation::ContactId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactId(get(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->put_ContactId(get_abi(value))); } template hstring impl_IContactAnnotation::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_RemoteId(put_abi(value))); return value; } -template void impl_IContactAnnotation::RemoteId(hstring_ref value) const +template void impl_IContactAnnotation::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->put_RemoteId(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactAnnotationOperations impl_IContactAnnotation::SupportedOperations() const { Windows::ApplicationModel::Contacts::ContactAnnotationOperations value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedOperations(&value)); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_SupportedOperations(&value)); return value; } template void impl_IContactAnnotation::SupportedOperations(Windows::ApplicationModel::Contacts::ContactAnnotationOperations value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportedOperations(value)); + check_hresult(WINRT_SHIM(IContactAnnotation)->put_SupportedOperations(value)); } template bool impl_IContactAnnotation::IsDisabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisabled(&value)); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_IsDisabled(&value)); return value; } template Windows::Foundation::Collections::ValueSet impl_IContactAnnotation::ProviderProperties() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProviderProperties(put(value))); + check_hresult(WINRT_SHIM(IContactAnnotation)->get_ProviderProperties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IContactStore::FindContactsAsync() const { Windows::Foundation::IAsyncOperation> contacts; - check_hresult(static_cast(static_cast(*this))->abi_FindContactsAsync(put(contacts))); + check_hresult(WINRT_SHIM(IContactStore)->abi_FindContactsAsync(put_abi(contacts))); return contacts; } -template Windows::Foundation::IAsyncOperation> impl_IContactStore::FindContactsAsync(hstring_ref searchText) const +template Windows::Foundation::IAsyncOperation> impl_IContactStore::FindContactsAsync(hstring_view searchText) const { Windows::Foundation::IAsyncOperation> contacts; - check_hresult(static_cast(static_cast(*this))->abi_FindContactsWithSearchTextAsync(get(searchText), put(contacts))); + check_hresult(WINRT_SHIM(IContactStore)->abi_FindContactsWithSearchTextAsync(get_abi(searchText), put_abi(contacts))); return contacts; } -template Windows::Foundation::IAsyncOperation impl_IContactStore::GetContactAsync(hstring_ref contactId) const +template Windows::Foundation::IAsyncOperation impl_IContactStore::GetContactAsync(hstring_view contactId) const { Windows::Foundation::IAsyncOperation contacts; - check_hresult(static_cast(static_cast(*this))->abi_GetContactAsync(get(contactId), put(contacts))); + check_hresult(WINRT_SHIM(IContactStore)->abi_GetContactAsync(get_abi(contactId), put_abi(contacts))); return contacts; } template Windows::ApplicationModel::Contacts::ContactChangeTracker impl_IContactStore2::ChangeTracker() const { Windows::ApplicationModel::Contacts::ContactChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->get_ChangeTracker(put_abi(value))); return value; } template event_token impl_IContactStore2::ContactChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_ContactChanged(get(value), &returnValue)); + check_hresult(WINRT_SHIM(IContactStore2)->add_ContactChanged(get_abi(value), &returnValue)); return returnValue; } @@ -6013,159 +6404,159 @@ template event_revoker impl_IContactStore2::Cont template void impl_IContactStore2::ContactChanged(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_ContactChanged(value)); + check_hresult(WINRT_SHIM(IContactStore2)->remove_ContactChanged(value)); } template Windows::ApplicationModel::Contacts::AggregateContactManager impl_IContactStore2::AggregateContactManager() const { Windows::ApplicationModel::Contacts::AggregateContactManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AggregateContactManager(put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->get_AggregateContactManager(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IContactStore2::FindContactListsAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindContactListsAsync(put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_FindContactListsAsync(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactStore2::GetContactListAsync(hstring_ref contactListId) const +template Windows::Foundation::IAsyncOperation impl_IContactStore2::GetContactListAsync(hstring_view contactListId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetContactListAsync(get(contactListId), put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_GetContactListAsync(get_abi(contactListId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateContactListAsync(hstring_ref displayName) const +template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateContactListAsync(hstring_view displayName) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateContactListAsync(get(displayName), put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_CreateContactListAsync(get_abi(displayName), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactStore2::GetMeContactAsync() const { Windows::Foundation::IAsyncOperation meContact; - check_hresult(static_cast(static_cast(*this))->abi_GetMeContactAsync(put(meContact))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_GetMeContactAsync(put_abi(meContact))); return meContact; } template Windows::ApplicationModel::Contacts::ContactReader impl_IContactStore2::GetContactReader() const { Windows::ApplicationModel::Contacts::ContactReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContactReader(put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_GetContactReader(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactReader impl_IContactStore2::GetContactReader(const Windows::ApplicationModel::Contacts::ContactQueryOptions & options) const { Windows::ApplicationModel::Contacts::ContactReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContactReaderWithOptions(get(options), put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_GetContactReaderWithOptions(get_abi(options), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateContactListAsync(hstring_ref displayName, hstring_ref userDataAccountId) const +template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateContactListAsync(hstring_view displayName, hstring_view userDataAccountId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateContactListInAccountAsync(get(displayName), get(userDataAccountId), put(value))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_CreateContactListInAccountAsync(get_abi(displayName), get_abi(userDataAccountId), put_abi(value))); return value; } template hstring impl_IContactList::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_Id(put_abi(value))); return value; } template hstring impl_IContactList::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_DisplayName(put_abi(value))); return value; } -template void impl_IContactList::DisplayName(hstring_ref value) const +template void impl_IContactList::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IContactList)->put_DisplayName(get_abi(value))); } template hstring impl_IContactList::SourceDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceDisplayName(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_SourceDisplayName(put_abi(value))); return value; } template bool impl_IContactList::IsHidden() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHidden(&value)); + check_hresult(WINRT_SHIM(IContactList)->get_IsHidden(&value)); return value; } template void impl_IContactList::IsHidden(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHidden(value)); + check_hresult(WINRT_SHIM(IContactList)->put_IsHidden(value)); } template Windows::ApplicationModel::Contacts::ContactListOtherAppReadAccess impl_IContactList::OtherAppReadAccess() const { Windows::ApplicationModel::Contacts::ContactListOtherAppReadAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppReadAccess(&value)); + check_hresult(WINRT_SHIM(IContactList)->get_OtherAppReadAccess(&value)); return value; } template void impl_IContactList::OtherAppReadAccess(Windows::ApplicationModel::Contacts::ContactListOtherAppReadAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppReadAccess(value)); + check_hresult(WINRT_SHIM(IContactList)->put_OtherAppReadAccess(value)); } template Windows::ApplicationModel::Contacts::ContactListOtherAppWriteAccess impl_IContactList::OtherAppWriteAccess() const { Windows::ApplicationModel::Contacts::ContactListOtherAppWriteAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppWriteAccess(&value)); + check_hresult(WINRT_SHIM(IContactList)->get_OtherAppWriteAccess(&value)); return value; } template void impl_IContactList::OtherAppWriteAccess(Windows::ApplicationModel::Contacts::ContactListOtherAppWriteAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppWriteAccess(value)); + check_hresult(WINRT_SHIM(IContactList)->put_OtherAppWriteAccess(value)); } template Windows::ApplicationModel::Contacts::ContactChangeTracker impl_IContactList::ChangeTracker() const { Windows::ApplicationModel::Contacts::ContactChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_ChangeTracker(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactListSyncManager impl_IContactList::SyncManager() const { Windows::ApplicationModel::Contacts::ContactListSyncManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SyncManager(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_SyncManager(put_abi(value))); return value; } template bool impl_IContactList::SupportsServerSearch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsServerSearch(&value)); + check_hresult(WINRT_SHIM(IContactList)->get_SupportsServerSearch(&value)); return value; } template hstring impl_IContactList::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IContactList)->get_UserDataAccountId(put_abi(value))); return value; } template event_token impl_IContactList::ContactChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_ContactChanged(get(value), &returnValue)); + check_hresult(WINRT_SHIM(IContactList)->add_ContactChanged(get_abi(value), &returnValue)); return returnValue; } @@ -6176,1844 +6567,1844 @@ template event_revoker impl_IContactList::ContactC template void impl_IContactList::ContactChanged(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_ContactChanged(value)); + check_hresult(WINRT_SHIM(IContactList)->remove_ContactChanged(value)); } template Windows::Foundation::IAsyncAction impl_IContactList::SaveAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IContactList)->abi_SaveAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncAction impl_IContactList::DeleteAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IContactList)->abi_DeleteAsync(put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncOperation impl_IContactList::GetContactFromRemoteIdAsync(hstring_ref remoteId) const +template Windows::Foundation::IAsyncOperation impl_IContactList::GetContactFromRemoteIdAsync(hstring_view remoteId) const { Windows::Foundation::IAsyncOperation contact; - check_hresult(static_cast(static_cast(*this))->abi_GetContactFromRemoteIdAsync(get(remoteId), put(contact))); + check_hresult(WINRT_SHIM(IContactList)->abi_GetContactFromRemoteIdAsync(get_abi(remoteId), put_abi(contact))); return contact; } template Windows::Foundation::IAsyncOperation impl_IContactList::GetMeContactAsync() const { Windows::Foundation::IAsyncOperation meContact; - check_hresult(static_cast(static_cast(*this))->abi_GetMeContactAsync(put(meContact))); + check_hresult(WINRT_SHIM(IContactList)->abi_GetMeContactAsync(put_abi(meContact))); return meContact; } template Windows::ApplicationModel::Contacts::ContactReader impl_IContactList::GetContactReader() const { Windows::ApplicationModel::Contacts::ContactReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContactReader(put(value))); + check_hresult(WINRT_SHIM(IContactList)->abi_GetContactReader(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactReader impl_IContactList::GetContactReader(const Windows::ApplicationModel::Contacts::ContactQueryOptions & options) const { Windows::ApplicationModel::Contacts::ContactReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContactReaderWithOptions(get(options), put(value))); + check_hresult(WINRT_SHIM(IContactList)->abi_GetContactReaderWithOptions(get_abi(options), put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IContactList::SaveContactAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_SaveContactAsync(get(contact), put(value))); + check_hresult(WINRT_SHIM(IContactList)->abi_SaveContactAsync(get_abi(contact), put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IContactList::DeleteContactAsync(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_DeleteContactAsync(get(contact), put(value))); + check_hresult(WINRT_SHIM(IContactList)->abi_DeleteContactAsync(get_abi(contact), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IContactList::GetContactAsync(hstring_ref contactId) const +template Windows::Foundation::IAsyncOperation impl_IContactList::GetContactAsync(hstring_view contactId) const { Windows::Foundation::IAsyncOperation contacts; - check_hresult(static_cast(static_cast(*this))->abi_GetContactAsync(get(contactId), put(contacts))); + check_hresult(WINRT_SHIM(IContactList)->abi_GetContactAsync(get_abi(contactId), put_abi(contacts))); return contacts; } template Windows::Foundation::IAsyncAction impl_IContactList2::RegisterSyncManagerAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterSyncManagerAsync(put(result))); + check_hresult(WINRT_SHIM(IContactList2)->abi_RegisterSyncManagerAsync(put_abi(result))); return result; } template void impl_IContactList2::SupportsServerSearch(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsServerSearch(value)); + check_hresult(WINRT_SHIM(IContactList2)->put_SupportsServerSearch(value)); } template Windows::ApplicationModel::Contacts::ContactListSyncConstraints impl_IContactList2::SyncConstraints() const { Windows::ApplicationModel::Contacts::ContactListSyncConstraints value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SyncConstraints(put(value))); + check_hresult(WINRT_SHIM(IContactList2)->get_SyncConstraints(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactListSyncStatus impl_IContactListSyncManager::Status() const { Windows::ApplicationModel::Contacts::ContactListSyncStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IContactListSyncManager)->get_Status(&value)); return value; } template Windows::Foundation::DateTime impl_IContactListSyncManager::LastSuccessfulSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSuccessfulSyncTime(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncManager)->get_LastSuccessfulSyncTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IContactListSyncManager::LastAttemptedSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastAttemptedSyncTime(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncManager)->get_LastAttemptedSyncTime(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactListSyncManager::SyncAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SyncAsync(put(result))); + check_hresult(WINRT_SHIM(IContactListSyncManager)->abi_SyncAsync(put_abi(result))); return result; } -template event_token impl_IContactListSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IContactListSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SyncStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IContactListSyncManager)->add_SyncStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IContactListSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IContactListSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Contacts::IContactListSyncManager::remove_SyncStatusChanged, SyncStatusChanged(handler)); } template void impl_IContactListSyncManager::SyncStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SyncStatusChanged(token)); + check_hresult(WINRT_SHIM(IContactListSyncManager)->remove_SyncStatusChanged(token)); } template void impl_IContactListSyncManager2::Status(Windows::ApplicationModel::Contacts::ContactListSyncStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IContactListSyncManager2)->put_Status(value)); } template void impl_IContactListSyncManager2::LastSuccessfulSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastSuccessfulSyncTime(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncManager2)->put_LastSuccessfulSyncTime(get_abi(value))); } template void impl_IContactListSyncManager2::LastAttemptedSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastAttemptedSyncTime(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncManager2)->put_LastAttemptedSyncTime(get_abi(value))); } template bool impl_IContactListSyncConstraints::CanSyncDescriptions() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSyncDescriptions(&value)); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_CanSyncDescriptions(&value)); return value; } template void impl_IContactListSyncConstraints::CanSyncDescriptions(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanSyncDescriptions(value)); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_CanSyncDescriptions(value)); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxHomePhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxHomePhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxHomePhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxHomePhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxHomePhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxHomePhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxHomePhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxMobilePhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxMobilePhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxMobilePhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxMobilePhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxMobilePhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxMobilePhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxMobilePhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxWorkPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxWorkPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxWorkPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxWorkPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxWorkPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxWorkPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxWorkPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxOtherPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxOtherPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxOtherPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxOtherPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxOtherPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxOtherPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxOtherPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxPagerPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxPagerPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxPagerPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxPagerPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxPagerPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPagerPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxPagerPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxBusinessFaxPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxBusinessFaxPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxBusinessFaxPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxBusinessFaxPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxBusinessFaxPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxBusinessFaxPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxBusinessFaxPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxHomeFaxPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxHomeFaxPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxHomeFaxPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxHomeFaxPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxHomeFaxPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxHomeFaxPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxHomeFaxPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxCompanyPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxCompanyPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxCompanyPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxCompanyPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxCompanyPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxCompanyPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxCompanyPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxAssistantPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxAssistantPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxAssistantPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxAssistantPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxAssistantPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxAssistantPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxAssistantPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxRadioPhoneNumbers() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxRadioPhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxRadioPhoneNumbers(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxRadioPhoneNumbers(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxRadioPhoneNumbers(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxRadioPhoneNumbers(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxRadioPhoneNumbers(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxPersonalEmailAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxPersonalEmailAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxPersonalEmailAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxPersonalEmailAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxPersonalEmailAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPersonalEmailAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxPersonalEmailAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxWorkEmailAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxWorkEmailAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxWorkEmailAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxWorkEmailAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxWorkEmailAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxWorkEmailAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxWorkEmailAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxOtherEmailAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxOtherEmailAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxOtherEmailAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxOtherEmailAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxOtherEmailAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxOtherEmailAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxOtherEmailAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxHomeAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxHomeAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxHomeAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxHomeAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxHomeAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxHomeAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxHomeAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxWorkAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxWorkAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxWorkAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxWorkAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxWorkAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxWorkAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxWorkAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxOtherAddresses() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxOtherAddresses(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxOtherAddresses(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxOtherAddresses(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxOtherAddresses(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxOtherAddresses(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxOtherAddresses(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxBirthdayDates() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxBirthdayDates(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxBirthdayDates(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxBirthdayDates(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxBirthdayDates(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxBirthdayDates(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxBirthdayDates(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxAnniversaryDates() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxAnniversaryDates(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxAnniversaryDates(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxAnniversaryDates(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxAnniversaryDates(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxAnniversaryDates(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxAnniversaryDates(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxOtherDates() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxOtherDates(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxOtherDates(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxOtherDates(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxOtherDates(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxOtherDates(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxOtherDates(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxOtherRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxOtherRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxOtherRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxOtherRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxOtherRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxOtherRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxOtherRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxSpouseRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxSpouseRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxSpouseRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxSpouseRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxSpouseRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxSpouseRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxSpouseRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxPartnerRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxPartnerRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxPartnerRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxPartnerRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxPartnerRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPartnerRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxPartnerRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxSiblingRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxSiblingRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxSiblingRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxSiblingRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxSiblingRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxSiblingRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxSiblingRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxParentRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxParentRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxParentRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxParentRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxParentRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxParentRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxParentRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxChildRelationships() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxChildRelationships(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxChildRelationships(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxChildRelationships(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxChildRelationships(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxChildRelationships(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxChildRelationships(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxJobInfo() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxJobInfo(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxJobInfo(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxJobInfo(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxJobInfo(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxJobInfo(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxJobInfo(get_abi(value))); } template Windows::Foundation::IReference impl_IContactListSyncConstraints::MaxWebsites() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxWebsites(put(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->get_MaxWebsites(put_abi(value))); return value; } -template void impl_IContactListSyncConstraints::MaxWebsites(const Windows::Foundation::IReference & value) const +template void impl_IContactListSyncConstraints::MaxWebsites(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxWebsites(get(value))); + check_hresult(WINRT_SHIM(IContactListSyncConstraints)->put_MaxWebsites(get_abi(value))); } template hstring impl_IContactConnectedServiceAccount::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactConnectedServiceAccount)->get_Id(put_abi(value))); return value; } -template void impl_IContactConnectedServiceAccount::Id(hstring_ref value) const +template void impl_IContactConnectedServiceAccount::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IContactConnectedServiceAccount)->put_Id(get_abi(value))); } template hstring impl_IContactConnectedServiceAccount::ServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceName(put(value))); + check_hresult(WINRT_SHIM(IContactConnectedServiceAccount)->get_ServiceName(put_abi(value))); return value; } -template void impl_IContactConnectedServiceAccount::ServiceName(hstring_ref value) const +template void impl_IContactConnectedServiceAccount::ServiceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceName(get(value))); + check_hresult(WINRT_SHIM(IContactConnectedServiceAccount)->put_ServiceName(get_abi(value))); } template hstring impl_IContactSignificantOther::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IContactSignificantOther)->get_Name(put_abi(value))); return value; } -template void impl_IContactSignificantOther::Name(hstring_ref value) const +template void impl_IContactSignificantOther::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IContactSignificantOther)->put_Name(get_abi(value))); } template hstring impl_IContactSignificantOther::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactSignificantOther)->get_Description(put_abi(value))); return value; } -template void impl_IContactSignificantOther::Description(hstring_ref value) const +template void impl_IContactSignificantOther::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactSignificantOther)->put_Description(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactRelationship impl_IContactSignificantOther2::Relationship() const { Windows::ApplicationModel::Contacts::ContactRelationship value {}; - check_hresult(static_cast(static_cast(*this))->get_Relationship(&value)); + check_hresult(WINRT_SHIM(IContactSignificantOther2)->get_Relationship(&value)); return value; } template void impl_IContactSignificantOther2::Relationship(Windows::ApplicationModel::Contacts::ContactRelationship value) const { - check_hresult(static_cast(static_cast(*this))->put_Relationship(value)); + check_hresult(WINRT_SHIM(IContactSignificantOther2)->put_Relationship(value)); } template Windows::Foundation::Uri impl_IContactWebsite::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IContactWebsite)->get_Uri(put_abi(value))); return value; } template void impl_IContactWebsite::Uri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(value))); + check_hresult(WINRT_SHIM(IContactWebsite)->put_Uri(get_abi(value))); } template hstring impl_IContactWebsite::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactWebsite)->get_Description(put_abi(value))); return value; } -template void impl_IContactWebsite::Description(hstring_ref value) const +template void impl_IContactWebsite::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactWebsite)->put_Description(get_abi(value))); } template hstring impl_IContactWebsite2::RawValue() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RawValue(put(value))); + check_hresult(WINRT_SHIM(IContactWebsite2)->get_RawValue(put_abi(value))); return value; } -template void impl_IContactWebsite2::RawValue(hstring_ref value) const +template void impl_IContactWebsite2::RawValue(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RawValue(get(value))); + check_hresult(WINRT_SHIM(IContactWebsite2)->put_RawValue(get_abi(value))); } template hstring impl_IContactEmail::Address() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IContactEmail)->get_Address(put_abi(value))); return value; } -template void impl_IContactEmail::Address(hstring_ref value) const +template void impl_IContactEmail::Address(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Address(get(value))); + check_hresult(WINRT_SHIM(IContactEmail)->put_Address(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactEmailKind impl_IContactEmail::Kind() const { Windows::ApplicationModel::Contacts::ContactEmailKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IContactEmail)->get_Kind(&value)); return value; } template void impl_IContactEmail::Kind(Windows::ApplicationModel::Contacts::ContactEmailKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IContactEmail)->put_Kind(value)); } template hstring impl_IContactEmail::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactEmail)->get_Description(put_abi(value))); return value; } -template void impl_IContactEmail::Description(hstring_ref value) const +template void impl_IContactEmail::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactEmail)->put_Description(get_abi(value))); } template hstring impl_IContactPhone::Number() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Number(put(value))); + check_hresult(WINRT_SHIM(IContactPhone)->get_Number(put_abi(value))); return value; } -template void impl_IContactPhone::Number(hstring_ref value) const +template void impl_IContactPhone::Number(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Number(get(value))); + check_hresult(WINRT_SHIM(IContactPhone)->put_Number(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactPhoneKind impl_IContactPhone::Kind() const { Windows::ApplicationModel::Contacts::ContactPhoneKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IContactPhone)->get_Kind(&value)); return value; } template void impl_IContactPhone::Kind(Windows::ApplicationModel::Contacts::ContactPhoneKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IContactPhone)->put_Kind(value)); } template hstring impl_IContactPhone::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactPhone)->get_Description(put_abi(value))); return value; } -template void impl_IContactPhone::Description(hstring_ref value) const +template void impl_IContactPhone::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactPhone)->put_Description(get_abi(value))); } template hstring impl_IContactAddress::StreetAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StreetAddress(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_StreetAddress(put_abi(value))); return value; } -template void impl_IContactAddress::StreetAddress(hstring_ref value) const +template void impl_IContactAddress::StreetAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_StreetAddress(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_StreetAddress(get_abi(value))); } template hstring impl_IContactAddress::Locality() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Locality(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Locality(put_abi(value))); return value; } -template void impl_IContactAddress::Locality(hstring_ref value) const +template void impl_IContactAddress::Locality(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Locality(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Locality(get_abi(value))); } template hstring impl_IContactAddress::Region() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Region(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Region(put_abi(value))); return value; } -template void impl_IContactAddress::Region(hstring_ref value) const +template void impl_IContactAddress::Region(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Region(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Region(get_abi(value))); } template hstring impl_IContactAddress::Country() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Country(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Country(put_abi(value))); return value; } -template void impl_IContactAddress::Country(hstring_ref value) const +template void impl_IContactAddress::Country(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Country(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Country(get_abi(value))); } template hstring impl_IContactAddress::PostalCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostalCode(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_PostalCode(put_abi(value))); return value; } -template void impl_IContactAddress::PostalCode(hstring_ref value) const +template void impl_IContactAddress::PostalCode(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PostalCode(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_PostalCode(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactAddressKind impl_IContactAddress::Kind() const { Windows::ApplicationModel::Contacts::ContactAddressKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IContactAddress)->get_Kind(&value)); return value; } template void impl_IContactAddress::Kind(Windows::ApplicationModel::Contacts::ContactAddressKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IContactAddress)->put_Kind(value)); } template hstring impl_IContactAddress::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Description(put_abi(value))); return value; } -template void impl_IContactAddress::Description(hstring_ref value) const +template void impl_IContactAddress::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Description(get_abi(value))); } template Windows::Foundation::IReference impl_IContactDate::Day() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Day(put(value))); + check_hresult(WINRT_SHIM(IContactDate)->get_Day(put_abi(value))); return value; } -template void impl_IContactDate::Day(const Windows::Foundation::IReference & value) const +template void impl_IContactDate::Day(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Day(get(value))); + check_hresult(WINRT_SHIM(IContactDate)->put_Day(get_abi(value))); } template Windows::Foundation::IReference impl_IContactDate::Month() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Month(put(value))); + check_hresult(WINRT_SHIM(IContactDate)->get_Month(put_abi(value))); return value; } -template void impl_IContactDate::Month(const Windows::Foundation::IReference & value) const +template void impl_IContactDate::Month(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Month(get(value))); + check_hresult(WINRT_SHIM(IContactDate)->put_Month(get_abi(value))); } template Windows::Foundation::IReference impl_IContactDate::Year() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Year(put(value))); + check_hresult(WINRT_SHIM(IContactDate)->get_Year(put_abi(value))); return value; } -template void impl_IContactDate::Year(const Windows::Foundation::IReference & value) const +template void impl_IContactDate::Year(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Year(get(value))); + check_hresult(WINRT_SHIM(IContactDate)->put_Year(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactDateKind impl_IContactDate::Kind() const { Windows::ApplicationModel::Contacts::ContactDateKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IContactDate)->get_Kind(&value)); return value; } template void impl_IContactDate::Kind(Windows::ApplicationModel::Contacts::ContactDateKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IContactDate)->put_Kind(value)); } template hstring impl_IContactDate::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactDate)->get_Description(put_abi(value))); return value; } -template void impl_IContactDate::Description(hstring_ref value) const +template void impl_IContactDate::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactDate)->put_Description(get_abi(value))); } template hstring impl_IContactJobInfo::CompanyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CompanyName(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_CompanyName(put_abi(value))); return value; } -template void impl_IContactJobInfo::CompanyName(hstring_ref value) const +template void impl_IContactJobInfo::CompanyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CompanyName(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_CompanyName(get_abi(value))); } template hstring impl_IContactJobInfo::CompanyYomiName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CompanyYomiName(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_CompanyYomiName(put_abi(value))); return value; } -template void impl_IContactJobInfo::CompanyYomiName(hstring_ref value) const +template void impl_IContactJobInfo::CompanyYomiName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CompanyYomiName(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_CompanyYomiName(get_abi(value))); } template hstring impl_IContactJobInfo::Department() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Department(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_Department(put_abi(value))); return value; } -template void impl_IContactJobInfo::Department(hstring_ref value) const +template void impl_IContactJobInfo::Department(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Department(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_Department(get_abi(value))); } template hstring impl_IContactJobInfo::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_Title(put_abi(value))); return value; } -template void impl_IContactJobInfo::Title(hstring_ref value) const +template void impl_IContactJobInfo::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_Title(get_abi(value))); } template hstring impl_IContactJobInfo::Manager() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Manager(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_Manager(put_abi(value))); return value; } -template void impl_IContactJobInfo::Manager(hstring_ref value) const +template void impl_IContactJobInfo::Manager(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Manager(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_Manager(get_abi(value))); } template hstring impl_IContactJobInfo::Office() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Office(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_Office(put_abi(value))); return value; } -template void impl_IContactJobInfo::Office(hstring_ref value) const +template void impl_IContactJobInfo::Office(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Office(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_Office(get_abi(value))); } template hstring impl_IContactJobInfo::CompanyAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CompanyAddress(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_CompanyAddress(put_abi(value))); return value; } -template void impl_IContactJobInfo::CompanyAddress(hstring_ref value) const +template void impl_IContactJobInfo::CompanyAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CompanyAddress(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_CompanyAddress(get_abi(value))); } template hstring impl_IContactJobInfo::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->get_Description(put_abi(value))); return value; } -template void impl_IContactJobInfo::Description(hstring_ref value) const +template void impl_IContactJobInfo::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IContactJobInfo)->put_Description(get_abi(value))); } template hstring impl_IContact::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IContact)->get_Name(put_abi(value))); return value; } -template void impl_IContact::Name(hstring_ref value) const +template void impl_IContact::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IContact)->put_Name(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IContact::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IContact)->get_Thumbnail(put_abi(value))); return value; } template void impl_IContact::Thumbnail(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IContact)->put_Thumbnail(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IContact::Fields() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Fields(put(value))); + check_hresult(WINRT_SHIM(IContact)->get_Fields(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactFieldType impl_IContactField::Type() const { Windows::ApplicationModel::Contacts::ContactFieldType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IContactField)->get_Type(&value)); return value; } template Windows::ApplicationModel::Contacts::ContactFieldCategory impl_IContactField::Category() const { Windows::ApplicationModel::Contacts::ContactFieldCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_Category(&value)); + check_hresult(WINRT_SHIM(IContactField)->get_Category(&value)); return value; } template hstring impl_IContactField::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IContactField)->get_Name(put_abi(value))); return value; } template hstring impl_IContactField::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IContactField)->get_Value(put_abi(value))); return value; } template hstring impl_IContactName::FirstName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirstName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_FirstName(put_abi(value))); return value; } -template void impl_IContactName::FirstName(hstring_ref value) const +template void impl_IContactName::FirstName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstName(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_FirstName(get_abi(value))); } template hstring impl_IContactName::LastName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LastName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_LastName(put_abi(value))); return value; } -template void impl_IContactName::LastName(hstring_ref value) const +template void impl_IContactName::LastName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_LastName(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_LastName(get_abi(value))); } template hstring impl_IContactName::MiddleName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MiddleName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_MiddleName(put_abi(value))); return value; } -template void impl_IContactName::MiddleName(hstring_ref value) const +template void impl_IContactName::MiddleName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MiddleName(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_MiddleName(get_abi(value))); } template hstring impl_IContactName::YomiGivenName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiGivenName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_YomiGivenName(put_abi(value))); return value; } -template void impl_IContactName::YomiGivenName(hstring_ref value) const +template void impl_IContactName::YomiGivenName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_YomiGivenName(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_YomiGivenName(get_abi(value))); } template hstring impl_IContactName::YomiFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiFamilyName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_YomiFamilyName(put_abi(value))); return value; } -template void impl_IContactName::YomiFamilyName(hstring_ref value) const +template void impl_IContactName::YomiFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_YomiFamilyName(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_YomiFamilyName(get_abi(value))); } template hstring impl_IContactName::HonorificNameSuffix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificNameSuffix(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_HonorificNameSuffix(put_abi(value))); return value; } -template void impl_IContactName::HonorificNameSuffix(hstring_ref value) const +template void impl_IContactName::HonorificNameSuffix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HonorificNameSuffix(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_HonorificNameSuffix(get_abi(value))); } template hstring impl_IContactName::HonorificNamePrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificNamePrefix(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_HonorificNamePrefix(put_abi(value))); return value; } -template void impl_IContactName::HonorificNamePrefix(hstring_ref value) const +template void impl_IContactName::HonorificNamePrefix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HonorificNamePrefix(get(value))); + check_hresult(WINRT_SHIM(IContactName)->put_HonorificNamePrefix(get_abi(value))); } template hstring impl_IContactName::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IContactName::YomiDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiDisplayName(put(value))); + check_hresult(WINRT_SHIM(IContactName)->get_YomiDisplayName(put_abi(value))); return value; } template hstring impl_IContact2::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Id(put_abi(value))); return value; } -template void impl_IContact2::Id(hstring_ref value) const +template void impl_IContact2::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IContact2)->put_Id(get_abi(value))); } template hstring impl_IContact2::Notes() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Notes(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Notes(put_abi(value))); return value; } -template void impl_IContact2::Notes(hstring_ref value) const +template void impl_IContact2::Notes(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Notes(get(value))); + check_hresult(WINRT_SHIM(IContact2)->put_Notes(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IContact2::Phones() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Phones(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Phones(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::Emails() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Emails(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Emails(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::Addresses() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Addresses(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Addresses(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::ConnectedServiceAccounts() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ConnectedServiceAccounts(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_ConnectedServiceAccounts(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::ImportantDates() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ImportantDates(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_ImportantDates(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::DataSuppliers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DataSuppliers(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_DataSuppliers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::JobInfo() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_JobInfo(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_JobInfo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::SignificantOthers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SignificantOthers(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_SignificantOthers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContact2::Websites() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Websites(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_Websites(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_IContact2::ProviderProperties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_ProviderProperties(put(value))); + check_hresult(WINRT_SHIM(IContact2)->get_ProviderProperties(put_abi(value))); return value; } template hstring impl_IContact3::ContactListId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactListId(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_ContactListId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IContact3::DisplayPictureUserUpdateTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayPictureUserUpdateTime(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_DisplayPictureUserUpdateTime(put_abi(value))); return value; } template void impl_IContact3::DisplayPictureUserUpdateTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayPictureUserUpdateTime(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_DisplayPictureUserUpdateTime(get_abi(value))); } template bool impl_IContact3::IsMe() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMe(&value)); + check_hresult(WINRT_SHIM(IContact3)->get_IsMe(&value)); return value; } template hstring impl_IContact3::AggregateId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AggregateId(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_AggregateId(put_abi(value))); return value; } template hstring impl_IContact3::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_RemoteId(put_abi(value))); return value; } -template void impl_IContact3::RemoteId(hstring_ref value) const +template void impl_IContact3::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_RemoteId(get_abi(value))); } template hstring impl_IContact3::RingToneToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RingToneToken(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_RingToneToken(put_abi(value))); return value; } -template void impl_IContact3::RingToneToken(hstring_ref value) const +template void impl_IContact3::RingToneToken(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RingToneToken(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_RingToneToken(get_abi(value))); } template bool impl_IContact3::IsDisplayPictureManuallySet() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisplayPictureManuallySet(&value)); + check_hresult(WINRT_SHIM(IContact3)->get_IsDisplayPictureManuallySet(&value)); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IContact3::LargeDisplayPicture() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_LargeDisplayPicture(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_LargeDisplayPicture(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IContact3::SmallDisplayPicture() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_SmallDisplayPicture(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_SmallDisplayPicture(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IContact3::SourceDisplayPicture() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_SourceDisplayPicture(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_SourceDisplayPicture(put_abi(value))); return value; } template void impl_IContact3::SourceDisplayPicture(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceDisplayPicture(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_SourceDisplayPicture(get_abi(value))); } template hstring impl_IContact3::TextToneToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextToneToken(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_TextToneToken(put_abi(value))); return value; } -template void impl_IContact3::TextToneToken(hstring_ref value) const +template void impl_IContact3::TextToneToken(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TextToneToken(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_TextToneToken(get_abi(value))); } template bool impl_IContact3::IsAggregate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAggregate(&value)); + check_hresult(WINRT_SHIM(IContact3)->get_IsAggregate(&value)); return value; } template hstring impl_IContact3::FullName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FullName(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_FullName(put_abi(value))); return value; } template hstring impl_IContact3::DisplayNameOverride() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayNameOverride(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_DisplayNameOverride(put_abi(value))); return value; } -template void impl_IContact3::DisplayNameOverride(hstring_ref value) const +template void impl_IContact3::DisplayNameOverride(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayNameOverride(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_DisplayNameOverride(get_abi(value))); } template hstring impl_IContact3::Nickname() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Nickname(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_Nickname(put_abi(value))); return value; } -template void impl_IContact3::Nickname(hstring_ref value) const +template void impl_IContact3::Nickname(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Nickname(get(value))); + check_hresult(WINRT_SHIM(IContact3)->put_Nickname(get_abi(value))); } template hstring impl_IContact3::SortName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SortName(put(value))); + check_hresult(WINRT_SHIM(IContact3)->get_SortName(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactChangeType impl_IContactChange::ChangeType() const { Windows::ApplicationModel::Contacts::ContactChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IContactChange)->get_ChangeType(&value)); return value; } template Windows::ApplicationModel::Contacts::Contact impl_IContactChange::Contact() const { Windows::ApplicationModel::Contacts::Contact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IContactChange)->get_Contact(put_abi(value))); return value; } template void impl_IContactChangedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IContactChangedDeferral)->abi_Complete()); } template Windows::ApplicationModel::Contacts::ContactChangedDeferral impl_IContactChangedEventArgs::GetDeferral() const { Windows::ApplicationModel::Contacts::ContactChangedDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IContactChangedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template void impl_IContactChangeReader::AcceptChanges() const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChanges()); + check_hresult(WINRT_SHIM(IContactChangeReader)->abi_AcceptChanges()); } template void impl_IContactChangeReader::AcceptChangesThrough(const Windows::ApplicationModel::Contacts::ContactChange & lastChangeToAccept) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChangesThrough(get(lastChangeToAccept))); + check_hresult(WINRT_SHIM(IContactChangeReader)->abi_AcceptChangesThrough(get_abi(lastChangeToAccept))); } template Windows::Foundation::IAsyncOperation> impl_IContactChangeReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(value))); + check_hresult(WINRT_SHIM(IContactChangeReader)->abi_ReadBatchAsync(put_abi(value))); return value; } template void impl_IContactChangeTracker::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IContactChangeTracker)->abi_Enable()); } template Windows::ApplicationModel::Contacts::ContactChangeReader impl_IContactChangeTracker::GetChangeReader() const { Windows::ApplicationModel::Contacts::ContactChangeReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChangeReader(put(value))); + check_hresult(WINRT_SHIM(IContactChangeTracker)->abi_GetChangeReader(put_abi(value))); return value; } template void impl_IContactChangeTracker::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IContactChangeTracker)->abi_Reset()); } template Windows::Foundation::IAsyncOperation impl_IContactReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(value))); + check_hresult(WINRT_SHIM(IContactReader)->abi_ReadBatchAsync(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactReader::GetMatchingPropertiesWithMatchReason(const Windows::ApplicationModel::Contacts::Contact & contact) const { Windows::Foundation::Collections::IVectorView ppRetVal; - check_hresult(static_cast(static_cast(*this))->abi_GetMatchingPropertiesWithMatchReason(get(contact), put(ppRetVal))); + check_hresult(WINRT_SHIM(IContactReader)->abi_GetMatchingPropertiesWithMatchReason(get_abi(contact), put_abi(ppRetVal))); return ppRetVal; } template Windows::ApplicationModel::Contacts::ContactQuerySearchFields impl_IContactQueryTextSearch::Fields() const { Windows::ApplicationModel::Contacts::ContactQuerySearchFields value {}; - check_hresult(static_cast(static_cast(*this))->get_Fields(&value)); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->get_Fields(&value)); return value; } template void impl_IContactQueryTextSearch::Fields(Windows::ApplicationModel::Contacts::ContactQuerySearchFields value) const { - check_hresult(static_cast(static_cast(*this))->put_Fields(value)); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->put_Fields(value)); } template hstring impl_IContactQueryTextSearch::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->get_Text(put_abi(value))); return value; } -template void impl_IContactQueryTextSearch::Text(hstring_ref value) const +template void impl_IContactQueryTextSearch::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->put_Text(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactQuerySearchScope impl_IContactQueryTextSearch::SearchScope() const { Windows::ApplicationModel::Contacts::ContactQuerySearchScope value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchScope(&value)); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->get_SearchScope(&value)); return value; } template void impl_IContactQueryTextSearch::SearchScope(Windows::ApplicationModel::Contacts::ContactQuerySearchScope value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchScope(value)); + check_hresult(WINRT_SHIM(IContactQueryTextSearch)->put_SearchScope(value)); } -template Windows::ApplicationModel::Contacts::ContactQueryOptions impl_IContactQueryOptionsFactory::CreateWithText(hstring_ref text) const +template Windows::ApplicationModel::Contacts::ContactQueryOptions impl_IContactQueryOptionsFactory::CreateWithText(hstring_view text) const { Windows::ApplicationModel::Contacts::ContactQueryOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithText(get(text), put(result))); + check_hresult(WINRT_SHIM(IContactQueryOptionsFactory)->abi_CreateWithText(get_abi(text), put_abi(result))); return result; } -template Windows::ApplicationModel::Contacts::ContactQueryOptions impl_IContactQueryOptionsFactory::CreateWithTextAndFields(hstring_ref text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields) const +template Windows::ApplicationModel::Contacts::ContactQueryOptions impl_IContactQueryOptionsFactory::CreateWithTextAndFields(hstring_view text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields) const { Windows::ApplicationModel::Contacts::ContactQueryOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTextAndFields(get(text), fields, put(result))); + check_hresult(WINRT_SHIM(IContactQueryOptionsFactory)->abi_CreateWithTextAndFields(get_abi(text), fields, put_abi(result))); return result; } template Windows::ApplicationModel::Contacts::ContactQueryTextSearch impl_IContactQueryOptions::TextSearch() const { Windows::ApplicationModel::Contacts::ContactQueryTextSearch value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextSearch(put(value))); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_TextSearch(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContactQueryOptions::ContactListIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ContactListIds(put(value))); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_ContactListIds(put_abi(value))); return value; } template bool impl_IContactQueryOptions::IncludeContactsFromHiddenLists() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeContactsFromHiddenLists(&value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_IncludeContactsFromHiddenLists(&value)); return value; } template void impl_IContactQueryOptions::IncludeContactsFromHiddenLists(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncludeContactsFromHiddenLists(value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->put_IncludeContactsFromHiddenLists(value)); } template Windows::ApplicationModel::Contacts::ContactQueryDesiredFields impl_IContactQueryOptions::DesiredFields() const { Windows::ApplicationModel::Contacts::ContactQueryDesiredFields value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredFields(&value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_DesiredFields(&value)); return value; } template void impl_IContactQueryOptions::DesiredFields(Windows::ApplicationModel::Contacts::ContactQueryDesiredFields value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredFields(value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->put_DesiredFields(value)); } template Windows::ApplicationModel::Contacts::ContactAnnotationOperations impl_IContactQueryOptions::DesiredOperations() const { Windows::ApplicationModel::Contacts::ContactAnnotationOperations value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredOperations(&value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_DesiredOperations(&value)); return value; } template void impl_IContactQueryOptions::DesiredOperations(Windows::ApplicationModel::Contacts::ContactAnnotationOperations value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredOperations(value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->put_DesiredOperations(value)); } template Windows::Foundation::Collections::IVector impl_IContactQueryOptions::AnnotationListIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AnnotationListIds(put(value))); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_AnnotationListIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactBatch::Contacts() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Contacts(put(value))); + check_hresult(WINRT_SHIM(IContactBatch)->get_Contacts(put_abi(value))); return value; } template Windows::ApplicationModel::Contacts::ContactBatchStatus impl_IContactBatch::Status() const { Windows::ApplicationModel::Contacts::ContactBatchStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IContactBatch)->get_Status(&value)); return value; } template Windows::ApplicationModel::Contacts::ContactMatchReasonKind impl_IContactMatchReason::Field() const { Windows::ApplicationModel::Contacts::ContactMatchReasonKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Field(&value)); + check_hresult(WINRT_SHIM(IContactMatchReason)->get_Field(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactMatchReason::Segments() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Segments(put(value))); + check_hresult(WINRT_SHIM(IContactMatchReason)->get_Segments(put_abi(value))); return value; } template hstring impl_IContactMatchReason::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IContactMatchReason)->get_Text(put_abi(value))); return value; } template hstring impl_IContactLaunchActionVerbsStatics::Call() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Call(put(value))); + check_hresult(WINRT_SHIM(IContactLaunchActionVerbsStatics)->get_Call(put_abi(value))); return value; } template hstring impl_IContactLaunchActionVerbsStatics::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IContactLaunchActionVerbsStatics)->get_Message(put_abi(value))); return value; } template hstring impl_IContactLaunchActionVerbsStatics::Map() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Map(put(value))); + check_hresult(WINRT_SHIM(IContactLaunchActionVerbsStatics)->get_Map(put_abi(value))); return value; } template hstring impl_IContactLaunchActionVerbsStatics::Post() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Post(put(value))); + check_hresult(WINRT_SHIM(IContactLaunchActionVerbsStatics)->get_Post(put_abi(value))); return value; } template hstring impl_IContactLaunchActionVerbsStatics::VideoCall() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoCall(put(value))); + check_hresult(WINRT_SHIM(IContactLaunchActionVerbsStatics)->get_VideoCall(put_abi(value))); return value; } template hstring impl_IContactLocationField::UnstructuredAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UnstructuredAddress(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_UnstructuredAddress(put_abi(value))); return value; } template hstring impl_IContactLocationField::Street() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Street(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_Street(put_abi(value))); return value; } template hstring impl_IContactLocationField::City() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_City(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_City(put_abi(value))); return value; } template hstring impl_IContactLocationField::Region() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Region(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_Region(put_abi(value))); return value; } template hstring impl_IContactLocationField::Country() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Country(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_Country(put_abi(value))); return value; } template hstring impl_IContactLocationField::PostalCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostalCode(put(value))); + check_hresult(WINRT_SHIM(IContactLocationField)->get_PostalCode(put_abi(value))); return value; } template hstring impl_IContactInstantMessageField::UserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(value))); + check_hresult(WINRT_SHIM(IContactInstantMessageField)->get_UserName(put_abi(value))); return value; } template hstring impl_IContactInstantMessageField::Service() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Service(put(value))); + check_hresult(WINRT_SHIM(IContactInstantMessageField)->get_Service(put_abi(value))); return value; } template hstring impl_IContactInstantMessageField::DisplayText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayText(put(value))); + check_hresult(WINRT_SHIM(IContactInstantMessageField)->get_DisplayText(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IContactInstantMessageField::LaunchUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LaunchUri(put(value))); + check_hresult(WINRT_SHIM(IContactInstantMessageField)->get_LaunchUri(put_abi(value))); return value; } template hstring impl_IKnownContactFieldStatics::Email() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Email(put(value))); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->get_Email(put_abi(value))); return value; } template hstring impl_IKnownContactFieldStatics::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->get_PhoneNumber(put_abi(value))); return value; } template hstring impl_IKnownContactFieldStatics::Location() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->get_Location(put_abi(value))); return value; } template hstring impl_IKnownContactFieldStatics::InstantMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstantMessage(put(value))); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->get_InstantMessage(put_abi(value))); return value; } -template Windows::ApplicationModel::Contacts::ContactFieldType impl_IKnownContactFieldStatics::ConvertNameToType(hstring_ref name) const +template Windows::ApplicationModel::Contacts::ContactFieldType impl_IKnownContactFieldStatics::ConvertNameToType(hstring_view name) const { Windows::ApplicationModel::Contacts::ContactFieldType type {}; - check_hresult(static_cast(static_cast(*this))->abi_ConvertNameToType(get(name), &type)); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->abi_ConvertNameToType(get_abi(name), &type)); return type; } template hstring impl_IKnownContactFieldStatics::ConvertTypeToName(Windows::ApplicationModel::Contacts::ContactFieldType type) const { hstring name; - check_hresult(static_cast(static_cast(*this))->abi_ConvertTypeToName(type, put(name))); + check_hresult(WINRT_SHIM(IKnownContactFieldStatics)->abi_ConvertTypeToName(type, put_abi(name))); return name; } template hstring impl_IContactInformation::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_Name(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactInformation::GetThumbnailAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_GetThumbnailAsync(put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVectorView impl_IContactInformation::Emails() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Emails(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_Emails(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactInformation::PhoneNumbers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_PhoneNumbers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactInformation::Locations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Locations(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_Locations(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactInformation::InstantMessages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InstantMessages(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_InstantMessages(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IContactInformation::CustomFields() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_CustomFields(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_CustomFields(put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_IContactInformation::QueryCustomFields(hstring_ref customName) const +template Windows::Foundation::Collections::IVectorView impl_IContactInformation::QueryCustomFields(hstring_view customName) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_QueryCustomFields(get(customName), put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_QueryCustomFields(get_abi(customName), put_abi(value))); return value; } -template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type) const +template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type) const { Windows::ApplicationModel::Contacts::ContactField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateField_Default(get(value), type, put(field))); + check_hresult(WINRT_SHIM(IContactFieldFactory)->abi_CreateField_Default(get_abi(value), type, put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const +template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const { Windows::ApplicationModel::Contacts::ContactField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateField_Category(get(value), type, category, put(field))); + check_hresult(WINRT_SHIM(IContactFieldFactory)->abi_CreateField_Category(get_abi(value), type, category, put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_ref name, hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const +template Windows::ApplicationModel::Contacts::ContactField impl_IContactFieldFactory::CreateField(hstring_view name, hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const { Windows::ApplicationModel::Contacts::ContactField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateField_Custom(get(name), get(value), type, category, put(field))); + check_hresult(WINRT_SHIM(IContactFieldFactory)->abi_CreateField_Custom(get_abi(name), get_abi(value), type, category, put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_ref unstructuredAddress) const +template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_view unstructuredAddress) const { Windows::ApplicationModel::Contacts::ContactLocationField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLocation_Default(get(unstructuredAddress), put(field))); + check_hresult(WINRT_SHIM(IContactLocationFieldFactory)->abi_CreateLocation_Default(get_abi(unstructuredAddress), put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_ref unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const +template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_view unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const { Windows::ApplicationModel::Contacts::ContactLocationField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLocation_Category(get(unstructuredAddress), category, put(field))); + check_hresult(WINRT_SHIM(IContactLocationFieldFactory)->abi_CreateLocation_Category(get_abi(unstructuredAddress), category, put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_ref unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_ref street, hstring_ref city, hstring_ref region, hstring_ref country, hstring_ref postalCode) const +template Windows::ApplicationModel::Contacts::ContactLocationField impl_IContactLocationFieldFactory::CreateLocation(hstring_view unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_view street, hstring_view city, hstring_view region, hstring_view country, hstring_view postalCode) const { Windows::ApplicationModel::Contacts::ContactLocationField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLocation_All(get(unstructuredAddress), category, get(street), get(city), get(region), get(country), get(postalCode), put(field))); + check_hresult(WINRT_SHIM(IContactLocationFieldFactory)->abi_CreateLocation_All(get_abi(unstructuredAddress), category, get_abi(street), get_abi(city), get_abi(region), get_abi(country), get_abi(postalCode), put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_ref userName) const +template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_view userName) const { Windows::ApplicationModel::Contacts::ContactInstantMessageField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstantMessage_Default(get(userName), put(field))); + check_hresult(WINRT_SHIM(IContactInstantMessageFieldFactory)->abi_CreateInstantMessage_Default(get_abi(userName), put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_ref userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const +template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_view userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category) const { Windows::ApplicationModel::Contacts::ContactInstantMessageField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstantMessage_Category(get(userName), category, put(field))); + check_hresult(WINRT_SHIM(IContactInstantMessageFieldFactory)->abi_CreateInstantMessage_Category(get_abi(userName), category, put_abi(field))); return field; } -template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_ref userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_ref service, hstring_ref displayText, const Windows::Foundation::Uri & verb) const +template Windows::ApplicationModel::Contacts::ContactInstantMessageField impl_IContactInstantMessageFieldFactory::CreateInstantMessage(hstring_view userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_view service, hstring_view displayText, const Windows::Foundation::Uri & verb) const { Windows::ApplicationModel::Contacts::ContactInstantMessageField field { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstantMessage_All(get(userName), category, get(service), get(displayText), get(verb), put(field))); + check_hresult(WINRT_SHIM(IContactInstantMessageFieldFactory)->abi_CreateInstantMessage_All(get_abi(userName), category, get_abi(service), get_abi(displayText), get_abi(verb), put_abi(field))); return field; } template hstring impl_IContactPicker::CommitButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CommitButtonText(put(value))); + check_hresult(WINRT_SHIM(IContactPicker)->get_CommitButtonText(put_abi(value))); return value; } -template void impl_IContactPicker::CommitButtonText(hstring_ref value) const +template void impl_IContactPicker::CommitButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CommitButtonText(get(value))); + check_hresult(WINRT_SHIM(IContactPicker)->put_CommitButtonText(get_abi(value))); } template Windows::ApplicationModel::Contacts::ContactSelectionMode impl_IContactPicker::SelectionMode() const { Windows::ApplicationModel::Contacts::ContactSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(IContactPicker)->get_SelectionMode(&value)); return value; } template void impl_IContactPicker::SelectionMode(Windows::ApplicationModel::Contacts::ContactSelectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionMode(value)); + check_hresult(WINRT_SHIM(IContactPicker)->put_SelectionMode(value)); } template Windows::Foundation::Collections::IVector impl_IContactPicker::DesiredFields() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DesiredFields(put(value))); + check_hresult(WINRT_SHIM(IContactPicker)->get_DesiredFields(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactPicker::PickSingleContactAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleContactAsync(put(result))); + check_hresult(WINRT_SHIM(IContactPicker)->abi_PickSingleContactAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IContactPicker::PickMultipleContactsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_PickMultipleContactsAsync(put(result))); + check_hresult(WINRT_SHIM(IContactPicker)->abi_PickMultipleContactsAsync(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IContactPicker2::DesiredFieldsWithContactFieldType() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DesiredFieldsWithContactFieldType(put(value))); + check_hresult(WINRT_SHIM(IContactPicker2)->get_DesiredFieldsWithContactFieldType(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactPicker2::PickContactAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PickContactAsync(put(result))); + check_hresult(WINRT_SHIM(IContactPicker2)->abi_PickContactAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IContactPicker2::PickContactsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_PickContactsAsync(put(result))); + check_hresult(WINRT_SHIM(IContactPicker2)->abi_PickContactsAsync(put_abi(result))); return result; } template void impl_IContactCardDelayedDataLoader::SetData(const Windows::ApplicationModel::Contacts::Contact & contact) const { - check_hresult(static_cast(static_cast(*this))->abi_SetData(get(contact))); + check_hresult(WINRT_SHIM(IContactCardDelayedDataLoader)->abi_SetData(get_abi(contact))); } inline Contact::Contact() : @@ -8044,15 +8435,15 @@ inline ContactEmail::ContactEmail() : ContactEmail(activate_instance()) {} -inline ContactField::ContactField(hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type) : +inline ContactField::ContactField(hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type) : ContactField(get_activation_factory().CreateField(value, type)) {} -inline ContactField::ContactField(hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : +inline ContactField::ContactField(hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : ContactField(get_activation_factory().CreateField(value, type, category)) {} -inline ContactField::ContactField(hstring_ref name, hstring_ref value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : +inline ContactField::ContactField(hstring_view name, hstring_view value, Windows::ApplicationModel::Contacts::ContactFieldType type, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : ContactField(get_activation_factory().CreateField(name, value, type, category)) {} @@ -8060,15 +8451,15 @@ inline ContactFieldFactory::ContactFieldFactory() : ContactFieldFactory(activate_instance()) {} -inline ContactInstantMessageField::ContactInstantMessageField(hstring_ref userName) : +inline ContactInstantMessageField::ContactInstantMessageField(hstring_view userName) : ContactInstantMessageField(get_activation_factory().CreateInstantMessage(userName)) {} -inline ContactInstantMessageField::ContactInstantMessageField(hstring_ref userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : +inline ContactInstantMessageField::ContactInstantMessageField(hstring_view userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : ContactInstantMessageField(get_activation_factory().CreateInstantMessage(userName, category)) {} -inline ContactInstantMessageField::ContactInstantMessageField(hstring_ref userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_ref service, hstring_ref displayText, const Windows::Foundation::Uri & verb) : +inline ContactInstantMessageField::ContactInstantMessageField(hstring_view userName, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_view service, hstring_view displayText, const Windows::Foundation::Uri & verb) : ContactInstantMessageField(get_activation_factory().CreateInstantMessage(userName, category, service, displayText, verb)) {} @@ -8101,15 +8492,15 @@ inline hstring ContactLaunchActionVerbs::VideoCall() return get_activation_factory().VideoCall(); } -inline ContactLocationField::ContactLocationField(hstring_ref unstructuredAddress) : +inline ContactLocationField::ContactLocationField(hstring_view unstructuredAddress) : ContactLocationField(get_activation_factory().CreateLocation(unstructuredAddress)) {} -inline ContactLocationField::ContactLocationField(hstring_ref unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : +inline ContactLocationField::ContactLocationField(hstring_view unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category) : ContactLocationField(get_activation_factory().CreateLocation(unstructuredAddress, category)) {} -inline ContactLocationField::ContactLocationField(hstring_ref unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_ref street, hstring_ref city, hstring_ref region, hstring_ref country, hstring_ref postalCode) : +inline ContactLocationField::ContactLocationField(hstring_view unstructuredAddress, Windows::ApplicationModel::Contacts::ContactFieldCategory category, hstring_view street, hstring_view city, hstring_view region, hstring_view country, hstring_view postalCode) : ContactLocationField(get_activation_factory().CreateLocation(unstructuredAddress, category, street, city, region, country, postalCode)) {} @@ -8220,11 +8611,11 @@ inline ContactQueryOptions::ContactQueryOptions() : ContactQueryOptions(activate_instance()) {} -inline ContactQueryOptions::ContactQueryOptions(hstring_ref text) : +inline ContactQueryOptions::ContactQueryOptions(hstring_view text) : ContactQueryOptions(get_activation_factory().CreateWithText(text)) {} -inline ContactQueryOptions::ContactQueryOptions(hstring_ref text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields) : +inline ContactQueryOptions::ContactQueryOptions(hstring_view text, Windows::ApplicationModel::Contacts::ContactQuerySearchFields fields) : ContactQueryOptions(get_activation_factory().CreateWithTextAndFields(text, fields)) {} @@ -8260,7 +8651,7 @@ inline hstring KnownContactField::InstantMessage() return get_activation_factory().InstantMessage(); } -inline Windows::ApplicationModel::Contacts::ContactFieldType KnownContactField::ConvertNameToType(hstring_ref name) +inline Windows::ApplicationModel::Contacts::ContactFieldType KnownContactField::ConvertNameToType(hstring_view name) { return get_activation_factory().ConvertNameToType(name); } @@ -8273,3 +8664,869 @@ inline hstring KnownContactField::ConvertTypeToName(Windows::ApplicationModel::C } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IAggregateContactManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IAggregateContactManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContact2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContact3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactAnnotationList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactAnnotationStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactCardDelayedDataLoader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactCardOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactCardOptions2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactConnectedServiceAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactDate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactEmail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactFieldFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactInstantMessageField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactInstantMessageFieldFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactJobInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactLaunchActionVerbsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactList2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactListSyncConstraints & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactListSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactListSyncManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactLocationField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactLocationFieldFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactManagerStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactMatchReason & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactName & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactPhone & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactPicker2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactQueryOptionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactQueryTextSearch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactSignificantOther & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactSignificantOther2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactWebsite & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IContactWebsite2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IFullContactCardOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::IKnownContactFieldStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::AggregateContactManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::Contact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactAnnotationList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactAnnotationStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactCardDelayedDataLoader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactCardOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactConnectedServiceAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactDate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactEmail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactFieldFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactInstantMessageField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactJobInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactListSyncConstraints & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactListSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactLocationField & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactMatchReason & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactPhone & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactQueryTextSearch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactSignificantOther & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::ContactWebsite & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Contacts::FullContactCardOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Core.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Core.h index bfac03bbe..28db7181d 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Core.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Core.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DisplayInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayInfo()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_LaunchAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchAsync()); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_Suspending(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Suspending(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Suspending(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Suspending(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -80,6 +87,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Suspending(token); return S_OK; } @@ -89,11 +97,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_Resuming(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Resuming(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Resuming(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Resuming(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -106,6 +115,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Resuming(token); return S_OK; } @@ -115,11 +125,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentView()); return S_OK; } catch (...) @@ -143,10 +155,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_Run(abi_arg_in viewSource) noexcept override + HRESULT __stdcall abi_Run(impl::abi_arg_in viewSource) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Run(*reinterpret_cast(&viewSource)); return S_OK; } @@ -156,10 +169,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RunWithActivationFactories(abi_arg_in activationFactoryCallback) noexcept override + HRESULT __stdcall abi_RunWithActivationFactories(impl::abi_arg_in activationFactoryCallback) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RunWithActivationFactories(*reinterpret_cast(&activationFactoryCallback)); return S_OK; } @@ -173,11 +187,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall add_BackgroundActivated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_BackgroundActivated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BackgroundActivated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BackgroundActivated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -190,6 +205,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundActivated(token); return S_OK; } @@ -199,11 +215,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_LeavingBackground(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LeavingBackground(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LeavingBackground(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LeavingBackground(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -216,6 +233,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().LeavingBackground(token); return S_OK; } @@ -225,11 +243,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_EnteredBackground(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnteredBackground(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnteredBackground(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnteredBackground(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -242,6 +261,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().EnteredBackground(token); return S_OK; } @@ -255,6 +275,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().EnablePrelaunch(value); return S_OK; } @@ -272,6 +293,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Exit(); return S_OK; } @@ -281,11 +303,12 @@ struct produce : produ } } - HRESULT __stdcall add_Exiting(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Exiting(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Exiting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Exiting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -298,6 +321,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Exiting(token); return S_OK; } @@ -311,11 +335,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall add_UnhandledErrorDetected(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UnhandledErrorDetected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UnhandledErrorDetected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UnhandledErrorDetected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -328,6 +353,7 @@ struct produceshim()); this->shim().UnhandledErrorDetected(token); return S_OK; } @@ -345,6 +371,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().IncrementApplicationUseCount(); return S_OK; } @@ -358,6 +385,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DecrementApplicationUseCount(); return S_OK; } @@ -371,11 +399,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_CoreWindow(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoreWindow(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoreWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoreWindow()); return S_OK; } catch (...) @@ -385,11 +414,12 @@ struct produce : produ } } - HRESULT __stdcall add_Activated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Activated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Activated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Activated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -402,6 +432,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Activated(token); return S_OK; } @@ -415,7 +446,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsMain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMain()); return S_OK; } catch (...) @@ -428,7 +460,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsHosted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHosted()); return S_OK; } catch (...) @@ -441,11 +474,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Dispatcher(abi_arg_out value) noexcept override + HRESULT __stdcall get_Dispatcher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dispatcher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dispatcher()); return S_OK; } catch (...) @@ -463,7 +497,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsComponent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsComponent()); return S_OK; } catch (...) @@ -472,11 +507,12 @@ struct produce : prod } } - HRESULT __stdcall get_TitleBar(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleBar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleBar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleBar()); return S_OK; } catch (...) @@ -486,11 +522,12 @@ struct produce : prod } } - HRESULT __stdcall add_HostedViewClosing(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_HostedViewClosing(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HostedViewClosing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HostedViewClosing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -503,6 +540,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().HostedViewClosing(token); return S_OK; } @@ -520,6 +558,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ExtendViewIntoTitleBar(value); return S_OK; } @@ -533,7 +572,8 @@ struct produce { try { - *value = detach(this->shim().ExtendViewIntoTitleBar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendViewIntoTitleBar()); return S_OK; } catch (...) @@ -546,7 +586,8 @@ struct produce { try { - *value = detach(this->shim().SystemOverlayLeftInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemOverlayLeftInset()); return S_OK; } catch (...) @@ -559,7 +600,8 @@ struct produce { try { - *value = detach(this->shim().SystemOverlayRightInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemOverlayRightInset()); return S_OK; } catch (...) @@ -572,7 +614,8 @@ struct produce { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -581,11 +624,12 @@ struct produce } } - HRESULT __stdcall add_LayoutMetricsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LayoutMetricsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LayoutMetricsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LayoutMetricsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -598,6 +642,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LayoutMetricsChanged(token); return S_OK; } @@ -611,7 +656,8 @@ struct produce { try { - *value = detach(this->shim().IsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVisible()); return S_OK; } catch (...) @@ -620,11 +666,12 @@ struct produce } } - HRESULT __stdcall add_IsVisibleChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_IsVisibleChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().IsVisibleChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsVisibleChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -637,6 +684,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsVisibleChanged(token); return S_OK; } @@ -650,11 +698,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Views(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Views(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Views()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Views()); return S_OK; } catch (...) @@ -664,11 +713,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateNewView(abi_arg_in runtimeType, abi_arg_in entryPoint, abi_arg_out view) noexcept override + HRESULT __stdcall abi_CreateNewView(impl::abi_arg_in runtimeType, impl::abi_arg_in entryPoint, impl::abi_arg_out view) noexcept override { try { - *view = detach(this->shim().CreateNewView(*reinterpret_cast(&runtimeType), *reinterpret_cast(&entryPoint))); + typename D::abi_guard guard(this->shim()); + *view = detach_abi(this->shim().CreateNewView(*reinterpret_cast(&runtimeType), *reinterpret_cast(&entryPoint))); return S_OK; } catch (...) @@ -678,11 +728,12 @@ struct produce : } } - HRESULT __stdcall get_MainView(abi_arg_out value) noexcept override + HRESULT __stdcall get_MainView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MainView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MainView()); return S_OK; } catch (...) @@ -696,11 +747,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateNewViewFromMainView(abi_arg_out view) noexcept override + HRESULT __stdcall abi_CreateNewViewFromMainView(impl::abi_arg_out view) noexcept override { try { - *view = detach(this->shim().CreateNewView()); + typename D::abi_guard guard(this->shim()); + *view = detach_abi(this->shim().CreateNewView()); return S_OK; } catch (...) @@ -714,11 +766,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateNewViewWithViewSource(abi_arg_in viewSource, abi_arg_out view) noexcept override + HRESULT __stdcall abi_CreateNewViewWithViewSource(impl::abi_arg_in viewSource, impl::abi_arg_out view) noexcept override { try { - *view = detach(this->shim().CreateNewView(*reinterpret_cast(&viewSource))); + typename D::abi_guard guard(this->shim()); + *view = detach_abi(this->shim().CreateNewView(*reinterpret_cast(&viewSource))); return S_OK; } catch (...) @@ -732,10 +785,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Initialize(abi_arg_in applicationView) noexcept override + HRESULT __stdcall abi_Initialize(impl::abi_arg_in applicationView) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Initialize(*reinterpret_cast(&applicationView)); return S_OK; } @@ -745,10 +799,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetWindow(abi_arg_in window) noexcept override + HRESULT __stdcall abi_SetWindow(impl::abi_arg_in window) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetWindow(*reinterpret_cast(&window)); return S_OK; } @@ -758,10 +813,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_Load(abi_arg_in entryPoint) noexcept override + HRESULT __stdcall abi_Load(impl::abi_arg_in entryPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Load(*reinterpret_cast(&entryPoint)); return S_OK; } @@ -775,6 +831,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Run(); return S_OK; } @@ -788,6 +845,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Uninitialize(); return S_OK; } @@ -801,11 +859,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateView(abi_arg_out viewProvider) noexcept override + HRESULT __stdcall abi_CreateView(impl::abi_arg_out viewProvider) noexcept override { try { - *viewProvider = detach(this->shim().CreateView()); + typename D::abi_guard guard(this->shim()); + *viewProvider = detach_abi(this->shim().CreateView()); return S_OK; } catch (...) @@ -819,11 +878,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -841,7 +901,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -854,6 +915,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Propagate(); return S_OK; } @@ -867,11 +929,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_UnhandledError(abi_arg_out value) noexcept override + HRESULT __stdcall get_UnhandledError(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnhandledError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnhandledError()); return S_OK; } catch (...) @@ -889,60 +952,60 @@ namespace Windows::ApplicationModel::Core { template Windows::ApplicationModel::AppDisplayInfo impl_IAppListEntry::DisplayInfo() const { Windows::ApplicationModel::AppDisplayInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayInfo(put(value))); + check_hresult(WINRT_SHIM(IAppListEntry)->get_DisplayInfo(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAppListEntry::LaunchAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppListEntry)->abi_LaunchAsync(put_abi(operation))); return operation; } template void impl_IFrameworkView::Initialize(const Windows::ApplicationModel::Core::CoreApplicationView & applicationView) const { - check_hresult(static_cast(static_cast(*this))->abi_Initialize(get(applicationView))); + check_hresult(WINRT_SHIM(IFrameworkView)->abi_Initialize(get_abi(applicationView))); } template void impl_IFrameworkView::SetWindow(const Windows::UI::Core::CoreWindow & window) const { - check_hresult(static_cast(static_cast(*this))->abi_SetWindow(get(window))); + check_hresult(WINRT_SHIM(IFrameworkView)->abi_SetWindow(get_abi(window))); } -template void impl_IFrameworkView::Load(hstring_ref entryPoint) const +template void impl_IFrameworkView::Load(hstring_view entryPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_Load(get(entryPoint))); + check_hresult(WINRT_SHIM(IFrameworkView)->abi_Load(get_abi(entryPoint))); } template void impl_IFrameworkView::Run() const { - check_hresult(static_cast(static_cast(*this))->abi_Run()); + check_hresult(WINRT_SHIM(IFrameworkView)->abi_Run()); } template void impl_IFrameworkView::Uninitialize() const { - check_hresult(static_cast(static_cast(*this))->abi_Uninitialize()); + check_hresult(WINRT_SHIM(IFrameworkView)->abi_Uninitialize()); } template Windows::ApplicationModel::Core::IFrameworkView impl_IFrameworkViewSource::CreateView() const { Windows::ApplicationModel::Core::IFrameworkView viewProvider; - check_hresult(static_cast(static_cast(*this))->abi_CreateView(put(viewProvider))); + check_hresult(WINRT_SHIM(IFrameworkViewSource)->abi_CreateView(put_abi(viewProvider))); return viewProvider; } template hstring impl_ICoreApplication::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(ICoreApplication)->get_Id(put_abi(value))); return value; } template event_token impl_ICoreApplication::Suspending(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Suspending(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplication)->add_Suspending(get_abi(handler), &token)); return token; } @@ -953,86 +1016,86 @@ template event_revoker impl_ICoreApplication:: template void impl_ICoreApplication::Suspending(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Suspending(token)); + check_hresult(WINRT_SHIM(ICoreApplication)->remove_Suspending(token)); } -template event_token impl_ICoreApplication::Resuming(const Windows::Foundation::EventHandler & handler) const +template event_token impl_ICoreApplication::Resuming(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Resuming(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplication)->add_Resuming(get_abi(handler), &token)); return token; } -template event_revoker impl_ICoreApplication::Resuming(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_ICoreApplication::Resuming(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Core::ICoreApplication::remove_Resuming, Resuming(handler)); } template void impl_ICoreApplication::Resuming(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Resuming(token)); + check_hresult(WINRT_SHIM(ICoreApplication)->remove_Resuming(token)); } template Windows::Foundation::Collections::IPropertySet impl_ICoreApplication::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(ICoreApplication)->get_Properties(put_abi(value))); return value; } template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreApplication::GetCurrentView() const { Windows::ApplicationModel::Core::CoreApplicationView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentView(put(value))); + check_hresult(WINRT_SHIM(ICoreApplication)->abi_GetCurrentView(put_abi(value))); return value; } template void impl_ICoreApplication::Run(const Windows::ApplicationModel::Core::IFrameworkViewSource & viewSource) const { - check_hresult(static_cast(static_cast(*this))->abi_Run(get(viewSource))); + check_hresult(WINRT_SHIM(ICoreApplication)->abi_Run(get_abi(viewSource))); } template void impl_ICoreApplication::RunWithActivationFactories(const Windows::Foundation::IGetActivationFactory & activationFactoryCallback) const { - check_hresult(static_cast(static_cast(*this))->abi_RunWithActivationFactories(get(activationFactoryCallback))); + check_hresult(WINRT_SHIM(ICoreApplication)->abi_RunWithActivationFactories(get_abi(activationFactoryCallback))); } template void impl_ICoreApplicationUseCount::IncrementApplicationUseCount() const { - check_hresult(static_cast(static_cast(*this))->abi_IncrementApplicationUseCount()); + check_hresult(WINRT_SHIM(ICoreApplicationUseCount)->abi_IncrementApplicationUseCount()); } template void impl_ICoreApplicationUseCount::DecrementApplicationUseCount() const { - check_hresult(static_cast(static_cast(*this))->abi_DecrementApplicationUseCount()); + check_hresult(WINRT_SHIM(ICoreApplicationUseCount)->abi_DecrementApplicationUseCount()); } template void impl_ICoreApplicationExit::Exit() const { - check_hresult(static_cast(static_cast(*this))->abi_Exit()); + check_hresult(WINRT_SHIM(ICoreApplicationExit)->abi_Exit()); } -template event_token impl_ICoreApplicationExit::Exiting(const Windows::Foundation::EventHandler & handler) const +template event_token impl_ICoreApplicationExit::Exiting(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Exiting(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationExit)->add_Exiting(get_abi(handler), &token)); return token; } -template event_revoker impl_ICoreApplicationExit::Exiting(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_ICoreApplicationExit::Exiting(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Core::ICoreApplicationExit::remove_Exiting, Exiting(handler)); } template void impl_ICoreApplicationExit::Exiting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Exiting(token)); + check_hresult(WINRT_SHIM(ICoreApplicationExit)->remove_Exiting(token)); } template event_token impl_ICoreApplication2::BackgroundActivated(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BackgroundActivated(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->add_BackgroundActivated(get_abi(handler), &token)); return token; } @@ -1043,13 +1106,13 @@ template event_revoker impl_ICoreApplication2 template void impl_ICoreApplication2::BackgroundActivated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BackgroundActivated(token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->remove_BackgroundActivated(token)); } template event_token impl_ICoreApplication2::LeavingBackground(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LeavingBackground(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->add_LeavingBackground(get_abi(handler), &token)); return token; } @@ -1060,13 +1123,13 @@ template event_revoker impl_ICoreApplication2 template void impl_ICoreApplication2::LeavingBackground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LeavingBackground(token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->remove_LeavingBackground(token)); } template event_token impl_ICoreApplication2::EnteredBackground(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnteredBackground(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->add_EnteredBackground(get_abi(handler), &token)); return token; } @@ -1077,53 +1140,53 @@ template event_revoker impl_ICoreApplication2 template void impl_ICoreApplication2::EnteredBackground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnteredBackground(token)); + check_hresult(WINRT_SHIM(ICoreApplication2)->remove_EnteredBackground(token)); } template void impl_ICoreApplication2::EnablePrelaunch(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_EnablePrelaunch(value)); + check_hresult(WINRT_SHIM(ICoreApplication2)->abi_EnablePrelaunch(value)); } template Windows::Foundation::Collections::IVectorView impl_ICoreImmersiveApplication::Views() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Views(put(value))); + check_hresult(WINRT_SHIM(ICoreImmersiveApplication)->get_Views(put_abi(value))); return value; } -template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreImmersiveApplication::CreateNewView(hstring_ref runtimeType, hstring_ref entryPoint) const +template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreImmersiveApplication::CreateNewView(hstring_view runtimeType, hstring_view entryPoint) const { Windows::ApplicationModel::Core::CoreApplicationView view { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNewView(get(runtimeType), get(entryPoint), put(view))); + check_hresult(WINRT_SHIM(ICoreImmersiveApplication)->abi_CreateNewView(get_abi(runtimeType), get_abi(entryPoint), put_abi(view))); return view; } template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreImmersiveApplication::MainView() const { Windows::ApplicationModel::Core::CoreApplicationView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MainView(put(value))); + check_hresult(WINRT_SHIM(ICoreImmersiveApplication)->get_MainView(put_abi(value))); return value; } template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreImmersiveApplication2::CreateNewView() const { Windows::ApplicationModel::Core::CoreApplicationView view { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNewViewFromMainView(put(view))); + check_hresult(WINRT_SHIM(ICoreImmersiveApplication2)->abi_CreateNewViewFromMainView(put_abi(view))); return view; } template Windows::ApplicationModel::Core::CoreApplicationView impl_ICoreImmersiveApplication3::CreateNewView(const Windows::ApplicationModel::Core::IFrameworkViewSource & viewSource) const { Windows::ApplicationModel::Core::CoreApplicationView view { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNewViewWithViewSource(get(viewSource), put(view))); + check_hresult(WINRT_SHIM(ICoreImmersiveApplication3)->abi_CreateNewViewWithViewSource(get_abi(viewSource), put_abi(view))); return view; } template event_token impl_ICoreApplicationUnhandledError::UnhandledErrorDetected(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UnhandledErrorDetected(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationUnhandledError)->add_UnhandledErrorDetected(get_abi(handler), &token)); return token; } @@ -1134,20 +1197,20 @@ template event_revoker impl_ICoreAp template void impl_ICoreApplicationUnhandledError::UnhandledErrorDetected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UnhandledErrorDetected(token)); + check_hresult(WINRT_SHIM(ICoreApplicationUnhandledError)->remove_UnhandledErrorDetected(token)); } template Windows::UI::Core::CoreWindow impl_ICoreApplicationView::CoreWindow() const { Windows::UI::Core::CoreWindow value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoreWindow(put(value))); + check_hresult(WINRT_SHIM(ICoreApplicationView)->get_CoreWindow(put_abi(value))); return value; } template event_token impl_ICoreApplicationView::Activated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Activated(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationView)->add_Activated(get_abi(handler), &token)); return token; } @@ -1158,48 +1221,48 @@ template event_revoker impl_ICoreApplicationV template void impl_ICoreApplicationView::Activated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Activated(token)); + check_hresult(WINRT_SHIM(ICoreApplicationView)->remove_Activated(token)); } template bool impl_ICoreApplicationView::IsMain() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMain(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationView)->get_IsMain(&value)); return value; } template bool impl_ICoreApplicationView::IsHosted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHosted(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationView)->get_IsHosted(&value)); return value; } template Windows::UI::Core::CoreDispatcher impl_ICoreApplicationView2::Dispatcher() const { Windows::UI::Core::CoreDispatcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Dispatcher(put(value))); + check_hresult(WINRT_SHIM(ICoreApplicationView2)->get_Dispatcher(put_abi(value))); return value; } template bool impl_ICoreApplicationView3::IsComponent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsComponent(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationView3)->get_IsComponent(&value)); return value; } template Windows::ApplicationModel::Core::CoreApplicationViewTitleBar impl_ICoreApplicationView3::TitleBar() const { Windows::ApplicationModel::Core::CoreApplicationViewTitleBar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleBar(put(value))); + check_hresult(WINRT_SHIM(ICoreApplicationView3)->get_TitleBar(put_abi(value))); return value; } template event_token impl_ICoreApplicationView3::HostedViewClosing(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HostedViewClosing(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationView3)->add_HostedViewClosing(get_abi(handler), &token)); return token; } @@ -1210,107 +1273,107 @@ template event_revoker impl_ICoreApplication template void impl_ICoreApplicationView3::HostedViewClosing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HostedViewClosing(token)); + check_hresult(WINRT_SHIM(ICoreApplicationView3)->remove_HostedViewClosing(token)); } template Windows::Foundation::Deferral impl_IHostedViewClosingEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IHostedViewClosingEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template void impl_ICoreApplicationViewTitleBar::ExtendViewIntoTitleBar(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ExtendViewIntoTitleBar(value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->put_ExtendViewIntoTitleBar(value)); } template bool impl_ICoreApplicationViewTitleBar::ExtendViewIntoTitleBar() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendViewIntoTitleBar(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->get_ExtendViewIntoTitleBar(&value)); return value; } template double impl_ICoreApplicationViewTitleBar::SystemOverlayLeftInset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemOverlayLeftInset(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->get_SystemOverlayLeftInset(&value)); return value; } template double impl_ICoreApplicationViewTitleBar::SystemOverlayRightInset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemOverlayRightInset(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->get_SystemOverlayRightInset(&value)); return value; } template double impl_ICoreApplicationViewTitleBar::Height() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->get_Height(&value)); return value; } -template event_token impl_ICoreApplicationViewTitleBar::LayoutMetricsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreApplicationViewTitleBar::LayoutMetricsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LayoutMetricsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->add_LayoutMetricsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ICoreApplicationViewTitleBar::LayoutMetricsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreApplicationViewTitleBar::LayoutMetricsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar::remove_LayoutMetricsChanged, LayoutMetricsChanged(handler)); } template void impl_ICoreApplicationViewTitleBar::LayoutMetricsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LayoutMetricsChanged(token)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->remove_LayoutMetricsChanged(token)); } template bool impl_ICoreApplicationViewTitleBar::IsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVisible(&value)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->get_IsVisible(&value)); return value; } -template event_token impl_ICoreApplicationViewTitleBar::IsVisibleChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreApplicationViewTitleBar::IsVisibleChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_IsVisibleChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->add_IsVisibleChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ICoreApplicationViewTitleBar::IsVisibleChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreApplicationViewTitleBar::IsVisibleChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar::remove_IsVisibleChanged, IsVisibleChanged(handler)); } template void impl_ICoreApplicationViewTitleBar::IsVisibleChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_IsVisibleChanged(token)); + check_hresult(WINRT_SHIM(ICoreApplicationViewTitleBar)->remove_IsVisibleChanged(token)); } template Windows::ApplicationModel::Core::UnhandledError impl_IUnhandledErrorDetectedEventArgs::UnhandledError() const { Windows::ApplicationModel::Core::UnhandledError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UnhandledError(put(value))); + check_hresult(WINRT_SHIM(IUnhandledErrorDetectedEventArgs)->get_UnhandledError(put_abi(value))); return value; } template bool impl_IUnhandledError::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IUnhandledError)->get_Handled(&value)); return value; } template void impl_IUnhandledError::Propagate() const { - check_hresult(static_cast(static_cast(*this))->abi_Propagate()); + check_hresult(WINRT_SHIM(IUnhandledError)->abi_Propagate()); } inline hstring CoreApplication::Id() @@ -1334,12 +1397,12 @@ inline void CoreApplication::Suspending(event_token token) get_activation_factory().Suspending(token); } -inline event_token CoreApplication::Resuming(const Windows::Foundation::EventHandler & handler) +inline event_token CoreApplication::Resuming(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().Resuming(handler); } -inline factory_event_revoker CoreApplication::Resuming(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker CoreApplication::Resuming(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::ApplicationModel::Core::ICoreApplication::remove_Resuming, factory.Resuming(handler) }; @@ -1428,12 +1491,12 @@ inline void CoreApplication::Exit() get_activation_factory().Exit(); } -inline event_token CoreApplication::Exiting(const Windows::Foundation::EventHandler & handler) +inline event_token CoreApplication::Exiting(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().Exiting(handler); } -inline factory_event_revoker CoreApplication::Exiting(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker CoreApplication::Exiting(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::ApplicationModel::Core::ICoreApplicationExit::remove_Exiting, factory.Exiting(handler) }; @@ -1475,7 +1538,7 @@ inline Windows::Foundation::Collections::IVectorView().Views(); } -inline Windows::ApplicationModel::Core::CoreApplicationView CoreApplication::CreateNewView(hstring_ref runtimeType, hstring_ref entryPoint) +inline Windows::ApplicationModel::Core::CoreApplicationView CoreApplication::CreateNewView(hstring_view runtimeType, hstring_view entryPoint) { return get_activation_factory().CreateNewView(runtimeType, entryPoint); } @@ -1498,3 +1561,221 @@ inline Windows::ApplicationModel::Core::CoreApplicationView CoreApplication::Cre } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IAppListEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplication & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplication2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationExit & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationUnhandledError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationUseCount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationView2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationView3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IFrameworkView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IFrameworkViewSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IHostedViewClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IUnhandledError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::AppListEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::CoreApplicationView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::CoreApplicationViewTitleBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::HostedViewClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::UnhandledError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.Core.h b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.Core.h index d661a692b..22e14ee76 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.Core.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.DataTransfer.3.h" #include "internal/Windows.ApplicationModel.DataTransfer.DragDrop.3.h" #include "internal/Windows.Foundation.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_TargetRequested(abi_arg_in> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_TargetRequested(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().TargetRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TargetRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -34,6 +38,7 @@ struct produceshim()); this->shim().TargetRequested(value); return S_OK; } @@ -47,7 +52,8 @@ struct produceshim().AreConcurrentOperationsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreConcurrentOperationsEnabled()); return S_OK; } catch (...) @@ -60,6 +66,7 @@ struct produceshim()); this->shim().AreConcurrentOperationsEnabled(value); return S_OK; } @@ -73,11 +80,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -109,7 +118,8 @@ struct produceshim().Modifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Modifiers()); return S_OK; } catch (...) @@ -118,11 +128,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -139,7 +150,8 @@ struct produceshim().AllowedOperations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedOperations()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -170,6 +183,7 @@ struct produceshim()); this->shim().SetPointerId(pointerId); return S_OK; } @@ -179,10 +193,11 @@ struct produce softwareBitmap) noexcept override + HRESULT __stdcall abi_SetDragUIContentFromSoftwareBitmap(impl::abi_arg_in softwareBitmap) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDragUIContentFromSoftwareBitmap(*reinterpret_cast(&softwareBitmap)); return S_OK; } @@ -192,10 +207,11 @@ struct produce softwareBitmap, abi_arg_in anchorPoint) noexcept override + HRESULT __stdcall abi_SetDragUIContentFromSoftwareBitmapWithAnchorPoint(impl::abi_arg_in softwareBitmap, impl::abi_arg_in anchorPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDragUIContentFromSoftwareBitmap(*reinterpret_cast(&softwareBitmap), *reinterpret_cast(&anchorPoint)); return S_OK; } @@ -209,7 +225,8 @@ struct produceshim().DragUIContentMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragUIContentMode()); return S_OK; } catch (...) @@ -222,6 +239,7 @@ struct produceshim()); this->shim().DragUIContentMode(value); return S_OK; } @@ -231,11 +249,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -253,7 +272,8 @@ struct produceshim().AllowedOperations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedOperations()); return S_OK; } catch (...) @@ -266,6 +286,7 @@ struct produceshim()); this->shim().AllowedOperations(value); return S_OK; } @@ -279,10 +300,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetContentFromSoftwareBitmap(abi_arg_in softwareBitmap) noexcept override + HRESULT __stdcall abi_SetContentFromSoftwareBitmap(impl::abi_arg_in softwareBitmap) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetContentFromSoftwareBitmap(*reinterpret_cast(&softwareBitmap)); return S_OK; } @@ -292,10 +314,11 @@ struct produce softwareBitmap, abi_arg_in anchorPoint) noexcept override + HRESULT __stdcall abi_SetContentFromSoftwareBitmapWithAnchorPoint(impl::abi_arg_in softwareBitmap, impl::abi_arg_in anchorPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetContentFromSoftwareBitmap(*reinterpret_cast(&softwareBitmap), *reinterpret_cast(&anchorPoint)); return S_OK; } @@ -309,7 +332,8 @@ struct produceshim().IsContentVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsContentVisible()); return S_OK; } catch (...) @@ -322,6 +346,7 @@ struct produceshim()); this->shim().IsContentVisible(value); return S_OK; } @@ -331,11 +356,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Caption(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Caption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Caption()); return S_OK; } catch (...) @@ -345,10 +371,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Caption(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Caption(*reinterpret_cast(&value)); return S_OK; } @@ -362,7 +389,8 @@ struct produceshim().IsCaptionVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCaptionVisible()); return S_OK; } catch (...) @@ -375,6 +403,7 @@ struct produceshim()); this->shim().IsCaptionVisible(value); return S_OK; } @@ -388,7 +417,8 @@ struct produceshim().IsGlyphVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGlyphVisible()); return S_OK; } catch (...) @@ -401,6 +431,7 @@ struct produceshim()); this->shim().IsGlyphVisible(value); return S_OK; } @@ -414,6 +445,7 @@ struct produceshim()); this->shim().Clear(); return S_OK; } @@ -427,11 +459,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_EnterAsync(abi_arg_in dragInfo, abi_arg_in dragUIOverride, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_EnterAsync(impl::abi_arg_in dragInfo, impl::abi_arg_in dragUIOverride, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().EnterAsync(*reinterpret_cast(&dragInfo), *reinterpret_cast(&dragUIOverride))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().EnterAsync(*reinterpret_cast(&dragInfo), *reinterpret_cast(&dragUIOverride))); return S_OK; } catch (...) @@ -441,11 +474,12 @@ struct produce dragInfo, abi_arg_in dragUIOverride, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_OverAsync(impl::abi_arg_in dragInfo, impl::abi_arg_in dragUIOverride, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().OverAsync(*reinterpret_cast(&dragInfo), *reinterpret_cast(&dragUIOverride))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().OverAsync(*reinterpret_cast(&dragInfo), *reinterpret_cast(&dragUIOverride))); return S_OK; } catch (...) @@ -455,11 +489,12 @@ struct produce dragInfo, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_LeaveAsync(impl::abi_arg_in dragInfo, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().LeaveAsync(*reinterpret_cast(&dragInfo))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().LeaveAsync(*reinterpret_cast(&dragInfo))); return S_OK; } catch (...) @@ -469,11 +504,12 @@ struct produce dragInfo, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_DropAsync(impl::abi_arg_in dragInfo, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().DropAsync(*reinterpret_cast(&dragInfo))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DropAsync(*reinterpret_cast(&dragInfo))); return S_OK; } catch (...) @@ -487,10 +523,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetTarget(abi_arg_in target) noexcept override + HRESULT __stdcall abi_SetTarget(impl::abi_arg_in target) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetTarget(*reinterpret_cast(&target)); return S_OK; } @@ -508,186 +545,186 @@ namespace Windows::ApplicationModel::DataTransfer::DragDrop::Core { template Windows::ApplicationModel::DataTransfer::DataPackageView impl_ICoreDragInfo::Data() const { Windows::ApplicationModel::DataTransfer::DataPackageView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(ICoreDragInfo)->get_Data(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DragDrop::DragDropModifiers impl_ICoreDragInfo::Modifiers() const { Windows::ApplicationModel::DataTransfer::DragDrop::DragDropModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_Modifiers(&value)); + check_hresult(WINRT_SHIM(ICoreDragInfo)->get_Modifiers(&value)); return value; } template Windows::Foundation::Point impl_ICoreDragInfo::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ICoreDragInfo)->get_Position(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_ICoreDragInfo2::AllowedOperations() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowedOperations(&value)); + check_hresult(WINRT_SHIM(ICoreDragInfo2)->get_AllowedOperations(&value)); return value; } template void impl_ICoreDragUIOverride::SetContentFromSoftwareBitmap(const Windows::Graphics::Imaging::SoftwareBitmap & softwareBitmap) const { - check_hresult(static_cast(static_cast(*this))->abi_SetContentFromSoftwareBitmap(get(softwareBitmap))); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->abi_SetContentFromSoftwareBitmap(get_abi(softwareBitmap))); } template void impl_ICoreDragUIOverride::SetContentFromSoftwareBitmap(const Windows::Graphics::Imaging::SoftwareBitmap & softwareBitmap, const Windows::Foundation::Point & anchorPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_SetContentFromSoftwareBitmapWithAnchorPoint(get(softwareBitmap), get(anchorPoint))); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->abi_SetContentFromSoftwareBitmapWithAnchorPoint(get_abi(softwareBitmap), get_abi(anchorPoint))); } template bool impl_ICoreDragUIOverride::IsContentVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsContentVisible(&value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->get_IsContentVisible(&value)); return value; } template void impl_ICoreDragUIOverride::IsContentVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsContentVisible(value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->put_IsContentVisible(value)); } template hstring impl_ICoreDragUIOverride::Caption() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Caption(put(value))); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->get_Caption(put_abi(value))); return value; } -template void impl_ICoreDragUIOverride::Caption(hstring_ref value) const +template void impl_ICoreDragUIOverride::Caption(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Caption(get(value))); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->put_Caption(get_abi(value))); } template bool impl_ICoreDragUIOverride::IsCaptionVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCaptionVisible(&value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->get_IsCaptionVisible(&value)); return value; } template void impl_ICoreDragUIOverride::IsCaptionVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCaptionVisible(value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->put_IsCaptionVisible(value)); } template bool impl_ICoreDragUIOverride::IsGlyphVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGlyphVisible(&value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->get_IsGlyphVisible(&value)); return value; } template void impl_ICoreDragUIOverride::IsGlyphVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsGlyphVisible(value)); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->put_IsGlyphVisible(value)); } template void impl_ICoreDragUIOverride::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(ICoreDragUIOverride)->abi_Clear()); } template Windows::Foundation::IAsyncOperation impl_ICoreDropOperationTarget::EnterAsync(const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo & dragInfo, const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride & dragUIOverride) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_EnterAsync(get(dragInfo), get(dragUIOverride), put(returnValue))); + check_hresult(WINRT_SHIM(ICoreDropOperationTarget)->abi_EnterAsync(get_abi(dragInfo), get_abi(dragUIOverride), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_ICoreDropOperationTarget::OverAsync(const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo & dragInfo, const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride & dragUIOverride) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_OverAsync(get(dragInfo), get(dragUIOverride), put(returnValue))); + check_hresult(WINRT_SHIM(ICoreDropOperationTarget)->abi_OverAsync(get_abi(dragInfo), get_abi(dragUIOverride), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncAction impl_ICoreDropOperationTarget::LeaveAsync(const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo & dragInfo) const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_LeaveAsync(get(dragInfo), put(returnValue))); + check_hresult(WINRT_SHIM(ICoreDropOperationTarget)->abi_LeaveAsync(get_abi(dragInfo), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_ICoreDropOperationTarget::DropAsync(const Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo & dragInfo) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_DropAsync(get(dragInfo), put(returnValue))); + check_hresult(WINRT_SHIM(ICoreDropOperationTarget)->abi_DropAsync(get_abi(dragInfo), put_abi(returnValue))); return returnValue; } template Windows::ApplicationModel::DataTransfer::DataPackage impl_ICoreDragOperation::Data() const { Windows::ApplicationModel::DataTransfer::DataPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(ICoreDragOperation)->get_Data(put_abi(value))); return value; } template void impl_ICoreDragOperation::SetPointerId(uint32_t pointerId) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPointerId(pointerId)); + check_hresult(WINRT_SHIM(ICoreDragOperation)->abi_SetPointerId(pointerId)); } template void impl_ICoreDragOperation::SetDragUIContentFromSoftwareBitmap(const Windows::Graphics::Imaging::SoftwareBitmap & softwareBitmap) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDragUIContentFromSoftwareBitmap(get(softwareBitmap))); + check_hresult(WINRT_SHIM(ICoreDragOperation)->abi_SetDragUIContentFromSoftwareBitmap(get_abi(softwareBitmap))); } template void impl_ICoreDragOperation::SetDragUIContentFromSoftwareBitmap(const Windows::Graphics::Imaging::SoftwareBitmap & softwareBitmap, const Windows::Foundation::Point & anchorPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDragUIContentFromSoftwareBitmapWithAnchorPoint(get(softwareBitmap), get(anchorPoint))); + check_hresult(WINRT_SHIM(ICoreDragOperation)->abi_SetDragUIContentFromSoftwareBitmapWithAnchorPoint(get_abi(softwareBitmap), get_abi(anchorPoint))); } template Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIContentMode impl_ICoreDragOperation::DragUIContentMode() const { Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIContentMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DragUIContentMode(&value)); + check_hresult(WINRT_SHIM(ICoreDragOperation)->get_DragUIContentMode(&value)); return value; } template void impl_ICoreDragOperation::DragUIContentMode(Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIContentMode value) const { - check_hresult(static_cast(static_cast(*this))->put_DragUIContentMode(value)); + check_hresult(WINRT_SHIM(ICoreDragOperation)->put_DragUIContentMode(value)); } template Windows::Foundation::IAsyncOperation impl_ICoreDragOperation::StartAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(value))); + check_hresult(WINRT_SHIM(ICoreDragOperation)->abi_StartAsync(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_ICoreDragOperation2::AllowedOperations() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowedOperations(&value)); + check_hresult(WINRT_SHIM(ICoreDragOperation2)->get_AllowedOperations(&value)); return value; } template void impl_ICoreDragOperation2::AllowedOperations(Windows::ApplicationModel::DataTransfer::DataPackageOperation value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowedOperations(value)); + check_hresult(WINRT_SHIM(ICoreDragOperation2)->put_AllowedOperations(value)); } template Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager impl_ICoreDragDropManagerStatics::GetForCurrentView() const { Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(ICoreDragDropManagerStatics)->abi_GetForCurrentView(put_abi(value))); return value; } template event_token impl_ICoreDragDropManager::TargetRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_TargetRequested(get(value), &returnValue)); + check_hresult(WINRT_SHIM(ICoreDragDropManager)->add_TargetRequested(get_abi(value), &returnValue)); return returnValue; } @@ -698,24 +735,24 @@ template event_revoker impl_ICoreDragDropMana template void impl_ICoreDragDropManager::TargetRequested(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_TargetRequested(value)); + check_hresult(WINRT_SHIM(ICoreDragDropManager)->remove_TargetRequested(value)); } template bool impl_ICoreDragDropManager::AreConcurrentOperationsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreConcurrentOperationsEnabled(&value)); + check_hresult(WINRT_SHIM(ICoreDragDropManager)->get_AreConcurrentOperationsEnabled(&value)); return value; } template void impl_ICoreDragDropManager::AreConcurrentOperationsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreConcurrentOperationsEnabled(value)); + check_hresult(WINRT_SHIM(ICoreDragDropManager)->put_AreConcurrentOperationsEnabled(value)); } template void impl_ICoreDropOperationTargetRequestedEventArgs::SetTarget(const Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget & target) const { - check_hresult(static_cast(static_cast(*this))->abi_SetTarget(get(target))); + check_hresult(WINRT_SHIM(ICoreDropOperationTargetRequestedEventArgs)->abi_SetTarget(get_abi(target))); } inline Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager CoreDragDropManager::GetForCurrentView() @@ -730,3 +767,131 @@ inline CoreDragOperation::CoreDragOperation() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragDropManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragDropManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragInfo2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragOperation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDragUIOverride & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTarget & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::ICoreDropOperationTargetRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragDropManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDragUIOverride & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DragDrop::Core::CoreDropOperationTargetRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.h b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.h index 2fec6d2c6..76e258160 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.DragDrop.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.DataTransfer.DragDrop.3.h" #include "Windows.ApplicationModel.DataTransfer.h" @@ -13,3 +16,5 @@ namespace impl { } } + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.ShareTarget.h b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.ShareTarget.h index 90c73a108..fd9dbd3d7 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.ShareTarget.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.ShareTarget.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.ApplicationModel.DataTransfer.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -30,10 +34,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -57,10 +63,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -70,11 +77,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -84,10 +92,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -97,11 +106,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedDataFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedDataFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedDataFormats()); return S_OK; } catch (...) @@ -111,11 +121,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedFileTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedFileTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedFileTypes()); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_QuickLinkId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QuickLinkId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QuickLinkId()); return S_OK; } catch (...) @@ -161,6 +174,7 @@ struct produceshim()); this->shim().RemoveThisQuickLink(); return S_OK; } @@ -174,6 +188,7 @@ struct produceshim()); this->shim().ReportStarted(); return S_OK; } @@ -187,6 +202,7 @@ struct produceshim()); this->shim().ReportDataRetrieved(); return S_OK; } @@ -200,6 +216,7 @@ struct produceshim()); this->shim().ReportSubmittedBackgroundTask(); return S_OK; } @@ -209,10 +226,11 @@ struct produce quicklink) noexcept override + HRESULT __stdcall abi_ReportCompletedWithQuickLink(impl::abi_arg_in quicklink) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&quicklink)); return S_OK; } @@ -226,6 +244,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -235,10 +254,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&value)); return S_OK; } @@ -256,6 +276,7 @@ struct produceshim()); this->shim().DismissUI(); return S_OK; } @@ -273,105 +294,105 @@ namespace Windows::ApplicationModel::DataTransfer::ShareTarget { template hstring impl_IQuickLink::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IQuickLink)->get_Title(put_abi(value))); return value; } -template void impl_IQuickLink::Title(hstring_ref value) const +template void impl_IQuickLink::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IQuickLink)->put_Title(get_abi(value))); } template Windows::Storage::Streams::RandomAccessStreamReference impl_IQuickLink::Thumbnail() const { Windows::Storage::Streams::RandomAccessStreamReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IQuickLink)->get_Thumbnail(put_abi(value))); return value; } template void impl_IQuickLink::Thumbnail(const Windows::Storage::Streams::RandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IQuickLink)->put_Thumbnail(get_abi(value))); } template hstring impl_IQuickLink::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IQuickLink)->get_Id(put_abi(value))); return value; } -template void impl_IQuickLink::Id(hstring_ref value) const +template void impl_IQuickLink::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IQuickLink)->put_Id(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IQuickLink::SupportedDataFormats() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedDataFormats(put(value))); + check_hresult(WINRT_SHIM(IQuickLink)->get_SupportedDataFormats(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IQuickLink::SupportedFileTypes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedFileTypes(put(value))); + check_hresult(WINRT_SHIM(IQuickLink)->get_SupportedFileTypes(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageView impl_IShareOperation::Data() const { Windows::ApplicationModel::DataTransfer::DataPackageView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IShareOperation)->get_Data(put_abi(value))); return value; } template hstring impl_IShareOperation::QuickLinkId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QuickLinkId(put(value))); + check_hresult(WINRT_SHIM(IShareOperation)->get_QuickLinkId(put_abi(value))); return value; } template void impl_IShareOperation::RemoveThisQuickLink() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveThisQuickLink()); + check_hresult(WINRT_SHIM(IShareOperation)->abi_RemoveThisQuickLink()); } template void impl_IShareOperation::ReportStarted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportStarted()); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportStarted()); } template void impl_IShareOperation::ReportDataRetrieved() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportDataRetrieved()); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportDataRetrieved()); } template void impl_IShareOperation::ReportSubmittedBackgroundTask() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportSubmittedBackgroundTask()); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportSubmittedBackgroundTask()); } template void impl_IShareOperation::ReportCompleted(const Windows::ApplicationModel::DataTransfer::ShareTarget::QuickLink & quicklink) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedWithQuickLink(get(quicklink))); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportCompletedWithQuickLink(get_abi(quicklink))); } template void impl_IShareOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportCompleted()); } -template void impl_IShareOperation::ReportError(hstring_ref value) const +template void impl_IShareOperation::ReportError(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportError(get(value))); + check_hresult(WINRT_SHIM(IShareOperation)->abi_ReportError(get_abi(value))); } template void impl_IShareOperation2::DismissUI() const { - check_hresult(static_cast(static_cast(*this))->abi_DismissUI()); + check_hresult(WINRT_SHIM(IShareOperation2)->abi_DismissUI()); } inline QuickLink::QuickLink() : @@ -381,3 +402,50 @@ inline QuickLink::QuickLink() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ShareTarget::IQuickLink & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ShareTarget::IShareOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ShareTarget::IShareOperation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ShareTarget::QuickLink & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ShareTarget::ShareOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.h b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.h index dcd73cda7..a735a0a79 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.DataTransfer.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -31,7 +34,7 @@ template DataProviderHandler::DataProviderHandler(O * o inline void DataProviderHandler::operator()(const Windows::ApplicationModel::DataTransfer::DataProviderRequest & request) const { - check_hresult((*this)->abi_Invoke(get(request))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(request))); } } @@ -41,11 +44,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetContent(abi_arg_out content) noexcept override + HRESULT __stdcall abi_GetContent(impl::abi_arg_out content) noexcept override { try { - *content = detach(this->shim().GetContent()); + typename D::abi_guard guard(this->shim()); + *content = detach_abi(this->shim().GetContent()); return S_OK; } catch (...) @@ -55,10 +59,11 @@ struct produce : } } - HRESULT __stdcall abi_SetContent(abi_arg_in content) noexcept override + HRESULT __stdcall abi_SetContent(impl::abi_arg_in content) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetContent(*reinterpret_cast(&content)); return S_OK; } @@ -72,6 +77,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Flush(); return S_OK; } @@ -85,6 +91,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -94,11 +101,12 @@ struct produce : } } - HRESULT __stdcall add_ContentChanged(abi_arg_in> changeHandler, event_token * token) noexcept override + HRESULT __stdcall add_ContentChanged(impl::abi_arg_in> changeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().ContentChanged(*reinterpret_cast *>(&changeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContentChanged(*reinterpret_cast *>(&changeHandler))); return S_OK; } catch (...) @@ -111,6 +119,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentChanged(token); return S_OK; } @@ -124,11 +133,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetView()); return S_OK; } catch (...) @@ -138,11 +148,12 @@ struct produce : produ } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -156,7 +167,8 @@ struct produce : produ { try { - *value = detach(this->shim().RequestedOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedOperation()); return S_OK; } catch (...) @@ -169,6 +181,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestedOperation(value); return S_OK; } @@ -178,11 +191,12 @@ struct produce : produ } } - HRESULT __stdcall add_OperationCompleted(abi_arg_in> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_OperationCompleted(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().OperationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().OperationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -195,6 +209,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().OperationCompleted(eventCookie); return S_OK; } @@ -204,11 +219,12 @@ struct produce : produ } } - HRESULT __stdcall add_Destroyed(abi_arg_in> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Destroyed(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Destroyed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Destroyed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -221,6 +237,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Destroyed(eventCookie); return S_OK; } @@ -230,11 +247,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetData(abi_arg_in formatId, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetData(impl::abi_arg_in formatId, impl::abi_arg_in value) noexcept override { try { - this->shim().SetData(*reinterpret_cast(&formatId), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetData(*reinterpret_cast(&formatId), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -243,10 +261,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetDataProvider(abi_arg_in formatId, abi_arg_in delayRenderer) noexcept override + HRESULT __stdcall abi_SetDataProvider(impl::abi_arg_in formatId, impl::abi_arg_in delayRenderer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDataProvider(*reinterpret_cast(&formatId), *reinterpret_cast(&delayRenderer)); return S_OK; } @@ -256,10 +275,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetText(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetText(*reinterpret_cast(&value)); return S_OK; } @@ -269,10 +289,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetUri(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetUri(*reinterpret_cast(&value)); return S_OK; } @@ -282,10 +303,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetHtmlFormat(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetHtmlFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHtmlFormat(*reinterpret_cast(&value)); return S_OK; } @@ -295,11 +317,12 @@ struct produce : produ } } - HRESULT __stdcall get_ResourceMap(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ResourceMap(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceMap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceMap()); return S_OK; } catch (...) @@ -309,10 +332,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetRtf(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetRtf(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRtf(*reinterpret_cast(&value)); return S_OK; } @@ -322,10 +346,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetBitmap(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetBitmap(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBitmap(*reinterpret_cast(&value)); return S_OK; } @@ -335,10 +360,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetStorageItemsReadOnly(abi_arg_in> value) noexcept override + HRESULT __stdcall abi_SetStorageItemsReadOnly(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStorageItems(*reinterpret_cast *>(&value)); return S_OK; } @@ -348,10 +374,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetStorageItems(abi_arg_in> value, bool readOnly) noexcept override + HRESULT __stdcall abi_SetStorageItems(impl::abi_arg_in> value, bool readOnly) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStorageItems(*reinterpret_cast *>(&value), readOnly); return S_OK; } @@ -365,10 +392,11 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_SetApplicationLink(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetApplicationLink(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetApplicationLink(*reinterpret_cast(&value)); return S_OK; } @@ -378,10 +406,11 @@ struct produce : prod } } - HRESULT __stdcall abi_SetWebLink(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetWebLink(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetWebLink(*reinterpret_cast(&value)); return S_OK; } @@ -395,11 +424,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -409,10 +439,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -422,11 +453,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -436,10 +468,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -449,11 +482,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -463,10 +497,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -476,11 +511,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_FileTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypes()); return S_OK; } catch (...) @@ -490,11 +526,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationName()); return S_OK; } catch (...) @@ -504,10 +541,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ApplicationName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplicationName(*reinterpret_cast(&value)); return S_OK; } @@ -517,11 +555,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationListingUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationListingUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationListingUri()); return S_OK; } catch (...) @@ -531,10 +570,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ApplicationListingUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplicationListingUri(*reinterpret_cast(&value)); return S_OK; } @@ -548,11 +588,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ContentSourceWebLink(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentSourceWebLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentSourceWebLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentSourceWebLink()); return S_OK; } catch (...) @@ -562,10 +603,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentSourceWebLink(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentSourceWebLink(*reinterpret_cast(&value)); return S_OK; } @@ -575,11 +617,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentSourceApplicationLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentSourceApplicationLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentSourceApplicationLink()); return S_OK; } catch (...) @@ -589,10 +632,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentSourceApplicationLink(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentSourceApplicationLink(*reinterpret_cast(&value)); return S_OK; } @@ -602,11 +646,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -616,10 +661,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PackageFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PackageFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -629,11 +675,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Square30x30Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square30x30Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square30x30Logo()); return S_OK; } catch (...) @@ -643,10 +690,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Square30x30Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square30x30Logo(*reinterpret_cast(&value)); return S_OK; } @@ -656,11 +704,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LogoBackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LogoBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogoBackgroundColor()); return S_OK; } catch (...) @@ -669,10 +718,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_LogoBackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogoBackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -686,11 +736,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnterpriseId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnterpriseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnterpriseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnterpriseId()); return S_OK; } catch (...) @@ -700,10 +751,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_EnterpriseId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnterpriseId(*reinterpret_cast(&value)); return S_OK; } @@ -717,11 +769,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -731,11 +784,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -745,11 +799,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -759,11 +814,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_FileTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypes()); return S_OK; } catch (...) @@ -773,11 +829,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationName()); return S_OK; } catch (...) @@ -787,11 +844,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationListingUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationListingUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationListingUri()); return S_OK; } catch (...) @@ -805,11 +863,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -819,11 +878,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentSourceWebLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentSourceWebLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentSourceWebLink()); return S_OK; } catch (...) @@ -833,11 +893,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentSourceApplicationLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentSourceApplicationLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentSourceApplicationLink()); return S_OK; } catch (...) @@ -847,11 +908,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Square30x30Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square30x30Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square30x30Logo()); return S_OK; } catch (...) @@ -861,11 +923,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LogoBackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LogoBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogoBackgroundColor()); return S_OK; } catch (...) @@ -878,11 +941,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnterpriseId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnterpriseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnterpriseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnterpriseId()); return S_OK; } catch (...) @@ -896,11 +960,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -914,7 +979,8 @@ struct produce : p { try { - *value = detach(this->shim().RequestedOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedOperation()); return S_OK; } catch (...) @@ -927,6 +993,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportOperationCompleted(value); return S_OK; } @@ -936,11 +1003,12 @@ struct produce : p } } - HRESULT __stdcall get_AvailableFormats(abi_arg_out> formatIds) noexcept override + HRESULT __stdcall get_AvailableFormats(impl::abi_arg_out> formatIds) noexcept override { try { - *formatIds = detach(this->shim().AvailableFormats()); + typename D::abi_guard guard(this->shim()); + *formatIds = detach_abi(this->shim().AvailableFormats()); return S_OK; } catch (...) @@ -950,11 +1018,12 @@ struct produce : p } } - HRESULT __stdcall abi_Contains(abi_arg_in formatId, bool * value) noexcept override + HRESULT __stdcall abi_Contains(impl::abi_arg_in formatId, bool * value) noexcept override { try { - *value = detach(this->shim().Contains(*reinterpret_cast(&formatId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contains(*reinterpret_cast(&formatId))); return S_OK; } catch (...) @@ -963,11 +1032,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetDataAsync(abi_arg_in formatId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDataAsync(impl::abi_arg_in formatId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDataAsync(*reinterpret_cast(&formatId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDataAsync(*reinterpret_cast(&formatId))); return S_OK; } catch (...) @@ -977,11 +1047,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetTextAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetTextAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetTextAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetTextAsync()); return S_OK; } catch (...) @@ -991,11 +1062,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetCustomTextAsync(abi_arg_in formatId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCustomTextAsync(impl::abi_arg_in formatId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetTextAsync(*reinterpret_cast(&formatId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetTextAsync(*reinterpret_cast(&formatId))); return S_OK; } catch (...) @@ -1005,11 +1077,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetUriAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetUriAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetUriAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetUriAsync()); return S_OK; } catch (...) @@ -1019,11 +1092,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetHtmlFormatAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetHtmlFormatAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetHtmlFormatAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetHtmlFormatAsync()); return S_OK; } catch (...) @@ -1033,11 +1107,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetResourceMapAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetResourceMapAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetResourceMapAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetResourceMapAsync()); return S_OK; } catch (...) @@ -1047,11 +1122,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetRtfAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRtfAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRtfAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRtfAsync()); return S_OK; } catch (...) @@ -1061,11 +1137,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetBitmapAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetBitmapAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetBitmapAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetBitmapAsync()); return S_OK; } catch (...) @@ -1075,11 +1152,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetStorageItemsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetStorageItemsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetStorageItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStorageItemsAsync()); return S_OK; } catch (...) @@ -1093,11 +1171,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetApplicationLinkAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetApplicationLinkAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetApplicationLinkAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetApplicationLinkAsync()); return S_OK; } catch (...) @@ -1107,11 +1186,12 @@ struct produce : } } - HRESULT __stdcall abi_GetWebLinkAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetWebLinkAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetWebLinkAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetWebLinkAsync()); return S_OK; } catch (...) @@ -1125,11 +1205,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -1139,11 +1220,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestAccessWithEnterpriseIdAsync(abi_arg_in enterpriseId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessWithEnterpriseIdAsync(impl::abi_arg_in enterpriseId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync(*reinterpret_cast(&enterpriseId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync(*reinterpret_cast(&enterpriseId))); return S_OK; } catch (...) @@ -1157,7 +1239,8 @@ struct produce : { try { - *result = detach(this->shim().UnlockAndAssumeEnterpriseIdentity()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnlockAndAssumeEnterpriseIdentity()); return S_OK; } catch (...) @@ -1170,10 +1253,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_SetAcceptedFormatId(abi_arg_in formatId) noexcept override + HRESULT __stdcall abi_SetAcceptedFormatId(impl::abi_arg_in formatId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAcceptedFormatId(*reinterpret_cast(&formatId)); return S_OK; } @@ -1191,6 +1275,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -1204,11 +1289,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FormatId(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormatId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormatId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormatId()); return S_OK; } catch (...) @@ -1218,11 +1304,12 @@ struct produce } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -1231,11 +1318,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1245,11 +1333,12 @@ struct produce } } - HRESULT __stdcall abi_SetData(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetData(impl::abi_arg_in value) noexcept override { try { - this->shim().SetData(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetData(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -1262,11 +1351,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1276,10 +1366,11 @@ struct produce : produ } } - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -1289,11 +1380,12 @@ struct produce : produ } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -1302,10 +1394,11 @@ struct produce : produ } } - HRESULT __stdcall abi_FailWithDisplayText(abi_arg_in value) noexcept override + HRESULT __stdcall abi_FailWithDisplayText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FailWithDisplayText(*reinterpret_cast(&value)); return S_OK; } @@ -1315,11 +1408,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1337,6 +1431,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1350,11 +1445,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1368,11 +1464,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_DataRequested(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_DataRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().DataRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().DataRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1385,6 +1482,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DataRequested(eventCookie); return S_OK; } @@ -1394,11 +1492,12 @@ struct produce } } - HRESULT __stdcall add_TargetApplicationChosen(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_TargetApplicationChosen(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().TargetApplicationChosen(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().TargetApplicationChosen(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1411,6 +1510,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetApplicationChosen(eventCookie); return S_OK; } @@ -1428,6 +1528,7 @@ struct produceshim()); this->shim().ShowShareUI(); return S_OK; } @@ -1437,11 +1538,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1459,7 +1561,8 @@ struct produceshim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -1472,11 +1575,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetStaticFragment(abi_arg_in htmlFormat, abi_arg_out htmlFragment) noexcept override + HRESULT __stdcall abi_GetStaticFragment(impl::abi_arg_in htmlFormat, impl::abi_arg_out htmlFragment) noexcept override { try { - *htmlFragment = detach(this->shim().GetStaticFragment(*reinterpret_cast(&htmlFormat))); + typename D::abi_guard guard(this->shim()); + *htmlFragment = detach_abi(this->shim().GetStaticFragment(*reinterpret_cast(&htmlFormat))); return S_OK; } catch (...) @@ -1486,11 +1590,12 @@ struct produce htmlFragment, abi_arg_out htmlFormat) noexcept override + HRESULT __stdcall abi_CreateHtmlFormat(impl::abi_arg_in htmlFragment, impl::abi_arg_out htmlFormat) noexcept override { try { - *htmlFormat = detach(this->shim().CreateHtmlFormat(*reinterpret_cast(&htmlFragment))); + typename D::abi_guard guard(this->shim()); + *htmlFormat = detach_abi(this->shim().CreateHtmlFormat(*reinterpret_cast(&htmlFragment))); return S_OK; } catch (...) @@ -1508,7 +1613,8 @@ struct produceshim().Operation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Operation()); return S_OK; } catch (...) @@ -1521,11 +1627,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AcceptedFormatId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AcceptedFormatId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcceptedFormatId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptedFormatId()); return S_OK; } catch (...) @@ -1539,11 +1646,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddFile(abi_arg_in file, abi_arg_out outToken) noexcept override + HRESULT __stdcall abi_AddFile(impl::abi_arg_in file, impl::abi_arg_out outToken) noexcept override { try { - *outToken = detach(this->shim().AddFile(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *outToken = detach_abi(this->shim().AddFile(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -1553,11 +1661,12 @@ struct produce token, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RedeemTokenForFileAsync(impl::abi_arg_in token, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RedeemTokenForFileAsync(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RedeemTokenForFileAsync(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -1567,10 +1676,11 @@ struct produce token) noexcept override + HRESULT __stdcall abi_RemoveFile(impl::abi_arg_in token) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveFile(*reinterpret_cast(&token)); return S_OK; } @@ -1584,11 +1694,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1598,11 +1709,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -1612,11 +1724,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Html(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Html()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Html()); return S_OK; } catch (...) @@ -1626,11 +1739,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rtf(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rtf()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rtf()); return S_OK; } catch (...) @@ -1640,11 +1754,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Bitmap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bitmap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bitmap()); return S_OK; } catch (...) @@ -1654,11 +1769,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StorageItems(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StorageItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorageItems()); return S_OK; } catch (...) @@ -1672,11 +1788,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebLink(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebLink()); return S_OK; } catch (...) @@ -1686,11 +1803,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationLink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationLink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationLink()); return S_OK; } catch (...) @@ -1704,11 +1822,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ApplicationName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ApplicationName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationName()); return S_OK; } catch (...) @@ -1726,493 +1845,493 @@ namespace Windows::ApplicationModel::DataTransfer { template hstring impl_IStandardDataFormatsStatics::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_Text(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics::Uri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_Uri(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics::Html() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Html(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_Html(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics::Rtf() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rtf(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_Rtf(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics::Bitmap() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bitmap(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_Bitmap(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics::StorageItems() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StorageItems(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics)->get_StorageItems(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics2::WebLink() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WebLink(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics2)->get_WebLink(put_abi(value))); return value; } template hstring impl_IStandardDataFormatsStatics2::ApplicationLink() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationLink(put(value))); + check_hresult(WINRT_SHIM(IStandardDataFormatsStatics2)->get_ApplicationLink(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySetView::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_Title(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySetView::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_Description(put_abi(value))); return value; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IDataPackagePropertySetView::Thumbnail() const { Windows::Storage::Streams::RandomAccessStreamReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_Thumbnail(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IDataPackagePropertySetView::FileTypes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FileTypes(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_FileTypes(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySetView::ApplicationName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationName(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_ApplicationName(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IDataPackagePropertySetView::ApplicationListingUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationListingUri(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView)->get_ApplicationListingUri(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySetView2::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView2)->get_PackageFamilyName(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IDataPackagePropertySetView2::ContentSourceWebLink() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentSourceWebLink(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView2)->get_ContentSourceWebLink(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IDataPackagePropertySetView2::ContentSourceApplicationLink() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentSourceApplicationLink(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView2)->get_ContentSourceApplicationLink(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IDataPackagePropertySetView2::Square30x30Logo() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Square30x30Logo(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView2)->get_Square30x30Logo(put_abi(value))); return value; } template Windows::UI::Color impl_IDataPackagePropertySetView2::LogoBackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_LogoBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView2)->get_LogoBackgroundColor(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySetView3::EnterpriseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnterpriseId(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySetView3)->get_EnterpriseId(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySet::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_Title(put_abi(value))); return value; } -template void impl_IDataPackagePropertySet::Title(hstring_ref value) const +template void impl_IDataPackagePropertySet::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->put_Title(get_abi(value))); } template hstring impl_IDataPackagePropertySet::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_Description(put_abi(value))); return value; } -template void impl_IDataPackagePropertySet::Description(hstring_ref value) const +template void impl_IDataPackagePropertySet::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->put_Description(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IDataPackagePropertySet::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_Thumbnail(put_abi(value))); return value; } template void impl_IDataPackagePropertySet::Thumbnail(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->put_Thumbnail(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IDataPackagePropertySet::FileTypes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FileTypes(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_FileTypes(put_abi(value))); return value; } template hstring impl_IDataPackagePropertySet::ApplicationName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationName(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_ApplicationName(put_abi(value))); return value; } -template void impl_IDataPackagePropertySet::ApplicationName(hstring_ref value) const +template void impl_IDataPackagePropertySet::ApplicationName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ApplicationName(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->put_ApplicationName(get_abi(value))); } template Windows::Foundation::Uri impl_IDataPackagePropertySet::ApplicationListingUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationListingUri(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->get_ApplicationListingUri(put_abi(value))); return value; } template void impl_IDataPackagePropertySet::ApplicationListingUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ApplicationListingUri(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet)->put_ApplicationListingUri(get_abi(value))); } template Windows::Foundation::Uri impl_IDataPackagePropertySet2::ContentSourceWebLink() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentSourceWebLink(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->get_ContentSourceWebLink(put_abi(value))); return value; } template void impl_IDataPackagePropertySet2::ContentSourceWebLink(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentSourceWebLink(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->put_ContentSourceWebLink(get_abi(value))); } template Windows::Foundation::Uri impl_IDataPackagePropertySet2::ContentSourceApplicationLink() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentSourceApplicationLink(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->get_ContentSourceApplicationLink(put_abi(value))); return value; } template void impl_IDataPackagePropertySet2::ContentSourceApplicationLink(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentSourceApplicationLink(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->put_ContentSourceApplicationLink(get_abi(value))); } template hstring impl_IDataPackagePropertySet2::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->get_PackageFamilyName(put_abi(value))); return value; } -template void impl_IDataPackagePropertySet2::PackageFamilyName(hstring_ref value) const +template void impl_IDataPackagePropertySet2::PackageFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PackageFamilyName(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->put_PackageFamilyName(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IDataPackagePropertySet2::Square30x30Logo() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Square30x30Logo(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->get_Square30x30Logo(put_abi(value))); return value; } template void impl_IDataPackagePropertySet2::Square30x30Logo(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square30x30Logo(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->put_Square30x30Logo(get_abi(value))); } template Windows::UI::Color impl_IDataPackagePropertySet2::LogoBackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_LogoBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->get_LogoBackgroundColor(put_abi(value))); return value; } template void impl_IDataPackagePropertySet2::LogoBackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_LogoBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet2)->put_LogoBackgroundColor(get_abi(value))); } template hstring impl_IDataPackagePropertySet3::EnterpriseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnterpriseId(put(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet3)->get_EnterpriseId(put_abi(value))); return value; } -template void impl_IDataPackagePropertySet3::EnterpriseId(hstring_ref value) const +template void impl_IDataPackagePropertySet3::EnterpriseId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_EnterpriseId(get(value))); + check_hresult(WINRT_SHIM(IDataPackagePropertySet3)->put_EnterpriseId(get_abi(value))); } template void impl_IDataProviderDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IDataProviderDeferral)->abi_Complete()); } template hstring impl_IDataProviderRequest::FormatId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormatId(put(value))); + check_hresult(WINRT_SHIM(IDataProviderRequest)->get_FormatId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IDataProviderRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IDataProviderRequest)->get_Deadline(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataProviderDeferral impl_IDataProviderRequest::GetDeferral() const { Windows::ApplicationModel::DataTransfer::DataProviderDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IDataProviderRequest)->abi_GetDeferral(put_abi(value))); return value; } -template void impl_IDataProviderRequest::SetData(const Windows::IInspectable & value) const +template void impl_IDataProviderRequest::SetData(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetData(get(value))); + check_hresult(WINRT_SHIM(IDataProviderRequest)->abi_SetData(get_abi(value))); } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_IOperationCompletedEventArgs::Operation() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_Operation(&value)); + check_hresult(WINRT_SHIM(IOperationCompletedEventArgs)->get_Operation(&value)); return value; } template hstring impl_IOperationCompletedEventArgs2::AcceptedFormatId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AcceptedFormatId(put(value))); + check_hresult(WINRT_SHIM(IOperationCompletedEventArgs2)->get_AcceptedFormatId(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackagePropertySetView impl_IDataPackageView::Properties() const { Windows::ApplicationModel::DataTransfer::DataPackagePropertySetView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IDataPackageView)->get_Properties(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_IDataPackageView::RequestedOperation() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedOperation(&value)); + check_hresult(WINRT_SHIM(IDataPackageView)->get_RequestedOperation(&value)); return value; } template void impl_IDataPackageView::ReportOperationCompleted(Windows::ApplicationModel::DataTransfer::DataPackageOperation value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportOperationCompleted(value)); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_ReportOperationCompleted(value)); } template Windows::Foundation::Collections::IVectorView impl_IDataPackageView::AvailableFormats() const { Windows::Foundation::Collections::IVectorView formatIds; - check_hresult(static_cast(static_cast(*this))->get_AvailableFormats(put(formatIds))); + check_hresult(WINRT_SHIM(IDataPackageView)->get_AvailableFormats(put_abi(formatIds))); return formatIds; } -template bool impl_IDataPackageView::Contains(hstring_ref formatId) const +template bool impl_IDataPackageView::Contains(hstring_view formatId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_Contains(get(formatId), &value)); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_Contains(get_abi(formatId), &value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetDataAsync(hstring_ref formatId) const +template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetDataAsync(hstring_view formatId) const { - Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDataAsync(get(formatId), put(operation))); + Windows::Foundation::IAsyncOperation operation; + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetDataAsync(get_abi(formatId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetTextAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetTextAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetTextAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetTextAsync(hstring_ref formatId) const +template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetTextAsync(hstring_view formatId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCustomTextAsync(get(formatId), put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetCustomTextAsync(get_abi(formatId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetUriAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetUriAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetUriAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetHtmlFormatAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetHtmlFormatAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetHtmlFormatAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IDataPackageView::GetResourceMapAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetResourceMapAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetResourceMapAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetRtfAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRtfAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetRtfAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView::GetBitmapAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetBitmapAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetBitmapAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IDataPackageView::GetStorageItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStorageItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView)->abi_GetStorageItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView2::GetApplicationLinkAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetApplicationLinkAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView2)->abi_GetApplicationLinkAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView2::GetWebLinkAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetWebLinkAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView2)->abi_GetWebLinkAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataPackageView3::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView3)->abi_RequestAccessAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDataPackageView3::RequestAccessAsync(hstring_ref enterpriseId) const +template Windows::Foundation::IAsyncOperation impl_IDataPackageView3::RequestAccessAsync(hstring_view enterpriseId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessWithEnterpriseIdAsync(get(enterpriseId), put(operation))); + check_hresult(WINRT_SHIM(IDataPackageView3)->abi_RequestAccessWithEnterpriseIdAsync(get_abi(enterpriseId), put_abi(operation))); return operation; } template Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult impl_IDataPackageView3::UnlockAndAssumeEnterpriseIdentity() const { Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_UnlockAndAssumeEnterpriseIdentity(&result)); + check_hresult(WINRT_SHIM(IDataPackageView3)->abi_UnlockAndAssumeEnterpriseIdentity(&result)); return result; } -template void impl_IDataPackageView4::SetAcceptedFormatId(hstring_ref formatId) const +template void impl_IDataPackageView4::SetAcceptedFormatId(hstring_view formatId) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAcceptedFormatId(get(formatId))); + check_hresult(WINRT_SHIM(IDataPackageView4)->abi_SetAcceptedFormatId(get_abi(formatId))); } template Windows::ApplicationModel::DataTransfer::DataPackageView impl_IDataPackage::GetView() const { Windows::ApplicationModel::DataTransfer::DataPackageView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetView(put(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_GetView(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackagePropertySet impl_IDataPackage::Properties() const { Windows::ApplicationModel::DataTransfer::DataPackagePropertySet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IDataPackage)->get_Properties(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_IDataPackage::RequestedOperation() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedOperation(&value)); + check_hresult(WINRT_SHIM(IDataPackage)->get_RequestedOperation(&value)); return value; } template void impl_IDataPackage::RequestedOperation(Windows::ApplicationModel::DataTransfer::DataPackageOperation value) const { - check_hresult(static_cast(static_cast(*this))->put_RequestedOperation(value)); + check_hresult(WINRT_SHIM(IDataPackage)->put_RequestedOperation(value)); } template event_token impl_IDataPackage::OperationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_OperationCompleted(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IDataPackage)->add_OperationCompleted(get_abi(handler), &eventCookie)); return eventCookie; } @@ -2223,195 +2342,195 @@ template event_revoker impl_IDataPackage::Operatio template void impl_IDataPackage::OperationCompleted(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_OperationCompleted(eventCookie)); + check_hresult(WINRT_SHIM(IDataPackage)->remove_OperationCompleted(eventCookie)); } -template event_token impl_IDataPackage::Destroyed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDataPackage::Destroyed(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Destroyed(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IDataPackage)->add_Destroyed(get_abi(handler), &eventCookie)); return eventCookie; } -template event_revoker impl_IDataPackage::Destroyed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDataPackage::Destroyed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::DataTransfer::IDataPackage::remove_Destroyed, Destroyed(handler)); } template void impl_IDataPackage::Destroyed(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Destroyed(eventCookie)); + check_hresult(WINRT_SHIM(IDataPackage)->remove_Destroyed(eventCookie)); } -template void impl_IDataPackage::SetData(hstring_ref formatId, const Windows::IInspectable & value) const +template void impl_IDataPackage::SetData(hstring_view formatId, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetData(get(formatId), get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetData(get_abi(formatId), get_abi(value))); } -template void impl_IDataPackage::SetDataProvider(hstring_ref formatId, const Windows::ApplicationModel::DataTransfer::DataProviderHandler & delayRenderer) const +template void impl_IDataPackage::SetDataProvider(hstring_view formatId, const Windows::ApplicationModel::DataTransfer::DataProviderHandler & delayRenderer) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDataProvider(get(formatId), get(delayRenderer))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetDataProvider(get_abi(formatId), get_abi(delayRenderer))); } -template void impl_IDataPackage::SetText(hstring_ref value) const +template void impl_IDataPackage::SetText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetText(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetText(get_abi(value))); } template void impl_IDataPackage::SetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetUri(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetUri(get_abi(value))); } -template void impl_IDataPackage::SetHtmlFormat(hstring_ref value) const +template void impl_IDataPackage::SetHtmlFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHtmlFormat(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetHtmlFormat(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IDataPackage::ResourceMap() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_ResourceMap(put(value))); + check_hresult(WINRT_SHIM(IDataPackage)->get_ResourceMap(put_abi(value))); return value; } -template void impl_IDataPackage::SetRtf(hstring_ref value) const +template void impl_IDataPackage::SetRtf(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRtf(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetRtf(get_abi(value))); } template void impl_IDataPackage::SetBitmap(const Windows::Storage::Streams::RandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBitmap(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetBitmap(get_abi(value))); } -template void impl_IDataPackage::SetStorageItems(const Windows::Foundation::Collections::IIterable & value) const +template void impl_IDataPackage::SetStorageItems(iterable value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStorageItemsReadOnly(get(value))); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetStorageItemsReadOnly(get_abi(value))); } -template void impl_IDataPackage::SetStorageItems(const Windows::Foundation::Collections::IIterable & value, bool readOnly) const +template void impl_IDataPackage::SetStorageItems(iterable value, bool readOnly) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStorageItems(get(value), readOnly)); + check_hresult(WINRT_SHIM(IDataPackage)->abi_SetStorageItems(get_abi(value), readOnly)); } template void impl_IDataPackage2::SetApplicationLink(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetApplicationLink(get(value))); + check_hresult(WINRT_SHIM(IDataPackage2)->abi_SetApplicationLink(get_abi(value))); } template void impl_IDataPackage2::SetWebLink(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetWebLink(get(value))); + check_hresult(WINRT_SHIM(IDataPackage2)->abi_SetWebLink(get_abi(value))); } -template hstring impl_IHtmlFormatHelperStatics::GetStaticFragment(hstring_ref htmlFormat) const +template hstring impl_IHtmlFormatHelperStatics::GetStaticFragment(hstring_view htmlFormat) const { hstring htmlFragment; - check_hresult(static_cast(static_cast(*this))->abi_GetStaticFragment(get(htmlFormat), put(htmlFragment))); + check_hresult(WINRT_SHIM(IHtmlFormatHelperStatics)->abi_GetStaticFragment(get_abi(htmlFormat), put_abi(htmlFragment))); return htmlFragment; } -template hstring impl_IHtmlFormatHelperStatics::CreateHtmlFormat(hstring_ref htmlFragment) const +template hstring impl_IHtmlFormatHelperStatics::CreateHtmlFormat(hstring_view htmlFragment) const { hstring htmlFormat; - check_hresult(static_cast(static_cast(*this))->abi_CreateHtmlFormat(get(htmlFragment), put(htmlFormat))); + check_hresult(WINRT_SHIM(IHtmlFormatHelperStatics)->abi_CreateHtmlFormat(get_abi(htmlFragment), put_abi(htmlFormat))); return htmlFormat; } template Windows::ApplicationModel::DataTransfer::DataPackageView impl_IClipboardStatics::GetContent() const { Windows::ApplicationModel::DataTransfer::DataPackageView content { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContent(put(content))); + check_hresult(WINRT_SHIM(IClipboardStatics)->abi_GetContent(put_abi(content))); return content; } template void impl_IClipboardStatics::SetContent(const Windows::ApplicationModel::DataTransfer::DataPackage & content) const { - check_hresult(static_cast(static_cast(*this))->abi_SetContent(get(content))); + check_hresult(WINRT_SHIM(IClipboardStatics)->abi_SetContent(get_abi(content))); } template void impl_IClipboardStatics::Flush() const { - check_hresult(static_cast(static_cast(*this))->abi_Flush()); + check_hresult(WINRT_SHIM(IClipboardStatics)->abi_Flush()); } template void impl_IClipboardStatics::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IClipboardStatics)->abi_Clear()); } -template event_token impl_IClipboardStatics::ContentChanged(const Windows::Foundation::EventHandler & changeHandler) const +template event_token impl_IClipboardStatics::ContentChanged(const Windows::Foundation::EventHandler & changeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContentChanged(get(changeHandler), &token)); + check_hresult(WINRT_SHIM(IClipboardStatics)->add_ContentChanged(get_abi(changeHandler), &token)); return token; } -template event_revoker impl_IClipboardStatics::ContentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const +template event_revoker impl_IClipboardStatics::ContentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::DataTransfer::IClipboardStatics::remove_ContentChanged, ContentChanged(changeHandler)); } template void impl_IClipboardStatics::ContentChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContentChanged(token)); + check_hresult(WINRT_SHIM(IClipboardStatics)->remove_ContentChanged(token)); } template void impl_IDataRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IDataRequestDeferral)->abi_Complete()); } template Windows::ApplicationModel::DataTransfer::DataPackage impl_IDataRequest::Data() const { Windows::ApplicationModel::DataTransfer::DataPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IDataRequest)->get_Data(put_abi(value))); return value; } template void impl_IDataRequest::Data(const Windows::ApplicationModel::DataTransfer::DataPackage & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IDataRequest)->put_Data(get_abi(value))); } template Windows::Foundation::DateTime impl_IDataRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IDataRequest)->get_Deadline(put_abi(value))); return value; } -template void impl_IDataRequest::FailWithDisplayText(hstring_ref value) const +template void impl_IDataRequest::FailWithDisplayText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_FailWithDisplayText(get(value))); + check_hresult(WINRT_SHIM(IDataRequest)->abi_FailWithDisplayText(get_abi(value))); } template Windows::ApplicationModel::DataTransfer::DataRequestDeferral impl_IDataRequest::GetDeferral() const { Windows::ApplicationModel::DataTransfer::DataRequestDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IDataRequest)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataRequest impl_IDataRequestedEventArgs::Request() const { Windows::ApplicationModel::DataTransfer::DataRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IDataRequestedEventArgs)->get_Request(put_abi(value))); return value; } template hstring impl_ITargetApplicationChosenEventArgs::ApplicationName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationName(put(value))); + check_hresult(WINRT_SHIM(ITargetApplicationChosenEventArgs)->get_ApplicationName(put_abi(value))); return value; } template event_token impl_IDataTransferManager::DataRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_DataRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IDataTransferManager)->add_DataRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -2422,13 +2541,13 @@ template event_revoker impl_IDataTransferMana template void impl_IDataTransferManager::DataRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DataRequested(eventCookie)); + check_hresult(WINRT_SHIM(IDataTransferManager)->remove_DataRequested(eventCookie)); } template event_token impl_IDataTransferManager::TargetApplicationChosen(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_TargetApplicationChosen(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IDataTransferManager)->add_TargetApplicationChosen(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -2439,45 +2558,45 @@ template event_revoker impl_IDataTransferMana template void impl_IDataTransferManager::TargetApplicationChosen(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TargetApplicationChosen(eventCookie)); + check_hresult(WINRT_SHIM(IDataTransferManager)->remove_TargetApplicationChosen(eventCookie)); } template void impl_IDataTransferManagerStatics::ShowShareUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowShareUI()); + check_hresult(WINRT_SHIM(IDataTransferManagerStatics)->abi_ShowShareUI()); } template Windows::ApplicationModel::DataTransfer::DataTransferManager impl_IDataTransferManagerStatics::GetForCurrentView() const { Windows::ApplicationModel::DataTransfer::DataTransferManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(IDataTransferManagerStatics)->abi_GetForCurrentView(put_abi(value))); return value; } template bool impl_IDataTransferManagerStatics2::IsSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&value)); + check_hresult(WINRT_SHIM(IDataTransferManagerStatics2)->abi_IsSupported(&value)); return value; } template hstring impl_ISharedStorageAccessManagerStatics::AddFile(const Windows::Storage::IStorageFile & file) const { hstring outToken; - check_hresult(static_cast(static_cast(*this))->abi_AddFile(get(file), put(outToken))); + check_hresult(WINRT_SHIM(ISharedStorageAccessManagerStatics)->abi_AddFile(get_abi(file), put_abi(outToken))); return outToken; } -template Windows::Foundation::IAsyncOperation impl_ISharedStorageAccessManagerStatics::RedeemTokenForFileAsync(hstring_ref token) const +template Windows::Foundation::IAsyncOperation impl_ISharedStorageAccessManagerStatics::RedeemTokenForFileAsync(hstring_view token) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RedeemTokenForFileAsync(get(token), put(operation))); + check_hresult(WINRT_SHIM(ISharedStorageAccessManagerStatics)->abi_RedeemTokenForFileAsync(get_abi(token), put_abi(operation))); return operation; } -template void impl_ISharedStorageAccessManagerStatics::RemoveFile(hstring_ref token) const +template void impl_ISharedStorageAccessManagerStatics::RemoveFile(hstring_view token) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFile(get(token))); + check_hresult(WINRT_SHIM(ISharedStorageAccessManagerStatics)->abi_RemoveFile(get_abi(token))); } inline Windows::ApplicationModel::DataTransfer::DataPackageView Clipboard::GetContent() @@ -2500,12 +2619,12 @@ inline void Clipboard::Clear() get_activation_factory().Clear(); } -inline event_token Clipboard::ContentChanged(const Windows::Foundation::EventHandler & changeHandler) +inline event_token Clipboard::ContentChanged(const Windows::Foundation::EventHandler & changeHandler) { return get_activation_factory().ContentChanged(changeHandler); } -inline factory_event_revoker Clipboard::ContentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) +inline factory_event_revoker Clipboard::ContentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::ApplicationModel::DataTransfer::IClipboardStatics::remove_ContentChanged, factory.ContentChanged(changeHandler) }; @@ -2535,12 +2654,12 @@ inline bool DataTransferManager::IsSupported() return get_activation_factory().IsSupported(); } -inline hstring HtmlFormatHelper::GetStaticFragment(hstring_ref htmlFormat) +inline hstring HtmlFormatHelper::GetStaticFragment(hstring_view htmlFormat) { return get_activation_factory().GetStaticFragment(htmlFormat); } -inline hstring HtmlFormatHelper::CreateHtmlFormat(hstring_ref htmlFragment) +inline hstring HtmlFormatHelper::CreateHtmlFormat(hstring_view htmlFragment) { return get_activation_factory().CreateHtmlFormat(htmlFragment); } @@ -2550,12 +2669,12 @@ inline hstring SharedStorageAccessManager::AddFile(const Windows::Storage::IStor return get_activation_factory().AddFile(file); } -inline Windows::Foundation::IAsyncOperation SharedStorageAccessManager::RedeemTokenForFileAsync(hstring_ref token) +inline Windows::Foundation::IAsyncOperation SharedStorageAccessManager::RedeemTokenForFileAsync(hstring_view token) { return get_activation_factory().RedeemTokenForFileAsync(token); } -inline void SharedStorageAccessManager::RemoveFile(hstring_ref token) +inline void SharedStorageAccessManager::RemoveFile(hstring_view token) { get_activation_factory().RemoveFile(token); } @@ -2603,3 +2722,365 @@ inline hstring StandardDataFormats::ApplicationLink() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IClipboardStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySet2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySet3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySetView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySetView2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackagePropertySetView3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackageView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackageView2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackageView3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataPackageView4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataProviderDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataProviderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataTransferManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataTransferManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IDataTransferManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IHtmlFormatHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IOperationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IOperationCompletedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ISharedStorageAccessManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IStandardDataFormatsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::IStandardDataFormatsStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::ITargetApplicationChosenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataPackage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataPackagePropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataPackagePropertySetView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataPackageView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataProviderDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataProviderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::DataTransferManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::OperationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::DataTransfer::TargetApplicationChosenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Email.DataProvider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Email.DataProvider.h index 0bba27322..453e9a980 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Email.DataProvider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Email.DataProvider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Email.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_MailboxSyncRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_MailboxSyncRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MailboxSyncRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MailboxSyncRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -33,6 +37,7 @@ struct produceshim()); this->shim().MailboxSyncRequested(token); return S_OK; } @@ -42,11 +47,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadMessageRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadMessageRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadMessageRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -59,6 +65,7 @@ struct produceshim()); this->shim().DownloadMessageRequested(token); return S_OK; } @@ -68,11 +75,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadAttachmentRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadAttachmentRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadAttachmentRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -85,6 +93,7 @@ struct produceshim()); this->shim().DownloadAttachmentRequested(token); return S_OK; } @@ -94,11 +103,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_CreateFolderRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CreateFolderRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CreateFolderRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -111,6 +121,7 @@ struct produceshim()); this->shim().CreateFolderRequested(token); return S_OK; } @@ -120,11 +131,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_DeleteFolderRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DeleteFolderRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DeleteFolderRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -137,6 +149,7 @@ struct produceshim()); this->shim().DeleteFolderRequested(token); return S_OK; } @@ -146,11 +159,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_EmptyFolderRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EmptyFolderRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EmptyFolderRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -163,6 +177,7 @@ struct produceshim()); this->shim().EmptyFolderRequested(token); return S_OK; } @@ -172,11 +187,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_MoveFolderRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MoveFolderRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MoveFolderRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -189,6 +205,7 @@ struct produceshim()); this->shim().MoveFolderRequested(token); return S_OK; } @@ -198,11 +215,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_UpdateMeetingResponseRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UpdateMeetingResponseRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UpdateMeetingResponseRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -215,6 +233,7 @@ struct produceshim()); this->shim().UpdateMeetingResponseRequested(token); return S_OK; } @@ -224,11 +243,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ForwardMeetingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ForwardMeetingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ForwardMeetingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -241,6 +261,7 @@ struct produceshim()); this->shim().ForwardMeetingRequested(token); return S_OK; } @@ -250,11 +271,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProposeNewTimeForMeetingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProposeNewTimeForMeetingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProposeNewTimeForMeetingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -267,6 +289,7 @@ struct produceshim()); this->shim().ProposeNewTimeForMeetingRequested(token); return S_OK; } @@ -276,11 +299,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SetAutoReplySettingsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SetAutoReplySettingsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SetAutoReplySettingsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -293,6 +317,7 @@ struct produceshim()); this->shim().SetAutoReplySettingsRequested(token); return S_OK; } @@ -302,11 +327,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_GetAutoReplySettingsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GetAutoReplySettingsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GetAutoReplySettingsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -319,6 +345,7 @@ struct produceshim()); this->shim().GetAutoReplySettingsRequested(token); return S_OK; } @@ -328,11 +355,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ResolveRecipientsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ResolveRecipientsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ResolveRecipientsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -345,6 +373,7 @@ struct produceshim()); this->shim().ResolveRecipientsRequested(token); return S_OK; } @@ -354,11 +383,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ValidateCertificatesRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ValidateCertificatesRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ValidateCertificatesRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -371,6 +401,7 @@ struct produceshim()); this->shim().ValidateCertificatesRequested(token); return S_OK; } @@ -380,11 +411,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ServerSearchReadBatchRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ServerSearchReadBatchRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ServerSearchReadBatchRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -397,6 +429,7 @@ struct produceshim()); this->shim().ServerSearchReadBatchRequested(token); return S_OK; } @@ -410,6 +443,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -423,11 +457,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Connection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Connection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Connection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Connection()); return S_OK; } catch (...) @@ -441,11 +476,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -455,11 +491,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ParentFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentFolderId()); return S_OK; } catch (...) @@ -469,11 +506,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -483,11 +521,12 @@ struct produce folder, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_in folder, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync(*reinterpret_cast(&folder))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync(*reinterpret_cast(&folder))); return S_OK; } catch (...) @@ -497,11 +536,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxCreateFolderStatus status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync(status)); return S_OK; } catch (...) @@ -515,11 +555,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -529,11 +570,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -547,11 +589,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -561,11 +604,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailFolderId()); return S_OK; } catch (...) @@ -575,11 +619,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -589,11 +634,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxDeleteFolderStatus status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync(status)); return S_OK; } catch (...) @@ -607,11 +653,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -621,11 +668,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -639,11 +687,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -653,11 +702,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessageId()); return S_OK; } catch (...) @@ -667,11 +717,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailAttachmentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailAttachmentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailAttachmentId()); return S_OK; } catch (...) @@ -681,11 +732,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -695,11 +747,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -713,11 +766,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -727,11 +781,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -745,11 +800,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -759,11 +815,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessageId()); return S_OK; } catch (...) @@ -773,11 +830,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -787,11 +845,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -805,11 +864,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -819,11 +879,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -837,11 +898,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -851,11 +913,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailFolderId()); return S_OK; } catch (...) @@ -865,11 +928,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -879,11 +943,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxEmptyFolderStatus status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync(status)); return S_OK; } catch (...) @@ -897,11 +962,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -911,11 +977,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -929,11 +996,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -943,11 +1011,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessageId()); return S_OK; } catch (...) @@ -957,11 +1026,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Recipients(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Recipients()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recipients()); return S_OK; } catch (...) @@ -971,11 +1041,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -989,7 +1060,8 @@ struct produceshim().ForwardHeaderType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardHeaderType()); return S_OK; } catch (...) @@ -998,11 +1070,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ForwardHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForwardHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardHeader()); return S_OK; } catch (...) @@ -1012,11 +1085,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -1026,11 +1100,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1040,11 +1115,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1058,11 +1134,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1072,11 +1149,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1090,11 +1168,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1108,7 +1187,8 @@ struct produceshim().RequestedFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedFormat()); return S_OK; } catch (...) @@ -1117,11 +1197,12 @@ struct produce autoReplySettings, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_in autoReplySettings, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync(*reinterpret_cast(&autoReplySettings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync(*reinterpret_cast(&autoReplySettings))); return S_OK; } catch (...) @@ -1131,11 +1212,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1149,11 +1231,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1163,11 +1246,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1181,11 +1265,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1195,11 +1280,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailFolderId()); return S_OK; } catch (...) @@ -1209,11 +1295,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewParentFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewParentFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewParentFolderId()); return S_OK; } catch (...) @@ -1223,11 +1310,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewFolderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewFolderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewFolderName()); return S_OK; } catch (...) @@ -1237,11 +1325,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1251,11 +1340,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1269,11 +1359,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1283,11 +1374,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1301,11 +1393,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1315,11 +1408,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessageId()); return S_OK; } catch (...) @@ -1329,11 +1423,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewStartTime()); return S_OK; } catch (...) @@ -1342,11 +1437,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDuration()); return S_OK; } catch (...) @@ -1355,11 +1451,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -1369,11 +1466,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -1383,11 +1481,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1397,11 +1496,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1415,11 +1515,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1429,11 +1530,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1447,11 +1549,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1461,11 +1564,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Recipients(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Recipients()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recipients()); return S_OK; } catch (...) @@ -1475,11 +1579,12 @@ struct produce> resolutionResults, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_in> resolutionResults, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync(*reinterpret_cast *>(&resolutionResults))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync(*reinterpret_cast *>(&resolutionResults))); return S_OK; } catch (...) @@ -1489,11 +1594,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1507,11 +1613,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1521,11 +1628,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1539,11 +1647,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SessionId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SessionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -1553,11 +1662,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1567,11 +1677,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailFolderId()); return S_OK; } catch (...) @@ -1581,11 +1692,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Options(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -1599,7 +1711,8 @@ struct produceshim().SuggestedBatchSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedBatchSize()); return S_OK; } catch (...) @@ -1608,11 +1721,12 @@ struct produce message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveMessageAsync(impl::abi_arg_in message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -1622,11 +1736,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1636,11 +1751,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(Windows::ApplicationModel::Email::EmailBatchStatus batchStatus, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync(batchStatus)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync(batchStatus)); return S_OK; } catch (...) @@ -1654,11 +1770,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1668,11 +1785,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1686,11 +1804,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1700,11 +1819,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AutoReplySettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoReplySettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoReplySettings()); return S_OK; } catch (...) @@ -1714,11 +1834,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1728,11 +1849,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1746,11 +1868,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1760,11 +1883,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1778,11 +1902,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1792,11 +1917,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1806,11 +1932,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1824,11 +1951,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1838,11 +1966,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1856,11 +1985,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -1870,11 +2000,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessageId()); return S_OK; } catch (...) @@ -1888,7 +2019,8 @@ struct produceshim().Response()); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -1897,11 +2029,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -1911,11 +2044,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -1929,7 +2063,8 @@ struct produceshim().SendUpdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SendUpdate()); return S_OK; } catch (...) @@ -1938,11 +2073,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync()); return S_OK; } catch (...) @@ -1952,11 +2088,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -1970,11 +2107,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1984,11 +2122,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2002,11 +2141,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EmailMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMailboxId()); return S_OK; } catch (...) @@ -2016,11 +2156,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Certificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Certificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificates()); return S_OK; } catch (...) @@ -2030,11 +2171,12 @@ struct produce> validationStatuses, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReportCompletedAsync(impl::abi_arg_in> validationStatuses, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportCompletedAsync(*reinterpret_cast *>(&validationStatuses))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportCompletedAsync(*reinterpret_cast *>(&validationStatuses))); return S_OK; } catch (...) @@ -2044,11 +2186,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ReportFailedAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReportFailedAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReportFailedAsync()); return S_OK; } catch (...) @@ -2062,11 +2205,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -2076,11 +2220,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2098,14 +2243,14 @@ namespace Windows::ApplicationModel::Email::DataProvider { template Windows::ApplicationModel::Email::DataProvider::EmailDataProviderConnection impl_IEmailDataProviderTriggerDetails::Connection() const { Windows::ApplicationModel::Email::DataProvider::EmailDataProviderConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Connection(put(value))); + check_hresult(WINRT_SHIM(IEmailDataProviderTriggerDetails)->get_Connection(put_abi(value))); return value; } template event_token impl_IEmailDataProviderConnection::MailboxSyncRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MailboxSyncRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_MailboxSyncRequested(get_abi(handler), &token)); return token; } @@ -2116,13 +2261,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::MailboxSyncRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MailboxSyncRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_MailboxSyncRequested(token)); } template event_token impl_IEmailDataProviderConnection::DownloadMessageRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadMessageRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_DownloadMessageRequested(get_abi(handler), &token)); return token; } @@ -2133,13 +2278,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::DownloadMessageRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadMessageRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_DownloadMessageRequested(token)); } template event_token impl_IEmailDataProviderConnection::DownloadAttachmentRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadAttachmentRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_DownloadAttachmentRequested(get_abi(handler), &token)); return token; } @@ -2150,13 +2295,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::DownloadAttachmentRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadAttachmentRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_DownloadAttachmentRequested(token)); } template event_token impl_IEmailDataProviderConnection::CreateFolderRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CreateFolderRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_CreateFolderRequested(get_abi(handler), &token)); return token; } @@ -2167,13 +2312,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::CreateFolderRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CreateFolderRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_CreateFolderRequested(token)); } template event_token impl_IEmailDataProviderConnection::DeleteFolderRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DeleteFolderRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_DeleteFolderRequested(get_abi(handler), &token)); return token; } @@ -2184,13 +2329,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::DeleteFolderRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DeleteFolderRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_DeleteFolderRequested(token)); } template event_token impl_IEmailDataProviderConnection::EmptyFolderRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EmptyFolderRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_EmptyFolderRequested(get_abi(handler), &token)); return token; } @@ -2201,13 +2346,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::EmptyFolderRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EmptyFolderRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_EmptyFolderRequested(token)); } template event_token impl_IEmailDataProviderConnection::MoveFolderRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MoveFolderRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_MoveFolderRequested(get_abi(handler), &token)); return token; } @@ -2218,13 +2363,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::MoveFolderRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MoveFolderRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_MoveFolderRequested(token)); } template event_token impl_IEmailDataProviderConnection::UpdateMeetingResponseRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UpdateMeetingResponseRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_UpdateMeetingResponseRequested(get_abi(handler), &token)); return token; } @@ -2235,13 +2380,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::UpdateMeetingResponseRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UpdateMeetingResponseRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_UpdateMeetingResponseRequested(token)); } template event_token impl_IEmailDataProviderConnection::ForwardMeetingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ForwardMeetingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_ForwardMeetingRequested(get_abi(handler), &token)); return token; } @@ -2252,13 +2397,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::ForwardMeetingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ForwardMeetingRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_ForwardMeetingRequested(token)); } template event_token impl_IEmailDataProviderConnection::ProposeNewTimeForMeetingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProposeNewTimeForMeetingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_ProposeNewTimeForMeetingRequested(get_abi(handler), &token)); return token; } @@ -2269,13 +2414,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::ProposeNewTimeForMeetingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProposeNewTimeForMeetingRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_ProposeNewTimeForMeetingRequested(token)); } template event_token impl_IEmailDataProviderConnection::SetAutoReplySettingsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SetAutoReplySettingsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_SetAutoReplySettingsRequested(get_abi(handler), &token)); return token; } @@ -2286,13 +2431,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::SetAutoReplySettingsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SetAutoReplySettingsRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_SetAutoReplySettingsRequested(token)); } template event_token impl_IEmailDataProviderConnection::GetAutoReplySettingsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GetAutoReplySettingsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_GetAutoReplySettingsRequested(get_abi(handler), &token)); return token; } @@ -2303,13 +2448,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::GetAutoReplySettingsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GetAutoReplySettingsRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_GetAutoReplySettingsRequested(token)); } template event_token impl_IEmailDataProviderConnection::ResolveRecipientsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ResolveRecipientsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_ResolveRecipientsRequested(get_abi(handler), &token)); return token; } @@ -2320,13 +2465,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::ResolveRecipientsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ResolveRecipientsRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_ResolveRecipientsRequested(token)); } template event_token impl_IEmailDataProviderConnection::ValidateCertificatesRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ValidateCertificatesRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_ValidateCertificatesRequested(get_abi(handler), &token)); return token; } @@ -2337,13 +2482,13 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::ValidateCertificatesRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ValidateCertificatesRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_ValidateCertificatesRequested(token)); } template event_token impl_IEmailDataProviderConnection::ServerSearchReadBatchRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ServerSearchReadBatchRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->add_ServerSearchReadBatchRequested(get_abi(handler), &token)); return token; } @@ -2354,784 +2499,1362 @@ template event_revoker impl_IEmailDat template void impl_IEmailDataProviderConnection::ServerSearchReadBatchRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ServerSearchReadBatchRequested(token)); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->remove_ServerSearchReadBatchRequested(token)); } template void impl_IEmailDataProviderConnection::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IEmailDataProviderConnection)->abi_Start()); } template hstring impl_IEmailMailboxSyncManagerSyncRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManagerSyncRequest)->get_EmailMailboxId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxSyncManagerSyncRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManagerSyncRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxSyncManagerSyncRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManagerSyncRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxDownloadMessageRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxDownloadMessageRequest::EmailMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequest)->get_EmailMessageId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDownloadMessageRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDownloadMessageRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxDownloadAttachmentRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxDownloadAttachmentRequest::EmailMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequest)->get_EmailMessageId(put_abi(value))); return value; } template hstring impl_IEmailMailboxDownloadAttachmentRequest::EmailAttachmentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailAttachmentId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequest)->get_EmailAttachmentId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDownloadAttachmentRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDownloadAttachmentRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxCreateFolderRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxCreateFolderRequest::ParentFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ParentFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequest)->get_ParentFolderId(put_abi(value))); return value; } template hstring impl_IEmailMailboxCreateFolderRequest::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequest)->get_Name(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxCreateFolderRequest::ReportCompletedAsync(const Windows::ApplicationModel::Email::EmailFolder & folder) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(get(folder), put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequest)->abi_ReportCompletedAsync(get_abi(folder), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxCreateFolderRequest::ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxCreateFolderStatus status) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(status, put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequest)->abi_ReportFailedAsync(status, put_abi(result))); return result; } template hstring impl_IEmailMailboxDeleteFolderRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxDeleteFolderRequest::EmailFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequest)->get_EmailFolderId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDeleteFolderRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxDeleteFolderRequest::ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxDeleteFolderStatus status) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(status, put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequest)->abi_ReportFailedAsync(status, put_abi(result))); return result; } template hstring impl_IEmailMailboxEmptyFolderRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxEmptyFolderRequest::EmailFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequest)->get_EmailFolderId(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxEmptyFolderRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxEmptyFolderRequest::ReportFailedAsync(Windows::ApplicationModel::Email::EmailMailboxEmptyFolderStatus status) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(status, put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequest)->abi_ReportFailedAsync(status, put_abi(result))); return result; } template hstring impl_IEmailMailboxMoveFolderRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxMoveFolderRequest::EmailFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->get_EmailFolderId(put_abi(value))); return value; } template hstring impl_IEmailMailboxMoveFolderRequest::NewParentFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NewParentFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->get_NewParentFolderId(put_abi(value))); return value; } template hstring impl_IEmailMailboxMoveFolderRequest::NewFolderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NewFolderName(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->get_NewFolderName(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxMoveFolderRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxMoveFolderRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxUpdateMeetingResponseRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxUpdateMeetingResponseRequest::EmailMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_EmailMessageId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMeetingResponseType impl_IEmailMailboxUpdateMeetingResponseRequest::Response() const { Windows::ApplicationModel::Email::EmailMeetingResponseType response {}; - check_hresult(static_cast(static_cast(*this))->get_Response(&response)); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_Response(&response)); return response; } template hstring impl_IEmailMailboxUpdateMeetingResponseRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IEmailMailboxUpdateMeetingResponseRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_Comment(put_abi(value))); return value; } template bool impl_IEmailMailboxUpdateMeetingResponseRequest::SendUpdate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SendUpdate(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->get_SendUpdate(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxUpdateMeetingResponseRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxUpdateMeetingResponseRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxForwardMeetingRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxForwardMeetingRequest::EmailMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_EmailMessageId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IEmailMailboxForwardMeetingRequest::Recipients() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Recipients(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_Recipients(put_abi(value))); return value; } template hstring impl_IEmailMailboxForwardMeetingRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_Subject(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMessageBodyKind impl_IEmailMailboxForwardMeetingRequest::ForwardHeaderType() const { Windows::ApplicationModel::Email::EmailMessageBodyKind value {}; - check_hresult(static_cast(static_cast(*this))->get_ForwardHeaderType(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_ForwardHeaderType(&value)); return value; } template hstring impl_IEmailMailboxForwardMeetingRequest::ForwardHeader() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ForwardHeader(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_ForwardHeader(put_abi(value))); return value; } template hstring impl_IEmailMailboxForwardMeetingRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->get_Comment(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxForwardMeetingRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxForwardMeetingRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxProposeNewTimeForMeetingRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxProposeNewTimeForMeetingRequest::EmailMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_EmailMessageId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IEmailMailboxProposeNewTimeForMeetingRequest::NewStartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_NewStartTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_NewStartTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IEmailMailboxProposeNewTimeForMeetingRequest::NewDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NewDuration(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_NewDuration(put_abi(value))); return value; } template hstring impl_IEmailMailboxProposeNewTimeForMeetingRequest::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_Subject(put_abi(value))); return value; } template hstring impl_IEmailMailboxProposeNewTimeForMeetingRequest::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->get_Comment(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxProposeNewTimeForMeetingRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxProposeNewTimeForMeetingRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxSetAutoReplySettingsRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequest)->get_EmailMailboxId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxAutoReplySettings impl_IEmailMailboxSetAutoReplySettingsRequest::AutoReplySettings() const { Windows::ApplicationModel::Email::EmailMailboxAutoReplySettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoReplySettings(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequest)->get_AutoReplySettings(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxSetAutoReplySettingsRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxSetAutoReplySettingsRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxGetAutoReplySettingsRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequest)->get_EmailMailboxId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind impl_IEmailMailboxGetAutoReplySettingsRequest::RequestedFormat() const { Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedFormat(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequest)->get_RequestedFormat(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxGetAutoReplySettingsRequest::ReportCompletedAsync(const Windows::ApplicationModel::Email::EmailMailboxAutoReplySettings & autoReplySettings) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(get(autoReplySettings), put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequest)->abi_ReportCompletedAsync(get_abi(autoReplySettings), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxGetAutoReplySettingsRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxResolveRecipientsRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequest)->get_EmailMailboxId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IEmailMailboxResolveRecipientsRequest::Recipients() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Recipients(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequest)->get_Recipients(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IEmailMailboxResolveRecipientsRequest::ReportCompletedAsync(const Windows::Foundation::Collections::IIterable & resolutionResults) const +template Windows::Foundation::IAsyncAction impl_IEmailMailboxResolveRecipientsRequest::ReportCompletedAsync(iterable resolutionResults) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(get(resolutionResults), put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequest)->abi_ReportCompletedAsync(get_abi(resolutionResults), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxResolveRecipientsRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxValidateCertificatesRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequest)->get_EmailMailboxId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IEmailMailboxValidateCertificatesRequest::Certificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Certificates(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequest)->get_Certificates(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IEmailMailboxValidateCertificatesRequest::ReportCompletedAsync(const Windows::Foundation::Collections::IIterable & validationStatuses) const +template Windows::Foundation::IAsyncAction impl_IEmailMailboxValidateCertificatesRequest::ReportCompletedAsync(iterable validationStatuses) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(get(validationStatuses), put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequest)->abi_ReportCompletedAsync(get_abi(validationStatuses), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxValidateCertificatesRequest::ReportFailedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequest)->abi_ReportFailedAsync(put_abi(result))); return result; } template hstring impl_IEmailMailboxServerSearchReadBatchRequest::SessionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SessionId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->get_SessionId(put_abi(value))); return value; } template hstring impl_IEmailMailboxServerSearchReadBatchRequest::EmailMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->get_EmailMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailboxServerSearchReadBatchRequest::EmailFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->get_EmailFolderId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailQueryOptions impl_IEmailMailboxServerSearchReadBatchRequest::Options() const { Windows::ApplicationModel::Email::EmailQueryOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Options(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->get_Options(put_abi(value))); return value; } template uint32_t impl_IEmailMailboxServerSearchReadBatchRequest::SuggestedBatchSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SuggestedBatchSize(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->get_SuggestedBatchSize(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxServerSearchReadBatchRequest::SaveMessageAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveMessageAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->abi_SaveMessageAsync(get_abi(message), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxServerSearchReadBatchRequest::ReportCompletedAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportCompletedAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->abi_ReportCompletedAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailboxServerSearchReadBatchRequest::ReportFailedAsync(Windows::ApplicationModel::Email::EmailBatchStatus batchStatus) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailedAsync(batchStatus, put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequest)->abi_ReportFailedAsync(batchStatus, put_abi(result))); return result; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxSyncManagerSyncRequest impl_IEmailMailboxSyncManagerSyncRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxSyncManagerSyncRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManagerSyncRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxSyncManagerSyncRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManagerSyncRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadMessageRequest impl_IEmailMailboxDownloadMessageRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadMessageRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxDownloadMessageRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadMessageRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadAttachmentRequest impl_IEmailMailboxDownloadAttachmentRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadAttachmentRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxDownloadAttachmentRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDownloadAttachmentRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxCreateFolderRequest impl_IEmailMailboxCreateFolderRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxCreateFolderRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxCreateFolderRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxDeleteFolderRequest impl_IEmailMailboxDeleteFolderRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxDeleteFolderRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxDeleteFolderRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxDeleteFolderRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxEmptyFolderRequest impl_IEmailMailboxEmptyFolderRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxEmptyFolderRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxEmptyFolderRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxEmptyFolderRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxMoveFolderRequest impl_IEmailMailboxMoveFolderRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxMoveFolderRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxMoveFolderRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxMoveFolderRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxUpdateMeetingResponseRequest impl_IEmailMailboxUpdateMeetingResponseRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxUpdateMeetingResponseRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxUpdateMeetingResponseRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxUpdateMeetingResponseRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxForwardMeetingRequest impl_IEmailMailboxForwardMeetingRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxForwardMeetingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxForwardMeetingRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxForwardMeetingRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxProposeNewTimeForMeetingRequest impl_IEmailMailboxProposeNewTimeForMeetingRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxProposeNewTimeForMeetingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxProposeNewTimeForMeetingRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxProposeNewTimeForMeetingRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxSetAutoReplySettingsRequest impl_IEmailMailboxSetAutoReplySettingsRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxSetAutoReplySettingsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxSetAutoReplySettingsRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSetAutoReplySettingsRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxGetAutoReplySettingsRequest impl_IEmailMailboxGetAutoReplySettingsRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxGetAutoReplySettingsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxGetAutoReplySettingsRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxGetAutoReplySettingsRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxResolveRecipientsRequest impl_IEmailMailboxResolveRecipientsRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxResolveRecipientsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxResolveRecipientsRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxResolveRecipientsRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxValidateCertificatesRequest impl_IEmailMailboxValidateCertificatesRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxValidateCertificatesRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxValidateCertificatesRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxValidateCertificatesRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::ApplicationModel::Email::DataProvider::EmailMailboxServerSearchReadBatchRequest impl_IEmailMailboxServerSearchReadBatchRequestEventArgs::Request() const { Windows::ApplicationModel::Email::DataProvider::EmailMailboxServerSearchReadBatchRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequestEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEmailMailboxServerSearchReadBatchRequestEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxServerSearchReadBatchRequestEventArgs)->abi_GetDeferral(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxCreateFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxCreateFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDeleteFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDeleteFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDownloadAttachmentRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDownloadAttachmentRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDownloadMessageRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxDownloadMessageRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxEmptyFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxEmptyFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxForwardMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxForwardMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxGetAutoReplySettingsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxGetAutoReplySettingsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxMoveFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxMoveFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxProposeNewTimeForMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxProposeNewTimeForMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxResolveRecipientsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxResolveRecipientsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxServerSearchReadBatchRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxServerSearchReadBatchRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxSetAutoReplySettingsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxSetAutoReplySettingsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxUpdateMeetingResponseRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxUpdateMeetingResponseRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxValidateCertificatesRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::IEmailMailboxValidateCertificatesRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailDataProviderConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailDataProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxCreateFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxCreateFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDeleteFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDeleteFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadAttachmentRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadAttachmentRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadMessageRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxDownloadMessageRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxEmptyFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxEmptyFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxForwardMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxForwardMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxGetAutoReplySettingsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxGetAutoReplySettingsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxMoveFolderRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxMoveFolderRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxProposeNewTimeForMeetingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxProposeNewTimeForMeetingRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxResolveRecipientsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxResolveRecipientsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxServerSearchReadBatchRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxServerSearchReadBatchRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxSetAutoReplySettingsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxSetAutoReplySettingsRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxSyncManagerSyncRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxSyncManagerSyncRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxUpdateMeetingResponseRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxUpdateMeetingResponseRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxValidateCertificatesRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::DataProvider::EmailMailboxValidateCertificatesRequestEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Email.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Email.h index 636dc79a9..1c2a8cfe3 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Email.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Email.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FileName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileName()); return S_OK; } catch (...) @@ -32,10 +36,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_FileName(abi_arg_in value) noexcept override + HRESULT __stdcall put_FileName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FileName(*reinterpret_cast(&value)); return S_OK; } @@ -45,11 +50,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -59,10 +65,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -76,11 +83,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentId()); return S_OK; } catch (...) @@ -104,10 +113,11 @@ struct produce : produce } } - HRESULT __stdcall put_ContentId(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContentId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentId(*reinterpret_cast(&value)); return S_OK; } @@ -117,11 +127,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentLocation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentLocation()); return S_OK; } catch (...) @@ -131,10 +142,11 @@ struct produce : produce } } - HRESULT __stdcall put_ContentLocation(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContentLocation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentLocation(*reinterpret_cast(&value)); return S_OK; } @@ -148,7 +160,8 @@ struct produce : produce { try { - *value = detach(this->shim().DownloadState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadState()); return S_OK; } catch (...) @@ -161,6 +174,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadState(value); return S_OK; } @@ -174,7 +188,8 @@ struct produce : produce { try { - *value = detach(this->shim().EstimatedDownloadSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EstimatedDownloadSizeInBytes()); return S_OK; } catch (...) @@ -187,6 +202,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().EstimatedDownloadSizeInBytes(value); return S_OK; } @@ -200,7 +216,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsFromBaseMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFromBaseMessage()); return S_OK; } catch (...) @@ -213,7 +230,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsInline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInline()); return S_OK; } catch (...) @@ -226,6 +244,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsInline(value); return S_OK; } @@ -235,11 +254,12 @@ struct produce : produce } } - HRESULT __stdcall get_MimeType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MimeType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MimeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MimeType()); return S_OK; } catch (...) @@ -249,10 +269,11 @@ struct produce : produce } } - HRESULT __stdcall put_MimeType(abi_arg_in value) noexcept override + HRESULT __stdcall put_MimeType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MimeType(*reinterpret_cast(&value)); return S_OK; } @@ -266,11 +287,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in fileName, abi_arg_in data, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in fileName, impl::abi_arg_in data, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&fileName), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&fileName), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -284,11 +306,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in fileName, abi_arg_in data, abi_arg_in mimeType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in fileName, impl::abi_arg_in data, impl::abi_arg_in mimeType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&fileName), *reinterpret_cast(&data), *reinterpret_cast(&mimeType))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&fileName), *reinterpret_cast(&data), *reinterpret_cast(&mimeType))); return S_OK; } catch (...) @@ -302,11 +325,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -316,11 +340,12 @@ struct produce : produc } } - HRESULT __stdcall get_MailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_MailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailboxId()); return S_OK; } catch (...) @@ -334,7 +359,8 @@ struct produce : produc { try { - *value = detach(this->shim().FlagState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlagState()); return S_OK; } catch (...) @@ -347,7 +373,8 @@ struct produce : produc { try { - *value = detach(this->shim().HasAttachment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasAttachment()); return S_OK; } catch (...) @@ -360,7 +387,8 @@ struct produce : produc { try { - *value = detach(this->shim().Importance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Importance()); return S_OK; } catch (...) @@ -373,7 +401,8 @@ struct produce : produc { try { - *value = detach(this->shim().LastEmailResponseKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastEmailResponseKind()); return S_OK; } catch (...) @@ -386,7 +415,8 @@ struct produce : produc { try { - *value = detach(this->shim().MessageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageCount()); return S_OK; } catch (...) @@ -395,11 +425,12 @@ struct produce : produc } } - HRESULT __stdcall get_MostRecentMessageId(abi_arg_out value) noexcept override + HRESULT __stdcall get_MostRecentMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MostRecentMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MostRecentMessageId()); return S_OK; } catch (...) @@ -409,11 +440,12 @@ struct produce : produc } } - HRESULT __stdcall get_MostRecentMessageTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_MostRecentMessageTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MostRecentMessageTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MostRecentMessageTime()); return S_OK; } catch (...) @@ -422,11 +454,12 @@ struct produce : produc } } - HRESULT __stdcall get_Preview(abi_arg_out value) noexcept override + HRESULT __stdcall get_Preview(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Preview()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Preview()); return S_OK; } catch (...) @@ -436,11 +469,12 @@ struct produce : produc } } - HRESULT __stdcall get_LatestSender(abi_arg_out value) noexcept override + HRESULT __stdcall get_LatestSender(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LatestSender()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LatestSender()); return S_OK; } catch (...) @@ -450,11 +484,12 @@ struct produce : produc } } - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -468,7 +503,8 @@ struct produce : produc { try { - *value = detach(this->shim().UnreadMessageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnreadMessageCount()); return S_OK; } catch (...) @@ -477,11 +513,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FindMessagesAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindMessagesAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindMessagesAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindMessagesAsync()); return S_OK; } catch (...) @@ -491,11 +528,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FindMessagesWithCountAsync(uint32_t count, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindMessagesWithCountAsync(uint32_t count, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindMessagesAsync(count)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindMessagesAsync(count)); return S_OK; } catch (...) @@ -509,11 +547,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Conversations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Conversations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Conversations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Conversations()); return S_OK; } catch (...) @@ -527,7 +566,8 @@ struct produce : p { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -540,11 +580,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -558,11 +599,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -572,11 +614,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -586,10 +629,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -599,11 +643,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_MailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailboxId()); return S_OK; } catch (...) @@ -613,11 +658,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ParentFolderId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ParentFolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentFolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentFolderId()); return S_OK; } catch (...) @@ -627,11 +673,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -641,10 +688,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -658,7 +706,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsSyncEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSyncEnabled()); return S_OK; } catch (...) @@ -671,6 +720,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSyncEnabled(value); return S_OK; } @@ -680,11 +730,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LastSuccessfulSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastSuccessfulSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastSuccessfulSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSuccessfulSyncTime()); return S_OK; } catch (...) @@ -693,10 +744,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_LastSuccessfulSyncTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastSuccessfulSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastSuccessfulSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -710,7 +762,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -719,11 +772,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateFolderAsync(abi_arg_in name, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFolderAsync(impl::abi_arg_in name, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFolderAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFolderAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -733,11 +787,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -747,11 +802,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FindChildFoldersAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindChildFoldersAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindChildFoldersAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindChildFoldersAsync()); return S_OK; } catch (...) @@ -761,11 +817,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetConversationReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader()); return S_OK; } catch (...) @@ -775,11 +832,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetConversationReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -789,11 +847,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetMessageAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -803,11 +862,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetMessageReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader()); return S_OK; } catch (...) @@ -817,11 +877,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetMessageReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -831,11 +892,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetMessageCountsAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageCountsAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageCountsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageCountsAsync()); return S_OK; } catch (...) @@ -845,11 +907,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TryMoveAsync(abi_arg_in newParentFolder, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryMoveAsync(impl::abi_arg_in newParentFolder, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryMoveAsync(*reinterpret_cast(&newParentFolder))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryMoveAsync(*reinterpret_cast(&newParentFolder))); return S_OK; } catch (...) @@ -859,11 +922,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TryMoveWithNewNameAsync(abi_arg_in newParentFolder, abi_arg_in newFolderName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryMoveWithNewNameAsync(impl::abi_arg_in newParentFolder, impl::abi_arg_in newFolderName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryMoveAsync(*reinterpret_cast(&newParentFolder), *reinterpret_cast(&newFolderName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryMoveAsync(*reinterpret_cast(&newParentFolder), *reinterpret_cast(&newFolderName))); return S_OK; } catch (...) @@ -873,11 +937,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySaveAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySaveAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySaveAsync()); return S_OK; } catch (...) @@ -887,11 +952,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_SaveMessageAsync(abi_arg_in message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveMessageAsync(impl::abi_arg_in message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -909,7 +975,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanEdit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanEdit()); return S_OK; } catch (...) @@ -922,6 +989,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanEdit(value); return S_OK; } @@ -935,7 +1003,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanExtractData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanExtractData()); return S_OK; } catch (...) @@ -948,6 +1017,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanExtractData(value); return S_OK; } @@ -961,7 +1031,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanForward()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanForward()); return S_OK; } catch (...) @@ -974,6 +1045,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanForward(value); return S_OK; } @@ -987,7 +1059,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanModifyRecipientsOnResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanModifyRecipientsOnResponse()); return S_OK; } catch (...) @@ -1000,6 +1073,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanModifyRecipientsOnResponse(value); return S_OK; } @@ -1013,7 +1087,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanPrintData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPrintData()); return S_OK; } catch (...) @@ -1026,6 +1101,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanPrintData(value); return S_OK; } @@ -1039,7 +1115,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanRemoveIrmOnResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRemoveIrmOnResponse()); return S_OK; } catch (...) @@ -1052,6 +1129,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanRemoveIrmOnResponse(value); return S_OK; } @@ -1065,7 +1143,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanReply()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanReply()); return S_OK; } catch (...) @@ -1078,6 +1157,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanReply(value); return S_OK; } @@ -1091,7 +1171,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanReplyAll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanReplyAll()); return S_OK; } catch (...) @@ -1104,6 +1185,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CanReplyAll(value); return S_OK; } @@ -1113,11 +1195,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ExpirationDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -1126,10 +1209,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_ExpirationDate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ExpirationDate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationDate(*reinterpret_cast(&value)); return S_OK; } @@ -1143,7 +1227,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsIrmOriginator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIrmOriginator()); return S_OK; } catch (...) @@ -1156,6 +1241,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsIrmOriginator(value); return S_OK; } @@ -1169,7 +1255,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsProgramaticAccessAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProgramaticAccessAllowed()); return S_OK; } catch (...) @@ -1182,6 +1269,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsProgramaticAccessAllowed(value); return S_OK; } @@ -1191,11 +1279,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Template(abi_arg_out value) noexcept override + HRESULT __stdcall get_Template(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Template()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Template()); return S_OK; } catch (...) @@ -1205,10 +1294,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Template(abi_arg_in value) noexcept override + HRESULT __stdcall put_Template(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Template(*reinterpret_cast(&value)); return S_OK; } @@ -1222,11 +1312,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in expiration, abi_arg_in irmTemplate, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in expiration, impl::abi_arg_in irmTemplate, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&expiration), *reinterpret_cast(&irmTemplate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&expiration), *reinterpret_cast(&irmTemplate))); return S_OK; } catch (...) @@ -1240,11 +1331,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1254,10 +1346,11 @@ struct produce : produce } } - HRESULT __stdcall put_Id(abi_arg_in value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -1267,11 +1360,12 @@ struct produce : produce } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1281,10 +1375,11 @@ struct produce : produce } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -1294,11 +1389,12 @@ struct produce : produce } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1308,10 +1404,11 @@ struct produce : produce } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -1325,11 +1422,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in id, abi_arg_in name, abi_arg_in description, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in id, impl::abi_arg_in name, impl::abi_arg_in description, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&name), *reinterpret_cast(&description))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&name), *reinterpret_cast(&description))); return S_OK; } catch (...) @@ -1347,7 +1445,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Flagged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flagged()); return S_OK; } catch (...) @@ -1360,7 +1459,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Important()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Important()); return S_OK; } catch (...) @@ -1373,7 +1473,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Total()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Total()); return S_OK; } catch (...) @@ -1386,7 +1487,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Unread()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unread()); return S_OK; } catch (...) @@ -1399,11 +1501,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -1413,11 +1516,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -1427,11 +1531,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1441,10 +1546,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -1454,11 +1560,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1472,7 +1579,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsOwnedByCurrentApp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOwnedByCurrentApp()); return S_OK; } catch (...) @@ -1485,7 +1593,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsDataEncryptedUnderLock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataEncryptedUnderLock()); return S_OK; } catch (...) @@ -1494,11 +1603,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MailAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_MailAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MailAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailAddress()); return S_OK; } catch (...) @@ -1508,10 +1618,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_MailAddress(abi_arg_in value) noexcept override + HRESULT __stdcall put_MailAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MailAddress(*reinterpret_cast(&value)); return S_OK; } @@ -1521,11 +1632,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MailAddressAliases(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MailAddressAliases(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MailAddressAliases()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailAddressAliases()); return S_OK; } catch (...) @@ -1539,7 +1651,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().OtherAppReadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppReadAccess()); return S_OK; } catch (...) @@ -1552,6 +1665,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppReadAccess(value); return S_OK; } @@ -1565,7 +1679,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().OtherAppWriteAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppWriteAccess()); return S_OK; } catch (...) @@ -1578,6 +1693,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppWriteAccess(value); return S_OK; } @@ -1587,11 +1703,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Policies(abi_arg_out value) noexcept override + HRESULT __stdcall get_Policies(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Policies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Policies()); return S_OK; } catch (...) @@ -1601,11 +1718,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_SourceDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDisplayName()); return S_OK; } catch (...) @@ -1615,11 +1733,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_SyncManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_SyncManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SyncManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SyncManager()); return S_OK; } catch (...) @@ -1629,11 +1748,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_UserDataAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -1643,11 +1763,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetConversationReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader()); return S_OK; } catch (...) @@ -1657,11 +1778,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetConversationReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -1671,11 +1793,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetMessageReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader()); return S_OK; } catch (...) @@ -1685,11 +1808,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetMessageReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -1699,11 +1823,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -1713,11 +1838,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetConversationAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetConversationAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetConversationAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1727,11 +1853,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetFolderAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetFolderAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetFolderAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetFolderAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1741,11 +1868,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetMessageAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1755,11 +1883,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetSpecialFolderAsync(Windows::ApplicationModel::Email::EmailSpecialFolderKind folderType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetSpecialFolderAsync(Windows::ApplicationModel::Email::EmailSpecialFolderKind folderType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetSpecialFolderAsync(folderType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSpecialFolderAsync(folderType)); return S_OK; } catch (...) @@ -1769,11 +1898,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -1783,11 +1913,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_MarkMessageAsSeenAsync(abi_arg_in messageId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkMessageAsSeenAsync(impl::abi_arg_in messageId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkMessageAsSeenAsync(*reinterpret_cast(&messageId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkMessageAsSeenAsync(*reinterpret_cast(&messageId))); return S_OK; } catch (...) @@ -1797,11 +1928,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_MarkFolderAsSeenAsync(abi_arg_in folderId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkFolderAsSeenAsync(impl::abi_arg_in folderId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkFolderAsSeenAsync(*reinterpret_cast(&folderId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkFolderAsSeenAsync(*reinterpret_cast(&folderId))); return S_OK; } catch (...) @@ -1811,11 +1943,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_MarkMessageReadAsync(abi_arg_in messageId, bool isRead, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkMessageReadAsync(impl::abi_arg_in messageId, bool isRead, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkMessageReadAsync(*reinterpret_cast(&messageId), isRead)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkMessageReadAsync(*reinterpret_cast(&messageId), isRead)); return S_OK; } catch (...) @@ -1825,11 +1958,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_ChangeMessageFlagStateAsync(abi_arg_in messageId, Windows::ApplicationModel::Email::EmailFlagState flagState, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ChangeMessageFlagStateAsync(impl::abi_arg_in messageId, Windows::ApplicationModel::Email::EmailFlagState flagState, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ChangeMessageFlagStateAsync(*reinterpret_cast(&messageId), flagState)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ChangeMessageFlagStateAsync(*reinterpret_cast(&messageId), flagState)); return S_OK; } catch (...) @@ -1839,11 +1973,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryMoveMessageAsync(abi_arg_in messageId, abi_arg_in newParentFolderId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryMoveMessageAsync(impl::abi_arg_in messageId, impl::abi_arg_in newParentFolderId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryMoveMessageAsync(*reinterpret_cast(&messageId), *reinterpret_cast(&newParentFolderId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryMoveMessageAsync(*reinterpret_cast(&messageId), *reinterpret_cast(&newParentFolderId))); return S_OK; } catch (...) @@ -1853,11 +1988,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryMoveFolderAsync(abi_arg_in folderId, abi_arg_in newParentFolderId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryMoveFolderAsync(impl::abi_arg_in folderId, impl::abi_arg_in newParentFolderId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryMoveFolderAsync(*reinterpret_cast(&folderId), *reinterpret_cast(&newParentFolderId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryMoveFolderAsync(*reinterpret_cast(&folderId), *reinterpret_cast(&newParentFolderId))); return S_OK; } catch (...) @@ -1867,11 +2003,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryMoveFolderWithNewNameAsync(abi_arg_in folderId, abi_arg_in newParentFolderId, abi_arg_in newFolderName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryMoveFolderWithNewNameAsync(impl::abi_arg_in folderId, impl::abi_arg_in newParentFolderId, impl::abi_arg_in newFolderName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryMoveFolderAsync(*reinterpret_cast(&folderId), *reinterpret_cast(&newParentFolderId), *reinterpret_cast(&newFolderName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryMoveFolderAsync(*reinterpret_cast(&folderId), *reinterpret_cast(&newParentFolderId), *reinterpret_cast(&newFolderName))); return S_OK; } catch (...) @@ -1881,11 +2018,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_DeleteMessageAsync(abi_arg_in messageId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteMessageAsync(impl::abi_arg_in messageId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteMessageAsync(*reinterpret_cast(&messageId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteMessageAsync(*reinterpret_cast(&messageId))); return S_OK; } catch (...) @@ -1895,11 +2033,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_MarkFolderSyncEnabledAsync(abi_arg_in folderId, bool isSyncEnabled, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MarkFolderSyncEnabledAsync(impl::abi_arg_in folderId, bool isSyncEnabled, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MarkFolderSyncEnabledAsync(*reinterpret_cast(&folderId), isSyncEnabled)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MarkFolderSyncEnabledAsync(*reinterpret_cast(&folderId), isSyncEnabled)); return S_OK; } catch (...) @@ -1909,11 +2048,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SendMessageAsync(abi_arg_in message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SendMessageAsync(impl::abi_arg_in message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SendMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -1923,11 +2063,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SaveDraftAsync(abi_arg_in message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveDraftAsync(impl::abi_arg_in message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveDraftAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveDraftAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -1937,11 +2078,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_DownloadMessageAsync(abi_arg_in messageId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DownloadMessageAsync(impl::abi_arg_in messageId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DownloadMessageAsync(*reinterpret_cast(&messageId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DownloadMessageAsync(*reinterpret_cast(&messageId))); return S_OK; } catch (...) @@ -1951,11 +2093,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_DownloadAttachmentAsync(abi_arg_in attachmentId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DownloadAttachmentAsync(impl::abi_arg_in attachmentId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DownloadAttachmentAsync(*reinterpret_cast(&attachmentId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DownloadAttachmentAsync(*reinterpret_cast(&attachmentId))); return S_OK; } catch (...) @@ -1965,11 +2108,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateResponseMessageAsync(abi_arg_in messageId, Windows::ApplicationModel::Email::EmailMessageResponseKind responseType, abi_arg_in subject, Windows::ApplicationModel::Email::EmailMessageBodyKind responseHeaderType, abi_arg_in responseHeader, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateResponseMessageAsync(impl::abi_arg_in messageId, Windows::ApplicationModel::Email::EmailMessageResponseKind responseType, impl::abi_arg_in subject, Windows::ApplicationModel::Email::EmailMessageBodyKind responseHeaderType, impl::abi_arg_in responseHeader, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateResponseMessageAsync(*reinterpret_cast(&messageId), responseType, *reinterpret_cast(&subject), responseHeaderType, *reinterpret_cast(&responseHeader))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateResponseMessageAsync(*reinterpret_cast(&messageId), responseType, *reinterpret_cast(&subject), responseHeaderType, *reinterpret_cast(&responseHeader))); return S_OK; } catch (...) @@ -1979,11 +2123,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryUpdateMeetingResponseAsync(abi_arg_in meeting, Windows::ApplicationModel::Email::EmailMeetingResponseType response, abi_arg_in subject, abi_arg_in comment, bool sendUpdate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryUpdateMeetingResponseAsync(impl::abi_arg_in meeting, Windows::ApplicationModel::Email::EmailMeetingResponseType response, impl::abi_arg_in subject, impl::abi_arg_in comment, bool sendUpdate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryUpdateMeetingResponseAsync(*reinterpret_cast(&meeting), response, *reinterpret_cast(&subject), *reinterpret_cast(&comment), sendUpdate)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryUpdateMeetingResponseAsync(*reinterpret_cast(&meeting), response, *reinterpret_cast(&subject), *reinterpret_cast(&comment), sendUpdate)); return S_OK; } catch (...) @@ -1993,11 +2138,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryForwardMeetingAsync(abi_arg_in meeting, abi_arg_in> recipients, abi_arg_in subject, Windows::ApplicationModel::Email::EmailMessageBodyKind forwardHeaderType, abi_arg_in forwardHeader, abi_arg_in comment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryForwardMeetingAsync(impl::abi_arg_in meeting, impl::abi_arg_in> recipients, impl::abi_arg_in subject, Windows::ApplicationModel::Email::EmailMessageBodyKind forwardHeaderType, impl::abi_arg_in forwardHeader, impl::abi_arg_in comment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryForwardMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast *>(&recipients), *reinterpret_cast(&subject), forwardHeaderType, *reinterpret_cast(&forwardHeader), *reinterpret_cast(&comment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryForwardMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast *>(&recipients), *reinterpret_cast(&subject), forwardHeaderType, *reinterpret_cast(&forwardHeader), *reinterpret_cast(&comment))); return S_OK; } catch (...) @@ -2007,11 +2153,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryProposeNewTimeForMeetingAsync(abi_arg_in meeting, abi_arg_in newStartTime, abi_arg_in newDuration, abi_arg_in subject, abi_arg_in comment, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryProposeNewTimeForMeetingAsync(impl::abi_arg_in meeting, impl::abi_arg_in newStartTime, impl::abi_arg_in newDuration, impl::abi_arg_in subject, impl::abi_arg_in comment, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryProposeNewTimeForMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&newStartTime), *reinterpret_cast(&newDuration), *reinterpret_cast(&subject), *reinterpret_cast(&comment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryProposeNewTimeForMeetingAsync(*reinterpret_cast(&meeting), *reinterpret_cast(&newStartTime), *reinterpret_cast(&newDuration), *reinterpret_cast(&subject), *reinterpret_cast(&comment))); return S_OK; } catch (...) @@ -2021,11 +2168,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_MailboxChanged(abi_arg_in> pHandler, event_token * pToken) noexcept override + HRESULT __stdcall add_MailboxChanged(impl::abi_arg_in> pHandler, event_token * pToken) noexcept override { try { - *pToken = detach(this->shim().MailboxChanged(*reinterpret_cast *>(&pHandler))); + typename D::abi_guard guard(this->shim()); + *pToken = detach_abi(this->shim().MailboxChanged(*reinterpret_cast *>(&pHandler))); return S_OK; } catch (...) @@ -2038,6 +2186,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MailboxChanged(token); return S_OK; } @@ -2047,11 +2196,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SmartSendMessageAsync(abi_arg_in message, bool smartSend, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SmartSendMessageAsync(impl::abi_arg_in message, bool smartSend, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SendMessageAsync(*reinterpret_cast(&message), smartSend)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendMessageAsync(*reinterpret_cast(&message), smartSend)); return S_OK; } catch (...) @@ -2061,11 +2211,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TrySetAutoReplySettingsAsync(abi_arg_in autoReplySettings, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySetAutoReplySettingsAsync(impl::abi_arg_in autoReplySettings, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySetAutoReplySettingsAsync(*reinterpret_cast(&autoReplySettings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetAutoReplySettingsAsync(*reinterpret_cast(&autoReplySettings))); return S_OK; } catch (...) @@ -2075,11 +2226,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryGetAutoReplySettingsAsync(Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind requestedFormat, abi_arg_out> autoReplySettings) noexcept override + HRESULT __stdcall abi_TryGetAutoReplySettingsAsync(Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind requestedFormat, impl::abi_arg_out> autoReplySettings) noexcept override { try { - *autoReplySettings = detach(this->shim().TryGetAutoReplySettingsAsync(requestedFormat)); + typename D::abi_guard guard(this->shim()); + *autoReplySettings = detach_abi(this->shim().TryGetAutoReplySettingsAsync(requestedFormat)); return S_OK; } catch (...) @@ -2093,11 +2245,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_LinkedMailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinkedMailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinkedMailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkedMailboxId()); return S_OK; } catch (...) @@ -2107,11 +2260,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_NetworkAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -2121,11 +2275,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_NetworkId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkId()); return S_OK; } catch (...) @@ -2139,11 +2294,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_ResolveRecipientsAsync(abi_arg_in> recipients, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ResolveRecipientsAsync(impl::abi_arg_in> recipients, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ResolveRecipientsAsync(*reinterpret_cast *>(&recipients))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResolveRecipientsAsync(*reinterpret_cast *>(&recipients))); return S_OK; } catch (...) @@ -2153,11 +2309,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ValidateCertificatesAsync(abi_arg_in> certificates, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_ValidateCertificatesAsync(impl::abi_arg_in> certificates, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().ValidateCertificatesAsync(*reinterpret_cast *>(&certificates))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ValidateCertificatesAsync(*reinterpret_cast *>(&certificates))); return S_OK; } catch (...) @@ -2167,11 +2324,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryEmptyFolderAsync(abi_arg_in folderId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryEmptyFolderAsync(impl::abi_arg_in folderId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryEmptyFolderAsync(*reinterpret_cast(&folderId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryEmptyFolderAsync(*reinterpret_cast(&folderId))); return S_OK; } catch (...) @@ -2181,11 +2339,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryCreateFolderAsync(abi_arg_in parentFolderId, abi_arg_in name, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryCreateFolderAsync(impl::abi_arg_in parentFolderId, impl::abi_arg_in name, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryCreateFolderAsync(*reinterpret_cast(&parentFolderId), *reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCreateFolderAsync(*reinterpret_cast(&parentFolderId), *reinterpret_cast(&name))); return S_OK; } catch (...) @@ -2195,11 +2354,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryDeleteFolderAsync(abi_arg_in folderId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryDeleteFolderAsync(impl::abi_arg_in folderId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryDeleteFolderAsync(*reinterpret_cast(&folderId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryDeleteFolderAsync(*reinterpret_cast(&folderId))); return S_OK; } catch (...) @@ -2213,11 +2373,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_RegisterSyncManagerAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_RegisterSyncManagerAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().RegisterSyncManagerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterSyncManagerAsync()); return S_OK; } catch (...) @@ -2235,7 +2396,8 @@ struct produce : produ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -2248,7 +2410,8 @@ struct produce : produ { try { - *value = detach(this->shim().ChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeNumber()); return S_OK; } catch (...) @@ -2265,7 +2428,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2278,6 +2442,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return S_OK; } @@ -2287,11 +2452,12 @@ struct produce : pr } } - HRESULT __stdcall get_Response(abi_arg_out value) noexcept override + HRESULT __stdcall get_Response(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Response()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -2301,10 +2467,11 @@ struct produce : pr } } - HRESULT __stdcall put_Response(abi_arg_in value) noexcept override + HRESULT __stdcall put_Response(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Response(*reinterpret_cast(&value)); return S_OK; } @@ -2322,7 +2489,8 @@ struct produceshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2335,6 +2503,7 @@ struct produceshim()); this->shim().IsEnabled(value); return S_OK; } @@ -2348,7 +2517,8 @@ struct produceshim().ResponseKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseKind()); return S_OK; } catch (...) @@ -2361,6 +2531,7 @@ struct produceshim()); this->shim().ResponseKind(value); return S_OK; } @@ -2370,11 +2541,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -2384,10 +2556,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2397,11 +2570,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_EndTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EndTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndTime()); return S_OK; } catch (...) @@ -2411,10 +2585,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_EndTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EndTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2424,11 +2599,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_InternalReply(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InternalReply()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InternalReply()); return S_OK; } catch (...) @@ -2438,11 +2614,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KnownExternalReply(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KnownExternalReply()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KnownExternalReply()); return S_OK; } catch (...) @@ -2452,11 +2629,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UnknownExternalReply(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnknownExternalReply()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnknownExternalReply()); return S_OK; } catch (...) @@ -2474,7 +2652,8 @@ struct produce : { try { - *value = detach(this->shim().CanForwardMeetings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanForwardMeetings()); return S_OK; } catch (...) @@ -2487,7 +2666,8 @@ struct produce : { try { - *value = detach(this->shim().CanGetAndSetExternalAutoReplies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGetAndSetExternalAutoReplies()); return S_OK; } catch (...) @@ -2500,7 +2680,8 @@ struct produce : { try { - *value = detach(this->shim().CanGetAndSetInternalAutoReplies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGetAndSetInternalAutoReplies()); return S_OK; } catch (...) @@ -2513,7 +2694,8 @@ struct produce : { try { - *value = detach(this->shim().CanUpdateMeetingResponses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanUpdateMeetingResponses()); return S_OK; } catch (...) @@ -2526,7 +2708,8 @@ struct produce : { try { - *value = detach(this->shim().CanServerSearchFolders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanServerSearchFolders()); return S_OK; } catch (...) @@ -2539,7 +2722,8 @@ struct produce : { try { - *value = detach(this->shim().CanServerSearchMailbox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanServerSearchMailbox()); return S_OK; } catch (...) @@ -2552,7 +2736,8 @@ struct produce : { try { - *value = detach(this->shim().CanProposeNewTimeForMeetings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanProposeNewTimeForMeetings()); return S_OK; } catch (...) @@ -2565,7 +2750,8 @@ struct produce : { try { - *value = detach(this->shim().CanSmartSend()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSmartSend()); return S_OK; } catch (...) @@ -2582,7 +2768,8 @@ struct produce { try { - *value = detach(this->shim().CanResolveRecipients()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanResolveRecipients()); return S_OK; } catch (...) @@ -2595,7 +2782,8 @@ struct produce { try { - *value = detach(this->shim().CanValidateCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanValidateCertificates()); return S_OK; } catch (...) @@ -2608,7 +2796,8 @@ struct produce { try { - *value = detach(this->shim().CanEmptyFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanEmptyFolder()); return S_OK; } catch (...) @@ -2621,7 +2810,8 @@ struct produce { try { - *value = detach(this->shim().CanCreateFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanCreateFolder()); return S_OK; } catch (...) @@ -2634,7 +2824,8 @@ struct produce { try { - *value = detach(this->shim().CanDeleteFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanDeleteFolder()); return S_OK; } catch (...) @@ -2647,7 +2838,8 @@ struct produce { try { - *value = detach(this->shim().CanMoveFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMoveFolder()); return S_OK; } catch (...) @@ -2664,6 +2856,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanForwardMeetings(value); return S_OK; } @@ -2677,6 +2870,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanGetAndSetExternalAutoReplies(value); return S_OK; } @@ -2690,6 +2884,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanGetAndSetInternalAutoReplies(value); return S_OK; } @@ -2703,6 +2898,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanUpdateMeetingResponses(value); return S_OK; } @@ -2716,6 +2912,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanServerSearchFolders(value); return S_OK; } @@ -2729,6 +2926,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanServerSearchMailbox(value); return S_OK; } @@ -2742,6 +2940,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanProposeNewTimeForMeetings(value); return S_OK; } @@ -2755,6 +2954,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanSmartSend(value); return S_OK; } @@ -2768,6 +2968,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanResolveRecipients(value); return S_OK; } @@ -2781,6 +2982,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanValidateCertificates(value); return S_OK; } @@ -2794,6 +2996,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanEmptyFolder(value); return S_OK; } @@ -2807,6 +3010,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanCreateFolder(value); return S_OK; } @@ -2820,6 +3024,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanDeleteFolder(value); return S_OK; } @@ -2833,6 +3038,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CanMoveFolder(value); return S_OK; } @@ -2850,7 +3056,8 @@ struct produce : produ { try { - *value = detach(this->shim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -2859,11 +3066,12 @@ struct produce : produ } } - HRESULT __stdcall get_MailboxActions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MailboxActions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MailboxActions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailboxActions()); return S_OK; } catch (...) @@ -2873,11 +3081,12 @@ struct produce : produ } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -2887,11 +3096,12 @@ struct produce : produ } } - HRESULT __stdcall get_Folder(abi_arg_out value) noexcept override + HRESULT __stdcall get_Folder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Folder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Folder()); return S_OK; } catch (...) @@ -2909,6 +3119,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChanges(); return S_OK; } @@ -2918,10 +3129,11 @@ struct produce : } } - HRESULT __stdcall abi_AcceptChangesThrough(abi_arg_in lastChangeToAcknowledge) noexcept override + HRESULT __stdcall abi_AcceptChangesThrough(impl::abi_arg_in lastChangeToAcknowledge) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptChangesThrough(*reinterpret_cast(&lastChangeToAcknowledge)); return S_OK; } @@ -2931,11 +3143,12 @@ struct produce : } } - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -2953,7 +3166,8 @@ struct produce { try { - *value = detach(this->shim().IsTracking()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTracking()); return S_OK; } catch (...) @@ -2966,6 +3180,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Enable(); return S_OK; } @@ -2975,11 +3190,12 @@ struct produce } } - HRESULT __stdcall abi_GetChangeReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetChangeReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetChangeReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetChangeReader()); return S_OK; } catch (...) @@ -2993,6 +3209,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(); return S_OK; } @@ -3010,6 +3227,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -3023,11 +3241,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -3045,7 +3264,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -3054,11 +3274,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Folder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Folder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Folder()); return S_OK; } catch (...) @@ -3076,7 +3297,8 @@ struct produce : pro { try { - *value = detach(this->shim().AllowedSmimeEncryptionAlgorithmNegotiation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedSmimeEncryptionAlgorithmNegotiation()); return S_OK; } catch (...) @@ -3089,7 +3311,8 @@ struct produce : pro { try { - *value = detach(this->shim().AllowSmimeSoftCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowSmimeSoftCertificates()); return S_OK; } catch (...) @@ -3098,11 +3321,12 @@ struct produce : pro } } - HRESULT __stdcall get_RequiredSmimeEncryptionAlgorithm(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RequiredSmimeEncryptionAlgorithm(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequiredSmimeEncryptionAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiredSmimeEncryptionAlgorithm()); return S_OK; } catch (...) @@ -3112,11 +3336,12 @@ struct produce : pro } } - HRESULT __stdcall get_RequiredSmimeSigningAlgorithm(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RequiredSmimeSigningAlgorithm(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequiredSmimeSigningAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiredSmimeSigningAlgorithm()); return S_OK; } catch (...) @@ -3134,7 +3359,8 @@ struct produce : pr { try { - *value = detach(this->shim().MustEncryptSmimeMessages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MustEncryptSmimeMessages()); return S_OK; } catch (...) @@ -3147,7 +3373,8 @@ struct produce : pr { try { - *value = detach(this->shim().MustSignSmimeMessages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MustSignSmimeMessages()); return S_OK; } catch (...) @@ -3164,6 +3391,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowedSmimeEncryptionAlgorithmNegotiation(value); return S_OK; } @@ -3177,6 +3405,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowSmimeSoftCertificates(value); return S_OK; } @@ -3186,10 +3415,11 @@ struct produce : pr } } - HRESULT __stdcall put_RequiredSmimeEncryptionAlgorithm(abi_arg_in> value) noexcept override + HRESULT __stdcall put_RequiredSmimeEncryptionAlgorithm(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequiredSmimeEncryptionAlgorithm(*reinterpret_cast *>(&value)); return S_OK; } @@ -3199,10 +3429,11 @@ struct produce : pr } } - HRESULT __stdcall put_RequiredSmimeSigningAlgorithm(abi_arg_in> value) noexcept override + HRESULT __stdcall put_RequiredSmimeSigningAlgorithm(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequiredSmimeSigningAlgorithm(*reinterpret_cast *>(&value)); return S_OK; } @@ -3216,6 +3447,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().MustEncryptSmimeMessages(value); return S_OK; } @@ -3229,6 +3461,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().MustSignSmimeMessages(value); return S_OK; } @@ -3246,7 +3479,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -3255,11 +3489,12 @@ struct produce : } } - HRESULT __stdcall get_LastSuccessfulSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastSuccessfulSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastSuccessfulSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSuccessfulSyncTime()); return S_OK; } catch (...) @@ -3268,11 +3503,12 @@ struct produce : } } - HRESULT __stdcall get_LastAttemptedSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastAttemptedSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastAttemptedSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastAttemptedSyncTime()); return S_OK; } catch (...) @@ -3281,11 +3517,12 @@ struct produce : } } - HRESULT __stdcall abi_SyncAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SyncAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SyncAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SyncAsync()); return S_OK; } catch (...) @@ -3295,11 +3532,12 @@ struct produce : } } - HRESULT __stdcall add_SyncStatusChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SyncStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SyncStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3312,6 +3550,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SyncStatusChanged(token); return S_OK; } @@ -3329,6 +3568,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Status(value); return S_OK; } @@ -3338,10 +3578,11 @@ struct produce : } } - HRESULT __stdcall put_LastSuccessfulSyncTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastSuccessfulSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastSuccessfulSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -3351,10 +3592,11 @@ struct produce : } } - HRESULT __stdcall put_LastAttemptedSyncTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_LastAttemptedSyncTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastAttemptedSyncTime(*reinterpret_cast(&value)); return S_OK; } @@ -3368,11 +3610,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ShowComposeNewEmailAsync(abi_arg_in message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowComposeNewEmailAsync(impl::abi_arg_in message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowComposeNewEmailAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowComposeNewEmailAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -3382,11 +3625,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -3396,11 +3640,12 @@ struct produce : prod } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -3414,11 +3659,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_ShowComposeNewEmailAsync(abi_arg_in message, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_ShowComposeNewEmailAsync(impl::abi_arg_in message, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().ShowComposeNewEmailAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().ShowComposeNewEmailAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -3432,11 +3678,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(accessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(accessType)); return S_OK; } catch (...) @@ -3450,11 +3697,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -3472,7 +3720,8 @@ struct produce : produce { try { - *value = detach(this->shim().AllowNewTimeProposal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowNewTimeProposal()); return S_OK; } catch (...) @@ -3485,6 +3734,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowNewTimeProposal(value); return S_OK; } @@ -3494,11 +3744,12 @@ struct produce : produce } } - HRESULT __stdcall get_AppointmentRoamingId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppointmentRoamingId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppointmentRoamingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentRoamingId()); return S_OK; } catch (...) @@ -3508,10 +3759,11 @@ struct produce : produce } } - HRESULT __stdcall put_AppointmentRoamingId(abi_arg_in value) noexcept override + HRESULT __stdcall put_AppointmentRoamingId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppointmentRoamingId(*reinterpret_cast(&value)); return S_OK; } @@ -3521,11 +3773,12 @@ struct produce : produce } } - HRESULT __stdcall get_AppointmentOriginalStartTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AppointmentOriginalStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppointmentOriginalStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppointmentOriginalStartTime()); return S_OK; } catch (...) @@ -3535,10 +3788,11 @@ struct produce : produce } } - HRESULT __stdcall put_AppointmentOriginalStartTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_AppointmentOriginalStartTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppointmentOriginalStartTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -3548,11 +3802,12 @@ struct produce : produce } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -3561,10 +3816,11 @@ struct produce : produce } } - HRESULT __stdcall put_Duration(abi_arg_in value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -3578,7 +3834,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsAllDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAllDay()); return S_OK; } catch (...) @@ -3591,6 +3848,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsAllDay(value); return S_OK; } @@ -3604,7 +3862,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsResponseRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResponseRequested()); return S_OK; } catch (...) @@ -3617,6 +3876,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsResponseRequested(value); return S_OK; } @@ -3626,11 +3886,12 @@ struct produce : produce } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3640,10 +3901,11 @@ struct produce : produce } } - HRESULT __stdcall put_Location(abi_arg_in value) noexcept override + HRESULT __stdcall put_Location(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return S_OK; } @@ -3653,11 +3915,12 @@ struct produce : produce } } - HRESULT __stdcall get_ProposedStartTime(abi_arg_out> proposedStartTime) noexcept override + HRESULT __stdcall get_ProposedStartTime(impl::abi_arg_out> proposedStartTime) noexcept override { try { - *proposedStartTime = detach(this->shim().ProposedStartTime()); + typename D::abi_guard guard(this->shim()); + *proposedStartTime = detach_abi(this->shim().ProposedStartTime()); return S_OK; } catch (...) @@ -3667,10 +3930,11 @@ struct produce : produce } } - HRESULT __stdcall put_ProposedStartTime(abi_arg_in> proposedStartTime) noexcept override + HRESULT __stdcall put_ProposedStartTime(impl::abi_arg_in> proposedStartTime) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProposedStartTime(*reinterpret_cast *>(&proposedStartTime)); return S_OK; } @@ -3680,11 +3944,12 @@ struct produce : produce } } - HRESULT __stdcall get_ProposedDuration(abi_arg_out> duration) noexcept override + HRESULT __stdcall get_ProposedDuration(impl::abi_arg_out> duration) noexcept override { try { - *duration = detach(this->shim().ProposedDuration()); + typename D::abi_guard guard(this->shim()); + *duration = detach_abi(this->shim().ProposedDuration()); return S_OK; } catch (...) @@ -3694,10 +3959,11 @@ struct produce : produce } } - HRESULT __stdcall put_ProposedDuration(abi_arg_in> duration) noexcept override + HRESULT __stdcall put_ProposedDuration(impl::abi_arg_in> duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProposedDuration(*reinterpret_cast *>(&duration)); return S_OK; } @@ -3707,11 +3973,12 @@ struct produce : produce } } - HRESULT __stdcall get_RecurrenceStartTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RecurrenceStartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RecurrenceStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecurrenceStartTime()); return S_OK; } catch (...) @@ -3721,10 +3988,11 @@ struct produce : produce } } - HRESULT __stdcall put_RecurrenceStartTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_RecurrenceStartTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RecurrenceStartTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -3734,11 +4002,12 @@ struct produce : produce } } - HRESULT __stdcall get_Recurrence(abi_arg_out value) noexcept override + HRESULT __stdcall get_Recurrence(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Recurrence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recurrence()); return S_OK; } catch (...) @@ -3748,10 +4017,11 @@ struct produce : produce } } - HRESULT __stdcall put_Recurrence(abi_arg_in value) noexcept override + HRESULT __stdcall put_Recurrence(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Recurrence(*reinterpret_cast(&value)); return S_OK; } @@ -3765,7 +4035,8 @@ struct produce : produce { try { - *value = detach(this->shim().RemoteChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteChangeNumber()); return S_OK; } catch (...) @@ -3778,6 +4049,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteChangeNumber(value); return S_OK; } @@ -3787,11 +4059,12 @@ struct produce : produce } } - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -3800,10 +4073,11 @@ struct produce : produce } } - HRESULT __stdcall put_StartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -3821,7 +4095,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsReportedOutOfDateByServer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReportedOutOfDateByServer()); return S_OK; } catch (...) @@ -3834,11 +4109,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -3848,10 +4124,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Subject(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subject(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subject(*reinterpret_cast(&value)); return S_OK; } @@ -3861,11 +4138,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Body(abi_arg_out value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -3875,10 +4153,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Body(abi_arg_in value) noexcept override + HRESULT __stdcall put_Body(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Body(*reinterpret_cast(&value)); return S_OK; } @@ -3888,11 +4167,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_To(abi_arg_out> value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -3902,11 +4182,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_CC(abi_arg_out> value) noexcept override + HRESULT __stdcall get_CC(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CC()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CC()); return S_OK; } catch (...) @@ -3916,11 +4197,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Bcc(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Bcc(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Bcc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bcc()); return S_OK; } catch (...) @@ -3930,11 +4212,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Attachments(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Attachments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Attachments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Attachments()); return S_OK; } catch (...) @@ -3948,11 +4231,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -3962,11 +4246,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -3976,10 +4261,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -3989,11 +4275,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MailboxId(abi_arg_out value) noexcept override + HRESULT __stdcall get_MailboxId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MailboxId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailboxId()); return S_OK; } catch (...) @@ -4003,11 +4290,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ConversationId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConversationId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConversationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConversationId()); return S_OK; } catch (...) @@ -4017,11 +4305,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_FolderId(abi_arg_out value) noexcept override + HRESULT __stdcall get_FolderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FolderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FolderId()); return S_OK; } catch (...) @@ -4035,7 +4324,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AllowInternetImages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowInternetImages()); return S_OK; } catch (...) @@ -4048,6 +4338,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowInternetImages(value); return S_OK; } @@ -4061,7 +4352,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ChangeNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeNumber()); return S_OK; } catch (...) @@ -4074,7 +4366,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().DownloadState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadState()); return S_OK; } catch (...) @@ -4087,6 +4380,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadState(value); return S_OK; } @@ -4100,7 +4394,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().EstimatedDownloadSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EstimatedDownloadSizeInBytes()); return S_OK; } catch (...) @@ -4113,6 +4408,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().EstimatedDownloadSizeInBytes(value); return S_OK; } @@ -4126,7 +4422,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().FlagState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlagState()); return S_OK; } catch (...) @@ -4139,6 +4436,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().FlagState(value); return S_OK; } @@ -4152,7 +4450,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().HasPartialBodies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasPartialBodies()); return S_OK; } catch (...) @@ -4165,7 +4464,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Importance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Importance()); return S_OK; } catch (...) @@ -4178,6 +4478,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Importance(value); return S_OK; } @@ -4187,11 +4488,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_InResponseToMessageId(abi_arg_out value) noexcept override + HRESULT __stdcall get_InResponseToMessageId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InResponseToMessageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InResponseToMessageId()); return S_OK; } catch (...) @@ -4201,11 +4503,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_IrmInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_IrmInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IrmInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IrmInfo()); return S_OK; } catch (...) @@ -4215,10 +4518,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_IrmInfo(abi_arg_in value) noexcept override + HRESULT __stdcall put_IrmInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IrmInfo(*reinterpret_cast(&value)); return S_OK; } @@ -4232,7 +4536,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsDraftMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDraftMessage()); return S_OK; } catch (...) @@ -4245,7 +4550,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsRead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRead()); return S_OK; } catch (...) @@ -4258,6 +4564,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRead(value); return S_OK; } @@ -4271,7 +4578,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsSeen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeen()); return S_OK; } catch (...) @@ -4284,6 +4592,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSeen(value); return S_OK; } @@ -4297,7 +4606,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsServerSearchMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsServerSearchMessage()); return S_OK; } catch (...) @@ -4310,7 +4620,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsSmartSendable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSmartSendable()); return S_OK; } catch (...) @@ -4319,11 +4630,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MessageClass(abi_arg_out value) noexcept override + HRESULT __stdcall get_MessageClass(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageClass()); return S_OK; } catch (...) @@ -4333,10 +4645,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_MessageClass(abi_arg_in value) noexcept override + HRESULT __stdcall put_MessageClass(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageClass(*reinterpret_cast(&value)); return S_OK; } @@ -4346,11 +4659,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_NormalizedSubject(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalizedSubject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedSubject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedSubject()); return S_OK; } catch (...) @@ -4364,7 +4678,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().OriginalCodePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalCodePage()); return S_OK; } catch (...) @@ -4377,6 +4692,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().OriginalCodePage(value); return S_OK; } @@ -4386,11 +4702,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Preview(abi_arg_out value) noexcept override + HRESULT __stdcall get_Preview(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Preview()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Preview()); return S_OK; } catch (...) @@ -4400,10 +4717,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Preview(abi_arg_in value) noexcept override + HRESULT __stdcall put_Preview(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Preview(*reinterpret_cast(&value)); return S_OK; } @@ -4417,7 +4735,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().LastResponseKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastResponseKind()); return S_OK; } catch (...) @@ -4430,6 +4749,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().LastResponseKind(value); return S_OK; } @@ -4439,11 +4759,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Sender(abi_arg_out value) noexcept override + HRESULT __stdcall get_Sender(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sender()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sender()); return S_OK; } catch (...) @@ -4453,10 +4774,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Sender(abi_arg_in value) noexcept override + HRESULT __stdcall put_Sender(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Sender(*reinterpret_cast(&value)); return S_OK; } @@ -4466,11 +4788,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_SentTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SentTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SentTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SentTime()); return S_OK; } catch (...) @@ -4480,10 +4803,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_SentTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_SentTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SentTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -4493,11 +4817,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MeetingInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_MeetingInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MeetingInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MeetingInfo()); return S_OK; } catch (...) @@ -4507,10 +4832,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_MeetingInfo(abi_arg_in value) noexcept override + HRESULT __stdcall put_MeetingInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MeetingInfo(*reinterpret_cast(&value)); return S_OK; } @@ -4520,11 +4846,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetBodyStream(type)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetBodyStream(type)); return S_OK; } catch (...) @@ -4534,10 +4861,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type, abi_arg_in stream) noexcept override + HRESULT __stdcall abi_SetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type, impl::abi_arg_in stream) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBodyStream(type, *reinterpret_cast(&stream)); return S_OK; } @@ -4551,11 +4879,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_SmimeData(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmimeData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmimeData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmimeData()); return S_OK; } catch (...) @@ -4565,10 +4894,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_SmimeData(abi_arg_in value) noexcept override + HRESULT __stdcall put_SmimeData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SmimeData(*reinterpret_cast(&value)); return S_OK; } @@ -4582,7 +4912,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().SmimeKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmimeKind()); return S_OK; } catch (...) @@ -4595,6 +4926,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().SmimeKind(value); return S_OK; } @@ -4608,11 +4940,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Messages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Messages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Messages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Messages()); return S_OK; } catch (...) @@ -4626,7 +4959,8 @@ struct produce : produc { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -4639,11 +4973,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -4657,11 +4992,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_TextSearch(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextSearch(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextSearch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextSearch()); return S_OK; } catch (...) @@ -4675,7 +5011,8 @@ struct produce : produc { try { - *value = detach(this->shim().SortDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SortDirection()); return S_OK; } catch (...) @@ -4688,6 +5025,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SortDirection(value); return S_OK; } @@ -4701,7 +5039,8 @@ struct produce : produc { try { - *value = detach(this->shim().SortProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SortProperty()); return S_OK; } catch (...) @@ -4714,6 +5053,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SortProperty(value); return S_OK; } @@ -4727,7 +5067,8 @@ struct produce : produc { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -4740,6 +5081,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Kind(value); return S_OK; } @@ -4749,11 +5091,12 @@ struct produce : produc } } - HRESULT __stdcall get_FolderIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FolderIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FolderIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FolderIds()); return S_OK; } catch (...) @@ -4767,11 +5110,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithText(abi_arg_in text, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithText(impl::abi_arg_in text, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithText(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithText(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -4781,11 +5125,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithTextAndFields(abi_arg_in text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithTextAndFields(impl::abi_arg_in text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithTextAndFields(*reinterpret_cast(&text), fields)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithTextAndFields(*reinterpret_cast(&text), fields)); return S_OK; } catch (...) @@ -4803,7 +5148,8 @@ struct produce : pro { try { - *value = detach(this->shim().Fields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fields()); return S_OK; } catch (...) @@ -4816,6 +5162,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Fields(value); return S_OK; } @@ -4829,7 +5176,8 @@ struct produce : pro { try { - *value = detach(this->shim().SearchScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchScope()); return S_OK; } catch (...) @@ -4842,6 +5190,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchScope(value); return S_OK; } @@ -4851,11 +5200,12 @@ struct produce : pro } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -4865,10 +5215,11 @@ struct produce : pro } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -4882,11 +5233,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -4896,10 +5248,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -4909,11 +5262,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Address(abi_arg_out value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -4923,10 +5277,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Address(abi_arg_in value) noexcept override + HRESULT __stdcall put_Address(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Address(*reinterpret_cast(&value)); return S_OK; } @@ -4940,11 +5295,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in address, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in address, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&address))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&address))); return S_OK; } catch (...) @@ -4954,11 +5310,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateWithName(abi_arg_in address, abi_arg_in name, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithName(impl::abi_arg_in address, impl::abi_arg_in name, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithName(*reinterpret_cast(&address), *reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithName(*reinterpret_cast(&address), *reinterpret_cast(&name))); return S_OK; } catch (...) @@ -4976,7 +5333,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -4985,11 +5343,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PublicKeys(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PublicKeys()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicKeys()); return S_OK; } catch (...) @@ -5007,6 +5366,7 @@ struct produceshim()); this->shim().Status(value); return S_OK; } @@ -5016,10 +5376,11 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_SetPublicKeys(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPublicKeys(*reinterpret_cast *>(&value)); return S_OK; } @@ -5033,11 +5394,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindMailboxesAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindMailboxesAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindMailboxesAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindMailboxesAsync()); return S_OK; } catch (...) @@ -5047,11 +5409,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetConversationReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader()); return S_OK; } catch (...) @@ -5061,11 +5424,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetConversationReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConversationReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConversationReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -5075,11 +5439,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMessageReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader()); return S_OK; } catch (...) @@ -5089,11 +5454,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMessageReaderWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetMessageReaderWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetMessageReader(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageReader(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -5103,11 +5469,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMailboxAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMailboxAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMailboxAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMailboxAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -5117,11 +5484,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetConversationAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetConversationAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetConversationAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConversationAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -5131,11 +5499,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetFolderAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetFolderAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetFolderAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetFolderAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -5145,11 +5514,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMessageAsync(abi_arg_in id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetMessageAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetMessageAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMessageAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -5159,11 +5529,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateMailboxAsync(abi_arg_in accountName, abi_arg_in accountAddress, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateMailboxAsync(impl::abi_arg_in accountName, impl::abi_arg_in accountAddress, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateMailboxAsync(*reinterpret_cast(&accountName), *reinterpret_cast(&accountAddress))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateMailboxAsync(*reinterpret_cast(&accountName), *reinterpret_cast(&accountAddress))); return S_OK; } catch (...) @@ -5173,11 +5544,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateMailboxInAccountAsync(abi_arg_in accountName, abi_arg_in accountAddress, abi_arg_in userDataAccountId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateMailboxInAccountAsync(impl::abi_arg_in accountName, impl::abi_arg_in accountAddress, impl::abi_arg_in userDataAccountId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateMailboxAsync(*reinterpret_cast(&accountName), *reinterpret_cast(&accountAddress), *reinterpret_cast(&userDataAccountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateMailboxAsync(*reinterpret_cast(&accountName), *reinterpret_cast(&accountAddress), *reinterpret_cast(&userDataAccountId))); return S_OK; } catch (...) @@ -5199,1398 +5571,1398 @@ namespace Windows::ApplicationModel::Email { template Windows::Foundation::IAsyncAction impl_IEmailManagerStatics::ShowComposeNewEmailAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_ShowComposeNewEmailAsync(get(message), put(asyncAction))); + check_hresult(WINRT_SHIM(IEmailManagerStatics)->abi_ShowComposeNewEmailAsync(get_abi(message), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_IEmailManagerStatics2::RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IEmailManagerStatics2)->abi_RequestStoreAsync(accessType, put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailManagerForUser impl_IEmailManagerStatics3::GetForUser(const Windows::System::User & user) const { Windows::ApplicationModel::Email::EmailManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IEmailManagerStatics3)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailManagerForUser::ShowComposeNewEmailAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowComposeNewEmailAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IEmailManagerForUser)->abi_ShowComposeNewEmailAsync(get_abi(message), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailManagerForUser::RequestStoreAsync(Windows::ApplicationModel::Email::EmailStoreAccessType accessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(accessType, put(result))); + check_hresult(WINRT_SHIM(IEmailManagerForUser)->abi_RequestStoreAsync(accessType, put_abi(result))); return result; } template Windows::System::User impl_IEmailManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IEmailManagerForUser)->get_User(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IEmailStore::FindMailboxesAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindMailboxesAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_FindMailboxesAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailStore::GetConversationReader() const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReader(put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetConversationReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailStore::GetConversationReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetConversationReaderWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailStore::GetMessageReader() const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader(put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetMessageReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailStore::GetMessageReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetMessageReaderWithOptions(get_abi(options), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetMailboxAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetMailboxAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMailboxAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetMailboxAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetConversationAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetConversationAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetConversationAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetFolderAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetFolderAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetFolderAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetMessageAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::GetMessageAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_GetMessageAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::CreateMailboxAsync(hstring_ref accountName, hstring_ref accountAddress) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::CreateMailboxAsync(hstring_view accountName, hstring_view accountAddress) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateMailboxAsync(get(accountName), get(accountAddress), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_CreateMailboxAsync(get_abi(accountName), get_abi(accountAddress), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailStore::CreateMailboxAsync(hstring_ref accountName, hstring_ref accountAddress, hstring_ref userDataAccountId) const +template Windows::Foundation::IAsyncOperation impl_IEmailStore::CreateMailboxAsync(hstring_view accountName, hstring_view accountAddress, hstring_view userDataAccountId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateMailboxInAccountAsync(get(accountName), get(accountAddress), get(userDataAccountId), put(result))); + check_hresult(WINRT_SHIM(IEmailStore)->abi_CreateMailboxInAccountAsync(get_abi(accountName), get_abi(accountAddress), get_abi(userDataAccountId), put_abi(result))); return result; } template hstring impl_IEmailRecipient::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IEmailRecipient)->get_Name(put_abi(value))); return value; } -template void impl_IEmailRecipient::Name(hstring_ref value) const +template void impl_IEmailRecipient::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IEmailRecipient)->put_Name(get_abi(value))); } template hstring impl_IEmailRecipient::Address() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IEmailRecipient)->get_Address(put_abi(value))); return value; } -template void impl_IEmailRecipient::Address(hstring_ref value) const +template void impl_IEmailRecipient::Address(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Address(get(value))); + check_hresult(WINRT_SHIM(IEmailRecipient)->put_Address(get_abi(value))); } -template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailRecipientFactory::Create(hstring_ref address) const +template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailRecipientFactory::Create(hstring_view address) const { Windows::ApplicationModel::Email::EmailRecipient result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(address), put(result))); + check_hresult(WINRT_SHIM(IEmailRecipientFactory)->abi_Create(get_abi(address), put_abi(result))); return result; } -template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailRecipientFactory::CreateWithName(hstring_ref address, hstring_ref name) const +template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailRecipientFactory::CreateWithName(hstring_view address, hstring_view name) const { Windows::ApplicationModel::Email::EmailRecipient result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithName(get(address), get(name), put(result))); + check_hresult(WINRT_SHIM(IEmailRecipientFactory)->abi_CreateWithName(get_abi(address), get_abi(name), put_abi(result))); return result; } template hstring impl_IEmailIrmTemplate::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->get_Id(put_abi(value))); return value; } -template void impl_IEmailIrmTemplate::Id(hstring_ref value) const +template void impl_IEmailIrmTemplate::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->put_Id(get_abi(value))); } template hstring impl_IEmailIrmTemplate::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->get_Description(put_abi(value))); return value; } -template void impl_IEmailIrmTemplate::Description(hstring_ref value) const +template void impl_IEmailIrmTemplate::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->put_Description(get_abi(value))); } template hstring impl_IEmailIrmTemplate::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->get_Name(put_abi(value))); return value; } -template void impl_IEmailIrmTemplate::Name(hstring_ref value) const +template void impl_IEmailIrmTemplate::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IEmailIrmTemplate)->put_Name(get_abi(value))); } -template Windows::ApplicationModel::Email::EmailIrmTemplate impl_IEmailIrmTemplateFactory::Create(hstring_ref id, hstring_ref name, hstring_ref description) const +template Windows::ApplicationModel::Email::EmailIrmTemplate impl_IEmailIrmTemplateFactory::Create(hstring_view id, hstring_view name, hstring_view description) const { Windows::ApplicationModel::Email::EmailIrmTemplate result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(id), get(name), get(description), put(result))); + check_hresult(WINRT_SHIM(IEmailIrmTemplateFactory)->abi_Create(get_abi(id), get_abi(name), get_abi(description), put_abi(result))); return result; } template bool impl_IEmailIrmInfo::CanEdit() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanEdit(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanEdit(&value)); return value; } template void impl_IEmailIrmInfo::CanEdit(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanEdit(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanEdit(value)); } template bool impl_IEmailIrmInfo::CanExtractData() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanExtractData(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanExtractData(&value)); return value; } template void impl_IEmailIrmInfo::CanExtractData(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanExtractData(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanExtractData(value)); } template bool impl_IEmailIrmInfo::CanForward() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanForward(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanForward(&value)); return value; } template void impl_IEmailIrmInfo::CanForward(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanForward(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanForward(value)); } template bool impl_IEmailIrmInfo::CanModifyRecipientsOnResponse() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanModifyRecipientsOnResponse(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanModifyRecipientsOnResponse(&value)); return value; } template void impl_IEmailIrmInfo::CanModifyRecipientsOnResponse(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanModifyRecipientsOnResponse(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanModifyRecipientsOnResponse(value)); } template bool impl_IEmailIrmInfo::CanPrintData() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPrintData(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanPrintData(&value)); return value; } template void impl_IEmailIrmInfo::CanPrintData(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanPrintData(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanPrintData(value)); } template bool impl_IEmailIrmInfo::CanRemoveIrmOnResponse() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanRemoveIrmOnResponse(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanRemoveIrmOnResponse(&value)); return value; } template void impl_IEmailIrmInfo::CanRemoveIrmOnResponse(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanRemoveIrmOnResponse(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanRemoveIrmOnResponse(value)); } template bool impl_IEmailIrmInfo::CanReply() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanReply(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanReply(&value)); return value; } template void impl_IEmailIrmInfo::CanReply(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanReply(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanReply(value)); } template bool impl_IEmailIrmInfo::CanReplyAll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanReplyAll(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_CanReplyAll(&value)); return value; } template void impl_IEmailIrmInfo::CanReplyAll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanReplyAll(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_CanReplyAll(value)); } template Windows::Foundation::DateTime impl_IEmailIrmInfo::ExpirationDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_ExpirationDate(put_abi(value))); return value; } template void impl_IEmailIrmInfo::ExpirationDate(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationDate(get(value))); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_ExpirationDate(get_abi(value))); } template bool impl_IEmailIrmInfo::IsIrmOriginator() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIrmOriginator(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_IsIrmOriginator(&value)); return value; } template void impl_IEmailIrmInfo::IsIrmOriginator(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIrmOriginator(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_IsIrmOriginator(value)); } template bool impl_IEmailIrmInfo::IsProgramaticAccessAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsProgramaticAccessAllowed(&value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_IsProgramaticAccessAllowed(&value)); return value; } template void impl_IEmailIrmInfo::IsProgramaticAccessAllowed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsProgramaticAccessAllowed(value)); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_IsProgramaticAccessAllowed(value)); } template Windows::ApplicationModel::Email::EmailIrmTemplate impl_IEmailIrmInfo::Template() const { Windows::ApplicationModel::Email::EmailIrmTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Template(put(value))); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->get_Template(put_abi(value))); return value; } template void impl_IEmailIrmInfo::Template(const Windows::ApplicationModel::Email::EmailIrmTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_Template(get(value))); + check_hresult(WINRT_SHIM(IEmailIrmInfo)->put_Template(get_abi(value))); } template Windows::ApplicationModel::Email::EmailIrmInfo impl_IEmailIrmInfoFactory::Create(const Windows::Foundation::DateTime & expiration, const Windows::ApplicationModel::Email::EmailIrmTemplate & irmTemplate) const { Windows::ApplicationModel::Email::EmailIrmInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(expiration), get(irmTemplate), put(result))); + check_hresult(WINRT_SHIM(IEmailIrmInfoFactory)->abi_Create(get_abi(expiration), get_abi(irmTemplate), put_abi(result))); return result; } template hstring impl_IEmailMessage::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_Subject(put_abi(value))); return value; } -template void impl_IEmailMessage::Subject(hstring_ref value) const +template void impl_IEmailMessage::Subject(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subject(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->put_Subject(get_abi(value))); } template hstring impl_IEmailMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_Body(put_abi(value))); return value; } -template void impl_IEmailMessage::Body(hstring_ref value) const +template void impl_IEmailMessage::Body(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Body(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->put_Body(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IEmailMessage::To() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_To(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IEmailMessage::CC() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_CC(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_CC(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IEmailMessage::Bcc() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Bcc(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_Bcc(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IEmailMessage::Attachments() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Attachments(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage)->get_Attachments(put_abi(value))); return value; } template hstring impl_IEmailMessage2::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_Id(put_abi(value))); return value; } template hstring impl_IEmailMessage2::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_RemoteId(put_abi(value))); return value; } -template void impl_IEmailMessage2::RemoteId(hstring_ref value) const +template void impl_IEmailMessage2::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_RemoteId(get_abi(value))); } template hstring impl_IEmailMessage2::MailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_MailboxId(put_abi(value))); return value; } template hstring impl_IEmailMessage2::ConversationId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ConversationId(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_ConversationId(put_abi(value))); return value; } template hstring impl_IEmailMessage2::FolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_FolderId(put_abi(value))); return value; } template bool impl_IEmailMessage2::AllowInternetImages() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowInternetImages(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_AllowInternetImages(&value)); return value; } template void impl_IEmailMessage2::AllowInternetImages(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowInternetImages(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_AllowInternetImages(value)); } template uint64_t impl_IEmailMessage2::ChangeNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeNumber(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_ChangeNumber(&value)); return value; } template Windows::ApplicationModel::Email::EmailMessageDownloadState impl_IEmailMessage2::DownloadState() const { Windows::ApplicationModel::Email::EmailMessageDownloadState value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadState(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_DownloadState(&value)); return value; } template void impl_IEmailMessage2::DownloadState(Windows::ApplicationModel::Email::EmailMessageDownloadState value) const { - check_hresult(static_cast(static_cast(*this))->put_DownloadState(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_DownloadState(value)); } template uint32_t impl_IEmailMessage2::EstimatedDownloadSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EstimatedDownloadSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_EstimatedDownloadSizeInBytes(&value)); return value; } template void impl_IEmailMessage2::EstimatedDownloadSizeInBytes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_EstimatedDownloadSizeInBytes(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_EstimatedDownloadSizeInBytes(value)); } template Windows::ApplicationModel::Email::EmailFlagState impl_IEmailMessage2::FlagState() const { Windows::ApplicationModel::Email::EmailFlagState value {}; - check_hresult(static_cast(static_cast(*this))->get_FlagState(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_FlagState(&value)); return value; } template void impl_IEmailMessage2::FlagState(Windows::ApplicationModel::Email::EmailFlagState value) const { - check_hresult(static_cast(static_cast(*this))->put_FlagState(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_FlagState(value)); } template bool impl_IEmailMessage2::HasPartialBodies() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasPartialBodies(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_HasPartialBodies(&value)); return value; } template Windows::ApplicationModel::Email::EmailImportance impl_IEmailMessage2::Importance() const { Windows::ApplicationModel::Email::EmailImportance value {}; - check_hresult(static_cast(static_cast(*this))->get_Importance(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_Importance(&value)); return value; } template void impl_IEmailMessage2::Importance(Windows::ApplicationModel::Email::EmailImportance value) const { - check_hresult(static_cast(static_cast(*this))->put_Importance(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_Importance(value)); } template hstring impl_IEmailMessage2::InResponseToMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InResponseToMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_InResponseToMessageId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailIrmInfo impl_IEmailMessage2::IrmInfo() const { Windows::ApplicationModel::Email::EmailIrmInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IrmInfo(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IrmInfo(put_abi(value))); return value; } template void impl_IEmailMessage2::IrmInfo(const Windows::ApplicationModel::Email::EmailIrmInfo & value) const { - check_hresult(static_cast(static_cast(*this))->put_IrmInfo(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_IrmInfo(get_abi(value))); } template bool impl_IEmailMessage2::IsDraftMessage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDraftMessage(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IsDraftMessage(&value)); return value; } template bool impl_IEmailMessage2::IsRead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRead(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IsRead(&value)); return value; } template void impl_IEmailMessage2::IsRead(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRead(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_IsRead(value)); } template bool impl_IEmailMessage2::IsSeen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSeen(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IsSeen(&value)); return value; } template void impl_IEmailMessage2::IsSeen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSeen(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_IsSeen(value)); } template bool impl_IEmailMessage2::IsServerSearchMessage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsServerSearchMessage(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IsServerSearchMessage(&value)); return value; } template bool impl_IEmailMessage2::IsSmartSendable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSmartSendable(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_IsSmartSendable(&value)); return value; } template hstring impl_IEmailMessage2::MessageClass() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MessageClass(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_MessageClass(put_abi(value))); return value; } -template void impl_IEmailMessage2::MessageClass(hstring_ref value) const +template void impl_IEmailMessage2::MessageClass(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MessageClass(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_MessageClass(get_abi(value))); } template hstring impl_IEmailMessage2::NormalizedSubject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NormalizedSubject(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_NormalizedSubject(put_abi(value))); return value; } template int32_t impl_IEmailMessage2::OriginalCodePage() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OriginalCodePage(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_OriginalCodePage(&value)); return value; } template void impl_IEmailMessage2::OriginalCodePage(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OriginalCodePage(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_OriginalCodePage(value)); } template hstring impl_IEmailMessage2::Preview() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Preview(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_Preview(put_abi(value))); return value; } -template void impl_IEmailMessage2::Preview(hstring_ref value) const +template void impl_IEmailMessage2::Preview(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Preview(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_Preview(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMessageResponseKind impl_IEmailMessage2::LastResponseKind() const { Windows::ApplicationModel::Email::EmailMessageResponseKind value {}; - check_hresult(static_cast(static_cast(*this))->get_LastResponseKind(&value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_LastResponseKind(&value)); return value; } template void impl_IEmailMessage2::LastResponseKind(Windows::ApplicationModel::Email::EmailMessageResponseKind value) const { - check_hresult(static_cast(static_cast(*this))->put_LastResponseKind(value)); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_LastResponseKind(value)); } template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailMessage2::Sender() const { Windows::ApplicationModel::Email::EmailRecipient value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Sender(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_Sender(put_abi(value))); return value; } template void impl_IEmailMessage2::Sender(const Windows::ApplicationModel::Email::EmailRecipient & value) const { - check_hresult(static_cast(static_cast(*this))->put_Sender(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_Sender(get_abi(value))); } template Windows::Foundation::IReference impl_IEmailMessage2::SentTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SentTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_SentTime(put_abi(value))); return value; } -template void impl_IEmailMessage2::SentTime(const Windows::Foundation::IReference & value) const +template void impl_IEmailMessage2::SentTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_SentTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_SentTime(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMeetingInfo impl_IEmailMessage2::MeetingInfo() const { Windows::ApplicationModel::Email::EmailMeetingInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MeetingInfo(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->get_MeetingInfo(put_abi(value))); return value; } template void impl_IEmailMessage2::MeetingInfo(const Windows::ApplicationModel::Email::EmailMeetingInfo & value) const { - check_hresult(static_cast(static_cast(*this))->put_MeetingInfo(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage2)->put_MeetingInfo(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IEmailMessage2::GetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type) const { Windows::Storage::Streams::IRandomAccessStreamReference result; - check_hresult(static_cast(static_cast(*this))->abi_GetBodyStream(type, put(result))); + check_hresult(WINRT_SHIM(IEmailMessage2)->abi_GetBodyStream(type, put_abi(result))); return result; } template void impl_IEmailMessage2::SetBodyStream(Windows::ApplicationModel::Email::EmailMessageBodyKind type, const Windows::Storage::Streams::IRandomAccessStreamReference & stream) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBodyStream(type, get(stream))); + check_hresult(WINRT_SHIM(IEmailMessage2)->abi_SetBodyStream(type, get_abi(stream))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IEmailMessage3::SmimeData() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_SmimeData(put(value))); + check_hresult(WINRT_SHIM(IEmailMessage3)->get_SmimeData(put_abi(value))); return value; } template void impl_IEmailMessage3::SmimeData(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_SmimeData(get(value))); + check_hresult(WINRT_SHIM(IEmailMessage3)->put_SmimeData(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMessageSmimeKind impl_IEmailMessage3::SmimeKind() const { Windows::ApplicationModel::Email::EmailMessageSmimeKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SmimeKind(&value)); + check_hresult(WINRT_SHIM(IEmailMessage3)->get_SmimeKind(&value)); return value; } template void impl_IEmailMessage3::SmimeKind(Windows::ApplicationModel::Email::EmailMessageSmimeKind value) const { - check_hresult(static_cast(static_cast(*this))->put_SmimeKind(value)); + check_hresult(WINRT_SHIM(IEmailMessage3)->put_SmimeKind(value)); } template hstring impl_IEmailAttachment::FileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FileName(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment)->get_FileName(put_abi(value))); return value; } -template void impl_IEmailAttachment::FileName(hstring_ref value) const +template void impl_IEmailAttachment::FileName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FileName(get(value))); + check_hresult(WINRT_SHIM(IEmailAttachment)->put_FileName(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IEmailAttachment::Data() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment)->get_Data(put_abi(value))); return value; } template void impl_IEmailAttachment::Data(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IEmailAttachment)->put_Data(get_abi(value))); } template hstring impl_IEmailAttachment2::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_Id(put_abi(value))); return value; } template hstring impl_IEmailAttachment2::ContentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentId(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_ContentId(put_abi(value))); return value; } -template void impl_IEmailAttachment2::ContentId(hstring_ref value) const +template void impl_IEmailAttachment2::ContentId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentId(get(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_ContentId(get_abi(value))); } template hstring impl_IEmailAttachment2::ContentLocation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentLocation(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_ContentLocation(put_abi(value))); return value; } -template void impl_IEmailAttachment2::ContentLocation(hstring_ref value) const +template void impl_IEmailAttachment2::ContentLocation(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentLocation(get(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_ContentLocation(get_abi(value))); } template Windows::ApplicationModel::Email::EmailAttachmentDownloadState impl_IEmailAttachment2::DownloadState() const { Windows::ApplicationModel::Email::EmailAttachmentDownloadState value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadState(&value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_DownloadState(&value)); return value; } template void impl_IEmailAttachment2::DownloadState(Windows::ApplicationModel::Email::EmailAttachmentDownloadState value) const { - check_hresult(static_cast(static_cast(*this))->put_DownloadState(value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_DownloadState(value)); } template uint64_t impl_IEmailAttachment2::EstimatedDownloadSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EstimatedDownloadSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_EstimatedDownloadSizeInBytes(&value)); return value; } template void impl_IEmailAttachment2::EstimatedDownloadSizeInBytes(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_EstimatedDownloadSizeInBytes(value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_EstimatedDownloadSizeInBytes(value)); } template bool impl_IEmailAttachment2::IsFromBaseMessage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFromBaseMessage(&value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_IsFromBaseMessage(&value)); return value; } template bool impl_IEmailAttachment2::IsInline() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInline(&value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_IsInline(&value)); return value; } template void impl_IEmailAttachment2::IsInline(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInline(value)); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_IsInline(value)); } template hstring impl_IEmailAttachment2::MimeType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MimeType(put(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->get_MimeType(put_abi(value))); return value; } -template void impl_IEmailAttachment2::MimeType(hstring_ref value) const +template void impl_IEmailAttachment2::MimeType(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MimeType(get(value))); + check_hresult(WINRT_SHIM(IEmailAttachment2)->put_MimeType(get_abi(value))); } -template Windows::ApplicationModel::Email::EmailAttachment impl_IEmailAttachmentFactory::Create(hstring_ref fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data) const +template Windows::ApplicationModel::Email::EmailAttachment impl_IEmailAttachmentFactory::Create(hstring_view fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data) const { Windows::ApplicationModel::Email::EmailAttachment result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(fileName), get(data), put(result))); + check_hresult(WINRT_SHIM(IEmailAttachmentFactory)->abi_Create(get_abi(fileName), get_abi(data), put_abi(result))); return result; } -template Windows::ApplicationModel::Email::EmailAttachment impl_IEmailAttachmentFactory2::Create(hstring_ref fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data, hstring_ref mimeType) const +template Windows::ApplicationModel::Email::EmailAttachment impl_IEmailAttachmentFactory2::Create(hstring_view fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data, hstring_view mimeType) const { Windows::ApplicationModel::Email::EmailAttachment result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(fileName), get(data), get(mimeType), put(result))); + check_hresult(WINRT_SHIM(IEmailAttachmentFactory2)->abi_Create(get_abi(fileName), get_abi(data), get_abi(mimeType), put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMailboxChangedDeferral impl_IEmailMailboxChangedEventArgs::GetDeferral() const { Windows::ApplicationModel::Email::EmailMailboxChangedDeferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxChangedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template void impl_IEmailMailboxChangedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IEmailMailboxChangedDeferral)->abi_Complete()); } template Windows::ApplicationModel::Email::EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation impl_IEmailMailboxPolicies::AllowedSmimeEncryptionAlgorithmNegotiation() const { Windows::ApplicationModel::Email::EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowedSmimeEncryptionAlgorithmNegotiation(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies)->get_AllowedSmimeEncryptionAlgorithmNegotiation(&value)); return value; } template bool impl_IEmailMailboxPolicies::AllowSmimeSoftCertificates() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowSmimeSoftCertificates(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies)->get_AllowSmimeSoftCertificates(&value)); return value; } template Windows::Foundation::IReference impl_IEmailMailboxPolicies::RequiredSmimeEncryptionAlgorithm() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RequiredSmimeEncryptionAlgorithm(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies)->get_RequiredSmimeEncryptionAlgorithm(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IEmailMailboxPolicies::RequiredSmimeSigningAlgorithm() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RequiredSmimeSigningAlgorithm(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies)->get_RequiredSmimeSigningAlgorithm(put_abi(value))); return value; } template bool impl_IEmailMailboxPolicies2::MustEncryptSmimeMessages() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MustEncryptSmimeMessages(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies2)->get_MustEncryptSmimeMessages(&value)); return value; } template bool impl_IEmailMailboxPolicies2::MustSignSmimeMessages() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MustSignSmimeMessages(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies2)->get_MustSignSmimeMessages(&value)); return value; } template void impl_IEmailMailboxPolicies3::AllowedSmimeEncryptionAlgorithmNegotiation(Windows::ApplicationModel::Email::EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowedSmimeEncryptionAlgorithmNegotiation(value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_AllowedSmimeEncryptionAlgorithmNegotiation(value)); } template void impl_IEmailMailboxPolicies3::AllowSmimeSoftCertificates(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowSmimeSoftCertificates(value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_AllowSmimeSoftCertificates(value)); } -template void impl_IEmailMailboxPolicies3::RequiredSmimeEncryptionAlgorithm(const Windows::Foundation::IReference & value) const +template void impl_IEmailMailboxPolicies3::RequiredSmimeEncryptionAlgorithm(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_RequiredSmimeEncryptionAlgorithm(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_RequiredSmimeEncryptionAlgorithm(get_abi(value))); } -template void impl_IEmailMailboxPolicies3::RequiredSmimeSigningAlgorithm(const Windows::Foundation::IReference & value) const +template void impl_IEmailMailboxPolicies3::RequiredSmimeSigningAlgorithm(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_RequiredSmimeSigningAlgorithm(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_RequiredSmimeSigningAlgorithm(get_abi(value))); } template void impl_IEmailMailboxPolicies3::MustEncryptSmimeMessages(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MustEncryptSmimeMessages(value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_MustEncryptSmimeMessages(value)); } template void impl_IEmailMailboxPolicies3::MustSignSmimeMessages(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MustSignSmimeMessages(value)); + check_hresult(WINRT_SHIM(IEmailMailboxPolicies3)->put_MustSignSmimeMessages(value)); } template bool impl_IEmailMailboxCapabilities::CanForwardMeetings() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanForwardMeetings(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanForwardMeetings(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanGetAndSetExternalAutoReplies() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGetAndSetExternalAutoReplies(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanGetAndSetExternalAutoReplies(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanGetAndSetInternalAutoReplies() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGetAndSetInternalAutoReplies(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanGetAndSetInternalAutoReplies(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanUpdateMeetingResponses() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanUpdateMeetingResponses(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanUpdateMeetingResponses(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanServerSearchFolders() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanServerSearchFolders(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanServerSearchFolders(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanServerSearchMailbox() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanServerSearchMailbox(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanServerSearchMailbox(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanProposeNewTimeForMeetings() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanProposeNewTimeForMeetings(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanProposeNewTimeForMeetings(&value)); return value; } template bool impl_IEmailMailboxCapabilities::CanSmartSend() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSmartSend(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities)->get_CanSmartSend(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanResolveRecipients() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanResolveRecipients(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanResolveRecipients(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanValidateCertificates() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanValidateCertificates(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanValidateCertificates(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanEmptyFolder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanEmptyFolder(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanEmptyFolder(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanCreateFolder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanCreateFolder(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanCreateFolder(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanDeleteFolder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanDeleteFolder(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanDeleteFolder(&value)); return value; } template bool impl_IEmailMailboxCapabilities2::CanMoveFolder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanMoveFolder(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities2)->get_CanMoveFolder(&value)); return value; } template void impl_IEmailMailboxCapabilities3::CanForwardMeetings(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanForwardMeetings(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanForwardMeetings(value)); } template void impl_IEmailMailboxCapabilities3::CanGetAndSetExternalAutoReplies(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanGetAndSetExternalAutoReplies(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanGetAndSetExternalAutoReplies(value)); } template void impl_IEmailMailboxCapabilities3::CanGetAndSetInternalAutoReplies(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanGetAndSetInternalAutoReplies(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanGetAndSetInternalAutoReplies(value)); } template void impl_IEmailMailboxCapabilities3::CanUpdateMeetingResponses(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanUpdateMeetingResponses(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanUpdateMeetingResponses(value)); } template void impl_IEmailMailboxCapabilities3::CanServerSearchFolders(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanServerSearchFolders(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanServerSearchFolders(value)); } template void impl_IEmailMailboxCapabilities3::CanServerSearchMailbox(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanServerSearchMailbox(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanServerSearchMailbox(value)); } template void impl_IEmailMailboxCapabilities3::CanProposeNewTimeForMeetings(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanProposeNewTimeForMeetings(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanProposeNewTimeForMeetings(value)); } template void impl_IEmailMailboxCapabilities3::CanSmartSend(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanSmartSend(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanSmartSend(value)); } template void impl_IEmailMailboxCapabilities3::CanResolveRecipients(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanResolveRecipients(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanResolveRecipients(value)); } template void impl_IEmailMailboxCapabilities3::CanValidateCertificates(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanValidateCertificates(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanValidateCertificates(value)); } template void impl_IEmailMailboxCapabilities3::CanEmptyFolder(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanEmptyFolder(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanEmptyFolder(value)); } template void impl_IEmailMailboxCapabilities3::CanCreateFolder(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanCreateFolder(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanCreateFolder(value)); } template void impl_IEmailMailboxCapabilities3::CanDeleteFolder(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanDeleteFolder(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanDeleteFolder(value)); } template void impl_IEmailMailboxCapabilities3::CanMoveFolder(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanMoveFolder(value)); + check_hresult(WINRT_SHIM(IEmailMailboxCapabilities3)->put_CanMoveFolder(value)); } template Windows::ApplicationModel::Email::EmailMailboxCapabilities impl_IEmailMailbox::Capabilities() const { Windows::ApplicationModel::Email::EmailMailboxCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_Capabilities(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxChangeTracker impl_IEmailMailbox::ChangeTracker() const { Windows::ApplicationModel::Email::EmailMailboxChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_ChangeTracker(put_abi(value))); return value; } template hstring impl_IEmailMailbox::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_DisplayName(put_abi(value))); return value; } -template void impl_IEmailMailbox::DisplayName(hstring_ref value) const +template void impl_IEmailMailbox::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->put_DisplayName(get_abi(value))); } template hstring impl_IEmailMailbox::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_Id(put_abi(value))); return value; } template bool impl_IEmailMailbox::IsOwnedByCurrentApp() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOwnedByCurrentApp(&value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_IsOwnedByCurrentApp(&value)); return value; } template bool impl_IEmailMailbox::IsDataEncryptedUnderLock() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDataEncryptedUnderLock(&value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_IsDataEncryptedUnderLock(&value)); return value; } template hstring impl_IEmailMailbox::MailAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MailAddress(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_MailAddress(put_abi(value))); return value; } -template void impl_IEmailMailbox::MailAddress(hstring_ref value) const +template void impl_IEmailMailbox::MailAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MailAddress(get(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->put_MailAddress(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IEmailMailbox::MailAddressAliases() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MailAddressAliases(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_MailAddressAliases(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxOtherAppReadAccess impl_IEmailMailbox::OtherAppReadAccess() const { Windows::ApplicationModel::Email::EmailMailboxOtherAppReadAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppReadAccess(&value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_OtherAppReadAccess(&value)); return value; } template void impl_IEmailMailbox::OtherAppReadAccess(Windows::ApplicationModel::Email::EmailMailboxOtherAppReadAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppReadAccess(value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->put_OtherAppReadAccess(value)); } template Windows::ApplicationModel::Email::EmailMailboxOtherAppWriteAccess impl_IEmailMailbox::OtherAppWriteAccess() const { Windows::ApplicationModel::Email::EmailMailboxOtherAppWriteAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppWriteAccess(&value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_OtherAppWriteAccess(&value)); return value; } template void impl_IEmailMailbox::OtherAppWriteAccess(Windows::ApplicationModel::Email::EmailMailboxOtherAppWriteAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppWriteAccess(value)); + check_hresult(WINRT_SHIM(IEmailMailbox)->put_OtherAppWriteAccess(value)); } template Windows::ApplicationModel::Email::EmailMailboxPolicies impl_IEmailMailbox::Policies() const { Windows::ApplicationModel::Email::EmailMailboxPolicies value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Policies(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_Policies(put_abi(value))); return value; } template hstring impl_IEmailMailbox::SourceDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceDisplayName(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_SourceDisplayName(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxSyncManager impl_IEmailMailbox::SyncManager() const { Windows::ApplicationModel::Email::EmailMailboxSyncManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SyncManager(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_SyncManager(put_abi(value))); return value; } template hstring impl_IEmailMailbox::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox)->get_UserDataAccountId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailMailbox::GetConversationReader() const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReader(put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetConversationReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailMailbox::GetConversationReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetConversationReaderWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailMailbox::GetMessageReader() const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader(put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetMessageReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailMailbox::GetMessageReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetMessageReaderWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DeleteAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_DeleteAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetConversationAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetConversationAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetConversationAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetFolderAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetFolderAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetFolderAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetMessageAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetMessageAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetMessageAsync(get_abi(id), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::GetSpecialFolderAsync(Windows::ApplicationModel::Email::EmailSpecialFolderKind folderType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetSpecialFolderAsync(folderType, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_GetSpecialFolderAsync(folderType, put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailbox::SaveAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_SaveAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkMessageAsSeenAsync(hstring_ref messageId) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkMessageAsSeenAsync(hstring_view messageId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkMessageAsSeenAsync(get(messageId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_MarkMessageAsSeenAsync(get_abi(messageId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkFolderAsSeenAsync(hstring_ref folderId) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkFolderAsSeenAsync(hstring_view folderId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkFolderAsSeenAsync(get(folderId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_MarkFolderAsSeenAsync(get_abi(folderId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkMessageReadAsync(hstring_ref messageId, bool isRead) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkMessageReadAsync(hstring_view messageId, bool isRead) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkMessageReadAsync(get(messageId), isRead, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_MarkMessageReadAsync(get_abi(messageId), isRead, put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::ChangeMessageFlagStateAsync(hstring_ref messageId, Windows::ApplicationModel::Email::EmailFlagState flagState) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::ChangeMessageFlagStateAsync(hstring_view messageId, Windows::ApplicationModel::Email::EmailFlagState flagState) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ChangeMessageFlagStateAsync(get(messageId), flagState, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_ChangeMessageFlagStateAsync(get_abi(messageId), flagState, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveMessageAsync(hstring_ref messageId, hstring_ref newParentFolderId) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveMessageAsync(hstring_view messageId, hstring_view newParentFolderId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryMoveMessageAsync(get(messageId), get(newParentFolderId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryMoveMessageAsync(get_abi(messageId), get_abi(newParentFolderId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveFolderAsync(hstring_ref folderId, hstring_ref newParentFolderId) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveFolderAsync(hstring_view folderId, hstring_view newParentFolderId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryMoveFolderAsync(get(folderId), get(newParentFolderId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryMoveFolderAsync(get_abi(folderId), get_abi(newParentFolderId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveFolderAsync(hstring_ref folderId, hstring_ref newParentFolderId, hstring_ref newFolderName) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryMoveFolderAsync(hstring_view folderId, hstring_view newParentFolderId, hstring_view newFolderName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryMoveFolderWithNewNameAsync(get(folderId), get(newParentFolderId), get(newFolderName), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryMoveFolderWithNewNameAsync(get_abi(folderId), get_abi(newParentFolderId), get_abi(newFolderName), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DeleteMessageAsync(hstring_ref messageId) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DeleteMessageAsync(hstring_view messageId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteMessageAsync(get(messageId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_DeleteMessageAsync(get_abi(messageId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkFolderSyncEnabledAsync(hstring_ref folderId, bool isSyncEnabled) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::MarkFolderSyncEnabledAsync(hstring_view folderId, bool isSyncEnabled) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MarkFolderSyncEnabledAsync(get(folderId), isSyncEnabled, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_MarkFolderSyncEnabledAsync(get_abi(folderId), isSyncEnabled, put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailbox::SendMessageAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_SendMessageAsync(get_abi(message), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailbox::SaveDraftAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveDraftAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_SaveDraftAsync(get_abi(message), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DownloadMessageAsync(hstring_ref messageId) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DownloadMessageAsync(hstring_view messageId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DownloadMessageAsync(get(messageId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_DownloadMessageAsync(get_abi(messageId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DownloadAttachmentAsync(hstring_ref attachmentId) const +template Windows::Foundation::IAsyncAction impl_IEmailMailbox::DownloadAttachmentAsync(hstring_view attachmentId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DownloadAttachmentAsync(get(attachmentId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_DownloadAttachmentAsync(get_abi(attachmentId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::CreateResponseMessageAsync(hstring_ref messageId, Windows::ApplicationModel::Email::EmailMessageResponseKind responseType, hstring_ref subject, Windows::ApplicationModel::Email::EmailMessageBodyKind responseHeaderType, hstring_ref responseHeader) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::CreateResponseMessageAsync(hstring_view messageId, Windows::ApplicationModel::Email::EmailMessageResponseKind responseType, hstring_view subject, Windows::ApplicationModel::Email::EmailMessageBodyKind responseHeaderType, hstring_view responseHeader) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateResponseMessageAsync(get(messageId), responseType, get(subject), responseHeaderType, get(responseHeader), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_CreateResponseMessageAsync(get_abi(messageId), responseType, get_abi(subject), responseHeaderType, get_abi(responseHeader), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryUpdateMeetingResponseAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, Windows::ApplicationModel::Email::EmailMeetingResponseType response, hstring_ref subject, hstring_ref comment, bool sendUpdate) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryUpdateMeetingResponseAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, Windows::ApplicationModel::Email::EmailMeetingResponseType response, hstring_view subject, hstring_view comment, bool sendUpdate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdateMeetingResponseAsync(get(meeting), response, get(subject), get(comment), sendUpdate, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryUpdateMeetingResponseAsync(get_abi(meeting), response, get_abi(subject), get_abi(comment), sendUpdate, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryForwardMeetingAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, const Windows::Foundation::Collections::IIterable & recipients, hstring_ref subject, Windows::ApplicationModel::Email::EmailMessageBodyKind forwardHeaderType, hstring_ref forwardHeader, hstring_ref comment) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryForwardMeetingAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, iterable recipients, hstring_view subject, Windows::ApplicationModel::Email::EmailMessageBodyKind forwardHeaderType, hstring_view forwardHeader, hstring_view comment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryForwardMeetingAsync(get(meeting), get(recipients), get(subject), forwardHeaderType, get(forwardHeader), get(comment), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryForwardMeetingAsync(get_abi(meeting), get_abi(recipients), get_abi(subject), forwardHeaderType, get_abi(forwardHeader), get_abi(comment), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryProposeNewTimeForMeetingAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, const Windows::Foundation::DateTime & newStartTime, const Windows::Foundation::TimeSpan & newDuration, hstring_ref subject, hstring_ref comment) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryProposeNewTimeForMeetingAsync(const Windows::ApplicationModel::Email::EmailMessage & meeting, const Windows::Foundation::DateTime & newStartTime, const Windows::Foundation::TimeSpan & newDuration, hstring_view subject, hstring_view comment) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryProposeNewTimeForMeetingAsync(get(meeting), get(newStartTime), get(newDuration), get(subject), get(comment), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryProposeNewTimeForMeetingAsync(get_abi(meeting), get_abi(newStartTime), get_abi(newDuration), get_abi(subject), get_abi(comment), put_abi(result))); return result; } template event_token impl_IEmailMailbox::MailboxChanged(const Windows::Foundation::TypedEventHandler & pHandler) const { event_token pToken {}; - check_hresult(static_cast(static_cast(*this))->add_MailboxChanged(get(pHandler), &pToken)); + check_hresult(WINRT_SHIM(IEmailMailbox)->add_MailboxChanged(get_abi(pHandler), &pToken)); return pToken; } @@ -6601,969 +6973,969 @@ template event_revoker impl_IEmailMailbox::Mailbo template void impl_IEmailMailbox::MailboxChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MailboxChanged(token)); + check_hresult(WINRT_SHIM(IEmailMailbox)->remove_MailboxChanged(token)); } template Windows::Foundation::IAsyncAction impl_IEmailMailbox::SendMessageAsync(const Windows::ApplicationModel::Email::EmailMessage & message, bool smartSend) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SmartSendMessageAsync(get(message), smartSend, put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_SmartSendMessageAsync(get_abi(message), smartSend, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TrySetAutoReplySettingsAsync(const Windows::ApplicationModel::Email::EmailMailboxAutoReplySettings & autoReplySettings) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySetAutoReplySettingsAsync(get(autoReplySettings), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TrySetAutoReplySettingsAsync(get_abi(autoReplySettings), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailMailbox::TryGetAutoReplySettingsAsync(Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind requestedFormat) const { Windows::Foundation::IAsyncOperation autoReplySettings; - check_hresult(static_cast(static_cast(*this))->abi_TryGetAutoReplySettingsAsync(requestedFormat, put(autoReplySettings))); + check_hresult(WINRT_SHIM(IEmailMailbox)->abi_TryGetAutoReplySettingsAsync(requestedFormat, put_abi(autoReplySettings))); return autoReplySettings; } template hstring impl_IEmailMailbox2::LinkedMailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LinkedMailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox2)->get_LinkedMailboxId(put_abi(value))); return value; } template hstring impl_IEmailMailbox2::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox2)->get_NetworkAccountId(put_abi(value))); return value; } template hstring impl_IEmailMailbox2::NetworkId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkId(put(value))); + check_hresult(WINRT_SHIM(IEmailMailbox2)->get_NetworkId(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_IEmailMailbox3::ResolveRecipientsAsync(const Windows::Foundation::Collections::IIterable & recipients) const +template Windows::Foundation::IAsyncOperation> impl_IEmailMailbox3::ResolveRecipientsAsync(iterable recipients) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ResolveRecipientsAsync(get(recipients), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox3)->abi_ResolveRecipientsAsync(get_abi(recipients), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation> impl_IEmailMailbox3::ValidateCertificatesAsync(const Windows::Foundation::Collections::IIterable & certificates) const +template Windows::Foundation::IAsyncOperation> impl_IEmailMailbox3::ValidateCertificatesAsync(iterable certificates) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_ValidateCertificatesAsync(get(certificates), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox3)->abi_ValidateCertificatesAsync(get_abi(certificates), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryEmptyFolderAsync(hstring_ref folderId) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryEmptyFolderAsync(hstring_view folderId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryEmptyFolderAsync(get(folderId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox3)->abi_TryEmptyFolderAsync(get_abi(folderId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryCreateFolderAsync(hstring_ref parentFolderId, hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryCreateFolderAsync(hstring_view parentFolderId, hstring_view name) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateFolderAsync(get(parentFolderId), get(name), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox3)->abi_TryCreateFolderAsync(get_abi(parentFolderId), get_abi(name), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryDeleteFolderAsync(hstring_ref folderId) const +template Windows::Foundation::IAsyncOperation impl_IEmailMailbox3::TryDeleteFolderAsync(hstring_view folderId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryDeleteFolderAsync(get(folderId), put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox3)->abi_TryDeleteFolderAsync(get_abi(folderId), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailMailbox4::RegisterSyncManagerAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterSyncManagerAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailbox4)->abi_RegisterSyncManagerAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailRecipientResolutionStatus impl_IEmailRecipientResolutionResult::Status() const { Windows::ApplicationModel::Email::EmailRecipientResolutionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEmailRecipientResolutionResult)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IEmailRecipientResolutionResult::PublicKeys() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PublicKeys(put(value))); + check_hresult(WINRT_SHIM(IEmailRecipientResolutionResult)->get_PublicKeys(put_abi(value))); return value; } template void impl_IEmailRecipientResolutionResult2::Status(Windows::ApplicationModel::Email::EmailRecipientResolutionStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IEmailRecipientResolutionResult2)->put_Status(value)); } -template void impl_IEmailRecipientResolutionResult2::SetPublicKeys(const Windows::Foundation::Collections::IIterable & value) const +template void impl_IEmailRecipientResolutionResult2::SetPublicKeys(iterable value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPublicKeys(get(value))); + check_hresult(WINRT_SHIM(IEmailRecipientResolutionResult2)->abi_SetPublicKeys(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMailboxCreateFolderStatus impl_IEmailMailboxCreateFolderResult::Status() const { Windows::ApplicationModel::Email::EmailMailboxCreateFolderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderResult)->get_Status(&value)); return value; } template Windows::ApplicationModel::Email::EmailFolder impl_IEmailMailboxCreateFolderResult::Folder() const { Windows::ApplicationModel::Email::EmailFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Folder(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxCreateFolderResult)->get_Folder(put_abi(value))); return value; } template bool impl_IEmailMailboxAutoReplySettings::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_IsEnabled(&value)); return value; } template void impl_IEmailMailboxAutoReplySettings::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->put_IsEnabled(value)); } template Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind impl_IEmailMailboxAutoReplySettings::ResponseKind() const { Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind value {}; - check_hresult(static_cast(static_cast(*this))->get_ResponseKind(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_ResponseKind(&value)); return value; } template void impl_IEmailMailboxAutoReplySettings::ResponseKind(Windows::ApplicationModel::Email::EmailMailboxAutoReplyMessageResponseKind value) const { - check_hresult(static_cast(static_cast(*this))->put_ResponseKind(value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->put_ResponseKind(value)); } template Windows::Foundation::IReference impl_IEmailMailboxAutoReplySettings::StartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_StartTime(put_abi(value))); return value; } -template void impl_IEmailMailboxAutoReplySettings::StartTime(const Windows::Foundation::IReference & value) const +template void impl_IEmailMailboxAutoReplySettings::StartTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->put_StartTime(get_abi(value))); } template Windows::Foundation::IReference impl_IEmailMailboxAutoReplySettings::EndTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_EndTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_EndTime(put_abi(value))); return value; } -template void impl_IEmailMailboxAutoReplySettings::EndTime(const Windows::Foundation::IReference & value) const +template void impl_IEmailMailboxAutoReplySettings::EndTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_EndTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->put_EndTime(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMailboxAutoReply impl_IEmailMailboxAutoReplySettings::InternalReply() const { Windows::ApplicationModel::Email::EmailMailboxAutoReply value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InternalReply(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_InternalReply(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxAutoReply impl_IEmailMailboxAutoReplySettings::KnownExternalReply() const { Windows::ApplicationModel::Email::EmailMailboxAutoReply value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_KnownExternalReply(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_KnownExternalReply(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMailboxAutoReply impl_IEmailMailboxAutoReplySettings::UnknownExternalReply() const { Windows::ApplicationModel::Email::EmailMailboxAutoReply value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UnknownExternalReply(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReplySettings)->get_UnknownExternalReply(put_abi(value))); return value; } template bool impl_IEmailMailboxAutoReply::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReply)->get_IsEnabled(&value)); return value; } template void impl_IEmailMailboxAutoReply::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReply)->put_IsEnabled(value)); } template hstring impl_IEmailMailboxAutoReply::Response() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Response(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReply)->get_Response(put_abi(value))); return value; } -template void impl_IEmailMailboxAutoReply::Response(hstring_ref value) const +template void impl_IEmailMailboxAutoReply::Response(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Response(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxAutoReply)->put_Response(get_abi(value))); } template Windows::ApplicationModel::Email::EmailMailboxSyncStatus impl_IEmailMailboxSyncManager::Status() const { Windows::ApplicationModel::Email::EmailMailboxSyncStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->get_Status(&value)); return value; } template Windows::Foundation::DateTime impl_IEmailMailboxSyncManager::LastSuccessfulSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSuccessfulSyncTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->get_LastSuccessfulSyncTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IEmailMailboxSyncManager::LastAttemptedSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastAttemptedSyncTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->get_LastAttemptedSyncTime(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IEmailMailboxSyncManager::SyncAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SyncAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->abi_SyncAsync(put_abi(result))); return result; } -template event_token impl_IEmailMailboxSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IEmailMailboxSyncManager::SyncStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SyncStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->add_SyncStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IEmailMailboxSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IEmailMailboxSyncManager::SyncStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Email::IEmailMailboxSyncManager::remove_SyncStatusChanged, SyncStatusChanged(handler)); } template void impl_IEmailMailboxSyncManager::SyncStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SyncStatusChanged(token)); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager)->remove_SyncStatusChanged(token)); } template void impl_IEmailMailboxSyncManager2::Status(Windows::ApplicationModel::Email::EmailMailboxSyncStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager2)->put_Status(value)); } template void impl_IEmailMailboxSyncManager2::LastSuccessfulSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastSuccessfulSyncTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager2)->put_LastSuccessfulSyncTime(get_abi(value))); } template void impl_IEmailMailboxSyncManager2::LastAttemptedSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastAttemptedSyncTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMailboxSyncManager2)->put_LastAttemptedSyncTime(get_abi(value))); } template hstring impl_IEmailFolder::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_Id(put_abi(value))); return value; } template hstring impl_IEmailFolder::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_RemoteId(put_abi(value))); return value; } -template void impl_IEmailFolder::RemoteId(hstring_ref value) const +template void impl_IEmailFolder::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->put_RemoteId(get_abi(value))); } template hstring impl_IEmailFolder::MailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_MailboxId(put_abi(value))); return value; } template hstring impl_IEmailFolder::ParentFolderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ParentFolderId(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_ParentFolderId(put_abi(value))); return value; } template hstring impl_IEmailFolder::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_DisplayName(put_abi(value))); return value; } -template void impl_IEmailFolder::DisplayName(hstring_ref value) const +template void impl_IEmailFolder::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->put_DisplayName(get_abi(value))); } template bool impl_IEmailFolder::IsSyncEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSyncEnabled(&value)); + check_hresult(WINRT_SHIM(IEmailFolder)->get_IsSyncEnabled(&value)); return value; } template void impl_IEmailFolder::IsSyncEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSyncEnabled(value)); + check_hresult(WINRT_SHIM(IEmailFolder)->put_IsSyncEnabled(value)); } template Windows::Foundation::DateTime impl_IEmailFolder::LastSuccessfulSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSuccessfulSyncTime(put(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->get_LastSuccessfulSyncTime(put_abi(value))); return value; } template void impl_IEmailFolder::LastSuccessfulSyncTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastSuccessfulSyncTime(get(value))); + check_hresult(WINRT_SHIM(IEmailFolder)->put_LastSuccessfulSyncTime(get_abi(value))); } template Windows::ApplicationModel::Email::EmailSpecialFolderKind impl_IEmailFolder::Kind() const { Windows::ApplicationModel::Email::EmailSpecialFolderKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IEmailFolder)->get_Kind(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IEmailFolder::CreateFolderAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IEmailFolder::CreateFolderAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderAsync(get(name), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_CreateFolderAsync(get_abi(name), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailFolder::DeleteAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_DeleteAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IEmailFolder::FindChildFoldersAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindChildFoldersAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_FindChildFoldersAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailFolder::GetConversationReader() const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReader(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetConversationReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailConversationReader impl_IEmailFolder::GetConversationReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailConversationReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConversationReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetConversationReaderWithOptions(get_abi(options), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailFolder::GetMessageAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IEmailFolder::GetMessageAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetMessageAsync(get_abi(id), put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailFolder::GetMessageReader() const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReader(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetMessageReader(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMessageReader impl_IEmailFolder::GetMessageReader(const Windows::ApplicationModel::Email::EmailQueryOptions & options) const { Windows::ApplicationModel::Email::EmailMessageReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageReaderWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetMessageReaderWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailFolder::GetMessageCountsAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageCountsAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_GetMessageCountsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailFolder::TryMoveAsync(const Windows::ApplicationModel::Email::EmailFolder & newParentFolder) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryMoveAsync(get(newParentFolder), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_TryMoveAsync(get_abi(newParentFolder), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEmailFolder::TryMoveAsync(const Windows::ApplicationModel::Email::EmailFolder & newParentFolder, hstring_ref newFolderName) const +template Windows::Foundation::IAsyncOperation impl_IEmailFolder::TryMoveAsync(const Windows::ApplicationModel::Email::EmailFolder & newParentFolder, hstring_view newFolderName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryMoveWithNewNameAsync(get(newParentFolder), get(newFolderName), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_TryMoveWithNewNameAsync(get_abi(newParentFolder), get_abi(newFolderName), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEmailFolder::TrySaveAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySaveAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_TrySaveAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEmailFolder::SaveMessageAsync(const Windows::ApplicationModel::Email::EmailMessage & message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveMessageAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IEmailFolder)->abi_SaveMessageAsync(get_abi(message), put_abi(result))); return result; } template hstring impl_IEmailConversation::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_Id(put_abi(value))); return value; } template hstring impl_IEmailConversation::MailboxId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MailboxId(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_MailboxId(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailFlagState impl_IEmailConversation::FlagState() const { Windows::ApplicationModel::Email::EmailFlagState value {}; - check_hresult(static_cast(static_cast(*this))->get_FlagState(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_FlagState(&value)); return value; } template bool impl_IEmailConversation::HasAttachment() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasAttachment(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_HasAttachment(&value)); return value; } template Windows::ApplicationModel::Email::EmailImportance impl_IEmailConversation::Importance() const { Windows::ApplicationModel::Email::EmailImportance value {}; - check_hresult(static_cast(static_cast(*this))->get_Importance(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_Importance(&value)); return value; } template Windows::ApplicationModel::Email::EmailMessageResponseKind impl_IEmailConversation::LastEmailResponseKind() const { Windows::ApplicationModel::Email::EmailMessageResponseKind value {}; - check_hresult(static_cast(static_cast(*this))->get_LastEmailResponseKind(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_LastEmailResponseKind(&value)); return value; } template uint32_t impl_IEmailConversation::MessageCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageCount(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_MessageCount(&value)); return value; } template hstring impl_IEmailConversation::MostRecentMessageId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MostRecentMessageId(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_MostRecentMessageId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IEmailConversation::MostRecentMessageTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MostRecentMessageTime(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_MostRecentMessageTime(put_abi(value))); return value; } template hstring impl_IEmailConversation::Preview() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Preview(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_Preview(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailRecipient impl_IEmailConversation::LatestSender() const { Windows::ApplicationModel::Email::EmailRecipient value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LatestSender(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_LatestSender(put_abi(value))); return value; } template hstring impl_IEmailConversation::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEmailConversation)->get_Subject(put_abi(value))); return value; } template uint32_t impl_IEmailConversation::UnreadMessageCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UnreadMessageCount(&value)); + check_hresult(WINRT_SHIM(IEmailConversation)->get_UnreadMessageCount(&value)); return value; } template Windows::Foundation::IAsyncOperation> impl_IEmailConversation::FindMessagesAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindMessagesAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailConversation)->abi_FindMessagesAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IEmailConversation::FindMessagesAsync(uint32_t count) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindMessagesWithCountAsync(count, put(result))); + check_hresult(WINRT_SHIM(IEmailConversation)->abi_FindMessagesWithCountAsync(count, put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMailboxActionKind impl_IEmailMailboxAction::Kind() const { Windows::ApplicationModel::Email::EmailMailboxActionKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxAction)->get_Kind(&value)); return value; } template uint64_t impl_IEmailMailboxAction::ChangeNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeNumber(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxAction)->get_ChangeNumber(&value)); return value; } template Windows::ApplicationModel::Email::EmailQuerySearchFields impl_IEmailQueryTextSearch::Fields() const { Windows::ApplicationModel::Email::EmailQuerySearchFields value {}; - check_hresult(static_cast(static_cast(*this))->get_Fields(&value)); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->get_Fields(&value)); return value; } template void impl_IEmailQueryTextSearch::Fields(Windows::ApplicationModel::Email::EmailQuerySearchFields value) const { - check_hresult(static_cast(static_cast(*this))->put_Fields(value)); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->put_Fields(value)); } template Windows::ApplicationModel::Email::EmailQuerySearchScope impl_IEmailQueryTextSearch::SearchScope() const { Windows::ApplicationModel::Email::EmailQuerySearchScope value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchScope(&value)); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->get_SearchScope(&value)); return value; } template void impl_IEmailQueryTextSearch::SearchScope(Windows::ApplicationModel::Email::EmailQuerySearchScope value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchScope(value)); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->put_SearchScope(value)); } template hstring impl_IEmailQueryTextSearch::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->get_Text(put_abi(value))); return value; } -template void impl_IEmailQueryTextSearch::Text(hstring_ref value) const +template void impl_IEmailQueryTextSearch::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IEmailQueryTextSearch)->put_Text(get_abi(value))); } -template Windows::ApplicationModel::Email::EmailQueryOptions impl_IEmailQueryOptionsFactory::CreateWithText(hstring_ref text) const +template Windows::ApplicationModel::Email::EmailQueryOptions impl_IEmailQueryOptionsFactory::CreateWithText(hstring_view text) const { Windows::ApplicationModel::Email::EmailQueryOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithText(get(text), put(result))); + check_hresult(WINRT_SHIM(IEmailQueryOptionsFactory)->abi_CreateWithText(get_abi(text), put_abi(result))); return result; } -template Windows::ApplicationModel::Email::EmailQueryOptions impl_IEmailQueryOptionsFactory::CreateWithTextAndFields(hstring_ref text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields) const +template Windows::ApplicationModel::Email::EmailQueryOptions impl_IEmailQueryOptionsFactory::CreateWithTextAndFields(hstring_view text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields) const { Windows::ApplicationModel::Email::EmailQueryOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTextAndFields(get(text), fields, put(result))); + check_hresult(WINRT_SHIM(IEmailQueryOptionsFactory)->abi_CreateWithTextAndFields(get_abi(text), fields, put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailQueryTextSearch impl_IEmailQueryOptions::TextSearch() const { Windows::ApplicationModel::Email::EmailQueryTextSearch value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextSearch(put(value))); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->get_TextSearch(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailQuerySortDirection impl_IEmailQueryOptions::SortDirection() const { Windows::ApplicationModel::Email::EmailQuerySortDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_SortDirection(&value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->get_SortDirection(&value)); return value; } template void impl_IEmailQueryOptions::SortDirection(Windows::ApplicationModel::Email::EmailQuerySortDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_SortDirection(value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->put_SortDirection(value)); } template Windows::ApplicationModel::Email::EmailQuerySortProperty impl_IEmailQueryOptions::SortProperty() const { Windows::ApplicationModel::Email::EmailQuerySortProperty value {}; - check_hresult(static_cast(static_cast(*this))->get_SortProperty(&value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->get_SortProperty(&value)); return value; } template void impl_IEmailQueryOptions::SortProperty(Windows::ApplicationModel::Email::EmailQuerySortProperty value) const { - check_hresult(static_cast(static_cast(*this))->put_SortProperty(value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->put_SortProperty(value)); } template Windows::ApplicationModel::Email::EmailQueryKind impl_IEmailQueryOptions::Kind() const { Windows::ApplicationModel::Email::EmailQueryKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->get_Kind(&value)); return value; } template void impl_IEmailQueryOptions::Kind(Windows::ApplicationModel::Email::EmailQueryKind value) const { - check_hresult(static_cast(static_cast(*this))->put_Kind(value)); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->put_Kind(value)); } template Windows::Foundation::Collections::IVector impl_IEmailQueryOptions::FolderIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FolderIds(put(value))); + check_hresult(WINRT_SHIM(IEmailQueryOptions)->get_FolderIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IEmailConversationBatch::Conversations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Conversations(put(value))); + check_hresult(WINRT_SHIM(IEmailConversationBatch)->get_Conversations(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailBatchStatus impl_IEmailConversationBatch::Status() const { Windows::ApplicationModel::Email::EmailBatchStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEmailConversationBatch)->get_Status(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IEmailConversationReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailConversationReader)->abi_ReadBatchAsync(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IEmailMessageBatch::Messages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Messages(put(value))); + check_hresult(WINRT_SHIM(IEmailMessageBatch)->get_Messages(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailBatchStatus impl_IEmailMessageBatch::Status() const { Windows::ApplicationModel::Email::EmailBatchStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEmailMessageBatch)->get_Status(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IEmailMessageReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(result))); + check_hresult(WINRT_SHIM(IEmailMessageReader)->abi_ReadBatchAsync(put_abi(result))); return result; } template Windows::ApplicationModel::Email::EmailMailboxChangeType impl_IEmailMailboxChange::ChangeType() const { Windows::ApplicationModel::Email::EmailMailboxChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxChange)->get_ChangeType(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IEmailMailboxChange::MailboxActions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MailboxActions(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxChange)->get_MailboxActions(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMessage impl_IEmailMailboxChange::Message() const { Windows::ApplicationModel::Email::EmailMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxChange)->get_Message(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailFolder impl_IEmailMailboxChange::Folder() const { Windows::ApplicationModel::Email::EmailFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Folder(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxChange)->get_Folder(put_abi(value))); return value; } template void impl_IEmailMailboxChangeReader::AcceptChanges() const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChanges()); + check_hresult(WINRT_SHIM(IEmailMailboxChangeReader)->abi_AcceptChanges()); } template void impl_IEmailMailboxChangeReader::AcceptChangesThrough(const Windows::ApplicationModel::Email::EmailMailboxChange & lastChangeToAcknowledge) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptChangesThrough(get(lastChangeToAcknowledge))); + check_hresult(WINRT_SHIM(IEmailMailboxChangeReader)->abi_AcceptChangesThrough(get_abi(lastChangeToAcknowledge))); } template Windows::Foundation::IAsyncOperation> impl_IEmailMailboxChangeReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxChangeReader)->abi_ReadBatchAsync(put_abi(value))); return value; } template bool impl_IEmailMailboxChangeTracker::IsTracking() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTracking(&value)); + check_hresult(WINRT_SHIM(IEmailMailboxChangeTracker)->get_IsTracking(&value)); return value; } template void impl_IEmailMailboxChangeTracker::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IEmailMailboxChangeTracker)->abi_Enable()); } template Windows::ApplicationModel::Email::EmailMailboxChangeReader impl_IEmailMailboxChangeTracker::GetChangeReader() const { Windows::ApplicationModel::Email::EmailMailboxChangeReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChangeReader(put(value))); + check_hresult(WINRT_SHIM(IEmailMailboxChangeTracker)->abi_GetChangeReader(put_abi(value))); return value; } template void impl_IEmailMailboxChangeTracker::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IEmailMailboxChangeTracker)->abi_Reset()); } template bool impl_IEmailMeetingInfo::AllowNewTimeProposal() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowNewTimeProposal(&value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_AllowNewTimeProposal(&value)); return value; } template void impl_IEmailMeetingInfo::AllowNewTimeProposal(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowNewTimeProposal(value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_AllowNewTimeProposal(value)); } template hstring impl_IEmailMeetingInfo::AppointmentRoamingId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentRoamingId(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_AppointmentRoamingId(put_abi(value))); return value; } -template void impl_IEmailMeetingInfo::AppointmentRoamingId(hstring_ref value) const +template void impl_IEmailMeetingInfo::AppointmentRoamingId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AppointmentRoamingId(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_AppointmentRoamingId(get_abi(value))); } template Windows::Foundation::IReference impl_IEmailMeetingInfo::AppointmentOriginalStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppointmentOriginalStartTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_AppointmentOriginalStartTime(put_abi(value))); return value; } -template void impl_IEmailMeetingInfo::AppointmentOriginalStartTime(const Windows::Foundation::IReference & value) const +template void impl_IEmailMeetingInfo::AppointmentOriginalStartTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppointmentOriginalStartTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_AppointmentOriginalStartTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IEmailMeetingInfo::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_Duration(put_abi(value))); return value; } template void impl_IEmailMeetingInfo::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_Duration(get_abi(value))); } template bool impl_IEmailMeetingInfo::IsAllDay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAllDay(&value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_IsAllDay(&value)); return value; } template void impl_IEmailMeetingInfo::IsAllDay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAllDay(value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_IsAllDay(value)); } template bool impl_IEmailMeetingInfo::IsResponseRequested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsResponseRequested(&value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_IsResponseRequested(&value)); return value; } template void impl_IEmailMeetingInfo::IsResponseRequested(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsResponseRequested(value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_IsResponseRequested(value)); } template hstring impl_IEmailMeetingInfo::Location() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_Location(put_abi(value))); return value; } -template void impl_IEmailMeetingInfo::Location(hstring_ref value) const +template void impl_IEmailMeetingInfo::Location(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Location(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_Location(get_abi(value))); } template Windows::Foundation::IReference impl_IEmailMeetingInfo::ProposedStartTime() const { Windows::Foundation::IReference proposedStartTime; - check_hresult(static_cast(static_cast(*this))->get_ProposedStartTime(put(proposedStartTime))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_ProposedStartTime(put_abi(proposedStartTime))); return proposedStartTime; } -template void impl_IEmailMeetingInfo::ProposedStartTime(const Windows::Foundation::IReference & proposedStartTime) const +template void impl_IEmailMeetingInfo::ProposedStartTime(const optional & proposedStartTime) const { - check_hresult(static_cast(static_cast(*this))->put_ProposedStartTime(get(proposedStartTime))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_ProposedStartTime(get_abi(proposedStartTime))); } template Windows::Foundation::IReference impl_IEmailMeetingInfo::ProposedDuration() const { Windows::Foundation::IReference duration; - check_hresult(static_cast(static_cast(*this))->get_ProposedDuration(put(duration))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_ProposedDuration(put_abi(duration))); return duration; } -template void impl_IEmailMeetingInfo::ProposedDuration(const Windows::Foundation::IReference & duration) const +template void impl_IEmailMeetingInfo::ProposedDuration(const optional & duration) const { - check_hresult(static_cast(static_cast(*this))->put_ProposedDuration(get(duration))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_ProposedDuration(get_abi(duration))); } template Windows::Foundation::IReference impl_IEmailMeetingInfo::RecurrenceStartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RecurrenceStartTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_RecurrenceStartTime(put_abi(value))); return value; } -template void impl_IEmailMeetingInfo::RecurrenceStartTime(const Windows::Foundation::IReference & value) const +template void impl_IEmailMeetingInfo::RecurrenceStartTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_RecurrenceStartTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_RecurrenceStartTime(get_abi(value))); } template Windows::ApplicationModel::Appointments::AppointmentRecurrence impl_IEmailMeetingInfo::Recurrence() const { Windows::ApplicationModel::Appointments::AppointmentRecurrence value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Recurrence(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_Recurrence(put_abi(value))); return value; } template void impl_IEmailMeetingInfo::Recurrence(const Windows::ApplicationModel::Appointments::AppointmentRecurrence & value) const { - check_hresult(static_cast(static_cast(*this))->put_Recurrence(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_Recurrence(get_abi(value))); } template uint64_t impl_IEmailMeetingInfo::RemoteChangeNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteChangeNumber(&value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_RemoteChangeNumber(&value)); return value; } template void impl_IEmailMeetingInfo::RemoteChangeNumber(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteChangeNumber(value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_RemoteChangeNumber(value)); } template Windows::Foundation::DateTime impl_IEmailMeetingInfo::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->get_StartTime(put_abi(value))); return value; } template void impl_IEmailMeetingInfo::StartTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IEmailMeetingInfo)->put_StartTime(get_abi(value))); } template bool impl_IEmailMeetingInfo2::IsReportedOutOfDateByServer() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReportedOutOfDateByServer(&value)); + check_hresult(WINRT_SHIM(IEmailMeetingInfo2)->get_IsReportedOutOfDateByServer(&value)); return value; } template uint32_t impl_IEmailItemCounts::Flagged() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Flagged(&value)); + check_hresult(WINRT_SHIM(IEmailItemCounts)->get_Flagged(&value)); return value; } template uint32_t impl_IEmailItemCounts::Important() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Important(&value)); + check_hresult(WINRT_SHIM(IEmailItemCounts)->get_Important(&value)); return value; } template uint32_t impl_IEmailItemCounts::Total() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Total(&value)); + check_hresult(WINRT_SHIM(IEmailItemCounts)->get_Total(&value)); return value; } template uint32_t impl_IEmailItemCounts::Unread() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unread(&value)); + check_hresult(WINRT_SHIM(IEmailItemCounts)->get_Unread(&value)); return value; } @@ -7571,11 +7943,11 @@ inline EmailAttachment::EmailAttachment() : EmailAttachment(activate_instance()) {} -inline EmailAttachment::EmailAttachment(hstring_ref fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data) : +inline EmailAttachment::EmailAttachment(hstring_view fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data) : EmailAttachment(get_activation_factory().Create(fileName, data)) {} -inline EmailAttachment::EmailAttachment(hstring_ref fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data, hstring_ref mimeType) : +inline EmailAttachment::EmailAttachment(hstring_view fileName, const Windows::Storage::Streams::IRandomAccessStreamReference & data, hstring_view mimeType) : EmailAttachment(get_activation_factory().Create(fileName, data, mimeType)) {} @@ -7591,7 +7963,7 @@ inline EmailIrmTemplate::EmailIrmTemplate() : EmailIrmTemplate(activate_instance()) {} -inline EmailIrmTemplate::EmailIrmTemplate(hstring_ref id, hstring_ref name, hstring_ref description) : +inline EmailIrmTemplate::EmailIrmTemplate(hstring_view id, hstring_view name, hstring_view description) : EmailIrmTemplate(get_activation_factory().Create(id, name, description)) {} @@ -7626,11 +7998,11 @@ inline EmailQueryOptions::EmailQueryOptions() : EmailQueryOptions(activate_instance()) {} -inline EmailQueryOptions::EmailQueryOptions(hstring_ref text) : +inline EmailQueryOptions::EmailQueryOptions(hstring_view text) : EmailQueryOptions(get_activation_factory().CreateWithText(text)) {} -inline EmailQueryOptions::EmailQueryOptions(hstring_ref text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields) : +inline EmailQueryOptions::EmailQueryOptions(hstring_view text, Windows::ApplicationModel::Email::EmailQuerySearchFields fields) : EmailQueryOptions(get_activation_factory().CreateWithTextAndFields(text, fields)) {} @@ -7638,11 +8010,11 @@ inline EmailRecipient::EmailRecipient() : EmailRecipient(activate_instance()) {} -inline EmailRecipient::EmailRecipient(hstring_ref address) : +inline EmailRecipient::EmailRecipient(hstring_view address) : EmailRecipient(get_activation_factory().Create(address)) {} -inline EmailRecipient::EmailRecipient(hstring_ref address, hstring_ref name) : +inline EmailRecipient::EmailRecipient(hstring_view address, hstring_view name) : EmailRecipient(get_activation_factory().CreateWithName(address, name)) {} @@ -7653,3 +8025,779 @@ inline EmailRecipientResolutionResult::EmailRecipientResolutionResult() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailAttachment2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailAttachmentFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailAttachmentFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailConversation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailConversationBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailConversationReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailFolder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailIrmInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailIrmInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailIrmTemplate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailIrmTemplateFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailItemCounts & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailbox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailbox2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailbox3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailbox4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxAction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxAutoReply & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxAutoReplySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxCapabilities2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxCapabilities3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxCreateFolderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxPolicies & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxPolicies2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxPolicies3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMailboxSyncManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMeetingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMeetingInfo2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMessage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMessage3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMessageBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailMessageReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailQueryOptionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailQueryTextSearch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailRecipient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailRecipientFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailRecipientResolutionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailRecipientResolutionResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::IEmailStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailConversation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailConversationBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailConversationReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailFolder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailIrmInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailIrmTemplate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailItemCounts & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailbox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxAction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxAutoReply & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxAutoReplySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxChangedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxCreateFolderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxPolicies & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMailboxSyncManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMeetingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMessageBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailMessageReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailQueryTextSearch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailRecipient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailRecipientResolutionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Email::EmailStoreNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.Foreground.h b/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.Foreground.h index 0d579839f..ae71d9420 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.Foreground.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.Foreground.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.ExtendedExecution.Foreground.3.h" #include "Windows.ApplicationModel.ExtendedExecution.h" @@ -19,7 +22,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -46,10 +51,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -59,11 +65,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Revoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Revoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Revoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -76,6 +83,7 @@ struct produceshim()); this->shim().Revoked(token); return S_OK; } @@ -85,11 +93,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_RequestExtensionAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestExtensionAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestExtensionAsync()); return S_OK; } catch (...) @@ -103,7 +112,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -116,6 +126,7 @@ struct produceshim()); this->shim().Reason(value); return S_OK; } @@ -133,56 +144,56 @@ namespace Windows::ApplicationModel::ExtendedExecution::Foreground { template Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedReason impl_IExtendedExecutionForegroundRevokedEventArgs::Reason() const { Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundRevokedEventArgs)->get_Reason(&value)); return value; } template hstring impl_IExtendedExecutionForegroundSession::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->get_Description(put_abi(value))); return value; } -template void impl_IExtendedExecutionForegroundSession::Description(hstring_ref value) const +template void impl_IExtendedExecutionForegroundSession::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->put_Description(get_abi(value))); } -template event_token impl_IExtendedExecutionForegroundSession::Revoked(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IExtendedExecutionForegroundSession::Revoked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Revoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->add_Revoked(get_abi(handler), &token)); return token; } -template event_revoker impl_IExtendedExecutionForegroundSession::Revoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IExtendedExecutionForegroundSession::Revoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::ExtendedExecution::Foreground::IExtendedExecutionForegroundSession::remove_Revoked, Revoked(handler)); } template void impl_IExtendedExecutionForegroundSession::Revoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Revoked(token)); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->remove_Revoked(token)); } template Windows::Foundation::IAsyncOperation impl_IExtendedExecutionForegroundSession::RequestExtensionAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestExtensionAsync(put(operation))); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->abi_RequestExtensionAsync(put_abi(operation))); return operation; } template Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundReason impl_IExtendedExecutionForegroundSession::Reason() const { Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->get_Reason(&value)); return value; } template void impl_IExtendedExecutionForegroundSession::Reason(Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundReason value) const { - check_hresult(static_cast(static_cast(*this))->put_Reason(value)); + check_hresult(WINRT_SHIM(IExtendedExecutionForegroundSession)->put_Reason(value)); } inline ExtendedExecutionForegroundSession::ExtendedExecutionForegroundSession() : @@ -192,3 +203,41 @@ inline ExtendedExecutionForegroundSession::ExtendedExecutionForegroundSession() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::IExtendedExecutionForegroundRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::IExtendedExecutionForegroundSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.h b/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.h index b2e032b07..6bbbc5fb2 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.ExtendedExecution.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.ExtendedExecution.3.h" #include "Windows.ApplicationModel.h" @@ -19,7 +22,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -49,6 +54,7 @@ struct produceshim()); this->shim().Reason(value); return S_OK; } @@ -58,11 +64,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -72,10 +79,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -89,7 +97,8 @@ struct produceshim().PercentProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PercentProgress()); return S_OK; } catch (...) @@ -102,6 +111,7 @@ struct produceshim()); this->shim().PercentProgress(value); return S_OK; } @@ -111,11 +121,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Revoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Revoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Revoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -128,6 +139,7 @@ struct produceshim()); this->shim().Revoked(token); return S_OK; } @@ -137,11 +149,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_RequestExtensionAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestExtensionAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestExtensionAsync()); return S_OK; } catch (...) @@ -159,67 +172,67 @@ namespace Windows::ApplicationModel::ExtendedExecution { template Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedReason impl_IExtendedExecutionRevokedEventArgs::Reason() const { Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IExtendedExecutionRevokedEventArgs)->get_Reason(&value)); return value; } template Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason impl_IExtendedExecutionSession::Reason() const { Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->get_Reason(&value)); return value; } template void impl_IExtendedExecutionSession::Reason(Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason value) const { - check_hresult(static_cast(static_cast(*this))->put_Reason(value)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->put_Reason(value)); } template hstring impl_IExtendedExecutionSession::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->get_Description(put_abi(value))); return value; } -template void impl_IExtendedExecutionSession::Description(hstring_ref value) const +template void impl_IExtendedExecutionSession::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->put_Description(get_abi(value))); } template uint32_t impl_IExtendedExecutionSession::PercentProgress() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PercentProgress(&value)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->get_PercentProgress(&value)); return value; } template void impl_IExtendedExecutionSession::PercentProgress(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PercentProgress(value)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->put_PercentProgress(value)); } -template event_token impl_IExtendedExecutionSession::Revoked(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IExtendedExecutionSession::Revoked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Revoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->add_Revoked(get_abi(handler), &token)); return token; } -template event_revoker impl_IExtendedExecutionSession::Revoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IExtendedExecutionSession::Revoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession::remove_Revoked, Revoked(handler)); } template void impl_IExtendedExecutionSession::Revoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Revoked(token)); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->remove_Revoked(token)); } template Windows::Foundation::IAsyncOperation impl_IExtendedExecutionSession::RequestExtensionAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestExtensionAsync(put(operation))); + check_hresult(WINRT_SHIM(IExtendedExecutionSession)->abi_RequestExtensionAsync(put_abi(operation))); return operation; } @@ -230,3 +243,41 @@ inline ExtendedExecutionSession::ExtendedExecutionSession() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.LockScreen.h b/10.0.14393.0/winrt/Windows.ApplicationModel.LockScreen.h index 52bee7714..2d9aecc89 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.LockScreen.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.LockScreen.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,6 +23,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestUnlock(); return S_OK; } @@ -29,11 +33,12 @@ struct produce : } } - HRESULT __stdcall add_Unlocking(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Unlocking(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Unlocking(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Unlocking(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -46,6 +51,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Unlocking(token); return S_OK; } @@ -59,11 +65,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -77,11 +84,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce : pro } } - HRESULT __stdcall get_Glyph(abi_arg_out value) noexcept override + HRESULT __stdcall get_Glyph(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Glyph()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Glyph()); return S_OK; } catch (...) @@ -105,11 +114,12 @@ struct produce : pro } } - HRESULT __stdcall get_Number(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Number(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Number()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Number()); return S_OK; } catch (...) @@ -119,11 +129,12 @@ struct produce : pro } } - HRESULT __stdcall get_AutomationName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutomationName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutomationName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomationName()); return S_OK; } catch (...) @@ -137,6 +148,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().LaunchApp(); return S_OK; } @@ -150,11 +162,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall add_LockScreenImageChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LockScreenImageChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LockScreenImageChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LockScreenImageChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -167,6 +180,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().LockScreenImageChanged(token); return S_OK; } @@ -176,11 +190,12 @@ struct produce : prod } } - HRESULT __stdcall get_LockScreenImage(abi_arg_out value) noexcept override + HRESULT __stdcall get_LockScreenImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LockScreenImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockScreenImage()); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : prod } } - HRESULT __stdcall add_BadgesChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_BadgesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BadgesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BadgesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -207,6 +223,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().BadgesChanged(token); return S_OK; } @@ -216,11 +233,12 @@ struct produce : prod } } - HRESULT __stdcall get_Badges(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Badges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Badges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Badges()); return S_OK; } catch (...) @@ -230,11 +248,12 @@ struct produce : prod } } - HRESULT __stdcall add_DetailTextChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DetailTextChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DetailTextChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DetailTextChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -247,6 +266,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().DetailTextChanged(token); return S_OK; } @@ -256,11 +276,12 @@ struct produce : prod } } - HRESULT __stdcall get_DetailText(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DetailText(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DetailText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetailText()); return S_OK; } catch (...) @@ -270,11 +291,12 @@ struct produce : prod } } - HRESULT __stdcall add_AlarmIconChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AlarmIconChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AlarmIconChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AlarmIconChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -287,6 +309,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AlarmIconChanged(token); return S_OK; } @@ -296,11 +319,12 @@ struct produce : prod } } - HRESULT __stdcall get_AlarmIcon(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlarmIcon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlarmIcon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlarmIcon()); return S_OK; } catch (...) @@ -318,6 +342,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -331,11 +356,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -345,11 +371,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -366,160 +393,160 @@ namespace Windows::ApplicationModel::LockScreen { template Windows::Storage::Streams::IRandomAccessStream impl_ILockScreenBadge::Logo() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_Logo(put(value))); + check_hresult(WINRT_SHIM(ILockScreenBadge)->get_Logo(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_ILockScreenBadge::Glyph() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_Glyph(put(value))); + check_hresult(WINRT_SHIM(ILockScreenBadge)->get_Glyph(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ILockScreenBadge::Number() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Number(put(value))); + check_hresult(WINRT_SHIM(ILockScreenBadge)->get_Number(put_abi(value))); return value; } template hstring impl_ILockScreenBadge::AutomationName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AutomationName(put(value))); + check_hresult(WINRT_SHIM(ILockScreenBadge)->get_AutomationName(put_abi(value))); return value; } template void impl_ILockScreenBadge::LaunchApp() const { - check_hresult(static_cast(static_cast(*this))->abi_LaunchApp()); + check_hresult(WINRT_SHIM(ILockScreenBadge)->abi_LaunchApp()); } -template event_token impl_ILockScreenInfo::LockScreenImageChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILockScreenInfo::LockScreenImageChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LockScreenImageChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->add_LockScreenImageChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ILockScreenInfo::LockScreenImageChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILockScreenInfo::LockScreenImageChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::LockScreen::ILockScreenInfo::remove_LockScreenImageChanged, LockScreenImageChanged(handler)); } template void impl_ILockScreenInfo::LockScreenImageChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LockScreenImageChanged(token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->remove_LockScreenImageChanged(token)); } template Windows::Storage::Streams::IRandomAccessStream impl_ILockScreenInfo::LockScreenImage() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_LockScreenImage(put(value))); + check_hresult(WINRT_SHIM(ILockScreenInfo)->get_LockScreenImage(put_abi(value))); return value; } -template event_token impl_ILockScreenInfo::BadgesChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILockScreenInfo::BadgesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BadgesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->add_BadgesChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ILockScreenInfo::BadgesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILockScreenInfo::BadgesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::LockScreen::ILockScreenInfo::remove_BadgesChanged, BadgesChanged(handler)); } template void impl_ILockScreenInfo::BadgesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BadgesChanged(token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->remove_BadgesChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_ILockScreenInfo::Badges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Badges(put(value))); + check_hresult(WINRT_SHIM(ILockScreenInfo)->get_Badges(put_abi(value))); return value; } -template event_token impl_ILockScreenInfo::DetailTextChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILockScreenInfo::DetailTextChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DetailTextChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->add_DetailTextChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ILockScreenInfo::DetailTextChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILockScreenInfo::DetailTextChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::LockScreen::ILockScreenInfo::remove_DetailTextChanged, DetailTextChanged(handler)); } template void impl_ILockScreenInfo::DetailTextChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DetailTextChanged(token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->remove_DetailTextChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_ILockScreenInfo::DetailText() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DetailText(put(value))); + check_hresult(WINRT_SHIM(ILockScreenInfo)->get_DetailText(put_abi(value))); return value; } -template event_token impl_ILockScreenInfo::AlarmIconChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILockScreenInfo::AlarmIconChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AlarmIconChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->add_AlarmIconChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ILockScreenInfo::AlarmIconChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILockScreenInfo::AlarmIconChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::LockScreen::ILockScreenInfo::remove_AlarmIconChanged, AlarmIconChanged(handler)); } template void impl_ILockScreenInfo::AlarmIconChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AlarmIconChanged(token)); + check_hresult(WINRT_SHIM(ILockScreenInfo)->remove_AlarmIconChanged(token)); } template Windows::Storage::Streams::IRandomAccessStream impl_ILockScreenInfo::AlarmIcon() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_AlarmIcon(put(value))); + check_hresult(WINRT_SHIM(ILockScreenInfo)->get_AlarmIcon(put_abi(value))); return value; } template void impl_ILockScreenUnlockingDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ILockScreenUnlockingDeferral)->abi_Complete()); } template Windows::ApplicationModel::LockScreen::LockScreenUnlockingDeferral impl_ILockScreenUnlockingEventArgs::GetDeferral() const { Windows::ApplicationModel::LockScreen::LockScreenUnlockingDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(ILockScreenUnlockingEventArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Foundation::DateTime impl_ILockScreenUnlockingEventArgs::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(ILockScreenUnlockingEventArgs)->get_Deadline(put_abi(value))); return value; } template void impl_ILockApplicationHost::RequestUnlock() const { - check_hresult(static_cast(static_cast(*this))->abi_RequestUnlock()); + check_hresult(WINRT_SHIM(ILockApplicationHost)->abi_RequestUnlock()); } template event_token impl_ILockApplicationHost::Unlocking(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Unlocking(get(handler), &token)); + check_hresult(WINRT_SHIM(ILockApplicationHost)->add_Unlocking(get_abi(handler), &token)); return token; } @@ -530,13 +557,13 @@ template event_revoker impl_ILockApplicationH template void impl_ILockApplicationHost::Unlocking(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Unlocking(token)); + check_hresult(WINRT_SHIM(ILockApplicationHost)->remove_Unlocking(token)); } template Windows::ApplicationModel::LockScreen::LockApplicationHost impl_ILockApplicationHostStatics::GetForCurrentView() const { Windows::ApplicationModel::LockScreen::LockApplicationHost result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(result))); + check_hresult(WINRT_SHIM(ILockApplicationHostStatics)->abi_GetForCurrentView(put_abi(result))); return result; } @@ -548,3 +575,104 @@ inline Windows::ApplicationModel::LockScreen::LockApplicationHost LockApplicatio } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockApplicationHost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockApplicationHostStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockScreenBadge & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockScreenInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockScreenUnlockingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::ILockScreenUnlockingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::LockApplicationHost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::LockScreenBadge & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::LockScreenInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::LockScreenUnlockingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LockScreen::LockScreenUnlockingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Preview.Notes.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Preview.Notes.h index 002c4f1b9..9fa78ef69 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Preview.Notes.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Preview.Notes.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Preview.Notes.3.h" @@ -19,7 +22,8 @@ struct produceshim().ViewId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewId()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produceshim().ViewId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewId()); return S_OK; } catch (...) @@ -49,7 +54,8 @@ struct produceshim().IsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVisible()); return S_OK; } catch (...) @@ -66,7 +72,8 @@ struct produceshim().IsScreenLocked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsScreenLocked()); return S_OK; } catch (...) @@ -79,6 +86,7 @@ struct produceshim()); this->shim().ShowNote(noteViewId); return S_OK; } @@ -92,6 +100,7 @@ struct produceshim()); this->shim().ShowNoteRelativeTo(noteViewId, anchorNoteViewId); return S_OK; } @@ -101,10 +110,11 @@ struct produce data) noexcept override + HRESULT __stdcall abi_ShowNoteWithPlacement(int32_t noteViewId, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowNoteWithPlacement(noteViewId, *reinterpret_cast(&data)); return S_OK; } @@ -118,6 +128,7 @@ struct produceshim()); this->shim().HideNote(noteViewId); return S_OK; } @@ -127,11 +138,12 @@ struct produce data) noexcept override + HRESULT __stdcall abi_GetNotePlacement(int32_t noteViewId, impl::abi_arg_out data) noexcept override { try { - *data = detach(this->shim().GetNotePlacement(noteViewId)); + typename D::abi_guard guard(this->shim()); + *data = detach_abi(this->shim().GetNotePlacement(noteViewId)); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce size, bool * succeeded) noexcept override + HRESULT __stdcall abi_TrySetNoteSize(int32_t noteViewId, impl::abi_arg_in size, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TrySetNoteSize(noteViewId, *reinterpret_cast(&size))); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetNoteSize(noteViewId, *reinterpret_cast(&size))); return S_OK; } catch (...) @@ -158,6 +171,7 @@ struct produceshim()); this->shim().SetFocusToNextView(); return S_OK; } @@ -167,11 +181,12 @@ struct produce thumbnail, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SetNotesThumbnailAsync(impl::abi_arg_in thumbnail, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SetNotesThumbnailAsync(*reinterpret_cast(&thumbnail))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetNotesThumbnailAsync(*reinterpret_cast(&thumbnail))); return S_OK; } catch (...) @@ -181,11 +196,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SystemLockStateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SystemLockStateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SystemLockStateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -198,6 +214,7 @@ struct produceshim()); this->shim().SystemLockStateChanged(token); return S_OK; } @@ -207,11 +224,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_NotePlacementChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NotePlacementChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NotePlacementChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -224,6 +242,7 @@ struct produceshim()); this->shim().NotePlacementChanged(token); return S_OK; } @@ -233,11 +252,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_NoteVisibilityChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NoteVisibilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NoteVisibilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -250,6 +270,7 @@ struct produceshim()); this->shim().NoteVisibilityChanged(token); return S_OK; } @@ -263,11 +284,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentApp(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentApp(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentApp()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentApp()); return S_OK; } catch (...) @@ -285,98 +307,98 @@ namespace Windows::ApplicationModel::Preview::Notes { template int32_t impl_INotePlacementChangedPreviewEventArgs::ViewId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewId(&value)); + check_hresult(WINRT_SHIM(INotePlacementChangedPreviewEventArgs)->get_ViewId(&value)); return value; } template int32_t impl_INoteVisibilityChangedPreviewEventArgs::ViewId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewId(&value)); + check_hresult(WINRT_SHIM(INoteVisibilityChangedPreviewEventArgs)->get_ViewId(&value)); return value; } template bool impl_INoteVisibilityChangedPreviewEventArgs::IsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVisible(&value)); + check_hresult(WINRT_SHIM(INoteVisibilityChangedPreviewEventArgs)->get_IsVisible(&value)); return value; } template bool impl_INotesWindowManagerPreview::IsScreenLocked() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsScreenLocked(&value)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->get_IsScreenLocked(&value)); return value; } template void impl_INotesWindowManagerPreview::ShowNote(int32_t noteViewId) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowNote(noteViewId)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_ShowNote(noteViewId)); } template void impl_INotesWindowManagerPreview::ShowNoteRelativeTo(int32_t noteViewId, int32_t anchorNoteViewId) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowNoteRelativeTo(noteViewId, anchorNoteViewId)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_ShowNoteRelativeTo(noteViewId, anchorNoteViewId)); } template void impl_INotesWindowManagerPreview::ShowNoteWithPlacement(int32_t noteViewId, const Windows::Storage::Streams::IBuffer & data) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowNoteWithPlacement(noteViewId, get(data))); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_ShowNoteWithPlacement(noteViewId, get_abi(data))); } template void impl_INotesWindowManagerPreview::HideNote(int32_t noteViewId) const { - check_hresult(static_cast(static_cast(*this))->abi_HideNote(noteViewId)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_HideNote(noteViewId)); } template Windows::Storage::Streams::IBuffer impl_INotesWindowManagerPreview::GetNotePlacement(int32_t noteViewId) const { Windows::Storage::Streams::IBuffer data; - check_hresult(static_cast(static_cast(*this))->abi_GetNotePlacement(noteViewId, put(data))); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_GetNotePlacement(noteViewId, put_abi(data))); return data; } template bool impl_INotesWindowManagerPreview::TrySetNoteSize(int32_t noteViewId, const Windows::Foundation::Size & size) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetNoteSize(noteViewId, get(size), &succeeded)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_TrySetNoteSize(noteViewId, get_abi(size), &succeeded)); return succeeded; } template void impl_INotesWindowManagerPreview::SetFocusToNextView() const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocusToNextView()); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_SetFocusToNextView()); } template Windows::Foundation::IAsyncAction impl_INotesWindowManagerPreview::SetNotesThumbnailAsync(const Windows::Storage::Streams::IBuffer & thumbnail) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SetNotesThumbnailAsync(get(thumbnail), put(operation))); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->abi_SetNotesThumbnailAsync(get_abi(thumbnail), put_abi(operation))); return operation; } -template event_token impl_INotesWindowManagerPreview::SystemLockStateChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_INotesWindowManagerPreview::SystemLockStateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SystemLockStateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->add_SystemLockStateChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_INotesWindowManagerPreview::SystemLockStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_INotesWindowManagerPreview::SystemLockStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview::remove_SystemLockStateChanged, SystemLockStateChanged(handler)); } template void impl_INotesWindowManagerPreview::SystemLockStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SystemLockStateChanged(token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->remove_SystemLockStateChanged(token)); } template event_token impl_INotesWindowManagerPreview::NotePlacementChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NotePlacementChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->add_NotePlacementChanged(get_abi(handler), &token)); return token; } @@ -387,13 +409,13 @@ template event_revoker impl_INotesWindo template void impl_INotesWindowManagerPreview::NotePlacementChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NotePlacementChanged(token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->remove_NotePlacementChanged(token)); } template event_token impl_INotesWindowManagerPreview::NoteVisibilityChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NoteVisibilityChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->add_NoteVisibilityChanged(get_abi(handler), &token)); return token; } @@ -404,13 +426,13 @@ template event_revoker impl_INotesWindo template void impl_INotesWindowManagerPreview::NoteVisibilityChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NoteVisibilityChanged(token)); + check_hresult(WINRT_SHIM(INotesWindowManagerPreview)->remove_NoteVisibilityChanged(token)); } template Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview impl_INotesWindowManagerPreviewStatics::GetForCurrentApp() const { Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentApp(put(current))); + check_hresult(WINRT_SHIM(INotesWindowManagerPreviewStatics)->abi_GetForCurrentApp(put_abi(current))); return current; } @@ -422,3 +444,68 @@ inline Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview Note } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::INotePlacementChangedPreviewEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::INoteVisibilityChangedPreviewEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreviewStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::NotePlacementChangedPreviewEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::NoteVisibilityChangedPreviewEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Core.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Core.h index 60975e01b..13025db10 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Core.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Resources.Core.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out uri) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out uri) noexcept override { try { - *uri = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *uri = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : } } - HRESULT __stdcall get_Candidates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Candidates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Candidates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Candidates()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : } } - HRESULT __stdcall abi_Resolve(abi_arg_out result) noexcept override + HRESULT __stdcall abi_Resolve(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Resolve()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Resolve()); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce : } } - HRESULT __stdcall abi_ResolveForContext(abi_arg_in resourceContext, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ResolveForContext(impl::abi_arg_in resourceContext, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Resolve(*reinterpret_cast(&resourceContext))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Resolve(*reinterpret_cast(&resourceContext))); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : } } - HRESULT __stdcall abi_ResolveAll(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ResolveAll(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ResolveAll()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResolveAll()); return S_OK; } catch (...) @@ -86,11 +94,12 @@ struct produce : } } - HRESULT __stdcall abi_ResolveAllForContext(abi_arg_in resourceContext, abi_arg_out> instances) noexcept override + HRESULT __stdcall abi_ResolveAllForContext(impl::abi_arg_in resourceContext, impl::abi_arg_out> instances) noexcept override { try { - *instances = detach(this->shim().ResolveAll(*reinterpret_cast(&resourceContext))); + typename D::abi_guard guard(this->shim()); + *instances = detach_abi(this->shim().ResolveAll(*reinterpret_cast(&resourceContext))); return S_OK; } catch (...) @@ -104,11 +113,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Qualifiers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Qualifiers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Qualifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Qualifiers()); return S_OK; } catch (...) @@ -122,7 +132,8 @@ struct produceshim().IsMatch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMatch()); return S_OK; } catch (...) @@ -135,7 +146,8 @@ struct produceshim().IsMatchAsDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMatchAsDefault()); return S_OK; } catch (...) @@ -148,7 +160,8 @@ struct produceshim().IsDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDefault()); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_ValueAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ValueAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ValueAsString()); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetValueAsFileAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetValueAsFileAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetValueAsFileAsync()); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce qualifierName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetQualifierValue(impl::abi_arg_in qualifierName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetQualifierValue(*reinterpret_cast(&qualifierName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetQualifierValue(*reinterpret_cast(&qualifierName))); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetValueAsStreamAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetValueAsStreamAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetValueAsStreamAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetValueAsStreamAsync()); return S_OK; } catch (...) @@ -221,11 +238,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QualifierValues(abi_arg_out> value) noexcept override + HRESULT __stdcall get_QualifierValues(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().QualifierValues()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualifierValues()); return S_OK; } catch (...) @@ -239,6 +257,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(); return S_OK; } @@ -248,10 +267,11 @@ struct produce } } - HRESULT __stdcall abi_ResetQualifierValues(abi_arg_in> qualifierNames) noexcept override + HRESULT __stdcall abi_ResetQualifierValues(impl::abi_arg_in> qualifierNames) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(*reinterpret_cast *>(&qualifierNames)); return S_OK; } @@ -261,10 +281,11 @@ struct produce } } - HRESULT __stdcall abi_OverrideToMatch(abi_arg_in> result) noexcept override + HRESULT __stdcall abi_OverrideToMatch(impl::abi_arg_in> result) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OverrideToMatch(*reinterpret_cast *>(&result)); return S_OK; } @@ -274,11 +295,12 @@ struct produce } } - HRESULT __stdcall abi_Clone(abi_arg_out clone) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out clone) noexcept override { try { - *clone = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *clone = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -288,11 +310,12 @@ struct produce } } - HRESULT __stdcall get_Languages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -302,10 +325,11 @@ struct produce } } - HRESULT __stdcall put_Languages(abi_arg_in> languages) noexcept override + HRESULT __stdcall put_Languages(impl::abi_arg_in> languages) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Languages(*reinterpret_cast *>(&languages)); return S_OK; } @@ -319,11 +343,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateMatchingContext(abi_arg_in> result, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMatchingContext(impl::abi_arg_in> result, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMatchingContext(*reinterpret_cast *>(&result))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMatchingContext(*reinterpret_cast *>(&result))); return S_OK; } catch (...) @@ -337,11 +362,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -351,10 +377,11 @@ struct produce key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetGlobalQualifierValue(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetGlobalQualifierValue(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -368,6 +395,7 @@ struct produceshim()); this->shim().ResetGlobalQualifierValues(); return S_OK; } @@ -377,10 +405,11 @@ struct produce> qualifierNames) noexcept override + HRESULT __stdcall abi_ResetGlobalQualifierValuesForSpecifiedQualifiers(impl::abi_arg_in> qualifierNames) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ResetGlobalQualifierValues(*reinterpret_cast *>(&qualifierNames)); return S_OK; } @@ -390,11 +419,12 @@ struct produce loader) noexcept override + HRESULT __stdcall abi_GetForViewIndependentUse(impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForViewIndependentUse()); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForViewIndependentUse()); return S_OK; } catch (...) @@ -408,10 +438,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetGlobalQualifierValueWithPersistence(abi_arg_in key, abi_arg_in value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) noexcept override + HRESULT __stdcall abi_SetGlobalQualifierValueWithPersistence(impl::abi_arg_in key, impl::abi_arg_in value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetGlobalQualifierValue(*reinterpret_cast(&key), *reinterpret_cast(&value), persistence); return S_OK; } @@ -425,11 +456,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MainResourceMap(abi_arg_out value) noexcept override + HRESULT __stdcall get_MainResourceMap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MainResourceMap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MainResourceMap()); return S_OK; } catch (...) @@ -439,11 +471,12 @@ struct produce } } - HRESULT __stdcall get_AllResourceMaps(abi_arg_out> maps) noexcept override + HRESULT __stdcall get_AllResourceMaps(impl::abi_arg_out> maps) noexcept override { try { - *maps = detach(this->shim().AllResourceMaps()); + typename D::abi_guard guard(this->shim()); + *maps = detach_abi(this->shim().AllResourceMaps()); return S_OK; } catch (...) @@ -453,11 +486,12 @@ struct produce } } - HRESULT __stdcall get_DefaultContext(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultContext()); return S_OK; } catch (...) @@ -467,10 +501,11 @@ struct produce } } - HRESULT __stdcall abi_LoadPriFiles(abi_arg_in> files) noexcept override + HRESULT __stdcall abi_LoadPriFiles(impl::abi_arg_in> files) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadPriFiles(*reinterpret_cast *>(&files)); return S_OK; } @@ -480,10 +515,11 @@ struct produce } } - HRESULT __stdcall abi_UnloadPriFiles(abi_arg_in> files) noexcept override + HRESULT __stdcall abi_UnloadPriFiles(impl::abi_arg_in> files) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnloadPriFiles(*reinterpret_cast *>(&files)); return S_OK; } @@ -497,11 +533,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetAllNamedResourcesForPackage(abi_arg_in packageName, abi_arg_in resourceLayoutInfo, abi_arg_out> table) noexcept override + HRESULT __stdcall abi_GetAllNamedResourcesForPackage(impl::abi_arg_in packageName, impl::abi_arg_in resourceLayoutInfo, impl::abi_arg_out> table) noexcept override { try { - *table = detach(this->shim().GetAllNamedResourcesForPackage(*reinterpret_cast(&packageName), *reinterpret_cast(&resourceLayoutInfo))); + typename D::abi_guard guard(this->shim()); + *table = detach_abi(this->shim().GetAllNamedResourcesForPackage(*reinterpret_cast(&packageName), *reinterpret_cast(&resourceLayoutInfo))); return S_OK; } catch (...) @@ -511,11 +548,12 @@ struct produce } } - HRESULT __stdcall abi_GetAllSubtreesForPackage(abi_arg_in packageName, abi_arg_in resourceLayoutInfo, abi_arg_out> table) noexcept override + HRESULT __stdcall abi_GetAllSubtreesForPackage(impl::abi_arg_in packageName, impl::abi_arg_in resourceLayoutInfo, impl::abi_arg_out> table) noexcept override { try { - *table = detach(this->shim().GetAllSubtreesForPackage(*reinterpret_cast(&packageName), *reinterpret_cast(&resourceLayoutInfo))); + typename D::abi_guard guard(this->shim()); + *table = detach_abi(this->shim().GetAllSubtreesForPackage(*reinterpret_cast(&packageName), *reinterpret_cast(&resourceLayoutInfo))); return S_OK; } catch (...) @@ -529,11 +567,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -543,11 +582,12 @@ struct produce resourceReference, bool * isReference) noexcept override + HRESULT __stdcall abi_IsResourceReference(impl::abi_arg_in resourceReference, bool * isReference) noexcept override { try { - *isReference = detach(this->shim().IsResourceReference(*reinterpret_cast(&resourceReference))); + typename D::abi_guard guard(this->shim()); + *isReference = detach_abi(this->shim().IsResourceReference(*reinterpret_cast(&resourceReference))); return S_OK; } catch (...) @@ -560,11 +600,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out uri) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out uri) noexcept override { try { - *uri = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *uri = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -574,11 +615,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetValue(abi_arg_in resource, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetValue(impl::abi_arg_in resource, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetValue(*reinterpret_cast(&resource))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetValue(*reinterpret_cast(&resource))); return S_OK; } catch (...) @@ -588,11 +630,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetValueForContext(abi_arg_in resource, abi_arg_in context, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetValueForContext(impl::abi_arg_in resource, impl::abi_arg_in context, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetValue(*reinterpret_cast(&resource), *reinterpret_cast(&context))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetValue(*reinterpret_cast(&resource), *reinterpret_cast(&context))); return S_OK; } catch (...) @@ -602,11 +645,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetSubtree(abi_arg_in reference, abi_arg_out map) noexcept override + HRESULT __stdcall abi_GetSubtree(impl::abi_arg_in reference, impl::abi_arg_out map) noexcept override { try { - *map = detach(this->shim().GetSubtree(*reinterpret_cast(&reference))); + typename D::abi_guard guard(this->shim()); + *map = detach_abi(this->shim().GetSubtree(*reinterpret_cast(&reference))); return S_OK; } catch (...) @@ -620,11 +664,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_QualifierName(abi_arg_out value) noexcept override + HRESULT __stdcall get_QualifierName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QualifierName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualifierName()); return S_OK; } catch (...) @@ -634,11 +679,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_QualifierValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QualifierValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualifierValue()); return S_OK; } catch (...) @@ -652,7 +698,8 @@ struct produceshim().IsDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDefault()); return S_OK; } catch (...) @@ -665,7 +712,8 @@ struct produceshim().IsMatch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMatch()); return S_OK; } catch (...) @@ -678,7 +726,8 @@ struct produceshim().Score()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Score()); return S_OK; } catch (...) @@ -695,302 +744,302 @@ namespace Windows::ApplicationModel::Resources::Core { template Windows::ApplicationModel::Resources::Core::ResourceMap impl_IResourceManager::MainResourceMap() const { Windows::ApplicationModel::Resources::Core::ResourceMap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MainResourceMap(put(value))); + check_hresult(WINRT_SHIM(IResourceManager)->get_MainResourceMap(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IResourceManager::AllResourceMaps() const { Windows::Foundation::Collections::IMapView maps; - check_hresult(static_cast(static_cast(*this))->get_AllResourceMaps(put(maps))); + check_hresult(WINRT_SHIM(IResourceManager)->get_AllResourceMaps(put_abi(maps))); return maps; } template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceManager::DefaultContext() const { Windows::ApplicationModel::Resources::Core::ResourceContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultContext(put(value))); + check_hresult(WINRT_SHIM(IResourceManager)->get_DefaultContext(put_abi(value))); return value; } -template void impl_IResourceManager::LoadPriFiles(const Windows::Foundation::Collections::IIterable & files) const +template void impl_IResourceManager::LoadPriFiles(iterable files) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadPriFiles(get(files))); + check_hresult(WINRT_SHIM(IResourceManager)->abi_LoadPriFiles(get_abi(files))); } -template void impl_IResourceManager::UnloadPriFiles(const Windows::Foundation::Collections::IIterable & files) const +template void impl_IResourceManager::UnloadPriFiles(iterable files) const { - check_hresult(static_cast(static_cast(*this))->abi_UnloadPriFiles(get(files))); + check_hresult(WINRT_SHIM(IResourceManager)->abi_UnloadPriFiles(get_abi(files))); } -template Windows::Foundation::Collections::IVectorView impl_IResourceManager2::GetAllNamedResourcesForPackage(hstring_ref packageName, const Windows::ApplicationModel::Resources::Core::ResourceLayoutInfo & resourceLayoutInfo) const +template Windows::Foundation::Collections::IVectorView impl_IResourceManager2::GetAllNamedResourcesForPackage(hstring_view packageName, const Windows::ApplicationModel::Resources::Core::ResourceLayoutInfo & resourceLayoutInfo) const { Windows::Foundation::Collections::IVectorView table; - check_hresult(static_cast(static_cast(*this))->abi_GetAllNamedResourcesForPackage(get(packageName), get(resourceLayoutInfo), put(table))); + check_hresult(WINRT_SHIM(IResourceManager2)->abi_GetAllNamedResourcesForPackage(get_abi(packageName), get_abi(resourceLayoutInfo), put_abi(table))); return table; } -template Windows::Foundation::Collections::IVectorView impl_IResourceManager2::GetAllSubtreesForPackage(hstring_ref packageName, const Windows::ApplicationModel::Resources::Core::ResourceLayoutInfo & resourceLayoutInfo) const +template Windows::Foundation::Collections::IVectorView impl_IResourceManager2::GetAllSubtreesForPackage(hstring_view packageName, const Windows::ApplicationModel::Resources::Core::ResourceLayoutInfo & resourceLayoutInfo) const { Windows::Foundation::Collections::IVectorView table; - check_hresult(static_cast(static_cast(*this))->abi_GetAllSubtreesForPackage(get(packageName), get(resourceLayoutInfo), put(table))); + check_hresult(WINRT_SHIM(IResourceManager2)->abi_GetAllSubtreesForPackage(get_abi(packageName), get_abi(resourceLayoutInfo), put_abi(table))); return table; } template Windows::ApplicationModel::Resources::Core::ResourceManager impl_IResourceManagerStatics::Current() const { Windows::ApplicationModel::Resources::Core::ResourceManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IResourceManagerStatics)->get_Current(put_abi(value))); return value; } -template bool impl_IResourceManagerStatics::IsResourceReference(hstring_ref resourceReference) const +template bool impl_IResourceManagerStatics::IsResourceReference(hstring_view resourceReference) const { bool isReference {}; - check_hresult(static_cast(static_cast(*this))->abi_IsResourceReference(get(resourceReference), &isReference)); + check_hresult(WINRT_SHIM(IResourceManagerStatics)->abi_IsResourceReference(get_abi(resourceReference), &isReference)); return isReference; } template hstring impl_IResourceQualifier::QualifierName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QualifierName(put(value))); + check_hresult(WINRT_SHIM(IResourceQualifier)->get_QualifierName(put_abi(value))); return value; } template hstring impl_IResourceQualifier::QualifierValue() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QualifierValue(put(value))); + check_hresult(WINRT_SHIM(IResourceQualifier)->get_QualifierValue(put_abi(value))); return value; } template bool impl_IResourceQualifier::IsDefault() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDefault(&value)); + check_hresult(WINRT_SHIM(IResourceQualifier)->get_IsDefault(&value)); return value; } template bool impl_IResourceQualifier::IsMatch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMatch(&value)); + check_hresult(WINRT_SHIM(IResourceQualifier)->get_IsMatch(&value)); return value; } template double impl_IResourceQualifier::Score() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Score(&value)); + check_hresult(WINRT_SHIM(IResourceQualifier)->get_Score(&value)); return value; } template Windows::Foundation::Collections::IObservableMap impl_IResourceContext::QualifierValues() const { Windows::Foundation::Collections::IObservableMap value; - check_hresult(static_cast(static_cast(*this))->get_QualifierValues(put(value))); + check_hresult(WINRT_SHIM(IResourceContext)->get_QualifierValues(put_abi(value))); return value; } template void impl_IResourceContext::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IResourceContext)->abi_Reset()); } -template void impl_IResourceContext::Reset(const Windows::Foundation::Collections::IIterable & qualifierNames) const +template void impl_IResourceContext::Reset(iterable qualifierNames) const { - check_hresult(static_cast(static_cast(*this))->abi_ResetQualifierValues(get(qualifierNames))); + check_hresult(WINRT_SHIM(IResourceContext)->abi_ResetQualifierValues(get_abi(qualifierNames))); } -template void impl_IResourceContext::OverrideToMatch(const Windows::Foundation::Collections::IIterable & result) const +template void impl_IResourceContext::OverrideToMatch(iterable result) const { - check_hresult(static_cast(static_cast(*this))->abi_OverrideToMatch(get(result))); + check_hresult(WINRT_SHIM(IResourceContext)->abi_OverrideToMatch(get_abi(result))); } template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceContext::Clone() const { Windows::ApplicationModel::Resources::Core::ResourceContext clone { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(clone))); + check_hresult(WINRT_SHIM(IResourceContext)->abi_Clone(put_abi(clone))); return clone; } template Windows::Foundation::Collections::IVectorView impl_IResourceContext::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(IResourceContext)->get_Languages(put_abi(value))); return value; } template void impl_IResourceContext::Languages(const Windows::Foundation::Collections::IVectorView & languages) const { - check_hresult(static_cast(static_cast(*this))->put_Languages(get(languages))); + check_hresult(WINRT_SHIM(IResourceContext)->put_Languages(get_abi(languages))); } -template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceContextStatics::CreateMatchingContext(const Windows::Foundation::Collections::IIterable & result) const +template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceContextStatics::CreateMatchingContext(iterable result) const { Windows::ApplicationModel::Resources::Core::ResourceContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMatchingContext(get(result), put(value))); + check_hresult(WINRT_SHIM(IResourceContextStatics)->abi_CreateMatchingContext(get_abi(result), put_abi(value))); return value; } template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceContextStatics2::GetForCurrentView() const { Windows::ApplicationModel::Resources::Core::ResourceContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(IResourceContextStatics2)->abi_GetForCurrentView(put_abi(value))); return value; } -template void impl_IResourceContextStatics2::SetGlobalQualifierValue(hstring_ref key, hstring_ref value) const +template void impl_IResourceContextStatics2::SetGlobalQualifierValue(hstring_view key, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetGlobalQualifierValue(get(key), get(value))); + check_hresult(WINRT_SHIM(IResourceContextStatics2)->abi_SetGlobalQualifierValue(get_abi(key), get_abi(value))); } template void impl_IResourceContextStatics2::ResetGlobalQualifierValues() const { - check_hresult(static_cast(static_cast(*this))->abi_ResetGlobalQualifierValues()); + check_hresult(WINRT_SHIM(IResourceContextStatics2)->abi_ResetGlobalQualifierValues()); } -template void impl_IResourceContextStatics2::ResetGlobalQualifierValues(const Windows::Foundation::Collections::IIterable & qualifierNames) const +template void impl_IResourceContextStatics2::ResetGlobalQualifierValues(iterable qualifierNames) const { - check_hresult(static_cast(static_cast(*this))->abi_ResetGlobalQualifierValuesForSpecifiedQualifiers(get(qualifierNames))); + check_hresult(WINRT_SHIM(IResourceContextStatics2)->abi_ResetGlobalQualifierValuesForSpecifiedQualifiers(get_abi(qualifierNames))); } template Windows::ApplicationModel::Resources::Core::ResourceContext impl_IResourceContextStatics2::GetForViewIndependentUse() const { Windows::ApplicationModel::Resources::Core::ResourceContext loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForViewIndependentUse(put(loader))); + check_hresult(WINRT_SHIM(IResourceContextStatics2)->abi_GetForViewIndependentUse(put_abi(loader))); return loader; } -template void impl_IResourceContextStatics3::SetGlobalQualifierValue(hstring_ref key, hstring_ref value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) const +template void impl_IResourceContextStatics3::SetGlobalQualifierValue(hstring_view key, hstring_view value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) const { - check_hresult(static_cast(static_cast(*this))->abi_SetGlobalQualifierValueWithPersistence(get(key), get(value), persistence)); + check_hresult(WINRT_SHIM(IResourceContextStatics3)->abi_SetGlobalQualifierValueWithPersistence(get_abi(key), get_abi(value), persistence)); } template Windows::Foundation::Collections::IVectorView impl_IResourceCandidate::Qualifiers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Qualifiers(put(value))); + check_hresult(WINRT_SHIM(IResourceCandidate)->get_Qualifiers(put_abi(value))); return value; } template bool impl_IResourceCandidate::IsMatch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMatch(&value)); + check_hresult(WINRT_SHIM(IResourceCandidate)->get_IsMatch(&value)); return value; } template bool impl_IResourceCandidate::IsMatchAsDefault() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMatchAsDefault(&value)); + check_hresult(WINRT_SHIM(IResourceCandidate)->get_IsMatchAsDefault(&value)); return value; } template bool impl_IResourceCandidate::IsDefault() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDefault(&value)); + check_hresult(WINRT_SHIM(IResourceCandidate)->get_IsDefault(&value)); return value; } template hstring impl_IResourceCandidate::ValueAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->get_ValueAsString(put(result))); + check_hresult(WINRT_SHIM(IResourceCandidate)->get_ValueAsString(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IResourceCandidate::GetValueAsFileAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetValueAsFileAsync(put(operation))); + check_hresult(WINRT_SHIM(IResourceCandidate)->abi_GetValueAsFileAsync(put_abi(operation))); return operation; } -template hstring impl_IResourceCandidate::GetQualifierValue(hstring_ref qualifierName) const +template hstring impl_IResourceCandidate::GetQualifierValue(hstring_view qualifierName) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetQualifierValue(get(qualifierName), put(value))); + check_hresult(WINRT_SHIM(IResourceCandidate)->abi_GetQualifierValue(get_abi(qualifierName), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IResourceCandidate2::GetValueAsStreamAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetValueAsStreamAsync(put(operation))); + check_hresult(WINRT_SHIM(IResourceCandidate2)->abi_GetValueAsStreamAsync(put_abi(operation))); return operation; } template Windows::Foundation::Uri impl_INamedResource::Uri() const { Windows::Foundation::Uri uri { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(uri))); + check_hresult(WINRT_SHIM(INamedResource)->get_Uri(put_abi(uri))); return uri; } template Windows::Foundation::Collections::IVectorView impl_INamedResource::Candidates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Candidates(put(value))); + check_hresult(WINRT_SHIM(INamedResource)->get_Candidates(put_abi(value))); return value; } template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_INamedResource::Resolve() const { Windows::ApplicationModel::Resources::Core::ResourceCandidate result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Resolve(put(result))); + check_hresult(WINRT_SHIM(INamedResource)->abi_Resolve(put_abi(result))); return result; } template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_INamedResource::Resolve(const Windows::ApplicationModel::Resources::Core::ResourceContext & resourceContext) const { Windows::ApplicationModel::Resources::Core::ResourceCandidate result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ResolveForContext(get(resourceContext), put(result))); + check_hresult(WINRT_SHIM(INamedResource)->abi_ResolveForContext(get_abi(resourceContext), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_INamedResource::ResolveAll() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_ResolveAll(put(result))); + check_hresult(WINRT_SHIM(INamedResource)->abi_ResolveAll(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_INamedResource::ResolveAll(const Windows::ApplicationModel::Resources::Core::ResourceContext & resourceContext) const { Windows::Foundation::Collections::IVectorView instances; - check_hresult(static_cast(static_cast(*this))->abi_ResolveAllForContext(get(resourceContext), put(instances))); + check_hresult(WINRT_SHIM(INamedResource)->abi_ResolveAllForContext(get_abi(resourceContext), put_abi(instances))); return instances; } template Windows::Foundation::Uri impl_IResourceMap::Uri() const { Windows::Foundation::Uri uri { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(uri))); + check_hresult(WINRT_SHIM(IResourceMap)->get_Uri(put_abi(uri))); return uri; } -template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_IResourceMap::GetValue(hstring_ref resource) const +template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_IResourceMap::GetValue(hstring_view resource) const { Windows::ApplicationModel::Resources::Core::ResourceCandidate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetValue(get(resource), put(value))); + check_hresult(WINRT_SHIM(IResourceMap)->abi_GetValue(get_abi(resource), put_abi(value))); return value; } -template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_IResourceMap::GetValue(hstring_ref resource, const Windows::ApplicationModel::Resources::Core::ResourceContext & context) const +template Windows::ApplicationModel::Resources::Core::ResourceCandidate impl_IResourceMap::GetValue(hstring_view resource, const Windows::ApplicationModel::Resources::Core::ResourceContext & context) const { Windows::ApplicationModel::Resources::Core::ResourceCandidate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetValueForContext(get(resource), get(context), put(value))); + check_hresult(WINRT_SHIM(IResourceMap)->abi_GetValueForContext(get_abi(resource), get_abi(context), put_abi(value))); return value; } -template Windows::ApplicationModel::Resources::Core::ResourceMap impl_IResourceMap::GetSubtree(hstring_ref reference) const +template Windows::ApplicationModel::Resources::Core::ResourceMap impl_IResourceMap::GetSubtree(hstring_view reference) const { Windows::ApplicationModel::Resources::Core::ResourceMap map { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSubtree(get(reference), put(map))); + check_hresult(WINRT_SHIM(IResourceMap)->abi_GetSubtree(get_abi(reference), put_abi(map))); return map; } @@ -998,7 +1047,7 @@ inline ResourceContext::ResourceContext() : ResourceContext(activate_instance()) {} -inline Windows::ApplicationModel::Resources::Core::ResourceContext ResourceContext::CreateMatchingContext(const Windows::Foundation::Collections::IIterable & result) +inline Windows::ApplicationModel::Resources::Core::ResourceContext ResourceContext::CreateMatchingContext(iterable result) { return get_activation_factory().CreateMatchingContext(result); } @@ -1008,7 +1057,7 @@ inline Windows::ApplicationModel::Resources::Core::ResourceContext ResourceConte return get_activation_factory().GetForCurrentView(); } -inline void ResourceContext::SetGlobalQualifierValue(hstring_ref key, hstring_ref value) +inline void ResourceContext::SetGlobalQualifierValue(hstring_view key, hstring_view value) { get_activation_factory().SetGlobalQualifierValue(key, value); } @@ -1018,7 +1067,7 @@ inline void ResourceContext::ResetGlobalQualifierValues() get_activation_factory().ResetGlobalQualifierValues(); } -inline void ResourceContext::ResetGlobalQualifierValues(const Windows::Foundation::Collections::IIterable & qualifierNames) +inline void ResourceContext::ResetGlobalQualifierValues(iterable qualifierNames) { get_activation_factory().ResetGlobalQualifierValues(qualifierNames); } @@ -1028,7 +1077,7 @@ inline Windows::ApplicationModel::Resources::Core::ResourceContext ResourceConte return get_activation_factory().GetForViewIndependentUse(); } -inline void ResourceContext::SetGlobalQualifierValue(hstring_ref key, hstring_ref value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) +inline void ResourceContext::SetGlobalQualifierValue(hstring_view key, hstring_view value, Windows::ApplicationModel::Resources::Core::ResourceQualifierPersistence persistence) { get_activation_factory().SetGlobalQualifierValue(key, value, persistence); } @@ -1038,7 +1087,7 @@ inline Windows::ApplicationModel::Resources::Core::ResourceManager ResourceManag return get_activation_factory().Current(); } -inline bool ResourceManager::IsResourceReference(hstring_ref resourceReference) +inline bool ResourceManager::IsResourceReference(hstring_view resourceReference) { return get_activation_factory().IsResourceReference(resourceReference); } @@ -1046,3 +1095,239 @@ inline bool ResourceManager::IsResourceReference(hstring_ref resourceReference) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::INamedResource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceCandidate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceCandidate2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceContextStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceContextStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceContextStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::IResourceQualifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::NamedResource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceCandidate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceCandidateVectorView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceContextLanguagesVectorView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceMapIterator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceMapMapView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceMapMapViewIterator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceQualifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceQualifierMapView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceQualifierObservableMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Core::ResourceQualifierVectorView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Management.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Management.h index 693f70bc9..fc000b338 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Management.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.Management.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.ApplicationModel.Resources.Management.3.h" @@ -19,7 +22,8 @@ struct produceshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Metadata(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Metadata()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Metadata()); return S_OK; } catch (...) @@ -56,11 +62,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Qualifiers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Qualifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Qualifiers()); return S_OK; } catch (...) @@ -70,11 +77,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ValueAsString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValueAsString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValueAsString()); return S_OK; } catch (...) @@ -84,11 +92,12 @@ struct produce qualifierName, abi_arg_out qualifierValue) noexcept override + HRESULT __stdcall abi_GetQualifierValue(impl::abi_arg_in qualifierName, impl::abi_arg_out qualifierValue) noexcept override { try { - *qualifierValue = detach(this->shim().GetQualifierValue(*reinterpret_cast(&qualifierName))); + typename D::abi_guard guard(this->shim()); + *qualifierValue = detach_abi(this->shim().GetQualifierValue(*reinterpret_cast(&qualifierName))); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QualifierName(abi_arg_out value) noexcept override + HRESULT __stdcall get_QualifierName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QualifierName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualifierName()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_QualifierValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QualifierValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualifierValue()); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_IndexFilePath(abi_arg_in filePath, abi_arg_out candidate) noexcept override + HRESULT __stdcall abi_IndexFilePath(impl::abi_arg_in filePath, impl::abi_arg_out candidate) noexcept override { try { - *candidate = detach(this->shim().IndexFilePath(*reinterpret_cast(&filePath))); + typename D::abi_guard guard(this->shim()); + *candidate = detach_abi(this->shim().IndexFilePath(*reinterpret_cast(&filePath))); return S_OK; } catch (...) @@ -148,11 +160,12 @@ struct produce file, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_IndexFileContentsAsync(impl::abi_arg_in file, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().IndexFileContentsAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().IndexFileContentsAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -166,11 +179,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateResourceIndexer(abi_arg_in projectRoot, abi_arg_out indexer) noexcept override + HRESULT __stdcall abi_CreateResourceIndexer(impl::abi_arg_in projectRoot, impl::abi_arg_out indexer) noexcept override { try { - *indexer = detach(this->shim().CreateResourceIndexer(*reinterpret_cast(&projectRoot))); + typename D::abi_guard guard(this->shim()); + *indexer = detach_abi(this->shim().CreateResourceIndexer(*reinterpret_cast(&projectRoot))); return S_OK; } catch (...) @@ -184,11 +198,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateResourceIndexerWithExtension(abi_arg_in projectRoot, abi_arg_in extensionDllPath, abi_arg_out indexer) noexcept override + HRESULT __stdcall abi_CreateResourceIndexerWithExtension(impl::abi_arg_in projectRoot, impl::abi_arg_in extensionDllPath, impl::abi_arg_out indexer) noexcept override { try { - *indexer = detach(this->shim().CreateResourceIndexerWithExtension(*reinterpret_cast(&projectRoot), *reinterpret_cast(&extensionDllPath))); + typename D::abi_guard guard(this->shim()); + *indexer = detach_abi(this->shim().CreateResourceIndexerWithExtension(*reinterpret_cast(&projectRoot), *reinterpret_cast(&extensionDllPath))); return S_OK; } catch (...) @@ -206,84 +221,84 @@ namespace Windows::ApplicationModel::Resources::Management { template Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate impl_IResourceIndexer::IndexFilePath(const Windows::Foundation::Uri & filePath) const { Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate candidate { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_IndexFilePath(get(filePath), put(candidate))); + check_hresult(WINRT_SHIM(IResourceIndexer)->abi_IndexFilePath(get_abi(filePath), put_abi(candidate))); return candidate; } template Windows::Foundation::IAsyncOperation> impl_IResourceIndexer::IndexFileContentsAsync(const Windows::Foundation::Uri & file) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_IndexFileContentsAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IResourceIndexer)->abi_IndexFileContentsAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::ApplicationModel::Resources::Management::ResourceIndexer impl_IResourceIndexerFactory::CreateResourceIndexer(const Windows::Foundation::Uri & projectRoot) const { Windows::ApplicationModel::Resources::Management::ResourceIndexer indexer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResourceIndexer(get(projectRoot), put(indexer))); + check_hresult(WINRT_SHIM(IResourceIndexerFactory)->abi_CreateResourceIndexer(get_abi(projectRoot), put_abi(indexer))); return indexer; } template Windows::ApplicationModel::Resources::Management::ResourceIndexer impl_IResourceIndexerFactory2::CreateResourceIndexerWithExtension(const Windows::Foundation::Uri & projectRoot, const Windows::Foundation::Uri & extensionDllPath) const { Windows::ApplicationModel::Resources::Management::ResourceIndexer indexer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResourceIndexerWithExtension(get(projectRoot), get(extensionDllPath), put(indexer))); + check_hresult(WINRT_SHIM(IResourceIndexerFactory2)->abi_CreateResourceIndexerWithExtension(get_abi(projectRoot), get_abi(extensionDllPath), put_abi(indexer))); return indexer; } template hstring impl_IIndexedResourceQualifier::QualifierName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QualifierName(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceQualifier)->get_QualifierName(put_abi(value))); return value; } template hstring impl_IIndexedResourceQualifier::QualifierValue() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QualifierValue(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceQualifier)->get_QualifierValue(put_abi(value))); return value; } template Windows::ApplicationModel::Resources::Management::IndexedResourceType impl_IIndexedResourceCandidate::Type() const { Windows::ApplicationModel::Resources::Management::IndexedResourceType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->get_Type(&value)); return value; } template Windows::Foundation::Uri impl_IIndexedResourceCandidate::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IIndexedResourceCandidate::Metadata() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Metadata(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->get_Metadata(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IIndexedResourceCandidate::Qualifiers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Qualifiers(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->get_Qualifiers(put_abi(value))); return value; } template hstring impl_IIndexedResourceCandidate::ValueAsString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ValueAsString(put(value))); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->get_ValueAsString(put_abi(value))); return value; } -template hstring impl_IIndexedResourceCandidate::GetQualifierValue(hstring_ref qualifierName) const +template hstring impl_IIndexedResourceCandidate::GetQualifierValue(hstring_view qualifierName) const { hstring qualifierValue; - check_hresult(static_cast(static_cast(*this))->abi_GetQualifierValue(get(qualifierName), put(qualifierValue))); + check_hresult(WINRT_SHIM(IIndexedResourceCandidate)->abi_GetQualifierValue(get_abi(qualifierName), put_abi(qualifierValue))); return qualifierValue; } @@ -298,3 +313,77 @@ inline ResourceIndexer::ResourceIndexer(const Windows::Foundation::Uri & project } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IIndexedResourceCandidate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IIndexedResourceQualifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IResourceIndexer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IResourceIndexerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IResourceIndexerFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::Management::ResourceIndexer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.h index a47c2286d..645e5fda0 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Resources.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Resources.3.h" #include "Windows.ApplicationModel.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetString(abi_arg_in resource, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetString(impl::abi_arg_in resource, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetString(*reinterpret_cast(&resource))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetString(*reinterpret_cast(&resource))); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetStringForUri(abi_arg_in uri, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetStringForUri(impl::abi_arg_in uri, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetStringForUri(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetStringForUri(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -50,11 +55,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateResourceLoaderByName(abi_arg_in name, abi_arg_out loader) noexcept override + HRESULT __stdcall abi_CreateResourceLoaderByName(impl::abi_arg_in name, impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().CreateResourceLoaderByName(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().CreateResourceLoaderByName(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -68,11 +74,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetStringForReference(abi_arg_in uri, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetStringForReference(impl::abi_arg_in uri, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetStringForReference(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetStringForReference(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -86,11 +93,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out loader) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -100,11 +108,12 @@ struct produce } } - HRESULT __stdcall abi_GetForCurrentViewWithName(abi_arg_in name, abi_arg_out loader) noexcept override + HRESULT __stdcall abi_GetForCurrentViewWithName(impl::abi_arg_in name, impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForCurrentView(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForCurrentView(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -114,11 +123,12 @@ struct produce } } - HRESULT __stdcall abi_GetForViewIndependentUse(abi_arg_out loader) noexcept override + HRESULT __stdcall abi_GetForViewIndependentUse(impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForViewIndependentUse()); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForViewIndependentUse()); return S_OK; } catch (...) @@ -128,11 +138,12 @@ struct produce } } - HRESULT __stdcall abi_GetForViewIndependentUseWithName(abi_arg_in name, abi_arg_out loader) noexcept override + HRESULT __stdcall abi_GetForViewIndependentUseWithName(impl::abi_arg_in name, impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForViewIndependentUse(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForViewIndependentUse(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -147,59 +158,59 @@ struct produce namespace Windows::ApplicationModel::Resources { -template hstring impl_IResourceLoader::GetString(hstring_ref resource) const +template hstring impl_IResourceLoader::GetString(hstring_view resource) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetString(get(resource), put(value))); + check_hresult(WINRT_SHIM(IResourceLoader)->abi_GetString(get_abi(resource), put_abi(value))); return value; } template hstring impl_IResourceLoader2::GetStringForUri(const Windows::Foundation::Uri & uri) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetStringForUri(get(uri), put(value))); + check_hresult(WINRT_SHIM(IResourceLoader2)->abi_GetStringForUri(get_abi(uri), put_abi(value))); return value; } template hstring impl_IResourceLoaderStatics::GetStringForReference(const Windows::Foundation::Uri & uri) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetStringForReference(get(uri), put(value))); + check_hresult(WINRT_SHIM(IResourceLoaderStatics)->abi_GetStringForReference(get_abi(uri), put_abi(value))); return value; } template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForCurrentView() const { Windows::ApplicationModel::Resources::ResourceLoader loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(loader))); + check_hresult(WINRT_SHIM(IResourceLoaderStatics2)->abi_GetForCurrentView(put_abi(loader))); return loader; } -template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForCurrentView(hstring_ref name) const +template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForCurrentView(hstring_view name) const { Windows::ApplicationModel::Resources::ResourceLoader loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentViewWithName(get(name), put(loader))); + check_hresult(WINRT_SHIM(IResourceLoaderStatics2)->abi_GetForCurrentViewWithName(get_abi(name), put_abi(loader))); return loader; } template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForViewIndependentUse() const { Windows::ApplicationModel::Resources::ResourceLoader loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForViewIndependentUse(put(loader))); + check_hresult(WINRT_SHIM(IResourceLoaderStatics2)->abi_GetForViewIndependentUse(put_abi(loader))); return loader; } -template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForViewIndependentUse(hstring_ref name) const +template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderStatics2::GetForViewIndependentUse(hstring_view name) const { Windows::ApplicationModel::Resources::ResourceLoader loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForViewIndependentUseWithName(get(name), put(loader))); + check_hresult(WINRT_SHIM(IResourceLoaderStatics2)->abi_GetForViewIndependentUseWithName(get_abi(name), put_abi(loader))); return loader; } -template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderFactory::CreateResourceLoaderByName(hstring_ref name) const +template Windows::ApplicationModel::Resources::ResourceLoader impl_IResourceLoaderFactory::CreateResourceLoaderByName(hstring_view name) const { Windows::ApplicationModel::Resources::ResourceLoader loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResourceLoaderByName(get(name), put(loader))); + check_hresult(WINRT_SHIM(IResourceLoaderFactory)->abi_CreateResourceLoaderByName(get_abi(name), put_abi(loader))); return loader; } @@ -207,7 +218,7 @@ inline ResourceLoader::ResourceLoader() : ResourceLoader(activate_instance()) {} -inline ResourceLoader::ResourceLoader(hstring_ref name) : +inline ResourceLoader::ResourceLoader(hstring_view name) : ResourceLoader(get_activation_factory().CreateResourceLoaderByName(name)) {} @@ -221,7 +232,7 @@ inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetF return get_activation_factory().GetForCurrentView(); } -inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetForCurrentView(hstring_ref name) +inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetForCurrentView(hstring_view name) { return get_activation_factory().GetForCurrentView(name); } @@ -231,7 +242,7 @@ inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetF return get_activation_factory().GetForViewIndependentUse(); } -inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetForViewIndependentUse(hstring_ref name) +inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetForViewIndependentUse(hstring_view name) { return get_activation_factory().GetForViewIndependentUse(name); } @@ -239,3 +250,59 @@ inline Windows::ApplicationModel::Resources::ResourceLoader ResourceLoader::GetF } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::IResourceLoader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::IResourceLoader2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::IResourceLoaderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::IResourceLoaderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::IResourceLoaderStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Resources::ResourceLoader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Search.Core.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Search.Core.h index 96e2d2763..b8dd7f0c2 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Search.Core.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Search.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.ApplicationModel.Search.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -25,7 +28,8 @@ struct produce : { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce : } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce : } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : } } - HRESULT __stdcall get_DetailText(abi_arg_out value) noexcept override + HRESULT __stdcall get_DetailText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DetailText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetailText()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : } } - HRESULT __stdcall get_Image(abi_arg_out value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : } } - HRESULT __stdcall get_ImageAlternateText(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageAlternateText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageAlternateText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageAlternateText()); return S_OK; } catch (...) @@ -112,7 +121,8 @@ struct produceshim().SearchHistoryEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryEnabled()); return S_OK; } catch (...) @@ -125,6 +135,7 @@ struct produceshim()); this->shim().SearchHistoryEnabled(value); return S_OK; } @@ -134,11 +145,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SearchHistoryContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchHistoryContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryContext()); return S_OK; } catch (...) @@ -148,10 +160,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SearchHistoryContext(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchHistoryContext(*reinterpret_cast(&value)); return S_OK; } @@ -161,10 +174,11 @@ struct produce settings) noexcept override + HRESULT __stdcall abi_SetLocalContentSuggestionSettings(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocalContentSuggestionSettings(*reinterpret_cast(&settings)); return S_OK; } @@ -174,10 +188,11 @@ struct produce queryText) noexcept override + HRESULT __stdcall abi_SetQuery(impl::abi_arg_in queryText) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetQuery(*reinterpret_cast(&queryText)); return S_OK; } @@ -187,10 +202,11 @@ struct produce queryText, abi_arg_in language) noexcept override + HRESULT __stdcall abi_SetQueryWithLanguage(impl::abi_arg_in queryText, impl::abi_arg_in language) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetQuery(*reinterpret_cast(&queryText), *reinterpret_cast(&language)); return S_OK; } @@ -200,10 +216,11 @@ struct produce queryText, abi_arg_in language, abi_arg_in linguisticDetails) noexcept override + HRESULT __stdcall abi_SetQueryWithSearchQueryLinguisticDetails(impl::abi_arg_in queryText, impl::abi_arg_in language, impl::abi_arg_in linguisticDetails) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetQuery(*reinterpret_cast(&queryText), *reinterpret_cast(&language), *reinterpret_cast(&linguisticDetails)); return S_OK; } @@ -213,11 +230,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Suggestions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Suggestions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Suggestions()); return S_OK; } catch (...) @@ -227,10 +245,11 @@ struct produce queryText) noexcept override + HRESULT __stdcall abi_AddToHistory(impl::abi_arg_in queryText) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddToHistory(*reinterpret_cast(&queryText)); return S_OK; } @@ -240,10 +259,11 @@ struct produce queryText, abi_arg_in language) noexcept override + HRESULT __stdcall abi_AddToHistoryWithLanguage(impl::abi_arg_in queryText, impl::abi_arg_in language) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddToHistory(*reinterpret_cast(&queryText), *reinterpret_cast(&language)); return S_OK; } @@ -257,6 +277,7 @@ struct produceshim()); this->shim().ClearHistory(); return S_OK; } @@ -266,11 +287,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SuggestionsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SuggestionsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SuggestionsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -283,6 +305,7 @@ struct produceshim()); this->shim().SuggestionsRequested(token); return S_OK; } @@ -292,11 +315,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_RequestingFocusOnKeyboardInput(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RequestingFocusOnKeyboardInput(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RequestingFocusOnKeyboardInput(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -309,6 +333,7 @@ struct produceshim()); this->shim().RequestingFocusOnKeyboardInput(token); return S_OK; } @@ -322,11 +347,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -336,11 +362,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -350,11 +377,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -364,11 +392,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -386,143 +415,143 @@ namespace Windows::ApplicationModel::Search::Core { template Windows::ApplicationModel::Search::Core::SearchSuggestionKind impl_ISearchSuggestion::Kind() const { Windows::ApplicationModel::Search::Core::SearchSuggestionKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_Kind(&value)); return value; } template hstring impl_ISearchSuggestion::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_Text(put_abi(value))); return value; } template hstring impl_ISearchSuggestion::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_Tag(put_abi(value))); return value; } template hstring impl_ISearchSuggestion::DetailText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DetailText(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_DetailText(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_ISearchSuggestion::Image() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_Image(put_abi(value))); return value; } template hstring impl_ISearchSuggestion::ImageAlternateText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ImageAlternateText(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestion)->get_ImageAlternateText(put_abi(value))); return value; } template hstring impl_ISearchSuggestionsRequestedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequestedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchSuggestionsRequestedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequestedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchSuggestionsRequestedEventArgs::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequestedEventArgs)->get_LinguisticDetails(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchSuggestionsRequest impl_ISearchSuggestionsRequestedEventArgs::Request() const { Windows::ApplicationModel::Search::SearchSuggestionsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequestedEventArgs)->get_Request(put_abi(value))); return value; } template bool impl_ISearchSuggestionManager::SearchHistoryEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryEnabled(&value)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->get_SearchHistoryEnabled(&value)); return value; } template void impl_ISearchSuggestionManager::SearchHistoryEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryEnabled(value)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->put_SearchHistoryEnabled(value)); } template hstring impl_ISearchSuggestionManager::SearchHistoryContext() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryContext(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->get_SearchHistoryContext(put_abi(value))); return value; } -template void impl_ISearchSuggestionManager::SearchHistoryContext(hstring_ref value) const +template void impl_ISearchSuggestionManager::SearchHistoryContext(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryContext(get(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->put_SearchHistoryContext(get_abi(value))); } template void impl_ISearchSuggestionManager::SetLocalContentSuggestionSettings(const Windows::ApplicationModel::Search::LocalContentSuggestionSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocalContentSuggestionSettings(get(settings))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_SetLocalContentSuggestionSettings(get_abi(settings))); } -template void impl_ISearchSuggestionManager::SetQuery(hstring_ref queryText) const +template void impl_ISearchSuggestionManager::SetQuery(hstring_view queryText) const { - check_hresult(static_cast(static_cast(*this))->abi_SetQuery(get(queryText))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_SetQuery(get_abi(queryText))); } -template void impl_ISearchSuggestionManager::SetQuery(hstring_ref queryText, hstring_ref language) const +template void impl_ISearchSuggestionManager::SetQuery(hstring_view queryText, hstring_view language) const { - check_hresult(static_cast(static_cast(*this))->abi_SetQueryWithLanguage(get(queryText), get(language))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_SetQueryWithLanguage(get_abi(queryText), get_abi(language))); } -template void impl_ISearchSuggestionManager::SetQuery(hstring_ref queryText, hstring_ref language, const Windows::ApplicationModel::Search::SearchQueryLinguisticDetails & linguisticDetails) const +template void impl_ISearchSuggestionManager::SetQuery(hstring_view queryText, hstring_view language, const Windows::ApplicationModel::Search::SearchQueryLinguisticDetails & linguisticDetails) const { - check_hresult(static_cast(static_cast(*this))->abi_SetQueryWithSearchQueryLinguisticDetails(get(queryText), get(language), get(linguisticDetails))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_SetQueryWithSearchQueryLinguisticDetails(get_abi(queryText), get_abi(language), get_abi(linguisticDetails))); } template Windows::Foundation::Collections::IObservableVector impl_ISearchSuggestionManager::Suggestions() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_Suggestions(put(value))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->get_Suggestions(put_abi(value))); return value; } -template void impl_ISearchSuggestionManager::AddToHistory(hstring_ref queryText) const +template void impl_ISearchSuggestionManager::AddToHistory(hstring_view queryText) const { - check_hresult(static_cast(static_cast(*this))->abi_AddToHistory(get(queryText))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_AddToHistory(get_abi(queryText))); } -template void impl_ISearchSuggestionManager::AddToHistory(hstring_ref queryText, hstring_ref language) const +template void impl_ISearchSuggestionManager::AddToHistory(hstring_view queryText, hstring_view language) const { - check_hresult(static_cast(static_cast(*this))->abi_AddToHistoryWithLanguage(get(queryText), get(language))); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_AddToHistoryWithLanguage(get_abi(queryText), get_abi(language))); } template void impl_ISearchSuggestionManager::ClearHistory() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearHistory()); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->abi_ClearHistory()); } template event_token impl_ISearchSuggestionManager::SuggestionsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SuggestionsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->add_SuggestionsRequested(get_abi(handler), &token)); return token; } @@ -533,13 +562,13 @@ template event_revoker impl_ISearchSugges template void impl_ISearchSuggestionManager::SuggestionsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SuggestionsRequested(token)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->remove_SuggestionsRequested(token)); } template event_token impl_ISearchSuggestionManager::RequestingFocusOnKeyboardInput(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RequestingFocusOnKeyboardInput(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->add_RequestingFocusOnKeyboardInput(get_abi(handler), &token)); return token; } @@ -550,7 +579,7 @@ template event_revoker impl_ISearchSugges template void impl_ISearchSuggestionManager::RequestingFocusOnKeyboardInput(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RequestingFocusOnKeyboardInput(token)); + check_hresult(WINRT_SHIM(ISearchSuggestionManager)->remove_RequestingFocusOnKeyboardInput(token)); } inline SearchSuggestionManager::SearchSuggestionManager() : @@ -560,3 +589,77 @@ inline SearchSuggestionManager::SearchSuggestionManager() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::IRequestingFocusOnKeyboardInputEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::ISearchSuggestion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::ISearchSuggestionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::ISearchSuggestionsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::SearchSuggestion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Search.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Search.h index ac416123d..b8e628621 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Search.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Search.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" @@ -20,6 +23,7 @@ struct produceshim()); this->shim().Enabled(value); return S_OK; } @@ -33,7 +37,8 @@ struct produceshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Locations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Locations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locations()); return S_OK; } catch (...) @@ -56,10 +62,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AqsFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AqsFilter(*reinterpret_cast(&value)); return S_OK; } @@ -69,11 +76,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AqsFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AqsFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AqsFilter()); return S_OK; } catch (...) @@ -83,11 +91,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PropertiesToMatch(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PropertiesToMatch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PropertiesToMatch()); return S_OK; } catch (...) @@ -105,6 +114,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchHistoryEnabled(value); return S_OK; } @@ -118,7 +128,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SearchHistoryEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryEnabled()); return S_OK; } catch (...) @@ -127,10 +138,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_SearchHistoryContext(abi_arg_in value) noexcept override + HRESULT __stdcall put_SearchHistoryContext(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchHistoryContext(*reinterpret_cast(&value)); return S_OK; } @@ -140,11 +152,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SearchHistoryContext(abi_arg_out value) noexcept override + HRESULT __stdcall get_SearchHistoryContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchHistoryContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryContext()); return S_OK; } catch (...) @@ -154,10 +167,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_PlaceholderText(abi_arg_in value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -167,11 +181,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PlaceholderText(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -181,11 +196,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -195,11 +211,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -213,7 +230,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -222,11 +240,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_VisibilityChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VisibilityChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -239,6 +258,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().VisibilityChanged(token); return S_OK; } @@ -248,11 +268,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_QueryChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_QueryChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().QueryChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QueryChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -265,6 +286,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().QueryChanged(token); return S_OK; } @@ -274,11 +296,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_SuggestionsRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SuggestionsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SuggestionsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SuggestionsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -291,6 +314,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().SuggestionsRequested(token); return S_OK; } @@ -300,11 +324,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_QuerySubmitted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_QuerySubmitted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().QuerySubmitted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuerySubmitted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -317,6 +342,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().QuerySubmitted(token); return S_OK; } @@ -326,11 +352,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_ResultSuggestionChosen(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ResultSuggestionChosen(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ResultSuggestionChosen(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ResultSuggestionChosen(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -343,6 +370,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ResultSuggestionChosen(token); return S_OK; } @@ -352,10 +380,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_SetLocalContentSuggestionSettings(abi_arg_in settings) noexcept override + HRESULT __stdcall abi_SetLocalContentSuggestionSettings(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocalContentSuggestionSettings(*reinterpret_cast(&settings)); return S_OK; } @@ -369,6 +398,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(); return S_OK; } @@ -378,10 +408,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_ShowOverloadWithQuery(abi_arg_in query) noexcept override + HRESULT __stdcall abi_ShowOverloadWithQuery(impl::abi_arg_in query) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&query)); return S_OK; } @@ -395,6 +426,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowOnKeyboardInput(value); return S_OK; } @@ -408,7 +440,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ShowOnKeyboardInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowOnKeyboardInput()); return S_OK; } catch (...) @@ -417,11 +450,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetQueryText(abi_arg_in query, bool * succeeded) noexcept override + HRESULT __stdcall abi_TrySetQueryText(impl::abi_arg_in query, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TrySetQueryText(*reinterpret_cast(&query))); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetQueryText(*reinterpret_cast(&query))); return S_OK; } catch (...) @@ -434,11 +468,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -448,11 +483,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -462,11 +498,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -480,11 +517,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QueryTextAlternatives(abi_arg_out> value) noexcept override + HRESULT __stdcall get_QueryTextAlternatives(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().QueryTextAlternatives()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextAlternatives()); return S_OK; } catch (...) @@ -498,7 +536,8 @@ struct produceshim().QueryTextCompositionStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextCompositionStart()); return S_OK; } catch (...) @@ -511,7 +550,8 @@ struct produceshim().QueryTextCompositionLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextCompositionLength()); return S_OK; } catch (...) @@ -524,11 +564,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -538,11 +579,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -556,11 +598,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LinguisticDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -574,11 +617,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -592,11 +636,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out searchPane) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out searchPane) noexcept override { try { - *searchPane = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *searchPane = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -614,6 +659,7 @@ struct produceshim()); this->shim().HideThisApplication(); return S_OK; } @@ -631,7 +677,8 @@ struct produceshim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -640,11 +687,12 @@ struct produce collection) noexcept override + HRESULT __stdcall get_SearchSuggestionCollection(impl::abi_arg_out collection) noexcept override { try { - *collection = detach(this->shim().SearchSuggestionCollection()); + typename D::abi_guard guard(this->shim()); + *collection = detach_abi(this->shim().SearchSuggestionCollection()); return S_OK; } catch (...) @@ -654,11 +702,12 @@ struct produce deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -676,6 +725,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -689,11 +739,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -711,7 +762,8 @@ struct produceshim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -724,11 +776,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_QueryTextAlternatives(abi_arg_out> value) noexcept override + HRESULT __stdcall get_QueryTextAlternatives(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().QueryTextAlternatives()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextAlternatives()); return S_OK; } catch (...) @@ -742,7 +795,8 @@ struct produceshim().QueryTextCompositionStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextCompositionStart()); return S_OK; } catch (...) @@ -755,7 +809,8 @@ struct produceshim().QueryTextCompositionLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextCompositionLength()); return S_OK; } catch (...) @@ -768,11 +823,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in> queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in> queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateInstance(*reinterpret_cast *>(&queryTextAlternatives), queryTextCompositionStart, queryTextCompositionLength)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateInstance(*reinterpret_cast *>(&queryTextAlternatives), queryTextCompositionStart, queryTextCompositionLength)); return S_OK; } catch (...) @@ -790,7 +846,8 @@ struct produceshim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -799,10 +856,11 @@ struct produce text) noexcept override + HRESULT __stdcall abi_AppendQuerySuggestion(impl::abi_arg_in text) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendQuerySuggestion(*reinterpret_cast(&text)); return S_OK; } @@ -812,10 +870,11 @@ struct produce> suggestions) noexcept override + HRESULT __stdcall abi_AppendQuerySuggestions(impl::abi_arg_in> suggestions) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendQuerySuggestions(*reinterpret_cast *>(&suggestions)); return S_OK; } @@ -825,10 +884,11 @@ struct produce text, abi_arg_in detailText, abi_arg_in tag, abi_arg_in image, abi_arg_in imageAlternateText) noexcept override + HRESULT __stdcall abi_AppendResultSuggestion(impl::abi_arg_in text, impl::abi_arg_in detailText, impl::abi_arg_in tag, impl::abi_arg_in image, impl::abi_arg_in imageAlternateText) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendResultSuggestion(*reinterpret_cast(&text), *reinterpret_cast(&detailText), *reinterpret_cast(&tag), *reinterpret_cast(&image), *reinterpret_cast(&imageAlternateText)); return S_OK; } @@ -838,10 +898,11 @@ struct produce label) noexcept override + HRESULT __stdcall abi_AppendSearchSeparator(impl::abi_arg_in label) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendSearchSeparator(*reinterpret_cast(&label)); return S_OK; } @@ -859,7 +920,8 @@ struct produce { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -868,11 +930,12 @@ struct produce } } - HRESULT __stdcall get_SearchSuggestionCollection(abi_arg_out collection) noexcept override + HRESULT __stdcall get_SearchSuggestionCollection(impl::abi_arg_out collection) noexcept override { try { - *collection = detach(this->shim().SearchSuggestionCollection()); + typename D::abi_guard guard(this->shim()); + *collection = detach_abi(this->shim().SearchSuggestionCollection()); return S_OK; } catch (...) @@ -882,11 +945,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -904,6 +968,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -921,305 +986,305 @@ namespace Windows::ApplicationModel::Search { template Windows::Foundation::Collections::IVectorView impl_ISearchPaneQueryLinguisticDetails::QueryTextAlternatives() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_QueryTextAlternatives(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQueryLinguisticDetails)->get_QueryTextAlternatives(put_abi(value))); return value; } template uint32_t impl_ISearchPaneQueryLinguisticDetails::QueryTextCompositionStart() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_QueryTextCompositionStart(&value)); + check_hresult(WINRT_SHIM(ISearchPaneQueryLinguisticDetails)->get_QueryTextCompositionStart(&value)); return value; } template uint32_t impl_ISearchPaneQueryLinguisticDetails::QueryTextCompositionLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_QueryTextCompositionLength(&value)); + check_hresult(WINRT_SHIM(ISearchPaneQueryLinguisticDetails)->get_QueryTextCompositionLength(&value)); return value; } template uint32_t impl_ISearchSuggestionCollection::Size() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(ISearchSuggestionCollection)->get_Size(&value)); return value; } -template void impl_ISearchSuggestionCollection::AppendQuerySuggestion(hstring_ref text) const +template void impl_ISearchSuggestionCollection::AppendQuerySuggestion(hstring_view text) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendQuerySuggestion(get(text))); + check_hresult(WINRT_SHIM(ISearchSuggestionCollection)->abi_AppendQuerySuggestion(get_abi(text))); } -template void impl_ISearchSuggestionCollection::AppendQuerySuggestions(const Windows::Foundation::Collections::IIterable & suggestions) const +template void impl_ISearchSuggestionCollection::AppendQuerySuggestions(iterable suggestions) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendQuerySuggestions(get(suggestions))); + check_hresult(WINRT_SHIM(ISearchSuggestionCollection)->abi_AppendQuerySuggestions(get_abi(suggestions))); } -template void impl_ISearchSuggestionCollection::AppendResultSuggestion(hstring_ref text, hstring_ref detailText, hstring_ref tag, const Windows::Storage::Streams::IRandomAccessStreamReference & image, hstring_ref imageAlternateText) const +template void impl_ISearchSuggestionCollection::AppendResultSuggestion(hstring_view text, hstring_view detailText, hstring_view tag, const Windows::Storage::Streams::IRandomAccessStreamReference & image, hstring_view imageAlternateText) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendResultSuggestion(get(text), get(detailText), get(tag), get(image), get(imageAlternateText))); + check_hresult(WINRT_SHIM(ISearchSuggestionCollection)->abi_AppendResultSuggestion(get_abi(text), get_abi(detailText), get_abi(tag), get_abi(image), get_abi(imageAlternateText))); } -template void impl_ISearchSuggestionCollection::AppendSearchSeparator(hstring_ref label) const +template void impl_ISearchSuggestionCollection::AppendSearchSeparator(hstring_view label) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendSearchSeparator(get(label))); + check_hresult(WINRT_SHIM(ISearchSuggestionCollection)->abi_AppendSearchSeparator(get_abi(label))); } template void impl_ILocalContentSuggestionSettings::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->put_Enabled(value)); } template bool impl_ILocalContentSuggestionSettings::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->get_Enabled(&value)); return value; } template Windows::Foundation::Collections::IVector impl_ILocalContentSuggestionSettings::Locations() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Locations(put(value))); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->get_Locations(put_abi(value))); return value; } -template void impl_ILocalContentSuggestionSettings::AqsFilter(hstring_ref value) const +template void impl_ILocalContentSuggestionSettings::AqsFilter(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AqsFilter(get(value))); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->put_AqsFilter(get_abi(value))); } template hstring impl_ILocalContentSuggestionSettings::AqsFilter() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AqsFilter(put(value))); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->get_AqsFilter(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ILocalContentSuggestionSettings::PropertiesToMatch() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_PropertiesToMatch(put(value))); + check_hresult(WINRT_SHIM(ILocalContentSuggestionSettings)->get_PropertiesToMatch(put_abi(value))); return value; } -template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchQueryLinguisticDetailsFactory::CreateInstance(const Windows::Foundation::Collections::IIterable & queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength) const +template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchQueryLinguisticDetailsFactory::CreateInstance(iterable queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength) const { Windows::ApplicationModel::Search::SearchQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(queryTextAlternatives), queryTextCompositionStart, queryTextCompositionLength, put(value))); + check_hresult(WINRT_SHIM(ISearchQueryLinguisticDetailsFactory)->abi_CreateInstance(get_abi(queryTextAlternatives), queryTextCompositionStart, queryTextCompositionLength, put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISearchQueryLinguisticDetails::QueryTextAlternatives() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_QueryTextAlternatives(put(value))); + check_hresult(WINRT_SHIM(ISearchQueryLinguisticDetails)->get_QueryTextAlternatives(put_abi(value))); return value; } template uint32_t impl_ISearchQueryLinguisticDetails::QueryTextCompositionStart() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_QueryTextCompositionStart(&value)); + check_hresult(WINRT_SHIM(ISearchQueryLinguisticDetails)->get_QueryTextCompositionStart(&value)); return value; } template uint32_t impl_ISearchQueryLinguisticDetails::QueryTextCompositionLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_QueryTextCompositionLength(&value)); + check_hresult(WINRT_SHIM(ISearchQueryLinguisticDetails)->get_QueryTextCompositionLength(&value)); return value; } template void impl_ISearchSuggestionsRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequestDeferral)->abi_Complete()); } template bool impl_ISearchSuggestionsRequest::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequest)->get_IsCanceled(&value)); return value; } template Windows::ApplicationModel::Search::SearchSuggestionCollection impl_ISearchSuggestionsRequest::SearchSuggestionCollection() const { Windows::ApplicationModel::Search::SearchSuggestionCollection collection { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SearchSuggestionCollection(put(collection))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequest)->get_SearchSuggestionCollection(put_abi(collection))); return collection; } template Windows::ApplicationModel::Search::SearchSuggestionsRequestDeferral impl_ISearchSuggestionsRequest::GetDeferral() const { Windows::ApplicationModel::Search::SearchSuggestionsRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(ISearchSuggestionsRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template bool impl_ISearchPaneVisibilityChangedEventArgs::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(ISearchPaneVisibilityChangedEventArgs)->get_Visible(&value)); return value; } template hstring impl_ISearchPaneQueryChangedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQueryChangedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchPaneQueryChangedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQueryChangedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails impl_ISearchPaneQueryChangedEventArgs::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQueryChangedEventArgs)->get_LinguisticDetails(put_abi(value))); return value; } template hstring impl_ISearchPaneQuerySubmittedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQuerySubmittedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchPaneQuerySubmittedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQuerySubmittedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails impl_ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails)->get_LinguisticDetails(put_abi(value))); return value; } template hstring impl_ISearchPaneResultSuggestionChosenEventArgs::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneResultSuggestionChosenEventArgs)->get_Tag(put_abi(value))); return value; } template void impl_ISearchPaneSuggestionsRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ISearchPaneSuggestionsRequestDeferral)->abi_Complete()); } template bool impl_ISearchPaneSuggestionsRequest::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ISearchPaneSuggestionsRequest)->get_IsCanceled(&value)); return value; } template Windows::ApplicationModel::Search::SearchSuggestionCollection impl_ISearchPaneSuggestionsRequest::SearchSuggestionCollection() const { Windows::ApplicationModel::Search::SearchSuggestionCollection collection { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SearchSuggestionCollection(put(collection))); + check_hresult(WINRT_SHIM(ISearchPaneSuggestionsRequest)->get_SearchSuggestionCollection(put_abi(collection))); return collection; } template Windows::ApplicationModel::Search::SearchPaneSuggestionsRequestDeferral impl_ISearchPaneSuggestionsRequest::GetDeferral() const { Windows::ApplicationModel::Search::SearchPaneSuggestionsRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(ISearchPaneSuggestionsRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::ApplicationModel::Search::SearchPaneSuggestionsRequest impl_ISearchPaneSuggestionsRequestedEventArgs::Request() const { Windows::ApplicationModel::Search::SearchPaneSuggestionsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ISearchPaneSuggestionsRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchPane impl_ISearchPaneStatics::GetForCurrentView() const { Windows::ApplicationModel::Search::SearchPane searchPane { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(searchPane))); + check_hresult(WINRT_SHIM(ISearchPaneStatics)->abi_GetForCurrentView(put_abi(searchPane))); return searchPane; } template void impl_ISearchPaneStaticsWithHideThisApplication::HideThisApplication() const { - check_hresult(static_cast(static_cast(*this))->abi_HideThisApplication()); + check_hresult(WINRT_SHIM(ISearchPaneStaticsWithHideThisApplication)->abi_HideThisApplication()); } template void impl_ISearchPane::SearchHistoryEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryEnabled(value)); + check_hresult(WINRT_SHIM(ISearchPane)->put_SearchHistoryEnabled(value)); } template bool impl_ISearchPane::SearchHistoryEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryEnabled(&value)); + check_hresult(WINRT_SHIM(ISearchPane)->get_SearchHistoryEnabled(&value)); return value; } -template void impl_ISearchPane::SearchHistoryContext(hstring_ref value) const +template void impl_ISearchPane::SearchHistoryContext(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryContext(get(value))); + check_hresult(WINRT_SHIM(ISearchPane)->put_SearchHistoryContext(get_abi(value))); } template hstring impl_ISearchPane::SearchHistoryContext() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryContext(put(value))); + check_hresult(WINRT_SHIM(ISearchPane)->get_SearchHistoryContext(put_abi(value))); return value; } -template void impl_ISearchPane::PlaceholderText(hstring_ref value) const +template void impl_ISearchPane::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(ISearchPane)->put_PlaceholderText(get_abi(value))); } template hstring impl_ISearchPane::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(ISearchPane)->get_PlaceholderText(put_abi(value))); return value; } template hstring impl_ISearchPane::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchPane)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchPane::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchPane)->get_Language(put_abi(value))); return value; } template bool impl_ISearchPane::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(ISearchPane)->get_Visible(&value)); return value; } template event_token impl_ISearchPane::VisibilityChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VisibilityChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchPane)->add_VisibilityChanged(get_abi(handler), &token)); return token; } @@ -1230,13 +1295,13 @@ template event_revoker impl_ISearchPane::Visibility template void impl_ISearchPane::VisibilityChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VisibilityChanged(token)); + check_hresult(WINRT_SHIM(ISearchPane)->remove_VisibilityChanged(token)); } template event_token impl_ISearchPane::QueryChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QueryChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchPane)->add_QueryChanged(get_abi(handler), &token)); return token; } @@ -1247,13 +1312,13 @@ template event_revoker impl_ISearchPane::QueryChang template void impl_ISearchPane::QueryChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QueryChanged(token)); + check_hresult(WINRT_SHIM(ISearchPane)->remove_QueryChanged(token)); } template event_token impl_ISearchPane::SuggestionsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SuggestionsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchPane)->add_SuggestionsRequested(get_abi(handler), &token)); return token; } @@ -1264,13 +1329,13 @@ template event_revoker impl_ISearchPane::Suggestion template void impl_ISearchPane::SuggestionsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SuggestionsRequested(token)); + check_hresult(WINRT_SHIM(ISearchPane)->remove_SuggestionsRequested(token)); } template event_token impl_ISearchPane::QuerySubmitted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuerySubmitted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchPane)->add_QuerySubmitted(get_abi(handler), &token)); return token; } @@ -1281,13 +1346,13 @@ template event_revoker impl_ISearchPane::QuerySubmi template void impl_ISearchPane::QuerySubmitted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuerySubmitted(token)); + check_hresult(WINRT_SHIM(ISearchPane)->remove_QuerySubmitted(token)); } template event_token impl_ISearchPane::ResultSuggestionChosen(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ResultSuggestionChosen(get(handler), &token)); + check_hresult(WINRT_SHIM(ISearchPane)->add_ResultSuggestionChosen(get_abi(handler), &token)); return token; } @@ -1298,40 +1363,40 @@ template event_revoker impl_ISearchPane::ResultSugg template void impl_ISearchPane::ResultSuggestionChosen(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ResultSuggestionChosen(token)); + check_hresult(WINRT_SHIM(ISearchPane)->remove_ResultSuggestionChosen(token)); } template void impl_ISearchPane::SetLocalContentSuggestionSettings(const Windows::ApplicationModel::Search::LocalContentSuggestionSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocalContentSuggestionSettings(get(settings))); + check_hresult(WINRT_SHIM(ISearchPane)->abi_SetLocalContentSuggestionSettings(get_abi(settings))); } template void impl_ISearchPane::Show() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowOverloadDefault()); + check_hresult(WINRT_SHIM(ISearchPane)->abi_ShowOverloadDefault()); } -template void impl_ISearchPane::Show(hstring_ref query) const +template void impl_ISearchPane::Show(hstring_view query) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowOverloadWithQuery(get(query))); + check_hresult(WINRT_SHIM(ISearchPane)->abi_ShowOverloadWithQuery(get_abi(query))); } template void impl_ISearchPane::ShowOnKeyboardInput(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowOnKeyboardInput(value)); + check_hresult(WINRT_SHIM(ISearchPane)->put_ShowOnKeyboardInput(value)); } template bool impl_ISearchPane::ShowOnKeyboardInput() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowOnKeyboardInput(&value)); + check_hresult(WINRT_SHIM(ISearchPane)->get_ShowOnKeyboardInput(&value)); return value; } -template bool impl_ISearchPane::TrySetQueryText(hstring_ref query) const +template bool impl_ISearchPane::TrySetQueryText(hstring_view query) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetQueryText(get(query), &succeeded)); + check_hresult(WINRT_SHIM(ISearchPane)->abi_TrySetQueryText(get_abi(query), &succeeded)); return succeeded; } @@ -1349,10 +1414,300 @@ inline void SearchPane::HideThisApplication() get_activation_factory().HideThisApplication(); } -inline SearchQueryLinguisticDetails::SearchQueryLinguisticDetails(const Windows::Foundation::Collections::IIterable & queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength) : +inline SearchQueryLinguisticDetails::SearchQueryLinguisticDetails(iterable queryTextAlternatives, uint32_t queryTextCompositionStart, uint32_t queryTextCompositionLength) : SearchQueryLinguisticDetails(get_activation_factory().CreateInstance(queryTextAlternatives, queryTextCompositionStart, queryTextCompositionLength)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ILocalContentSuggestionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneQueryChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneQueryLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneQuerySubmittedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneResultSuggestionChosenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneStaticsWithHideThisApplication & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneSuggestionsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneSuggestionsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneSuggestionsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchPaneVisibilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchQueryLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchQueryLinguisticDetailsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchSuggestionCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchSuggestionsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::ISearchSuggestionsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::LocalContentSuggestionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneQueryChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneQueryLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneQuerySubmittedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneResultSuggestionChosenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneSuggestionsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneSuggestionsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneSuggestionsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchPaneVisibilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchQueryLinguisticDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchSuggestionCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchSuggestionsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Search::SearchSuggestionsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.Provider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.Provider.h index 7786ab083..85c9561dd 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.Provider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.SocialInfo.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_OwnerRemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OwnerRemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OwnerRemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OwnerRemoteId()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -57,10 +63,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Timestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Timestamp(*reinterpret_cast(&value)); return S_OK; } @@ -70,10 +77,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -83,11 +91,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -97,11 +106,12 @@ struct produce operation) noexcept override + HRESULT __stdcall abi_CommitAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CommitAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CommitAsync()); return S_OK; } catch (...) @@ -111,11 +121,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -125,10 +136,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -142,11 +154,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OwnerRemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OwnerRemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OwnerRemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OwnerRemoteId()); return S_OK; } catch (...) @@ -160,7 +173,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -169,11 +183,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -183,11 +198,12 @@ struct produce operation) noexcept override + HRESULT __stdcall abi_CommitAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CommitAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CommitAsync()); return S_OK; } catch (...) @@ -201,11 +217,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, abi_arg_in ownerRemoteId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, impl::abi_arg_in ownerRemoteId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateSocialFeedUpdaterAsync(kind, mode, *reinterpret_cast(&ownerRemoteId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateSocialFeedUpdaterAsync(kind, mode, *reinterpret_cast(&ownerRemoteId))); return S_OK; } catch (...) @@ -215,11 +232,12 @@ struct produce ownerRemoteId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateDashboardItemUpdaterAsync(impl::abi_arg_in ownerRemoteId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateDashboardItemUpdaterAsync(*reinterpret_cast(&ownerRemoteId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateDashboardItemUpdaterAsync(*reinterpret_cast(&ownerRemoteId))); return S_OK; } catch (...) @@ -229,10 +247,11 @@ struct produce itemRemoteId, int32_t newCount) noexcept override + HRESULT __stdcall abi_UpdateBadgeCountValue(impl::abi_arg_in itemRemoteId, int32_t newCount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateBadgeCountValue(*reinterpret_cast(&itemRemoteId), newCount); return S_OK; } @@ -242,10 +261,11 @@ struct produce contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) noexcept override + HRESULT __stdcall abi_ReportNewContentAvailable(impl::abi_arg_in contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportNewContentAvailable(*reinterpret_cast(&contactRemoteId), kind); return S_OK; } @@ -255,11 +275,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_ProvisionAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ProvisionAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ProvisionAsync()); return S_OK; } catch (...) @@ -269,11 +290,12 @@ struct produce operation) noexcept override + HRESULT __stdcall abi_DeprovisionAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeprovisionAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeprovisionAsync()); return S_OK; } catch (...) @@ -291,142 +313,142 @@ namespace Windows::ApplicationModel::SocialInfo::Provider { template hstring impl_ISocialFeedUpdater::OwnerRemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OwnerRemoteId(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedUpdater)->get_OwnerRemoteId(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedKind impl_ISocialFeedUpdater::Kind() const { Windows::ApplicationModel::SocialInfo::SocialFeedKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(ISocialFeedUpdater)->get_Kind(&value)); return value; } template Windows::Foundation::Collections::IVector impl_ISocialFeedUpdater::Items() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedUpdater)->get_Items(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISocialFeedUpdater::CommitAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CommitAsync(put(operation))); + check_hresult(WINRT_SHIM(ISocialFeedUpdater)->abi_CommitAsync(put_abi(operation))); return operation; } template hstring impl_ISocialDashboardItemUpdater::OwnerRemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OwnerRemoteId(put(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->get_OwnerRemoteId(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialDashboardItemUpdater::Content() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->get_Content(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISocialDashboardItemUpdater::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->get_Timestamp(put_abi(value))); return value; } template void impl_ISocialDashboardItemUpdater::Timestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_Timestamp(get(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->put_Timestamp(get_abi(value))); } template void impl_ISocialDashboardItemUpdater::Thumbnail(const Windows::ApplicationModel::SocialInfo::SocialItemThumbnail & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->put_Thumbnail(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialItemThumbnail impl_ISocialDashboardItemUpdater::Thumbnail() const { Windows::ApplicationModel::SocialInfo::SocialItemThumbnail value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->get_Thumbnail(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISocialDashboardItemUpdater::CommitAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CommitAsync(put(operation))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->abi_CommitAsync(put_abi(operation))); return operation; } template Windows::Foundation::Uri impl_ISocialDashboardItemUpdater::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialDashboardItemUpdater::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialDashboardItemUpdater)->put_TargetUri(get_abi(value))); } -template Windows::Foundation::IAsyncOperation impl_ISocialInfoProviderManagerStatics::CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, hstring_ref ownerRemoteId) const +template Windows::Foundation::IAsyncOperation impl_ISocialInfoProviderManagerStatics::CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, hstring_view ownerRemoteId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateSocialFeedUpdaterAsync(kind, mode, get(ownerRemoteId), put(operation))); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_CreateSocialFeedUpdaterAsync(kind, mode, get_abi(ownerRemoteId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ISocialInfoProviderManagerStatics::CreateDashboardItemUpdaterAsync(hstring_ref ownerRemoteId) const +template Windows::Foundation::IAsyncOperation impl_ISocialInfoProviderManagerStatics::CreateDashboardItemUpdaterAsync(hstring_view ownerRemoteId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateDashboardItemUpdaterAsync(get(ownerRemoteId), put(operation))); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_CreateDashboardItemUpdaterAsync(get_abi(ownerRemoteId), put_abi(operation))); return operation; } -template void impl_ISocialInfoProviderManagerStatics::UpdateBadgeCountValue(hstring_ref itemRemoteId, int32_t newCount) const +template void impl_ISocialInfoProviderManagerStatics::UpdateBadgeCountValue(hstring_view itemRemoteId, int32_t newCount) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateBadgeCountValue(get(itemRemoteId), newCount)); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_UpdateBadgeCountValue(get_abi(itemRemoteId), newCount)); } -template void impl_ISocialInfoProviderManagerStatics::ReportNewContentAvailable(hstring_ref contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) const +template void impl_ISocialInfoProviderManagerStatics::ReportNewContentAvailable(hstring_view contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportNewContentAvailable(get(contactRemoteId), kind)); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_ReportNewContentAvailable(get_abi(contactRemoteId), kind)); } template Windows::Foundation::IAsyncOperation impl_ISocialInfoProviderManagerStatics::ProvisionAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ProvisionAsync(put(operation))); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_ProvisionAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ISocialInfoProviderManagerStatics::DeprovisionAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeprovisionAsync(put(operation))); + check_hresult(WINRT_SHIM(ISocialInfoProviderManagerStatics)->abi_DeprovisionAsync(put_abi(operation))); return operation; } -inline Windows::Foundation::IAsyncOperation SocialInfoProviderManager::CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, hstring_ref ownerRemoteId) +inline Windows::Foundation::IAsyncOperation SocialInfoProviderManager::CreateSocialFeedUpdaterAsync(Windows::ApplicationModel::SocialInfo::SocialFeedKind kind, Windows::ApplicationModel::SocialInfo::SocialFeedUpdateMode mode, hstring_view ownerRemoteId) { return get_activation_factory().CreateSocialFeedUpdaterAsync(kind, mode, ownerRemoteId); } -inline Windows::Foundation::IAsyncOperation SocialInfoProviderManager::CreateDashboardItemUpdaterAsync(hstring_ref ownerRemoteId) +inline Windows::Foundation::IAsyncOperation SocialInfoProviderManager::CreateDashboardItemUpdaterAsync(hstring_view ownerRemoteId) { return get_activation_factory().CreateDashboardItemUpdaterAsync(ownerRemoteId); } -inline void SocialInfoProviderManager::UpdateBadgeCountValue(hstring_ref itemRemoteId, int32_t newCount) +inline void SocialInfoProviderManager::UpdateBadgeCountValue(hstring_view itemRemoteId, int32_t newCount) { get_activation_factory().UpdateBadgeCountValue(itemRemoteId, newCount); } -inline void SocialInfoProviderManager::ReportNewContentAvailable(hstring_ref contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) +inline void SocialInfoProviderManager::ReportNewContentAvailable(hstring_view contactRemoteId, Windows::ApplicationModel::SocialInfo::SocialFeedKind kind) { get_activation_factory().ReportNewContentAvailable(contactRemoteId, kind); } @@ -444,3 +466,50 @@ inline Windows::Foundation::IAsyncAction SocialInfoProviderManager::DeprovisionA } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::Provider::ISocialDashboardItemUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::Provider::ISocialFeedUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::Provider::ISocialInfoProviderManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::Provider::SocialDashboardItemUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::Provider::SocialFeedUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.h b/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.h index 4ae852ca5..c4df7aa8e 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.SocialInfo.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.Imaging.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : } } - HRESULT __stdcall get_PrimaryContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryContent()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : } } - HRESULT __stdcall get_SecondaryContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryContent()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -72,10 +79,11 @@ struct produce : } } - HRESULT __stdcall put_Timestamp(abi_arg_in value) noexcept override + HRESULT __stdcall put_Timestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Timestamp(*reinterpret_cast(&value)); return S_OK; } @@ -85,11 +93,12 @@ struct produce : } } - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -99,10 +108,11 @@ struct produce : } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -112,11 +122,12 @@ struct produce : } } - HRESULT __stdcall get_Thumbnails(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Thumbnails(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Thumbnails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnails()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce : } } - HRESULT __stdcall get_SharedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SharedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SharedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharedItem()); return S_OK; } catch (...) @@ -140,10 +152,11 @@ struct produce : } } - HRESULT __stdcall put_SharedItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_SharedItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SharedItem(*reinterpret_cast(&value)); return S_OK; } @@ -157,11 +170,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -171,10 +185,11 @@ struct produce : p } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -184,11 +199,12 @@ struct produce : p } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -198,10 +214,11 @@ struct produce : p } } - HRESULT __stdcall put_Message(abi_arg_in value) noexcept override + HRESULT __stdcall put_Message(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Message(*reinterpret_cast(&value)); return S_OK; } @@ -211,11 +228,12 @@ struct produce : p } } - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -225,10 +243,11 @@ struct produce : p } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -242,11 +261,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -256,11 +276,12 @@ struct produce : prod } } - HRESULT __stdcall get_PrimaryContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryContent()); return S_OK; } catch (...) @@ -270,11 +291,12 @@ struct produce : prod } } - HRESULT __stdcall get_SecondaryContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryContent()); return S_OK; } catch (...) @@ -284,11 +306,12 @@ struct produce : prod } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -297,10 +320,11 @@ struct produce : prod } } - HRESULT __stdcall put_Timestamp(abi_arg_in value) noexcept override + HRESULT __stdcall put_Timestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Timestamp(*reinterpret_cast(&value)); return S_OK; } @@ -310,11 +334,12 @@ struct produce : prod } } - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -324,10 +349,11 @@ struct produce : prod } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -337,11 +363,12 @@ struct produce : prod } } - HRESULT __stdcall get_Thumbnails(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Thumbnails(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Thumbnails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnails()); return S_OK; } catch (...) @@ -351,11 +378,12 @@ struct produce : prod } } - HRESULT __stdcall get_SharedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SharedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SharedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharedItem()); return S_OK; } catch (...) @@ -365,10 +393,11 @@ struct produce : prod } } - HRESULT __stdcall put_SharedItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_SharedItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SharedItem(*reinterpret_cast(&value)); return S_OK; } @@ -382,7 +411,8 @@ struct produce : prod { try { - *value = detach(this->shim().BadgeStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BadgeStyle()); return S_OK; } catch (...) @@ -395,6 +425,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().BadgeStyle(value); return S_OK; } @@ -408,7 +439,8 @@ struct produce : prod { try { - *value = detach(this->shim().BadgeCountValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BadgeCountValue()); return S_OK; } catch (...) @@ -421,6 +453,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().BadgeCountValue(value); return S_OK; } @@ -430,11 +463,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -444,10 +478,11 @@ struct produce : prod } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -457,11 +492,12 @@ struct produce : prod } } - HRESULT __stdcall get_ChildItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChildItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildItem()); return S_OK; } catch (...) @@ -471,10 +507,11 @@ struct produce : prod } } - HRESULT __stdcall put_ChildItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_ChildItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChildItem(*reinterpret_cast(&value)); return S_OK; } @@ -488,7 +525,8 @@ struct produce : prod { try { - *value = detach(this->shim().Style()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Style()); return S_OK; } catch (...) @@ -501,6 +539,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Style(value); return S_OK; } @@ -514,11 +553,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_OriginalSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_OriginalSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OriginalSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalSource()); return S_OK; } catch (...) @@ -528,10 +568,11 @@ struct produce } } - HRESULT __stdcall put_OriginalSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_OriginalSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OriginalSource(*reinterpret_cast(&value)); return S_OK; } @@ -541,11 +582,12 @@ struct produce } } - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -555,11 +597,12 @@ struct produce } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -568,10 +611,11 @@ struct produce } } - HRESULT __stdcall put_Timestamp(abi_arg_in value) noexcept override + HRESULT __stdcall put_Timestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Timestamp(*reinterpret_cast(&value)); return S_OK; } @@ -581,11 +625,12 @@ struct produce } } - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -595,10 +640,11 @@ struct produce } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -608,10 +654,11 @@ struct produce } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -621,11 +668,12 @@ struct produce } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -639,11 +687,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -653,10 +702,11 @@ struct produce : } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -666,11 +716,12 @@ struct produce : } } - HRESULT __stdcall get_ImageUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageUri()); return S_OK; } catch (...) @@ -680,10 +731,11 @@ struct produce : } } - HRESULT __stdcall put_ImageUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_ImageUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ImageUri(*reinterpret_cast(&value)); return S_OK; } @@ -693,11 +745,12 @@ struct produce : } } - HRESULT __stdcall get_BitmapSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_BitmapSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapSize()); return S_OK; } catch (...) @@ -706,10 +759,11 @@ struct produce : } } - HRESULT __stdcall put_BitmapSize(abi_arg_in value) noexcept override + HRESULT __stdcall put_BitmapSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BitmapSize(*reinterpret_cast(&value)); return S_OK; } @@ -719,11 +773,12 @@ struct produce : } } - HRESULT __stdcall abi_SetImageAsync(abi_arg_in image, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SetImageAsync(impl::abi_arg_in image, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SetImageAsync(*reinterpret_cast(&image))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetImageAsync(*reinterpret_cast(&image))); return S_OK; } catch (...) @@ -737,11 +792,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -751,10 +807,11 @@ struct produce : prod } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -764,11 +821,12 @@ struct produce : prod } } - HRESULT __stdcall get_UserName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserName()); return S_OK; } catch (...) @@ -778,10 +836,11 @@ struct produce : prod } } - HRESULT __stdcall put_UserName(abi_arg_in value) noexcept override + HRESULT __stdcall put_UserName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserName(*reinterpret_cast(&value)); return S_OK; } @@ -791,11 +850,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -805,10 +865,11 @@ struct produce : prod } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -818,11 +879,12 @@ struct produce : prod } } - HRESULT __stdcall get_TargetUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetUri()); return S_OK; } catch (...) @@ -832,10 +894,11 @@ struct produce : prod } } - HRESULT __stdcall put_TargetUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetUri(*reinterpret_cast(&value)); return S_OK; } @@ -853,370 +916,370 @@ namespace Windows::ApplicationModel::SocialInfo { template Windows::Foundation::Uri impl_ISocialItemThumbnail::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialItemThumbnail::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->put_TargetUri(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialItemThumbnail::ImageUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImageUri(put(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->get_ImageUri(put_abi(value))); return value; } template void impl_ISocialItemThumbnail::ImageUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ImageUri(get(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->put_ImageUri(get_abi(value))); } template Windows::Graphics::Imaging::BitmapSize impl_ISocialItemThumbnail::BitmapSize() const { Windows::Graphics::Imaging::BitmapSize value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapSize(put(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->get_BitmapSize(put_abi(value))); return value; } template void impl_ISocialItemThumbnail::BitmapSize(const Windows::Graphics::Imaging::BitmapSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_BitmapSize(get(value))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->put_BitmapSize(get_abi(value))); } template Windows::Foundation::IAsyncAction impl_ISocialItemThumbnail::SetImageAsync(const Windows::Storage::Streams::IInputStream & image) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SetImageAsync(get(image), put(operation))); + check_hresult(WINRT_SHIM(ISocialItemThumbnail)->abi_SetImageAsync(get_abi(image), put_abi(operation))); return operation; } template hstring impl_ISocialFeedContent::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->get_Title(put_abi(value))); return value; } -template void impl_ISocialFeedContent::Title(hstring_ref value) const +template void impl_ISocialFeedContent::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->put_Title(get_abi(value))); } template hstring impl_ISocialFeedContent::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->get_Message(put_abi(value))); return value; } -template void impl_ISocialFeedContent::Message(hstring_ref value) const +template void impl_ISocialFeedContent::Message(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Message(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->put_Message(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialFeedContent::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialFeedContent::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedContent)->put_TargetUri(get_abi(value))); } template hstring impl_ISocialUserInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->get_DisplayName(put_abi(value))); return value; } -template void impl_ISocialUserInfo::DisplayName(hstring_ref value) const +template void impl_ISocialUserInfo::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->put_DisplayName(get_abi(value))); } template hstring impl_ISocialUserInfo::UserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->get_UserName(put_abi(value))); return value; } -template void impl_ISocialUserInfo::UserName(hstring_ref value) const +template void impl_ISocialUserInfo::UserName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UserName(get(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->put_UserName(get_abi(value))); } template hstring impl_ISocialUserInfo::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->get_RemoteId(put_abi(value))); return value; } -template void impl_ISocialUserInfo::RemoteId(hstring_ref value) const +template void impl_ISocialUserInfo::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->put_RemoteId(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialUserInfo::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialUserInfo::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialUserInfo)->put_TargetUri(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialUserInfo impl_ISocialFeedItem::Author() const { Windows::ApplicationModel::SocialInfo::SocialUserInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_Author(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialFeedItem::PrimaryContent() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryContent(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_PrimaryContent(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialFeedItem::SecondaryContent() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecondaryContent(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_SecondaryContent(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISocialFeedItem::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_Timestamp(put_abi(value))); return value; } template void impl_ISocialFeedItem::Timestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_Timestamp(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_Timestamp(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialFeedItem::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialFeedItem::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_TargetUri(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ISocialFeedItem::Thumbnails() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnails(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_Thumbnails(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem impl_ISocialFeedItem::SharedItem() const { Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SharedItem(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_SharedItem(put_abi(value))); return value; } template void impl_ISocialFeedItem::SharedItem(const Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_SharedItem(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_SharedItem(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialItemBadgeStyle impl_ISocialFeedItem::BadgeStyle() const { Windows::ApplicationModel::SocialInfo::SocialItemBadgeStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_BadgeStyle(&value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_BadgeStyle(&value)); return value; } template void impl_ISocialFeedItem::BadgeStyle(Windows::ApplicationModel::SocialInfo::SocialItemBadgeStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_BadgeStyle(value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_BadgeStyle(value)); } template int32_t impl_ISocialFeedItem::BadgeCountValue() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BadgeCountValue(&value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_BadgeCountValue(&value)); return value; } template void impl_ISocialFeedItem::BadgeCountValue(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_BadgeCountValue(value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_BadgeCountValue(value)); } template hstring impl_ISocialFeedItem::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_RemoteId(put_abi(value))); return value; } -template void impl_ISocialFeedItem::RemoteId(hstring_ref value) const +template void impl_ISocialFeedItem::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_RemoteId(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialFeedChildItem impl_ISocialFeedItem::ChildItem() const { Windows::ApplicationModel::SocialInfo::SocialFeedChildItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildItem(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_ChildItem(put_abi(value))); return value; } template void impl_ISocialFeedItem::ChildItem(const Windows::ApplicationModel::SocialInfo::SocialFeedChildItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_ChildItem(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_ChildItem(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialFeedItemStyle impl_ISocialFeedItem::Style() const { Windows::ApplicationModel::SocialInfo::SocialFeedItemStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_Style(&value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->get_Style(&value)); return value; } template void impl_ISocialFeedItem::Style(Windows::ApplicationModel::SocialInfo::SocialFeedItemStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_Style(value)); + check_hresult(WINRT_SHIM(ISocialFeedItem)->put_Style(value)); } template Windows::ApplicationModel::SocialInfo::SocialUserInfo impl_ISocialFeedChildItem::Author() const { Windows::ApplicationModel::SocialInfo::SocialUserInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_Author(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialFeedChildItem::PrimaryContent() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryContent(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_PrimaryContent(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialFeedChildItem::SecondaryContent() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecondaryContent(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_SecondaryContent(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISocialFeedChildItem::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_Timestamp(put_abi(value))); return value; } template void impl_ISocialFeedChildItem::Timestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_Timestamp(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->put_Timestamp(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialFeedChildItem::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialFeedChildItem::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->put_TargetUri(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ISocialFeedChildItem::Thumbnails() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnails(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_Thumbnails(put_abi(value))); return value; } template Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem impl_ISocialFeedChildItem::SharedItem() const { Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SharedItem(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->get_SharedItem(put_abi(value))); return value; } template void impl_ISocialFeedChildItem::SharedItem(const Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_SharedItem(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedChildItem)->put_SharedItem(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialFeedSharedItem::OriginalSource() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OriginalSource(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->get_OriginalSource(put_abi(value))); return value; } template void impl_ISocialFeedSharedItem::OriginalSource(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_OriginalSource(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->put_OriginalSource(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialFeedContent impl_ISocialFeedSharedItem::Content() const { Windows::ApplicationModel::SocialInfo::SocialFeedContent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->get_Content(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISocialFeedSharedItem::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->get_Timestamp(put_abi(value))); return value; } template void impl_ISocialFeedSharedItem::Timestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_Timestamp(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->put_Timestamp(get_abi(value))); } template Windows::Foundation::Uri impl_ISocialFeedSharedItem::TargetUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetUri(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->get_TargetUri(put_abi(value))); return value; } template void impl_ISocialFeedSharedItem::TargetUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetUri(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->put_TargetUri(get_abi(value))); } template void impl_ISocialFeedSharedItem::Thumbnail(const Windows::ApplicationModel::SocialInfo::SocialItemThumbnail & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->put_Thumbnail(get_abi(value))); } template Windows::ApplicationModel::SocialInfo::SocialItemThumbnail impl_ISocialFeedSharedItem::Thumbnail() const { Windows::ApplicationModel::SocialInfo::SocialItemThumbnail value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(ISocialFeedSharedItem)->get_Thumbnail(put_abi(value))); return value; } @@ -1239,3 +1302,113 @@ inline SocialItemThumbnail::SocialItemThumbnail() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialFeedChildItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialFeedContent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialFeedItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialFeedSharedItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialItemThumbnail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::ISocialUserInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialFeedChildItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialFeedContent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialFeedItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialFeedSharedItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialItemThumbnail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SocialInfo::SocialUserInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.LicenseManagement.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.LicenseManagement.h index feb0db2d8..3c1fbbda2 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.LicenseManagement.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.LicenseManagement.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AddLicenseAsync(abi_arg_in license, abi_arg_out action) noexcept override + HRESULT __stdcall abi_AddLicenseAsync(impl::abi_arg_in license, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().AddLicenseAsync(*reinterpret_cast(&license))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().AddLicenseAsync(*reinterpret_cast(&license))); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce> contentIds, abi_arg_in> keyIds, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetSatisfactionInfosAsync(impl::abi_arg_in> contentIds, impl::abi_arg_in> keyIds, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetSatisfactionInfosAsync(*reinterpret_cast *>(&contentIds), *reinterpret_cast *>(&keyIds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSatisfactionInfosAsync(*reinterpret_cast *>(&contentIds), *reinterpret_cast *>(&keyIds))); return S_OK; } catch (...) @@ -52,7 +57,8 @@ struct produceshim().SatisfiedByDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedByDevice()); return S_OK; } catch (...) @@ -65,7 +71,8 @@ struct produceshim().SatisfiedByOpenLicense()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedByOpenLicense()); return S_OK; } catch (...) @@ -78,7 +85,8 @@ struct produceshim().SatisfiedByTrial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedByTrial()); return S_OK; } catch (...) @@ -91,7 +99,8 @@ struct produceshim().SatisfiedByPass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedByPass()); return S_OK; } catch (...) @@ -104,7 +113,8 @@ struct produceshim().SatisfiedByInstallMedia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedByInstallMedia()); return S_OK; } catch (...) @@ -117,7 +127,8 @@ struct produceshim().SatisfiedBySignedInUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SatisfiedBySignedInUser()); return S_OK; } catch (...) @@ -130,7 +141,8 @@ struct produceshim().IsSatisfied()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSatisfied()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LicenseSatisfactionInfos(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LicenseSatisfactionInfos(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LicenseSatisfactionInfos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseSatisfactionInfos()); return S_OK; } catch (...) @@ -161,7 +174,8 @@ struct produceshim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -178,77 +192,77 @@ namespace Windows::ApplicationModel::Store::LicenseManagement { template Windows::Foundation::Collections::IMapView impl_ILicenseSatisfactionResult::LicenseSatisfactionInfos() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_LicenseSatisfactionInfos(put(value))); + check_hresult(WINRT_SHIM(ILicenseSatisfactionResult)->get_LicenseSatisfactionInfos(put_abi(value))); return value; } template HRESULT impl_ILicenseSatisfactionResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionResult)->get_ExtendedError(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedByDevice() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedByDevice(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedByDevice(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedByOpenLicense() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedByOpenLicense(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedByOpenLicense(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedByTrial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedByTrial(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedByTrial(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedByPass() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedByPass(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedByPass(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedByInstallMedia() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedByInstallMedia(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedByInstallMedia(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::SatisfiedBySignedInUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SatisfiedBySignedInUser(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_SatisfiedBySignedInUser(&value)); return value; } template bool impl_ILicenseSatisfactionInfo::IsSatisfied() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSatisfied(&value)); + check_hresult(WINRT_SHIM(ILicenseSatisfactionInfo)->get_IsSatisfied(&value)); return value; } template Windows::Foundation::IAsyncAction impl_ILicenseManagerStatics::AddLicenseAsync(const Windows::Storage::Streams::IBuffer & license) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_AddLicenseAsync(get(license), put(action))); + check_hresult(WINRT_SHIM(ILicenseManagerStatics)->abi_AddLicenseAsync(get_abi(license), put_abi(action))); return action; } -template Windows::Foundation::IAsyncOperation impl_ILicenseManagerStatics::GetSatisfactionInfosAsync(const Windows::Foundation::Collections::IIterable & contentIds, const Windows::Foundation::Collections::IIterable & keyIds) const +template Windows::Foundation::IAsyncOperation impl_ILicenseManagerStatics::GetSatisfactionInfosAsync(iterable contentIds, iterable keyIds) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSatisfactionInfosAsync(get(contentIds), get(keyIds), put(operation))); + check_hresult(WINRT_SHIM(ILicenseManagerStatics)->abi_GetSatisfactionInfosAsync(get_abi(contentIds), get_abi(keyIds), put_abi(operation))); return operation; } @@ -257,7 +271,7 @@ inline Windows::Foundation::IAsyncAction LicenseManager::AddLicenseAsync(const W return get_activation_factory().AddLicenseAsync(license); } -inline Windows::Foundation::IAsyncOperation LicenseManager::GetSatisfactionInfosAsync(const Windows::Foundation::Collections::IIterable & contentIds, const Windows::Foundation::Collections::IIterable & keyIds) +inline Windows::Foundation::IAsyncOperation LicenseManager::GetSatisfactionInfosAsync(iterable contentIds, iterable keyIds) { return get_activation_factory().GetSatisfactionInfosAsync(contentIds, keyIds); } @@ -265,3 +279,50 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.InstallControl.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.InstallControl.h index c290a1dad..049e39abd 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.InstallControl.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.InstallControl.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -49,7 +54,8 @@ struct produceshim().InstallType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallType()); return S_OK; } catch (...) @@ -62,7 +68,8 @@ struct produceshim().IsUserInitiated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUserInitiated()); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetCurrentStatus(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetCurrentStatus()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCurrentStatus()); return S_OK; } catch (...) @@ -89,6 +97,7 @@ struct produceshim()); this->shim().Cancel(); return S_OK; } @@ -102,6 +111,7 @@ struct produceshim()); this->shim().Pause(); return S_OK; } @@ -115,6 +125,7 @@ struct produceshim()); this->shim().Restart(); return S_OK; } @@ -124,11 +135,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Completed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Completed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -141,6 +153,7 @@ struct produceshim()); this->shim().Completed(token); return S_OK; } @@ -150,11 +163,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -167,6 +181,7 @@ struct produceshim()); this->shim().StatusChanged(token); return S_OK; } @@ -180,10 +195,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CancelWithTelemetry(abi_arg_in correlationVector) noexcept override + HRESULT __stdcall abi_CancelWithTelemetry(impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(*reinterpret_cast(&correlationVector)); return S_OK; } @@ -193,10 +209,11 @@ struct produce correlationVector) noexcept override + HRESULT __stdcall abi_PauseWithTelemetry(impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(*reinterpret_cast(&correlationVector)); return S_OK; } @@ -206,10 +223,11 @@ struct produce correlationVector) noexcept override + HRESULT __stdcall abi_RestartWithTelemetry(impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Restart(*reinterpret_cast(&correlationVector)); return S_OK; } @@ -223,11 +241,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppInstallItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AppInstallItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppInstallItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppInstallItems()); return S_OK; } catch (...) @@ -237,10 +256,11 @@ struct produce productId) noexcept override + HRESULT __stdcall abi_Cancel(impl::abi_arg_in productId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(*reinterpret_cast(&productId)); return S_OK; } @@ -250,10 +270,11 @@ struct produce productId) noexcept override + HRESULT __stdcall abi_Pause(impl::abi_arg_in productId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(*reinterpret_cast(&productId)); return S_OK; } @@ -263,10 +284,11 @@ struct produce productId) noexcept override + HRESULT __stdcall abi_Restart(impl::abi_arg_in productId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Restart(*reinterpret_cast(&productId)); return S_OK; } @@ -276,11 +298,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -293,6 +316,7 @@ struct produceshim()); this->shim().ItemCompleted(token); return S_OK; } @@ -302,11 +326,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -319,6 +344,7 @@ struct produceshim()); this->shim().ItemStatusChanged(token); return S_OK; } @@ -332,7 +358,8 @@ struct produceshim().AutoUpdateSetting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoUpdateSetting()); return S_OK; } catch (...) @@ -345,6 +372,7 @@ struct produceshim()); this->shim().AutoUpdateSetting(value); return S_OK; } @@ -354,11 +382,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AcquisitionIdentity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcquisitionIdentity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcquisitionIdentity()); return S_OK; } catch (...) @@ -368,10 +397,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AcquisitionIdentity(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AcquisitionIdentity(*reinterpret_cast(&value)); return S_OK; } @@ -381,11 +411,12 @@ struct produce productId, abi_arg_in skuId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIsApplicableAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsApplicableAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsApplicableAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); return S_OK; } catch (...) @@ -395,11 +426,12 @@ struct produce productId, abi_arg_in skuId, bool repair, bool forceUseOfNonRemovableStorage, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAppInstallAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, bool repair, bool forceUseOfNonRemovableStorage, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAppInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), repair, forceUseOfNonRemovableStorage)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAppInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), repair, forceUseOfNonRemovableStorage)); return S_OK; } catch (...) @@ -409,11 +441,12 @@ struct produce packageFamilyName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateAppByPackageFamilyNameAsync(impl::abi_arg_in packageFamilyName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateAppByPackageFamilyNameAsync(*reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAppByPackageFamilyNameAsync(*reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -423,11 +456,12 @@ struct produce productId, abi_arg_in skuId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SearchForUpdatesAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SearchForUpdatesAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForUpdatesAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); return S_OK; } catch (...) @@ -437,11 +471,12 @@ struct produce>> operation) noexcept override + HRESULT __stdcall abi_SearchForAllUpdatesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().SearchForAllUpdatesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForAllUpdatesAsync()); return S_OK; } catch (...) @@ -451,11 +486,12 @@ struct produce storeClientName, abi_arg_in storeClientPublisher, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_IsStoreBlockedByPolicyAsync(impl::abi_arg_in storeClientName, impl::abi_arg_in storeClientPublisher, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().IsStoreBlockedByPolicyAsync(*reinterpret_cast(&storeClientName), *reinterpret_cast(&storeClientPublisher))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().IsStoreBlockedByPolicyAsync(*reinterpret_cast(&storeClientName), *reinterpret_cast(&storeClientPublisher))); return S_OK; } catch (...) @@ -465,11 +501,12 @@ struct produce productId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIsAppAllowedToInstallAsync(impl::abi_arg_in productId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsAppAllowedToInstallAsync(*reinterpret_cast(&productId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsAppAllowedToInstallAsync(*reinterpret_cast(&productId))); return S_OK; } catch (...) @@ -483,11 +520,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_StartAppInstallWithTelemetryAsync(abi_arg_in productId, abi_arg_in skuId, bool repair, bool forceUseOfNonRemovableStorage, abi_arg_in catalogId, abi_arg_in bundleId, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAppInstallWithTelemetryAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, bool repair, bool forceUseOfNonRemovableStorage, impl::abi_arg_in catalogId, impl::abi_arg_in bundleId, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAppInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&catalogId), *reinterpret_cast(&bundleId), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAppInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&catalogId), *reinterpret_cast(&bundleId), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -497,11 +535,12 @@ struct produce packageFamilyName, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateAppByPackageFamilyNameWithTelemetryAsync(impl::abi_arg_in packageFamilyName, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateAppByPackageFamilyNameAsync(*reinterpret_cast(&packageFamilyName), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAppByPackageFamilyNameAsync(*reinterpret_cast(&packageFamilyName), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -511,11 +550,12 @@ struct produce productId, abi_arg_in skuId, abi_arg_in catalogId, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SearchForUpdatesWithTelemetryAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_in catalogId, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SearchForUpdatesAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForUpdatesAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -525,11 +565,12 @@ struct produce correlationVector, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_SearchForAllUpdatesWithTelemetryAsync(impl::abi_arg_in correlationVector, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().SearchForAllUpdatesAsync(*reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForAllUpdatesAsync(*reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -539,11 +580,12 @@ struct produce productId, abi_arg_in skuId, abi_arg_in catalogId, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIsAppAllowedToInstallWithTelemetryAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_in catalogId, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsAppAllowedToInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsAppAllowedToInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -553,10 +595,11 @@ struct produce productId, abi_arg_in correlationVector) noexcept override + HRESULT __stdcall abi_CancelWithTelemetry(impl::abi_arg_in productId, impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(*reinterpret_cast(&productId), *reinterpret_cast(&correlationVector)); return S_OK; } @@ -566,10 +609,11 @@ struct produce productId, abi_arg_in correlationVector) noexcept override + HRESULT __stdcall abi_PauseWithTelemetry(impl::abi_arg_in productId, impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(*reinterpret_cast(&productId), *reinterpret_cast(&correlationVector)); return S_OK; } @@ -579,10 +623,11 @@ struct produce productId, abi_arg_in correlationVector) noexcept override + HRESULT __stdcall abi_RestartWithTelemetry(impl::abi_arg_in productId, impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Restart(*reinterpret_cast(&productId), *reinterpret_cast(&correlationVector)); return S_OK; } @@ -596,11 +641,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_StartProductInstallAsync(abi_arg_in productId, abi_arg_in catalogId, abi_arg_in flightId, abi_arg_in clientId, bool repair, bool forceUseOfNonRemovableStorage, abi_arg_in correlationVector, abi_arg_in targetVolume, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_StartProductInstallAsync(impl::abi_arg_in productId, impl::abi_arg_in catalogId, impl::abi_arg_in flightId, impl::abi_arg_in clientId, bool repair, bool forceUseOfNonRemovableStorage, impl::abi_arg_in correlationVector, impl::abi_arg_in targetVolume, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().StartProductInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&catalogId), *reinterpret_cast(&flightId), *reinterpret_cast(&clientId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&correlationVector), *reinterpret_cast(&targetVolume))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartProductInstallAsync(*reinterpret_cast(&productId), *reinterpret_cast(&catalogId), *reinterpret_cast(&flightId), *reinterpret_cast(&clientId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&correlationVector), *reinterpret_cast(&targetVolume))); return S_OK; } catch (...) @@ -610,11 +656,12 @@ struct produce user, abi_arg_in productId, abi_arg_in catalogId, abi_arg_in flightId, abi_arg_in clientId, bool repair, bool forceUseOfNonRemovableStorage, abi_arg_in correlationVector, abi_arg_in targetVolume, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_StartProductInstallForUserAsync(impl::abi_arg_in user, impl::abi_arg_in productId, impl::abi_arg_in catalogId, impl::abi_arg_in flightId, impl::abi_arg_in clientId, bool repair, bool forceUseOfNonRemovableStorage, impl::abi_arg_in correlationVector, impl::abi_arg_in targetVolume, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().StartProductInstallForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&catalogId), *reinterpret_cast(&flightId), *reinterpret_cast(&clientId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&correlationVector), *reinterpret_cast(&targetVolume))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartProductInstallForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&catalogId), *reinterpret_cast(&flightId), *reinterpret_cast(&clientId), repair, forceUseOfNonRemovableStorage, *reinterpret_cast(&correlationVector), *reinterpret_cast(&targetVolume))); return S_OK; } catch (...) @@ -624,11 +671,12 @@ struct produce user, abi_arg_in packageFamilyName, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateAppByPackageFamilyNameForUserAsync(impl::abi_arg_in user, impl::abi_arg_in packageFamilyName, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateAppByPackageFamilyNameForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&packageFamilyName), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAppByPackageFamilyNameForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&packageFamilyName), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -638,11 +686,12 @@ struct produce user, abi_arg_in productId, abi_arg_in skuId, abi_arg_in catalogId, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SearchForUpdatesForUserAsync(impl::abi_arg_in user, impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_in catalogId, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SearchForUpdatesForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForUpdatesForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -652,11 +701,12 @@ struct produce user, abi_arg_in correlationVector, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_SearchForAllUpdatesForUserAsync(impl::abi_arg_in user, impl::abi_arg_in correlationVector, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().SearchForAllUpdatesForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SearchForAllUpdatesForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -666,11 +716,12 @@ struct produce user, abi_arg_in productId, abi_arg_in skuId, abi_arg_in catalogId, abi_arg_in correlationVector, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIsAppAllowedToInstallForUserAsync(impl::abi_arg_in user, impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_in catalogId, impl::abi_arg_in correlationVector, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsAppAllowedToInstallForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsAppAllowedToInstallForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId), *reinterpret_cast(&catalogId), *reinterpret_cast(&correlationVector))); return S_OK; } catch (...) @@ -680,11 +731,12 @@ struct produce user, abi_arg_in productId, abi_arg_in skuId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIsApplicableForUserAsync(impl::abi_arg_in user, impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsApplicableForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsApplicableForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&productId), *reinterpret_cast(&skuId))); return S_OK; } catch (...) @@ -694,10 +746,11 @@ struct produce productId, abi_arg_in correlationVector) noexcept override + HRESULT __stdcall abi_MoveToFrontOfDownloadQueue(impl::abi_arg_in productId, impl::abi_arg_in correlationVector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MoveToFrontOfDownloadQueue(*reinterpret_cast(&productId), *reinterpret_cast(&correlationVector)); return S_OK; } @@ -711,11 +764,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -733,7 +787,8 @@ struct produceshim().InstallState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallState()); return S_OK; } catch (...) @@ -746,7 +801,8 @@ struct produceshim().DownloadSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadSizeInBytes()); return S_OK; } catch (...) @@ -759,7 +815,8 @@ struct produceshim().BytesDownloaded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesDownloaded()); return S_OK; } catch (...) @@ -772,7 +829,8 @@ struct produceshim().PercentComplete()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PercentComplete()); return S_OK; } catch (...) @@ -785,7 +843,8 @@ struct produceshim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -798,11 +857,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -816,7 +876,8 @@ struct produceshim().ReadyForLaunch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadyForLaunch()); return S_OK; } catch (...) @@ -833,184 +894,184 @@ namespace Windows::ApplicationModel::Store::Preview::InstallControl { template Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallState impl_IAppInstallStatus::InstallState() const { Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallState value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallState(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus)->get_InstallState(&value)); return value; } template uint64_t impl_IAppInstallStatus::DownloadSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus)->get_DownloadSizeInBytes(&value)); return value; } template uint64_t impl_IAppInstallStatus::BytesDownloaded() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesDownloaded(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus)->get_BytesDownloaded(&value)); return value; } template double impl_IAppInstallStatus::PercentComplete() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PercentComplete(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus)->get_PercentComplete(&value)); return value; } template HRESULT impl_IAppInstallStatus::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus)->get_ErrorCode(&value)); return value; } template Windows::System::User impl_IAppInstallStatus2::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IAppInstallStatus2)->get_User(put_abi(value))); return value; } template bool impl_IAppInstallStatus2::ReadyForLaunch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadyForLaunch(&value)); + check_hresult(WINRT_SHIM(IAppInstallStatus2)->get_ReadyForLaunch(&value)); return value; } template hstring impl_IAppInstallItem::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IAppInstallItem)->get_ProductId(put_abi(value))); return value; } template hstring impl_IAppInstallItem::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IAppInstallItem)->get_PackageFamilyName(put_abi(value))); return value; } template Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallType impl_IAppInstallItem::InstallType() const { Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallType value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallType(&value)); + check_hresult(WINRT_SHIM(IAppInstallItem)->get_InstallType(&value)); return value; } template bool impl_IAppInstallItem::IsUserInitiated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUserInitiated(&value)); + check_hresult(WINRT_SHIM(IAppInstallItem)->get_IsUserInitiated(&value)); return value; } template Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus impl_IAppInstallItem::GetCurrentStatus() const { Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentStatus(put(result))); + check_hresult(WINRT_SHIM(IAppInstallItem)->abi_GetCurrentStatus(put_abi(result))); return result; } template void impl_IAppInstallItem::Cancel() const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel()); + check_hresult(WINRT_SHIM(IAppInstallItem)->abi_Cancel()); } template void impl_IAppInstallItem::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IAppInstallItem)->abi_Pause()); } template void impl_IAppInstallItem::Restart() const { - check_hresult(static_cast(static_cast(*this))->abi_Restart()); + check_hresult(WINRT_SHIM(IAppInstallItem)->abi_Restart()); } -template event_token impl_IAppInstallItem::Completed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAppInstallItem::Completed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppInstallItem)->add_Completed(get_abi(handler), &token)); return token; } -template event_revoker impl_IAppInstallItem::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAppInstallItem::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallItem::remove_Completed, Completed(handler)); } template void impl_IAppInstallItem::Completed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(token)); + check_hresult(WINRT_SHIM(IAppInstallItem)->remove_Completed(token)); } -template event_token impl_IAppInstallItem::StatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAppInstallItem::StatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppInstallItem)->add_StatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IAppInstallItem::StatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAppInstallItem::StatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallItem::remove_StatusChanged, StatusChanged(handler)); } template void impl_IAppInstallItem::StatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusChanged(token)); + check_hresult(WINRT_SHIM(IAppInstallItem)->remove_StatusChanged(token)); } -template void impl_IAppInstallItem2::Cancel(hstring_ref correlationVector) const +template void impl_IAppInstallItem2::Cancel(hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_CancelWithTelemetry(get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallItem2)->abi_CancelWithTelemetry(get_abi(correlationVector))); } -template void impl_IAppInstallItem2::Pause(hstring_ref correlationVector) const +template void impl_IAppInstallItem2::Pause(hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_PauseWithTelemetry(get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallItem2)->abi_PauseWithTelemetry(get_abi(correlationVector))); } -template void impl_IAppInstallItem2::Restart(hstring_ref correlationVector) const +template void impl_IAppInstallItem2::Restart(hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_RestartWithTelemetry(get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallItem2)->abi_RestartWithTelemetry(get_abi(correlationVector))); } template Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem impl_IAppInstallManagerItemEventArgs::Item() const { Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + check_hresult(WINRT_SHIM(IAppInstallManagerItemEventArgs)->get_Item(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAppInstallManager::AppInstallItems() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AppInstallItems(put(value))); + check_hresult(WINRT_SHIM(IAppInstallManager)->get_AppInstallItems(put_abi(value))); return value; } -template void impl_IAppInstallManager::Cancel(hstring_ref productId) const +template void impl_IAppInstallManager::Cancel(hstring_view productId) const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel(get(productId))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_Cancel(get_abi(productId))); } -template void impl_IAppInstallManager::Pause(hstring_ref productId) const +template void impl_IAppInstallManager::Pause(hstring_view productId) const { - check_hresult(static_cast(static_cast(*this))->abi_Pause(get(productId))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_Pause(get_abi(productId))); } -template void impl_IAppInstallManager::Restart(hstring_ref productId) const +template void impl_IAppInstallManager::Restart(hstring_view productId) const { - check_hresult(static_cast(static_cast(*this))->abi_Restart(get(productId))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_Restart(get_abi(productId))); } template event_token impl_IAppInstallManager::ItemCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppInstallManager)->add_ItemCompleted(get_abi(handler), &token)); return token; } @@ -1021,13 +1082,13 @@ template event_revoker impl_IAppInstallManager< template void impl_IAppInstallManager::ItemCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemCompleted(token)); + check_hresult(WINRT_SHIM(IAppInstallManager)->remove_ItemCompleted(token)); } template event_token impl_IAppInstallManager::ItemStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppInstallManager)->add_ItemStatusChanged(get_abi(handler), &token)); return token; } @@ -1038,184 +1099,184 @@ template event_revoker impl_IAppInstallManager< template void impl_IAppInstallManager::ItemStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemStatusChanged(token)); + check_hresult(WINRT_SHIM(IAppInstallManager)->remove_ItemStatusChanged(token)); } template Windows::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting impl_IAppInstallManager::AutoUpdateSetting() const { Windows::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoUpdateSetting(&value)); + check_hresult(WINRT_SHIM(IAppInstallManager)->get_AutoUpdateSetting(&value)); return value; } template void impl_IAppInstallManager::AutoUpdateSetting(Windows::ApplicationModel::Store::Preview::InstallControl::AutoUpdateSetting value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoUpdateSetting(value)); + check_hresult(WINRT_SHIM(IAppInstallManager)->put_AutoUpdateSetting(value)); } template hstring impl_IAppInstallManager::AcquisitionIdentity() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AcquisitionIdentity(put(value))); + check_hresult(WINRT_SHIM(IAppInstallManager)->get_AcquisitionIdentity(put_abi(value))); return value; } -template void impl_IAppInstallManager::AcquisitionIdentity(hstring_ref value) const +template void impl_IAppInstallManager::AcquisitionIdentity(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AcquisitionIdentity(get(value))); + check_hresult(WINRT_SHIM(IAppInstallManager)->put_AcquisitionIdentity(get_abi(value))); } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::GetIsApplicableAsync(hstring_ref productId, hstring_ref skuId) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::GetIsApplicableAsync(hstring_view productId, hstring_view skuId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsApplicableAsync(get(productId), get(skuId), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_GetIsApplicableAsync(get_abi(productId), get_abi(skuId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::StartAppInstallAsync(hstring_ref productId, hstring_ref skuId, bool repair, bool forceUseOfNonRemovableStorage) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::StartAppInstallAsync(hstring_view productId, hstring_view skuId, bool repair, bool forceUseOfNonRemovableStorage) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAppInstallAsync(get(productId), get(skuId), repair, forceUseOfNonRemovableStorage, put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_StartAppInstallAsync(get_abi(productId), get_abi(skuId), repair, forceUseOfNonRemovableStorage, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::UpdateAppByPackageFamilyNameAsync(hstring_ref packageFamilyName) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::UpdateAppByPackageFamilyNameAsync(hstring_view packageFamilyName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAppByPackageFamilyNameAsync(get(packageFamilyName), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_UpdateAppByPackageFamilyNameAsync(get_abi(packageFamilyName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::SearchForUpdatesAsync(hstring_ref productId, hstring_ref skuId) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::SearchForUpdatesAsync(hstring_view productId, hstring_view skuId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForUpdatesAsync(get(productId), get(skuId), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_SearchForUpdatesAsync(get_abi(productId), get_abi(skuId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager::SearchForAllUpdatesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForAllUpdatesAsync(put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_SearchForAllUpdatesAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::IsStoreBlockedByPolicyAsync(hstring_ref storeClientName, hstring_ref storeClientPublisher) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::IsStoreBlockedByPolicyAsync(hstring_view storeClientName, hstring_view storeClientPublisher) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_IsStoreBlockedByPolicyAsync(get(storeClientName), get(storeClientPublisher), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_IsStoreBlockedByPolicyAsync(get_abi(storeClientName), get_abi(storeClientPublisher), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::GetIsAppAllowedToInstallAsync(hstring_ref productId) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager::GetIsAppAllowedToInstallAsync(hstring_view productId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsAppAllowedToInstallAsync(get(productId), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager)->abi_GetIsAppAllowedToInstallAsync(get_abi(productId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::StartAppInstallAsync(hstring_ref productId, hstring_ref skuId, bool repair, bool forceUseOfNonRemovableStorage, hstring_ref catalogId, hstring_ref bundleId, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::StartAppInstallAsync(hstring_view productId, hstring_view skuId, bool repair, bool forceUseOfNonRemovableStorage, hstring_view catalogId, hstring_view bundleId, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAppInstallWithTelemetryAsync(get(productId), get(skuId), repair, forceUseOfNonRemovableStorage, get(catalogId), get(bundleId), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_StartAppInstallWithTelemetryAsync(get_abi(productId), get_abi(skuId), repair, forceUseOfNonRemovableStorage, get_abi(catalogId), get_abi(bundleId), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::UpdateAppByPackageFamilyNameAsync(hstring_ref packageFamilyName, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::UpdateAppByPackageFamilyNameAsync(hstring_view packageFamilyName, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAppByPackageFamilyNameWithTelemetryAsync(get(packageFamilyName), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_UpdateAppByPackageFamilyNameWithTelemetryAsync(get_abi(packageFamilyName), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::SearchForUpdatesAsync(hstring_ref productId, hstring_ref skuId, hstring_ref catalogId, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::SearchForUpdatesAsync(hstring_view productId, hstring_view skuId, hstring_view catalogId, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForUpdatesWithTelemetryAsync(get(productId), get(skuId), get(catalogId), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_SearchForUpdatesWithTelemetryAsync(get_abi(productId), get_abi(skuId), get_abi(catalogId), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager2::SearchForAllUpdatesAsync(hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager2::SearchForAllUpdatesAsync(hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForAllUpdatesWithTelemetryAsync(get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_SearchForAllUpdatesWithTelemetryAsync(get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::GetIsAppAllowedToInstallAsync(hstring_ref productId, hstring_ref skuId, hstring_ref catalogId, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager2::GetIsAppAllowedToInstallAsync(hstring_view productId, hstring_view skuId, hstring_view catalogId, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsAppAllowedToInstallWithTelemetryAsync(get(productId), get(skuId), get(catalogId), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_GetIsAppAllowedToInstallWithTelemetryAsync(get_abi(productId), get_abi(skuId), get_abi(catalogId), get_abi(correlationVector), put_abi(operation))); return operation; } -template void impl_IAppInstallManager2::Cancel(hstring_ref productId, hstring_ref correlationVector) const +template void impl_IAppInstallManager2::Cancel(hstring_view productId, hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_CancelWithTelemetry(get(productId), get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_CancelWithTelemetry(get_abi(productId), get_abi(correlationVector))); } -template void impl_IAppInstallManager2::Pause(hstring_ref productId, hstring_ref correlationVector) const +template void impl_IAppInstallManager2::Pause(hstring_view productId, hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_PauseWithTelemetry(get(productId), get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_PauseWithTelemetry(get_abi(productId), get_abi(correlationVector))); } -template void impl_IAppInstallManager2::Restart(hstring_ref productId, hstring_ref correlationVector) const +template void impl_IAppInstallManager2::Restart(hstring_view productId, hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_RestartWithTelemetry(get(productId), get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallManager2)->abi_RestartWithTelemetry(get_abi(productId), get_abi(correlationVector))); } -template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::StartProductInstallAsync(hstring_ref productId, hstring_ref catalogId, hstring_ref flightId, hstring_ref clientId, bool repair, bool forceUseOfNonRemovableStorage, hstring_ref correlationVector, const Windows::Management::Deployment::PackageVolume & targetVolume) const +template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::StartProductInstallAsync(hstring_view productId, hstring_view catalogId, hstring_view flightId, hstring_view clientId, bool repair, bool forceUseOfNonRemovableStorage, hstring_view correlationVector, const Windows::Management::Deployment::PackageVolume & targetVolume) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_StartProductInstallAsync(get(productId), get(catalogId), get(flightId), get(clientId), repair, forceUseOfNonRemovableStorage, get(correlationVector), get(targetVolume), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_StartProductInstallAsync(get_abi(productId), get_abi(catalogId), get_abi(flightId), get_abi(clientId), repair, forceUseOfNonRemovableStorage, get_abi(correlationVector), get_abi(targetVolume), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::StartProductInstallForUserAsync(const Windows::System::User & user, hstring_ref productId, hstring_ref catalogId, hstring_ref flightId, hstring_ref clientId, bool repair, bool forceUseOfNonRemovableStorage, hstring_ref correlationVector, const Windows::Management::Deployment::PackageVolume & targetVolume) const +template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::StartProductInstallForUserAsync(const Windows::System::User & user, hstring_view productId, hstring_view catalogId, hstring_view flightId, hstring_view clientId, bool repair, bool forceUseOfNonRemovableStorage, hstring_view correlationVector, const Windows::Management::Deployment::PackageVolume & targetVolume) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_StartProductInstallForUserAsync(get(user), get(productId), get(catalogId), get(flightId), get(clientId), repair, forceUseOfNonRemovableStorage, get(correlationVector), get(targetVolume), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_StartProductInstallForUserAsync(get_abi(user), get_abi(productId), get_abi(catalogId), get_abi(flightId), get_abi(clientId), repair, forceUseOfNonRemovableStorage, get_abi(correlationVector), get_abi(targetVolume), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::UpdateAppByPackageFamilyNameForUserAsync(const Windows::System::User & user, hstring_ref packageFamilyName, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::UpdateAppByPackageFamilyNameForUserAsync(const Windows::System::User & user, hstring_view packageFamilyName, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAppByPackageFamilyNameForUserAsync(get(user), get(packageFamilyName), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_UpdateAppByPackageFamilyNameForUserAsync(get_abi(user), get_abi(packageFamilyName), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::SearchForUpdatesForUserAsync(const Windows::System::User & user, hstring_ref productId, hstring_ref skuId, hstring_ref catalogId, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::SearchForUpdatesForUserAsync(const Windows::System::User & user, hstring_view productId, hstring_view skuId, hstring_view catalogId, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForUpdatesForUserAsync(get(user), get(productId), get(skuId), get(catalogId), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_SearchForUpdatesForUserAsync(get_abi(user), get_abi(productId), get_abi(skuId), get_abi(catalogId), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::SearchForAllUpdatesForUserAsync(const Windows::System::User & user, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation> impl_IAppInstallManager3::SearchForAllUpdatesForUserAsync(const Windows::System::User & user, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_SearchForAllUpdatesForUserAsync(get(user), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_SearchForAllUpdatesForUserAsync(get_abi(user), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::GetIsAppAllowedToInstallForUserAsync(const Windows::System::User & user, hstring_ref productId, hstring_ref skuId, hstring_ref catalogId, hstring_ref correlationVector) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::GetIsAppAllowedToInstallForUserAsync(const Windows::System::User & user, hstring_view productId, hstring_view skuId, hstring_view catalogId, hstring_view correlationVector) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsAppAllowedToInstallForUserAsync(get(user), get(productId), get(skuId), get(catalogId), get(correlationVector), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_GetIsAppAllowedToInstallForUserAsync(get_abi(user), get_abi(productId), get_abi(skuId), get_abi(catalogId), get_abi(correlationVector), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::GetIsApplicableForUserAsync(const Windows::System::User & user, hstring_ref productId, hstring_ref skuId) const +template Windows::Foundation::IAsyncOperation impl_IAppInstallManager3::GetIsApplicableForUserAsync(const Windows::System::User & user, hstring_view productId, hstring_view skuId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsApplicableForUserAsync(get(user), get(productId), get(skuId), put(operation))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_GetIsApplicableForUserAsync(get_abi(user), get_abi(productId), get_abi(skuId), put_abi(operation))); return operation; } -template void impl_IAppInstallManager3::MoveToFrontOfDownloadQueue(hstring_ref productId, hstring_ref correlationVector) const +template void impl_IAppInstallManager3::MoveToFrontOfDownloadQueue(hstring_view productId, hstring_view correlationVector) const { - check_hresult(static_cast(static_cast(*this))->abi_MoveToFrontOfDownloadQueue(get(productId), get(correlationVector))); + check_hresult(WINRT_SHIM(IAppInstallManager3)->abi_MoveToFrontOfDownloadQueue(get_abi(productId), get_abi(correlationVector))); } inline AppInstallManager::AppInstallManager() : @@ -1225,3 +1286,113 @@ inline AppInstallManager::AppInstallManager() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallItem2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallManager3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallManagerItemEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::IAppInstallStatus2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallManagerItemEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::InstallControl::AppInstallStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.h index 9892c193a..a8d4b37fe 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.Preview.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" @@ -16,10 +19,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_SetSystemConfiguration(abi_arg_in catalogHardwareManufacturerId, abi_arg_in catalogStoreContentModifierId, abi_arg_in systemConfigurationExpiration, abi_arg_in catalogHardwareDescriptor) noexcept override + HRESULT __stdcall abi_SetSystemConfiguration(impl::abi_arg_in catalogHardwareManufacturerId, impl::abi_arg_in catalogStoreContentModifierId, impl::abi_arg_in systemConfigurationExpiration, impl::abi_arg_in catalogHardwareDescriptor) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSystemConfiguration(*reinterpret_cast(&catalogHardwareManufacturerId), *reinterpret_cast(&catalogStoreContentModifierId), *reinterpret_cast(&systemConfigurationExpiration), *reinterpret_cast(&catalogHardwareDescriptor)); return S_OK; } @@ -29,10 +33,11 @@ struct produce mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) noexcept override + HRESULT __stdcall abi_SetMobileOperatorConfiguration(impl::abi_arg_in mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMobileOperatorConfiguration(*reinterpret_cast(&mobileOperatorId), appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes); return S_OK; } @@ -42,10 +47,11 @@ struct produce webAccountId) noexcept override + HRESULT __stdcall abi_SetStoreWebAccountId(impl::abi_arg_in webAccountId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStoreWebAccountId(*reinterpret_cast(&webAccountId)); return S_OK; } @@ -55,11 +61,12 @@ struct produce webAccountId, bool * value) noexcept override + HRESULT __stdcall abi_IsStoreWebAccountId(impl::abi_arg_in webAccountId, bool * value) noexcept override { try { - *value = detach(this->shim().IsStoreWebAccountId(*reinterpret_cast(&webAccountId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStoreWebAccountId(*reinterpret_cast(&webAccountId))); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HardwareManufacturerInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HardwareManufacturerInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareManufacturerInfo()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce> systemFeatures, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FilterUnsupportedSystemFeaturesAsync(impl::abi_arg_in> systemFeatures, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FilterUnsupportedSystemFeaturesAsync(*reinterpret_cast *>(&systemFeatures))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FilterUnsupportedSystemFeaturesAsync(*reinterpret_cast *>(&systemFeatures))); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PurchasePromptingPolicy(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PurchasePromptingPolicy(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PurchasePromptingPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PurchasePromptingPolicy()); return S_OK; } catch (...) @@ -114,10 +124,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_PurchasePromptingPolicy(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PurchasePromptingPolicy(*reinterpret_cast *>(&value)); return S_OK; } @@ -135,7 +146,8 @@ struct produceshim().HasStoreWebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasStoreWebAccount()); return S_OK; } catch (...) @@ -144,11 +156,12 @@ struct produce user, bool * value) noexcept override + HRESULT __stdcall abi_HasStoreWebAccountForUser(impl::abi_arg_in user, bool * value) noexcept override { try { - *value = detach(this->shim().HasStoreWebAccountForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasStoreWebAccountForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetStoreLogDataAsync(Windows::ApplicationModel::Store::Preview::StoreLogOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStoreLogDataAsync(options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStoreLogDataAsync(options)); return S_OK; } catch (...) @@ -171,10 +185,11 @@ struct produce user, abi_arg_in webAccountId) noexcept override + HRESULT __stdcall abi_SetStoreWebAccountIdForUser(impl::abi_arg_in user, impl::abi_arg_in webAccountId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStoreWebAccountIdForUser(*reinterpret_cast(&user), *reinterpret_cast(&webAccountId)); return S_OK; } @@ -184,11 +199,12 @@ struct produce user, abi_arg_in webAccountId, bool * value) noexcept override + HRESULT __stdcall abi_IsStoreWebAccountIdForUser(impl::abi_arg_in user, impl::abi_arg_in webAccountId, bool * value) noexcept override { try { - *value = detach(this->shim().IsStoreWebAccountIdForUser(*reinterpret_cast(&user), *reinterpret_cast(&webAccountId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStoreWebAccountIdForUser(*reinterpret_cast(&user), *reinterpret_cast(&webAccountId))); return S_OK; } catch (...) @@ -197,11 +213,12 @@ struct produce user, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetPurchasePromptingPolicyForUser(impl::abi_arg_in user, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetPurchasePromptingPolicyForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPurchasePromptingPolicyForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -211,10 +228,11 @@ struct produce user, abi_arg_in> value) noexcept override + HRESULT __stdcall abi_SetPurchasePromptingPolicyForUser(impl::abi_arg_in user, impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPurchasePromptingPolicyForUser(*reinterpret_cast(&user), *reinterpret_cast *>(&value)); return S_OK; } @@ -228,11 +246,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_HardwareManufacturerId(abi_arg_out value) noexcept override + HRESULT __stdcall get_HardwareManufacturerId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HardwareManufacturerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareManufacturerId()); return S_OK; } catch (...) @@ -242,11 +261,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StoreContentModifierId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreContentModifierId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreContentModifierId()); return S_OK; } catch (...) @@ -256,11 +276,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ModelName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModelName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelName()); return S_OK; } catch (...) @@ -270,11 +291,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ManufacturerName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ManufacturerName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManufacturerName()); return S_OK; } catch (...) @@ -288,11 +310,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestProductPurchaseByProductIdAndSkuIdAsync(abi_arg_in productId, abi_arg_in skuId, abi_arg_out> requestPurchaseBySkuIdOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseByProductIdAndSkuIdAsync(impl::abi_arg_in productId, impl::abi_arg_in skuId, impl::abi_arg_out> requestPurchaseBySkuIdOperation) noexcept override { try { - *requestPurchaseBySkuIdOperation = detach(this->shim().RequestProductPurchaseByProductIdAndSkuIdAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); + typename D::abi_guard guard(this->shim()); + *requestPurchaseBySkuIdOperation = detach_abi(this->shim().RequestProductPurchaseByProductIdAndSkuIdAsync(*reinterpret_cast(&productId), *reinterpret_cast(&skuId))); return S_OK; } catch (...) @@ -302,11 +325,12 @@ struct produce : pr } } - HRESULT __stdcall abi_LoadAddOnProductInfosAsync(abi_arg_out>> loadAddOnProductInfosOperation) noexcept override + HRESULT __stdcall abi_LoadAddOnProductInfosAsync(impl::abi_arg_out>> loadAddOnProductInfosOperation) noexcept override { try { - *loadAddOnProductInfosOperation = detach(this->shim().LoadAddOnProductInfosAsync()); + typename D::abi_guard guard(this->shim()); + *loadAddOnProductInfosOperation = detach_abi(this->shim().LoadAddOnProductInfosAsync()); return S_OK; } catch (...) @@ -320,11 +344,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -334,11 +359,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProductType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductType()); return S_OK; } catch (...) @@ -348,11 +374,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -362,11 +389,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -376,11 +404,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SkuInfoList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SkuInfoList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SkuInfoList()); return S_OK; } catch (...) @@ -398,7 +427,8 @@ struct produceshim().ProductPurchaseStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductPurchaseStatus()); return S_OK; } catch (...) @@ -411,11 +441,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -425,11 +456,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SkuId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SkuId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SkuId()); return S_OK; } catch (...) @@ -439,11 +471,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SkuType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SkuType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SkuType()); return S_OK; } catch (...) @@ -453,11 +486,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -467,11 +501,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -481,11 +516,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CustomDeveloperData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomDeveloperData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomDeveloperData()); return S_OK; } catch (...) @@ -495,11 +531,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CurrencyCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrencyCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrencyCode()); return S_OK; } catch (...) @@ -509,11 +546,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FormattedListPrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedListPrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedListPrice()); return S_OK; } catch (...) @@ -523,11 +561,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExtendedData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedData()); return S_OK; } catch (...) @@ -545,259 +584,259 @@ namespace Windows::ApplicationModel::Store::Preview { template hstring impl_IStorePreviewProductInfo::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewProductInfo)->get_ProductId(put_abi(value))); return value; } template hstring impl_IStorePreviewProductInfo::ProductType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductType(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewProductInfo)->get_ProductType(put_abi(value))); return value; } template hstring impl_IStorePreviewProductInfo::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewProductInfo)->get_Title(put_abi(value))); return value; } template hstring impl_IStorePreviewProductInfo::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewProductInfo)->get_Description(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStorePreviewProductInfo::SkuInfoList() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SkuInfoList(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewProductInfo)->get_SkuInfoList(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_ProductId(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::SkuId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SkuId(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_SkuId(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::SkuType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SkuType(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_SkuType(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_Title(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_Description(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::CustomDeveloperData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomDeveloperData(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_CustomDeveloperData(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::CurrencyCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrencyCode(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_CurrencyCode(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::FormattedListPrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedListPrice(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_FormattedListPrice(put_abi(value))); return value; } template hstring impl_IStorePreviewSkuInfo::ExtendedData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedData(put(value))); + check_hresult(WINRT_SHIM(IStorePreviewSkuInfo)->get_ExtendedData(put_abi(value))); return value; } template Windows::ApplicationModel::Store::Preview::StorePreviewProductPurchaseStatus impl_IStorePreviewPurchaseResults::ProductPurchaseStatus() const { Windows::ApplicationModel::Store::Preview::StorePreviewProductPurchaseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ProductPurchaseStatus(&value)); + check_hresult(WINRT_SHIM(IStorePreviewPurchaseResults)->get_ProductPurchaseStatus(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IStorePreview::RequestProductPurchaseByProductIdAndSkuIdAsync(hstring_ref productId, hstring_ref skuId) const +template Windows::Foundation::IAsyncOperation impl_IStorePreview::RequestProductPurchaseByProductIdAndSkuIdAsync(hstring_view productId, hstring_view skuId) const { Windows::Foundation::IAsyncOperation requestPurchaseBySkuIdOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseByProductIdAndSkuIdAsync(get(productId), get(skuId), put(requestPurchaseBySkuIdOperation))); + check_hresult(WINRT_SHIM(IStorePreview)->abi_RequestProductPurchaseByProductIdAndSkuIdAsync(get_abi(productId), get_abi(skuId), put_abi(requestPurchaseBySkuIdOperation))); return requestPurchaseBySkuIdOperation; } template Windows::Foundation::IAsyncOperation> impl_IStorePreview::LoadAddOnProductInfosAsync() const { Windows::Foundation::IAsyncOperation> loadAddOnProductInfosOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadAddOnProductInfosAsync(put(loadAddOnProductInfosOperation))); + check_hresult(WINRT_SHIM(IStorePreview)->abi_LoadAddOnProductInfosAsync(put_abi(loadAddOnProductInfosOperation))); return loadAddOnProductInfosOperation; } template hstring impl_IStoreHardwareManufacturerInfo::HardwareManufacturerId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HardwareManufacturerId(put(value))); + check_hresult(WINRT_SHIM(IStoreHardwareManufacturerInfo)->get_HardwareManufacturerId(put_abi(value))); return value; } template hstring impl_IStoreHardwareManufacturerInfo::StoreContentModifierId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreContentModifierId(put(value))); + check_hresult(WINRT_SHIM(IStoreHardwareManufacturerInfo)->get_StoreContentModifierId(put_abi(value))); return value; } template hstring impl_IStoreHardwareManufacturerInfo::ModelName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ModelName(put(value))); + check_hresult(WINRT_SHIM(IStoreHardwareManufacturerInfo)->get_ModelName(put_abi(value))); return value; } template hstring impl_IStoreHardwareManufacturerInfo::ManufacturerName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ManufacturerName(put(value))); + check_hresult(WINRT_SHIM(IStoreHardwareManufacturerInfo)->get_ManufacturerName(put_abi(value))); return value; } -template void impl_IStoreConfigurationStatics::SetSystemConfiguration(hstring_ref catalogHardwareManufacturerId, hstring_ref catalogStoreContentModifierId, const Windows::Foundation::DateTime & systemConfigurationExpiration, hstring_ref catalogHardwareDescriptor) const +template void impl_IStoreConfigurationStatics::SetSystemConfiguration(hstring_view catalogHardwareManufacturerId, hstring_view catalogStoreContentModifierId, const Windows::Foundation::DateTime & systemConfigurationExpiration, hstring_view catalogHardwareDescriptor) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSystemConfiguration(get(catalogHardwareManufacturerId), get(catalogStoreContentModifierId), get(systemConfigurationExpiration), get(catalogHardwareDescriptor))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->abi_SetSystemConfiguration(get_abi(catalogHardwareManufacturerId), get_abi(catalogStoreContentModifierId), get_abi(systemConfigurationExpiration), get_abi(catalogHardwareDescriptor))); } -template void impl_IStoreConfigurationStatics::SetMobileOperatorConfiguration(hstring_ref mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) const +template void impl_IStoreConfigurationStatics::SetMobileOperatorConfiguration(hstring_view mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMobileOperatorConfiguration(get(mobileOperatorId), appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes)); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->abi_SetMobileOperatorConfiguration(get_abi(mobileOperatorId), appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes)); } -template void impl_IStoreConfigurationStatics::SetStoreWebAccountId(hstring_ref webAccountId) const +template void impl_IStoreConfigurationStatics::SetStoreWebAccountId(hstring_view webAccountId) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStoreWebAccountId(get(webAccountId))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->abi_SetStoreWebAccountId(get_abi(webAccountId))); } -template bool impl_IStoreConfigurationStatics::IsStoreWebAccountId(hstring_ref webAccountId) const +template bool impl_IStoreConfigurationStatics::IsStoreWebAccountId(hstring_view webAccountId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsStoreWebAccountId(get(webAccountId), &value)); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->abi_IsStoreWebAccountId(get_abi(webAccountId), &value)); return value; } template Windows::ApplicationModel::Store::Preview::StoreHardwareManufacturerInfo impl_IStoreConfigurationStatics::HardwareManufacturerInfo() const { Windows::ApplicationModel::Store::Preview::StoreHardwareManufacturerInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HardwareManufacturerInfo(put(value))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->get_HardwareManufacturerInfo(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_IStoreConfigurationStatics::FilterUnsupportedSystemFeaturesAsync(const Windows::Foundation::Collections::IIterable & systemFeatures) const +template Windows::Foundation::IAsyncOperation> impl_IStoreConfigurationStatics::FilterUnsupportedSystemFeaturesAsync(iterable systemFeatures) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FilterUnsupportedSystemFeaturesAsync(get(systemFeatures), put(operation))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics)->abi_FilterUnsupportedSystemFeaturesAsync(get_abi(systemFeatures), put_abi(operation))); return operation; } template Windows::Foundation::IReference impl_IStoreConfigurationStatics2::PurchasePromptingPolicy() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PurchasePromptingPolicy(put(value))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics2)->get_PurchasePromptingPolicy(put_abi(value))); return value; } -template void impl_IStoreConfigurationStatics2::PurchasePromptingPolicy(const Windows::Foundation::IReference & value) const +template void impl_IStoreConfigurationStatics2::PurchasePromptingPolicy(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_PurchasePromptingPolicy(get(value))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics2)->put_PurchasePromptingPolicy(get_abi(value))); } template bool impl_IStoreConfigurationStatics3::HasStoreWebAccount() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_HasStoreWebAccount(&value)); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_HasStoreWebAccount(&value)); return value; } template bool impl_IStoreConfigurationStatics3::HasStoreWebAccountForUser(const Windows::System::User & user) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_HasStoreWebAccountForUser(get(user), &value)); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_HasStoreWebAccountForUser(get_abi(user), &value)); return value; } template Windows::Foundation::IAsyncOperation impl_IStoreConfigurationStatics3::GetStoreLogDataAsync(Windows::ApplicationModel::Store::Preview::StoreLogOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStoreLogDataAsync(options, put(operation))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_GetStoreLogDataAsync(options, put_abi(operation))); return operation; } -template void impl_IStoreConfigurationStatics3::SetStoreWebAccountIdForUser(const Windows::System::User & user, hstring_ref webAccountId) const +template void impl_IStoreConfigurationStatics3::SetStoreWebAccountIdForUser(const Windows::System::User & user, hstring_view webAccountId) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStoreWebAccountIdForUser(get(user), get(webAccountId))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_SetStoreWebAccountIdForUser(get_abi(user), get_abi(webAccountId))); } -template bool impl_IStoreConfigurationStatics3::IsStoreWebAccountIdForUser(const Windows::System::User & user, hstring_ref webAccountId) const +template bool impl_IStoreConfigurationStatics3::IsStoreWebAccountIdForUser(const Windows::System::User & user, hstring_view webAccountId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsStoreWebAccountIdForUser(get(user), get(webAccountId), &value)); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_IsStoreWebAccountIdForUser(get_abi(user), get_abi(webAccountId), &value)); return value; } template Windows::Foundation::IReference impl_IStoreConfigurationStatics3::GetPurchasePromptingPolicyForUser(const Windows::System::User & user) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_GetPurchasePromptingPolicyForUser(get(user), put(value))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_GetPurchasePromptingPolicyForUser(get_abi(user), put_abi(value))); return value; } -template void impl_IStoreConfigurationStatics3::SetPurchasePromptingPolicyForUser(const Windows::System::User & user, const Windows::Foundation::IReference & value) const +template void impl_IStoreConfigurationStatics3::SetPurchasePromptingPolicyForUser(const Windows::System::User & user, const optional & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPurchasePromptingPolicyForUser(get(user), get(value))); + check_hresult(WINRT_SHIM(IStoreConfigurationStatics3)->abi_SetPurchasePromptingPolicyForUser(get_abi(user), get_abi(value))); } -inline void StoreConfiguration::SetSystemConfiguration(hstring_ref catalogHardwareManufacturerId, hstring_ref catalogStoreContentModifierId, const Windows::Foundation::DateTime & systemConfigurationExpiration, hstring_ref catalogHardwareDescriptor) +inline void StoreConfiguration::SetSystemConfiguration(hstring_view catalogHardwareManufacturerId, hstring_view catalogStoreContentModifierId, const Windows::Foundation::DateTime & systemConfigurationExpiration, hstring_view catalogHardwareDescriptor) { get_activation_factory().SetSystemConfiguration(catalogHardwareManufacturerId, catalogStoreContentModifierId, systemConfigurationExpiration, catalogHardwareDescriptor); } -inline void StoreConfiguration::SetMobileOperatorConfiguration(hstring_ref mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) +inline void StoreConfiguration::SetMobileOperatorConfiguration(hstring_view mobileOperatorId, uint32_t appDownloadLimitInMegabytes, uint32_t updateDownloadLimitInMegabytes) { get_activation_factory().SetMobileOperatorConfiguration(mobileOperatorId, appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes); } -inline void StoreConfiguration::SetStoreWebAccountId(hstring_ref webAccountId) +inline void StoreConfiguration::SetStoreWebAccountId(hstring_view webAccountId) { get_activation_factory().SetStoreWebAccountId(webAccountId); } -inline bool StoreConfiguration::IsStoreWebAccountId(hstring_ref webAccountId) +inline bool StoreConfiguration::IsStoreWebAccountId(hstring_view webAccountId) { return get_activation_factory().IsStoreWebAccountId(webAccountId); } @@ -807,7 +846,7 @@ inline Windows::ApplicationModel::Store::Preview::StoreHardwareManufacturerInfo return get_activation_factory().HardwareManufacturerInfo(); } -inline Windows::Foundation::IAsyncOperation> StoreConfiguration::FilterUnsupportedSystemFeaturesAsync(const Windows::Foundation::Collections::IIterable & systemFeatures) +inline Windows::Foundation::IAsyncOperation> StoreConfiguration::FilterUnsupportedSystemFeaturesAsync(iterable systemFeatures) { return get_activation_factory().FilterUnsupportedSystemFeaturesAsync(systemFeatures); } @@ -817,7 +856,7 @@ inline Windows::Foundation::IReference StoreConfiguration::PurchasePro return get_activation_factory().PurchasePromptingPolicy(); } -inline void StoreConfiguration::PurchasePromptingPolicy(const Windows::Foundation::IReference & value) +inline void StoreConfiguration::PurchasePromptingPolicy(const optional & value) { get_activation_factory().PurchasePromptingPolicy(value); } @@ -837,12 +876,12 @@ inline Windows::Foundation::IAsyncOperation().GetStoreLogDataAsync(options); } -inline void StoreConfiguration::SetStoreWebAccountIdForUser(const Windows::System::User & user, hstring_ref webAccountId) +inline void StoreConfiguration::SetStoreWebAccountIdForUser(const Windows::System::User & user, hstring_view webAccountId) { get_activation_factory().SetStoreWebAccountIdForUser(user, webAccountId); } -inline bool StoreConfiguration::IsStoreWebAccountIdForUser(const Windows::System::User & user, hstring_ref webAccountId) +inline bool StoreConfiguration::IsStoreWebAccountIdForUser(const Windows::System::User & user, hstring_view webAccountId) { return get_activation_factory().IsStoreWebAccountIdForUser(user, webAccountId); } @@ -852,12 +891,12 @@ inline Windows::Foundation::IReference StoreConfiguration::GetPurchase return get_activation_factory().GetPurchasePromptingPolicyForUser(user); } -inline void StoreConfiguration::SetPurchasePromptingPolicyForUser(const Windows::System::User & user, const Windows::Foundation::IReference & value) +inline void StoreConfiguration::SetPurchasePromptingPolicyForUser(const Windows::System::User & user, const optional & value) { get_activation_factory().SetPurchasePromptingPolicyForUser(user, value); } -inline Windows::Foundation::IAsyncOperation StorePreview::RequestProductPurchaseByProductIdAndSkuIdAsync(hstring_ref productId, hstring_ref skuId) +inline Windows::Foundation::IAsyncOperation StorePreview::RequestProductPurchaseByProductIdAndSkuIdAsync(hstring_view productId, hstring_view skuId) { return get_activation_factory().RequestProductPurchaseByProductIdAndSkuIdAsync(productId, skuId); } @@ -870,3 +909,113 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStoreConfigurationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStoreConfigurationStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStoreConfigurationStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStoreHardwareManufacturerInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStorePreview & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStorePreviewProductInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStorePreviewPurchaseResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::IStorePreviewSkuInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::StoreHardwareManufacturerInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::StorePreviewProductInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::StorePreviewPurchaseResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::Preview::StorePreviewSkuInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.h index 578565dce..8dd3ee3be 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Store.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Store.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -27,7 +30,7 @@ template LicenseChangedEventHandler::LicenseChangedEven inline void LicenseChangedEventHandler::operator()() const { - check_hresult((*this)->abi_Invoke()); + check_hresult((*(abi **)this)->abi_Invoke()); } } @@ -37,11 +40,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_LicenseInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_LicenseInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LicenseInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseInformation()); return S_OK; } catch (...) @@ -51,11 +55,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_LinkUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinkUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinkUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkUri()); return S_OK; } catch (...) @@ -69,7 +74,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -78,11 +84,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_RequestAppPurchaseAsync(bool includeReceipt, abi_arg_out> requestAppPurchaseOperation) noexcept override + HRESULT __stdcall abi_RequestAppPurchaseAsync(bool includeReceipt, impl::abi_arg_out> requestAppPurchaseOperation) noexcept override { try { - *requestAppPurchaseOperation = detach(this->shim().RequestAppPurchaseAsync(includeReceipt)); + typename D::abi_guard guard(this->shim()); + *requestAppPurchaseOperation = detach_abi(this->shim().RequestAppPurchaseAsync(includeReceipt)); return S_OK; } catch (...) @@ -92,11 +99,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_RequestProductPurchaseAsync(abi_arg_in productId, bool includeReceipt, abi_arg_out> requestProductPurchaseOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseAsync(impl::abi_arg_in productId, bool includeReceipt, impl::abi_arg_out> requestProductPurchaseOperation) noexcept override { try { - *requestProductPurchaseOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), includeReceipt)); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), includeReceipt)); return S_OK; } catch (...) @@ -106,11 +114,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_LoadListingInformationAsync(abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationAsync(impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationAsync()); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationAsync()); return S_OK; } catch (...) @@ -120,11 +129,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetAppReceiptAsync(abi_arg_out> appReceiptOperation) noexcept override + HRESULT __stdcall abi_GetAppReceiptAsync(impl::abi_arg_out> appReceiptOperation) noexcept override { try { - *appReceiptOperation = detach(this->shim().GetAppReceiptAsync()); + typename D::abi_guard guard(this->shim()); + *appReceiptOperation = detach_abi(this->shim().GetAppReceiptAsync()); return S_OK; } catch (...) @@ -134,11 +144,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetProductReceiptAsync(abi_arg_in productId, abi_arg_out> getProductReceiptOperation) noexcept override + HRESULT __stdcall abi_GetProductReceiptAsync(impl::abi_arg_in productId, impl::abi_arg_out> getProductReceiptOperation) noexcept override { try { - *getProductReceiptOperation = detach(this->shim().GetProductReceiptAsync(*reinterpret_cast(&productId))); + typename D::abi_guard guard(this->shim()); + *getProductReceiptOperation = detach_abi(this->shim().GetProductReceiptAsync(*reinterpret_cast(&productId))); return S_OK; } catch (...) @@ -152,11 +163,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetCustomerPurchaseIdAsync(abi_arg_in serviceTicket, abi_arg_in publisherUserId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCustomerPurchaseIdAsync(impl::abi_arg_in serviceTicket, impl::abi_arg_in publisherUserId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCustomerPurchaseIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCustomerPurchaseIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); return S_OK; } catch (...) @@ -166,11 +178,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetCustomerCollectionsIdAsync(abi_arg_in serviceTicket, abi_arg_in publisherUserId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCustomerCollectionsIdAsync(impl::abi_arg_in serviceTicket, impl::abi_arg_in publisherUserId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCustomerCollectionsIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCustomerCollectionsIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); return S_OK; } catch (...) @@ -184,11 +197,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_LicenseInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_LicenseInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LicenseInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseInformation()); return S_OK; } catch (...) @@ -198,11 +212,12 @@ struct produce : prod } } - HRESULT __stdcall get_LinkUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinkUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinkUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkUri()); return S_OK; } catch (...) @@ -216,7 +231,8 @@ struct produce : prod { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -225,11 +241,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestAppPurchaseAsync(bool includeReceipt, abi_arg_out> requestAppPurchaseOperation) noexcept override + HRESULT __stdcall abi_RequestAppPurchaseAsync(bool includeReceipt, impl::abi_arg_out> requestAppPurchaseOperation) noexcept override { try { - *requestAppPurchaseOperation = detach(this->shim().RequestAppPurchaseAsync(includeReceipt)); + typename D::abi_guard guard(this->shim()); + *requestAppPurchaseOperation = detach_abi(this->shim().RequestAppPurchaseAsync(includeReceipt)); return S_OK; } catch (...) @@ -239,11 +256,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RequestProductPurchaseAsync(abi_arg_in productId, bool includeReceipt, abi_arg_out> requestProductPurchaseOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseAsync(impl::abi_arg_in productId, bool includeReceipt, impl::abi_arg_out> requestProductPurchaseOperation) noexcept override { try { - *requestProductPurchaseOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), includeReceipt)); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), includeReceipt)); return S_OK; } catch (...) @@ -253,11 +271,12 @@ struct produce : prod } } - HRESULT __stdcall abi_LoadListingInformationAsync(abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationAsync(impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationAsync()); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationAsync()); return S_OK; } catch (...) @@ -267,11 +286,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetAppReceiptAsync(abi_arg_out> appReceiptOperation) noexcept override + HRESULT __stdcall abi_GetAppReceiptAsync(impl::abi_arg_out> appReceiptOperation) noexcept override { try { - *appReceiptOperation = detach(this->shim().GetAppReceiptAsync()); + typename D::abi_guard guard(this->shim()); + *appReceiptOperation = detach_abi(this->shim().GetAppReceiptAsync()); return S_OK; } catch (...) @@ -281,11 +301,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetProductReceiptAsync(abi_arg_in productId, abi_arg_out> getProductReceiptOperation) noexcept override + HRESULT __stdcall abi_GetProductReceiptAsync(impl::abi_arg_in productId, impl::abi_arg_out> getProductReceiptOperation) noexcept override { try { - *getProductReceiptOperation = detach(this->shim().GetProductReceiptAsync(*reinterpret_cast(&productId))); + typename D::abi_guard guard(this->shim()); + *getProductReceiptOperation = detach_abi(this->shim().GetProductReceiptAsync(*reinterpret_cast(&productId))); return S_OK; } catch (...) @@ -295,11 +316,12 @@ struct produce : prod } } - HRESULT __stdcall abi_ReloadSimulatorAsync(abi_arg_in simulatorSettingsFile, abi_arg_out reloadSimulatorOperation) noexcept override + HRESULT __stdcall abi_ReloadSimulatorAsync(impl::abi_arg_in simulatorSettingsFile, impl::abi_arg_out reloadSimulatorOperation) noexcept override { try { - *reloadSimulatorOperation = detach(this->shim().ReloadSimulatorAsync(*reinterpret_cast(&simulatorSettingsFile))); + typename D::abi_guard guard(this->shim()); + *reloadSimulatorOperation = detach_abi(this->shim().ReloadSimulatorAsync(*reinterpret_cast(&simulatorSettingsFile))); return S_OK; } catch (...) @@ -313,11 +335,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_LoadListingInformationByProductIdsAsync(abi_arg_in> productIds, abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationByProductIdsAsync(impl::abi_arg_in> productIds, impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationByProductIdsAsync(*reinterpret_cast *>(&productIds))); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationByProductIdsAsync(*reinterpret_cast *>(&productIds))); return S_OK; } catch (...) @@ -327,11 +350,12 @@ struct produce> keywords, abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationByKeywordsAsync(impl::abi_arg_in> keywords, impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationByKeywordsAsync(*reinterpret_cast *>(&keywords))); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationByKeywordsAsync(*reinterpret_cast *>(&keywords))); return S_OK; } catch (...) @@ -345,11 +369,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetAppPurchaseCampaignIdAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAppPurchaseCampaignIdAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAppPurchaseCampaignIdAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAppPurchaseCampaignIdAsync()); return S_OK; } catch (...) @@ -363,11 +388,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ReportConsumableFulfillmentAsync(abi_arg_in productId, GUID transactionId, abi_arg_out> reportConsumableFulfillmentOperation) noexcept override + HRESULT __stdcall abi_ReportConsumableFulfillmentAsync(impl::abi_arg_in productId, GUID transactionId, impl::abi_arg_out> reportConsumableFulfillmentOperation) noexcept override { try { - *reportConsumableFulfillmentOperation = detach(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productId), transactionId)); + typename D::abi_guard guard(this->shim()); + *reportConsumableFulfillmentOperation = detach_abi(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productId), transactionId)); return S_OK; } catch (...) @@ -377,11 +403,12 @@ struct produce productId, abi_arg_out> requestProductPurchaseWithResultsOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseWithResultsAsync(impl::abi_arg_in productId, impl::abi_arg_out> requestProductPurchaseWithResultsOperation) noexcept override { try { - *requestProductPurchaseWithResultsOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId))); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseWithResultsOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId))); return S_OK; } catch (...) @@ -391,11 +418,12 @@ struct produce productId, abi_arg_in offerId, abi_arg_in displayProperties, abi_arg_out> requestProductPurchaseWithDisplayPropertiesOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseWithDisplayPropertiesAsync(impl::abi_arg_in productId, impl::abi_arg_in offerId, impl::abi_arg_in displayProperties, impl::abi_arg_out> requestProductPurchaseWithDisplayPropertiesOperation) noexcept override { try { - *requestProductPurchaseWithDisplayPropertiesOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), *reinterpret_cast(&offerId), *reinterpret_cast(&displayProperties))); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseWithDisplayPropertiesOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), *reinterpret_cast(&offerId), *reinterpret_cast(&displayProperties))); return S_OK; } catch (...) @@ -405,11 +433,12 @@ struct produce>> getUnfulfilledConsumablesOperation) noexcept override + HRESULT __stdcall abi_GetUnfulfilledConsumablesAsync(impl::abi_arg_out>> getUnfulfilledConsumablesOperation) noexcept override { try { - *getUnfulfilledConsumablesOperation = detach(this->shim().GetUnfulfilledConsumablesAsync()); + typename D::abi_guard guard(this->shim()); + *getUnfulfilledConsumablesOperation = detach_abi(this->shim().GetUnfulfilledConsumablesAsync()); return S_OK; } catch (...) @@ -423,11 +452,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_LoadListingInformationByProductIdsAsync(abi_arg_in> productIds, abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationByProductIdsAsync(impl::abi_arg_in> productIds, impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationByProductIdsAsync(*reinterpret_cast *>(&productIds))); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationByProductIdsAsync(*reinterpret_cast *>(&productIds))); return S_OK; } catch (...) @@ -437,11 +467,12 @@ struct produce> keywords, abi_arg_out> loadListingOperation) noexcept override + HRESULT __stdcall abi_LoadListingInformationByKeywordsAsync(impl::abi_arg_in> keywords, impl::abi_arg_out> loadListingOperation) noexcept override { try { - *loadListingOperation = detach(this->shim().LoadListingInformationByKeywordsAsync(*reinterpret_cast *>(&keywords))); + typename D::abi_guard guard(this->shim()); + *loadListingOperation = detach_abi(this->shim().LoadListingInformationByKeywordsAsync(*reinterpret_cast *>(&keywords))); return S_OK; } catch (...) @@ -451,10 +482,11 @@ struct produce productId) noexcept override + HRESULT __stdcall abi_ReportProductFulfillment(impl::abi_arg_in productId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportProductFulfillment(*reinterpret_cast(&productId)); return S_OK; } @@ -468,11 +500,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetAppPurchaseCampaignIdAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAppPurchaseCampaignIdAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAppPurchaseCampaignIdAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAppPurchaseCampaignIdAsync()); return S_OK; } catch (...) @@ -486,11 +519,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ReportConsumableFulfillmentAsync(abi_arg_in productId, GUID transactionId, abi_arg_out> reportConsumableFulfillmentOperation) noexcept override + HRESULT __stdcall abi_ReportConsumableFulfillmentAsync(impl::abi_arg_in productId, GUID transactionId, impl::abi_arg_out> reportConsumableFulfillmentOperation) noexcept override { try { - *reportConsumableFulfillmentOperation = detach(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productId), transactionId)); + typename D::abi_guard guard(this->shim()); + *reportConsumableFulfillmentOperation = detach_abi(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productId), transactionId)); return S_OK; } catch (...) @@ -500,11 +534,12 @@ struct produce } } - HRESULT __stdcall abi_RequestProductPurchaseWithResultsAsync(abi_arg_in productId, abi_arg_out> requestProductPurchaseWithResultsOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseWithResultsAsync(impl::abi_arg_in productId, impl::abi_arg_out> requestProductPurchaseWithResultsOperation) noexcept override { try { - *requestProductPurchaseWithResultsOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId))); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseWithResultsOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId))); return S_OK; } catch (...) @@ -514,11 +549,12 @@ struct produce } } - HRESULT __stdcall abi_RequestProductPurchaseWithDisplayPropertiesAsync(abi_arg_in productId, abi_arg_in offerId, abi_arg_in displayProperties, abi_arg_out> requestProductPurchaseWithDisplayPropertiesOperation) noexcept override + HRESULT __stdcall abi_RequestProductPurchaseWithDisplayPropertiesAsync(impl::abi_arg_in productId, impl::abi_arg_in offerId, impl::abi_arg_in displayProperties, impl::abi_arg_out> requestProductPurchaseWithDisplayPropertiesOperation) noexcept override { try { - *requestProductPurchaseWithDisplayPropertiesOperation = detach(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), *reinterpret_cast(&offerId), *reinterpret_cast(&displayProperties))); + typename D::abi_guard guard(this->shim()); + *requestProductPurchaseWithDisplayPropertiesOperation = detach_abi(this->shim().RequestProductPurchaseAsync(*reinterpret_cast(&productId), *reinterpret_cast(&offerId), *reinterpret_cast(&displayProperties))); return S_OK; } catch (...) @@ -528,11 +564,12 @@ struct produce } } - HRESULT __stdcall abi_GetUnfulfilledConsumablesAsync(abi_arg_out>> getUnfulfilledConsumablesOperation) noexcept override + HRESULT __stdcall abi_GetUnfulfilledConsumablesAsync(impl::abi_arg_out>> getUnfulfilledConsumablesOperation) noexcept override { try { - *getUnfulfilledConsumablesOperation = detach(this->shim().GetUnfulfilledConsumablesAsync()); + typename D::abi_guard guard(this->shim()); + *getUnfulfilledConsumablesOperation = detach_abi(this->shim().GetUnfulfilledConsumablesAsync()); return S_OK; } catch (...) @@ -546,11 +583,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ProductLicenses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ProductLicenses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProductLicenses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductLicenses()); return S_OK; } catch (...) @@ -564,7 +602,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -577,7 +616,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsTrial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrial()); return S_OK; } catch (...) @@ -586,11 +626,12 @@ struct produce : produ } } - HRESULT __stdcall get_ExpirationDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -599,11 +640,12 @@ struct produce : produ } } - HRESULT __stdcall add_LicenseChanged(abi_arg_in handler, event_token * cookie) noexcept override + HRESULT __stdcall add_LicenseChanged(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().LicenseChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().LicenseChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -616,6 +658,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().LicenseChanged(cookie); return S_OK; } @@ -629,11 +672,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_CurrentMarket(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentMarket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentMarket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentMarket()); return S_OK; } catch (...) @@ -643,11 +687,12 @@ struct produce : produ } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -657,11 +702,12 @@ struct produce : produ } } - HRESULT __stdcall get_ProductListings(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ProductListings(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProductListings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductListings()); return S_OK; } catch (...) @@ -671,11 +717,12 @@ struct produce : produ } } - HRESULT __stdcall get_FormattedPrice(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedPrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedPrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedPrice()); return S_OK; } catch (...) @@ -685,11 +732,12 @@ struct produce : produ } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -703,7 +751,8 @@ struct produce : produ { try { - *value = detach(this->shim().AgeRating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AgeRating()); return S_OK; } catch (...) @@ -716,11 +765,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_FormattedBasePrice(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedBasePrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedBasePrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedBasePrice()); return S_OK; } catch (...) @@ -730,11 +780,12 @@ struct produce : prod } } - HRESULT __stdcall get_SaleEndDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_SaleEndDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaleEndDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaleEndDate()); return S_OK; } catch (...) @@ -747,7 +798,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsOnSale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnSale()); return S_OK; } catch (...) @@ -756,11 +808,12 @@ struct produce : prod } } - HRESULT __stdcall get_CurrencyCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrencyCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrencyCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrencyCode()); return S_OK; } catch (...) @@ -774,11 +827,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -792,7 +846,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -801,11 +856,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ExpirationDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -822,7 +878,8 @@ struct produceshim().IsConsumable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsConsumable()); return S_OK; } catch (...) @@ -835,11 +892,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -849,11 +907,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FormattedPrice(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedPrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedPrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedPrice()); return S_OK; } catch (...) @@ -863,11 +922,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -881,11 +941,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_FormattedBasePrice(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedBasePrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedBasePrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedBasePrice()); return S_OK; } catch (...) @@ -895,11 +956,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SaleEndDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_SaleEndDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaleEndDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaleEndDate()); return S_OK; } catch (...) @@ -912,7 +974,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsOnSale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnSale()); return S_OK; } catch (...) @@ -921,11 +984,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CurrencyCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrencyCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrencyCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrencyCode()); return S_OK; } catch (...) @@ -943,7 +1007,8 @@ struct produceshim().ProductType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductType()); return S_OK; } catch (...) @@ -956,11 +1021,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -970,11 +1036,12 @@ struct produce } } - HRESULT __stdcall get_Keywords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -988,7 +1055,8 @@ struct produce { try { - *value = detach(this->shim().ProductType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductType()); return S_OK; } catch (...) @@ -997,11 +1065,12 @@ struct produce } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -1011,11 +1080,12 @@ struct produce } } - HRESULT __stdcall get_ImageUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageUri()); return S_OK; } catch (...) @@ -1029,11 +1099,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1043,10 +1114,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -1056,11 +1128,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1070,10 +1143,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -1083,11 +1157,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -1097,10 +1172,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Image(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Image(*reinterpret_cast(&value)); return S_OK; } @@ -1114,11 +1190,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateProductPurchaseDisplayProperties(abi_arg_in name, abi_arg_out displayProperties) noexcept override + HRESULT __stdcall abi_CreateProductPurchaseDisplayProperties(impl::abi_arg_in name, impl::abi_arg_out displayProperties) noexcept override { try { - *displayProperties = detach(this->shim().CreateProductPurchaseDisplayProperties(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *displayProperties = detach_abi(this->shim().CreateProductPurchaseDisplayProperties(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1136,7 +1213,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1149,7 +1227,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().TransactionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransactionId()); return S_OK; } catch (...) @@ -1158,11 +1237,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ReceiptXml(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReceiptXml(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReceiptXml()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReceiptXml()); return S_OK; } catch (...) @@ -1172,11 +1252,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OfferId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OfferId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OfferId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OfferId()); return S_OK; } catch (...) @@ -1190,11 +1271,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -1208,7 +1290,8 @@ struct produce : pr { try { - *value = detach(this->shim().TransactionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransactionId()); return S_OK; } catch (...) @@ -1217,11 +1300,12 @@ struct produce : pr } } - HRESULT __stdcall get_OfferId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OfferId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OfferId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OfferId()); return S_OK; } catch (...) @@ -1239,266 +1323,266 @@ namespace Windows::ApplicationModel::Store { template Windows::ApplicationModel::Store::LicenseInformation impl_ICurrentApp::LicenseInformation() const { Windows::ApplicationModel::Store::LicenseInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LicenseInformation(put(value))); + check_hresult(WINRT_SHIM(ICurrentApp)->get_LicenseInformation(put_abi(value))); return value; } template Windows::Foundation::Uri impl_ICurrentApp::LinkUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinkUri(put(value))); + check_hresult(WINRT_SHIM(ICurrentApp)->get_LinkUri(put_abi(value))); return value; } template GUID impl_ICurrentApp::AppId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AppId(&value)); + check_hresult(WINRT_SHIM(ICurrentApp)->get_AppId(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_ICurrentApp::RequestAppPurchaseAsync(bool includeReceipt) const { Windows::Foundation::IAsyncOperation requestAppPurchaseOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAppPurchaseAsync(includeReceipt, put(requestAppPurchaseOperation))); + check_hresult(WINRT_SHIM(ICurrentApp)->abi_RequestAppPurchaseAsync(includeReceipt, put_abi(requestAppPurchaseOperation))); return requestAppPurchaseOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentApp::RequestProductPurchaseAsync(hstring_ref productId, bool includeReceipt) const +template Windows::Foundation::IAsyncOperation impl_ICurrentApp::RequestProductPurchaseAsync(hstring_view productId, bool includeReceipt) const { Windows::Foundation::IAsyncOperation requestProductPurchaseOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseAsync(get(productId), includeReceipt, put(requestProductPurchaseOperation))); + check_hresult(WINRT_SHIM(ICurrentApp)->abi_RequestProductPurchaseAsync(get_abi(productId), includeReceipt, put_abi(requestProductPurchaseOperation))); return requestProductPurchaseOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentApp::LoadListingInformationAsync() const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationAsync(put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentApp)->abi_LoadListingInformationAsync(put_abi(loadListingOperation))); return loadListingOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentApp::GetAppReceiptAsync() const { Windows::Foundation::IAsyncOperation appReceiptOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppReceiptAsync(put(appReceiptOperation))); + check_hresult(WINRT_SHIM(ICurrentApp)->abi_GetAppReceiptAsync(put_abi(appReceiptOperation))); return appReceiptOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentApp::GetProductReceiptAsync(hstring_ref productId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentApp::GetProductReceiptAsync(hstring_view productId) const { Windows::Foundation::IAsyncOperation getProductReceiptOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetProductReceiptAsync(get(productId), put(getProductReceiptOperation))); + check_hresult(WINRT_SHIM(ICurrentApp)->abi_GetProductReceiptAsync(get_abi(productId), put_abi(getProductReceiptOperation))); return getProductReceiptOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::ReportConsumableFulfillmentAsync(hstring_ref productId, GUID transactionId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::ReportConsumableFulfillmentAsync(hstring_view productId, GUID transactionId) const { Windows::Foundation::IAsyncOperation reportConsumableFulfillmentOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReportConsumableFulfillmentAsync(get(productId), transactionId, put(reportConsumableFulfillmentOperation))); + check_hresult(WINRT_SHIM(ICurrentAppWithConsumables)->abi_ReportConsumableFulfillmentAsync(get_abi(productId), transactionId, put_abi(reportConsumableFulfillmentOperation))); return reportConsumableFulfillmentOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::RequestProductPurchaseAsync(hstring_ref productId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::RequestProductPurchaseAsync(hstring_view productId) const { Windows::Foundation::IAsyncOperation requestProductPurchaseWithResultsOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseWithResultsAsync(get(productId), put(requestProductPurchaseWithResultsOperation))); + check_hresult(WINRT_SHIM(ICurrentAppWithConsumables)->abi_RequestProductPurchaseWithResultsAsync(get_abi(productId), put_abi(requestProductPurchaseWithResultsOperation))); return requestProductPurchaseWithResultsOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::RequestProductPurchaseAsync(hstring_ref productId, hstring_ref offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithConsumables::RequestProductPurchaseAsync(hstring_view productId, hstring_view offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) const { Windows::Foundation::IAsyncOperation requestProductPurchaseWithDisplayPropertiesOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseWithDisplayPropertiesAsync(get(productId), get(offerId), get(displayProperties), put(requestProductPurchaseWithDisplayPropertiesOperation))); + check_hresult(WINRT_SHIM(ICurrentAppWithConsumables)->abi_RequestProductPurchaseWithDisplayPropertiesAsync(get_abi(productId), get_abi(offerId), get_abi(displayProperties), put_abi(requestProductPurchaseWithDisplayPropertiesOperation))); return requestProductPurchaseWithDisplayPropertiesOperation; } template Windows::Foundation::IAsyncOperation> impl_ICurrentAppWithConsumables::GetUnfulfilledConsumablesAsync() const { Windows::Foundation::IAsyncOperation> getUnfulfilledConsumablesOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetUnfulfilledConsumablesAsync(put(getUnfulfilledConsumablesOperation))); + check_hresult(WINRT_SHIM(ICurrentAppWithConsumables)->abi_GetUnfulfilledConsumablesAsync(put_abi(getUnfulfilledConsumablesOperation))); return getUnfulfilledConsumablesOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentAppWithCampaignId::GetAppPurchaseCampaignIdAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppPurchaseCampaignIdAsync(put(operation))); + check_hresult(WINRT_SHIM(ICurrentAppWithCampaignId)->abi_GetAppPurchaseCampaignIdAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentApp2Statics::GetCustomerPurchaseIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentApp2Statics::GetCustomerPurchaseIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCustomerPurchaseIdAsync(get(serviceTicket), get(publisherUserId), put(operation))); + check_hresult(WINRT_SHIM(ICurrentApp2Statics)->abi_GetCustomerPurchaseIdAsync(get_abi(serviceTicket), get_abi(publisherUserId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentApp2Statics::GetCustomerCollectionsIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentApp2Statics::GetCustomerCollectionsIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCustomerCollectionsIdAsync(get(serviceTicket), get(publisherUserId), put(operation))); + check_hresult(WINRT_SHIM(ICurrentApp2Statics)->abi_GetCustomerCollectionsIdAsync(get_abi(serviceTicket), get_abi(publisherUserId), put_abi(operation))); return operation; } template Windows::ApplicationModel::Store::LicenseInformation impl_ICurrentAppSimulator::LicenseInformation() const { Windows::ApplicationModel::Store::LicenseInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LicenseInformation(put(value))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->get_LicenseInformation(put_abi(value))); return value; } template Windows::Foundation::Uri impl_ICurrentAppSimulator::LinkUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinkUri(put(value))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->get_LinkUri(put_abi(value))); return value; } template GUID impl_ICurrentAppSimulator::AppId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AppId(&value)); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->get_AppId(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::RequestAppPurchaseAsync(bool includeReceipt) const { Windows::Foundation::IAsyncOperation requestAppPurchaseOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAppPurchaseAsync(includeReceipt, put(requestAppPurchaseOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_RequestAppPurchaseAsync(includeReceipt, put_abi(requestAppPurchaseOperation))); return requestAppPurchaseOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::RequestProductPurchaseAsync(hstring_ref productId, bool includeReceipt) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::RequestProductPurchaseAsync(hstring_view productId, bool includeReceipt) const { Windows::Foundation::IAsyncOperation requestProductPurchaseOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseAsync(get(productId), includeReceipt, put(requestProductPurchaseOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_RequestProductPurchaseAsync(get_abi(productId), includeReceipt, put_abi(requestProductPurchaseOperation))); return requestProductPurchaseOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::LoadListingInformationAsync() const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationAsync(put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_LoadListingInformationAsync(put_abi(loadListingOperation))); return loadListingOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::GetAppReceiptAsync() const { Windows::Foundation::IAsyncOperation appReceiptOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppReceiptAsync(put(appReceiptOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_GetAppReceiptAsync(put_abi(appReceiptOperation))); return appReceiptOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::GetProductReceiptAsync(hstring_ref productId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulator::GetProductReceiptAsync(hstring_view productId) const { Windows::Foundation::IAsyncOperation getProductReceiptOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetProductReceiptAsync(get(productId), put(getProductReceiptOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_GetProductReceiptAsync(get_abi(productId), put_abi(getProductReceiptOperation))); return getProductReceiptOperation; } template Windows::Foundation::IAsyncAction impl_ICurrentAppSimulator::ReloadSimulatorAsync(const Windows::Storage::StorageFile & simulatorSettingsFile) const { Windows::Foundation::IAsyncAction reloadSimulatorOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReloadSimulatorAsync(get(simulatorSettingsFile), put(reloadSimulatorOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulator)->abi_ReloadSimulatorAsync(get_abi(simulatorSettingsFile), put_abi(reloadSimulatorOperation))); return reloadSimulatorOperation; } template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithCampaignId::GetAppPurchaseCampaignIdAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppPurchaseCampaignIdAsync(put(operation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorWithCampaignId)->abi_GetAppPurchaseCampaignIdAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::ReportConsumableFulfillmentAsync(hstring_ref productId, GUID transactionId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::ReportConsumableFulfillmentAsync(hstring_view productId, GUID transactionId) const { Windows::Foundation::IAsyncOperation reportConsumableFulfillmentOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReportConsumableFulfillmentAsync(get(productId), transactionId, put(reportConsumableFulfillmentOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorWithConsumables)->abi_ReportConsumableFulfillmentAsync(get_abi(productId), transactionId, put_abi(reportConsumableFulfillmentOperation))); return reportConsumableFulfillmentOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::RequestProductPurchaseAsync(hstring_ref productId) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::RequestProductPurchaseAsync(hstring_view productId) const { Windows::Foundation::IAsyncOperation requestProductPurchaseWithResultsOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseWithResultsAsync(get(productId), put(requestProductPurchaseWithResultsOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorWithConsumables)->abi_RequestProductPurchaseWithResultsAsync(get_abi(productId), put_abi(requestProductPurchaseWithResultsOperation))); return requestProductPurchaseWithResultsOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::RequestProductPurchaseAsync(hstring_ref productId, hstring_ref offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorWithConsumables::RequestProductPurchaseAsync(hstring_view productId, hstring_view offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) const { Windows::Foundation::IAsyncOperation requestProductPurchaseWithDisplayPropertiesOperation; - check_hresult(static_cast(static_cast(*this))->abi_RequestProductPurchaseWithDisplayPropertiesAsync(get(productId), get(offerId), get(displayProperties), put(requestProductPurchaseWithDisplayPropertiesOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorWithConsumables)->abi_RequestProductPurchaseWithDisplayPropertiesAsync(get_abi(productId), get_abi(offerId), get_abi(displayProperties), put_abi(requestProductPurchaseWithDisplayPropertiesOperation))); return requestProductPurchaseWithDisplayPropertiesOperation; } template Windows::Foundation::IAsyncOperation> impl_ICurrentAppSimulatorWithConsumables::GetUnfulfilledConsumablesAsync() const { Windows::Foundation::IAsyncOperation> getUnfulfilledConsumablesOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetUnfulfilledConsumablesAsync(put(getUnfulfilledConsumablesOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorWithConsumables)->abi_GetUnfulfilledConsumablesAsync(put_abi(getUnfulfilledConsumablesOperation))); return getUnfulfilledConsumablesOperation; } template Windows::ApplicationModel::Store::ProductPurchaseStatus impl_IPurchaseResults::Status() const { Windows::ApplicationModel::Store::ProductPurchaseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPurchaseResults)->get_Status(&value)); return value; } template GUID impl_IPurchaseResults::TransactionId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TransactionId(&value)); + check_hresult(WINRT_SHIM(IPurchaseResults)->get_TransactionId(&value)); return value; } template hstring impl_IPurchaseResults::ReceiptXml() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ReceiptXml(put(value))); + check_hresult(WINRT_SHIM(IPurchaseResults)->get_ReceiptXml(put_abi(value))); return value; } template hstring impl_IPurchaseResults::OfferId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OfferId(put(value))); + check_hresult(WINRT_SHIM(IPurchaseResults)->get_OfferId(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_ILicenseInformation::ProductLicenses() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_ProductLicenses(put(value))); + check_hresult(WINRT_SHIM(ILicenseInformation)->get_ProductLicenses(put_abi(value))); return value; } template bool impl_ILicenseInformation::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(ILicenseInformation)->get_IsActive(&value)); return value; } template bool impl_ILicenseInformation::IsTrial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrial(&value)); + check_hresult(WINRT_SHIM(ILicenseInformation)->get_IsTrial(&value)); return value; } template Windows::Foundation::DateTime impl_ILicenseInformation::ExpirationDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(ILicenseInformation)->get_ExpirationDate(put_abi(value))); return value; } template event_token impl_ILicenseInformation::LicenseChanged(const Windows::ApplicationModel::Store::LicenseChangedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_LicenseChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ILicenseInformation)->add_LicenseChanged(get_abi(handler), &cookie)); return cookie; } @@ -1509,292 +1593,292 @@ template event_revoker impl_ILicenseInformatio template void impl_ILicenseInformation::LicenseChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_LicenseChanged(cookie)); + check_hresult(WINRT_SHIM(ILicenseInformation)->remove_LicenseChanged(cookie)); } template hstring impl_IProductLicense::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IProductLicense)->get_ProductId(put_abi(value))); return value; } template bool impl_IProductLicense::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IProductLicense)->get_IsActive(&value)); return value; } template Windows::Foundation::DateTime impl_IProductLicense::ExpirationDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IProductLicense)->get_ExpirationDate(put_abi(value))); return value; } template hstring impl_IListingInformation::CurrentMarket() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrentMarket(put(value))); + check_hresult(WINRT_SHIM(IListingInformation)->get_CurrentMarket(put_abi(value))); return value; } template hstring impl_IListingInformation::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IListingInformation)->get_Description(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IListingInformation::ProductListings() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_ProductListings(put(value))); + check_hresult(WINRT_SHIM(IListingInformation)->get_ProductListings(put_abi(value))); return value; } template hstring impl_IListingInformation::FormattedPrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedPrice(put(value))); + check_hresult(WINRT_SHIM(IListingInformation)->get_FormattedPrice(put_abi(value))); return value; } template hstring impl_IListingInformation::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IListingInformation)->get_Name(put_abi(value))); return value; } template uint32_t impl_IListingInformation::AgeRating() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AgeRating(&value)); + check_hresult(WINRT_SHIM(IListingInformation)->get_AgeRating(&value)); return value; } template hstring impl_IListingInformation2::FormattedBasePrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedBasePrice(put(value))); + check_hresult(WINRT_SHIM(IListingInformation2)->get_FormattedBasePrice(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IListingInformation2::SaleEndDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_SaleEndDate(put(value))); + check_hresult(WINRT_SHIM(IListingInformation2)->get_SaleEndDate(put_abi(value))); return value; } template bool impl_IListingInformation2::IsOnSale() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnSale(&value)); + check_hresult(WINRT_SHIM(IListingInformation2)->get_IsOnSale(&value)); return value; } template hstring impl_IListingInformation2::CurrencyCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrencyCode(put(value))); + check_hresult(WINRT_SHIM(IListingInformation2)->get_CurrencyCode(put_abi(value))); return value; } template hstring impl_IProductListing::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IProductListing)->get_ProductId(put_abi(value))); return value; } template hstring impl_IProductListing::FormattedPrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedPrice(put(value))); + check_hresult(WINRT_SHIM(IProductListing)->get_FormattedPrice(put_abi(value))); return value; } template hstring impl_IProductListing::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IProductListing)->get_Name(put_abi(value))); return value; } template Windows::ApplicationModel::Store::ProductType impl_IProductListingWithConsumables::ProductType() const { Windows::ApplicationModel::Store::ProductType value {}; - check_hresult(static_cast(static_cast(*this))->get_ProductType(&value)); + check_hresult(WINRT_SHIM(IProductListingWithConsumables)->get_ProductType(&value)); return value; } template hstring impl_IProductListing2::FormattedBasePrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedBasePrice(put(value))); + check_hresult(WINRT_SHIM(IProductListing2)->get_FormattedBasePrice(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IProductListing2::SaleEndDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_SaleEndDate(put(value))); + check_hresult(WINRT_SHIM(IProductListing2)->get_SaleEndDate(put_abi(value))); return value; } template bool impl_IProductListing2::IsOnSale() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnSale(&value)); + check_hresult(WINRT_SHIM(IProductListing2)->get_IsOnSale(&value)); return value; } template hstring impl_IProductListing2::CurrencyCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrencyCode(put(value))); + check_hresult(WINRT_SHIM(IProductListing2)->get_CurrencyCode(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppStaticsWithFiltering::LoadListingInformationByProductIdsAsync(const Windows::Foundation::Collections::IIterable & productIds) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppStaticsWithFiltering::LoadListingInformationByProductIdsAsync(iterable productIds) const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationByProductIdsAsync(get(productIds), put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentAppStaticsWithFiltering)->abi_LoadListingInformationByProductIdsAsync(get_abi(productIds), put_abi(loadListingOperation))); return loadListingOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppStaticsWithFiltering::LoadListingInformationByKeywordsAsync(const Windows::Foundation::Collections::IIterable & keywords) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppStaticsWithFiltering::LoadListingInformationByKeywordsAsync(iterable keywords) const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationByKeywordsAsync(get(keywords), put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentAppStaticsWithFiltering)->abi_LoadListingInformationByKeywordsAsync(get_abi(keywords), put_abi(loadListingOperation))); return loadListingOperation; } -template void impl_ICurrentAppStaticsWithFiltering::ReportProductFulfillment(hstring_ref productId) const +template void impl_ICurrentAppStaticsWithFiltering::ReportProductFulfillment(hstring_view productId) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportProductFulfillment(get(productId))); + check_hresult(WINRT_SHIM(ICurrentAppStaticsWithFiltering)->abi_ReportProductFulfillment(get_abi(productId))); } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorStaticsWithFiltering::LoadListingInformationByProductIdsAsync(const Windows::Foundation::Collections::IIterable & productIds) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorStaticsWithFiltering::LoadListingInformationByProductIdsAsync(iterable productIds) const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationByProductIdsAsync(get(productIds), put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorStaticsWithFiltering)->abi_LoadListingInformationByProductIdsAsync(get_abi(productIds), put_abi(loadListingOperation))); return loadListingOperation; } -template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorStaticsWithFiltering::LoadListingInformationByKeywordsAsync(const Windows::Foundation::Collections::IIterable & keywords) const +template Windows::Foundation::IAsyncOperation impl_ICurrentAppSimulatorStaticsWithFiltering::LoadListingInformationByKeywordsAsync(iterable keywords) const { Windows::Foundation::IAsyncOperation loadListingOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadListingInformationByKeywordsAsync(get(keywords), put(loadListingOperation))); + check_hresult(WINRT_SHIM(ICurrentAppSimulatorStaticsWithFiltering)->abi_LoadListingInformationByKeywordsAsync(get_abi(keywords), put_abi(loadListingOperation))); return loadListingOperation; } template bool impl_IProductLicenseWithFulfillment::IsConsumable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsConsumable(&value)); + check_hresult(WINRT_SHIM(IProductLicenseWithFulfillment)->get_IsConsumable(&value)); return value; } template hstring impl_IProductListingWithMetadata::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IProductListingWithMetadata)->get_Description(put_abi(value))); return value; } template Windows::Foundation::Collections::IIterable impl_IProductListingWithMetadata::Keywords() const { Windows::Foundation::Collections::IIterable value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(IProductListingWithMetadata)->get_Keywords(put_abi(value))); return value; } template Windows::ApplicationModel::Store::ProductType impl_IProductListingWithMetadata::ProductType() const { Windows::ApplicationModel::Store::ProductType value {}; - check_hresult(static_cast(static_cast(*this))->get_ProductType(&value)); + check_hresult(WINRT_SHIM(IProductListingWithMetadata)->get_ProductType(&value)); return value; } template hstring impl_IProductListingWithMetadata::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(IProductListingWithMetadata)->get_Tag(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IProductListingWithMetadata::ImageUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImageUri(put(value))); + check_hresult(WINRT_SHIM(IProductListingWithMetadata)->get_ImageUri(put_abi(value))); return value; } template hstring impl_IUnfulfilledConsumable::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IUnfulfilledConsumable)->get_ProductId(put_abi(value))); return value; } template GUID impl_IUnfulfilledConsumable::TransactionId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TransactionId(&value)); + check_hresult(WINRT_SHIM(IUnfulfilledConsumable)->get_TransactionId(&value)); return value; } template hstring impl_IUnfulfilledConsumable::OfferId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OfferId(put(value))); + check_hresult(WINRT_SHIM(IUnfulfilledConsumable)->get_OfferId(put_abi(value))); return value; } template hstring impl_IProductPurchaseDisplayProperties::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->get_Name(put_abi(value))); return value; } -template void impl_IProductPurchaseDisplayProperties::Name(hstring_ref value) const +template void impl_IProductPurchaseDisplayProperties::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->put_Name(get_abi(value))); } template hstring impl_IProductPurchaseDisplayProperties::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->get_Description(put_abi(value))); return value; } -template void impl_IProductPurchaseDisplayProperties::Description(hstring_ref value) const +template void impl_IProductPurchaseDisplayProperties::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->put_Description(get_abi(value))); } template Windows::Foundation::Uri impl_IProductPurchaseDisplayProperties::Image() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->get_Image(put_abi(value))); return value; } template void impl_IProductPurchaseDisplayProperties::Image(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Image(get(value))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayProperties)->put_Image(get_abi(value))); } -template Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties impl_IProductPurchaseDisplayPropertiesFactory::CreateProductPurchaseDisplayProperties(hstring_ref name) const +template Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties impl_IProductPurchaseDisplayPropertiesFactory::CreateProductPurchaseDisplayProperties(hstring_view name) const { Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties displayProperties { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateProductPurchaseDisplayProperties(get(name), put(displayProperties))); + check_hresult(WINRT_SHIM(IProductPurchaseDisplayPropertiesFactory)->abi_CreateProductPurchaseDisplayProperties(get_abi(name), put_abi(displayProperties))); return displayProperties; } @@ -1818,7 +1902,7 @@ inline Windows::Foundation::IAsyncOperation CurrentApp::RequestAppPurch return get_activation_factory().RequestAppPurchaseAsync(includeReceipt); } -inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_ref productId, bool includeReceipt) +inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_view productId, bool includeReceipt) { return get_activation_factory().RequestProductPurchaseAsync(productId, includeReceipt); } @@ -1833,32 +1917,32 @@ inline Windows::Foundation::IAsyncOperation CurrentApp::GetAppReceiptAs return get_activation_factory().GetAppReceiptAsync(); } -inline Windows::Foundation::IAsyncOperation CurrentApp::GetProductReceiptAsync(hstring_ref productId) +inline Windows::Foundation::IAsyncOperation CurrentApp::GetProductReceiptAsync(hstring_view productId) { return get_activation_factory().GetProductReceiptAsync(productId); } -inline Windows::Foundation::IAsyncOperation CurrentApp::GetCustomerPurchaseIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) +inline Windows::Foundation::IAsyncOperation CurrentApp::GetCustomerPurchaseIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) { return get_activation_factory().GetCustomerPurchaseIdAsync(serviceTicket, publisherUserId); } -inline Windows::Foundation::IAsyncOperation CurrentApp::GetCustomerCollectionsIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) +inline Windows::Foundation::IAsyncOperation CurrentApp::GetCustomerCollectionsIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) { return get_activation_factory().GetCustomerCollectionsIdAsync(serviceTicket, publisherUserId); } -inline Windows::Foundation::IAsyncOperation CurrentApp::LoadListingInformationByProductIdsAsync(const Windows::Foundation::Collections::IIterable & productIds) +inline Windows::Foundation::IAsyncOperation CurrentApp::LoadListingInformationByProductIdsAsync(iterable productIds) { return get_activation_factory().LoadListingInformationByProductIdsAsync(productIds); } -inline Windows::Foundation::IAsyncOperation CurrentApp::LoadListingInformationByKeywordsAsync(const Windows::Foundation::Collections::IIterable & keywords) +inline Windows::Foundation::IAsyncOperation CurrentApp::LoadListingInformationByKeywordsAsync(iterable keywords) { return get_activation_factory().LoadListingInformationByKeywordsAsync(keywords); } -inline void CurrentApp::ReportProductFulfillment(hstring_ref productId) +inline void CurrentApp::ReportProductFulfillment(hstring_view productId) { get_activation_factory().ReportProductFulfillment(productId); } @@ -1868,17 +1952,17 @@ inline Windows::Foundation::IAsyncOperation CurrentApp::GetAppPurchaseC return get_activation_factory().GetAppPurchaseCampaignIdAsync(); } -inline Windows::Foundation::IAsyncOperation CurrentApp::ReportConsumableFulfillmentAsync(hstring_ref productId, GUID transactionId) +inline Windows::Foundation::IAsyncOperation CurrentApp::ReportConsumableFulfillmentAsync(hstring_view productId, GUID transactionId) { return get_activation_factory().ReportConsumableFulfillmentAsync(productId, transactionId); } -inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_ref productId) +inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_view productId) { return get_activation_factory().RequestProductPurchaseAsync(productId); } -inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_ref productId, hstring_ref offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) +inline Windows::Foundation::IAsyncOperation CurrentApp::RequestProductPurchaseAsync(hstring_view productId, hstring_view offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) { return get_activation_factory().RequestProductPurchaseAsync(productId, offerId, displayProperties); } @@ -1908,7 +1992,7 @@ inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::Reques return get_activation_factory().RequestAppPurchaseAsync(includeReceipt); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_ref productId, bool includeReceipt) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_view productId, bool includeReceipt) { return get_activation_factory().RequestProductPurchaseAsync(productId, includeReceipt); } @@ -1923,7 +2007,7 @@ inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::GetApp return get_activation_factory().GetAppReceiptAsync(); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::GetProductReceiptAsync(hstring_ref productId) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::GetProductReceiptAsync(hstring_view productId) { return get_activation_factory().GetProductReceiptAsync(productId); } @@ -1933,12 +2017,12 @@ inline Windows::Foundation::IAsyncAction CurrentAppSimulator::ReloadSimulatorAsy return get_activation_factory().ReloadSimulatorAsync(simulatorSettingsFile); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::LoadListingInformationByProductIdsAsync(const Windows::Foundation::Collections::IIterable & productIds) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::LoadListingInformationByProductIdsAsync(iterable productIds) { return get_activation_factory().LoadListingInformationByProductIdsAsync(productIds); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::LoadListingInformationByKeywordsAsync(const Windows::Foundation::Collections::IIterable & keywords) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::LoadListingInformationByKeywordsAsync(iterable keywords) { return get_activation_factory().LoadListingInformationByKeywordsAsync(keywords); } @@ -1948,17 +2032,17 @@ inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::GetApp return get_activation_factory().GetAppPurchaseCampaignIdAsync(); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::ReportConsumableFulfillmentAsync(hstring_ref productId, GUID transactionId) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::ReportConsumableFulfillmentAsync(hstring_view productId, GUID transactionId) { return get_activation_factory().ReportConsumableFulfillmentAsync(productId, transactionId); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_ref productId) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_view productId) { return get_activation_factory().RequestProductPurchaseAsync(productId); } -inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_ref productId, hstring_ref offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) +inline Windows::Foundation::IAsyncOperation CurrentAppSimulator::RequestProductPurchaseAsync(hstring_view productId, hstring_view offerId, const Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & displayProperties) { return get_activation_factory().RequestProductPurchaseAsync(productId, offerId, displayProperties); } @@ -1972,10 +2056,273 @@ inline ProductPurchaseDisplayProperties::ProductPurchaseDisplayProperties() : ProductPurchaseDisplayProperties(activate_instance()) {} -inline ProductPurchaseDisplayProperties::ProductPurchaseDisplayProperties(hstring_ref name) : +inline ProductPurchaseDisplayProperties::ProductPurchaseDisplayProperties(hstring_view name) : ProductPurchaseDisplayProperties(get_activation_factory().CreateProductPurchaseDisplayProperties(name)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentApp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentApp2Statics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppSimulator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppSimulatorStaticsWithFiltering & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppSimulatorWithCampaignId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppSimulatorWithConsumables & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppStaticsWithFiltering & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppWithCampaignId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ICurrentAppWithConsumables & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ILicenseInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IListingInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IListingInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductLicenseWithFulfillment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductListing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductListing2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductListingWithConsumables & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductListingWithMetadata & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductPurchaseDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IProductPurchaseDisplayPropertiesFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IPurchaseResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::IUnfulfilledConsumable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::LicenseInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ListingInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ProductLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ProductListing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::ProductPurchaseDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::PurchaseResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Store::UnfulfilledConsumable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.Provider.h b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.Provider.h index 7126e5b4d..4cacc2411 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.Provider.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.UserDataAccounts.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.ApplicationModel.UserDataAccounts.Provider.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -33,7 +37,8 @@ struct produceshim().Priority()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Priority()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produceshim().AccountKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountKind()); return S_OK; } catch (...) @@ -63,7 +69,8 @@ struct produceshim().ContentKinds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentKinds()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PartnerAccountInfos(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PartnerAccountInfos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartnerAccountInfos()); return S_OK; } catch (...) @@ -86,10 +94,11 @@ struct produce userDataAccountId) noexcept override + HRESULT __stdcall abi_ReportCompleted(impl::abi_arg_in userDataAccountId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&userDataAccountId)); return S_OK; } @@ -107,7 +116,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -120,11 +130,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UserDataAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -138,6 +149,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -151,11 +163,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UserDataAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDataAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDataAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDataAccountId()); return S_OK; } catch (...) @@ -169,6 +182,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -186,74 +200,157 @@ namespace Windows::ApplicationModel::UserDataAccounts::Provider { template Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderOperationKind impl_IUserDataAccountProviderOperation::Kind() const { Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderOperationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IUserDataAccountProviderOperation)->get_Kind(&value)); return value; } template Windows::ApplicationModel::UserDataAccounts::UserDataAccountContentKinds impl_IUserDataAccountProviderAddAccountOperation::ContentKinds() const { Windows::ApplicationModel::UserDataAccounts::UserDataAccountContentKinds value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentKinds(&value)); + check_hresult(WINRT_SHIM(IUserDataAccountProviderAddAccountOperation)->get_ContentKinds(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IUserDataAccountProviderAddAccountOperation::PartnerAccountInfos() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PartnerAccountInfos(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountProviderAddAccountOperation)->get_PartnerAccountInfos(put_abi(value))); return value; } -template void impl_IUserDataAccountProviderAddAccountOperation::ReportCompleted(hstring_ref userDataAccountId) const +template void impl_IUserDataAccountProviderAddAccountOperation::ReportCompleted(hstring_view userDataAccountId) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted(get(userDataAccountId))); + check_hresult(WINRT_SHIM(IUserDataAccountProviderAddAccountOperation)->abi_ReportCompleted(get_abi(userDataAccountId))); } template hstring impl_IUserDataAccountPartnerAccountInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountPartnerAccountInfo)->get_DisplayName(put_abi(value))); return value; } template uint32_t impl_IUserDataAccountPartnerAccountInfo::Priority() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Priority(&value)); + check_hresult(WINRT_SHIM(IUserDataAccountPartnerAccountInfo)->get_Priority(&value)); return value; } template Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderPartnerAccountKind impl_IUserDataAccountPartnerAccountInfo::AccountKind() const { Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderPartnerAccountKind value {}; - check_hresult(static_cast(static_cast(*this))->get_AccountKind(&value)); + check_hresult(WINRT_SHIM(IUserDataAccountPartnerAccountInfo)->get_AccountKind(&value)); return value; } template hstring impl_IUserDataAccountProviderSettingsOperation::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountProviderSettingsOperation)->get_UserDataAccountId(put_abi(value))); return value; } template void impl_IUserDataAccountProviderSettingsOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IUserDataAccountProviderSettingsOperation)->abi_ReportCompleted()); } template hstring impl_IUserDataAccountProviderResolveErrorsOperation::UserDataAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDataAccountId(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountProviderResolveErrorsOperation)->get_UserDataAccountId(put_abi(value))); return value; } template void impl_IUserDataAccountProviderResolveErrorsOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IUserDataAccountProviderResolveErrorsOperation)->abi_ReportCompleted()); } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountPartnerAccountInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderAddAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderResolveErrorsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::IUserDataAccountProviderSettingsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountPartnerAccountInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderAddAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderResolveErrorsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::Provider::UserDataAccountProviderSettingsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.SystemAccess.h b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.SystemAccess.h index 45fa4af1a..9435ce599 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.SystemAccess.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.SystemAccess.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Security.Credentials.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AccountName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccountName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountName()); return S_OK; } catch (...) @@ -30,10 +34,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AccountName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AccountName(*reinterpret_cast(&value)); return S_OK; } @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceAccountTypeId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceAccountTypeId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceAccountTypeId()); return S_OK; } catch (...) @@ -57,10 +63,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DeviceAccountTypeId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeviceAccountTypeId(*reinterpret_cast(&value)); return S_OK; } @@ -74,7 +81,8 @@ struct produceshim().ServerType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerType()); return S_OK; } catch (...) @@ -87,6 +95,7 @@ struct produceshim()); this->shim().ServerType(value); return S_OK; } @@ -96,11 +105,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailAddress()); return S_OK; } catch (...) @@ -110,10 +120,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_EmailAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EmailAddress(*reinterpret_cast(&value)); return S_OK; } @@ -123,11 +134,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Domain(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Domain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Domain()); return S_OK; } catch (...) @@ -137,10 +149,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Domain(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Domain(*reinterpret_cast(&value)); return S_OK; } @@ -154,7 +167,8 @@ struct produceshim().EmailSyncEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailSyncEnabled()); return S_OK; } catch (...) @@ -167,6 +181,7 @@ struct produceshim()); this->shim().EmailSyncEnabled(value); return S_OK; } @@ -180,7 +195,8 @@ struct produceshim().ContactsSyncEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactsSyncEnabled()); return S_OK; } catch (...) @@ -193,6 +209,7 @@ struct produceshim()); this->shim().ContactsSyncEnabled(value); return S_OK; } @@ -206,7 +223,8 @@ struct produceshim().CalendarSyncEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarSyncEnabled()); return S_OK; } catch (...) @@ -219,6 +237,7 @@ struct produceshim()); this->shim().CalendarSyncEnabled(value); return S_OK; } @@ -228,11 +247,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IncomingServerAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncomingServerAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerAddress()); return S_OK; } catch (...) @@ -242,10 +262,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_IncomingServerAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IncomingServerAddress(*reinterpret_cast(&value)); return S_OK; } @@ -259,7 +280,8 @@ struct produceshim().IncomingServerPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerPort()); return S_OK; } catch (...) @@ -272,6 +294,7 @@ struct produceshim()); this->shim().IncomingServerPort(value); return S_OK; } @@ -285,7 +308,8 @@ struct produceshim().IncomingServerRequiresSsl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerRequiresSsl()); return S_OK; } catch (...) @@ -298,6 +322,7 @@ struct produceshim()); this->shim().IncomingServerRequiresSsl(value); return S_OK; } @@ -307,11 +332,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IncomingServerUsername(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncomingServerUsername()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerUsername()); return S_OK; } catch (...) @@ -321,10 +347,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_IncomingServerUsername(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IncomingServerUsername(*reinterpret_cast(&value)); return S_OK; } @@ -334,11 +361,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OutgoingServerAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutgoingServerAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerAddress()); return S_OK; } catch (...) @@ -348,10 +376,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_OutgoingServerAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutgoingServerAddress(*reinterpret_cast(&value)); return S_OK; } @@ -365,7 +394,8 @@ struct produceshim().OutgoingServerPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerPort()); return S_OK; } catch (...) @@ -378,6 +408,7 @@ struct produceshim()); this->shim().OutgoingServerPort(value); return S_OK; } @@ -391,7 +422,8 @@ struct produceshim().OutgoingServerRequiresSsl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerRequiresSsl()); return S_OK; } catch (...) @@ -404,6 +436,7 @@ struct produceshim()); this->shim().OutgoingServerRequiresSsl(value); return S_OK; } @@ -413,11 +446,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OutgoingServerUsername(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutgoingServerUsername()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerUsername()); return S_OK; } catch (...) @@ -427,10 +461,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_OutgoingServerUsername(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutgoingServerUsername(*reinterpret_cast(&value)); return S_OK; } @@ -444,11 +479,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_IncomingServerCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_IncomingServerCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncomingServerCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerCredential()); return S_OK; } catch (...) @@ -458,10 +494,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_IncomingServerCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IncomingServerCredential(*reinterpret_cast(&value)); return S_OK; } @@ -471,11 +508,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OutgoingServerCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutgoingServerCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerCredential()); return S_OK; } catch (...) @@ -485,10 +523,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_OutgoingServerCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutgoingServerCredential(*reinterpret_cast(&value)); return S_OK; } @@ -498,11 +537,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OAuthRefreshToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OAuthRefreshToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OAuthRefreshToken()); return S_OK; } catch (...) @@ -512,10 +552,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_OAuthRefreshToken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OAuthRefreshToken(*reinterpret_cast(&value)); return S_OK; } @@ -529,7 +570,8 @@ struct produceshim().IsExternallyManaged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsExternallyManaged()); return S_OK; } catch (...) @@ -542,6 +584,7 @@ struct produceshim()); this->shim().IsExternallyManaged(value); return S_OK; } @@ -555,7 +598,8 @@ struct produceshim().AccountIconId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountIconId()); return S_OK; } catch (...) @@ -568,6 +612,7 @@ struct produceshim()); this->shim().AccountIconId(value); return S_OK; } @@ -581,7 +626,8 @@ struct produceshim().AuthenticationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationType()); return S_OK; } catch (...) @@ -594,6 +640,7 @@ struct produceshim()); this->shim().AuthenticationType(value); return S_OK; } @@ -607,7 +654,8 @@ struct produceshim().IsSsoAuthenticationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSsoAuthenticationSupported()); return S_OK; } catch (...) @@ -616,11 +664,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SsoAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SsoAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SsoAccountId()); return S_OK; } catch (...) @@ -630,10 +679,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SsoAccountId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SsoAccountId(*reinterpret_cast(&value)); return S_OK; } @@ -647,7 +697,8 @@ struct produceshim().AlwaysDownloadFullMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlwaysDownloadFullMessage()); return S_OK; } catch (...) @@ -660,6 +711,7 @@ struct produceshim()); this->shim().AlwaysDownloadFullMessage(value); return S_OK; } @@ -673,7 +725,8 @@ struct produceshim().DoesPolicyAllowMailSync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DoesPolicyAllowMailSync()); return S_OK; } catch (...) @@ -686,7 +739,8 @@ struct produceshim().SyncScheduleKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SyncScheduleKind()); return S_OK; } catch (...) @@ -699,6 +753,7 @@ struct produceshim()); this->shim().SyncScheduleKind(value); return S_OK; } @@ -712,7 +767,8 @@ struct produceshim().MailAgeFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MailAgeFilter()); return S_OK; } catch (...) @@ -725,6 +781,7 @@ struct produceshim()); this->shim().MailAgeFilter(value); return S_OK; } @@ -738,7 +795,8 @@ struct produceshim().IsClientAuthenticationCertificateRequired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsClientAuthenticationCertificateRequired()); return S_OK; } catch (...) @@ -751,6 +809,7 @@ struct produceshim()); this->shim().IsClientAuthenticationCertificateRequired(value); return S_OK; } @@ -764,7 +823,8 @@ struct produceshim().AutoSelectAuthenticationCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoSelectAuthenticationCertificate()); return S_OK; } catch (...) @@ -777,6 +837,7 @@ struct produceshim()); this->shim().AutoSelectAuthenticationCertificate(value); return S_OK; } @@ -786,11 +847,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthenticationCertificateId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthenticationCertificateId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationCertificateId()); return S_OK; } catch (...) @@ -800,10 +862,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AuthenticationCertificateId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticationCertificateId(*reinterpret_cast(&value)); return S_OK; } @@ -817,7 +880,8 @@ struct produceshim().CardDavSyncScheduleKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardDavSyncScheduleKind()); return S_OK; } catch (...) @@ -830,6 +894,7 @@ struct produceshim()); this->shim().CardDavSyncScheduleKind(value); return S_OK; } @@ -843,7 +908,8 @@ struct produceshim().CalDavSyncScheduleKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalDavSyncScheduleKind()); return S_OK; } catch (...) @@ -856,6 +922,7 @@ struct produceshim()); this->shim().CalDavSyncScheduleKind(value); return S_OK; } @@ -865,11 +932,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CardDavServerUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CardDavServerUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardDavServerUrl()); return S_OK; } catch (...) @@ -879,10 +947,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CardDavServerUrl(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CardDavServerUrl(*reinterpret_cast(&value)); return S_OK; } @@ -896,7 +965,8 @@ struct produceshim().CardDavRequiresSsl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardDavRequiresSsl()); return S_OK; } catch (...) @@ -909,6 +979,7 @@ struct produceshim()); this->shim().CardDavRequiresSsl(value); return S_OK; } @@ -918,11 +989,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CalDavServerUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalDavServerUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalDavServerUrl()); return S_OK; } catch (...) @@ -932,10 +1004,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CalDavServerUrl(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalDavServerUrl(*reinterpret_cast(&value)); return S_OK; } @@ -949,7 +1022,8 @@ struct produceshim().CalDavRequiresSsl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalDavRequiresSsl()); return S_OK; } catch (...) @@ -962,6 +1036,7 @@ struct produceshim()); this->shim().CalDavRequiresSsl(value); return S_OK; } @@ -975,7 +1050,8 @@ struct produceshim().WasModifiedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WasModifiedByUser()); return S_OK; } catch (...) @@ -988,6 +1064,7 @@ struct produceshim()); this->shim().WasModifiedByUser(value); return S_OK; } @@ -1001,7 +1078,8 @@ struct produceshim().WasIncomingServerCertificateHashConfirmed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WasIncomingServerCertificateHashConfirmed()); return S_OK; } catch (...) @@ -1014,6 +1092,7 @@ struct produceshim()); this->shim().WasIncomingServerCertificateHashConfirmed(value); return S_OK; } @@ -1023,11 +1102,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IncomingServerCertificateHash(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncomingServerCertificateHash()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncomingServerCertificateHash()); return S_OK; } catch (...) @@ -1037,10 +1117,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_IncomingServerCertificateHash(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IncomingServerCertificateHash(*reinterpret_cast(&value)); return S_OK; } @@ -1054,7 +1135,8 @@ struct produceshim().IsOutgoingServerAuthenticationRequired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutgoingServerAuthenticationRequired()); return S_OK; } catch (...) @@ -1067,6 +1149,7 @@ struct produceshim()); this->shim().IsOutgoingServerAuthenticationRequired(value); return S_OK; } @@ -1080,7 +1163,8 @@ struct produceshim().IsOutgoingServerAuthenticationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutgoingServerAuthenticationEnabled()); return S_OK; } catch (...) @@ -1093,6 +1177,7 @@ struct produceshim()); this->shim().IsOutgoingServerAuthenticationEnabled(value); return S_OK; } @@ -1106,7 +1191,8 @@ struct produceshim().WasOutgoingServerCertificateHashConfirmed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WasOutgoingServerCertificateHashConfirmed()); return S_OK; } catch (...) @@ -1119,6 +1205,7 @@ struct produceshim()); this->shim().WasOutgoingServerCertificateHashConfirmed(value); return S_OK; } @@ -1128,11 +1215,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OutgoingServerCertificateHash(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutgoingServerCertificateHash()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingServerCertificateHash()); return S_OK; } catch (...) @@ -1142,10 +1230,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_OutgoingServerCertificateHash(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutgoingServerCertificateHash(*reinterpret_cast(&value)); return S_OK; } @@ -1159,7 +1248,8 @@ struct produceshim().IsSyncScheduleManagedBySystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSyncScheduleManagedBySystem()); return S_OK; } catch (...) @@ -1172,6 +1262,7 @@ struct produceshim()); this->shim().IsSyncScheduleManagedBySystem(value); return S_OK; } @@ -1185,11 +1276,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddAndShowDeviceAccountsAsync(abi_arg_in> accounts, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_AddAndShowDeviceAccountsAsync(impl::abi_arg_in> accounts, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().AddAndShowDeviceAccountsAsync(*reinterpret_cast *>(&accounts))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AddAndShowDeviceAccountsAsync(*reinterpret_cast *>(&accounts))); return S_OK; } catch (...) @@ -1203,11 +1295,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SuppressLocalAccountWithAccountAsync(abi_arg_in userDataAccountId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SuppressLocalAccountWithAccountAsync(impl::abi_arg_in userDataAccountId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SuppressLocalAccountWithAccountAsync(*reinterpret_cast(&userDataAccountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SuppressLocalAccountWithAccountAsync(*reinterpret_cast(&userDataAccountId))); return S_OK; } catch (...) @@ -1217,11 +1310,12 @@ struct produce account, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateDeviceAccountAsync(impl::abi_arg_in account, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceAccountAsync(*reinterpret_cast(&account))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceAccountAsync(*reinterpret_cast(&account))); return S_OK; } catch (...) @@ -1231,11 +1325,12 @@ struct produce accountId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteDeviceAccountAsync(impl::abi_arg_in accountId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteDeviceAccountAsync(*reinterpret_cast(&accountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteDeviceAccountAsync(*reinterpret_cast(&accountId))); return S_OK; } catch (...) @@ -1245,11 +1340,12 @@ struct produce accountId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDeviceAccountConfigurationAsync(impl::abi_arg_in accountId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDeviceAccountConfigurationAsync(*reinterpret_cast(&accountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceAccountConfigurationAsync(*reinterpret_cast(&accountId))); return S_OK; } catch (...) @@ -1267,565 +1363,565 @@ namespace Windows::ApplicationModel::UserDataAccounts::SystemAccess { template hstring impl_IDeviceAccountConfiguration::AccountName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountName(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_AccountName(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::AccountName(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::AccountName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AccountName(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_AccountName(get_abi(value))); } template hstring impl_IDeviceAccountConfiguration::DeviceAccountTypeId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceAccountTypeId(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_DeviceAccountTypeId(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::DeviceAccountTypeId(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::DeviceAccountTypeId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DeviceAccountTypeId(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_DeviceAccountTypeId(get_abi(value))); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountServerType impl_IDeviceAccountConfiguration::ServerType() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountServerType value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerType(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_ServerType(&value)); return value; } template void impl_IDeviceAccountConfiguration::ServerType(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountServerType value) const { - check_hresult(static_cast(static_cast(*this))->put_ServerType(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_ServerType(value)); } template hstring impl_IDeviceAccountConfiguration::EmailAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmailAddress(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_EmailAddress(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::EmailAddress(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::EmailAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_EmailAddress(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_EmailAddress(get_abi(value))); } template hstring impl_IDeviceAccountConfiguration::Domain() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Domain(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_Domain(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::Domain(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::Domain(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Domain(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_Domain(get_abi(value))); } template bool impl_IDeviceAccountConfiguration::EmailSyncEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_EmailSyncEnabled(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_EmailSyncEnabled(&value)); return value; } template void impl_IDeviceAccountConfiguration::EmailSyncEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_EmailSyncEnabled(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_EmailSyncEnabled(value)); } template bool impl_IDeviceAccountConfiguration::ContactsSyncEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ContactsSyncEnabled(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_ContactsSyncEnabled(&value)); return value; } template void impl_IDeviceAccountConfiguration::ContactsSyncEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ContactsSyncEnabled(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_ContactsSyncEnabled(value)); } template bool impl_IDeviceAccountConfiguration::CalendarSyncEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CalendarSyncEnabled(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_CalendarSyncEnabled(&value)); return value; } template void impl_IDeviceAccountConfiguration::CalendarSyncEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarSyncEnabled(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_CalendarSyncEnabled(value)); } template hstring impl_IDeviceAccountConfiguration::IncomingServerAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerAddress(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_IncomingServerAddress(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::IncomingServerAddress(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::IncomingServerAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerAddress(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_IncomingServerAddress(get_abi(value))); } template int32_t impl_IDeviceAccountConfiguration::IncomingServerPort() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerPort(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_IncomingServerPort(&value)); return value; } template void impl_IDeviceAccountConfiguration::IncomingServerPort(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerPort(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_IncomingServerPort(value)); } template bool impl_IDeviceAccountConfiguration::IncomingServerRequiresSsl() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerRequiresSsl(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_IncomingServerRequiresSsl(&value)); return value; } template void impl_IDeviceAccountConfiguration::IncomingServerRequiresSsl(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerRequiresSsl(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_IncomingServerRequiresSsl(value)); } template hstring impl_IDeviceAccountConfiguration::IncomingServerUsername() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerUsername(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_IncomingServerUsername(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::IncomingServerUsername(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::IncomingServerUsername(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerUsername(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_IncomingServerUsername(get_abi(value))); } template hstring impl_IDeviceAccountConfiguration::OutgoingServerAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerAddress(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_OutgoingServerAddress(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::OutgoingServerAddress(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::OutgoingServerAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerAddress(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_OutgoingServerAddress(get_abi(value))); } template int32_t impl_IDeviceAccountConfiguration::OutgoingServerPort() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerPort(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_OutgoingServerPort(&value)); return value; } template void impl_IDeviceAccountConfiguration::OutgoingServerPort(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerPort(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_OutgoingServerPort(value)); } template bool impl_IDeviceAccountConfiguration::OutgoingServerRequiresSsl() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerRequiresSsl(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_OutgoingServerRequiresSsl(&value)); return value; } template void impl_IDeviceAccountConfiguration::OutgoingServerRequiresSsl(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerRequiresSsl(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_OutgoingServerRequiresSsl(value)); } template hstring impl_IDeviceAccountConfiguration::OutgoingServerUsername() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerUsername(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->get_OutgoingServerUsername(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration::OutgoingServerUsername(hstring_ref value) const +template void impl_IDeviceAccountConfiguration::OutgoingServerUsername(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerUsername(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration)->put_OutgoingServerUsername(get_abi(value))); } template Windows::Security::Credentials::PasswordCredential impl_IDeviceAccountConfiguration2::IncomingServerCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerCredential(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IncomingServerCredential(put_abi(value))); return value; } template void impl_IDeviceAccountConfiguration2::IncomingServerCredential(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerCredential(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IncomingServerCredential(get_abi(value))); } template Windows::Security::Credentials::PasswordCredential impl_IDeviceAccountConfiguration2::OutgoingServerCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerCredential(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_OutgoingServerCredential(put_abi(value))); return value; } template void impl_IDeviceAccountConfiguration2::OutgoingServerCredential(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerCredential(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_OutgoingServerCredential(get_abi(value))); } template hstring impl_IDeviceAccountConfiguration2::OAuthRefreshToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OAuthRefreshToken(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_OAuthRefreshToken(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration2::OAuthRefreshToken(hstring_ref value) const +template void impl_IDeviceAccountConfiguration2::OAuthRefreshToken(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OAuthRefreshToken(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_OAuthRefreshToken(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::IsExternallyManaged() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsExternallyManaged(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsExternallyManaged(&value)); return value; } template void impl_IDeviceAccountConfiguration2::IsExternallyManaged(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsExternallyManaged(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IsExternallyManaged(value)); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountIconId impl_IDeviceAccountConfiguration2::AccountIconId() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountIconId value {}; - check_hresult(static_cast(static_cast(*this))->get_AccountIconId(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_AccountIconId(&value)); return value; } template void impl_IDeviceAccountConfiguration2::AccountIconId(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountIconId value) const { - check_hresult(static_cast(static_cast(*this))->put_AccountIconId(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_AccountIconId(value)); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountAuthenticationType impl_IDeviceAccountConfiguration2::AuthenticationType() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountAuthenticationType value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationType(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_AuthenticationType(&value)); return value; } template void impl_IDeviceAccountConfiguration2::AuthenticationType(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountAuthenticationType value) const { - check_hresult(static_cast(static_cast(*this))->put_AuthenticationType(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_AuthenticationType(value)); } template bool impl_IDeviceAccountConfiguration2::IsSsoAuthenticationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSsoAuthenticationSupported(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsSsoAuthenticationSupported(&value)); return value; } template hstring impl_IDeviceAccountConfiguration2::SsoAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SsoAccountId(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_SsoAccountId(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration2::SsoAccountId(hstring_ref value) const +template void impl_IDeviceAccountConfiguration2::SsoAccountId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SsoAccountId(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_SsoAccountId(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::AlwaysDownloadFullMessage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AlwaysDownloadFullMessage(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_AlwaysDownloadFullMessage(&value)); return value; } template void impl_IDeviceAccountConfiguration2::AlwaysDownloadFullMessage(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AlwaysDownloadFullMessage(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_AlwaysDownloadFullMessage(value)); } template bool impl_IDeviceAccountConfiguration2::DoesPolicyAllowMailSync() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DoesPolicyAllowMailSync(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_DoesPolicyAllowMailSync(&value)); return value; } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind impl_IDeviceAccountConfiguration2::SyncScheduleKind() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SyncScheduleKind(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_SyncScheduleKind(&value)); return value; } template void impl_IDeviceAccountConfiguration2::SyncScheduleKind(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value) const { - check_hresult(static_cast(static_cast(*this))->put_SyncScheduleKind(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_SyncScheduleKind(value)); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountMailAgeFilter impl_IDeviceAccountConfiguration2::MailAgeFilter() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountMailAgeFilter value {}; - check_hresult(static_cast(static_cast(*this))->get_MailAgeFilter(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_MailAgeFilter(&value)); return value; } template void impl_IDeviceAccountConfiguration2::MailAgeFilter(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountMailAgeFilter value) const { - check_hresult(static_cast(static_cast(*this))->put_MailAgeFilter(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_MailAgeFilter(value)); } template bool impl_IDeviceAccountConfiguration2::IsClientAuthenticationCertificateRequired() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsClientAuthenticationCertificateRequired(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsClientAuthenticationCertificateRequired(&value)); return value; } template void impl_IDeviceAccountConfiguration2::IsClientAuthenticationCertificateRequired(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsClientAuthenticationCertificateRequired(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IsClientAuthenticationCertificateRequired(value)); } template bool impl_IDeviceAccountConfiguration2::AutoSelectAuthenticationCertificate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoSelectAuthenticationCertificate(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_AutoSelectAuthenticationCertificate(&value)); return value; } template void impl_IDeviceAccountConfiguration2::AutoSelectAuthenticationCertificate(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoSelectAuthenticationCertificate(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_AutoSelectAuthenticationCertificate(value)); } template hstring impl_IDeviceAccountConfiguration2::AuthenticationCertificateId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationCertificateId(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_AuthenticationCertificateId(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration2::AuthenticationCertificateId(hstring_ref value) const +template void impl_IDeviceAccountConfiguration2::AuthenticationCertificateId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AuthenticationCertificateId(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_AuthenticationCertificateId(get_abi(value))); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind impl_IDeviceAccountConfiguration2::CardDavSyncScheduleKind() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value {}; - check_hresult(static_cast(static_cast(*this))->get_CardDavSyncScheduleKind(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CardDavSyncScheduleKind(&value)); return value; } template void impl_IDeviceAccountConfiguration2::CardDavSyncScheduleKind(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value) const { - check_hresult(static_cast(static_cast(*this))->put_CardDavSyncScheduleKind(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CardDavSyncScheduleKind(value)); } template Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind impl_IDeviceAccountConfiguration2::CalDavSyncScheduleKind() const { Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value {}; - check_hresult(static_cast(static_cast(*this))->get_CalDavSyncScheduleKind(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CalDavSyncScheduleKind(&value)); return value; } template void impl_IDeviceAccountConfiguration2::CalDavSyncScheduleKind(Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountSyncScheduleKind value) const { - check_hresult(static_cast(static_cast(*this))->put_CalDavSyncScheduleKind(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CalDavSyncScheduleKind(value)); } template Windows::Foundation::Uri impl_IDeviceAccountConfiguration2::CardDavServerUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CardDavServerUrl(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CardDavServerUrl(put_abi(value))); return value; } template void impl_IDeviceAccountConfiguration2::CardDavServerUrl(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_CardDavServerUrl(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CardDavServerUrl(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::CardDavRequiresSsl() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CardDavRequiresSsl(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CardDavRequiresSsl(&value)); return value; } template void impl_IDeviceAccountConfiguration2::CardDavRequiresSsl(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CardDavRequiresSsl(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CardDavRequiresSsl(value)); } template Windows::Foundation::Uri impl_IDeviceAccountConfiguration2::CalDavServerUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalDavServerUrl(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CalDavServerUrl(put_abi(value))); return value; } template void impl_IDeviceAccountConfiguration2::CalDavServerUrl(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalDavServerUrl(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CalDavServerUrl(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::CalDavRequiresSsl() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CalDavRequiresSsl(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_CalDavRequiresSsl(&value)); return value; } template void impl_IDeviceAccountConfiguration2::CalDavRequiresSsl(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CalDavRequiresSsl(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_CalDavRequiresSsl(value)); } template bool impl_IDeviceAccountConfiguration2::WasModifiedByUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_WasModifiedByUser(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_WasModifiedByUser(&value)); return value; } template void impl_IDeviceAccountConfiguration2::WasModifiedByUser(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_WasModifiedByUser(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_WasModifiedByUser(value)); } template bool impl_IDeviceAccountConfiguration2::WasIncomingServerCertificateHashConfirmed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_WasIncomingServerCertificateHashConfirmed(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_WasIncomingServerCertificateHashConfirmed(&value)); return value; } template void impl_IDeviceAccountConfiguration2::WasIncomingServerCertificateHashConfirmed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_WasIncomingServerCertificateHashConfirmed(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_WasIncomingServerCertificateHashConfirmed(value)); } template hstring impl_IDeviceAccountConfiguration2::IncomingServerCertificateHash() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IncomingServerCertificateHash(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IncomingServerCertificateHash(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration2::IncomingServerCertificateHash(hstring_ref value) const +template void impl_IDeviceAccountConfiguration2::IncomingServerCertificateHash(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_IncomingServerCertificateHash(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IncomingServerCertificateHash(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::IsOutgoingServerAuthenticationRequired() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOutgoingServerAuthenticationRequired(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsOutgoingServerAuthenticationRequired(&value)); return value; } template void impl_IDeviceAccountConfiguration2::IsOutgoingServerAuthenticationRequired(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOutgoingServerAuthenticationRequired(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IsOutgoingServerAuthenticationRequired(value)); } template bool impl_IDeviceAccountConfiguration2::IsOutgoingServerAuthenticationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOutgoingServerAuthenticationEnabled(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsOutgoingServerAuthenticationEnabled(&value)); return value; } template void impl_IDeviceAccountConfiguration2::IsOutgoingServerAuthenticationEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOutgoingServerAuthenticationEnabled(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IsOutgoingServerAuthenticationEnabled(value)); } template bool impl_IDeviceAccountConfiguration2::WasOutgoingServerCertificateHashConfirmed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_WasOutgoingServerCertificateHashConfirmed(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_WasOutgoingServerCertificateHashConfirmed(&value)); return value; } template void impl_IDeviceAccountConfiguration2::WasOutgoingServerCertificateHashConfirmed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_WasOutgoingServerCertificateHashConfirmed(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_WasOutgoingServerCertificateHashConfirmed(value)); } template hstring impl_IDeviceAccountConfiguration2::OutgoingServerCertificateHash() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OutgoingServerCertificateHash(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_OutgoingServerCertificateHash(put_abi(value))); return value; } -template void impl_IDeviceAccountConfiguration2::OutgoingServerCertificateHash(hstring_ref value) const +template void impl_IDeviceAccountConfiguration2::OutgoingServerCertificateHash(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingServerCertificateHash(get(value))); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_OutgoingServerCertificateHash(get_abi(value))); } template bool impl_IDeviceAccountConfiguration2::IsSyncScheduleManagedBySystem() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSyncScheduleManagedBySystem(&value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->get_IsSyncScheduleManagedBySystem(&value)); return value; } template void impl_IDeviceAccountConfiguration2::IsSyncScheduleManagedBySystem(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSyncScheduleManagedBySystem(value)); + check_hresult(WINRT_SHIM(IDeviceAccountConfiguration2)->put_IsSyncScheduleManagedBySystem(value)); } -template Windows::Foundation::IAsyncOperation> impl_IUserDataAccountSystemAccessManagerStatics::AddAndShowDeviceAccountsAsync(const Windows::Foundation::Collections::IIterable & accounts) const +template Windows::Foundation::IAsyncOperation> impl_IUserDataAccountSystemAccessManagerStatics::AddAndShowDeviceAccountsAsync(iterable accounts) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_AddAndShowDeviceAccountsAsync(get(accounts), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountSystemAccessManagerStatics)->abi_AddAndShowDeviceAccountsAsync(get_abi(accounts), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IUserDataAccountSystemAccessManagerStatics2::SuppressLocalAccountWithAccountAsync(hstring_ref userDataAccountId) const +template Windows::Foundation::IAsyncAction impl_IUserDataAccountSystemAccessManagerStatics2::SuppressLocalAccountWithAccountAsync(hstring_view userDataAccountId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SuppressLocalAccountWithAccountAsync(get(userDataAccountId), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountSystemAccessManagerStatics2)->abi_SuppressLocalAccountWithAccountAsync(get_abi(userDataAccountId), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserDataAccountSystemAccessManagerStatics2::CreateDeviceAccountAsync(const Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountConfiguration & account) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceAccountAsync(get(account), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountSystemAccessManagerStatics2)->abi_CreateDeviceAccountAsync(get_abi(account), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IUserDataAccountSystemAccessManagerStatics2::DeleteDeviceAccountAsync(hstring_ref accountId) const +template Windows::Foundation::IAsyncAction impl_IUserDataAccountSystemAccessManagerStatics2::DeleteDeviceAccountAsync(hstring_view accountId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteDeviceAccountAsync(get(accountId), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountSystemAccessManagerStatics2)->abi_DeleteDeviceAccountAsync(get_abi(accountId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IUserDataAccountSystemAccessManagerStatics2::GetDeviceAccountConfigurationAsync(hstring_ref accountId) const +template Windows::Foundation::IAsyncOperation impl_IUserDataAccountSystemAccessManagerStatics2::GetDeviceAccountConfigurationAsync(hstring_view accountId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceAccountConfigurationAsync(get(accountId), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountSystemAccessManagerStatics2)->abi_GetDeviceAccountConfigurationAsync(get_abi(accountId), put_abi(result))); return result; } @@ -1833,12 +1929,12 @@ inline DeviceAccountConfiguration::DeviceAccountConfiguration() : DeviceAccountConfiguration(activate_instance()) {} -inline Windows::Foundation::IAsyncOperation> UserDataAccountSystemAccessManager::AddAndShowDeviceAccountsAsync(const Windows::Foundation::Collections::IIterable & accounts) +inline Windows::Foundation::IAsyncOperation> UserDataAccountSystemAccessManager::AddAndShowDeviceAccountsAsync(iterable accounts) { return get_activation_factory().AddAndShowDeviceAccountsAsync(accounts); } -inline Windows::Foundation::IAsyncAction UserDataAccountSystemAccessManager::SuppressLocalAccountWithAccountAsync(hstring_ref userDataAccountId) +inline Windows::Foundation::IAsyncAction UserDataAccountSystemAccessManager::SuppressLocalAccountWithAccountAsync(hstring_view userDataAccountId) { return get_activation_factory().SuppressLocalAccountWithAccountAsync(userDataAccountId); } @@ -1848,12 +1944,12 @@ inline Windows::Foundation::IAsyncOperation UserDataAccountSystemAccess return get_activation_factory().CreateDeviceAccountAsync(account); } -inline Windows::Foundation::IAsyncAction UserDataAccountSystemAccessManager::DeleteDeviceAccountAsync(hstring_ref accountId) +inline Windows::Foundation::IAsyncAction UserDataAccountSystemAccessManager::DeleteDeviceAccountAsync(hstring_view accountId) { return get_activation_factory().DeleteDeviceAccountAsync(accountId); } -inline Windows::Foundation::IAsyncOperation UserDataAccountSystemAccessManager::GetDeviceAccountConfigurationAsync(hstring_ref accountId) +inline Windows::Foundation::IAsyncOperation UserDataAccountSystemAccessManager::GetDeviceAccountConfigurationAsync(hstring_view accountId) { return get_activation_factory().GetDeviceAccountConfigurationAsync(accountId); } @@ -1861,3 +1957,50 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::SystemAccess::IDeviceAccountConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::SystemAccess::IDeviceAccountConfiguration2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::SystemAccess::IUserDataAccountSystemAccessManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::SystemAccess::IUserDataAccountSystemAccessManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::SystemAccess::DeviceAccountConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.h b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.h index d041b7866..2c17198e8 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.UserDataAccounts.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce } } - HRESULT __stdcall get_UserDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDisplayName()); return S_OK; } catch (...) @@ -45,10 +50,11 @@ struct produce } } - HRESULT __stdcall put_UserDisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_UserDisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserDisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -62,7 +68,8 @@ struct produce { try { - *value = detach(this->shim().OtherAppReadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAppReadAccess()); return S_OK; } catch (...) @@ -75,6 +82,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OtherAppReadAccess(value); return S_OK; } @@ -84,11 +92,12 @@ struct produce } } - HRESULT __stdcall get_Icon(abi_arg_out value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce } } - HRESULT __stdcall get_DeviceAccountTypeId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceAccountTypeId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceAccountTypeId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceAccountTypeId()); return S_OK; } catch (...) @@ -112,11 +122,12 @@ struct produce } } - HRESULT __stdcall get_PackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -154,11 +167,12 @@ struct produce } } - HRESULT __stdcall abi_FindAppointmentCalendarsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAppointmentCalendarsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAppointmentCalendarsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAppointmentCalendarsAsync()); return S_OK; } catch (...) @@ -168,11 +182,12 @@ struct produce } } - HRESULT __stdcall abi_FindEmailMailboxesAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindEmailMailboxesAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindEmailMailboxesAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindEmailMailboxesAsync()); return S_OK; } catch (...) @@ -182,11 +197,12 @@ struct produce } } - HRESULT __stdcall abi_FindContactListsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindContactListsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindContactListsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindContactListsAsync()); return S_OK; } catch (...) @@ -196,11 +212,12 @@ struct produce } } - HRESULT __stdcall abi_FindContactAnnotationListsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindContactAnnotationListsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindContactAnnotationListsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindContactAnnotationListsAsync()); return S_OK; } catch (...) @@ -214,11 +231,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_EnterpriseId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnterpriseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnterpriseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnterpriseId()); return S_OK; } catch (...) @@ -232,7 +250,8 @@ struct produceshim().IsProtectedUnderLock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProtectedUnderLock()); return S_OK; } catch (...) @@ -245,11 +264,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ExplictReadAccessPackageFamilyNames(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExplictReadAccessPackageFamilyNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExplictReadAccessPackageFamilyNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExplictReadAccessPackageFamilyNames()); return S_OK; } catch (...) @@ -259,11 +279,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -273,10 +294,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -290,11 +312,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(storeAccessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(storeAccessType)); return S_OK; } catch (...) @@ -304,11 +327,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -322,11 +346,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestStoreAsync(storeAccessType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestStoreAsync(storeAccessType)); return S_OK; } catch (...) @@ -336,11 +361,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_ShowAddAccountAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountContentKinds contentKinds, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowAddAccountAsync(contentKinds)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAddAccountAsync(contentKinds)); return S_OK; } catch (...) @@ -350,11 +376,12 @@ struct produce id, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowAccountSettingsAsync(impl::abi_arg_in id, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowAccountSettingsAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAccountSettingsAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -364,11 +391,12 @@ struct produce id, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowAccountErrorResolverAsync(impl::abi_arg_in id, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowAccountErrorResolverAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowAccountErrorResolverAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -382,11 +410,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -400,11 +429,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindAccountsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAccountsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAccountsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAccountsAsync()); return S_OK; } catch (...) @@ -414,11 +444,12 @@ struct produce id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAccountAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAccountAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAccountAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -428,11 +459,12 @@ struct produce userDisplayName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateAccountAsync(impl::abi_arg_in userDisplayName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateAccountAsync(*reinterpret_cast(&userDisplayName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateAccountAsync(*reinterpret_cast(&userDisplayName))); return S_OK; } catch (...) @@ -446,11 +478,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateAccountWithPackageRelativeAppIdAsync(abi_arg_in userDisplayName, abi_arg_in packageRelativeAppId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateAccountWithPackageRelativeAppIdAsync(impl::abi_arg_in userDisplayName, impl::abi_arg_in packageRelativeAppId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateAccountAsync(*reinterpret_cast(&userDisplayName), *reinterpret_cast(&packageRelativeAppId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateAccountAsync(*reinterpret_cast(&userDisplayName), *reinterpret_cast(&packageRelativeAppId))); return S_OK; } catch (...) @@ -460,11 +493,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_StoreChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StoreChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StoreChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -477,6 +511,7 @@ struct produceshim()); this->shim().StoreChanged(token); return S_OK; } @@ -490,11 +525,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -512,162 +548,162 @@ namespace Windows::ApplicationModel::UserDataAccounts { template hstring impl_IUserDataAccount::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_Id(put_abi(value))); return value; } template hstring impl_IUserDataAccount::UserDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDisplayName(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_UserDisplayName(put_abi(value))); return value; } -template void impl_IUserDataAccount::UserDisplayName(hstring_ref value) const +template void impl_IUserDataAccount::UserDisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UserDisplayName(get(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->put_UserDisplayName(get_abi(value))); } template Windows::ApplicationModel::UserDataAccounts::UserDataAccountOtherAppReadAccess impl_IUserDataAccount::OtherAppReadAccess() const { Windows::ApplicationModel::UserDataAccounts::UserDataAccountOtherAppReadAccess value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherAppReadAccess(&value)); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_OtherAppReadAccess(&value)); return value; } template void impl_IUserDataAccount::OtherAppReadAccess(Windows::ApplicationModel::UserDataAccounts::UserDataAccountOtherAppReadAccess value) const { - check_hresult(static_cast(static_cast(*this))->put_OtherAppReadAccess(value)); + check_hresult(WINRT_SHIM(IUserDataAccount)->put_OtherAppReadAccess(value)); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IUserDataAccount::Icon() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Icon(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_Icon(put_abi(value))); return value; } template hstring impl_IUserDataAccount::DeviceAccountTypeId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceAccountTypeId(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_DeviceAccountTypeId(put_abi(value))); return value; } template hstring impl_IUserDataAccount::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount)->get_PackageFamilyName(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IUserDataAccount::SaveAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_SaveAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IUserDataAccount::DeleteAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_DeleteAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IUserDataAccount::FindAppointmentCalendarsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAppointmentCalendarsAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_FindAppointmentCalendarsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IUserDataAccount::FindEmailMailboxesAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindEmailMailboxesAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_FindEmailMailboxesAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IUserDataAccount::FindContactListsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindContactListsAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_FindContactListsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IUserDataAccount::FindContactAnnotationListsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindContactAnnotationListsAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccount)->abi_FindContactAnnotationListsAsync(put_abi(result))); return result; } template hstring impl_IUserDataAccount2::EnterpriseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnterpriseId(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount2)->get_EnterpriseId(put_abi(value))); return value; } template bool impl_IUserDataAccount2::IsProtectedUnderLock() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsProtectedUnderLock(&value)); + check_hresult(WINRT_SHIM(IUserDataAccount2)->get_IsProtectedUnderLock(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IUserDataAccount3::ExplictReadAccessPackageFamilyNames() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ExplictReadAccessPackageFamilyNames(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount3)->get_ExplictReadAccessPackageFamilyNames(put_abi(value))); return value; } template hstring impl_IUserDataAccount3::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccount3)->get_DisplayName(put_abi(value))); return value; } -template void impl_IUserDataAccount3::DisplayName(hstring_ref value) const +template void impl_IUserDataAccount3::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IUserDataAccount3)->put_DisplayName(get_abi(value))); } template Windows::Foundation::IAsyncOperation> impl_IUserDataAccountStore::FindAccountsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAccountsAsync(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountStore)->abi_FindAccountsAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore::GetAccountAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore::GetAccountAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAccountAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountStore)->abi_GetAccountAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore::CreateAccountAsync(hstring_ref userDisplayName) const +template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore::CreateAccountAsync(hstring_view userDisplayName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateAccountAsync(get(userDisplayName), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountStore)->abi_CreateAccountAsync(get_abi(userDisplayName), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore2::CreateAccountAsync(hstring_ref userDisplayName, hstring_ref packageRelativeAppId) const +template Windows::Foundation::IAsyncOperation impl_IUserDataAccountStore2::CreateAccountAsync(hstring_view userDisplayName, hstring_view packageRelativeAppId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateAccountWithPackageRelativeAppIdAsync(get(userDisplayName), get(packageRelativeAppId), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountStore2)->abi_CreateAccountWithPackageRelativeAppIdAsync(get_abi(userDisplayName), get_abi(packageRelativeAppId), put_abi(result))); return result; } template event_token impl_IUserDataAccountStore2::StoreChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StoreChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserDataAccountStore2)->add_StoreChanged(get_abi(handler), &token)); return token; } @@ -678,62 +714,62 @@ template event_revoker impl_IUserDataAccoun template void impl_IUserDataAccountStore2::StoreChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StoreChanged(token)); + check_hresult(WINRT_SHIM(IUserDataAccountStore2)->remove_StoreChanged(token)); } template Windows::Foundation::IAsyncOperation impl_IUserDataAccountManagerStatics::RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(storeAccessType, put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerStatics)->abi_RequestStoreAsync(storeAccessType, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserDataAccountManagerStatics::ShowAddAccountAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountContentKinds contentKinds) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAccountAsync(contentKinds, put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerStatics)->abi_ShowAddAccountAsync(contentKinds, put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IUserDataAccountManagerStatics::ShowAccountSettingsAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IUserDataAccountManagerStatics::ShowAccountSettingsAsync(hstring_view id) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAccountSettingsAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerStatics)->abi_ShowAccountSettingsAsync(get_abi(id), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IUserDataAccountManagerStatics::ShowAccountErrorResolverAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IUserDataAccountManagerStatics::ShowAccountErrorResolverAsync(hstring_view id) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowAccountErrorResolverAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerStatics)->abi_ShowAccountErrorResolverAsync(get_abi(id), put_abi(result))); return result; } template Windows::ApplicationModel::UserDataAccounts::UserDataAccountManagerForUser impl_IUserDataAccountManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::ApplicationModel::UserDataAccounts::UserDataAccountManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserDataAccountManagerForUser::RequestStoreAsync(Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreAccessType storeAccessType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(storeAccessType, put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerForUser)->abi_RequestStoreAsync(storeAccessType, put_abi(result))); return result; } template Windows::System::User impl_IUserDataAccountManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IUserDataAccountManagerForUser)->get_User(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IUserDataAccountStoreChangedEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IUserDataAccountStoreChangedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } @@ -747,12 +783,12 @@ inline Windows::Foundation::IAsyncOperation UserDataAccountManager::Sho return get_activation_factory().ShowAddAccountAsync(contentKinds); } -inline Windows::Foundation::IAsyncAction UserDataAccountManager::ShowAccountSettingsAsync(hstring_ref id) +inline Windows::Foundation::IAsyncAction UserDataAccountManager::ShowAccountSettingsAsync(hstring_view id) { return get_activation_factory().ShowAccountSettingsAsync(id); } -inline Windows::Foundation::IAsyncAction UserDataAccountManager::ShowAccountErrorResolverAsync(hstring_ref id) +inline Windows::Foundation::IAsyncAction UserDataAccountManager::ShowAccountErrorResolverAsync(hstring_view id) { return get_activation_factory().ShowAccountErrorResolverAsync(id); } @@ -765,3 +801,122 @@ inline Windows::ApplicationModel::UserDataAccounts::UserDataAccountManagerForUse } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccount2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccount3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::IUserDataAccountStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::UserDataAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::UserDataAccountManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::UserDataAccountStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::UserDataAccounts::UserDataAccountStoreChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.VoiceCommands.h b/10.0.14393.0/winrt/Windows.ApplicationModel.VoiceCommands.h index ba55fe94e..af69524c6 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.VoiceCommands.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.VoiceCommands.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_CommandName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandName()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : pro } } - HRESULT __stdcall get_Properties(abi_arg_out>> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -47,11 +52,12 @@ struct produce : pro } } - HRESULT __stdcall get_SpeechRecognitionResult(abi_arg_out value) noexcept override + HRESULT __stdcall get_SpeechRecognitionResult(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SpeechRecognitionResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpeechRecognitionResult()); return S_OK; } catch (...) @@ -69,7 +75,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -86,7 +93,8 @@ struct produceshim().Confirmed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Confirmed()); return S_OK; } catch (...) @@ -99,11 +107,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -113,10 +122,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -126,11 +136,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TextLine1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLine1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLine1()); return S_OK; } catch (...) @@ -140,10 +151,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TextLine1(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextLine1(*reinterpret_cast(&value)); return S_OK; } @@ -153,11 +165,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TextLine2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLine2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLine2()); return S_OK; } catch (...) @@ -167,10 +180,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TextLine2(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextLine2(*reinterpret_cast(&value)); return S_OK; } @@ -180,11 +194,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TextLine3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLine3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLine3()); return S_OK; } catch (...) @@ -194,10 +209,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TextLine3(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextLine3(*reinterpret_cast(&value)); return S_OK; } @@ -207,11 +223,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -221,10 +238,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Image(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Image(*reinterpret_cast(&value)); return S_OK; } @@ -234,11 +252,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppContext()); return S_OK; } catch (...) @@ -248,11 +267,12 @@ struct produce value) noexcept override + HRESULT __stdcall put_AppContext(impl::abi_arg_in value) noexcept override { try { - this->shim().AppContext(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().AppContext(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -261,11 +281,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppLaunchArgument(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppLaunchArgument()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppLaunchArgument()); return S_OK; } catch (...) @@ -275,10 +296,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AppLaunchArgument(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppLaunchArgument(*reinterpret_cast(&value)); return S_OK; } @@ -292,7 +314,8 @@ struct produceshim().ContentTileType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTileType()); return S_OK; } catch (...) @@ -305,6 +328,7 @@ struct produceshim()); this->shim().ContentTileType(value); return S_OK; } @@ -318,11 +342,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -332,11 +357,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -346,11 +372,12 @@ struct produce phraseListName, abi_arg_in> phraseList, abi_arg_out updateAction) noexcept override + HRESULT __stdcall abi_SetPhraseListAsync(impl::abi_arg_in phraseListName, impl::abi_arg_in> phraseList, impl::abi_arg_out updateAction) noexcept override { try { - *updateAction = detach(this->shim().SetPhraseListAsync(*reinterpret_cast(&phraseListName), *reinterpret_cast *>(&phraseList))); + typename D::abi_guard guard(this->shim()); + *updateAction = detach_abi(this->shim().SetPhraseListAsync(*reinterpret_cast(&phraseListName), *reinterpret_cast *>(&phraseList))); return S_OK; } catch (...) @@ -364,11 +391,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_InstallCommandDefinitionsFromStorageFileAsync(abi_arg_in file, abi_arg_out installAction) noexcept override + HRESULT __stdcall abi_InstallCommandDefinitionsFromStorageFileAsync(impl::abi_arg_in file, impl::abi_arg_out installAction) noexcept override { try { - *installAction = detach(this->shim().InstallCommandDefinitionsFromStorageFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *installAction = detach_abi(this->shim().InstallCommandDefinitionsFromStorageFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -378,11 +406,12 @@ struct produce> voiceCommandDefinitions) noexcept override + HRESULT __stdcall get_InstalledCommandDefinitions(impl::abi_arg_out> voiceCommandDefinitions) noexcept override { try { - *voiceCommandDefinitions = detach(this->shim().InstalledCommandDefinitions()); + typename D::abi_guard guard(this->shim()); + *voiceCommandDefinitions = detach_abi(this->shim().InstalledCommandDefinitions()); return S_OK; } catch (...) @@ -396,11 +425,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SelectedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -414,11 +444,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -428,10 +459,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Message(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Message(*reinterpret_cast(&value)); return S_OK; } @@ -441,11 +473,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RepeatMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RepeatMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RepeatMessage()); return S_OK; } catch (...) @@ -455,10 +488,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RepeatMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RepeatMessage(*reinterpret_cast(&value)); return S_OK; } @@ -468,11 +502,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppLaunchArgument(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppLaunchArgument()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppLaunchArgument()); return S_OK; } catch (...) @@ -482,10 +517,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AppLaunchArgument(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppLaunchArgument(*reinterpret_cast(&value)); return S_OK; } @@ -495,11 +531,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_VoiceCommandContentTiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().VoiceCommandContentTiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VoiceCommandContentTiles()); return S_OK; } catch (...) @@ -517,7 +554,8 @@ struct produceshim().MaxSupportedVoiceCommandContentTiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSupportedVoiceCommandContentTiles()); return S_OK; } catch (...) @@ -526,11 +564,12 @@ struct produce userMessage, abi_arg_out response) noexcept override + HRESULT __stdcall abi_CreateResponse(impl::abi_arg_in userMessage, impl::abi_arg_out response) noexcept override { try { - *response = detach(this->shim().CreateResponse(*reinterpret_cast(&userMessage))); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().CreateResponse(*reinterpret_cast(&userMessage))); return S_OK; } catch (...) @@ -540,11 +579,12 @@ struct produce message, abi_arg_in> contentTiles, abi_arg_out response) noexcept override + HRESULT __stdcall abi_CreateResponseWithTiles(impl::abi_arg_in message, impl::abi_arg_in> contentTiles, impl::abi_arg_out response) noexcept override { try { - *response = detach(this->shim().CreateResponse(*reinterpret_cast(&message), *reinterpret_cast *>(&contentTiles))); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().CreateResponse(*reinterpret_cast(&message), *reinterpret_cast *>(&contentTiles))); return S_OK; } catch (...) @@ -554,11 +594,12 @@ struct produce message, abi_arg_in repeatMessage, abi_arg_out response) noexcept override + HRESULT __stdcall abi_CreateResponseForPrompt(impl::abi_arg_in message, impl::abi_arg_in repeatMessage, impl::abi_arg_out response) noexcept override { try { - *response = detach(this->shim().CreateResponseForPrompt(*reinterpret_cast(&message), *reinterpret_cast(&repeatMessage))); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().CreateResponseForPrompt(*reinterpret_cast(&message), *reinterpret_cast(&repeatMessage))); return S_OK; } catch (...) @@ -568,11 +609,12 @@ struct produce message, abi_arg_in repeatMessage, abi_arg_in> contentTiles, abi_arg_out response) noexcept override + HRESULT __stdcall abi_CreateResponseForPromptWithTiles(impl::abi_arg_in message, impl::abi_arg_in repeatMessage, impl::abi_arg_in> contentTiles, impl::abi_arg_out response) noexcept override { try { - *response = detach(this->shim().CreateResponseForPrompt(*reinterpret_cast(&message), *reinterpret_cast(&repeatMessage), *reinterpret_cast *>(&contentTiles))); + typename D::abi_guard guard(this->shim()); + *response = detach_abi(this->shim().CreateResponseForPrompt(*reinterpret_cast(&message), *reinterpret_cast(&repeatMessage), *reinterpret_cast *>(&contentTiles))); return S_OK; } catch (...) @@ -586,11 +628,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetVoiceCommandAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetVoiceCommandAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetVoiceCommandAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetVoiceCommandAsync()); return S_OK; } catch (...) @@ -600,11 +643,12 @@ struct produce response, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestConfirmationAsync(impl::abi_arg_in response, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestConfirmationAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestConfirmationAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -614,11 +658,12 @@ struct produce response, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDisambiguationAsync(impl::abi_arg_in response, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDisambiguationAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDisambiguationAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -628,11 +673,12 @@ struct produce response, abi_arg_out action) noexcept override + HRESULT __stdcall abi_ReportProgressAsync(impl::abi_arg_in response, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().ReportProgressAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().ReportProgressAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -642,11 +688,12 @@ struct produce response, abi_arg_out action) noexcept override + HRESULT __stdcall abi_ReportSuccessAsync(impl::abi_arg_in response, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().ReportSuccessAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().ReportSuccessAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -656,11 +703,12 @@ struct produce response, abi_arg_out action) noexcept override + HRESULT __stdcall abi_ReportFailureAsync(impl::abi_arg_in response, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().ReportFailureAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().ReportFailureAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -670,11 +718,12 @@ struct produce response, abi_arg_out action) noexcept override + HRESULT __stdcall abi_RequestAppLaunchAsync(impl::abi_arg_in response, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().RequestAppLaunchAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().RequestAppLaunchAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -684,11 +733,12 @@ struct produce language) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out language) noexcept override { try { - *language = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *language = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -698,11 +748,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_VoiceCommandCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VoiceCommandCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VoiceCommandCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -715,6 +766,7 @@ struct produceshim()); this->shim().VoiceCommandCompleted(token); return S_OK; } @@ -728,11 +780,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromAppServiceTriggerDetails(abi_arg_in triggerDetails, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromAppServiceTriggerDetails(impl::abi_arg_in triggerDetails, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromAppServiceTriggerDetails(*reinterpret_cast(&triggerDetails))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromAppServiceTriggerDetails(*reinterpret_cast(&triggerDetails))); return S_OK; } catch (...) @@ -746,11 +799,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMessage()); return S_OK; } catch (...) @@ -760,10 +814,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMessage(*reinterpret_cast(&value)); return S_OK; } @@ -773,11 +828,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SpokenMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SpokenMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpokenMessage()); return S_OK; } catch (...) @@ -787,10 +843,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SpokenMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SpokenMessage(*reinterpret_cast(&value)); return S_OK; } @@ -808,260 +865,260 @@ namespace Windows::ApplicationModel::VoiceCommands { template Windows::Foundation::IAsyncAction impl_IVoiceCommandDefinitionManagerStatics::InstallCommandDefinitionsFromStorageFileAsync(const Windows::Storage::StorageFile & file) const { Windows::Foundation::IAsyncAction installAction; - check_hresult(static_cast(static_cast(*this))->abi_InstallCommandDefinitionsFromStorageFileAsync(get(file), put(installAction))); + check_hresult(WINRT_SHIM(IVoiceCommandDefinitionManagerStatics)->abi_InstallCommandDefinitionsFromStorageFileAsync(get_abi(file), put_abi(installAction))); return installAction; } template Windows::Foundation::Collections::IMapView impl_IVoiceCommandDefinitionManagerStatics::InstalledCommandDefinitions() const { Windows::Foundation::Collections::IMapView voiceCommandDefinitions; - check_hresult(static_cast(static_cast(*this))->get_InstalledCommandDefinitions(put(voiceCommandDefinitions))); + check_hresult(WINRT_SHIM(IVoiceCommandDefinitionManagerStatics)->get_InstalledCommandDefinitions(put_abi(voiceCommandDefinitions))); return voiceCommandDefinitions; } template hstring impl_IVoiceCommandDefinition::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandDefinition)->get_Language(put_abi(value))); return value; } template hstring impl_IVoiceCommandDefinition::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandDefinition)->get_Name(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IVoiceCommandDefinition::SetPhraseListAsync(hstring_ref phraseListName, const Windows::Foundation::Collections::IIterable & phraseList) const +template Windows::Foundation::IAsyncAction impl_IVoiceCommandDefinition::SetPhraseListAsync(hstring_view phraseListName, iterable phraseList) const { Windows::Foundation::IAsyncAction updateAction; - check_hresult(static_cast(static_cast(*this))->abi_SetPhraseListAsync(get(phraseListName), get(phraseList), put(updateAction))); + check_hresult(WINRT_SHIM(IVoiceCommandDefinition)->abi_SetPhraseListAsync(get_abi(phraseListName), get_abi(phraseList), put_abi(updateAction))); return updateAction; } template hstring impl_IVoiceCommandContentTile::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_Title(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::Title(hstring_ref value) const +template void impl_IVoiceCommandContentTile::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_Title(get_abi(value))); } template hstring impl_IVoiceCommandContentTile::TextLine1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextLine1(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_TextLine1(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::TextLine1(hstring_ref value) const +template void impl_IVoiceCommandContentTile::TextLine1(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLine1(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_TextLine1(get_abi(value))); } template hstring impl_IVoiceCommandContentTile::TextLine2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextLine2(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_TextLine2(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::TextLine2(hstring_ref value) const +template void impl_IVoiceCommandContentTile::TextLine2(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLine2(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_TextLine2(get_abi(value))); } template hstring impl_IVoiceCommandContentTile::TextLine3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextLine3(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_TextLine3(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::TextLine3(hstring_ref value) const +template void impl_IVoiceCommandContentTile::TextLine3(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLine3(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_TextLine3(get_abi(value))); } template Windows::Storage::IStorageFile impl_IVoiceCommandContentTile::Image() const { Windows::Storage::IStorageFile value; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_Image(put_abi(value))); return value; } template void impl_IVoiceCommandContentTile::Image(const Windows::Storage::IStorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->put_Image(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_Image(get_abi(value))); } -template Windows::IInspectable impl_IVoiceCommandContentTile::AppContext() const +template Windows::Foundation::IInspectable impl_IVoiceCommandContentTile::AppContext() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_AppContext(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_AppContext(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::AppContext(const Windows::IInspectable & value) const +template void impl_IVoiceCommandContentTile::AppContext(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppContext(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_AppContext(get_abi(value))); } template hstring impl_IVoiceCommandContentTile::AppLaunchArgument() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppLaunchArgument(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_AppLaunchArgument(put_abi(value))); return value; } -template void impl_IVoiceCommandContentTile::AppLaunchArgument(hstring_ref value) const +template void impl_IVoiceCommandContentTile::AppLaunchArgument(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AppLaunchArgument(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_AppLaunchArgument(get_abi(value))); } template Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTileType impl_IVoiceCommandContentTile::ContentTileType() const { Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTileType value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentTileType(&value)); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->get_ContentTileType(&value)); return value; } template void impl_IVoiceCommandContentTile::ContentTileType(Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTileType value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTileType(value)); + check_hresult(WINRT_SHIM(IVoiceCommandContentTile)->put_ContentTileType(value)); } template hstring impl_IVoiceCommandUserMessage::DisplayMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayMessage(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandUserMessage)->get_DisplayMessage(put_abi(value))); return value; } -template void impl_IVoiceCommandUserMessage::DisplayMessage(hstring_ref value) const +template void impl_IVoiceCommandUserMessage::DisplayMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMessage(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandUserMessage)->put_DisplayMessage(get_abi(value))); } template hstring impl_IVoiceCommandUserMessage::SpokenMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SpokenMessage(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandUserMessage)->get_SpokenMessage(put_abi(value))); return value; } -template void impl_IVoiceCommandUserMessage::SpokenMessage(hstring_ref value) const +template void impl_IVoiceCommandUserMessage::SpokenMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SpokenMessage(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandUserMessage)->put_SpokenMessage(get_abi(value))); } template hstring impl_IVoiceCommand::CommandName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CommandName(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommand)->get_CommandName(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView> impl_IVoiceCommand::Properties() const { Windows::Foundation::Collections::IMapView> value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommand)->get_Properties(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionResult impl_IVoiceCommand::SpeechRecognitionResult() const { Windows::Media::SpeechRecognition::SpeechRecognitionResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SpeechRecognitionResult(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommand)->get_SpeechRecognitionResult(put_abi(value))); return value; } template Windows::ApplicationModel::VoiceCommands::VoiceCommandCompletionReason impl_IVoiceCommandCompletedEventArgs::Reason() const { Windows::ApplicationModel::VoiceCommands::VoiceCommandCompletionReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IVoiceCommandCompletedEventArgs)->get_Reason(&value)); return value; } template Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTile impl_IVoiceCommandDisambiguationResult::SelectedItem() const { Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedItem(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandDisambiguationResult)->get_SelectedItem(put_abi(value))); return value; } template bool impl_IVoiceCommandConfirmationResult::Confirmed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Confirmed(&value)); + check_hresult(WINRT_SHIM(IVoiceCommandConfirmationResult)->get_Confirmed(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IVoiceCommandServiceConnection::GetVoiceCommandAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetVoiceCommandAsync(put(operation))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_GetVoiceCommandAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVoiceCommandServiceConnection::RequestConfirmationAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestConfirmationAsync(get(response), put(operation))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_RequestConfirmationAsync(get_abi(response), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVoiceCommandServiceConnection::RequestDisambiguationAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDisambiguationAsync(get(response), put(operation))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_RequestDisambiguationAsync(get_abi(response), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IVoiceCommandServiceConnection::ReportProgressAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_ReportProgressAsync(get(response), put(action))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_ReportProgressAsync(get_abi(response), put_abi(action))); return action; } template Windows::Foundation::IAsyncAction impl_IVoiceCommandServiceConnection::ReportSuccessAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_ReportSuccessAsync(get(response), put(action))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_ReportSuccessAsync(get_abi(response), put_abi(action))); return action; } template Windows::Foundation::IAsyncAction impl_IVoiceCommandServiceConnection::ReportFailureAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_ReportFailureAsync(get(response), put(action))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_ReportFailureAsync(get_abi(response), put_abi(action))); return action; } template Windows::Foundation::IAsyncAction impl_IVoiceCommandServiceConnection::RequestAppLaunchAsync(const Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & response) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_RequestAppLaunchAsync(get(response), put(action))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->abi_RequestAppLaunchAsync(get_abi(response), put_abi(action))); return action; } template Windows::Globalization::Language impl_IVoiceCommandServiceConnection::Language() const { Windows::Globalization::Language language { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Language(put(language))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->get_Language(put_abi(language))); return language; } template event_token impl_IVoiceCommandServiceConnection::VoiceCommandCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VoiceCommandCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->add_VoiceCommandCompleted(get_abi(handler), &token)); return token; } @@ -1072,91 +1129,91 @@ template event_revoker impl_IVoiceC template void impl_IVoiceCommandServiceConnection::VoiceCommandCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VoiceCommandCompleted(token)); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnection)->remove_VoiceCommandCompleted(token)); } template Windows::ApplicationModel::VoiceCommands::VoiceCommandServiceConnection impl_IVoiceCommandServiceConnectionStatics::FromAppServiceTriggerDetails(const Windows::ApplicationModel::AppService::AppServiceTriggerDetails & triggerDetails) const { Windows::ApplicationModel::VoiceCommands::VoiceCommandServiceConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromAppServiceTriggerDetails(get(triggerDetails), put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandServiceConnectionStatics)->abi_FromAppServiceTriggerDetails(get_abi(triggerDetails), put_abi(value))); return value; } template uint32_t impl_IVoiceCommandResponseStatics::MaxSupportedVoiceCommandContentTiles() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSupportedVoiceCommandContentTiles(&value)); + check_hresult(WINRT_SHIM(IVoiceCommandResponseStatics)->get_MaxSupportedVoiceCommandContentTiles(&value)); return value; } template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponse(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & userMessage) const { Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse response { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResponse(get(userMessage), put(response))); + check_hresult(WINRT_SHIM(IVoiceCommandResponseStatics)->abi_CreateResponse(get_abi(userMessage), put_abi(response))); return response; } -template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponse(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::Foundation::Collections::IIterable & contentTiles) const +template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponse(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, iterable contentTiles) const { Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse response { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResponseWithTiles(get(message), get(contentTiles), put(response))); + check_hresult(WINRT_SHIM(IVoiceCommandResponseStatics)->abi_CreateResponseWithTiles(get_abi(message), get_abi(contentTiles), put_abi(response))); return response; } template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponseForPrompt(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & repeatMessage) const { Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse response { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResponseForPrompt(get(message), get(repeatMessage), put(response))); + check_hresult(WINRT_SHIM(IVoiceCommandResponseStatics)->abi_CreateResponseForPrompt(get_abi(message), get_abi(repeatMessage), put_abi(response))); return response; } -template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponseForPrompt(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & repeatMessage, const Windows::Foundation::Collections::IIterable & contentTiles) const +template Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse impl_IVoiceCommandResponseStatics::CreateResponseForPrompt(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & repeatMessage, iterable contentTiles) const { Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse response { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateResponseForPromptWithTiles(get(message), get(repeatMessage), get(contentTiles), put(response))); + check_hresult(WINRT_SHIM(IVoiceCommandResponseStatics)->abi_CreateResponseForPromptWithTiles(get_abi(message), get_abi(repeatMessage), get_abi(contentTiles), put_abi(response))); return response; } template Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage impl_IVoiceCommandResponse::Message() const { Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->get_Message(put_abi(value))); return value; } template void impl_IVoiceCommandResponse::Message(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & value) const { - check_hresult(static_cast(static_cast(*this))->put_Message(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->put_Message(get_abi(value))); } template Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage impl_IVoiceCommandResponse::RepeatMessage() const { Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RepeatMessage(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->get_RepeatMessage(put_abi(value))); return value; } template void impl_IVoiceCommandResponse::RepeatMessage(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & value) const { - check_hresult(static_cast(static_cast(*this))->put_RepeatMessage(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->put_RepeatMessage(get_abi(value))); } template hstring impl_IVoiceCommandResponse::AppLaunchArgument() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppLaunchArgument(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->get_AppLaunchArgument(put_abi(value))); return value; } -template void impl_IVoiceCommandResponse::AppLaunchArgument(hstring_ref value) const +template void impl_IVoiceCommandResponse::AppLaunchArgument(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AppLaunchArgument(get(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->put_AppLaunchArgument(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVoiceCommandResponse::VoiceCommandContentTiles() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_VoiceCommandContentTiles(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandResponse)->get_VoiceCommandContentTiles(put_abi(value))); return value; } @@ -1184,7 +1241,7 @@ inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceComma return get_activation_factory().CreateResponse(userMessage); } -inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceCommandResponse::CreateResponse(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::Foundation::Collections::IIterable & contentTiles) +inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceCommandResponse::CreateResponse(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, iterable contentTiles) { return get_activation_factory().CreateResponse(message, contentTiles); } @@ -1194,7 +1251,7 @@ inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceComma return get_activation_factory().CreateResponseForPrompt(message, repeatMessage); } -inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceCommandResponse::CreateResponseForPrompt(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & repeatMessage, const Windows::Foundation::Collections::IIterable & contentTiles) +inline Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse VoiceCommandResponse::CreateResponseForPrompt(const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & message, const Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & repeatMessage, iterable contentTiles) { return get_activation_factory().CreateResponseForPrompt(message, repeatMessage, contentTiles); } @@ -1211,3 +1268,194 @@ inline VoiceCommandUserMessage::VoiceCommandUserMessage() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandConfirmationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandContentTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandDefinitionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandDisambiguationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandResponseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandServiceConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandServiceConnectionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::IVoiceCommandUserMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandConfirmationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandContentTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandDisambiguationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandServiceConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandUserMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.System.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.System.h index dfa03e5d2..8c2591281 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.System.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.System.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Wallet.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetItemsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce item, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_in item, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce stream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ImportItemAsync(impl::abi_arg_in stream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ImportItemAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ImportItemAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce item, Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation * result) noexcept override + HRESULT __stdcall abi_GetAppStatusForItem(impl::abi_arg_in item, Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation * result) noexcept override { try { - *result = detach(this->shim().GetAppStatusForItem(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppStatusForItem(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce item, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchAppForItemAsync(impl::abi_arg_in item, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchAppForItemAsync(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchAppForItemAsync(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_ItemsChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ItemsChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ItemsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ItemsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -106,6 +115,7 @@ struct produceshim()); this->shim().ItemsChanged(cookie); return S_OK; } @@ -119,11 +129,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -141,59 +152,59 @@ namespace Windows::ApplicationModel::Wallet::System { template Windows::Foundation::IAsyncOperation> impl_IWalletItemSystemStore::GetItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletItemSystemStore)->abi_GetItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IWalletItemSystemStore::DeleteAsync(const Windows::ApplicationModel::Wallet::WalletItem & item) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(get(item), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemSystemStore)->abi_DeleteAsync(get_abi(item), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IWalletItemSystemStore::ImportItemAsync(const Windows::Storage::Streams::IRandomAccessStreamReference & stream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ImportItemAsync(get(stream), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemSystemStore)->abi_ImportItemAsync(get_abi(stream), put_abi(operation))); return operation; } template Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation impl_IWalletItemSystemStore::GetAppStatusForItem(const Windows::ApplicationModel::Wallet::WalletItem & item) const { Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAppStatusForItem(get(item), &result)); + check_hresult(WINRT_SHIM(IWalletItemSystemStore)->abi_GetAppStatusForItem(get_abi(item), &result)); return result; } template Windows::Foundation::IAsyncOperation impl_IWalletItemSystemStore::LaunchAppForItemAsync(const Windows::ApplicationModel::Wallet::WalletItem & item) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchAppForItemAsync(get(item), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemSystemStore)->abi_LaunchAppForItemAsync(get_abi(item), put_abi(operation))); return operation; } -template event_token impl_IWalletItemSystemStore2::ItemsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWalletItemSystemStore2::ItemsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ItemsChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IWalletItemSystemStore2)->add_ItemsChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IWalletItemSystemStore2::ItemsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWalletItemSystemStore2::ItemsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2::remove_ItemsChanged, ItemsChanged(handler)); } template void impl_IWalletItemSystemStore2::ItemsChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemsChanged(cookie)); + check_hresult(WINRT_SHIM(IWalletItemSystemStore2)->remove_ItemsChanged(cookie)); } template Windows::Foundation::IAsyncOperation impl_IWalletManagerSystemStatics::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletManagerSystemStatics)->abi_RequestStoreAsync(put_abi(operation))); return operation; } @@ -205,3 +216,41 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.h b/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.h index 40f120559..4285fd8e3 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.Wallet.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.UI.3.h" @@ -22,7 +25,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Symbology()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Symbology()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetImageAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetImageAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetImageAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetImageAsync()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateWalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, abi_arg_in value, abi_arg_out barcode) noexcept override + HRESULT __stdcall abi_CreateWalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, impl::abi_arg_in value, impl::abi_arg_out barcode) noexcept override { try { - *barcode = detach(this->shim().CreateWalletBarcode(symbology, *reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *barcode = detach_abi(this->shim().CreateWalletBarcode(symbology, *reinterpret_cast(&value))); return S_OK; } catch (...) @@ -77,11 +84,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateCustomWalletBarcode(abi_arg_in streamToBarcodeImage, abi_arg_out barcode) noexcept override + HRESULT __stdcall abi_CreateCustomWalletBarcode(impl::abi_arg_in streamToBarcodeImage, impl::abi_arg_out barcode) noexcept override { try { - *barcode = detach(this->shim().CreateCustomWalletBarcode(*reinterpret_cast(&streamToBarcodeImage))); + typename D::abi_guard guard(this->shim()); + *barcode = detach_abi(this->shim().CreateCustomWalletBarcode(*reinterpret_cast(&streamToBarcodeImage))); return S_OK; } catch (...) @@ -95,11 +103,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -109,10 +118,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -122,11 +132,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -140,7 +151,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsAcknowledged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAcknowledged()); return S_OK; } catch (...) @@ -153,6 +165,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsAcknowledged(value); return S_OK; } @@ -162,11 +175,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_IssuerDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_IssuerDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IssuerDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IssuerDisplayName()); return S_OK; } catch (...) @@ -176,10 +190,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_IssuerDisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_IssuerDisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IssuerDisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -189,11 +204,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LastUpdated(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LastUpdated(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LastUpdated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastUpdated()); return S_OK; } catch (...) @@ -203,10 +219,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_LastUpdated(abi_arg_in> value) noexcept override + HRESULT __stdcall put_LastUpdated(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LastUpdated(*reinterpret_cast *>(&value)); return S_OK; } @@ -220,7 +237,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -229,11 +247,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Barcode(abi_arg_out value) noexcept override + HRESULT __stdcall get_Barcode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Barcode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Barcode()); return S_OK; } catch (...) @@ -243,10 +262,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Barcode(abi_arg_in value) noexcept override + HRESULT __stdcall put_Barcode(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Barcode(*reinterpret_cast(&value)); return S_OK; } @@ -256,11 +276,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ExpirationDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -270,10 +291,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ExpirationDate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationDate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationDate(*reinterpret_cast *>(&value)); return S_OK; } @@ -283,11 +305,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Logo159x159(abi_arg_out value) noexcept override + HRESULT __stdcall get_Logo159x159(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo159x159()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo159x159()); return S_OK; } catch (...) @@ -297,10 +320,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Logo159x159(abi_arg_in value) noexcept override + HRESULT __stdcall put_Logo159x159(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Logo159x159(*reinterpret_cast(&value)); return S_OK; } @@ -310,11 +334,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Logo336x336(abi_arg_out value) noexcept override + HRESULT __stdcall get_Logo336x336(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo336x336()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo336x336()); return S_OK; } catch (...) @@ -324,10 +349,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Logo336x336(abi_arg_in value) noexcept override + HRESULT __stdcall put_Logo336x336(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Logo336x336(*reinterpret_cast(&value)); return S_OK; } @@ -337,11 +363,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Logo99x99(abi_arg_out value) noexcept override + HRESULT __stdcall get_Logo99x99(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo99x99()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo99x99()); return S_OK; } catch (...) @@ -351,10 +378,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Logo99x99(abi_arg_in value) noexcept override + HRESULT __stdcall put_Logo99x99(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Logo99x99(*reinterpret_cast(&value)); return S_OK; } @@ -364,11 +392,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMessage()); return S_OK; } catch (...) @@ -378,10 +407,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayMessage(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMessage(*reinterpret_cast(&value)); return S_OK; } @@ -395,7 +425,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsDisplayMessageLaunchable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisplayMessageLaunchable()); return S_OK; } catch (...) @@ -408,6 +439,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsDisplayMessageLaunchable(value); return S_OK; } @@ -417,11 +449,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LogoText(abi_arg_out value) noexcept override + HRESULT __stdcall get_LogoText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LogoText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogoText()); return S_OK; } catch (...) @@ -431,10 +464,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_LogoText(abi_arg_in value) noexcept override + HRESULT __stdcall put_LogoText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogoText(*reinterpret_cast(&value)); return S_OK; } @@ -444,11 +478,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_HeaderColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderColor()); return S_OK; } catch (...) @@ -457,10 +492,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_HeaderColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_HeaderColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderColor(*reinterpret_cast(&value)); return S_OK; } @@ -470,11 +506,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_BodyColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BodyColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BodyColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BodyColor()); return S_OK; } catch (...) @@ -483,10 +520,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_BodyColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_BodyColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BodyColor(*reinterpret_cast(&value)); return S_OK; } @@ -496,11 +534,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_HeaderFontColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderFontColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderFontColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderFontColor()); return S_OK; } catch (...) @@ -509,10 +548,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_HeaderFontColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_HeaderFontColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderFontColor(*reinterpret_cast(&value)); return S_OK; } @@ -522,11 +562,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_BodyFontColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BodyFontColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BodyFontColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BodyFontColor()); return S_OK; } catch (...) @@ -535,10 +576,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_BodyFontColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_BodyFontColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BodyFontColor(*reinterpret_cast(&value)); return S_OK; } @@ -548,11 +590,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_HeaderBackgroundImage(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderBackgroundImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderBackgroundImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderBackgroundImage()); return S_OK; } catch (...) @@ -562,10 +605,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_HeaderBackgroundImage(abi_arg_in value) noexcept override + HRESULT __stdcall put_HeaderBackgroundImage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderBackgroundImage(*reinterpret_cast(&value)); return S_OK; } @@ -575,11 +619,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_BodyBackgroundImage(abi_arg_out value) noexcept override + HRESULT __stdcall get_BodyBackgroundImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BodyBackgroundImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BodyBackgroundImage()); return S_OK; } catch (...) @@ -589,10 +634,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_BodyBackgroundImage(abi_arg_in value) noexcept override + HRESULT __stdcall put_BodyBackgroundImage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BodyBackgroundImage(*reinterpret_cast(&value)); return S_OK; } @@ -602,11 +648,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LogoImage(abi_arg_out value) noexcept override + HRESULT __stdcall get_LogoImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LogoImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogoImage()); return S_OK; } catch (...) @@ -616,10 +663,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_LogoImage(abi_arg_in value) noexcept override + HRESULT __stdcall put_LogoImage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogoImage(*reinterpret_cast(&value)); return S_OK; } @@ -629,11 +677,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PromotionalImage(abi_arg_out value) noexcept override + HRESULT __stdcall get_PromotionalImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PromotionalImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PromotionalImage()); return S_OK; } catch (...) @@ -643,10 +692,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_PromotionalImage(abi_arg_in value) noexcept override + HRESULT __stdcall put_PromotionalImage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PromotionalImage(*reinterpret_cast(&value)); return S_OK; } @@ -656,11 +706,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RelevantDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RelevantDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RelevantDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelevantDate()); return S_OK; } catch (...) @@ -670,10 +721,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RelevantDate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_RelevantDate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelevantDate(*reinterpret_cast *>(&value)); return S_OK; } @@ -683,11 +735,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RelevantDateDisplayMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelevantDateDisplayMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelevantDateDisplayMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelevantDateDisplayMessage()); return S_OK; } catch (...) @@ -697,10 +750,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_RelevantDateDisplayMessage(abi_arg_in value) noexcept override + HRESULT __stdcall put_RelevantDateDisplayMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelevantDateDisplayMessage(*reinterpret_cast(&value)); return S_OK; } @@ -710,11 +764,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TransactionHistory(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TransactionHistory(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransactionHistory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransactionHistory()); return S_OK; } catch (...) @@ -724,11 +779,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_RelevantLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RelevantLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RelevantLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelevantLocations()); return S_OK; } catch (...) @@ -742,7 +798,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsMoreTransactionHistoryLaunchable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMoreTransactionHistoryLaunchable()); return S_OK; } catch (...) @@ -755,6 +812,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IsMoreTransactionHistoryLaunchable(value); return S_OK; } @@ -764,11 +822,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayProperties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DisplayProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DisplayProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayProperties()); return S_OK; } catch (...) @@ -778,11 +837,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Verbs(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Verbs(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Verbs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Verbs()); return S_OK; } catch (...) @@ -796,11 +856,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -810,10 +871,11 @@ struct produce } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -823,11 +885,12 @@ struct produce } } - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -837,10 +900,11 @@ struct produce } } - HRESULT __stdcall put_Value(abi_arg_in value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return S_OK; } @@ -854,7 +918,8 @@ struct produce { try { - *value = detach(this->shim().AutoDetectLinks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoDetectLinks()); return S_OK; } catch (...) @@ -867,6 +932,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoDetectLinks(value); return S_OK; } @@ -880,7 +946,8 @@ struct produce { try { - *value = detach(this->shim().DetailViewPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetailViewPosition()); return S_OK; } catch (...) @@ -893,6 +960,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DetailViewPosition(value); return S_OK; } @@ -906,7 +974,8 @@ struct produce { try { - *value = detach(this->shim().SummaryViewPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SummaryViewPosition()); return S_OK; } catch (...) @@ -919,6 +988,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SummaryViewPosition(value); return S_OK; } @@ -932,11 +1002,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateWalletItemCustomProperty(abi_arg_in name, abi_arg_in value, abi_arg_out walletItemCustomProperty) noexcept override + HRESULT __stdcall abi_CreateWalletItemCustomProperty(impl::abi_arg_in name, impl::abi_arg_in value, impl::abi_arg_out walletItemCustomProperty) noexcept override { try { - *walletItemCustomProperty = detach(this->shim().CreateWalletItemCustomProperty(*reinterpret_cast(&name), *reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *walletItemCustomProperty = detach_abi(this->shim().CreateWalletItemCustomProperty(*reinterpret_cast(&name), *reinterpret_cast(&value))); return S_OK; } catch (...) @@ -950,11 +1021,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, abi_arg_in displayName, abi_arg_out walletItem) noexcept override + HRESULT __stdcall abi_CreateWalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, impl::abi_arg_in displayName, impl::abi_arg_out walletItem) noexcept override { try { - *walletItem = detach(this->shim().CreateWalletItem(kind, *reinterpret_cast(&displayName))); + typename D::abi_guard guard(this->shim()); + *walletItem = detach_abi(this->shim().CreateWalletItem(kind, *reinterpret_cast(&displayName))); return S_OK; } catch (...) @@ -968,11 +1040,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_AddAsync(abi_arg_in id, abi_arg_in item, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AddAsync(impl::abi_arg_in id, impl::abi_arg_in item, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AddAsync(*reinterpret_cast(&id), *reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AddAsync(*reinterpret_cast(&id), *reinterpret_cast(&item))); return S_OK; } catch (...) @@ -982,11 +1055,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ClearAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ClearAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ClearAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClearAsync()); return S_OK; } catch (...) @@ -996,11 +1070,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetWalletItemAsync(abi_arg_in id, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetWalletItemAsync(impl::abi_arg_in id, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetWalletItemAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetWalletItemAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1010,11 +1085,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetItemsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync()); return S_OK; } catch (...) @@ -1024,11 +1100,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetItemsWithKindAsync(Windows::ApplicationModel::Wallet::WalletItemKind kind, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsWithKindAsync(Windows::ApplicationModel::Wallet::WalletItemKind kind, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync(kind)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync(kind)); return S_OK; } catch (...) @@ -1038,11 +1115,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ImportItemAsync(abi_arg_in stream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ImportItemAsync(impl::abi_arg_in stream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ImportItemAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ImportItemAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -1052,11 +1130,12 @@ struct produce : produce } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_in id, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_in id, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1066,11 +1145,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ShowAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -1080,11 +1160,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ShowItemAsync(abi_arg_in id, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ShowItemAsync(impl::abi_arg_in id, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ShowAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1094,11 +1175,12 @@ struct produce : produce } } - HRESULT __stdcall abi_UpdateAsync(abi_arg_in item, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_UpdateAsync(impl::abi_arg_in item, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().UpdateAsync(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAsync(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -1112,11 +1194,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall add_ItemsChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ItemsChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ItemsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ItemsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1129,6 +1212,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemsChanged(cookie); return S_OK; } @@ -1142,11 +1226,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -1160,11 +1245,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1173,10 +1259,11 @@ struct produce : } } - HRESULT __stdcall put_Position(abi_arg_in value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -1186,11 +1273,12 @@ struct produce : } } - HRESULT __stdcall get_DisplayMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMessage()); return S_OK; } catch (...) @@ -1200,10 +1288,11 @@ struct produce : } } - HRESULT __stdcall put_DisplayMessage(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMessage(*reinterpret_cast(&value)); return S_OK; } @@ -1217,11 +1306,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1231,10 +1321,11 @@ struct produce : produ } } - HRESULT __stdcall put_Description(abi_arg_in value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -1244,11 +1335,12 @@ struct produce : produ } } - HRESULT __stdcall get_DisplayAmount(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayAmount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayAmount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayAmount()); return S_OK; } catch (...) @@ -1258,10 +1350,11 @@ struct produce : produ } } - HRESULT __stdcall put_DisplayAmount(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayAmount(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayAmount(*reinterpret_cast(&value)); return S_OK; } @@ -1275,7 +1368,8 @@ struct produce : produ { try { - *value = detach(this->shim().IgnoreTimeOfDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IgnoreTimeOfDay()); return S_OK; } catch (...) @@ -1288,6 +1382,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IgnoreTimeOfDay(value); return S_OK; } @@ -1297,11 +1392,12 @@ struct produce : produ } } - HRESULT __stdcall get_DisplayLocation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayLocation()); return S_OK; } catch (...) @@ -1311,10 +1407,11 @@ struct produce : produ } } - HRESULT __stdcall put_DisplayLocation(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayLocation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayLocation(*reinterpret_cast(&value)); return S_OK; } @@ -1324,11 +1421,12 @@ struct produce : produ } } - HRESULT __stdcall get_TransactionDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TransactionDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransactionDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransactionDate()); return S_OK; } catch (...) @@ -1338,10 +1436,11 @@ struct produce : produ } } - HRESULT __stdcall put_TransactionDate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_TransactionDate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransactionDate(*reinterpret_cast *>(&value)); return S_OK; } @@ -1355,7 +1454,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsLaunchable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLaunchable()); return S_OK; } catch (...) @@ -1368,6 +1468,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsLaunchable(value); return S_OK; } @@ -1381,11 +1482,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1395,10 +1497,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -1412,11 +1515,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateWalletVerb(abi_arg_in name, abi_arg_out WalletVerb) noexcept override + HRESULT __stdcall abi_CreateWalletVerb(impl::abi_arg_in name, impl::abi_arg_out WalletVerb) noexcept override { try { - *WalletVerb = detach(this->shim().CreateWalletVerb(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *WalletVerb = detach_abi(this->shim().CreateWalletVerb(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1434,640 +1538,640 @@ namespace Windows::ApplicationModel::Wallet { template Windows::ApplicationModel::Wallet::WalletBarcodeSymbology impl_IWalletBarcode::Symbology() const { Windows::ApplicationModel::Wallet::WalletBarcodeSymbology value {}; - check_hresult(static_cast(static_cast(*this))->get_Symbology(&value)); + check_hresult(WINRT_SHIM(IWalletBarcode)->get_Symbology(&value)); return value; } template hstring impl_IWalletBarcode::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IWalletBarcode)->get_Value(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IWalletBarcode::GetImageAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetImageAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletBarcode)->abi_GetImageAsync(put_abi(operation))); return operation; } template hstring impl_IWalletItemCustomProperty::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->get_Name(put_abi(value))); return value; } -template void impl_IWalletItemCustomProperty::Name(hstring_ref value) const +template void impl_IWalletItemCustomProperty::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->put_Name(get_abi(value))); } template hstring impl_IWalletItemCustomProperty::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->get_Value(put_abi(value))); return value; } -template void impl_IWalletItemCustomProperty::Value(hstring_ref value) const +template void impl_IWalletItemCustomProperty::Value(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->put_Value(get_abi(value))); } template bool impl_IWalletItemCustomProperty::AutoDetectLinks() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoDetectLinks(&value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->get_AutoDetectLinks(&value)); return value; } template void impl_IWalletItemCustomProperty::AutoDetectLinks(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoDetectLinks(value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->put_AutoDetectLinks(value)); } template Windows::ApplicationModel::Wallet::WalletDetailViewPosition impl_IWalletItemCustomProperty::DetailViewPosition() const { Windows::ApplicationModel::Wallet::WalletDetailViewPosition value {}; - check_hresult(static_cast(static_cast(*this))->get_DetailViewPosition(&value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->get_DetailViewPosition(&value)); return value; } template void impl_IWalletItemCustomProperty::DetailViewPosition(Windows::ApplicationModel::Wallet::WalletDetailViewPosition value) const { - check_hresult(static_cast(static_cast(*this))->put_DetailViewPosition(value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->put_DetailViewPosition(value)); } template Windows::ApplicationModel::Wallet::WalletSummaryViewPosition impl_IWalletItemCustomProperty::SummaryViewPosition() const { Windows::ApplicationModel::Wallet::WalletSummaryViewPosition value {}; - check_hresult(static_cast(static_cast(*this))->get_SummaryViewPosition(&value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->get_SummaryViewPosition(&value)); return value; } template void impl_IWalletItemCustomProperty::SummaryViewPosition(Windows::ApplicationModel::Wallet::WalletSummaryViewPosition value) const { - check_hresult(static_cast(static_cast(*this))->put_SummaryViewPosition(value)); + check_hresult(WINRT_SHIM(IWalletItemCustomProperty)->put_SummaryViewPosition(value)); } template hstring impl_IWalletVerb::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IWalletVerb)->get_Name(put_abi(value))); return value; } -template void impl_IWalletVerb::Name(hstring_ref value) const +template void impl_IWalletVerb::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IWalletVerb)->put_Name(get_abi(value))); } template hstring impl_IWalletItem::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_DisplayName(put_abi(value))); return value; } -template void impl_IWalletItem::DisplayName(hstring_ref value) const +template void impl_IWalletItem::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_DisplayName(get_abi(value))); } template hstring impl_IWalletItem::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Id(put_abi(value))); return value; } template bool impl_IWalletItem::IsAcknowledged() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAcknowledged(&value)); + check_hresult(WINRT_SHIM(IWalletItem)->get_IsAcknowledged(&value)); return value; } template void impl_IWalletItem::IsAcknowledged(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAcknowledged(value)); + check_hresult(WINRT_SHIM(IWalletItem)->put_IsAcknowledged(value)); } template hstring impl_IWalletItem::IssuerDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IssuerDisplayName(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_IssuerDisplayName(put_abi(value))); return value; } -template void impl_IWalletItem::IssuerDisplayName(hstring_ref value) const +template void impl_IWalletItem::IssuerDisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_IssuerDisplayName(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_IssuerDisplayName(get_abi(value))); } template Windows::Foundation::IReference impl_IWalletItem::LastUpdated() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_LastUpdated(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_LastUpdated(put_abi(value))); return value; } -template void impl_IWalletItem::LastUpdated(const Windows::Foundation::IReference & value) const +template void impl_IWalletItem::LastUpdated(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_LastUpdated(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_LastUpdated(get_abi(value))); } template Windows::ApplicationModel::Wallet::WalletItemKind impl_IWalletItem::Kind() const { Windows::ApplicationModel::Wallet::WalletItemKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IWalletItem)->get_Kind(&value)); return value; } template Windows::ApplicationModel::Wallet::WalletBarcode impl_IWalletItem::Barcode() const { Windows::ApplicationModel::Wallet::WalletBarcode value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Barcode(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Barcode(put_abi(value))); return value; } template void impl_IWalletItem::Barcode(const Windows::ApplicationModel::Wallet::WalletBarcode & value) const { - check_hresult(static_cast(static_cast(*this))->put_Barcode(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_Barcode(get_abi(value))); } template Windows::Foundation::IReference impl_IWalletItem::ExpirationDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_ExpirationDate(put_abi(value))); return value; } -template void impl_IWalletItem::ExpirationDate(const Windows::Foundation::IReference & value) const +template void impl_IWalletItem::ExpirationDate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationDate(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_ExpirationDate(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::Logo159x159() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Logo159x159(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Logo159x159(put_abi(value))); return value; } template void impl_IWalletItem::Logo159x159(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Logo159x159(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_Logo159x159(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::Logo336x336() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Logo336x336(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Logo336x336(put_abi(value))); return value; } template void impl_IWalletItem::Logo336x336(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Logo336x336(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_Logo336x336(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::Logo99x99() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Logo99x99(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Logo99x99(put_abi(value))); return value; } template void impl_IWalletItem::Logo99x99(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Logo99x99(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_Logo99x99(get_abi(value))); } template hstring impl_IWalletItem::DisplayMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayMessage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_DisplayMessage(put_abi(value))); return value; } -template void impl_IWalletItem::DisplayMessage(hstring_ref value) const +template void impl_IWalletItem::DisplayMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMessage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_DisplayMessage(get_abi(value))); } template bool impl_IWalletItem::IsDisplayMessageLaunchable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisplayMessageLaunchable(&value)); + check_hresult(WINRT_SHIM(IWalletItem)->get_IsDisplayMessageLaunchable(&value)); return value; } template void impl_IWalletItem::IsDisplayMessageLaunchable(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDisplayMessageLaunchable(value)); + check_hresult(WINRT_SHIM(IWalletItem)->put_IsDisplayMessageLaunchable(value)); } template hstring impl_IWalletItem::LogoText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LogoText(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_LogoText(put_abi(value))); return value; } -template void impl_IWalletItem::LogoText(hstring_ref value) const +template void impl_IWalletItem::LogoText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_LogoText(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_LogoText(get_abi(value))); } template Windows::UI::Color impl_IWalletItem::HeaderColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_HeaderColor(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_HeaderColor(put_abi(value))); return value; } template void impl_IWalletItem::HeaderColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderColor(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_HeaderColor(get_abi(value))); } template Windows::UI::Color impl_IWalletItem::BodyColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BodyColor(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_BodyColor(put_abi(value))); return value; } template void impl_IWalletItem::BodyColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BodyColor(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_BodyColor(get_abi(value))); } template Windows::UI::Color impl_IWalletItem::HeaderFontColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_HeaderFontColor(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_HeaderFontColor(put_abi(value))); return value; } template void impl_IWalletItem::HeaderFontColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderFontColor(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_HeaderFontColor(get_abi(value))); } template Windows::UI::Color impl_IWalletItem::BodyFontColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BodyFontColor(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_BodyFontColor(put_abi(value))); return value; } template void impl_IWalletItem::BodyFontColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BodyFontColor(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_BodyFontColor(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::HeaderBackgroundImage() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_HeaderBackgroundImage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_HeaderBackgroundImage(put_abi(value))); return value; } template void impl_IWalletItem::HeaderBackgroundImage(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderBackgroundImage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_HeaderBackgroundImage(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::BodyBackgroundImage() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_BodyBackgroundImage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_BodyBackgroundImage(put_abi(value))); return value; } template void impl_IWalletItem::BodyBackgroundImage(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_BodyBackgroundImage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_BodyBackgroundImage(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::LogoImage() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_LogoImage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_LogoImage(put_abi(value))); return value; } template void impl_IWalletItem::LogoImage(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_LogoImage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_LogoImage(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IWalletItem::PromotionalImage() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_PromotionalImage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_PromotionalImage(put_abi(value))); return value; } template void impl_IWalletItem::PromotionalImage(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_PromotionalImage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_PromotionalImage(get_abi(value))); } template Windows::Foundation::IReference impl_IWalletItem::RelevantDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RelevantDate(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_RelevantDate(put_abi(value))); return value; } -template void impl_IWalletItem::RelevantDate(const Windows::Foundation::IReference & value) const +template void impl_IWalletItem::RelevantDate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_RelevantDate(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_RelevantDate(get_abi(value))); } template hstring impl_IWalletItem::RelevantDateDisplayMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RelevantDateDisplayMessage(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_RelevantDateDisplayMessage(put_abi(value))); return value; } -template void impl_IWalletItem::RelevantDateDisplayMessage(hstring_ref value) const +template void impl_IWalletItem::RelevantDateDisplayMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RelevantDateDisplayMessage(get(value))); + check_hresult(WINRT_SHIM(IWalletItem)->put_RelevantDateDisplayMessage(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IWalletItem::TransactionHistory() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_TransactionHistory(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_TransactionHistory(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IWalletItem::RelevantLocations() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_RelevantLocations(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_RelevantLocations(put_abi(value))); return value; } template bool impl_IWalletItem::IsMoreTransactionHistoryLaunchable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMoreTransactionHistoryLaunchable(&value)); + check_hresult(WINRT_SHIM(IWalletItem)->get_IsMoreTransactionHistoryLaunchable(&value)); return value; } template void impl_IWalletItem::IsMoreTransactionHistoryLaunchable(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMoreTransactionHistoryLaunchable(value)); + check_hresult(WINRT_SHIM(IWalletItem)->put_IsMoreTransactionHistoryLaunchable(value)); } template Windows::Foundation::Collections::IMap impl_IWalletItem::DisplayProperties() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_DisplayProperties(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_DisplayProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IWalletItem::Verbs() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Verbs(put(value))); + check_hresult(WINRT_SHIM(IWalletItem)->get_Verbs(put_abi(value))); return value; } template hstring impl_IWalletTransaction::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_Description(put_abi(value))); return value; } -template void impl_IWalletTransaction::Description(hstring_ref value) const +template void impl_IWalletTransaction::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_Description(get_abi(value))); } template hstring impl_IWalletTransaction::DisplayAmount() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayAmount(put(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_DisplayAmount(put_abi(value))); return value; } -template void impl_IWalletTransaction::DisplayAmount(hstring_ref value) const +template void impl_IWalletTransaction::DisplayAmount(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayAmount(get(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_DisplayAmount(get_abi(value))); } template bool impl_IWalletTransaction::IgnoreTimeOfDay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IgnoreTimeOfDay(&value)); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_IgnoreTimeOfDay(&value)); return value; } template void impl_IWalletTransaction::IgnoreTimeOfDay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IgnoreTimeOfDay(value)); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_IgnoreTimeOfDay(value)); } template hstring impl_IWalletTransaction::DisplayLocation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayLocation(put(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_DisplayLocation(put_abi(value))); return value; } -template void impl_IWalletTransaction::DisplayLocation(hstring_ref value) const +template void impl_IWalletTransaction::DisplayLocation(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayLocation(get(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_DisplayLocation(get_abi(value))); } template Windows::Foundation::IReference impl_IWalletTransaction::TransactionDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_TransactionDate(put(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_TransactionDate(put_abi(value))); return value; } -template void impl_IWalletTransaction::TransactionDate(const Windows::Foundation::IReference & value) const +template void impl_IWalletTransaction::TransactionDate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransactionDate(get(value))); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_TransactionDate(get_abi(value))); } template bool impl_IWalletTransaction::IsLaunchable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLaunchable(&value)); + check_hresult(WINRT_SHIM(IWalletTransaction)->get_IsLaunchable(&value)); return value; } template void impl_IWalletTransaction::IsLaunchable(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsLaunchable(value)); + check_hresult(WINRT_SHIM(IWalletTransaction)->put_IsLaunchable(value)); } template Windows::Devices::Geolocation::BasicGeoposition impl_IWalletRelevantLocation::Position() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IWalletRelevantLocation)->get_Position(put_abi(value))); return value; } template void impl_IWalletRelevantLocation::Position(const Windows::Devices::Geolocation::BasicGeoposition & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IWalletRelevantLocation)->put_Position(get_abi(value))); } template hstring impl_IWalletRelevantLocation::DisplayMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayMessage(put(value))); + check_hresult(WINRT_SHIM(IWalletRelevantLocation)->get_DisplayMessage(put_abi(value))); return value; } -template void impl_IWalletRelevantLocation::DisplayMessage(hstring_ref value) const +template void impl_IWalletRelevantLocation::DisplayMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMessage(get(value))); + check_hresult(WINRT_SHIM(IWalletRelevantLocation)->put_DisplayMessage(get_abi(value))); } -template Windows::Foundation::IAsyncAction impl_IWalletItemStore::AddAsync(hstring_ref id, const Windows::ApplicationModel::Wallet::WalletItem & item) const +template Windows::Foundation::IAsyncAction impl_IWalletItemStore::AddAsync(hstring_view id, const Windows::ApplicationModel::Wallet::WalletItem & item) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AddAsync(get(id), get(item), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_AddAsync(get_abi(id), get_abi(item), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IWalletItemStore::ClearAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ClearAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_ClearAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IWalletItemStore::GetWalletItemAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IWalletItemStore::GetWalletItemAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetWalletItemAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_GetWalletItemAsync(get_abi(id), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IWalletItemStore::GetItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_GetItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IWalletItemStore::GetItemsAsync(Windows::ApplicationModel::Wallet::WalletItemKind kind) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsWithKindAsync(kind, put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_GetItemsWithKindAsync(kind, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IWalletItemStore::ImportItemAsync(const Windows::Storage::Streams::IRandomAccessStreamReference & stream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ImportItemAsync(get(stream), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_ImportItemAsync(get_abi(stream), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IWalletItemStore::DeleteAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IWalletItemStore::DeleteAsync(hstring_view id) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_DeleteAsync(get_abi(id), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IWalletItemStore::ShowAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_ShowAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IWalletItemStore::ShowAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IWalletItemStore::ShowAsync(hstring_view id) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowItemAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_ShowItemAsync(get_abi(id), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IWalletItemStore::UpdateAsync(const Windows::ApplicationModel::Wallet::WalletItem & item) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAsync(get(item), put(operation))); + check_hresult(WINRT_SHIM(IWalletItemStore)->abi_UpdateAsync(get_abi(item), put_abi(operation))); return operation; } -template event_token impl_IWalletItemStore2::ItemsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWalletItemStore2::ItemsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ItemsChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IWalletItemStore2)->add_ItemsChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IWalletItemStore2::ItemsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWalletItemStore2::ItemsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::ApplicationModel::Wallet::IWalletItemStore2::remove_ItemsChanged, ItemsChanged(handler)); } template void impl_IWalletItemStore2::ItemsChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemsChanged(cookie)); + check_hresult(WINRT_SHIM(IWalletItemStore2)->remove_ItemsChanged(cookie)); } template Windows::Foundation::IAsyncOperation impl_IWalletManagerStatics::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(operation))); + check_hresult(WINRT_SHIM(IWalletManagerStatics)->abi_RequestStoreAsync(put_abi(operation))); return operation; } -template Windows::ApplicationModel::Wallet::WalletItemCustomProperty impl_IWalletItemCustomPropertyFactory::CreateWalletItemCustomProperty(hstring_ref name, hstring_ref value) const +template Windows::ApplicationModel::Wallet::WalletItemCustomProperty impl_IWalletItemCustomPropertyFactory::CreateWalletItemCustomProperty(hstring_view name, hstring_view value) const { Windows::ApplicationModel::Wallet::WalletItemCustomProperty walletItemCustomProperty { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWalletItemCustomProperty(get(name), get(value), put(walletItemCustomProperty))); + check_hresult(WINRT_SHIM(IWalletItemCustomPropertyFactory)->abi_CreateWalletItemCustomProperty(get_abi(name), get_abi(value), put_abi(walletItemCustomProperty))); return walletItemCustomProperty; } -template Windows::ApplicationModel::Wallet::WalletVerb impl_IWalletVerbFactory::CreateWalletVerb(hstring_ref name) const +template Windows::ApplicationModel::Wallet::WalletVerb impl_IWalletVerbFactory::CreateWalletVerb(hstring_view name) const { Windows::ApplicationModel::Wallet::WalletVerb WalletVerb { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWalletVerb(get(name), put(WalletVerb))); + check_hresult(WINRT_SHIM(IWalletVerbFactory)->abi_CreateWalletVerb(get_abi(name), put_abi(WalletVerb))); return WalletVerb; } -template Windows::ApplicationModel::Wallet::WalletItem impl_IWalletItemFactory::CreateWalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, hstring_ref displayName) const +template Windows::ApplicationModel::Wallet::WalletItem impl_IWalletItemFactory::CreateWalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, hstring_view displayName) const { Windows::ApplicationModel::Wallet::WalletItem walletItem { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWalletItem(kind, get(displayName), put(walletItem))); + check_hresult(WINRT_SHIM(IWalletItemFactory)->abi_CreateWalletItem(kind, get_abi(displayName), put_abi(walletItem))); return walletItem; } -template Windows::ApplicationModel::Wallet::WalletBarcode impl_IWalletBarcodeFactory::CreateWalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, hstring_ref value) const +template Windows::ApplicationModel::Wallet::WalletBarcode impl_IWalletBarcodeFactory::CreateWalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, hstring_view value) const { Windows::ApplicationModel::Wallet::WalletBarcode barcode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWalletBarcode(symbology, get(value), put(barcode))); + check_hresult(WINRT_SHIM(IWalletBarcodeFactory)->abi_CreateWalletBarcode(symbology, get_abi(value), put_abi(barcode))); return barcode; } template Windows::ApplicationModel::Wallet::WalletBarcode impl_IWalletBarcodeFactory::CreateCustomWalletBarcode(const Windows::Storage::Streams::IRandomAccessStreamReference & streamToBarcodeImage) const { Windows::ApplicationModel::Wallet::WalletBarcode barcode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCustomWalletBarcode(get(streamToBarcodeImage), put(barcode))); + check_hresult(WINRT_SHIM(IWalletBarcodeFactory)->abi_CreateCustomWalletBarcode(get_abi(streamToBarcodeImage), put_abi(barcode))); return barcode; } -inline WalletBarcode::WalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, hstring_ref value) : +inline WalletBarcode::WalletBarcode(Windows::ApplicationModel::Wallet::WalletBarcodeSymbology symbology, hstring_view value) : WalletBarcode(get_activation_factory().CreateWalletBarcode(symbology, value)) {} @@ -2075,11 +2179,11 @@ inline WalletBarcode::WalletBarcode(const Windows::Storage::Streams::IRandomAcce WalletBarcode(get_activation_factory().CreateCustomWalletBarcode(streamToBarcodeImage)) {} -inline WalletItem::WalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, hstring_ref displayName) : +inline WalletItem::WalletItem(Windows::ApplicationModel::Wallet::WalletItemKind kind, hstring_view displayName) : WalletItem(get_activation_factory().CreateWalletItem(kind, displayName)) {} -inline WalletItemCustomProperty::WalletItemCustomProperty(hstring_ref name, hstring_ref value) : +inline WalletItemCustomProperty::WalletItemCustomProperty(hstring_view name, hstring_view value) : WalletItemCustomProperty(get_activation_factory().CreateWalletItemCustomProperty(name, value)) {} @@ -2096,10 +2200,192 @@ inline WalletTransaction::WalletTransaction() : WalletTransaction(activate_instance()) {} -inline WalletVerb::WalletVerb(hstring_ref name) : +inline WalletVerb::WalletVerb(hstring_view name) : WalletVerb(get_activation_factory().CreateWalletVerb(name)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletBarcode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletBarcodeFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItemCustomProperty & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItemCustomPropertyFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItemFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItemStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletItemStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletRelevantLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletVerb & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::IWalletVerbFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletBarcode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletItemCustomProperty & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletItemStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletRelevantLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Wallet::WalletVerb & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.ApplicationModel.h b/10.0.14393.0/winrt/Windows.ApplicationModel.h index bbda18c74..4c8ced57f 100644 --- a/10.0.14393.0/winrt/Windows.ApplicationModel.h +++ b/10.0.14393.0/winrt/Windows.ApplicationModel.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.System.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce_base size, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLogo(impl::abi_arg_in size, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLogo(*reinterpret_cast(&size))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLogo(*reinterpret_cast(&size))); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -77,11 +84,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AppUserModelId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppUserModelId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppUserModelId()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayInfo()); return S_OK; } catch (...) @@ -105,11 +114,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageFamilyName()); return S_OK; } catch (...) @@ -127,6 +137,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowInstalledApplicationsUI(); return S_OK; } @@ -144,7 +155,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().DesignModeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesignModeEnabled()); return S_OK; } catch (...) @@ -157,11 +169,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -175,11 +188,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_LaunchFullTrustProcessForCurrentAppAsync(abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_LaunchFullTrustProcessForCurrentAppAsync(impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().LaunchFullTrustProcessForCurrentAppAsync()); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().LaunchFullTrustProcessForCurrentAppAsync()); return S_OK; } catch (...) @@ -189,11 +203,12 @@ struct produce : } } - HRESULT __stdcall abi_LaunchFullTrustProcessForCurrentAppWithParametersAsync(abi_arg_in parameterGroupId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_LaunchFullTrustProcessForCurrentAppWithParametersAsync(impl::abi_arg_in parameterGroupId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().LaunchFullTrustProcessForCurrentAppAsync(*reinterpret_cast(¶meterGroupId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().LaunchFullTrustProcessForCurrentAppAsync(*reinterpret_cast(¶meterGroupId))); return S_OK; } catch (...) @@ -203,11 +218,12 @@ struct produce : } } - HRESULT __stdcall abi_LaunchFullTrustProcessForAppAsync(abi_arg_in fullTrustPackageRelativeAppId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_LaunchFullTrustProcessForAppAsync(impl::abi_arg_in fullTrustPackageRelativeAppId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().LaunchFullTrustProcessForAppAsync(*reinterpret_cast(&fullTrustPackageRelativeAppId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().LaunchFullTrustProcessForAppAsync(*reinterpret_cast(&fullTrustPackageRelativeAppId))); return S_OK; } catch (...) @@ -217,11 +233,12 @@ struct produce : } } - HRESULT __stdcall abi_LaunchFullTrustProcessForAppWithParametersAsync(abi_arg_in fullTrustPackageRelativeAppId, abi_arg_in parameterGroupId, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_LaunchFullTrustProcessForAppWithParametersAsync(impl::abi_arg_in fullTrustPackageRelativeAppId, impl::abi_arg_in parameterGroupId, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().LaunchFullTrustProcessForAppAsync(*reinterpret_cast(&fullTrustPackageRelativeAppId), *reinterpret_cast(¶meterGroupId))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().LaunchFullTrustProcessForAppAsync(*reinterpret_cast(&fullTrustPackageRelativeAppId), *reinterpret_cast(¶meterGroupId))); return S_OK; } catch (...) @@ -235,11 +252,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -253,11 +271,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -267,11 +286,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InstalledLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstalledLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstalledLocation()); return S_OK; } catch (...) @@ -285,7 +305,8 @@ struct produce : produce_baseshim().IsFramework()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFramework()); return S_OK; } catch (...) @@ -294,11 +315,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Dependencies(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Dependencies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dependencies()); return S_OK; } catch (...) @@ -312,11 +334,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -326,11 +349,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PublisherDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublisherDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublisherDisplayName()); return S_OK; } catch (...) @@ -340,11 +364,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -354,11 +379,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo()); return S_OK; } catch (...) @@ -372,7 +398,8 @@ struct produce : produce_baseshim().IsResourcePackage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResourcePackage()); return S_OK; } catch (...) @@ -385,7 +412,8 @@ struct produce : produce_baseshim().IsBundle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBundle()); return S_OK; } catch (...) @@ -398,7 +426,8 @@ struct produce : produce_baseshim().IsDevelopmentMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDevelopmentMode()); return S_OK; } catch (...) @@ -411,11 +440,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Status(abi_arg_out value) noexcept override + HRESULT __stdcall get_Status(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -425,11 +455,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InstalledDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstalledDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstalledDate()); return S_OK; } catch (...) @@ -438,11 +469,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_GetAppListEntriesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetAppListEntriesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAppListEntriesAsync()); return S_OK; } catch (...) @@ -460,7 +492,8 @@ struct produce : produce_baseshim().SignatureKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignatureKind()); return S_OK; } catch (...) @@ -473,7 +506,8 @@ struct produce : produce_baseshim().IsOptional()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOptional()); return S_OK; } catch (...) @@ -482,11 +516,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_VerifyContentIntegrityAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().VerifyContentIntegrityAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().VerifyContentIntegrityAsync()); return S_OK; } catch (...) @@ -500,11 +535,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_PackageStaging(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageStaging(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageStaging(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageStaging(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -517,6 +553,7 @@ struct produce : produce_baseshim()); this->shim().PackageStaging(token); return S_OK; } @@ -526,11 +563,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageInstalling(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageInstalling(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageInstalling(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -543,6 +581,7 @@ struct produce : produce_baseshim()); this->shim().PackageInstalling(token); return S_OK; } @@ -552,11 +591,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageUpdating(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageUpdating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageUpdating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -569,6 +609,7 @@ struct produce : produce_baseshim()); this->shim().PackageUpdating(token); return S_OK; } @@ -578,11 +619,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageUninstalling(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageUninstalling(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageUninstalling(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -595,6 +637,7 @@ struct produce : produce_baseshim()); this->shim().PackageUninstalling(token); return S_OK; } @@ -604,11 +647,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PackageStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PackageStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PackageStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -621,6 +665,7 @@ struct produce : produce_baseshim()); this->shim().PackageStatusChanged(token); return S_OK; } @@ -634,11 +679,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OpenForCurrentPackage(abi_arg_out value) noexcept override + HRESULT __stdcall abi_OpenForCurrentPackage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenForCurrentPackage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenForCurrentPackage()); return S_OK; } catch (...) @@ -648,11 +694,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_OpenForCurrentUser(abi_arg_out value) noexcept override + HRESULT __stdcall abi_OpenForCurrentUser(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenForCurrentUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenForCurrentUser()); return S_OK; } catch (...) @@ -666,11 +713,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -680,11 +728,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Version(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Version()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Version()); return S_OK; } catch (...) @@ -697,7 +746,8 @@ struct produce : produce_baseshim().Architecture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Architecture()); return S_OK; } catch (...) @@ -706,11 +756,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ResourceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResourceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceId()); return S_OK; } catch (...) @@ -720,11 +771,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Publisher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Publisher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Publisher()); return S_OK; } catch (...) @@ -734,11 +786,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PublisherId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublisherId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublisherId()); return S_OK; } catch (...) @@ -748,11 +801,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FullName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullName()); return S_OK; } catch (...) @@ -762,11 +816,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FamilyName()); return S_OK; } catch (...) @@ -780,11 +835,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -794,11 +850,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -816,7 +873,8 @@ struct produce : prod { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -825,11 +883,12 @@ struct produce : prod } } - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -843,7 +902,8 @@ struct produce : prod { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -856,7 +916,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsComplete()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsComplete()); return S_OK; } catch (...) @@ -869,7 +930,8 @@ struct produce : prod { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -886,7 +948,8 @@ struct produce : produce { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -895,11 +958,12 @@ struct produce : produce } } - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -913,7 +977,8 @@ struct produce : produce { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -926,7 +991,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsComplete()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsComplete()); return S_OK; } catch (...) @@ -939,7 +1005,8 @@ struct produce : produce { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -952,11 +1019,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -974,7 +1042,8 @@ struct produce : produce_baseshim().VerifyIsOK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerifyIsOK()); return S_OK; } catch (...) @@ -987,7 +1056,8 @@ struct produce : produce_baseshim().NotAvailable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotAvailable()); return S_OK; } catch (...) @@ -1000,7 +1070,8 @@ struct produce : produce_baseshim().PackageOffline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageOffline()); return S_OK; } catch (...) @@ -1013,7 +1084,8 @@ struct produce : produce_baseshim().DataOffline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataOffline()); return S_OK; } catch (...) @@ -1026,7 +1098,8 @@ struct produce : produce_baseshim().Disabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Disabled()); return S_OK; } catch (...) @@ -1039,7 +1112,8 @@ struct produce : produce_baseshim().NeedsRemediation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NeedsRemediation()); return S_OK; } catch (...) @@ -1052,7 +1126,8 @@ struct produce : produce_baseshim().LicenseIssue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseIssue()); return S_OK; } catch (...) @@ -1065,7 +1140,8 @@ struct produce : produce_baseshim().Modified()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Modified()); return S_OK; } catch (...) @@ -1078,7 +1154,8 @@ struct produce : produce_baseshim().Tampered()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tampered()); return S_OK; } catch (...) @@ -1091,7 +1168,8 @@ struct produce : produce_baseshim().DependencyIssue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DependencyIssue()); return S_OK; } catch (...) @@ -1104,7 +1182,8 @@ struct produce : produce_baseshim().Servicing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Servicing()); return S_OK; } catch (...) @@ -1117,7 +1196,8 @@ struct produce : produce_baseshim().DeploymentInProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeploymentInProgress()); return S_OK; } catch (...) @@ -1130,11 +1210,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -1152,7 +1233,8 @@ struct produce : pr { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -1161,11 +1243,12 @@ struct produce : pr } } - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -1179,7 +1262,8 @@ struct produce : pr { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -1192,7 +1276,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsComplete()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsComplete()); return S_OK; } catch (...) @@ -1205,7 +1290,8 @@ struct produce : pr { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -1222,7 +1308,8 @@ struct produce : produc { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -1231,11 +1318,12 @@ struct produce : produc } } - HRESULT __stdcall get_SourcePackage(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourcePackage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePackage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePackage()); return S_OK; } catch (...) @@ -1245,11 +1333,12 @@ struct produce : produc } } - HRESULT __stdcall get_TargetPackage(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetPackage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetPackage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetPackage()); return S_OK; } catch (...) @@ -1263,7 +1352,8 @@ struct produce : produc { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -1276,7 +1366,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsComplete()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsComplete()); return S_OK; } catch (...) @@ -1289,7 +1380,8 @@ struct produce : produc { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -1302,11 +1394,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_InstallDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_InstallDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstallDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallDate()); return S_OK; } catch (...) @@ -1315,11 +1408,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetThumbnailToken(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetThumbnailToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetThumbnailToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetThumbnailToken()); return S_OK; } catch (...) @@ -1329,10 +1423,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_Launch(abi_arg_in parameters) noexcept override + HRESULT __stdcall abi_Launch(impl::abi_arg_in parameters) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Launch(*reinterpret_cast(¶meters)); return S_OK; } @@ -1346,11 +1441,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_RequestEnableAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestEnableAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestEnableAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestEnableAsync()); return S_OK; } catch (...) @@ -1364,6 +1460,7 @@ struct produce : produce_baseshim()); this->shim().Disable(); return S_OK; } @@ -1377,7 +1474,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1386,11 +1484,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TaskId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TaskId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaskId()); return S_OK; } catch (...) @@ -1404,11 +1503,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentPackageAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetForCurrentPackageAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetForCurrentPackageAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetForCurrentPackageAsync()); return S_OK; } catch (...) @@ -1418,11 +1518,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetAsync(abi_arg_in taskId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAsync(impl::abi_arg_in taskId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAsync(*reinterpret_cast(&taskId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAsync(*reinterpret_cast(&taskId))); return S_OK; } catch (...) @@ -1440,6 +1541,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1453,11 +1555,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_SuspendingOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_SuspendingOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuspendingOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuspendingOperation()); return S_OK; } catch (...) @@ -1471,11 +1574,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1485,11 +1589,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -1506,549 +1611,549 @@ namespace Windows::ApplicationModel { template hstring impl_IAppDisplayInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IAppDisplayInfo)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IAppDisplayInfo::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IAppDisplayInfo)->get_Description(put_abi(value))); return value; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IAppDisplayInfo::GetLogo(const Windows::Foundation::Size & size) const { Windows::Storage::Streams::RandomAccessStreamReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLogo(get(size), put(value))); + check_hresult(WINRT_SHIM(IAppDisplayInfo)->abi_GetLogo(get_abi(size), put_abi(value))); return value; } template hstring impl_IAppInfo::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IAppInfo)->get_Id(put_abi(value))); return value; } template hstring impl_IAppInfo::AppUserModelId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppUserModelId(put(value))); + check_hresult(WINRT_SHIM(IAppInfo)->get_AppUserModelId(put_abi(value))); return value; } template Windows::ApplicationModel::AppDisplayInfo impl_IAppInfo::DisplayInfo() const { Windows::ApplicationModel::AppDisplayInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayInfo(put(value))); + check_hresult(WINRT_SHIM(IAppInfo)->get_DisplayInfo(put_abi(value))); return value; } template hstring impl_IAppInfo::PackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IAppInfo)->get_PackageFamilyName(put_abi(value))); return value; } template void impl_ISuspendingDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ISuspendingDeferral)->abi_Complete()); } template Windows::ApplicationModel::SuspendingDeferral impl_ISuspendingOperation::GetDeferral() const { Windows::ApplicationModel::SuspendingDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(ISuspendingOperation)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Foundation::DateTime impl_ISuspendingOperation::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(ISuspendingOperation)->get_Deadline(put_abi(value))); return value; } template Windows::ApplicationModel::SuspendingOperation impl_ISuspendingEventArgs::SuspendingOperation() const { Windows::ApplicationModel::SuspendingOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuspendingOperation(put(value))); + check_hresult(WINRT_SHIM(ISuspendingEventArgs)->get_SuspendingOperation(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_ILeavingBackgroundEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ILeavingBackgroundEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IEnteredBackgroundEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IEnteredBackgroundEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template hstring impl_IPackageIdWithMetadata::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IPackageIdWithMetadata)->get_ProductId(put_abi(value))); return value; } template hstring impl_IPackageIdWithMetadata::Author() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(IPackageIdWithMetadata)->get_Author(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPackageWithMetadata::InstallDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallDate(put(value))); + check_hresult(WINRT_SHIM(IPackageWithMetadata)->get_InstallDate(put_abi(value))); return value; } template hstring impl_IPackageWithMetadata::GetThumbnailToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailToken(put(value))); + check_hresult(WINRT_SHIM(IPackageWithMetadata)->abi_GetThumbnailToken(put_abi(value))); return value; } -template void impl_IPackageWithMetadata::Launch(hstring_ref parameters) const +template void impl_IPackageWithMetadata::Launch(hstring_view parameters) const { - check_hresult(static_cast(static_cast(*this))->abi_Launch(get(parameters))); + check_hresult(WINRT_SHIM(IPackageWithMetadata)->abi_Launch(get_abi(parameters))); } template bool impl_IPackageStatus::VerifyIsOK() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_VerifyIsOK(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->abi_VerifyIsOK(&value)); return value; } template bool impl_IPackageStatus::NotAvailable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NotAvailable(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_NotAvailable(&value)); return value; } template bool impl_IPackageStatus::PackageOffline() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PackageOffline(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_PackageOffline(&value)); return value; } template bool impl_IPackageStatus::DataOffline() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DataOffline(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_DataOffline(&value)); return value; } template bool impl_IPackageStatus::Disabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Disabled(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_Disabled(&value)); return value; } template bool impl_IPackageStatus::NeedsRemediation() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NeedsRemediation(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_NeedsRemediation(&value)); return value; } template bool impl_IPackageStatus::LicenseIssue() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LicenseIssue(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_LicenseIssue(&value)); return value; } template bool impl_IPackageStatus::Modified() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Modified(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_Modified(&value)); return value; } template bool impl_IPackageStatus::Tampered() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Tampered(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_Tampered(&value)); return value; } template bool impl_IPackageStatus::DependencyIssue() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DependencyIssue(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_DependencyIssue(&value)); return value; } template bool impl_IPackageStatus::Servicing() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Servicing(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_Servicing(&value)); return value; } template bool impl_IPackageStatus::DeploymentInProgress() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DeploymentInProgress(&value)); + check_hresult(WINRT_SHIM(IPackageStatus)->get_DeploymentInProgress(&value)); return value; } template hstring impl_IPackageId::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_Name(put_abi(value))); return value; } template Windows::ApplicationModel::PackageVersion impl_IPackageId::Version() const { Windows::ApplicationModel::PackageVersion value {}; - check_hresult(static_cast(static_cast(*this))->get_Version(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_Version(put_abi(value))); return value; } template Windows::System::ProcessorArchitecture impl_IPackageId::Architecture() const { Windows::System::ProcessorArchitecture value {}; - check_hresult(static_cast(static_cast(*this))->get_Architecture(&value)); + check_hresult(WINRT_SHIM(IPackageId)->get_Architecture(&value)); return value; } template hstring impl_IPackageId::ResourceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResourceId(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_ResourceId(put_abi(value))); return value; } template hstring impl_IPackageId::Publisher() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Publisher(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_Publisher(put_abi(value))); return value; } template hstring impl_IPackageId::PublisherId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PublisherId(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_PublisherId(put_abi(value))); return value; } template hstring impl_IPackageId::FullName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FullName(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_FullName(put_abi(value))); return value; } template hstring impl_IPackageId::FamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FamilyName(put(value))); + check_hresult(WINRT_SHIM(IPackageId)->get_FamilyName(put_abi(value))); return value; } template Windows::ApplicationModel::PackageId impl_IPackage::Id() const { Windows::ApplicationModel::PackageId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPackage)->get_Id(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IPackage::InstalledLocation() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InstalledLocation(put(value))); + check_hresult(WINRT_SHIM(IPackage)->get_InstalledLocation(put_abi(value))); return value; } template bool impl_IPackage::IsFramework() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFramework(&value)); + check_hresult(WINRT_SHIM(IPackage)->get_IsFramework(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IPackage::Dependencies() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Dependencies(put(value))); + check_hresult(WINRT_SHIM(IPackage)->get_Dependencies(put_abi(value))); return value; } template hstring impl_IPackage2::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPackage2)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPackage2::PublisherDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PublisherDisplayName(put(value))); + check_hresult(WINRT_SHIM(IPackage2)->get_PublisherDisplayName(put_abi(value))); return value; } template hstring impl_IPackage2::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IPackage2)->get_Description(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IPackage2::Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Logo(put(value))); + check_hresult(WINRT_SHIM(IPackage2)->get_Logo(put_abi(value))); return value; } template bool impl_IPackage2::IsResourcePackage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsResourcePackage(&value)); + check_hresult(WINRT_SHIM(IPackage2)->get_IsResourcePackage(&value)); return value; } template bool impl_IPackage2::IsBundle() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBundle(&value)); + check_hresult(WINRT_SHIM(IPackage2)->get_IsBundle(&value)); return value; } template bool impl_IPackage2::IsDevelopmentMode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDevelopmentMode(&value)); + check_hresult(WINRT_SHIM(IPackage2)->get_IsDevelopmentMode(&value)); return value; } template Windows::ApplicationModel::PackageStatus impl_IPackage3::Status() const { Windows::ApplicationModel::PackageStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Status(put(value))); + check_hresult(WINRT_SHIM(IPackage3)->get_Status(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPackage3::InstalledDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_InstalledDate(put(value))); + check_hresult(WINRT_SHIM(IPackage3)->get_InstalledDate(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IPackage3::GetAppListEntriesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppListEntriesAsync(put(operation))); + check_hresult(WINRT_SHIM(IPackage3)->abi_GetAppListEntriesAsync(put_abi(operation))); return operation; } template Windows::ApplicationModel::PackageSignatureKind impl_IPackage4::SignatureKind() const { Windows::ApplicationModel::PackageSignatureKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SignatureKind(&value)); + check_hresult(WINRT_SHIM(IPackage4)->get_SignatureKind(&value)); return value; } template bool impl_IPackage4::IsOptional() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOptional(&value)); + check_hresult(WINRT_SHIM(IPackage4)->get_IsOptional(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IPackage4::VerifyContentIntegrityAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_VerifyContentIntegrityAsync(put(operation))); + check_hresult(WINRT_SHIM(IPackage4)->abi_VerifyContentIntegrityAsync(put_abi(operation))); return operation; } template Windows::ApplicationModel::Package impl_IPackageStatics::Current() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IPackageStatics)->get_Current(put_abi(value))); return value; } template GUID impl_IPackageStagingEventArgs::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(IPackageStagingEventArgs)->get_ActivityId(&value)); return value; } template Windows::ApplicationModel::Package impl_IPackageStagingEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IPackageStagingEventArgs)->get_Package(put_abi(value))); return value; } template double impl_IPackageStagingEventArgs::Progress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IPackageStagingEventArgs)->get_Progress(&value)); return value; } template bool impl_IPackageStagingEventArgs::IsComplete() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsComplete(&value)); + check_hresult(WINRT_SHIM(IPackageStagingEventArgs)->get_IsComplete(&value)); return value; } template HRESULT impl_IPackageStagingEventArgs::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IPackageStagingEventArgs)->get_ErrorCode(&value)); return value; } template GUID impl_IPackageInstallingEventArgs::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(IPackageInstallingEventArgs)->get_ActivityId(&value)); return value; } template Windows::ApplicationModel::Package impl_IPackageInstallingEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IPackageInstallingEventArgs)->get_Package(put_abi(value))); return value; } template double impl_IPackageInstallingEventArgs::Progress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IPackageInstallingEventArgs)->get_Progress(&value)); return value; } template bool impl_IPackageInstallingEventArgs::IsComplete() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsComplete(&value)); + check_hresult(WINRT_SHIM(IPackageInstallingEventArgs)->get_IsComplete(&value)); return value; } template HRESULT impl_IPackageInstallingEventArgs::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IPackageInstallingEventArgs)->get_ErrorCode(&value)); return value; } template GUID impl_IPackageUpdatingEventArgs::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_ActivityId(&value)); return value; } template Windows::ApplicationModel::Package impl_IPackageUpdatingEventArgs::SourcePackage() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourcePackage(put(value))); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_SourcePackage(put_abi(value))); return value; } template Windows::ApplicationModel::Package impl_IPackageUpdatingEventArgs::TargetPackage() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetPackage(put(value))); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_TargetPackage(put_abi(value))); return value; } template double impl_IPackageUpdatingEventArgs::Progress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_Progress(&value)); return value; } template bool impl_IPackageUpdatingEventArgs::IsComplete() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsComplete(&value)); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_IsComplete(&value)); return value; } template HRESULT impl_IPackageUpdatingEventArgs::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IPackageUpdatingEventArgs)->get_ErrorCode(&value)); return value; } template GUID impl_IPackageUninstallingEventArgs::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(IPackageUninstallingEventArgs)->get_ActivityId(&value)); return value; } template Windows::ApplicationModel::Package impl_IPackageUninstallingEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IPackageUninstallingEventArgs)->get_Package(put_abi(value))); return value; } template double impl_IPackageUninstallingEventArgs::Progress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(&value)); + check_hresult(WINRT_SHIM(IPackageUninstallingEventArgs)->get_Progress(&value)); return value; } template bool impl_IPackageUninstallingEventArgs::IsComplete() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsComplete(&value)); + check_hresult(WINRT_SHIM(IPackageUninstallingEventArgs)->get_IsComplete(&value)); return value; } template HRESULT impl_IPackageUninstallingEventArgs::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IPackageUninstallingEventArgs)->get_ErrorCode(&value)); return value; } template Windows::ApplicationModel::Package impl_IPackageStatusChangedEventArgs::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IPackageStatusChangedEventArgs)->get_Package(put_abi(value))); return value; } template event_token impl_IPackageCatalog::PackageStaging(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageStaging(get(handler), &token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->add_PackageStaging(get_abi(handler), &token)); return token; } @@ -2059,13 +2164,13 @@ template event_revoker impl_IPackageCatalog::Pa template void impl_IPackageCatalog::PackageStaging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageStaging(token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->remove_PackageStaging(token)); } template event_token impl_IPackageCatalog::PackageInstalling(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageInstalling(get(handler), &token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->add_PackageInstalling(get_abi(handler), &token)); return token; } @@ -2076,13 +2181,13 @@ template event_revoker impl_IPackageCatalog::Pa template void impl_IPackageCatalog::PackageInstalling(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageInstalling(token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->remove_PackageInstalling(token)); } template event_token impl_IPackageCatalog::PackageUpdating(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageUpdating(get(handler), &token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->add_PackageUpdating(get_abi(handler), &token)); return token; } @@ -2093,13 +2198,13 @@ template event_revoker impl_IPackageCatalog::Pa template void impl_IPackageCatalog::PackageUpdating(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageUpdating(token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->remove_PackageUpdating(token)); } template event_token impl_IPackageCatalog::PackageUninstalling(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageUninstalling(get(handler), &token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->add_PackageUninstalling(get_abi(handler), &token)); return token; } @@ -2110,13 +2215,13 @@ template event_revoker impl_IPackageCatalog::Pa template void impl_IPackageCatalog::PackageUninstalling(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageUninstalling(token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->remove_PackageUninstalling(token)); } template event_token impl_IPackageCatalog::PackageStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PackageStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->add_PackageStatusChanged(get_abi(handler), &token)); return token; } @@ -2127,101 +2232,101 @@ template event_revoker impl_IPackageCatalog::Pa template void impl_IPackageCatalog::PackageStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PackageStatusChanged(token)); + check_hresult(WINRT_SHIM(IPackageCatalog)->remove_PackageStatusChanged(token)); } template Windows::ApplicationModel::PackageCatalog impl_IPackageCatalogStatics::OpenForCurrentPackage() const { Windows::ApplicationModel::PackageCatalog value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenForCurrentPackage(put(value))); + check_hresult(WINRT_SHIM(IPackageCatalogStatics)->abi_OpenForCurrentPackage(put_abi(value))); return value; } template Windows::ApplicationModel::PackageCatalog impl_IPackageCatalogStatics::OpenForCurrentUser() const { Windows::ApplicationModel::PackageCatalog value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenForCurrentUser(put(value))); + check_hresult(WINRT_SHIM(IPackageCatalogStatics)->abi_OpenForCurrentUser(put_abi(value))); return value; } template bool impl_IDesignModeStatics::DesignModeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DesignModeEnabled(&value)); + check_hresult(WINRT_SHIM(IDesignModeStatics)->get_DesignModeEnabled(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForCurrentAppAsync() const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFullTrustProcessForCurrentAppAsync(put(asyncAction))); + check_hresult(WINRT_SHIM(IFullTrustProcessLauncherStatics)->abi_LaunchFullTrustProcessForCurrentAppAsync(put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForCurrentAppAsync(hstring_ref parameterGroupId) const +template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForCurrentAppAsync(hstring_view parameterGroupId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFullTrustProcessForCurrentAppWithParametersAsync(get(parameterGroupId), put(asyncAction))); + check_hresult(WINRT_SHIM(IFullTrustProcessLauncherStatics)->abi_LaunchFullTrustProcessForCurrentAppWithParametersAsync(get_abi(parameterGroupId), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForAppAsync(hstring_ref fullTrustPackageRelativeAppId) const +template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForAppAsync(hstring_view fullTrustPackageRelativeAppId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFullTrustProcessForAppAsync(get(fullTrustPackageRelativeAppId), put(asyncAction))); + check_hresult(WINRT_SHIM(IFullTrustProcessLauncherStatics)->abi_LaunchFullTrustProcessForAppAsync(get_abi(fullTrustPackageRelativeAppId), put_abi(asyncAction))); return asyncAction; } -template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForAppAsync(hstring_ref fullTrustPackageRelativeAppId, hstring_ref parameterGroupId) const +template Windows::Foundation::IAsyncAction impl_IFullTrustProcessLauncherStatics::LaunchFullTrustProcessForAppAsync(hstring_view fullTrustPackageRelativeAppId, hstring_view parameterGroupId) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFullTrustProcessForAppWithParametersAsync(get(fullTrustPackageRelativeAppId), get(parameterGroupId), put(asyncAction))); + check_hresult(WINRT_SHIM(IFullTrustProcessLauncherStatics)->abi_LaunchFullTrustProcessForAppWithParametersAsync(get_abi(fullTrustPackageRelativeAppId), get_abi(parameterGroupId), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_IStartupTask::RequestEnableAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestEnableAsync(put(operation))); + check_hresult(WINRT_SHIM(IStartupTask)->abi_RequestEnableAsync(put_abi(operation))); return operation; } template void impl_IStartupTask::Disable() const { - check_hresult(static_cast(static_cast(*this))->abi_Disable()); + check_hresult(WINRT_SHIM(IStartupTask)->abi_Disable()); } template Windows::ApplicationModel::StartupTaskState impl_IStartupTask::State() const { Windows::ApplicationModel::StartupTaskState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IStartupTask)->get_State(&value)); return value; } template hstring impl_IStartupTask::TaskId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TaskId(put(value))); + check_hresult(WINRT_SHIM(IStartupTask)->get_TaskId(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IStartupTaskStatics::GetForCurrentPackageAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentPackageAsync(put(operation))); + check_hresult(WINRT_SHIM(IStartupTaskStatics)->abi_GetForCurrentPackageAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStartupTaskStatics::GetAsync(hstring_ref taskId) const +template Windows::Foundation::IAsyncOperation impl_IStartupTaskStatics::GetAsync(hstring_view taskId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAsync(get(taskId), put(operation))); + check_hresult(WINRT_SHIM(IStartupTaskStatics)->abi_GetAsync(get_abi(taskId), put_abi(operation))); return operation; } template void impl_ICameraApplicationManagerStatics::ShowInstalledApplicationsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowInstalledApplicationsUI()); + check_hresult(WINRT_SHIM(ICameraApplicationManagerStatics)->abi_ShowInstalledApplicationsUI()); } inline void CameraApplicationManager::ShowInstalledApplicationsUI() @@ -2239,17 +2344,17 @@ inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTru return get_activation_factory().LaunchFullTrustProcessForCurrentAppAsync(); } -inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForCurrentAppAsync(hstring_ref parameterGroupId) +inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForCurrentAppAsync(hstring_view parameterGroupId) { return get_activation_factory().LaunchFullTrustProcessForCurrentAppAsync(parameterGroupId); } -inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForAppAsync(hstring_ref fullTrustPackageRelativeAppId) +inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForAppAsync(hstring_view fullTrustPackageRelativeAppId) { return get_activation_factory().LaunchFullTrustProcessForAppAsync(fullTrustPackageRelativeAppId); } -inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForAppAsync(hstring_ref fullTrustPackageRelativeAppId, hstring_ref parameterGroupId) +inline Windows::Foundation::IAsyncAction FullTrustProcessLauncher::LaunchFullTrustProcessForAppAsync(hstring_view fullTrustPackageRelativeAppId, hstring_view parameterGroupId) { return get_activation_factory().LaunchFullTrustProcessForAppAsync(fullTrustPackageRelativeAppId, parameterGroupId); } @@ -2274,7 +2379,7 @@ inline Windows::Foundation::IAsyncOperation().GetForCurrentPackageAsync(); } -inline Windows::Foundation::IAsyncOperation StartupTask::GetAsync(hstring_ref taskId) +inline Windows::Foundation::IAsyncOperation StartupTask::GetAsync(hstring_view taskId) { return get_activation_factory().GetAsync(taskId); } @@ -2282,3 +2387,410 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IAppDisplayInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IAppInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ICameraApplicationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IDesignModeStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IEnteredBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IFullTrustProcessLauncherStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ILeavingBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackage3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackage4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageCatalog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageCatalogStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageIdWithMetadata & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageInstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageStagingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageUninstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IPackageWithMetadata & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IStartupTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::IStartupTaskStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ISuspendingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ISuspendingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::ISuspendingOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppDisplayInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::AppInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::EnteredBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::LeavingBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::Package & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageCatalog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageInstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageStagingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageUninstallingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::PackageUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::StartupTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SuspendingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SuspendingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::ApplicationModel::SuspendingOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Html.h b/10.0.14393.0/winrt/Windows.Data.Html.h index 360157285..0bff174c4 100644 --- a/10.0.14393.0/winrt/Windows.Data.Html.h +++ b/10.0.14393.0/winrt/Windows.Data.Html.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Data.Html.3.h" WINRT_EXPORT namespace winrt { @@ -12,11 +15,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_ConvertToText(abi_arg_in html, abi_arg_out text) noexcept override + HRESULT __stdcall abi_ConvertToText(impl::abi_arg_in html, impl::abi_arg_out text) noexcept override { try { - *text = detach(this->shim().ConvertToText(*reinterpret_cast(&html))); + typename D::abi_guard guard(this->shim()); + *text = detach_abi(this->shim().ConvertToText(*reinterpret_cast(&html))); return S_OK; } catch (...) @@ -31,14 +35,14 @@ struct produce : produce_base hstring impl_IHtmlUtilities::ConvertToText(hstring_ref html) const +template hstring impl_IHtmlUtilities::ConvertToText(hstring_view html) const { hstring text; - check_hresult(static_cast(static_cast(*this))->abi_ConvertToText(get(html), put(text))); + check_hresult(WINRT_SHIM(IHtmlUtilities)->abi_ConvertToText(get_abi(html), put_abi(text))); return text; } -inline hstring HtmlUtilities::ConvertToText(hstring_ref html) +inline hstring HtmlUtilities::ConvertToText(hstring_view html) { return get_activation_factory().ConvertToText(html); } @@ -46,3 +50,14 @@ inline hstring HtmlUtilities::ConvertToText(hstring_ref html) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Html::IHtmlUtilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Json.h b/10.0.14393.0/winrt/Windows.Data.Json.h index 09cb977be..84b24843a 100644 --- a/10.0.14393.0/winrt/Windows.Data.Json.h +++ b/10.0.14393.0/winrt/Windows.Data.Json.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Data.Json.3.h" #include "Windows.Foundation.h" #include "Windows.Foundation.Collections.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetObjectAt(uint32_t index, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetObjectAt(uint32_t index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetObjectAt(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetObjectAt(index)); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetArrayAt(uint32_t index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetArrayAt(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetArrayAt(index)); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetStringAt(uint32_t index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetStringAt(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetStringAt(index)); return S_OK; } catch (...) @@ -60,7 +66,8 @@ struct produce : produce_baseshim().GetNumberAt(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNumberAt(index)); return S_OK; } catch (...) @@ -73,7 +80,8 @@ struct produce : produce_baseshim().GetBooleanAt(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetBooleanAt(index)); return S_OK; } catch (...) @@ -86,11 +94,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Parse(abi_arg_in input, abi_arg_out jsonArray) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in input, impl::abi_arg_out jsonArray) noexcept override { try { - *jsonArray = detach(this->shim().Parse(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *jsonArray = detach_abi(this->shim().Parse(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce : produce_base input, abi_arg_out result, bool * succeeded) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in input, impl::abi_arg_out result, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TryParse(*reinterpret_cast(&input), *result)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryParse(*reinterpret_cast(&input), *result)); return S_OK; } catch (...) @@ -122,7 +132,8 @@ struct produce : produce_baseshim().GetJsonStatus(hresult)); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetJsonStatus(hresult)); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetNamedValue(abi_arg_in name, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedValue(impl::abi_arg_in name, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedValue(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedValue(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -149,10 +161,11 @@ struct produce : produce_base name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetNamedValue(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetNamedValue(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -162,11 +175,12 @@ struct produce : produce_base name, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedObject(impl::abi_arg_in name, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedObject(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedObject(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produce_base name, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedArray(impl::abi_arg_in name, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedArray(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedArray(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : produce_base name, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedString(impl::abi_arg_in name, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedString(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedString(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -204,11 +220,12 @@ struct produce : produce_base name, double * returnValue) noexcept override + HRESULT __stdcall abi_GetNamedNumber(impl::abi_arg_in name, double * returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedNumber(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedNumber(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produce_base name, bool * returnValue) noexcept override + HRESULT __stdcall abi_GetNamedBoolean(impl::abi_arg_in name, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedBoolean(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedBoolean(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -234,11 +252,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Parse(abi_arg_in input, abi_arg_out jsonObject) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in input, impl::abi_arg_out jsonObject) noexcept override { try { - *jsonObject = detach(this->shim().Parse(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *jsonObject = detach_abi(this->shim().Parse(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -248,11 +267,12 @@ struct produce : produce_base input, abi_arg_out result, bool * succeeded) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in input, impl::abi_arg_out result, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TryParse(*reinterpret_cast(&input), *result)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryParse(*reinterpret_cast(&input), *result)); return S_OK; } catch (...) @@ -266,11 +286,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetNamedValueOrDefault(abi_arg_in name, abi_arg_in defaultValue, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedValueOrDefault(impl::abi_arg_in name, impl::abi_arg_in defaultValue, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedValue(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedValue(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); return S_OK; } catch (...) @@ -280,11 +301,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetNamedObjectOrDefault(abi_arg_in name, abi_arg_in defaultValue, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedObjectOrDefault(impl::abi_arg_in name, impl::abi_arg_in defaultValue, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedObject(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedObject(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); return S_OK; } catch (...) @@ -294,11 +316,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetNamedStringOrDefault(abi_arg_in name, abi_arg_in defaultValue, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedStringOrDefault(impl::abi_arg_in name, impl::abi_arg_in defaultValue, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedString(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedString(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); return S_OK; } catch (...) @@ -308,11 +331,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetNamedArrayOrDefault(abi_arg_in name, abi_arg_in defaultValue, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetNamedArrayOrDefault(impl::abi_arg_in name, impl::abi_arg_in defaultValue, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedArray(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedArray(*reinterpret_cast(&name), *reinterpret_cast(&defaultValue))); return S_OK; } catch (...) @@ -322,11 +346,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetNamedNumberOrDefault(abi_arg_in name, double defaultValue, double * returnValue) noexcept override + HRESULT __stdcall abi_GetNamedNumberOrDefault(impl::abi_arg_in name, double defaultValue, double * returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedNumber(*reinterpret_cast(&name), defaultValue)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedNumber(*reinterpret_cast(&name), defaultValue)); return S_OK; } catch (...) @@ -335,11 +360,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetNamedBooleanOrDefault(abi_arg_in name, bool defaultValue, bool * returnValue) noexcept override + HRESULT __stdcall abi_GetNamedBooleanOrDefault(impl::abi_arg_in name, bool defaultValue, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNamedBoolean(*reinterpret_cast(&name), defaultValue)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNamedBoolean(*reinterpret_cast(&name), defaultValue)); return S_OK; } catch (...) @@ -356,7 +382,8 @@ struct produce : produce_baseshim().ValueType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValueType()); return S_OK; } catch (...) @@ -365,11 +392,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_Stringify(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().Stringify()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Stringify()); return S_OK; } catch (...) @@ -379,11 +407,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetString(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetString()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetString()); return S_OK; } catch (...) @@ -397,7 +426,8 @@ struct produce : produce_baseshim().GetNumber()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNumber()); return S_OK; } catch (...) @@ -410,7 +440,8 @@ struct produce : produce_baseshim().GetBoolean()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetBoolean()); return S_OK; } catch (...) @@ -419,11 +450,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetArray(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetArray()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetArray()); return S_OK; } catch (...) @@ -433,11 +465,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetObject(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetObject()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetObject()); return S_OK; } catch (...) @@ -451,11 +484,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Parse(abi_arg_in input, abi_arg_out jsonValue) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in input, impl::abi_arg_out jsonValue) noexcept override { try { - *jsonValue = detach(this->shim().Parse(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *jsonValue = detach_abi(this->shim().Parse(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -465,11 +499,12 @@ struct produce : produce_base input, abi_arg_out result, bool * succeeded) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in input, impl::abi_arg_out result, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TryParse(*reinterpret_cast(&input), *result)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryParse(*reinterpret_cast(&input), *result)); return S_OK; } catch (...) @@ -479,11 +514,12 @@ struct produce : produce_base jsonValue) noexcept override + HRESULT __stdcall abi_CreateBooleanValue(bool input, impl::abi_arg_out jsonValue) noexcept override { try { - *jsonValue = detach(this->shim().CreateBooleanValue(input)); + typename D::abi_guard guard(this->shim()); + *jsonValue = detach_abi(this->shim().CreateBooleanValue(input)); return S_OK; } catch (...) @@ -493,11 +529,12 @@ struct produce : produce_base jsonValue) noexcept override + HRESULT __stdcall abi_CreateNumberValue(double input, impl::abi_arg_out jsonValue) noexcept override { try { - *jsonValue = detach(this->shim().CreateNumberValue(input)); + typename D::abi_guard guard(this->shim()); + *jsonValue = detach_abi(this->shim().CreateNumberValue(input)); return S_OK; } catch (...) @@ -507,11 +544,12 @@ struct produce : produce_base input, abi_arg_out jsonValue) noexcept override + HRESULT __stdcall abi_CreateStringValue(impl::abi_arg_in input, impl::abi_arg_out jsonValue) noexcept override { try { - *jsonValue = detach(this->shim().CreateStringValue(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *jsonValue = detach_abi(this->shim().CreateStringValue(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -525,11 +563,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateNullValue(abi_arg_out jsonValue) noexcept override + HRESULT __stdcall abi_CreateNullValue(impl::abi_arg_out jsonValue) noexcept override { try { - *jsonValue = detach(this->shim().CreateNullValue()); + typename D::abi_guard guard(this->shim()); + *jsonValue = detach_abi(this->shim().CreateNullValue()); return S_OK; } catch (...) @@ -547,250 +586,250 @@ namespace Windows::Data::Json { template Windows::Data::Json::JsonValueType impl_IJsonValue::ValueType() const { Windows::Data::Json::JsonValueType value {}; - check_hresult(static_cast(static_cast(*this))->get_ValueType(&value)); + check_hresult(WINRT_SHIM(IJsonValue)->get_ValueType(&value)); return value; } template hstring impl_IJsonValue::Stringify() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_Stringify(put(returnValue))); + check_hresult(WINRT_SHIM(IJsonValue)->abi_Stringify(put_abi(returnValue))); return returnValue; } template hstring impl_IJsonValue::GetString() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetString(put(returnValue))); + check_hresult(WINRT_SHIM(IJsonValue)->abi_GetString(put_abi(returnValue))); return returnValue; } template double impl_IJsonValue::GetNumber() const { double returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNumber(&returnValue)); + check_hresult(WINRT_SHIM(IJsonValue)->abi_GetNumber(&returnValue)); return returnValue; } template bool impl_IJsonValue::GetBoolean() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetBoolean(&returnValue)); + check_hresult(WINRT_SHIM(IJsonValue)->abi_GetBoolean(&returnValue)); return returnValue; } template Windows::Data::Json::JsonArray impl_IJsonValue::GetArray() const { Windows::Data::Json::JsonArray returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetArray(put(returnValue))); + check_hresult(WINRT_SHIM(IJsonValue)->abi_GetArray(put_abi(returnValue))); return returnValue; } template Windows::Data::Json::JsonObject impl_IJsonValue::GetObject() const { Windows::Data::Json::JsonObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetObject(put(returnValue))); + check_hresult(WINRT_SHIM(IJsonValue)->abi_GetObject(put_abi(returnValue))); return returnValue; } -template Windows::Data::Json::JsonValue impl_IJsonValueStatics::Parse(hstring_ref input) const +template Windows::Data::Json::JsonValue impl_IJsonValueStatics::Parse(hstring_view input) const { Windows::Data::Json::JsonValue jsonValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(input), put(jsonValue))); + check_hresult(WINRT_SHIM(IJsonValueStatics)->abi_Parse(get_abi(input), put_abi(jsonValue))); return jsonValue; } -template bool impl_IJsonValueStatics::TryParse(hstring_ref input, Windows::Data::Json::JsonValue & result) const +template bool impl_IJsonValueStatics::TryParse(hstring_view input, Windows::Data::Json::JsonValue & result) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(input), put(result), &succeeded)); + check_hresult(WINRT_SHIM(IJsonValueStatics)->abi_TryParse(get_abi(input), put_abi(result), &succeeded)); return succeeded; } template Windows::Data::Json::JsonValue impl_IJsonValueStatics::CreateBooleanValue(bool input) const { Windows::Data::Json::JsonValue jsonValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBooleanValue(input, put(jsonValue))); + check_hresult(WINRT_SHIM(IJsonValueStatics)->abi_CreateBooleanValue(input, put_abi(jsonValue))); return jsonValue; } template Windows::Data::Json::JsonValue impl_IJsonValueStatics::CreateNumberValue(double input) const { Windows::Data::Json::JsonValue jsonValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNumberValue(input, put(jsonValue))); + check_hresult(WINRT_SHIM(IJsonValueStatics)->abi_CreateNumberValue(input, put_abi(jsonValue))); return jsonValue; } -template Windows::Data::Json::JsonValue impl_IJsonValueStatics::CreateStringValue(hstring_ref input) const +template Windows::Data::Json::JsonValue impl_IJsonValueStatics::CreateStringValue(hstring_view input) const { Windows::Data::Json::JsonValue jsonValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStringValue(get(input), put(jsonValue))); + check_hresult(WINRT_SHIM(IJsonValueStatics)->abi_CreateStringValue(get_abi(input), put_abi(jsonValue))); return jsonValue; } template Windows::Data::Json::JsonValue impl_IJsonValueStatics2::CreateNullValue() const { Windows::Data::Json::JsonValue jsonValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNullValue(put(jsonValue))); + check_hresult(WINRT_SHIM(IJsonValueStatics2)->abi_CreateNullValue(put_abi(jsonValue))); return jsonValue; } -template Windows::Data::Json::JsonValue impl_IJsonObject::GetNamedValue(hstring_ref name) const +template Windows::Data::Json::JsonValue impl_IJsonObject::GetNamedValue(hstring_view name) const { Windows::Data::Json::JsonValue returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedValue(get(name), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedValue(get_abi(name), put_abi(returnValue))); return returnValue; } -template void impl_IJsonObject::SetNamedValue(hstring_ref name, const Windows::Data::Json::IJsonValue & value) const +template void impl_IJsonObject::SetNamedValue(hstring_view name, const Windows::Data::Json::IJsonValue & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetNamedValue(get(name), get(value))); + check_hresult(WINRT_SHIM(IJsonObject)->abi_SetNamedValue(get_abi(name), get_abi(value))); } -template Windows::Data::Json::JsonObject impl_IJsonObject::GetNamedObject(hstring_ref name) const +template Windows::Data::Json::JsonObject impl_IJsonObject::GetNamedObject(hstring_view name) const { Windows::Data::Json::JsonObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedObject(get(name), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedObject(get_abi(name), put_abi(returnValue))); return returnValue; } -template Windows::Data::Json::JsonArray impl_IJsonObject::GetNamedArray(hstring_ref name) const +template Windows::Data::Json::JsonArray impl_IJsonObject::GetNamedArray(hstring_view name) const { Windows::Data::Json::JsonArray returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedArray(get(name), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedArray(get_abi(name), put_abi(returnValue))); return returnValue; } -template hstring impl_IJsonObject::GetNamedString(hstring_ref name) const +template hstring impl_IJsonObject::GetNamedString(hstring_view name) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedString(get(name), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedString(get_abi(name), put_abi(returnValue))); return returnValue; } -template double impl_IJsonObject::GetNamedNumber(hstring_ref name) const +template double impl_IJsonObject::GetNamedNumber(hstring_view name) const { double returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedNumber(get(name), &returnValue)); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedNumber(get_abi(name), &returnValue)); return returnValue; } -template bool impl_IJsonObject::GetNamedBoolean(hstring_ref name) const +template bool impl_IJsonObject::GetNamedBoolean(hstring_view name) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedBoolean(get(name), &returnValue)); + check_hresult(WINRT_SHIM(IJsonObject)->abi_GetNamedBoolean(get_abi(name), &returnValue)); return returnValue; } -template Windows::Data::Json::JsonValue impl_IJsonObjectWithDefaultValues::GetNamedValue(hstring_ref name, const Windows::Data::Json::JsonValue & defaultValue) const +template Windows::Data::Json::JsonValue impl_IJsonObjectWithDefaultValues::GetNamedValue(hstring_view name, const Windows::Data::Json::JsonValue & defaultValue) const { Windows::Data::Json::JsonValue returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedValueOrDefault(get(name), get(defaultValue), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedValueOrDefault(get_abi(name), get_abi(defaultValue), put_abi(returnValue))); return returnValue; } -template Windows::Data::Json::JsonObject impl_IJsonObjectWithDefaultValues::GetNamedObject(hstring_ref name, const Windows::Data::Json::JsonObject & defaultValue) const +template Windows::Data::Json::JsonObject impl_IJsonObjectWithDefaultValues::GetNamedObject(hstring_view name, const Windows::Data::Json::JsonObject & defaultValue) const { Windows::Data::Json::JsonObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedObjectOrDefault(get(name), get(defaultValue), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedObjectOrDefault(get_abi(name), get_abi(defaultValue), put_abi(returnValue))); return returnValue; } -template hstring impl_IJsonObjectWithDefaultValues::GetNamedString(hstring_ref name, hstring_ref defaultValue) const +template hstring impl_IJsonObjectWithDefaultValues::GetNamedString(hstring_view name, hstring_view defaultValue) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedStringOrDefault(get(name), get(defaultValue), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedStringOrDefault(get_abi(name), get_abi(defaultValue), put_abi(returnValue))); return returnValue; } -template Windows::Data::Json::JsonArray impl_IJsonObjectWithDefaultValues::GetNamedArray(hstring_ref name, const Windows::Data::Json::JsonArray & defaultValue) const +template Windows::Data::Json::JsonArray impl_IJsonObjectWithDefaultValues::GetNamedArray(hstring_view name, const Windows::Data::Json::JsonArray & defaultValue) const { Windows::Data::Json::JsonArray returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedArrayOrDefault(get(name), get(defaultValue), put(returnValue))); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedArrayOrDefault(get_abi(name), get_abi(defaultValue), put_abi(returnValue))); return returnValue; } -template double impl_IJsonObjectWithDefaultValues::GetNamedNumber(hstring_ref name, double defaultValue) const +template double impl_IJsonObjectWithDefaultValues::GetNamedNumber(hstring_view name, double defaultValue) const { double returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedNumberOrDefault(get(name), defaultValue, &returnValue)); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedNumberOrDefault(get_abi(name), defaultValue, &returnValue)); return returnValue; } -template bool impl_IJsonObjectWithDefaultValues::GetNamedBoolean(hstring_ref name, bool defaultValue) const +template bool impl_IJsonObjectWithDefaultValues::GetNamedBoolean(hstring_view name, bool defaultValue) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedBooleanOrDefault(get(name), defaultValue, &returnValue)); + check_hresult(WINRT_SHIM(IJsonObjectWithDefaultValues)->abi_GetNamedBooleanOrDefault(get_abi(name), defaultValue, &returnValue)); return returnValue; } -template Windows::Data::Json::JsonObject impl_IJsonObjectStatics::Parse(hstring_ref input) const +template Windows::Data::Json::JsonObject impl_IJsonObjectStatics::Parse(hstring_view input) const { Windows::Data::Json::JsonObject jsonObject { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(input), put(jsonObject))); + check_hresult(WINRT_SHIM(IJsonObjectStatics)->abi_Parse(get_abi(input), put_abi(jsonObject))); return jsonObject; } -template bool impl_IJsonObjectStatics::TryParse(hstring_ref input, Windows::Data::Json::JsonObject & result) const +template bool impl_IJsonObjectStatics::TryParse(hstring_view input, Windows::Data::Json::JsonObject & result) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(input), put(result), &succeeded)); + check_hresult(WINRT_SHIM(IJsonObjectStatics)->abi_TryParse(get_abi(input), put_abi(result), &succeeded)); return succeeded; } template Windows::Data::Json::JsonObject impl_IJsonArray::GetObjectAt(uint32_t index) const { Windows::Data::Json::JsonObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetObjectAt(index, put(returnValue))); + check_hresult(WINRT_SHIM(IJsonArray)->abi_GetObjectAt(index, put_abi(returnValue))); return returnValue; } template Windows::Data::Json::JsonArray impl_IJsonArray::GetArrayAt(uint32_t index) const { Windows::Data::Json::JsonArray returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetArrayAt(index, put(returnValue))); + check_hresult(WINRT_SHIM(IJsonArray)->abi_GetArrayAt(index, put_abi(returnValue))); return returnValue; } template hstring impl_IJsonArray::GetStringAt(uint32_t index) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetStringAt(index, put(returnValue))); + check_hresult(WINRT_SHIM(IJsonArray)->abi_GetStringAt(index, put_abi(returnValue))); return returnValue; } template double impl_IJsonArray::GetNumberAt(uint32_t index) const { double returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNumberAt(index, &returnValue)); + check_hresult(WINRT_SHIM(IJsonArray)->abi_GetNumberAt(index, &returnValue)); return returnValue; } template bool impl_IJsonArray::GetBooleanAt(uint32_t index) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanAt(index, &returnValue)); + check_hresult(WINRT_SHIM(IJsonArray)->abi_GetBooleanAt(index, &returnValue)); return returnValue; } -template Windows::Data::Json::JsonArray impl_IJsonArrayStatics::Parse(hstring_ref input) const +template Windows::Data::Json::JsonArray impl_IJsonArrayStatics::Parse(hstring_view input) const { Windows::Data::Json::JsonArray jsonArray { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(input), put(jsonArray))); + check_hresult(WINRT_SHIM(IJsonArrayStatics)->abi_Parse(get_abi(input), put_abi(jsonArray))); return jsonArray; } -template bool impl_IJsonArrayStatics::TryParse(hstring_ref input, Windows::Data::Json::JsonArray & result) const +template bool impl_IJsonArrayStatics::TryParse(hstring_view input, Windows::Data::Json::JsonArray & result) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(input), put(result), &succeeded)); + check_hresult(WINRT_SHIM(IJsonArrayStatics)->abi_TryParse(get_abi(input), put_abi(result), &succeeded)); return succeeded; } template Windows::Data::Json::JsonErrorStatus impl_IJsonErrorStatics2::GetJsonStatus(int32_t hresult) const { Windows::Data::Json::JsonErrorStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetJsonStatus(hresult, &status)); + check_hresult(WINRT_SHIM(IJsonErrorStatics2)->abi_GetJsonStatus(hresult, &status)); return status; } @@ -798,12 +837,12 @@ inline JsonArray::JsonArray() : JsonArray(activate_instance()) {} -inline Windows::Data::Json::JsonArray JsonArray::Parse(hstring_ref input) +inline Windows::Data::Json::JsonArray JsonArray::Parse(hstring_view input) { return get_activation_factory().Parse(input); } -inline bool JsonArray::TryParse(hstring_ref input, Windows::Data::Json::JsonArray & result) +inline bool JsonArray::TryParse(hstring_view input, Windows::Data::Json::JsonArray & result) { return get_activation_factory().TryParse(input, result); } @@ -817,22 +856,22 @@ inline JsonObject::JsonObject() : JsonObject(activate_instance()) {} -inline Windows::Data::Json::JsonObject JsonObject::Parse(hstring_ref input) +inline Windows::Data::Json::JsonObject JsonObject::Parse(hstring_view input) { return get_activation_factory().Parse(input); } -inline bool JsonObject::TryParse(hstring_ref input, Windows::Data::Json::JsonObject & result) +inline bool JsonObject::TryParse(hstring_view input, Windows::Data::Json::JsonObject & result) { return get_activation_factory().TryParse(input, result); } -inline Windows::Data::Json::JsonValue JsonValue::Parse(hstring_ref input) +inline Windows::Data::Json::JsonValue JsonValue::Parse(hstring_view input) { return get_activation_factory().Parse(input); } -inline bool JsonValue::TryParse(hstring_ref input, Windows::Data::Json::JsonValue & result) +inline bool JsonValue::TryParse(hstring_view input, Windows::Data::Json::JsonValue & result) { return get_activation_factory().TryParse(input, result); } @@ -847,7 +886,7 @@ inline Windows::Data::Json::JsonValue JsonValue::CreateNumberValue(double input) return get_activation_factory().CreateNumberValue(input); } -inline Windows::Data::Json::JsonValue JsonValue::CreateStringValue(hstring_ref input) +inline Windows::Data::Json::JsonValue JsonValue::CreateStringValue(hstring_view input) { return get_activation_factory().CreateStringValue(input); } @@ -860,3 +899,113 @@ inline Windows::Data::Json::JsonValue JsonValue::CreateNullValue() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonArray & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonArrayStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonErrorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonObjectStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonObjectWithDefaultValues & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonValueStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::IJsonValueStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::JsonArray & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::JsonObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Json::JsonValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Pdf.h b/10.0.14393.0/winrt/Windows.Data.Pdf.h index 72a589dbf..9e9dcd20f 100644 --- a/10.0.14393.0/winrt/Windows.Data.Pdf.h +++ b/10.0.14393.0/winrt/Windows.Data.Pdf.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetPage(uint32_t pageIndex, abi_arg_out pdfPage) noexcept override + HRESULT __stdcall abi_GetPage(uint32_t pageIndex, impl::abi_arg_out pdfPage) noexcept override { try { - *pdfPage = detach(this->shim().GetPage(pageIndex)); + typename D::abi_guard guard(this->shim()); + *pdfPage = detach_abi(this->shim().GetPage(pageIndex)); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produce_baseshim().PageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageCount()); return S_OK; } catch (...) @@ -48,7 +53,8 @@ struct produce : produce_baseshim().IsPasswordProtected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPasswordProtected()); return S_OK; } catch (...) @@ -61,11 +67,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LoadFromFileAsync(abi_arg_in file, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromFileAsync(impl::abi_arg_in file, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produce_base file, abi_arg_in password, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromFileWithPasswordAsync(impl::abi_arg_in file, impl::abi_arg_in password, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&password))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&password))); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produce_base inputStream, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromStreamAsync(impl::abi_arg_in inputStream, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromStreamAsync(*reinterpret_cast(&inputStream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromStreamAsync(*reinterpret_cast(&inputStream))); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce : produce_base inputStream, abi_arg_in password, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromStreamWithPasswordAsync(impl::abi_arg_in inputStream, impl::abi_arg_in password, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromStreamAsync(*reinterpret_cast(&inputStream), *reinterpret_cast(&password))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromStreamAsync(*reinterpret_cast(&inputStream), *reinterpret_cast(&password))); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RenderToStreamAsync(abi_arg_in outputStream, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_RenderToStreamAsync(impl::abi_arg_in outputStream, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RenderToStreamAsync(*reinterpret_cast(&outputStream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RenderToStreamAsync(*reinterpret_cast(&outputStream))); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce : produce_base outputStream, abi_arg_in options, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_RenderWithOptionsToStreamAsync(impl::abi_arg_in outputStream, impl::abi_arg_in options, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RenderToStreamAsync(*reinterpret_cast(&outputStream), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RenderToStreamAsync(*reinterpret_cast(&outputStream), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -149,11 +161,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_PreparePageAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().PreparePageAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().PreparePageAsync()); return S_OK; } catch (...) @@ -167,7 +180,8 @@ struct produce : produce_baseshim().Index()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Index()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -189,11 +204,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Dimensions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dimensions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dimensions()); return S_OK; } catch (...) @@ -207,7 +223,8 @@ struct produce : produce_baseshim().Rotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rotation()); return S_OK; } catch (...) @@ -220,7 +237,8 @@ struct produce : produce_baseshim().PreferredZoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredZoom()); return S_OK; } catch (...) @@ -233,11 +251,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_MediaBox(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaBox()); return S_OK; } catch (...) @@ -246,11 +265,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CropBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CropBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CropBox()); return S_OK; } catch (...) @@ -259,11 +279,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BleedBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BleedBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BleedBox()); return S_OK; } catch (...) @@ -272,11 +293,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrimBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimBox()); return S_OK; } catch (...) @@ -285,11 +307,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ArtBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ArtBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ArtBox()); return S_OK; } catch (...) @@ -302,11 +325,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceRect()); return S_OK; } catch (...) @@ -315,10 +339,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SourceRect(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceRect(*reinterpret_cast(&value)); return S_OK; } @@ -332,7 +357,8 @@ struct produce : produce_baseshim().DestinationWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DestinationWidth()); return S_OK; } catch (...) @@ -345,6 +371,7 @@ struct produce : produce_baseshim()); this->shim().DestinationWidth(value); return S_OK; } @@ -358,7 +385,8 @@ struct produce : produce_baseshim().DestinationHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DestinationHeight()); return S_OK; } catch (...) @@ -371,6 +399,7 @@ struct produce : produce_baseshim()); this->shim().DestinationHeight(value); return S_OK; } @@ -380,11 +409,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -393,10 +423,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -410,7 +441,8 @@ struct produce : produce_baseshim().IsIgnoringHighContrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIgnoringHighContrast()); return S_OK; } catch (...) @@ -423,6 +455,7 @@ struct produce : produce_baseshim()); this->shim().IsIgnoringHighContrast(value); return S_OK; } @@ -436,7 +469,8 @@ struct produce : produce_baseshim().BitmapEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapEncoderId()); return S_OK; } catch (...) @@ -449,6 +483,7 @@ struct produce : produce_baseshim()); this->shim().BitmapEncoderId(value); return S_OK; } @@ -466,212 +501,212 @@ namespace Windows::Data::Pdf { template Windows::Foundation::Rect impl_IPdfPageDimensions::MediaBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaBox(put(value))); + check_hresult(WINRT_SHIM(IPdfPageDimensions)->get_MediaBox(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPdfPageDimensions::CropBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_CropBox(put(value))); + check_hresult(WINRT_SHIM(IPdfPageDimensions)->get_CropBox(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPdfPageDimensions::BleedBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_BleedBox(put(value))); + check_hresult(WINRT_SHIM(IPdfPageDimensions)->get_BleedBox(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPdfPageDimensions::TrimBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimBox(put(value))); + check_hresult(WINRT_SHIM(IPdfPageDimensions)->get_TrimBox(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPdfPageDimensions::ArtBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ArtBox(put(value))); + check_hresult(WINRT_SHIM(IPdfPageDimensions)->get_ArtBox(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPdfPageRenderOptions::SourceRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceRect(put(value))); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_SourceRect(put_abi(value))); return value; } template void impl_IPdfPageRenderOptions::SourceRect(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceRect(get(value))); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_SourceRect(get_abi(value))); } template uint32_t impl_IPdfPageRenderOptions::DestinationWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DestinationWidth(&value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_DestinationWidth(&value)); return value; } template void impl_IPdfPageRenderOptions::DestinationWidth(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DestinationWidth(value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_DestinationWidth(value)); } template uint32_t impl_IPdfPageRenderOptions::DestinationHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DestinationHeight(&value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_DestinationHeight(&value)); return value; } template void impl_IPdfPageRenderOptions::DestinationHeight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DestinationHeight(value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_DestinationHeight(value)); } template Windows::UI::Color impl_IPdfPageRenderOptions::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_BackgroundColor(put_abi(value))); return value; } template void impl_IPdfPageRenderOptions::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_BackgroundColor(get_abi(value))); } template bool impl_IPdfPageRenderOptions::IsIgnoringHighContrast() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIgnoringHighContrast(&value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_IsIgnoringHighContrast(&value)); return value; } template void impl_IPdfPageRenderOptions::IsIgnoringHighContrast(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIgnoringHighContrast(value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_IsIgnoringHighContrast(value)); } template GUID impl_IPdfPageRenderOptions::BitmapEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapEncoderId(&value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->get_BitmapEncoderId(&value)); return value; } template void impl_IPdfPageRenderOptions::BitmapEncoderId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_BitmapEncoderId(value)); + check_hresult(WINRT_SHIM(IPdfPageRenderOptions)->put_BitmapEncoderId(value)); } template Windows::Foundation::IAsyncAction impl_IPdfPage::RenderToStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & outputStream) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RenderToStreamAsync(get(outputStream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfPage)->abi_RenderToStreamAsync(get_abi(outputStream), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IPdfPage::RenderToStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & outputStream, const Windows::Data::Pdf::PdfPageRenderOptions & options) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RenderWithOptionsToStreamAsync(get(outputStream), get(options), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfPage)->abi_RenderWithOptionsToStreamAsync(get_abi(outputStream), get_abi(options), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IPdfPage::PreparePageAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_PreparePageAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfPage)->abi_PreparePageAsync(put_abi(asyncInfo))); return asyncInfo; } template uint32_t impl_IPdfPage::Index() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Index(&value)); + check_hresult(WINRT_SHIM(IPdfPage)->get_Index(&value)); return value; } template Windows::Foundation::Size impl_IPdfPage::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IPdfPage)->get_Size(put_abi(value))); return value; } template Windows::Data::Pdf::PdfPageDimensions impl_IPdfPage::Dimensions() const { Windows::Data::Pdf::PdfPageDimensions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Dimensions(put(value))); + check_hresult(WINRT_SHIM(IPdfPage)->get_Dimensions(put_abi(value))); return value; } template Windows::Data::Pdf::PdfPageRotation impl_IPdfPage::Rotation() const { Windows::Data::Pdf::PdfPageRotation value {}; - check_hresult(static_cast(static_cast(*this))->get_Rotation(&value)); + check_hresult(WINRT_SHIM(IPdfPage)->get_Rotation(&value)); return value; } template float impl_IPdfPage::PreferredZoom() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferredZoom(&value)); + check_hresult(WINRT_SHIM(IPdfPage)->get_PreferredZoom(&value)); return value; } template Windows::Data::Pdf::PdfPage impl_IPdfDocument::GetPage(uint32_t pageIndex) const { Windows::Data::Pdf::PdfPage pdfPage { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPage(pageIndex, put(pdfPage))); + check_hresult(WINRT_SHIM(IPdfDocument)->abi_GetPage(pageIndex, put_abi(pdfPage))); return pdfPage; } template uint32_t impl_IPdfDocument::PageCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PageCount(&value)); + check_hresult(WINRT_SHIM(IPdfDocument)->get_PageCount(&value)); return value; } template bool impl_IPdfDocument::IsPasswordProtected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPasswordProtected(&value)); + check_hresult(WINRT_SHIM(IPdfDocument)->get_IsPasswordProtected(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromFileAsync(get(file), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfDocumentStatics)->abi_LoadFromFileAsync(get_abi(file), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromFileAsync(const Windows::Storage::IStorageFile & file, hstring_ref password) const +template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromFileAsync(const Windows::Storage::IStorageFile & file, hstring_view password) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromFileWithPasswordAsync(get(file), get(password), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfDocumentStatics)->abi_LoadFromFileWithPasswordAsync(get_abi(file), get_abi(password), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & inputStream) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromStreamAsync(get(inputStream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfDocumentStatics)->abi_LoadFromStreamAsync(get_abi(inputStream), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & inputStream, hstring_ref password) const +template Windows::Foundation::IAsyncOperation impl_IPdfDocumentStatics::LoadFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & inputStream, hstring_view password) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromStreamWithPasswordAsync(get(inputStream), get(password), put(asyncInfo))); + check_hresult(WINRT_SHIM(IPdfDocumentStatics)->abi_LoadFromStreamWithPasswordAsync(get_abi(inputStream), get_abi(password), put_abi(asyncInfo))); return asyncInfo; } @@ -680,7 +715,7 @@ inline Windows::Foundation::IAsyncOperation Pdf return get_activation_factory().LoadFromFileAsync(file); } -inline Windows::Foundation::IAsyncOperation PdfDocument::LoadFromFileAsync(const Windows::Storage::IStorageFile & file, hstring_ref password) +inline Windows::Foundation::IAsyncOperation PdfDocument::LoadFromFileAsync(const Windows::Storage::IStorageFile & file, hstring_view password) { return get_activation_factory().LoadFromFileAsync(file, password); } @@ -690,7 +725,7 @@ inline Windows::Foundation::IAsyncOperation Pdf return get_activation_factory().LoadFromStreamAsync(inputStream); } -inline Windows::Foundation::IAsyncOperation PdfDocument::LoadFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & inputStream, hstring_ref password) +inline Windows::Foundation::IAsyncOperation PdfDocument::LoadFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & inputStream, hstring_view password) { return get_activation_factory().LoadFromStreamAsync(inputStream, password); } @@ -702,3 +737,86 @@ inline PdfPageRenderOptions::PdfPageRenderOptions() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::IPdfDocument & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::IPdfDocumentStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::IPdfPage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::IPdfPageDimensions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::IPdfPageRenderOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::PdfDocument & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::PdfPage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::PdfPageDimensions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Pdf::PdfPageRenderOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Text.h b/10.0.14393.0/winrt/Windows.Data.Text.h index ec206854a..c36c49f1b 100644 --- a/10.0.14393.0/winrt/Windows.Data.Text.h +++ b/10.0.14393.0/winrt/Windows.Data.Text.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Data.Text.3.h" @@ -23,9 +26,9 @@ template SelectableWordSegmentsTokenizingHandler::Selec SelectableWordSegmentsTokenizingHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void SelectableWordSegmentsTokenizingHandler::operator()(const Windows::Foundation::Collections::IIterable & precedingWords, const Windows::Foundation::Collections::IIterable & words) const +inline void SelectableWordSegmentsTokenizingHandler::operator()(iterable precedingWords, iterable words) const { - check_hresult((*this)->abi_Invoke(get(precedingWords), get(words))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(precedingWords), get_abi(words))); } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(L lambda) : @@ -40,9 +43,9 @@ template WordSegmentsTokenizingHandler::WordSegmentsTok WordSegmentsTokenizingHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void WordSegmentsTokenizingHandler::operator()(const Windows::Foundation::Collections::IIterable & precedingWords, const Windows::Foundation::Collections::IIterable & words) const +inline void WordSegmentsTokenizingHandler::operator()(iterable precedingWords, iterable words) const { - check_hresult((*this)->abi_Invoke(get(precedingWords), get(words))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(precedingWords), get_abi(words))); } } @@ -52,11 +55,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_SourceTextSegment(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceTextSegment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceTextSegment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceTextSegment()); return S_OK; } catch (...) @@ -65,11 +69,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AlternateText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlternateText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateText()); return S_OK; } catch (...) @@ -83,7 +88,8 @@ struct produce : produce_baseshim().NormalizationFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizationFormat()); return S_OK; } catch (...) @@ -96,11 +102,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -110,11 +117,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourceTextSegment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceTextSegment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceTextSegment()); return S_OK; } catch (...) @@ -127,11 +135,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ResolvedLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -141,11 +150,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetTokenAt(abi_arg_in text, uint32_t startIndex, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetTokenAt(impl::abi_arg_in text, uint32_t startIndex, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); return S_OK; } catch (...) @@ -155,11 +165,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetTokens(abi_arg_in text, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetTokens(impl::abi_arg_in text, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetTokens(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTokens(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -169,10 +180,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Tokenize(abi_arg_in text, uint32_t startIndex, abi_arg_in handler) noexcept override + HRESULT __stdcall abi_Tokenize(impl::abi_arg_in text, uint32_t startIndex, impl::abi_arg_in handler) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tokenize(*reinterpret_cast(&text), startIndex, *reinterpret_cast(&handler)); return S_OK; } @@ -186,11 +198,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithLanguage(abi_arg_in language, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithLanguage(impl::abi_arg_in language, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); return S_OK; } catch (...) @@ -204,11 +217,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Find(abi_arg_in content, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_Find(impl::abi_arg_in content, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().Find(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Find(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -218,11 +232,12 @@ struct produce : produce_base propertyContent, abi_arg_in propertyName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindInProperty(impl::abi_arg_in propertyContent, impl::abi_arg_in propertyName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindInProperty(*reinterpret_cast(&propertyContent), *reinterpret_cast(&propertyName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindInProperty(*reinterpret_cast(&propertyContent), *reinterpret_cast(&propertyName))); return S_OK; } catch (...) @@ -236,11 +251,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in aqsFilter, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in aqsFilter, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&aqsFilter))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&aqsFilter))); return S_OK; } catch (...) @@ -250,11 +266,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateWithLanguage(abi_arg_in aqsFilter, abi_arg_in filterLanguage, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithLanguage(impl::abi_arg_in aqsFilter, impl::abi_arg_in filterLanguage, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithLanguage(*reinterpret_cast(&aqsFilter), *reinterpret_cast(&filterLanguage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithLanguage(*reinterpret_cast(&aqsFilter), *reinterpret_cast(&filterLanguage))); return S_OK; } catch (...) @@ -268,11 +285,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_ResolvedLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -286,7 +304,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().LanguageAvailableButNotInstalled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanguageAvailableButNotInstalled()); return S_OK; } catch (...) @@ -295,11 +314,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetCandidatesAsync(abi_arg_in input, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetCandidatesAsync(impl::abi_arg_in input, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -309,11 +329,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetCandidatesWithMaxCountAsync(abi_arg_in input, uint32_t maxCandidates, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetCandidatesWithMaxCountAsync(impl::abi_arg_in input, uint32_t maxCandidates, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); return S_OK; } catch (...) @@ -327,11 +348,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in languageTag, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in languageTag, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -345,11 +367,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_DisplayText(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayText()); return S_OK; } catch (...) @@ -359,11 +382,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ReadingText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReadingText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingText()); return S_OK; } catch (...) @@ -377,11 +401,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ResolvedLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -395,7 +420,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().LanguageAvailableButNotInstalled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanguageAvailableButNotInstalled()); return S_OK; } catch (...) @@ -404,11 +430,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetCandidatesAsync(abi_arg_in input, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetCandidatesAsync(impl::abi_arg_in input, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -418,11 +445,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetCandidatesWithMaxCountAsync(abi_arg_in input, uint32_t maxCandidates, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetCandidatesWithMaxCountAsync(impl::abi_arg_in input, uint32_t maxCandidates, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); return S_OK; } catch (...) @@ -436,11 +464,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in languageTag, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in languageTag, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -454,11 +483,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ResolvedLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -472,7 +502,8 @@ struct produce : produc { try { - *value = detach(this->shim().LanguageAvailableButNotInstalled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanguageAvailableButNotInstalled()); return S_OK; } catch (...) @@ -481,11 +512,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ConvertBackAsync(abi_arg_in input, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConvertBackAsync(impl::abi_arg_in input, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConvertBackAsync(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConvertBackAsync(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -499,11 +531,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetPhonemesAsync(abi_arg_in input, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetPhonemesAsync(impl::abi_arg_in input, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetPhonemesAsync(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetPhonemesAsync(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -517,11 +550,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in languageTag, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in languageTag, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -539,7 +573,8 @@ struct produce : produce_base { try { - *codepoint = detach(this->shim().GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate)); + typename D::abi_guard guard(this->shim()); + *codepoint = detach_abi(this->shim().GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate)); return S_OK; } catch (...) @@ -552,6 +587,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().GetSurrogatePairFromCodepoint(codepoint, *highSurrogate, *lowSurrogate); return S_OK; } @@ -565,7 +601,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsHighSurrogate(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHighSurrogate(codepoint)); return S_OK; } catch (...) @@ -578,7 +615,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsLowSurrogate(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLowSurrogate(codepoint)); return S_OK; } catch (...) @@ -591,7 +629,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsSupplementary(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSupplementary(codepoint)); return S_OK; } catch (...) @@ -604,7 +643,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsNoncharacter(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNoncharacter(codepoint)); return S_OK; } catch (...) @@ -617,7 +657,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsWhitespace(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWhitespace(codepoint)); return S_OK; } catch (...) @@ -630,7 +671,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsAlphabetic(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAlphabetic(codepoint)); return S_OK; } catch (...) @@ -643,7 +685,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsCased(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCased(codepoint)); return S_OK; } catch (...) @@ -656,7 +699,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsUppercase(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUppercase(codepoint)); return S_OK; } catch (...) @@ -669,7 +713,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsLowercase(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLowercase(codepoint)); return S_OK; } catch (...) @@ -682,7 +727,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsIdStart(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIdStart(codepoint)); return S_OK; } catch (...) @@ -695,7 +741,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsIdContinue(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIdContinue(codepoint)); return S_OK; } catch (...) @@ -708,7 +755,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsGraphemeBase(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGraphemeBase(codepoint)); return S_OK; } catch (...) @@ -721,7 +769,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsGraphemeExtend(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGraphemeExtend(codepoint)); return S_OK; } catch (...) @@ -734,7 +783,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().GetNumericType(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericType(codepoint)); return S_OK; } catch (...) @@ -747,7 +797,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().GetGeneralCategory(codepoint)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetGeneralCategory(codepoint)); return S_OK; } catch (...) @@ -760,11 +811,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -774,11 +826,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourceTextSegment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceTextSegment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceTextSegment()); return S_OK; } catch (...) @@ -787,11 +840,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AlternateForms(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AlternateForms()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateForms()); return S_OK; } catch (...) @@ -805,11 +859,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ResolvedLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -819,11 +874,12 @@ struct produce : produce_base text, uint32_t startIndex, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetTokenAt(impl::abi_arg_in text, uint32_t startIndex, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); return S_OK; } catch (...) @@ -833,11 +889,12 @@ struct produce : produce_base text, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetTokens(impl::abi_arg_in text, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetTokens(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTokens(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -847,10 +904,11 @@ struct produce : produce_base text, uint32_t startIndex, abi_arg_in handler) noexcept override + HRESULT __stdcall abi_Tokenize(impl::abi_arg_in text, uint32_t startIndex, impl::abi_arg_in handler) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tokenize(*reinterpret_cast(&text), startIndex, *reinterpret_cast(&handler)); return S_OK; } @@ -864,11 +922,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWithLanguage(abi_arg_in language, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithLanguage(impl::abi_arg_in language, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); return S_OK; } catch (...) @@ -883,413 +942,413 @@ struct produce : produce_base Windows::Data::Text::SemanticTextQuery impl_ISemanticTextQueryFactory::Create(hstring_ref aqsFilter) const +template Windows::Data::Text::SemanticTextQuery impl_ISemanticTextQueryFactory::Create(hstring_view aqsFilter) const { Windows::Data::Text::SemanticTextQuery result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(aqsFilter), put(result))); + check_hresult(WINRT_SHIM(ISemanticTextQueryFactory)->abi_Create(get_abi(aqsFilter), put_abi(result))); return result; } -template Windows::Data::Text::SemanticTextQuery impl_ISemanticTextQueryFactory::CreateWithLanguage(hstring_ref aqsFilter, hstring_ref filterLanguage) const +template Windows::Data::Text::SemanticTextQuery impl_ISemanticTextQueryFactory::CreateWithLanguage(hstring_view aqsFilter, hstring_view filterLanguage) const { Windows::Data::Text::SemanticTextQuery result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithLanguage(get(aqsFilter), get(filterLanguage), put(result))); + check_hresult(WINRT_SHIM(ISemanticTextQueryFactory)->abi_CreateWithLanguage(get_abi(aqsFilter), get_abi(filterLanguage), put_abi(result))); return result; } -template Windows::Foundation::Collections::IVectorView impl_ISemanticTextQuery::Find(hstring_ref content) const +template Windows::Foundation::Collections::IVectorView impl_ISemanticTextQuery::Find(hstring_view content) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_Find(get(content), put(result))); + check_hresult(WINRT_SHIM(ISemanticTextQuery)->abi_Find(get_abi(content), put_abi(result))); return result; } -template Windows::Foundation::Collections::IVectorView impl_ISemanticTextQuery::FindInProperty(hstring_ref propertyContent, hstring_ref propertyName) const +template Windows::Foundation::Collections::IVectorView impl_ISemanticTextQuery::FindInProperty(hstring_view propertyContent, hstring_view propertyName) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_FindInProperty(get(propertyContent), get(propertyName), put(result))); + check_hresult(WINRT_SHIM(ISemanticTextQuery)->abi_FindInProperty(get_abi(propertyContent), get_abi(propertyName), put_abi(result))); return result; } template uint32_t impl_IUnicodeCharactersStatics::GetCodepointFromSurrogatePair(uint32_t highSurrogate, uint32_t lowSurrogate) const { uint32_t codepoint {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate, &codepoint)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate, &codepoint)); return codepoint; } template void impl_IUnicodeCharactersStatics::GetSurrogatePairFromCodepoint(uint32_t codepoint, wchar_t & highSurrogate, wchar_t & lowSurrogate) const { - check_hresult(static_cast(static_cast(*this))->abi_GetSurrogatePairFromCodepoint(codepoint, &highSurrogate, &lowSurrogate)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_GetSurrogatePairFromCodepoint(codepoint, &highSurrogate, &lowSurrogate)); } template bool impl_IUnicodeCharactersStatics::IsHighSurrogate(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsHighSurrogate(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsHighSurrogate(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsLowSurrogate(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsLowSurrogate(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsLowSurrogate(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsSupplementary(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupplementary(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsSupplementary(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsNoncharacter(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsNoncharacter(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsNoncharacter(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsWhitespace(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsWhitespace(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsWhitespace(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsAlphabetic(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsAlphabetic(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsAlphabetic(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsCased(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCased(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsCased(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsUppercase(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsUppercase(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsUppercase(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsLowercase(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsLowercase(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsLowercase(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsIdStart(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsIdStart(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsIdStart(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsIdContinue(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsIdContinue(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsIdContinue(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsGraphemeBase(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsGraphemeBase(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsGraphemeBase(codepoint, &value)); return value; } template bool impl_IUnicodeCharactersStatics::IsGraphemeExtend(uint32_t codepoint) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsGraphemeExtend(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_IsGraphemeExtend(codepoint, &value)); return value; } template Windows::Data::Text::UnicodeNumericType impl_IUnicodeCharactersStatics::GetNumericType(uint32_t codepoint) const { Windows::Data::Text::UnicodeNumericType value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericType(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_GetNumericType(codepoint, &value)); return value; } template Windows::Data::Text::UnicodeGeneralCategory impl_IUnicodeCharactersStatics::GetGeneralCategory(uint32_t codepoint) const { Windows::Data::Text::UnicodeGeneralCategory value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetGeneralCategory(codepoint, &value)); + check_hresult(WINRT_SHIM(IUnicodeCharactersStatics)->abi_GetGeneralCategory(codepoint, &value)); return value; } template Windows::Data::Text::TextSegment impl_IAlternateWordForm::SourceTextSegment() const { Windows::Data::Text::TextSegment value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceTextSegment(put(value))); + check_hresult(WINRT_SHIM(IAlternateWordForm)->get_SourceTextSegment(put_abi(value))); return value; } template hstring impl_IAlternateWordForm::AlternateText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlternateText(put(value))); + check_hresult(WINRT_SHIM(IAlternateWordForm)->get_AlternateText(put_abi(value))); return value; } template Windows::Data::Text::AlternateNormalizationFormat impl_IAlternateWordForm::NormalizationFormat() const { Windows::Data::Text::AlternateNormalizationFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizationFormat(&value)); + check_hresult(WINRT_SHIM(IAlternateWordForm)->get_NormalizationFormat(&value)); return value; } template hstring impl_ISelectableWordSegment::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ISelectableWordSegment)->get_Text(put_abi(value))); return value; } template Windows::Data::Text::TextSegment impl_ISelectableWordSegment::SourceTextSegment() const { Windows::Data::Text::TextSegment value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceTextSegment(put(value))); + check_hresult(WINRT_SHIM(ISelectableWordSegment)->get_SourceTextSegment(put_abi(value))); return value; } template hstring impl_IWordSegment::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IWordSegment)->get_Text(put_abi(value))); return value; } template Windows::Data::Text::TextSegment impl_IWordSegment::SourceTextSegment() const { Windows::Data::Text::TextSegment value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceTextSegment(put(value))); + check_hresult(WINRT_SHIM(IWordSegment)->get_SourceTextSegment(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWordSegment::AlternateForms() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AlternateForms(put(value))); + check_hresult(WINRT_SHIM(IWordSegment)->get_AlternateForms(put_abi(value))); return value; } template hstring impl_IWordsSegmenter::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(IWordsSegmenter)->get_ResolvedLanguage(put_abi(value))); return value; } -template Windows::Data::Text::WordSegment impl_IWordsSegmenter::GetTokenAt(hstring_ref text, uint32_t startIndex) const +template Windows::Data::Text::WordSegment impl_IWordsSegmenter::GetTokenAt(hstring_view text, uint32_t startIndex) const { Windows::Data::Text::WordSegment result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTokenAt(get(text), startIndex, put(result))); + check_hresult(WINRT_SHIM(IWordsSegmenter)->abi_GetTokenAt(get_abi(text), startIndex, put_abi(result))); return result; } -template Windows::Foundation::Collections::IVectorView impl_IWordsSegmenter::GetTokens(hstring_ref text) const +template Windows::Foundation::Collections::IVectorView impl_IWordsSegmenter::GetTokens(hstring_view text) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetTokens(get(text), put(result))); + check_hresult(WINRT_SHIM(IWordsSegmenter)->abi_GetTokens(get_abi(text), put_abi(result))); return result; } -template void impl_IWordsSegmenter::Tokenize(hstring_ref text, uint32_t startIndex, const Windows::Data::Text::WordSegmentsTokenizingHandler & handler) const +template void impl_IWordsSegmenter::Tokenize(hstring_view text, uint32_t startIndex, const Windows::Data::Text::WordSegmentsTokenizingHandler & handler) const { - check_hresult(static_cast(static_cast(*this))->abi_Tokenize(get(text), startIndex, get(handler))); + check_hresult(WINRT_SHIM(IWordsSegmenter)->abi_Tokenize(get_abi(text), startIndex, get_abi(handler))); } -template Windows::Data::Text::WordsSegmenter impl_IWordsSegmenterFactory::CreateWithLanguage(hstring_ref language) const +template Windows::Data::Text::WordsSegmenter impl_IWordsSegmenterFactory::CreateWithLanguage(hstring_view language) const { Windows::Data::Text::WordsSegmenter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithLanguage(get(language), put(result))); + check_hresult(WINRT_SHIM(IWordsSegmenterFactory)->abi_CreateWithLanguage(get_abi(language), put_abi(result))); return result; } template hstring impl_ISelectableWordsSegmenter::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(ISelectableWordsSegmenter)->get_ResolvedLanguage(put_abi(value))); return value; } -template Windows::Data::Text::SelectableWordSegment impl_ISelectableWordsSegmenter::GetTokenAt(hstring_ref text, uint32_t startIndex) const +template Windows::Data::Text::SelectableWordSegment impl_ISelectableWordsSegmenter::GetTokenAt(hstring_view text, uint32_t startIndex) const { Windows::Data::Text::SelectableWordSegment result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTokenAt(get(text), startIndex, put(result))); + check_hresult(WINRT_SHIM(ISelectableWordsSegmenter)->abi_GetTokenAt(get_abi(text), startIndex, put_abi(result))); return result; } -template Windows::Foundation::Collections::IVectorView impl_ISelectableWordsSegmenter::GetTokens(hstring_ref text) const +template Windows::Foundation::Collections::IVectorView impl_ISelectableWordsSegmenter::GetTokens(hstring_view text) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetTokens(get(text), put(result))); + check_hresult(WINRT_SHIM(ISelectableWordsSegmenter)->abi_GetTokens(get_abi(text), put_abi(result))); return result; } -template void impl_ISelectableWordsSegmenter::Tokenize(hstring_ref text, uint32_t startIndex, const Windows::Data::Text::SelectableWordSegmentsTokenizingHandler & handler) const +template void impl_ISelectableWordsSegmenter::Tokenize(hstring_view text, uint32_t startIndex, const Windows::Data::Text::SelectableWordSegmentsTokenizingHandler & handler) const { - check_hresult(static_cast(static_cast(*this))->abi_Tokenize(get(text), startIndex, get(handler))); + check_hresult(WINRT_SHIM(ISelectableWordsSegmenter)->abi_Tokenize(get_abi(text), startIndex, get_abi(handler))); } -template Windows::Data::Text::SelectableWordsSegmenter impl_ISelectableWordsSegmenterFactory::CreateWithLanguage(hstring_ref language) const +template Windows::Data::Text::SelectableWordsSegmenter impl_ISelectableWordsSegmenterFactory::CreateWithLanguage(hstring_view language) const { Windows::Data::Text::SelectableWordsSegmenter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithLanguage(get(language), put(result))); + check_hresult(WINRT_SHIM(ISelectableWordsSegmenterFactory)->abi_CreateWithLanguage(get_abi(language), put_abi(result))); return result; } template hstring impl_ITextPredictionGenerator::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(ITextPredictionGenerator)->get_ResolvedLanguage(put_abi(value))); return value; } template bool impl_ITextPredictionGenerator::LanguageAvailableButNotInstalled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LanguageAvailableButNotInstalled(&value)); + check_hresult(WINRT_SHIM(ITextPredictionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } -template Windows::Foundation::IAsyncOperation> impl_ITextPredictionGenerator::GetCandidatesAsync(hstring_ref input) const +template Windows::Foundation::IAsyncOperation> impl_ITextPredictionGenerator::GetCandidatesAsync(hstring_view input) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetCandidatesAsync(get(input), put(result))); + check_hresult(WINRT_SHIM(ITextPredictionGenerator)->abi_GetCandidatesAsync(get_abi(input), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation> impl_ITextPredictionGenerator::GetCandidatesAsync(hstring_ref input, uint32_t maxCandidates) const +template Windows::Foundation::IAsyncOperation> impl_ITextPredictionGenerator::GetCandidatesAsync(hstring_view input, uint32_t maxCandidates) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetCandidatesWithMaxCountAsync(get(input), maxCandidates, put(result))); + check_hresult(WINRT_SHIM(ITextPredictionGenerator)->abi_GetCandidatesWithMaxCountAsync(get_abi(input), maxCandidates, put_abi(result))); return result; } -template Windows::Data::Text::TextPredictionGenerator impl_ITextPredictionGeneratorFactory::Create(hstring_ref languageTag) const +template Windows::Data::Text::TextPredictionGenerator impl_ITextPredictionGeneratorFactory::Create(hstring_view languageTag) const { Windows::Data::Text::TextPredictionGenerator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(languageTag), put(result))); + check_hresult(WINRT_SHIM(ITextPredictionGeneratorFactory)->abi_Create(get_abi(languageTag), put_abi(result))); return result; } template hstring impl_ITextConversionGenerator::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(ITextConversionGenerator)->get_ResolvedLanguage(put_abi(value))); return value; } template bool impl_ITextConversionGenerator::LanguageAvailableButNotInstalled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LanguageAvailableButNotInstalled(&value)); + check_hresult(WINRT_SHIM(ITextConversionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } -template Windows::Foundation::IAsyncOperation> impl_ITextConversionGenerator::GetCandidatesAsync(hstring_ref input) const +template Windows::Foundation::IAsyncOperation> impl_ITextConversionGenerator::GetCandidatesAsync(hstring_view input) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetCandidatesAsync(get(input), put(result))); + check_hresult(WINRT_SHIM(ITextConversionGenerator)->abi_GetCandidatesAsync(get_abi(input), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation> impl_ITextConversionGenerator::GetCandidatesAsync(hstring_ref input, uint32_t maxCandidates) const +template Windows::Foundation::IAsyncOperation> impl_ITextConversionGenerator::GetCandidatesAsync(hstring_view input, uint32_t maxCandidates) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetCandidatesWithMaxCountAsync(get(input), maxCandidates, put(result))); + check_hresult(WINRT_SHIM(ITextConversionGenerator)->abi_GetCandidatesWithMaxCountAsync(get_abi(input), maxCandidates, put_abi(result))); return result; } -template Windows::Data::Text::TextConversionGenerator impl_ITextConversionGeneratorFactory::Create(hstring_ref languageTag) const +template Windows::Data::Text::TextConversionGenerator impl_ITextConversionGeneratorFactory::Create(hstring_view languageTag) const { Windows::Data::Text::TextConversionGenerator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(languageTag), put(result))); + check_hresult(WINRT_SHIM(ITextConversionGeneratorFactory)->abi_Create(get_abi(languageTag), put_abi(result))); return result; } template hstring impl_ITextReverseConversionGenerator::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(ITextReverseConversionGenerator)->get_ResolvedLanguage(put_abi(value))); return value; } template bool impl_ITextReverseConversionGenerator::LanguageAvailableButNotInstalled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LanguageAvailableButNotInstalled(&value)); + check_hresult(WINRT_SHIM(ITextReverseConversionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_ITextReverseConversionGenerator::ConvertBackAsync(hstring_ref input) const +template Windows::Foundation::IAsyncOperation impl_ITextReverseConversionGenerator::ConvertBackAsync(hstring_view input) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConvertBackAsync(get(input), put(result))); + check_hresult(WINRT_SHIM(ITextReverseConversionGenerator)->abi_ConvertBackAsync(get_abi(input), put_abi(result))); return result; } -template Windows::Data::Text::TextReverseConversionGenerator impl_ITextReverseConversionGeneratorFactory::Create(hstring_ref languageTag) const +template Windows::Data::Text::TextReverseConversionGenerator impl_ITextReverseConversionGeneratorFactory::Create(hstring_view languageTag) const { Windows::Data::Text::TextReverseConversionGenerator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(languageTag), put(result))); + check_hresult(WINRT_SHIM(ITextReverseConversionGeneratorFactory)->abi_Create(get_abi(languageTag), put_abi(result))); return result; } template hstring impl_ITextPhoneme::DisplayText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayText(put(value))); + check_hresult(WINRT_SHIM(ITextPhoneme)->get_DisplayText(put_abi(value))); return value; } template hstring impl_ITextPhoneme::ReadingText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ReadingText(put(value))); + check_hresult(WINRT_SHIM(ITextPhoneme)->get_ReadingText(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_ITextReverseConversionGenerator2::GetPhonemesAsync(hstring_ref input) const +template Windows::Foundation::IAsyncOperation> impl_ITextReverseConversionGenerator2::GetPhonemesAsync(hstring_view input) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetPhonemesAsync(get(input), put(result))); + check_hresult(WINRT_SHIM(ITextReverseConversionGenerator2)->abi_GetPhonemesAsync(get_abi(input), put_abi(result))); return result; } -inline SelectableWordsSegmenter::SelectableWordsSegmenter(hstring_ref language) : +inline SelectableWordsSegmenter::SelectableWordsSegmenter(hstring_view language) : SelectableWordsSegmenter(get_activation_factory().CreateWithLanguage(language)) {} -inline SemanticTextQuery::SemanticTextQuery(hstring_ref aqsFilter) : +inline SemanticTextQuery::SemanticTextQuery(hstring_view aqsFilter) : SemanticTextQuery(get_activation_factory().Create(aqsFilter)) {} -inline SemanticTextQuery::SemanticTextQuery(hstring_ref aqsFilter, hstring_ref filterLanguage) : +inline SemanticTextQuery::SemanticTextQuery(hstring_view aqsFilter, hstring_view filterLanguage) : SemanticTextQuery(get_activation_factory().CreateWithLanguage(aqsFilter, filterLanguage)) {} -inline TextConversionGenerator::TextConversionGenerator(hstring_ref languageTag) : +inline TextConversionGenerator::TextConversionGenerator(hstring_view languageTag) : TextConversionGenerator(get_activation_factory().Create(languageTag)) {} -inline TextPredictionGenerator::TextPredictionGenerator(hstring_ref languageTag) : +inline TextPredictionGenerator::TextPredictionGenerator(hstring_view languageTag) : TextPredictionGenerator(get_activation_factory().Create(languageTag)) {} -inline TextReverseConversionGenerator::TextReverseConversionGenerator(hstring_ref languageTag) : +inline TextReverseConversionGenerator::TextReverseConversionGenerator(hstring_view languageTag) : TextReverseConversionGenerator(get_activation_factory().Create(languageTag)) {} @@ -1378,10 +1437,264 @@ inline Windows::Data::Text::UnicodeGeneralCategory UnicodeCharacters::GetGeneral return get_activation_factory().GetGeneralCategory(codepoint); } -inline WordsSegmenter::WordsSegmenter(hstring_ref language) : +inline WordsSegmenter::WordsSegmenter(hstring_view language) : WordsSegmenter(get_activation_factory().CreateWithLanguage(language)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::IAlternateWordForm & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ISelectableWordSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ISelectableWordsSegmenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ISelectableWordsSegmenterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ISemanticTextQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ISemanticTextQueryFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextConversionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextConversionGeneratorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextPhoneme & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextPredictionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextPredictionGeneratorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextReverseConversionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextReverseConversionGenerator2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::ITextReverseConversionGeneratorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::IUnicodeCharactersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::IWordSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::IWordsSegmenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::IWordsSegmenterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::AlternateWordForm & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::SelectableWordSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::SelectableWordsSegmenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::SemanticTextQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::TextConversionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::TextPhoneme & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::TextPredictionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::TextReverseConversionGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::WordSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Text::WordsSegmenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Xml.Dom.h b/10.0.14393.0/winrt/Windows.Data.Xml.Dom.h index 075946a26..dec34e402 100644 --- a/10.0.14393.0/winrt/Windows.Data.Xml.Dom.h +++ b/10.0.14393.0/winrt/Windows.Data.Xml.Dom.h @@ -1,10 +1,13 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once -#include "internal/Windows.Storage.3.h" +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" +#include "internal/Windows.Storage.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Data.Xml.Dom.3.h" #include "Windows.Foundation.Collections.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_PublicId(abi_arg_out value) noexcept override + HRESULT __stdcall get_PublicId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublicId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicId()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SystemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemId()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NotationName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NotationName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotationName()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PublicId(abi_arg_out value) noexcept override + HRESULT __stdcall get_PublicId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublicId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicId()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SystemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemId()); return S_OK; } catch (...) @@ -94,11 +102,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -112,7 +121,8 @@ struct produce : produce_baseshim().Specified()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Specified()); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -135,10 +146,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return S_OK; } @@ -156,11 +168,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -170,10 +183,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -187,7 +201,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -196,11 +211,12 @@ struct produce : produce_base data) noexcept override + HRESULT __stdcall abi_SubstringData(uint32_t offset, uint32_t count, impl::abi_arg_out data) noexcept override { try { - *data = detach(this->shim().SubstringData(offset, count)); + typename D::abi_guard guard(this->shim()); + *data = detach_abi(this->shim().SubstringData(offset, count)); return S_OK; } catch (...) @@ -210,10 +226,11 @@ struct produce : produce_base data) noexcept override + HRESULT __stdcall abi_AppendData(impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendData(*reinterpret_cast(&data)); return S_OK; } @@ -223,10 +240,11 @@ struct produce : produce_base data) noexcept override + HRESULT __stdcall abi_InsertData(uint32_t offset, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertData(offset, *reinterpret_cast(&data)); return S_OK; } @@ -240,6 +258,7 @@ struct produce : produce_baseshim()); this->shim().DeleteData(offset, count); return S_OK; } @@ -249,10 +268,11 @@ struct produce : produce_base data) noexcept override + HRESULT __stdcall abi_ReplaceData(uint32_t offset, uint32_t count, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReplaceData(offset, count, *reinterpret_cast(&data)); return S_OK; } @@ -270,11 +290,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Doctype(abi_arg_out value) noexcept override + HRESULT __stdcall get_Doctype(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Doctype()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Doctype()); return S_OK; } catch (...) @@ -284,11 +305,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Implementation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Implementation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Implementation()); return S_OK; } catch (...) @@ -298,11 +320,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DocumentElement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentElement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentElement()); return S_OK; } catch (...) @@ -312,11 +335,12 @@ struct produce : produce_base tagName, abi_arg_out newElement) noexcept override + HRESULT __stdcall abi_CreateElement(impl::abi_arg_in tagName, impl::abi_arg_out newElement) noexcept override { try { - *newElement = detach(this->shim().CreateElement(*reinterpret_cast(&tagName))); + typename D::abi_guard guard(this->shim()); + *newElement = detach_abi(this->shim().CreateElement(*reinterpret_cast(&tagName))); return S_OK; } catch (...) @@ -326,11 +350,12 @@ struct produce : produce_base newDocumentFragment) noexcept override + HRESULT __stdcall abi_CreateDocumentFragment(impl::abi_arg_out newDocumentFragment) noexcept override { try { - *newDocumentFragment = detach(this->shim().CreateDocumentFragment()); + typename D::abi_guard guard(this->shim()); + *newDocumentFragment = detach_abi(this->shim().CreateDocumentFragment()); return S_OK; } catch (...) @@ -340,11 +365,12 @@ struct produce : produce_base data, abi_arg_out newTextNode) noexcept override + HRESULT __stdcall abi_CreateTextNode(impl::abi_arg_in data, impl::abi_arg_out newTextNode) noexcept override { try { - *newTextNode = detach(this->shim().CreateTextNode(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *newTextNode = detach_abi(this->shim().CreateTextNode(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -354,11 +380,12 @@ struct produce : produce_base data, abi_arg_out newComment) noexcept override + HRESULT __stdcall abi_CreateComment(impl::abi_arg_in data, impl::abi_arg_out newComment) noexcept override { try { - *newComment = detach(this->shim().CreateComment(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *newComment = detach_abi(this->shim().CreateComment(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -368,11 +395,12 @@ struct produce : produce_base target, abi_arg_in data, abi_arg_out newProcessingInstruction) noexcept override + HRESULT __stdcall abi_CreateProcessingInstruction(impl::abi_arg_in target, impl::abi_arg_in data, impl::abi_arg_out newProcessingInstruction) noexcept override { try { - *newProcessingInstruction = detach(this->shim().CreateProcessingInstruction(*reinterpret_cast(&target), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *newProcessingInstruction = detach_abi(this->shim().CreateProcessingInstruction(*reinterpret_cast(&target), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -382,11 +410,12 @@ struct produce : produce_base name, abi_arg_out newAttribute) noexcept override + HRESULT __stdcall abi_CreateAttribute(impl::abi_arg_in name, impl::abi_arg_out newAttribute) noexcept override { try { - *newAttribute = detach(this->shim().CreateAttribute(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_abi(this->shim().CreateAttribute(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -396,11 +425,12 @@ struct produce : produce_base name, abi_arg_out newEntityReference) noexcept override + HRESULT __stdcall abi_CreateEntityReference(impl::abi_arg_in name, impl::abi_arg_out newEntityReference) noexcept override { try { - *newEntityReference = detach(this->shim().CreateEntityReference(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *newEntityReference = detach_abi(this->shim().CreateEntityReference(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -410,11 +440,12 @@ struct produce : produce_base tagName, abi_arg_out elements) noexcept override + HRESULT __stdcall abi_GetElementsByTagName(impl::abi_arg_in tagName, impl::abi_arg_out elements) noexcept override { try { - *elements = detach(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + typename D::abi_guard guard(this->shim()); + *elements = detach_abi(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); return S_OK; } catch (...) @@ -424,11 +455,12 @@ struct produce : produce_base data, abi_arg_out newCDataSection) noexcept override + HRESULT __stdcall abi_CreateCDataSection(impl::abi_arg_in data, impl::abi_arg_out newCDataSection) noexcept override { try { - *newCDataSection = detach(this->shim().CreateCDataSection(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *newCDataSection = detach_abi(this->shim().CreateCDataSection(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -438,11 +470,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DocumentUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentUri()); return S_OK; } catch (...) @@ -452,11 +485,12 @@ struct produce : produce_base namespaceUri, abi_arg_in qualifiedName, abi_arg_out newAttribute) noexcept override + HRESULT __stdcall abi_CreateAttributeNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in qualifiedName, impl::abi_arg_out newAttribute) noexcept override { try { - *newAttribute = detach(this->shim().CreateAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_abi(this->shim().CreateAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); return S_OK; } catch (...) @@ -466,11 +500,12 @@ struct produce : produce_base namespaceUri, abi_arg_in qualifiedName, abi_arg_out newElement) noexcept override + HRESULT __stdcall abi_CreateElementNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in qualifiedName, impl::abi_arg_out newElement) noexcept override { try { - *newElement = detach(this->shim().CreateElementNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + typename D::abi_guard guard(this->shim()); + *newElement = detach_abi(this->shim().CreateElementNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); return S_OK; } catch (...) @@ -480,11 +515,12 @@ struct produce : produce_base elementId, abi_arg_out element) noexcept override + HRESULT __stdcall abi_GetElementById(impl::abi_arg_in elementId, impl::abi_arg_out element) noexcept override { try { - *element = detach(this->shim().GetElementById(*reinterpret_cast(&elementId))); + typename D::abi_guard guard(this->shim()); + *element = detach_abi(this->shim().GetElementById(*reinterpret_cast(&elementId))); return S_OK; } catch (...) @@ -494,11 +530,12 @@ struct produce : produce_base node, bool deep, abi_arg_out newNode) noexcept override + HRESULT __stdcall abi_ImportNode(impl::abi_arg_in node, bool deep, impl::abi_arg_out newNode) noexcept override { try { - *newNode = detach(this->shim().ImportNode(*reinterpret_cast(&node), deep)); + typename D::abi_guard guard(this->shim()); + *newNode = detach_abi(this->shim().ImportNode(*reinterpret_cast(&node), deep)); return S_OK; } catch (...) @@ -516,10 +553,11 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_LoadXml(abi_arg_in xml) noexcept override + HRESULT __stdcall abi_LoadXml(impl::abi_arg_in xml) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadXml(*reinterpret_cast(&xml)); return S_OK; } @@ -529,10 +567,11 @@ struct produce : produce_base xml, abi_arg_in loadSettings) noexcept override + HRESULT __stdcall abi_LoadXmlWithSettings(impl::abi_arg_in xml, impl::abi_arg_in loadSettings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadXml(*reinterpret_cast(&xml), *reinterpret_cast(&loadSettings)); return S_OK; } @@ -542,11 +581,12 @@ struct produce : produce_base file, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SaveToFileAsync(impl::abi_arg_in file, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SaveToFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SaveToFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -560,10 +600,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LoadXmlFromBuffer(abi_arg_in buffer) noexcept override + HRESULT __stdcall abi_LoadXmlFromBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -573,10 +614,11 @@ struct produce : produce_base buffer, abi_arg_in loadSettings) noexcept override + HRESULT __stdcall abi_LoadXmlFromBufferWithSettings(impl::abi_arg_in buffer, impl::abi_arg_in loadSettings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer), *reinterpret_cast(&loadSettings)); return S_OK; } @@ -590,11 +632,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LoadFromUriAsync(abi_arg_in uri, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromUriAsync(impl::abi_arg_in uri, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -604,11 +647,12 @@ struct produce : produce_base uri, abi_arg_in loadSettings, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromUriWithSettingsAsync(impl::abi_arg_in uri, impl::abi_arg_in loadSettings, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&loadSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&loadSettings))); return S_OK; } catch (...) @@ -618,11 +662,12 @@ struct produce : produce_base file, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromFileAsync(impl::abi_arg_in file, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -632,11 +677,12 @@ struct produce : produce_base file, abi_arg_in loadSettings, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_LoadFromFileWithSettingsAsync(impl::abi_arg_in file, impl::abi_arg_in loadSettings, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&loadSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&loadSettings))); return S_OK; } catch (...) @@ -650,11 +696,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -664,11 +711,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Entities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Entities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Entities()); return S_OK; } catch (...) @@ -678,11 +726,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Notations(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Notations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Notations()); return S_OK; } catch (...) @@ -696,11 +745,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_HasFeature(abi_arg_in feature, abi_arg_in version, bool * featureSupported) noexcept override + HRESULT __stdcall abi_HasFeature(impl::abi_arg_in feature, impl::abi_arg_in version, bool * featureSupported) noexcept override { try { - *featureSupported = detach(this->shim().HasFeature(*reinterpret_cast(&feature), *reinterpret_cast(&version))); + typename D::abi_guard guard(this->shim()); + *featureSupported = detach_abi(this->shim().HasFeature(*reinterpret_cast(&feature), *reinterpret_cast(&version))); return S_OK; } catch (...) @@ -713,11 +763,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_TagName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TagName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TagName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TagName()); return S_OK; } catch (...) @@ -727,11 +778,12 @@ struct produce : produce_base attributeName, abi_arg_out attributeValue) noexcept override + HRESULT __stdcall abi_GetAttribute(impl::abi_arg_in attributeName, impl::abi_arg_out attributeValue) noexcept override { try { - *attributeValue = detach(this->shim().GetAttribute(*reinterpret_cast(&attributeName))); + typename D::abi_guard guard(this->shim()); + *attributeValue = detach_abi(this->shim().GetAttribute(*reinterpret_cast(&attributeName))); return S_OK; } catch (...) @@ -741,10 +793,11 @@ struct produce : produce_base attributeName, abi_arg_in attributeValue) noexcept override + HRESULT __stdcall abi_SetAttribute(impl::abi_arg_in attributeName, impl::abi_arg_in attributeValue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAttribute(*reinterpret_cast(&attributeName), *reinterpret_cast(&attributeValue)); return S_OK; } @@ -754,10 +807,11 @@ struct produce : produce_base attributeName) noexcept override + HRESULT __stdcall abi_RemoveAttribute(impl::abi_arg_in attributeName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAttribute(*reinterpret_cast(&attributeName)); return S_OK; } @@ -767,11 +821,12 @@ struct produce : produce_base attributeName, abi_arg_out attributeNode) noexcept override + HRESULT __stdcall abi_GetAttributeNode(impl::abi_arg_in attributeName, impl::abi_arg_out attributeNode) noexcept override { try { - *attributeNode = detach(this->shim().GetAttributeNode(*reinterpret_cast(&attributeName))); + typename D::abi_guard guard(this->shim()); + *attributeNode = detach_abi(this->shim().GetAttributeNode(*reinterpret_cast(&attributeName))); return S_OK; } catch (...) @@ -781,11 +836,12 @@ struct produce : produce_base newAttribute, abi_arg_out previousAttribute) noexcept override + HRESULT __stdcall abi_SetAttributeNode(impl::abi_arg_in newAttribute, impl::abi_arg_out previousAttribute) noexcept override { try { - *previousAttribute = detach(this->shim().SetAttributeNode(*reinterpret_cast(&newAttribute))); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_abi(this->shim().SetAttributeNode(*reinterpret_cast(&newAttribute))); return S_OK; } catch (...) @@ -795,11 +851,12 @@ struct produce : produce_base attributeNode, abi_arg_out removedAttribute) noexcept override + HRESULT __stdcall abi_RemoveAttributeNode(impl::abi_arg_in attributeNode, impl::abi_arg_out removedAttribute) noexcept override { try { - *removedAttribute = detach(this->shim().RemoveAttributeNode(*reinterpret_cast(&attributeNode))); + typename D::abi_guard guard(this->shim()); + *removedAttribute = detach_abi(this->shim().RemoveAttributeNode(*reinterpret_cast(&attributeNode))); return S_OK; } catch (...) @@ -809,11 +866,12 @@ struct produce : produce_base tagName, abi_arg_out elements) noexcept override + HRESULT __stdcall abi_GetElementsByTagName(impl::abi_arg_in tagName, impl::abi_arg_out elements) noexcept override { try { - *elements = detach(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + typename D::abi_guard guard(this->shim()); + *elements = detach_abi(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); return S_OK; } catch (...) @@ -823,11 +881,12 @@ struct produce : produce_base namespaceUri, abi_arg_in qualifiedName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAttributeNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in qualifiedName, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -836,11 +895,12 @@ struct produce : produce_base namespaceUri, abi_arg_in localName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAttributeNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in localName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); return S_OK; } catch (...) @@ -850,11 +910,12 @@ struct produce : produce_base namespaceUri, abi_arg_in localName) noexcept override + HRESULT __stdcall abi_RemoveAttributeNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in localName) noexcept override { try { - this->shim().RemoveAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName)); + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName)); return S_OK; } catch (...) @@ -863,11 +924,12 @@ struct produce : produce_base newAttribute, abi_arg_out previousAttribute) noexcept override + HRESULT __stdcall abi_SetAttributeNodeNS(impl::abi_arg_in newAttribute, impl::abi_arg_out previousAttribute) noexcept override { try { - *previousAttribute = detach(this->shim().SetAttributeNodeNS(*reinterpret_cast(&newAttribute))); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_abi(this->shim().SetAttributeNodeNS(*reinterpret_cast(&newAttribute))); return S_OK; } catch (...) @@ -877,11 +939,12 @@ struct produce : produce_base namespaceUri, abi_arg_in localName, abi_arg_out previousAttribute) noexcept override + HRESULT __stdcall abi_GetAttributeNodeNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in localName, impl::abi_arg_out previousAttribute) noexcept override { try { - *previousAttribute = detach(this->shim().GetAttributeNodeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_abi(this->shim().GetAttributeNodeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); return S_OK; } catch (...) @@ -903,7 +966,8 @@ struct produce : produce_baseshim().MaxElementDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxElementDepth()); return S_OK; } catch (...) @@ -916,6 +980,7 @@ struct produce : produce_baseshim()); this->shim().MaxElementDepth(value); return S_OK; } @@ -929,7 +994,8 @@ struct produce : produce_baseshim().ProhibitDtd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProhibitDtd()); return S_OK; } catch (...) @@ -942,6 +1008,7 @@ struct produce : produce_baseshim()); this->shim().ProhibitDtd(value); return S_OK; } @@ -955,7 +1022,8 @@ struct produce : produce_baseshim().ResolveExternals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolveExternals()); return S_OK; } catch (...) @@ -968,6 +1036,7 @@ struct produce : produce_baseshim()); this->shim().ResolveExternals(value); return S_OK; } @@ -981,7 +1050,8 @@ struct produce : produce_baseshim().ValidateOnParse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValidateOnParse()); return S_OK; } catch (...) @@ -994,6 +1064,7 @@ struct produce : produce_baseshim()); this->shim().ValidateOnParse(value); return S_OK; } @@ -1007,7 +1078,8 @@ struct produce : produce_baseshim().ElementContentWhiteSpace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementContentWhiteSpace()); return S_OK; } catch (...) @@ -1020,6 +1092,7 @@ struct produce : produce_baseshim()); this->shim().ElementContentWhiteSpace(value); return S_OK; } @@ -1037,7 +1110,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -1046,11 +1120,12 @@ struct produce : produce_base node) noexcept override + HRESULT __stdcall abi_Item(uint32_t index, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().Item(index)); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().Item(index)); return S_OK; } catch (...) @@ -1060,11 +1135,12 @@ struct produce : produce_base name, abi_arg_out node) noexcept override + HRESULT __stdcall abi_GetNamedItem(impl::abi_arg_in name, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().GetNamedItem(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().GetNamedItem(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1074,11 +1150,12 @@ struct produce : produce_base node, abi_arg_out previousNode) noexcept override + HRESULT __stdcall abi_SetNamedItem(impl::abi_arg_in node, impl::abi_arg_out previousNode) noexcept override { try { - *previousNode = detach(this->shim().SetNamedItem(*reinterpret_cast(&node))); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_abi(this->shim().SetNamedItem(*reinterpret_cast(&node))); return S_OK; } catch (...) @@ -1088,11 +1165,12 @@ struct produce : produce_base name, abi_arg_out previousNode) noexcept override + HRESULT __stdcall abi_RemoveNamedItem(impl::abi_arg_in name, impl::abi_arg_out previousNode) noexcept override { try { - *previousNode = detach(this->shim().RemoveNamedItem(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_abi(this->shim().RemoveNamedItem(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1102,11 +1180,12 @@ struct produce : produce_base namespaceUri, abi_arg_in name, abi_arg_out node) noexcept override + HRESULT __stdcall abi_GetNamedItemNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in name, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().GetNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().GetNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1116,11 +1195,12 @@ struct produce : produce_base namespaceUri, abi_arg_in name, abi_arg_out previousNode) noexcept override + HRESULT __stdcall abi_RemoveNamedItemNS(impl::abi_arg_in namespaceUri, impl::abi_arg_in name, impl::abi_arg_out previousNode) noexcept override { try { - *previousNode = detach(this->shim().RemoveNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_abi(this->shim().RemoveNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1130,11 +1210,12 @@ struct produce : produce_base node, abi_arg_out previousNode) noexcept override + HRESULT __stdcall abi_SetNamedItemNS(impl::abi_arg_in node, impl::abi_arg_out previousNode) noexcept override { try { - *previousNode = detach(this->shim().SetNamedItemNS(*reinterpret_cast(&node))); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_abi(this->shim().SetNamedItemNS(*reinterpret_cast(&node))); return S_OK; } catch (...) @@ -1148,11 +1229,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_NodeValue(abi_arg_out value) noexcept override + HRESULT __stdcall get_NodeValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NodeValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NodeValue()); return S_OK; } catch (...) @@ -1162,11 +1244,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_NodeValue(impl::abi_arg_in value) noexcept override { try { - this->shim().NodeValue(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().NodeValue(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -1179,7 +1262,8 @@ struct produce : produce_baseshim().NodeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NodeType()); return S_OK; } catch (...) @@ -1188,11 +1272,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NodeName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NodeName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NodeName()); return S_OK; } catch (...) @@ -1202,11 +1287,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ParentNode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentNode()); return S_OK; } catch (...) @@ -1216,11 +1302,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ChildNodes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildNodes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildNodes()); return S_OK; } catch (...) @@ -1230,11 +1317,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstChild(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstChild()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstChild()); return S_OK; } catch (...) @@ -1244,11 +1332,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LastChild(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastChild()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastChild()); return S_OK; } catch (...) @@ -1258,11 +1347,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PreviousSibling(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviousSibling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousSibling()); return S_OK; } catch (...) @@ -1272,11 +1362,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NextSibling(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextSibling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextSibling()); return S_OK; } catch (...) @@ -1286,11 +1377,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Attributes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Attributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Attributes()); return S_OK; } catch (...) @@ -1304,7 +1396,8 @@ struct produce : produce_baseshim().HasChildNodes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasChildNodes()); return S_OK; } catch (...) @@ -1313,11 +1406,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OwnerDocument(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OwnerDocument()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OwnerDocument()); return S_OK; } catch (...) @@ -1327,11 +1421,12 @@ struct produce : produce_base newChild, abi_arg_in referenceChild, abi_arg_out insertedChild) noexcept override + HRESULT __stdcall abi_InsertBefore(impl::abi_arg_in newChild, impl::abi_arg_in referenceChild, impl::abi_arg_out insertedChild) noexcept override { try { - *insertedChild = detach(this->shim().InsertBefore(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + typename D::abi_guard guard(this->shim()); + *insertedChild = detach_abi(this->shim().InsertBefore(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); return S_OK; } catch (...) @@ -1341,11 +1436,12 @@ struct produce : produce_base newChild, abi_arg_in referenceChild, abi_arg_out previousChild) noexcept override + HRESULT __stdcall abi_ReplaceChild(impl::abi_arg_in newChild, impl::abi_arg_in referenceChild, impl::abi_arg_out previousChild) noexcept override { try { - *previousChild = detach(this->shim().ReplaceChild(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + typename D::abi_guard guard(this->shim()); + *previousChild = detach_abi(this->shim().ReplaceChild(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); return S_OK; } catch (...) @@ -1355,11 +1451,12 @@ struct produce : produce_base childNode, abi_arg_out removedChild) noexcept override + HRESULT __stdcall abi_RemoveChild(impl::abi_arg_in childNode, impl::abi_arg_out removedChild) noexcept override { try { - *removedChild = detach(this->shim().RemoveChild(*reinterpret_cast(&childNode))); + typename D::abi_guard guard(this->shim()); + *removedChild = detach_abi(this->shim().RemoveChild(*reinterpret_cast(&childNode))); return S_OK; } catch (...) @@ -1369,11 +1466,12 @@ struct produce : produce_base newChild, abi_arg_out appendedChild) noexcept override + HRESULT __stdcall abi_AppendChild(impl::abi_arg_in newChild, impl::abi_arg_out appendedChild) noexcept override { try { - *appendedChild = detach(this->shim().AppendChild(*reinterpret_cast(&newChild))); + typename D::abi_guard guard(this->shim()); + *appendedChild = detach_abi(this->shim().AppendChild(*reinterpret_cast(&newChild))); return S_OK; } catch (...) @@ -1383,11 +1481,12 @@ struct produce : produce_base newNode) noexcept override + HRESULT __stdcall abi_CloneNode(bool deep, impl::abi_arg_out newNode) noexcept override { try { - *newNode = detach(this->shim().CloneNode(deep)); + typename D::abi_guard guard(this->shim()); + *newNode = detach_abi(this->shim().CloneNode(deep)); return S_OK; } catch (...) @@ -1397,11 +1496,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NamespaceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NamespaceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NamespaceUri()); return S_OK; } catch (...) @@ -1411,11 +1511,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LocalName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalName()); return S_OK; } catch (...) @@ -1425,11 +1526,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Prefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Prefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Prefix()); return S_OK; } catch (...) @@ -1443,6 +1545,7 @@ struct produce : produce_baseshim()); this->shim().Normalize(); return S_OK; } @@ -1452,11 +1555,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Prefix(impl::abi_arg_in value) noexcept override { try { - this->shim().Prefix(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Prefix(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -1473,7 +1577,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -1482,11 +1587,12 @@ struct produce : produce_base node) noexcept override + HRESULT __stdcall abi_Item(uint32_t index, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().Item(index)); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().Item(index)); return S_OK; } catch (...) @@ -1500,11 +1606,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SelectSingleNode(abi_arg_in xpath, abi_arg_out node) noexcept override + HRESULT __stdcall abi_SelectSingleNode(impl::abi_arg_in xpath, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().SelectSingleNode(*reinterpret_cast(&xpath))); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().SelectSingleNode(*reinterpret_cast(&xpath))); return S_OK; } catch (...) @@ -1514,11 +1621,12 @@ struct produce : produce_base xpath, abi_arg_out nodelist) noexcept override + HRESULT __stdcall abi_SelectNodes(impl::abi_arg_in xpath, impl::abi_arg_out nodelist) noexcept override { try { - *nodelist = detach(this->shim().SelectNodes(*reinterpret_cast(&xpath))); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_abi(this->shim().SelectNodes(*reinterpret_cast(&xpath))); return S_OK; } catch (...) @@ -1528,11 +1636,12 @@ struct produce : produce_base xpath, abi_arg_in namespaces, abi_arg_out node) noexcept override + HRESULT __stdcall abi_SelectSingleNodeNS(impl::abi_arg_in xpath, impl::abi_arg_in namespaces, impl::abi_arg_out node) noexcept override { try { - *node = detach(this->shim().SelectSingleNodeNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + typename D::abi_guard guard(this->shim()); + *node = detach_abi(this->shim().SelectSingleNodeNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); return S_OK; } catch (...) @@ -1542,11 +1651,12 @@ struct produce : produce_base xpath, abi_arg_in namespaces, abi_arg_out nodelist) noexcept override + HRESULT __stdcall abi_SelectNodesNS(impl::abi_arg_in xpath, impl::abi_arg_in namespaces, impl::abi_arg_out nodelist) noexcept override { try { - *nodelist = detach(this->shim().SelectNodesNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_abi(this->shim().SelectNodesNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); return S_OK; } catch (...) @@ -1560,11 +1670,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetXml(abi_arg_out outerXml) noexcept override + HRESULT __stdcall abi_GetXml(impl::abi_arg_out outerXml) noexcept override { try { - *outerXml = detach(this->shim().GetXml()); + typename D::abi_guard guard(this->shim()); + *outerXml = detach_abi(this->shim().GetXml()); return S_OK; } catch (...) @@ -1574,11 +1685,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InnerText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InnerText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InnerText()); return S_OK; } catch (...) @@ -1588,10 +1700,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_InnerText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InnerText(*reinterpret_cast(&value)); return S_OK; } @@ -1605,11 +1718,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Target(abi_arg_out value) noexcept override + HRESULT __stdcall get_Target(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Target()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Target()); return S_OK; } catch (...) @@ -1619,11 +1733,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1633,10 +1748,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -1650,11 +1766,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_SplitText(uint32_t offset, abi_arg_out secondPart) noexcept override + HRESULT __stdcall abi_SplitText(uint32_t offset, impl::abi_arg_out secondPart) noexcept override { try { - *secondPart = detach(this->shim().SplitText(offset)); + typename D::abi_guard guard(this->shim()); + *secondPart = detach_abi(this->shim().SplitText(offset)); return S_OK; } catch (...) @@ -1669,753 +1786,753 @@ struct produce : produce_base Windows::Data::Xml::Dom::IXmlNode impl_IXmlNodeSelector::SelectSingleNode(hstring_ref xpath) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNodeSelector::SelectSingleNode(hstring_view xpath) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_SelectSingleNode(get(xpath), put(node))); + check_hresult(WINRT_SHIM(IXmlNodeSelector)->abi_SelectSingleNode(get_abi(xpath), put_abi(node))); return node; } -template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlNodeSelector::SelectNodes(hstring_ref xpath) const +template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlNodeSelector::SelectNodes(hstring_view xpath) const { Windows::Data::Xml::Dom::XmlNodeList nodelist { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectNodes(get(xpath), put(nodelist))); + check_hresult(WINRT_SHIM(IXmlNodeSelector)->abi_SelectNodes(get_abi(xpath), put_abi(nodelist))); return nodelist; } -template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNodeSelector::SelectSingleNodeNS(hstring_ref xpath, const Windows::IInspectable & namespaces) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNodeSelector::SelectSingleNodeNS(hstring_view xpath, const Windows::Foundation::IInspectable & namespaces) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_SelectSingleNodeNS(get(xpath), get(namespaces), put(node))); + check_hresult(WINRT_SHIM(IXmlNodeSelector)->abi_SelectSingleNodeNS(get_abi(xpath), get_abi(namespaces), put_abi(node))); return node; } -template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlNodeSelector::SelectNodesNS(hstring_ref xpath, const Windows::IInspectable & namespaces) const +template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlNodeSelector::SelectNodesNS(hstring_view xpath, const Windows::Foundation::IInspectable & namespaces) const { Windows::Data::Xml::Dom::XmlNodeList nodelist { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectNodesNS(get(xpath), get(namespaces), put(nodelist))); + check_hresult(WINRT_SHIM(IXmlNodeSelector)->abi_SelectNodesNS(get_abi(xpath), get_abi(namespaces), put_abi(nodelist))); return nodelist; } template hstring impl_IXmlNodeSerializer::GetXml() const { hstring outerXml; - check_hresult(static_cast(static_cast(*this))->abi_GetXml(put(outerXml))); + check_hresult(WINRT_SHIM(IXmlNodeSerializer)->abi_GetXml(put_abi(outerXml))); return outerXml; } template hstring impl_IXmlNodeSerializer::InnerText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InnerText(put(value))); + check_hresult(WINRT_SHIM(IXmlNodeSerializer)->get_InnerText(put_abi(value))); return value; } -template void impl_IXmlNodeSerializer::InnerText(hstring_ref value) const +template void impl_IXmlNodeSerializer::InnerText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_InnerText(get(value))); + check_hresult(WINRT_SHIM(IXmlNodeSerializer)->put_InnerText(get_abi(value))); } -template Windows::IInspectable impl_IXmlNode::NodeValue() const +template Windows::Foundation::IInspectable impl_IXmlNode::NodeValue() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_NodeValue(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IXmlNode)->get_NodeValue(put_abi(value))); return value; } -template void impl_IXmlNode::NodeValue(const Windows::IInspectable & value) const +template void impl_IXmlNode::NodeValue(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_NodeValue(get(value))); + check_hresult(WINRT_SHIM(IXmlNode)->put_NodeValue(get_abi(value))); } template Windows::Data::Xml::Dom::NodeType impl_IXmlNode::NodeType() const { Windows::Data::Xml::Dom::NodeType value {}; - check_hresult(static_cast(static_cast(*this))->get_NodeType(&value)); + check_hresult(WINRT_SHIM(IXmlNode)->get_NodeType(&value)); return value; } template hstring impl_IXmlNode::NodeName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NodeName(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_NodeName(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::ParentNode() const { Windows::Data::Xml::Dom::IXmlNode value; - check_hresult(static_cast(static_cast(*this))->get_ParentNode(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_ParentNode(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlNode::ChildNodes() const { Windows::Data::Xml::Dom::XmlNodeList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildNodes(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_ChildNodes(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::FirstChild() const { Windows::Data::Xml::Dom::IXmlNode value; - check_hresult(static_cast(static_cast(*this))->get_FirstChild(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_FirstChild(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::LastChild() const { Windows::Data::Xml::Dom::IXmlNode value; - check_hresult(static_cast(static_cast(*this))->get_LastChild(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_LastChild(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::PreviousSibling() const { Windows::Data::Xml::Dom::IXmlNode value; - check_hresult(static_cast(static_cast(*this))->get_PreviousSibling(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_PreviousSibling(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::NextSibling() const { Windows::Data::Xml::Dom::IXmlNode value; - check_hresult(static_cast(static_cast(*this))->get_NextSibling(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_NextSibling(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlNamedNodeMap impl_IXmlNode::Attributes() const { Windows::Data::Xml::Dom::XmlNamedNodeMap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Attributes(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_Attributes(put_abi(value))); return value; } template bool impl_IXmlNode::HasChildNodes() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_HasChildNodes(&value)); + check_hresult(WINRT_SHIM(IXmlNode)->abi_HasChildNodes(&value)); return value; } template Windows::Data::Xml::Dom::XmlDocument impl_IXmlNode::OwnerDocument() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OwnerDocument(put(value))); + check_hresult(WINRT_SHIM(IXmlNode)->get_OwnerDocument(put_abi(value))); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::InsertBefore(const Windows::Data::Xml::Dom::IXmlNode & newChild, const Windows::Data::Xml::Dom::IXmlNode & referenceChild) const { Windows::Data::Xml::Dom::IXmlNode insertedChild; - check_hresult(static_cast(static_cast(*this))->abi_InsertBefore(get(newChild), get(referenceChild), put(insertedChild))); + check_hresult(WINRT_SHIM(IXmlNode)->abi_InsertBefore(get_abi(newChild), get_abi(referenceChild), put_abi(insertedChild))); return insertedChild; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::ReplaceChild(const Windows::Data::Xml::Dom::IXmlNode & newChild, const Windows::Data::Xml::Dom::IXmlNode & referenceChild) const { Windows::Data::Xml::Dom::IXmlNode previousChild; - check_hresult(static_cast(static_cast(*this))->abi_ReplaceChild(get(newChild), get(referenceChild), put(previousChild))); + check_hresult(WINRT_SHIM(IXmlNode)->abi_ReplaceChild(get_abi(newChild), get_abi(referenceChild), put_abi(previousChild))); return previousChild; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::RemoveChild(const Windows::Data::Xml::Dom::IXmlNode & childNode) const { Windows::Data::Xml::Dom::IXmlNode removedChild; - check_hresult(static_cast(static_cast(*this))->abi_RemoveChild(get(childNode), put(removedChild))); + check_hresult(WINRT_SHIM(IXmlNode)->abi_RemoveChild(get_abi(childNode), put_abi(removedChild))); return removedChild; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::AppendChild(const Windows::Data::Xml::Dom::IXmlNode & newChild) const { Windows::Data::Xml::Dom::IXmlNode appendedChild; - check_hresult(static_cast(static_cast(*this))->abi_AppendChild(get(newChild), put(appendedChild))); + check_hresult(WINRT_SHIM(IXmlNode)->abi_AppendChild(get_abi(newChild), put_abi(appendedChild))); return appendedChild; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNode::CloneNode(bool deep) const { Windows::Data::Xml::Dom::IXmlNode newNode; - check_hresult(static_cast(static_cast(*this))->abi_CloneNode(deep, put(newNode))); + check_hresult(WINRT_SHIM(IXmlNode)->abi_CloneNode(deep, put_abi(newNode))); return newNode; } -template Windows::IInspectable impl_IXmlNode::NamespaceUri() const +template Windows::Foundation::IInspectable impl_IXmlNode::NamespaceUri() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_NamespaceUri(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IXmlNode)->get_NamespaceUri(put_abi(value))); return value; } -template Windows::IInspectable impl_IXmlNode::LocalName() const +template Windows::Foundation::IInspectable impl_IXmlNode::LocalName() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_LocalName(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IXmlNode)->get_LocalName(put_abi(value))); return value; } -template Windows::IInspectable impl_IXmlNode::Prefix() const +template Windows::Foundation::IInspectable impl_IXmlNode::Prefix() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Prefix(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IXmlNode)->get_Prefix(put_abi(value))); return value; } template void impl_IXmlNode::Normalize() const { - check_hresult(static_cast(static_cast(*this))->abi_Normalize()); + check_hresult(WINRT_SHIM(IXmlNode)->abi_Normalize()); } -template void impl_IXmlNode::Prefix(const Windows::IInspectable & value) const +template void impl_IXmlNode::Prefix(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Prefix(get(value))); + check_hresult(WINRT_SHIM(IXmlNode)->put_Prefix(get_abi(value))); } -template bool impl_IXmlDomImplementation::HasFeature(hstring_ref feature, const Windows::IInspectable & version) const +template bool impl_IXmlDomImplementation::HasFeature(hstring_view feature, const Windows::Foundation::IInspectable & version) const { bool featureSupported {}; - check_hresult(static_cast(static_cast(*this))->abi_HasFeature(get(feature), get(version), &featureSupported)); + check_hresult(WINRT_SHIM(IXmlDomImplementation)->abi_HasFeature(get_abi(feature), get_abi(version), &featureSupported)); return featureSupported; } template hstring impl_IXmlDocumentType::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IXmlDocumentType)->get_Name(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlNamedNodeMap impl_IXmlDocumentType::Entities() const { Windows::Data::Xml::Dom::XmlNamedNodeMap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Entities(put(value))); + check_hresult(WINRT_SHIM(IXmlDocumentType)->get_Entities(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlNamedNodeMap impl_IXmlDocumentType::Notations() const { Windows::Data::Xml::Dom::XmlNamedNodeMap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Notations(put(value))); + check_hresult(WINRT_SHIM(IXmlDocumentType)->get_Notations(put_abi(value))); return value; } template hstring impl_IXmlAttribute::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IXmlAttribute)->get_Name(put_abi(value))); return value; } template bool impl_IXmlAttribute::Specified() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Specified(&value)); + check_hresult(WINRT_SHIM(IXmlAttribute)->get_Specified(&value)); return value; } template hstring impl_IXmlAttribute::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IXmlAttribute)->get_Value(put_abi(value))); return value; } -template void impl_IXmlAttribute::Value(hstring_ref value) const +template void impl_IXmlAttribute::Value(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IXmlAttribute)->put_Value(get_abi(value))); } template hstring impl_IXmlElement::TagName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TagName(put(value))); + check_hresult(WINRT_SHIM(IXmlElement)->get_TagName(put_abi(value))); return value; } -template hstring impl_IXmlElement::GetAttribute(hstring_ref attributeName) const +template hstring impl_IXmlElement::GetAttribute(hstring_view attributeName) const { hstring attributeValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAttribute(get(attributeName), put(attributeValue))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_GetAttribute(get_abi(attributeName), put_abi(attributeValue))); return attributeValue; } -template void impl_IXmlElement::SetAttribute(hstring_ref attributeName, hstring_ref attributeValue) const +template void impl_IXmlElement::SetAttribute(hstring_view attributeName, hstring_view attributeValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAttribute(get(attributeName), get(attributeValue))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_SetAttribute(get_abi(attributeName), get_abi(attributeValue))); } -template void impl_IXmlElement::RemoveAttribute(hstring_ref attributeName) const +template void impl_IXmlElement::RemoveAttribute(hstring_view attributeName) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAttribute(get(attributeName))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_RemoveAttribute(get_abi(attributeName))); } -template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::GetAttributeNode(hstring_ref attributeName) const +template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::GetAttributeNode(hstring_view attributeName) const { Windows::Data::Xml::Dom::XmlAttribute attributeNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAttributeNode(get(attributeName), put(attributeNode))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_GetAttributeNode(get_abi(attributeName), put_abi(attributeNode))); return attributeNode; } template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::SetAttributeNode(const Windows::Data::Xml::Dom::XmlAttribute & newAttribute) const { Windows::Data::Xml::Dom::XmlAttribute previousAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SetAttributeNode(get(newAttribute), put(previousAttribute))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_SetAttributeNode(get_abi(newAttribute), put_abi(previousAttribute))); return previousAttribute; } template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::RemoveAttributeNode(const Windows::Data::Xml::Dom::XmlAttribute & attributeNode) const { Windows::Data::Xml::Dom::XmlAttribute removedAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RemoveAttributeNode(get(attributeNode), put(removedAttribute))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_RemoveAttributeNode(get_abi(attributeNode), put_abi(removedAttribute))); return removedAttribute; } -template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlElement::GetElementsByTagName(hstring_ref tagName) const +template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlElement::GetElementsByTagName(hstring_view tagName) const { Windows::Data::Xml::Dom::XmlNodeList elements { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetElementsByTagName(get(tagName), put(elements))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_GetElementsByTagName(get_abi(tagName), put_abi(elements))); return elements; } -template void impl_IXmlElement::SetAttributeNS(const Windows::IInspectable & namespaceUri, hstring_ref qualifiedName, hstring_ref value) const +template void impl_IXmlElement::SetAttributeNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view qualifiedName, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAttributeNS(get(namespaceUri), get(qualifiedName), get(value))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_SetAttributeNS(get_abi(namespaceUri), get_abi(qualifiedName), get_abi(value))); } -template hstring impl_IXmlElement::GetAttributeNS(const Windows::IInspectable & namespaceUri, hstring_ref localName) const +template hstring impl_IXmlElement::GetAttributeNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view localName) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetAttributeNS(get(namespaceUri), get(localName), put(value))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_GetAttributeNS(get_abi(namespaceUri), get_abi(localName), put_abi(value))); return value; } -template void impl_IXmlElement::RemoveAttributeNS(const Windows::IInspectable & namespaceUri, hstring_ref localName) const +template void impl_IXmlElement::RemoveAttributeNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view localName) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAttributeNS(get(namespaceUri), get(localName))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_RemoveAttributeNS(get_abi(namespaceUri), get_abi(localName))); } template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::SetAttributeNodeNS(const Windows::Data::Xml::Dom::XmlAttribute & newAttribute) const { Windows::Data::Xml::Dom::XmlAttribute previousAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SetAttributeNodeNS(get(newAttribute), put(previousAttribute))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_SetAttributeNodeNS(get_abi(newAttribute), put_abi(previousAttribute))); return previousAttribute; } -template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::GetAttributeNodeNS(const Windows::IInspectable & namespaceUri, hstring_ref localName) const +template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlElement::GetAttributeNodeNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view localName) const { Windows::Data::Xml::Dom::XmlAttribute previousAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAttributeNodeNS(get(namespaceUri), get(localName), put(previousAttribute))); + check_hresult(WINRT_SHIM(IXmlElement)->abi_GetAttributeNodeNS(get_abi(namespaceUri), get_abi(localName), put_abi(previousAttribute))); return previousAttribute; } -template Windows::IInspectable impl_IDtdNotation::PublicId() const +template Windows::Foundation::IInspectable impl_IDtdNotation::PublicId() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_PublicId(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDtdNotation)->get_PublicId(put_abi(value))); return value; } -template Windows::IInspectable impl_IDtdNotation::SystemId() const +template Windows::Foundation::IInspectable impl_IDtdNotation::SystemId() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SystemId(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDtdNotation)->get_SystemId(put_abi(value))); return value; } -template Windows::IInspectable impl_IDtdEntity::PublicId() const +template Windows::Foundation::IInspectable impl_IDtdEntity::PublicId() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_PublicId(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDtdEntity)->get_PublicId(put_abi(value))); return value; } -template Windows::IInspectable impl_IDtdEntity::SystemId() const +template Windows::Foundation::IInspectable impl_IDtdEntity::SystemId() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SystemId(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDtdEntity)->get_SystemId(put_abi(value))); return value; } -template Windows::IInspectable impl_IDtdEntity::NotationName() const +template Windows::Foundation::IInspectable impl_IDtdEntity::NotationName() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_NotationName(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDtdEntity)->get_NotationName(put_abi(value))); return value; } template hstring impl_IXmlProcessingInstruction::Target() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Target(put(value))); + check_hresult(WINRT_SHIM(IXmlProcessingInstruction)->get_Target(put_abi(value))); return value; } template hstring impl_IXmlProcessingInstruction::Data() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IXmlProcessingInstruction)->get_Data(put_abi(value))); return value; } -template void impl_IXmlProcessingInstruction::Data(hstring_ref value) const +template void impl_IXmlProcessingInstruction::Data(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IXmlProcessingInstruction)->put_Data(get_abi(value))); } template hstring impl_IXmlCharacterData::Data() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->get_Data(put_abi(value))); return value; } -template void impl_IXmlCharacterData::Data(hstring_ref value) const +template void impl_IXmlCharacterData::Data(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->put_Data(get_abi(value))); } template uint32_t impl_IXmlCharacterData::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IXmlCharacterData)->get_Length(&value)); return value; } template hstring impl_IXmlCharacterData::SubstringData(uint32_t offset, uint32_t count) const { hstring data; - check_hresult(static_cast(static_cast(*this))->abi_SubstringData(offset, count, put(data))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->abi_SubstringData(offset, count, put_abi(data))); return data; } -template void impl_IXmlCharacterData::AppendData(hstring_ref data) const +template void impl_IXmlCharacterData::AppendData(hstring_view data) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendData(get(data))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->abi_AppendData(get_abi(data))); } -template void impl_IXmlCharacterData::InsertData(uint32_t offset, hstring_ref data) const +template void impl_IXmlCharacterData::InsertData(uint32_t offset, hstring_view data) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertData(offset, get(data))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->abi_InsertData(offset, get_abi(data))); } template void impl_IXmlCharacterData::DeleteData(uint32_t offset, uint32_t count) const { - check_hresult(static_cast(static_cast(*this))->abi_DeleteData(offset, count)); + check_hresult(WINRT_SHIM(IXmlCharacterData)->abi_DeleteData(offset, count)); } -template void impl_IXmlCharacterData::ReplaceData(uint32_t offset, uint32_t count, hstring_ref data) const +template void impl_IXmlCharacterData::ReplaceData(uint32_t offset, uint32_t count, hstring_view data) const { - check_hresult(static_cast(static_cast(*this))->abi_ReplaceData(offset, count, get(data))); + check_hresult(WINRT_SHIM(IXmlCharacterData)->abi_ReplaceData(offset, count, get_abi(data))); } template Windows::Data::Xml::Dom::IXmlText impl_IXmlText::SplitText(uint32_t offset) const { Windows::Data::Xml::Dom::IXmlText secondPart; - check_hresult(static_cast(static_cast(*this))->abi_SplitText(offset, put(secondPart))); + check_hresult(WINRT_SHIM(IXmlText)->abi_SplitText(offset, put_abi(secondPart))); return secondPart; } template Windows::Data::Xml::Dom::XmlDocumentType impl_IXmlDocument::Doctype() const { Windows::Data::Xml::Dom::XmlDocumentType value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Doctype(put(value))); + check_hresult(WINRT_SHIM(IXmlDocument)->get_Doctype(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlDomImplementation impl_IXmlDocument::Implementation() const { Windows::Data::Xml::Dom::XmlDomImplementation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Implementation(put(value))); + check_hresult(WINRT_SHIM(IXmlDocument)->get_Implementation(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::DocumentElement() const { Windows::Data::Xml::Dom::XmlElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentElement(put(value))); + check_hresult(WINRT_SHIM(IXmlDocument)->get_DocumentElement(put_abi(value))); return value; } -template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::CreateElement(hstring_ref tagName) const +template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::CreateElement(hstring_view tagName) const { Windows::Data::Xml::Dom::XmlElement newElement { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateElement(get(tagName), put(newElement))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateElement(get_abi(tagName), put_abi(newElement))); return newElement; } template Windows::Data::Xml::Dom::XmlDocumentFragment impl_IXmlDocument::CreateDocumentFragment() const { Windows::Data::Xml::Dom::XmlDocumentFragment newDocumentFragment { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDocumentFragment(put(newDocumentFragment))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateDocumentFragment(put_abi(newDocumentFragment))); return newDocumentFragment; } -template Windows::Data::Xml::Dom::XmlText impl_IXmlDocument::CreateTextNode(hstring_ref data) const +template Windows::Data::Xml::Dom::XmlText impl_IXmlDocument::CreateTextNode(hstring_view data) const { Windows::Data::Xml::Dom::XmlText newTextNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTextNode(get(data), put(newTextNode))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateTextNode(get_abi(data), put_abi(newTextNode))); return newTextNode; } -template Windows::Data::Xml::Dom::XmlComment impl_IXmlDocument::CreateComment(hstring_ref data) const +template Windows::Data::Xml::Dom::XmlComment impl_IXmlDocument::CreateComment(hstring_view data) const { Windows::Data::Xml::Dom::XmlComment newComment { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateComment(get(data), put(newComment))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateComment(get_abi(data), put_abi(newComment))); return newComment; } -template Windows::Data::Xml::Dom::XmlProcessingInstruction impl_IXmlDocument::CreateProcessingInstruction(hstring_ref target, hstring_ref data) const +template Windows::Data::Xml::Dom::XmlProcessingInstruction impl_IXmlDocument::CreateProcessingInstruction(hstring_view target, hstring_view data) const { Windows::Data::Xml::Dom::XmlProcessingInstruction newProcessingInstruction { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateProcessingInstruction(get(target), get(data), put(newProcessingInstruction))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateProcessingInstruction(get_abi(target), get_abi(data), put_abi(newProcessingInstruction))); return newProcessingInstruction; } -template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlDocument::CreateAttribute(hstring_ref name) const +template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlDocument::CreateAttribute(hstring_view name) const { Windows::Data::Xml::Dom::XmlAttribute newAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttribute(get(name), put(newAttribute))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateAttribute(get_abi(name), put_abi(newAttribute))); return newAttribute; } -template Windows::Data::Xml::Dom::XmlEntityReference impl_IXmlDocument::CreateEntityReference(hstring_ref name) const +template Windows::Data::Xml::Dom::XmlEntityReference impl_IXmlDocument::CreateEntityReference(hstring_view name) const { Windows::Data::Xml::Dom::XmlEntityReference newEntityReference { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateEntityReference(get(name), put(newEntityReference))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateEntityReference(get_abi(name), put_abi(newEntityReference))); return newEntityReference; } -template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlDocument::GetElementsByTagName(hstring_ref tagName) const +template Windows::Data::Xml::Dom::XmlNodeList impl_IXmlDocument::GetElementsByTagName(hstring_view tagName) const { Windows::Data::Xml::Dom::XmlNodeList elements { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetElementsByTagName(get(tagName), put(elements))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_GetElementsByTagName(get_abi(tagName), put_abi(elements))); return elements; } -template Windows::Data::Xml::Dom::XmlCDataSection impl_IXmlDocument::CreateCDataSection(hstring_ref data) const +template Windows::Data::Xml::Dom::XmlCDataSection impl_IXmlDocument::CreateCDataSection(hstring_view data) const { Windows::Data::Xml::Dom::XmlCDataSection newCDataSection { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCDataSection(get(data), put(newCDataSection))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateCDataSection(get_abi(data), put_abi(newCDataSection))); return newCDataSection; } template hstring impl_IXmlDocument::DocumentUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DocumentUri(put(value))); + check_hresult(WINRT_SHIM(IXmlDocument)->get_DocumentUri(put_abi(value))); return value; } -template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlDocument::CreateAttributeNS(const Windows::IInspectable & namespaceUri, hstring_ref qualifiedName) const +template Windows::Data::Xml::Dom::XmlAttribute impl_IXmlDocument::CreateAttributeNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view qualifiedName) const { Windows::Data::Xml::Dom::XmlAttribute newAttribute { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttributeNS(get(namespaceUri), get(qualifiedName), put(newAttribute))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateAttributeNS(get_abi(namespaceUri), get_abi(qualifiedName), put_abi(newAttribute))); return newAttribute; } -template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::CreateElementNS(const Windows::IInspectable & namespaceUri, hstring_ref qualifiedName) const +template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::CreateElementNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view qualifiedName) const { Windows::Data::Xml::Dom::XmlElement newElement { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateElementNS(get(namespaceUri), get(qualifiedName), put(newElement))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_CreateElementNS(get_abi(namespaceUri), get_abi(qualifiedName), put_abi(newElement))); return newElement; } -template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::GetElementById(hstring_ref elementId) const +template Windows::Data::Xml::Dom::XmlElement impl_IXmlDocument::GetElementById(hstring_view elementId) const { Windows::Data::Xml::Dom::XmlElement element { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetElementById(get(elementId), put(element))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_GetElementById(get_abi(elementId), put_abi(element))); return element; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlDocument::ImportNode(const Windows::Data::Xml::Dom::IXmlNode & node, bool deep) const { Windows::Data::Xml::Dom::IXmlNode newNode; - check_hresult(static_cast(static_cast(*this))->abi_ImportNode(get(node), deep, put(newNode))); + check_hresult(WINRT_SHIM(IXmlDocument)->abi_ImportNode(get_abi(node), deep, put_abi(newNode))); return newNode; } template uint32_t impl_IXmlNamedNodeMap::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->get_Length(&value)); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::Item(uint32_t index) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_Item(index, put(node))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_Item(index, put_abi(node))); return node; } -template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::GetNamedItem(hstring_ref name) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::GetNamedItem(hstring_view name) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedItem(get(name), put(node))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_GetNamedItem(get_abi(name), put_abi(node))); return node; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::SetNamedItem(const Windows::Data::Xml::Dom::IXmlNode & node) const { Windows::Data::Xml::Dom::IXmlNode previousNode; - check_hresult(static_cast(static_cast(*this))->abi_SetNamedItem(get(node), put(previousNode))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_SetNamedItem(get_abi(node), put_abi(previousNode))); return previousNode; } -template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::RemoveNamedItem(hstring_ref name) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::RemoveNamedItem(hstring_view name) const { Windows::Data::Xml::Dom::IXmlNode previousNode; - check_hresult(static_cast(static_cast(*this))->abi_RemoveNamedItem(get(name), put(previousNode))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_RemoveNamedItem(get_abi(name), put_abi(previousNode))); return previousNode; } -template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::GetNamedItemNS(const Windows::IInspectable & namespaceUri, hstring_ref name) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::GetNamedItemNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view name) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_GetNamedItemNS(get(namespaceUri), get(name), put(node))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_GetNamedItemNS(get_abi(namespaceUri), get_abi(name), put_abi(node))); return node; } -template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::RemoveNamedItemNS(const Windows::IInspectable & namespaceUri, hstring_ref name) const +template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::RemoveNamedItemNS(const Windows::Foundation::IInspectable & namespaceUri, hstring_view name) const { Windows::Data::Xml::Dom::IXmlNode previousNode; - check_hresult(static_cast(static_cast(*this))->abi_RemoveNamedItemNS(get(namespaceUri), get(name), put(previousNode))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_RemoveNamedItemNS(get_abi(namespaceUri), get_abi(name), put_abi(previousNode))); return previousNode; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNamedNodeMap::SetNamedItemNS(const Windows::Data::Xml::Dom::IXmlNode & node) const { Windows::Data::Xml::Dom::IXmlNode previousNode; - check_hresult(static_cast(static_cast(*this))->abi_SetNamedItemNS(get(node), put(previousNode))); + check_hresult(WINRT_SHIM(IXmlNamedNodeMap)->abi_SetNamedItemNS(get_abi(node), put_abi(previousNode))); return previousNode; } template uint32_t impl_IXmlNodeList::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IXmlNodeList)->get_Length(&value)); return value; } template Windows::Data::Xml::Dom::IXmlNode impl_IXmlNodeList::Item(uint32_t index) const { Windows::Data::Xml::Dom::IXmlNode node; - check_hresult(static_cast(static_cast(*this))->abi_Item(index, put(node))); + check_hresult(WINRT_SHIM(IXmlNodeList)->abi_Item(index, put_abi(node))); return node; } template uint32_t impl_IXmlLoadSettings::MaxElementDepth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxElementDepth(&value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->get_MaxElementDepth(&value)); return value; } template void impl_IXmlLoadSettings::MaxElementDepth(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxElementDepth(value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->put_MaxElementDepth(value)); } template bool impl_IXmlLoadSettings::ProhibitDtd() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ProhibitDtd(&value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->get_ProhibitDtd(&value)); return value; } template void impl_IXmlLoadSettings::ProhibitDtd(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ProhibitDtd(value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->put_ProhibitDtd(value)); } template bool impl_IXmlLoadSettings::ResolveExternals() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ResolveExternals(&value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->get_ResolveExternals(&value)); return value; } template void impl_IXmlLoadSettings::ResolveExternals(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ResolveExternals(value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->put_ResolveExternals(value)); } template bool impl_IXmlLoadSettings::ValidateOnParse() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ValidateOnParse(&value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->get_ValidateOnParse(&value)); return value; } template void impl_IXmlLoadSettings::ValidateOnParse(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ValidateOnParse(value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->put_ValidateOnParse(value)); } template bool impl_IXmlLoadSettings::ElementContentWhiteSpace() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ElementContentWhiteSpace(&value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->get_ElementContentWhiteSpace(&value)); return value; } template void impl_IXmlLoadSettings::ElementContentWhiteSpace(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ElementContentWhiteSpace(value)); + check_hresult(WINRT_SHIM(IXmlLoadSettings)->put_ElementContentWhiteSpace(value)); } -template void impl_IXmlDocumentIO::LoadXml(hstring_ref xml) const +template void impl_IXmlDocumentIO::LoadXml(hstring_view xml) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadXml(get(xml))); + check_hresult(WINRT_SHIM(IXmlDocumentIO)->abi_LoadXml(get_abi(xml))); } -template void impl_IXmlDocumentIO::LoadXml(hstring_ref xml, const Windows::Data::Xml::Dom::XmlLoadSettings & loadSettings) const +template void impl_IXmlDocumentIO::LoadXml(hstring_view xml, const Windows::Data::Xml::Dom::XmlLoadSettings & loadSettings) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadXmlWithSettings(get(xml), get(loadSettings))); + check_hresult(WINRT_SHIM(IXmlDocumentIO)->abi_LoadXmlWithSettings(get_abi(xml), get_abi(loadSettings))); } template Windows::Foundation::IAsyncAction impl_IXmlDocumentIO::SaveToFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SaveToFileAsync(get(file), put(asyncInfo))); + check_hresult(WINRT_SHIM(IXmlDocumentIO)->abi_SaveToFileAsync(get_abi(file), put_abi(asyncInfo))); return asyncInfo; } template void impl_IXmlDocumentIO2::LoadXmlFromBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadXmlFromBuffer(get(buffer))); + check_hresult(WINRT_SHIM(IXmlDocumentIO2)->abi_LoadXmlFromBuffer(get_abi(buffer))); } template void impl_IXmlDocumentIO2::LoadXmlFromBuffer(const Windows::Storage::Streams::IBuffer & buffer, const Windows::Data::Xml::Dom::XmlLoadSettings & loadSettings) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadXmlFromBufferWithSettings(get(buffer), get(loadSettings))); + check_hresult(WINRT_SHIM(IXmlDocumentIO2)->abi_LoadXmlFromBufferWithSettings(get_abi(buffer), get_abi(loadSettings))); } template Windows::Foundation::IAsyncOperation impl_IXmlDocumentStatics::LoadFromUriAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromUriAsync(get(uri), put(asyncInfo))); + check_hresult(WINRT_SHIM(IXmlDocumentStatics)->abi_LoadFromUriAsync(get_abi(uri), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IXmlDocumentStatics::LoadFromUriAsync(const Windows::Foundation::Uri & uri, const Windows::Data::Xml::Dom::XmlLoadSettings & loadSettings) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromUriWithSettingsAsync(get(uri), get(loadSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IXmlDocumentStatics)->abi_LoadFromUriWithSettingsAsync(get_abi(uri), get_abi(loadSettings), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IXmlDocumentStatics::LoadFromFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromFileAsync(get(file), put(asyncInfo))); + check_hresult(WINRT_SHIM(IXmlDocumentStatics)->abi_LoadFromFileAsync(get_abi(file), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IXmlDocumentStatics::LoadFromFileAsync(const Windows::Storage::IStorageFile & file, const Windows::Data::Xml::Dom::XmlLoadSettings & loadSettings) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LoadFromFileWithSettingsAsync(get(file), get(loadSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IXmlDocumentStatics)->abi_LoadFromFileWithSettingsAsync(get_abi(file), get_abi(loadSettings), put_abi(asyncInfo))); return asyncInfo; } @@ -2450,3 +2567,356 @@ inline XmlLoadSettings::XmlLoadSettings() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IDtdEntity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IDtdNotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlAttribute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlCDataSection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlCharacterData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlComment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocument & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocumentFragment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocumentIO & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocumentIO2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocumentStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDocumentType & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlDomImplementation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlEntityReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlLoadSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlNamedNodeMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlNodeList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlNodeSelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlNodeSerializer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlProcessingInstruction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::IXmlText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::DtdEntity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::DtdNotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlAttribute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlCDataSection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlComment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlDocument & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlDocumentFragment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlDocumentType & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlDomImplementation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlEntityReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlLoadSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlNamedNodeMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlNodeList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlProcessingInstruction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Dom::XmlText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Data.Xml.Xsl.h b/10.0.14393.0/winrt/Windows.Data.Xml.Xsl.h index 979f54001..716410ec5 100644 --- a/10.0.14393.0/winrt/Windows.Data.Xml.Xsl.h +++ b/10.0.14393.0/winrt/Windows.Data.Xml.Xsl.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Data.Xml.Dom.3.h" #include "internal/Windows.Data.Xml.Xsl.3.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_TransformToString(abi_arg_in inputNode, abi_arg_out output) noexcept override + HRESULT __stdcall abi_TransformToString(impl::abi_arg_in inputNode, impl::abi_arg_out output) noexcept override { try { - *output = detach(this->shim().TransformToString(*reinterpret_cast(&inputNode))); + typename D::abi_guard guard(this->shim()); + *output = detach_abi(this->shim().TransformToString(*reinterpret_cast(&inputNode))); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_TransformToDocument(abi_arg_in inputNode, abi_arg_out output) noexcept override + HRESULT __stdcall abi_TransformToDocument(impl::abi_arg_in inputNode, impl::abi_arg_out output) noexcept override { try { - *output = detach(this->shim().TransformToDocument(*reinterpret_cast(&inputNode))); + typename D::abi_guard guard(this->shim()); + *output = detach_abi(this->shim().TransformToDocument(*reinterpret_cast(&inputNode))); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in document, abi_arg_out xsltProcessor) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in document, impl::abi_arg_out xsltProcessor) noexcept override { try { - *xsltProcessor = detach(this->shim().CreateInstance(*reinterpret_cast(&document))); + typename D::abi_guard guard(this->shim()); + *xsltProcessor = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&document))); return S_OK; } catch (...) @@ -71,21 +77,21 @@ namespace Windows::Data::Xml::Xsl { template hstring impl_IXsltProcessor::TransformToString(const Windows::Data::Xml::Dom::IXmlNode & inputNode) const { hstring output; - check_hresult(static_cast(static_cast(*this))->abi_TransformToString(get(inputNode), put(output))); + check_hresult(WINRT_SHIM(IXsltProcessor)->abi_TransformToString(get_abi(inputNode), put_abi(output))); return output; } template Windows::Data::Xml::Dom::XmlDocument impl_IXsltProcessor2::TransformToDocument(const Windows::Data::Xml::Dom::IXmlNode & inputNode) const { Windows::Data::Xml::Dom::XmlDocument output { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TransformToDocument(get(inputNode), put(output))); + check_hresult(WINRT_SHIM(IXsltProcessor2)->abi_TransformToDocument(get_abi(inputNode), put_abi(output))); return output; } template Windows::Data::Xml::Xsl::XsltProcessor impl_IXsltProcessorFactory::CreateInstance(const Windows::Data::Xml::Dom::XmlDocument & document) const { Windows::Data::Xml::Xsl::XsltProcessor xsltProcessor { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(document), put(xsltProcessor))); + check_hresult(WINRT_SHIM(IXsltProcessorFactory)->abi_CreateInstance(get_abi(document), put_abi(xsltProcessor))); return xsltProcessor; } @@ -96,3 +102,41 @@ inline XsltProcessor::XsltProcessor(const Windows::Data::Xml::Dom::XmlDocument & } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Xsl::IXsltProcessor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Xsl::IXsltProcessor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Xsl::IXsltProcessorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Data::Xml::Xsl::XsltProcessor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Adc.Provider.h b/10.0.14393.0/winrt/Windows.Devices.Adc.Provider.h index 2c9b97298..2139df1a8 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Adc.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.Adc.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Adc.Provider.3.h" #include "Windows.Devices.Adc.h" @@ -18,7 +21,8 @@ struct produce : pro { try { - *value = detach(this->shim().ChannelCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelCount()); return S_OK; } catch (...) @@ -31,7 +35,8 @@ struct produce : pro { try { - *value = detach(this->shim().ResolutionInBits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolutionInBits()); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produce : pro { try { - *value = detach(this->shim().MinValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinValue()); return S_OK; } catch (...) @@ -57,7 +63,8 @@ struct produce : pro { try { - *value = detach(this->shim().MaxValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxValue()); return S_OK; } catch (...) @@ -70,7 +77,8 @@ struct produce : pro { try { - *value = detach(this->shim().ChannelMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelMode()); return S_OK; } catch (...) @@ -83,6 +91,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().ChannelMode(value); return S_OK; } @@ -96,7 +105,8 @@ struct produce : pro { try { - *result = detach(this->shim().IsChannelModeSupported(channelMode)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsChannelModeSupported(channelMode)); return S_OK; } catch (...) @@ -109,6 +119,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AcquireChannel(channel); return S_OK; } @@ -122,6 +133,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleaseChannel(channel); return S_OK; } @@ -135,7 +147,8 @@ struct produce : pro { try { - *result = detach(this->shim().ReadValue(channelNumber)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadValue(channelNumber)); return S_OK; } catch (...) @@ -148,11 +161,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetControllers(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetControllers(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetControllers()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetControllers()); return S_OK; } catch (...) @@ -170,74 +184,94 @@ namespace Windows::Devices::Adc::Provider { template int32_t impl_IAdcControllerProvider::ChannelCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelCount(&value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->get_ChannelCount(&value)); return value; } template int32_t impl_IAdcControllerProvider::ResolutionInBits() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ResolutionInBits(&value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->get_ResolutionInBits(&value)); return value; } template int32_t impl_IAdcControllerProvider::MinValue() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinValue(&value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->get_MinValue(&value)); return value; } template int32_t impl_IAdcControllerProvider::MaxValue() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxValue(&value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->get_MaxValue(&value)); return value; } template Windows::Devices::Adc::Provider::ProviderAdcChannelMode impl_IAdcControllerProvider::ChannelMode() const { Windows::Devices::Adc::Provider::ProviderAdcChannelMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelMode(&value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->get_ChannelMode(&value)); return value; } template void impl_IAdcControllerProvider::ChannelMode(Windows::Devices::Adc::Provider::ProviderAdcChannelMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ChannelMode(value)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->put_ChannelMode(value)); } template bool impl_IAdcControllerProvider::IsChannelModeSupported(Windows::Devices::Adc::Provider::ProviderAdcChannelMode channelMode) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsChannelModeSupported(channelMode, &result)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->abi_IsChannelModeSupported(channelMode, &result)); return result; } template void impl_IAdcControllerProvider::AcquireChannel(int32_t channel) const { - check_hresult(static_cast(static_cast(*this))->abi_AcquireChannel(channel)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->abi_AcquireChannel(channel)); } template void impl_IAdcControllerProvider::ReleaseChannel(int32_t channel) const { - check_hresult(static_cast(static_cast(*this))->abi_ReleaseChannel(channel)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->abi_ReleaseChannel(channel)); } template int32_t impl_IAdcControllerProvider::ReadValue(int32_t channelNumber) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadValue(channelNumber, &result)); + check_hresult(WINRT_SHIM(IAdcControllerProvider)->abi_ReadValue(channelNumber, &result)); return result; } template Windows::Foundation::Collections::IVectorView impl_IAdcProvider::GetControllers() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetControllers(put(result))); + check_hresult(WINRT_SHIM(IAdcProvider)->abi_GetControllers(put_abi(result))); return result; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::Provider::IAdcProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Adc.h b/10.0.14393.0/winrt/Windows.Devices.Adc.h index 6ed338451..6a3c361ec 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Adc.h +++ b/10.0.14393.0/winrt/Windows.Devices.Adc.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Adc.Provider.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Adc.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Controller(abi_arg_out value) noexcept override + HRESULT __stdcall get_Controller(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Controller()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Controller()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce_baseshim().ReadValue()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadValue()); return S_OK; } catch (...) @@ -47,7 +52,8 @@ struct produce : produce_baseshim().ReadRatio()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadRatio()); return S_OK; } catch (...) @@ -64,7 +70,8 @@ struct produce : produce_baseshim().ChannelCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelCount()); return S_OK; } catch (...) @@ -77,7 +84,8 @@ struct produce : produce_baseshim().ResolutionInBits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolutionInBits()); return S_OK; } catch (...) @@ -90,7 +98,8 @@ struct produce : produce_baseshim().MinValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinValue()); return S_OK; } catch (...) @@ -103,7 +112,8 @@ struct produce : produce_baseshim().MaxValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxValue()); return S_OK; } catch (...) @@ -116,7 +126,8 @@ struct produce : produce_baseshim().ChannelMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelMode()); return S_OK; } catch (...) @@ -129,6 +140,7 @@ struct produce : produce_baseshim()); this->shim().ChannelMode(value); return S_OK; } @@ -142,7 +154,8 @@ struct produce : produce_baseshim().IsChannelModeSupported(channelMode)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsChannelModeSupported(channelMode)); return S_OK; } catch (...) @@ -151,11 +164,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_OpenChannel(int32_t channelNumber, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OpenChannel(channelNumber)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OpenChannel(channelNumber)); return S_OK; } catch (...) @@ -169,11 +183,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_in provider, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_in provider, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -187,11 +202,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -209,89 +225,89 @@ namespace Windows::Devices::Adc { template int32_t impl_IAdcController::ChannelCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelCount(&value)); + check_hresult(WINRT_SHIM(IAdcController)->get_ChannelCount(&value)); return value; } template int32_t impl_IAdcController::ResolutionInBits() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ResolutionInBits(&value)); + check_hresult(WINRT_SHIM(IAdcController)->get_ResolutionInBits(&value)); return value; } template int32_t impl_IAdcController::MinValue() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinValue(&value)); + check_hresult(WINRT_SHIM(IAdcController)->get_MinValue(&value)); return value; } template int32_t impl_IAdcController::MaxValue() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxValue(&value)); + check_hresult(WINRT_SHIM(IAdcController)->get_MaxValue(&value)); return value; } template Windows::Devices::Adc::AdcChannelMode impl_IAdcController::ChannelMode() const { Windows::Devices::Adc::AdcChannelMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelMode(&value)); + check_hresult(WINRT_SHIM(IAdcController)->get_ChannelMode(&value)); return value; } template void impl_IAdcController::ChannelMode(Windows::Devices::Adc::AdcChannelMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ChannelMode(value)); + check_hresult(WINRT_SHIM(IAdcController)->put_ChannelMode(value)); } template bool impl_IAdcController::IsChannelModeSupported(Windows::Devices::Adc::AdcChannelMode channelMode) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsChannelModeSupported(channelMode, &result)); + check_hresult(WINRT_SHIM(IAdcController)->abi_IsChannelModeSupported(channelMode, &result)); return result; } template Windows::Devices::Adc::AdcChannel impl_IAdcController::OpenChannel(int32_t channelNumber) const { Windows::Devices::Adc::AdcChannel result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenChannel(channelNumber, put(result))); + check_hresult(WINRT_SHIM(IAdcController)->abi_OpenChannel(channelNumber, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IAdcControllerStatics::GetControllersAsync(const Windows::Devices::Adc::Provider::IAdcProvider & provider) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(get(provider), put(operation))); + check_hresult(WINRT_SHIM(IAdcControllerStatics)->abi_GetControllersAsync(get_abi(provider), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAdcControllerStatics2::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(IAdcControllerStatics2)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template Windows::Devices::Adc::AdcController impl_IAdcChannel::Controller() const { Windows::Devices::Adc::AdcController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Controller(put(value))); + check_hresult(WINRT_SHIM(IAdcChannel)->get_Controller(put_abi(value))); return value; } template int32_t impl_IAdcChannel::ReadValue() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadValue(&result)); + check_hresult(WINRT_SHIM(IAdcChannel)->abi_ReadValue(&result)); return result; } template double impl_IAdcChannel::ReadRatio() const { double result {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadRatio(&result)); + check_hresult(WINRT_SHIM(IAdcChannel)->abi_ReadRatio(&result)); return result; } @@ -308,3 +324,59 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::IAdcChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::IAdcController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::IAdcControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::IAdcControllerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::AdcChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Adc::AdcController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.AllJoyn.h b/10.0.14393.0/winrt/Windows.Devices.AllJoyn.h index 599e491e7..b8497d3cc 100644 --- a/10.0.14393.0/winrt/Windows.Devices.AllJoyn.h +++ b/10.0.14393.0/winrt/Windows.Devices.AllJoyn.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Globalization.3.h" @@ -24,7 +27,8 @@ struct produce : produce_baseshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -37,6 +41,7 @@ struct produce : produce_baseshim()); this->shim().IsEnabled(value); return S_OK; } @@ -46,11 +51,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultAppName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultAppName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultAppName()); return S_OK; } catch (...) @@ -60,10 +66,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DefaultAppName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultAppName(*reinterpret_cast(&value)); return S_OK; } @@ -73,11 +80,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AppNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppNames()); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DateOfManufacture(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DateOfManufacture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateOfManufacture()); return S_OK; } catch (...) @@ -101,10 +110,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_DateOfManufacture(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DateOfManufacture(*reinterpret_cast *>(&value)); return S_OK; } @@ -114,11 +124,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultDescription()); return S_OK; } catch (...) @@ -128,10 +139,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DefaultDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultDescription(*reinterpret_cast(&value)); return S_OK; } @@ -141,11 +153,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Descriptions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Descriptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Descriptions()); return S_OK; } catch (...) @@ -155,11 +168,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultManufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultManufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultManufacturer()); return S_OK; } catch (...) @@ -169,10 +183,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DefaultManufacturer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultManufacturer(*reinterpret_cast(&value)); return S_OK; } @@ -182,11 +197,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Manufacturers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Manufacturers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manufacturers()); return S_OK; } catch (...) @@ -196,11 +212,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ModelNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModelNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelNumber()); return S_OK; } catch (...) @@ -210,10 +227,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ModelNumber(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ModelNumber(*reinterpret_cast(&value)); return S_OK; } @@ -223,11 +241,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SoftwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareVersion()); return S_OK; } catch (...) @@ -237,10 +256,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SoftwareVersion(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SoftwareVersion(*reinterpret_cast(&value)); return S_OK; } @@ -250,11 +270,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SupportUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportUrl()); return S_OK; } catch (...) @@ -264,10 +285,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SupportUrl(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportUrl(*reinterpret_cast(&value)); return S_OK; } @@ -281,7 +303,8 @@ struct produce : produce_baseshim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -294,6 +317,7 @@ struct produce : produce_baseshim()); this->shim().AppId(value); return S_OK; } @@ -311,7 +335,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -320,11 +345,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -334,11 +360,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_AJSoftwareVersion(abi_arg_out value) noexcept override + HRESULT __stdcall get_AJSoftwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AJSoftwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AJSoftwareVersion()); return S_OK; } catch (...) @@ -352,7 +379,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -361,11 +389,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DateOfManufacture(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DateOfManufacture(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DateOfManufacture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateOfManufacture()); return S_OK; } catch (...) @@ -375,11 +404,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DefaultLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultLanguage()); return S_OK; } catch (...) @@ -389,11 +419,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -403,11 +434,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_HardwareVersion(abi_arg_out value) noexcept override + HRESULT __stdcall get_HardwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HardwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareVersion()); return S_OK; } catch (...) @@ -417,11 +449,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ModelNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_ModelNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModelNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelNumber()); return S_OK; } catch (...) @@ -431,11 +464,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_SoftwareVersion(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoftwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareVersion()); return S_OK; } catch (...) @@ -445,11 +479,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_SupportedLanguages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedLanguages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedLanguages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedLanguages()); return S_OK; } catch (...) @@ -459,11 +494,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_SupportUrl(abi_arg_out value) noexcept override + HRESULT __stdcall get_SupportUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportUrl()); return S_OK; } catch (...) @@ -473,11 +509,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_AppName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppName()); return S_OK; } catch (...) @@ -487,11 +524,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -501,11 +539,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DeviceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceName()); return S_OK; } catch (...) @@ -515,11 +554,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Manufacturer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Manufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Manufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manufacturer()); return S_OK; } catch (...) @@ -533,11 +573,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetDataBySessionPortAsync(abi_arg_in uniqueName, abi_arg_in busAttachment, uint16_t sessionPort, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDataBySessionPortAsync(impl::abi_arg_in uniqueName, impl::abi_arg_in busAttachment, uint16_t sessionPort, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDataBySessionPortAsync(*reinterpret_cast(&uniqueName), *reinterpret_cast(&busAttachment), sessionPort)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDataBySessionPortAsync(*reinterpret_cast(&uniqueName), *reinterpret_cast(&busAttachment), sessionPort)); return S_OK; } catch (...) @@ -547,11 +588,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDataBySessionPortWithLanguageAsync(abi_arg_in uniqueName, abi_arg_in busAttachment, uint16_t sessionPort, abi_arg_in language, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDataBySessionPortWithLanguageAsync(impl::abi_arg_in uniqueName, impl::abi_arg_in busAttachment, uint16_t sessionPort, impl::abi_arg_in language, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDataBySessionPortAsync(*reinterpret_cast(&uniqueName), *reinterpret_cast(&busAttachment), sessionPort, *reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDataBySessionPortAsync(*reinterpret_cast(&uniqueName), *reinterpret_cast(&busAttachment), sessionPort, *reinterpret_cast(&language))); return S_OK; } catch (...) @@ -569,6 +611,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Accept(); return S_OK; } @@ -582,11 +625,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -600,7 +644,8 @@ struct produceshim().SessionPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionPort()); return S_OK; } catch (...) @@ -613,7 +658,8 @@ struct produceshim().TrafficType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrafficType()); return S_OK; } catch (...) @@ -626,7 +672,8 @@ struct produceshim().SamePhysicalNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SamePhysicalNode()); return S_OK; } catch (...) @@ -639,7 +686,8 @@ struct produceshim().SameNetwork()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SameNetwork()); return S_OK; } catch (...) @@ -652,6 +700,7 @@ struct produceshim()); this->shim().Accept(); return S_OK; } @@ -665,11 +714,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, abi_arg_in acceptSessionJoiner, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, impl::abi_arg_in acceptSessionJoiner, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&uniqueName), sessionPort, trafficType, proximity, *reinterpret_cast(&acceptSessionJoiner))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&uniqueName), sessionPort, trafficType, proximity, *reinterpret_cast(&acceptSessionJoiner))); return S_OK; } catch (...) @@ -687,7 +737,8 @@ struct produceshim().AuthenticationMechanism()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationMechanism()); return S_OK; } catch (...) @@ -696,11 +747,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PeerUniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerUniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerUniqueName()); return S_OK; } catch (...) @@ -714,7 +766,8 @@ struct produceshim().Succeeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Succeeded()); return S_OK; } catch (...) @@ -727,11 +780,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AboutData(abi_arg_out value) noexcept override + HRESULT __stdcall get_AboutData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AboutData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AboutData()); return S_OK; } catch (...) @@ -741,11 +795,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ConnectionSpecification(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionSpecification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionSpecification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionSpecification()); return S_OK; } catch (...) @@ -759,7 +814,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -768,11 +824,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -782,11 +839,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PingAsync(abi_arg_in uniqueName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PingAsync(impl::abi_arg_in uniqueName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PingAsync(*reinterpret_cast(&uniqueName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PingAsync(*reinterpret_cast(&uniqueName))); return S_OK; } catch (...) @@ -800,6 +858,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Connect(); return S_OK; } @@ -813,6 +872,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Disconnect(); return S_OK; } @@ -822,11 +882,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_StateChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -839,6 +900,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().StateChanged(token); return S_OK; } @@ -848,11 +910,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_AuthenticationMechanisms(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AuthenticationMechanisms(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AuthenticationMechanisms()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationMechanisms()); return S_OK; } catch (...) @@ -862,11 +925,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_CredentialsRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CredentialsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CredentialsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CredentialsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -879,6 +943,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().CredentialsRequested(token); return S_OK; } @@ -888,11 +953,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_CredentialsVerificationRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CredentialsVerificationRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CredentialsVerificationRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CredentialsVerificationRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -905,6 +971,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().CredentialsVerificationRequested(token); return S_OK; } @@ -914,11 +981,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_AuthenticationComplete(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AuthenticationComplete(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AuthenticationComplete(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AuthenticationComplete(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -931,6 +999,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticationComplete(token); return S_OK; } @@ -944,11 +1013,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetAboutDataAsync(abi_arg_in serviceInfo, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAboutDataAsync(impl::abi_arg_in serviceInfo, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAboutDataAsync(*reinterpret_cast(&serviceInfo))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAboutDataAsync(*reinterpret_cast(&serviceInfo))); return S_OK; } catch (...) @@ -958,11 +1028,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetAboutDataWithLanguageAsync(abi_arg_in serviceInfo, abi_arg_in language, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAboutDataWithLanguageAsync(impl::abi_arg_in serviceInfo, impl::abi_arg_in language, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAboutDataAsync(*reinterpret_cast(&serviceInfo), *reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAboutDataAsync(*reinterpret_cast(&serviceInfo), *reinterpret_cast(&language))); return S_OK; } catch (...) @@ -972,11 +1043,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_AcceptSessionJoinerRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AcceptSessionJoinerRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AcceptSessionJoinerRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AcceptSessionJoinerRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -989,6 +1061,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptSessionJoinerRequested(token); return S_OK; } @@ -998,11 +1071,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_SessionJoined(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SessionJoined(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SessionJoined(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SessionJoined(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1015,6 +1089,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SessionJoined(token); return S_OK; } @@ -1028,11 +1103,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in connectionSpecification, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in connectionSpecification, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&connectionSpecification))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&connectionSpecification))); return S_OK; } catch (...) @@ -1050,7 +1126,8 @@ struct produceshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1063,7 +1140,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1076,11 +1154,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out defaultBusAttachment) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out defaultBusAttachment) noexcept override { try { - *defaultBusAttachment = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *defaultBusAttachment = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1090,11 +1169,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetWatcher(abi_arg_in> requiredInterfaces, abi_arg_out deviceWatcher) noexcept override + HRESULT __stdcall abi_GetWatcher(impl::abi_arg_in> requiredInterfaces, impl::abi_arg_out deviceWatcher) noexcept override { try { - *deviceWatcher = detach(this->shim().GetWatcher(*reinterpret_cast *>(&requiredInterfaces))); + typename D::abi_guard guard(this->shim()); + *deviceWatcher = detach_abi(this->shim().GetWatcher(*reinterpret_cast *>(&requiredInterfaces))); return S_OK; } catch (...) @@ -1112,6 +1192,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -1125,6 +1206,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -1134,10 +1216,11 @@ struct produce : produce_base producer) noexcept override + HRESULT __stdcall abi_AddProducer(impl::abi_arg_in producer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddProducer(*reinterpret_cast(&producer)); return S_OK; } @@ -1147,11 +1230,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BusAttachment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BusAttachment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusAttachment()); return S_OK; } catch (...) @@ -1161,11 +1245,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -1175,11 +1260,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1192,6 +1278,7 @@ struct produce : produce_baseshim()); this->shim().Stopped(token); return S_OK; } @@ -1205,11 +1292,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in objectPath, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in objectPath, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&objectPath))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&objectPath))); return S_OK; } catch (...) @@ -1219,11 +1307,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateWithBusAttachment(abi_arg_in objectPath, abi_arg_in busAttachment, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithBusAttachment(impl::abi_arg_in objectPath, impl::abi_arg_in busAttachment, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithBusAttachment(*reinterpret_cast(&objectPath), *reinterpret_cast(&busAttachment))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithBusAttachment(*reinterpret_cast(&objectPath), *reinterpret_cast(&busAttachment))); return S_OK; } catch (...) @@ -1241,7 +1330,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1254,11 +1344,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t status, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(int32_t status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(status)); return S_OK; } catch (...) @@ -1276,7 +1367,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().AuthenticationMechanism()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationMechanism()); return S_OK; } catch (...) @@ -1285,11 +1377,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Certificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_Certificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Certificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificate()); return S_OK; } catch (...) @@ -1299,10 +1392,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Certificate(abi_arg_in value) noexcept override + HRESULT __stdcall put_Certificate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Certificate(*reinterpret_cast(&value)); return S_OK; } @@ -1312,11 +1406,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PasswordCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasswordCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordCredential()); return S_OK; } catch (...) @@ -1326,10 +1421,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_PasswordCredential(abi_arg_in value) noexcept override + HRESULT __stdcall put_PasswordCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PasswordCredential(*reinterpret_cast(&value)); return S_OK; } @@ -1339,11 +1435,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Timeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timeout()); return S_OK; } catch (...) @@ -1352,10 +1449,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Timeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_Timeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Timeout(*reinterpret_cast(&value)); return S_OK; } @@ -1373,7 +1471,8 @@ struct produceshim().AttemptCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttemptCount()); return S_OK; } catch (...) @@ -1382,11 +1481,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Credentials(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Credentials()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Credentials()); return S_OK; } catch (...) @@ -1396,11 +1496,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PeerUniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerUniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerUniqueName()); return S_OK; } catch (...) @@ -1410,11 +1511,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RequestedUserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestedUserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedUserName()); return S_OK; } catch (...) @@ -1424,11 +1526,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1446,7 +1549,8 @@ struct produceshim().AuthenticationMechanism()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationMechanism()); return S_OK; } catch (...) @@ -1455,11 +1559,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PeerUniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerUniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerUniqueName()); return S_OK; } catch (...) @@ -1469,11 +1574,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PeerCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerCertificate()); return S_OK; } catch (...) @@ -1487,7 +1593,8 @@ struct produceshim().PeerCertificateErrorSeverity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerCertificateErrorSeverity()); return S_OK; } catch (...) @@ -1496,11 +1603,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PeerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PeerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerCertificateErrors()); return S_OK; } catch (...) @@ -1510,11 +1618,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PeerIntermediateCertificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PeerIntermediateCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerIntermediateCertificates()); return S_OK; } catch (...) @@ -1528,6 +1637,7 @@ struct produceshim()); this->shim().Accept(); return S_OK; } @@ -1537,11 +1647,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1555,11 +1666,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SenderUniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SenderUniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SenderUniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SenderUniqueName()); return S_OK; } catch (...) @@ -1573,11 +1685,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in senderUniqueName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in senderUniqueName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&senderUniqueName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&senderUniqueName))); return S_OK; } catch (...) @@ -1591,10 +1704,11 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_SetBusObject(abi_arg_in busObject) noexcept override + HRESULT __stdcall abi_SetBusObject(impl::abi_arg_in busObject) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBusObject(*reinterpret_cast(&busObject)); return S_OK; } @@ -1612,7 +1726,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1625,11 +1740,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t status, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(int32_t status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(status)); return S_OK; } catch (...) @@ -1643,11 +1759,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -1657,11 +1774,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ObjectPath(abi_arg_out value) noexcept override + HRESULT __stdcall get_ObjectPath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ObjectPath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ObjectPath()); return S_OK; } catch (...) @@ -1675,7 +1793,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SessionPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionPort()); return S_OK; } catch (...) @@ -1688,11 +1807,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uniqueName, abi_arg_in objectPath, uint16_t sessionPort, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uniqueName, impl::abi_arg_in objectPath, uint16_t sessionPort, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&uniqueName), *reinterpret_cast(&objectPath), sessionPort)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&uniqueName), *reinterpret_cast(&objectPath), sessionPort)); return S_OK; } catch (...) @@ -1706,11 +1826,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -1724,11 +1845,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uniqueName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uniqueName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&uniqueName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&uniqueName))); return S_OK; } catch (...) @@ -1742,11 +1864,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1764,7 +1887,8 @@ struct produce : produce_baseshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1777,7 +1901,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1786,11 +1911,12 @@ struct produce : produce_base uniqueName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RemoveMemberAsync(impl::abi_arg_in uniqueName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RemoveMemberAsync(*reinterpret_cast(&uniqueName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RemoveMemberAsync(*reinterpret_cast(&uniqueName))); return S_OK; } catch (...) @@ -1800,11 +1926,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_MemberAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MemberAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MemberAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1817,6 +1944,7 @@ struct produce : produce_baseshim()); this->shim().MemberAdded(token); return S_OK; } @@ -1826,11 +1954,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_MemberRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MemberRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MemberRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1843,6 +1972,7 @@ struct produce : produce_baseshim()); this->shim().MemberRemoved(token); return S_OK; } @@ -1852,11 +1982,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Lost(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Lost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Lost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1869,6 +2000,7 @@ struct produce : produce_baseshim()); this->shim().Lost(token); return S_OK; } @@ -1882,11 +2014,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -1900,11 +2033,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in session, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in session, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&session))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&session))); return S_OK; } catch (...) @@ -1922,7 +2056,8 @@ struct produce : pro { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -1935,11 +2070,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Devices::AllJoyn::AllJoynSessionLostReason reason, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::Devices::AllJoyn::AllJoynSessionLostReason reason, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(reason)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(reason)); return S_OK; } catch (...) @@ -1953,11 +2089,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -1971,11 +2108,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uniqueName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uniqueName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&uniqueName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&uniqueName))); return S_OK; } catch (...) @@ -1989,11 +2127,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UniqueName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UniqueName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UniqueName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UniqueName()); return S_OK; } catch (...) @@ -2007,11 +2146,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uniqueName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uniqueName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&uniqueName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&uniqueName))); return S_OK; } catch (...) @@ -2025,11 +2165,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetFromServiceInfoAsync(abi_arg_in serviceInfo, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFromServiceInfoAsync(impl::abi_arg_in serviceInfo, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFromServiceInfoAsync(*reinterpret_cast(&serviceInfo))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFromServiceInfoAsync(*reinterpret_cast(&serviceInfo))); return S_OK; } catch (...) @@ -2039,11 +2180,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetFromServiceInfoAndBusAttachmentAsync(abi_arg_in serviceInfo, abi_arg_in busAttachment, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFromServiceInfoAndBusAttachmentAsync(impl::abi_arg_in serviceInfo, impl::abi_arg_in busAttachment, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFromServiceInfoAsync(*reinterpret_cast(&serviceInfo), *reinterpret_cast(&busAttachment))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFromServiceInfoAsync(*reinterpret_cast(&serviceInfo), *reinterpret_cast(&busAttachment))); return S_OK; } catch (...) @@ -2061,7 +2203,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Ok()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ok()); return S_OK; } catch (...) @@ -2074,7 +2217,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Fail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fail()); return S_OK; } catch (...) @@ -2087,7 +2231,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().OperationTimedOut()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OperationTimedOut()); return S_OK; } catch (...) @@ -2100,7 +2245,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().OtherEndClosed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherEndClosed()); return S_OK; } catch (...) @@ -2113,7 +2259,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ConnectionRefused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionRefused()); return S_OK; } catch (...) @@ -2126,7 +2273,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AuthenticationFailed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationFailed()); return S_OK; } catch (...) @@ -2139,7 +2287,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AuthenticationRejectedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationRejectedByUser()); return S_OK; } catch (...) @@ -2152,7 +2301,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().SslConnectFailed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SslConnectFailed()); return S_OK; } catch (...) @@ -2165,7 +2315,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().SslIdentityVerificationFailed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SslIdentityVerificationFailed()); return S_OK; } catch (...) @@ -2178,7 +2329,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InsufficientSecurity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InsufficientSecurity()); return S_OK; } catch (...) @@ -2191,7 +2343,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument1()); return S_OK; } catch (...) @@ -2204,7 +2357,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument2()); return S_OK; } catch (...) @@ -2217,7 +2371,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument3()); return S_OK; } catch (...) @@ -2230,7 +2385,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument4()); return S_OK; } catch (...) @@ -2243,7 +2399,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument5()); return S_OK; } catch (...) @@ -2256,7 +2413,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument6()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument6()); return S_OK; } catch (...) @@ -2269,7 +2427,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument7()); return S_OK; } catch (...) @@ -2282,7 +2441,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().InvalidArgument8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvalidArgument8()); return S_OK; } catch (...) @@ -2299,7 +2459,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2312,11 +2473,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t status, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(int32_t status, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(status)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(status)); return S_OK; } catch (...) @@ -2334,178 +2496,178 @@ namespace Windows::Devices::AllJoyn { template int32_t impl_IAllJoynStatusStatics::Ok() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ok(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_Ok(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::Fail() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Fail(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_Fail(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::OperationTimedOut() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OperationTimedOut(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_OperationTimedOut(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::OtherEndClosed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherEndClosed(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_OtherEndClosed(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::ConnectionRefused() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionRefused(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_ConnectionRefused(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::AuthenticationFailed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationFailed(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_AuthenticationFailed(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::AuthenticationRejectedByUser() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationRejectedByUser(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_AuthenticationRejectedByUser(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::SslConnectFailed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SslConnectFailed(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_SslConnectFailed(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::SslIdentityVerificationFailed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SslIdentityVerificationFailed(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_SslIdentityVerificationFailed(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InsufficientSecurity() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InsufficientSecurity(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InsufficientSecurity(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument1() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument1(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument1(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument2() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument2(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument2(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument3() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument3(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument3(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument4() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument4(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument4(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument5() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument5(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument5(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument6() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument6(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument6(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument7() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument7(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument7(&value)); return value; } template int32_t impl_IAllJoynStatusStatics::InvalidArgument8() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InvalidArgument8(&value)); + check_hresult(WINRT_SHIM(IAllJoynStatusStatics)->get_InvalidArgument8(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynAboutData impl_IAllJoynBusAttachment::AboutData() const { Windows::Devices::AllJoyn::AllJoynAboutData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AboutData(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->get_AboutData(put_abi(value))); return value; } template hstring impl_IAllJoynBusAttachment::ConnectionSpecification() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ConnectionSpecification(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->get_ConnectionSpecification(put_abi(value))); return value; } template Windows::Devices::AllJoyn::AllJoynBusAttachmentState impl_IAllJoynBusAttachment::State() const { Windows::Devices::AllJoyn::AllJoynBusAttachmentState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->get_State(&value)); return value; } template hstring impl_IAllJoynBusAttachment::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->get_UniqueName(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IAllJoynBusAttachment::PingAsync(hstring_ref uniqueName) const +template Windows::Foundation::IAsyncOperation impl_IAllJoynBusAttachment::PingAsync(hstring_view uniqueName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PingAsync(get(uniqueName), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->abi_PingAsync(get_abi(uniqueName), put_abi(operation))); return operation; } template void impl_IAllJoynBusAttachment::Connect() const { - check_hresult(static_cast(static_cast(*this))->abi_Connect()); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->abi_Connect()); } template void impl_IAllJoynBusAttachment::Disconnect() const { - check_hresult(static_cast(static_cast(*this))->abi_Disconnect()); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->abi_Disconnect()); } template event_token impl_IAllJoynBusAttachment::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->add_StateChanged(get_abi(handler), &token)); return token; } @@ -2516,20 +2678,20 @@ template event_revoker impl_IAllJoynBusAttac template void impl_IAllJoynBusAttachment::StateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->remove_StateChanged(token)); } template Windows::Foundation::Collections::IVector impl_IAllJoynBusAttachment::AuthenticationMechanisms() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationMechanisms(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->get_AuthenticationMechanisms(put_abi(value))); return value; } template event_token impl_IAllJoynBusAttachment::CredentialsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CredentialsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->add_CredentialsRequested(get_abi(handler), &token)); return token; } @@ -2540,13 +2702,13 @@ template event_revoker impl_IAllJoynBusAttac template void impl_IAllJoynBusAttachment::CredentialsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CredentialsRequested(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->remove_CredentialsRequested(token)); } template event_token impl_IAllJoynBusAttachment::CredentialsVerificationRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CredentialsVerificationRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->add_CredentialsVerificationRequested(get_abi(handler), &token)); return token; } @@ -2557,13 +2719,13 @@ template event_revoker impl_IAllJoynBusAttac template void impl_IAllJoynBusAttachment::CredentialsVerificationRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CredentialsVerificationRequested(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->remove_CredentialsVerificationRequested(token)); } template event_token impl_IAllJoynBusAttachment::AuthenticationComplete(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AuthenticationComplete(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->add_AuthenticationComplete(get_abi(handler), &token)); return token; } @@ -2574,27 +2736,27 @@ template event_revoker impl_IAllJoynBusAttac template void impl_IAllJoynBusAttachment::AuthenticationComplete(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AuthenticationComplete(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment)->remove_AuthenticationComplete(token)); } template Windows::Foundation::IAsyncOperation impl_IAllJoynBusAttachment2::GetAboutDataAsync(const Windows::Devices::AllJoyn::AllJoynServiceInfo & serviceInfo) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAboutDataAsync(get(serviceInfo), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->abi_GetAboutDataAsync(get_abi(serviceInfo), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAllJoynBusAttachment2::GetAboutDataAsync(const Windows::Devices::AllJoyn::AllJoynServiceInfo & serviceInfo, const Windows::Globalization::Language & language) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAboutDataWithLanguageAsync(get(serviceInfo), get(language), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->abi_GetAboutDataWithLanguageAsync(get_abi(serviceInfo), get_abi(language), put_abi(operation))); return operation; } template event_token impl_IAllJoynBusAttachment2::AcceptSessionJoinerRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AcceptSessionJoinerRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->add_AcceptSessionJoinerRequested(get_abi(handler), &token)); return token; } @@ -2605,13 +2767,13 @@ template event_revoker impl_IAllJoynBusAtta template void impl_IAllJoynBusAttachment2::AcceptSessionJoinerRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AcceptSessionJoinerRequested(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->remove_AcceptSessionJoinerRequested(token)); } template event_token impl_IAllJoynBusAttachment2::SessionJoined(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SessionJoined(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->add_SessionJoined(get_abi(handler), &token)); return token; } @@ -2622,222 +2784,222 @@ template event_revoker impl_IAllJoynBusAtta template void impl_IAllJoynBusAttachment2::SessionJoined(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SessionJoined(token)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachment2)->remove_SessionJoined(token)); } template Windows::Devices::AllJoyn::AllJoynBusAttachment impl_IAllJoynBusAttachmentStatics::GetDefault() const { Windows::Devices::AllJoyn::AllJoynBusAttachment defaultBusAttachment { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(defaultBusAttachment))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachmentStatics)->abi_GetDefault(put_abi(defaultBusAttachment))); return defaultBusAttachment; } -template Windows::Devices::Enumeration::DeviceWatcher impl_IAllJoynBusAttachmentStatics::GetWatcher(const Windows::Foundation::Collections::IIterable & requiredInterfaces) const +template Windows::Devices::Enumeration::DeviceWatcher impl_IAllJoynBusAttachmentStatics::GetWatcher(iterable requiredInterfaces) const { Windows::Devices::Enumeration::DeviceWatcher deviceWatcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetWatcher(get(requiredInterfaces), put(deviceWatcher))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachmentStatics)->abi_GetWatcher(get_abi(requiredInterfaces), put_abi(deviceWatcher))); return deviceWatcher; } template Windows::Devices::AllJoyn::AllJoynBusAttachmentState impl_IAllJoynBusAttachmentStateChangedEventArgs::State() const { Windows::Devices::AllJoyn::AllJoynBusAttachmentState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachmentStateChangedEventArgs)->get_State(&value)); return value; } template int32_t impl_IAllJoynBusAttachmentStateChangedEventArgs::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynBusAttachmentStateChangedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism impl_IAllJoynCredentials::AuthenticationMechanism() const { Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationMechanism(&value)); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->get_AuthenticationMechanism(&value)); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_IAllJoynCredentials::Certificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Certificate(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->get_Certificate(put_abi(value))); return value; } template void impl_IAllJoynCredentials::Certificate(const Windows::Security::Cryptography::Certificates::Certificate & value) const { - check_hresult(static_cast(static_cast(*this))->put_Certificate(get(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->put_Certificate(get_abi(value))); } template Windows::Security::Credentials::PasswordCredential impl_IAllJoynCredentials::PasswordCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasswordCredential(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->get_PasswordCredential(put_abi(value))); return value; } template void impl_IAllJoynCredentials::PasswordCredential(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_PasswordCredential(get(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->put_PasswordCredential(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IAllJoynCredentials::Timeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Timeout(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->get_Timeout(put_abi(value))); return value; } template void impl_IAllJoynCredentials::Timeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Timeout(get(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentials)->put_Timeout(get_abi(value))); } template uint16_t impl_IAllJoynCredentialsRequestedEventArgs::AttemptCount() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttemptCount(&value)); + check_hresult(WINRT_SHIM(IAllJoynCredentialsRequestedEventArgs)->get_AttemptCount(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynCredentials impl_IAllJoynCredentialsRequestedEventArgs::Credentials() const { Windows::Devices::AllJoyn::AllJoynCredentials value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Credentials(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsRequestedEventArgs)->get_Credentials(put_abi(value))); return value; } template hstring impl_IAllJoynCredentialsRequestedEventArgs::PeerUniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PeerUniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsRequestedEventArgs)->get_PeerUniqueName(put_abi(value))); return value; } template hstring impl_IAllJoynCredentialsRequestedEventArgs::RequestedUserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RequestedUserName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsRequestedEventArgs)->get_RequestedUserName(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IAllJoynCredentialsRequestedEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsRequestedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism impl_IAllJoynCredentialsVerificationRequestedEventArgs::AuthenticationMechanism() const { Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationMechanism(&value)); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_AuthenticationMechanism(&value)); return value; } template hstring impl_IAllJoynCredentialsVerificationRequestedEventArgs::PeerUniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PeerUniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_PeerUniqueName(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_IAllJoynCredentialsVerificationRequestedEventArgs::PeerCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PeerCertificate(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_PeerCertificate(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketSslErrorSeverity impl_IAllJoynCredentialsVerificationRequestedEventArgs::PeerCertificateErrorSeverity() const { Windows::Networking::Sockets::SocketSslErrorSeverity value {}; - check_hresult(static_cast(static_cast(*this))->get_PeerCertificateErrorSeverity(&value)); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_PeerCertificateErrorSeverity(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IAllJoynCredentialsVerificationRequestedEventArgs::PeerCertificateErrors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PeerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_PeerCertificateErrors(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAllJoynCredentialsVerificationRequestedEventArgs::PeerIntermediateCertificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PeerIntermediateCertificates(put(value))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->get_PeerIntermediateCertificates(put_abi(value))); return value; } template void impl_IAllJoynCredentialsVerificationRequestedEventArgs::Accept() const { - check_hresult(static_cast(static_cast(*this))->abi_Accept()); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->abi_Accept()); } template Windows::Foundation::Deferral impl_IAllJoynCredentialsVerificationRequestedEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IAllJoynCredentialsVerificationRequestedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism impl_IAllJoynAuthenticationCompleteEventArgs::AuthenticationMechanism() const { Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationMechanism(&value)); + check_hresult(WINRT_SHIM(IAllJoynAuthenticationCompleteEventArgs)->get_AuthenticationMechanism(&value)); return value; } template hstring impl_IAllJoynAuthenticationCompleteEventArgs::PeerUniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PeerUniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAuthenticationCompleteEventArgs)->get_PeerUniqueName(put_abi(value))); return value; } template bool impl_IAllJoynAuthenticationCompleteEventArgs::Succeeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Succeeded(&value)); + check_hresult(WINRT_SHIM(IAllJoynAuthenticationCompleteEventArgs)->get_Succeeded(&value)); return value; } -template Windows::Devices::AllJoyn::AllJoynBusAttachment impl_IAllJoynBusAttachmentFactory::Create(hstring_ref connectionSpecification) const +template Windows::Devices::AllJoyn::AllJoynBusAttachment impl_IAllJoynBusAttachmentFactory::Create(hstring_view connectionSpecification) const { Windows::Devices::AllJoyn::AllJoynBusAttachment result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(connectionSpecification), put(result))); + check_hresult(WINRT_SHIM(IAllJoynBusAttachmentFactory)->abi_Create(get_abi(connectionSpecification), put_abi(result))); return result; } template int32_t impl_IAllJoynSession::Id() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IAllJoynSession)->get_Id(&value)); return value; } template int32_t impl_IAllJoynSession::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynSession)->get_Status(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IAllJoynSession::RemoveMemberAsync(hstring_ref uniqueName) const +template Windows::Foundation::IAsyncOperation impl_IAllJoynSession::RemoveMemberAsync(hstring_view uniqueName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RemoveMemberAsync(get(uniqueName), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynSession)->abi_RemoveMemberAsync(get_abi(uniqueName), put_abi(operation))); return operation; } template event_token impl_IAllJoynSession::MemberAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MemberAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->add_MemberAdded(get_abi(handler), &token)); return token; } @@ -2848,13 +3010,13 @@ template event_revoker impl_IAllJoynSession::Me template void impl_IAllJoynSession::MemberAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MemberAdded(token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->remove_MemberAdded(token)); } template event_token impl_IAllJoynSession::MemberRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MemberRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->add_MemberRemoved(get_abi(handler), &token)); return token; } @@ -2865,13 +3027,13 @@ template event_revoker impl_IAllJoynSession::Me template void impl_IAllJoynSession::MemberRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MemberRemoved(token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->remove_MemberRemoved(token)); } template event_token impl_IAllJoynSession::Lost(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Lost(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->add_Lost(get_abi(handler), &token)); return token; } @@ -2882,61 +3044,61 @@ template event_revoker impl_IAllJoynSession::Lo template void impl_IAllJoynSession::Lost(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Lost(token)); + check_hresult(WINRT_SHIM(IAllJoynSession)->remove_Lost(token)); } template Windows::Foundation::IAsyncOperation impl_IAllJoynSessionStatics::GetFromServiceInfoAsync(const Windows::Devices::AllJoyn::AllJoynServiceInfo & serviceInfo) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFromServiceInfoAsync(get(serviceInfo), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynSessionStatics)->abi_GetFromServiceInfoAsync(get_abi(serviceInfo), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAllJoynSessionStatics::GetFromServiceInfoAsync(const Windows::Devices::AllJoyn::AllJoynServiceInfo & serviceInfo, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFromServiceInfoAndBusAttachmentAsync(get(serviceInfo), get(busAttachment), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynSessionStatics)->abi_GetFromServiceInfoAndBusAttachmentAsync(get_abi(serviceInfo), get_abi(busAttachment), put_abi(operation))); return operation; } template void impl_IAllJoynProducer::SetBusObject(const Windows::Devices::AllJoyn::AllJoynBusObject & busObject) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBusObject(get(busObject))); + check_hresult(WINRT_SHIM(IAllJoynProducer)->abi_SetBusObject(get_abi(busObject))); } template void impl_IAllJoynBusObject::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->abi_Start()); } template void impl_IAllJoynBusObject::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->abi_Stop()); } template void impl_IAllJoynBusObject::AddProducer(const Windows::Devices::AllJoyn::IAllJoynProducer & producer) const { - check_hresult(static_cast(static_cast(*this))->abi_AddProducer(get(producer))); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->abi_AddProducer(get_abi(producer))); } template Windows::Devices::AllJoyn::AllJoynBusAttachment impl_IAllJoynBusObject::BusAttachment() const { Windows::Devices::AllJoyn::AllJoynBusAttachment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BusAttachment(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->get_BusAttachment(put_abi(value))); return value; } template Windows::Devices::AllJoyn::AllJoynSession impl_IAllJoynBusObject::Session() const { Windows::Devices::AllJoyn::AllJoynSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->get_Session(put_abi(value))); return value; } template event_token impl_IAllJoynBusObject::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->add_Stopped(get_abi(handler), &token)); return token; } @@ -2947,502 +3109,502 @@ template event_revoker impl_IAllJoynBusObject template void impl_IAllJoynBusObject::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IAllJoynBusObject)->remove_Stopped(token)); } -template Windows::Devices::AllJoyn::AllJoynBusObject impl_IAllJoynBusObjectFactory::Create(hstring_ref objectPath) const +template Windows::Devices::AllJoyn::AllJoynBusObject impl_IAllJoynBusObjectFactory::Create(hstring_view objectPath) const { Windows::Devices::AllJoyn::AllJoynBusObject result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(objectPath), put(result))); + check_hresult(WINRT_SHIM(IAllJoynBusObjectFactory)->abi_Create(get_abi(objectPath), put_abi(result))); return result; } -template Windows::Devices::AllJoyn::AllJoynBusObject impl_IAllJoynBusObjectFactory::CreateWithBusAttachment(hstring_ref objectPath, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment) const +template Windows::Devices::AllJoyn::AllJoynBusObject impl_IAllJoynBusObjectFactory::CreateWithBusAttachment(hstring_view objectPath, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment) const { Windows::Devices::AllJoyn::AllJoynBusObject result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithBusAttachment(get(objectPath), get(busAttachment), put(result))); + check_hresult(WINRT_SHIM(IAllJoynBusObjectFactory)->abi_CreateWithBusAttachment(get_abi(objectPath), get_abi(busAttachment), put_abi(result))); return result; } template hstring impl_IAllJoynServiceInfo::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfo)->get_UniqueName(put_abi(value))); return value; } template hstring impl_IAllJoynServiceInfo::ObjectPath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ObjectPath(put(value))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfo)->get_ObjectPath(put_abi(value))); return value; } template uint16_t impl_IAllJoynServiceInfo::SessionPort() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionPort(&value)); + check_hresult(WINRT_SHIM(IAllJoynServiceInfo)->get_SessionPort(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IAllJoynServiceInfoStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IAllJoynServiceInfoStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfoStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } -template Windows::Devices::AllJoyn::AllJoynServiceInfo impl_IAllJoynServiceInfoFactory::Create(hstring_ref uniqueName, hstring_ref objectPath, uint16_t sessionPort) const +template Windows::Devices::AllJoyn::AllJoynServiceInfo impl_IAllJoynServiceInfoFactory::Create(hstring_view uniqueName, hstring_view objectPath, uint16_t sessionPort) const { Windows::Devices::AllJoyn::AllJoynServiceInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uniqueName), get(objectPath), sessionPort, put(result))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfoFactory)->abi_Create(get_abi(uniqueName), get_abi(objectPath), sessionPort, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAllJoynAboutDataViewStatics::GetDataBySessionPortAsync(hstring_ref uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort) const +template Windows::Foundation::IAsyncOperation impl_IAllJoynAboutDataViewStatics::GetDataBySessionPortAsync(hstring_view uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDataBySessionPortAsync(get(uniqueName), get(busAttachment), sessionPort, put(operation))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataViewStatics)->abi_GetDataBySessionPortAsync(get_abi(uniqueName), get_abi(busAttachment), sessionPort, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAllJoynAboutDataViewStatics::GetDataBySessionPortAsync(hstring_ref uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort, const Windows::Globalization::Language & language) const +template Windows::Foundation::IAsyncOperation impl_IAllJoynAboutDataViewStatics::GetDataBySessionPortAsync(hstring_view uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort, const Windows::Globalization::Language & language) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDataBySessionPortWithLanguageAsync(get(uniqueName), get(busAttachment), sessionPort, get(language), put(operation))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataViewStatics)->abi_GetDataBySessionPortWithLanguageAsync(get_abi(uniqueName), get_abi(busAttachment), sessionPort, get_abi(language), put_abi(operation))); return operation; } template int32_t impl_IAllJoynAboutDataView::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_Status(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IAllJoynAboutDataView::Properties() const +template Windows::Foundation::Collections::IMapView impl_IAllJoynAboutDataView::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_Properties(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::AJSoftwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AJSoftwareVersion(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_AJSoftwareVersion(put_abi(value))); return value; } template GUID impl_IAllJoynAboutDataView::AppId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AppId(&value)); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_AppId(&value)); return value; } template Windows::Foundation::IReference impl_IAllJoynAboutDataView::DateOfManufacture() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DateOfManufacture(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_DateOfManufacture(put_abi(value))); return value; } template Windows::Globalization::Language impl_IAllJoynAboutDataView::DefaultLanguage() const { Windows::Globalization::Language value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultLanguage(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_DefaultLanguage(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::HardwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HardwareVersion(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_HardwareVersion(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::ModelNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ModelNumber(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_ModelNumber(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::SoftwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SoftwareVersion(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_SoftwareVersion(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAllJoynAboutDataView::SupportedLanguages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedLanguages(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_SupportedLanguages(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IAllJoynAboutDataView::SupportUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportUrl(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_SupportUrl(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::AppName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_AppName(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_Description(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::DeviceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_DeviceName(put_abi(value))); return value; } template hstring impl_IAllJoynAboutDataView::Manufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Manufacturer(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutDataView)->get_Manufacturer(put_abi(value))); return value; } template bool impl_IAllJoynAboutData::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_IsEnabled(&value)); return value; } template void impl_IAllJoynAboutData::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_IsEnabled(value)); } template hstring impl_IAllJoynAboutData::DefaultAppName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DefaultAppName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_DefaultAppName(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::DefaultAppName(hstring_ref value) const +template void impl_IAllJoynAboutData::DefaultAppName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultAppName(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_DefaultAppName(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IAllJoynAboutData::AppNames() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_AppNames(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_AppNames(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAllJoynAboutData::DateOfManufacture() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DateOfManufacture(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_DateOfManufacture(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::DateOfManufacture(const Windows::Foundation::IReference & value) const +template void impl_IAllJoynAboutData::DateOfManufacture(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DateOfManufacture(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_DateOfManufacture(get_abi(value))); } template hstring impl_IAllJoynAboutData::DefaultDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DefaultDescription(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_DefaultDescription(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::DefaultDescription(hstring_ref value) const +template void impl_IAllJoynAboutData::DefaultDescription(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultDescription(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_DefaultDescription(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IAllJoynAboutData::Descriptions() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Descriptions(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_Descriptions(put_abi(value))); return value; } template hstring impl_IAllJoynAboutData::DefaultManufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DefaultManufacturer(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_DefaultManufacturer(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::DefaultManufacturer(hstring_ref value) const +template void impl_IAllJoynAboutData::DefaultManufacturer(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultManufacturer(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_DefaultManufacturer(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IAllJoynAboutData::Manufacturers() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Manufacturers(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_Manufacturers(put_abi(value))); return value; } template hstring impl_IAllJoynAboutData::ModelNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ModelNumber(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_ModelNumber(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::ModelNumber(hstring_ref value) const +template void impl_IAllJoynAboutData::ModelNumber(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ModelNumber(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_ModelNumber(get_abi(value))); } template hstring impl_IAllJoynAboutData::SoftwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SoftwareVersion(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_SoftwareVersion(put_abi(value))); return value; } -template void impl_IAllJoynAboutData::SoftwareVersion(hstring_ref value) const +template void impl_IAllJoynAboutData::SoftwareVersion(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SoftwareVersion(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_SoftwareVersion(get_abi(value))); } template Windows::Foundation::Uri impl_IAllJoynAboutData::SupportUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportUrl(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_SupportUrl(put_abi(value))); return value; } template void impl_IAllJoynAboutData::SupportUrl(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportUrl(get(value))); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_SupportUrl(get_abi(value))); } template GUID impl_IAllJoynAboutData::AppId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AppId(&value)); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->get_AppId(&value)); return value; } template void impl_IAllJoynAboutData::AppId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_AppId(value)); + check_hresult(WINRT_SHIM(IAllJoynAboutData)->put_AppId(value)); } template hstring impl_IAllJoynAcceptSessionJoinerEventArgs::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->get_UniqueName(put_abi(value))); return value; } template uint16_t impl_IAllJoynAcceptSessionJoinerEventArgs::SessionPort() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionPort(&value)); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->get_SessionPort(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynTrafficType impl_IAllJoynAcceptSessionJoinerEventArgs::TrafficType() const { Windows::Devices::AllJoyn::AllJoynTrafficType value {}; - check_hresult(static_cast(static_cast(*this))->get_TrafficType(&value)); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->get_TrafficType(&value)); return value; } template bool impl_IAllJoynAcceptSessionJoinerEventArgs::SamePhysicalNode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SamePhysicalNode(&value)); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->get_SamePhysicalNode(&value)); return value; } template bool impl_IAllJoynAcceptSessionJoinerEventArgs::SameNetwork() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SameNetwork(&value)); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->get_SameNetwork(&value)); return value; } template void impl_IAllJoynAcceptSessionJoinerEventArgs::Accept() const { - check_hresult(static_cast(static_cast(*this))->abi_Accept()); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgs)->abi_Accept()); } template void impl_IAllJoynAcceptSessionJoiner::Accept() const { - check_hresult(static_cast(static_cast(*this))->abi_Accept()); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoiner)->abi_Accept()); } -template Windows::Devices::AllJoyn::AllJoynAcceptSessionJoinerEventArgs impl_IAllJoynAcceptSessionJoinerEventArgsFactory::Create(hstring_ref uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, const Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoiner & acceptSessionJoiner) const +template Windows::Devices::AllJoyn::AllJoynAcceptSessionJoinerEventArgs impl_IAllJoynAcceptSessionJoinerEventArgsFactory::Create(hstring_view uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, const Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoiner & acceptSessionJoiner) const { Windows::Devices::AllJoyn::AllJoynAcceptSessionJoinerEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uniqueName), sessionPort, trafficType, proximity, get(acceptSessionJoiner), put(result))); + check_hresult(WINRT_SHIM(IAllJoynAcceptSessionJoinerEventArgsFactory)->abi_Create(get_abi(uniqueName), sessionPort, trafficType, proximity, get_abi(acceptSessionJoiner), put_abi(result))); return result; } template hstring impl_IAllJoynSessionMemberAddedEventArgs::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynSessionMemberAddedEventArgs)->get_UniqueName(put_abi(value))); return value; } -template Windows::Devices::AllJoyn::AllJoynSessionMemberAddedEventArgs impl_IAllJoynSessionMemberAddedEventArgsFactory::Create(hstring_ref uniqueName) const +template Windows::Devices::AllJoyn::AllJoynSessionMemberAddedEventArgs impl_IAllJoynSessionMemberAddedEventArgsFactory::Create(hstring_view uniqueName) const { Windows::Devices::AllJoyn::AllJoynSessionMemberAddedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uniqueName), put(result))); + check_hresult(WINRT_SHIM(IAllJoynSessionMemberAddedEventArgsFactory)->abi_Create(get_abi(uniqueName), put_abi(result))); return result; } template hstring impl_IAllJoynSessionMemberRemovedEventArgs::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynSessionMemberRemovedEventArgs)->get_UniqueName(put_abi(value))); return value; } -template Windows::Devices::AllJoyn::AllJoynSessionMemberRemovedEventArgs impl_IAllJoynSessionMemberRemovedEventArgsFactory::Create(hstring_ref uniqueName) const +template Windows::Devices::AllJoyn::AllJoynSessionMemberRemovedEventArgs impl_IAllJoynSessionMemberRemovedEventArgsFactory::Create(hstring_view uniqueName) const { Windows::Devices::AllJoyn::AllJoynSessionMemberRemovedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uniqueName), put(result))); + check_hresult(WINRT_SHIM(IAllJoynSessionMemberRemovedEventArgsFactory)->abi_Create(get_abi(uniqueName), put_abi(result))); return result; } template Windows::Devices::AllJoyn::AllJoynSession impl_IAllJoynSessionJoinedEventArgs::Session() const { Windows::Devices::AllJoyn::AllJoynSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IAllJoynSessionJoinedEventArgs)->get_Session(put_abi(value))); return value; } template Windows::Devices::AllJoyn::AllJoynSessionJoinedEventArgs impl_IAllJoynSessionJoinedEventArgsFactory::Create(const Windows::Devices::AllJoyn::AllJoynSession & session) const { Windows::Devices::AllJoyn::AllJoynSessionJoinedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(session), put(result))); + check_hresult(WINRT_SHIM(IAllJoynSessionJoinedEventArgsFactory)->abi_Create(get_abi(session), put_abi(result))); return result; } template Windows::Devices::AllJoyn::AllJoynSessionLostReason impl_IAllJoynSessionLostEventArgs::Reason() const { Windows::Devices::AllJoyn::AllJoynSessionLostReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IAllJoynSessionLostEventArgs)->get_Reason(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynSessionLostEventArgs impl_IAllJoynSessionLostEventArgsFactory::Create(Windows::Devices::AllJoyn::AllJoynSessionLostReason reason) const { Windows::Devices::AllJoyn::AllJoynSessionLostEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(reason, put(result))); + check_hresult(WINRT_SHIM(IAllJoynSessionLostEventArgsFactory)->abi_Create(reason, put_abi(result))); return result; } template int32_t impl_IAllJoynProducerStoppedEventArgs::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynProducerStoppedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynProducerStoppedEventArgs impl_IAllJoynProducerStoppedEventArgsFactory::Create(int32_t status) const { Windows::Devices::AllJoyn::AllJoynProducerStoppedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(status, put(result))); + check_hresult(WINRT_SHIM(IAllJoynProducerStoppedEventArgsFactory)->abi_Create(status, put_abi(result))); return result; } template int32_t impl_IAllJoynBusObjectStoppedEventArgs::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynBusObjectStoppedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynBusObjectStoppedEventArgs impl_IAllJoynBusObjectStoppedEventArgsFactory::Create(int32_t status) const { Windows::Devices::AllJoyn::AllJoynBusObjectStoppedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(status, put(result))); + check_hresult(WINRT_SHIM(IAllJoynBusObjectStoppedEventArgsFactory)->abi_Create(status, put_abi(result))); return result; } template int32_t impl_IAllJoynWatcherStoppedEventArgs::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAllJoynWatcherStoppedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::AllJoyn::AllJoynWatcherStoppedEventArgs impl_IAllJoynWatcherStoppedEventArgsFactory::Create(int32_t status) const { Windows::Devices::AllJoyn::AllJoynWatcherStoppedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(status, put(result))); + check_hresult(WINRT_SHIM(IAllJoynWatcherStoppedEventArgsFactory)->abi_Create(status, put_abi(result))); return result; } template hstring impl_IAllJoynServiceInfoRemovedEventArgs::UniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfoRemovedEventArgs)->get_UniqueName(put_abi(value))); return value; } -template Windows::Devices::AllJoyn::AllJoynServiceInfoRemovedEventArgs impl_IAllJoynServiceInfoRemovedEventArgsFactory::Create(hstring_ref uniqueName) const +template Windows::Devices::AllJoyn::AllJoynServiceInfoRemovedEventArgs impl_IAllJoynServiceInfoRemovedEventArgsFactory::Create(hstring_view uniqueName) const { Windows::Devices::AllJoyn::AllJoynServiceInfoRemovedEventArgs result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uniqueName), put(result))); + check_hresult(WINRT_SHIM(IAllJoynServiceInfoRemovedEventArgsFactory)->abi_Create(get_abi(uniqueName), put_abi(result))); return result; } template hstring impl_IAllJoynMessageInfo::SenderUniqueName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SenderUniqueName(put(value))); + check_hresult(WINRT_SHIM(IAllJoynMessageInfo)->get_SenderUniqueName(put_abi(value))); return value; } -template Windows::Devices::AllJoyn::AllJoynMessageInfo impl_IAllJoynMessageInfoFactory::Create(hstring_ref senderUniqueName) const +template Windows::Devices::AllJoyn::AllJoynMessageInfo impl_IAllJoynMessageInfoFactory::Create(hstring_view senderUniqueName) const { Windows::Devices::AllJoyn::AllJoynMessageInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(senderUniqueName), put(result))); + check_hresult(WINRT_SHIM(IAllJoynMessageInfoFactory)->abi_Create(get_abi(senderUniqueName), put_abi(result))); return result; } -inline Windows::Foundation::IAsyncOperation AllJoynAboutDataView::GetDataBySessionPortAsync(hstring_ref uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort) +inline Windows::Foundation::IAsyncOperation AllJoynAboutDataView::GetDataBySessionPortAsync(hstring_view uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort) { return get_activation_factory().GetDataBySessionPortAsync(uniqueName, busAttachment, sessionPort); } -inline Windows::Foundation::IAsyncOperation AllJoynAboutDataView::GetDataBySessionPortAsync(hstring_ref uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort, const Windows::Globalization::Language & language) +inline Windows::Foundation::IAsyncOperation AllJoynAboutDataView::GetDataBySessionPortAsync(hstring_view uniqueName, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment, uint16_t sessionPort, const Windows::Globalization::Language & language) { return get_activation_factory().GetDataBySessionPortAsync(uniqueName, busAttachment, sessionPort, language); } -inline AllJoynAcceptSessionJoinerEventArgs::AllJoynAcceptSessionJoinerEventArgs(hstring_ref uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, const Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoiner & acceptSessionJoiner) : +inline AllJoynAcceptSessionJoinerEventArgs::AllJoynAcceptSessionJoinerEventArgs(hstring_view uniqueName, uint16_t sessionPort, Windows::Devices::AllJoyn::AllJoynTrafficType trafficType, uint8_t proximity, const Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoiner & acceptSessionJoiner) : AllJoynAcceptSessionJoinerEventArgs(get_activation_factory().Create(uniqueName, sessionPort, trafficType, proximity, acceptSessionJoiner)) {} @@ -3450,7 +3612,7 @@ inline AllJoynBusAttachment::AllJoynBusAttachment() : AllJoynBusAttachment(activate_instance()) {} -inline AllJoynBusAttachment::AllJoynBusAttachment(hstring_ref connectionSpecification) : +inline AllJoynBusAttachment::AllJoynBusAttachment(hstring_view connectionSpecification) : AllJoynBusAttachment(get_activation_factory().Create(connectionSpecification)) {} @@ -3459,7 +3621,7 @@ inline Windows::Devices::AllJoyn::AllJoynBusAttachment AllJoynBusAttachment::Get return get_activation_factory().GetDefault(); } -inline Windows::Devices::Enumeration::DeviceWatcher AllJoynBusAttachment::GetWatcher(const Windows::Foundation::Collections::IIterable & requiredInterfaces) +inline Windows::Devices::Enumeration::DeviceWatcher AllJoynBusAttachment::GetWatcher(iterable requiredInterfaces) { return get_activation_factory().GetWatcher(requiredInterfaces); } @@ -3468,11 +3630,11 @@ inline AllJoynBusObject::AllJoynBusObject() : AllJoynBusObject(activate_instance()) {} -inline AllJoynBusObject::AllJoynBusObject(hstring_ref objectPath) : +inline AllJoynBusObject::AllJoynBusObject(hstring_view objectPath) : AllJoynBusObject(get_activation_factory().Create(objectPath)) {} -inline AllJoynBusObject::AllJoynBusObject(hstring_ref objectPath, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment) : +inline AllJoynBusObject::AllJoynBusObject(hstring_view objectPath, const Windows::Devices::AllJoyn::AllJoynBusAttachment & busAttachment) : AllJoynBusObject(get_activation_factory().CreateWithBusAttachment(objectPath, busAttachment)) {} @@ -3480,7 +3642,7 @@ inline AllJoynBusObjectStoppedEventArgs::AllJoynBusObjectStoppedEventArgs(int32_ AllJoynBusObjectStoppedEventArgs(get_activation_factory().Create(status)) {} -inline AllJoynMessageInfo::AllJoynMessageInfo(hstring_ref senderUniqueName) : +inline AllJoynMessageInfo::AllJoynMessageInfo(hstring_view senderUniqueName) : AllJoynMessageInfo(get_activation_factory().Create(senderUniqueName)) {} @@ -3488,16 +3650,16 @@ inline AllJoynProducerStoppedEventArgs::AllJoynProducerStoppedEventArgs(int32_t AllJoynProducerStoppedEventArgs(get_activation_factory().Create(status)) {} -inline AllJoynServiceInfo::AllJoynServiceInfo(hstring_ref uniqueName, hstring_ref objectPath, uint16_t sessionPort) : +inline AllJoynServiceInfo::AllJoynServiceInfo(hstring_view uniqueName, hstring_view objectPath, uint16_t sessionPort) : AllJoynServiceInfo(get_activation_factory().Create(uniqueName, objectPath, sessionPort)) {} -inline Windows::Foundation::IAsyncOperation AllJoynServiceInfo::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation AllJoynServiceInfo::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } -inline AllJoynServiceInfoRemovedEventArgs::AllJoynServiceInfoRemovedEventArgs(hstring_ref uniqueName) : +inline AllJoynServiceInfoRemovedEventArgs::AllJoynServiceInfoRemovedEventArgs(hstring_view uniqueName) : AllJoynServiceInfoRemovedEventArgs(get_activation_factory().Create(uniqueName)) {} @@ -3519,11 +3681,11 @@ inline AllJoynSessionLostEventArgs::AllJoynSessionLostEventArgs(Windows::Devices AllJoynSessionLostEventArgs(get_activation_factory().Create(reason)) {} -inline AllJoynSessionMemberAddedEventArgs::AllJoynSessionMemberAddedEventArgs(hstring_ref uniqueName) : +inline AllJoynSessionMemberAddedEventArgs::AllJoynSessionMemberAddedEventArgs(hstring_view uniqueName) : AllJoynSessionMemberAddedEventArgs(get_activation_factory().Create(uniqueName)) {} -inline AllJoynSessionMemberRemovedEventArgs::AllJoynSessionMemberRemovedEventArgs(hstring_ref uniqueName) : +inline AllJoynSessionMemberRemovedEventArgs::AllJoynSessionMemberRemovedEventArgs(hstring_view uniqueName) : AllJoynSessionMemberRemovedEventArgs(get_activation_factory().Create(uniqueName)) {} @@ -3624,3 +3786,572 @@ inline AllJoynWatcherStoppedEventArgs::AllJoynWatcherStoppedEventArgs(int32_t st } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAboutData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAboutDataView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAboutDataViewStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoiner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoinerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAcceptSessionJoinerEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynAuthenticationCompleteEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusAttachment2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusAttachmentFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusAttachmentStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusAttachmentStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusObjectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusObjectStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynBusObjectStoppedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynCredentials & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynCredentialsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynCredentialsVerificationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynMessageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynMessageInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynProducer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynProducerStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynProducerStoppedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynServiceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynServiceInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynServiceInfoRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynServiceInfoRemovedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynServiceInfoStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionJoinedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionJoinedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionLostEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionLostEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionMemberAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionMemberAddedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionMemberRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionMemberRemovedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynSessionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynStatusStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynWatcherStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::IAllJoynWatcherStoppedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynAboutData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynAboutDataView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynAcceptSessionJoinerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynAuthenticationCompleteEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynBusAttachment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynBusAttachmentStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynBusObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynBusObjectStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynCredentials & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynCredentialsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynCredentialsVerificationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynMessageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynProducerStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynServiceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynServiceInfoRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynSessionJoinedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynSessionLostEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynSessionMemberAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynSessionMemberRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::AllJoyn::AllJoynWatcherStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Background.h b/10.0.14393.0/winrt/Windows.Devices.Background.h index 835984319..5e901bfa7 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Background.h +++ b/10.0.14393.0/winrt/Windows.Devices.Background.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Background.3.h" #include "Windows.Devices.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produ } } - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce : produ } } - HRESULT __stdcall get_ExpectedDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExpectedDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpectedDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpectedDuration()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -95,38 +103,76 @@ namespace Windows::Devices::Background { template hstring impl_IDeviceUseDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IDeviceUseDetails)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IDeviceUseDetails::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IDeviceUseDetails)->get_Arguments(put_abi(value))); return value; } template hstring impl_IDeviceServicingDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IDeviceServicingDetails)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IDeviceServicingDetails::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IDeviceServicingDetails)->get_Arguments(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IDeviceServicingDetails::ExpectedDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpectedDuration(put(value))); + check_hresult(WINRT_SHIM(IDeviceServicingDetails)->get_ExpectedDuration(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Background::IDeviceServicingDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Background::IDeviceUseDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Background::DeviceServicingDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Background::DeviceUseDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Advertisement.h b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Advertisement.h index d7bf66661..45345a8de 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Advertisement.h +++ b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Advertisement.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Bluetooth.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Flags(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Flags(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Flags()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flags()); return S_OK; } catch (...) @@ -31,10 +35,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_Flags(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Flags(*reinterpret_cast *>(&value)); return S_OK; } @@ -44,11 +49,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalName()); return S_OK; } catch (...) @@ -58,10 +64,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_LocalName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LocalName(*reinterpret_cast(&value)); return S_OK; } @@ -71,11 +78,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ServiceUuids(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServiceUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUuids()); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ManufacturerData(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ManufacturerData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManufacturerData()); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DataSections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DataSections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataSections()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce> dataList) noexcept override + HRESULT __stdcall abi_GetManufacturerDataByCompanyId(uint16_t companyId, impl::abi_arg_out> dataList) noexcept override { try { - *dataList = detach(this->shim().GetManufacturerDataByCompanyId(companyId)); + typename D::abi_guard guard(this->shim()); + *dataList = detach_abi(this->shim().GetManufacturerDataByCompanyId(companyId)); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce> sectionList) noexcept override + HRESULT __stdcall abi_GetSectionsByType(uint8_t type, impl::abi_arg_out> sectionList) noexcept override { try { - *sectionList = detach(this->shim().GetSectionsByType(type)); + typename D::abi_guard guard(this->shim()); + *sectionList = detach_abi(this->shim().GetSectionsByType(type)); return S_OK; } catch (...) @@ -149,7 +161,8 @@ struct produceshim().DataType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataType()); return S_OK; } catch (...) @@ -162,6 +175,7 @@ struct produceshim()); this->shim().DataType(value); return S_OK; } @@ -175,7 +189,8 @@ struct produceshim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -188,6 +203,7 @@ struct produceshim()); this->shim().Offset(value); return S_OK; } @@ -197,11 +213,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -211,10 +228,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -228,11 +246,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint8_t dataType, int16_t offset, abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint8_t dataType, int16_t offset, impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(dataType, offset, *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(dataType, offset, *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -250,7 +269,8 @@ struct produceshim().DataType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataType()); return S_OK; } catch (...) @@ -263,6 +283,7 @@ struct produceshim()); this->shim().DataType(value); return S_OK; } @@ -272,11 +293,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -286,10 +308,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -303,11 +326,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint8_t dataType, abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint8_t dataType, impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(dataType, *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(dataType, *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -325,7 +349,8 @@ struct produceshim().Flags()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flags()); return S_OK; } catch (...) @@ -338,7 +363,8 @@ struct produceshim().IncompleteService16BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncompleteService16BitUuids()); return S_OK; } catch (...) @@ -351,7 +377,8 @@ struct produceshim().CompleteService16BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompleteService16BitUuids()); return S_OK; } catch (...) @@ -364,7 +391,8 @@ struct produceshim().IncompleteService32BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncompleteService32BitUuids()); return S_OK; } catch (...) @@ -377,7 +405,8 @@ struct produceshim().CompleteService32BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompleteService32BitUuids()); return S_OK; } catch (...) @@ -390,7 +419,8 @@ struct produceshim().IncompleteService128BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncompleteService128BitUuids()); return S_OK; } catch (...) @@ -403,7 +433,8 @@ struct produceshim().CompleteService128BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompleteService128BitUuids()); return S_OK; } catch (...) @@ -416,7 +447,8 @@ struct produceshim().ShortenedLocalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShortenedLocalName()); return S_OK; } catch (...) @@ -429,7 +461,8 @@ struct produceshim().CompleteLocalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompleteLocalName()); return S_OK; } catch (...) @@ -442,7 +475,8 @@ struct produceshim().TxPowerLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TxPowerLevel()); return S_OK; } catch (...) @@ -455,7 +489,8 @@ struct produceshim().SlaveConnectionIntervalRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SlaveConnectionIntervalRange()); return S_OK; } catch (...) @@ -468,7 +503,8 @@ struct produceshim().ServiceSolicitation16BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceSolicitation16BitUuids()); return S_OK; } catch (...) @@ -481,7 +517,8 @@ struct produceshim().ServiceSolicitation32BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceSolicitation32BitUuids()); return S_OK; } catch (...) @@ -494,7 +531,8 @@ struct produceshim().ServiceSolicitation128BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceSolicitation128BitUuids()); return S_OK; } catch (...) @@ -507,7 +545,8 @@ struct produceshim().ServiceData16BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceData16BitUuids()); return S_OK; } catch (...) @@ -520,7 +559,8 @@ struct produceshim().ServiceData32BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceData32BitUuids()); return S_OK; } catch (...) @@ -533,7 +573,8 @@ struct produceshim().ServiceData128BitUuids()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceData128BitUuids()); return S_OK; } catch (...) @@ -546,7 +587,8 @@ struct produceshim().PublicTargetAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicTargetAddress()); return S_OK; } catch (...) @@ -559,7 +601,8 @@ struct produceshim().RandomTargetAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RandomTargetAddress()); return S_OK; } catch (...) @@ -572,7 +615,8 @@ struct produceshim().Appearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appearance()); return S_OK; } catch (...) @@ -585,7 +629,8 @@ struct produceshim().AdvertisingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisingInterval()); return S_OK; } catch (...) @@ -598,7 +643,8 @@ struct produceshim().ManufacturerSpecificData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManufacturerSpecificData()); return S_OK; } catch (...) @@ -611,11 +657,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Advertisement(abi_arg_out value) noexcept override + HRESULT __stdcall get_Advertisement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Advertisement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisement()); return S_OK; } catch (...) @@ -625,10 +672,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Advertisement(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Advertisement(*reinterpret_cast(&value)); return S_OK; } @@ -638,11 +686,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_BytePatterns(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BytePatterns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytePatterns()); return S_OK; } catch (...) @@ -660,7 +709,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -669,11 +719,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Advertisement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Advertisement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisement()); return S_OK; } catch (...) @@ -687,6 +738,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -700,6 +752,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -709,11 +762,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -726,6 +780,7 @@ struct produceshim()); this->shim().StatusChanged(token); return S_OK; } @@ -739,11 +794,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in advertisement, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in advertisement, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&advertisement))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&advertisement))); return S_OK; } catch (...) @@ -761,7 +817,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -774,7 +831,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -791,7 +849,8 @@ struct produceshim().RawSignalStrengthInDBm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawSignalStrengthInDBm()); return S_OK; } catch (...) @@ -804,7 +863,8 @@ struct produceshim().BluetoothAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BluetoothAddress()); return S_OK; } catch (...) @@ -817,7 +877,8 @@ struct produceshim().AdvertisementType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisementType()); return S_OK; } catch (...) @@ -826,11 +887,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -839,11 +901,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Advertisement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Advertisement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisement()); return S_OK; } catch (...) @@ -857,11 +920,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MinSamplingInterval(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinSamplingInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinSamplingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinSamplingInterval()); return S_OK; } catch (...) @@ -870,11 +934,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxSamplingInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSamplingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSamplingInterval()); return S_OK; } catch (...) @@ -883,11 +948,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinOutOfRangeTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinOutOfRangeTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinOutOfRangeTimeout()); return S_OK; } catch (...) @@ -896,11 +962,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxOutOfRangeTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxOutOfRangeTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxOutOfRangeTimeout()); return S_OK; } catch (...) @@ -913,7 +980,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -926,7 +994,8 @@ struct produceshim().ScanningMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanningMode()); return S_OK; } catch (...) @@ -939,6 +1008,7 @@ struct produceshim()); this->shim().ScanningMode(value); return S_OK; } @@ -948,11 +1018,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SignalStrengthFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignalStrengthFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignalStrengthFilter()); return S_OK; } catch (...) @@ -962,10 +1033,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SignalStrengthFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SignalStrengthFilter(*reinterpret_cast(&value)); return S_OK; } @@ -975,11 +1047,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AdvertisementFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvertisementFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisementFilter()); return S_OK; } catch (...) @@ -989,10 +1062,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AdvertisementFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AdvertisementFilter(*reinterpret_cast(&value)); return S_OK; } @@ -1006,6 +1080,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -1019,6 +1094,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -1028,11 +1104,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Received(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Received(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Received(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1045,6 +1122,7 @@ struct produceshim()); this->shim().Received(token); return S_OK; } @@ -1054,11 +1132,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1071,6 +1150,7 @@ struct produceshim()); this->shim().Stopped(token); return S_OK; } @@ -1084,11 +1164,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in advertisementFilter, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in advertisementFilter, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&advertisementFilter))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&advertisementFilter))); return S_OK; } catch (...) @@ -1106,7 +1187,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -1123,7 +1205,8 @@ struct produceshim().CompanyId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyId()); return S_OK; } catch (...) @@ -1136,6 +1219,7 @@ struct produceshim()); this->shim().CompanyId(value); return S_OK; } @@ -1145,11 +1229,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1159,10 +1244,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -1176,11 +1262,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint16_t companyId, abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint16_t companyId, impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(companyId, *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(companyId, *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1198,180 +1285,180 @@ namespace Windows::Devices::Bluetooth::Advertisement { template Windows::Foundation::IReference impl_IBluetoothLEAdvertisement::Flags() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Flags(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->get_Flags(put_abi(value))); return value; } -template void impl_IBluetoothLEAdvertisement::Flags(const Windows::Foundation::IReference & value) const +template void impl_IBluetoothLEAdvertisement::Flags(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Flags(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->put_Flags(get_abi(value))); } template hstring impl_IBluetoothLEAdvertisement::LocalName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalName(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->get_LocalName(put_abi(value))); return value; } -template void impl_IBluetoothLEAdvertisement::LocalName(hstring_ref value) const +template void impl_IBluetoothLEAdvertisement::LocalName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_LocalName(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->put_LocalName(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IBluetoothLEAdvertisement::ServiceUuids() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ServiceUuids(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->get_ServiceUuids(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IBluetoothLEAdvertisement::ManufacturerData() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ManufacturerData(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->get_ManufacturerData(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IBluetoothLEAdvertisement::DataSections() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DataSections(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->get_DataSections(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothLEAdvertisement::GetManufacturerDataByCompanyId(uint16_t companyId) const { Windows::Foundation::Collections::IVectorView dataList; - check_hresult(static_cast(static_cast(*this))->abi_GetManufacturerDataByCompanyId(companyId, put(dataList))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->abi_GetManufacturerDataByCompanyId(companyId, put_abi(dataList))); return dataList; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothLEAdvertisement::GetSectionsByType(uint8_t type) const { Windows::Foundation::Collections::IVectorView sectionList; - check_hresult(static_cast(static_cast(*this))->abi_GetSectionsByType(type, put(sectionList))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisement)->abi_GetSectionsByType(type, put_abi(sectionList))); return sectionList; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement impl_IBluetoothLEAdvertisementFilter::Advertisement() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Advertisement(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementFilter)->get_Advertisement(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementFilter::Advertisement(const Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Advertisement(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementFilter)->put_Advertisement(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IBluetoothLEAdvertisementFilter::BytePatterns() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_BytePatterns(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementFilter)->get_BytePatterns(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothError impl_IBluetoothLEAdvertisementWatcherStoppedEventArgs::Error() const { Windows::Devices::Bluetooth::BluetoothError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherStoppedEventArgs)->get_Error(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher impl_IBluetoothLEAdvertisementWatcherFactory::Create(const Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter & advertisementFilter) const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(advertisementFilter), put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherFactory)->abi_Create(get_abi(advertisementFilter), put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcher::MinSamplingInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MinSamplingInterval(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_MinSamplingInterval(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcher::MaxSamplingInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSamplingInterval(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_MaxSamplingInterval(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcher::MinOutOfRangeTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MinOutOfRangeTimeout(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_MinOutOfRangeTimeout(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBluetoothLEAdvertisementWatcher::MaxOutOfRangeTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxOutOfRangeTimeout(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_MaxOutOfRangeTimeout(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStatus impl_IBluetoothLEAdvertisementWatcher::Status() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_Status(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEScanningMode impl_IBluetoothLEAdvertisementWatcher::ScanningMode() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEScanningMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanningMode(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_ScanningMode(&value)); return value; } template void impl_IBluetoothLEAdvertisementWatcher::ScanningMode(Windows::Devices::Bluetooth::Advertisement::BluetoothLEScanningMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ScanningMode(value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->put_ScanningMode(value)); } template Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter impl_IBluetoothLEAdvertisementWatcher::SignalStrengthFilter() const { Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SignalStrengthFilter(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_SignalStrengthFilter(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementWatcher::SignalStrengthFilter(const Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter & value) const { - check_hresult(static_cast(static_cast(*this))->put_SignalStrengthFilter(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->put_SignalStrengthFilter(get_abi(value))); } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter impl_IBluetoothLEAdvertisementWatcher::AdvertisementFilter() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AdvertisementFilter(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->get_AdvertisementFilter(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementWatcher::AdvertisementFilter(const Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter & value) const { - check_hresult(static_cast(static_cast(*this))->put_AdvertisementFilter(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->put_AdvertisementFilter(get_abi(value))); } template void impl_IBluetoothLEAdvertisementWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->abi_Start()); } template void impl_IBluetoothLEAdvertisementWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->abi_Stop()); } template event_token impl_IBluetoothLEAdvertisementWatcher::Received(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Received(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->add_Received(get_abi(handler), &token)); return token; } @@ -1382,13 +1469,13 @@ template event_revoker impl_IBlue template void impl_IBluetoothLEAdvertisementWatcher::Received(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Received(token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->remove_Received(token)); } template event_token impl_IBluetoothLEAdvertisementWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->add_Stopped(get_abi(handler), &token)); return token; } @@ -1399,352 +1486,352 @@ template event_revoker impl_IBlue template void impl_IBluetoothLEAdvertisementWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcher)->remove_Stopped(token)); } template int16_t impl_IBluetoothLEAdvertisementReceivedEventArgs::RawSignalStrengthInDBm() const { int16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RawSignalStrengthInDBm(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementReceivedEventArgs)->get_RawSignalStrengthInDBm(&value)); return value; } template uint64_t impl_IBluetoothLEAdvertisementReceivedEventArgs::BluetoothAddress() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BluetoothAddress(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementReceivedEventArgs)->get_BluetoothAddress(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementType impl_IBluetoothLEAdvertisementReceivedEventArgs::AdvertisementType() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementType value {}; - check_hresult(static_cast(static_cast(*this))->get_AdvertisementType(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementReceivedEventArgs)->get_AdvertisementType(&value)); return value; } template Windows::Foundation::DateTime impl_IBluetoothLEAdvertisementReceivedEventArgs::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementReceivedEventArgs)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement impl_IBluetoothLEAdvertisementReceivedEventArgs::Advertisement() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Advertisement(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementReceivedEventArgs)->get_Advertisement(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection impl_IBluetoothLEAdvertisementDataSectionFactory::Create(uint8_t dataType, const Windows::Storage::Streams::IBuffer & data) const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(dataType, get(data), put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataSectionFactory)->abi_Create(dataType, get_abi(data), put_abi(value))); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataSection::DataType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataType(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataSection)->get_DataType(&value)); return value; } template void impl_IBluetoothLEAdvertisementDataSection::DataType(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataType(value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataSection)->put_DataType(value)); } template Windows::Storage::Streams::IBuffer impl_IBluetoothLEAdvertisementDataSection::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataSection)->get_Data(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementDataSection::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataSection)->put_Data(get_abi(value))); } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData impl_IBluetoothLEManufacturerDataFactory::Create(uint16_t companyId, const Windows::Storage::Streams::IBuffer & data) const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(companyId, get(data), put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEManufacturerDataFactory)->abi_Create(companyId, get_abi(data), put_abi(value))); return value; } template uint16_t impl_IBluetoothLEManufacturerData::CompanyId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompanyId(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEManufacturerData)->get_CompanyId(&value)); return value; } template void impl_IBluetoothLEManufacturerData::CompanyId(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CompanyId(value)); + check_hresult(WINRT_SHIM(IBluetoothLEManufacturerData)->put_CompanyId(value)); } template Windows::Storage::Streams::IBuffer impl_IBluetoothLEManufacturerData::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEManufacturerData)->get_Data(put_abi(value))); return value; } template void impl_IBluetoothLEManufacturerData::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEManufacturerData)->put_Data(get_abi(value))); } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern impl_IBluetoothLEAdvertisementBytePatternFactory::Create(uint8_t dataType, int16_t offset, const Windows::Storage::Streams::IBuffer & data) const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(dataType, offset, get(data), put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePatternFactory)->abi_Create(dataType, offset, get_abi(data), put_abi(value))); return value; } template uint8_t impl_IBluetoothLEAdvertisementBytePattern::DataType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataType(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->get_DataType(&value)); return value; } template void impl_IBluetoothLEAdvertisementBytePattern::DataType(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataType(value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->put_DataType(value)); } template int16_t impl_IBluetoothLEAdvertisementBytePattern::Offset() const { int16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->get_Offset(&value)); return value; } template void impl_IBluetoothLEAdvertisementBytePattern::Offset(int16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->put_Offset(value)); } template Windows::Storage::Streams::IBuffer impl_IBluetoothLEAdvertisementBytePattern::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->get_Data(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementBytePattern::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementBytePattern)->put_Data(get_abi(value))); } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::Flags() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Flags(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_Flags(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::IncompleteService16BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IncompleteService16BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_IncompleteService16BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::CompleteService16BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompleteService16BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_CompleteService16BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::IncompleteService32BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IncompleteService32BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_IncompleteService32BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::CompleteService32BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompleteService32BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_CompleteService32BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::IncompleteService128BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IncompleteService128BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_IncompleteService128BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::CompleteService128BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompleteService128BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_CompleteService128BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ShortenedLocalName() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ShortenedLocalName(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ShortenedLocalName(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::CompleteLocalName() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompleteLocalName(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_CompleteLocalName(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::TxPowerLevel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TxPowerLevel(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_TxPowerLevel(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::SlaveConnectionIntervalRange() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SlaveConnectionIntervalRange(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_SlaveConnectionIntervalRange(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceSolicitation16BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceSolicitation16BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceSolicitation16BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceSolicitation32BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceSolicitation32BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceSolicitation32BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceSolicitation128BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceSolicitation128BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceSolicitation128BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceData16BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceData16BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceData16BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceData32BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceData32BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceData32BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ServiceData128BitUuids() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceData128BitUuids(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ServiceData128BitUuids(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::PublicTargetAddress() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PublicTargetAddress(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_PublicTargetAddress(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::RandomTargetAddress() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RandomTargetAddress(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_RandomTargetAddress(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::Appearance() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Appearance(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_Appearance(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::AdvertisingInterval() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AdvertisingInterval(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_AdvertisingInterval(&value)); return value; } template uint8_t impl_IBluetoothLEAdvertisementDataTypesStatics::ManufacturerSpecificData() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ManufacturerSpecificData(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementDataTypesStatics)->get_ManufacturerSpecificData(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus impl_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs::Status() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherStatusChangedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothError impl_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs::Error() const { Windows::Devices::Bluetooth::BluetoothError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherStatusChangedEventArgs)->get_Error(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher impl_IBluetoothLEAdvertisementPublisherFactory::Create(const Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement & advertisement) const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(advertisement), put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherFactory)->abi_Create(get_abi(advertisement), put_abi(value))); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus impl_IBluetoothLEAdvertisementPublisher::Status() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->get_Status(&value)); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement impl_IBluetoothLEAdvertisementPublisher::Advertisement() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Advertisement(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->get_Advertisement(put_abi(value))); return value; } template void impl_IBluetoothLEAdvertisementPublisher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->abi_Start()); } template void impl_IBluetoothLEAdvertisementPublisher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->abi_Stop()); } template event_token impl_IBluetoothLEAdvertisementPublisher::StatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->add_StatusChanged(get_abi(handler), &token)); return token; } @@ -1755,7 +1842,7 @@ template event_revoker impl_IBl template void impl_IBluetoothLEAdvertisementPublisher::StatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisher)->remove_StatusChanged(token)); } inline BluetoothLEAdvertisement::BluetoothLEAdvertisement() : @@ -1919,3 +2006,239 @@ inline BluetoothLEManufacturerData::BluetoothLEManufacturerData(uint16_t company } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementBytePattern & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementBytePatternFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementDataSection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementDataSectionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementDataTypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementPublisher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementPublisherFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementPublisherStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementWatcherFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEAdvertisementWatcherStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEManufacturerData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::IBluetoothLEManufacturerDataFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementBytePattern & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementDataSection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementWatcherStoppedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEManufacturerData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Background.h b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Background.h index 6e2fc40bb..00eb15c82 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Background.h +++ b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Background.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Bluetooth.Rfcomm.3.h" #include "internal/Windows.Devices.Bluetooth.3.h" @@ -24,7 +27,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -54,7 +59,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Advertisements(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Advertisements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisements()); return S_OK; } catch (...) @@ -77,11 +84,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SignalStrengthFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignalStrengthFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignalStrengthFilter()); return S_OK; } catch (...) @@ -95,11 +103,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Characteristic(abi_arg_out value) noexcept override + HRESULT __stdcall get_Characteristic(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Characteristic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Characteristic()); return S_OK; } catch (...) @@ -109,11 +118,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -127,11 +137,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Socket(abi_arg_out value) noexcept override + HRESULT __stdcall get_Socket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Socket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Socket()); return S_OK; } catch (...) @@ -145,7 +156,8 @@ struct produceshim().Incoming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Incoming()); return S_OK; } catch (...) @@ -154,11 +166,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemoteDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteDevice()); return S_OK; } catch (...) @@ -172,11 +185,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SdpRecord(abi_arg_out value) noexcept override + HRESULT __stdcall get_SdpRecord(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SdpRecord()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SdpRecord()); return S_OK; } catch (...) @@ -186,10 +200,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SdpRecord(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SdpRecord(*reinterpret_cast(&value)); return S_OK; } @@ -199,11 +214,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalServiceId()); return S_OK; } catch (...) @@ -213,10 +229,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_LocalServiceId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LocalServiceId(*reinterpret_cast(&value)); return S_OK; } @@ -230,7 +247,8 @@ struct produceshim().ServiceCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceCapabilities()); return S_OK; } catch (...) @@ -243,6 +261,7 @@ struct produceshim()); this->shim().ServiceCapabilities(value); return S_OK; } @@ -256,11 +275,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RemoteServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteServiceId()); return S_OK; } catch (...) @@ -270,10 +290,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RemoteServiceId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteServiceId(*reinterpret_cast(&value)); return S_OK; } @@ -291,121 +312,231 @@ namespace Windows::Devices::Bluetooth::Background { template Windows::Storage::Streams::IBuffer impl_IRfcommInboundConnectionInformation::SdpRecord() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SdpRecord(put(value))); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->get_SdpRecord(put_abi(value))); return value; } template void impl_IRfcommInboundConnectionInformation::SdpRecord(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_SdpRecord(get(value))); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->put_SdpRecord(get_abi(value))); } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommInboundConnectionInformation::LocalServiceId() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalServiceId(put(value))); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->get_LocalServiceId(put_abi(value))); return value; } template void impl_IRfcommInboundConnectionInformation::LocalServiceId(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & value) const { - check_hresult(static_cast(static_cast(*this))->put_LocalServiceId(get(value))); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->put_LocalServiceId(get_abi(value))); } template Windows::Devices::Bluetooth::BluetoothServiceCapabilities impl_IRfcommInboundConnectionInformation::ServiceCapabilities() const { Windows::Devices::Bluetooth::BluetoothServiceCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceCapabilities(&value)); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->get_ServiceCapabilities(&value)); return value; } template void impl_IRfcommInboundConnectionInformation::ServiceCapabilities(Windows::Devices::Bluetooth::BluetoothServiceCapabilities value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceCapabilities(value)); + check_hresult(WINRT_SHIM(IRfcommInboundConnectionInformation)->put_ServiceCapabilities(value)); } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommOutboundConnectionInformation::RemoteServiceId() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteServiceId(put(value))); + check_hresult(WINRT_SHIM(IRfcommOutboundConnectionInformation)->get_RemoteServiceId(put_abi(value))); return value; } template void impl_IRfcommOutboundConnectionInformation::RemoteServiceId(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteServiceId(get(value))); + check_hresult(WINRT_SHIM(IRfcommOutboundConnectionInformation)->put_RemoteServiceId(get_abi(value))); } template Windows::Networking::Sockets::StreamSocket impl_IRfcommConnectionTriggerDetails::Socket() const { Windows::Networking::Sockets::StreamSocket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Socket(put(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTriggerDetails)->get_Socket(put_abi(value))); return value; } template bool impl_IRfcommConnectionTriggerDetails::Incoming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Incoming(&value)); + check_hresult(WINRT_SHIM(IRfcommConnectionTriggerDetails)->get_Incoming(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothDevice impl_IRfcommConnectionTriggerDetails::RemoteDevice() const { Windows::Devices::Bluetooth::BluetoothDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteDevice(put(value))); + check_hresult(WINRT_SHIM(IRfcommConnectionTriggerDetails)->get_RemoteDevice(put_abi(value))); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic impl_IGattCharacteristicNotificationTriggerDetails::Characteristic() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Characteristic(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristicNotificationTriggerDetails)->get_Characteristic(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IGattCharacteristicNotificationTriggerDetails::Value() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristicNotificationTriggerDetails)->get_Value(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothError impl_IBluetoothLEAdvertisementWatcherTriggerDetails::Error() const { Windows::Devices::Bluetooth::BluetoothError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTriggerDetails)->get_Error(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothLEAdvertisementWatcherTriggerDetails::Advertisements() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Advertisements(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTriggerDetails)->get_Advertisements(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter impl_IBluetoothLEAdvertisementWatcherTriggerDetails::SignalStrengthFilter() const { Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SignalStrengthFilter(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementWatcherTriggerDetails)->get_SignalStrengthFilter(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus impl_IBluetoothLEAdvertisementPublisherTriggerDetails::Status() const { Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherTriggerDetails)->get_Status(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothError impl_IBluetoothLEAdvertisementPublisherTriggerDetails::Error() const { Windows::Devices::Bluetooth::BluetoothError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAdvertisementPublisherTriggerDetails)->get_Error(&value)); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementPublisherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementWatcherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::GattCharacteristicNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::RfcommConnectionTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.GenericAttributeProfile.h b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.GenericAttributeProfile.h index 8aefe7e2a..e89ce1f7d 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.GenericAttributeProfile.h +++ b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.GenericAttributeProfile.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Bluetooth.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetDescriptors(GUID descriptorUuid, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetDescriptors(GUID descriptorUuid, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetDescriptors(descriptorUuid)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDescriptors(descriptorUuid)); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produceshim().CharacteristicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicProperties()); return S_OK; } catch (...) @@ -49,7 +54,8 @@ struct produceshim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -62,6 +68,7 @@ struct produceshim()); this->shim().ProtectionLevel(value); return S_OK; } @@ -71,11 +78,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UserDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserDescription()); return S_OK; } catch (...) @@ -89,7 +97,8 @@ struct produceshim().Uuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uuid()); return S_OK; } catch (...) @@ -102,7 +111,8 @@ struct produceshim().AttributeHandle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributeHandle()); return S_OK; } catch (...) @@ -111,11 +121,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PresentationFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PresentationFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PresentationFormats()); return S_OK; } catch (...) @@ -125,11 +136,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_ReadValueAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadValueAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadValueAsync()); return S_OK; } catch (...) @@ -139,11 +151,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_ReadValueWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadValueAsync(cacheMode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadValueAsync(cacheMode)); return S_OK; } catch (...) @@ -153,11 +166,12 @@ struct produce value, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_WriteValueAsync(impl::abi_arg_in value, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().WriteValueAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().WriteValueAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -167,11 +181,12 @@ struct produce value, Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption writeOption, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_WriteValueWithOptionAsync(impl::abi_arg_in value, Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption writeOption, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().WriteValueAsync(*reinterpret_cast(&value), writeOption)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().WriteValueAsync(*reinterpret_cast(&value), writeOption)); return S_OK; } catch (...) @@ -181,11 +196,12 @@ struct produce> asyncOp) noexcept override + HRESULT __stdcall abi_ReadClientCharacteristicConfigurationDescriptorAsync(impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().ReadClientCharacteristicConfigurationDescriptorAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().ReadClientCharacteristicConfigurationDescriptorAsync()); return S_OK; } catch (...) @@ -195,11 +211,12 @@ struct produce> asyncOp) noexcept override + HRESULT __stdcall abi_WriteClientCharacteristicConfigurationDescriptorAsync(Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().WriteClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().WriteClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue)); return S_OK; } catch (...) @@ -209,11 +226,12 @@ struct produce> valueChangedHandler, event_token * valueChangedEventCookie) noexcept override + HRESULT __stdcall add_ValueChanged(impl::abi_arg_in> valueChangedHandler, event_token * valueChangedEventCookie) noexcept override { try { - *valueChangedEventCookie = detach(this->shim().ValueChanged(*reinterpret_cast *>(&valueChangedHandler))); + typename D::abi_guard guard(this->shim()); + *valueChangedEventCookie = detach_abi(this->shim().ValueChanged(*reinterpret_cast *>(&valueChangedHandler))); return S_OK; } catch (...) @@ -226,6 +244,7 @@ struct produceshim()); this->shim().ValueChanged(valueChangedEventCookie); return S_OK; } @@ -239,11 +258,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Service(abi_arg_out value) noexcept override + HRESULT __stdcall get_Service(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Service()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Service()); return S_OK; } catch (...) @@ -253,11 +273,12 @@ struct produce> descriptors) noexcept override + HRESULT __stdcall abi_GetAllDescriptors(impl::abi_arg_out> descriptors) noexcept override { try { - *descriptors = detach(this->shim().GetAllDescriptors()); + typename D::abi_guard guard(this->shim()); + *descriptors = detach_abi(this->shim().GetAllDescriptors()); return S_OK; } catch (...) @@ -275,7 +296,8 @@ struct produceshim().ConvertShortIdToUuid(shortId)); + typename D::abi_guard guard(this->shim()); + *characteristicUuid = detach_abi(this->shim().ConvertShortIdToUuid(shortId)); return S_OK; } catch (...) @@ -292,7 +314,8 @@ struct produceshim().BatteryLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BatteryLevel()); return S_OK; } catch (...) @@ -305,7 +328,8 @@ struct produceshim().BloodPressureFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressureFeature()); return S_OK; } catch (...) @@ -318,7 +342,8 @@ struct produceshim().BloodPressureMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressureMeasurement()); return S_OK; } catch (...) @@ -331,7 +356,8 @@ struct produceshim().BodySensorLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BodySensorLocation()); return S_OK; } catch (...) @@ -344,7 +370,8 @@ struct produceshim().CscFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CscFeature()); return S_OK; } catch (...) @@ -357,7 +384,8 @@ struct produceshim().CscMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CscMeasurement()); return S_OK; } catch (...) @@ -370,7 +398,8 @@ struct produceshim().GlucoseFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GlucoseFeature()); return S_OK; } catch (...) @@ -383,7 +412,8 @@ struct produceshim().GlucoseMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GlucoseMeasurement()); return S_OK; } catch (...) @@ -396,7 +426,8 @@ struct produceshim().GlucoseMeasurementContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GlucoseMeasurementContext()); return S_OK; } catch (...) @@ -409,7 +440,8 @@ struct produceshim().HeartRateControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeartRateControlPoint()); return S_OK; } catch (...) @@ -422,7 +454,8 @@ struct produceshim().HeartRateMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeartRateMeasurement()); return S_OK; } catch (...) @@ -435,7 +468,8 @@ struct produceshim().IntermediateCuffPressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateCuffPressure()); return S_OK; } catch (...) @@ -448,7 +482,8 @@ struct produceshim().IntermediateTemperature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateTemperature()); return S_OK; } catch (...) @@ -461,7 +496,8 @@ struct produceshim().MeasurementInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MeasurementInterval()); return S_OK; } catch (...) @@ -474,7 +510,8 @@ struct produceshim().RecordAccessControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordAccessControlPoint()); return S_OK; } catch (...) @@ -487,7 +524,8 @@ struct produceshim().RscFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RscFeature()); return S_OK; } catch (...) @@ -500,7 +538,8 @@ struct produceshim().RscMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RscMeasurement()); return S_OK; } catch (...) @@ -513,7 +552,8 @@ struct produceshim().SCControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SCControlPoint()); return S_OK; } catch (...) @@ -526,7 +566,8 @@ struct produceshim().SensorLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SensorLocation()); return S_OK; } catch (...) @@ -539,7 +580,8 @@ struct produceshim().TemperatureMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemperatureMeasurement()); return S_OK; } catch (...) @@ -552,7 +594,8 @@ struct produceshim().TemperatureType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemperatureType()); return S_OK; } catch (...) @@ -569,7 +612,8 @@ struct produceshim().AlertCategoryId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertCategoryId()); return S_OK; } catch (...) @@ -582,7 +626,8 @@ struct produceshim().AlertCategoryIdBitMask()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertCategoryIdBitMask()); return S_OK; } catch (...) @@ -595,7 +640,8 @@ struct produceshim().AlertLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertLevel()); return S_OK; } catch (...) @@ -608,7 +654,8 @@ struct produceshim().AlertNotificationControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertNotificationControlPoint()); return S_OK; } catch (...) @@ -621,7 +668,8 @@ struct produceshim().AlertStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertStatus()); return S_OK; } catch (...) @@ -634,7 +682,8 @@ struct produceshim().GapAppearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GapAppearance()); return S_OK; } catch (...) @@ -647,7 +696,8 @@ struct produceshim().BootKeyboardInputReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BootKeyboardInputReport()); return S_OK; } catch (...) @@ -660,7 +710,8 @@ struct produceshim().BootKeyboardOutputReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BootKeyboardOutputReport()); return S_OK; } catch (...) @@ -673,7 +724,8 @@ struct produceshim().BootMouseInputReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BootMouseInputReport()); return S_OK; } catch (...) @@ -686,7 +738,8 @@ struct produceshim().CurrentTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentTime()); return S_OK; } catch (...) @@ -699,7 +752,8 @@ struct produceshim().CyclingPowerControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPowerControlPoint()); return S_OK; } catch (...) @@ -712,7 +766,8 @@ struct produceshim().CyclingPowerFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPowerFeature()); return S_OK; } catch (...) @@ -725,7 +780,8 @@ struct produceshim().CyclingPowerMeasurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPowerMeasurement()); return S_OK; } catch (...) @@ -738,7 +794,8 @@ struct produceshim().CyclingPowerVector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPowerVector()); return S_OK; } catch (...) @@ -751,7 +808,8 @@ struct produceshim().DateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTime()); return S_OK; } catch (...) @@ -764,7 +822,8 @@ struct produceshim().DayDateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayDateTime()); return S_OK; } catch (...) @@ -777,7 +836,8 @@ struct produceshim().DayOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeek()); return S_OK; } catch (...) @@ -790,7 +850,8 @@ struct produceshim().GapDeviceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GapDeviceName()); return S_OK; } catch (...) @@ -803,7 +864,8 @@ struct produceshim().DstOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DstOffset()); return S_OK; } catch (...) @@ -816,7 +878,8 @@ struct produceshim().ExactTime256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExactTime256()); return S_OK; } catch (...) @@ -829,7 +892,8 @@ struct produceshim().FirmwareRevisionString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirmwareRevisionString()); return S_OK; } catch (...) @@ -842,7 +906,8 @@ struct produceshim().HardwareRevisionString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareRevisionString()); return S_OK; } catch (...) @@ -855,7 +920,8 @@ struct produceshim().HidControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HidControlPoint()); return S_OK; } catch (...) @@ -868,7 +934,8 @@ struct produceshim().HidInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HidInformation()); return S_OK; } catch (...) @@ -881,7 +948,8 @@ struct produceshim().Ieee1107320601RegulatoryCertificationDataList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ieee1107320601RegulatoryCertificationDataList()); return S_OK; } catch (...) @@ -894,7 +962,8 @@ struct produceshim().LnControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LnControlPoint()); return S_OK; } catch (...) @@ -907,7 +976,8 @@ struct produceshim().LnFeature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LnFeature()); return S_OK; } catch (...) @@ -920,7 +990,8 @@ struct produceshim().LocalTimeInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalTimeInformation()); return S_OK; } catch (...) @@ -933,7 +1004,8 @@ struct produceshim().LocationAndSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationAndSpeed()); return S_OK; } catch (...) @@ -946,7 +1018,8 @@ struct produceshim().ManufacturerNameString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManufacturerNameString()); return S_OK; } catch (...) @@ -959,7 +1032,8 @@ struct produceshim().ModelNumberString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelNumberString()); return S_OK; } catch (...) @@ -972,7 +1046,8 @@ struct produceshim().Navigation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Navigation()); return S_OK; } catch (...) @@ -985,7 +1060,8 @@ struct produceshim().NewAlert()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewAlert()); return S_OK; } catch (...) @@ -998,7 +1074,8 @@ struct produceshim().GapPeripheralPreferredConnectionParameters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GapPeripheralPreferredConnectionParameters()); return S_OK; } catch (...) @@ -1011,7 +1088,8 @@ struct produceshim().GapPeripheralPrivacyFlag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GapPeripheralPrivacyFlag()); return S_OK; } catch (...) @@ -1024,7 +1102,8 @@ struct produceshim().PnpId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PnpId()); return S_OK; } catch (...) @@ -1037,7 +1116,8 @@ struct produceshim().PositionQuality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionQuality()); return S_OK; } catch (...) @@ -1050,7 +1130,8 @@ struct produceshim().ProtocolMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolMode()); return S_OK; } catch (...) @@ -1063,7 +1144,8 @@ struct produceshim().GapReconnectionAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GapReconnectionAddress()); return S_OK; } catch (...) @@ -1076,7 +1158,8 @@ struct produceshim().ReferenceTimeInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReferenceTimeInformation()); return S_OK; } catch (...) @@ -1089,7 +1172,8 @@ struct produceshim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -1102,7 +1186,8 @@ struct produceshim().ReportMap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportMap()); return S_OK; } catch (...) @@ -1115,7 +1200,8 @@ struct produceshim().RingerControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RingerControlPoint()); return S_OK; } catch (...) @@ -1128,7 +1214,8 @@ struct produceshim().RingerSetting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RingerSetting()); return S_OK; } catch (...) @@ -1141,7 +1228,8 @@ struct produceshim().ScanIntervalWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanIntervalWindow()); return S_OK; } catch (...) @@ -1154,7 +1242,8 @@ struct produceshim().ScanRefresh()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanRefresh()); return S_OK; } catch (...) @@ -1167,7 +1256,8 @@ struct produceshim().SerialNumberString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerialNumberString()); return S_OK; } catch (...) @@ -1180,7 +1270,8 @@ struct produceshim().GattServiceChanged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GattServiceChanged()); return S_OK; } catch (...) @@ -1193,7 +1284,8 @@ struct produceshim().SoftwareRevisionString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareRevisionString()); return S_OK; } catch (...) @@ -1206,7 +1298,8 @@ struct produceshim().SupportedNewAlertCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedNewAlertCategory()); return S_OK; } catch (...) @@ -1219,7 +1312,8 @@ struct produceshim().SupportUnreadAlertCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportUnreadAlertCategory()); return S_OK; } catch (...) @@ -1232,7 +1326,8 @@ struct produceshim().SystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemId()); return S_OK; } catch (...) @@ -1245,7 +1340,8 @@ struct produceshim().TimeAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeAccuracy()); return S_OK; } catch (...) @@ -1258,7 +1354,8 @@ struct produceshim().TimeSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeSource()); return S_OK; } catch (...) @@ -1271,7 +1368,8 @@ struct produceshim().TimeUpdateControlPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeUpdateControlPoint()); return S_OK; } catch (...) @@ -1284,7 +1382,8 @@ struct produceshim().TimeUpdateState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeUpdateState()); return S_OK; } catch (...) @@ -1297,7 +1396,8 @@ struct produceshim().TimeWithDst()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeWithDst()); return S_OK; } catch (...) @@ -1310,7 +1410,8 @@ struct produceshim().TimeZone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeZone()); return S_OK; } catch (...) @@ -1323,7 +1424,8 @@ struct produceshim().TxPowerLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TxPowerLevel()); return S_OK; } catch (...) @@ -1336,7 +1438,8 @@ struct produceshim().UnreadAlertStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnreadAlertStatus()); return S_OK; } catch (...) @@ -1353,7 +1456,8 @@ struct produceshim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -1366,6 +1470,7 @@ struct produceshim()); this->shim().ProtectionLevel(value); return S_OK; } @@ -1379,7 +1484,8 @@ struct produceshim().Uuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uuid()); return S_OK; } catch (...) @@ -1392,7 +1498,8 @@ struct produceshim().AttributeHandle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributeHandle()); return S_OK; } catch (...) @@ -1401,11 +1508,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_ReadValueAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadValueAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadValueAsync()); return S_OK; } catch (...) @@ -1415,11 +1523,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_ReadValueWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadValueAsync(cacheMode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadValueAsync(cacheMode)); return S_OK; } catch (...) @@ -1429,11 +1538,12 @@ struct produce value, abi_arg_out> action) noexcept override + HRESULT __stdcall abi_WriteValueAsync(impl::abi_arg_in value, impl::abi_arg_out> action) noexcept override { try { - *action = detach(this->shim().WriteValueAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().WriteValueAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -1451,7 +1561,8 @@ struct produceshim().ConvertShortIdToUuid(shortId)); + typename D::abi_guard guard(this->shim()); + *descriptorUuid = detach_abi(this->shim().ConvertShortIdToUuid(shortId)); return S_OK; } catch (...) @@ -1468,7 +1579,8 @@ struct produceshim().CharacteristicAggregateFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicAggregateFormat()); return S_OK; } catch (...) @@ -1481,7 +1593,8 @@ struct produceshim().CharacteristicExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicExtendedProperties()); return S_OK; } catch (...) @@ -1494,7 +1607,8 @@ struct produceshim().CharacteristicPresentationFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicPresentationFormat()); return S_OK; } catch (...) @@ -1507,7 +1621,8 @@ struct produceshim().CharacteristicUserDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicUserDescription()); return S_OK; } catch (...) @@ -1520,7 +1635,8 @@ struct produceshim().ClientCharacteristicConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientCharacteristicConfiguration()); return S_OK; } catch (...) @@ -1533,7 +1649,8 @@ struct produceshim().ServerCharacteristicConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCharacteristicConfiguration()); return S_OK; } catch (...) @@ -1546,11 +1663,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCharacteristics(GUID characteristicUuid, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetCharacteristics(GUID characteristicUuid, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetCharacteristics(characteristicUuid)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCharacteristics(characteristicUuid)); return S_OK; } catch (...) @@ -1560,11 +1678,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_GetIncludedServices(GUID serviceUuid, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetIncludedServices(serviceUuid)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIncludedServices(serviceUuid)); return S_OK; } catch (...) @@ -1574,11 +1693,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1592,7 +1712,8 @@ struct produceshim().Uuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uuid()); return S_OK; } catch (...) @@ -1605,7 +1726,8 @@ struct produceshim().AttributeHandle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributeHandle()); return S_OK; } catch (...) @@ -1618,11 +1740,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -1632,11 +1755,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ParentServices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ParentServices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentServices()); return S_OK; } catch (...) @@ -1646,11 +1770,12 @@ struct produce> characteristics) noexcept override + HRESULT __stdcall abi_GetAllCharacteristics(impl::abi_arg_out> characteristics) noexcept override { try { - *characteristics = detach(this->shim().GetAllCharacteristics()); + typename D::abi_guard guard(this->shim()); + *characteristics = detach_abi(this->shim().GetAllCharacteristics()); return S_OK; } catch (...) @@ -1660,11 +1785,12 @@ struct produce> includedServices) noexcept override + HRESULT __stdcall abi_GetAllIncludedServices(impl::abi_arg_out> includedServices) noexcept override { try { - *includedServices = detach(this->shim().GetAllIncludedServices()); + typename D::abi_guard guard(this->shim()); + *includedServices = detach_abi(this->shim().GetAllIncludedServices()); return S_OK; } catch (...) @@ -1678,11 +1804,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> gattDeviceService) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> gattDeviceService) noexcept override { try { - *gattDeviceService = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *gattDeviceService = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1692,11 +1819,12 @@ struct produce selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromUuid(GUID serviceUuid, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorFromUuid(serviceUuid)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorFromUuid(serviceUuid)); return S_OK; } catch (...) @@ -1706,11 +1834,12 @@ struct produce selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromShortId(uint16_t serviceShortId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorFromShortId(serviceShortId)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorFromShortId(serviceShortId)); return S_OK; } catch (...) @@ -1724,7 +1853,8 @@ struct produceshim().ConvertShortIdToUuid(shortId)); + typename D::abi_guard guard(this->shim()); + *serviceUuid = detach_abi(this->shim().ConvertShortIdToUuid(shortId)); return S_OK; } catch (...) @@ -1741,7 +1871,8 @@ struct produceshim().FormatType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormatType()); return S_OK; } catch (...) @@ -1754,7 +1885,8 @@ struct produceshim().Exponent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exponent()); return S_OK; } catch (...) @@ -1767,7 +1899,8 @@ struct produceshim().Unit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unit()); return S_OK; } catch (...) @@ -1780,7 +1913,8 @@ struct produceshim().Namespace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Namespace()); return S_OK; } catch (...) @@ -1793,7 +1927,8 @@ struct produceshim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1810,7 +1945,8 @@ struct produceshim().BluetoothSigAssignedNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BluetoothSigAssignedNumbers()); return S_OK; } catch (...) @@ -1827,7 +1963,8 @@ struct produceshim().Boolean()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Boolean()); return S_OK; } catch (...) @@ -1840,7 +1977,8 @@ struct produceshim().Bit2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bit2()); return S_OK; } catch (...) @@ -1853,7 +1991,8 @@ struct produceshim().Nibble()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nibble()); return S_OK; } catch (...) @@ -1866,7 +2005,8 @@ struct produceshim().UInt8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt8()); return S_OK; } catch (...) @@ -1879,7 +2019,8 @@ struct produceshim().UInt12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt12()); return S_OK; } catch (...) @@ -1892,7 +2033,8 @@ struct produceshim().UInt16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt16()); return S_OK; } catch (...) @@ -1905,7 +2047,8 @@ struct produceshim().UInt24()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt24()); return S_OK; } catch (...) @@ -1918,7 +2061,8 @@ struct produceshim().UInt32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt32()); return S_OK; } catch (...) @@ -1931,7 +2075,8 @@ struct produceshim().UInt48()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt48()); return S_OK; } catch (...) @@ -1944,7 +2089,8 @@ struct produceshim().UInt64()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt64()); return S_OK; } catch (...) @@ -1957,7 +2103,8 @@ struct produceshim().UInt128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UInt128()); return S_OK; } catch (...) @@ -1970,7 +2117,8 @@ struct produceshim().SInt8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt8()); return S_OK; } catch (...) @@ -1983,7 +2131,8 @@ struct produceshim().SInt12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt12()); return S_OK; } catch (...) @@ -1996,7 +2145,8 @@ struct produceshim().SInt16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt16()); return S_OK; } catch (...) @@ -2009,7 +2159,8 @@ struct produceshim().SInt24()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt24()); return S_OK; } catch (...) @@ -2022,7 +2173,8 @@ struct produceshim().SInt32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt32()); return S_OK; } catch (...) @@ -2035,7 +2187,8 @@ struct produceshim().SInt48()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt48()); return S_OK; } catch (...) @@ -2048,7 +2201,8 @@ struct produceshim().SInt64()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt64()); return S_OK; } catch (...) @@ -2061,7 +2215,8 @@ struct produceshim().SInt128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SInt128()); return S_OK; } catch (...) @@ -2074,7 +2229,8 @@ struct produceshim().Float32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Float32()); return S_OK; } catch (...) @@ -2087,7 +2243,8 @@ struct produceshim().Float64()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Float64()); return S_OK; } catch (...) @@ -2100,7 +2257,8 @@ struct produceshim().SFloat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SFloat()); return S_OK; } catch (...) @@ -2113,7 +2271,8 @@ struct produceshim().Float()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Float()); return S_OK; } catch (...) @@ -2126,7 +2285,8 @@ struct produceshim().DUInt16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DUInt16()); return S_OK; } catch (...) @@ -2139,7 +2299,8 @@ struct produceshim().Utf8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Utf8()); return S_OK; } catch (...) @@ -2152,7 +2313,8 @@ struct produceshim().Utf16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Utf16()); return S_OK; } catch (...) @@ -2165,7 +2327,8 @@ struct produceshim().Struct()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Struct()); return S_OK; } catch (...) @@ -2182,7 +2345,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2195,7 +2359,8 @@ struct produceshim().ClientCharacteristicConfigurationDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientCharacteristicConfigurationDescriptor()); return S_OK; } catch (...) @@ -2212,7 +2377,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2221,11 +2387,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -2239,10 +2406,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_WriteValue(abi_arg_in characteristic, abi_arg_in value) noexcept override + HRESULT __stdcall abi_WriteValue(impl::abi_arg_in characteristic, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteValue(*reinterpret_cast(&characteristic), *reinterpret_cast(&value)); return S_OK; } @@ -2252,11 +2420,12 @@ struct produce> asyncOp) noexcept override + HRESULT __stdcall abi_CommitAsync(impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CommitAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CommitAsync()); return S_OK; } catch (...) @@ -2274,7 +2443,8 @@ struct produceshim().Battery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Battery()); return S_OK; } catch (...) @@ -2287,7 +2457,8 @@ struct produceshim().BloodPressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressure()); return S_OK; } catch (...) @@ -2300,7 +2471,8 @@ struct produceshim().CyclingSpeedAndCadence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingSpeedAndCadence()); return S_OK; } catch (...) @@ -2313,7 +2485,8 @@ struct produceshim().GenericAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GenericAccess()); return S_OK; } catch (...) @@ -2326,7 +2499,8 @@ struct produceshim().GenericAttribute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GenericAttribute()); return S_OK; } catch (...) @@ -2339,7 +2513,8 @@ struct produceshim().Glucose()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Glucose()); return S_OK; } catch (...) @@ -2352,7 +2527,8 @@ struct produceshim().HealthThermometer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HealthThermometer()); return S_OK; } catch (...) @@ -2365,7 +2541,8 @@ struct produceshim().HeartRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeartRate()); return S_OK; } catch (...) @@ -2378,7 +2555,8 @@ struct produceshim().RunningSpeedAndCadence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RunningSpeedAndCadence()); return S_OK; } catch (...) @@ -2395,7 +2573,8 @@ struct produceshim().AlertNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlertNotification()); return S_OK; } catch (...) @@ -2408,7 +2587,8 @@ struct produceshim().CurrentTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentTime()); return S_OK; } catch (...) @@ -2421,7 +2601,8 @@ struct produceshim().CyclingPower()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPower()); return S_OK; } catch (...) @@ -2434,7 +2615,8 @@ struct produceshim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -2447,7 +2629,8 @@ struct produceshim().HumanInterfaceDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HumanInterfaceDevice()); return S_OK; } catch (...) @@ -2460,7 +2643,8 @@ struct produceshim().ImmediateAlert()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImmediateAlert()); return S_OK; } catch (...) @@ -2473,7 +2657,8 @@ struct produceshim().LinkLoss()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkLoss()); return S_OK; } catch (...) @@ -2486,7 +2671,8 @@ struct produceshim().LocationAndNavigation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationAndNavigation()); return S_OK; } catch (...) @@ -2499,7 +2685,8 @@ struct produceshim().NextDstChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextDstChange()); return S_OK; } catch (...) @@ -2512,7 +2699,8 @@ struct produceshim().PhoneAlertStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneAlertStatus()); return S_OK; } catch (...) @@ -2525,7 +2713,8 @@ struct produceshim().ReferenceTimeUpdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReferenceTimeUpdate()); return S_OK; } catch (...) @@ -2538,7 +2727,8 @@ struct produceshim().ScanParameters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanParameters()); return S_OK; } catch (...) @@ -2551,7 +2741,8 @@ struct produceshim().TxPower()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TxPower()); return S_OK; } catch (...) @@ -2564,11 +2755,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CharacteristicValue(abi_arg_out value) noexcept override + HRESULT __stdcall get_CharacteristicValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacteristicValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacteristicValue()); return S_OK; } catch (...) @@ -2578,11 +2770,12 @@ struct produce timestamp) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out timestamp) noexcept override { try { - *timestamp = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *timestamp = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2596,141 +2789,141 @@ struct produce Windows::Foundation::IAsyncOperation impl_IGattDeviceServiceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IGattDeviceServiceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation gattDeviceService; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(gattDeviceService))); + check_hresult(WINRT_SHIM(IGattDeviceServiceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(gattDeviceService))); return gattDeviceService; } template hstring impl_IGattDeviceServiceStatics::GetDeviceSelectorFromUuid(GUID serviceUuid) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromUuid(serviceUuid, put(selector))); + check_hresult(WINRT_SHIM(IGattDeviceServiceStatics)->abi_GetDeviceSelectorFromUuid(serviceUuid, put_abi(selector))); return selector; } template hstring impl_IGattDeviceServiceStatics::GetDeviceSelectorFromShortId(uint16_t serviceShortId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromShortId(serviceShortId, put(selector))); + check_hresult(WINRT_SHIM(IGattDeviceServiceStatics)->abi_GetDeviceSelectorFromShortId(serviceShortId, put_abi(selector))); return selector; } template GUID impl_IGattDeviceServiceStatics::ConvertShortIdToUuid(uint16_t shortId) const { GUID serviceUuid {}; - check_hresult(static_cast(static_cast(*this))->abi_ConvertShortIdToUuid(shortId, &serviceUuid)); + check_hresult(WINRT_SHIM(IGattDeviceServiceStatics)->abi_ConvertShortIdToUuid(shortId, &serviceUuid)); return serviceUuid; } template GUID impl_IGattCharacteristicStatics::ConvertShortIdToUuid(uint16_t shortId) const { GUID characteristicUuid {}; - check_hresult(static_cast(static_cast(*this))->abi_ConvertShortIdToUuid(shortId, &characteristicUuid)); + check_hresult(WINRT_SHIM(IGattCharacteristicStatics)->abi_ConvertShortIdToUuid(shortId, &characteristicUuid)); return characteristicUuid; } template Windows::Foundation::Collections::IVectorView impl_IGattCharacteristic::GetDescriptors(GUID descriptorUuid) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetDescriptors(descriptorUuid, put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_GetDescriptors(descriptorUuid, put_abi(value))); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties impl_IGattCharacteristic::CharacteristicProperties() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicProperties(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_CharacteristicProperties(&value)); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel impl_IGattCharacteristic::ProtectionLevel() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_ProtectionLevel(&value)); return value; } template void impl_IGattCharacteristic::ProtectionLevel(Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectionLevel(value)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->put_ProtectionLevel(value)); } template hstring impl_IGattCharacteristic::UserDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserDescription(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_UserDescription(put_abi(value))); return value; } template GUID impl_IGattCharacteristic::Uuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Uuid(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_Uuid(&value)); return value; } template uint16_t impl_IGattCharacteristic::AttributeHandle() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttributeHandle(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_AttributeHandle(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattCharacteristic::PresentationFormats() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PresentationFormats(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->get_PresentationFormats(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::ReadValueAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ReadValueAsync(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_ReadValueAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::ReadValueAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ReadValueWithCacheModeAsync(cacheMode, put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_ReadValueWithCacheModeAsync(cacheMode, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::WriteValueAsync(const Windows::Storage::Streams::IBuffer & value) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_WriteValueAsync(get(value), put(asyncOp))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_WriteValueAsync(get_abi(value), put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::WriteValueAsync(const Windows::Storage::Streams::IBuffer & value, Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption writeOption) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_WriteValueWithOptionAsync(get(value), writeOption, put(asyncOp))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_WriteValueWithOptionAsync(get_abi(value), writeOption, put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::ReadClientCharacteristicConfigurationDescriptorAsync() const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_ReadClientCharacteristicConfigurationDescriptorAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_ReadClientCharacteristicConfigurationDescriptorAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IGattCharacteristic::WriteClientCharacteristicConfigurationDescriptorAsync(Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_WriteClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue, put(asyncOp))); + check_hresult(WINRT_SHIM(IGattCharacteristic)->abi_WriteClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue, put_abi(asyncOp))); return asyncOp; } template event_token impl_IGattCharacteristic::ValueChanged(const Windows::Foundation::TypedEventHandler & valueChangedHandler) const { event_token valueChangedEventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ValueChanged(get(valueChangedHandler), &valueChangedEventCookie)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->add_ValueChanged(get_abi(valueChangedHandler), &valueChangedEventCookie)); return valueChangedEventCookie; } @@ -2741,1185 +2934,1185 @@ template event_revoker impl_IGattCharacteristi template void impl_IGattCharacteristic::ValueChanged(event_token valueChangedEventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ValueChanged(valueChangedEventCookie)); + check_hresult(WINRT_SHIM(IGattCharacteristic)->remove_ValueChanged(valueChangedEventCookie)); } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService impl_IGattCharacteristic2::Service() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Service(put(value))); + check_hresult(WINRT_SHIM(IGattCharacteristic2)->get_Service(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattCharacteristic2::GetAllDescriptors() const { Windows::Foundation::Collections::IVectorView descriptors; - check_hresult(static_cast(static_cast(*this))->abi_GetAllDescriptors(put(descriptors))); + check_hresult(WINRT_SHIM(IGattCharacteristic2)->abi_GetAllDescriptors(put_abi(descriptors))); return descriptors; } template GUID impl_IGattDescriptorStatics::ConvertShortIdToUuid(uint16_t shortId) const { GUID descriptorUuid {}; - check_hresult(static_cast(static_cast(*this))->abi_ConvertShortIdToUuid(shortId, &descriptorUuid)); + check_hresult(WINRT_SHIM(IGattDescriptorStatics)->abi_ConvertShortIdToUuid(shortId, &descriptorUuid)); return descriptorUuid; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel impl_IGattDescriptor::ProtectionLevel() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IGattDescriptor)->get_ProtectionLevel(&value)); return value; } template void impl_IGattDescriptor::ProtectionLevel(Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectionLevel(value)); + check_hresult(WINRT_SHIM(IGattDescriptor)->put_ProtectionLevel(value)); } template GUID impl_IGattDescriptor::Uuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Uuid(&value)); + check_hresult(WINRT_SHIM(IGattDescriptor)->get_Uuid(&value)); return value; } template uint16_t impl_IGattDescriptor::AttributeHandle() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttributeHandle(&value)); + check_hresult(WINRT_SHIM(IGattDescriptor)->get_AttributeHandle(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IGattDescriptor::ReadValueAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ReadValueAsync(put(value))); + check_hresult(WINRT_SHIM(IGattDescriptor)->abi_ReadValueAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGattDescriptor::ReadValueAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ReadValueWithCacheModeAsync(cacheMode, put(value))); + check_hresult(WINRT_SHIM(IGattDescriptor)->abi_ReadValueWithCacheModeAsync(cacheMode, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGattDescriptor::WriteValueAsync(const Windows::Storage::Streams::IBuffer & value) const { Windows::Foundation::IAsyncOperation action; - check_hresult(static_cast(static_cast(*this))->abi_WriteValueAsync(get(value), put(action))); + check_hresult(WINRT_SHIM(IGattDescriptor)->abi_WriteValueAsync(get_abi(value), put_abi(action))); return action; } template uint8_t impl_IGattPresentationFormatStatics::BluetoothSigAssignedNumbers() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BluetoothSigAssignedNumbers(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatStatics)->get_BluetoothSigAssignedNumbers(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Boolean() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Boolean(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Boolean(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Bit2() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bit2(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Bit2(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Nibble() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Nibble(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Nibble(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt8() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt8(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt8(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt12() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt12(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt12(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt16() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt16(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt16(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt24() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt24(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt24(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt32() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt32(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt32(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt48() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt48(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt48(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt64() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt64(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt64(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::UInt128() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UInt128(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_UInt128(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt8() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt8(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt8(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt12() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt12(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt12(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt16() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt16(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt16(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt24() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt24(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt24(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt32() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt32(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt32(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt48() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt48(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt48(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt64() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt64(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt64(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SInt128() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SInt128(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SInt128(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Float32() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Float32(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Float32(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Float64() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Float64(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Float64(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::SFloat() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SFloat(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_SFloat(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Float() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Float(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Float(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::DUInt16() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DUInt16(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_DUInt16(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Utf8() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Utf8(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Utf8(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Utf16() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Utf16(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Utf16(&value)); return value; } template uint8_t impl_IGattPresentationFormatTypesStatics::Struct() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Struct(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormatTypesStatics)->get_Struct(&value)); return value; } template uint8_t impl_IGattPresentationFormat::FormatType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FormatType(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormat)->get_FormatType(&value)); return value; } template int32_t impl_IGattPresentationFormat::Exponent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Exponent(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormat)->get_Exponent(&value)); return value; } template uint16_t impl_IGattPresentationFormat::Unit() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unit(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormat)->get_Unit(&value)); return value; } template uint8_t impl_IGattPresentationFormat::Namespace() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Namespace(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormat)->get_Namespace(&value)); return value; } template uint16_t impl_IGattPresentationFormat::Description() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Description(&value)); + check_hresult(WINRT_SHIM(IGattPresentationFormat)->get_Description(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IGattValueChangedEventArgs::CharacteristicValue() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicValue(put(value))); + check_hresult(WINRT_SHIM(IGattValueChangedEventArgs)->get_CharacteristicValue(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IGattValueChangedEventArgs::Timestamp() const { Windows::Foundation::DateTime timestamp {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(timestamp))); + check_hresult(WINRT_SHIM(IGattValueChangedEventArgs)->get_Timestamp(put_abi(timestamp))); return timestamp; } template GUID impl_IGattServiceUuidsStatics::Battery() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Battery(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_Battery(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::BloodPressure() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressure(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_BloodPressure(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::CyclingSpeedAndCadence() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingSpeedAndCadence(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_CyclingSpeedAndCadence(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::GenericAccess() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GenericAccess(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_GenericAccess(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::GenericAttribute() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GenericAttribute(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_GenericAttribute(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::Glucose() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Glucose(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_Glucose(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::HealthThermometer() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HealthThermometer(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_HealthThermometer(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::HeartRate() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HeartRate(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_HeartRate(&value)); return value; } template GUID impl_IGattServiceUuidsStatics::RunningSpeedAndCadence() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RunningSpeedAndCadence(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics)->get_RunningSpeedAndCadence(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::AlertNotification() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertNotification(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_AlertNotification(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::CurrentTime() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentTime(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_CurrentTime(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::CyclingPower() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPower(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_CyclingPower(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::DeviceInformation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_DeviceInformation(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::HumanInterfaceDevice() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HumanInterfaceDevice(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_HumanInterfaceDevice(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::ImmediateAlert() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ImmediateAlert(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_ImmediateAlert(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::LinkLoss() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LinkLoss(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_LinkLoss(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::LocationAndNavigation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationAndNavigation(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_LocationAndNavigation(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::NextDstChange() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_NextDstChange(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_NextDstChange(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::PhoneAlertStatus() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneAlertStatus(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_PhoneAlertStatus(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::ReferenceTimeUpdate() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ReferenceTimeUpdate(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_ReferenceTimeUpdate(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::ScanParameters() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanParameters(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_ScanParameters(&value)); return value; } template GUID impl_IGattServiceUuidsStatics2::TxPower() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TxPower(&value)); + check_hresult(WINRT_SHIM(IGattServiceUuidsStatics2)->get_TxPower(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::BatteryLevel() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BatteryLevel(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_BatteryLevel(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::BloodPressureFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressureFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_BloodPressureFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::BloodPressureMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressureMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_BloodPressureMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::BodySensorLocation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BodySensorLocation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_BodySensorLocation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::CscFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CscFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_CscFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::CscMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CscMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_CscMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::GlucoseFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GlucoseFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_GlucoseFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::GlucoseMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GlucoseMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_GlucoseMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::GlucoseMeasurementContext() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GlucoseMeasurementContext(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_GlucoseMeasurementContext(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::HeartRateControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HeartRateControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_HeartRateControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::HeartRateMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HeartRateMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_HeartRateMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::IntermediateCuffPressure() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_IntermediateCuffPressure(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_IntermediateCuffPressure(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::IntermediateTemperature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_IntermediateTemperature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_IntermediateTemperature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::MeasurementInterval() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_MeasurementInterval(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_MeasurementInterval(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::RecordAccessControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RecordAccessControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_RecordAccessControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::RscFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RscFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_RscFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::RscMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RscMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_RscMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::SCControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SCControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_SCControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::SensorLocation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SensorLocation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_SensorLocation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::TemperatureMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TemperatureMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_TemperatureMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics::TemperatureType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TemperatureType(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics)->get_TemperatureType(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::AlertCategoryId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertCategoryId(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_AlertCategoryId(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::AlertCategoryIdBitMask() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertCategoryIdBitMask(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_AlertCategoryIdBitMask(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::AlertLevel() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertLevel(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_AlertLevel(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::AlertNotificationControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertNotificationControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_AlertNotificationControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::AlertStatus() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlertStatus(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_AlertStatus(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GapAppearance() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GapAppearance(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GapAppearance(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::BootKeyboardInputReport() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BootKeyboardInputReport(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_BootKeyboardInputReport(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::BootKeyboardOutputReport() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BootKeyboardOutputReport(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_BootKeyboardOutputReport(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::BootMouseInputReport() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BootMouseInputReport(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_BootMouseInputReport(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::CurrentTime() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentTime(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_CurrentTime(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::CyclingPowerControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPowerControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_CyclingPowerControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::CyclingPowerFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPowerFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_CyclingPowerFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::CyclingPowerMeasurement() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPowerMeasurement(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_CyclingPowerMeasurement(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::CyclingPowerVector() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPowerVector(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_CyclingPowerVector(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::DateTime() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DateTime(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_DateTime(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::DayDateTime() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DayDateTime(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_DayDateTime(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::DayOfWeek() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeek(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_DayOfWeek(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GapDeviceName() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GapDeviceName(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GapDeviceName(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::DstOffset() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DstOffset(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_DstOffset(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ExactTime256() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ExactTime256(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ExactTime256(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::FirmwareRevisionString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_FirmwareRevisionString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_FirmwareRevisionString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::HardwareRevisionString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareRevisionString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_HardwareRevisionString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::HidControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HidControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_HidControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::HidInformation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_HidInformation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_HidInformation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::Ieee1107320601RegulatoryCertificationDataList() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Ieee1107320601RegulatoryCertificationDataList(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_Ieee1107320601RegulatoryCertificationDataList(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::LnControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LnControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_LnControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::LnFeature() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LnFeature(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_LnFeature(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::LocalTimeInformation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LocalTimeInformation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_LocalTimeInformation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::LocationAndSpeed() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationAndSpeed(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_LocationAndSpeed(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ManufacturerNameString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ManufacturerNameString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ManufacturerNameString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ModelNumberString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ModelNumberString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ModelNumberString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::Navigation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Navigation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_Navigation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::NewAlert() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_NewAlert(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_NewAlert(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GapPeripheralPreferredConnectionParameters() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GapPeripheralPreferredConnectionParameters(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GapPeripheralPreferredConnectionParameters(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GapPeripheralPrivacyFlag() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GapPeripheralPrivacyFlag(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GapPeripheralPrivacyFlag(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::PnpId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PnpId(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_PnpId(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::PositionQuality() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionQuality(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_PositionQuality(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ProtocolMode() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtocolMode(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ProtocolMode(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GapReconnectionAddress() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GapReconnectionAddress(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GapReconnectionAddress(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ReferenceTimeInformation() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ReferenceTimeInformation(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ReferenceTimeInformation(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::Report() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Report(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_Report(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ReportMap() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportMap(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ReportMap(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::RingerControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RingerControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_RingerControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::RingerSetting() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RingerSetting(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_RingerSetting(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ScanIntervalWindow() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanIntervalWindow(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ScanIntervalWindow(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::ScanRefresh() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanRefresh(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_ScanRefresh(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::SerialNumberString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SerialNumberString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_SerialNumberString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::GattServiceChanged() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GattServiceChanged(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_GattServiceChanged(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::SoftwareRevisionString() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SoftwareRevisionString(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_SoftwareRevisionString(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::SupportedNewAlertCategory() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedNewAlertCategory(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_SupportedNewAlertCategory(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::SupportUnreadAlertCategory() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportUnreadAlertCategory(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_SupportUnreadAlertCategory(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::SystemId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemId(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_SystemId(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeAccuracy() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeAccuracy(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeAccuracy(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeSource() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeSource(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeSource(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeUpdateControlPoint() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeUpdateControlPoint(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeUpdateControlPoint(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeUpdateState() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeUpdateState(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeUpdateState(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeWithDst() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeWithDst(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeWithDst(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TimeZone() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeZone(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TimeZone(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::TxPowerLevel() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TxPowerLevel(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_TxPowerLevel(&value)); return value; } template GUID impl_IGattCharacteristicUuidsStatics2::UnreadAlertStatus() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_UnreadAlertStatus(&value)); + check_hresult(WINRT_SHIM(IGattCharacteristicUuidsStatics2)->get_UnreadAlertStatus(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::CharacteristicAggregateFormat() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicAggregateFormat(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_CharacteristicAggregateFormat(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::CharacteristicExtendedProperties() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicExtendedProperties(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_CharacteristicExtendedProperties(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::CharacteristicPresentationFormat() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicPresentationFormat(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_CharacteristicPresentationFormat(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::CharacteristicUserDescription() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacteristicUserDescription(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_CharacteristicUserDescription(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::ClientCharacteristicConfiguration() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ClientCharacteristicConfiguration(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_ClientCharacteristicConfiguration(&value)); return value; } template GUID impl_IGattDescriptorUuidsStatics::ServerCharacteristicConfiguration() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerCharacteristicConfiguration(&value)); + check_hresult(WINRT_SHIM(IGattDescriptorUuidsStatics)->get_ServerCharacteristicConfiguration(&value)); return value; } template void impl_IGattReliableWriteTransaction::WriteValue(const Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic & characteristic, const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteValue(get(characteristic), get(value))); + check_hresult(WINRT_SHIM(IGattReliableWriteTransaction)->abi_WriteValue(get_abi(characteristic), get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IGattReliableWriteTransaction::CommitAsync() const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CommitAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IGattReliableWriteTransaction)->abi_CommitAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus impl_IGattReadResult::Status() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IGattReadResult)->get_Status(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IGattReadResult::Value() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IGattReadResult)->get_Value(put_abi(value))); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus impl_IGattReadClientCharacteristicConfigurationDescriptorResult::Status() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IGattReadClientCharacteristicConfigurationDescriptorResult)->get_Status(&value)); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue impl_IGattReadClientCharacteristicConfigurationDescriptorResult::ClientCharacteristicConfigurationDescriptor() const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue value {}; - check_hresult(static_cast(static_cast(*this))->get_ClientCharacteristicConfigurationDescriptor(&value)); + check_hresult(WINRT_SHIM(IGattReadClientCharacteristicConfigurationDescriptorResult)->get_ClientCharacteristicConfigurationDescriptor(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattDeviceService::GetCharacteristics(GUID characteristicUuid) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetCharacteristics(characteristicUuid, put(value))); + check_hresult(WINRT_SHIM(IGattDeviceService)->abi_GetCharacteristics(characteristicUuid, put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattDeviceService::GetIncludedServices(GUID serviceUuid) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetIncludedServices(serviceUuid, put(value))); + check_hresult(WINRT_SHIM(IGattDeviceService)->abi_GetIncludedServices(serviceUuid, put_abi(value))); return value; } template hstring impl_IGattDeviceService::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IGattDeviceService)->get_DeviceId(put_abi(value))); return value; } template GUID impl_IGattDeviceService::Uuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Uuid(&value)); + check_hresult(WINRT_SHIM(IGattDeviceService)->get_Uuid(&value)); return value; } template uint16_t impl_IGattDeviceService::AttributeHandle() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttributeHandle(&value)); + check_hresult(WINRT_SHIM(IGattDeviceService)->get_AttributeHandle(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothLEDevice impl_IGattDeviceService2::Device() const { Windows::Devices::Bluetooth::BluetoothLEDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IGattDeviceService2)->get_Device(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattDeviceService2::ParentServices() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ParentServices(put(value))); + check_hresult(WINRT_SHIM(IGattDeviceService2)->get_ParentServices(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGattDeviceService2::GetAllCharacteristics() const { Windows::Foundation::Collections::IVectorView characteristics; - check_hresult(static_cast(static_cast(*this))->abi_GetAllCharacteristics(put(characteristics))); + check_hresult(WINRT_SHIM(IGattDeviceService2)->abi_GetAllCharacteristics(put_abi(characteristics))); return characteristics; } template Windows::Foundation::Collections::IVectorView impl_IGattDeviceService2::GetAllIncludedServices() const { Windows::Foundation::Collections::IVectorView includedServices; - check_hresult(static_cast(static_cast(*this))->abi_GetAllIncludedServices(put(includedServices))); + check_hresult(WINRT_SHIM(IGattDeviceService2)->abi_GetAllIncludedServices(put_abi(includedServices))); return includedServices; } @@ -4368,7 +4561,7 @@ inline GUID GattDescriptorUuids::ServerCharacteristicConfiguration() return get_activation_factory().ServerCharacteristicConfiguration(); } -inline Windows::Foundation::IAsyncOperation GattDeviceService::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation GattDeviceService::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -4645,3 +4838,257 @@ inline GUID GattServiceUuids::TxPower() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristic2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristicStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristicUuidsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristicUuidsStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDescriptorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDescriptorUuidsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDeviceService2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattDeviceServiceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattPresentationFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattPresentationFormatStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattPresentationFormatTypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattReadClientCharacteristicConfigurationDescriptorResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattReadResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattReliableWriteTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattServiceUuidsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattServiceUuidsStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattPresentationFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattReadClientCharacteristicConfigurationDescriptorResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattReadResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattReliableWriteTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Rfcomm.h b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Rfcomm.h index 66474441f..59e5d3647 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Rfcomm.h +++ b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.Rfcomm.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Bluetooth.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -20,11 +23,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ConnectionHostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionHostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionHostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionHostName()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce : p } } - HRESULT __stdcall get_ConnectionServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionServiceName()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce : p } } - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -66,7 +72,8 @@ struct produce : p { try { - *value = detach(this->shim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -79,7 +86,8 @@ struct produce : p { try { - *value = detach(this->shim().MaxProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxProtectionLevel()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetSdpRawAttributesAsync(abi_arg_out>> asyncOp) noexcept override + HRESULT __stdcall abi_GetSdpRawAttributesAsync(impl::abi_arg_out>> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().GetSdpRawAttributesAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().GetSdpRawAttributesAsync()); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetSdpRawAttributesWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, abi_arg_out>> asyncOp) noexcept override + HRESULT __stdcall abi_GetSdpRawAttributesWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out>> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().GetSdpRawAttributesAsync(cacheMode)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().GetSdpRawAttributesAsync(cacheMode)); return S_OK; } catch (...) @@ -120,11 +130,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -138,11 +149,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DeviceAccessInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceAccessInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceAccessInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceAccessInformation()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -170,11 +183,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -184,11 +198,12 @@ struct produce serviceId, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_in serviceId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(*reinterpret_cast(&serviceId))); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(*reinterpret_cast(&serviceId))); return S_OK; } catch (...) @@ -202,11 +217,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelectorForBluetoothDevice(abi_arg_in bluetoothDevice, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorForBluetoothDevice(impl::abi_arg_in bluetoothDevice, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorForBluetoothDevice(*reinterpret_cast(&bluetoothDevice))); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorForBluetoothDevice(*reinterpret_cast(&bluetoothDevice))); return S_OK; } catch (...) @@ -216,11 +232,12 @@ struct produce bluetoothDevice, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorForBluetoothDeviceWithCacheMode(impl::abi_arg_in bluetoothDevice, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorForBluetoothDevice(*reinterpret_cast(&bluetoothDevice), cacheMode)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorForBluetoothDevice(*reinterpret_cast(&bluetoothDevice), cacheMode)); return S_OK; } catch (...) @@ -230,11 +247,12 @@ struct produce bluetoothDevice, abi_arg_in serviceId, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorForBluetoothDeviceAndServiceId(impl::abi_arg_in bluetoothDevice, impl::abi_arg_in serviceId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorForBluetoothDeviceAndServiceId(*reinterpret_cast(&bluetoothDevice), *reinterpret_cast(&serviceId))); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorForBluetoothDeviceAndServiceId(*reinterpret_cast(&bluetoothDevice), *reinterpret_cast(&serviceId))); return S_OK; } catch (...) @@ -244,11 +262,12 @@ struct produce bluetoothDevice, abi_arg_in serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(impl::abi_arg_in bluetoothDevice, impl::abi_arg_in serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorForBluetoothDeviceAndServiceId(*reinterpret_cast(&bluetoothDevice), *reinterpret_cast(&serviceId), cacheMode)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorForBluetoothDeviceAndServiceId(*reinterpret_cast(&bluetoothDevice), *reinterpret_cast(&serviceId), cacheMode)); return S_OK; } catch (...) @@ -266,7 +285,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -275,11 +295,12 @@ struct produce> services) noexcept override + HRESULT __stdcall get_Services(impl::abi_arg_out> services) noexcept override { try { - *services = detach(this->shim().Services()); + typename D::abi_guard guard(this->shim()); + *services = detach_abi(this->shim().Services()); return S_OK; } catch (...) @@ -297,7 +318,8 @@ struct produce : produ { try { - *value = detach(this->shim().Uuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uuid()); return S_OK; } catch (...) @@ -310,7 +332,8 @@ struct produce : produ { try { - *shortId = detach(this->shim().AsShortId()); + typename D::abi_guard guard(this->shim()); + *shortId = detach_abi(this->shim().AsShortId()); return S_OK; } catch (...) @@ -319,11 +342,12 @@ struct produce : produ } } - HRESULT __stdcall abi_AsString(abi_arg_out id) noexcept override + HRESULT __stdcall abi_AsString(impl::abi_arg_out id) noexcept override { try { - *id = detach(this->shim().AsString()); + typename D::abi_guard guard(this->shim()); + *id = detach_abi(this->shim().AsString()); return S_OK; } catch (...) @@ -337,11 +361,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_FromUuid(GUID uuid, abi_arg_out serviceId) noexcept override + HRESULT __stdcall abi_FromUuid(GUID uuid, impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().FromUuid(uuid)); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().FromUuid(uuid)); return S_OK; } catch (...) @@ -351,11 +376,12 @@ struct produce } } - HRESULT __stdcall abi_FromShortId(uint32_t shortId, abi_arg_out serviceId) noexcept override + HRESULT __stdcall abi_FromShortId(uint32_t shortId, impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().FromShortId(shortId)); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().FromShortId(shortId)); return S_OK; } catch (...) @@ -365,11 +391,12 @@ struct produce } } - HRESULT __stdcall get_SerialPort(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_SerialPort(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().SerialPort()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().SerialPort()); return S_OK; } catch (...) @@ -379,11 +406,12 @@ struct produce } } - HRESULT __stdcall get_ObexObjectPush(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_ObexObjectPush(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().ObexObjectPush()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().ObexObjectPush()); return S_OK; } catch (...) @@ -393,11 +421,12 @@ struct produce } } - HRESULT __stdcall get_ObexFileTransfer(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_ObexFileTransfer(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().ObexFileTransfer()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().ObexFileTransfer()); return S_OK; } catch (...) @@ -407,11 +436,12 @@ struct produce } } - HRESULT __stdcall get_PhoneBookAccessPce(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_PhoneBookAccessPce(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().PhoneBookAccessPce()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().PhoneBookAccessPce()); return S_OK; } catch (...) @@ -421,11 +451,12 @@ struct produce } } - HRESULT __stdcall get_PhoneBookAccessPse(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_PhoneBookAccessPse(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().PhoneBookAccessPse()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().PhoneBookAccessPse()); return S_OK; } catch (...) @@ -435,11 +466,12 @@ struct produce } } - HRESULT __stdcall get_GenericFileTransfer(abi_arg_out serviceId) noexcept override + HRESULT __stdcall get_GenericFileTransfer(impl::abi_arg_out serviceId) noexcept override { try { - *serviceId = detach(this->shim().GenericFileTransfer()); + typename D::abi_guard guard(this->shim()); + *serviceId = detach_abi(this->shim().GenericFileTransfer()); return S_OK; } catch (...) @@ -453,11 +485,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ServiceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -467,11 +500,12 @@ struct produce : } } - HRESULT __stdcall get_SdpRawAttributes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SdpRawAttributes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SdpRawAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SdpRawAttributes()); return S_OK; } catch (...) @@ -481,10 +515,11 @@ struct produce : } } - HRESULT __stdcall abi_StartAdvertising(abi_arg_in listener) noexcept override + HRESULT __stdcall abi_StartAdvertising(impl::abi_arg_in listener) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartAdvertising(*reinterpret_cast(&listener)); return S_OK; } @@ -498,6 +533,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().StopAdvertising(); return S_OK; } @@ -511,10 +547,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_StartAdvertisingWithRadioDiscoverability(abi_arg_in listener, bool radioDiscoverable) noexcept override + HRESULT __stdcall abi_StartAdvertisingWithRadioDiscoverability(impl::abi_arg_in listener, bool radioDiscoverable) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartAdvertising(*reinterpret_cast(&listener), radioDiscoverable); return S_OK; } @@ -528,11 +565,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateAsync(abi_arg_in serviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_in serviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CreateAsync(*reinterpret_cast(&serviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CreateAsync(*reinterpret_cast(&serviceId))); return S_OK; } catch (...) @@ -550,243 +588,243 @@ namespace Windows::Devices::Bluetooth::Rfcomm { template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::FromUuid(GUID uuid) const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromUuid(uuid, put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->abi_FromUuid(uuid, put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::FromShortId(uint32_t shortId) const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromShortId(shortId, put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->abi_FromShortId(shortId, put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::SerialPort() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SerialPort(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_SerialPort(put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::ObexObjectPush() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ObexObjectPush(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_ObexObjectPush(put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::ObexFileTransfer() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ObexFileTransfer(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_ObexFileTransfer(put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::PhoneBookAccessPce() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PhoneBookAccessPce(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_PhoneBookAccessPce(put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::PhoneBookAccessPse() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PhoneBookAccessPse(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_PhoneBookAccessPse(put_abi(serviceId))); return serviceId; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceIdStatics::GenericFileTransfer() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId serviceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GenericFileTransfer(put(serviceId))); + check_hresult(WINRT_SHIM(IRfcommServiceIdStatics)->get_GenericFileTransfer(put_abi(serviceId))); return serviceId; } template GUID impl_IRfcommServiceId::Uuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Uuid(&value)); + check_hresult(WINRT_SHIM(IRfcommServiceId)->get_Uuid(&value)); return value; } template uint32_t impl_IRfcommServiceId::AsShortId() const { uint32_t shortId {}; - check_hresult(static_cast(static_cast(*this))->abi_AsShortId(&shortId)); + check_hresult(WINRT_SHIM(IRfcommServiceId)->abi_AsShortId(&shortId)); return shortId; } template hstring impl_IRfcommServiceId::AsString() const { hstring id; - check_hresult(static_cast(static_cast(*this))->abi_AsString(put(id))); + check_hresult(WINRT_SHIM(IRfcommServiceId)->abi_AsString(put_abi(id))); return id; } template Windows::Devices::Bluetooth::BluetoothError impl_IRfcommDeviceServicesResult::Error() const { Windows::Devices::Bluetooth::BluetoothError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IRfcommDeviceServicesResult)->get_Error(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IRfcommDeviceServicesResult::Services() const { Windows::Foundation::Collections::IVectorView services; - check_hresult(static_cast(static_cast(*this))->get_Services(put(services))); + check_hresult(WINRT_SHIM(IRfcommDeviceServicesResult)->get_Services(put_abi(services))); return services; } -template Windows::Foundation::IAsyncOperation impl_IRfcommDeviceServiceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IRfcommDeviceServiceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncOp))); return asyncOp; } template hstring impl_IRfcommDeviceServiceStatics::GetDeviceSelector(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(get(serviceId), put(selector))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics)->abi_GetDeviceSelector(get_abi(serviceId), put_abi(selector))); return selector; } template hstring impl_IRfcommDeviceServiceStatics2::GetDeviceSelectorForBluetoothDevice(const Windows::Devices::Bluetooth::BluetoothDevice & bluetoothDevice) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorForBluetoothDevice(get(bluetoothDevice), put(selector))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics2)->abi_GetDeviceSelectorForBluetoothDevice(get_abi(bluetoothDevice), put_abi(selector))); return selector; } template hstring impl_IRfcommDeviceServiceStatics2::GetDeviceSelectorForBluetoothDevice(const Windows::Devices::Bluetooth::BluetoothDevice & bluetoothDevice, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorForBluetoothDeviceWithCacheMode(get(bluetoothDevice), cacheMode, put(selector))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics2)->abi_GetDeviceSelectorForBluetoothDeviceWithCacheMode(get_abi(bluetoothDevice), cacheMode, put_abi(selector))); return selector; } template hstring impl_IRfcommDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceAndServiceId(const Windows::Devices::Bluetooth::BluetoothDevice & bluetoothDevice, const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorForBluetoothDeviceAndServiceId(get(bluetoothDevice), get(serviceId), put(selector))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics2)->abi_GetDeviceSelectorForBluetoothDeviceAndServiceId(get_abi(bluetoothDevice), get_abi(serviceId), put_abi(selector))); return selector; } template hstring impl_IRfcommDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceAndServiceId(const Windows::Devices::Bluetooth::BluetoothDevice & bluetoothDevice, const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(get(bluetoothDevice), get(serviceId), cacheMode, put(selector))); + check_hresult(WINRT_SHIM(IRfcommDeviceServiceStatics2)->abi_GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(get_abi(bluetoothDevice), get_abi(serviceId), cacheMode, put_abi(selector))); return selector; } template Windows::Networking::HostName impl_IRfcommDeviceService::ConnectionHostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionHostName(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->get_ConnectionHostName(put_abi(value))); return value; } template hstring impl_IRfcommDeviceService::ConnectionServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ConnectionServiceName(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->get_ConnectionServiceName(put_abi(value))); return value; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommDeviceService::ServiceId() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->get_ServiceId(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketProtectionLevel impl_IRfcommDeviceService::ProtectionLevel() const { Windows::Networking::Sockets::SocketProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->get_ProtectionLevel(&value)); return value; } template Windows::Networking::Sockets::SocketProtectionLevel impl_IRfcommDeviceService::MaxProtectionLevel() const { Windows::Networking::Sockets::SocketProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->get_MaxProtectionLevel(&value)); return value; } template Windows::Foundation::IAsyncOperation> impl_IRfcommDeviceService::GetSdpRawAttributesAsync() const { Windows::Foundation::IAsyncOperation> asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_GetSdpRawAttributesAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->abi_GetSdpRawAttributesAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation> impl_IRfcommDeviceService::GetSdpRawAttributesAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { Windows::Foundation::IAsyncOperation> asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_GetSdpRawAttributesWithCacheModeAsync(cacheMode, put(asyncOp))); + check_hresult(WINRT_SHIM(IRfcommDeviceService)->abi_GetSdpRawAttributesWithCacheModeAsync(cacheMode, put_abi(asyncOp))); return asyncOp; } template Windows::Devices::Bluetooth::BluetoothDevice impl_IRfcommDeviceService2::Device() const { Windows::Devices::Bluetooth::BluetoothDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService2)->get_Device(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceAccessInformation impl_IRfcommDeviceService3::DeviceAccessInformation() const { Windows::Devices::Enumeration::DeviceAccessInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceAccessInformation(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService3)->get_DeviceAccessInformation(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IRfcommDeviceService3::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(value))); + check_hresult(WINRT_SHIM(IRfcommDeviceService3)->abi_RequestAccessAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IRfcommServiceProviderStatics::CreateAsync(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(get(serviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IRfcommServiceProviderStatics)->abi_CreateAsync(get_abi(serviceId), put_abi(asyncOp))); return asyncOp; } template Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId impl_IRfcommServiceProvider::ServiceId() const { Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(put(value))); + check_hresult(WINRT_SHIM(IRfcommServiceProvider)->get_ServiceId(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IRfcommServiceProvider::SdpRawAttributes() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_SdpRawAttributes(put(value))); + check_hresult(WINRT_SHIM(IRfcommServiceProvider)->get_SdpRawAttributes(put_abi(value))); return value; } template void impl_IRfcommServiceProvider::StartAdvertising(const Windows::Networking::Sockets::StreamSocketListener & listener) const { - check_hresult(static_cast(static_cast(*this))->abi_StartAdvertising(get(listener))); + check_hresult(WINRT_SHIM(IRfcommServiceProvider)->abi_StartAdvertising(get_abi(listener))); } template void impl_IRfcommServiceProvider::StopAdvertising() const { - check_hresult(static_cast(static_cast(*this))->abi_StopAdvertising()); + check_hresult(WINRT_SHIM(IRfcommServiceProvider)->abi_StopAdvertising()); } template void impl_IRfcommServiceProvider2::StartAdvertising(const Windows::Networking::Sockets::StreamSocketListener & listener, bool radioDiscoverable) const { - check_hresult(static_cast(static_cast(*this))->abi_StartAdvertisingWithRadioDiscoverability(get(listener), radioDiscoverable)); + check_hresult(WINRT_SHIM(IRfcommServiceProvider2)->abi_StartAdvertisingWithRadioDiscoverability(get_abi(listener), radioDiscoverable)); } -inline Windows::Foundation::IAsyncOperation RfcommDeviceService::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation RfcommDeviceService::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -864,3 +902,140 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceService2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceService3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceServiceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceServiceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommDeviceServicesResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommServiceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommServiceIdStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommServiceProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommServiceProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::IRfcommServiceProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommDeviceServicesResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.h b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.h index f271ec1b3..6126cb0aa 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Bluetooth.h +++ b/10.0.14393.0/winrt/Windows.Devices.Bluetooth.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Networking.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -24,7 +27,8 @@ struct produce : produc { try { - *value = detach(this->shim().RawValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawValue()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produce : produc { try { - *value = detach(this->shim().MajorClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MajorClass()); return S_OK; } catch (...) @@ -50,7 +55,8 @@ struct produce : produc { try { - *value = detach(this->shim().MinorClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinorClass()); return S_OK; } catch (...) @@ -63,7 +69,8 @@ struct produce : produc { try { - *value = detach(this->shim().ServiceCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceCapabilities()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_FromRawValue(uint32_t rawValue, abi_arg_out classOfDevice) noexcept override + HRESULT __stdcall abi_FromRawValue(uint32_t rawValue, impl::abi_arg_out classOfDevice) noexcept override { try { - *classOfDevice = detach(this->shim().FromRawValue(rawValue)); + typename D::abi_guard guard(this->shim()); + *classOfDevice = detach_abi(this->shim().FromRawValue(rawValue)); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : } } - HRESULT __stdcall abi_FromParts(Windows::Devices::Bluetooth::BluetoothMajorClass majorClass, Windows::Devices::Bluetooth::BluetoothMinorClass minorClass, Windows::Devices::Bluetooth::BluetoothServiceCapabilities serviceCapabilities, abi_arg_out classOfDevice) noexcept override + HRESULT __stdcall abi_FromParts(Windows::Devices::Bluetooth::BluetoothMajorClass majorClass, Windows::Devices::Bluetooth::BluetoothMinorClass minorClass, Windows::Devices::Bluetooth::BluetoothServiceCapabilities serviceCapabilities, impl::abi_arg_out classOfDevice) noexcept override { try { - *classOfDevice = detach(this->shim().FromParts(majorClass, minorClass, serviceCapabilities)); + typename D::abi_guard guard(this->shim()); + *classOfDevice = detach_abi(this->shim().FromParts(majorClass, minorClass, serviceCapabilities)); return S_OK; } catch (...) @@ -108,11 +117,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -122,11 +132,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_HostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_HostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostName()); return S_OK; } catch (...) @@ -136,11 +147,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -150,11 +162,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ClassOfDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClassOfDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClassOfDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClassOfDevice()); return S_OK; } catch (...) @@ -164,11 +177,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_SdpRecords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SdpRecords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SdpRecords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SdpRecords()); return S_OK; } catch (...) @@ -178,11 +192,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_RfcommServices(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RfcommServices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RfcommServices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RfcommServices()); return S_OK; } catch (...) @@ -196,7 +211,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -209,7 +225,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().BluetoothAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BluetoothAddress()); return S_OK; } catch (...) @@ -218,11 +235,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_NameChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NameChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NameChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NameChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -235,6 +253,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().NameChanged(token); return S_OK; } @@ -244,11 +263,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_SdpRecordsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SdpRecordsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SdpRecordsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SdpRecordsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -261,6 +281,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SdpRecordsChanged(token); return S_OK; } @@ -270,11 +291,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_ConnectionStatusChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ConnectionStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -287,6 +309,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionStatusChanged(token); return S_OK; } @@ -300,11 +323,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -318,11 +342,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_DeviceAccessInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceAccessInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceAccessInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceAccessInformation()); return S_OK; } catch (...) @@ -332,11 +357,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -346,11 +372,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetRfcommServicesAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRfcommServicesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRfcommServicesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRfcommServicesAsync()); return S_OK; } catch (...) @@ -360,11 +387,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetRfcommServicesWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRfcommServicesWithCacheModeAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRfcommServicesAsync(cacheMode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRfcommServicesAsync(cacheMode)); return S_OK; } catch (...) @@ -374,11 +402,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetRfcommServicesForIdAsync(abi_arg_in serviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRfcommServicesForIdAsync(impl::abi_arg_in serviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRfcommServicesForIdAsync(*reinterpret_cast(&serviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRfcommServicesForIdAsync(*reinterpret_cast(&serviceId))); return S_OK; } catch (...) @@ -388,11 +417,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetRfcommServicesForIdWithCacheModeAsync(abi_arg_in serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRfcommServicesForIdWithCacheModeAsync(impl::abi_arg_in serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRfcommServicesForIdAsync(*reinterpret_cast(&serviceId), cacheMode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRfcommServicesForIdAsync(*reinterpret_cast(&serviceId), cacheMode)); return S_OK; } catch (...) @@ -406,11 +436,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -420,11 +451,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FromHostNameAsync(abi_arg_in hostName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromHostNameAsync(impl::abi_arg_in hostName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromHostNameAsync(*reinterpret_cast(&hostName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromHostNameAsync(*reinterpret_cast(&hostName))); return S_OK; } catch (...) @@ -434,11 +466,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FromBluetoothAddressAsync(uint64_t address, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromBluetoothAddressAsync(uint64_t address, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromBluetoothAddressAsync(address)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromBluetoothAddressAsync(address)); return S_OK; } catch (...) @@ -448,11 +481,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -466,11 +500,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelectorFromPairingState(bool pairingState, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromPairingState(bool pairingState, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromPairingState(pairingState)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromPairingState(pairingState)); return S_OK; } catch (...) @@ -480,11 +515,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromConnectionStatus(connectionStatus)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromConnectionStatus(connectionStatus)); return S_OK; } catch (...) @@ -494,11 +530,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeviceSelectorFromDeviceName(abi_arg_in deviceName, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromDeviceName(impl::abi_arg_in deviceName, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromDeviceName(*reinterpret_cast(&deviceName))); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromDeviceName(*reinterpret_cast(&deviceName))); return S_OK; } catch (...) @@ -508,11 +545,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress)); return S_OK; } catch (...) @@ -522,11 +560,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeviceSelectorFromClassOfDevice(abi_arg_in classOfDevice, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromClassOfDevice(impl::abi_arg_in classOfDevice, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromClassOfDevice(*reinterpret_cast(&classOfDevice))); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromClassOfDevice(*reinterpret_cast(&classOfDevice))); return S_OK; } catch (...) @@ -544,7 +583,8 @@ struct produce : produce { try { - *value = detach(this->shim().RawValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawValue()); return S_OK; } catch (...) @@ -557,7 +597,8 @@ struct produce : produce { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -570,7 +611,8 @@ struct produce : produce { try { - *value = detach(this->shim().SubCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubCategory()); return S_OK; } catch (...) @@ -587,7 +629,8 @@ struct produceshim().Uncategorized()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uncategorized()); return S_OK; } catch (...) @@ -600,7 +643,8 @@ struct produceshim().Phone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Phone()); return S_OK; } catch (...) @@ -613,7 +657,8 @@ struct produceshim().Computer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Computer()); return S_OK; } catch (...) @@ -626,7 +671,8 @@ struct produceshim().Watch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Watch()); return S_OK; } catch (...) @@ -639,7 +685,8 @@ struct produceshim().Clock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clock()); return S_OK; } catch (...) @@ -652,7 +699,8 @@ struct produceshim().Display()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Display()); return S_OK; } catch (...) @@ -665,7 +713,8 @@ struct produceshim().RemoteControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteControl()); return S_OK; } catch (...) @@ -678,7 +727,8 @@ struct produceshim().EyeGlasses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EyeGlasses()); return S_OK; } catch (...) @@ -691,7 +741,8 @@ struct produceshim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -704,7 +755,8 @@ struct produceshim().Keyring()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keyring()); return S_OK; } catch (...) @@ -717,7 +769,8 @@ struct produceshim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -730,7 +783,8 @@ struct produceshim().BarcodeScanner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BarcodeScanner()); return S_OK; } catch (...) @@ -743,7 +797,8 @@ struct produceshim().Thermometer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thermometer()); return S_OK; } catch (...) @@ -756,7 +811,8 @@ struct produceshim().HeartRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeartRate()); return S_OK; } catch (...) @@ -769,7 +825,8 @@ struct produceshim().BloodPressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressure()); return S_OK; } catch (...) @@ -782,7 +839,8 @@ struct produceshim().HumanInterfaceDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HumanInterfaceDevice()); return S_OK; } catch (...) @@ -795,7 +853,8 @@ struct produceshim().GlucoseMeter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GlucoseMeter()); return S_OK; } catch (...) @@ -808,7 +867,8 @@ struct produceshim().RunningWalking()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RunningWalking()); return S_OK; } catch (...) @@ -821,7 +881,8 @@ struct produceshim().Cycling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cycling()); return S_OK; } catch (...) @@ -834,7 +895,8 @@ struct produceshim().PulseOximeter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PulseOximeter()); return S_OK; } catch (...) @@ -847,7 +909,8 @@ struct produceshim().WeightScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeightScale()); return S_OK; } catch (...) @@ -860,7 +923,8 @@ struct produceshim().OutdoorSportActivity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutdoorSportActivity()); return S_OK; } catch (...) @@ -873,11 +937,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromRawValue(uint16_t rawValue, abi_arg_out appearance) noexcept override + HRESULT __stdcall abi_FromRawValue(uint16_t rawValue, impl::abi_arg_out appearance) noexcept override { try { - *appearance = detach(this->shim().FromRawValue(rawValue)); + typename D::abi_guard guard(this->shim()); + *appearance = detach_abi(this->shim().FromRawValue(rawValue)); return S_OK; } catch (...) @@ -887,11 +952,12 @@ struct produce : } } - HRESULT __stdcall abi_FromParts(uint16_t appearanceCategory, uint16_t appearanceSubCategory, abi_arg_out appearance) noexcept override + HRESULT __stdcall abi_FromParts(uint16_t appearanceCategory, uint16_t appearanceSubCategory, impl::abi_arg_out appearance) noexcept override { try { - *appearance = detach(this->shim().FromParts(appearanceCategory, appearanceSubCategory)); + typename D::abi_guard guard(this->shim()); + *appearance = detach_abi(this->shim().FromParts(appearanceCategory, appearanceSubCategory)); return S_OK; } catch (...) @@ -909,7 +975,8 @@ struct produceshim().Generic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Generic()); return S_OK; } catch (...) @@ -922,7 +989,8 @@ struct produceshim().SportsWatch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SportsWatch()); return S_OK; } catch (...) @@ -935,7 +1003,8 @@ struct produceshim().ThermometerEar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThermometerEar()); return S_OK; } catch (...) @@ -948,7 +1017,8 @@ struct produceshim().HeartRateBelt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeartRateBelt()); return S_OK; } catch (...) @@ -961,7 +1031,8 @@ struct produceshim().BloodPressureArm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressureArm()); return S_OK; } catch (...) @@ -974,7 +1045,8 @@ struct produceshim().BloodPressureWrist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BloodPressureWrist()); return S_OK; } catch (...) @@ -987,7 +1059,8 @@ struct produceshim().Keyboard()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keyboard()); return S_OK; } catch (...) @@ -1000,7 +1073,8 @@ struct produceshim().Mouse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mouse()); return S_OK; } catch (...) @@ -1013,7 +1087,8 @@ struct produceshim().Joystick()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Joystick()); return S_OK; } catch (...) @@ -1026,7 +1101,8 @@ struct produceshim().Gamepad()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gamepad()); return S_OK; } catch (...) @@ -1039,7 +1115,8 @@ struct produceshim().DigitizerTablet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DigitizerTablet()); return S_OK; } catch (...) @@ -1052,7 +1129,8 @@ struct produceshim().CardReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardReader()); return S_OK; } catch (...) @@ -1065,7 +1143,8 @@ struct produceshim().DigitalPen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DigitalPen()); return S_OK; } catch (...) @@ -1078,7 +1157,8 @@ struct produceshim().BarcodeScanner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BarcodeScanner()); return S_OK; } catch (...) @@ -1091,7 +1171,8 @@ struct produceshim().RunningWalkingInShoe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RunningWalkingInShoe()); return S_OK; } catch (...) @@ -1104,7 +1185,8 @@ struct produceshim().RunningWalkingOnShoe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RunningWalkingOnShoe()); return S_OK; } catch (...) @@ -1117,7 +1199,8 @@ struct produceshim().RunningWalkingOnHip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RunningWalkingOnHip()); return S_OK; } catch (...) @@ -1130,7 +1213,8 @@ struct produceshim().CyclingComputer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingComputer()); return S_OK; } catch (...) @@ -1143,7 +1227,8 @@ struct produceshim().CyclingSpeedSensor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingSpeedSensor()); return S_OK; } catch (...) @@ -1156,7 +1241,8 @@ struct produceshim().CyclingCadenceSensor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingCadenceSensor()); return S_OK; } catch (...) @@ -1169,7 +1255,8 @@ struct produceshim().CyclingPowerSensor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingPowerSensor()); return S_OK; } catch (...) @@ -1182,7 +1269,8 @@ struct produceshim().CyclingSpeedCadenceSensor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CyclingSpeedCadenceSensor()); return S_OK; } catch (...) @@ -1195,7 +1283,8 @@ struct produceshim().OximeterFingertip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OximeterFingertip()); return S_OK; } catch (...) @@ -1208,7 +1297,8 @@ struct produceshim().OximeterWristWorn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OximeterWristWorn()); return S_OK; } catch (...) @@ -1221,7 +1311,8 @@ struct produceshim().LocationDisplay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationDisplay()); return S_OK; } catch (...) @@ -1234,7 +1325,8 @@ struct produceshim().LocationNavigationDisplay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationNavigationDisplay()); return S_OK; } catch (...) @@ -1247,7 +1339,8 @@ struct produceshim().LocationPod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationPod()); return S_OK; } catch (...) @@ -1260,7 +1353,8 @@ struct produceshim().LocationNavigationPod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationNavigationPod()); return S_OK; } catch (...) @@ -1273,11 +1367,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1287,11 +1382,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1301,11 +1397,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_GattServices(abi_arg_out> value) noexcept override + HRESULT __stdcall get_GattServices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GattServices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GattServices()); return S_OK; } catch (...) @@ -1319,7 +1416,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -1332,7 +1430,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().BluetoothAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BluetoothAddress()); return S_OK; } catch (...) @@ -1341,11 +1440,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetGattService(GUID serviceUuid, abi_arg_out service) noexcept override + HRESULT __stdcall abi_GetGattService(GUID serviceUuid, impl::abi_arg_out service) noexcept override { try { - *service = detach(this->shim().GetGattService(serviceUuid)); + typename D::abi_guard guard(this->shim()); + *service = detach_abi(this->shim().GetGattService(serviceUuid)); return S_OK; } catch (...) @@ -1355,11 +1455,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_NameChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NameChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NameChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NameChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1372,6 +1473,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().NameChanged(token); return S_OK; } @@ -1381,11 +1483,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_GattServicesChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_GattServicesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GattServicesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GattServicesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1398,6 +1501,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().GattServicesChanged(token); return S_OK; } @@ -1407,11 +1511,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_ConnectionStatusChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ConnectionStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1424,6 +1529,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionStatusChanged(token); return S_OK; } @@ -1437,11 +1543,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -1451,11 +1558,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Appearance(abi_arg_out value) noexcept override + HRESULT __stdcall get_Appearance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appearance()); return S_OK; } catch (...) @@ -1469,7 +1577,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BluetoothAddressType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BluetoothAddressType()); return S_OK; } catch (...) @@ -1482,11 +1591,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1496,11 +1606,12 @@ struct produce : prod } } - HRESULT __stdcall abi_FromBluetoothAddressAsync(uint64_t bluetoothAddress, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromBluetoothAddressAsync(uint64_t bluetoothAddress, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromBluetoothAddressAsync(bluetoothAddress)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromBluetoothAddressAsync(bluetoothAddress)); return S_OK; } catch (...) @@ -1510,11 +1621,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -1528,11 +1640,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelectorFromPairingState(bool pairingState, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromPairingState(bool pairingState, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromPairingState(pairingState)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromPairingState(pairingState)); return S_OK; } catch (...) @@ -1542,11 +1655,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromConnectionStatus(connectionStatus)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromConnectionStatus(connectionStatus)); return S_OK; } catch (...) @@ -1556,11 +1670,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelectorFromDeviceName(abi_arg_in deviceName, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromDeviceName(impl::abi_arg_in deviceName, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromDeviceName(*reinterpret_cast(&deviceName))); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromDeviceName(*reinterpret_cast(&deviceName))); return S_OK; } catch (...) @@ -1570,11 +1685,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress)); return S_OK; } catch (...) @@ -1584,11 +1700,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, bluetoothAddressType)); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, bluetoothAddressType)); return S_OK; } catch (...) @@ -1598,11 +1715,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelectorFromAppearance(abi_arg_in appearance, abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromAppearance(impl::abi_arg_in appearance, impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelectorFromAppearance(*reinterpret_cast(&appearance))); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelectorFromAppearance(*reinterpret_cast(&appearance))); return S_OK; } catch (...) @@ -1612,11 +1730,12 @@ struct produce : pro } } - HRESULT __stdcall abi_FromBluetoothAddressWithBluetoothAddressTypeAsync(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromBluetoothAddressWithBluetoothAddressTypeAsync(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromBluetoothAddressAsync(bluetoothAddress, bluetoothAddressType)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromBluetoothAddressAsync(bluetoothAddress, bluetoothAddressType)); return S_OK; } catch (...) @@ -1630,11 +1749,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_InRangeThresholdInDBm(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InRangeThresholdInDBm(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InRangeThresholdInDBm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InRangeThresholdInDBm()); return S_OK; } catch (...) @@ -1644,10 +1764,11 @@ struct produce : } } - HRESULT __stdcall put_InRangeThresholdInDBm(abi_arg_in> value) noexcept override + HRESULT __stdcall put_InRangeThresholdInDBm(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InRangeThresholdInDBm(*reinterpret_cast *>(&value)); return S_OK; } @@ -1657,11 +1778,12 @@ struct produce : } } - HRESULT __stdcall get_OutOfRangeThresholdInDBm(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OutOfRangeThresholdInDBm(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OutOfRangeThresholdInDBm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfRangeThresholdInDBm()); return S_OK; } catch (...) @@ -1671,10 +1793,11 @@ struct produce : } } - HRESULT __stdcall put_OutOfRangeThresholdInDBm(abi_arg_in> value) noexcept override + HRESULT __stdcall put_OutOfRangeThresholdInDBm(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutOfRangeThresholdInDBm(*reinterpret_cast *>(&value)); return S_OK; } @@ -1684,11 +1807,12 @@ struct produce : } } - HRESULT __stdcall get_OutOfRangeTimeout(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OutOfRangeTimeout(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OutOfRangeTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfRangeTimeout()); return S_OK; } catch (...) @@ -1698,10 +1822,11 @@ struct produce : } } - HRESULT __stdcall put_OutOfRangeTimeout(abi_arg_in> value) noexcept override + HRESULT __stdcall put_OutOfRangeTimeout(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutOfRangeTimeout(*reinterpret_cast *>(&value)); return S_OK; } @@ -1711,11 +1836,12 @@ struct produce : } } - HRESULT __stdcall get_SamplingInterval(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SamplingInterval(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SamplingInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SamplingInterval()); return S_OK; } catch (...) @@ -1725,10 +1851,11 @@ struct produce : } } - HRESULT __stdcall put_SamplingInterval(abi_arg_in> value) noexcept override + HRESULT __stdcall put_SamplingInterval(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SamplingInterval(*reinterpret_cast *>(&value)); return S_OK; } @@ -1743,882 +1870,882 @@ struct produce : namespace Windows::Devices::Bluetooth { -template Windows::Foundation::IAsyncOperation impl_IBluetoothDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IBluetoothDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDeviceStatics::FromHostNameAsync(const Windows::Networking::HostName & hostName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromHostNameAsync(get(hostName), put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics)->abi_FromHostNameAsync(get_abi(hostName), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDeviceStatics::FromBluetoothAddressAsync(uint64_t address) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromBluetoothAddressAsync(address, put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics)->abi_FromBluetoothAddressAsync(address, put_abi(operation))); return operation; } template hstring impl_IBluetoothDeviceStatics::GetDeviceSelector() const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics)->abi_GetDeviceSelector(put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromPairingState(bool pairingState) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromPairingState(pairingState, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics2)->abi_GetDeviceSelectorFromPairingState(pairingState, put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromConnectionStatus(connectionStatus, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics2)->abi_GetDeviceSelectorFromConnectionStatus(connectionStatus, put_abi(deviceSelector))); return deviceSelector; } -template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromDeviceName(hstring_ref deviceName) const +template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromDeviceName(hstring_view deviceName) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromDeviceName(get(deviceName), put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics2)->abi_GetDeviceSelectorFromDeviceName(get_abi(deviceName), put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics2)->abi_GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothDeviceStatics2::GetDeviceSelectorFromClassOfDevice(const Windows::Devices::Bluetooth::BluetoothClassOfDevice & classOfDevice) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromClassOfDevice(get(classOfDevice), put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothDeviceStatics2)->abi_GetDeviceSelectorFromClassOfDevice(get_abi(classOfDevice), put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_DeviceId(put_abi(value))); return value; } template Windows::Networking::HostName impl_IBluetoothDevice::HostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HostName(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_HostName(put_abi(value))); return value; } template hstring impl_IBluetoothDevice::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_Name(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothClassOfDevice impl_IBluetoothDevice::ClassOfDevice() const { Windows::Devices::Bluetooth::BluetoothClassOfDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClassOfDevice(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_ClassOfDevice(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothDevice::SdpRecords() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SdpRecords(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_SdpRecords(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothDevice::RfcommServices() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RfcommServices(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_RfcommServices(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothConnectionStatus impl_IBluetoothDevice::ConnectionStatus() const { Windows::Devices::Bluetooth::BluetoothConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_ConnectionStatus(&value)); return value; } template uint64_t impl_IBluetoothDevice::BluetoothAddress() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BluetoothAddress(&value)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->get_BluetoothAddress(&value)); return value; } -template event_token impl_IBluetoothDevice::NameChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothDevice::NameChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NameChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->add_NameChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothDevice::NameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothDevice::NameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothDevice::remove_NameChanged, NameChanged(handler)); } template void impl_IBluetoothDevice::NameChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NameChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->remove_NameChanged(token)); } -template event_token impl_IBluetoothDevice::SdpRecordsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothDevice::SdpRecordsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SdpRecordsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->add_SdpRecordsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothDevice::SdpRecordsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothDevice::SdpRecordsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothDevice::remove_SdpRecordsChanged, SdpRecordsChanged(handler)); } template void impl_IBluetoothDevice::SdpRecordsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SdpRecordsChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->remove_SdpRecordsChanged(token)); } -template event_token impl_IBluetoothDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->add_ConnectionStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothDevice::remove_ConnectionStatusChanged, ConnectionStatusChanged(handler)); } template void impl_IBluetoothDevice::ConnectionStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionStatusChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothDevice)->remove_ConnectionStatusChanged(token)); } template Windows::Devices::Enumeration::DeviceInformation impl_IBluetoothDevice2::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice2)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceAccessInformation impl_IBluetoothDevice3::DeviceAccessInformation() const { Windows::Devices::Enumeration::DeviceAccessInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceAccessInformation(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->get_DeviceAccessInformation(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDevice3::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(value))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->abi_RequestAccessAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDevice3::GetRfcommServicesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRfcommServicesAsync(put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->abi_GetRfcommServicesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDevice3::GetRfcommServicesAsync(Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRfcommServicesWithCacheModeAsync(cacheMode, put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->abi_GetRfcommServicesWithCacheModeAsync(cacheMode, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDevice3::GetRfcommServicesForIdAsync(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRfcommServicesForIdAsync(get(serviceId), put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->abi_GetRfcommServicesForIdAsync(get_abi(serviceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothDevice3::GetRfcommServicesForIdAsync(const Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId & serviceId, Windows::Devices::Bluetooth::BluetoothCacheMode cacheMode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRfcommServicesForIdWithCacheModeAsync(get(serviceId), cacheMode, put(operation))); + check_hresult(WINRT_SHIM(IBluetoothDevice3)->abi_GetRfcommServicesForIdWithCacheModeAsync(get_abi(serviceId), cacheMode, put_abi(operation))); return operation; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Uncategorized() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Uncategorized(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Uncategorized(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Phone() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Phone(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Phone(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Computer() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Computer(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Computer(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Watch() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Watch(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Watch(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Clock() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Clock(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Clock(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Display() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Display(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Display(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::RemoteControl() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteControl(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_RemoteControl(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::EyeGlasses() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EyeGlasses(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_EyeGlasses(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Tag() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Tag(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Tag(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Keyring() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Keyring(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Keyring(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::MediaPlayer() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_MediaPlayer(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::BarcodeScanner() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BarcodeScanner(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_BarcodeScanner(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Thermometer() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Thermometer(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Thermometer(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::HeartRate() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HeartRate(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_HeartRate(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::BloodPressure() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressure(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_BloodPressure(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::HumanInterfaceDevice() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HumanInterfaceDevice(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_HumanInterfaceDevice(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::GlucoseMeter() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GlucoseMeter(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_GlucoseMeter(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::RunningWalking() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RunningWalking(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_RunningWalking(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::Cycling() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Cycling(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_Cycling(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::PulseOximeter() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PulseOximeter(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_PulseOximeter(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::WeightScale() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_WeightScale(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_WeightScale(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceCategoriesStatics::OutdoorSportActivity() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutdoorSportActivity(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceCategoriesStatics)->get_OutdoorSportActivity(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::Generic() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Generic(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_Generic(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::SportsWatch() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SportsWatch(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_SportsWatch(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::ThermometerEar() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ThermometerEar(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_ThermometerEar(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::HeartRateBelt() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HeartRateBelt(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_HeartRateBelt(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::BloodPressureArm() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressureArm(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_BloodPressureArm(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::BloodPressureWrist() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BloodPressureWrist(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_BloodPressureWrist(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::Keyboard() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Keyboard(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_Keyboard(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::Mouse() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Mouse(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_Mouse(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::Joystick() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Joystick(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_Joystick(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::Gamepad() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gamepad(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_Gamepad(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::DigitizerTablet() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DigitizerTablet(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_DigitizerTablet(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CardReader() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CardReader(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CardReader(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::DigitalPen() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DigitalPen(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_DigitalPen(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::BarcodeScanner() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BarcodeScanner(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_BarcodeScanner(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::RunningWalkingInShoe() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RunningWalkingInShoe(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_RunningWalkingInShoe(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::RunningWalkingOnShoe() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RunningWalkingOnShoe(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_RunningWalkingOnShoe(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::RunningWalkingOnHip() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RunningWalkingOnHip(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_RunningWalkingOnHip(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CyclingComputer() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingComputer(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CyclingComputer(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CyclingSpeedSensor() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingSpeedSensor(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CyclingSpeedSensor(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CyclingCadenceSensor() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingCadenceSensor(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CyclingCadenceSensor(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CyclingPowerSensor() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingPowerSensor(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CyclingPowerSensor(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::CyclingSpeedCadenceSensor() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CyclingSpeedCadenceSensor(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_CyclingSpeedCadenceSensor(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::OximeterFingertip() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OximeterFingertip(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_OximeterFingertip(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::OximeterWristWorn() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OximeterWristWorn(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_OximeterWristWorn(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::LocationDisplay() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationDisplay(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_LocationDisplay(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::LocationNavigationDisplay() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationNavigationDisplay(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_LocationNavigationDisplay(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::LocationPod() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationPod(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_LocationPod(&value)); return value; } template uint16_t impl_IBluetoothLEAppearanceSubcategoriesStatics::LocationNavigationPod() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationNavigationPod(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceSubcategoriesStatics)->get_LocationNavigationPod(&value)); return value; } template uint16_t impl_IBluetoothLEAppearance::RawValue() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RawValue(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearance)->get_RawValue(&value)); return value; } template uint16_t impl_IBluetoothLEAppearance::Category() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Category(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearance)->get_Category(&value)); return value; } template uint16_t impl_IBluetoothLEAppearance::SubCategory() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SubCategory(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEAppearance)->get_SubCategory(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothLEAppearance impl_IBluetoothLEAppearanceStatics::FromRawValue(uint16_t rawValue) const { Windows::Devices::Bluetooth::BluetoothLEAppearance appearance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromRawValue(rawValue, put(appearance))); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceStatics)->abi_FromRawValue(rawValue, put_abi(appearance))); return appearance; } template Windows::Devices::Bluetooth::BluetoothLEAppearance impl_IBluetoothLEAppearanceStatics::FromParts(uint16_t appearanceCategory, uint16_t appearanceSubCategory) const { Windows::Devices::Bluetooth::BluetoothLEAppearance appearance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromParts(appearanceCategory, appearanceSubCategory, put(appearance))); + check_hresult(WINRT_SHIM(IBluetoothLEAppearanceStatics)->abi_FromParts(appearanceCategory, appearanceSubCategory, put_abi(appearance))); return appearance; } template hstring impl_IBluetoothLEDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IBluetoothLEDevice::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->get_Name(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBluetoothLEDevice::GattServices() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_GattServices(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->get_GattServices(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothConnectionStatus impl_IBluetoothLEDevice::ConnectionStatus() const { Windows::Devices::Bluetooth::BluetoothConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->get_ConnectionStatus(&value)); return value; } template uint64_t impl_IBluetoothLEDevice::BluetoothAddress() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BluetoothAddress(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->get_BluetoothAddress(&value)); return value; } template Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService impl_IBluetoothLEDevice::GetGattService(GUID serviceUuid) const { Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService service { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetGattService(serviceUuid, put(service))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->abi_GetGattService(serviceUuid, put_abi(service))); return service; } -template event_token impl_IBluetoothLEDevice::NameChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothLEDevice::NameChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NameChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->add_NameChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothLEDevice::NameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothLEDevice::NameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice::remove_NameChanged, NameChanged(handler)); } template void impl_IBluetoothLEDevice::NameChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NameChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->remove_NameChanged(token)); } -template event_token impl_IBluetoothLEDevice::GattServicesChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothLEDevice::GattServicesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GattServicesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->add_GattServicesChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothLEDevice::GattServicesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothLEDevice::GattServicesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice::remove_GattServicesChanged, GattServicesChanged(handler)); } template void impl_IBluetoothLEDevice::GattServicesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GattServicesChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->remove_GattServicesChanged(token)); } -template event_token impl_IBluetoothLEDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBluetoothLEDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->add_ConnectionStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IBluetoothLEDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBluetoothLEDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice::remove_ConnectionStatusChanged, ConnectionStatusChanged(handler)); } template void impl_IBluetoothLEDevice::ConnectionStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionStatusChanged(token)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice)->remove_ConnectionStatusChanged(token)); } template Windows::Devices::Enumeration::DeviceInformation impl_IBluetoothLEDevice2::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice2)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothLEAppearance impl_IBluetoothLEDevice2::Appearance() const { Windows::Devices::Bluetooth::BluetoothLEAppearance value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appearance(put(value))); + check_hresult(WINRT_SHIM(IBluetoothLEDevice2)->get_Appearance(put_abi(value))); return value; } template Windows::Devices::Bluetooth::BluetoothAddressType impl_IBluetoothLEDevice2::BluetoothAddressType() const { Windows::Devices::Bluetooth::BluetoothAddressType value {}; - check_hresult(static_cast(static_cast(*this))->get_BluetoothAddressType(&value)); + check_hresult(WINRT_SHIM(IBluetoothLEDevice2)->get_BluetoothAddressType(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IBluetoothLEDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IBluetoothLEDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBluetoothLEDeviceStatics::FromBluetoothAddressAsync(uint64_t bluetoothAddress) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromBluetoothAddressAsync(bluetoothAddress, put(operation))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics)->abi_FromBluetoothAddressAsync(bluetoothAddress, put_abi(operation))); return operation; } template hstring impl_IBluetoothLEDeviceStatics::GetDeviceSelector() const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics)->abi_GetDeviceSelector(put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromPairingState(bool pairingState) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromPairingState(pairingState, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromPairingState(pairingState, put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromConnectionStatus(Windows::Devices::Bluetooth::BluetoothConnectionStatus connectionStatus) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromConnectionStatus(connectionStatus, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromConnectionStatus(connectionStatus, put_abi(deviceSelector))); return deviceSelector; } -template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromDeviceName(hstring_ref deviceName) const +template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromDeviceName(hstring_view deviceName) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromDeviceName(get(deviceName), put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromDeviceName(get_abi(deviceName), put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromBluetoothAddress(bluetoothAddress, put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromBluetoothAddress(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(bluetoothAddress, bluetoothAddressType, put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(bluetoothAddress, bluetoothAddressType, put_abi(deviceSelector))); return deviceSelector; } template hstring impl_IBluetoothLEDeviceStatics2::GetDeviceSelectorFromAppearance(const Windows::Devices::Bluetooth::BluetoothLEAppearance & appearance) const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromAppearance(get(appearance), put(deviceSelector))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_GetDeviceSelectorFromAppearance(get_abi(appearance), put_abi(deviceSelector))); return deviceSelector; } template Windows::Foundation::IAsyncOperation impl_IBluetoothLEDeviceStatics2::FromBluetoothAddressAsync(uint64_t bluetoothAddress, Windows::Devices::Bluetooth::BluetoothAddressType bluetoothAddressType) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromBluetoothAddressWithBluetoothAddressTypeAsync(bluetoothAddress, bluetoothAddressType, put(operation))); + check_hresult(WINRT_SHIM(IBluetoothLEDeviceStatics2)->abi_FromBluetoothAddressWithBluetoothAddressTypeAsync(bluetoothAddress, bluetoothAddressType, put_abi(operation))); return operation; } template uint32_t impl_IBluetoothClassOfDevice::RawValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RawValue(&value)); + check_hresult(WINRT_SHIM(IBluetoothClassOfDevice)->get_RawValue(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothMajorClass impl_IBluetoothClassOfDevice::MajorClass() const { Windows::Devices::Bluetooth::BluetoothMajorClass value {}; - check_hresult(static_cast(static_cast(*this))->get_MajorClass(&value)); + check_hresult(WINRT_SHIM(IBluetoothClassOfDevice)->get_MajorClass(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothMinorClass impl_IBluetoothClassOfDevice::MinorClass() const { Windows::Devices::Bluetooth::BluetoothMinorClass value {}; - check_hresult(static_cast(static_cast(*this))->get_MinorClass(&value)); + check_hresult(WINRT_SHIM(IBluetoothClassOfDevice)->get_MinorClass(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothServiceCapabilities impl_IBluetoothClassOfDevice::ServiceCapabilities() const { Windows::Devices::Bluetooth::BluetoothServiceCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceCapabilities(&value)); + check_hresult(WINRT_SHIM(IBluetoothClassOfDevice)->get_ServiceCapabilities(&value)); return value; } template Windows::Devices::Bluetooth::BluetoothClassOfDevice impl_IBluetoothClassOfDeviceStatics::FromRawValue(uint32_t rawValue) const { Windows::Devices::Bluetooth::BluetoothClassOfDevice classOfDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromRawValue(rawValue, put(classOfDevice))); + check_hresult(WINRT_SHIM(IBluetoothClassOfDeviceStatics)->abi_FromRawValue(rawValue, put_abi(classOfDevice))); return classOfDevice; } template Windows::Devices::Bluetooth::BluetoothClassOfDevice impl_IBluetoothClassOfDeviceStatics::FromParts(Windows::Devices::Bluetooth::BluetoothMajorClass majorClass, Windows::Devices::Bluetooth::BluetoothMinorClass minorClass, Windows::Devices::Bluetooth::BluetoothServiceCapabilities serviceCapabilities) const { Windows::Devices::Bluetooth::BluetoothClassOfDevice classOfDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromParts(majorClass, minorClass, serviceCapabilities, put(classOfDevice))); + check_hresult(WINRT_SHIM(IBluetoothClassOfDeviceStatics)->abi_FromParts(majorClass, minorClass, serviceCapabilities, put_abi(classOfDevice))); return classOfDevice; } template Windows::Foundation::IReference impl_IBluetoothSignalStrengthFilter::InRangeThresholdInDBm() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InRangeThresholdInDBm(put(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->get_InRangeThresholdInDBm(put_abi(value))); return value; } -template void impl_IBluetoothSignalStrengthFilter::InRangeThresholdInDBm(const Windows::Foundation::IReference & value) const +template void impl_IBluetoothSignalStrengthFilter::InRangeThresholdInDBm(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InRangeThresholdInDBm(get(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->put_InRangeThresholdInDBm(get_abi(value))); } template Windows::Foundation::IReference impl_IBluetoothSignalStrengthFilter::OutOfRangeThresholdInDBm() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OutOfRangeThresholdInDBm(put(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->get_OutOfRangeThresholdInDBm(put_abi(value))); return value; } -template void impl_IBluetoothSignalStrengthFilter::OutOfRangeThresholdInDBm(const Windows::Foundation::IReference & value) const +template void impl_IBluetoothSignalStrengthFilter::OutOfRangeThresholdInDBm(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutOfRangeThresholdInDBm(get(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->put_OutOfRangeThresholdInDBm(get_abi(value))); } template Windows::Foundation::IReference impl_IBluetoothSignalStrengthFilter::OutOfRangeTimeout() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OutOfRangeTimeout(put(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->get_OutOfRangeTimeout(put_abi(value))); return value; } -template void impl_IBluetoothSignalStrengthFilter::OutOfRangeTimeout(const Windows::Foundation::IReference & value) const +template void impl_IBluetoothSignalStrengthFilter::OutOfRangeTimeout(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutOfRangeTimeout(get(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->put_OutOfRangeTimeout(get_abi(value))); } template Windows::Foundation::IReference impl_IBluetoothSignalStrengthFilter::SamplingInterval() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SamplingInterval(put(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->get_SamplingInterval(put_abi(value))); return value; } -template void impl_IBluetoothSignalStrengthFilter::SamplingInterval(const Windows::Foundation::IReference & value) const +template void impl_IBluetoothSignalStrengthFilter::SamplingInterval(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_SamplingInterval(get(value))); + check_hresult(WINRT_SHIM(IBluetoothSignalStrengthFilter)->put_SamplingInterval(get_abi(value))); } inline Windows::Devices::Bluetooth::BluetoothClassOfDevice BluetoothClassOfDevice::FromRawValue(uint32_t rawValue) @@ -2631,7 +2758,7 @@ inline Windows::Devices::Bluetooth::BluetoothClassOfDevice BluetoothClassOfDevic return get_activation_factory().FromParts(majorClass, minorClass, serviceCapabilities); } -inline Windows::Foundation::IAsyncOperation BluetoothDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation BluetoothDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -2661,7 +2788,7 @@ inline hstring BluetoothDevice::GetDeviceSelectorFromConnectionStatus(Windows::D return get_activation_factory().GetDeviceSelectorFromConnectionStatus(connectionStatus); } -inline hstring BluetoothDevice::GetDeviceSelectorFromDeviceName(hstring_ref deviceName) +inline hstring BluetoothDevice::GetDeviceSelectorFromDeviceName(hstring_view deviceName) { return get_activation_factory().GetDeviceSelectorFromDeviceName(deviceName); } @@ -2936,7 +3063,7 @@ inline uint16_t BluetoothLEAppearanceSubcategories::LocationNavigationPod() return get_activation_factory().LocationNavigationPod(); } -inline Windows::Foundation::IAsyncOperation BluetoothLEDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation BluetoothLEDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -2961,7 +3088,7 @@ inline hstring BluetoothLEDevice::GetDeviceSelectorFromConnectionStatus(Windows: return get_activation_factory().GetDeviceSelectorFromConnectionStatus(connectionStatus); } -inline hstring BluetoothLEDevice::GetDeviceSelectorFromDeviceName(hstring_ref deviceName) +inline hstring BluetoothLEDevice::GetDeviceSelectorFromDeviceName(hstring_view deviceName) { return get_activation_factory().GetDeviceSelectorFromDeviceName(deviceName); } @@ -2993,3 +3120,194 @@ inline BluetoothSignalStrengthFilter::BluetoothSignalStrengthFilter() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothClassOfDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothClassOfDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothDevice3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothDeviceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEAppearance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEAppearanceCategoriesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEAppearanceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEAppearanceSubcategoriesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothLEDeviceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::IBluetoothSignalStrengthFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::BluetoothClassOfDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::BluetoothDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::BluetoothLEAppearance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::BluetoothLEDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Custom.h b/10.0.14393.0/winrt/Windows.Devices.Custom.h index a8996e213..562aaa1b7 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Custom.h +++ b/10.0.14393.0/winrt/Windows.Devices.Custom.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Custom.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_InputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base ioControlCode, abi_arg_in inputBuffer, abi_arg_in outputBuffer, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendIOControlAsync(impl::abi_arg_in ioControlCode, impl::abi_arg_in inputBuffer, impl::abi_arg_in outputBuffer, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendIOControlAsync(*reinterpret_cast(&ioControlCode), *reinterpret_cast(&inputBuffer), *reinterpret_cast(&outputBuffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendIOControlAsync(*reinterpret_cast(&ioControlCode), *reinterpret_cast(&inputBuffer), *reinterpret_cast(&outputBuffer))); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce : produce_base ioControlCode, abi_arg_in inputBuffer, abi_arg_in outputBuffer, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TrySendIOControlAsync(impl::abi_arg_in ioControlCode, impl::abi_arg_in inputBuffer, impl::abi_arg_in outputBuffer, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TrySendIOControlAsync(*reinterpret_cast(&ioControlCode), *reinterpret_cast(&inputBuffer), *reinterpret_cast(&outputBuffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TrySendIOControlAsync(*reinterpret_cast(&ioControlCode), *reinterpret_cast(&inputBuffer), *reinterpret_cast(&outputBuffer))); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(GUID classGuid, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(GUID classGuid, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(classGuid)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(classGuid)); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), desiredAccess, sharingMode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), desiredAccess, sharingMode)); return S_OK; } catch (...) @@ -111,7 +120,8 @@ struct produce : produce_baseshim().AccessMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessMode()); return S_OK; } catch (...) @@ -124,7 +134,8 @@ struct produce : produce_baseshim().BufferingMethod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferingMethod()); return S_OK; } catch (...) @@ -137,7 +148,8 @@ struct produce : produce_baseshim().Function()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Function()); return S_OK; } catch (...) @@ -150,7 +162,8 @@ struct produce : produce_baseshim().DeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceType()); return S_OK; } catch (...) @@ -163,7 +176,8 @@ struct produce : produce_baseshim().ControlCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlCode()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateIOControlCode(uint16_t deviceType, uint16_t function, Windows::Devices::Custom::IOControlAccessMode accessMode, Windows::Devices::Custom::IOControlBufferingMethod bufferingMethod, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateIOControlCode(uint16_t deviceType, uint16_t function, Windows::Devices::Custom::IOControlAccessMode accessMode, Windows::Devices::Custom::IOControlBufferingMethod bufferingMethod, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateIOControlCode(deviceType, function, accessMode, bufferingMethod)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateIOControlCode(deviceType, function, accessMode, bufferingMethod)); return S_OK; } catch (...) @@ -198,7 +213,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Unknown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unknown()); return S_OK; } catch (...) @@ -215,91 +231,91 @@ namespace Windows::Devices::Custom { template uint16_t impl_IKnownDeviceTypesStatics::Unknown() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unknown(&value)); + check_hresult(WINRT_SHIM(IKnownDeviceTypesStatics)->get_Unknown(&value)); return value; } template Windows::Devices::Custom::IOControlAccessMode impl_IIOControlCode::AccessMode() const { Windows::Devices::Custom::IOControlAccessMode value {}; - check_hresult(static_cast(static_cast(*this))->get_AccessMode(&value)); + check_hresult(WINRT_SHIM(IIOControlCode)->get_AccessMode(&value)); return value; } template Windows::Devices::Custom::IOControlBufferingMethod impl_IIOControlCode::BufferingMethod() const { Windows::Devices::Custom::IOControlBufferingMethod value {}; - check_hresult(static_cast(static_cast(*this))->get_BufferingMethod(&value)); + check_hresult(WINRT_SHIM(IIOControlCode)->get_BufferingMethod(&value)); return value; } template uint16_t impl_IIOControlCode::Function() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Function(&value)); + check_hresult(WINRT_SHIM(IIOControlCode)->get_Function(&value)); return value; } template uint16_t impl_IIOControlCode::DeviceType() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceType(&value)); + check_hresult(WINRT_SHIM(IIOControlCode)->get_DeviceType(&value)); return value; } template uint32_t impl_IIOControlCode::ControlCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlCode(&value)); + check_hresult(WINRT_SHIM(IIOControlCode)->get_ControlCode(&value)); return value; } template Windows::Devices::Custom::IOControlCode impl_IIOControlCodeFactory::CreateIOControlCode(uint16_t deviceType, uint16_t function, Windows::Devices::Custom::IOControlAccessMode accessMode, Windows::Devices::Custom::IOControlBufferingMethod bufferingMethod) const { Windows::Devices::Custom::IOControlCode instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateIOControlCode(deviceType, function, accessMode, bufferingMethod, put(instance))); + check_hresult(WINRT_SHIM(IIOControlCodeFactory)->abi_CreateIOControlCode(deviceType, function, accessMode, bufferingMethod, put_abi(instance))); return instance; } template hstring impl_ICustomDeviceStatics::GetDeviceSelector(GUID classGuid) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(classGuid, put(value))); + check_hresult(WINRT_SHIM(ICustomDeviceStatics)->abi_GetDeviceSelector(classGuid, put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ICustomDeviceStatics::FromIdAsync(hstring_ref deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode) const +template Windows::Foundation::IAsyncOperation impl_ICustomDeviceStatics::FromIdAsync(hstring_view deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), desiredAccess, sharingMode, put(operation))); + check_hresult(WINRT_SHIM(ICustomDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), desiredAccess, sharingMode, put_abi(operation))); return operation; } template Windows::Storage::Streams::IInputStream impl_ICustomDevice::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(ICustomDevice)->get_InputStream(put_abi(value))); return value; } template Windows::Storage::Streams::IOutputStream impl_ICustomDevice::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(ICustomDevice)->get_OutputStream(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICustomDevice::SendIOControlAsync(const Windows::Devices::Custom::IIOControlCode & ioControlCode, const Windows::Storage::Streams::IBuffer & inputBuffer, const Windows::Storage::Streams::IBuffer & outputBuffer) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendIOControlAsync(get(ioControlCode), get(inputBuffer), get(outputBuffer), put(operation))); + check_hresult(WINRT_SHIM(ICustomDevice)->abi_SendIOControlAsync(get_abi(ioControlCode), get_abi(inputBuffer), get_abi(outputBuffer), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ICustomDevice::TrySendIOControlAsync(const Windows::Devices::Custom::IIOControlCode & ioControlCode, const Windows::Storage::Streams::IBuffer & inputBuffer, const Windows::Storage::Streams::IBuffer & outputBuffer) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TrySendIOControlAsync(get(ioControlCode), get(inputBuffer), get(outputBuffer), put(operation))); + check_hresult(WINRT_SHIM(ICustomDevice)->abi_TrySendIOControlAsync(get_abi(ioControlCode), get_abi(inputBuffer), get_abi(outputBuffer), put_abi(operation))); return operation; } @@ -308,7 +324,7 @@ inline hstring CustomDevice::GetDeviceSelector(GUID classGuid) return get_activation_factory().GetDeviceSelector(classGuid); } -inline Windows::Foundation::IAsyncOperation CustomDevice::FromIdAsync(hstring_ref deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode) +inline Windows::Foundation::IAsyncOperation CustomDevice::FromIdAsync(hstring_view deviceId, Windows::Devices::Custom::DeviceAccessMode desiredAccess, Windows::Devices::Custom::DeviceSharingMode sharingMode) { return get_activation_factory().FromIdAsync(deviceId, desiredAccess, sharingMode); } @@ -325,3 +341,68 @@ inline uint16_t KnownDeviceTypes::Unknown() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::ICustomDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::ICustomDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::IIOControlCode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::IIOControlCodeFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::IKnownDeviceTypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::CustomDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Custom::IOControlCode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Enumeration.Pnp.h b/10.0.14393.0/winrt/Windows.Devices.Enumeration.Pnp.h index 0b325565c..2f619736a 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Enumeration.Pnp.h +++ b/10.0.14393.0/winrt/Windows.Devices.Enumeration.Pnp.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -21,7 +24,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -58,10 +64,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Update(abi_arg_in updateInfo) noexcept override + HRESULT __stdcall abi_Update(impl::abi_arg_in updateInfo) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(&updateInfo)); return S_OK; } @@ -75,11 +82,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, abi_arg_in id, abi_arg_in> requestedProperties, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, impl::abi_arg_in id, impl::abi_arg_in> requestedProperties, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CreateFromIdAsync(type, *reinterpret_cast(&id), *reinterpret_cast *>(&requestedProperties))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CreateFromIdAsync(type, *reinterpret_cast(&id), *reinterpret_cast *>(&requestedProperties))); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produ } } - HRESULT __stdcall abi_FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, abi_arg_in> requestedProperties, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, impl::abi_arg_in> requestedProperties, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(type, *reinterpret_cast *>(&requestedProperties))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(type, *reinterpret_cast *>(&requestedProperties))); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce : produ } } - HRESULT __stdcall abi_FindAllAsyncAqsFilter(Windows::Devices::Enumeration::Pnp::PnpObjectType type, abi_arg_in> requestedProperties, abi_arg_in aqsFilter, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsyncAqsFilter(Windows::Devices::Enumeration::Pnp::PnpObjectType type, impl::abi_arg_in> requestedProperties, impl::abi_arg_in aqsFilter, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(type, *reinterpret_cast *>(&requestedProperties), *reinterpret_cast(&aqsFilter))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(type, *reinterpret_cast *>(&requestedProperties), *reinterpret_cast(&aqsFilter))); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, abi_arg_in> requestedProperties, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, impl::abi_arg_in> requestedProperties, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(type, *reinterpret_cast *>(&requestedProperties))); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(type, *reinterpret_cast *>(&requestedProperties))); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateWatcherAqsFilter(Windows::Devices::Enumeration::Pnp::PnpObjectType type, abi_arg_in> requestedProperties, abi_arg_in aqsFilter, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcherAqsFilter(Windows::Devices::Enumeration::Pnp::PnpObjectType type, impl::abi_arg_in> requestedProperties, impl::abi_arg_in aqsFilter, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(type, *reinterpret_cast *>(&requestedProperties), *reinterpret_cast(&aqsFilter))); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(type, *reinterpret_cast *>(&requestedProperties), *reinterpret_cast(&aqsFilter))); return S_OK; } catch (...) @@ -153,7 +165,8 @@ struct produce : produc { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce : produc } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produc } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -194,11 +209,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall add_Added(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Added(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Added(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Added(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -211,6 +227,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Added(token); return S_OK; } @@ -220,11 +237,12 @@ struct produce : produ } } - HRESULT __stdcall add_Updated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -237,6 +255,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Updated(token); return S_OK; } @@ -246,11 +265,12 @@ struct produce : produ } } - HRESULT __stdcall add_Removed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Removed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Removed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Removed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -263,6 +283,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Removed(token); return S_OK; } @@ -272,11 +293,12 @@ struct produce : produ } } - HRESULT __stdcall add_EnumerationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -289,6 +311,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -298,11 +321,12 @@ struct produce : produ } } - HRESULT __stdcall add_Stopped(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -315,6 +339,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stopped(token); return S_OK; } @@ -328,7 +353,8 @@ struct produce : produ { try { - *status = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -341,6 +367,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -354,6 +381,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -371,28 +399,28 @@ namespace Windows::Devices::Enumeration::Pnp { template Windows::Devices::Enumeration::Pnp::PnpObjectType impl_IPnpObjectUpdate::Type() const { Windows::Devices::Enumeration::Pnp::PnpObjectType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPnpObjectUpdate)->get_Type(&value)); return value; } template hstring impl_IPnpObjectUpdate::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPnpObjectUpdate)->get_Id(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IPnpObjectUpdate::Properties() const +template Windows::Foundation::Collections::IMapView impl_IPnpObjectUpdate::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPnpObjectUpdate)->get_Properties(put_abi(value))); return value; } template event_token impl_IPnpObjectWatcher::Added(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Added(get(handler), &token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->add_Added(get_abi(handler), &token)); return token; } @@ -403,13 +431,13 @@ template event_revoker impl_IPnpObjectWatcher template void impl_IPnpObjectWatcher::Added(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Added(token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->remove_Added(token)); } template event_token impl_IPnpObjectWatcher::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->add_Updated(get_abi(handler), &token)); return token; } @@ -420,13 +448,13 @@ template event_revoker impl_IPnpObjectWatcher template void impl_IPnpObjectWatcher::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->remove_Updated(token)); } template event_token impl_IPnpObjectWatcher::Removed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Removed(get(handler), &token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->add_Removed(get_abi(handler), &token)); return token; } @@ -437,142 +465,142 @@ template event_revoker impl_IPnpObjectWatcher template void impl_IPnpObjectWatcher::Removed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Removed(token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->remove_Removed(token)); } -template event_token impl_IPnpObjectWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPnpObjectWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPnpObjectWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPnpObjectWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Enumeration::Pnp::IPnpObjectWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPnpObjectWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IPnpObjectWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPnpObjectWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPnpObjectWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPnpObjectWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Enumeration::Pnp::IPnpObjectWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPnpObjectWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->remove_Stopped(token)); } template Windows::Devices::Enumeration::DeviceWatcherStatus impl_IPnpObjectWatcher::Status() const { Windows::Devices::Enumeration::DeviceWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->get_Status(&status)); return status; } template void impl_IPnpObjectWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->abi_Start()); } template void impl_IPnpObjectWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPnpObjectWatcher)->abi_Stop()); } -template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, hstring_ref id, const Windows::Foundation::Collections::IIterable & requestedProperties) const +template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, hstring_view id, iterable requestedProperties) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIdAsync(type, get(id), get(requestedProperties), put(asyncOp))); + check_hresult(WINRT_SHIM(IPnpObjectStatics)->abi_CreateFromIdAsync(type, get_abi(id), get_abi(requestedProperties), put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties) const +template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(type, get(requestedProperties), put(asyncOp))); + check_hresult(WINRT_SHIM(IPnpObjectStatics)->abi_FindAllAsync(type, get_abi(requestedProperties), put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties, hstring_ref aqsFilter) const +template Windows::Foundation::IAsyncOperation impl_IPnpObjectStatics::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties, hstring_view aqsFilter) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncAqsFilter(type, get(requestedProperties), get(aqsFilter), put(asyncOp))); + check_hresult(WINRT_SHIM(IPnpObjectStatics)->abi_FindAllAsyncAqsFilter(type, get_abi(requestedProperties), get_abi(aqsFilter), put_abi(asyncOp))); return asyncOp; } -template Windows::Devices::Enumeration::Pnp::PnpObjectWatcher impl_IPnpObjectStatics::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties) const +template Windows::Devices::Enumeration::Pnp::PnpObjectWatcher impl_IPnpObjectStatics::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties) const { Windows::Devices::Enumeration::Pnp::PnpObjectWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(type, get(requestedProperties), put(watcher))); + check_hresult(WINRT_SHIM(IPnpObjectStatics)->abi_CreateWatcher(type, get_abi(requestedProperties), put_abi(watcher))); return watcher; } -template Windows::Devices::Enumeration::Pnp::PnpObjectWatcher impl_IPnpObjectStatics::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties, hstring_ref aqsFilter) const +template Windows::Devices::Enumeration::Pnp::PnpObjectWatcher impl_IPnpObjectStatics::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties, hstring_view aqsFilter) const { Windows::Devices::Enumeration::Pnp::PnpObjectWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherAqsFilter(type, get(requestedProperties), get(aqsFilter), put(watcher))); + check_hresult(WINRT_SHIM(IPnpObjectStatics)->abi_CreateWatcherAqsFilter(type, get_abi(requestedProperties), get_abi(aqsFilter), put_abi(watcher))); return watcher; } template Windows::Devices::Enumeration::Pnp::PnpObjectType impl_IPnpObject::Type() const { Windows::Devices::Enumeration::Pnp::PnpObjectType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPnpObject)->get_Type(&value)); return value; } template hstring impl_IPnpObject::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPnpObject)->get_Id(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IPnpObject::Properties() const +template Windows::Foundation::Collections::IMapView impl_IPnpObject::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPnpObject)->get_Properties(put_abi(value))); return value; } template void impl_IPnpObject::Update(const Windows::Devices::Enumeration::Pnp::PnpObjectUpdate & updateInfo) const { - check_hresult(static_cast(static_cast(*this))->abi_Update(get(updateInfo))); + check_hresult(WINRT_SHIM(IPnpObject)->abi_Update(get_abi(updateInfo))); } -inline Windows::Foundation::IAsyncOperation PnpObject::CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, hstring_ref id, const Windows::Foundation::Collections::IIterable & requestedProperties) +inline Windows::Foundation::IAsyncOperation PnpObject::CreateFromIdAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, hstring_view id, iterable requestedProperties) { return get_activation_factory().CreateFromIdAsync(type, id, requestedProperties); } -inline Windows::Foundation::IAsyncOperation PnpObject::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties) +inline Windows::Foundation::IAsyncOperation PnpObject::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties) { return get_activation_factory().FindAllAsync(type, requestedProperties); } -inline Windows::Foundation::IAsyncOperation PnpObject::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties, hstring_ref aqsFilter) +inline Windows::Foundation::IAsyncOperation PnpObject::FindAllAsync(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties, hstring_view aqsFilter) { return get_activation_factory().FindAllAsync(type, requestedProperties, aqsFilter); } -inline Windows::Devices::Enumeration::Pnp::PnpObjectWatcher PnpObject::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties) +inline Windows::Devices::Enumeration::Pnp::PnpObjectWatcher PnpObject::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties) { return get_activation_factory().CreateWatcher(type, requestedProperties); } -inline Windows::Devices::Enumeration::Pnp::PnpObjectWatcher PnpObject::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, const Windows::Foundation::Collections::IIterable & requestedProperties, hstring_ref aqsFilter) +inline Windows::Devices::Enumeration::Pnp::PnpObjectWatcher PnpObject::CreateWatcher(Windows::Devices::Enumeration::Pnp::PnpObjectType type, iterable requestedProperties, hstring_view aqsFilter) { return get_activation_factory().CreateWatcher(type, requestedProperties, aqsFilter); } @@ -580,3 +608,77 @@ inline Windows::Devices::Enumeration::Pnp::PnpObjectWatcher PnpObject::CreateWat } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::IPnpObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::IPnpObjectStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::IPnpObjectUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::IPnpObjectWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::PnpObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::PnpObjectCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::PnpObjectUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::Pnp::PnpObjectWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Enumeration.h b/10.0.14393.0/winrt/Windows.Devices.Enumeration.h index 23ada1217..52e5ccb92 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Enumeration.h +++ b/10.0.14393.0/winrt/Windows.Devices.Enumeration.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -25,7 +28,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -38,11 +42,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -56,11 +61,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall add_AccessChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AccessChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AccessChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AccessChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -73,6 +79,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AccessChanged(cookie); return S_OK; } @@ -86,7 +93,8 @@ struct produce : pro { try { - *status = detach(this->shim().CurrentStatus()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().CurrentStatus()); return S_OK; } catch (...) @@ -99,11 +107,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromId(abi_arg_in deviceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromId(impl::abi_arg_in deviceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -113,11 +122,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateFromDeviceClassId(GUID deviceClassId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromDeviceClassId(deviceClassId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromDeviceClassId(deviceClassId)); return S_OK; } catch (...) @@ -127,11 +137,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateFromDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromDeviceClass(deviceClass)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromDeviceClass(deviceClass)); return S_OK; } catch (...) @@ -145,11 +156,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -163,11 +175,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -181,11 +194,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -195,11 +209,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -213,7 +228,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -226,7 +242,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDefault()); return S_OK; } catch (...) @@ -235,11 +252,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_EnclosureLocation(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnclosureLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnclosureLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnclosureLocation()); return S_OK; } catch (...) @@ -249,11 +267,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -263,10 +282,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_Update(abi_arg_in updateInfo) noexcept override + HRESULT __stdcall abi_Update(impl::abi_arg_in updateInfo) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(&updateInfo)); return S_OK; } @@ -276,11 +296,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetThumbnailAsync(abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_GetThumbnailAsync(impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().GetThumbnailAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().GetThumbnailAsync()); return S_OK; } catch (...) @@ -290,11 +311,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetGlyphThumbnailAsync(abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_GetGlyphThumbnailAsync(impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().GetGlyphThumbnailAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().GetGlyphThumbnailAsync()); return S_OK; } catch (...) @@ -312,7 +334,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -321,11 +344,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Pairing(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pairing(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pairing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pairing()); return S_OK; } catch (...) @@ -339,11 +363,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_PairAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PairAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync(pairingKindsSupported)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync(pairingKindsSupported)); return S_OK; } catch (...) @@ -353,11 +378,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_PairWithProtectionLevelAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync(pairingKindsSupported, minProtectionLevel)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync(pairingKindsSupported, minProtectionLevel)); return S_OK; } catch (...) @@ -367,11 +393,12 @@ struct produce devicePairingSettings, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PairWithProtectionLevelAndSettingsAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, impl::abi_arg_in devicePairingSettings, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync(pairingKindsSupported, minProtectionLevel, *reinterpret_cast(&devicePairingSettings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync(pairingKindsSupported, minProtectionLevel, *reinterpret_cast(&devicePairingSettings))); return S_OK; } catch (...) @@ -381,11 +408,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PairingRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PairingRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PairingRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -398,6 +426,7 @@ struct produceshim()); this->shim().PairingRequested(token); return S_OK; } @@ -415,7 +444,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsPaired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaired()); return S_OK; } catch (...) @@ -428,7 +458,8 @@ struct produce : pr { try { - *value = detach(this->shim().CanPair()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPair()); return S_OK; } catch (...) @@ -437,11 +468,12 @@ struct produce : pr } } - HRESULT __stdcall abi_PairAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PairAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync()); return S_OK; } catch (...) @@ -451,11 +483,12 @@ struct produce : pr } } - HRESULT __stdcall abi_PairWithProtectionLevelAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PairWithProtectionLevelAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync(minProtectionLevel)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync(minProtectionLevel)); return S_OK; } catch (...) @@ -473,7 +506,8 @@ struct produce : p { try { - *value = detach(this->shim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -482,11 +516,12 @@ struct produce : p } } - HRESULT __stdcall get_Custom(abi_arg_out value) noexcept override + HRESULT __stdcall get_Custom(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Custom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Custom()); return S_OK; } catch (...) @@ -496,11 +531,12 @@ struct produce : p } } - HRESULT __stdcall abi_PairWithProtectionLevelAndSettingsAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, abi_arg_in devicePairingSettings, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_PairWithProtectionLevelAndSettingsAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, impl::abi_arg_in devicePairingSettings, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().PairAsync(minProtectionLevel, *reinterpret_cast(&devicePairingSettings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PairAsync(minProtectionLevel, *reinterpret_cast(&devicePairingSettings))); return S_OK; } catch (...) @@ -510,11 +546,12 @@ struct produce : p } } - HRESULT __stdcall abi_UnpairAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UnpairAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UnpairAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnpairAsync()); return S_OK; } catch (...) @@ -532,7 +569,8 @@ struct produceshim().TryRegisterForAllInboundPairingRequests(pairingKindsSupported)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRegisterForAllInboundPairingRequests(pairingKindsSupported)); return S_OK; } catch (...) @@ -545,11 +583,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateFromIdAsync(abi_arg_in deviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_CreateFromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -559,11 +598,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateFromIdAsyncAdditionalProperties(abi_arg_in deviceId, abi_arg_in> additionalProperties, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_CreateFromIdAsyncAdditionalProperties(impl::abi_arg_in deviceId, impl::abi_arg_in> additionalProperties, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast *>(&additionalProperties))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast *>(&additionalProperties))); return S_OK; } catch (...) @@ -573,11 +613,12 @@ struct produce : pr } } - HRESULT __stdcall abi_FindAllAsync(abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -587,11 +628,12 @@ struct produce : pr } } - HRESULT __stdcall abi_FindAllAsyncDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsyncDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(deviceClass)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(deviceClass)); return S_OK; } catch (...) @@ -601,11 +643,12 @@ struct produce : pr } } - HRESULT __stdcall abi_FindAllAsyncAqsFilter(abi_arg_in aqsFilter, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsyncAqsFilter(impl::abi_arg_in aqsFilter, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter))); return S_OK; } catch (...) @@ -615,11 +658,12 @@ struct produce : pr } } - HRESULT __stdcall abi_FindAllAsyncAqsFilterAndAdditionalProperties(abi_arg_in aqsFilter, abi_arg_in> additionalProperties, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsyncAqsFilterAndAdditionalProperties(impl::abi_arg_in aqsFilter, impl::abi_arg_in> additionalProperties, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties))); return S_OK; } catch (...) @@ -629,11 +673,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -643,11 +688,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateWatcherDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcherDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(deviceClass)); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(deviceClass)); return S_OK; } catch (...) @@ -657,11 +703,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateWatcherAqsFilter(abi_arg_in aqsFilter, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcherAqsFilter(impl::abi_arg_in aqsFilter, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter))); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter))); return S_OK; } catch (...) @@ -671,11 +718,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateWatcherAqsFilterAndAdditionalProperties(abi_arg_in aqsFilter, abi_arg_in> additionalProperties, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcherAqsFilterAndAdditionalProperties(impl::abi_arg_in aqsFilter, impl::abi_arg_in> additionalProperties, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties))); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties))); return S_OK; } catch (...) @@ -689,11 +737,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetAqsFilterFromDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, abi_arg_out aqsFilter) noexcept override + HRESULT __stdcall abi_GetAqsFilterFromDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass, impl::abi_arg_out aqsFilter) noexcept override { try { - *aqsFilter = detach(this->shim().GetAqsFilterFromDeviceClass(deviceClass)); + typename D::abi_guard guard(this->shim()); + *aqsFilter = detach_abi(this->shim().GetAqsFilterFromDeviceClass(deviceClass)); return S_OK; } catch (...) @@ -703,11 +752,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateFromIdAsyncWithKindAndAdditionalProperties(abi_arg_in deviceId, abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_CreateFromIdAsyncWithKindAndAdditionalProperties(impl::abi_arg_in deviceId, impl::abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast *>(&additionalProperties), kind)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast *>(&additionalProperties), kind)); return S_OK; } catch (...) @@ -717,11 +767,12 @@ struct produce : p } } - HRESULT __stdcall abi_FindAllAsyncWithKindAqsFilterAndAdditionalProperties(abi_arg_in aqsFilter, abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllAsyncWithKindAqsFilterAndAdditionalProperties(impl::abi_arg_in aqsFilter, impl::abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties), kind)); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties), kind)); return S_OK; } catch (...) @@ -731,11 +782,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateWatcherWithKindAqsFilterAndAdditionalProperties(abi_arg_in aqsFilter, abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcherWithKindAqsFilterAndAdditionalProperties(impl::abi_arg_in aqsFilter, impl::abi_arg_in> additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind, impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties), kind)); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast *>(&additionalProperties), kind)); return S_OK; } catch (...) @@ -749,11 +801,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -763,11 +816,12 @@ struct produce : pro } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -785,7 +839,8 @@ struct produce : pr { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -798,11 +853,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -816,7 +872,8 @@ struct produceshim().PairingKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PairingKind()); return S_OK; } catch (...) @@ -825,11 +882,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pin()); return S_OK; } catch (...) @@ -843,6 +901,7 @@ struct produceshim()); this->shim().Accept(); return S_OK; } @@ -852,10 +911,11 @@ struct produce pin) noexcept override + HRESULT __stdcall abi_AcceptWithPin(impl::abi_arg_in pin) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Accept(*reinterpret_cast(&pin)); return S_OK; } @@ -865,11 +925,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -887,7 +948,8 @@ struct produce : produce { try { - *status = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -900,7 +962,8 @@ struct produce : produce { try { - *value = detach(this->shim().ProtectionLevelUsed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevelUsed()); return S_OK; } catch (...) @@ -917,11 +980,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Filter(abi_arg_out filter) noexcept override + HRESULT __stdcall get_Filter(impl::abi_arg_out filter) noexcept override { try { - *filter = detach(this->shim().Filter()); + typename D::abi_guard guard(this->shim()); + *filter = detach_abi(this->shim().Filter()); return S_OK; } catch (...) @@ -931,11 +995,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Appearance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appearance()); return S_OK; } catch (...) @@ -945,11 +1010,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RequestedProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedProperties()); return S_OK; } catch (...) @@ -959,11 +1025,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_DeviceSelected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DeviceSelected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DeviceSelected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -976,6 +1043,7 @@ struct produce : produce_baseshim()); this->shim().DeviceSelected(token); return S_OK; } @@ -985,11 +1053,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_DisconnectButtonClicked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DisconnectButtonClicked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DisconnectButtonClicked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1002,6 +1071,7 @@ struct produce : produce_baseshim()); this->shim().DisconnectButtonClicked(token); return S_OK; } @@ -1011,11 +1081,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_DevicePickerDismissed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DevicePickerDismissed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DevicePickerDismissed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1028,6 +1099,7 @@ struct produce : produce_baseshim()); this->shim().DevicePickerDismissed(token); return S_OK; } @@ -1037,10 +1109,11 @@ struct produce : produce_base selection) noexcept override + HRESULT __stdcall abi_Show(impl::abi_arg_in selection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection)); return S_OK; } @@ -1050,10 +1123,11 @@ struct produce : produce_base selection, Windows::UI::Popups::Placement placement) noexcept override + HRESULT __stdcall abi_ShowWithPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement placement) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection), placement); return S_OK; } @@ -1063,11 +1137,12 @@ struct produce : produce_base selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickSingleDeviceAsync(impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1077,11 +1152,12 @@ struct produce : produce_base selection, Windows::UI::Popups::Placement placement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickSingleDeviceAsyncWithPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement placement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection), placement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection), placement)); return S_OK; } catch (...) @@ -1095,6 +1171,7 @@ struct produce : produce_baseshim()); this->shim().Hide(); return S_OK; } @@ -1104,10 +1181,11 @@ struct produce : produce_base device, abi_arg_in status, Windows::Devices::Enumeration::DevicePickerDisplayStatusOptions options) noexcept override + HRESULT __stdcall abi_SetDisplayStatus(impl::abi_arg_in device, impl::abi_arg_in status, Windows::Devices::Enumeration::DevicePickerDisplayStatusOptions options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDisplayStatus(*reinterpret_cast(&device), *reinterpret_cast(&status), options); return S_OK; } @@ -1121,11 +1199,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1135,10 +1214,11 @@ struct produce : prod } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -1148,11 +1228,12 @@ struct produce : prod } } - HRESULT __stdcall get_ForegroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -1161,10 +1242,11 @@ struct produce : prod } } - HRESULT __stdcall put_ForegroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -1174,11 +1256,12 @@ struct produce : prod } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -1187,10 +1270,11 @@ struct produce : prod } } - HRESULT __stdcall put_BackgroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -1200,11 +1284,12 @@ struct produce : prod } } - HRESULT __stdcall get_AccentColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccentColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccentColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccentColor()); return S_OK; } catch (...) @@ -1213,10 +1298,11 @@ struct produce : prod } } - HRESULT __stdcall put_AccentColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_AccentColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AccentColor(*reinterpret_cast(&value)); return S_OK; } @@ -1226,11 +1312,12 @@ struct produce : prod } } - HRESULT __stdcall get_SelectedForegroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForegroundColor()); return S_OK; } catch (...) @@ -1239,10 +1326,11 @@ struct produce : prod } } - HRESULT __stdcall put_SelectedForegroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedForegroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedForegroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -1252,11 +1340,12 @@ struct produce : prod } } - HRESULT __stdcall get_SelectedBackgroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedBackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBackgroundColor()); return S_OK; } catch (...) @@ -1265,10 +1354,11 @@ struct produce : prod } } - HRESULT __stdcall put_SelectedBackgroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedBackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -1278,11 +1368,12 @@ struct produce : prod } } - HRESULT __stdcall get_SelectedAccentColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedAccentColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedAccentColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedAccentColor()); return S_OK; } catch (...) @@ -1291,10 +1382,11 @@ struct produce : prod } } - HRESULT __stdcall put_SelectedAccentColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedAccentColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedAccentColor(*reinterpret_cast(&value)); return S_OK; } @@ -1308,11 +1400,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_SupportedDeviceClasses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedDeviceClasses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedDeviceClasses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedDeviceClasses()); return S_OK; } catch (...) @@ -1322,11 +1415,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SupportedDeviceSelectors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedDeviceSelectors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedDeviceSelectors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedDeviceSelectors()); return S_OK; } catch (...) @@ -1340,11 +1434,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_SelectedDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedDevice()); return S_OK; } catch (...) @@ -1362,7 +1457,8 @@ struct produce : produ { try { - *status = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1375,11 +1471,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall add_Added(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Added(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Added(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Added(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1392,6 +1489,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Added(token); return S_OK; } @@ -1401,11 +1499,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_Updated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1418,6 +1517,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Updated(token); return S_OK; } @@ -1427,11 +1527,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_Removed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Removed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Removed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Removed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1444,6 +1545,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Removed(token); return S_OK; } @@ -1453,11 +1555,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_EnumerationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1470,6 +1573,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -1479,11 +1583,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_Stopped(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1496,6 +1601,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Stopped(token); return S_OK; } @@ -1509,7 +1615,8 @@ struct produce : produce_base< { try { - *status = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1522,6 +1629,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -1535,6 +1643,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -1548,11 +1657,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetBackgroundTrigger(abi_arg_in> requestedEventKinds, abi_arg_out trigger) noexcept override + HRESULT __stdcall abi_GetBackgroundTrigger(impl::abi_arg_in> requestedEventKinds, impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().GetBackgroundTrigger(*reinterpret_cast *>(&requestedEventKinds))); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().GetBackgroundTrigger(*reinterpret_cast *>(&requestedEventKinds))); return S_OK; } catch (...) @@ -1570,7 +1680,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -1579,11 +1690,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -1593,11 +1705,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DeviceInformationUpdate(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformationUpdate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformationUpdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformationUpdate()); return S_OK; } catch (...) @@ -1611,11 +1724,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_DeviceWatcherEvents(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DeviceWatcherEvents(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeviceWatcherEvents()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceWatcherEvents()); return S_OK; } catch (...) @@ -1633,7 +1747,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().InDock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InDock()); return S_OK; } catch (...) @@ -1646,7 +1761,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().InLid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InLid()); return S_OK; } catch (...) @@ -1659,7 +1775,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Panel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Panel()); return S_OK; } catch (...) @@ -1676,7 +1793,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().RotationAngleInDegreesClockwise()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngleInDegreesClockwise()); return S_OK; } catch (...) @@ -1693,147 +1811,147 @@ namespace Windows::Devices::Enumeration { template hstring impl_IDeviceConnectionChangeTriggerDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IDeviceConnectionChangeTriggerDetails)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IDevicePickerAppearance::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_Title(put_abi(value))); return value; } -template void impl_IDevicePickerAppearance::Title(hstring_ref value) const +template void impl_IDevicePickerAppearance::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_Title(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::ForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_ForegroundColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::ForegroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_ForegroundColor(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_BackgroundColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_BackgroundColor(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::AccentColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_AccentColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_AccentColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::AccentColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_AccentColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_AccentColor(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::SelectedForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_SelectedForegroundColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::SelectedForegroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_SelectedForegroundColor(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::SelectedBackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_SelectedBackgroundColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::SelectedBackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_SelectedBackgroundColor(get_abi(value))); } template Windows::UI::Color impl_IDevicePickerAppearance::SelectedAccentColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedAccentColor(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->get_SelectedAccentColor(put_abi(value))); return value; } template void impl_IDevicePickerAppearance::SelectedAccentColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedAccentColor(get(value))); + check_hresult(WINRT_SHIM(IDevicePickerAppearance)->put_SelectedAccentColor(get_abi(value))); } template Windows::Devices::Enumeration::DeviceInformation impl_IDeviceSelectedEventArgs::SelectedDevice() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedDevice(put(value))); + check_hresult(WINRT_SHIM(IDeviceSelectedEventArgs)->get_SelectedDevice(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IDeviceDisconnectButtonClickedEventArgs::Device() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IDeviceDisconnectButtonClickedEventArgs)->get_Device(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IDevicePickerFilter::SupportedDeviceClasses() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedDeviceClasses(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerFilter)->get_SupportedDeviceClasses(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IDevicePickerFilter::SupportedDeviceSelectors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedDeviceSelectors(put(value))); + check_hresult(WINRT_SHIM(IDevicePickerFilter)->get_SupportedDeviceSelectors(put_abi(value))); return value; } template Windows::Devices::Enumeration::DevicePickerFilter impl_IDevicePicker::Filter() const { Windows::Devices::Enumeration::DevicePickerFilter filter { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Filter(put(filter))); + check_hresult(WINRT_SHIM(IDevicePicker)->get_Filter(put_abi(filter))); return filter; } template Windows::Devices::Enumeration::DevicePickerAppearance impl_IDevicePicker::Appearance() const { Windows::Devices::Enumeration::DevicePickerAppearance value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appearance(put(value))); + check_hresult(WINRT_SHIM(IDevicePicker)->get_Appearance(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IDevicePicker::RequestedProperties() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RequestedProperties(put(value))); + check_hresult(WINRT_SHIM(IDevicePicker)->get_RequestedProperties(put_abi(value))); return value; } template event_token impl_IDevicePicker::DeviceSelected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DeviceSelected(get(handler), &token)); + check_hresult(WINRT_SHIM(IDevicePicker)->add_DeviceSelected(get_abi(handler), &token)); return token; } @@ -1844,13 +1962,13 @@ template event_revoker impl_IDevicePicker::Device template void impl_IDevicePicker::DeviceSelected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DeviceSelected(token)); + check_hresult(WINRT_SHIM(IDevicePicker)->remove_DeviceSelected(token)); } template event_token impl_IDevicePicker::DisconnectButtonClicked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DisconnectButtonClicked(get(handler), &token)); + check_hresult(WINRT_SHIM(IDevicePicker)->add_DisconnectButtonClicked(get_abi(handler), &token)); return token; } @@ -1861,113 +1979,113 @@ template event_revoker impl_IDevicePicker::Discon template void impl_IDevicePicker::DisconnectButtonClicked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DisconnectButtonClicked(token)); + check_hresult(WINRT_SHIM(IDevicePicker)->remove_DisconnectButtonClicked(token)); } -template event_token impl_IDevicePicker::DevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDevicePicker::DevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DevicePickerDismissed(get(handler), &token)); + check_hresult(WINRT_SHIM(IDevicePicker)->add_DevicePickerDismissed(get_abi(handler), &token)); return token; } -template event_revoker impl_IDevicePicker::DevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDevicePicker::DevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Enumeration::IDevicePicker::remove_DevicePickerDismissed, DevicePickerDismissed(handler)); } template void impl_IDevicePicker::DevicePickerDismissed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DevicePickerDismissed(token)); + check_hresult(WINRT_SHIM(IDevicePicker)->remove_DevicePickerDismissed(token)); } template void impl_IDevicePicker::Show(const Windows::Foundation::Rect & selection) const { - check_hresult(static_cast(static_cast(*this))->abi_Show(get(selection))); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_Show(get_abi(selection))); } template void impl_IDevicePicker::Show(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement placement) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowWithPlacement(get(selection), placement)); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_ShowWithPlacement(get_abi(selection), placement)); } template Windows::Foundation::IAsyncOperation impl_IDevicePicker::PickSingleDeviceAsync(const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleDeviceAsync(get(selection), put(operation))); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_PickSingleDeviceAsync(get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDevicePicker::PickSingleDeviceAsync(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement placement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleDeviceAsyncWithPlacement(get(selection), placement, put(operation))); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_PickSingleDeviceAsyncWithPlacement(get_abi(selection), placement, put_abi(operation))); return operation; } template void impl_IDevicePicker::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_Hide()); } -template void impl_IDevicePicker::SetDisplayStatus(const Windows::Devices::Enumeration::DeviceInformation & device, hstring_ref status, Windows::Devices::Enumeration::DevicePickerDisplayStatusOptions options) const +template void impl_IDevicePicker::SetDisplayStatus(const Windows::Devices::Enumeration::DeviceInformation & device, hstring_view status, Windows::Devices::Enumeration::DevicePickerDisplayStatusOptions options) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDisplayStatus(get(device), get(status), options)); + check_hresult(WINRT_SHIM(IDevicePicker)->abi_SetDisplayStatus(get_abi(device), get_abi(status), options)); } template bool impl_IEnclosureLocation::InDock() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InDock(&value)); + check_hresult(WINRT_SHIM(IEnclosureLocation)->get_InDock(&value)); return value; } template bool impl_IEnclosureLocation::InLid() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InLid(&value)); + check_hresult(WINRT_SHIM(IEnclosureLocation)->get_InLid(&value)); return value; } template Windows::Devices::Enumeration::Panel impl_IEnclosureLocation::Panel() const { Windows::Devices::Enumeration::Panel value {}; - check_hresult(static_cast(static_cast(*this))->get_Panel(&value)); + check_hresult(WINRT_SHIM(IEnclosureLocation)->get_Panel(&value)); return value; } template uint32_t impl_IEnclosureLocation2::RotationAngleInDegreesClockwise() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngleInDegreesClockwise(&value)); + check_hresult(WINRT_SHIM(IEnclosureLocation2)->get_RotationAngleInDegreesClockwise(&value)); return value; } template hstring impl_IDeviceInformationUpdate::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformationUpdate)->get_Id(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IDeviceInformationUpdate::Properties() const +template Windows::Foundation::Collections::IMapView impl_IDeviceInformationUpdate::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IDeviceInformationUpdate)->get_Properties(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformationKind impl_IDeviceInformationUpdate2::Kind() const { Windows::Devices::Enumeration::DeviceInformationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IDeviceInformationUpdate2)->get_Kind(&value)); return value; } template event_token impl_IDeviceWatcher::Added(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Added(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->add_Added(get_abi(handler), &token)); return token; } @@ -1978,13 +2096,13 @@ template event_revoker impl_IDeviceWatcher::Adde template void impl_IDeviceWatcher::Added(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Added(token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->remove_Added(token)); } template event_token impl_IDeviceWatcher::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->add_Updated(get_abi(handler), &token)); return token; } @@ -1995,13 +2113,13 @@ template event_revoker impl_IDeviceWatcher::Upda template void impl_IDeviceWatcher::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->remove_Updated(token)); } template event_token impl_IDeviceWatcher::Removed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Removed(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->add_Removed(get_abi(handler), &token)); return token; } @@ -2012,310 +2130,310 @@ template event_revoker impl_IDeviceWatcher::Remo template void impl_IDeviceWatcher::Removed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Removed(token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->remove_Removed(token)); } -template event_token impl_IDeviceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDeviceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IDeviceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDeviceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Enumeration::IDeviceWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IDeviceWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IDeviceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDeviceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IDeviceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDeviceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Enumeration::IDeviceWatcher::remove_Stopped, Stopped(handler)); } template void impl_IDeviceWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->remove_Stopped(token)); } template Windows::Devices::Enumeration::DeviceWatcherStatus impl_IDeviceWatcher::Status() const { Windows::Devices::Enumeration::DeviceWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IDeviceWatcher)->get_Status(&status)); return status; } template void impl_IDeviceWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IDeviceWatcher)->abi_Start()); } template void impl_IDeviceWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IDeviceWatcher)->abi_Stop()); } -template Windows::ApplicationModel::Background::DeviceWatcherTrigger impl_IDeviceWatcher2::GetBackgroundTrigger(const Windows::Foundation::Collections::IIterable & requestedEventKinds) const +template Windows::ApplicationModel::Background::DeviceWatcherTrigger impl_IDeviceWatcher2::GetBackgroundTrigger(iterable requestedEventKinds) const { Windows::ApplicationModel::Background::DeviceWatcherTrigger trigger { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBackgroundTrigger(get(requestedEventKinds), put(trigger))); + check_hresult(WINRT_SHIM(IDeviceWatcher2)->abi_GetBackgroundTrigger(get_abi(requestedEventKinds), put_abi(trigger))); return trigger; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::CreateFromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::CreateFromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIdAsync(get(deviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateFromIdAsync(get_abi(deviceId), put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::CreateFromIdAsync(hstring_ref deviceId, const Windows::Foundation::Collections::IIterable & additionalProperties) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::CreateFromIdAsync(hstring_view deviceId, iterable additionalProperties) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIdAsyncAdditionalProperties(get(deviceId), get(additionalProperties), put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateFromIdAsyncAdditionalProperties(get_abi(deviceId), get_abi(additionalProperties), put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_FindAllAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync(Windows::Devices::Enumeration::DeviceClass deviceClass) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncDeviceClass(deviceClass, put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_FindAllAsyncDeviceClass(deviceClass, put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync(hstring_ref aqsFilter) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync(hstring_view aqsFilter) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncAqsFilter(get(aqsFilter), put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_FindAllAsyncAqsFilter(get_abi(aqsFilter), put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics::FindAllAsync(hstring_view aqsFilter, iterable additionalProperties) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncAqsFilterAndAdditionalProperties(get(aqsFilter), get(additionalProperties), put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_FindAllAsyncAqsFilterAndAdditionalProperties(get_abi(aqsFilter), get_abi(additionalProperties), put_abi(asyncOp))); return asyncOp; } template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher() const { Windows::Devices::Enumeration::DeviceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateWatcher(put_abi(watcher))); return watcher; } template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher(Windows::Devices::Enumeration::DeviceClass deviceClass) const { Windows::Devices::Enumeration::DeviceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherDeviceClass(deviceClass, put(watcher))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateWatcherDeviceClass(deviceClass, put_abi(watcher))); return watcher; } -template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher(hstring_ref aqsFilter) const +template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher(hstring_view aqsFilter) const { Windows::Devices::Enumeration::DeviceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherAqsFilter(get(aqsFilter), put(watcher))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateWatcherAqsFilter(get_abi(aqsFilter), put_abi(watcher))); return watcher; } -template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties) const +template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics::CreateWatcher(hstring_view aqsFilter, iterable additionalProperties) const { Windows::Devices::Enumeration::DeviceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherAqsFilterAndAdditionalProperties(get(aqsFilter), get(additionalProperties), put(watcher))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics)->abi_CreateWatcherAqsFilterAndAdditionalProperties(get_abi(aqsFilter), get_abi(additionalProperties), put_abi(watcher))); return watcher; } template hstring impl_IDeviceInformationStatics2::GetAqsFilterFromDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass) const { hstring aqsFilter; - check_hresult(static_cast(static_cast(*this))->abi_GetAqsFilterFromDeviceClass(deviceClass, put(aqsFilter))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics2)->abi_GetAqsFilterFromDeviceClass(deviceClass, put_abi(aqsFilter))); return aqsFilter; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics2::CreateFromIdAsync(hstring_ref deviceId, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics2::CreateFromIdAsync(hstring_view deviceId, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIdAsyncWithKindAndAdditionalProperties(get(deviceId), get(additionalProperties), kind, put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics2)->abi_CreateFromIdAsyncWithKindAndAdditionalProperties(get_abi(deviceId), get_abi(additionalProperties), kind, put_abi(asyncOp))); return asyncOp; } -template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics2::FindAllAsync(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const +template Windows::Foundation::IAsyncOperation impl_IDeviceInformationStatics2::FindAllAsync(hstring_view aqsFilter, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncWithKindAqsFilterAndAdditionalProperties(get(aqsFilter), get(additionalProperties), kind, put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics2)->abi_FindAllAsyncWithKindAqsFilterAndAdditionalProperties(get_abi(aqsFilter), get_abi(additionalProperties), kind, put_abi(asyncOp))); return asyncOp; } -template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics2::CreateWatcher(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const +template Windows::Devices::Enumeration::DeviceWatcher impl_IDeviceInformationStatics2::CreateWatcher(hstring_view aqsFilter, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) const { Windows::Devices::Enumeration::DeviceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherWithKindAqsFilterAndAdditionalProperties(get(aqsFilter), get(additionalProperties), kind, put(watcher))); + check_hresult(WINRT_SHIM(IDeviceInformationStatics2)->abi_CreateWatcherWithKindAqsFilterAndAdditionalProperties(get_abi(aqsFilter), get_abi(additionalProperties), kind, put_abi(watcher))); return watcher; } template hstring impl_IDeviceInformation::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformation)->get_Id(put_abi(value))); return value; } template hstring impl_IDeviceInformation::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformation)->get_Name(put_abi(value))); return value; } template bool impl_IDeviceInformation::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IDeviceInformation)->get_IsEnabled(&value)); return value; } template bool impl_IDeviceInformation::IsDefault() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDefault(&value)); + check_hresult(WINRT_SHIM(IDeviceInformation)->get_IsDefault(&value)); return value; } template Windows::Devices::Enumeration::EnclosureLocation impl_IDeviceInformation::EnclosureLocation() const { Windows::Devices::Enumeration::EnclosureLocation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EnclosureLocation(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformation)->get_EnclosureLocation(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IDeviceInformation::Properties() const +template Windows::Foundation::Collections::IMapView impl_IDeviceInformation::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IDeviceInformation)->get_Properties(put_abi(value))); return value; } template void impl_IDeviceInformation::Update(const Windows::Devices::Enumeration::DeviceInformationUpdate & updateInfo) const { - check_hresult(static_cast(static_cast(*this))->abi_Update(get(updateInfo))); + check_hresult(WINRT_SHIM(IDeviceInformation)->abi_Update(get_abi(updateInfo))); } template Windows::Foundation::IAsyncOperation impl_IDeviceInformation::GetThumbnailAsync() const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformation)->abi_GetThumbnailAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformation::GetGlyphThumbnailAsync() const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_GetGlyphThumbnailAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IDeviceInformation)->abi_GetGlyphThumbnailAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Devices::Enumeration::DevicePairingResultStatus impl_IDevicePairingResult::Status() const { Windows::Devices::Enumeration::DevicePairingResultStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IDevicePairingResult)->get_Status(&status)); return status; } template Windows::Devices::Enumeration::DevicePairingProtectionLevel impl_IDevicePairingResult::ProtectionLevelUsed() const { Windows::Devices::Enumeration::DevicePairingProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevelUsed(&value)); + check_hresult(WINRT_SHIM(IDevicePairingResult)->get_ProtectionLevelUsed(&value)); return value; } template Windows::Devices::Enumeration::DeviceUnpairingResultStatus impl_IDeviceUnpairingResult::Status() const { Windows::Devices::Enumeration::DeviceUnpairingResultStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IDeviceUnpairingResult)->get_Status(&status)); return status; } template Windows::Devices::Enumeration::DeviceInformation impl_IDevicePairingRequestedEventArgs::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Devices::Enumeration::DevicePairingKinds impl_IDevicePairingRequestedEventArgs::PairingKind() const { Windows::Devices::Enumeration::DevicePairingKinds value {}; - check_hresult(static_cast(static_cast(*this))->get_PairingKind(&value)); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->get_PairingKind(&value)); return value; } template hstring impl_IDevicePairingRequestedEventArgs::Pin() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pin(put(value))); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->get_Pin(put_abi(value))); return value; } template void impl_IDevicePairingRequestedEventArgs::Accept() const { - check_hresult(static_cast(static_cast(*this))->abi_Accept()); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->abi_Accept()); } -template void impl_IDevicePairingRequestedEventArgs::Accept(hstring_ref pin) const +template void impl_IDevicePairingRequestedEventArgs::Accept(hstring_view pin) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptWithPin(get(pin))); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->abi_AcceptWithPin(get_abi(pin))); } template Windows::Foundation::Deferral impl_IDevicePairingRequestedEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IDevicePairingRequestedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationCustomPairing::PairAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairAsync(pairingKindsSupported, put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationCustomPairing)->abi_PairAsync(pairingKindsSupported, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationCustomPairing::PairAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairWithProtectionLevelAsync(pairingKindsSupported, minProtectionLevel, put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationCustomPairing)->abi_PairWithProtectionLevelAsync(pairingKindsSupported, minProtectionLevel, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationCustomPairing::PairAsync(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported, Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, const Windows::Devices::Enumeration::IDevicePairingSettings & devicePairingSettings) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairWithProtectionLevelAndSettingsAsync(pairingKindsSupported, minProtectionLevel, get(devicePairingSettings), put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationCustomPairing)->abi_PairWithProtectionLevelAndSettingsAsync(pairingKindsSupported, minProtectionLevel, get_abi(devicePairingSettings), put_abi(result))); return result; } template event_token impl_IDeviceInformationCustomPairing::PairingRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PairingRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IDeviceInformationCustomPairing)->add_PairingRequested(get_abi(handler), &token)); return token; } @@ -2326,104 +2444,104 @@ template event_revoker impl_IDevic template void impl_IDeviceInformationCustomPairing::PairingRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PairingRequested(token)); + check_hresult(WINRT_SHIM(IDeviceInformationCustomPairing)->remove_PairingRequested(token)); } template bool impl_IDeviceInformationPairing::IsPaired() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaired(&value)); + check_hresult(WINRT_SHIM(IDeviceInformationPairing)->get_IsPaired(&value)); return value; } template bool impl_IDeviceInformationPairing::CanPair() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPair(&value)); + check_hresult(WINRT_SHIM(IDeviceInformationPairing)->get_CanPair(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationPairing::PairAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairAsync(put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationPairing)->abi_PairAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationPairing::PairAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairWithProtectionLevelAsync(minProtectionLevel, put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationPairing)->abi_PairWithProtectionLevelAsync(minProtectionLevel, put_abi(result))); return result; } template Windows::Devices::Enumeration::DevicePairingProtectionLevel impl_IDeviceInformationPairing2::ProtectionLevel() const { Windows::Devices::Enumeration::DevicePairingProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IDeviceInformationPairing2)->get_ProtectionLevel(&value)); return value; } template Windows::Devices::Enumeration::DeviceInformationCustomPairing impl_IDeviceInformationPairing2::Custom() const { Windows::Devices::Enumeration::DeviceInformationCustomPairing value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Custom(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformationPairing2)->get_Custom(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationPairing2::PairAsync(Windows::Devices::Enumeration::DevicePairingProtectionLevel minProtectionLevel, const Windows::Devices::Enumeration::IDevicePairingSettings & devicePairingSettings) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_PairWithProtectionLevelAndSettingsAsync(minProtectionLevel, get(devicePairingSettings), put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationPairing2)->abi_PairWithProtectionLevelAndSettingsAsync(minProtectionLevel, get_abi(devicePairingSettings), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDeviceInformationPairing2::UnpairAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_UnpairAsync(put(result))); + check_hresult(WINRT_SHIM(IDeviceInformationPairing2)->abi_UnpairAsync(put_abi(result))); return result; } template bool impl_IDeviceInformationPairingStatics::TryRegisterForAllInboundPairingRequests(Windows::Devices::Enumeration::DevicePairingKinds pairingKindsSupported) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryRegisterForAllInboundPairingRequests(pairingKindsSupported, &result)); + check_hresult(WINRT_SHIM(IDeviceInformationPairingStatics)->abi_TryRegisterForAllInboundPairingRequests(pairingKindsSupported, &result)); return result; } template Windows::Devices::Enumeration::DeviceInformationKind impl_IDeviceInformation2::Kind() const { Windows::Devices::Enumeration::DeviceInformationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IDeviceInformation2)->get_Kind(&value)); return value; } template Windows::Devices::Enumeration::DeviceInformationPairing impl_IDeviceInformation2::Pairing() const { Windows::Devices::Enumeration::DeviceInformationPairing value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pairing(put(value))); + check_hresult(WINRT_SHIM(IDeviceInformation2)->get_Pairing(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceAccessStatus impl_IDeviceAccessChangedEventArgs::Status() const { Windows::Devices::Enumeration::DeviceAccessStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IDeviceAccessChangedEventArgs)->get_Status(&value)); return value; } template hstring impl_IDeviceAccessChangedEventArgs2::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IDeviceAccessChangedEventArgs2)->get_Id(put_abi(value))); return value; } template event_token impl_IDeviceAccessInformation::AccessChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AccessChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IDeviceAccessInformation)->add_AccessChanged(get_abi(handler), &cookie)); return cookie; } @@ -2434,66 +2552,66 @@ template event_revoker impl_IDeviceAccess template void impl_IDeviceAccessInformation::AccessChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AccessChanged(cookie)); + check_hresult(WINRT_SHIM(IDeviceAccessInformation)->remove_AccessChanged(cookie)); } template Windows::Devices::Enumeration::DeviceAccessStatus impl_IDeviceAccessInformation::CurrentStatus() const { Windows::Devices::Enumeration::DeviceAccessStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentStatus(&status)); + check_hresult(WINRT_SHIM(IDeviceAccessInformation)->get_CurrentStatus(&status)); return status; } -template Windows::Devices::Enumeration::DeviceAccessInformation impl_IDeviceAccessInformationStatics::CreateFromId(hstring_ref deviceId) const +template Windows::Devices::Enumeration::DeviceAccessInformation impl_IDeviceAccessInformationStatics::CreateFromId(hstring_view deviceId) const { Windows::Devices::Enumeration::DeviceAccessInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromId(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(IDeviceAccessInformationStatics)->abi_CreateFromId(get_abi(deviceId), put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceAccessInformation impl_IDeviceAccessInformationStatics::CreateFromDeviceClassId(GUID deviceClassId) const { Windows::Devices::Enumeration::DeviceAccessInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromDeviceClassId(deviceClassId, put(value))); + check_hresult(WINRT_SHIM(IDeviceAccessInformationStatics)->abi_CreateFromDeviceClassId(deviceClassId, put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceAccessInformation impl_IDeviceAccessInformationStatics::CreateFromDeviceClass(Windows::Devices::Enumeration::DeviceClass deviceClass) const { Windows::Devices::Enumeration::DeviceAccessInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromDeviceClass(deviceClass, put(value))); + check_hresult(WINRT_SHIM(IDeviceAccessInformationStatics)->abi_CreateFromDeviceClass(deviceClass, put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceWatcherEventKind impl_IDeviceWatcherEvent::Kind() const { Windows::Devices::Enumeration::DeviceWatcherEventKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IDeviceWatcherEvent)->get_Kind(&value)); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IDeviceWatcherEvent::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IDeviceWatcherEvent)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformationUpdate impl_IDeviceWatcherEvent::DeviceInformationUpdate() const { Windows::Devices::Enumeration::DeviceInformationUpdate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformationUpdate(put(value))); + check_hresult(WINRT_SHIM(IDeviceWatcherEvent)->get_DeviceInformationUpdate(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IDeviceWatcherTriggerDetails::DeviceWatcherEvents() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DeviceWatcherEvents(put(value))); + check_hresult(WINRT_SHIM(IDeviceWatcherTriggerDetails)->get_DeviceWatcherEvents(put_abi(value))); return value; } -inline Windows::Devices::Enumeration::DeviceAccessInformation DeviceAccessInformation::CreateFromId(hstring_ref deviceId) +inline Windows::Devices::Enumeration::DeviceAccessInformation DeviceAccessInformation::CreateFromId(hstring_view deviceId) { return get_activation_factory().CreateFromId(deviceId); } @@ -2508,12 +2626,12 @@ inline Windows::Devices::Enumeration::DeviceAccessInformation DeviceAccessInform return get_activation_factory().CreateFromDeviceClass(deviceClass); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_view deviceId) { return get_activation_factory().CreateFromIdAsync(deviceId); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_ref deviceId, const Windows::Foundation::Collections::IIterable & additionalProperties) +inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_view deviceId, iterable additionalProperties) { return get_activation_factory().CreateFromIdAsync(deviceId, additionalProperties); } @@ -2528,12 +2646,12 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(deviceClass); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_ref aqsFilter) +inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_view aqsFilter) { return get_activation_factory().FindAllAsync(aqsFilter); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties) +inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_view aqsFilter, iterable additionalProperties) { return get_activation_factory().FindAllAsync(aqsFilter, additionalProperties); } @@ -2548,12 +2666,12 @@ inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWat return get_activation_factory().CreateWatcher(deviceClass); } -inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_ref aqsFilter) +inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_view aqsFilter) { return get_activation_factory().CreateWatcher(aqsFilter); } -inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties) +inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_view aqsFilter, iterable additionalProperties) { return get_activation_factory().CreateWatcher(aqsFilter, additionalProperties); } @@ -2563,17 +2681,17 @@ inline hstring DeviceInformation::GetAqsFilterFromDeviceClass(Windows::Devices:: return get_activation_factory().GetAqsFilterFromDeviceClass(deviceClass); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_ref deviceId, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) +inline Windows::Foundation::IAsyncOperation DeviceInformation::CreateFromIdAsync(hstring_view deviceId, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) { return get_activation_factory().CreateFromIdAsync(deviceId, additionalProperties, kind); } -inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) +inline Windows::Foundation::IAsyncOperation DeviceInformation::FindAllAsync(hstring_view aqsFilter, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) { return get_activation_factory().FindAllAsync(aqsFilter, additionalProperties, kind); } -inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_ref aqsFilter, const Windows::Foundation::Collections::IIterable & additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) +inline Windows::Devices::Enumeration::DeviceWatcher DeviceInformation::CreateWatcher(hstring_view aqsFilter, iterable additionalProperties, Windows::Devices::Enumeration::DeviceInformationKind kind) { return get_activation_factory().CreateWatcher(aqsFilter, additionalProperties, kind); } @@ -2590,3 +2708,464 @@ inline DevicePicker::DevicePicker() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceAccessChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceAccessChangedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceAccessInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceAccessInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceConnectionChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceDisconnectButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationCustomPairing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationPairing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationPairing2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationPairingStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceInformationUpdate2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePairingRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePairingResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePairingSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePickerAppearance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceUnpairingResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceWatcher2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceWatcherEvent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IDeviceWatcherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IEnclosureLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::IEnclosureLocation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceAccessChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceAccessInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceConnectionChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceDisconnectButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceInformationCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceInformationCustomPairing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceInformationPairing & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceInformationUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DevicePairingRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DevicePairingResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DevicePickerAppearance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceThumbnail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceUnpairingResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceWatcherEvent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::DeviceWatcherTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Enumeration::EnclosureLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Geolocation.Geofencing.h b/10.0.14393.0/winrt/Windows.Devices.Geolocation.Geofencing.h index 90d7c0415..7d32506b5 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Geolocation.Geofencing.h +++ b/10.0.14393.0/winrt/Windows.Devices.Geolocation.Geofencing.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Geolocation.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produc } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce : produc } } - HRESULT __stdcall get_DwellTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DwellTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DwellTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DwellTime()); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce : produc } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -73,7 +80,8 @@ struct produce : produc { try { - *value = detach(this->shim().MonitoredStates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonitoredStates()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce : produc } } - HRESULT __stdcall get_Geoshape(abi_arg_out value) noexcept override + HRESULT __stdcall get_Geoshape(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Geoshape()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Geoshape()); return S_OK; } catch (...) @@ -100,7 +109,8 @@ struct produce : produc { try { - *value = detach(this->shim().SingleUse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SingleUse()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in id, abi_arg_in geoshape, abi_arg_out geofence) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in id, impl::abi_arg_in geoshape, impl::abi_arg_out geofence) noexcept override { try { - *geofence = detach(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&geoshape))); + typename D::abi_guard guard(this->shim()); + *geofence = detach_abi(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&geoshape))); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithMonitorStates(abi_arg_in id, abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, abi_arg_out geofence) noexcept override + HRESULT __stdcall abi_CreateWithMonitorStates(impl::abi_arg_in id, impl::abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, impl::abi_arg_out geofence) noexcept override { try { - *geofence = detach(this->shim().CreateWithMonitorStates(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse)); + typename D::abi_guard guard(this->shim()); + *geofence = detach_abi(this->shim().CreateWithMonitorStates(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse)); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithMonitorStatesAndDwellTime(abi_arg_in id, abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, abi_arg_in dwellTime, abi_arg_out geofence) noexcept override + HRESULT __stdcall abi_CreateWithMonitorStatesAndDwellTime(impl::abi_arg_in id, impl::abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, impl::abi_arg_in dwellTime, impl::abi_arg_out geofence) noexcept override { try { - *geofence = detach(this->shim().CreateWithMonitorStatesAndDwellTime(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse, *reinterpret_cast(&dwellTime))); + typename D::abi_guard guard(this->shim()); + *geofence = detach_abi(this->shim().CreateWithMonitorStatesAndDwellTime(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse, *reinterpret_cast(&dwellTime))); return S_OK; } catch (...) @@ -155,11 +168,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithMonitorStatesDwellTimeStartTimeAndDuration(abi_arg_in id, abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, abi_arg_in dwellTime, abi_arg_in startTime, abi_arg_in duration, abi_arg_out geofence) noexcept override + HRESULT __stdcall abi_CreateWithMonitorStatesDwellTimeStartTimeAndDuration(impl::abi_arg_in id, impl::abi_arg_in geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, impl::abi_arg_in dwellTime, impl::abi_arg_in startTime, impl::abi_arg_in duration, impl::abi_arg_out geofence) noexcept override { try { - *geofence = detach(this->shim().CreateWithMonitorStatesDwellTimeStartTimeAndDuration(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse, *reinterpret_cast(&dwellTime), *reinterpret_cast(&startTime), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *geofence = detach_abi(this->shim().CreateWithMonitorStatesDwellTimeStartTimeAndDuration(*reinterpret_cast(&id), *reinterpret_cast(&geoshape), monitoredStates, singleUse, *reinterpret_cast(&dwellTime), *reinterpret_cast(&startTime), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -177,7 +191,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -186,11 +201,12 @@ struct produce : } } - HRESULT __stdcall get_Geofences(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Geofences(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Geofences()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Geofences()); return S_OK; } catch (...) @@ -200,11 +216,12 @@ struct produce : } } - HRESULT __stdcall get_LastKnownGeoposition(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastKnownGeoposition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastKnownGeoposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastKnownGeoposition()); return S_OK; } catch (...) @@ -214,11 +231,12 @@ struct produce : } } - HRESULT __stdcall add_GeofenceStateChanged(abi_arg_in> eventHandler, event_token * token) noexcept override + HRESULT __stdcall add_GeofenceStateChanged(impl::abi_arg_in> eventHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().GeofenceStateChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GeofenceStateChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -231,6 +249,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().GeofenceStateChanged(token); return S_OK; } @@ -240,11 +259,12 @@ struct produce : } } - HRESULT __stdcall abi_ReadReports(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ReadReports(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadReports()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadReports()); return S_OK; } catch (...) @@ -254,11 +274,12 @@ struct produce : } } - HRESULT __stdcall add_StatusChanged(abi_arg_in> eventHandler, event_token * token) noexcept override + HRESULT __stdcall add_StatusChanged(impl::abi_arg_in> eventHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -271,6 +292,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().StatusChanged(token); return S_OK; } @@ -284,11 +306,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -306,7 +329,8 @@ struct produceshim().NewState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewState()); return S_OK; } catch (...) @@ -315,11 +339,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Geofence(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Geofence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Geofence()); return S_OK; } catch (...) @@ -329,11 +354,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Geoposition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Geoposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Geoposition()); return S_OK; } catch (...) @@ -347,7 +373,8 @@ struct produceshim().RemovalReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovalReason()); return S_OK; } catch (...) @@ -361,193 +388,193 @@ struct produce Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::Create(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape) const +template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::Create(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape) const { Windows::Devices::Geolocation::Geofencing::Geofence geofence { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(id), get(geoshape), put(geofence))); + check_hresult(WINRT_SHIM(IGeofenceFactory)->abi_Create(get_abi(id), get_abi(geoshape), put_abi(geofence))); return geofence; } -template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStates(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse) const +template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStates(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse) const { Windows::Devices::Geolocation::Geofencing::Geofence geofence { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithMonitorStates(get(id), get(geoshape), monitoredStates, singleUse, put(geofence))); + check_hresult(WINRT_SHIM(IGeofenceFactory)->abi_CreateWithMonitorStates(get_abi(id), get_abi(geoshape), monitoredStates, singleUse, put_abi(geofence))); return geofence; } -template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStatesAndDwellTime(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime) const +template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStatesAndDwellTime(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime) const { Windows::Devices::Geolocation::Geofencing::Geofence geofence { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithMonitorStatesAndDwellTime(get(id), get(geoshape), monitoredStates, singleUse, get(dwellTime), put(geofence))); + check_hresult(WINRT_SHIM(IGeofenceFactory)->abi_CreateWithMonitorStatesAndDwellTime(get_abi(id), get_abi(geoshape), monitoredStates, singleUse, get_abi(dwellTime), put_abi(geofence))); return geofence; } -template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStatesDwellTimeStartTimeAndDuration(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime, const Windows::Foundation::DateTime & startTime, const Windows::Foundation::TimeSpan & duration) const +template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceFactory::CreateWithMonitorStatesDwellTimeStartTimeAndDuration(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime, const Windows::Foundation::DateTime & startTime, const Windows::Foundation::TimeSpan & duration) const { Windows::Devices::Geolocation::Geofencing::Geofence geofence { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithMonitorStatesDwellTimeStartTimeAndDuration(get(id), get(geoshape), monitoredStates, singleUse, get(dwellTime), get(startTime), get(duration), put(geofence))); + check_hresult(WINRT_SHIM(IGeofenceFactory)->abi_CreateWithMonitorStatesDwellTimeStartTimeAndDuration(get_abi(id), get_abi(geoshape), monitoredStates, singleUse, get_abi(dwellTime), get_abi(startTime), get_abi(duration), put_abi(geofence))); return geofence; } template Windows::Foundation::DateTime impl_IGeofence::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IGeofence)->get_StartTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IGeofence::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IGeofence)->get_Duration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IGeofence::DwellTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DwellTime(put(value))); + check_hresult(WINRT_SHIM(IGeofence)->get_DwellTime(put_abi(value))); return value; } template hstring impl_IGeofence::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IGeofence)->get_Id(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates impl_IGeofence::MonitoredStates() const { Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates value {}; - check_hresult(static_cast(static_cast(*this))->get_MonitoredStates(&value)); + check_hresult(WINRT_SHIM(IGeofence)->get_MonitoredStates(&value)); return value; } template Windows::Devices::Geolocation::IGeoshape impl_IGeofence::Geoshape() const { Windows::Devices::Geolocation::IGeoshape value; - check_hresult(static_cast(static_cast(*this))->get_Geoshape(put(value))); + check_hresult(WINRT_SHIM(IGeofence)->get_Geoshape(put_abi(value))); return value; } template bool impl_IGeofence::SingleUse() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SingleUse(&value)); + check_hresult(WINRT_SHIM(IGeofence)->get_SingleUse(&value)); return value; } template Windows::Devices::Geolocation::Geofencing::GeofenceState impl_IGeofenceStateChangeReport::NewState() const { Windows::Devices::Geolocation::Geofencing::GeofenceState value {}; - check_hresult(static_cast(static_cast(*this))->get_NewState(&value)); + check_hresult(WINRT_SHIM(IGeofenceStateChangeReport)->get_NewState(&value)); return value; } template Windows::Devices::Geolocation::Geofencing::Geofence impl_IGeofenceStateChangeReport::Geofence() const { Windows::Devices::Geolocation::Geofencing::Geofence value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Geofence(put(value))); + check_hresult(WINRT_SHIM(IGeofenceStateChangeReport)->get_Geofence(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geoposition impl_IGeofenceStateChangeReport::Geoposition() const { Windows::Devices::Geolocation::Geoposition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Geoposition(put(value))); + check_hresult(WINRT_SHIM(IGeofenceStateChangeReport)->get_Geoposition(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geofencing::GeofenceRemovalReason impl_IGeofenceStateChangeReport::RemovalReason() const { Windows::Devices::Geolocation::Geofencing::GeofenceRemovalReason value {}; - check_hresult(static_cast(static_cast(*this))->get_RemovalReason(&value)); + check_hresult(WINRT_SHIM(IGeofenceStateChangeReport)->get_RemovalReason(&value)); return value; } template Windows::Devices::Geolocation::Geofencing::GeofenceMonitor impl_IGeofenceMonitorStatics::Current() const { Windows::Devices::Geolocation::Geofencing::GeofenceMonitor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IGeofenceMonitorStatics)->get_Current(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geofencing::GeofenceMonitorStatus impl_IGeofenceMonitor::Status() const { Windows::Devices::Geolocation::Geofencing::GeofenceMonitorStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IGeofenceMonitor::Geofences() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Geofences(put(value))); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->get_Geofences(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geoposition impl_IGeofenceMonitor::LastKnownGeoposition() const { Windows::Devices::Geolocation::Geoposition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LastKnownGeoposition(put(value))); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->get_LastKnownGeoposition(put_abi(value))); return value; } -template event_token impl_IGeofenceMonitor::GeofenceStateChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IGeofenceMonitor::GeofenceStateChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GeofenceStateChanged(get(eventHandler), &token)); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->add_GeofenceStateChanged(get_abi(eventHandler), &token)); return token; } -template event_revoker impl_IGeofenceMonitor::GeofenceStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IGeofenceMonitor::GeofenceStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Geolocation::Geofencing::IGeofenceMonitor::remove_GeofenceStateChanged, GeofenceStateChanged(eventHandler)); } template void impl_IGeofenceMonitor::GeofenceStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GeofenceStateChanged(token)); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->remove_GeofenceStateChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IGeofenceMonitor::ReadReports() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_ReadReports(put(value))); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->abi_ReadReports(put_abi(value))); return value; } -template event_token impl_IGeofenceMonitor::StatusChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IGeofenceMonitor::StatusChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusChanged(get(eventHandler), &token)); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->add_StatusChanged(get_abi(eventHandler), &token)); return token; } -template event_revoker impl_IGeofenceMonitor::StatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IGeofenceMonitor::StatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Geolocation::Geofencing::IGeofenceMonitor::remove_StatusChanged, StatusChanged(eventHandler)); } template void impl_IGeofenceMonitor::StatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusChanged(token)); + check_hresult(WINRT_SHIM(IGeofenceMonitor)->remove_StatusChanged(token)); } -inline Geofence::Geofence(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape) : +inline Geofence::Geofence(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape) : Geofence(get_activation_factory().Create(id, geoshape)) {} -inline Geofence::Geofence(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse) : +inline Geofence::Geofence(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse) : Geofence(get_activation_factory().CreateWithMonitorStates(id, geoshape, monitoredStates, singleUse)) {} -inline Geofence::Geofence(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime) : +inline Geofence::Geofence(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime) : Geofence(get_activation_factory().CreateWithMonitorStatesAndDwellTime(id, geoshape, monitoredStates, singleUse, dwellTime)) {} -inline Geofence::Geofence(hstring_ref id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime, const Windows::Foundation::DateTime & startTime, const Windows::Foundation::TimeSpan & duration) : +inline Geofence::Geofence(hstring_view id, const Windows::Devices::Geolocation::IGeoshape & geoshape, Windows::Devices::Geolocation::Geofencing::MonitoredGeofenceStates monitoredStates, bool singleUse, const Windows::Foundation::TimeSpan & dwellTime, const Windows::Foundation::DateTime & startTime, const Windows::Foundation::TimeSpan & duration) : Geofence(get_activation_factory().CreateWithMonitorStatesDwellTimeStartTimeAndDuration(id, geoshape, monitoredStates, singleUse, dwellTime, startTime, duration)) {} @@ -559,3 +586,77 @@ inline Windows::Devices::Geolocation::Geofencing::GeofenceMonitor GeofenceMonito } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::IGeofence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::IGeofenceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::IGeofenceMonitor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::IGeofenceMonitorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::IGeofenceStateChangeReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::Geofence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::GeofenceMonitor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geofencing::GeofenceStateChangeReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Geolocation.h b/10.0.14393.0/winrt/Windows.Devices.Geolocation.h index effdd5f95..a1d9f142a 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Geolocation.h +++ b/10.0.14393.0/winrt/Windows.Devices.Geolocation.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Geolocation.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Country(abi_arg_out value) noexcept override + HRESULT __stdcall get_Country(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Country()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Country()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_State(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_City(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().City()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().City()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PostalCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostalCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostalCode()); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_NorthwestCorner(abi_arg_out value) noexcept override + HRESULT __stdcall get_NorthwestCorner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NorthwestCorner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NorthwestCorner()); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SoutheastCorner(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoutheastCorner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoutheastCorner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoutheastCorner()); return S_OK; } catch (...) @@ -114,11 +124,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Center(abi_arg_out value) noexcept override + HRESULT __stdcall get_Center(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Center()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Center()); return S_OK; } catch (...) @@ -131,7 +142,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MinAltitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinAltitude()); return S_OK; } catch (...) @@ -144,7 +156,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MaxAltitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAltitude()); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in northwestCorner, abi_arg_in southeastCorner, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in northwestCorner, impl::abi_arg_in southeastCorner, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner))); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateWithAltitudeReference(abi_arg_in northwestCorner, abi_arg_in southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReference(impl::abi_arg_in northwestCorner, impl::abi_arg_in southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReference(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner), altitudeReferenceSystem)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReference(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner), altitudeReferenceSystem)); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceAndSpatialReference(abi_arg_in northwestCorner, abi_arg_in southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceAndSpatialReference(impl::abi_arg_in northwestCorner, impl::abi_arg_in southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceAndSpatialReference(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner), altitudeReferenceSystem, spatialReferenceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceAndSpatialReference(*reinterpret_cast(&northwestCorner), *reinterpret_cast(&southeastCorner), altitudeReferenceSystem, spatialReferenceId)); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_TryCompute(abi_arg_in> positions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryCompute(impl::abi_arg_in> positions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCompute(*reinterpret_cast *>(&positions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCompute(*reinterpret_cast *>(&positions))); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produ } } - HRESULT __stdcall abi_TryComputeWithAltitudeReference(abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryComputeWithAltitudeReference(impl::abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCompute(*reinterpret_cast *>(&positions), altitudeRefSystem)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCompute(*reinterpret_cast *>(&positions), altitudeRefSystem)); return S_OK; } catch (...) @@ -231,11 +249,12 @@ struct produce : produ } } - HRESULT __stdcall abi_TryComputeWithAltitudeReferenceAndSpatialReference(abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryComputeWithAltitudeReferenceAndSpatialReference(impl::abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCompute(*reinterpret_cast *>(&positions), altitudeRefSystem, spatialReferenceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCompute(*reinterpret_cast *>(&positions), altitudeRefSystem, spatialReferenceId)); return S_OK; } catch (...) @@ -249,11 +268,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Center(abi_arg_out value) noexcept override + HRESULT __stdcall get_Center(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Center()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Center()); return S_OK; } catch (...) @@ -266,7 +286,8 @@ struct produce : produce_baseshim().Radius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Radius()); return S_OK; } catch (...) @@ -279,11 +300,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in position, double radius, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in position, double radius, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&position), radius)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&position), radius)); return S_OK; } catch (...) @@ -293,11 +315,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceSystem(abi_arg_in position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceSystem(impl::abi_arg_in position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceSystem(*reinterpret_cast(&position), radius, altitudeReferenceSystem)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceSystem(*reinterpret_cast(&position), radius, altitudeReferenceSystem)); return S_OK; } catch (...) @@ -307,11 +330,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(abi_arg_in position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(impl::abi_arg_in position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceSystemAndSpatialReferenceId(*reinterpret_cast(&position), radius, altitudeReferenceSystem, spatialReferenceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceSystemAndSpatialReferenceId(*reinterpret_cast(&position), radius, altitudeReferenceSystem, spatialReferenceId)); return S_OK; } catch (...) @@ -329,7 +353,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Latitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Latitude()); return S_OK; } catch (...) @@ -342,7 +367,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Longitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Longitude()); return S_OK; } catch (...) @@ -351,11 +377,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Altitude(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Altitude(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Altitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Altitude()); return S_OK; } catch (...) @@ -369,7 +396,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Accuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Accuracy()); return S_OK; } catch (...) @@ -378,11 +406,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AltitudeAccuracy(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AltitudeAccuracy(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AltitudeAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AltitudeAccuracy()); return S_OK; } catch (...) @@ -392,11 +421,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Heading(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Heading(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Heading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Heading()); return S_OK; } catch (...) @@ -406,11 +436,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Speed(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Speed(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Speed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Speed()); return S_OK; } catch (...) @@ -420,11 +451,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -437,11 +469,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_PositionDilutionOfPrecision(abi_arg_out> ppValue) noexcept override + HRESULT __stdcall get_PositionDilutionOfPrecision(impl::abi_arg_out> ppValue) noexcept override { try { - *ppValue = detach(this->shim().PositionDilutionOfPrecision()); + typename D::abi_guard guard(this->shim()); + *ppValue = detach_abi(this->shim().PositionDilutionOfPrecision()); return S_OK; } catch (...) @@ -451,11 +484,12 @@ struct produce : } } - HRESULT __stdcall get_HorizontalDilutionOfPrecision(abi_arg_out> ppValue) noexcept override + HRESULT __stdcall get_HorizontalDilutionOfPrecision(impl::abi_arg_out> ppValue) noexcept override { try { - *ppValue = detach(this->shim().HorizontalDilutionOfPrecision()); + typename D::abi_guard guard(this->shim()); + *ppValue = detach_abi(this->shim().HorizontalDilutionOfPrecision()); return S_OK; } catch (...) @@ -465,11 +499,12 @@ struct produce : } } - HRESULT __stdcall get_VerticalDilutionOfPrecision(abi_arg_out> ppValue) noexcept override + HRESULT __stdcall get_VerticalDilutionOfPrecision(impl::abi_arg_out> ppValue) noexcept override { try { - *ppValue = detach(this->shim().VerticalDilutionOfPrecision()); + typename D::abi_guard guard(this->shim()); + *ppValue = detach_abi(this->shim().VerticalDilutionOfPrecision()); return S_OK; } catch (...) @@ -483,11 +518,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Point(abi_arg_out value) noexcept override + HRESULT __stdcall get_Point(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Point()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Point()); return S_OK; } catch (...) @@ -505,7 +541,8 @@ struct produce { try { - *pValue = detach(this->shim().PositionSource()); + typename D::abi_guard guard(this->shim()); + *pValue = detach_abi(this->shim().PositionSource()); return S_OK; } catch (...) @@ -514,11 +551,12 @@ struct produce } } - HRESULT __stdcall get_SatelliteData(abi_arg_out ppValue) noexcept override + HRESULT __stdcall get_SatelliteData(impl::abi_arg_out ppValue) noexcept override { try { - *ppValue = detach(this->shim().SatelliteData()); + typename D::abi_guard guard(this->shim()); + *ppValue = detach_abi(this->shim().SatelliteData()); return S_OK; } catch (...) @@ -532,11 +570,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_PositionSourceTimestamp(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PositionSourceTimestamp(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PositionSourceTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionSourceTimestamp()); return S_OK; } catch (...) @@ -554,7 +593,8 @@ struct produce : produce_baseshim().DesiredAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredAccuracy()); return S_OK; } catch (...) @@ -567,6 +607,7 @@ struct produce : produce_baseshim()); this->shim().DesiredAccuracy(value); return S_OK; } @@ -580,7 +621,8 @@ struct produce : produce_baseshim().MovementThreshold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MovementThreshold()); return S_OK; } catch (...) @@ -593,6 +635,7 @@ struct produce : produce_baseshim()); this->shim().MovementThreshold(value); return S_OK; } @@ -606,7 +649,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -619,6 +663,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -632,7 +677,8 @@ struct produce : produce_baseshim().LocationStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationStatus()); return S_OK; } catch (...) @@ -641,11 +687,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_GetGeopositionAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetGeopositionAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetGeopositionAsync()); return S_OK; } catch (...) @@ -655,11 +702,12 @@ struct produce : produce_base maximumAge, abi_arg_in timeout, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetGeopositionAsyncWithAgeAndTimeout(impl::abi_arg_in maximumAge, impl::abi_arg_in timeout, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetGeopositionAsync(*reinterpret_cast(&maximumAge), *reinterpret_cast(&timeout))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetGeopositionAsync(*reinterpret_cast(&maximumAge), *reinterpret_cast(&timeout))); return S_OK; } catch (...) @@ -669,11 +717,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PositionChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PositionChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PositionChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -686,6 +735,7 @@ struct produce : produce_baseshim()); this->shim().PositionChanged(token); return S_OK; } @@ -695,11 +745,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -712,6 +763,7 @@ struct produce : produce_baseshim()); this->shim().StatusChanged(token); return S_OK; } @@ -729,6 +781,7 @@ struct produce : produce_baseshim()); this->shim().AllowFallbackToConsentlessPositions(); return S_OK; } @@ -742,11 +795,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -756,11 +810,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetGeopositionHistoryAsync(abi_arg_in startTime, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetGeopositionHistoryAsync(impl::abi_arg_in startTime, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetGeopositionHistoryAsync(*reinterpret_cast(&startTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetGeopositionHistoryAsync(*reinterpret_cast(&startTime))); return S_OK; } catch (...) @@ -770,11 +825,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetGeopositionHistoryWithDurationAsync(abi_arg_in startTime, abi_arg_in duration, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetGeopositionHistoryWithDurationAsync(impl::abi_arg_in startTime, impl::abi_arg_in duration, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetGeopositionHistoryAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetGeopositionHistoryAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -792,7 +848,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsDefaultGeopositionRecommended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDefaultGeopositionRecommended()); return S_OK; } catch (...) @@ -801,10 +858,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_DefaultGeoposition(abi_arg_in> value) noexcept override + HRESULT __stdcall put_DefaultGeoposition(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultGeoposition(*reinterpret_cast *>(&value)); return S_OK; } @@ -814,11 +872,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DefaultGeoposition(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DefaultGeoposition(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DefaultGeoposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultGeoposition()); return S_OK; } catch (...) @@ -832,11 +891,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_DesiredAccuracyInMeters(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredAccuracyInMeters(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredAccuracyInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredAccuracyInMeters()); return S_OK; } catch (...) @@ -846,10 +906,11 @@ struct produce } } - HRESULT __stdcall put_DesiredAccuracyInMeters(abi_arg_in> value) noexcept override + HRESULT __stdcall put_DesiredAccuracyInMeters(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredAccuracyInMeters(*reinterpret_cast *>(&value)); return S_OK; } @@ -863,11 +924,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Positions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Positions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Positions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Positions()); return S_OK; } catch (...) @@ -881,11 +943,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> positions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> positions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast *>(&positions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast *>(&positions))); return S_OK; } catch (...) @@ -895,11 +958,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateWithAltitudeReference(abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReference(impl::abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReference(*reinterpret_cast *>(&positions), altitudeReferenceSystem)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReference(*reinterpret_cast *>(&positions), altitudeReferenceSystem)); return S_OK; } catch (...) @@ -909,11 +973,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceAndSpatialReference(abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceAndSpatialReference(impl::abi_arg_in> positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceAndSpatialReference(*reinterpret_cast *>(&positions), altitudeReferenceSystem, spatialReferenceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceAndSpatialReference(*reinterpret_cast *>(&positions), altitudeReferenceSystem, spatialReferenceId)); return S_OK; } catch (...) @@ -927,11 +992,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -944,11 +1010,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in position, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in position, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&position))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&position))); return S_OK; } catch (...) @@ -958,11 +1025,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceSystem(abi_arg_in position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceSystem(impl::abi_arg_in position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceSystem(*reinterpret_cast(&position), altitudeReferenceSystem)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceSystem(*reinterpret_cast(&position), altitudeReferenceSystem)); return S_OK; } catch (...) @@ -972,11 +1040,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(abi_arg_in position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(impl::abi_arg_in position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAltitudeReferenceSystemAndSpatialReferenceId(*reinterpret_cast(&position), altitudeReferenceSystem, spatialReferenceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAltitudeReferenceSystemAndSpatialReferenceId(*reinterpret_cast(&position), altitudeReferenceSystem, spatialReferenceId)); return S_OK; } catch (...) @@ -990,11 +1059,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Coordinate(abi_arg_out value) noexcept override + HRESULT __stdcall get_Coordinate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Coordinate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Coordinate()); return S_OK; } catch (...) @@ -1004,11 +1074,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CivicAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CivicAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CivicAddress()); return S_OK; } catch (...) @@ -1022,11 +1093,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_VenueData(abi_arg_out value) noexcept override + HRESULT __stdcall get_VenueData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VenueData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VenueData()); return S_OK; } catch (...) @@ -1044,7 +1116,8 @@ struct produce : produce_baseshim().GeoshapeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeoshapeType()); return S_OK; } catch (...) @@ -1057,7 +1130,8 @@ struct produce : produce_baseshim().SpatialReferenceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpatialReferenceId()); return S_OK; } catch (...) @@ -1070,7 +1144,8 @@ struct produce : produce_baseshim().AltitudeReferenceSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AltitudeReferenceSystem()); return S_OK; } catch (...) @@ -1083,11 +1158,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1105,7 +1181,8 @@ struct produce : prod { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1118,11 +1195,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1132,11 +1210,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Level(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Level()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Level()); return S_OK; } catch (...) @@ -1154,407 +1233,407 @@ namespace Windows::Devices::Geolocation { template Windows::Devices::Geolocation::GeoshapeType impl_IGeoshape::GeoshapeType() const { Windows::Devices::Geolocation::GeoshapeType value {}; - check_hresult(static_cast(static_cast(*this))->get_GeoshapeType(&value)); + check_hresult(WINRT_SHIM(IGeoshape)->get_GeoshapeType(&value)); return value; } template uint32_t impl_IGeoshape::SpatialReferenceId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SpatialReferenceId(&value)); + check_hresult(WINRT_SHIM(IGeoshape)->get_SpatialReferenceId(&value)); return value; } template Windows::Devices::Geolocation::AltitudeReferenceSystem impl_IGeoshape::AltitudeReferenceSystem() const { Windows::Devices::Geolocation::AltitudeReferenceSystem value {}; - check_hresult(static_cast(static_cast(*this))->get_AltitudeReferenceSystem(&value)); + check_hresult(WINRT_SHIM(IGeoshape)->get_AltitudeReferenceSystem(&value)); return value; } template Windows::Devices::Geolocation::BasicGeoposition impl_IGeopoint::Position() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IGeopoint)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IGeopointFactory::Create(const Windows::Devices::Geolocation::BasicGeoposition & position) const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(position), put(value))); + check_hresult(WINRT_SHIM(IGeopointFactory)->abi_Create(get_abi(position), put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IGeopointFactory::CreateWithAltitudeReferenceSystem(const Windows::Devices::Geolocation::BasicGeoposition & position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceSystem(get(position), altitudeReferenceSystem, put(value))); + check_hresult(WINRT_SHIM(IGeopointFactory)->abi_CreateWithAltitudeReferenceSystem(get_abi(position), altitudeReferenceSystem, put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IGeopointFactory::CreateWithAltitudeReferenceSystemAndSpatialReferenceId(const Windows::Devices::Geolocation::BasicGeoposition & position, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(get(position), altitudeReferenceSystem, spatialReferenceId, put(value))); + check_hresult(WINRT_SHIM(IGeopointFactory)->abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(get_abi(position), altitudeReferenceSystem, spatialReferenceId, put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGeopath::Positions() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Positions(put(value))); + check_hresult(WINRT_SHIM(IGeopath)->get_Positions(put_abi(value))); return value; } -template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::Create(const Windows::Foundation::Collections::IIterable & positions) const +template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::Create(iterable positions) const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(positions), put(value))); + check_hresult(WINRT_SHIM(IGeopathFactory)->abi_Create(get_abi(positions), put_abi(value))); return value; } -template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::CreateWithAltitudeReference(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) const +template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::CreateWithAltitudeReference(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReference(get(positions), altitudeReferenceSystem, put(value))); + check_hresult(WINRT_SHIM(IGeopathFactory)->abi_CreateWithAltitudeReference(get_abi(positions), altitudeReferenceSystem, put_abi(value))); return value; } -template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::CreateWithAltitudeReferenceAndSpatialReference(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) const +template Windows::Devices::Geolocation::Geopath impl_IGeopathFactory::CreateWithAltitudeReferenceAndSpatialReference(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceAndSpatialReference(get(positions), altitudeReferenceSystem, spatialReferenceId, put(value))); + check_hresult(WINRT_SHIM(IGeopathFactory)->abi_CreateWithAltitudeReferenceAndSpatialReference(get_abi(positions), altitudeReferenceSystem, spatialReferenceId, put_abi(value))); return value; } template Windows::Devices::Geolocation::BasicGeoposition impl_IGeoboundingBox::NorthwestCorner() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_NorthwestCorner(put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBox)->get_NorthwestCorner(put_abi(value))); return value; } template Windows::Devices::Geolocation::BasicGeoposition impl_IGeoboundingBox::SoutheastCorner() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_SoutheastCorner(put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBox)->get_SoutheastCorner(put_abi(value))); return value; } template Windows::Devices::Geolocation::BasicGeoposition impl_IGeoboundingBox::Center() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_Center(put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBox)->get_Center(put_abi(value))); return value; } template double impl_IGeoboundingBox::MinAltitude() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinAltitude(&value)); + check_hresult(WINRT_SHIM(IGeoboundingBox)->get_MinAltitude(&value)); return value; } template double impl_IGeoboundingBox::MaxAltitude() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAltitude(&value)); + check_hresult(WINRT_SHIM(IGeoboundingBox)->get_MaxAltitude(&value)); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxFactory::Create(const Windows::Devices::Geolocation::BasicGeoposition & northwestCorner, const Windows::Devices::Geolocation::BasicGeoposition & southeastCorner) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(northwestCorner), get(southeastCorner), put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxFactory)->abi_Create(get_abi(northwestCorner), get_abi(southeastCorner), put_abi(value))); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxFactory::CreateWithAltitudeReference(const Windows::Devices::Geolocation::BasicGeoposition & northwestCorner, const Windows::Devices::Geolocation::BasicGeoposition & southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReference(get(northwestCorner), get(southeastCorner), altitudeReferenceSystem, put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxFactory)->abi_CreateWithAltitudeReference(get_abi(northwestCorner), get_abi(southeastCorner), altitudeReferenceSystem, put_abi(value))); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxFactory::CreateWithAltitudeReferenceAndSpatialReference(const Windows::Devices::Geolocation::BasicGeoposition & northwestCorner, const Windows::Devices::Geolocation::BasicGeoposition & southeastCorner, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceAndSpatialReference(get(northwestCorner), get(southeastCorner), altitudeReferenceSystem, spatialReferenceId, put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxFactory)->abi_CreateWithAltitudeReferenceAndSpatialReference(get_abi(northwestCorner), get_abi(southeastCorner), altitudeReferenceSystem, spatialReferenceId, put_abi(value))); return value; } -template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(const Windows::Foundation::Collections::IIterable & positions) const +template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(iterable positions) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCompute(get(positions), put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxStatics)->abi_TryCompute(get_abi(positions), put_abi(value))); return value; } -template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem) const +template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryComputeWithAltitudeReference(get(positions), altitudeRefSystem, put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxStatics)->abi_TryComputeWithAltitudeReference(get_abi(positions), altitudeRefSystem, put_abi(value))); return value; } -template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId) const +template Windows::Devices::Geolocation::GeoboundingBox impl_IGeoboundingBoxStatics::TryCompute(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId) const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryComputeWithAltitudeReferenceAndSpatialReference(get(positions), altitudeRefSystem, spatialReferenceId, put(value))); + check_hresult(WINRT_SHIM(IGeoboundingBoxStatics)->abi_TryComputeWithAltitudeReferenceAndSpatialReference(get_abi(positions), altitudeRefSystem, spatialReferenceId, put_abi(value))); return value; } template Windows::Foundation::IReference impl_IGeocoordinateSatelliteData::PositionDilutionOfPrecision() const { Windows::Foundation::IReference ppValue; - check_hresult(static_cast(static_cast(*this))->get_PositionDilutionOfPrecision(put(ppValue))); + check_hresult(WINRT_SHIM(IGeocoordinateSatelliteData)->get_PositionDilutionOfPrecision(put_abi(ppValue))); return ppValue; } template Windows::Foundation::IReference impl_IGeocoordinateSatelliteData::HorizontalDilutionOfPrecision() const { Windows::Foundation::IReference ppValue; - check_hresult(static_cast(static_cast(*this))->get_HorizontalDilutionOfPrecision(put(ppValue))); + check_hresult(WINRT_SHIM(IGeocoordinateSatelliteData)->get_HorizontalDilutionOfPrecision(put_abi(ppValue))); return ppValue; } template Windows::Foundation::IReference impl_IGeocoordinateSatelliteData::VerticalDilutionOfPrecision() const { Windows::Foundation::IReference ppValue; - check_hresult(static_cast(static_cast(*this))->get_VerticalDilutionOfPrecision(put(ppValue))); + check_hresult(WINRT_SHIM(IGeocoordinateSatelliteData)->get_VerticalDilutionOfPrecision(put_abi(ppValue))); return ppValue; } template hstring impl_IVenueData::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IVenueData)->get_Id(put_abi(value))); return value; } template hstring impl_IVenueData::Level() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Level(put(value))); + check_hresult(WINRT_SHIM(IVenueData)->get_Level(put_abi(value))); return value; } template double impl_IGeocoordinate::Latitude() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Latitude(&value)); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Latitude(&value)); return value; } template double impl_IGeocoordinate::Longitude() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Longitude(&value)); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Longitude(&value)); return value; } template Windows::Foundation::IReference impl_IGeocoordinate::Altitude() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Altitude(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Altitude(put_abi(value))); return value; } template double impl_IGeocoordinate::Accuracy() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Accuracy(&value)); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Accuracy(&value)); return value; } template Windows::Foundation::IReference impl_IGeocoordinate::AltitudeAccuracy() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AltitudeAccuracy(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_AltitudeAccuracy(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IGeocoordinate::Heading() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Heading(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Heading(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IGeocoordinate::Speed() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Speed(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Speed(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IGeocoordinate::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinate)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Geolocation::PositionSource impl_IGeocoordinateWithPositionData::PositionSource() const { Windows::Devices::Geolocation::PositionSource pValue {}; - check_hresult(static_cast(static_cast(*this))->get_PositionSource(&pValue)); + check_hresult(WINRT_SHIM(IGeocoordinateWithPositionData)->get_PositionSource(&pValue)); return pValue; } template Windows::Devices::Geolocation::GeocoordinateSatelliteData impl_IGeocoordinateWithPositionData::SatelliteData() const { Windows::Devices::Geolocation::GeocoordinateSatelliteData ppValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SatelliteData(put(ppValue))); + check_hresult(WINRT_SHIM(IGeocoordinateWithPositionData)->get_SatelliteData(put_abi(ppValue))); return ppValue; } template Windows::Devices::Geolocation::Geopoint impl_IGeocoordinateWithPoint::Point() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Point(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinateWithPoint)->get_Point(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IGeocoordinateWithPositionSourceTimestamp::PositionSourceTimestamp() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PositionSourceTimestamp(put(value))); + check_hresult(WINRT_SHIM(IGeocoordinateWithPositionSourceTimestamp)->get_PositionSourceTimestamp(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geocoordinate impl_IGeoposition::Coordinate() const { Windows::Devices::Geolocation::Geocoordinate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Coordinate(put(value))); + check_hresult(WINRT_SHIM(IGeoposition)->get_Coordinate(put_abi(value))); return value; } template Windows::Devices::Geolocation::CivicAddress impl_IGeoposition::CivicAddress() const { Windows::Devices::Geolocation::CivicAddress value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CivicAddress(put(value))); + check_hresult(WINRT_SHIM(IGeoposition)->get_CivicAddress(put_abi(value))); return value; } template Windows::Devices::Geolocation::VenueData impl_IGeoposition2::VenueData() const { Windows::Devices::Geolocation::VenueData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VenueData(put(value))); + check_hresult(WINRT_SHIM(IGeoposition2)->get_VenueData(put_abi(value))); return value; } template hstring impl_ICivicAddress::Country() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Country(put(value))); + check_hresult(WINRT_SHIM(ICivicAddress)->get_Country(put_abi(value))); return value; } template hstring impl_ICivicAddress::State() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_State(put(value))); + check_hresult(WINRT_SHIM(ICivicAddress)->get_State(put_abi(value))); return value; } template hstring impl_ICivicAddress::City() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_City(put(value))); + check_hresult(WINRT_SHIM(ICivicAddress)->get_City(put_abi(value))); return value; } template hstring impl_ICivicAddress::PostalCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostalCode(put(value))); + check_hresult(WINRT_SHIM(ICivicAddress)->get_PostalCode(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ICivicAddress::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ICivicAddress)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geoposition impl_IPositionChangedEventArgs::Position() const { Windows::Devices::Geolocation::Geoposition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IPositionChangedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::PositionStatus impl_IStatusChangedEventArgs::Status() const { Windows::Devices::Geolocation::PositionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IStatusChangedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::Geolocation::PositionAccuracy impl_IGeolocator::DesiredAccuracy() const { Windows::Devices::Geolocation::PositionAccuracy value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredAccuracy(&value)); + check_hresult(WINRT_SHIM(IGeolocator)->get_DesiredAccuracy(&value)); return value; } template void impl_IGeolocator::DesiredAccuracy(Windows::Devices::Geolocation::PositionAccuracy value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredAccuracy(value)); + check_hresult(WINRT_SHIM(IGeolocator)->put_DesiredAccuracy(value)); } template double impl_IGeolocator::MovementThreshold() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MovementThreshold(&value)); + check_hresult(WINRT_SHIM(IGeolocator)->get_MovementThreshold(&value)); return value; } template void impl_IGeolocator::MovementThreshold(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MovementThreshold(value)); + check_hresult(WINRT_SHIM(IGeolocator)->put_MovementThreshold(value)); } template uint32_t impl_IGeolocator::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IGeolocator)->get_ReportInterval(&value)); return value; } template void impl_IGeolocator::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IGeolocator)->put_ReportInterval(value)); } template Windows::Devices::Geolocation::PositionStatus impl_IGeolocator::LocationStatus() const { Windows::Devices::Geolocation::PositionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_LocationStatus(&value)); + check_hresult(WINRT_SHIM(IGeolocator)->get_LocationStatus(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IGeolocator::GetGeopositionAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetGeopositionAsync(put(value))); + check_hresult(WINRT_SHIM(IGeolocator)->abi_GetGeopositionAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGeolocator::GetGeopositionAsync(const Windows::Foundation::TimeSpan & maximumAge, const Windows::Foundation::TimeSpan & timeout) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetGeopositionAsyncWithAgeAndTimeout(get(maximumAge), get(timeout), put(value))); + check_hresult(WINRT_SHIM(IGeolocator)->abi_GetGeopositionAsyncWithAgeAndTimeout(get_abi(maximumAge), get_abi(timeout), put_abi(value))); return value; } template event_token impl_IGeolocator::PositionChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PositionChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGeolocator)->add_PositionChanged(get_abi(handler), &token)); return token; } @@ -1565,13 +1644,13 @@ template event_revoker impl_IGeolocator::PositionCh template void impl_IGeolocator::PositionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PositionChanged(token)); + check_hresult(WINRT_SHIM(IGeolocator)->remove_PositionChanged(token)); } template event_token impl_IGeolocator::StatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGeolocator)->add_StatusChanged(get_abi(handler), &token)); return token; } @@ -1582,98 +1661,98 @@ template event_revoker impl_IGeolocator::StatusChan template void impl_IGeolocator::StatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusChanged(token)); + check_hresult(WINRT_SHIM(IGeolocator)->remove_StatusChanged(token)); } template Windows::Foundation::IReference impl_IGeolocatorWithScalarAccuracy::DesiredAccuracyInMeters() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DesiredAccuracyInMeters(put(value))); + check_hresult(WINRT_SHIM(IGeolocatorWithScalarAccuracy)->get_DesiredAccuracyInMeters(put_abi(value))); return value; } -template void impl_IGeolocatorWithScalarAccuracy::DesiredAccuracyInMeters(const Windows::Foundation::IReference & value) const +template void impl_IGeolocatorWithScalarAccuracy::DesiredAccuracyInMeters(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredAccuracyInMeters(get(value))); + check_hresult(WINRT_SHIM(IGeolocatorWithScalarAccuracy)->put_DesiredAccuracyInMeters(get_abi(value))); } template void impl_IGeolocator2::AllowFallbackToConsentlessPositions() const { - check_hresult(static_cast(static_cast(*this))->abi_AllowFallbackToConsentlessPositions()); + check_hresult(WINRT_SHIM(IGeolocator2)->abi_AllowFallbackToConsentlessPositions()); } template Windows::Foundation::IAsyncOperation impl_IGeolocatorStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(IGeolocatorStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IGeolocatorStatics::GetGeopositionHistoryAsync(const Windows::Foundation::DateTime & startTime) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetGeopositionHistoryAsync(get(startTime), put(result))); + check_hresult(WINRT_SHIM(IGeolocatorStatics)->abi_GetGeopositionHistoryAsync(get_abi(startTime), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IGeolocatorStatics::GetGeopositionHistoryAsync(const Windows::Foundation::DateTime & startTime, const Windows::Foundation::TimeSpan & duration) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetGeopositionHistoryWithDurationAsync(get(startTime), get(duration), put(result))); + check_hresult(WINRT_SHIM(IGeolocatorStatics)->abi_GetGeopositionHistoryWithDurationAsync(get_abi(startTime), get_abi(duration), put_abi(result))); return result; } template bool impl_IGeolocatorStatics2::IsDefaultGeopositionRecommended() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDefaultGeopositionRecommended(&value)); + check_hresult(WINRT_SHIM(IGeolocatorStatics2)->get_IsDefaultGeopositionRecommended(&value)); return value; } -template void impl_IGeolocatorStatics2::DefaultGeoposition(const Windows::Foundation::IReference & value) const +template void impl_IGeolocatorStatics2::DefaultGeoposition(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultGeoposition(get(value))); + check_hresult(WINRT_SHIM(IGeolocatorStatics2)->put_DefaultGeoposition(get_abi(value))); } template Windows::Foundation::IReference impl_IGeolocatorStatics2::DefaultGeoposition() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DefaultGeoposition(put(value))); + check_hresult(WINRT_SHIM(IGeolocatorStatics2)->get_DefaultGeoposition(put_abi(value))); return value; } template Windows::Devices::Geolocation::BasicGeoposition impl_IGeocircle::Center() const { Windows::Devices::Geolocation::BasicGeoposition value {}; - check_hresult(static_cast(static_cast(*this))->get_Center(put(value))); + check_hresult(WINRT_SHIM(IGeocircle)->get_Center(put_abi(value))); return value; } template double impl_IGeocircle::Radius() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Radius(&value)); + check_hresult(WINRT_SHIM(IGeocircle)->get_Radius(&value)); return value; } template Windows::Devices::Geolocation::Geocircle impl_IGeocircleFactory::Create(const Windows::Devices::Geolocation::BasicGeoposition & position, double radius) const { Windows::Devices::Geolocation::Geocircle value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(position), radius, put(value))); + check_hresult(WINRT_SHIM(IGeocircleFactory)->abi_Create(get_abi(position), radius, put_abi(value))); return value; } template Windows::Devices::Geolocation::Geocircle impl_IGeocircleFactory::CreateWithAltitudeReferenceSystem(const Windows::Devices::Geolocation::BasicGeoposition & position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) const { Windows::Devices::Geolocation::Geocircle value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceSystem(get(position), radius, altitudeReferenceSystem, put(value))); + check_hresult(WINRT_SHIM(IGeocircleFactory)->abi_CreateWithAltitudeReferenceSystem(get_abi(position), radius, altitudeReferenceSystem, put_abi(value))); return value; } template Windows::Devices::Geolocation::Geocircle impl_IGeocircleFactory::CreateWithAltitudeReferenceSystemAndSpatialReferenceId(const Windows::Devices::Geolocation::BasicGeoposition & position, double radius, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) const { Windows::Devices::Geolocation::Geocircle value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(get(position), radius, altitudeReferenceSystem, spatialReferenceId, put(value))); + check_hresult(WINRT_SHIM(IGeocircleFactory)->abi_CreateWithAltitudeReferenceSystemAndSpatialReferenceId(get_abi(position), radius, altitudeReferenceSystem, spatialReferenceId, put_abi(value))); return value; } @@ -1689,17 +1768,17 @@ inline GeoboundingBox::GeoboundingBox(const Windows::Devices::Geolocation::Basic GeoboundingBox(get_activation_factory().CreateWithAltitudeReferenceAndSpatialReference(northwestCorner, southeastCorner, altitudeReferenceSystem, spatialReferenceId)) {} -inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(const Windows::Foundation::Collections::IIterable & positions) +inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(iterable positions) { return get_activation_factory().TryCompute(positions); } -inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem) +inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem) { return get_activation_factory().TryCompute(positions, altitudeRefSystem); } -inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId) +inline Windows::Devices::Geolocation::GeoboundingBox GeoboundingBox::TryCompute(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeRefSystem, uint32_t spatialReferenceId) { return get_activation_factory().TryCompute(positions, altitudeRefSystem, spatialReferenceId); } @@ -1740,7 +1819,7 @@ inline bool Geolocator::IsDefaultGeopositionRecommended() return get_activation_factory().IsDefaultGeopositionRecommended(); } -inline void Geolocator::DefaultGeoposition(const Windows::Foundation::IReference & value) +inline void Geolocator::DefaultGeoposition(const optional & value) { get_activation_factory().DefaultGeoposition(value); } @@ -1750,15 +1829,15 @@ inline Windows::Foundation::IReference().DefaultGeoposition(); } -inline Geopath::Geopath(const Windows::Foundation::Collections::IIterable & positions) : +inline Geopath::Geopath(iterable positions) : Geopath(get_activation_factory().Create(positions)) {} -inline Geopath::Geopath(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) : +inline Geopath::Geopath(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem) : Geopath(get_activation_factory().CreateWithAltitudeReference(positions, altitudeReferenceSystem)) {} -inline Geopath::Geopath(const Windows::Foundation::Collections::IIterable & positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) : +inline Geopath::Geopath(iterable positions, Windows::Devices::Geolocation::AltitudeReferenceSystem altitudeReferenceSystem, uint32_t spatialReferenceId) : Geopath(get_activation_factory().CreateWithAltitudeReferenceAndSpatialReference(positions, altitudeReferenceSystem, spatialReferenceId)) {} @@ -1777,3 +1856,347 @@ inline Geopoint::Geopoint(const Windows::Devices::Geolocation::BasicGeoposition } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::ICivicAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoboundingBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoboundingBoxFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoboundingBoxStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocircle & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocircleFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocoordinate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocoordinateSatelliteData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocoordinateWithPoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocoordinateWithPositionData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeocoordinateWithPositionSourceTimestamp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeolocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeolocator2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeolocatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeolocatorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeolocatorWithScalarAccuracy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeopath & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeopathFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeopoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeopointFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoposition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoposition2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IGeoshape & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IPositionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::IVenueData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::CivicAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::GeoboundingBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geocircle & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geocoordinate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::GeocoordinateSatelliteData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geolocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geopath & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geopoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::Geoposition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::PositionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::StatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Geolocation::VenueData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Gpio.Provider.h b/10.0.14393.0/winrt/Windows.Devices.Gpio.Provider.h index f0c297f95..e62cd419a 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Gpio.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.Gpio.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Gpio.Provider.3.h" @@ -19,7 +22,8 @@ struct produce : p { try { - *value = detach(this->shim().PinCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinCount()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : p } } - HRESULT __stdcall abi_OpenPinProvider(int32_t pin, Windows::Devices::Gpio::Provider::ProviderGpioSharingMode sharingMode, abi_arg_out gpioPinProvider) noexcept override + HRESULT __stdcall abi_OpenPinProvider(int32_t pin, Windows::Devices::Gpio::Provider::ProviderGpioSharingMode sharingMode, impl::abi_arg_out gpioPinProvider) noexcept override { try { - *gpioPinProvider = detach(this->shim().OpenPinProvider(pin, sharingMode)); + typename D::abi_guard guard(this->shim()); + *gpioPinProvider = detach_abi(this->shim().OpenPinProvider(pin, sharingMode)); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall add_ValueChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ValueChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ValueChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ValueChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -63,6 +69,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().ValueChanged(token); return S_OK; } @@ -72,11 +79,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DebounceTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_DebounceTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DebounceTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DebounceTimeout()); return S_OK; } catch (...) @@ -85,10 +93,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_DebounceTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_DebounceTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DebounceTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -102,7 +111,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().PinNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinNumber()); return S_OK; } catch (...) @@ -115,7 +125,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -128,7 +139,8 @@ struct produce : produce_ { try { - *supported = detach(this->shim().IsDriveModeSupported(driveMode)); + typename D::abi_guard guard(this->shim()); + *supported = detach_abi(this->shim().IsDriveModeSupported(driveMode)); return S_OK; } catch (...) @@ -141,7 +153,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().GetDriveMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDriveMode()); return S_OK; } catch (...) @@ -154,6 +167,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDriveMode(value); return S_OK; } @@ -167,6 +181,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Write(value); return S_OK; } @@ -180,7 +195,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Read()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Read()); return S_OK; } catch (...) @@ -197,7 +213,8 @@ struct produceshim().Edge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Edge()); return S_OK; } catch (...) @@ -210,11 +227,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Devices::Gpio::Provider::ProviderGpioPinEdge edge, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(Windows::Devices::Gpio::Provider::ProviderGpioPinEdge edge, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(edge)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(edge)); return S_OK; } catch (...) @@ -228,11 +246,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetControllers(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetControllers(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetControllers()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetControllers()); return S_OK; } catch (...) @@ -250,21 +269,21 @@ namespace Windows::Devices::Gpio::Provider { template Windows::Devices::Gpio::Provider::GpioPinProviderValueChangedEventArgs impl_IGpioPinProviderValueChangedEventArgsFactory::Create(Windows::Devices::Gpio::Provider::ProviderGpioPinEdge edge) const { Windows::Devices::Gpio::Provider::GpioPinProviderValueChangedEventArgs value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(edge, put(value))); + check_hresult(WINRT_SHIM(IGpioPinProviderValueChangedEventArgsFactory)->abi_Create(edge, put_abi(value))); return value; } template Windows::Devices::Gpio::Provider::ProviderGpioPinEdge impl_IGpioPinProviderValueChangedEventArgs::Edge() const { Windows::Devices::Gpio::Provider::ProviderGpioPinEdge value {}; - check_hresult(static_cast(static_cast(*this))->get_Edge(&value)); + check_hresult(WINRT_SHIM(IGpioPinProviderValueChangedEventArgs)->get_Edge(&value)); return value; } template event_token impl_IGpioPinProvider::ValueChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ValueChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->add_ValueChanged(get_abi(handler), &token)); return token; } @@ -275,84 +294,84 @@ template event_revoker impl_IGpioPinProvider:: template void impl_IGpioPinProvider::ValueChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ValueChanged(token)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->remove_ValueChanged(token)); } template Windows::Foundation::TimeSpan impl_IGpioPinProvider::DebounceTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DebounceTimeout(put(value))); + check_hresult(WINRT_SHIM(IGpioPinProvider)->get_DebounceTimeout(put_abi(value))); return value; } template void impl_IGpioPinProvider::DebounceTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DebounceTimeout(get(value))); + check_hresult(WINRT_SHIM(IGpioPinProvider)->put_DebounceTimeout(get_abi(value))); } template int32_t impl_IGpioPinProvider::PinNumber() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinNumber(&value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->get_PinNumber(&value)); return value; } template Windows::Devices::Gpio::Provider::ProviderGpioSharingMode impl_IGpioPinProvider::SharingMode() const { Windows::Devices::Gpio::Provider::ProviderGpioSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->get_SharingMode(&value)); return value; } template bool impl_IGpioPinProvider::IsDriveModeSupported(Windows::Devices::Gpio::Provider::ProviderGpioPinDriveMode driveMode) const { bool supported {}; - check_hresult(static_cast(static_cast(*this))->abi_IsDriveModeSupported(driveMode, &supported)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->abi_IsDriveModeSupported(driveMode, &supported)); return supported; } template Windows::Devices::Gpio::Provider::ProviderGpioPinDriveMode impl_IGpioPinProvider::GetDriveMode() const { Windows::Devices::Gpio::Provider::ProviderGpioPinDriveMode value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDriveMode(&value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->abi_GetDriveMode(&value)); return value; } template void impl_IGpioPinProvider::SetDriveMode(Windows::Devices::Gpio::Provider::ProviderGpioPinDriveMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDriveMode(value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->abi_SetDriveMode(value)); } template void impl_IGpioPinProvider::Write(Windows::Devices::Gpio::Provider::ProviderGpioPinValue value) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->abi_Write(value)); } template Windows::Devices::Gpio::Provider::ProviderGpioPinValue impl_IGpioPinProvider::Read() const { Windows::Devices::Gpio::Provider::ProviderGpioPinValue value {}; - check_hresult(static_cast(static_cast(*this))->abi_Read(&value)); + check_hresult(WINRT_SHIM(IGpioPinProvider)->abi_Read(&value)); return value; } template int32_t impl_IGpioControllerProvider::PinCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinCount(&value)); + check_hresult(WINRT_SHIM(IGpioControllerProvider)->get_PinCount(&value)); return value; } template Windows::Devices::Gpio::Provider::IGpioPinProvider impl_IGpioControllerProvider::OpenPinProvider(int32_t pin, Windows::Devices::Gpio::Provider::ProviderGpioSharingMode sharingMode) const { Windows::Devices::Gpio::Provider::IGpioPinProvider gpioPinProvider; - check_hresult(static_cast(static_cast(*this))->abi_OpenPinProvider(pin, sharingMode, put(gpioPinProvider))); + check_hresult(WINRT_SHIM(IGpioControllerProvider)->abi_OpenPinProvider(pin, sharingMode, put_abi(gpioPinProvider))); return gpioPinProvider; } template Windows::Foundation::Collections::IVectorView impl_IGpioProvider::GetControllers() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetControllers(put(result))); + check_hresult(WINRT_SHIM(IGpioProvider)->abi_GetControllers(put_abi(result))); return result; } @@ -363,3 +382,59 @@ inline GpioPinProviderValueChangedEventArgs::GpioPinProviderValueChangedEventArg } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::IGpioControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::IGpioPinProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::IGpioPinProviderValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::IGpioPinProviderValueChangedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::IGpioProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::Provider::GpioPinProviderValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Gpio.h b/10.0.14393.0/winrt/Windows.Devices.Gpio.h index e4e0b4c98..d1472406a 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Gpio.h +++ b/10.0.14393.0/winrt/Windows.Devices.Gpio.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Gpio.Provider.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Gpio.3.h" @@ -20,7 +23,8 @@ struct produce : produce_baseshim().PinCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinCount()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base pin) noexcept override + HRESULT __stdcall abi_OpenPin(int32_t pinNumber, impl::abi_arg_out pin) noexcept override { try { - *pin = detach(this->shim().OpenPin(pinNumber)); + typename D::abi_guard guard(this->shim()); + *pin = detach_abi(this->shim().OpenPin(pinNumber)); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base pin) noexcept override + HRESULT __stdcall abi_OpenPinWithSharingMode(int32_t pinNumber, Windows::Devices::Gpio::GpioSharingMode sharingMode, impl::abi_arg_out pin) noexcept override { try { - *pin = detach(this->shim().OpenPin(pinNumber, sharingMode)); + typename D::abi_guard guard(this->shim()); + *pin = detach_abi(this->shim().OpenPin(pinNumber, sharingMode)); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce : produce_base pin, Windows::Devices::Gpio::GpioOpenStatus * openStatus, bool * succeeded) noexcept override + HRESULT __stdcall abi_TryOpenPin(int32_t pinNumber, Windows::Devices::Gpio::GpioSharingMode sharingMode, impl::abi_arg_out pin, Windows::Devices::Gpio::GpioOpenStatus * openStatus, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TryOpenPin(pinNumber, sharingMode, *pin, *openStatus)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryOpenPin(pinNumber, sharingMode, *pin, *openStatus)); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -93,11 +101,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_in provider, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_in provider, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -107,11 +116,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -125,11 +135,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall add_ValueChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ValueChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ValueChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ValueChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -142,6 +153,7 @@ struct produce : produce_baseshim()); this->shim().ValueChanged(token); return S_OK; } @@ -151,11 +163,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DebounceTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DebounceTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DebounceTimeout()); return S_OK; } catch (...) @@ -164,10 +177,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DebounceTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DebounceTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -181,7 +195,8 @@ struct produce : produce_baseshim().PinNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinNumber()); return S_OK; } catch (...) @@ -194,7 +209,8 @@ struct produce : produce_baseshim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -207,7 +223,8 @@ struct produce : produce_baseshim().IsDriveModeSupported(driveMode)); + typename D::abi_guard guard(this->shim()); + *supported = detach_abi(this->shim().IsDriveModeSupported(driveMode)); return S_OK; } catch (...) @@ -220,7 +237,8 @@ struct produce : produce_baseshim().GetDriveMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDriveMode()); return S_OK; } catch (...) @@ -233,6 +251,7 @@ struct produce : produce_baseshim()); this->shim().SetDriveMode(value); return S_OK; } @@ -246,6 +265,7 @@ struct produce : produce_baseshim()); this->shim().Write(value); return S_OK; } @@ -259,7 +279,8 @@ struct produce : produce_baseshim().Read()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Read()); return S_OK; } catch (...) @@ -276,7 +297,8 @@ struct produce : produ { try { - *value = detach(this->shim().Edge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Edge()); return S_OK; } catch (...) @@ -293,63 +315,63 @@ namespace Windows::Devices::Gpio { template Windows::Devices::Gpio::GpioPinEdge impl_IGpioPinValueChangedEventArgs::Edge() const { Windows::Devices::Gpio::GpioPinEdge value {}; - check_hresult(static_cast(static_cast(*this))->get_Edge(&value)); + check_hresult(WINRT_SHIM(IGpioPinValueChangedEventArgs)->get_Edge(&value)); return value; } template int32_t impl_IGpioController::PinCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinCount(&value)); + check_hresult(WINRT_SHIM(IGpioController)->get_PinCount(&value)); return value; } template Windows::Devices::Gpio::GpioPin impl_IGpioController::OpenPin(int32_t pinNumber) const { Windows::Devices::Gpio::GpioPin pin { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenPin(pinNumber, put(pin))); + check_hresult(WINRT_SHIM(IGpioController)->abi_OpenPin(pinNumber, put_abi(pin))); return pin; } template Windows::Devices::Gpio::GpioPin impl_IGpioController::OpenPin(int32_t pinNumber, Windows::Devices::Gpio::GpioSharingMode sharingMode) const { Windows::Devices::Gpio::GpioPin pin { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenPinWithSharingMode(pinNumber, sharingMode, put(pin))); + check_hresult(WINRT_SHIM(IGpioController)->abi_OpenPinWithSharingMode(pinNumber, sharingMode, put_abi(pin))); return pin; } template bool impl_IGpioController::TryOpenPin(int32_t pinNumber, Windows::Devices::Gpio::GpioSharingMode sharingMode, Windows::Devices::Gpio::GpioPin & pin, Windows::Devices::Gpio::GpioOpenStatus & openStatus) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryOpenPin(pinNumber, sharingMode, put(pin), &openStatus, &succeeded)); + check_hresult(WINRT_SHIM(IGpioController)->abi_TryOpenPin(pinNumber, sharingMode, put_abi(pin), &openStatus, &succeeded)); return succeeded; } template Windows::Devices::Gpio::GpioController impl_IGpioControllerStatics::GetDefault() const { Windows::Devices::Gpio::GpioController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(value))); + check_hresult(WINRT_SHIM(IGpioControllerStatics)->abi_GetDefault(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IGpioControllerStatics2::GetControllersAsync(const Windows::Devices::Gpio::Provider::IGpioProvider & provider) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(get(provider), put(operation))); + check_hresult(WINRT_SHIM(IGpioControllerStatics2)->abi_GetControllersAsync(get_abi(provider), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IGpioControllerStatics2::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(IGpioControllerStatics2)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template event_token impl_IGpioPin::ValueChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ValueChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGpioPin)->add_ValueChanged(get_abi(handler), &token)); return token; } @@ -360,63 +382,63 @@ template event_revoker impl_IGpioPin::ValueChanged(aut template void impl_IGpioPin::ValueChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ValueChanged(token)); + check_hresult(WINRT_SHIM(IGpioPin)->remove_ValueChanged(token)); } template Windows::Foundation::TimeSpan impl_IGpioPin::DebounceTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DebounceTimeout(put(value))); + check_hresult(WINRT_SHIM(IGpioPin)->get_DebounceTimeout(put_abi(value))); return value; } template void impl_IGpioPin::DebounceTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DebounceTimeout(get(value))); + check_hresult(WINRT_SHIM(IGpioPin)->put_DebounceTimeout(get_abi(value))); } template int32_t impl_IGpioPin::PinNumber() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinNumber(&value)); + check_hresult(WINRT_SHIM(IGpioPin)->get_PinNumber(&value)); return value; } template Windows::Devices::Gpio::GpioSharingMode impl_IGpioPin::SharingMode() const { Windows::Devices::Gpio::GpioSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(IGpioPin)->get_SharingMode(&value)); return value; } template bool impl_IGpioPin::IsDriveModeSupported(Windows::Devices::Gpio::GpioPinDriveMode driveMode) const { bool supported {}; - check_hresult(static_cast(static_cast(*this))->abi_IsDriveModeSupported(driveMode, &supported)); + check_hresult(WINRT_SHIM(IGpioPin)->abi_IsDriveModeSupported(driveMode, &supported)); return supported; } template Windows::Devices::Gpio::GpioPinDriveMode impl_IGpioPin::GetDriveMode() const { Windows::Devices::Gpio::GpioPinDriveMode value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDriveMode(&value)); + check_hresult(WINRT_SHIM(IGpioPin)->abi_GetDriveMode(&value)); return value; } template void impl_IGpioPin::SetDriveMode(Windows::Devices::Gpio::GpioPinDriveMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDriveMode(value)); + check_hresult(WINRT_SHIM(IGpioPin)->abi_SetDriveMode(value)); } template void impl_IGpioPin::Write(Windows::Devices::Gpio::GpioPinValue value) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(value)); + check_hresult(WINRT_SHIM(IGpioPin)->abi_Write(value)); } template Windows::Devices::Gpio::GpioPinValue impl_IGpioPin::Read() const { Windows::Devices::Gpio::GpioPinValue value {}; - check_hresult(static_cast(static_cast(*this))->abi_Read(&value)); + check_hresult(WINRT_SHIM(IGpioPin)->abi_Read(&value)); return value; } @@ -438,3 +460,77 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::IGpioController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::IGpioControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::IGpioControllerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::IGpioPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::IGpioPinValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::GpioController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::GpioPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Gpio::GpioPinValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.HumanInterfaceDevice.h b/10.0.14393.0/winrt/Windows.Devices.HumanInterfaceDevice.h index 8b16a3200..4499ec93e 100644 --- a/10.0.14393.0/winrt/Windows.Devices.HumanInterfaceDevice.h +++ b/10.0.14393.0/winrt/Windows.Devices.HumanInterfaceDevice.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -22,7 +25,8 @@ struct produce : { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : { try { - *value = detach(this->shim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -48,7 +53,8 @@ struct produce : { try { - *value = detach(this->shim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -61,7 +67,8 @@ struct produce : { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -74,6 +81,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsActive(value); return S_OK; } @@ -83,11 +91,12 @@ struct produce : } } - HRESULT __stdcall get_ControlDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlDescription()); return S_OK; } catch (...) @@ -105,7 +114,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -118,7 +128,8 @@ struct produceshim().ReportId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportId()); return S_OK; } catch (...) @@ -131,7 +142,8 @@ struct produceshim().ReportType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportType()); return S_OK; } catch (...) @@ -144,7 +156,8 @@ struct produceshim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -157,7 +170,8 @@ struct produceshim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -166,11 +180,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ParentCollections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ParentCollections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentCollections()); return S_OK; } catch (...) @@ -188,7 +203,8 @@ struct produceshim().IsAbsolute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAbsolute()); return S_OK; } catch (...) @@ -205,7 +221,8 @@ struct produce : prod { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -218,7 +235,8 @@ struct produce : prod { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -231,7 +249,8 @@ struct produce : prod { try { - *value = detach(this->shim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -244,7 +263,8 @@ struct produce : prod { try { - *value = detach(this->shim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -261,7 +281,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().VendorId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VendorId()); return S_OK; } catch (...) @@ -274,7 +295,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -287,7 +309,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Version()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Version()); return S_OK; } catch (...) @@ -300,7 +323,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -313,7 +337,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -322,11 +347,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetInputReportAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetInputReportAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetInputReportAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetInputReportAsync()); return S_OK; } catch (...) @@ -336,11 +362,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetInputReportByIdAsync(uint16_t reportId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetInputReportByIdAsync(uint16_t reportId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetInputReportAsync(reportId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetInputReportAsync(reportId)); return S_OK; } catch (...) @@ -350,11 +377,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetFeatureReportAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetFeatureReportAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetFeatureReportAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFeatureReportAsync()); return S_OK; } catch (...) @@ -364,11 +392,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetFeatureReportByIdAsync(uint16_t reportId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetFeatureReportByIdAsync(uint16_t reportId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetFeatureReportAsync(reportId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFeatureReportAsync(reportId)); return S_OK; } catch (...) @@ -378,11 +407,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateOutputReport(abi_arg_out outputReport) noexcept override + HRESULT __stdcall abi_CreateOutputReport(impl::abi_arg_out outputReport) noexcept override { try { - *outputReport = detach(this->shim().CreateOutputReport()); + typename D::abi_guard guard(this->shim()); + *outputReport = detach_abi(this->shim().CreateOutputReport()); return S_OK; } catch (...) @@ -392,11 +422,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateOutputReportById(uint16_t reportId, abi_arg_out outputReport) noexcept override + HRESULT __stdcall abi_CreateOutputReportById(uint16_t reportId, impl::abi_arg_out outputReport) noexcept override { try { - *outputReport = detach(this->shim().CreateOutputReport(reportId)); + typename D::abi_guard guard(this->shim()); + *outputReport = detach_abi(this->shim().CreateOutputReport(reportId)); return S_OK; } catch (...) @@ -406,11 +437,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateFeatureReport(abi_arg_out featureReport) noexcept override + HRESULT __stdcall abi_CreateFeatureReport(impl::abi_arg_out featureReport) noexcept override { try { - *featureReport = detach(this->shim().CreateFeatureReport()); + typename D::abi_guard guard(this->shim()); + *featureReport = detach_abi(this->shim().CreateFeatureReport()); return S_OK; } catch (...) @@ -420,11 +452,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateFeatureReportById(uint16_t reportId, abi_arg_out featureReport) noexcept override + HRESULT __stdcall abi_CreateFeatureReportById(uint16_t reportId, impl::abi_arg_out featureReport) noexcept override { try { - *featureReport = detach(this->shim().CreateFeatureReport(reportId)); + typename D::abi_guard guard(this->shim()); + *featureReport = detach_abi(this->shim().CreateFeatureReport(reportId)); return S_OK; } catch (...) @@ -434,11 +467,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SendOutputReportAsync(abi_arg_in outputReport, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendOutputReportAsync(impl::abi_arg_in outputReport, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendOutputReportAsync(*reinterpret_cast(&outputReport))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendOutputReportAsync(*reinterpret_cast(&outputReport))); return S_OK; } catch (...) @@ -448,11 +482,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SendFeatureReportAsync(abi_arg_in featureReport, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendFeatureReportAsync(impl::abi_arg_in featureReport, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendFeatureReportAsync(*reinterpret_cast(&featureReport))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendFeatureReportAsync(*reinterpret_cast(&featureReport))); return S_OK; } catch (...) @@ -462,11 +497,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetBooleanControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetBooleanControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetBooleanControlDescriptions(reportType, usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControlDescriptions(reportType, usagePage, usageId)); return S_OK; } catch (...) @@ -476,11 +512,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetNumericControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetNumericControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetNumericControlDescriptions(reportType, usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControlDescriptions(reportType, usagePage, usageId)); return S_OK; } catch (...) @@ -490,11 +527,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_InputReportReceived(abi_arg_in> reportHandler, event_token * token) noexcept override + HRESULT __stdcall add_InputReportReceived(impl::abi_arg_in> reportHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().InputReportReceived(*reinterpret_cast *>(&reportHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().InputReportReceived(*reinterpret_cast *>(&reportHandler))); return S_OK; } catch (...) @@ -507,6 +545,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().InputReportReceived(token); return S_OK; } @@ -520,11 +559,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(uint16_t usagePage, uint16_t usageId, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(usagePage, usageId)); return S_OK; } catch (...) @@ -534,11 +574,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetDeviceSelectorVidPid(uint16_t usagePage, uint16_t usageId, uint16_t vendorId, uint16_t productId, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorVidPid(uint16_t usagePage, uint16_t usageId, uint16_t vendorId, uint16_t productId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(usagePage, usageId, vendorId, productId)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(usagePage, usageId, vendorId, productId)); return S_OK; } catch (...) @@ -548,11 +589,12 @@ struct produce : p } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, Windows::Storage::FileAccessMode accessMode, abi_arg_out> hidDevice) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, Windows::Storage::FileAccessMode accessMode, impl::abi_arg_out> hidDevice) noexcept override { try { - *hidDevice = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), accessMode)); + typename D::abi_guard guard(this->shim()); + *hidDevice = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), accessMode)); return S_OK; } catch (...) @@ -570,7 +612,8 @@ struct produce : p { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -579,11 +622,12 @@ struct produce : p } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -593,10 +637,11 @@ struct produce : p } } - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -606,11 +651,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControl(usagePage, usageId)); return S_OK; } catch (...) @@ -620,11 +666,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetBooleanControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -634,11 +681,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControl(usagePage, usageId)); return S_OK; } catch (...) @@ -648,11 +696,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetNumericControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -670,7 +719,8 @@ struct produce : pro { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -679,11 +729,12 @@ struct produce : pro } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -693,11 +744,12 @@ struct produce : pro } } - HRESULT __stdcall get_ActivatedBooleanControls(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ActivatedBooleanControls(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ActivatedBooleanControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivatedBooleanControls()); return S_OK; } catch (...) @@ -707,11 +759,12 @@ struct produce : pro } } - HRESULT __stdcall get_TransitionedBooleanControls(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TransitionedBooleanControls(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransitionedBooleanControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitionedBooleanControls()); return S_OK; } catch (...) @@ -721,11 +774,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControl(usagePage, usageId)); return S_OK; } catch (...) @@ -735,11 +789,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetBooleanControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -749,11 +804,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControl(usagePage, usageId)); return S_OK; } catch (...) @@ -763,11 +819,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetNumericControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -781,11 +838,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Report(abi_arg_out value) noexcept override + HRESULT __stdcall get_Report(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -803,7 +861,8 @@ struct produce : { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -816,7 +875,8 @@ struct produce : { try { - *value = detach(this->shim().IsGrouped()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGrouped()); return S_OK; } catch (...) @@ -829,7 +889,8 @@ struct produce : { try { - *value = detach(this->shim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -842,7 +903,8 @@ struct produce : { try { - *value = detach(this->shim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -855,7 +917,8 @@ struct produce : { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -868,6 +931,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(value); return S_OK; } @@ -881,7 +945,8 @@ struct produce : { try { - *value = detach(this->shim().ScaledValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaledValue()); return S_OK; } catch (...) @@ -894,6 +959,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ScaledValue(value); return S_OK; } @@ -903,11 +969,12 @@ struct produce : } } - HRESULT __stdcall get_ControlDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlDescription()); return S_OK; } catch (...) @@ -925,7 +992,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -938,7 +1006,8 @@ struct produceshim().ReportId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportId()); return S_OK; } catch (...) @@ -951,7 +1020,8 @@ struct produceshim().ReportType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportType()); return S_OK; } catch (...) @@ -964,7 +1034,8 @@ struct produceshim().ReportSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportSize()); return S_OK; } catch (...) @@ -977,7 +1048,8 @@ struct produceshim().ReportCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportCount()); return S_OK; } catch (...) @@ -990,7 +1062,8 @@ struct produceshim().UsagePage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsagePage()); return S_OK; } catch (...) @@ -1003,7 +1076,8 @@ struct produceshim().UsageId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsageId()); return S_OK; } catch (...) @@ -1016,7 +1090,8 @@ struct produceshim().LogicalMinimum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogicalMinimum()); return S_OK; } catch (...) @@ -1029,7 +1104,8 @@ struct produceshim().LogicalMaximum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogicalMaximum()); return S_OK; } catch (...) @@ -1042,7 +1118,8 @@ struct produceshim().PhysicalMinimum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhysicalMinimum()); return S_OK; } catch (...) @@ -1055,7 +1132,8 @@ struct produceshim().PhysicalMaximum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhysicalMaximum()); return S_OK; } catch (...) @@ -1068,7 +1146,8 @@ struct produceshim().UnitExponent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnitExponent()); return S_OK; } catch (...) @@ -1081,7 +1160,8 @@ struct produceshim().Unit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unit()); return S_OK; } catch (...) @@ -1094,7 +1174,8 @@ struct produceshim().IsAbsolute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAbsolute()); return S_OK; } catch (...) @@ -1107,7 +1188,8 @@ struct produceshim().HasNull()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNull()); return S_OK; } catch (...) @@ -1116,11 +1198,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ParentCollections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ParentCollections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentCollections()); return S_OK; } catch (...) @@ -1138,7 +1221,8 @@ struct produce : pr { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1147,11 +1231,12 @@ struct produce : pr } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1161,10 +1246,11 @@ struct produce : pr } } - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -1174,11 +1260,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControl(usagePage, usageId)); return S_OK; } catch (...) @@ -1188,11 +1275,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetBooleanControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBooleanControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBooleanControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -1202,11 +1290,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControl(uint16_t usagePage, uint16_t usageId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControl(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControl(usagePage, usageId)); return S_OK; } catch (...) @@ -1216,11 +1305,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetNumericControlByDescription(abi_arg_in controlDescription, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNumericControlByDescription(impl::abi_arg_in controlDescription, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNumericControlByDescription(*reinterpret_cast(&controlDescription))); return S_OK; } catch (...) @@ -1238,592 +1328,592 @@ namespace Windows::Devices::HumanInterfaceDevice { template hstring impl_IHidDeviceStatics::GetDeviceSelector(uint16_t usagePage, uint16_t usageId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(usagePage, usageId, put(selector))); + check_hresult(WINRT_SHIM(IHidDeviceStatics)->abi_GetDeviceSelector(usagePage, usageId, put_abi(selector))); return selector; } template hstring impl_IHidDeviceStatics::GetDeviceSelector(uint16_t usagePage, uint16_t usageId, uint16_t vendorId, uint16_t productId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorVidPid(usagePage, usageId, vendorId, productId, put(selector))); + check_hresult(WINRT_SHIM(IHidDeviceStatics)->abi_GetDeviceSelectorVidPid(usagePage, usageId, vendorId, productId, put_abi(selector))); return selector; } -template Windows::Foundation::IAsyncOperation impl_IHidDeviceStatics::FromIdAsync(hstring_ref deviceId, Windows::Storage::FileAccessMode accessMode) const +template Windows::Foundation::IAsyncOperation impl_IHidDeviceStatics::FromIdAsync(hstring_view deviceId, Windows::Storage::FileAccessMode accessMode) const { Windows::Foundation::IAsyncOperation hidDevice; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), accessMode, put(hidDevice))); + check_hresult(WINRT_SHIM(IHidDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), accessMode, put_abi(hidDevice))); return hidDevice; } template uint32_t impl_IHidBooleanControlDescription::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_Id(&value)); return value; } template uint16_t impl_IHidBooleanControlDescription::ReportId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportId(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_ReportId(&value)); return value; } template Windows::Devices::HumanInterfaceDevice::HidReportType impl_IHidBooleanControlDescription::ReportType() const { Windows::Devices::HumanInterfaceDevice::HidReportType value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportType(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_ReportType(&value)); return value; } template uint16_t impl_IHidBooleanControlDescription::UsagePage() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_UsagePage(&value)); return value; } template uint16_t impl_IHidBooleanControlDescription::UsageId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_UsageId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IHidBooleanControlDescription::ParentCollections() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ParentCollections(put(value))); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription)->get_ParentCollections(put_abi(value))); return value; } template bool impl_IHidBooleanControlDescription2::IsAbsolute() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAbsolute(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControlDescription2)->get_IsAbsolute(&value)); return value; } template uint32_t impl_IHidNumericControlDescription::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_Id(&value)); return value; } template uint16_t impl_IHidNumericControlDescription::ReportId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportId(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_ReportId(&value)); return value; } template Windows::Devices::HumanInterfaceDevice::HidReportType impl_IHidNumericControlDescription::ReportType() const { Windows::Devices::HumanInterfaceDevice::HidReportType value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportType(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_ReportType(&value)); return value; } template uint32_t impl_IHidNumericControlDescription::ReportSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportSize(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_ReportSize(&value)); return value; } template uint32_t impl_IHidNumericControlDescription::ReportCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportCount(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_ReportCount(&value)); return value; } template uint16_t impl_IHidNumericControlDescription::UsagePage() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_UsagePage(&value)); return value; } template uint16_t impl_IHidNumericControlDescription::UsageId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_UsageId(&value)); return value; } template int32_t impl_IHidNumericControlDescription::LogicalMinimum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LogicalMinimum(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_LogicalMinimum(&value)); return value; } template int32_t impl_IHidNumericControlDescription::LogicalMaximum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LogicalMaximum(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_LogicalMaximum(&value)); return value; } template int32_t impl_IHidNumericControlDescription::PhysicalMinimum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhysicalMinimum(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_PhysicalMinimum(&value)); return value; } template int32_t impl_IHidNumericControlDescription::PhysicalMaximum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhysicalMaximum(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_PhysicalMaximum(&value)); return value; } template uint32_t impl_IHidNumericControlDescription::UnitExponent() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UnitExponent(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_UnitExponent(&value)); return value; } template uint32_t impl_IHidNumericControlDescription::Unit() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unit(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_Unit(&value)); return value; } template bool impl_IHidNumericControlDescription::IsAbsolute() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAbsolute(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_IsAbsolute(&value)); return value; } template bool impl_IHidNumericControlDescription::HasNull() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNull(&value)); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_HasNull(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IHidNumericControlDescription::ParentCollections() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ParentCollections(put(value))); + check_hresult(WINRT_SHIM(IHidNumericControlDescription)->get_ParentCollections(put_abi(value))); return value; } template uint32_t impl_IHidCollection::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidCollection)->get_Id(&value)); return value; } template Windows::Devices::HumanInterfaceDevice::HidCollectionType impl_IHidCollection::Type() const { Windows::Devices::HumanInterfaceDevice::HidCollectionType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IHidCollection)->get_Type(&value)); return value; } template uint32_t impl_IHidCollection::UsagePage() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidCollection)->get_UsagePage(&value)); return value; } template uint32_t impl_IHidCollection::UsageId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidCollection)->get_UsageId(&value)); return value; } template uint16_t impl_IHidInputReport::Id() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidInputReport)->get_Id(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IHidInputReport::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->get_Data(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IHidInputReport::ActivatedBooleanControls() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ActivatedBooleanControls(put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->get_ActivatedBooleanControls(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IHidInputReport::TransitionedBooleanControls() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_TransitionedBooleanControls(put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->get_TransitionedBooleanControls(put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidInputReport::GetBooleanControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->abi_GetBooleanControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidInputReport::GetBooleanControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->abi_GetBooleanControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidInputReport::GetNumericControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->abi_GetNumericControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidInputReport::GetNumericControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidInputReport)->abi_GetNumericControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template uint16_t impl_IHidOutputReport::Id() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidOutputReport)->get_Id(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IHidOutputReport::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->get_Data(put_abi(value))); return value; } template void impl_IHidOutputReport::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->put_Data(get_abi(value))); } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidOutputReport::GetBooleanControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->abi_GetBooleanControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidOutputReport::GetBooleanControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->abi_GetBooleanControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidOutputReport::GetNumericControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->abi_GetNumericControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidOutputReport::GetNumericControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidOutputReport)->abi_GetNumericControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template uint16_t impl_IHidFeatureReport::Id() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidFeatureReport)->get_Id(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IHidFeatureReport::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->get_Data(put_abi(value))); return value; } template void impl_IHidFeatureReport::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->put_Data(get_abi(value))); } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidFeatureReport::GetBooleanControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->abi_GetBooleanControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidBooleanControl impl_IHidFeatureReport::GetBooleanControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidBooleanControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->abi_GetBooleanControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidFeatureReport::GetNumericControl(uint16_t usagePage, uint16_t usageId) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControl(usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->abi_GetNumericControl(usagePage, usageId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidNumericControl impl_IHidFeatureReport::GetNumericControlByDescription(const Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription & controlDescription) const { Windows::Devices::HumanInterfaceDevice::HidNumericControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControlByDescription(get(controlDescription), put(value))); + check_hresult(WINRT_SHIM(IHidFeatureReport)->abi_GetNumericControlByDescription(get_abi(controlDescription), put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidInputReport impl_IHidInputReportReceivedEventArgs::Report() const { Windows::Devices::HumanInterfaceDevice::HidInputReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Report(put(value))); + check_hresult(WINRT_SHIM(IHidInputReportReceivedEventArgs)->get_Report(put_abi(value))); return value; } template uint32_t impl_IHidBooleanControl::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControl)->get_Id(&value)); return value; } template uint16_t impl_IHidBooleanControl::UsagePage() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControl)->get_UsagePage(&value)); return value; } template uint16_t impl_IHidBooleanControl::UsageId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControl)->get_UsageId(&value)); return value; } template bool impl_IHidBooleanControl::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IHidBooleanControl)->get_IsActive(&value)); return value; } template void impl_IHidBooleanControl::IsActive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsActive(value)); + check_hresult(WINRT_SHIM(IHidBooleanControl)->put_IsActive(value)); } template Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription impl_IHidBooleanControl::ControlDescription() const { Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlDescription(put(value))); + check_hresult(WINRT_SHIM(IHidBooleanControl)->get_ControlDescription(put_abi(value))); return value; } template uint32_t impl_IHidNumericControl::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_Id(&value)); return value; } template bool impl_IHidNumericControl::IsGrouped() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGrouped(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_IsGrouped(&value)); return value; } template uint16_t impl_IHidNumericControl::UsagePage() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_UsagePage(&value)); return value; } template uint16_t impl_IHidNumericControl::UsageId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_UsageId(&value)); return value; } template int64_t impl_IHidNumericControl::Value() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_Value(&value)); return value; } template void impl_IHidNumericControl::Value(int64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->put_Value(value)); } template int64_t impl_IHidNumericControl::ScaledValue() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaledValue(&value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_ScaledValue(&value)); return value; } template void impl_IHidNumericControl::ScaledValue(int64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaledValue(value)); + check_hresult(WINRT_SHIM(IHidNumericControl)->put_ScaledValue(value)); } template Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription impl_IHidNumericControl::ControlDescription() const { Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlDescription(put(value))); + check_hresult(WINRT_SHIM(IHidNumericControl)->get_ControlDescription(put_abi(value))); return value; } template uint16_t impl_IHidDevice::VendorId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VendorId(&value)); + check_hresult(WINRT_SHIM(IHidDevice)->get_VendorId(&value)); return value; } template uint16_t impl_IHidDevice::ProductId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProductId(&value)); + check_hresult(WINRT_SHIM(IHidDevice)->get_ProductId(&value)); return value; } template uint16_t impl_IHidDevice::Version() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Version(&value)); + check_hresult(WINRT_SHIM(IHidDevice)->get_Version(&value)); return value; } template uint16_t impl_IHidDevice::UsagePage() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsagePage(&value)); + check_hresult(WINRT_SHIM(IHidDevice)->get_UsagePage(&value)); return value; } template uint16_t impl_IHidDevice::UsageId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsageId(&value)); + check_hresult(WINRT_SHIM(IHidDevice)->get_UsageId(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::GetInputReportAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetInputReportAsync(put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetInputReportAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::GetInputReportAsync(uint16_t reportId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetInputReportByIdAsync(reportId, put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetInputReportByIdAsync(reportId, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::GetFeatureReportAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetFeatureReportAsync(put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetFeatureReportAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::GetFeatureReportAsync(uint16_t reportId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetFeatureReportByIdAsync(reportId, put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetFeatureReportByIdAsync(reportId, put_abi(value))); return value; } template Windows::Devices::HumanInterfaceDevice::HidOutputReport impl_IHidDevice::CreateOutputReport() const { Windows::Devices::HumanInterfaceDevice::HidOutputReport outputReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOutputReport(put(outputReport))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_CreateOutputReport(put_abi(outputReport))); return outputReport; } template Windows::Devices::HumanInterfaceDevice::HidOutputReport impl_IHidDevice::CreateOutputReport(uint16_t reportId) const { Windows::Devices::HumanInterfaceDevice::HidOutputReport outputReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOutputReportById(reportId, put(outputReport))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_CreateOutputReportById(reportId, put_abi(outputReport))); return outputReport; } template Windows::Devices::HumanInterfaceDevice::HidFeatureReport impl_IHidDevice::CreateFeatureReport() const { Windows::Devices::HumanInterfaceDevice::HidFeatureReport featureReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFeatureReport(put(featureReport))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_CreateFeatureReport(put_abi(featureReport))); return featureReport; } template Windows::Devices::HumanInterfaceDevice::HidFeatureReport impl_IHidDevice::CreateFeatureReport(uint16_t reportId) const { Windows::Devices::HumanInterfaceDevice::HidFeatureReport featureReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFeatureReportById(reportId, put(featureReport))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_CreateFeatureReportById(reportId, put_abi(featureReport))); return featureReport; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::SendOutputReportAsync(const Windows::Devices::HumanInterfaceDevice::HidOutputReport & outputReport) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendOutputReportAsync(get(outputReport), put(operation))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_SendOutputReportAsync(get_abi(outputReport), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IHidDevice::SendFeatureReportAsync(const Windows::Devices::HumanInterfaceDevice::HidFeatureReport & featureReport) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendFeatureReportAsync(get(featureReport), put(operation))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_SendFeatureReportAsync(get_abi(featureReport), put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVectorView impl_IHidDevice::GetBooleanControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanControlDescriptions(reportType, usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetBooleanControlDescriptions(reportType, usagePage, usageId, put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IHidDevice::GetNumericControlDescriptions(Windows::Devices::HumanInterfaceDevice::HidReportType reportType, uint16_t usagePage, uint16_t usageId) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetNumericControlDescriptions(reportType, usagePage, usageId, put(value))); + check_hresult(WINRT_SHIM(IHidDevice)->abi_GetNumericControlDescriptions(reportType, usagePage, usageId, put_abi(value))); return value; } template event_token impl_IHidDevice::InputReportReceived(const Windows::Foundation::TypedEventHandler & reportHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_InputReportReceived(get(reportHandler), &token)); + check_hresult(WINRT_SHIM(IHidDevice)->add_InputReportReceived(get_abi(reportHandler), &token)); return token; } @@ -1834,7 +1924,7 @@ template event_revoker impl_IHidDevice::InputReportR template void impl_IHidDevice::InputReportReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_InputReportReceived(token)); + check_hresult(WINRT_SHIM(IHidDevice)->remove_InputReportReceived(token)); } inline hstring HidDevice::GetDeviceSelector(uint16_t usagePage, uint16_t usageId) @@ -1847,7 +1937,7 @@ inline hstring HidDevice::GetDeviceSelector(uint16_t usagePage, uint16_t usageId return get_activation_factory().GetDeviceSelector(usagePage, usageId, vendorId, productId); } -inline Windows::Foundation::IAsyncOperation HidDevice::FromIdAsync(hstring_ref deviceId, Windows::Storage::FileAccessMode accessMode) +inline Windows::Foundation::IAsyncOperation HidDevice::FromIdAsync(hstring_view deviceId, Windows::Storage::FileAccessMode accessMode) { return get_activation_factory().FromIdAsync(deviceId, accessMode); } @@ -1855,3 +1945,203 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidInputReportReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.I2c.Provider.h b/10.0.14393.0/winrt/Windows.Devices.I2c.Provider.h index fefa163b2..96578bff7 100644 --- a/10.0.14393.0/winrt/Windows.Devices.I2c.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.I2c.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.I2c.Provider.3.h" #include "Windows.Devices.I2c.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceProvider(abi_arg_in settings, abi_arg_out device) noexcept override + HRESULT __stdcall abi_GetDeviceProvider(impl::abi_arg_in settings, impl::abi_arg_out device) noexcept override { try { - *device = detach(this->shim().GetDeviceProvider(*reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *device = detach_abi(this->shim().GetDeviceProvider(*reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce } } - HRESULT __stdcall abi_Write(uint32_t __bufferSize, abi_arg_in * buffer) noexcept override + HRESULT __stdcall abi_Write(uint32_t __bufferSize, impl::abi_arg_in * buffer) noexcept override { try { - this->shim().Write(array_ref(buffer, buffer + __bufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Write(array_view(buffer, buffer + __bufferSize)); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produce } } - HRESULT __stdcall abi_WritePartial(uint32_t __bufferSize, abi_arg_in * buffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_WritePartial(uint32_t __bufferSize, impl::abi_arg_in * buffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WritePartial(array_ref(buffer, buffer + __bufferSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WritePartial(array_view(buffer, buffer + __bufferSize))); return S_OK; } catch (...) @@ -72,10 +79,11 @@ struct produce : produce } } - HRESULT __stdcall abi_Read(uint32_t __bufferSize, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_Read(uint32_t __bufferSize, impl::abi_arg_out buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Read(*buffer); return S_OK; } @@ -85,11 +93,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ReadPartial(uint32_t __bufferSize, abi_arg_out buffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReadPartial(uint32_t __bufferSize, impl::abi_arg_out buffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReadPartial(*buffer)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadPartial(*buffer)); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce : produce } } - HRESULT __stdcall abi_WriteRead(uint32_t __writeBufferSize, abi_arg_in * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_WriteRead(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().WriteRead(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().WriteRead(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -111,11 +121,12 @@ struct produce : produce } } - HRESULT __stdcall abi_WriteReadPartial(uint32_t __writeBufferSize, abi_arg_in * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_WriteReadPartial(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WriteReadPartial(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WriteReadPartial(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer)); return S_OK; } catch (...) @@ -128,11 +139,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync()); return S_OK; } catch (...) @@ -150,7 +162,8 @@ struct produceshim().SlaveAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SlaveAddress()); return S_OK; } catch (...) @@ -163,6 +176,7 @@ struct produceshim()); this->shim().SlaveAddress(value); return S_OK; } @@ -176,7 +190,8 @@ struct produceshim().BusSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusSpeed()); return S_OK; } catch (...) @@ -189,6 +204,7 @@ struct produceshim()); this->shim().BusSpeed(value); return S_OK; } @@ -202,7 +218,8 @@ struct produceshim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -215,6 +232,7 @@ struct produceshim()); this->shim().SharingMode(value); return S_OK; } @@ -232,96 +250,143 @@ namespace Windows::Devices::I2c::Provider { template int32_t impl_IProviderI2cConnectionSettings::SlaveAddress() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SlaveAddress(&value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->get_SlaveAddress(&value)); return value; } template void impl_IProviderI2cConnectionSettings::SlaveAddress(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SlaveAddress(value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->put_SlaveAddress(value)); } template Windows::Devices::I2c::Provider::ProviderI2cBusSpeed impl_IProviderI2cConnectionSettings::BusSpeed() const { Windows::Devices::I2c::Provider::ProviderI2cBusSpeed value {}; - check_hresult(static_cast(static_cast(*this))->get_BusSpeed(&value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->get_BusSpeed(&value)); return value; } template void impl_IProviderI2cConnectionSettings::BusSpeed(Windows::Devices::I2c::Provider::ProviderI2cBusSpeed value) const { - check_hresult(static_cast(static_cast(*this))->put_BusSpeed(value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->put_BusSpeed(value)); } template Windows::Devices::I2c::Provider::ProviderI2cSharingMode impl_IProviderI2cConnectionSettings::SharingMode() const { Windows::Devices::I2c::Provider::ProviderI2cSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->get_SharingMode(&value)); return value; } template void impl_IProviderI2cConnectionSettings::SharingMode(Windows::Devices::I2c::Provider::ProviderI2cSharingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SharingMode(value)); + check_hresult(WINRT_SHIM(IProviderI2cConnectionSettings)->put_SharingMode(value)); } template Windows::Devices::I2c::Provider::II2cDeviceProvider impl_II2cControllerProvider::GetDeviceProvider(const Windows::Devices::I2c::Provider::ProviderI2cConnectionSettings & settings) const { Windows::Devices::I2c::Provider::II2cDeviceProvider device; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceProvider(get(settings), put(device))); + check_hresult(WINRT_SHIM(II2cControllerProvider)->abi_GetDeviceProvider(get_abi(settings), put_abi(device))); return device; } template Windows::Foundation::IAsyncOperation> impl_II2cProvider::GetControllersAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(put(operation))); + check_hresult(WINRT_SHIM(II2cProvider)->abi_GetControllersAsync(put_abi(operation))); return operation; } template hstring impl_II2cDeviceProvider::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->get_DeviceId(put_abi(value))); return value; } -template void impl_II2cDeviceProvider::Write(array_ref buffer) const +template void impl_II2cDeviceProvider::Write(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_Write(buffer.size(), get_abi(buffer))); } -template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::WritePartial(array_ref buffer) const +template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::WritePartial(array_view buffer) const { Windows::Devices::I2c::Provider::ProviderI2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_WritePartial(buffer.size(), get(buffer), put(result))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_WritePartial(buffer.size(), get_abi(buffer), put_abi(result))); return result; } -template void impl_II2cDeviceProvider::Read(array_ref buffer) const +template void impl_II2cDeviceProvider::Read(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Read(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_Read(buffer.size(), get_abi(buffer))); } -template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::ReadPartial(array_ref buffer) const +template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::ReadPartial(array_view buffer) const { Windows::Devices::I2c::Provider::ProviderI2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadPartial(buffer.size(), get(buffer), put(result))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_ReadPartial(buffer.size(), get_abi(buffer), put_abi(result))); return result; } -template void impl_II2cDeviceProvider::WriteRead(array_ref writeBuffer, array_ref readBuffer) const +template void impl_II2cDeviceProvider::WriteRead(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteRead(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_WriteRead(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } -template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::WriteReadPartial(array_ref writeBuffer, array_ref readBuffer) const +template Windows::Devices::I2c::Provider::ProviderI2cTransferResult impl_II2cDeviceProvider::WriteReadPartial(array_view writeBuffer, array_view readBuffer) const { Windows::Devices::I2c::Provider::ProviderI2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_WriteReadPartial(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer), put(result))); + check_hresult(WINRT_SHIM(II2cDeviceProvider)->abi_WriteReadPartial(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer), put_abi(result))); return result; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::Provider::II2cControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::Provider::II2cDeviceProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::Provider::II2cProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::Provider::IProviderI2cConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::Provider::ProviderI2cConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.I2c.h b/10.0.14393.0/winrt/Windows.Devices.I2c.h index eb1973c4b..bfa0b9bed 100644 --- a/10.0.14393.0/winrt/Windows.Devices.I2c.h +++ b/10.0.14393.0/winrt/Windows.Devices.I2c.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.I2c.Provider.3.h" #include "internal/Windows.Devices.I2c.3.h" @@ -20,7 +23,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SlaveAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SlaveAddress()); return S_OK; } catch (...) @@ -33,6 +37,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SlaveAddress(value); return S_OK; } @@ -46,7 +51,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().BusSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusSpeed()); return S_OK; } catch (...) @@ -59,6 +65,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().BusSpeed(value); return S_OK; } @@ -72,7 +79,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -85,6 +93,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SharingMode(value); return S_OK; } @@ -98,11 +107,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t slaveAddress, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(int32_t slaveAddress, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(slaveAddress)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(slaveAddress)); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDevice(abi_arg_in settings, abi_arg_out device) noexcept override + HRESULT __stdcall abi_GetDevice(impl::abi_arg_in settings, impl::abi_arg_out device) noexcept override { try { - *device = detach(this->shim().GetDevice(*reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *device = detach_abi(this->shim().GetDevice(*reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_in provider, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_in provider, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -148,11 +160,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -166,11 +179,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -180,11 +194,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ConnectionSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionSettings()); return S_OK; } catch (...) @@ -194,11 +209,12 @@ struct produce : produce_base * buffer) noexcept override + HRESULT __stdcall abi_Write(uint32_t __bufferSize, impl::abi_arg_in * buffer) noexcept override { try { - this->shim().Write(array_ref(buffer, buffer + __bufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Write(array_view(buffer, buffer + __bufferSize)); return S_OK; } catch (...) @@ -207,11 +223,12 @@ struct produce : produce_base * buffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_WritePartial(uint32_t __bufferSize, impl::abi_arg_in * buffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WritePartial(array_ref(buffer, buffer + __bufferSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WritePartial(array_view(buffer, buffer + __bufferSize))); return S_OK; } catch (...) @@ -220,10 +237,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_Read(uint32_t __bufferSize, impl::abi_arg_out buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Read(*buffer); return S_OK; } @@ -233,11 +251,12 @@ struct produce : produce_base buffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReadPartial(uint32_t __bufferSize, impl::abi_arg_out buffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReadPartial(*buffer)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReadPartial(*buffer)); return S_OK; } catch (...) @@ -246,11 +265,12 @@ struct produce : produce_base * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_WriteRead(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().WriteRead(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().WriteRead(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -259,11 +279,12 @@ struct produce : produce_base * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer, abi_arg_out result) noexcept override + HRESULT __stdcall abi_WriteReadPartial(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WriteReadPartial(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WriteReadPartial(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer)); return S_OK; } catch (...) @@ -276,11 +297,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -290,11 +312,12 @@ struct produce : produce_base friendlyName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromFriendlyName(impl::abi_arg_in friendlyName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(*reinterpret_cast(&friendlyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(*reinterpret_cast(&friendlyName))); return S_OK; } catch (...) @@ -304,11 +327,12 @@ struct produce : produce_base deviceId, abi_arg_in settings, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_in settings, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -326,135 +350,135 @@ namespace Windows::Devices::I2c { template Windows::Devices::I2c::I2cConnectionSettings impl_II2cConnectionSettingsFactory::Create(int32_t slaveAddress) const { Windows::Devices::I2c::I2cConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(slaveAddress, put(value))); + check_hresult(WINRT_SHIM(II2cConnectionSettingsFactory)->abi_Create(slaveAddress, put_abi(value))); return value; } template int32_t impl_II2cConnectionSettings::SlaveAddress() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SlaveAddress(&value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->get_SlaveAddress(&value)); return value; } template void impl_II2cConnectionSettings::SlaveAddress(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SlaveAddress(value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->put_SlaveAddress(value)); } template Windows::Devices::I2c::I2cBusSpeed impl_II2cConnectionSettings::BusSpeed() const { Windows::Devices::I2c::I2cBusSpeed value {}; - check_hresult(static_cast(static_cast(*this))->get_BusSpeed(&value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->get_BusSpeed(&value)); return value; } template void impl_II2cConnectionSettings::BusSpeed(Windows::Devices::I2c::I2cBusSpeed value) const { - check_hresult(static_cast(static_cast(*this))->put_BusSpeed(value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->put_BusSpeed(value)); } template Windows::Devices::I2c::I2cSharingMode impl_II2cConnectionSettings::SharingMode() const { Windows::Devices::I2c::I2cSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->get_SharingMode(&value)); return value; } template void impl_II2cConnectionSettings::SharingMode(Windows::Devices::I2c::I2cSharingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SharingMode(value)); + check_hresult(WINRT_SHIM(II2cConnectionSettings)->put_SharingMode(value)); } template hstring impl_II2cDeviceStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(II2cDeviceStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template hstring impl_II2cDeviceStatics::GetDeviceSelector(hstring_ref friendlyName) const +template hstring impl_II2cDeviceStatics::GetDeviceSelector(hstring_view friendlyName) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromFriendlyName(get(friendlyName), put(value))); + check_hresult(WINRT_SHIM(II2cDeviceStatics)->abi_GetDeviceSelectorFromFriendlyName(get_abi(friendlyName), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_II2cDeviceStatics::FromIdAsync(hstring_ref deviceId, const Windows::Devices::I2c::I2cConnectionSettings & settings) const +template Windows::Foundation::IAsyncOperation impl_II2cDeviceStatics::FromIdAsync(hstring_view deviceId, const Windows::Devices::I2c::I2cConnectionSettings & settings) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), get(settings), put(operation))); + check_hresult(WINRT_SHIM(II2cDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), get_abi(settings), put_abi(operation))); return operation; } template Windows::Devices::I2c::I2cDevice impl_II2cController::GetDevice(const Windows::Devices::I2c::I2cConnectionSettings & settings) const { Windows::Devices::I2c::I2cDevice device { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDevice(get(settings), put(device))); + check_hresult(WINRT_SHIM(II2cController)->abi_GetDevice(get_abi(settings), put_abi(device))); return device; } template Windows::Foundation::IAsyncOperation> impl_II2cControllerStatics::GetControllersAsync(const Windows::Devices::I2c::Provider::II2cProvider & provider) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(get(provider), put(operation))); + check_hresult(WINRT_SHIM(II2cControllerStatics)->abi_GetControllersAsync(get_abi(provider), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_II2cControllerStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(II2cControllerStatics)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template hstring impl_II2cDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(II2cDevice)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::I2c::I2cConnectionSettings impl_II2cDevice::ConnectionSettings() const { Windows::Devices::I2c::I2cConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionSettings(put(value))); + check_hresult(WINRT_SHIM(II2cDevice)->get_ConnectionSettings(put_abi(value))); return value; } -template void impl_II2cDevice::Write(array_ref buffer) const +template void impl_II2cDevice::Write(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_Write(buffer.size(), get_abi(buffer))); } -template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::WritePartial(array_ref buffer) const +template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::WritePartial(array_view buffer) const { Windows::Devices::I2c::I2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_WritePartial(buffer.size(), get(buffer), put(result))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_WritePartial(buffer.size(), get_abi(buffer), put_abi(result))); return result; } -template void impl_II2cDevice::Read(array_ref buffer) const +template void impl_II2cDevice::Read(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Read(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_Read(buffer.size(), get_abi(buffer))); } -template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::ReadPartial(array_ref buffer) const +template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::ReadPartial(array_view buffer) const { Windows::Devices::I2c::I2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadPartial(buffer.size(), get(buffer), put(result))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_ReadPartial(buffer.size(), get_abi(buffer), put_abi(result))); return result; } -template void impl_II2cDevice::WriteRead(array_ref writeBuffer, array_ref readBuffer) const +template void impl_II2cDevice::WriteRead(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteRead(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_WriteRead(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } -template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::WriteReadPartial(array_ref writeBuffer, array_ref readBuffer) const +template Windows::Devices::I2c::I2cTransferResult impl_II2cDevice::WriteReadPartial(array_view writeBuffer, array_view readBuffer) const { Windows::Devices::I2c::I2cTransferResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_WriteReadPartial(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer), put(result))); + check_hresult(WINRT_SHIM(II2cDevice)->abi_WriteReadPartial(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer), put_abi(result))); return result; } @@ -477,12 +501,12 @@ inline hstring I2cDevice::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline hstring I2cDevice::GetDeviceSelector(hstring_ref friendlyName) +inline hstring I2cDevice::GetDeviceSelector(hstring_view friendlyName) { return get_activation_factory().GetDeviceSelector(friendlyName); } -inline Windows::Foundation::IAsyncOperation I2cDevice::FromIdAsync(hstring_ref deviceId, const Windows::Devices::I2c::I2cConnectionSettings & settings) +inline Windows::Foundation::IAsyncOperation I2cDevice::FromIdAsync(hstring_view deviceId, const Windows::Devices::I2c::I2cConnectionSettings & settings) { return get_activation_factory().FromIdAsync(deviceId, settings); } @@ -490,3 +514,86 @@ inline Windows::Foundation::IAsyncOperation I2 } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cConnectionSettingsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::II2cDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::I2cConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::I2cController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::I2c::I2cDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Input.h b/10.0.14393.0/winrt/Windows.Devices.Input.h index 295e8a8ec..90ff25091 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Input.h +++ b/10.0.14393.0/winrt/Windows.Devices.Input.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Input.3.h" @@ -19,7 +22,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().KeyboardPresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyboardPresent()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produce : produce_baseshim().MousePresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MousePresent()); return S_OK; } catch (...) @@ -49,7 +54,8 @@ struct produce : produce_baseshim().VerticalWheelPresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalWheelPresent()); return S_OK; } catch (...) @@ -62,7 +68,8 @@ struct produce : produce_baseshim().HorizontalWheelPresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalWheelPresent()); return S_OK; } catch (...) @@ -75,7 +82,8 @@ struct produce : produce_baseshim().SwapButtons()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SwapButtons()); return S_OK; } catch (...) @@ -88,7 +96,8 @@ struct produce : produce_baseshim().NumberOfButtons()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfButtons()); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_MouseMoved(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_MouseMoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().MouseMoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().MouseMoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -118,6 +128,7 @@ struct produce : produce_baseshim()); this->shim().MouseMoved(cookie); return S_OK; } @@ -131,11 +142,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out mouseDevice) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out mouseDevice) noexcept override { try { - *mouseDevice = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *mouseDevice = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -149,11 +161,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_MouseDelta(abi_arg_out value) noexcept override + HRESULT __stdcall get_MouseDelta(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MouseDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseDelta()); return S_OK; } catch (...) @@ -170,7 +183,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -183,7 +197,8 @@ struct produce : produce_baseshim().IsIntegrated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIntegrated()); return S_OK; } catch (...) @@ -196,7 +211,8 @@ struct produce : produce_baseshim().MaxContacts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxContacts()); return S_OK; } catch (...) @@ -205,11 +221,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PhysicalDeviceRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhysicalDeviceRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhysicalDeviceRect()); return S_OK; } catch (...) @@ -218,11 +235,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ScreenRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScreenRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenRect()); return S_OK; } catch (...) @@ -231,11 +249,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedUsages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedUsages()); return S_OK; } catch (...) @@ -253,7 +272,8 @@ struct produce : produce_baseshim().MaxPointersWithZDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPointersWithZDistance()); return S_OK; } catch (...) @@ -266,11 +286,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetPointerDevice(uint32_t pointerId, abi_arg_out pointerDevice) noexcept override + HRESULT __stdcall abi_GetPointerDevice(uint32_t pointerId, impl::abi_arg_out pointerDevice) noexcept override { try { - *pointerDevice = detach(this->shim().GetPointerDevice(pointerId)); + typename D::abi_guard guard(this->shim()); + *pointerDevice = detach_abi(this->shim().GetPointerDevice(pointerId)); return S_OK; } catch (...) @@ -280,11 +301,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetPointerDevices(abi_arg_out> pointerDevices) noexcept override + HRESULT __stdcall abi_GetPointerDevices(impl::abi_arg_out> pointerDevices) noexcept override { try { - *pointerDevices = detach(this->shim().GetPointerDevices()); + typename D::abi_guard guard(this->shim()); + *pointerDevices = detach_abi(this->shim().GetPointerDevices()); return S_OK; } catch (...) @@ -302,7 +324,8 @@ struct produce : produce_baseshim().TouchPresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TouchPresent()); return S_OK; } catch (...) @@ -315,7 +338,8 @@ struct produce : produce_baseshim().Contacts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contacts()); return S_OK; } catch (...) @@ -332,133 +356,133 @@ namespace Windows::Devices::Input { template int32_t impl_IMouseCapabilities::MousePresent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MousePresent(&value)); + check_hresult(WINRT_SHIM(IMouseCapabilities)->get_MousePresent(&value)); return value; } template int32_t impl_IMouseCapabilities::VerticalWheelPresent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalWheelPresent(&value)); + check_hresult(WINRT_SHIM(IMouseCapabilities)->get_VerticalWheelPresent(&value)); return value; } template int32_t impl_IMouseCapabilities::HorizontalWheelPresent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalWheelPresent(&value)); + check_hresult(WINRT_SHIM(IMouseCapabilities)->get_HorizontalWheelPresent(&value)); return value; } template int32_t impl_IMouseCapabilities::SwapButtons() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SwapButtons(&value)); + check_hresult(WINRT_SHIM(IMouseCapabilities)->get_SwapButtons(&value)); return value; } template uint32_t impl_IMouseCapabilities::NumberOfButtons() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfButtons(&value)); + check_hresult(WINRT_SHIM(IMouseCapabilities)->get_NumberOfButtons(&value)); return value; } template int32_t impl_IKeyboardCapabilities::KeyboardPresent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyboardPresent(&value)); + check_hresult(WINRT_SHIM(IKeyboardCapabilities)->get_KeyboardPresent(&value)); return value; } template int32_t impl_ITouchCapabilities::TouchPresent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TouchPresent(&value)); + check_hresult(WINRT_SHIM(ITouchCapabilities)->get_TouchPresent(&value)); return value; } template uint32_t impl_ITouchCapabilities::Contacts() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Contacts(&value)); + check_hresult(WINRT_SHIM(ITouchCapabilities)->get_Contacts(&value)); return value; } template Windows::Devices::Input::PointerDevice impl_IPointerDeviceStatics::GetPointerDevice(uint32_t pointerId) const { Windows::Devices::Input::PointerDevice pointerDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPointerDevice(pointerId, put(pointerDevice))); + check_hresult(WINRT_SHIM(IPointerDeviceStatics)->abi_GetPointerDevice(pointerId, put_abi(pointerDevice))); return pointerDevice; } template Windows::Foundation::Collections::IVectorView impl_IPointerDeviceStatics::GetPointerDevices() const { Windows::Foundation::Collections::IVectorView pointerDevices; - check_hresult(static_cast(static_cast(*this))->abi_GetPointerDevices(put(pointerDevices))); + check_hresult(WINRT_SHIM(IPointerDeviceStatics)->abi_GetPointerDevices(put_abi(pointerDevices))); return pointerDevices; } template Windows::Devices::Input::PointerDeviceType impl_IPointerDevice::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IPointerDevice)->get_PointerDeviceType(&value)); return value; } template bool impl_IPointerDevice::IsIntegrated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIntegrated(&value)); + check_hresult(WINRT_SHIM(IPointerDevice)->get_IsIntegrated(&value)); return value; } template uint32_t impl_IPointerDevice::MaxContacts() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxContacts(&value)); + check_hresult(WINRT_SHIM(IPointerDevice)->get_MaxContacts(&value)); return value; } template Windows::Foundation::Rect impl_IPointerDevice::PhysicalDeviceRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_PhysicalDeviceRect(put(value))); + check_hresult(WINRT_SHIM(IPointerDevice)->get_PhysicalDeviceRect(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPointerDevice::ScreenRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ScreenRect(put(value))); + check_hresult(WINRT_SHIM(IPointerDevice)->get_ScreenRect(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPointerDevice::SupportedUsages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedUsages(put(value))); + check_hresult(WINRT_SHIM(IPointerDevice)->get_SupportedUsages(put_abi(value))); return value; } template uint32_t impl_IPointerDevice2::MaxPointersWithZDistance() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPointersWithZDistance(&value)); + check_hresult(WINRT_SHIM(IPointerDevice2)->get_MaxPointersWithZDistance(&value)); return value; } template Windows::Devices::Input::MouseDelta impl_IMouseEventArgs::MouseDelta() const { Windows::Devices::Input::MouseDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_MouseDelta(put(value))); + check_hresult(WINRT_SHIM(IMouseEventArgs)->get_MouseDelta(put_abi(value))); return value; } template event_token impl_IMouseDevice::MouseMoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_MouseMoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMouseDevice)->add_MouseMoved(get_abi(handler), &cookie)); return cookie; } @@ -469,13 +493,13 @@ template event_revoker impl_IMouseDevice::MouseMov template void impl_IMouseDevice::MouseMoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_MouseMoved(cookie)); + check_hresult(WINRT_SHIM(IMouseDevice)->remove_MouseMoved(cookie)); } template Windows::Devices::Input::MouseDevice impl_IMouseDeviceStatics::GetForCurrentView() const { Windows::Devices::Input::MouseDevice mouseDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(mouseDevice))); + check_hresult(WINRT_SHIM(IMouseDeviceStatics)->abi_GetForCurrentView(put_abi(mouseDevice))); return mouseDevice; } @@ -509,3 +533,140 @@ inline TouchCapabilities::TouchCapabilities() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IKeyboardCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IMouseCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IMouseDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IMouseDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IMouseEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IPointerDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IPointerDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::IPointerDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::ITouchCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::KeyboardCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::MouseCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::MouseDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::MouseEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::PointerDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Input::TouchCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Lights.h b/10.0.14393.0/winrt/Windows.Devices.Lights.h index 5d6b71402..716afe0e3 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Lights.h +++ b/10.0.14393.0/winrt/Windows.Devices.Lights.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.3.h" #include "internal/Windows.Devices.Lights.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce_baseshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -47,6 +52,7 @@ struct produce : produce_baseshim()); this->shim().IsEnabled(value); return S_OK; } @@ -60,7 +66,8 @@ struct produce : produce_baseshim().BrightnessLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrightnessLevel()); return S_OK; } catch (...) @@ -73,6 +80,7 @@ struct produce : produce_baseshim()); this->shim().BrightnessLevel(value); return S_OK; } @@ -86,7 +94,8 @@ struct produce : produce_baseshim().IsColorSettable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorSettable()); return S_OK; } catch (...) @@ -95,11 +104,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -108,10 +118,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -121,11 +132,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AvailabilityChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AvailabilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AvailabilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -138,6 +150,7 @@ struct produce : produce_baseshim()); this->shim().AvailabilityChanged(token); return S_OK; } @@ -155,7 +168,8 @@ struct produce : { try { - *value = detach(this->shim().IsAvailable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAvailable()); return S_OK; } catch (...) @@ -168,11 +182,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -182,11 +197,12 @@ struct produce : produce_base deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -196,11 +212,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -218,85 +235,85 @@ namespace Windows::Devices::Lights { template hstring impl_ILampStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(ILampStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ILampStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_ILampStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(ILampStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILampStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(ILampStatics)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template bool impl_ILampAvailabilityChangedEventArgs::IsAvailable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAvailable(&value)); + check_hresult(WINRT_SHIM(ILampAvailabilityChangedEventArgs)->get_IsAvailable(&value)); return value; } template hstring impl_ILamp::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ILamp)->get_DeviceId(put_abi(value))); return value; } template bool impl_ILamp::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(ILamp)->get_IsEnabled(&value)); return value; } template void impl_ILamp::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(ILamp)->put_IsEnabled(value)); } template float impl_ILamp::BrightnessLevel() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BrightnessLevel(&value)); + check_hresult(WINRT_SHIM(ILamp)->get_BrightnessLevel(&value)); return value; } template void impl_ILamp::BrightnessLevel(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BrightnessLevel(value)); + check_hresult(WINRT_SHIM(ILamp)->put_BrightnessLevel(value)); } template bool impl_ILamp::IsColorSettable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsColorSettable(&value)); + check_hresult(WINRT_SHIM(ILamp)->get_IsColorSettable(&value)); return value; } template Windows::UI::Color impl_ILamp::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(ILamp)->get_Color(put_abi(value))); return value; } template void impl_ILamp::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(ILamp)->put_Color(get_abi(value))); } template event_token impl_ILamp::AvailabilityChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AvailabilityChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILamp)->add_AvailabilityChanged(get_abi(handler), &token)); return token; } @@ -307,7 +324,7 @@ template event_revoker impl_ILamp::AvailabilityChanged(au template void impl_ILamp::AvailabilityChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AvailabilityChanged(token)); + check_hresult(WINRT_SHIM(ILamp)->remove_AvailabilityChanged(token)); } inline hstring Lamp::GetDeviceSelector() @@ -315,7 +332,7 @@ inline hstring Lamp::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation Lamp::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation Lamp::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -328,3 +345,50 @@ inline Windows::Foundation::IAsyncOperation Lamp } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Lights::ILamp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Lights::ILampAvailabilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Lights::ILampStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Lights::Lamp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Lights::LampAvailabilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Midi.h b/10.0.14393.0/winrt/Windows.Devices.Midi.h index d672cae3f..6535a1c02 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Midi.h +++ b/10.0.14393.0/winrt/Windows.Devices.Midi.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -21,7 +24,8 @@ struct produce : produce { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce { try { - *value = detach(this->shim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -47,11 +52,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiChannelPressureMessage(uint8_t channel, uint8_t pressure, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiChannelPressureMessage(uint8_t channel, uint8_t pressure, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiChannelPressureMessage(channel, pressure)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiChannelPressureMessage(channel, pressure)); return S_OK; } catch (...) @@ -69,7 +75,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -82,7 +89,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Controller()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Controller()); return S_OK; } catch (...) @@ -95,7 +103,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ControlValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlValue()); return S_OK; } catch (...) @@ -108,11 +117,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiControlChangeMessage(uint8_t channel, uint8_t controller, uint8_t controlValue, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiControlChangeMessage(uint8_t channel, uint8_t controller, uint8_t controlValue, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiControlChangeMessage(channel, controller, controlValue)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiControlChangeMessage(channel, controller, controlValue)); return S_OK; } catch (...) @@ -126,11 +136,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall add_MessageReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_MessageReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MessageReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MessageReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -143,6 +154,7 @@ struct produce : produce_baseshim()); this->shim().MessageReceived(token); return S_OK; } @@ -152,11 +164,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -170,11 +183,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -184,11 +198,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -202,11 +217,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -215,11 +231,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RawData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawData()); return S_OK; } catch (...) @@ -233,7 +250,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -246,11 +264,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -268,7 +287,8 @@ struct produce : produce_baseshim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -281,7 +301,8 @@ struct produce : produce_baseshim().Note()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Note()); return S_OK; } catch (...) @@ -294,7 +315,8 @@ struct produce : produce_baseshim().Velocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocity()); return S_OK; } catch (...) @@ -307,11 +329,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiNoteOffMessage(uint8_t channel, uint8_t note, uint8_t velocity, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiNoteOffMessage(uint8_t channel, uint8_t note, uint8_t velocity, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiNoteOffMessage(channel, note, velocity)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiNoteOffMessage(channel, note, velocity)); return S_OK; } catch (...) @@ -329,7 +352,8 @@ struct produce : produce_baseshim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -342,7 +366,8 @@ struct produce : produce_baseshim().Note()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Note()); return S_OK; } catch (...) @@ -355,7 +380,8 @@ struct produce : produce_baseshim().Velocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocity()); return S_OK; } catch (...) @@ -368,11 +394,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiNoteOnMessage(uint8_t channel, uint8_t note, uint8_t velocity, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiNoteOnMessage(uint8_t channel, uint8_t note, uint8_t velocity, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiNoteOnMessage(channel, note, velocity)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiNoteOnMessage(channel, note, velocity)); return S_OK; } catch (...) @@ -386,10 +413,11 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_SendMessage(abi_arg_in midiMessage) noexcept override + HRESULT __stdcall abi_SendMessage(impl::abi_arg_in midiMessage) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SendMessage(*reinterpret_cast(&midiMessage)); return S_OK; } @@ -399,10 +427,11 @@ struct produce : produce_base midiData) noexcept override + HRESULT __stdcall abi_SendBuffer(impl::abi_arg_in midiData) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SendBuffer(*reinterpret_cast(&midiData)); return S_OK; } @@ -412,11 +441,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -430,11 +460,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -444,11 +475,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -466,7 +498,8 @@ struct produce : produce { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -479,7 +512,8 @@ struct produce : produce { try { - *value = detach(this->shim().Bend()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bend()); return S_OK; } catch (...) @@ -492,11 +526,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiPitchBendChangeMessage(uint8_t channel, uint16_t bend, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiPitchBendChangeMessage(uint8_t channel, uint16_t bend, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiPitchBendChangeMessage(channel, bend)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiPitchBendChangeMessage(channel, bend)); return S_OK; } catch (...) @@ -514,7 +549,8 @@ struct produce : p { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -527,7 +563,8 @@ struct produce : p { try { - *value = detach(this->shim().Note()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Note()); return S_OK; } catch (...) @@ -540,7 +577,8 @@ struct produce : p { try { - *value = detach(this->shim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -553,11 +591,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiPolyphonicKeyPressureMessage(uint8_t channel, uint8_t note, uint8_t pressure, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiPolyphonicKeyPressureMessage(uint8_t channel, uint8_t note, uint8_t pressure, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiPolyphonicKeyPressureMessage(channel, note, pressure)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiPolyphonicKeyPressureMessage(channel, note, pressure)); return S_OK; } catch (...) @@ -575,7 +614,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -588,7 +628,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Program()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Program()); return S_OK; } catch (...) @@ -601,11 +642,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiProgramChangeMessage(uint8_t channel, uint8_t program, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiProgramChangeMessage(uint8_t channel, uint8_t program, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiProgramChangeMessage(channel, program)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiProgramChangeMessage(channel, program)); return S_OK; } catch (...) @@ -623,7 +665,8 @@ struct produce : pro { try { - *value = detach(this->shim().Beats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Beats()); return S_OK; } catch (...) @@ -636,11 +679,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiSongPositionPointerMessage(uint16_t beats, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiSongPositionPointerMessage(uint16_t beats, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiSongPositionPointerMessage(beats)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiSongPositionPointerMessage(beats)); return S_OK; } catch (...) @@ -658,7 +702,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Song()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Song()); return S_OK; } catch (...) @@ -671,11 +716,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiSongSelectMessage(uint8_t song, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiSongSelectMessage(uint8_t song, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiSongSelectMessage(song)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiSongSelectMessage(song)); return S_OK; } catch (...) @@ -689,11 +735,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_AudioDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDevice()); return S_OK; } catch (...) @@ -707,7 +754,8 @@ struct produce : produce_baseshim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -720,6 +768,7 @@ struct produce : produce_baseshim()); this->shim().Volume(value); return S_OK; } @@ -733,11 +782,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAsync()); return S_OK; } catch (...) @@ -747,11 +797,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateFromAudioDeviceAsync(abi_arg_in audioDevice, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateFromAudioDeviceAsync(impl::abi_arg_in audioDevice, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateAsync(*reinterpret_cast(&audioDevice))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAsync(*reinterpret_cast(&audioDevice))); return S_OK; } catch (...) @@ -761,11 +812,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_IsSynthesizer(abi_arg_in midiDevice, bool * value) noexcept override + HRESULT __stdcall abi_IsSynthesizer(impl::abi_arg_in midiDevice, bool * value) noexcept override { try { - *value = detach(this->shim().IsSynthesizer(*reinterpret_cast(&midiDevice))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSynthesizer(*reinterpret_cast(&midiDevice))); return S_OK; } catch (...) @@ -778,11 +830,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiSystemExclusiveMessage(abi_arg_in rawData, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiSystemExclusiveMessage(impl::abi_arg_in rawData, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiSystemExclusiveMessage(*reinterpret_cast(&rawData))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiSystemExclusiveMessage(*reinterpret_cast(&rawData))); return S_OK; } catch (...) @@ -800,7 +853,8 @@ struct produce : produce_baseshim().FrameType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameType()); return S_OK; } catch (...) @@ -813,7 +867,8 @@ struct produce : produce_baseshim().Values()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Values()); return S_OK; } catch (...) @@ -826,11 +881,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateMidiTimeCodeMessage(uint8_t frameType, uint8_t values, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMidiTimeCodeMessage(uint8_t frameType, uint8_t values, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMidiTimeCodeMessage(frameType, values)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMidiTimeCodeMessage(frameType, values)); return S_OK; } catch (...) @@ -848,332 +904,332 @@ namespace Windows::Devices::Midi { template Windows::Foundation::TimeSpan impl_IMidiMessage::Timestamp() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IMidiMessage)->get_Timestamp(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMidiMessage::RawData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_RawData(put(value))); + check_hresult(WINRT_SHIM(IMidiMessage)->get_RawData(put_abi(value))); return value; } template Windows::Devices::Midi::MidiMessageType impl_IMidiMessage::Type() const { Windows::Devices::Midi::MidiMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IMidiMessage)->get_Type(&value)); return value; } template uint8_t impl_IMidiNoteOffMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOffMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiNoteOffMessage::Note() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Note(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOffMessage)->get_Note(&value)); return value; } template uint8_t impl_IMidiNoteOffMessage::Velocity() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Velocity(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOffMessage)->get_Velocity(&value)); return value; } template uint8_t impl_IMidiNoteOnMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOnMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiNoteOnMessage::Note() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Note(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOnMessage)->get_Note(&value)); return value; } template uint8_t impl_IMidiNoteOnMessage::Velocity() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Velocity(&value)); + check_hresult(WINRT_SHIM(IMidiNoteOnMessage)->get_Velocity(&value)); return value; } template uint8_t impl_IMidiPolyphonicKeyPressureMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiPolyphonicKeyPressureMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiPolyphonicKeyPressureMessage::Note() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Note(&value)); + check_hresult(WINRT_SHIM(IMidiPolyphonicKeyPressureMessage)->get_Note(&value)); return value; } template uint8_t impl_IMidiPolyphonicKeyPressureMessage::Pressure() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IMidiPolyphonicKeyPressureMessage)->get_Pressure(&value)); return value; } template uint8_t impl_IMidiControlChangeMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiControlChangeMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiControlChangeMessage::Controller() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Controller(&value)); + check_hresult(WINRT_SHIM(IMidiControlChangeMessage)->get_Controller(&value)); return value; } template uint8_t impl_IMidiControlChangeMessage::ControlValue() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlValue(&value)); + check_hresult(WINRT_SHIM(IMidiControlChangeMessage)->get_ControlValue(&value)); return value; } template uint8_t impl_IMidiProgramChangeMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiProgramChangeMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiProgramChangeMessage::Program() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Program(&value)); + check_hresult(WINRT_SHIM(IMidiProgramChangeMessage)->get_Program(&value)); return value; } template uint8_t impl_IMidiChannelPressureMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiChannelPressureMessage)->get_Channel(&value)); return value; } template uint8_t impl_IMidiChannelPressureMessage::Pressure() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IMidiChannelPressureMessage)->get_Pressure(&value)); return value; } template uint8_t impl_IMidiPitchBendChangeMessage::Channel() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(IMidiPitchBendChangeMessage)->get_Channel(&value)); return value; } template uint16_t impl_IMidiPitchBendChangeMessage::Bend() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bend(&value)); + check_hresult(WINRT_SHIM(IMidiPitchBendChangeMessage)->get_Bend(&value)); return value; } template uint8_t impl_IMidiTimeCodeMessage::FrameType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FrameType(&value)); + check_hresult(WINRT_SHIM(IMidiTimeCodeMessage)->get_FrameType(&value)); return value; } template uint8_t impl_IMidiTimeCodeMessage::Values() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Values(&value)); + check_hresult(WINRT_SHIM(IMidiTimeCodeMessage)->get_Values(&value)); return value; } template uint16_t impl_IMidiSongPositionPointerMessage::Beats() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Beats(&value)); + check_hresult(WINRT_SHIM(IMidiSongPositionPointerMessage)->get_Beats(&value)); return value; } template uint8_t impl_IMidiSongSelectMessage::Song() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Song(&value)); + check_hresult(WINRT_SHIM(IMidiSongSelectMessage)->get_Song(&value)); return value; } template Windows::Devices::Midi::MidiNoteOffMessage impl_IMidiNoteOffMessageFactory::CreateMidiNoteOffMessage(uint8_t channel, uint8_t note, uint8_t velocity) const { Windows::Devices::Midi::MidiNoteOffMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiNoteOffMessage(channel, note, velocity, put(value))); + check_hresult(WINRT_SHIM(IMidiNoteOffMessageFactory)->abi_CreateMidiNoteOffMessage(channel, note, velocity, put_abi(value))); return value; } template Windows::Devices::Midi::MidiNoteOnMessage impl_IMidiNoteOnMessageFactory::CreateMidiNoteOnMessage(uint8_t channel, uint8_t note, uint8_t velocity) const { Windows::Devices::Midi::MidiNoteOnMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiNoteOnMessage(channel, note, velocity, put(value))); + check_hresult(WINRT_SHIM(IMidiNoteOnMessageFactory)->abi_CreateMidiNoteOnMessage(channel, note, velocity, put_abi(value))); return value; } template Windows::Devices::Midi::MidiPolyphonicKeyPressureMessage impl_IMidiPolyphonicKeyPressureMessageFactory::CreateMidiPolyphonicKeyPressureMessage(uint8_t channel, uint8_t note, uint8_t pressure) const { Windows::Devices::Midi::MidiPolyphonicKeyPressureMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiPolyphonicKeyPressureMessage(channel, note, pressure, put(value))); + check_hresult(WINRT_SHIM(IMidiPolyphonicKeyPressureMessageFactory)->abi_CreateMidiPolyphonicKeyPressureMessage(channel, note, pressure, put_abi(value))); return value; } template Windows::Devices::Midi::MidiControlChangeMessage impl_IMidiControlChangeMessageFactory::CreateMidiControlChangeMessage(uint8_t channel, uint8_t controller, uint8_t controlValue) const { Windows::Devices::Midi::MidiControlChangeMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiControlChangeMessage(channel, controller, controlValue, put(value))); + check_hresult(WINRT_SHIM(IMidiControlChangeMessageFactory)->abi_CreateMidiControlChangeMessage(channel, controller, controlValue, put_abi(value))); return value; } template Windows::Devices::Midi::MidiProgramChangeMessage impl_IMidiProgramChangeMessageFactory::CreateMidiProgramChangeMessage(uint8_t channel, uint8_t program) const { Windows::Devices::Midi::MidiProgramChangeMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiProgramChangeMessage(channel, program, put(value))); + check_hresult(WINRT_SHIM(IMidiProgramChangeMessageFactory)->abi_CreateMidiProgramChangeMessage(channel, program, put_abi(value))); return value; } template Windows::Devices::Midi::MidiChannelPressureMessage impl_IMidiChannelPressureMessageFactory::CreateMidiChannelPressureMessage(uint8_t channel, uint8_t pressure) const { Windows::Devices::Midi::MidiChannelPressureMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiChannelPressureMessage(channel, pressure, put(value))); + check_hresult(WINRT_SHIM(IMidiChannelPressureMessageFactory)->abi_CreateMidiChannelPressureMessage(channel, pressure, put_abi(value))); return value; } template Windows::Devices::Midi::MidiPitchBendChangeMessage impl_IMidiPitchBendChangeMessageFactory::CreateMidiPitchBendChangeMessage(uint8_t channel, uint16_t bend) const { Windows::Devices::Midi::MidiPitchBendChangeMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiPitchBendChangeMessage(channel, bend, put(value))); + check_hresult(WINRT_SHIM(IMidiPitchBendChangeMessageFactory)->abi_CreateMidiPitchBendChangeMessage(channel, bend, put_abi(value))); return value; } template Windows::Devices::Midi::MidiSystemExclusiveMessage impl_IMidiSystemExclusiveMessageFactory::CreateMidiSystemExclusiveMessage(const Windows::Storage::Streams::IBuffer & rawData) const { Windows::Devices::Midi::MidiSystemExclusiveMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiSystemExclusiveMessage(get(rawData), put(value))); + check_hresult(WINRT_SHIM(IMidiSystemExclusiveMessageFactory)->abi_CreateMidiSystemExclusiveMessage(get_abi(rawData), put_abi(value))); return value; } template Windows::Devices::Midi::MidiTimeCodeMessage impl_IMidiTimeCodeMessageFactory::CreateMidiTimeCodeMessage(uint8_t frameType, uint8_t values) const { Windows::Devices::Midi::MidiTimeCodeMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiTimeCodeMessage(frameType, values, put(value))); + check_hresult(WINRT_SHIM(IMidiTimeCodeMessageFactory)->abi_CreateMidiTimeCodeMessage(frameType, values, put_abi(value))); return value; } template Windows::Devices::Midi::MidiSongPositionPointerMessage impl_IMidiSongPositionPointerMessageFactory::CreateMidiSongPositionPointerMessage(uint16_t beats) const { Windows::Devices::Midi::MidiSongPositionPointerMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiSongPositionPointerMessage(beats, put(value))); + check_hresult(WINRT_SHIM(IMidiSongPositionPointerMessageFactory)->abi_CreateMidiSongPositionPointerMessage(beats, put_abi(value))); return value; } template Windows::Devices::Midi::MidiSongSelectMessage impl_IMidiSongSelectMessageFactory::CreateMidiSongSelectMessage(uint8_t song) const { Windows::Devices::Midi::MidiSongSelectMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMidiSongSelectMessage(song, put(value))); + check_hresult(WINRT_SHIM(IMidiSongSelectMessageFactory)->abi_CreateMidiSongSelectMessage(song, put_abi(value))); return value; } template Windows::Devices::Midi::IMidiMessage impl_IMidiMessageReceivedEventArgs::Message() const { Windows::Devices::Midi::IMidiMessage value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IMidiMessageReceivedEventArgs)->get_Message(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMidiInPortStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IMidiInPortStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(IMidiInPortStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(value))); return value; } template hstring impl_IMidiInPortStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IMidiInPortStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMidiOutPortStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IMidiOutPortStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(IMidiOutPortStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(value))); return value; } template hstring impl_IMidiOutPortStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IMidiOutPortStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMidiSynthesizerStatics::CreateAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(put(value))); + check_hresult(WINRT_SHIM(IMidiSynthesizerStatics)->abi_CreateAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMidiSynthesizerStatics::CreateAsync(const Windows::Devices::Enumeration::DeviceInformation & audioDevice) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromAudioDeviceAsync(get(audioDevice), put(value))); + check_hresult(WINRT_SHIM(IMidiSynthesizerStatics)->abi_CreateFromAudioDeviceAsync(get_abi(audioDevice), put_abi(value))); return value; } template bool impl_IMidiSynthesizerStatics::IsSynthesizer(const Windows::Devices::Enumeration::DeviceInformation & midiDevice) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSynthesizer(get(midiDevice), &value)); + check_hresult(WINRT_SHIM(IMidiSynthesizerStatics)->abi_IsSynthesizer(get_abi(midiDevice), &value)); return value; } template void impl_IMidiOutPort::SendMessage(const Windows::Devices::Midi::IMidiMessage & midiMessage) const { - check_hresult(static_cast(static_cast(*this))->abi_SendMessage(get(midiMessage))); + check_hresult(WINRT_SHIM(IMidiOutPort)->abi_SendMessage(get_abi(midiMessage))); } template void impl_IMidiOutPort::SendBuffer(const Windows::Storage::Streams::IBuffer & midiData) const { - check_hresult(static_cast(static_cast(*this))->abi_SendBuffer(get(midiData))); + check_hresult(WINRT_SHIM(IMidiOutPort)->abi_SendBuffer(get_abi(midiData))); } template hstring impl_IMidiOutPort::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMidiOutPort)->get_DeviceId(put_abi(value))); return value; } template event_token impl_IMidiInPort::MessageReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMidiInPort)->add_MessageReceived(get_abi(handler), &token)); return token; } @@ -1184,33 +1240,33 @@ template event_revoker impl_IMidiInPort::MessageRec template void impl_IMidiInPort::MessageReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceived(token)); + check_hresult(WINRT_SHIM(IMidiInPort)->remove_MessageReceived(token)); } template hstring impl_IMidiInPort::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMidiInPort)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IMidiSynthesizer::AudioDevice() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioDevice(put(value))); + check_hresult(WINRT_SHIM(IMidiSynthesizer)->get_AudioDevice(put_abi(value))); return value; } template double impl_IMidiSynthesizer::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IMidiSynthesizer)->get_Volume(&value)); return value; } template void impl_IMidiSynthesizer::Volume(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Volume(value)); + check_hresult(WINRT_SHIM(IMidiSynthesizer)->put_Volume(value)); } inline MidiActiveSensingMessage::MidiActiveSensingMessage() : @@ -1229,7 +1285,7 @@ inline MidiControlChangeMessage::MidiControlChangeMessage(uint8_t channel, uint8 MidiControlChangeMessage(get_activation_factory().CreateMidiControlChangeMessage(channel, controller, controlValue)) {} -inline Windows::Foundation::IAsyncOperation MidiInPort::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation MidiInPort::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -1247,7 +1303,7 @@ inline MidiNoteOnMessage::MidiNoteOnMessage(uint8_t channel, uint8_t note, uint8 MidiNoteOnMessage(get_activation_factory().CreateMidiNoteOnMessage(channel, note, velocity)) {} -inline Windows::Foundation::IAsyncOperation MidiOutPort::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation MidiOutPort::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -1323,3 +1379,464 @@ inline MidiTuneRequestMessage::MidiTuneRequestMessage() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiChannelPressureMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiChannelPressureMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiControlChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiControlChangeMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiInPort & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiInPortStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiNoteOffMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiNoteOffMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiNoteOnMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiNoteOnMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiOutPort & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiOutPortStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiPitchBendChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiPitchBendChangeMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiPolyphonicKeyPressureMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiPolyphonicKeyPressureMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiProgramChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiProgramChangeMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSongPositionPointerMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSongPositionPointerMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSongSelectMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSongSelectMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSynthesizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSynthesizerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiSystemExclusiveMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiTimeCodeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::IMidiTimeCodeMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiActiveSensingMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiChannelPressureMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiContinueMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiControlChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiInPort & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiNoteOffMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiNoteOnMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiOutPort & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiPitchBendChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiPolyphonicKeyPressureMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiProgramChangeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiSongPositionPointerMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiSongSelectMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiStartMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiStopMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiSynthesizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiSystemExclusiveMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiSystemResetMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiTimeCodeMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiTimingClockMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Midi::MidiTuneRequestMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Perception.Provider.h b/10.0.14393.0/winrt/Windows.Devices.Perception.Provider.h index 51887fb33..ee0f02bbd 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Perception.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.Perception.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.Imaging.3.h" @@ -31,7 +34,7 @@ template PerceptionStartFaceAuthenticationHandler::Perc inline bool PerceptionStartFaceAuthenticationHandler::operator()(const Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup & sender) const { bool result {}; - check_hresult((*this)->abi_Invoke(get(sender), &result)); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), &result)); return result; } @@ -49,7 +52,7 @@ template PerceptionStopFaceAuthenticationHandler::Perce inline void PerceptionStopFaceAuthenticationHandler::operator()(const Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } } @@ -59,11 +62,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -73,11 +77,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Depth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Depth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Depth()); return S_OK; } catch (...) @@ -87,11 +92,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Infrared(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Infrared()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Infrared()); return S_OK; } catch (...) @@ -105,11 +111,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FrameProviderIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FrameProviderIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FrameProviderIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameProviderIds()); return S_OK; } catch (...) @@ -123,11 +130,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> ids, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> ids, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast *>(&ids))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast *>(&ids))); return S_OK; } catch (...) @@ -141,11 +149,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TargetId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetId()); return S_OK; } catch (...) @@ -155,11 +164,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -168,11 +178,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -185,11 +196,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in targetId, abi_arg_in position, abi_arg_in orientation, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in targetId, impl::abi_arg_in position, impl::abi_arg_in orientation, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&targetId), *reinterpret_cast(&position), *reinterpret_cast(&orientation))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&targetId), *reinterpret_cast(&position), *reinterpret_cast(&orientation))); return S_OK; } catch (...) @@ -203,11 +215,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RelativeLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RelativeLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RelativeLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeLocations()); return S_OK; } catch (...) @@ -221,11 +234,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> relativeLocations, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> relativeLocations, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast *>(&relativeLocations))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast *>(&relativeLocations))); return S_OK; } catch (...) @@ -239,11 +253,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FrameProviderIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FrameProviderIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FrameProviderIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameProviderIds()); return S_OK; } catch (...) @@ -257,11 +272,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> ids, abi_arg_in startHandler, abi_arg_in stopHandler, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> ids, impl::abi_arg_in startHandler, impl::abi_arg_in stopHandler, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast *>(&ids), *reinterpret_cast(&startHandler), *reinterpret_cast(&stopHandler))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast *>(&ids), *reinterpret_cast(&startHandler), *reinterpret_cast(&stopHandler))); return S_OK; } catch (...) @@ -275,11 +291,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RelativeTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelativeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeTime()); return S_OK; } catch (...) @@ -288,10 +305,11 @@ struct produce : pr } } - HRESULT __stdcall put_RelativeTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_RelativeTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelativeTime(*reinterpret_cast(&value)); return S_OK; } @@ -301,11 +319,12 @@ struct produce : pr } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -315,11 +334,12 @@ struct produce : pr } } - HRESULT __stdcall get_FrameData(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameData()); return S_OK; } catch (...) @@ -333,11 +353,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_FrameProviderInfo(abi_arg_out result) noexcept override + HRESULT __stdcall get_FrameProviderInfo(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FrameProviderInfo()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FrameProviderInfo()); return S_OK; } catch (...) @@ -351,7 +372,8 @@ struct produceshim().Available()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Available()); return S_OK; } catch (...) @@ -360,11 +382,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -378,6 +401,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -391,6 +415,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -400,10 +425,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_SetProperty(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetProperty(*reinterpret_cast(&value)); return S_OK; } @@ -417,11 +443,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -431,10 +458,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -444,11 +472,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -458,10 +487,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -471,11 +501,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceKind()); return S_OK; } catch (...) @@ -485,10 +516,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DeviceKind(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeviceKind(*reinterpret_cast(&value)); return S_OK; } @@ -498,11 +530,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FrameKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameKind()); return S_OK; } catch (...) @@ -512,10 +545,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FrameKind(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FrameKind(*reinterpret_cast(&value)); return S_OK; } @@ -529,7 +563,8 @@ struct produceshim().Hidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hidden()); return S_OK; } catch (...) @@ -542,6 +577,7 @@ struct produceshim()); this->shim().Hidden(value); return S_OK; } @@ -555,11 +591,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetFrameProvider(abi_arg_in frameProviderInfo, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetFrameProvider(impl::abi_arg_in frameProviderInfo, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetFrameProvider(*reinterpret_cast(&frameProviderInfo))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetFrameProvider(*reinterpret_cast(&frameProviderInfo))); return S_OK; } catch (...) @@ -573,10 +610,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RegisterFrameProviderInfo(abi_arg_in manager, abi_arg_in frameProviderInfo) noexcept override + HRESULT __stdcall abi_RegisterFrameProviderInfo(impl::abi_arg_in manager, impl::abi_arg_in frameProviderInfo) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterFrameProviderInfo(*reinterpret_cast(&manager), *reinterpret_cast(&frameProviderInfo)); return S_OK; } @@ -586,10 +624,11 @@ struct produce manager, abi_arg_in frameProviderInfo) noexcept override + HRESULT __stdcall abi_UnregisterFrameProviderInfo(impl::abi_arg_in manager, impl::abi_arg_in frameProviderInfo) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnregisterFrameProviderInfo(*reinterpret_cast(&manager), *reinterpret_cast(&frameProviderInfo)); return S_OK; } @@ -599,10 +638,11 @@ struct produce manager, abi_arg_in faceAuthenticationGroup) noexcept override + HRESULT __stdcall abi_RegisterFaceAuthenticationGroup(impl::abi_arg_in manager, impl::abi_arg_in faceAuthenticationGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterFaceAuthenticationGroup(*reinterpret_cast(&manager), *reinterpret_cast(&faceAuthenticationGroup)); return S_OK; } @@ -612,10 +652,11 @@ struct produce manager, abi_arg_in faceAuthenticationGroup) noexcept override + HRESULT __stdcall abi_UnregisterFaceAuthenticationGroup(impl::abi_arg_in manager, impl::abi_arg_in faceAuthenticationGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnregisterFaceAuthenticationGroup(*reinterpret_cast(&manager), *reinterpret_cast(&faceAuthenticationGroup)); return S_OK; } @@ -625,10 +666,11 @@ struct produce manager, abi_arg_in controlGroup) noexcept override + HRESULT __stdcall abi_RegisterControlGroup(impl::abi_arg_in manager, impl::abi_arg_in controlGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterControlGroup(*reinterpret_cast(&manager), *reinterpret_cast(&controlGroup)); return S_OK; } @@ -638,10 +680,11 @@ struct produce manager, abi_arg_in controlGroup) noexcept override + HRESULT __stdcall abi_UnregisterControlGroup(impl::abi_arg_in manager, impl::abi_arg_in controlGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnregisterControlGroup(*reinterpret_cast(&manager), *reinterpret_cast(&controlGroup)); return S_OK; } @@ -651,10 +694,11 @@ struct produce manager, abi_arg_in correlationGroup) noexcept override + HRESULT __stdcall abi_RegisterCorrelationGroup(impl::abi_arg_in manager, impl::abi_arg_in correlationGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterCorrelationGroup(*reinterpret_cast(&manager), *reinterpret_cast(&correlationGroup)); return S_OK; } @@ -664,10 +708,11 @@ struct produce manager, abi_arg_in correlationGroup) noexcept override + HRESULT __stdcall abi_UnregisterCorrelationGroup(impl::abi_arg_in manager, impl::abi_arg_in correlationGroup) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnregisterCorrelationGroup(*reinterpret_cast(&manager), *reinterpret_cast(&correlationGroup)); return S_OK; } @@ -677,10 +722,11 @@ struct produce provider, bool available) noexcept override + HRESULT __stdcall abi_UpdateAvailabilityForProvider(impl::abi_arg_in provider, bool available) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateAvailabilityForProvider(*reinterpret_cast(&provider), available); return S_OK; } @@ -690,10 +736,11 @@ struct produce provider, abi_arg_in frame) noexcept override + HRESULT __stdcall abi_PublishFrameForProvider(impl::abi_arg_in provider, impl::abi_arg_in frame) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PublishFrameForProvider(*reinterpret_cast(&provider), *reinterpret_cast(&frame)); return S_OK; } @@ -707,11 +754,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -721,11 +769,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -739,7 +788,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -752,6 +802,7 @@ struct produceshim()); this->shim().Status(value); return S_OK; } @@ -761,11 +812,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -779,11 +831,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AllocateFrame(abi_arg_out value) noexcept override + HRESULT __stdcall abi_AllocateFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllocateFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllocateFrame()); return S_OK; } catch (...) @@ -793,11 +846,12 @@ struct produce frame, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CopyFromVideoFrame(impl::abi_arg_in frame, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CopyFromVideoFrame(*reinterpret_cast(&frame))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CopyFromVideoFrame(*reinterpret_cast(&frame))); return S_OK; } catch (...) @@ -811,11 +865,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t maxOutstandingFrameCountForWrite, Windows::Graphics::Imaging::BitmapPixelFormat format, abi_arg_in resolution, Windows::Graphics::Imaging::BitmapAlphaMode alpha, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t maxOutstandingFrameCountForWrite, Windows::Graphics::Imaging::BitmapPixelFormat format, impl::abi_arg_in resolution, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(maxOutstandingFrameCountForWrite, format, *reinterpret_cast(&resolution), alpha)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(maxOutstandingFrameCountForWrite, format, *reinterpret_cast(&resolution), alpha)); return S_OK; } catch (...) @@ -833,324 +888,324 @@ namespace Windows::Devices::Perception::Provider { template hstring impl_IKnownPerceptionFrameKindStatics::Color() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameKindStatics)->get_Color(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameKindStatics::Depth() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Depth(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameKindStatics)->get_Depth(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameKindStatics::Infrared() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Infrared(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameKindStatics)->get_Infrared(put_abi(value))); return value; } template void impl_IPerceptionFrameProviderManagerServiceStatics::RegisterFrameProviderInfo(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo & frameProviderInfo) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterFrameProviderInfo(get(manager), get(frameProviderInfo))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_RegisterFrameProviderInfo(get_abi(manager), get_abi(frameProviderInfo))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::UnregisterFrameProviderInfo(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo & frameProviderInfo) const { - check_hresult(static_cast(static_cast(*this))->abi_UnregisterFrameProviderInfo(get(manager), get(frameProviderInfo))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_UnregisterFrameProviderInfo(get_abi(manager), get_abi(frameProviderInfo))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::RegisterFaceAuthenticationGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup & faceAuthenticationGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterFaceAuthenticationGroup(get(manager), get(faceAuthenticationGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_RegisterFaceAuthenticationGroup(get_abi(manager), get_abi(faceAuthenticationGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::UnregisterFaceAuthenticationGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup & faceAuthenticationGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_UnregisterFaceAuthenticationGroup(get(manager), get(faceAuthenticationGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_UnregisterFaceAuthenticationGroup(get_abi(manager), get_abi(faceAuthenticationGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::RegisterControlGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionControlGroup & controlGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterControlGroup(get(manager), get(controlGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_RegisterControlGroup(get_abi(manager), get_abi(controlGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::UnregisterControlGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionControlGroup & controlGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_UnregisterControlGroup(get(manager), get(controlGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_UnregisterControlGroup(get_abi(manager), get_abi(controlGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::RegisterCorrelationGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionCorrelationGroup & correlationGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterCorrelationGroup(get(manager), get(correlationGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_RegisterCorrelationGroup(get_abi(manager), get_abi(correlationGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::UnregisterCorrelationGroup(const Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & manager, const Windows::Devices::Perception::Provider::PerceptionCorrelationGroup & correlationGroup) const { - check_hresult(static_cast(static_cast(*this))->abi_UnregisterCorrelationGroup(get(manager), get(correlationGroup))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_UnregisterCorrelationGroup(get_abi(manager), get_abi(correlationGroup))); } template void impl_IPerceptionFrameProviderManagerServiceStatics::UpdateAvailabilityForProvider(const Windows::Devices::Perception::Provider::IPerceptionFrameProvider & provider, bool available) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateAvailabilityForProvider(get(provider), available)); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_UpdateAvailabilityForProvider(get_abi(provider), available)); } template void impl_IPerceptionFrameProviderManagerServiceStatics::PublishFrameForProvider(const Windows::Devices::Perception::Provider::IPerceptionFrameProvider & provider, const Windows::Devices::Perception::Provider::PerceptionFrame & frame) const { - check_hresult(static_cast(static_cast(*this))->abi_PublishFrameForProvider(get(provider), get(frame))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManagerServiceStatics)->abi_PublishFrameForProvider(get_abi(provider), get_abi(frame))); } template hstring impl_IPerceptionFrameProviderInfo::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->get_Id(put_abi(value))); return value; } -template void impl_IPerceptionFrameProviderInfo::Id(hstring_ref value) const +template void impl_IPerceptionFrameProviderInfo::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->put_Id(get_abi(value))); } template hstring impl_IPerceptionFrameProviderInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->get_DisplayName(put_abi(value))); return value; } -template void impl_IPerceptionFrameProviderInfo::DisplayName(hstring_ref value) const +template void impl_IPerceptionFrameProviderInfo::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->put_DisplayName(get_abi(value))); } template hstring impl_IPerceptionFrameProviderInfo::DeviceKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceKind(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->get_DeviceKind(put_abi(value))); return value; } -template void impl_IPerceptionFrameProviderInfo::DeviceKind(hstring_ref value) const +template void impl_IPerceptionFrameProviderInfo::DeviceKind(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DeviceKind(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->put_DeviceKind(get_abi(value))); } template hstring impl_IPerceptionFrameProviderInfo::FrameKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrameKind(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->get_FrameKind(put_abi(value))); return value; } -template void impl_IPerceptionFrameProviderInfo::FrameKind(hstring_ref value) const +template void impl_IPerceptionFrameProviderInfo::FrameKind(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FrameKind(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->put_FrameKind(get_abi(value))); } template bool impl_IPerceptionFrameProviderInfo::Hidden() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Hidden(&value)); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->get_Hidden(&value)); return value; } template void impl_IPerceptionFrameProviderInfo::Hidden(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Hidden(value)); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderInfo)->put_Hidden(value)); } -template Windows::Devices::Perception::Provider::PerceptionControlGroup impl_IPerceptionControlGroupFactory::Create(const Windows::Foundation::Collections::IIterable & ids) const +template Windows::Devices::Perception::Provider::PerceptionControlGroup impl_IPerceptionControlGroupFactory::Create(iterable ids) const { Windows::Devices::Perception::Provider::PerceptionControlGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(ids), put(result))); + check_hresult(WINRT_SHIM(IPerceptionControlGroupFactory)->abi_Create(get_abi(ids), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionControlGroup::FrameProviderIds() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FrameProviderIds(put(value))); + check_hresult(WINRT_SHIM(IPerceptionControlGroup)->get_FrameProviderIds(put_abi(value))); return value; } -template Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup impl_IPerceptionFaceAuthenticationGroupFactory::Create(const Windows::Foundation::Collections::IIterable & ids, const Windows::Devices::Perception::Provider::PerceptionStartFaceAuthenticationHandler & startHandler, const Windows::Devices::Perception::Provider::PerceptionStopFaceAuthenticationHandler & stopHandler) const +template Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup impl_IPerceptionFaceAuthenticationGroupFactory::Create(iterable ids, const Windows::Devices::Perception::Provider::PerceptionStartFaceAuthenticationHandler & startHandler, const Windows::Devices::Perception::Provider::PerceptionStopFaceAuthenticationHandler & stopHandler) const { Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(ids), get(startHandler), get(stopHandler), put(result))); + check_hresult(WINRT_SHIM(IPerceptionFaceAuthenticationGroupFactory)->abi_Create(get_abi(ids), get_abi(startHandler), get_abi(stopHandler), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionFaceAuthenticationGroup::FrameProviderIds() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FrameProviderIds(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFaceAuthenticationGroup)->get_FrameProviderIds(put_abi(value))); return value; } -template Windows::Devices::Perception::Provider::PerceptionCorrelation impl_IPerceptionCorrelationFactory::Create(hstring_ref targetId, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::quaternion & orientation) const +template Windows::Devices::Perception::Provider::PerceptionCorrelation impl_IPerceptionCorrelationFactory::Create(hstring_view targetId, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::quaternion & orientation) const { Windows::Devices::Perception::Provider::PerceptionCorrelation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(targetId), get(position), get(orientation), put(result))); + check_hresult(WINRT_SHIM(IPerceptionCorrelationFactory)->abi_Create(get_abi(targetId), get_abi(position), get_abi(orientation), put_abi(result))); return result; } template hstring impl_IPerceptionCorrelation::TargetId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TargetId(put(value))); + check_hresult(WINRT_SHIM(IPerceptionCorrelation)->get_TargetId(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_IPerceptionCorrelation::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IPerceptionCorrelation)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Numerics::quaternion impl_IPerceptionCorrelation::Orientation() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(IPerceptionCorrelation)->get_Orientation(put_abi(value))); return value; } -template Windows::Devices::Perception::Provider::PerceptionCorrelationGroup impl_IPerceptionCorrelationGroupFactory::Create(const Windows::Foundation::Collections::IIterable & relativeLocations) const +template Windows::Devices::Perception::Provider::PerceptionCorrelationGroup impl_IPerceptionCorrelationGroupFactory::Create(iterable relativeLocations) const { Windows::Devices::Perception::Provider::PerceptionCorrelationGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(relativeLocations), put(result))); + check_hresult(WINRT_SHIM(IPerceptionCorrelationGroupFactory)->abi_Create(get_abi(relativeLocations), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionCorrelationGroup::RelativeLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RelativeLocations(put(value))); + check_hresult(WINRT_SHIM(IPerceptionCorrelationGroup)->get_RelativeLocations(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPerceptionFrame::RelativeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativeTime(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrame)->get_RelativeTime(put_abi(value))); return value; } template void impl_IPerceptionFrame::RelativeTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_RelativeTime(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrame)->put_RelativeTime(get_abi(value))); } template Windows::Foundation::Collections::ValueSet impl_IPerceptionFrame::Properties() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrame)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::IMemoryBuffer impl_IPerceptionFrame::FrameData() const { Windows::Foundation::IMemoryBuffer value; - check_hresult(static_cast(static_cast(*this))->get_FrameData(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrame)->get_FrameData(put_abi(value))); return value; } template Windows::Devices::Perception::Provider::PerceptionVideoFrameAllocator impl_IPerceptionVideoFrameAllocatorFactory::Create(uint32_t maxOutstandingFrameCountForWrite, Windows::Graphics::Imaging::BitmapPixelFormat format, const Windows::Foundation::Size & resolution, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Devices::Perception::Provider::PerceptionVideoFrameAllocator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(maxOutstandingFrameCountForWrite, format, get(resolution), alpha, put(result))); + check_hresult(WINRT_SHIM(IPerceptionVideoFrameAllocatorFactory)->abi_Create(maxOutstandingFrameCountForWrite, format, get_abi(resolution), alpha, put_abi(result))); return result; } template hstring impl_IPerceptionPropertyChangeRequest::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPerceptionPropertyChangeRequest)->get_Name(put_abi(value))); return value; } -template Windows::IInspectable impl_IPerceptionPropertyChangeRequest::Value() const +template Windows::Foundation::IInspectable impl_IPerceptionPropertyChangeRequest::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IPerceptionPropertyChangeRequest)->get_Value(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeStatus impl_IPerceptionPropertyChangeRequest::Status() const { Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPerceptionPropertyChangeRequest)->get_Status(&value)); return value; } template void impl_IPerceptionPropertyChangeRequest::Status(Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IPerceptionPropertyChangeRequest)->put_Status(value)); } template Windows::Foundation::Deferral impl_IPerceptionPropertyChangeRequest::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IPerceptionPropertyChangeRequest)->abi_GetDeferral(put_abi(result))); return result; } template Windows::Devices::Perception::Provider::IPerceptionFrameProvider impl_IPerceptionFrameProviderManager::GetFrameProvider(const Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo & frameProviderInfo) const { Windows::Devices::Perception::Provider::IPerceptionFrameProvider result; - check_hresult(static_cast(static_cast(*this))->abi_GetFrameProvider(get(frameProviderInfo), put(result))); + check_hresult(WINRT_SHIM(IPerceptionFrameProviderManager)->abi_GetFrameProvider(get_abi(frameProviderInfo), put_abi(result))); return result; } template Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo impl_IPerceptionFrameProvider::FrameProviderInfo() const { Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameProviderInfo(put(result))); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->get_FrameProviderInfo(put_abi(result))); return result; } template bool impl_IPerceptionFrameProvider::Available() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Available(&value)); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->get_Available(&value)); return value; } template Windows::Foundation::Collections::IPropertySet impl_IPerceptionFrameProvider::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->get_Properties(put_abi(value))); return value; } template void impl_IPerceptionFrameProvider::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->abi_Start()); } template void impl_IPerceptionFrameProvider::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->abi_Stop()); } template void impl_IPerceptionFrameProvider::SetProperty(const Windows::Devices::Perception::Provider::PerceptionPropertyChangeRequest & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetProperty(get(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameProvider)->abi_SetProperty(get_abi(value))); } template Windows::Devices::Perception::Provider::PerceptionFrame impl_IPerceptionVideoFrameAllocator::AllocateFrame() const { Windows::Devices::Perception::Provider::PerceptionFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AllocateFrame(put(value))); + check_hresult(WINRT_SHIM(IPerceptionVideoFrameAllocator)->abi_AllocateFrame(put_abi(value))); return value; } template Windows::Devices::Perception::Provider::PerceptionFrame impl_IPerceptionVideoFrameAllocator::CopyFromVideoFrame(const Windows::Media::VideoFrame & frame) const { Windows::Devices::Perception::Provider::PerceptionFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CopyFromVideoFrame(get(frame), put(value))); + check_hresult(WINRT_SHIM(IPerceptionVideoFrameAllocator)->abi_CopyFromVideoFrame(get_abi(frame), put_abi(value))); return value; } @@ -1169,19 +1224,19 @@ inline hstring KnownPerceptionFrameKind::Infrared() return get_activation_factory().Infrared(); } -inline PerceptionControlGroup::PerceptionControlGroup(const Windows::Foundation::Collections::IIterable & ids) : +inline PerceptionControlGroup::PerceptionControlGroup(iterable ids) : PerceptionControlGroup(get_activation_factory().Create(ids)) {} -inline PerceptionCorrelation::PerceptionCorrelation(hstring_ref targetId, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::quaternion & orientation) : +inline PerceptionCorrelation::PerceptionCorrelation(hstring_view targetId, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::quaternion & orientation) : PerceptionCorrelation(get_activation_factory().Create(targetId, position, orientation)) {} -inline PerceptionCorrelationGroup::PerceptionCorrelationGroup(const Windows::Foundation::Collections::IIterable & relativeLocations) : +inline PerceptionCorrelationGroup::PerceptionCorrelationGroup(iterable relativeLocations) : PerceptionCorrelationGroup(get_activation_factory().Create(relativeLocations)) {} -inline PerceptionFaceAuthenticationGroup::PerceptionFaceAuthenticationGroup(const Windows::Foundation::Collections::IIterable & ids, const Windows::Devices::Perception::Provider::PerceptionStartFaceAuthenticationHandler & startHandler, const Windows::Devices::Perception::Provider::PerceptionStopFaceAuthenticationHandler & stopHandler) : +inline PerceptionFaceAuthenticationGroup::PerceptionFaceAuthenticationGroup(iterable ids, const Windows::Devices::Perception::Provider::PerceptionStartFaceAuthenticationHandler & startHandler, const Windows::Devices::Perception::Provider::PerceptionStopFaceAuthenticationHandler & stopHandler) : PerceptionFaceAuthenticationGroup(get_activation_factory().Create(ids, startHandler, stopHandler)) {} @@ -1246,3 +1301,230 @@ inline PerceptionVideoFrameAllocator::PerceptionVideoFrameAllocator(uint32_t max } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IKnownPerceptionFrameKindStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionControlGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionControlGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionCorrelation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionCorrelationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionCorrelationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionCorrelationGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFaceAuthenticationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFaceAuthenticationGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFrameProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFrameProviderInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFrameProviderManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionFrameProviderManagerServiceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionPropertyChangeRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionVideoFrameAllocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::IPerceptionVideoFrameAllocatorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionControlGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionCorrelation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionCorrelationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionFaceAuthenticationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionFrameProviderInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionPropertyChangeRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::Provider::PerceptionVideoFrameAllocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Perception.h b/10.0.14393.0/winrt/Windows.Devices.Perception.h index 4710cbe16..b2417a187 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Perception.h +++ b/10.0.14393.0/winrt/Windows.Devices.Perception.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Enumeration.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,11 +23,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FocalLength(abi_arg_out value) noexcept override + HRESULT __stdcall get_FocalLength(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocalLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocalLength()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PrincipalPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrincipalPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrincipalPoint()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RadialDistortion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RadialDistortion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RadialDistortion()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TangentialDistortion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TangentialDistortion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TangentialDistortion()); return S_OK; } catch (...) @@ -80,11 +87,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Exposure(abi_arg_out value) noexcept override + HRESULT __stdcall get_Exposure(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Exposure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exposure()); return S_OK; } catch (...) @@ -94,11 +102,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AutoExposureEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoExposureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoExposureEnabled()); return S_OK; } catch (...) @@ -108,11 +117,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExposureCompensation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureCompensation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensation()); return S_OK; } catch (...) @@ -126,11 +136,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MinDepth(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinDepth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDepth()); return S_OK; } catch (...) @@ -140,11 +151,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxDepth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDepth()); return S_OK; } catch (...) @@ -158,11 +170,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -172,11 +185,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PhysicalDeviceIds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhysicalDeviceIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhysicalDeviceIds()); return S_OK; } catch (...) @@ -186,11 +200,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FrameKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameKind()); return S_OK; } catch (...) @@ -200,11 +215,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceModelVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceModelVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceModelVersion()); return S_OK; } catch (...) @@ -214,11 +230,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EnclosureLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnclosureLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnclosureLocation()); return S_OK; } catch (...) @@ -232,11 +249,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -250,11 +268,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Exposure(abi_arg_out value) noexcept override + HRESULT __stdcall get_Exposure(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Exposure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exposure()); return S_OK; } catch (...) @@ -264,11 +283,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AutoExposureEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoExposureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoExposureEnabled()); return S_OK; } catch (...) @@ -278,11 +298,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExposureCompensation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureCompensation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensation()); return S_OK; } catch (...) @@ -292,11 +313,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ActiveIlluminationEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActiveIlluminationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveIlluminationEnabled()); return S_OK; } catch (...) @@ -306,11 +328,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AmbientSubtractionEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AmbientSubtractionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AmbientSubtractionEnabled()); return S_OK; } catch (...) @@ -320,11 +343,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StructureLightPatternEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StructureLightPatternEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StructureLightPatternEnabled()); return S_OK; } catch (...) @@ -334,11 +358,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_InterleavedIlluminationEnabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InterleavedIlluminationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterleavedIlluminationEnabled()); return S_OK; } catch (...) @@ -352,11 +377,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VideoProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProfile()); return S_OK; } catch (...) @@ -366,11 +392,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SupportedVideoProfiles(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportedVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVideoProfiles()); return S_OK; } catch (...) @@ -380,11 +407,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AvailableVideoProfiles(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AvailableVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableVideoProfiles()); return S_OK; } catch (...) @@ -394,11 +422,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsMirrored(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsMirrored()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMirrored()); return S_OK; } catch (...) @@ -408,11 +437,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CameraIntrinsics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraIntrinsics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraIntrinsics()); return S_OK; } catch (...) @@ -426,11 +456,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_BitmapPixelFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_BitmapPixelFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapPixelFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapPixelFormat()); return S_OK; } catch (...) @@ -440,11 +471,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BitmapAlphaMode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapAlphaMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapAlphaMode()); return S_OK; } catch (...) @@ -454,11 +486,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Width(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -468,11 +501,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Height(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -482,11 +516,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FrameDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameDuration()); return S_OK; } catch (...) @@ -500,11 +535,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VideoFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFrame()); return S_OK; } catch (...) @@ -518,11 +554,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_RelativeTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelativeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeTime()); return S_OK; } catch (...) @@ -531,11 +568,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_TryOpenFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryOpenFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryOpenFrame()); return S_OK; } catch (...) @@ -549,11 +587,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_FrameArrived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FrameArrived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -566,6 +605,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(token); return S_OK; } @@ -575,11 +615,12 @@ struct produce : p } } - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -593,7 +634,8 @@ struct produce : p { try { - *value = detach(this->shim().IsPaused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaused()); return S_OK; } catch (...) @@ -606,6 +648,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPaused(value); return S_OK; } @@ -615,11 +658,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryReadLatestFrame(abi_arg_out result) noexcept override + HRESULT __stdcall abi_TryReadLatestFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryReadLatestFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryReadLatestFrame()); return S_OK; } catch (...) @@ -633,11 +677,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall add_AvailableChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AvailableChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -650,6 +695,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().AvailableChanged(token); return S_OK; } @@ -659,11 +705,12 @@ struct produce : p } } - HRESULT __stdcall add_ActiveChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ActiveChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -676,6 +723,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ActiveChanged(token); return S_OK; } @@ -685,11 +733,12 @@ struct produce : p } } - HRESULT __stdcall add_PropertiesChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PropertiesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -702,6 +751,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().PropertiesChanged(token); return S_OK; } @@ -711,11 +761,12 @@ struct produce : p } } - HRESULT __stdcall add_VideoProfileChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VideoProfileChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -728,6 +779,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoProfileChanged(token); return S_OK; } @@ -737,11 +789,12 @@ struct produce : p } } - HRESULT __stdcall add_CameraIntrinsicsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraIntrinsicsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -754,6 +807,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraIntrinsicsChanged(token); return S_OK; } @@ -763,11 +817,12 @@ struct produce : p } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -777,11 +832,12 @@ struct produce : p } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -791,11 +847,12 @@ struct produce : p } } - HRESULT __stdcall get_DeviceKind(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceKind()); return S_OK; } catch (...) @@ -809,7 +866,8 @@ struct produce : p { try { - *value = detach(this->shim().Available()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Available()); return S_OK; } catch (...) @@ -822,7 +880,8 @@ struct produce : p { try { - *value = detach(this->shim().Active()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Active()); return S_OK; } catch (...) @@ -835,7 +894,8 @@ struct produce : p { try { - *value = detach(this->shim().IsControlled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsControlled()); return S_OK; } catch (...) @@ -844,11 +904,12 @@ struct produce : p } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -858,11 +919,12 @@ struct produce : p } } - HRESULT __stdcall get_SupportedVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVideoProfiles()); return S_OK; } catch (...) @@ -872,11 +934,12 @@ struct produce : p } } - HRESULT __stdcall get_AvailableVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AvailableVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableVideoProfiles()); return S_OK; } catch (...) @@ -886,11 +949,12 @@ struct produce : p } } - HRESULT __stdcall get_VideoProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProfile()); return S_OK; } catch (...) @@ -900,11 +964,12 @@ struct produce : p } } - HRESULT __stdcall get_CameraIntrinsics(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraIntrinsics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraIntrinsics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraIntrinsics()); return S_OK; } catch (...) @@ -914,11 +979,12 @@ struct produce : p } } - HRESULT __stdcall abi_AcquireControlSession(abi_arg_out value) noexcept override + HRESULT __stdcall abi_AcquireControlSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcquireControlSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcquireControlSession()); return S_OK; } catch (...) @@ -928,11 +994,12 @@ struct produce : p } } - HRESULT __stdcall abi_CanControlIndependentlyFrom(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_CanControlIndependentlyFrom(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -941,11 +1008,12 @@ struct produce : p } } - HRESULT __stdcall abi_IsCorrelatedWith(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_IsCorrelatedWith(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -954,11 +1022,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetTransformTo(abi_arg_in targetId, abi_arg_out result, bool * hasResult) noexcept override + HRESULT __stdcall abi_TryGetTransformTo(impl::abi_arg_in targetId, impl::abi_arg_out result, bool * hasResult) noexcept override { try { - *hasResult = detach(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); + typename D::abi_guard guard(this->shim()); + *hasResult = detach_abi(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); return S_OK; } catch (...) @@ -967,11 +1036,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(abi_arg_in correlatedDepthFrameSource, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(impl::abi_arg_in correlatedDepthFrameSource, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&correlatedDepthFrameSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&correlatedDepthFrameSource))); return S_OK; } catch (...) @@ -981,11 +1051,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(abi_arg_in targetSourceId, abi_arg_in correlatedDepthFrameSource, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(impl::abi_arg_in targetSourceId, impl::abi_arg_in correlatedDepthFrameSource, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetSourceId), *reinterpret_cast(&correlatedDepthFrameSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetSourceId), *reinterpret_cast(&correlatedDepthFrameSource))); return S_OK; } catch (...) @@ -995,11 +1066,12 @@ struct produce : p } } - HRESULT __stdcall abi_TrySetVideoProfileAsync(abi_arg_in controlSession, abi_arg_in profile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySetVideoProfileAsync(impl::abi_arg_in controlSession, impl::abi_arg_in profile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1009,11 +1081,12 @@ struct produce : p } } - HRESULT __stdcall abi_OpenReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_OpenReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OpenReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OpenReader()); return S_OK; } catch (...) @@ -1027,11 +1100,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1045,11 +1119,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -1063,11 +1138,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -1081,11 +1157,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -1095,11 +1172,12 @@ struct produce>> result) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -1109,11 +1187,12 @@ struct produce id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1123,11 +1202,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -1141,11 +1221,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_SourceAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1158,6 +1239,7 @@ struct produceshim()); this->shim().SourceAdded(token); return S_OK; } @@ -1167,11 +1249,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1184,6 +1267,7 @@ struct produceshim()); this->shim().SourceRemoved(token); return S_OK; } @@ -1193,11 +1277,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1210,6 +1295,7 @@ struct produceshim()); this->shim().Stopped(token); return S_OK; } @@ -1219,11 +1305,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1236,6 +1323,7 @@ struct produceshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -1249,7 +1337,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1262,6 +1351,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -1275,6 +1365,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -1288,11 +1379,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_ControlLost(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ControlLost(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ControlLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ControlLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1305,6 +1397,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().ControlLost(token); return S_OK; } @@ -1314,11 +1407,12 @@ struct produce : pro } } - HRESULT __stdcall abi_TrySetPropertyAsync(abi_arg_in name, abi_arg_in value, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySetPropertyAsync(impl::abi_arg_in name, impl::abi_arg_in value, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySetPropertyAsync(*reinterpret_cast(&name), *reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetPropertyAsync(*reinterpret_cast(&name), *reinterpret_cast(&value))); return S_OK; } catch (...) @@ -1332,11 +1426,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_UnprojectPixelAtCorrelatedDepth(abi_arg_in pixelCoordinate, abi_arg_in depthFrame, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnprojectPixelAtCorrelatedDepth(impl::abi_arg_in pixelCoordinate, impl::abi_arg_in depthFrame, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnprojectPixelAtCorrelatedDepth(*reinterpret_cast(&pixelCoordinate), *reinterpret_cast(&depthFrame))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprojectPixelAtCorrelatedDepth(*reinterpret_cast(&pixelCoordinate), *reinterpret_cast(&depthFrame))); return S_OK; } catch (...) @@ -1345,10 +1440,11 @@ struct produce * sourceCoordinates, abi_arg_in depthFrame, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_UnprojectPixelsAtCorrelatedDepth(uint32_t __sourceCoordinatesSize, impl::abi_arg_in * sourceCoordinates, impl::abi_arg_in depthFrame, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnprojectPixelsAtCorrelatedDepth(*reinterpret_cast(&sourceCoordinates), *reinterpret_cast(&depthFrame), *results); return S_OK; } @@ -1358,11 +1454,12 @@ struct produce region, abi_arg_in depthFrame, uint32_t __resultsSize, abi_arg_out results, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnprojectRegionPixelsAtCorrelatedDepthAsync(impl::abi_arg_in region, impl::abi_arg_in depthFrame, uint32_t __resultsSize, impl::abi_arg_out results, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnprojectRegionPixelsAtCorrelatedDepthAsync(*reinterpret_cast(®ion), *reinterpret_cast(&depthFrame), *results)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprojectRegionPixelsAtCorrelatedDepthAsync(*reinterpret_cast(®ion), *reinterpret_cast(&depthFrame), *results)); return S_OK; } catch (...) @@ -1372,11 +1469,12 @@ struct produce depthFrame, uint32_t __resultsSize, abi_arg_out results, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnprojectAllPixelsAtCorrelatedDepthAsync(impl::abi_arg_in depthFrame, uint32_t __resultsSize, impl::abi_arg_out results, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnprojectAllPixelsAtCorrelatedDepthAsync(*reinterpret_cast(&depthFrame), *results)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprojectAllPixelsAtCorrelatedDepthAsync(*reinterpret_cast(&depthFrame), *results)); return S_OK; } catch (...) @@ -1390,11 +1488,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_MapPixelToTarget(abi_arg_in sourcePixelCoordinate, abi_arg_in depthFrame, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MapPixelToTarget(impl::abi_arg_in sourcePixelCoordinate, impl::abi_arg_in depthFrame, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MapPixelToTarget(*reinterpret_cast(&sourcePixelCoordinate), *reinterpret_cast(&depthFrame))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MapPixelToTarget(*reinterpret_cast(&sourcePixelCoordinate), *reinterpret_cast(&depthFrame))); return S_OK; } catch (...) @@ -1403,10 +1502,11 @@ struct produce * sourceCoordinates, abi_arg_in depthFrame, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_MapPixelsToTarget(uint32_t __sourceCoordinatesSize, impl::abi_arg_in * sourceCoordinates, impl::abi_arg_in depthFrame, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MapPixelsToTarget(*reinterpret_cast(&sourceCoordinates), *reinterpret_cast(&depthFrame), *results); return S_OK; } @@ -1416,11 +1516,12 @@ struct produce region, abi_arg_in depthFrame, uint32_t __targetCoordinatesSize, abi_arg_out targetCoordinates, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MapRegionOfPixelsToTargetAsync(impl::abi_arg_in region, impl::abi_arg_in depthFrame, uint32_t __targetCoordinatesSize, impl::abi_arg_out targetCoordinates, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MapRegionOfPixelsToTargetAsync(*reinterpret_cast(®ion), *reinterpret_cast(&depthFrame), *targetCoordinates)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MapRegionOfPixelsToTargetAsync(*reinterpret_cast(®ion), *reinterpret_cast(&depthFrame), *targetCoordinates)); return S_OK; } catch (...) @@ -1430,11 +1531,12 @@ struct produce depthFrame, uint32_t __targetCoordinatesSize, abi_arg_out targetCoordinates, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MapAllPixelsToTargetAsync(impl::abi_arg_in depthFrame, uint32_t __targetCoordinatesSize, impl::abi_arg_out targetCoordinates, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MapAllPixelsToTargetAsync(*reinterpret_cast(&depthFrame), *targetCoordinates)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MapAllPixelsToTargetAsync(*reinterpret_cast(&depthFrame), *targetCoordinates)); return S_OK; } catch (...) @@ -1448,11 +1550,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VideoFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFrame()); return S_OK; } catch (...) @@ -1466,11 +1569,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_RelativeTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelativeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeTime()); return S_OK; } catch (...) @@ -1479,11 +1583,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_TryOpenFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryOpenFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryOpenFrame()); return S_OK; } catch (...) @@ -1497,11 +1602,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_FrameArrived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FrameArrived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1514,6 +1620,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(token); return S_OK; } @@ -1523,11 +1630,12 @@ struct produce : p } } - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1541,7 +1649,8 @@ struct produce : p { try { - *value = detach(this->shim().IsPaused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaused()); return S_OK; } catch (...) @@ -1554,6 +1663,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPaused(value); return S_OK; } @@ -1563,11 +1673,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryReadLatestFrame(abi_arg_out result) noexcept override + HRESULT __stdcall abi_TryReadLatestFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryReadLatestFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryReadLatestFrame()); return S_OK; } catch (...) @@ -1581,11 +1692,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall add_AvailableChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AvailableChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1598,6 +1710,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().AvailableChanged(token); return S_OK; } @@ -1607,11 +1720,12 @@ struct produce : p } } - HRESULT __stdcall add_ActiveChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ActiveChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1624,6 +1738,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ActiveChanged(token); return S_OK; } @@ -1633,11 +1748,12 @@ struct produce : p } } - HRESULT __stdcall add_PropertiesChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PropertiesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1650,6 +1766,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().PropertiesChanged(token); return S_OK; } @@ -1659,11 +1776,12 @@ struct produce : p } } - HRESULT __stdcall add_VideoProfileChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VideoProfileChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1676,6 +1794,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoProfileChanged(token); return S_OK; } @@ -1685,11 +1804,12 @@ struct produce : p } } - HRESULT __stdcall add_CameraIntrinsicsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraIntrinsicsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1702,6 +1822,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraIntrinsicsChanged(token); return S_OK; } @@ -1711,11 +1832,12 @@ struct produce : p } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1725,11 +1847,12 @@ struct produce : p } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1739,11 +1862,12 @@ struct produce : p } } - HRESULT __stdcall get_DeviceKind(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceKind()); return S_OK; } catch (...) @@ -1757,7 +1881,8 @@ struct produce : p { try { - *value = detach(this->shim().Available()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Available()); return S_OK; } catch (...) @@ -1770,7 +1895,8 @@ struct produce : p { try { - *value = detach(this->shim().Active()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Active()); return S_OK; } catch (...) @@ -1783,7 +1909,8 @@ struct produce : p { try { - *value = detach(this->shim().IsControlled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsControlled()); return S_OK; } catch (...) @@ -1792,11 +1919,12 @@ struct produce : p } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -1806,11 +1934,12 @@ struct produce : p } } - HRESULT __stdcall get_SupportedVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVideoProfiles()); return S_OK; } catch (...) @@ -1820,11 +1949,12 @@ struct produce : p } } - HRESULT __stdcall get_AvailableVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AvailableVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableVideoProfiles()); return S_OK; } catch (...) @@ -1834,11 +1964,12 @@ struct produce : p } } - HRESULT __stdcall get_VideoProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProfile()); return S_OK; } catch (...) @@ -1848,11 +1979,12 @@ struct produce : p } } - HRESULT __stdcall get_CameraIntrinsics(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraIntrinsics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraIntrinsics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraIntrinsics()); return S_OK; } catch (...) @@ -1862,11 +1994,12 @@ struct produce : p } } - HRESULT __stdcall abi_AcquireControlSession(abi_arg_out result) noexcept override + HRESULT __stdcall abi_AcquireControlSession(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AcquireControlSession()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AcquireControlSession()); return S_OK; } catch (...) @@ -1876,11 +2009,12 @@ struct produce : p } } - HRESULT __stdcall abi_CanControlIndependentlyFrom(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_CanControlIndependentlyFrom(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -1889,11 +2023,12 @@ struct produce : p } } - HRESULT __stdcall abi_IsCorrelatedWith(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_IsCorrelatedWith(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -1902,11 +2037,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetTransformTo(abi_arg_in targetId, abi_arg_out result, bool * hasResult) noexcept override + HRESULT __stdcall abi_TryGetTransformTo(impl::abi_arg_in targetId, impl::abi_arg_out result, bool * hasResult) noexcept override { try { - *hasResult = detach(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); + typename D::abi_guard guard(this->shim()); + *hasResult = detach_abi(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); return S_OK; } catch (...) @@ -1915,11 +2051,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(abi_arg_in target, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(impl::abi_arg_in target, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -1929,11 +2066,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(abi_arg_in targetId, abi_arg_in depthFrameSourceToMapWith, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(impl::abi_arg_in targetId, impl::abi_arg_in depthFrameSourceToMapWith, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetId), *reinterpret_cast(&depthFrameSourceToMapWith))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetId), *reinterpret_cast(&depthFrameSourceToMapWith))); return S_OK; } catch (...) @@ -1943,11 +2081,12 @@ struct produce : p } } - HRESULT __stdcall abi_TrySetVideoProfileAsync(abi_arg_in controlSession, abi_arg_in profile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySetVideoProfileAsync(impl::abi_arg_in controlSession, impl::abi_arg_in profile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1957,11 +2096,12 @@ struct produce : p } } - HRESULT __stdcall abi_OpenReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_OpenReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OpenReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OpenReader()); return S_OK; } catch (...) @@ -1975,11 +2115,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1993,11 +2134,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -2011,11 +2153,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -2029,11 +2172,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -2043,11 +2187,12 @@ struct produce>> result) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -2057,11 +2202,12 @@ struct produce id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -2071,11 +2217,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -2089,11 +2236,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_SourceAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2106,6 +2254,7 @@ struct produceshim()); this->shim().SourceAdded(token); return S_OK; } @@ -2115,11 +2264,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2132,6 +2282,7 @@ struct produceshim()); this->shim().SourceRemoved(token); return S_OK; } @@ -2141,11 +2292,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2158,6 +2310,7 @@ struct produceshim()); this->shim().Stopped(token); return S_OK; } @@ -2167,11 +2320,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2184,6 +2338,7 @@ struct produceshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -2197,7 +2352,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2210,6 +2366,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -2223,6 +2380,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -2240,7 +2398,8 @@ struct produceshim().CollectionChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CollectionChange()); return S_OK; } catch (...) @@ -2249,11 +2408,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Key(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Key()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Key()); return S_OK; } catch (...) @@ -2271,7 +2431,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2280,11 +2441,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NewValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewValue()); return S_OK; } catch (...) @@ -2298,11 +2460,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VideoFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFrame()); return S_OK; } catch (...) @@ -2316,11 +2479,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_RelativeTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelativeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeTime()); return S_OK; } catch (...) @@ -2329,11 +2493,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_TryOpenFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryOpenFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryOpenFrame()); return S_OK; } catch (...) @@ -2347,11 +2512,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_FrameArrived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FrameArrived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2364,6 +2530,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(token); return S_OK; } @@ -2373,11 +2540,12 @@ struct produce } } - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -2391,7 +2559,8 @@ struct produce { try { - *value = detach(this->shim().IsPaused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaused()); return S_OK; } catch (...) @@ -2404,6 +2573,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPaused(value); return S_OK; } @@ -2413,11 +2583,12 @@ struct produce } } - HRESULT __stdcall abi_TryReadLatestFrame(abi_arg_out result) noexcept override + HRESULT __stdcall abi_TryReadLatestFrame(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryReadLatestFrame()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryReadLatestFrame()); return S_OK; } catch (...) @@ -2431,11 +2602,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall add_AvailableChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AvailableChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AvailableChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2448,6 +2620,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AvailableChanged(token); return S_OK; } @@ -2457,11 +2630,12 @@ struct produce } } - HRESULT __stdcall add_ActiveChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ActiveChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActiveChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2474,6 +2648,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ActiveChanged(token); return S_OK; } @@ -2483,11 +2658,12 @@ struct produce } } - HRESULT __stdcall add_PropertiesChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PropertiesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PropertiesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2500,6 +2676,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PropertiesChanged(token); return S_OK; } @@ -2509,11 +2686,12 @@ struct produce } } - HRESULT __stdcall add_VideoProfileChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VideoProfileChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VideoProfileChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2526,6 +2704,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoProfileChanged(token); return S_OK; } @@ -2535,11 +2714,12 @@ struct produce } } - HRESULT __stdcall add_CameraIntrinsicsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraIntrinsicsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraIntrinsicsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2552,6 +2732,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraIntrinsicsChanged(token); return S_OK; } @@ -2561,11 +2742,12 @@ struct produce } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2575,11 +2757,12 @@ struct produce } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2589,11 +2772,12 @@ struct produce } } - HRESULT __stdcall get_DeviceKind(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceKind()); return S_OK; } catch (...) @@ -2607,7 +2791,8 @@ struct produce { try { - *value = detach(this->shim().Available()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Available()); return S_OK; } catch (...) @@ -2620,7 +2805,8 @@ struct produce { try { - *value = detach(this->shim().Active()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Active()); return S_OK; } catch (...) @@ -2633,7 +2819,8 @@ struct produce { try { - *value = detach(this->shim().IsControlled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsControlled()); return S_OK; } catch (...) @@ -2642,11 +2829,12 @@ struct produce } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -2656,11 +2844,12 @@ struct produce } } - HRESULT __stdcall get_SupportedVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVideoProfiles()); return S_OK; } catch (...) @@ -2670,11 +2859,12 @@ struct produce } } - HRESULT __stdcall get_AvailableVideoProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AvailableVideoProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableVideoProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableVideoProfiles()); return S_OK; } catch (...) @@ -2684,11 +2874,12 @@ struct produce } } - HRESULT __stdcall get_VideoProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProfile()); return S_OK; } catch (...) @@ -2698,11 +2889,12 @@ struct produce } } - HRESULT __stdcall get_CameraIntrinsics(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraIntrinsics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraIntrinsics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraIntrinsics()); return S_OK; } catch (...) @@ -2712,11 +2904,12 @@ struct produce } } - HRESULT __stdcall abi_AcquireControlSession(abi_arg_out result) noexcept override + HRESULT __stdcall abi_AcquireControlSession(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AcquireControlSession()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AcquireControlSession()); return S_OK; } catch (...) @@ -2726,11 +2919,12 @@ struct produce } } - HRESULT __stdcall abi_CanControlIndependentlyFrom(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_CanControlIndependentlyFrom(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanControlIndependentlyFrom(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -2739,11 +2933,12 @@ struct produce } } - HRESULT __stdcall abi_IsCorrelatedWith(abi_arg_in targetId, bool * result) noexcept override + HRESULT __stdcall abi_IsCorrelatedWith(impl::abi_arg_in targetId, bool * result) noexcept override { try { - *result = detach(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsCorrelatedWith(*reinterpret_cast(&targetId))); return S_OK; } catch (...) @@ -2752,11 +2947,12 @@ struct produce } } - HRESULT __stdcall abi_TryGetTransformTo(abi_arg_in targetId, abi_arg_out result, bool * hasResult) noexcept override + HRESULT __stdcall abi_TryGetTransformTo(impl::abi_arg_in targetId, impl::abi_arg_out result, bool * hasResult) noexcept override { try { - *hasResult = detach(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); + typename D::abi_guard guard(this->shim()); + *hasResult = detach_abi(this->shim().TryGetTransformTo(*reinterpret_cast(&targetId), *result)); return S_OK; } catch (...) @@ -2765,11 +2961,12 @@ struct produce } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(abi_arg_in target, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(impl::abi_arg_in target, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCameraIntrinsicsAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -2779,11 +2976,12 @@ struct produce } } - HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(abi_arg_in targetId, abi_arg_in depthFrameSourceToMapWith, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryGetDepthCorrelatedCoordinateMapperAsync(impl::abi_arg_in targetId, impl::abi_arg_in depthFrameSourceToMapWith, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetId), *reinterpret_cast(&depthFrameSourceToMapWith))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetDepthCorrelatedCoordinateMapperAsync(*reinterpret_cast(&targetId), *reinterpret_cast(&depthFrameSourceToMapWith))); return S_OK; } catch (...) @@ -2793,11 +2991,12 @@ struct produce } } - HRESULT __stdcall abi_TrySetVideoProfileAsync(abi_arg_in controlSession, abi_arg_in profile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TrySetVideoProfileAsync(impl::abi_arg_in controlSession, impl::abi_arg_in profile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetVideoProfileAsync(*reinterpret_cast(&controlSession), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -2807,11 +3006,12 @@ struct produce } } - HRESULT __stdcall abi_OpenReader(abi_arg_out result) noexcept override + HRESULT __stdcall abi_OpenReader(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().OpenReader()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OpenReader()); return S_OK; } catch (...) @@ -2825,11 +3025,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2843,11 +3044,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -2861,11 +3063,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FrameSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSource()); return S_OK; } catch (...) @@ -2879,11 +3082,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -2893,11 +3097,12 @@ struct produce>> result) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -2907,11 +3112,12 @@ struct produce id, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in id, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -2921,11 +3127,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -2939,11 +3146,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_SourceAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2956,6 +3164,7 @@ struct produceshim()); this->shim().SourceAdded(token); return S_OK; } @@ -2965,11 +3174,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2982,6 +3192,7 @@ struct produceshim()); this->shim().SourceRemoved(token); return S_OK; } @@ -2991,11 +3202,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3008,6 +3220,7 @@ struct produceshim()); this->shim().Stopped(token); return S_OK; } @@ -3017,11 +3230,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3034,6 +3248,7 @@ struct produceshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -3047,7 +3262,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -3060,6 +3276,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -3073,6 +3290,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -3090,7 +3308,8 @@ struct produce : produ { try { - *value = detach(this->shim().BitmapPixelFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapPixelFormat()); return S_OK; } catch (...) @@ -3103,7 +3322,8 @@ struct produce : produ { try { - *value = detach(this->shim().BitmapAlphaMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapAlphaMode()); return S_OK; } catch (...) @@ -3116,7 +3336,8 @@ struct produce : produ { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -3129,7 +3350,8 @@ struct produce : produ { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -3138,11 +3360,12 @@ struct produce : produ } } - HRESULT __stdcall get_FrameDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameDuration()); return S_OK; } catch (...) @@ -3151,11 +3374,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsEqual(abi_arg_in other, bool * result) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in other, bool * result) noexcept override { try { - *result = detach(this->shim().IsEqual(*reinterpret_cast(&other))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsEqual(*reinterpret_cast(&other))); return S_OK; } catch (...) @@ -3172,7 +3396,7 @@ namespace Windows::Devices::Perception { template event_token impl_IPerceptionColorFrameSourceWatcher::SourceAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->add_SourceAdded(get_abi(handler), &token)); return token; } @@ -3183,13 +3407,13 @@ template event_revoker impl_IPe template void impl_IPerceptionColorFrameSourceWatcher::SourceAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceAdded(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->remove_SourceAdded(token)); } template event_token impl_IPerceptionColorFrameSourceWatcher::SourceRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->add_SourceRemoved(get_abi(handler), &token)); return token; } @@ -3200,64 +3424,64 @@ template event_revoker impl_IPe template void impl_IPerceptionColorFrameSourceWatcher::SourceRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceRemoved(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->remove_SourceRemoved(token)); } -template event_token impl_IPerceptionColorFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSourceWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPerceptionColorFrameSourceWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->remove_Stopped(token)); } -template event_token impl_IPerceptionColorFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSourceWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPerceptionColorFrameSourceWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->remove_EnumerationCompleted(token)); } template Windows::Devices::Enumeration::DeviceWatcherStatus impl_IPerceptionColorFrameSourceWatcher::Status() const { Windows::Devices::Enumeration::DeviceWatcherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->get_Status(&value)); return value; } template void impl_IPerceptionColorFrameSourceWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->abi_Start()); } template void impl_IPerceptionColorFrameSourceWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceWatcher)->abi_Stop()); } template event_token impl_IPerceptionDepthFrameSourceWatcher::SourceAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->add_SourceAdded(get_abi(handler), &token)); return token; } @@ -3268,13 +3492,13 @@ template event_revoker impl_IPe template void impl_IPerceptionDepthFrameSourceWatcher::SourceAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceAdded(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->remove_SourceAdded(token)); } template event_token impl_IPerceptionDepthFrameSourceWatcher::SourceRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->add_SourceRemoved(get_abi(handler), &token)); return token; } @@ -3285,64 +3509,64 @@ template event_revoker impl_IPe template void impl_IPerceptionDepthFrameSourceWatcher::SourceRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceRemoved(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->remove_SourceRemoved(token)); } -template event_token impl_IPerceptionDepthFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSourceWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPerceptionDepthFrameSourceWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->remove_Stopped(token)); } -template event_token impl_IPerceptionDepthFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSourceWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPerceptionDepthFrameSourceWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->remove_EnumerationCompleted(token)); } template Windows::Devices::Enumeration::DeviceWatcherStatus impl_IPerceptionDepthFrameSourceWatcher::Status() const { Windows::Devices::Enumeration::DeviceWatcherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->get_Status(&value)); return value; } template void impl_IPerceptionDepthFrameSourceWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->abi_Start()); } template void impl_IPerceptionDepthFrameSourceWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceWatcher)->abi_Stop()); } template event_token impl_IPerceptionInfraredFrameSourceWatcher::SourceAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->add_SourceAdded(get_abi(handler), &token)); return token; } @@ -3353,13 +3577,13 @@ template event_revoker impl_ template void impl_IPerceptionInfraredFrameSourceWatcher::SourceAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceAdded(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->remove_SourceAdded(token)); } template event_token impl_IPerceptionInfraredFrameSourceWatcher::SourceRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->add_SourceRemoved(get_abi(handler), &token)); return token; } @@ -3370,476 +3594,476 @@ template event_revoker impl_ template void impl_IPerceptionInfraredFrameSourceWatcher::SourceRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceRemoved(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->remove_SourceRemoved(token)); } -template event_token impl_IPerceptionInfraredFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSourceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSourceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSourceWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPerceptionInfraredFrameSourceWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->remove_Stopped(token)); } -template event_token impl_IPerceptionInfraredFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSourceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSourceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSourceWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPerceptionInfraredFrameSourceWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->remove_EnumerationCompleted(token)); } template Windows::Devices::Enumeration::DeviceWatcherStatus impl_IPerceptionInfraredFrameSourceWatcher::Status() const { Windows::Devices::Enumeration::DeviceWatcherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->get_Status(&value)); return value; } template void impl_IPerceptionInfraredFrameSourceWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->abi_Start()); } template void impl_IPerceptionInfraredFrameSourceWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceWatcher)->abi_Stop()); } template Windows::Devices::Perception::PerceptionColorFrameSource impl_IPerceptionColorFrameSourceAddedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionColorFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceAddedEventArgs)->get_FrameSource(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionColorFrameSource impl_IPerceptionColorFrameSourceRemovedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionColorFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceRemovedEventArgs)->get_FrameSource(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionDepthFrameSource impl_IPerceptionDepthFrameSourceAddedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionDepthFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceAddedEventArgs)->get_FrameSource(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionDepthFrameSource impl_IPerceptionDepthFrameSourceRemovedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionDepthFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceRemovedEventArgs)->get_FrameSource(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionInfraredFrameSource impl_IPerceptionInfraredFrameSourceAddedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionInfraredFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceAddedEventArgs)->get_FrameSource(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionInfraredFrameSource impl_IPerceptionInfraredFrameSourceRemovedEventArgs::FrameSource() const { Windows::Devices::Perception::PerceptionInfraredFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameSource(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceRemovedEventArgs)->get_FrameSource(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics)->get_Id(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics::PhysicalDeviceIds() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhysicalDeviceIds(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics)->get_PhysicalDeviceIds(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics::FrameKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrameKind(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics)->get_FrameKind(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics::DeviceModelVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceModelVersion(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics)->get_DeviceModelVersion(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics::EnclosureLocation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnclosureLocation(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics)->get_EnclosureLocation(put_abi(value))); return value; } template hstring impl_IKnownPerceptionFrameSourcePropertiesStatics2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionFrameSourcePropertiesStatics2)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoFrameSourcePropertiesStatics::VideoProfile() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoProfile(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoFrameSourcePropertiesStatics)->get_VideoProfile(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoFrameSourcePropertiesStatics::SupportedVideoProfiles() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoFrameSourcePropertiesStatics)->get_SupportedVideoProfiles(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoFrameSourcePropertiesStatics::AvailableVideoProfiles() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AvailableVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoFrameSourcePropertiesStatics)->get_AvailableVideoProfiles(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoFrameSourcePropertiesStatics::IsMirrored() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsMirrored(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoFrameSourcePropertiesStatics)->get_IsMirrored(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoFrameSourcePropertiesStatics::CameraIntrinsics() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CameraIntrinsics(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoFrameSourcePropertiesStatics)->get_CameraIntrinsics(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::Exposure() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Exposure(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_Exposure(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::AutoExposureEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AutoExposureEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_AutoExposureEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::ExposureCompensation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensation(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_ExposureCompensation(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::ActiveIlluminationEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ActiveIlluminationEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_ActiveIlluminationEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::AmbientSubtractionEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AmbientSubtractionEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_AmbientSubtractionEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::StructureLightPatternEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StructureLightPatternEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_StructureLightPatternEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionInfraredFrameSourcePropertiesStatics::InterleavedIlluminationEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InterleavedIlluminationEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionInfraredFrameSourcePropertiesStatics)->get_InterleavedIlluminationEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionDepthFrameSourcePropertiesStatics::MinDepth() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MinDepth(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionDepthFrameSourcePropertiesStatics)->get_MinDepth(put_abi(value))); return value; } template hstring impl_IKnownPerceptionDepthFrameSourcePropertiesStatics::MaxDepth() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MaxDepth(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionDepthFrameSourcePropertiesStatics)->get_MaxDepth(put_abi(value))); return value; } template hstring impl_IKnownPerceptionColorFrameSourcePropertiesStatics::Exposure() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Exposure(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionColorFrameSourcePropertiesStatics)->get_Exposure(put_abi(value))); return value; } template hstring impl_IKnownPerceptionColorFrameSourcePropertiesStatics::AutoExposureEnabled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AutoExposureEnabled(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionColorFrameSourcePropertiesStatics)->get_AutoExposureEnabled(put_abi(value))); return value; } template hstring impl_IKnownPerceptionColorFrameSourcePropertiesStatics::ExposureCompensation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensation(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionColorFrameSourcePropertiesStatics)->get_ExposureCompensation(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoProfilePropertiesStatics::BitmapPixelFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BitmapPixelFormat(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoProfilePropertiesStatics)->get_BitmapPixelFormat(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoProfilePropertiesStatics::BitmapAlphaMode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BitmapAlphaMode(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoProfilePropertiesStatics)->get_BitmapAlphaMode(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoProfilePropertiesStatics::Width() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Width(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoProfilePropertiesStatics)->get_Width(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoProfilePropertiesStatics::Height() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Height(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoProfilePropertiesStatics)->get_Height(put_abi(value))); return value; } template hstring impl_IKnownPerceptionVideoProfilePropertiesStatics::FrameDuration() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrameDuration(put(value))); + check_hresult(WINRT_SHIM(IKnownPerceptionVideoProfilePropertiesStatics)->get_FrameDuration(put_abi(value))); return value; } template hstring impl_IKnownCameraIntrinsicsPropertiesStatics::FocalLength() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FocalLength(put(value))); + check_hresult(WINRT_SHIM(IKnownCameraIntrinsicsPropertiesStatics)->get_FocalLength(put_abi(value))); return value; } template hstring impl_IKnownCameraIntrinsicsPropertiesStatics::PrincipalPoint() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrincipalPoint(put(value))); + check_hresult(WINRT_SHIM(IKnownCameraIntrinsicsPropertiesStatics)->get_PrincipalPoint(put_abi(value))); return value; } template hstring impl_IKnownCameraIntrinsicsPropertiesStatics::RadialDistortion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RadialDistortion(put(value))); + check_hresult(WINRT_SHIM(IKnownCameraIntrinsicsPropertiesStatics)->get_RadialDistortion(put_abi(value))); return value; } template hstring impl_IKnownCameraIntrinsicsPropertiesStatics::TangentialDistortion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TangentialDistortion(put(value))); + check_hresult(WINRT_SHIM(IKnownCameraIntrinsicsPropertiesStatics)->get_TangentialDistortion(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeStatus impl_IPerceptionFrameSourcePropertyChangeResult::Status() const { Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPerceptionFrameSourcePropertyChangeResult)->get_Status(&value)); return value; } -template Windows::IInspectable impl_IPerceptionFrameSourcePropertyChangeResult::NewValue() const +template Windows::Foundation::IInspectable impl_IPerceptionFrameSourcePropertyChangeResult::NewValue() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_NewValue(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IPerceptionFrameSourcePropertyChangeResult)->get_NewValue(put_abi(value))); return value; } template Windows::Foundation::Collections::CollectionChange impl_IPerceptionFrameSourcePropertiesChangedEventArgs::CollectionChange() const { Windows::Foundation::Collections::CollectionChange value {}; - check_hresult(static_cast(static_cast(*this))->get_CollectionChange(&value)); + check_hresult(WINRT_SHIM(IPerceptionFrameSourcePropertiesChangedEventArgs)->get_CollectionChange(&value)); return value; } template hstring impl_IPerceptionFrameSourcePropertiesChangedEventArgs::Key() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Key(put(value))); + check_hresult(WINRT_SHIM(IPerceptionFrameSourcePropertiesChangedEventArgs)->get_Key(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionInfraredFrameSourceWatcher impl_IPerceptionInfraredFrameSourceStatics::CreateWatcher() const { Windows::Devices::Perception::PerceptionInfraredFrameSourceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceStatics)->abi_CreateWatcher(put_abi(watcher))); return watcher; } template Windows::Foundation::IAsyncOperation> impl_IPerceptionInfraredFrameSourceStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceStatics)->abi_FindAllAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSourceStatics::FromIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSourceStatics::FromIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceStatics)->abi_FromIdAsync(get_abi(id), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSourceStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSourceStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } template Windows::Devices::Perception::PerceptionDepthFrameSourceWatcher impl_IPerceptionDepthFrameSourceStatics::CreateWatcher() const { Windows::Devices::Perception::PerceptionDepthFrameSourceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceStatics)->abi_CreateWatcher(put_abi(watcher))); return watcher; } template Windows::Foundation::IAsyncOperation> impl_IPerceptionDepthFrameSourceStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceStatics)->abi_FindAllAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSourceStatics::FromIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSourceStatics::FromIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceStatics)->abi_FromIdAsync(get_abi(id), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSourceStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSourceStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } template Windows::Devices::Perception::PerceptionColorFrameSourceWatcher impl_IPerceptionColorFrameSourceStatics::CreateWatcher() const { Windows::Devices::Perception::PerceptionColorFrameSourceWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceStatics)->abi_CreateWatcher(put_abi(watcher))); return watcher; } template Windows::Foundation::IAsyncOperation> impl_IPerceptionColorFrameSourceStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceStatics)->abi_FindAllAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSourceStatics::FromIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSourceStatics::FromIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceStatics)->abi_FromIdAsync(get_abi(id), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSourceStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSourceStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } -template event_token impl_IPerceptionColorFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AvailableChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->add_AvailableChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSource::remove_AvailableChanged, AvailableChanged(handler)); } template void impl_IPerceptionColorFrameSource::AvailableChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AvailableChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->remove_AvailableChanged(token)); } -template event_token impl_IPerceptionColorFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActiveChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->add_ActiveChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSource::remove_ActiveChanged, ActiveChanged(handler)); } template void impl_IPerceptionColorFrameSource::ActiveChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActiveChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->remove_ActiveChanged(token)); } template event_token impl_IPerceptionColorFrameSource::PropertiesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PropertiesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->add_PropertiesChanged(get_abi(handler), &token)); return token; } @@ -3850,221 +4074,221 @@ template event_revoker impl_IPerceptio template void impl_IPerceptionColorFrameSource::PropertiesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PropertiesChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->remove_PropertiesChanged(token)); } -template event_token impl_IPerceptionColorFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VideoProfileChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->add_VideoProfileChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSource::remove_VideoProfileChanged, VideoProfileChanged(handler)); } template void impl_IPerceptionColorFrameSource::VideoProfileChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VideoProfileChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->remove_VideoProfileChanged(token)); } -template event_token impl_IPerceptionColorFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionColorFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraIntrinsicsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->add_CameraIntrinsicsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionColorFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionColorFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionColorFrameSource::remove_CameraIntrinsicsChanged, CameraIntrinsicsChanged(handler)); } template void impl_IPerceptionColorFrameSource::CameraIntrinsicsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraIntrinsicsChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->remove_CameraIntrinsicsChanged(token)); } template hstring impl_IPerceptionColorFrameSource::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_Id(put_abi(value))); return value; } template hstring impl_IPerceptionColorFrameSource::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPerceptionColorFrameSource::DeviceKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceKind(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_DeviceKind(put_abi(value))); return value; } template bool impl_IPerceptionColorFrameSource::Available() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Available(&value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_Available(&value)); return value; } template bool impl_IPerceptionColorFrameSource::Active() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Active(&value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_Active(&value)); return value; } template bool impl_IPerceptionColorFrameSource::IsControlled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsControlled(&value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_IsControlled(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IPerceptionColorFrameSource::Properties() const +template Windows::Foundation::Collections::IMapView impl_IPerceptionColorFrameSource::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionColorFrameSource::SupportedVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_SupportedVideoProfiles(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionColorFrameSource::AvailableVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_AvailableVideoProfiles(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionVideoProfile impl_IPerceptionColorFrameSource::VideoProfile() const { Windows::Devices::Perception::PerceptionVideoProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProfile(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_VideoProfile(put_abi(value))); return value; } template Windows::Media::Devices::Core::CameraIntrinsics impl_IPerceptionColorFrameSource::CameraIntrinsics() const { Windows::Media::Devices::Core::CameraIntrinsics value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CameraIntrinsics(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->get_CameraIntrinsics(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionControlSession impl_IPerceptionColorFrameSource::AcquireControlSession() const { Windows::Devices::Perception::PerceptionControlSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AcquireControlSession(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_AcquireControlSession(put_abi(value))); return value; } -template bool impl_IPerceptionColorFrameSource::CanControlIndependentlyFrom(hstring_ref targetId) const +template bool impl_IPerceptionColorFrameSource::CanControlIndependentlyFrom(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_CanControlIndependentlyFrom(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_CanControlIndependentlyFrom(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionColorFrameSource::IsCorrelatedWith(hstring_ref targetId) const +template bool impl_IPerceptionColorFrameSource::IsCorrelatedWith(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCorrelatedWith(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_IsCorrelatedWith(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionColorFrameSource::TryGetTransformTo(hstring_ref targetId, Windows::Foundation::Numerics::float4x4 & result) const +template bool impl_IPerceptionColorFrameSource::TryGetTransformTo(hstring_view targetId, Windows::Foundation::Numerics::float4x4 & result) const { bool hasResult {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetTransformTo(get(targetId), put(result), &hasResult)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_TryGetTransformTo(get_abi(targetId), put_abi(result), &hasResult)); return hasResult; } template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSource::TryGetDepthCorrelatedCameraIntrinsicsAsync(const Windows::Devices::Perception::PerceptionDepthFrameSource & correlatedDepthFrameSource) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get(correlatedDepthFrameSource), put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get_abi(correlatedDepthFrameSource), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_ref targetSourceId, const Windows::Devices::Perception::PerceptionDepthFrameSource & correlatedDepthFrameSource) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_view targetSourceId, const Windows::Devices::Perception::PerceptionDepthFrameSource & correlatedDepthFrameSource) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get(targetSourceId), get(correlatedDepthFrameSource), put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get_abi(targetSourceId), get_abi(correlatedDepthFrameSource), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionColorFrameSource::TrySetVideoProfileAsync(const Windows::Devices::Perception::PerceptionControlSession & controlSession, const Windows::Devices::Perception::PerceptionVideoProfile & profile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySetVideoProfileAsync(get(controlSession), get(profile), put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_TrySetVideoProfileAsync(get_abi(controlSession), get_abi(profile), put_abi(result))); return result; } template Windows::Devices::Perception::PerceptionColorFrameReader impl_IPerceptionColorFrameSource::OpenReader() const { Windows::Devices::Perception::PerceptionColorFrameReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenReader(put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource)->abi_OpenReader(put_abi(result))); return result; } template hstring impl_IPerceptionColorFrameSource2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameSource2)->get_DeviceId(put_abi(value))); return value; } -template event_token impl_IPerceptionDepthFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AvailableChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->add_AvailableChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSource::remove_AvailableChanged, AvailableChanged(handler)); } template void impl_IPerceptionDepthFrameSource::AvailableChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AvailableChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->remove_AvailableChanged(token)); } -template event_token impl_IPerceptionDepthFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActiveChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->add_ActiveChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSource::remove_ActiveChanged, ActiveChanged(handler)); } template void impl_IPerceptionDepthFrameSource::ActiveChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActiveChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->remove_ActiveChanged(token)); } template event_token impl_IPerceptionDepthFrameSource::PropertiesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PropertiesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->add_PropertiesChanged(get_abi(handler), &token)); return token; } @@ -4075,221 +4299,221 @@ template event_revoker impl_IPerceptio template void impl_IPerceptionDepthFrameSource::PropertiesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PropertiesChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->remove_PropertiesChanged(token)); } -template event_token impl_IPerceptionDepthFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VideoProfileChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->add_VideoProfileChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSource::remove_VideoProfileChanged, VideoProfileChanged(handler)); } template void impl_IPerceptionDepthFrameSource::VideoProfileChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VideoProfileChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->remove_VideoProfileChanged(token)); } -template event_token impl_IPerceptionDepthFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionDepthFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraIntrinsicsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->add_CameraIntrinsicsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionDepthFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionDepthFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionDepthFrameSource::remove_CameraIntrinsicsChanged, CameraIntrinsicsChanged(handler)); } template void impl_IPerceptionDepthFrameSource::CameraIntrinsicsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraIntrinsicsChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->remove_CameraIntrinsicsChanged(token)); } template hstring impl_IPerceptionDepthFrameSource::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_Id(put_abi(value))); return value; } template hstring impl_IPerceptionDepthFrameSource::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPerceptionDepthFrameSource::DeviceKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceKind(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_DeviceKind(put_abi(value))); return value; } template bool impl_IPerceptionDepthFrameSource::Available() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Available(&value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_Available(&value)); return value; } template bool impl_IPerceptionDepthFrameSource::Active() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Active(&value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_Active(&value)); return value; } template bool impl_IPerceptionDepthFrameSource::IsControlled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsControlled(&value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_IsControlled(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IPerceptionDepthFrameSource::Properties() const +template Windows::Foundation::Collections::IMapView impl_IPerceptionDepthFrameSource::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionDepthFrameSource::SupportedVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_SupportedVideoProfiles(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionDepthFrameSource::AvailableVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_AvailableVideoProfiles(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionVideoProfile impl_IPerceptionDepthFrameSource::VideoProfile() const { Windows::Devices::Perception::PerceptionVideoProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProfile(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_VideoProfile(put_abi(value))); return value; } template Windows::Media::Devices::Core::CameraIntrinsics impl_IPerceptionDepthFrameSource::CameraIntrinsics() const { Windows::Media::Devices::Core::CameraIntrinsics value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CameraIntrinsics(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->get_CameraIntrinsics(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionControlSession impl_IPerceptionDepthFrameSource::AcquireControlSession() const { Windows::Devices::Perception::PerceptionControlSession result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AcquireControlSession(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_AcquireControlSession(put_abi(result))); return result; } -template bool impl_IPerceptionDepthFrameSource::CanControlIndependentlyFrom(hstring_ref targetId) const +template bool impl_IPerceptionDepthFrameSource::CanControlIndependentlyFrom(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_CanControlIndependentlyFrom(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_CanControlIndependentlyFrom(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionDepthFrameSource::IsCorrelatedWith(hstring_ref targetId) const +template bool impl_IPerceptionDepthFrameSource::IsCorrelatedWith(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCorrelatedWith(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_IsCorrelatedWith(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionDepthFrameSource::TryGetTransformTo(hstring_ref targetId, Windows::Foundation::Numerics::float4x4 & result) const +template bool impl_IPerceptionDepthFrameSource::TryGetTransformTo(hstring_view targetId, Windows::Foundation::Numerics::float4x4 & result) const { bool hasResult {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetTransformTo(get(targetId), put(result), &hasResult)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_TryGetTransformTo(get_abi(targetId), put_abi(result), &hasResult)); return hasResult; } template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSource::TryGetDepthCorrelatedCameraIntrinsicsAsync(const Windows::Devices::Perception::PerceptionDepthFrameSource & target) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get(target), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get_abi(target), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_ref targetId, const Windows::Devices::Perception::PerceptionDepthFrameSource & depthFrameSourceToMapWith) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_view targetId, const Windows::Devices::Perception::PerceptionDepthFrameSource & depthFrameSourceToMapWith) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get(targetId), get(depthFrameSourceToMapWith), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get_abi(targetId), get_abi(depthFrameSourceToMapWith), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionDepthFrameSource::TrySetVideoProfileAsync(const Windows::Devices::Perception::PerceptionControlSession & controlSession, const Windows::Devices::Perception::PerceptionVideoProfile & profile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySetVideoProfileAsync(get(controlSession), get(profile), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_TrySetVideoProfileAsync(get_abi(controlSession), get_abi(profile), put_abi(result))); return result; } template Windows::Devices::Perception::PerceptionDepthFrameReader impl_IPerceptionDepthFrameSource::OpenReader() const { Windows::Devices::Perception::PerceptionDepthFrameReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenReader(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource)->abi_OpenReader(put_abi(result))); return result; } template hstring impl_IPerceptionDepthFrameSource2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameSource2)->get_DeviceId(put_abi(value))); return value; } -template event_token impl_IPerceptionInfraredFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSource::AvailableChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AvailableChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->add_AvailableChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSource::AvailableChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSource::remove_AvailableChanged, AvailableChanged(handler)); } template void impl_IPerceptionInfraredFrameSource::AvailableChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AvailableChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->remove_AvailableChanged(token)); } -template event_token impl_IPerceptionInfraredFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSource::ActiveChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActiveChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->add_ActiveChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSource::ActiveChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSource::remove_ActiveChanged, ActiveChanged(handler)); } template void impl_IPerceptionInfraredFrameSource::ActiveChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActiveChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->remove_ActiveChanged(token)); } template event_token impl_IPerceptionInfraredFrameSource::PropertiesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PropertiesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->add_PropertiesChanged(get_abi(handler), &token)); return token; } @@ -4300,347 +4524,347 @@ template event_revoker impl_IPercep template void impl_IPerceptionInfraredFrameSource::PropertiesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PropertiesChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->remove_PropertiesChanged(token)); } -template event_token impl_IPerceptionInfraredFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSource::VideoProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VideoProfileChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->add_VideoProfileChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSource::VideoProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSource::remove_VideoProfileChanged, VideoProfileChanged(handler)); } template void impl_IPerceptionInfraredFrameSource::VideoProfileChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VideoProfileChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->remove_VideoProfileChanged(token)); } -template event_token impl_IPerceptionInfraredFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionInfraredFrameSource::CameraIntrinsicsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraIntrinsicsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->add_CameraIntrinsicsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionInfraredFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionInfraredFrameSource::CameraIntrinsicsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionInfraredFrameSource::remove_CameraIntrinsicsChanged, CameraIntrinsicsChanged(handler)); } template void impl_IPerceptionInfraredFrameSource::CameraIntrinsicsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraIntrinsicsChanged(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->remove_CameraIntrinsicsChanged(token)); } template hstring impl_IPerceptionInfraredFrameSource::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_Id(put_abi(value))); return value; } template hstring impl_IPerceptionInfraredFrameSource::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPerceptionInfraredFrameSource::DeviceKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceKind(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_DeviceKind(put_abi(value))); return value; } template bool impl_IPerceptionInfraredFrameSource::Available() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Available(&value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_Available(&value)); return value; } template bool impl_IPerceptionInfraredFrameSource::Active() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Active(&value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_Active(&value)); return value; } template bool impl_IPerceptionInfraredFrameSource::IsControlled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsControlled(&value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_IsControlled(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IPerceptionInfraredFrameSource::Properties() const +template Windows::Foundation::Collections::IMapView impl_IPerceptionInfraredFrameSource::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionInfraredFrameSource::SupportedVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_SupportedVideoProfiles(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPerceptionInfraredFrameSource::AvailableVideoProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableVideoProfiles(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_AvailableVideoProfiles(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionVideoProfile impl_IPerceptionInfraredFrameSource::VideoProfile() const { Windows::Devices::Perception::PerceptionVideoProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProfile(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_VideoProfile(put_abi(value))); return value; } template Windows::Media::Devices::Core::CameraIntrinsics impl_IPerceptionInfraredFrameSource::CameraIntrinsics() const { Windows::Media::Devices::Core::CameraIntrinsics value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CameraIntrinsics(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->get_CameraIntrinsics(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionControlSession impl_IPerceptionInfraredFrameSource::AcquireControlSession() const { Windows::Devices::Perception::PerceptionControlSession result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AcquireControlSession(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_AcquireControlSession(put_abi(result))); return result; } -template bool impl_IPerceptionInfraredFrameSource::CanControlIndependentlyFrom(hstring_ref targetId) const +template bool impl_IPerceptionInfraredFrameSource::CanControlIndependentlyFrom(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_CanControlIndependentlyFrom(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_CanControlIndependentlyFrom(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionInfraredFrameSource::IsCorrelatedWith(hstring_ref targetId) const +template bool impl_IPerceptionInfraredFrameSource::IsCorrelatedWith(hstring_view targetId) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCorrelatedWith(get(targetId), &result)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_IsCorrelatedWith(get_abi(targetId), &result)); return result; } -template bool impl_IPerceptionInfraredFrameSource::TryGetTransformTo(hstring_ref targetId, Windows::Foundation::Numerics::float4x4 & result) const +template bool impl_IPerceptionInfraredFrameSource::TryGetTransformTo(hstring_view targetId, Windows::Foundation::Numerics::float4x4 & result) const { bool hasResult {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetTransformTo(get(targetId), put(result), &hasResult)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_TryGetTransformTo(get_abi(targetId), put_abi(result), &hasResult)); return hasResult; } template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSource::TryGetDepthCorrelatedCameraIntrinsicsAsync(const Windows::Devices::Perception::PerceptionDepthFrameSource & target) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get(target), put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_TryGetDepthCorrelatedCameraIntrinsicsAsync(get_abi(target), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_ref targetId, const Windows::Devices::Perception::PerceptionDepthFrameSource & depthFrameSourceToMapWith) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSource::TryGetDepthCorrelatedCoordinateMapperAsync(hstring_view targetId, const Windows::Devices::Perception::PerceptionDepthFrameSource & depthFrameSourceToMapWith) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get(targetId), get(depthFrameSourceToMapWith), put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_TryGetDepthCorrelatedCoordinateMapperAsync(get_abi(targetId), get_abi(depthFrameSourceToMapWith), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPerceptionInfraredFrameSource::TrySetVideoProfileAsync(const Windows::Devices::Perception::PerceptionControlSession & controlSession, const Windows::Devices::Perception::PerceptionVideoProfile & profile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySetVideoProfileAsync(get(controlSession), get(profile), put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_TrySetVideoProfileAsync(get_abi(controlSession), get_abi(profile), put_abi(result))); return result; } template Windows::Devices::Perception::PerceptionInfraredFrameReader impl_IPerceptionInfraredFrameSource::OpenReader() const { Windows::Devices::Perception::PerceptionInfraredFrameReader result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenReader(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource)->abi_OpenReader(put_abi(result))); return result; } template hstring impl_IPerceptionInfraredFrameSource2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameSource2)->get_DeviceId(put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapPixelFormat impl_IPerceptionVideoProfile::BitmapPixelFormat() const { Windows::Graphics::Imaging::BitmapPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapPixelFormat(&value)); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->get_BitmapPixelFormat(&value)); return value; } template Windows::Graphics::Imaging::BitmapAlphaMode impl_IPerceptionVideoProfile::BitmapAlphaMode() const { Windows::Graphics::Imaging::BitmapAlphaMode value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapAlphaMode(&value)); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->get_BitmapAlphaMode(&value)); return value; } template int32_t impl_IPerceptionVideoProfile::Width() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->get_Width(&value)); return value; } template int32_t impl_IPerceptionVideoProfile::Height() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->get_Height(&value)); return value; } template Windows::Foundation::TimeSpan impl_IPerceptionVideoProfile::FrameDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_FrameDuration(put(value))); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->get_FrameDuration(put_abi(value))); return value; } template bool impl_IPerceptionVideoProfile::IsEqual(const Windows::Devices::Perception::PerceptionVideoProfile & other) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(other), &result)); + check_hresult(WINRT_SHIM(IPerceptionVideoProfile)->abi_IsEqual(get_abi(other), &result)); return result; } template Windows::Foundation::TimeSpan impl_IPerceptionColorFrameArrivedEventArgs::RelativeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativeTime(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameArrivedEventArgs)->get_RelativeTime(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionColorFrame impl_IPerceptionColorFrameArrivedEventArgs::TryOpenFrame() const { Windows::Devices::Perception::PerceptionColorFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryOpenFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameArrivedEventArgs)->abi_TryOpenFrame(put_abi(result))); return result; } template Windows::Foundation::TimeSpan impl_IPerceptionDepthFrameArrivedEventArgs::RelativeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativeTime(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameArrivedEventArgs)->get_RelativeTime(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionDepthFrame impl_IPerceptionDepthFrameArrivedEventArgs::TryOpenFrame() const { Windows::Devices::Perception::PerceptionDepthFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryOpenFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameArrivedEventArgs)->abi_TryOpenFrame(put_abi(result))); return result; } template Windows::Foundation::TimeSpan impl_IPerceptionInfraredFrameArrivedEventArgs::RelativeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativeTime(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameArrivedEventArgs)->get_RelativeTime(put_abi(value))); return value; } template Windows::Devices::Perception::PerceptionInfraredFrame impl_IPerceptionInfraredFrameArrivedEventArgs::TryOpenFrame() const { Windows::Devices::Perception::PerceptionInfraredFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryOpenFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameArrivedEventArgs)->abi_TryOpenFrame(put_abi(result))); return result; } template Windows::Foundation::Numerics::float3 impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectPixelAtCorrelatedDepth(const Windows::Foundation::Point & pixelCoordinate, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame) const { Windows::Foundation::Numerics::float3 result {}; - check_hresult(static_cast(static_cast(*this))->abi_UnprojectPixelAtCorrelatedDepth(get(pixelCoordinate), get(depthFrame), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCameraIntrinsics)->abi_UnprojectPixelAtCorrelatedDepth(get_abi(pixelCoordinate), get_abi(depthFrame), put_abi(result))); return result; } -template void impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectPixelsAtCorrelatedDepth(array_ref sourceCoordinates, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref results) const +template void impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectPixelsAtCorrelatedDepth(array_view sourceCoordinates, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_UnprojectPixelsAtCorrelatedDepth(sourceCoordinates.size(), get(sourceCoordinates), get(depthFrame), results.size(), get(results))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCameraIntrinsics)->abi_UnprojectPixelsAtCorrelatedDepth(sourceCoordinates.size(), get_abi(sourceCoordinates), get_abi(depthFrame), results.size(), get_abi(results))); } -template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectRegionPixelsAtCorrelatedDepthAsync(const Windows::Foundation::Rect & region, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref results) const +template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectRegionPixelsAtCorrelatedDepthAsync(const Windows::Foundation::Rect & region, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view results) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UnprojectRegionPixelsAtCorrelatedDepthAsync(get(region), get(depthFrame), results.size(), get(results), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCameraIntrinsics)->abi_UnprojectRegionPixelsAtCorrelatedDepthAsync(get_abi(region), get_abi(depthFrame), results.size(), get_abi(results), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectAllPixelsAtCorrelatedDepthAsync(const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref results) const +template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCameraIntrinsics::UnprojectAllPixelsAtCorrelatedDepthAsync(const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view results) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UnprojectAllPixelsAtCorrelatedDepthAsync(get(depthFrame), results.size(), get(results), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCameraIntrinsics)->abi_UnprojectAllPixelsAtCorrelatedDepthAsync(get_abi(depthFrame), results.size(), get_abi(results), put_abi(result))); return result; } template Windows::Foundation::Point impl_IPerceptionDepthCorrelatedCoordinateMapper::MapPixelToTarget(const Windows::Foundation::Point & sourcePixelCoordinate, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame) const { Windows::Foundation::Point result {}; - check_hresult(static_cast(static_cast(*this))->abi_MapPixelToTarget(get(sourcePixelCoordinate), get(depthFrame), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCoordinateMapper)->abi_MapPixelToTarget(get_abi(sourcePixelCoordinate), get_abi(depthFrame), put_abi(result))); return result; } -template void impl_IPerceptionDepthCorrelatedCoordinateMapper::MapPixelsToTarget(array_ref sourceCoordinates, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref results) const +template void impl_IPerceptionDepthCorrelatedCoordinateMapper::MapPixelsToTarget(array_view sourceCoordinates, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_MapPixelsToTarget(sourceCoordinates.size(), get(sourceCoordinates), get(depthFrame), results.size(), get(results))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCoordinateMapper)->abi_MapPixelsToTarget(sourceCoordinates.size(), get_abi(sourceCoordinates), get_abi(depthFrame), results.size(), get_abi(results))); } -template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCoordinateMapper::MapRegionOfPixelsToTargetAsync(const Windows::Foundation::Rect & region, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref targetCoordinates) const +template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCoordinateMapper::MapRegionOfPixelsToTargetAsync(const Windows::Foundation::Rect & region, const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view targetCoordinates) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MapRegionOfPixelsToTargetAsync(get(region), get(depthFrame), targetCoordinates.size(), get(targetCoordinates), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCoordinateMapper)->abi_MapRegionOfPixelsToTargetAsync(get_abi(region), get_abi(depthFrame), targetCoordinates.size(), get_abi(targetCoordinates), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCoordinateMapper::MapAllPixelsToTargetAsync(const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_ref targetCoordinates) const +template Windows::Foundation::IAsyncAction impl_IPerceptionDepthCorrelatedCoordinateMapper::MapAllPixelsToTargetAsync(const Windows::Devices::Perception::PerceptionDepthFrame & depthFrame, array_view targetCoordinates) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_MapAllPixelsToTargetAsync(get(depthFrame), targetCoordinates.size(), get(targetCoordinates), put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthCorrelatedCoordinateMapper)->abi_MapAllPixelsToTargetAsync(get_abi(depthFrame), targetCoordinates.size(), get_abi(targetCoordinates), put_abi(result))); return result; } -template event_token impl_IPerceptionControlSession::ControlLost(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPerceptionControlSession::ControlLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ControlLost(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionControlSession)->add_ControlLost(get_abi(handler), &token)); return token; } -template event_revoker impl_IPerceptionControlSession::ControlLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPerceptionControlSession::ControlLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Perception::IPerceptionControlSession::remove_ControlLost, ControlLost(handler)); } template void impl_IPerceptionControlSession::ControlLost(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ControlLost(token)); + check_hresult(WINRT_SHIM(IPerceptionControlSession)->remove_ControlLost(token)); } -template Windows::Foundation::IAsyncOperation impl_IPerceptionControlSession::TrySetPropertyAsync(hstring_ref name, const Windows::IInspectable & value) const +template Windows::Foundation::IAsyncOperation impl_IPerceptionControlSession::TrySetPropertyAsync(hstring_view name, const Windows::Foundation::IInspectable & value) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TrySetPropertyAsync(get(name), get(value), put(result))); + check_hresult(WINRT_SHIM(IPerceptionControlSession)->abi_TrySetPropertyAsync(get_abi(name), get_abi(value), put_abi(result))); return result; } template event_token impl_IPerceptionColorFrameReader::FrameArrived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameArrived(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->add_FrameArrived(get_abi(handler), &token)); return token; } @@ -4651,39 +4875,39 @@ template event_revoker impl_IPerceptio template void impl_IPerceptionColorFrameReader::FrameArrived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameArrived(token)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->remove_FrameArrived(token)); } template Windows::Devices::Perception::PerceptionColorFrameSource impl_IPerceptionColorFrameReader::Source() const { Windows::Devices::Perception::PerceptionColorFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->get_Source(put_abi(value))); return value; } template bool impl_IPerceptionColorFrameReader::IsPaused() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaused(&value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->get_IsPaused(&value)); return value; } template void impl_IPerceptionColorFrameReader::IsPaused(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPaused(value)); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->put_IsPaused(value)); } template Windows::Devices::Perception::PerceptionColorFrame impl_IPerceptionColorFrameReader::TryReadLatestFrame() const { Windows::Devices::Perception::PerceptionColorFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryReadLatestFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionColorFrameReader)->abi_TryReadLatestFrame(put_abi(result))); return result; } template event_token impl_IPerceptionDepthFrameReader::FrameArrived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameArrived(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->add_FrameArrived(get_abi(handler), &token)); return token; } @@ -4694,39 +4918,39 @@ template event_revoker impl_IPerceptio template void impl_IPerceptionDepthFrameReader::FrameArrived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameArrived(token)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->remove_FrameArrived(token)); } template Windows::Devices::Perception::PerceptionDepthFrameSource impl_IPerceptionDepthFrameReader::Source() const { Windows::Devices::Perception::PerceptionDepthFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->get_Source(put_abi(value))); return value; } template bool impl_IPerceptionDepthFrameReader::IsPaused() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaused(&value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->get_IsPaused(&value)); return value; } template void impl_IPerceptionDepthFrameReader::IsPaused(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPaused(value)); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->put_IsPaused(value)); } template Windows::Devices::Perception::PerceptionDepthFrame impl_IPerceptionDepthFrameReader::TryReadLatestFrame() const { Windows::Devices::Perception::PerceptionDepthFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryReadLatestFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrameReader)->abi_TryReadLatestFrame(put_abi(result))); return result; } template event_token impl_IPerceptionInfraredFrameReader::FrameArrived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameArrived(get(handler), &token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->add_FrameArrived(get_abi(handler), &token)); return token; } @@ -4737,53 +4961,53 @@ template event_revoker impl_IPercep template void impl_IPerceptionInfraredFrameReader::FrameArrived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameArrived(token)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->remove_FrameArrived(token)); } template Windows::Devices::Perception::PerceptionInfraredFrameSource impl_IPerceptionInfraredFrameReader::Source() const { Windows::Devices::Perception::PerceptionInfraredFrameSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->get_Source(put_abi(value))); return value; } template bool impl_IPerceptionInfraredFrameReader::IsPaused() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaused(&value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->get_IsPaused(&value)); return value; } template void impl_IPerceptionInfraredFrameReader::IsPaused(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPaused(value)); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->put_IsPaused(value)); } template Windows::Devices::Perception::PerceptionInfraredFrame impl_IPerceptionInfraredFrameReader::TryReadLatestFrame() const { Windows::Devices::Perception::PerceptionInfraredFrame result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryReadLatestFrame(put(result))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrameReader)->abi_TryReadLatestFrame(put_abi(result))); return result; } template Windows::Media::VideoFrame impl_IPerceptionColorFrame::VideoFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFrame(put(value))); + check_hresult(WINRT_SHIM(IPerceptionColorFrame)->get_VideoFrame(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IPerceptionDepthFrame::VideoFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFrame(put(value))); + check_hresult(WINRT_SHIM(IPerceptionDepthFrame)->get_VideoFrame(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IPerceptionInfraredFrame::VideoFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFrame(put(value))); + check_hresult(WINRT_SHIM(IPerceptionInfraredFrame)->get_VideoFrame(put_abi(value))); return value; } @@ -4957,7 +5181,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation PerceptionColorFrameSource::FromIdAsync(hstring_ref id) +inline Windows::Foundation::IAsyncOperation PerceptionColorFrameSource::FromIdAsync(hstring_view id) { return get_activation_factory().FromIdAsync(id); } @@ -4977,7 +5201,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation PerceptionDepthFrameSource::FromIdAsync(hstring_ref id) +inline Windows::Foundation::IAsyncOperation PerceptionDepthFrameSource::FromIdAsync(hstring_view id) { return get_activation_factory().FromIdAsync(id); } @@ -4997,7 +5221,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation PerceptionInfraredFrameSource::FromIdAsync(hstring_ref id) +inline Windows::Foundation::IAsyncOperation PerceptionInfraredFrameSource::FromIdAsync(hstring_view id) { return get_activation_factory().FromIdAsync(id); } @@ -5010,3 +5234,617 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownCameraIntrinsicsPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionColorFrameSourcePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionDepthFrameSourcePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionFrameSourcePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionFrameSourcePropertiesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionInfraredFrameSourcePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionVideoFrameSourcePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IKnownPerceptionVideoProfilePropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionColorFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionControlSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthCorrelatedCameraIntrinsics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthCorrelatedCoordinateMapper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionDepthFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionFrameSourcePropertiesChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionFrameSourcePropertyChangeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionInfraredFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::IPerceptionVideoProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionColorFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionControlSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthCorrelatedCameraIntrinsics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthCorrelatedCoordinateMapper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionDepthFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionFrameSourcePropertiesChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionFrameSourcePropertyChangeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameSourceAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameSourceRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionInfraredFrameSourceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Perception::PerceptionVideoProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.PointOfService.h b/10.0.14393.0/winrt/Windows.Devices.PointOfService.h index 64dc75241..82fa7381a 100644 --- a/10.0.14393.0/winrt/Windows.Devices.PointOfService.h +++ b/10.0.14393.0/winrt/Windows.Devices.PointOfService.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_ClaimScannerAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ClaimScannerAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ClaimScannerAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClaimScannerAsync()); return S_OK; } catch (...) @@ -60,11 +66,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CheckHealthAsync(level)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CheckHealthAsync(level)); return S_OK; } catch (...) @@ -74,11 +81,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetSupportedSymbologiesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetSupportedSymbologiesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetSupportedSymbologiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSupportedSymbologiesAsync()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_IsSymbologySupportedAsync(uint32_t barcodeSymbology, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_IsSymbologySupportedAsync(uint32_t barcodeSymbology, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().IsSymbologySupportedAsync(barcodeSymbology)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().IsSymbologySupportedAsync(barcodeSymbology)); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RetrieveStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RetrieveStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RetrieveStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RetrieveStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetSupportedProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSupportedProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSupportedProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSupportedProfiles()); return S_OK; } catch (...) @@ -130,11 +141,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_IsProfileSupported(abi_arg_in profile, bool * isSupported) noexcept override + HRESULT __stdcall abi_IsProfileSupported(impl::abi_arg_in profile, bool * isSupported) noexcept override { try { - *isSupported = detach(this->shim().IsProfileSupported(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *isSupported = detach_abi(this->shim().IsProfileSupported(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_StatusUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -160,6 +173,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().StatusUpdated(token); return S_OK; } @@ -173,11 +187,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_VideoDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceId()); return S_OK; } catch (...) @@ -195,7 +210,8 @@ struct produce { try { - *value = detach(this->shim().PowerReportingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerReportingType()); return S_OK; } catch (...) @@ -208,7 +224,8 @@ struct produce { try { - *value = detach(this->shim().IsStatisticsReportingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsReportingSupported()); return S_OK; } catch (...) @@ -221,7 +238,8 @@ struct produce { try { - *value = detach(this->shim().IsStatisticsUpdatingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsUpdatingSupported()); return S_OK; } catch (...) @@ -234,7 +252,8 @@ struct produce { try { - *value = detach(this->shim().IsImagePreviewSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsImagePreviewSupported()); return S_OK; } catch (...) @@ -251,7 +270,8 @@ struct produceshim().IsSoftwareTriggerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSoftwareTriggerSupported()); return S_OK; } catch (...) @@ -264,11 +284,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Report(abi_arg_out value) noexcept override + HRESULT __stdcall get_Report(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -282,11 +303,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PartialInputData(abi_arg_out value) noexcept override + HRESULT __stdcall get_PartialInputData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PartialInputData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartialInputData()); return S_OK; } catch (...) @@ -300,7 +322,8 @@ struct produceshim().IsRetriable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRetriable()); return S_OK; } catch (...) @@ -309,11 +332,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ErrorData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorData()); return S_OK; } catch (...) @@ -327,11 +351,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Preview(abi_arg_out preview) noexcept override + HRESULT __stdcall get_Preview(impl::abi_arg_out preview) noexcept override { try { - *preview = detach(this->shim().Preview()); + typename D::abi_guard guard(this->shim()); + *preview = detach_abi(this->shim().Preview()); return S_OK; } catch (...) @@ -349,7 +374,8 @@ struct produce : pro { try { - *value = detach(this->shim().ScanDataType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanDataType()); return S_OK; } catch (...) @@ -358,11 +384,12 @@ struct produce : pro } } - HRESULT __stdcall get_ScanData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScanData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScanData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanData()); return S_OK; } catch (...) @@ -372,11 +399,12 @@ struct produce : pro } } - HRESULT __stdcall get_ScanDataLabel(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScanDataLabel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScanDataLabel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanDataLabel()); return S_OK; } catch (...) @@ -390,11 +418,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -404,11 +433,12 @@ struct produce : pr } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -418,11 +448,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -440,7 +471,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -453,7 +485,8 @@ struct produceshim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -470,7 +503,8 @@ struct produce { try { - *value = detach(this->shim().Unknown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unknown()); return S_OK; } catch (...) @@ -483,7 +517,8 @@ struct produce { try { - *value = detach(this->shim().Ean8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean8()); return S_OK; } catch (...) @@ -496,7 +531,8 @@ struct produce { try { - *value = detach(this->shim().Ean8Add2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean8Add2()); return S_OK; } catch (...) @@ -509,7 +545,8 @@ struct produce { try { - *value = detach(this->shim().Ean8Add5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean8Add5()); return S_OK; } catch (...) @@ -522,7 +559,8 @@ struct produce { try { - *value = detach(this->shim().Eanv()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Eanv()); return S_OK; } catch (...) @@ -535,7 +573,8 @@ struct produce { try { - *value = detach(this->shim().EanvAdd2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EanvAdd2()); return S_OK; } catch (...) @@ -548,7 +587,8 @@ struct produce { try { - *value = detach(this->shim().EanvAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EanvAdd5()); return S_OK; } catch (...) @@ -561,7 +601,8 @@ struct produce { try { - *value = detach(this->shim().Ean13()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean13()); return S_OK; } catch (...) @@ -574,7 +615,8 @@ struct produce { try { - *value = detach(this->shim().Ean13Add2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean13Add2()); return S_OK; } catch (...) @@ -587,7 +629,8 @@ struct produce { try { - *value = detach(this->shim().Ean13Add5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean13Add5()); return S_OK; } catch (...) @@ -600,7 +643,8 @@ struct produce { try { - *value = detach(this->shim().Isbn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Isbn()); return S_OK; } catch (...) @@ -613,7 +657,8 @@ struct produce { try { - *value = detach(this->shim().IsbnAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsbnAdd5()); return S_OK; } catch (...) @@ -626,7 +671,8 @@ struct produce { try { - *value = detach(this->shim().Ismn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ismn()); return S_OK; } catch (...) @@ -639,7 +685,8 @@ struct produce { try { - *value = detach(this->shim().IsmnAdd2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsmnAdd2()); return S_OK; } catch (...) @@ -652,7 +699,8 @@ struct produce { try { - *value = detach(this->shim().IsmnAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsmnAdd5()); return S_OK; } catch (...) @@ -665,7 +713,8 @@ struct produce { try { - *value = detach(this->shim().Issn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Issn()); return S_OK; } catch (...) @@ -678,7 +727,8 @@ struct produce { try { - *value = detach(this->shim().IssnAdd2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IssnAdd2()); return S_OK; } catch (...) @@ -691,7 +741,8 @@ struct produce { try { - *value = detach(this->shim().IssnAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IssnAdd5()); return S_OK; } catch (...) @@ -704,7 +755,8 @@ struct produce { try { - *value = detach(this->shim().Ean99()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean99()); return S_OK; } catch (...) @@ -717,7 +769,8 @@ struct produce { try { - *value = detach(this->shim().Ean99Add2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean99Add2()); return S_OK; } catch (...) @@ -730,7 +783,8 @@ struct produce { try { - *value = detach(this->shim().Ean99Add5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ean99Add5()); return S_OK; } catch (...) @@ -743,7 +797,8 @@ struct produce { try { - *value = detach(this->shim().Upca()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Upca()); return S_OK; } catch (...) @@ -756,7 +811,8 @@ struct produce { try { - *value = detach(this->shim().UpcaAdd2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpcaAdd2()); return S_OK; } catch (...) @@ -769,7 +825,8 @@ struct produce { try { - *value = detach(this->shim().UpcaAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpcaAdd5()); return S_OK; } catch (...) @@ -782,7 +839,8 @@ struct produce { try { - *value = detach(this->shim().Upce()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Upce()); return S_OK; } catch (...) @@ -795,7 +853,8 @@ struct produce { try { - *value = detach(this->shim().UpceAdd2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpceAdd2()); return S_OK; } catch (...) @@ -808,7 +867,8 @@ struct produce { try { - *value = detach(this->shim().UpceAdd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpceAdd5()); return S_OK; } catch (...) @@ -821,7 +881,8 @@ struct produce { try { - *value = detach(this->shim().UpcCoupon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpcCoupon()); return S_OK; } catch (...) @@ -834,7 +895,8 @@ struct produce { try { - *value = detach(this->shim().TfStd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfStd()); return S_OK; } catch (...) @@ -847,7 +909,8 @@ struct produce { try { - *value = detach(this->shim().TfDis()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfDis()); return S_OK; } catch (...) @@ -860,7 +923,8 @@ struct produce { try { - *value = detach(this->shim().TfInt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfInt()); return S_OK; } catch (...) @@ -873,7 +937,8 @@ struct produce { try { - *value = detach(this->shim().TfInd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfInd()); return S_OK; } catch (...) @@ -886,7 +951,8 @@ struct produce { try { - *value = detach(this->shim().TfMat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfMat()); return S_OK; } catch (...) @@ -899,7 +965,8 @@ struct produce { try { - *value = detach(this->shim().TfIata()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TfIata()); return S_OK; } catch (...) @@ -912,7 +979,8 @@ struct produce { try { - *value = detach(this->shim().Gs1DatabarType1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gs1DatabarType1()); return S_OK; } catch (...) @@ -925,7 +993,8 @@ struct produce { try { - *value = detach(this->shim().Gs1DatabarType2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gs1DatabarType2()); return S_OK; } catch (...) @@ -938,7 +1007,8 @@ struct produce { try { - *value = detach(this->shim().Gs1DatabarType3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gs1DatabarType3()); return S_OK; } catch (...) @@ -951,7 +1021,8 @@ struct produce { try { - *value = detach(this->shim().Code39()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code39()); return S_OK; } catch (...) @@ -964,7 +1035,8 @@ struct produce { try { - *value = detach(this->shim().Code39Ex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code39Ex()); return S_OK; } catch (...) @@ -977,7 +1049,8 @@ struct produce { try { - *value = detach(this->shim().Trioptic39()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Trioptic39()); return S_OK; } catch (...) @@ -990,7 +1063,8 @@ struct produce { try { - *value = detach(this->shim().Code32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code32()); return S_OK; } catch (...) @@ -1003,7 +1077,8 @@ struct produce { try { - *value = detach(this->shim().Pzn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pzn()); return S_OK; } catch (...) @@ -1016,7 +1091,8 @@ struct produce { try { - *value = detach(this->shim().Code93()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code93()); return S_OK; } catch (...) @@ -1029,7 +1105,8 @@ struct produce { try { - *value = detach(this->shim().Code93Ex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code93Ex()); return S_OK; } catch (...) @@ -1042,7 +1119,8 @@ struct produce { try { - *value = detach(this->shim().Code128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code128()); return S_OK; } catch (...) @@ -1055,7 +1133,8 @@ struct produce { try { - *value = detach(this->shim().Gs1128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gs1128()); return S_OK; } catch (...) @@ -1068,7 +1147,8 @@ struct produce { try { - *value = detach(this->shim().Gs1128Coupon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gs1128Coupon()); return S_OK; } catch (...) @@ -1081,7 +1161,8 @@ struct produce { try { - *value = detach(this->shim().UccEan128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UccEan128()); return S_OK; } catch (...) @@ -1094,7 +1175,8 @@ struct produce { try { - *value = detach(this->shim().Sisac()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sisac()); return S_OK; } catch (...) @@ -1107,7 +1189,8 @@ struct produce { try { - *value = detach(this->shim().Isbt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Isbt()); return S_OK; } catch (...) @@ -1120,7 +1203,8 @@ struct produce { try { - *value = detach(this->shim().Codabar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Codabar()); return S_OK; } catch (...) @@ -1133,7 +1217,8 @@ struct produce { try { - *value = detach(this->shim().Code11()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code11()); return S_OK; } catch (...) @@ -1146,7 +1231,8 @@ struct produce { try { - *value = detach(this->shim().Msi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Msi()); return S_OK; } catch (...) @@ -1159,7 +1245,8 @@ struct produce { try { - *value = detach(this->shim().Plessey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Plessey()); return S_OK; } catch (...) @@ -1172,7 +1259,8 @@ struct produce { try { - *value = detach(this->shim().Telepen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Telepen()); return S_OK; } catch (...) @@ -1185,7 +1273,8 @@ struct produce { try { - *value = detach(this->shim().Code16k()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code16k()); return S_OK; } catch (...) @@ -1198,7 +1287,8 @@ struct produce { try { - *value = detach(this->shim().CodablockA()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodablockA()); return S_OK; } catch (...) @@ -1211,7 +1301,8 @@ struct produce { try { - *value = detach(this->shim().CodablockF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodablockF()); return S_OK; } catch (...) @@ -1224,7 +1315,8 @@ struct produce { try { - *value = detach(this->shim().Codablock128()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Codablock128()); return S_OK; } catch (...) @@ -1237,7 +1329,8 @@ struct produce { try { - *value = detach(this->shim().Code49()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code49()); return S_OK; } catch (...) @@ -1250,7 +1343,8 @@ struct produce { try { - *value = detach(this->shim().Aztec()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Aztec()); return S_OK; } catch (...) @@ -1263,7 +1357,8 @@ struct produce { try { - *value = detach(this->shim().DataCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataCode()); return S_OK; } catch (...) @@ -1276,7 +1371,8 @@ struct produce { try { - *value = detach(this->shim().DataMatrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataMatrix()); return S_OK; } catch (...) @@ -1289,7 +1385,8 @@ struct produce { try { - *value = detach(this->shim().HanXin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HanXin()); return S_OK; } catch (...) @@ -1302,7 +1399,8 @@ struct produce { try { - *value = detach(this->shim().Maxicode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maxicode()); return S_OK; } catch (...) @@ -1315,7 +1413,8 @@ struct produce { try { - *value = detach(this->shim().MicroPdf417()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MicroPdf417()); return S_OK; } catch (...) @@ -1328,7 +1427,8 @@ struct produce { try { - *value = detach(this->shim().MicroQr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MicroQr()); return S_OK; } catch (...) @@ -1341,7 +1441,8 @@ struct produce { try { - *value = detach(this->shim().Pdf417()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pdf417()); return S_OK; } catch (...) @@ -1354,7 +1455,8 @@ struct produce { try { - *value = detach(this->shim().Qr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Qr()); return S_OK; } catch (...) @@ -1367,7 +1469,8 @@ struct produce { try { - *value = detach(this->shim().MsTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MsTag()); return S_OK; } catch (...) @@ -1380,7 +1483,8 @@ struct produce { try { - *value = detach(this->shim().Ccab()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ccab()); return S_OK; } catch (...) @@ -1393,7 +1497,8 @@ struct produce { try { - *value = detach(this->shim().Ccc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ccc()); return S_OK; } catch (...) @@ -1406,7 +1511,8 @@ struct produce { try { - *value = detach(this->shim().Tlc39()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tlc39()); return S_OK; } catch (...) @@ -1419,7 +1525,8 @@ struct produce { try { - *value = detach(this->shim().AusPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AusPost()); return S_OK; } catch (...) @@ -1432,7 +1539,8 @@ struct produce { try { - *value = detach(this->shim().CanPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPost()); return S_OK; } catch (...) @@ -1445,7 +1553,8 @@ struct produce { try { - *value = detach(this->shim().ChinaPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChinaPost()); return S_OK; } catch (...) @@ -1458,7 +1567,8 @@ struct produce { try { - *value = detach(this->shim().DutchKix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DutchKix()); return S_OK; } catch (...) @@ -1471,7 +1581,8 @@ struct produce { try { - *value = detach(this->shim().InfoMail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InfoMail()); return S_OK; } catch (...) @@ -1484,7 +1595,8 @@ struct produce { try { - *value = detach(this->shim().ItalianPost25()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItalianPost25()); return S_OK; } catch (...) @@ -1497,7 +1609,8 @@ struct produce { try { - *value = detach(this->shim().ItalianPost39()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItalianPost39()); return S_OK; } catch (...) @@ -1510,7 +1623,8 @@ struct produce { try { - *value = detach(this->shim().JapanPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JapanPost()); return S_OK; } catch (...) @@ -1523,7 +1637,8 @@ struct produce { try { - *value = detach(this->shim().KoreanPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KoreanPost()); return S_OK; } catch (...) @@ -1536,7 +1651,8 @@ struct produce { try { - *value = detach(this->shim().SwedenPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SwedenPost()); return S_OK; } catch (...) @@ -1549,7 +1665,8 @@ struct produce { try { - *value = detach(this->shim().UkPost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UkPost()); return S_OK; } catch (...) @@ -1562,7 +1679,8 @@ struct produce { try { - *value = detach(this->shim().UsIntelligent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsIntelligent()); return S_OK; } catch (...) @@ -1575,7 +1693,8 @@ struct produce { try { - *value = detach(this->shim().UsIntelligentPkg()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsIntelligentPkg()); return S_OK; } catch (...) @@ -1588,7 +1707,8 @@ struct produce { try { - *value = detach(this->shim().UsPlanet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsPlanet()); return S_OK; } catch (...) @@ -1601,7 +1721,8 @@ struct produce { try { - *value = detach(this->shim().UsPostNet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsPostNet()); return S_OK; } catch (...) @@ -1614,7 +1735,8 @@ struct produce { try { - *value = detach(this->shim().Us4StateFics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Us4StateFics()); return S_OK; } catch (...) @@ -1627,7 +1749,8 @@ struct produce { try { - *value = detach(this->shim().OcrA()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OcrA()); return S_OK; } catch (...) @@ -1640,7 +1763,8 @@ struct produce { try { - *value = detach(this->shim().OcrB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OcrB()); return S_OK; } catch (...) @@ -1653,7 +1777,8 @@ struct produce { try { - *value = detach(this->shim().Micr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Micr()); return S_OK; } catch (...) @@ -1666,7 +1791,8 @@ struct produce { try { - *value = detach(this->shim().ExtendedBase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedBase()); return S_OK; } catch (...) @@ -1675,11 +1801,12 @@ struct produce } } - HRESULT __stdcall abi_GetName(uint32_t scanDataType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetName(uint32_t scanDataType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetName(scanDataType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetName(scanDataType)); return S_OK; } catch (...) @@ -1693,11 +1820,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1707,11 +1835,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -1721,11 +1850,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Status(abi_arg_out value) noexcept override + HRESULT __stdcall get_Status(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1739,7 +1869,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsDrawerOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDrawerOpen()); return S_OK; } catch (...) @@ -1748,11 +1879,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_DrawerEventSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_DrawerEventSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DrawerEventSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DrawerEventSource()); return S_OK; } catch (...) @@ -1762,11 +1894,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ClaimDrawerAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ClaimDrawerAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ClaimDrawerAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClaimDrawerAsync()); return S_OK; } catch (...) @@ -1776,11 +1909,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CheckHealthAsync(level)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CheckHealthAsync(level)); return S_OK; } catch (...) @@ -1790,11 +1924,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -1804,11 +1939,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_StatusUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1821,6 +1957,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().StatusUpdated(token); return S_OK; } @@ -1838,7 +1975,8 @@ struct produce : p { try { - *value = detach(this->shim().PowerReportingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerReportingType()); return S_OK; } catch (...) @@ -1851,7 +1989,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatisticsReportingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsReportingSupported()); return S_OK; } catch (...) @@ -1864,7 +2003,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatisticsUpdatingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsUpdatingSupported()); return S_OK; } catch (...) @@ -1877,7 +2017,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatusReportingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatusReportingSupported()); return S_OK; } catch (...) @@ -1890,7 +2031,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatusMultiDrawerDetectSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatusMultiDrawerDetectSupported()); return S_OK; } catch (...) @@ -1903,7 +2045,8 @@ struct produce : p { try { - *value = detach(this->shim().IsDrawerOpenSensorAvailable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDrawerOpenSensorAvailable()); return S_OK; } catch (...) @@ -1916,10 +2059,11 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall put_AlarmTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_AlarmTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AlarmTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -1929,11 +2073,12 @@ struct produce : pro } } - HRESULT __stdcall get_AlarmTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlarmTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlarmTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlarmTimeout()); return S_OK; } catch (...) @@ -1946,6 +2091,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().BeepFrequency(value); return S_OK; } @@ -1959,7 +2105,8 @@ struct produce : pro { try { - *value = detach(this->shim().BeepFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BeepFrequency()); return S_OK; } catch (...) @@ -1968,10 +2115,11 @@ struct produce : pro } } - HRESULT __stdcall put_BeepDuration(abi_arg_in value) noexcept override + HRESULT __stdcall put_BeepDuration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeepDuration(*reinterpret_cast(&value)); return S_OK; } @@ -1981,11 +2129,12 @@ struct produce : pro } } - HRESULT __stdcall get_BeepDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_BeepDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BeepDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BeepDuration()); return S_OK; } catch (...) @@ -1994,10 +2143,11 @@ struct produce : pro } } - HRESULT __stdcall put_BeepDelay(abi_arg_in value) noexcept override + HRESULT __stdcall put_BeepDelay(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeepDelay(*reinterpret_cast(&value)); return S_OK; } @@ -2007,11 +2157,12 @@ struct produce : pro } } - HRESULT __stdcall get_BeepDelay(abi_arg_out value) noexcept override + HRESULT __stdcall get_BeepDelay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BeepDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BeepDelay()); return S_OK; } catch (...) @@ -2020,11 +2171,12 @@ struct produce : pro } } - HRESULT __stdcall add_AlarmTimeoutExpired(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AlarmTimeoutExpired(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AlarmTimeoutExpired(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AlarmTimeoutExpired(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2037,6 +2189,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AlarmTimeoutExpired(token); return S_OK; } @@ -2046,11 +2199,12 @@ struct produce : pro } } - HRESULT __stdcall abi_StartAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -2064,11 +2218,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall add_DrawerClosed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DrawerClosed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DrawerClosed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DrawerClosed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2081,6 +2236,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().DrawerClosed(token); return S_OK; } @@ -2090,11 +2246,12 @@ struct produce : pr } } - HRESULT __stdcall add_DrawerOpened(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DrawerOpened(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DrawerOpened(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DrawerOpened(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2107,6 +2264,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().DrawerOpened(token); return S_OK; } @@ -2120,11 +2278,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_CashDrawer(abi_arg_out drawer) noexcept override + HRESULT __stdcall get_CashDrawer(impl::abi_arg_out drawer) noexcept override { try { - *drawer = detach(this->shim().CashDrawer()); + typename D::abi_guard guard(this->shim()); + *drawer = detach_abi(this->shim().CashDrawer()); return S_OK; } catch (...) @@ -2138,11 +2297,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -2152,11 +2312,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -2166,11 +2327,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -2188,7 +2350,8 @@ struct produce : produce { try { - *value = detach(this->shim().StatusKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatusKind()); return S_OK; } catch (...) @@ -2201,7 +2364,8 @@ struct produce : produce { try { - *value = detach(this->shim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -2214,11 +2378,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Status(abi_arg_out value) noexcept override + HRESULT __stdcall get_Status(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2232,11 +2397,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2250,7 +2416,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2263,6 +2430,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsDisabledOnDataReceived(value); return S_OK; } @@ -2276,7 +2444,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsDisabledOnDataReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisabledOnDataReceived()); return S_OK; } catch (...) @@ -2289,6 +2458,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsDecodeDataEnabled(value); return S_OK; } @@ -2302,7 +2472,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsDecodeDataEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDecodeDataEnabled()); return S_OK; } catch (...) @@ -2311,11 +2482,12 @@ struct produce : pr } } - HRESULT __stdcall abi_EnableAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_EnableAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().EnableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnableAsync()); return S_OK; } catch (...) @@ -2325,11 +2497,12 @@ struct produce : pr } } - HRESULT __stdcall abi_DisableAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DisableAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DisableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DisableAsync()); return S_OK; } catch (...) @@ -2343,6 +2516,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().RetainDevice(); return S_OK; } @@ -2352,11 +2526,12 @@ struct produce : pr } } - HRESULT __stdcall abi_SetActiveSymbologiesAsync(abi_arg_in> symbologies, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SetActiveSymbologiesAsync(impl::abi_arg_in> symbologies, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SetActiveSymbologiesAsync(*reinterpret_cast *>(&symbologies))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetActiveSymbologiesAsync(*reinterpret_cast *>(&symbologies))); return S_OK; } catch (...) @@ -2366,11 +2541,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ResetStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ResetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -2380,11 +2556,12 @@ struct produce : pr } } - HRESULT __stdcall abi_UpdateStatisticsAsync(abi_arg_in>> statistics, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UpdateStatisticsAsync(impl::abi_arg_in>> statistics, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); return S_OK; } catch (...) @@ -2394,11 +2571,12 @@ struct produce : pr } } - HRESULT __stdcall abi_SetActiveProfileAsync(abi_arg_in profile, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SetActiveProfileAsync(impl::abi_arg_in profile, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SetActiveProfileAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetActiveProfileAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -2408,11 +2586,12 @@ struct produce : pr } } - HRESULT __stdcall add_DataReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2425,6 +2604,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().DataReceived(token); return S_OK; } @@ -2434,11 +2614,12 @@ struct produce : pr } } - HRESULT __stdcall add_TriggerPressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_TriggerPressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TriggerPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TriggerPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2451,6 +2632,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().TriggerPressed(token); return S_OK; } @@ -2460,11 +2642,12 @@ struct produce : pr } } - HRESULT __stdcall add_TriggerReleased(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_TriggerReleased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TriggerReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TriggerReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2477,6 +2660,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().TriggerReleased(token); return S_OK; } @@ -2486,11 +2670,12 @@ struct produce : pr } } - HRESULT __stdcall add_ReleaseDeviceRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReleaseDeviceRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2503,6 +2688,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleaseDeviceRequested(token); return S_OK; } @@ -2512,11 +2698,12 @@ struct produce : pr } } - HRESULT __stdcall add_ImagePreviewReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ImagePreviewReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ImagePreviewReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ImagePreviewReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2529,6 +2716,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ImagePreviewReceived(token); return S_OK; } @@ -2538,11 +2726,12 @@ struct produce : pr } } - HRESULT __stdcall add_ErrorOccurred(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ErrorOccurred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2555,6 +2744,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ErrorOccurred(token); return S_OK; } @@ -2568,11 +2758,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_StartSoftwareTriggerAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartSoftwareTriggerAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartSoftwareTriggerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartSoftwareTriggerAsync()); return S_OK; } catch (...) @@ -2582,11 +2773,12 @@ struct produce : p } } - HRESULT __stdcall abi_StopSoftwareTriggerAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_StopSoftwareTriggerAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StopSoftwareTriggerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StopSoftwareTriggerAsync()); return S_OK; } catch (...) @@ -2600,11 +2792,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2618,7 +2811,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2631,7 +2825,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsDrawerOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDrawerOpen()); return S_OK; } catch (...) @@ -2640,11 +2835,12 @@ struct produce : produc } } - HRESULT __stdcall get_CloseAlarm(abi_arg_out value) noexcept override + HRESULT __stdcall get_CloseAlarm(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CloseAlarm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CloseAlarm()); return S_OK; } catch (...) @@ -2654,11 +2850,12 @@ struct produce : produc } } - HRESULT __stdcall abi_OpenDrawerAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_OpenDrawerAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().OpenDrawerAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().OpenDrawerAsync()); return S_OK; } catch (...) @@ -2668,11 +2865,12 @@ struct produce : produc } } - HRESULT __stdcall abi_EnableAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_EnableAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().EnableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnableAsync()); return S_OK; } catch (...) @@ -2682,11 +2880,12 @@ struct produce : produc } } - HRESULT __stdcall abi_DisableAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_DisableAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DisableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DisableAsync()); return S_OK; } catch (...) @@ -2696,11 +2895,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RetainDeviceAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RetainDeviceAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RetainDeviceAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RetainDeviceAsync()); return S_OK; } catch (...) @@ -2710,11 +2910,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ResetStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ResetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -2724,11 +2925,12 @@ struct produce : produc } } - HRESULT __stdcall abi_UpdateStatisticsAsync(abi_arg_in>> statistics, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UpdateStatisticsAsync(impl::abi_arg_in>> statistics, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); return S_OK; } catch (...) @@ -2738,11 +2940,12 @@ struct produce : produc } } - HRESULT __stdcall add_ReleaseDeviceRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReleaseDeviceRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2755,6 +2958,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleaseDeviceRequested(token); return S_OK; } @@ -2768,11 +2972,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateJob(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateJob(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateJob()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateJob()); return S_OK; } catch (...) @@ -2786,11 +2991,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2804,7 +3010,8 @@ struct produceshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2817,6 +3024,7 @@ struct produceshim()); this->shim().IsDisabledOnDataReceived(value); return S_OK; } @@ -2830,7 +3038,8 @@ struct produceshim().IsDisabledOnDataReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisabledOnDataReceived()); return S_OK; } catch (...) @@ -2843,6 +3052,7 @@ struct produceshim()); this->shim().IsDecodeDataEnabled(value); return S_OK; } @@ -2856,7 +3066,8 @@ struct produceshim().IsDecodeDataEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDecodeDataEnabled()); return S_OK; } catch (...) @@ -2869,7 +3080,8 @@ struct produceshim().IsDeviceAuthenticated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeviceAuthenticated()); return S_OK; } catch (...) @@ -2882,6 +3094,7 @@ struct produceshim()); this->shim().DataEncryptionAlgorithm(value); return S_OK; } @@ -2895,7 +3108,8 @@ struct produceshim().DataEncryptionAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataEncryptionAlgorithm()); return S_OK; } catch (...) @@ -2908,6 +3122,7 @@ struct produceshim()); this->shim().TracksToRead(value); return S_OK; } @@ -2921,7 +3136,8 @@ struct produceshim().TracksToRead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TracksToRead()); return S_OK; } catch (...) @@ -2934,6 +3150,7 @@ struct produceshim()); this->shim().IsTransmitSentinelsEnabled(value); return S_OK; } @@ -2947,7 +3164,8 @@ struct produceshim().IsTransmitSentinelsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTransmitSentinelsEnabled()); return S_OK; } catch (...) @@ -2956,11 +3174,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_EnableAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().EnableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnableAsync()); return S_OK; } catch (...) @@ -2970,11 +3189,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_DisableAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DisableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DisableAsync()); return S_OK; } catch (...) @@ -2988,6 +3208,7 @@ struct produceshim()); this->shim().RetainDevice(); return S_OK; } @@ -3001,6 +3222,7 @@ struct produceshim()); this->shim().SetErrorReportingType(value); return S_OK; } @@ -3010,11 +3232,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_RetrieveDeviceAuthenticationDataAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RetrieveDeviceAuthenticationDataAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RetrieveDeviceAuthenticationDataAsync()); return S_OK; } catch (...) @@ -3024,11 +3247,12 @@ struct produce * responseToken, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AuthenticateDeviceAsync(uint32_t __responseTokenSize, impl::abi_arg_in * responseToken, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AuthenticateDeviceAsync(array_ref(responseToken, responseToken + __responseTokenSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AuthenticateDeviceAsync(array_view(responseToken, responseToken + __responseTokenSize))); return S_OK; } catch (...) @@ -3038,11 +3262,12 @@ struct produce * responseToken, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeAuthenticateDeviceAsync(uint32_t __responseTokenSize, impl::abi_arg_in * responseToken, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeAuthenticateDeviceAsync(array_ref(responseToken, responseToken + __responseTokenSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeAuthenticateDeviceAsync(array_view(responseToken, responseToken + __responseTokenSize))); return S_OK; } catch (...) @@ -3052,11 +3277,12 @@ struct produce key, abi_arg_in keyName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UpdateKeyAsync(impl::abi_arg_in key, impl::abi_arg_in keyName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UpdateKeyAsync(*reinterpret_cast(&key), *reinterpret_cast(&keyName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateKeyAsync(*reinterpret_cast(&key), *reinterpret_cast(&keyName))); return S_OK; } catch (...) @@ -3066,11 +3292,12 @@ struct produce> statisticsCategories, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ResetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -3080,11 +3307,12 @@ struct produce>> statistics, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UpdateStatisticsAsync(impl::abi_arg_in>> statistics, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); return S_OK; } catch (...) @@ -3094,11 +3322,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_BankCardDataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BankCardDataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BankCardDataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3111,6 +3340,7 @@ struct produceshim()); this->shim().BankCardDataReceived(token); return S_OK; } @@ -3120,11 +3350,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_AamvaCardDataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AamvaCardDataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AamvaCardDataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3137,6 +3368,7 @@ struct produceshim()); this->shim().AamvaCardDataReceived(token); return S_OK; } @@ -3146,11 +3378,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_VendorSpecificDataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VendorSpecificDataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VendorSpecificDataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3163,6 +3396,7 @@ struct produceshim()); this->shim().VendorSpecificDataReceived(token); return S_OK; } @@ -3172,11 +3406,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReleaseDeviceRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3189,6 +3424,7 @@ struct produceshim()); this->shim().ReleaseDeviceRequested(token); return S_OK; } @@ -3198,11 +3434,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ErrorOccurred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3215,6 +3452,7 @@ struct produceshim()); this->shim().ErrorOccurred(token); return S_OK; } @@ -3228,11 +3466,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -3246,7 +3485,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -3259,6 +3499,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().CharacterSet(value); return S_OK; } @@ -3272,7 +3513,8 @@ struct produce : produc { try { - *value = detach(this->shim().CharacterSet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSet()); return S_OK; } catch (...) @@ -3285,7 +3527,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsCoverOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCoverOpen()); return S_OK; } catch (...) @@ -3298,6 +3541,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCharacterSetMappingEnabled(value); return S_OK; } @@ -3311,7 +3555,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsCharacterSetMappingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCharacterSetMappingEnabled()); return S_OK; } catch (...) @@ -3324,6 +3569,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MapMode(value); return S_OK; } @@ -3337,7 +3583,8 @@ struct produce : produc { try { - *value = detach(this->shim().MapMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapMode()); return S_OK; } catch (...) @@ -3346,11 +3593,12 @@ struct produce : produc } } - HRESULT __stdcall get_Receipt(abi_arg_out value) noexcept override + HRESULT __stdcall get_Receipt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Receipt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Receipt()); return S_OK; } catch (...) @@ -3360,11 +3608,12 @@ struct produce : produc } } - HRESULT __stdcall get_Slip(abi_arg_out value) noexcept override + HRESULT __stdcall get_Slip(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Slip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Slip()); return S_OK; } catch (...) @@ -3374,11 +3623,12 @@ struct produce : produc } } - HRESULT __stdcall get_Journal(abi_arg_out value) noexcept override + HRESULT __stdcall get_Journal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Journal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Journal()); return S_OK; } catch (...) @@ -3388,11 +3638,12 @@ struct produce : produc } } - HRESULT __stdcall abi_EnableAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_EnableAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().EnableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnableAsync()); return S_OK; } catch (...) @@ -3402,11 +3653,12 @@ struct produce : produc } } - HRESULT __stdcall abi_DisableAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_DisableAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DisableAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DisableAsync()); return S_OK; } catch (...) @@ -3416,11 +3668,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RetainDeviceAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RetainDeviceAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RetainDeviceAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RetainDeviceAsync()); return S_OK; } catch (...) @@ -3430,11 +3683,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ResetStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ResetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ResetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -3444,11 +3698,12 @@ struct produce : produc } } - HRESULT __stdcall abi_UpdateStatisticsAsync(abi_arg_in>> statistics, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UpdateStatisticsAsync(impl::abi_arg_in>> statistics, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateStatisticsAsync(*reinterpret_cast> *>(&statistics))); return S_OK; } catch (...) @@ -3458,11 +3713,12 @@ struct produce : produc } } - HRESULT __stdcall add_ReleaseDeviceRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReleaseDeviceRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReleaseDeviceRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3475,6 +3731,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleaseDeviceRequested(token); return S_OK; } @@ -3492,7 +3749,8 @@ struct produce : pr { try { - *value = detach(this->shim().SidewaysMaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidewaysMaxLines()); return S_OK; } catch (...) @@ -3505,7 +3763,8 @@ struct produce : pr { try { - *value = detach(this->shim().SidewaysMaxChars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidewaysMaxChars()); return S_OK; } catch (...) @@ -3518,7 +3777,8 @@ struct produce : pr { try { - *value = detach(this->shim().LinesToPaperCut()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinesToPaperCut()); return S_OK; } catch (...) @@ -3527,11 +3787,12 @@ struct produce : pr } } - HRESULT __stdcall get_PageSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_PageSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageSize()); return S_OK; } catch (...) @@ -3540,11 +3801,12 @@ struct produce : pr } } - HRESULT __stdcall get_PrintArea(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrintArea(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrintArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintArea()); return S_OK; } catch (...) @@ -3553,11 +3815,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateJob(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateJob(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateJob()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateJob()); return S_OK; } catch (...) @@ -3575,7 +3838,8 @@ struct produce : produ { try { - *value = detach(this->shim().SidewaysMaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidewaysMaxLines()); return S_OK; } catch (...) @@ -3588,7 +3852,8 @@ struct produce : produ { try { - *value = detach(this->shim().SidewaysMaxChars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidewaysMaxChars()); return S_OK; } catch (...) @@ -3601,7 +3866,8 @@ struct produce : produ { try { - *value = detach(this->shim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -3614,7 +3880,8 @@ struct produce : produ { try { - *value = detach(this->shim().LinesNearEndToEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinesNearEndToEnd()); return S_OK; } catch (...) @@ -3627,7 +3894,8 @@ struct produce : produ { try { - *value = detach(this->shim().PrintSide()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintSide()); return S_OK; } catch (...) @@ -3636,11 +3904,12 @@ struct produce : produ } } - HRESULT __stdcall get_PageSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_PageSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageSize()); return S_OK; } catch (...) @@ -3649,11 +3918,12 @@ struct produce : produ } } - HRESULT __stdcall get_PrintArea(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrintArea(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrintArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintArea()); return S_OK; } catch (...) @@ -3666,6 +3936,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().OpenJaws(); return S_OK; } @@ -3679,6 +3950,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().CloseJaws(); return S_OK; } @@ -3688,11 +3960,12 @@ struct produce : produ } } - HRESULT __stdcall abi_InsertSlipAsync(abi_arg_in timeout, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_InsertSlipAsync(impl::abi_arg_in timeout, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().InsertSlipAsync(*reinterpret_cast(&timeout))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().InsertSlipAsync(*reinterpret_cast(&timeout))); return S_OK; } catch (...) @@ -3702,11 +3975,12 @@ struct produce : produ } } - HRESULT __stdcall abi_RemoveSlipAsync(abi_arg_in timeout, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RemoveSlipAsync(impl::abi_arg_in timeout, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RemoveSlipAsync(*reinterpret_cast(&timeout))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RemoveSlipAsync(*reinterpret_cast(&timeout))); return S_OK; } catch (...) @@ -3720,6 +3994,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ChangePrintSide(printSide); return S_OK; } @@ -3729,11 +4004,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateJob(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateJob(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateJob()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateJob()); return S_OK; } catch (...) @@ -3751,6 +4027,7 @@ struct produceshim()); this->shim().CharactersPerLine(value); return S_OK; } @@ -3764,7 +4041,8 @@ struct produceshim().CharactersPerLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharactersPerLine()); return S_OK; } catch (...) @@ -3777,6 +4055,7 @@ struct produceshim()); this->shim().LineHeight(value); return S_OK; } @@ -3790,7 +4069,8 @@ struct produceshim().LineHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeight()); return S_OK; } catch (...) @@ -3803,6 +4083,7 @@ struct produceshim()); this->shim().LineSpacing(value); return S_OK; } @@ -3816,7 +4097,8 @@ struct produceshim().LineSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineSpacing()); return S_OK; } catch (...) @@ -3829,7 +4111,8 @@ struct produceshim().LineWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineWidth()); return S_OK; } catch (...) @@ -3842,6 +4125,7 @@ struct produceshim()); this->shim().IsLetterQuality(value); return S_OK; } @@ -3855,7 +4139,8 @@ struct produceshim().IsLetterQuality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLetterQuality()); return S_OK; } catch (...) @@ -3868,7 +4153,8 @@ struct produceshim().IsPaperNearEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaperNearEnd()); return S_OK; } catch (...) @@ -3881,6 +4167,7 @@ struct produceshim()); this->shim().ColorCartridge(value); return S_OK; } @@ -3894,7 +4181,8 @@ struct produceshim().ColorCartridge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorCartridge()); return S_OK; } catch (...) @@ -3907,7 +4195,8 @@ struct produceshim().IsCoverOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCoverOpen()); return S_OK; } catch (...) @@ -3920,7 +4209,8 @@ struct produceshim().IsCartridgeRemoved()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCartridgeRemoved()); return S_OK; } catch (...) @@ -3933,7 +4223,8 @@ struct produceshim().IsCartridgeEmpty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCartridgeEmpty()); return S_OK; } catch (...) @@ -3946,7 +4237,8 @@ struct produceshim().IsHeadCleaning()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHeadCleaning()); return S_OK; } catch (...) @@ -3959,7 +4251,8 @@ struct produceshim().IsPaperEmpty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaperEmpty()); return S_OK; } catch (...) @@ -3972,7 +4265,8 @@ struct produceshim().IsReadyToPrint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadyToPrint()); return S_OK; } catch (...) @@ -3981,11 +4275,12 @@ struct produce data, bool * result) noexcept override + HRESULT __stdcall abi_ValidateData(impl::abi_arg_in data, bool * result) noexcept override { try { - *result = detach(this->shim().ValidateData(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ValidateData(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -4002,7 +4297,8 @@ struct produceshim().IsPrinterPresent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrinterPresent()); return S_OK; } catch (...) @@ -4015,7 +4311,8 @@ struct produceshim().IsDualColorSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDualColorSupported()); return S_OK; } catch (...) @@ -4028,7 +4325,8 @@ struct produceshim().ColorCartridgeCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorCartridgeCapabilities()); return S_OK; } catch (...) @@ -4041,7 +4339,8 @@ struct produceshim().CartridgeSensors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CartridgeSensors()); return S_OK; } catch (...) @@ -4054,7 +4353,8 @@ struct produceshim().IsBoldSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBoldSupported()); return S_OK; } catch (...) @@ -4067,7 +4367,8 @@ struct produceshim().IsItalicSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsItalicSupported()); return S_OK; } catch (...) @@ -4080,7 +4381,8 @@ struct produceshim().IsUnderlineSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUnderlineSupported()); return S_OK; } catch (...) @@ -4093,7 +4395,8 @@ struct produceshim().IsDoubleHighPrintSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDoubleHighPrintSupported()); return S_OK; } catch (...) @@ -4106,7 +4409,8 @@ struct produceshim().IsDoubleWidePrintSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDoubleWidePrintSupported()); return S_OK; } catch (...) @@ -4119,7 +4423,8 @@ struct produceshim().IsDoubleHighDoubleWidePrintSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDoubleHighDoubleWidePrintSupported()); return S_OK; } catch (...) @@ -4132,7 +4437,8 @@ struct produceshim().IsPaperEmptySensorSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaperEmptySensorSupported()); return S_OK; } catch (...) @@ -4145,7 +4451,8 @@ struct produceshim().IsPaperNearEndSensorSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaperNearEndSensorSupported()); return S_OK; } catch (...) @@ -4154,11 +4461,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedCharactersPerLine(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedCharactersPerLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedCharactersPerLine()); return S_OK; } catch (...) @@ -4176,7 +4484,8 @@ struct produceshim().IsBarcodeSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBarcodeSupported()); return S_OK; } catch (...) @@ -4189,7 +4498,8 @@ struct produceshim().IsBitmapSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBitmapSupported()); return S_OK; } catch (...) @@ -4202,7 +4512,8 @@ struct produceshim().IsLeft90RotationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLeft90RotationSupported()); return S_OK; } catch (...) @@ -4215,7 +4526,8 @@ struct produceshim().IsRight90RotationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRight90RotationSupported()); return S_OK; } catch (...) @@ -4228,7 +4540,8 @@ struct produceshim().Is180RotationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Is180RotationSupported()); return S_OK; } catch (...) @@ -4241,7 +4554,8 @@ struct produceshim().IsPrintAreaSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrintAreaSupported()); return S_OK; } catch (...) @@ -4254,7 +4568,8 @@ struct produceshim().RuledLineCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RuledLineCapabilities()); return S_OK; } catch (...) @@ -4263,11 +4578,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedBarcodeRotations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedBarcodeRotations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedBarcodeRotations()); return S_OK; } catch (...) @@ -4277,11 +4593,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedBitmapRotations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedBitmapRotations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedBitmapRotations()); return S_OK; } catch (...) @@ -4299,11 +4616,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -4313,11 +4631,12 @@ struct produce : pro } } - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -4327,11 +4646,12 @@ struct produce : pro } } - HRESULT __stdcall get_SupportedCardTypes(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_SupportedCardTypes(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().SupportedCardTypes()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().SupportedCardTypes()); return S_OK; } catch (...) @@ -4346,7 +4666,8 @@ struct produce : pro { try { - *value = detach(this->shim().DeviceAuthenticationProtocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceAuthenticationProtocol()); return S_OK; } catch (...) @@ -4355,11 +4676,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CheckHealthAsync(level)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CheckHealthAsync(level)); return S_OK; } catch (...) @@ -4369,11 +4691,12 @@ struct produce : pro } } - HRESULT __stdcall abi_ClaimReaderAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ClaimReaderAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ClaimReaderAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClaimReaderAsync()); return S_OK; } catch (...) @@ -4383,11 +4706,12 @@ struct produce : pro } } - HRESULT __stdcall abi_RetrieveStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RetrieveStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RetrieveStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RetrieveStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -4401,7 +4725,8 @@ struct produce : pro { try { - *value = detach(this->shim().GetErrorReportingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetErrorReportingType()); return S_OK; } catch (...) @@ -4410,11 +4735,12 @@ struct produce : pro } } - HRESULT __stdcall add_StatusUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -4427,6 +4753,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().StatusUpdated(token); return S_OK; } @@ -4440,11 +4767,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Report(abi_arg_out value) noexcept override + HRESULT __stdcall get_Report(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -4454,11 +4782,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LicenseNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LicenseNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseNumber()); return S_OK; } catch (...) @@ -4468,11 +4797,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -4482,11 +4812,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Restrictions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Restrictions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Restrictions()); return S_OK; } catch (...) @@ -4496,11 +4827,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Class(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Class()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Class()); return S_OK; } catch (...) @@ -4510,11 +4842,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Endorsements(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Endorsements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Endorsements()); return S_OK; } catch (...) @@ -4524,11 +4857,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BirthDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BirthDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BirthDate()); return S_OK; } catch (...) @@ -4538,11 +4872,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FirstName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstName()); return S_OK; } catch (...) @@ -4552,11 +4887,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Surname(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Surname()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Surname()); return S_OK; } catch (...) @@ -4566,11 +4902,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Suffix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Suffix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Suffix()); return S_OK; } catch (...) @@ -4580,11 +4917,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Gender(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Gender()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gender()); return S_OK; } catch (...) @@ -4594,11 +4932,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HairColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HairColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HairColor()); return S_OK; } catch (...) @@ -4608,11 +4947,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EyeColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EyeColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EyeColor()); return S_OK; } catch (...) @@ -4622,11 +4962,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Height(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -4636,11 +4977,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Weight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Weight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Weight()); return S_OK; } catch (...) @@ -4650,11 +4992,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -4664,11 +5007,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_City(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().City()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().City()); return S_OK; } catch (...) @@ -4678,11 +5022,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_State(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -4692,11 +5037,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PostalCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostalCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostalCode()); return S_OK; } catch (...) @@ -4710,11 +5056,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Report(abi_arg_out value) noexcept override + HRESULT __stdcall get_Report(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -4724,11 +5071,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AccountNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountNumber()); return S_OK; } catch (...) @@ -4738,11 +5086,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -4752,11 +5101,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceCode()); return S_OK; } catch (...) @@ -4766,11 +5116,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -4780,11 +5131,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FirstName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstName()); return S_OK; } catch (...) @@ -4794,11 +5146,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MiddleInitial(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MiddleInitial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MiddleInitial()); return S_OK; } catch (...) @@ -4808,11 +5161,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Surname(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Surname()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Surname()); return S_OK; } catch (...) @@ -4822,11 +5176,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Suffix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Suffix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Suffix()); return S_OK; } catch (...) @@ -4840,11 +5195,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CardAuthentication(abi_arg_out value) noexcept override + HRESULT __stdcall get_CardAuthentication(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CardAuthentication()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardAuthentication()); return S_OK; } catch (...) @@ -4858,7 +5214,8 @@ struct produceshim().SupportedEncryptionAlgorithms()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedEncryptionAlgorithms()); return S_OK; } catch (...) @@ -4871,7 +5228,8 @@ struct produceshim().AuthenticationLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationLevel()); return S_OK; } catch (...) @@ -4884,7 +5242,8 @@ struct produceshim().IsIsoSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIsoSupported()); return S_OK; } catch (...) @@ -4897,7 +5256,8 @@ struct produceshim().IsJisOneSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsJisOneSupported()); return S_OK; } catch (...) @@ -4910,7 +5270,8 @@ struct produceshim().IsJisTwoSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsJisTwoSupported()); return S_OK; } catch (...) @@ -4923,7 +5284,8 @@ struct produceshim().PowerReportingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerReportingType()); return S_OK; } catch (...) @@ -4936,7 +5298,8 @@ struct produceshim().IsStatisticsReportingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsReportingSupported()); return S_OK; } catch (...) @@ -4949,7 +5312,8 @@ struct produceshim().IsStatisticsUpdatingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsUpdatingSupported()); return S_OK; } catch (...) @@ -4962,7 +5326,8 @@ struct produceshim().IsTrackDataMaskingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrackDataMaskingSupported()); return S_OK; } catch (...) @@ -4975,7 +5340,8 @@ struct produceshim().IsTransmitSentinelsSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTransmitSentinelsSupported()); return S_OK; } catch (...) @@ -4992,7 +5358,8 @@ struct produceshim().Unknown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unknown()); return S_OK; } catch (...) @@ -5005,7 +5372,8 @@ struct produceshim().Bank()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bank()); return S_OK; } catch (...) @@ -5018,7 +5386,8 @@ struct produceshim().Aamva()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Aamva()); return S_OK; } catch (...) @@ -5031,7 +5400,8 @@ struct produceshim().ExtendedBase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedBase()); return S_OK; } catch (...) @@ -5048,7 +5418,8 @@ struct produceshim().None()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().None()); return S_OK; } catch (...) @@ -5061,7 +5432,8 @@ struct produceshim().TripleDesDukpt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TripleDesDukpt()); return S_OK; } catch (...) @@ -5074,7 +5446,8 @@ struct produceshim().ExtendedBase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedBase()); return S_OK; } catch (...) @@ -5091,7 +5464,8 @@ struct produceshim().Track1Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track1Status()); return S_OK; } catch (...) @@ -5104,7 +5478,8 @@ struct produceshim().Track2Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track2Status()); return S_OK; } catch (...) @@ -5117,7 +5492,8 @@ struct produceshim().Track3Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track3Status()); return S_OK; } catch (...) @@ -5130,7 +5506,8 @@ struct produceshim().Track4Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track4Status()); return S_OK; } catch (...) @@ -5139,11 +5516,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ErrorData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorData()); return S_OK; } catch (...) @@ -5153,11 +5531,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PartialInputData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PartialInputData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartialInputData()); return S_OK; } catch (...) @@ -5175,7 +5554,8 @@ struct produce { try { - *value = detach(this->shim().CardType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardType()); return S_OK; } catch (...) @@ -5184,11 +5564,12 @@ struct produce } } - HRESULT __stdcall get_Track1(abi_arg_out value) noexcept override + HRESULT __stdcall get_Track1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Track1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track1()); return S_OK; } catch (...) @@ -5198,11 +5579,12 @@ struct produce } } - HRESULT __stdcall get_Track2(abi_arg_out value) noexcept override + HRESULT __stdcall get_Track2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Track2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track2()); return S_OK; } catch (...) @@ -5212,11 +5594,12 @@ struct produce } } - HRESULT __stdcall get_Track3(abi_arg_out value) noexcept override + HRESULT __stdcall get_Track3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Track3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track3()); return S_OK; } catch (...) @@ -5226,11 +5609,12 @@ struct produce } } - HRESULT __stdcall get_Track4(abi_arg_out value) noexcept override + HRESULT __stdcall get_Track4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Track4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track4()); return S_OK; } catch (...) @@ -5240,11 +5624,12 @@ struct produce } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -5254,11 +5639,12 @@ struct produce } } - HRESULT __stdcall get_CardAuthenticationData(abi_arg_out value) noexcept override + HRESULT __stdcall get_CardAuthenticationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CardAuthenticationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardAuthenticationData()); return S_OK; } catch (...) @@ -5272,7 +5658,8 @@ struct produce { try { - *value = detach(this->shim().CardAuthenticationDataLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CardAuthenticationDataLength()); return S_OK; } catch (...) @@ -5281,11 +5668,12 @@ struct produce } } - HRESULT __stdcall get_AdditionalSecurityInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdditionalSecurityInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdditionalSecurityInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalSecurityInformation()); return S_OK; } catch (...) @@ -5299,11 +5687,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -5313,11 +5702,12 @@ struct produce deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -5327,11 +5717,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -5349,7 +5740,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -5362,7 +5754,8 @@ struct produceshim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -5375,11 +5768,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -5389,11 +5783,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DiscretionaryData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DiscretionaryData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiscretionaryData()); return S_OK; } catch (...) @@ -5403,11 +5798,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EncryptedData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncryptedData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncryptedData()); return S_OK; } catch (...) @@ -5421,11 +5817,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Report(abi_arg_out value) noexcept override + HRESULT __stdcall get_Report(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Report()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Report()); return S_OK; } catch (...) @@ -5439,11 +5836,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -5453,11 +5851,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -5467,11 +5866,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_SupportedCharacterSets(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedCharacterSets(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedCharacterSets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedCharacterSets()); return S_OK; } catch (...) @@ -5481,11 +5881,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_SupportedTypeFaces(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedTypeFaces(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedTypeFaces()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedTypeFaces()); return S_OK; } catch (...) @@ -5495,11 +5896,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Status(abi_arg_out value) noexcept override + HRESULT __stdcall get_Status(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -5509,11 +5911,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ClaimPrinterAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ClaimPrinterAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ClaimPrinterAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClaimPrinterAsync()); return S_OK; } catch (...) @@ -5523,11 +5926,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CheckHealthAsync(level)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CheckHealthAsync(level)); return S_OK; } catch (...) @@ -5537,11 +5941,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetStatisticsAsync(abi_arg_in> statisticsCategories, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetStatisticsAsync(impl::abi_arg_in> statisticsCategories, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStatisticsAsync(*reinterpret_cast *>(&statisticsCategories))); return S_OK; } catch (...) @@ -5551,11 +5956,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_StatusUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -5568,6 +5974,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().StatusUpdated(token); return S_OK; } @@ -5585,7 +5992,8 @@ struct produce : p { try { - *value = detach(this->shim().PowerReportingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerReportingType()); return S_OK; } catch (...) @@ -5598,7 +6006,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatisticsReportingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsReportingSupported()); return S_OK; } catch (...) @@ -5611,7 +6020,8 @@ struct produce : p { try { - *value = detach(this->shim().IsStatisticsUpdatingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStatisticsUpdatingSupported()); return S_OK; } catch (...) @@ -5624,7 +6034,8 @@ struct produce : p { try { - *value = detach(this->shim().DefaultCharacterSet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultCharacterSet()); return S_OK; } catch (...) @@ -5637,7 +6048,8 @@ struct produce : p { try { - *value = detach(this->shim().HasCoverSensor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasCoverSensor()); return S_OK; } catch (...) @@ -5650,7 +6062,8 @@ struct produce : p { try { - *value = detach(this->shim().CanMapCharacterSet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMapCharacterSet()); return S_OK; } catch (...) @@ -5663,7 +6076,8 @@ struct produce : p { try { - *value = detach(this->shim().IsTransactionSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTransactionSupported()); return S_OK; } catch (...) @@ -5672,11 +6086,12 @@ struct produce : p } } - HRESULT __stdcall get_Receipt(abi_arg_out value) noexcept override + HRESULT __stdcall get_Receipt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Receipt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Receipt()); return S_OK; } catch (...) @@ -5686,11 +6101,12 @@ struct produce : p } } - HRESULT __stdcall get_Slip(abi_arg_out value) noexcept override + HRESULT __stdcall get_Slip(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Slip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Slip()); return S_OK; } catch (...) @@ -5700,11 +6116,12 @@ struct produce : p } } - HRESULT __stdcall get_Journal(abi_arg_out value) noexcept override + HRESULT __stdcall get_Journal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Journal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Journal()); return S_OK; } catch (...) @@ -5722,7 +6139,8 @@ struct produceshim().Utf16LE()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Utf16LE()); return S_OK; } catch (...) @@ -5735,7 +6153,8 @@ struct produceshim().Ascii()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ascii()); return S_OK; } catch (...) @@ -5748,7 +6167,8 @@ struct produceshim().Ansi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ansi()); return S_OK; } catch (...) @@ -5761,10 +6181,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Print(abi_arg_in data) noexcept override + HRESULT __stdcall abi_Print(impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Print(*reinterpret_cast(&data)); return S_OK; } @@ -5774,10 +6195,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PrintLine(abi_arg_in data) noexcept override + HRESULT __stdcall abi_PrintLine(impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintLine(*reinterpret_cast(&data)); return S_OK; } @@ -5791,6 +6213,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintLine(); return S_OK; } @@ -5800,11 +6223,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ExecuteAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ExecuteAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ExecuteAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ExecuteAsync()); return S_OK; } catch (...) @@ -5822,11 +6246,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -5836,11 +6261,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -5850,11 +6276,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -5872,7 +6299,8 @@ struct produce : produce { try { - *value = detach(this->shim().StatusKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatusKind()); return S_OK; } catch (...) @@ -5885,7 +6313,8 @@ struct produce : produce { try { - *value = detach(this->shim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -5898,11 +6327,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Status(abi_arg_out value) noexcept override + HRESULT __stdcall get_Status(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -5920,6 +6350,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBarcodeRotation(value); return S_OK; } @@ -5933,6 +6364,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPrintRotation(value, includeBitmaps); return S_OK; } @@ -5942,10 +6374,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetPrintArea(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetPrintArea(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPrintArea(*reinterpret_cast(&value)); return S_OK; } @@ -5955,10 +6388,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetBitmap(uint32_t bitmapNumber, abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override + HRESULT __stdcall abi_SetBitmap(uint32_t bitmapNumber, impl::abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBitmap(bitmapNumber, *reinterpret_cast(&bitmap), alignment); return S_OK; } @@ -5968,10 +6402,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetBitmapCustomWidthStandardAlign(uint32_t bitmapNumber, abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) noexcept override + HRESULT __stdcall abi_SetBitmapCustomWidthStandardAlign(uint32_t bitmapNumber, impl::abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBitmap(bitmapNumber, *reinterpret_cast(&bitmap), alignment, width); return S_OK; } @@ -5981,10 +6416,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetCustomAlignedBitmap(uint32_t bitmapNumber, abi_arg_in bitmap, uint32_t alignmentDistance) noexcept override + HRESULT __stdcall abi_SetCustomAlignedBitmap(uint32_t bitmapNumber, impl::abi_arg_in bitmap, uint32_t alignmentDistance) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetCustomAlignedBitmap(bitmapNumber, *reinterpret_cast(&bitmap), alignmentDistance); return S_OK; } @@ -5994,10 +6430,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetBitmapCustomWidthCustomAlign(uint32_t bitmapNumber, abi_arg_in bitmap, uint32_t alignmentDistance, uint32_t width) noexcept override + HRESULT __stdcall abi_SetBitmapCustomWidthCustomAlign(uint32_t bitmapNumber, impl::abi_arg_in bitmap, uint32_t alignmentDistance, uint32_t width) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetCustomAlignedBitmap(bitmapNumber, *reinterpret_cast(&bitmap), alignmentDistance, width); return S_OK; } @@ -6011,6 +6448,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintSavedBitmap(bitmapNumber); return S_OK; } @@ -6020,10 +6458,11 @@ struct produce : produce } } - HRESULT __stdcall abi_DrawRuledLine(abi_arg_in positionList, Windows::Devices::PointOfService::PosPrinterLineDirection lineDirection, uint32_t lineWidth, Windows::Devices::PointOfService::PosPrinterLineStyle lineStyle, uint32_t lineColor) noexcept override + HRESULT __stdcall abi_DrawRuledLine(impl::abi_arg_in positionList, Windows::Devices::PointOfService::PosPrinterLineDirection lineDirection, uint32_t lineWidth, Windows::Devices::PointOfService::PosPrinterLineStyle lineStyle, uint32_t lineColor) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DrawRuledLine(*reinterpret_cast(&positionList), lineDirection, lineWidth, lineStyle, lineColor); return S_OK; } @@ -6033,10 +6472,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintBarcode(abi_arg_in data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override + HRESULT __stdcall abi_PrintBarcode(impl::abi_arg_in data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintBarcode(*reinterpret_cast(&data), symbology, height, width, textPosition, alignment); return S_OK; } @@ -6046,10 +6486,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintBarcodeCustomAlign(abi_arg_in data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, uint32_t alignmentDistance) noexcept override + HRESULT __stdcall abi_PrintBarcodeCustomAlign(impl::abi_arg_in data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, uint32_t alignmentDistance) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintBarcodeCustomAlign(*reinterpret_cast(&data), symbology, height, width, textPosition, alignmentDistance); return S_OK; } @@ -6059,10 +6500,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintBitmap(abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override + HRESULT __stdcall abi_PrintBitmap(impl::abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintBitmap(*reinterpret_cast(&bitmap), alignment); return S_OK; } @@ -6072,10 +6514,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintBitmapCustomWidthStandardAlign(abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) noexcept override + HRESULT __stdcall abi_PrintBitmapCustomWidthStandardAlign(impl::abi_arg_in bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintBitmap(*reinterpret_cast(&bitmap), alignment, width); return S_OK; } @@ -6085,10 +6528,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintCustomAlignedBitmap(abi_arg_in bitmap, uint32_t alignmentDistance) noexcept override + HRESULT __stdcall abi_PrintCustomAlignedBitmap(impl::abi_arg_in bitmap, uint32_t alignmentDistance) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintCustomAlignedBitmap(*reinterpret_cast(&bitmap), alignmentDistance); return S_OK; } @@ -6098,10 +6542,11 @@ struct produce : produce } } - HRESULT __stdcall abi_PrintBitmapCustomWidthCustomAlign(abi_arg_in bitmap, uint32_t alignmentDistance, uint32_t width) noexcept override + HRESULT __stdcall abi_PrintBitmapCustomWidthCustomAlign(impl::abi_arg_in bitmap, uint32_t alignmentDistance, uint32_t width) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintCustomAlignedBitmap(*reinterpret_cast(&bitmap), alignmentDistance, width); return S_OK; } @@ -6119,6 +6564,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().MarkFeed(kind); return S_OK; } @@ -6132,6 +6578,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().CutPaper(percentage); return S_OK; } @@ -6145,6 +6592,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().CutPaper(); return S_OK; } @@ -6162,7 +6610,8 @@ struct produce { try { - *value = detach(this->shim().CanCutPaper()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanCutPaper()); return S_OK; } catch (...) @@ -6175,7 +6624,8 @@ struct produce { try { - *value = detach(this->shim().IsStampSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStampSupported()); return S_OK; } catch (...) @@ -6188,7 +6638,8 @@ struct produce { try { - *value = detach(this->shim().MarkFeedCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MarkFeedCapabilities()); return S_OK; } catch (...) @@ -6205,7 +6656,8 @@ struct produce : { try { - *value = detach(this->shim().IsFullLengthSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullLengthSupported()); return S_OK; } catch (...) @@ -6218,7 +6670,8 @@ struct produce : { try { - *value = detach(this->shim().IsBothSidesPrintingSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBothSidesPrintingSupported()); return S_OK; } catch (...) @@ -6231,11 +6684,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -6249,7 +6703,8 @@ struct produce : prod { try { - *value = detach(this->shim().Severity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Severity()); return S_OK; } catch (...) @@ -6262,7 +6717,8 @@ struct produce : prod { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -6275,7 +6731,8 @@ struct produce : prod { try { - *value = detach(this->shim().ExtendedReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedReason()); return S_OK; } catch (...) @@ -6292,882 +6749,882 @@ namespace Windows::Devices::PointOfService { template hstring impl_IUnifiedPosErrorData::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IUnifiedPosErrorData)->get_Message(put_abi(value))); return value; } template Windows::Devices::PointOfService::UnifiedPosErrorSeverity impl_IUnifiedPosErrorData::Severity() const { Windows::Devices::PointOfService::UnifiedPosErrorSeverity value {}; - check_hresult(static_cast(static_cast(*this))->get_Severity(&value)); + check_hresult(WINRT_SHIM(IUnifiedPosErrorData)->get_Severity(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosErrorReason impl_IUnifiedPosErrorData::Reason() const { Windows::Devices::PointOfService::UnifiedPosErrorReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IUnifiedPosErrorData)->get_Reason(&value)); return value; } template uint32_t impl_IUnifiedPosErrorData::ExtendedReason() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedReason(&value)); + check_hresult(WINRT_SHIM(IUnifiedPosErrorData)->get_ExtendedReason(&value)); return value; } template Windows::Devices::PointOfService::BarcodeScannerStatus impl_IBarcodeScannerStatusUpdatedEventArgs::Status() const { Windows::Devices::PointOfService::BarcodeScannerStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerStatusUpdatedEventArgs)->get_Status(&value)); return value; } template uint32_t impl_IBarcodeScannerStatusUpdatedEventArgs::ExtendedStatus() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerStatusUpdatedEventArgs)->get_ExtendedStatus(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Unknown() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unknown(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Unknown(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean8() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean8(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean8(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean8Add2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean8Add2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean8Add2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean8Add5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean8Add5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean8Add5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Eanv() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Eanv(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Eanv(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::EanvAdd2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EanvAdd2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_EanvAdd2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::EanvAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EanvAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_EanvAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean13() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean13(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean13(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean13Add2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean13Add2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean13Add2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean13Add5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean13Add5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean13Add5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Isbn() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Isbn(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Isbn(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::IsbnAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IsbnAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_IsbnAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ismn() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ismn(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ismn(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::IsmnAdd2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IsmnAdd2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_IsmnAdd2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::IsmnAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IsmnAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_IsmnAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Issn() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Issn(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Issn(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::IssnAdd2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IssnAdd2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_IssnAdd2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::IssnAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IssnAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_IssnAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean99() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean99(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean99(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean99Add2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean99Add2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean99Add2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ean99Add5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ean99Add5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ean99Add5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Upca() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Upca(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Upca(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UpcaAdd2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpcaAdd2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UpcaAdd2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UpcaAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpcaAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UpcaAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Upce() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Upce(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Upce(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UpceAdd2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpceAdd2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UpceAdd2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UpceAdd5() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpceAdd5(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UpceAdd5(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UpcCoupon() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpcCoupon(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UpcCoupon(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfStd() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfStd(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfStd(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfDis() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfDis(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfDis(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfInt() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfInt(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfInt(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfInd() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfInd(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfInd(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfMat() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfMat(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfMat(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::TfIata() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TfIata(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_TfIata(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Gs1DatabarType1() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gs1DatabarType1(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Gs1DatabarType1(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Gs1DatabarType2() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gs1DatabarType2(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Gs1DatabarType2(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Gs1DatabarType3() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gs1DatabarType3(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Gs1DatabarType3(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code39() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code39(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code39(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code39Ex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code39Ex(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code39Ex(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Trioptic39() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Trioptic39(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Trioptic39(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code32() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code32(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code32(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Pzn() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Pzn(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Pzn(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code93() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code93(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code93(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code93Ex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code93Ex(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code93Ex(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code128() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code128(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code128(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Gs1128() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gs1128(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Gs1128(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Gs1128Coupon() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Gs1128Coupon(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Gs1128Coupon(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UccEan128() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UccEan128(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UccEan128(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Sisac() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Sisac(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Sisac(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Isbt() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Isbt(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Isbt(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Codabar() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Codabar(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Codabar(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code11() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code11(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code11(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Msi() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Msi(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Msi(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Plessey() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Plessey(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Plessey(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Telepen() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Telepen(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Telepen(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code16k() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code16k(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code16k(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::CodablockA() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CodablockA(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_CodablockA(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::CodablockF() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CodablockF(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_CodablockF(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Codablock128() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Codablock128(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Codablock128(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Code49() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code49(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Code49(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Aztec() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Aztec(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Aztec(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::DataCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataCode(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_DataCode(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::DataMatrix() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataMatrix(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_DataMatrix(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::HanXin() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HanXin(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_HanXin(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Maxicode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Maxicode(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Maxicode(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::MicroPdf417() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MicroPdf417(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_MicroPdf417(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::MicroQr() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MicroQr(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_MicroQr(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Pdf417() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Pdf417(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Pdf417(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Qr() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Qr(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Qr(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::MsTag() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MsTag(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_MsTag(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ccab() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ccab(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ccab(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Ccc() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ccc(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Ccc(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Tlc39() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Tlc39(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Tlc39(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::AusPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AusPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_AusPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::CanPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_CanPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::ChinaPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChinaPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_ChinaPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::DutchKix() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DutchKix(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_DutchKix(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::InfoMail() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InfoMail(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_InfoMail(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::ItalianPost25() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItalianPost25(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_ItalianPost25(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::ItalianPost39() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItalianPost39(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_ItalianPost39(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::JapanPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_JapanPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_JapanPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::KoreanPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KoreanPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_KoreanPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::SwedenPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SwedenPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_SwedenPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UkPost() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UkPost(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UkPost(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UsIntelligent() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsIntelligent(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UsIntelligent(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UsIntelligentPkg() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsIntelligentPkg(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UsIntelligentPkg(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UsPlanet() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsPlanet(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UsPlanet(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::UsPostNet() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsPostNet(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_UsPostNet(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Us4StateFics() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Us4StateFics(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Us4StateFics(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::OcrA() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OcrA(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_OcrA(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::OcrB() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OcrB(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_OcrB(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::Micr() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Micr(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_Micr(&value)); return value; } template uint32_t impl_IBarcodeSymbologiesStatics::ExtendedBase() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedBase(&value)); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->get_ExtendedBase(&value)); return value; } template hstring impl_IBarcodeSymbologiesStatics::GetName(uint32_t scanDataType) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetName(scanDataType, put(value))); + check_hresult(WINRT_SHIM(IBarcodeSymbologiesStatics)->abi_GetName(scanDataType, put_abi(value))); return value; } template Windows::Devices::PointOfService::BarcodeScannerReport impl_IBarcodeScannerDataReceivedEventArgs::Report() const { Windows::Devices::PointOfService::BarcodeScannerReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Report(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerDataReceivedEventArgs)->get_Report(put_abi(value))); return value; } template uint32_t impl_IBarcodeScannerReport::ScanDataType() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanDataType(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerReport)->get_ScanDataType(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IBarcodeScannerReport::ScanData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ScanData(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerReport)->get_ScanData(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IBarcodeScannerReport::ScanDataLabel() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ScanDataLabel(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerReport)->get_ScanDataLabel(put_abi(value))); return value; } template Windows::Devices::PointOfService::BarcodeScannerReport impl_IBarcodeScannerErrorOccurredEventArgs::PartialInputData() const { Windows::Devices::PointOfService::BarcodeScannerReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PartialInputData(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerErrorOccurredEventArgs)->get_PartialInputData(put_abi(value))); return value; } template bool impl_IBarcodeScannerErrorOccurredEventArgs::IsRetriable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRetriable(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerErrorOccurredEventArgs)->get_IsRetriable(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosErrorData impl_IBarcodeScannerErrorOccurredEventArgs::ErrorData() const { Windows::Devices::PointOfService::UnifiedPosErrorData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ErrorData(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerErrorOccurredEventArgs)->get_ErrorData(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_IBarcodeScannerImagePreviewReceivedEventArgs::Preview() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType preview; - check_hresult(static_cast(static_cast(*this))->get_Preview(put(preview))); + check_hresult(WINRT_SHIM(IBarcodeScannerImagePreviewReceivedEventArgs)->get_Preview(put_abi(preview))); return preview; } template Windows::Devices::PointOfService::UnifiedPosPowerReportingType impl_IBarcodeScannerCapabilities::PowerReportingType() const { Windows::Devices::PointOfService::UnifiedPosPowerReportingType value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerReportingType(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerCapabilities)->get_PowerReportingType(&value)); return value; } template bool impl_IBarcodeScannerCapabilities::IsStatisticsReportingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsReportingSupported(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerCapabilities)->get_IsStatisticsReportingSupported(&value)); return value; } template bool impl_IBarcodeScannerCapabilities::IsStatisticsUpdatingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsUpdatingSupported(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerCapabilities)->get_IsStatisticsUpdatingSupported(&value)); return value; } template bool impl_IBarcodeScannerCapabilities::IsImagePreviewSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsImagePreviewSupported(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerCapabilities)->get_IsImagePreviewSupported(&value)); return value; } template bool impl_IBarcodeScannerCapabilities1::IsSoftwareTriggerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSoftwareTriggerSupported(&value)); + check_hresult(WINRT_SHIM(IBarcodeScannerCapabilities1)->get_IsSoftwareTriggerSupported(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IBarcodeScannerStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(IBarcodeScannerStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IBarcodeScannerStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IBarcodeScannerStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IBarcodeScannerStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_IBarcodeScannerStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScannerStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template hstring impl_IBarcodeScanner::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::PointOfService::BarcodeScannerCapabilities impl_IBarcodeScanner::Capabilities() const { Windows::Devices::PointOfService::BarcodeScannerCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->get_Capabilities(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBarcodeScanner::ClaimScannerAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ClaimScannerAsync(put(operation))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_ClaimScannerAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBarcodeScanner::CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CheckHealthAsync(level, put(operation))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_CheckHealthAsync(level, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IBarcodeScanner::GetSupportedSymbologiesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedSymbologiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_GetSupportedSymbologiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBarcodeScanner::IsSymbologySupportedAsync(uint32_t barcodeSymbology) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_IsSymbologySupportedAsync(barcodeSymbology, put(operation))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_IsSymbologySupportedAsync(barcodeSymbology, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBarcodeScanner::RetrieveStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_IBarcodeScanner::RetrieveStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RetrieveStatisticsAsync(get(statisticsCategories), put(operation))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_RetrieveStatisticsAsync(get_abi(statisticsCategories), put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVectorView impl_IBarcodeScanner::GetSupportedProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedProfiles(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_GetSupportedProfiles(put_abi(value))); return value; } -template bool impl_IBarcodeScanner::IsProfileSupported(hstring_ref profile) const +template bool impl_IBarcodeScanner::IsProfileSupported(hstring_view profile) const { bool isSupported {}; - check_hresult(static_cast(static_cast(*this))->abi_IsProfileSupported(get(profile), &isSupported)); + check_hresult(WINRT_SHIM(IBarcodeScanner)->abi_IsProfileSupported(get_abi(profile), &isSupported)); return isSupported; } template event_token impl_IBarcodeScanner::StatusUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IBarcodeScanner)->add_StatusUpdated(get_abi(handler), &token)); return token; } @@ -7178,566 +7635,566 @@ template event_revoker impl_IBarcodeScanner::St template void impl_IBarcodeScanner::StatusUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusUpdated(token)); + check_hresult(WINRT_SHIM(IBarcodeScanner)->remove_StatusUpdated(token)); } template hstring impl_IBarcodeScanner2::VideoDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceId(put(value))); + check_hresult(WINRT_SHIM(IBarcodeScanner2)->get_VideoDeviceId(put_abi(value))); return value; } template uint32_t impl_IMagneticStripeReaderEncryptionAlgorithmsStatics::None() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_None(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderEncryptionAlgorithmsStatics)->get_None(&value)); return value; } template uint32_t impl_IMagneticStripeReaderEncryptionAlgorithmsStatics::TripleDesDukpt() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TripleDesDukpt(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderEncryptionAlgorithmsStatics)->get_TripleDesDukpt(&value)); return value; } template uint32_t impl_IMagneticStripeReaderEncryptionAlgorithmsStatics::ExtendedBase() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedBase(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderEncryptionAlgorithmsStatics)->get_ExtendedBase(&value)); return value; } template uint32_t impl_IMagneticStripeReaderCardTypesStatics::Unknown() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Unknown(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCardTypesStatics)->get_Unknown(&value)); return value; } template uint32_t impl_IMagneticStripeReaderCardTypesStatics::Bank() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bank(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCardTypesStatics)->get_Bank(&value)); return value; } template uint32_t impl_IMagneticStripeReaderCardTypesStatics::Aamva() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Aamva(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCardTypesStatics)->get_Aamva(&value)); return value; } template uint32_t impl_IMagneticStripeReaderCardTypesStatics::ExtendedBase() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedBase(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCardTypesStatics)->get_ExtendedBase(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IMagneticStripeReaderTrackData::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderTrackData)->get_Data(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMagneticStripeReaderTrackData::DiscretionaryData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DiscretionaryData(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderTrackData)->get_DiscretionaryData(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMagneticStripeReaderTrackData::EncryptedData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_EncryptedData(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderTrackData)->get_EncryptedData(put_abi(value))); return value; } template uint32_t impl_IMagneticStripeReaderReport::CardType() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CardType(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_CardType(&value)); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackData impl_IMagneticStripeReaderReport::Track1() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Track1(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_Track1(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackData impl_IMagneticStripeReaderReport::Track2() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Track2(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_Track2(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackData impl_IMagneticStripeReaderReport::Track3() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Track3(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_Track3(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackData impl_IMagneticStripeReaderReport::Track4() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Track4(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_Track4(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IMagneticStripeReaderReport::Properties() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_Properties(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMagneticStripeReaderReport::CardAuthenticationData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CardAuthenticationData(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_CardAuthenticationData(put_abi(value))); return value; } template uint32_t impl_IMagneticStripeReaderReport::CardAuthenticationDataLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CardAuthenticationDataLength(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_CardAuthenticationDataLength(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IMagneticStripeReaderReport::AdditionalSecurityInformation() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalSecurityInformation(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderReport)->get_AdditionalSecurityInformation(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderReport impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::Report() const { Windows::Devices::PointOfService::MagneticStripeReaderReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Report(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_Report(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::AccountNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountNumber(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_AccountNumber(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::ExpirationDate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_ExpirationDate(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::ServiceCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceCode(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_ServiceCode(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_Title(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::FirstName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirstName(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_FirstName(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::MiddleInitial() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MiddleInitial(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_MiddleInitial(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::Surname() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Surname(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_Surname(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderBankCardDataReceivedEventArgs::Suffix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Suffix(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderBankCardDataReceivedEventArgs)->get_Suffix(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderReport impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Report() const { Windows::Devices::PointOfService::MagneticStripeReaderReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Report(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Report(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::LicenseNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LicenseNumber(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_LicenseNumber(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::ExpirationDate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_ExpirationDate(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Restrictions() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Restrictions(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Restrictions(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Class() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Class(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Class(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Endorsements() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Endorsements(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Endorsements(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::BirthDate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BirthDate(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_BirthDate(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::FirstName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirstName(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_FirstName(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Surname() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Surname(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Surname(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Suffix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Suffix(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Suffix(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Gender() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Gender(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Gender(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::HairColor() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HairColor(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_HairColor(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::EyeColor() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EyeColor(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_EyeColor(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Height() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Height(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Height(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Weight() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Weight(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Weight(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::Address() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_Address(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::City() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_City(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_City(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::State() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_State(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_State(put_abi(value))); return value; } template hstring impl_IMagneticStripeReaderAamvaCardDataReceivedEventArgs::PostalCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostalCode(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderAamvaCardDataReceivedEventArgs)->get_PostalCode(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderReport impl_IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs::Report() const { Windows::Devices::PointOfService::MagneticStripeReaderReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Report(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs)->get_Report(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType impl_IMagneticStripeReaderErrorOccurredEventArgs::Track1Status() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType value {}; - check_hresult(static_cast(static_cast(*this))->get_Track1Status(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_Track1Status(&value)); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType impl_IMagneticStripeReaderErrorOccurredEventArgs::Track2Status() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType value {}; - check_hresult(static_cast(static_cast(*this))->get_Track2Status(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_Track2Status(&value)); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType impl_IMagneticStripeReaderErrorOccurredEventArgs::Track3Status() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType value {}; - check_hresult(static_cast(static_cast(*this))->get_Track3Status(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_Track3Status(&value)); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType impl_IMagneticStripeReaderErrorOccurredEventArgs::Track4Status() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackErrorType value {}; - check_hresult(static_cast(static_cast(*this))->get_Track4Status(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_Track4Status(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosErrorData impl_IMagneticStripeReaderErrorOccurredEventArgs::ErrorData() const { Windows::Devices::PointOfService::UnifiedPosErrorData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ErrorData(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_ErrorData(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderReport impl_IMagneticStripeReaderErrorOccurredEventArgs::PartialInputData() const { Windows::Devices::PointOfService::MagneticStripeReaderReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PartialInputData(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderErrorOccurredEventArgs)->get_PartialInputData(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderStatus impl_IMagneticStripeReaderStatusUpdatedEventArgs::Status() const { Windows::Devices::PointOfService::MagneticStripeReaderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderStatusUpdatedEventArgs)->get_Status(&value)); return value; } template uint32_t impl_IMagneticStripeReaderStatusUpdatedEventArgs::ExtendedStatus() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderStatusUpdatedEventArgs)->get_ExtendedStatus(&value)); return value; } template hstring impl_IMagneticStripeReaderCapabilities::CardAuthentication() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CardAuthentication(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_CardAuthentication(put_abi(value))); return value; } template uint32_t impl_IMagneticStripeReaderCapabilities::SupportedEncryptionAlgorithms() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedEncryptionAlgorithms(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_SupportedEncryptionAlgorithms(&value)); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderAuthenticationLevel impl_IMagneticStripeReaderCapabilities::AuthenticationLevel() const { Windows::Devices::PointOfService::MagneticStripeReaderAuthenticationLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationLevel(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_AuthenticationLevel(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsIsoSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIsoSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsIsoSupported(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsJisOneSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsJisOneSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsJisOneSupported(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsJisTwoSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsJisTwoSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsJisTwoSupported(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosPowerReportingType impl_IMagneticStripeReaderCapabilities::PowerReportingType() const { Windows::Devices::PointOfService::UnifiedPosPowerReportingType value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerReportingType(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_PowerReportingType(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsStatisticsReportingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsReportingSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsStatisticsReportingSupported(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsStatisticsUpdatingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsUpdatingSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsStatisticsUpdatingSupported(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsTrackDataMaskingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrackDataMaskingSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsTrackDataMaskingSupported(&value)); return value; } template bool impl_IMagneticStripeReaderCapabilities::IsTransmitSentinelsSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTransmitSentinelsSupported(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReaderCapabilities)->get_IsTransmitSentinelsSupported(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReaderStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReaderStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReaderStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_IMagneticStripeReaderStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReaderStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template hstring impl_IMagneticStripeReader::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderCapabilities impl_IMagneticStripeReader::Capabilities() const { Windows::Devices::PointOfService::MagneticStripeReaderCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->get_Capabilities(put_abi(value))); return value; } template com_array impl_IMagneticStripeReader::SupportedCardTypes() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedCardTypes(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->get_SupportedCardTypes(impl::put_size_abi(value), put_abi(value))); return value; } template Windows::Devices::PointOfService::MagneticStripeReaderAuthenticationProtocol impl_IMagneticStripeReader::DeviceAuthenticationProtocol() const { Windows::Devices::PointOfService::MagneticStripeReaderAuthenticationProtocol value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceAuthenticationProtocol(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->get_DeviceAuthenticationProtocol(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReader::CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CheckHealthAsync(level, put(operation))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->abi_CheckHealthAsync(level, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReader::ClaimReaderAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ClaimReaderAsync(put(operation))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->abi_ClaimReaderAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReader::RetrieveStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_IMagneticStripeReader::RetrieveStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RetrieveStatisticsAsync(get(statisticsCategories), put(operation))); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->abi_RetrieveStatisticsAsync(get_abi(statisticsCategories), put_abi(operation))); return operation; } template Windows::Devices::PointOfService::MagneticStripeReaderErrorReportingType impl_IMagneticStripeReader::GetErrorReportingType() const { Windows::Devices::PointOfService::MagneticStripeReaderErrorReportingType value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetErrorReportingType(&value)); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->abi_GetErrorReportingType(&value)); return value; } template event_token impl_IMagneticStripeReader::StatusUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->add_StatusUpdated(get_abi(handler), &token)); return token; } @@ -7748,391 +8205,391 @@ template event_revoker impl_IMagneticStripeR template void impl_IMagneticStripeReader::StatusUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusUpdated(token)); + check_hresult(WINRT_SHIM(IMagneticStripeReader)->remove_StatusUpdated(token)); } template uint32_t impl_IPosPrinterCharacterSetIdsStatics::Utf16LE() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Utf16LE(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCharacterSetIdsStatics)->get_Utf16LE(&value)); return value; } template uint32_t impl_IPosPrinterCharacterSetIdsStatics::Ascii() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ascii(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCharacterSetIdsStatics)->get_Ascii(&value)); return value; } template uint32_t impl_IPosPrinterCharacterSetIdsStatics::Ansi() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Ansi(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCharacterSetIdsStatics)->get_Ansi(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsPrinterPresent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrinterPresent(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsPrinterPresent(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsDualColorSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDualColorSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsDualColorSupported(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterColorCapabilities impl_ICommonPosPrintStationCapabilities::ColorCartridgeCapabilities() const { Windows::Devices::PointOfService::PosPrinterColorCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_ColorCartridgeCapabilities(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_ColorCartridgeCapabilities(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterCartridgeSensors impl_ICommonPosPrintStationCapabilities::CartridgeSensors() const { Windows::Devices::PointOfService::PosPrinterCartridgeSensors value {}; - check_hresult(static_cast(static_cast(*this))->get_CartridgeSensors(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_CartridgeSensors(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsBoldSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBoldSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsBoldSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsItalicSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsItalicSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsItalicSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsUnderlineSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUnderlineSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsUnderlineSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsDoubleHighPrintSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDoubleHighPrintSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsDoubleHighPrintSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsDoubleWidePrintSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDoubleWidePrintSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsDoubleWidePrintSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsDoubleHighDoubleWidePrintSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDoubleHighDoubleWidePrintSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsDoubleHighDoubleWidePrintSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsPaperEmptySensorSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaperEmptySensorSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsPaperEmptySensorSupported(&value)); return value; } template bool impl_ICommonPosPrintStationCapabilities::IsPaperNearEndSensorSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaperNearEndSensorSupported(&value)); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_IsPaperNearEndSensorSupported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ICommonPosPrintStationCapabilities::SupportedCharactersPerLine() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedCharactersPerLine(put(value))); + check_hresult(WINRT_SHIM(ICommonPosPrintStationCapabilities)->get_SupportedCharactersPerLine(put_abi(value))); return value; } template bool impl_ICommonReceiptSlipCapabilities::IsBarcodeSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBarcodeSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_IsBarcodeSupported(&value)); return value; } template bool impl_ICommonReceiptSlipCapabilities::IsBitmapSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBitmapSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_IsBitmapSupported(&value)); return value; } template bool impl_ICommonReceiptSlipCapabilities::IsLeft90RotationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLeft90RotationSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_IsLeft90RotationSupported(&value)); return value; } template bool impl_ICommonReceiptSlipCapabilities::IsRight90RotationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRight90RotationSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_IsRight90RotationSupported(&value)); return value; } template bool impl_ICommonReceiptSlipCapabilities::Is180RotationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Is180RotationSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_Is180RotationSupported(&value)); return value; } template bool impl_ICommonReceiptSlipCapabilities::IsPrintAreaSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrintAreaSupported(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_IsPrintAreaSupported(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterRuledLineCapabilities impl_ICommonReceiptSlipCapabilities::RuledLineCapabilities() const { Windows::Devices::PointOfService::PosPrinterRuledLineCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_RuledLineCapabilities(&value)); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_RuledLineCapabilities(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ICommonReceiptSlipCapabilities::SupportedBarcodeRotations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedBarcodeRotations(put(value))); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_SupportedBarcodeRotations(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICommonReceiptSlipCapabilities::SupportedBitmapRotations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedBitmapRotations(put(value))); + check_hresult(WINRT_SHIM(ICommonReceiptSlipCapabilities)->get_SupportedBitmapRotations(put_abi(value))); return value; } template bool impl_IReceiptPrinterCapabilities::CanCutPaper() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanCutPaper(&value)); + check_hresult(WINRT_SHIM(IReceiptPrinterCapabilities)->get_CanCutPaper(&value)); return value; } template bool impl_IReceiptPrinterCapabilities::IsStampSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStampSupported(&value)); + check_hresult(WINRT_SHIM(IReceiptPrinterCapabilities)->get_IsStampSupported(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterMarkFeedCapabilities impl_IReceiptPrinterCapabilities::MarkFeedCapabilities() const { Windows::Devices::PointOfService::PosPrinterMarkFeedCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_MarkFeedCapabilities(&value)); + check_hresult(WINRT_SHIM(IReceiptPrinterCapabilities)->get_MarkFeedCapabilities(&value)); return value; } template bool impl_ISlipPrinterCapabilities::IsFullLengthSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullLengthSupported(&value)); + check_hresult(WINRT_SHIM(ISlipPrinterCapabilities)->get_IsFullLengthSupported(&value)); return value; } template bool impl_ISlipPrinterCapabilities::IsBothSidesPrintingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBothSidesPrintingSupported(&value)); + check_hresult(WINRT_SHIM(ISlipPrinterCapabilities)->get_IsBothSidesPrintingSupported(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosPowerReportingType impl_IPosPrinterCapabilities::PowerReportingType() const { Windows::Devices::PointOfService::UnifiedPosPowerReportingType value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerReportingType(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_PowerReportingType(&value)); return value; } template bool impl_IPosPrinterCapabilities::IsStatisticsReportingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsReportingSupported(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_IsStatisticsReportingSupported(&value)); return value; } template bool impl_IPosPrinterCapabilities::IsStatisticsUpdatingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsUpdatingSupported(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_IsStatisticsUpdatingSupported(&value)); return value; } template uint32_t impl_IPosPrinterCapabilities::DefaultCharacterSet() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultCharacterSet(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_DefaultCharacterSet(&value)); return value; } template bool impl_IPosPrinterCapabilities::HasCoverSensor() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasCoverSensor(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_HasCoverSensor(&value)); return value; } template bool impl_IPosPrinterCapabilities::CanMapCharacterSet() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanMapCharacterSet(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_CanMapCharacterSet(&value)); return value; } template bool impl_IPosPrinterCapabilities::IsTransactionSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTransactionSupported(&value)); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_IsTransactionSupported(&value)); return value; } template Windows::Devices::PointOfService::ReceiptPrinterCapabilities impl_IPosPrinterCapabilities::Receipt() const { Windows::Devices::PointOfService::ReceiptPrinterCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Receipt(put(value))); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_Receipt(put_abi(value))); return value; } template Windows::Devices::PointOfService::SlipPrinterCapabilities impl_IPosPrinterCapabilities::Slip() const { Windows::Devices::PointOfService::SlipPrinterCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Slip(put(value))); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_Slip(put_abi(value))); return value; } template Windows::Devices::PointOfService::JournalPrinterCapabilities impl_IPosPrinterCapabilities::Journal() const { Windows::Devices::PointOfService::JournalPrinterCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Journal(put(value))); + check_hresult(WINRT_SHIM(IPosPrinterCapabilities)->get_Journal(put_abi(value))); return value; } template Windows::Devices::PointOfService::PosPrinterStatusKind impl_IPosPrinterStatus::StatusKind() const { Windows::Devices::PointOfService::PosPrinterStatusKind value {}; - check_hresult(static_cast(static_cast(*this))->get_StatusKind(&value)); + check_hresult(WINRT_SHIM(IPosPrinterStatus)->get_StatusKind(&value)); return value; } template uint32_t impl_IPosPrinterStatus::ExtendedStatus() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(IPosPrinterStatus)->get_ExtendedStatus(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterStatus impl_IPosPrinterStatusUpdatedEventArgs::Status() const { Windows::Devices::PointOfService::PosPrinterStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Status(put(value))); + check_hresult(WINRT_SHIM(IPosPrinterStatusUpdatedEventArgs)->get_Status(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPosPrinterStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(IPosPrinterStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IPosPrinterStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IPosPrinterStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IPosPrinterStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_IPosPrinterStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IPosPrinterStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template hstring impl_IPosPrinter::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IPosPrinter)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::PointOfService::PosPrinterCapabilities impl_IPosPrinter::Capabilities() const { Windows::Devices::PointOfService::PosPrinterCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(IPosPrinter)->get_Capabilities(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPosPrinter::SupportedCharacterSets() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedCharacterSets(put(value))); + check_hresult(WINRT_SHIM(IPosPrinter)->get_SupportedCharacterSets(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPosPrinter::SupportedTypeFaces() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedTypeFaces(put(value))); + check_hresult(WINRT_SHIM(IPosPrinter)->get_SupportedTypeFaces(put_abi(value))); return value; } template Windows::Devices::PointOfService::PosPrinterStatus impl_IPosPrinter::Status() const { Windows::Devices::PointOfService::PosPrinterStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Status(put(value))); + check_hresult(WINRT_SHIM(IPosPrinter)->get_Status(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPosPrinter::ClaimPrinterAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ClaimPrinterAsync(put(operation))); + check_hresult(WINRT_SHIM(IPosPrinter)->abi_ClaimPrinterAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPosPrinter::CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CheckHealthAsync(level, put(operation))); + check_hresult(WINRT_SHIM(IPosPrinter)->abi_CheckHealthAsync(level, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPosPrinter::GetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_IPosPrinter::GetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStatisticsAsync(get(statisticsCategories), put(operation))); + check_hresult(WINRT_SHIM(IPosPrinter)->abi_GetStatisticsAsync(get_abi(statisticsCategories), put_abi(operation))); return operation; } template event_token impl_IPosPrinter::StatusUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IPosPrinter)->add_StatusUpdated(get_abi(handler), &token)); return token; } @@ -8143,452 +8600,452 @@ template event_revoker impl_IPosPrinter::StatusUpda template void impl_IPosPrinter::StatusUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusUpdated(token)); + check_hresult(WINRT_SHIM(IPosPrinter)->remove_StatusUpdated(token)); } -template void impl_IPosPrinterJob::Print(hstring_ref data) const +template void impl_IPosPrinterJob::Print(hstring_view data) const { - check_hresult(static_cast(static_cast(*this))->abi_Print(get(data))); + check_hresult(WINRT_SHIM(IPosPrinterJob)->abi_Print(get_abi(data))); } -template void impl_IPosPrinterJob::PrintLine(hstring_ref data) const +template void impl_IPosPrinterJob::PrintLine(hstring_view data) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintLine(get(data))); + check_hresult(WINRT_SHIM(IPosPrinterJob)->abi_PrintLine(get_abi(data))); } template void impl_IPosPrinterJob::PrintLine() const { - check_hresult(static_cast(static_cast(*this))->abi_PrintNewline()); + check_hresult(WINRT_SHIM(IPosPrinterJob)->abi_PrintNewline()); } template Windows::Foundation::IAsyncOperation impl_IPosPrinterJob::ExecuteAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ExecuteAsync(put(operation))); + check_hresult(WINRT_SHIM(IPosPrinterJob)->abi_ExecuteAsync(put_abi(operation))); return operation; } template void impl_IReceiptOrSlipJob::SetBarcodeRotation(Windows::Devices::PointOfService::PosPrinterRotation value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBarcodeRotation(value)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetBarcodeRotation(value)); } template void impl_IReceiptOrSlipJob::SetPrintRotation(Windows::Devices::PointOfService::PosPrinterRotation value, bool includeBitmaps) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPrintRotation(value, includeBitmaps)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetPrintRotation(value, includeBitmaps)); } template void impl_IReceiptOrSlipJob::SetPrintArea(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPrintArea(get(value))); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetPrintArea(get_abi(value))); } template void impl_IReceiptOrSlipJob::SetBitmap(uint32_t bitmapNumber, const Windows::Graphics::Imaging::BitmapFrame & bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBitmap(bitmapNumber, get(bitmap), alignment)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetBitmap(bitmapNumber, get_abi(bitmap), alignment)); } template void impl_IReceiptOrSlipJob::SetBitmap(uint32_t bitmapNumber, const Windows::Graphics::Imaging::BitmapFrame & bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBitmapCustomWidthStandardAlign(bitmapNumber, get(bitmap), alignment, width)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetBitmapCustomWidthStandardAlign(bitmapNumber, get_abi(bitmap), alignment, width)); } template void impl_IReceiptOrSlipJob::SetCustomAlignedBitmap(uint32_t bitmapNumber, const Windows::Graphics::Imaging::BitmapFrame & bitmap, uint32_t alignmentDistance) const { - check_hresult(static_cast(static_cast(*this))->abi_SetCustomAlignedBitmap(bitmapNumber, get(bitmap), alignmentDistance)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetCustomAlignedBitmap(bitmapNumber, get_abi(bitmap), alignmentDistance)); } template void impl_IReceiptOrSlipJob::SetCustomAlignedBitmap(uint32_t bitmapNumber, const Windows::Graphics::Imaging::BitmapFrame & bitmap, uint32_t alignmentDistance, uint32_t width) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBitmapCustomWidthCustomAlign(bitmapNumber, get(bitmap), alignmentDistance, width)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_SetBitmapCustomWidthCustomAlign(bitmapNumber, get_abi(bitmap), alignmentDistance, width)); } template void impl_IReceiptOrSlipJob::PrintSavedBitmap(uint32_t bitmapNumber) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintSavedBitmap(bitmapNumber)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintSavedBitmap(bitmapNumber)); } -template void impl_IReceiptOrSlipJob::DrawRuledLine(hstring_ref positionList, Windows::Devices::PointOfService::PosPrinterLineDirection lineDirection, uint32_t lineWidth, Windows::Devices::PointOfService::PosPrinterLineStyle lineStyle, uint32_t lineColor) const +template void impl_IReceiptOrSlipJob::DrawRuledLine(hstring_view positionList, Windows::Devices::PointOfService::PosPrinterLineDirection lineDirection, uint32_t lineWidth, Windows::Devices::PointOfService::PosPrinterLineStyle lineStyle, uint32_t lineColor) const { - check_hresult(static_cast(static_cast(*this))->abi_DrawRuledLine(get(positionList), lineDirection, lineWidth, lineStyle, lineColor)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_DrawRuledLine(get_abi(positionList), lineDirection, lineWidth, lineStyle, lineColor)); } -template void impl_IReceiptOrSlipJob::PrintBarcode(hstring_ref data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, Windows::Devices::PointOfService::PosPrinterAlignment alignment) const +template void impl_IReceiptOrSlipJob::PrintBarcode(hstring_view data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, Windows::Devices::PointOfService::PosPrinterAlignment alignment) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintBarcode(get(data), symbology, height, width, textPosition, alignment)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintBarcode(get_abi(data), symbology, height, width, textPosition, alignment)); } -template void impl_IReceiptOrSlipJob::PrintBarcodeCustomAlign(hstring_ref data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, uint32_t alignmentDistance) const +template void impl_IReceiptOrSlipJob::PrintBarcodeCustomAlign(hstring_view data, uint32_t symbology, uint32_t height, uint32_t width, Windows::Devices::PointOfService::PosPrinterBarcodeTextPosition textPosition, uint32_t alignmentDistance) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintBarcodeCustomAlign(get(data), symbology, height, width, textPosition, alignmentDistance)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintBarcodeCustomAlign(get_abi(data), symbology, height, width, textPosition, alignmentDistance)); } template void impl_IReceiptOrSlipJob::PrintBitmap(const Windows::Graphics::Imaging::BitmapFrame & bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintBitmap(get(bitmap), alignment)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintBitmap(get_abi(bitmap), alignment)); } template void impl_IReceiptOrSlipJob::PrintBitmap(const Windows::Graphics::Imaging::BitmapFrame & bitmap, Windows::Devices::PointOfService::PosPrinterAlignment alignment, uint32_t width) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintBitmapCustomWidthStandardAlign(get(bitmap), alignment, width)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintBitmapCustomWidthStandardAlign(get_abi(bitmap), alignment, width)); } template void impl_IReceiptOrSlipJob::PrintCustomAlignedBitmap(const Windows::Graphics::Imaging::BitmapFrame & bitmap, uint32_t alignmentDistance) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintCustomAlignedBitmap(get(bitmap), alignmentDistance)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintCustomAlignedBitmap(get_abi(bitmap), alignmentDistance)); } template void impl_IReceiptOrSlipJob::PrintCustomAlignedBitmap(const Windows::Graphics::Imaging::BitmapFrame & bitmap, uint32_t alignmentDistance, uint32_t width) const { - check_hresult(static_cast(static_cast(*this))->abi_PrintBitmapCustomWidthCustomAlign(get(bitmap), alignmentDistance, width)); + check_hresult(WINRT_SHIM(IReceiptOrSlipJob)->abi_PrintBitmapCustomWidthCustomAlign(get_abi(bitmap), alignmentDistance, width)); } template void impl_IReceiptPrintJob::MarkFeed(Windows::Devices::PointOfService::PosPrinterMarkFeedKind kind) const { - check_hresult(static_cast(static_cast(*this))->abi_MarkFeed(kind)); + check_hresult(WINRT_SHIM(IReceiptPrintJob)->abi_MarkFeed(kind)); } template void impl_IReceiptPrintJob::CutPaper(double percentage) const { - check_hresult(static_cast(static_cast(*this))->abi_CutPaper(percentage)); + check_hresult(WINRT_SHIM(IReceiptPrintJob)->abi_CutPaper(percentage)); } template void impl_IReceiptPrintJob::CutPaper() const { - check_hresult(static_cast(static_cast(*this))->abi_CutPaperDefault()); + check_hresult(WINRT_SHIM(IReceiptPrintJob)->abi_CutPaperDefault()); } template void impl_ICommonClaimedPosPrinterStation::CharactersPerLine(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CharactersPerLine(value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->put_CharactersPerLine(value)); } template uint32_t impl_ICommonClaimedPosPrinterStation::CharactersPerLine() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CharactersPerLine(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_CharactersPerLine(&value)); return value; } template void impl_ICommonClaimedPosPrinterStation::LineHeight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_LineHeight(value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->put_LineHeight(value)); } template uint32_t impl_ICommonClaimedPosPrinterStation::LineHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LineHeight(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_LineHeight(&value)); return value; } template void impl_ICommonClaimedPosPrinterStation::LineSpacing(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_LineSpacing(value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->put_LineSpacing(value)); } template uint32_t impl_ICommonClaimedPosPrinterStation::LineSpacing() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LineSpacing(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_LineSpacing(&value)); return value; } template uint32_t impl_ICommonClaimedPosPrinterStation::LineWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LineWidth(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_LineWidth(&value)); return value; } template void impl_ICommonClaimedPosPrinterStation::IsLetterQuality(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsLetterQuality(value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->put_IsLetterQuality(value)); } template bool impl_ICommonClaimedPosPrinterStation::IsLetterQuality() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLetterQuality(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsLetterQuality(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsPaperNearEnd() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaperNearEnd(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsPaperNearEnd(&value)); return value; } template void impl_ICommonClaimedPosPrinterStation::ColorCartridge(Windows::Devices::PointOfService::PosPrinterColorCartridge value) const { - check_hresult(static_cast(static_cast(*this))->put_ColorCartridge(value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->put_ColorCartridge(value)); } template Windows::Devices::PointOfService::PosPrinterColorCartridge impl_ICommonClaimedPosPrinterStation::ColorCartridge() const { Windows::Devices::PointOfService::PosPrinterColorCartridge value {}; - check_hresult(static_cast(static_cast(*this))->get_ColorCartridge(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_ColorCartridge(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsCoverOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCoverOpen(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsCoverOpen(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsCartridgeRemoved() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCartridgeRemoved(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsCartridgeRemoved(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsCartridgeEmpty() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCartridgeEmpty(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsCartridgeEmpty(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsHeadCleaning() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHeadCleaning(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsHeadCleaning(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsPaperEmpty() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaperEmpty(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsPaperEmpty(&value)); return value; } template bool impl_ICommonClaimedPosPrinterStation::IsReadyToPrint() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadyToPrint(&value)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->get_IsReadyToPrint(&value)); return value; } -template bool impl_ICommonClaimedPosPrinterStation::ValidateData(hstring_ref data) const +template bool impl_ICommonClaimedPosPrinterStation::ValidateData(hstring_view data) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_ValidateData(get(data), &result)); + check_hresult(WINRT_SHIM(ICommonClaimedPosPrinterStation)->abi_ValidateData(get_abi(data), &result)); return result; } template uint32_t impl_IClaimedReceiptPrinter::SidewaysMaxLines() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidewaysMaxLines(&value)); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->get_SidewaysMaxLines(&value)); return value; } template uint32_t impl_IClaimedReceiptPrinter::SidewaysMaxChars() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidewaysMaxChars(&value)); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->get_SidewaysMaxChars(&value)); return value; } template uint32_t impl_IClaimedReceiptPrinter::LinesToPaperCut() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LinesToPaperCut(&value)); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->get_LinesToPaperCut(&value)); return value; } template Windows::Foundation::Size impl_IClaimedReceiptPrinter::PageSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_PageSize(put(value))); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->get_PageSize(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IClaimedReceiptPrinter::PrintArea() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_PrintArea(put(value))); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->get_PrintArea(put_abi(value))); return value; } template Windows::Devices::PointOfService::ReceiptPrintJob impl_IClaimedReceiptPrinter::CreateJob() const { Windows::Devices::PointOfService::ReceiptPrintJob value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateJob(put(value))); + check_hresult(WINRT_SHIM(IClaimedReceiptPrinter)->abi_CreateJob(put_abi(value))); return value; } template uint32_t impl_IClaimedSlipPrinter::SidewaysMaxLines() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidewaysMaxLines(&value)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_SidewaysMaxLines(&value)); return value; } template uint32_t impl_IClaimedSlipPrinter::SidewaysMaxChars() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidewaysMaxChars(&value)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_SidewaysMaxChars(&value)); return value; } template uint32_t impl_IClaimedSlipPrinter::MaxLines() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(&value)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_MaxLines(&value)); return value; } template uint32_t impl_IClaimedSlipPrinter::LinesNearEndToEnd() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LinesNearEndToEnd(&value)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_LinesNearEndToEnd(&value)); return value; } template Windows::Devices::PointOfService::PosPrinterPrintSide impl_IClaimedSlipPrinter::PrintSide() const { Windows::Devices::PointOfService::PosPrinterPrintSide value {}; - check_hresult(static_cast(static_cast(*this))->get_PrintSide(&value)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_PrintSide(&value)); return value; } template Windows::Foundation::Size impl_IClaimedSlipPrinter::PageSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_PageSize(put(value))); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_PageSize(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IClaimedSlipPrinter::PrintArea() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_PrintArea(put(value))); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->get_PrintArea(put_abi(value))); return value; } template void impl_IClaimedSlipPrinter::OpenJaws() const { - check_hresult(static_cast(static_cast(*this))->abi_OpenJaws()); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_OpenJaws()); } template void impl_IClaimedSlipPrinter::CloseJaws() const { - check_hresult(static_cast(static_cast(*this))->abi_CloseJaws()); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_CloseJaws()); } template Windows::Foundation::IAsyncOperation impl_IClaimedSlipPrinter::InsertSlipAsync(const Windows::Foundation::TimeSpan & timeout) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_InsertSlipAsync(get(timeout), put(result))); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_InsertSlipAsync(get_abi(timeout), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedSlipPrinter::RemoveSlipAsync(const Windows::Foundation::TimeSpan & timeout) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RemoveSlipAsync(get(timeout), put(result))); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_RemoveSlipAsync(get_abi(timeout), put_abi(result))); return result; } template void impl_IClaimedSlipPrinter::ChangePrintSide(Windows::Devices::PointOfService::PosPrinterPrintSide printSide) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangePrintSide(printSide)); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_ChangePrintSide(printSide)); } template Windows::Devices::PointOfService::SlipPrintJob impl_IClaimedSlipPrinter::CreateJob() const { Windows::Devices::PointOfService::SlipPrintJob value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateJob(put(value))); + check_hresult(WINRT_SHIM(IClaimedSlipPrinter)->abi_CreateJob(put_abi(value))); return value; } template Windows::Devices::PointOfService::JournalPrintJob impl_IClaimedJournalPrinter::CreateJob() const { Windows::Devices::PointOfService::JournalPrintJob value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateJob(put(value))); + check_hresult(WINRT_SHIM(IClaimedJournalPrinter)->abi_CreateJob(put_abi(value))); return value; } template Windows::Devices::PointOfService::CashDrawerStatus impl_ICashDrawerStatusUpdatedEventArgs::Status() const { Windows::Devices::PointOfService::CashDrawerStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Status(put(value))); + check_hresult(WINRT_SHIM(ICashDrawerStatusUpdatedEventArgs)->get_Status(put_abi(value))); return value; } template Windows::Devices::PointOfService::CashDrawerStatusKind impl_ICashDrawerStatus::StatusKind() const { Windows::Devices::PointOfService::CashDrawerStatusKind value {}; - check_hresult(static_cast(static_cast(*this))->get_StatusKind(&value)); + check_hresult(WINRT_SHIM(ICashDrawerStatus)->get_StatusKind(&value)); return value; } template uint32_t impl_ICashDrawerStatus::ExtendedStatus() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(ICashDrawerStatus)->get_ExtendedStatus(&value)); return value; } template Windows::Devices::PointOfService::UnifiedPosPowerReportingType impl_ICashDrawerCapabilities::PowerReportingType() const { Windows::Devices::PointOfService::UnifiedPosPowerReportingType value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerReportingType(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_PowerReportingType(&value)); return value; } template bool impl_ICashDrawerCapabilities::IsStatisticsReportingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsReportingSupported(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_IsStatisticsReportingSupported(&value)); return value; } template bool impl_ICashDrawerCapabilities::IsStatisticsUpdatingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatisticsUpdatingSupported(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_IsStatisticsUpdatingSupported(&value)); return value; } template bool impl_ICashDrawerCapabilities::IsStatusReportingSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatusReportingSupported(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_IsStatusReportingSupported(&value)); return value; } template bool impl_ICashDrawerCapabilities::IsStatusMultiDrawerDetectSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStatusMultiDrawerDetectSupported(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_IsStatusMultiDrawerDetectSupported(&value)); return value; } template bool impl_ICashDrawerCapabilities::IsDrawerOpenSensorAvailable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDrawerOpenSensorAvailable(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCapabilities)->get_IsDrawerOpenSensorAvailable(&value)); return value; } template Windows::Devices::PointOfService::CashDrawer impl_ICashDrawerEventSourceEventArgs::CashDrawer() const { Windows::Devices::PointOfService::CashDrawer drawer { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CashDrawer(put(drawer))); + check_hresult(WINRT_SHIM(ICashDrawerEventSourceEventArgs)->get_CashDrawer(put_abi(drawer))); return drawer; } template event_token impl_ICashDrawerEventSource::DrawerClosed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DrawerClosed(get(handler), &token)); + check_hresult(WINRT_SHIM(ICashDrawerEventSource)->add_DrawerClosed(get_abi(handler), &token)); return token; } @@ -8599,13 +9056,13 @@ template event_revoker impl_ICashDrawerEven template void impl_ICashDrawerEventSource::DrawerClosed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DrawerClosed(token)); + check_hresult(WINRT_SHIM(ICashDrawerEventSource)->remove_DrawerClosed(token)); } template event_token impl_ICashDrawerEventSource::DrawerOpened(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DrawerOpened(get(handler), &token)); + check_hresult(WINRT_SHIM(ICashDrawerEventSource)->add_DrawerOpened(get_abi(handler), &token)); return token; } @@ -8616,90 +9073,90 @@ template event_revoker impl_ICashDrawerEven template void impl_ICashDrawerEventSource::DrawerOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DrawerOpened(token)); + check_hresult(WINRT_SHIM(ICashDrawerEventSource)->remove_DrawerOpened(token)); } template Windows::Foundation::IAsyncOperation impl_ICashDrawerStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(ICashDrawerStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ICashDrawerStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_ICashDrawerStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(ICashDrawerStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_ICashDrawerStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(ICashDrawerStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template hstring impl_ICashDrawer::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ICashDrawer)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::PointOfService::CashDrawerCapabilities impl_ICashDrawer::Capabilities() const { Windows::Devices::PointOfService::CashDrawerCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(ICashDrawer)->get_Capabilities(put_abi(value))); return value; } template Windows::Devices::PointOfService::CashDrawerStatus impl_ICashDrawer::Status() const { Windows::Devices::PointOfService::CashDrawerStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Status(put(value))); + check_hresult(WINRT_SHIM(ICashDrawer)->get_Status(put_abi(value))); return value; } template bool impl_ICashDrawer::IsDrawerOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDrawerOpen(&value)); + check_hresult(WINRT_SHIM(ICashDrawer)->get_IsDrawerOpen(&value)); return value; } template Windows::Devices::PointOfService::CashDrawerEventSource impl_ICashDrawer::DrawerEventSource() const { Windows::Devices::PointOfService::CashDrawerEventSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DrawerEventSource(put(value))); + check_hresult(WINRT_SHIM(ICashDrawer)->get_DrawerEventSource(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICashDrawer::ClaimDrawerAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ClaimDrawerAsync(put(operation))); + check_hresult(WINRT_SHIM(ICashDrawer)->abi_ClaimDrawerAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ICashDrawer::CheckHealthAsync(Windows::Devices::PointOfService::UnifiedPosHealthCheckLevel level) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CheckHealthAsync(level, put(operation))); + check_hresult(WINRT_SHIM(ICashDrawer)->abi_CheckHealthAsync(level, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICashDrawer::GetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_ICashDrawer::GetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStatisticsAsync(get(statisticsCategories), put(operation))); + check_hresult(WINRT_SHIM(ICashDrawer)->abi_GetStatisticsAsync(get_abi(statisticsCategories), put_abi(operation))); return operation; } template event_token impl_ICashDrawer::StatusUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(ICashDrawer)->add_StatusUpdated(get_abi(handler), &token)); return token; } @@ -8710,170 +9167,170 @@ template event_revoker impl_ICashDrawer::StatusUpda template void impl_ICashDrawer::StatusUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusUpdated(token)); + check_hresult(WINRT_SHIM(ICashDrawer)->remove_StatusUpdated(token)); } template void impl_ICashDrawerCloseAlarm::AlarmTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_AlarmTimeout(get(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->put_AlarmTimeout(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ICashDrawerCloseAlarm::AlarmTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_AlarmTimeout(put(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->get_AlarmTimeout(put_abi(value))); return value; } template void impl_ICashDrawerCloseAlarm::BeepFrequency(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_BeepFrequency(value)); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->put_BeepFrequency(value)); } template uint32_t impl_ICashDrawerCloseAlarm::BeepFrequency() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BeepFrequency(&value)); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->get_BeepFrequency(&value)); return value; } template void impl_ICashDrawerCloseAlarm::BeepDuration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_BeepDuration(get(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->put_BeepDuration(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ICashDrawerCloseAlarm::BeepDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_BeepDuration(put(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->get_BeepDuration(put_abi(value))); return value; } template void impl_ICashDrawerCloseAlarm::BeepDelay(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_BeepDelay(get(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->put_BeepDelay(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ICashDrawerCloseAlarm::BeepDelay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_BeepDelay(put(value))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->get_BeepDelay(put_abi(value))); return value; } -template event_token impl_ICashDrawerCloseAlarm::AlarmTimeoutExpired(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICashDrawerCloseAlarm::AlarmTimeoutExpired(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AlarmTimeoutExpired(get(handler), &token)); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->add_AlarmTimeoutExpired(get_abi(handler), &token)); return token; } -template event_revoker impl_ICashDrawerCloseAlarm::AlarmTimeoutExpired(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICashDrawerCloseAlarm::AlarmTimeoutExpired(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::PointOfService::ICashDrawerCloseAlarm::remove_AlarmTimeoutExpired, AlarmTimeoutExpired(handler)); } template void impl_ICashDrawerCloseAlarm::AlarmTimeoutExpired(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AlarmTimeoutExpired(token)); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->remove_AlarmTimeoutExpired(token)); } template Windows::Foundation::IAsyncOperation impl_ICashDrawerCloseAlarm::StartAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(result))); + check_hresult(WINRT_SHIM(ICashDrawerCloseAlarm)->abi_StartAsync(put_abi(result))); return result; } template hstring impl_IClaimedBarcodeScanner::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->get_DeviceId(put_abi(value))); return value; } template bool impl_IClaimedBarcodeScanner::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->get_IsEnabled(&value)); return value; } template void impl_IClaimedBarcodeScanner::IsDisabledOnDataReceived(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDisabledOnDataReceived(value)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->put_IsDisabledOnDataReceived(value)); } template bool impl_IClaimedBarcodeScanner::IsDisabledOnDataReceived() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisabledOnDataReceived(&value)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->get_IsDisabledOnDataReceived(&value)); return value; } template void impl_IClaimedBarcodeScanner::IsDecodeDataEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDecodeDataEnabled(value)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->put_IsDecodeDataEnabled(value)); } template bool impl_IClaimedBarcodeScanner::IsDecodeDataEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDecodeDataEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->get_IsDecodeDataEnabled(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::EnableAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_EnableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_EnableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::DisableAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DisableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_DisableAsync(put_abi(result))); return result; } template void impl_IClaimedBarcodeScanner::RetainDevice() const { - check_hresult(static_cast(static_cast(*this))->abi_RetainDevice()); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_RetainDevice()); } -template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::SetActiveSymbologiesAsync(const Windows::Foundation::Collections::IIterable & symbologies) const +template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::SetActiveSymbologiesAsync(iterable symbologies) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SetActiveSymbologiesAsync(get(symbologies), put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_SetActiveSymbologiesAsync(get_abi(symbologies), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::ResetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::ResetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ResetStatisticsAsync(get(statisticsCategories), put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_ResetStatisticsAsync(get_abi(statisticsCategories), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::UpdateStatisticsAsync(const Windows::Foundation::Collections::IIterable> & statistics) const +template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::UpdateStatisticsAsync(iterable> statistics) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateStatisticsAsync(get(statistics), put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_UpdateStatisticsAsync(get_abi(statistics), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::SetActiveProfileAsync(hstring_ref profile) const +template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner::SetActiveProfileAsync(hstring_view profile) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SetActiveProfileAsync(get(profile), put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->abi_SetActiveProfileAsync(get_abi(profile), put_abi(result))); return result; } template event_token impl_IClaimedBarcodeScanner::DataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_DataReceived(get_abi(handler), &token)); return token; } @@ -8884,13 +9341,13 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::DataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DataReceived(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_DataReceived(token)); } template event_token impl_IClaimedBarcodeScanner::TriggerPressed(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TriggerPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_TriggerPressed(get_abi(handler), &token)); return token; } @@ -8901,13 +9358,13 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::TriggerPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TriggerPressed(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_TriggerPressed(token)); } template event_token impl_IClaimedBarcodeScanner::TriggerReleased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TriggerReleased(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_TriggerReleased(get_abi(handler), &token)); return token; } @@ -8918,13 +9375,13 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::TriggerReleased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TriggerReleased(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_TriggerReleased(token)); } template event_token impl_IClaimedBarcodeScanner::ReleaseDeviceRequested(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReleaseDeviceRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_ReleaseDeviceRequested(get_abi(handler), &token)); return token; } @@ -8935,13 +9392,13 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::ReleaseDeviceRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReleaseDeviceRequested(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_ReleaseDeviceRequested(token)); } template event_token impl_IClaimedBarcodeScanner::ImagePreviewReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ImagePreviewReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_ImagePreviewReceived(get_abi(handler), &token)); return token; } @@ -8952,13 +9409,13 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::ImagePreviewReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ImagePreviewReceived(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_ImagePreviewReceived(token)); } template event_token impl_IClaimedBarcodeScanner::ErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ErrorOccurred(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->add_ErrorOccurred(get_abi(handler), &token)); return token; } @@ -8969,174 +9426,174 @@ template event_revoker impl_IClaimedBarcode template void impl_IClaimedBarcodeScanner::ErrorOccurred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ErrorOccurred(token)); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner)->remove_ErrorOccurred(token)); } template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner1::StartSoftwareTriggerAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_StartSoftwareTriggerAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner1)->abi_StartSoftwareTriggerAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IClaimedBarcodeScanner1::StopSoftwareTriggerAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_StopSoftwareTriggerAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedBarcodeScanner1)->abi_StopSoftwareTriggerAsync(put_abi(result))); return result; } template hstring impl_IClaimedMagneticStripeReader::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_DeviceId(put_abi(value))); return value; } template bool impl_IClaimedMagneticStripeReader::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_IsEnabled(&value)); return value; } template void impl_IClaimedMagneticStripeReader::IsDisabledOnDataReceived(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDisabledOnDataReceived(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->put_IsDisabledOnDataReceived(value)); } template bool impl_IClaimedMagneticStripeReader::IsDisabledOnDataReceived() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisabledOnDataReceived(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_IsDisabledOnDataReceived(&value)); return value; } template void impl_IClaimedMagneticStripeReader::IsDecodeDataEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDecodeDataEnabled(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->put_IsDecodeDataEnabled(value)); } template bool impl_IClaimedMagneticStripeReader::IsDecodeDataEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDecodeDataEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_IsDecodeDataEnabled(&value)); return value; } template bool impl_IClaimedMagneticStripeReader::IsDeviceAuthenticated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDeviceAuthenticated(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_IsDeviceAuthenticated(&value)); return value; } template void impl_IClaimedMagneticStripeReader::DataEncryptionAlgorithm(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataEncryptionAlgorithm(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->put_DataEncryptionAlgorithm(value)); } template uint32_t impl_IClaimedMagneticStripeReader::DataEncryptionAlgorithm() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataEncryptionAlgorithm(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_DataEncryptionAlgorithm(&value)); return value; } template void impl_IClaimedMagneticStripeReader::TracksToRead(Windows::Devices::PointOfService::MagneticStripeReaderTrackIds value) const { - check_hresult(static_cast(static_cast(*this))->put_TracksToRead(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->put_TracksToRead(value)); } template Windows::Devices::PointOfService::MagneticStripeReaderTrackIds impl_IClaimedMagneticStripeReader::TracksToRead() const { Windows::Devices::PointOfService::MagneticStripeReaderTrackIds value {}; - check_hresult(static_cast(static_cast(*this))->get_TracksToRead(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_TracksToRead(&value)); return value; } template void impl_IClaimedMagneticStripeReader::IsTransmitSentinelsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTransmitSentinelsEnabled(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->put_IsTransmitSentinelsEnabled(value)); } template bool impl_IClaimedMagneticStripeReader::IsTransmitSentinelsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTransmitSentinelsEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->get_IsTransmitSentinelsEnabled(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::EnableAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_EnableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_EnableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::DisableAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DisableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_DisableAsync(put_abi(result))); return result; } template void impl_IClaimedMagneticStripeReader::RetainDevice() const { - check_hresult(static_cast(static_cast(*this))->abi_RetainDevice()); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_RetainDevice()); } template void impl_IClaimedMagneticStripeReader::SetErrorReportingType(Windows::Devices::PointOfService::MagneticStripeReaderErrorReportingType value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetErrorReportingType(value)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_SetErrorReportingType(value)); } template Windows::Foundation::IAsyncOperation impl_IClaimedMagneticStripeReader::RetrieveDeviceAuthenticationDataAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RetrieveDeviceAuthenticationDataAsync(put(operation))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_RetrieveDeviceAuthenticationDataAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::AuthenticateDeviceAsync(array_ref responseToken) const +template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::AuthenticateDeviceAsync(array_view responseToken) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateDeviceAsync(responseToken.size(), get(responseToken), put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_AuthenticateDeviceAsync(responseToken.size(), get_abi(responseToken), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::DeAuthenticateDeviceAsync(array_ref responseToken) const +template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::DeAuthenticateDeviceAsync(array_view responseToken) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeAuthenticateDeviceAsync(responseToken.size(), get(responseToken), put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_DeAuthenticateDeviceAsync(responseToken.size(), get_abi(responseToken), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::UpdateKeyAsync(hstring_ref key, hstring_ref keyName) const +template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::UpdateKeyAsync(hstring_view key, hstring_view keyName) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateKeyAsync(get(key), get(keyName), put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_UpdateKeyAsync(get_abi(key), get_abi(keyName), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::ResetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::ResetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ResetStatisticsAsync(get(statisticsCategories), put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_ResetStatisticsAsync(get_abi(statisticsCategories), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::UpdateStatisticsAsync(const Windows::Foundation::Collections::IIterable> & statistics) const +template Windows::Foundation::IAsyncAction impl_IClaimedMagneticStripeReader::UpdateStatisticsAsync(iterable> statistics) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateStatisticsAsync(get(statistics), put(result))); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->abi_UpdateStatisticsAsync(get_abi(statistics), put_abi(result))); return result; } template event_token impl_IClaimedMagneticStripeReader::BankCardDataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BankCardDataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->add_BankCardDataReceived(get_abi(handler), &token)); return token; } @@ -9147,13 +9604,13 @@ template event_revoker impl_IClaimedM template void impl_IClaimedMagneticStripeReader::BankCardDataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BankCardDataReceived(token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->remove_BankCardDataReceived(token)); } template event_token impl_IClaimedMagneticStripeReader::AamvaCardDataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AamvaCardDataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->add_AamvaCardDataReceived(get_abi(handler), &token)); return token; } @@ -9164,13 +9621,13 @@ template event_revoker impl_IClaimedM template void impl_IClaimedMagneticStripeReader::AamvaCardDataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AamvaCardDataReceived(token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->remove_AamvaCardDataReceived(token)); } template event_token impl_IClaimedMagneticStripeReader::VendorSpecificDataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VendorSpecificDataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->add_VendorSpecificDataReceived(get_abi(handler), &token)); return token; } @@ -9181,13 +9638,13 @@ template event_revoker impl_IClaimedM template void impl_IClaimedMagneticStripeReader::VendorSpecificDataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VendorSpecificDataReceived(token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->remove_VendorSpecificDataReceived(token)); } template event_token impl_IClaimedMagneticStripeReader::ReleaseDeviceRequested(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReleaseDeviceRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->add_ReleaseDeviceRequested(get_abi(handler), &token)); return token; } @@ -9198,13 +9655,13 @@ template event_revoker impl_IClaimedM template void impl_IClaimedMagneticStripeReader::ReleaseDeviceRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReleaseDeviceRequested(token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->remove_ReleaseDeviceRequested(token)); } template event_token impl_IClaimedMagneticStripeReader::ErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ErrorOccurred(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->add_ErrorOccurred(get_abi(handler), &token)); return token; } @@ -9215,126 +9672,126 @@ template event_revoker impl_IClaimedM template void impl_IClaimedMagneticStripeReader::ErrorOccurred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ErrorOccurred(token)); + check_hresult(WINRT_SHIM(IClaimedMagneticStripeReader)->remove_ErrorOccurred(token)); } template hstring impl_IClaimedPosPrinter::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_DeviceId(put_abi(value))); return value; } template bool impl_IClaimedPosPrinter::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_IsEnabled(&value)); return value; } template void impl_IClaimedPosPrinter::CharacterSet(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CharacterSet(value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->put_CharacterSet(value)); } template uint32_t impl_IClaimedPosPrinter::CharacterSet() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacterSet(&value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_CharacterSet(&value)); return value; } template bool impl_IClaimedPosPrinter::IsCoverOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCoverOpen(&value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_IsCoverOpen(&value)); return value; } template void impl_IClaimedPosPrinter::IsCharacterSetMappingEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCharacterSetMappingEnabled(value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->put_IsCharacterSetMappingEnabled(value)); } template bool impl_IClaimedPosPrinter::IsCharacterSetMappingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCharacterSetMappingEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_IsCharacterSetMappingEnabled(&value)); return value; } template void impl_IClaimedPosPrinter::MapMode(Windows::Devices::PointOfService::PosPrinterMapMode value) const { - check_hresult(static_cast(static_cast(*this))->put_MapMode(value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->put_MapMode(value)); } template Windows::Devices::PointOfService::PosPrinterMapMode impl_IClaimedPosPrinter::MapMode() const { Windows::Devices::PointOfService::PosPrinterMapMode value {}; - check_hresult(static_cast(static_cast(*this))->get_MapMode(&value)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_MapMode(&value)); return value; } template Windows::Devices::PointOfService::ClaimedReceiptPrinter impl_IClaimedPosPrinter::Receipt() const { Windows::Devices::PointOfService::ClaimedReceiptPrinter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Receipt(put(value))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_Receipt(put_abi(value))); return value; } template Windows::Devices::PointOfService::ClaimedSlipPrinter impl_IClaimedPosPrinter::Slip() const { Windows::Devices::PointOfService::ClaimedSlipPrinter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Slip(put(value))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_Slip(put_abi(value))); return value; } template Windows::Devices::PointOfService::ClaimedJournalPrinter impl_IClaimedPosPrinter::Journal() const { Windows::Devices::PointOfService::ClaimedJournalPrinter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Journal(put(value))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->get_Journal(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::EnableAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_EnableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->abi_EnableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::DisableAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_DisableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->abi_DisableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::RetainDeviceAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RetainDeviceAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->abi_RetainDeviceAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::ResetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::ResetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ResetStatisticsAsync(get(statisticsCategories), put(result))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->abi_ResetStatisticsAsync(get_abi(statisticsCategories), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::UpdateStatisticsAsync(const Windows::Foundation::Collections::IIterable> & statistics) const +template Windows::Foundation::IAsyncOperation impl_IClaimedPosPrinter::UpdateStatisticsAsync(iterable> statistics) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateStatisticsAsync(get(statistics), put(result))); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->abi_UpdateStatisticsAsync(get_abi(statistics), put_abi(result))); return result; } template event_token impl_IClaimedPosPrinter::ReleaseDeviceRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReleaseDeviceRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->add_ReleaseDeviceRequested(get_abi(handler), &token)); return token; } @@ -9345,94 +9802,94 @@ template event_revoker impl_IClaimedPosPrinter< template void impl_IClaimedPosPrinter::ReleaseDeviceRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReleaseDeviceRequested(token)); + check_hresult(WINRT_SHIM(IClaimedPosPrinter)->remove_ReleaseDeviceRequested(token)); } template hstring impl_IClaimedCashDrawer::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->get_DeviceId(put_abi(value))); return value; } template bool impl_IClaimedCashDrawer::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->get_IsEnabled(&value)); return value; } template bool impl_IClaimedCashDrawer::IsDrawerOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDrawerOpen(&value)); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->get_IsDrawerOpen(&value)); return value; } template Windows::Devices::PointOfService::CashDrawerCloseAlarm impl_IClaimedCashDrawer::CloseAlarm() const { Windows::Devices::PointOfService::CashDrawerCloseAlarm value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CloseAlarm(put(value))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->get_CloseAlarm(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::OpenDrawerAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_OpenDrawerAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_OpenDrawerAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::EnableAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_EnableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_EnableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::DisableAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_DisableAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_DisableAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::RetainDeviceAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RetainDeviceAsync(put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_RetainDeviceAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::ResetStatisticsAsync(const Windows::Foundation::Collections::IIterable & statisticsCategories) const +template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::ResetStatisticsAsync(iterable statisticsCategories) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ResetStatisticsAsync(get(statisticsCategories), put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_ResetStatisticsAsync(get_abi(statisticsCategories), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::UpdateStatisticsAsync(const Windows::Foundation::Collections::IIterable> & statistics) const +template Windows::Foundation::IAsyncOperation impl_IClaimedCashDrawer::UpdateStatisticsAsync(iterable> statistics) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateStatisticsAsync(get(statistics), put(result))); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->abi_UpdateStatisticsAsync(get_abi(statistics), put_abi(result))); return result; } -template event_token impl_IClaimedCashDrawer::ReleaseDeviceRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IClaimedCashDrawer::ReleaseDeviceRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReleaseDeviceRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->add_ReleaseDeviceRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_IClaimedCashDrawer::ReleaseDeviceRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IClaimedCashDrawer::ReleaseDeviceRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::PointOfService::IClaimedCashDrawer::remove_ReleaseDeviceRequested, ReleaseDeviceRequested(handler)); } template void impl_IClaimedCashDrawer::ReleaseDeviceRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReleaseDeviceRequested(token)); + check_hresult(WINRT_SHIM(IClaimedCashDrawer)->remove_ReleaseDeviceRequested(token)); } inline Windows::Foundation::IAsyncOperation BarcodeScanner::GetDefaultAsync() @@ -9440,7 +9897,7 @@ inline Windows::Foundation::IAsyncOperation().GetDefaultAsync(); } -inline Windows::Foundation::IAsyncOperation BarcodeScanner::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation BarcodeScanner::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -9925,7 +10382,7 @@ inline Windows::Foundation::IAsyncOperation().GetDefaultAsync(); } -inline Windows::Foundation::IAsyncOperation CashDrawer::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation CashDrawer::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -9940,7 +10397,7 @@ inline Windows::Foundation::IAsyncOperation().GetDefaultAsync(); } -inline Windows::Foundation::IAsyncOperation MagneticStripeReader::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation MagneticStripeReader::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -9990,7 +10447,7 @@ inline Windows::Foundation::IAsyncOperation().GetDefaultAsync(); } -inline Windows::Foundation::IAsyncOperation PosPrinter::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation PosPrinter::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -10018,3 +10475,896 @@ inline uint32_t PosPrinterCharacterSetIds::Ansi() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScanner2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerCapabilities1 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerImagePreviewReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeScannerStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IBarcodeSymbologiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerCloseAlarm & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerEventSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerEventSourceEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICashDrawerStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedBarcodeScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedBarcodeScanner1 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedCashDrawer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedJournalPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedMagneticStripeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedPosPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedReceiptPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IClaimedSlipPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICommonClaimedPosPrinterStation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICommonPosPrintStationCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ICommonReceiptSlipCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IJournalPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderAamvaCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderBankCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderCardTypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderEncryptionAlgorithmsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderTrackData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterCharacterSetIdsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterReleaseDeviceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IPosPrinterStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IReceiptOrSlipJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IReceiptPrintJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IReceiptPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ISlipPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::IUnifiedPosErrorData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerImagePreviewReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::BarcodeScannerStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerCloseAlarm & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerEventSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerOpenedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::CashDrawerStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedBarcodeScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedCashDrawer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedJournalPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedMagneticStripeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedPosPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedReceiptPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ClaimedSlipPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::JournalPrintJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::JournalPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderAamvaCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderBankCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderTrackData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::PosPrinter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::PosPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::PosPrinterReleaseDeviceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::PosPrinterStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::PosPrinterStatusUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ReceiptPrintJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::ReceiptPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::SlipPrintJob & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::SlipPrinterCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::PointOfService::UnifiedPosErrorData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Portable.h b/10.0.14393.0/winrt/Windows.Devices.Portable.h index 9276e7b91..162d3d89e 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Portable.h +++ b/10.0.14393.0/winrt/Windows.Devices.Portable.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Devices.Portable.3.h" #include "Windows.Devices.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(Windows::Devices::Portable::ServiceDeviceType serviceType, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(Windows::Devices::Portable::ServiceDeviceType serviceType, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(serviceType)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(serviceType)); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDeviceSelectorFromServiceId(GUID serviceId, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromServiceId(GUID serviceId, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelectorFromServiceId(serviceId)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelectorFromServiceId(serviceId)); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_FromId(abi_arg_in deviceId, abi_arg_out deviceRoot) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in deviceId, impl::abi_arg_out deviceRoot) noexcept override { try { - *deviceRoot = detach(this->shim().FromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *deviceRoot = detach_abi(this->shim().FromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -60,11 +66,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -79,31 +86,31 @@ struct produce : produce_b namespace Windows::Devices::Portable { -template Windows::Storage::StorageFolder impl_IStorageDeviceStatics::FromId(hstring_ref deviceId) const +template Windows::Storage::StorageFolder impl_IStorageDeviceStatics::FromId(hstring_view deviceId) const { Windows::Storage::StorageFolder deviceRoot { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(deviceId), put(deviceRoot))); + check_hresult(WINRT_SHIM(IStorageDeviceStatics)->abi_FromId(get_abi(deviceId), put_abi(deviceRoot))); return deviceRoot; } template hstring impl_IStorageDeviceStatics::GetDeviceSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(selector))); + check_hresult(WINRT_SHIM(IStorageDeviceStatics)->abi_GetDeviceSelector(put_abi(selector))); return selector; } template hstring impl_IServiceDeviceStatics::GetDeviceSelector(Windows::Devices::Portable::ServiceDeviceType serviceType) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(serviceType, put(selector))); + check_hresult(WINRT_SHIM(IServiceDeviceStatics)->abi_GetDeviceSelector(serviceType, put_abi(selector))); return selector; } template hstring impl_IServiceDeviceStatics::GetDeviceSelectorFromServiceId(GUID serviceId) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromServiceId(serviceId, put(selector))); + check_hresult(WINRT_SHIM(IServiceDeviceStatics)->abi_GetDeviceSelectorFromServiceId(serviceId, put_abi(selector))); return selector; } @@ -117,7 +124,7 @@ inline hstring ServiceDevice::GetDeviceSelectorFromServiceId(GUID serviceId) return get_activation_factory().GetDeviceSelectorFromServiceId(serviceId); } -inline Windows::Storage::StorageFolder StorageDevice::FromId(hstring_ref deviceId) +inline Windows::Storage::StorageFolder StorageDevice::FromId(hstring_view deviceId) { return get_activation_factory().FromId(deviceId); } @@ -130,3 +137,23 @@ inline hstring StorageDevice::GetDeviceSelector() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Portable::IServiceDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Portable::IStorageDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Power.h b/10.0.14393.0/winrt/Windows.Devices.Power.h index 55bc51f6b..d5a2a7015 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Power.h +++ b/10.0.14393.0/winrt/Windows.Devices.Power.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.Power.3.h" #include "internal/Windows.Devices.Power.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetReport(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetReport()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetReport()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReportUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReportUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReportUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -60,6 +66,7 @@ struct produce : produce_baseshim()); this->shim().ReportUpdated(token); return S_OK; } @@ -73,11 +80,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ChargeRateInMilliwatts(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ChargeRateInMilliwatts(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ChargeRateInMilliwatts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChargeRateInMilliwatts()); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DesignCapacityInMilliwattHours(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesignCapacityInMilliwattHours()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesignCapacityInMilliwattHours()); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_FullChargeCapacityInMilliwattHours(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FullChargeCapacityInMilliwattHours()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullChargeCapacityInMilliwattHours()); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RemainingCapacityInMilliwattHours(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemainingCapacityInMilliwattHours()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingCapacityInMilliwattHours()); return S_OK; } catch (...) @@ -133,7 +144,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -146,11 +158,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AggregateBattery(abi_arg_out result) noexcept override + HRESULT __stdcall get_AggregateBattery(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AggregateBattery()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AggregateBattery()); return S_OK; } catch (...) @@ -160,11 +173,12 @@ struct produce : produce_base deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -174,11 +188,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -196,87 +211,87 @@ namespace Windows::Devices::Power { template hstring impl_IBattery::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IBattery)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Power::BatteryReport impl_IBattery::GetReport() const { Windows::Devices::Power::BatteryReport result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetReport(put(result))); + check_hresult(WINRT_SHIM(IBattery)->abi_GetReport(put_abi(result))); return result; } -template event_token impl_IBattery::ReportUpdated(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IBattery::ReportUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReportUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IBattery)->add_ReportUpdated(get_abi(handler), &token)); return token; } -template event_revoker impl_IBattery::ReportUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IBattery::ReportUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Power::IBattery::remove_ReportUpdated, ReportUpdated(handler)); } template void impl_IBattery::ReportUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReportUpdated(token)); + check_hresult(WINRT_SHIM(IBattery)->remove_ReportUpdated(token)); } template Windows::Foundation::IReference impl_IBatteryReport::ChargeRateInMilliwatts() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ChargeRateInMilliwatts(put(value))); + check_hresult(WINRT_SHIM(IBatteryReport)->get_ChargeRateInMilliwatts(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IBatteryReport::DesignCapacityInMilliwattHours() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DesignCapacityInMilliwattHours(put(value))); + check_hresult(WINRT_SHIM(IBatteryReport)->get_DesignCapacityInMilliwattHours(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IBatteryReport::FullChargeCapacityInMilliwattHours() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_FullChargeCapacityInMilliwattHours(put(value))); + check_hresult(WINRT_SHIM(IBatteryReport)->get_FullChargeCapacityInMilliwattHours(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IBatteryReport::RemainingCapacityInMilliwattHours() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RemainingCapacityInMilliwattHours(put(value))); + check_hresult(WINRT_SHIM(IBatteryReport)->get_RemainingCapacityInMilliwattHours(put_abi(value))); return value; } template Windows::System::Power::BatteryStatus impl_IBatteryReport::Status() const { Windows::System::Power::BatteryStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IBatteryReport)->get_Status(&value)); return value; } template Windows::Devices::Power::Battery impl_IBatteryStatics::AggregateBattery() const { Windows::Devices::Power::Battery result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AggregateBattery(put(result))); + check_hresult(WINRT_SHIM(IBatteryStatics)->get_AggregateBattery(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IBatteryStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IBatteryStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IBatteryStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_IBatteryStatics::GetDeviceSelector() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(result))); + check_hresult(WINRT_SHIM(IBatteryStatics)->abi_GetDeviceSelector(put_abi(result))); return result; } @@ -285,7 +300,7 @@ inline Windows::Devices::Power::Battery Battery::AggregateBattery() return get_activation_factory().AggregateBattery(); } -inline Windows::Foundation::IAsyncOperation Battery::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation Battery::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -298,3 +313,50 @@ inline hstring Battery::GetDeviceSelector() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Power::IBattery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Power::IBatteryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Power::IBatteryStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Power::Battery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Power::BatteryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Printers.Extensions.h b/10.0.14393.0/winrt/Windows.Devices.Printers.Extensions.h index 70317a98a..47d0c8aeb 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Printers.Extensions.h +++ b/10.0.14393.0/winrt/Windows.Devices.Printers.Extensions.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Printers.Extensions.3.h" #include "Windows.Devices.Printers.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceID(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceID(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceID()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceID()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetPrintModelPackage(abi_arg_out printModelPackage) noexcept override + HRESULT __stdcall abi_GetPrintModelPackage(impl::abi_arg_out printModelPackage) noexcept override { try { - *printModelPackage = detach(this->shim().GetPrintModelPackage()); + typename D::abi_guard guard(this->shim()); + *printModelPackage = detach_abi(this->shim().GetPrintModelPackage()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsPrintReady()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrintReady()); return S_OK; } catch (...) @@ -59,6 +65,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPrintReady(value); return S_OK; } @@ -68,11 +75,12 @@ struct produce : pr } } - HRESULT __stdcall add_PrintRequested(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_PrintRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().PrintRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().PrintRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -85,6 +93,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintRequested(eventCookie); return S_OK; } @@ -98,11 +107,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall add_PrinterChanged(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_PrinterChanged(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().PrinterChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().PrinterChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -115,6 +125,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().PrinterChanged(eventCookie); return S_OK; } @@ -132,7 +143,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -145,6 +157,7 @@ struct produceshim()); this->shim().SetExtendedStatus(value); return S_OK; } @@ -154,11 +167,12 @@ struct produce source) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in source) noexcept override { try { - this->shim().SetSource(*reinterpret_cast(&source)); + typename D::abi_guard guard(this->shim()); + this->shim().SetSource(*reinterpret_cast(&source)); return S_OK; } catch (...) @@ -171,6 +185,7 @@ struct produceshim()); this->shim().SetSourceChanged(value); return S_OK; } @@ -184,11 +199,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NewDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDeviceId()); return S_OK; } catch (...) @@ -202,11 +218,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromDeviceId(abi_arg_in deviceId, abi_arg_out context) noexcept override + HRESULT __stdcall abi_FromDeviceId(impl::abi_arg_in deviceId, impl::abi_arg_out context) noexcept override { try { - *context = detach(this->shim().FromDeviceId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *context = detach_abi(this->shim().FromDeviceId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -220,11 +237,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PrinterName(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrinterName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrinterName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrinterName()); return S_OK; } catch (...) @@ -234,11 +252,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EventData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EventData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EventData()); return S_OK; } catch (...) @@ -248,10 +267,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_EventData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EventData(*reinterpret_cast(&value)); return S_OK; } @@ -265,11 +285,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PrinterExtensionContext(abi_arg_out context) noexcept override + HRESULT __stdcall get_PrinterExtensionContext(impl::abi_arg_out context) noexcept override { try { - *context = detach(this->shim().PrinterExtensionContext()); + typename D::abi_guard guard(this->shim()); + *context = detach_abi(this->shim().PrinterExtensionContext()); return S_OK; } catch (...) @@ -279,11 +300,12 @@ struct produce> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_SaveRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().SaveRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().SaveRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -296,6 +318,7 @@ struct produceshim()); this->shim().SaveRequested(eventCookie); return S_OK; } @@ -313,6 +336,7 @@ struct produceshim()); this->shim().Cancel(); return S_OK; } @@ -322,11 +346,12 @@ struct produce printerExtensionContext) noexcept override + HRESULT __stdcall abi_Save(impl::abi_arg_in printerExtensionContext) noexcept override { try { - this->shim().Save(*reinterpret_cast(&printerExtensionContext)); + typename D::abi_guard guard(this->shim()); + this->shim().Save(*reinterpret_cast(&printerExtensionContext)); return S_OK; } catch (...) @@ -335,11 +360,12 @@ struct produce deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -349,11 +375,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -370,6 +397,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -383,11 +411,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out context) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out context) noexcept override { try { - *context = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *context = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -405,62 +434,62 @@ namespace Windows::Devices::Printers::Extensions { template Windows::Devices::Printers::Extensions::Print3DWorkflowStatus impl_IPrint3DWorkflowPrintRequestedEventArgs::Status() const { Windows::Devices::Printers::Extensions::Print3DWorkflowStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IPrint3DWorkflowPrintRequestedEventArgs)->get_Status(&value)); return value; } template void impl_IPrint3DWorkflowPrintRequestedEventArgs::SetExtendedStatus(Windows::Devices::Printers::Extensions::Print3DWorkflowDetail value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetExtendedStatus(value)); + check_hresult(WINRT_SHIM(IPrint3DWorkflowPrintRequestedEventArgs)->abi_SetExtendedStatus(value)); } -template void impl_IPrint3DWorkflowPrintRequestedEventArgs::SetSource(const Windows::IInspectable & source) const +template void impl_IPrint3DWorkflowPrintRequestedEventArgs::SetSource(const Windows::Foundation::IInspectable & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(source))); + check_hresult(WINRT_SHIM(IPrint3DWorkflowPrintRequestedEventArgs)->abi_SetSource(get_abi(source))); } template void impl_IPrint3DWorkflowPrintRequestedEventArgs::SetSourceChanged(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSourceChanged(value)); + check_hresult(WINRT_SHIM(IPrint3DWorkflowPrintRequestedEventArgs)->abi_SetSourceChanged(value)); } template hstring impl_IPrint3DWorkflowPrinterChangedEventArgs::NewDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NewDeviceId(put(value))); + check_hresult(WINRT_SHIM(IPrint3DWorkflowPrinterChangedEventArgs)->get_NewDeviceId(put_abi(value))); return value; } template hstring impl_IPrint3DWorkflow::DeviceID() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceID(put(value))); + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->get_DeviceID(put_abi(value))); return value; } -template Windows::IInspectable impl_IPrint3DWorkflow::GetPrintModelPackage() const +template Windows::Foundation::IInspectable impl_IPrint3DWorkflow::GetPrintModelPackage() const { - Windows::IInspectable printModelPackage; - check_hresult(static_cast(static_cast(*this))->abi_GetPrintModelPackage(put(printModelPackage))); + Windows::Foundation::IInspectable printModelPackage; + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->abi_GetPrintModelPackage(put_abi(printModelPackage))); return printModelPackage; } template bool impl_IPrint3DWorkflow::IsPrintReady() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrintReady(&value)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->get_IsPrintReady(&value)); return value; } template void impl_IPrint3DWorkflow::IsPrintReady(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPrintReady(value)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->put_IsPrintReady(value)); } template event_token impl_IPrint3DWorkflow::PrintRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_PrintRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->add_PrintRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -471,13 +500,13 @@ template event_revoker impl_IPrint3DWorkflow:: template void impl_IPrint3DWorkflow::PrintRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PrintRequested(eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow)->remove_PrintRequested(eventCookie)); } template event_token impl_IPrint3DWorkflow2::PrinterChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_PrinterChanged(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow2)->add_PrinterChanged(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -488,56 +517,56 @@ template event_revoker impl_IPrint3DWorkflow2 template void impl_IPrint3DWorkflow2::PrinterChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PrinterChanged(eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DWorkflow2)->remove_PrinterChanged(eventCookie)); } template void impl_IPrintTaskConfigurationSaveRequestedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequestedDeferral)->abi_Complete()); } template void impl_IPrintTaskConfigurationSaveRequest::Cancel() const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel()); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequest)->abi_Cancel()); } -template void impl_IPrintTaskConfigurationSaveRequest::Save(const Windows::IInspectable & printerExtensionContext) const +template void impl_IPrintTaskConfigurationSaveRequest::Save(const Windows::Foundation::IInspectable & printerExtensionContext) const { - check_hresult(static_cast(static_cast(*this))->abi_Save(get(printerExtensionContext))); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequest)->abi_Save(get_abi(printerExtensionContext))); } template Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral impl_IPrintTaskConfigurationSaveRequest::GetDeferral() const { Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Foundation::DateTime impl_IPrintTaskConfigurationSaveRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequest)->get_Deadline(put_abi(value))); return value; } template Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest impl_IPrintTaskConfigurationSaveRequestedEventArgs::Request() const { Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest context { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(context))); + check_hresult(WINRT_SHIM(IPrintTaskConfigurationSaveRequestedEventArgs)->get_Request(put_abi(context))); return context; } -template Windows::IInspectable impl_IPrintTaskConfiguration::PrinterExtensionContext() const +template Windows::Foundation::IInspectable impl_IPrintTaskConfiguration::PrinterExtensionContext() const { - Windows::IInspectable context; - check_hresult(static_cast(static_cast(*this))->get_PrinterExtensionContext(put(context))); + Windows::Foundation::IInspectable context; + check_hresult(WINRT_SHIM(IPrintTaskConfiguration)->get_PrinterExtensionContext(put_abi(context))); return context; } template event_token impl_IPrintTaskConfiguration::SaveRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_SaveRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskConfiguration)->add_SaveRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -548,36 +577,36 @@ template event_revoker impl_IPrintTaskConf template void impl_IPrintTaskConfiguration::SaveRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SaveRequested(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskConfiguration)->remove_SaveRequested(eventCookie)); } template hstring impl_IPrintNotificationEventDetails::PrinterName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrinterName(put(value))); + check_hresult(WINRT_SHIM(IPrintNotificationEventDetails)->get_PrinterName(put_abi(value))); return value; } template hstring impl_IPrintNotificationEventDetails::EventData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EventData(put(value))); + check_hresult(WINRT_SHIM(IPrintNotificationEventDetails)->get_EventData(put_abi(value))); return value; } -template void impl_IPrintNotificationEventDetails::EventData(hstring_ref value) const +template void impl_IPrintNotificationEventDetails::EventData(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_EventData(get(value))); + check_hresult(WINRT_SHIM(IPrintNotificationEventDetails)->put_EventData(get_abi(value))); } -template Windows::IInspectable impl_IPrintExtensionContextStatic::FromDeviceId(hstring_ref deviceId) const +template Windows::Foundation::IInspectable impl_IPrintExtensionContextStatic::FromDeviceId(hstring_view deviceId) const { - Windows::IInspectable context; - check_hresult(static_cast(static_cast(*this))->abi_FromDeviceId(get(deviceId), put(context))); + Windows::Foundation::IInspectable context; + check_hresult(WINRT_SHIM(IPrintExtensionContextStatic)->abi_FromDeviceId(get_abi(deviceId), put_abi(context))); return context; } -inline Windows::IInspectable PrintExtensionContext::FromDeviceId(hstring_ref deviceId) +inline Windows::Foundation::IInspectable PrintExtensionContext::FromDeviceId(hstring_view deviceId) { return get_activation_factory().FromDeviceId(deviceId); } @@ -585,3 +614,167 @@ inline Windows::IInspectable PrintExtensionContext::FromDeviceId(hstring_ref dev } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflow2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrintRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrint3DWorkflowPrinterChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintExtensionContextStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintNotificationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::IPrintTaskConfigurationSaveRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::Print3DWorkflow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrintRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::Print3DWorkflowPrinterChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::PrintNotificationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::PrintTaskConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Extensions::PrintTaskConfigurationSaveRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Printers.h b/10.0.14393.0/winrt/Windows.Devices.Printers.h index ca2baabe0..9ec322f56 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Printers.h +++ b/10.0.14393.0/winrt/Windows.Devices.Printers.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Printers.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_PrintSchema(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrintSchema(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrintSchema()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintSchema()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -47,11 +52,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -65,11 +71,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultPrintTicketAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDefaultPrintTicketAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultPrintTicketAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultPrintTicketAsync()); return S_OK; } catch (...) @@ -79,11 +86,12 @@ struct produce : produce_base constrainTicket, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCapabilitiesAsync(impl::abi_arg_in constrainTicket, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCapabilitiesAsync(*reinterpret_cast(&constrainTicket))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCapabilitiesAsync(*reinterpret_cast(&constrainTicket))); return S_OK; } catch (...) @@ -93,11 +101,12 @@ struct produce : produce_base deltaTicket, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_MergeAndValidateWithDefaultPrintTicketAsync(impl::abi_arg_in deltaTicket, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().MergeAndValidateWithDefaultPrintTicketAsync(*reinterpret_cast(&deltaTicket))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().MergeAndValidateWithDefaultPrintTicketAsync(*reinterpret_cast(&deltaTicket))); return S_OK; } catch (...) @@ -112,49 +121,49 @@ struct produce : produce_base Windows::Foundation::IAsyncOperation impl_IPrint3DDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IPrint3DDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IPrint3DDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template hstring impl_IPrint3DDeviceStatics::GetDeviceSelector() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(result))); + check_hresult(WINRT_SHIM(IPrint3DDeviceStatics)->abi_GetDeviceSelector(put_abi(result))); return result; } template Windows::Devices::Printers::PrintSchema impl_IPrint3DDevice::PrintSchema() const { Windows::Devices::Printers::PrintSchema value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrintSchema(put(value))); + check_hresult(WINRT_SHIM(IPrint3DDevice)->get_PrintSchema(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPrintSchema::GetDefaultPrintTicketAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultPrintTicketAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrintSchema)->abi_GetDefaultPrintTicketAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPrintSchema::GetCapabilitiesAsync(const Windows::Storage::Streams::IRandomAccessStreamWithContentType & constrainTicket) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCapabilitiesAsync(get(constrainTicket), put(operation))); + check_hresult(WINRT_SHIM(IPrintSchema)->abi_GetCapabilitiesAsync(get_abi(constrainTicket), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPrintSchema::MergeAndValidateWithDefaultPrintTicketAsync(const Windows::Storage::Streams::IRandomAccessStreamWithContentType & deltaTicket) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_MergeAndValidateWithDefaultPrintTicketAsync(get(deltaTicket), put(operation))); + check_hresult(WINRT_SHIM(IPrintSchema)->abi_MergeAndValidateWithDefaultPrintTicketAsync(get_abi(deltaTicket), put_abi(operation))); return operation; } -inline Windows::Foundation::IAsyncOperation Print3DDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation Print3DDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -167,3 +176,50 @@ inline hstring Print3DDevice::GetDeviceSelector() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::IPrint3DDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::IPrint3DDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::IPrintSchema & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::Print3DDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Printers::PrintSchema & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Pwm.Provider.h b/10.0.14393.0/winrt/Windows.Devices.Pwm.Provider.h index 9a2a929ed..f954d64ab 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Pwm.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.Pwm.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Pwm.Provider.3.h" #include "Windows.Devices.Pwm.h" @@ -18,7 +21,8 @@ struct produce : pro { try { - *value = detach(this->shim().PinCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinCount()); return S_OK; } catch (...) @@ -31,7 +35,8 @@ struct produce : pro { try { - *value = detach(this->shim().ActualFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualFrequency()); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produce : pro { try { - *value = detach(this->shim().SetDesiredFrequency(frequency)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SetDesiredFrequency(frequency)); return S_OK; } catch (...) @@ -57,7 +63,8 @@ struct produce : pro { try { - *value = detach(this->shim().MaxFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxFrequency()); return S_OK; } catch (...) @@ -70,7 +77,8 @@ struct produce : pro { try { - *value = detach(this->shim().MinFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinFrequency()); return S_OK; } catch (...) @@ -83,6 +91,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AcquirePin(pin); return S_OK; } @@ -96,6 +105,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleasePin(pin); return S_OK; } @@ -109,6 +119,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().EnablePin(pin); return S_OK; } @@ -122,6 +133,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().DisablePin(pin); return S_OK; } @@ -135,6 +147,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPulseParameters(pin, dutyCycle, invertPolarity); return S_OK; } @@ -148,11 +161,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetControllers(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetControllers(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetControllers()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetControllers()); return S_OK; } catch (...) @@ -170,70 +184,90 @@ namespace Windows::Devices::Pwm::Provider { template int32_t impl_IPwmControllerProvider::PinCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinCount(&value)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->get_PinCount(&value)); return value; } template double impl_IPwmControllerProvider::ActualFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->get_ActualFrequency(&value)); return value; } template double impl_IPwmControllerProvider::SetDesiredFrequency(double frequency) const { double value {}; - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredFrequency(frequency, &value)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_SetDesiredFrequency(frequency, &value)); return value; } template double impl_IPwmControllerProvider::MaxFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->get_MaxFrequency(&value)); return value; } template double impl_IPwmControllerProvider::MinFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->get_MinFrequency(&value)); return value; } template void impl_IPwmControllerProvider::AcquirePin(int32_t pin) const { - check_hresult(static_cast(static_cast(*this))->abi_AcquirePin(pin)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_AcquirePin(pin)); } template void impl_IPwmControllerProvider::ReleasePin(int32_t pin) const { - check_hresult(static_cast(static_cast(*this))->abi_ReleasePin(pin)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_ReleasePin(pin)); } template void impl_IPwmControllerProvider::EnablePin(int32_t pin) const { - check_hresult(static_cast(static_cast(*this))->abi_EnablePin(pin)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_EnablePin(pin)); } template void impl_IPwmControllerProvider::DisablePin(int32_t pin) const { - check_hresult(static_cast(static_cast(*this))->abi_DisablePin(pin)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_DisablePin(pin)); } template void impl_IPwmControllerProvider::SetPulseParameters(int32_t pin, double dutyCycle, bool invertPolarity) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPulseParameters(pin, dutyCycle, invertPolarity)); + check_hresult(WINRT_SHIM(IPwmControllerProvider)->abi_SetPulseParameters(pin, dutyCycle, invertPolarity)); } template Windows::Foundation::Collections::IVectorView impl_IPwmProvider::GetControllers() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetControllers(put(result))); + check_hresult(WINRT_SHIM(IPwmProvider)->abi_GetControllers(put_abi(result))); return result; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::Provider::IPwmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Pwm.h b/10.0.14393.0/winrt/Windows.Devices.Pwm.h index 8d5b04873..5b26d5920 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Pwm.h +++ b/10.0.14393.0/winrt/Windows.Devices.Pwm.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Pwm.Provider.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Pwm.3.h" @@ -20,7 +23,8 @@ struct produce : produce_baseshim().PinCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinCount()); return S_OK; } catch (...) @@ -33,7 +37,8 @@ struct produce : produce_baseshim().ActualFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualFrequency()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produce : produce_baseshim().SetDesiredFrequency(desiredFrequency)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SetDesiredFrequency(desiredFrequency)); return S_OK; } catch (...) @@ -59,7 +65,8 @@ struct produce : produce_baseshim().MinFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinFrequency()); return S_OK; } catch (...) @@ -72,7 +79,8 @@ struct produce : produce_baseshim().MaxFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxFrequency()); return S_OK; } catch (...) @@ -81,11 +89,12 @@ struct produce : produce_base pin) noexcept override + HRESULT __stdcall abi_OpenPin(int32_t pinNumber, impl::abi_arg_out pin) noexcept override { try { - *pin = detach(this->shim().OpenPin(pinNumber)); + typename D::abi_guard guard(this->shim()); + *pin = detach_abi(this->shim().OpenPin(pinNumber)); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_in provider, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_in provider, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Controller(abi_arg_out value) noexcept override + HRESULT __stdcall get_Controller(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Controller()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Controller()); return S_OK; } catch (...) @@ -153,7 +165,8 @@ struct produce : produce_baseshim().GetActiveDutyCyclePercentage()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetActiveDutyCyclePercentage()); return S_OK; } catch (...) @@ -166,6 +179,7 @@ struct produce : produce_baseshim()); this->shim().SetActiveDutyCyclePercentage(dutyCyclePercentage); return S_OK; } @@ -179,7 +193,8 @@ struct produce : produce_baseshim().Polarity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Polarity()); return S_OK; } catch (...) @@ -192,6 +207,7 @@ struct produce : produce_baseshim()); this->shim().Polarity(value); return S_OK; } @@ -205,6 +221,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -218,6 +235,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -231,7 +249,8 @@ struct produce : produce_baseshim().IsStarted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStarted()); return S_OK; } catch (...) @@ -248,104 +267,104 @@ namespace Windows::Devices::Pwm { template int32_t impl_IPwmController::PinCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PinCount(&value)); + check_hresult(WINRT_SHIM(IPwmController)->get_PinCount(&value)); return value; } template double impl_IPwmController::ActualFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmController)->get_ActualFrequency(&value)); return value; } template double impl_IPwmController::SetDesiredFrequency(double desiredFrequency) const { double value {}; - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredFrequency(desiredFrequency, &value)); + check_hresult(WINRT_SHIM(IPwmController)->abi_SetDesiredFrequency(desiredFrequency, &value)); return value; } template double impl_IPwmController::MinFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmController)->get_MinFrequency(&value)); return value; } template double impl_IPwmController::MaxFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxFrequency(&value)); + check_hresult(WINRT_SHIM(IPwmController)->get_MaxFrequency(&value)); return value; } template Windows::Devices::Pwm::PwmPin impl_IPwmController::OpenPin(int32_t pinNumber) const { Windows::Devices::Pwm::PwmPin pin { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenPin(pinNumber, put(pin))); + check_hresult(WINRT_SHIM(IPwmController)->abi_OpenPin(pinNumber, put_abi(pin))); return pin; } template Windows::Foundation::IAsyncOperation> impl_IPwmControllerStatics::GetControllersAsync(const Windows::Devices::Pwm::Provider::IPwmProvider & provider) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(get(provider), put(operation))); + check_hresult(WINRT_SHIM(IPwmControllerStatics)->abi_GetControllersAsync(get_abi(provider), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPwmControllerStatics2::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(IPwmControllerStatics2)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template Windows::Devices::Pwm::PwmController impl_IPwmPin::Controller() const { Windows::Devices::Pwm::PwmController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Controller(put(value))); + check_hresult(WINRT_SHIM(IPwmPin)->get_Controller(put_abi(value))); return value; } template double impl_IPwmPin::GetActiveDutyCyclePercentage() const { double result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetActiveDutyCyclePercentage(&result)); + check_hresult(WINRT_SHIM(IPwmPin)->abi_GetActiveDutyCyclePercentage(&result)); return result; } template void impl_IPwmPin::SetActiveDutyCyclePercentage(double dutyCyclePercentage) const { - check_hresult(static_cast(static_cast(*this))->abi_SetActiveDutyCyclePercentage(dutyCyclePercentage)); + check_hresult(WINRT_SHIM(IPwmPin)->abi_SetActiveDutyCyclePercentage(dutyCyclePercentage)); } template Windows::Devices::Pwm::PwmPulsePolarity impl_IPwmPin::Polarity() const { Windows::Devices::Pwm::PwmPulsePolarity value {}; - check_hresult(static_cast(static_cast(*this))->get_Polarity(&value)); + check_hresult(WINRT_SHIM(IPwmPin)->get_Polarity(&value)); return value; } template void impl_IPwmPin::Polarity(Windows::Devices::Pwm::PwmPulsePolarity value) const { - check_hresult(static_cast(static_cast(*this))->put_Polarity(value)); + check_hresult(WINRT_SHIM(IPwmPin)->put_Polarity(value)); } template void impl_IPwmPin::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPwmPin)->abi_Start()); } template void impl_IPwmPin::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPwmPin)->abi_Stop()); } template bool impl_IPwmPin::IsStarted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStarted(&value)); + check_hresult(WINRT_SHIM(IPwmPin)->get_IsStarted(&value)); return value; } @@ -362,3 +381,59 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::IPwmController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::IPwmControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::IPwmControllerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::IPwmPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::PwmController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Pwm::PwmPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Radios.h b/10.0.14393.0/winrt/Windows.Devices.Radios.h index 446ae45f5..65318a44f 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Radios.h +++ b/10.0.14393.0/winrt/Windows.Devices.Radios.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Radios.3.h" #include "Windows.Devices.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_SetStateAsync(Windows::Devices::Radios::RadioState value, abi_arg_out> retval) noexcept override + HRESULT __stdcall abi_SetStateAsync(Windows::Devices::Radios::RadioState value, impl::abi_arg_out> retval) noexcept override { try { - *retval = detach(this->shim().SetStateAsync(value)); + typename D::abi_guard guard(this->shim()); + *retval = detach_abi(this->shim().SetStateAsync(value)); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produce_base> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().StateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -45,6 +50,7 @@ struct produce : produce_baseshim()); this->shim().StateChanged(eventCookie); return S_OK; } @@ -58,7 +64,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -67,11 +74,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -85,7 +93,8 @@ struct produce : produce_baseshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetRadiosAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetRadiosAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetRadiosAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRadiosAsync()); return S_OK; } catch (...) @@ -112,11 +122,12 @@ struct produce : produce_base deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce : produce_base deviceId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -162,73 +175,73 @@ namespace Windows::Devices::Radios { template Windows::Foundation::IAsyncOperation> impl_IRadioStatics::GetRadiosAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetRadiosAsync(put(value))); + check_hresult(WINRT_SHIM(IRadioStatics)->abi_GetRadiosAsync(put_abi(value))); return value; } template hstring impl_IRadioStatics::GetDeviceSelector() const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(deviceSelector))); + check_hresult(WINRT_SHIM(IRadioStatics)->abi_GetDeviceSelector(put_abi(deviceSelector))); return deviceSelector; } -template Windows::Foundation::IAsyncOperation impl_IRadioStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IRadioStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(IRadioStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IRadioStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(value))); + check_hresult(WINRT_SHIM(IRadioStatics)->abi_RequestAccessAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IRadio::SetStateAsync(Windows::Devices::Radios::RadioState value) const { Windows::Foundation::IAsyncOperation retval; - check_hresult(static_cast(static_cast(*this))->abi_SetStateAsync(value, put(retval))); + check_hresult(WINRT_SHIM(IRadio)->abi_SetStateAsync(value, put_abi(retval))); return retval; } -template event_token impl_IRadio::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IRadio::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IRadio)->add_StateChanged(get_abi(handler), &eventCookie)); return eventCookie; } -template event_revoker impl_IRadio::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IRadio::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Radios::IRadio::remove_StateChanged, StateChanged(handler)); } template void impl_IRadio::StateChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(eventCookie)); + check_hresult(WINRT_SHIM(IRadio)->remove_StateChanged(eventCookie)); } template Windows::Devices::Radios::RadioState impl_IRadio::State() const { Windows::Devices::Radios::RadioState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IRadio)->get_State(&value)); return value; } template hstring impl_IRadio::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IRadio)->get_Name(put_abi(value))); return value; } template Windows::Devices::Radios::RadioKind impl_IRadio::Kind() const { Windows::Devices::Radios::RadioKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IRadio)->get_Kind(&value)); return value; } @@ -242,7 +255,7 @@ inline hstring Radio::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation Radio::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation Radio::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -255,3 +268,32 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Radios::IRadio & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Radios::IRadioStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Radios::Radio & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Scanners.h b/10.0.14393.0/winrt/Windows.Devices.Scanners.h index d81621748..7a85ab5bb 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Scanners.h +++ b/10.0.14393.0/winrt/Windows.Devices.Scanners.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.Printing.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produce : produce_baseshim().DefaultScanSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultScanSource()); return S_OK; } catch (...) @@ -49,7 +54,8 @@ struct produce : produce_baseshim().IsScanSourceSupported(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsScanSourceSupported(value)); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FlatbedConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlatbedConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlatbedConfiguration()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FeederConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FeederConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FeederConfiguration()); return S_OK; } catch (...) @@ -86,11 +94,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AutoConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoConfiguration()); return S_OK; } catch (...) @@ -104,7 +113,8 @@ struct produce : produce_baseshim().IsPreviewSupported(scanSource)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsPreviewSupported(scanSource)); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce : produce_base targetStream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ScanPreviewToStreamAsync(Windows::Devices::Scanners::ImageScannerScanSource scanSource, impl::abi_arg_in targetStream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ScanPreviewToStreamAsync(scanSource, *reinterpret_cast(&targetStream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ScanPreviewToStreamAsync(scanSource, *reinterpret_cast(&targetStream))); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce : produce_base storageFolder, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ScanFilesToFolderAsync(Windows::Devices::Scanners::ImageScannerScanSource scanSource, impl::abi_arg_in storageFolder, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ScanFilesToFolderAsync(scanSource, *reinterpret_cast(&storageFolder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ScanFilesToFolderAsync(scanSource, *reinterpret_cast(&storageFolder))); return S_OK; } catch (...) @@ -149,7 +161,8 @@ struct produce { try { - *value = detach(this->shim().CanAutoDetectPageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanAutoDetectPageSize()); return S_OK; } catch (...) @@ -162,7 +175,8 @@ struct produce { try { - *value = detach(this->shim().AutoDetectPageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoDetectPageSize()); return S_OK; } catch (...) @@ -175,6 +189,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoDetectPageSize(value); return S_OK; } @@ -188,7 +203,8 @@ struct produce { try { - *value = detach(this->shim().PageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageSize()); return S_OK; } catch (...) @@ -201,6 +217,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PageSize(value); return S_OK; } @@ -214,7 +231,8 @@ struct produce { try { - *value = detach(this->shim().PageOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageOrientation()); return S_OK; } catch (...) @@ -227,6 +245,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PageOrientation(value); return S_OK; } @@ -236,11 +255,12 @@ struct produce } } - HRESULT __stdcall get_PageSizeDimensions(abi_arg_out value) noexcept override + HRESULT __stdcall get_PageSizeDimensions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PageSizeDimensions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageSizeDimensions()); return S_OK; } catch (...) @@ -253,7 +273,8 @@ struct produce { try { - *result = detach(this->shim().IsPageSizeSupported(pageSize, pageOrientation)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsPageSizeSupported(pageSize, pageOrientation)); return S_OK; } catch (...) @@ -266,7 +287,8 @@ struct produce { try { - *value = detach(this->shim().MaxNumberOfPages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxNumberOfPages()); return S_OK; } catch (...) @@ -279,6 +301,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxNumberOfPages(value); return S_OK; } @@ -292,7 +315,8 @@ struct produce { try { - *value = detach(this->shim().CanScanDuplex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanScanDuplex()); return S_OK; } catch (...) @@ -305,7 +329,8 @@ struct produce { try { - *value = detach(this->shim().Duplex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duplex()); return S_OK; } catch (...) @@ -318,6 +343,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Duplex(value); return S_OK; } @@ -331,7 +357,8 @@ struct produce { try { - *value = detach(this->shim().CanScanAhead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanScanAhead()); return S_OK; } catch (...) @@ -344,7 +371,8 @@ struct produce { try { - *value = detach(this->shim().ScanAhead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanAhead()); return S_OK; } catch (...) @@ -357,6 +385,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ScanAhead(value); return S_OK; } @@ -374,7 +403,8 @@ struct produce { try { - *value = detach(this->shim().DefaultFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultFormat()); return S_OK; } catch (...) @@ -387,7 +417,8 @@ struct produce { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -400,6 +431,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Format(value); return S_OK; } @@ -413,7 +445,8 @@ struct produce { try { - *result = detach(this->shim().IsFormatSupported(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsFormatSupported(value)); return S_OK; } catch (...) @@ -430,7 +463,8 @@ struct produce : prod { try { - *value = detach(this->shim().Succeeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Succeeded()); return S_OK; } catch (...) @@ -443,7 +477,8 @@ struct produce : prod { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -456,11 +491,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_ScannedFiles(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ScannedFiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ScannedFiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScannedFiles()); return S_OK; } catch (...) @@ -474,11 +510,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_MinScanArea(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinScanArea(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinScanArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinScanArea()); return S_OK; } catch (...) @@ -487,11 +524,12 @@ struct produce } } - HRESULT __stdcall get_MaxScanArea(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxScanArea(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxScanArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxScanArea()); return S_OK; } catch (...) @@ -500,11 +538,12 @@ struct produce } } - HRESULT __stdcall get_SelectedScanRegion(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedScanRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedScanRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedScanRegion()); return S_OK; } catch (...) @@ -513,10 +552,11 @@ struct produce } } - HRESULT __stdcall put_SelectedScanRegion(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedScanRegion(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedScanRegion(*reinterpret_cast(&value)); return S_OK; } @@ -530,7 +570,8 @@ struct produce { try { - *value = detach(this->shim().AutoCroppingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoCroppingMode()); return S_OK; } catch (...) @@ -543,6 +584,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoCroppingMode(value); return S_OK; } @@ -556,7 +598,8 @@ struct produce { try { - *result = detach(this->shim().IsAutoCroppingModeSupported(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsAutoCroppingModeSupported(value)); return S_OK; } catch (...) @@ -565,11 +608,12 @@ struct produce } } - HRESULT __stdcall get_MinResolution(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinResolution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinResolution()); return S_OK; } catch (...) @@ -578,11 +622,12 @@ struct produce } } - HRESULT __stdcall get_MaxResolution(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxResolution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxResolution()); return S_OK; } catch (...) @@ -591,11 +636,12 @@ struct produce } } - HRESULT __stdcall get_OpticalResolution(abi_arg_out value) noexcept override + HRESULT __stdcall get_OpticalResolution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpticalResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalResolution()); return S_OK; } catch (...) @@ -604,11 +650,12 @@ struct produce } } - HRESULT __stdcall get_DesiredResolution(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesiredResolution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredResolution()); return S_OK; } catch (...) @@ -617,10 +664,11 @@ struct produce } } - HRESULT __stdcall put_DesiredResolution(abi_arg_in value) noexcept override + HRESULT __stdcall put_DesiredResolution(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredResolution(*reinterpret_cast(&value)); return S_OK; } @@ -630,11 +678,12 @@ struct produce } } - HRESULT __stdcall get_ActualResolution(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActualResolution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActualResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualResolution()); return S_OK; } catch (...) @@ -647,7 +696,8 @@ struct produce { try { - *value = detach(this->shim().DefaultColorMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultColorMode()); return S_OK; } catch (...) @@ -660,7 +710,8 @@ struct produce { try { - *value = detach(this->shim().ColorMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorMode()); return S_OK; } catch (...) @@ -673,6 +724,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ColorMode(value); return S_OK; } @@ -686,7 +738,8 @@ struct produce { try { - *result = detach(this->shim().IsColorModeSupported(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsColorModeSupported(value)); return S_OK; } catch (...) @@ -699,7 +752,8 @@ struct produce { try { - *value = detach(this->shim().MinBrightness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinBrightness()); return S_OK; } catch (...) @@ -712,7 +766,8 @@ struct produce { try { - *value = detach(this->shim().MaxBrightness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxBrightness()); return S_OK; } catch (...) @@ -725,7 +780,8 @@ struct produce { try { - *value = detach(this->shim().BrightnessStep()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrightnessStep()); return S_OK; } catch (...) @@ -738,7 +794,8 @@ struct produce { try { - *value = detach(this->shim().DefaultBrightness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultBrightness()); return S_OK; } catch (...) @@ -751,7 +808,8 @@ struct produce { try { - *value = detach(this->shim().Brightness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Brightness()); return S_OK; } catch (...) @@ -764,6 +822,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Brightness(value); return S_OK; } @@ -777,7 +836,8 @@ struct produce { try { - *value = detach(this->shim().MinContrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinContrast()); return S_OK; } catch (...) @@ -790,7 +850,8 @@ struct produce { try { - *value = detach(this->shim().MaxContrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxContrast()); return S_OK; } catch (...) @@ -803,7 +864,8 @@ struct produce { try { - *value = detach(this->shim().ContrastStep()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContrastStep()); return S_OK; } catch (...) @@ -816,7 +878,8 @@ struct produce { try { - *value = detach(this->shim().DefaultContrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultContrast()); return S_OK; } catch (...) @@ -829,7 +892,8 @@ struct produce { try { - *value = detach(this->shim().Contrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contrast()); return S_OK; } catch (...) @@ -842,6 +906,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Contrast(value); return S_OK; } @@ -855,11 +920,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -869,11 +935,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -891,426 +958,426 @@ namespace Windows::Devices::Scanners { template Windows::Devices::Scanners::ImageScannerFormat impl_IImageScannerFormatConfiguration::DefaultFormat() const { Windows::Devices::Scanners::ImageScannerFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultFormat(&value)); + check_hresult(WINRT_SHIM(IImageScannerFormatConfiguration)->get_DefaultFormat(&value)); return value; } template Windows::Devices::Scanners::ImageScannerFormat impl_IImageScannerFormatConfiguration::Format() const { Windows::Devices::Scanners::ImageScannerFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(IImageScannerFormatConfiguration)->get_Format(&value)); return value; } template void impl_IImageScannerFormatConfiguration::Format(Windows::Devices::Scanners::ImageScannerFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_Format(value)); + check_hresult(WINRT_SHIM(IImageScannerFormatConfiguration)->put_Format(value)); } template bool impl_IImageScannerFormatConfiguration::IsFormatSupported(Windows::Devices::Scanners::ImageScannerFormat value) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsFormatSupported(value, &result)); + check_hresult(WINRT_SHIM(IImageScannerFormatConfiguration)->abi_IsFormatSupported(value, &result)); return result; } template Windows::Foundation::Size impl_IImageScannerSourceConfiguration::MinScanArea() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MinScanArea(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MinScanArea(put_abi(value))); return value; } template Windows::Foundation::Size impl_IImageScannerSourceConfiguration::MaxScanArea() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxScanArea(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MaxScanArea(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IImageScannerSourceConfiguration::SelectedScanRegion() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedScanRegion(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_SelectedScanRegion(put_abi(value))); return value; } template void impl_IImageScannerSourceConfiguration::SelectedScanRegion(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedScanRegion(get(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_SelectedScanRegion(get_abi(value))); } template Windows::Devices::Scanners::ImageScannerAutoCroppingMode impl_IImageScannerSourceConfiguration::AutoCroppingMode() const { Windows::Devices::Scanners::ImageScannerAutoCroppingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoCroppingMode(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_AutoCroppingMode(&value)); return value; } template void impl_IImageScannerSourceConfiguration::AutoCroppingMode(Windows::Devices::Scanners::ImageScannerAutoCroppingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoCroppingMode(value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_AutoCroppingMode(value)); } template bool impl_IImageScannerSourceConfiguration::IsAutoCroppingModeSupported(Windows::Devices::Scanners::ImageScannerAutoCroppingMode value) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsAutoCroppingModeSupported(value, &result)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->abi_IsAutoCroppingModeSupported(value, &result)); return result; } template Windows::Devices::Scanners::ImageScannerResolution impl_IImageScannerSourceConfiguration::MinResolution() const { Windows::Devices::Scanners::ImageScannerResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_MinResolution(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MinResolution(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerResolution impl_IImageScannerSourceConfiguration::MaxResolution() const { Windows::Devices::Scanners::ImageScannerResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxResolution(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MaxResolution(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerResolution impl_IImageScannerSourceConfiguration::OpticalResolution() const { Windows::Devices::Scanners::ImageScannerResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_OpticalResolution(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_OpticalResolution(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerResolution impl_IImageScannerSourceConfiguration::DesiredResolution() const { Windows::Devices::Scanners::ImageScannerResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredResolution(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_DesiredResolution(put_abi(value))); return value; } template void impl_IImageScannerSourceConfiguration::DesiredResolution(const Windows::Devices::Scanners::ImageScannerResolution & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredResolution(get(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_DesiredResolution(get_abi(value))); } template Windows::Devices::Scanners::ImageScannerResolution impl_IImageScannerSourceConfiguration::ActualResolution() const { Windows::Devices::Scanners::ImageScannerResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualResolution(put(value))); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_ActualResolution(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerColorMode impl_IImageScannerSourceConfiguration::DefaultColorMode() const { Windows::Devices::Scanners::ImageScannerColorMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultColorMode(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_DefaultColorMode(&value)); return value; } template Windows::Devices::Scanners::ImageScannerColorMode impl_IImageScannerSourceConfiguration::ColorMode() const { Windows::Devices::Scanners::ImageScannerColorMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ColorMode(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_ColorMode(&value)); return value; } template void impl_IImageScannerSourceConfiguration::ColorMode(Windows::Devices::Scanners::ImageScannerColorMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ColorMode(value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_ColorMode(value)); } template bool impl_IImageScannerSourceConfiguration::IsColorModeSupported(Windows::Devices::Scanners::ImageScannerColorMode value) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsColorModeSupported(value, &result)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->abi_IsColorModeSupported(value, &result)); return result; } template int32_t impl_IImageScannerSourceConfiguration::MinBrightness() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinBrightness(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MinBrightness(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::MaxBrightness() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxBrightness(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MaxBrightness(&value)); return value; } template uint32_t impl_IImageScannerSourceConfiguration::BrightnessStep() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BrightnessStep(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_BrightnessStep(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::DefaultBrightness() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultBrightness(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_DefaultBrightness(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::Brightness() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Brightness(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_Brightness(&value)); return value; } template void impl_IImageScannerSourceConfiguration::Brightness(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Brightness(value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_Brightness(value)); } template int32_t impl_IImageScannerSourceConfiguration::MinContrast() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinContrast(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MinContrast(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::MaxContrast() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxContrast(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_MaxContrast(&value)); return value; } template uint32_t impl_IImageScannerSourceConfiguration::ContrastStep() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ContrastStep(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_ContrastStep(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::DefaultContrast() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultContrast(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_DefaultContrast(&value)); return value; } template int32_t impl_IImageScannerSourceConfiguration::Contrast() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Contrast(&value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->get_Contrast(&value)); return value; } template void impl_IImageScannerSourceConfiguration::Contrast(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Contrast(value)); + check_hresult(WINRT_SHIM(IImageScannerSourceConfiguration)->put_Contrast(value)); } template bool impl_IImageScannerFeederConfiguration::CanAutoDetectPageSize() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanAutoDetectPageSize(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_CanAutoDetectPageSize(&value)); return value; } template bool impl_IImageScannerFeederConfiguration::AutoDetectPageSize() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoDetectPageSize(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_AutoDetectPageSize(&value)); return value; } template void impl_IImageScannerFeederConfiguration::AutoDetectPageSize(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoDetectPageSize(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_AutoDetectPageSize(value)); } template Windows::Graphics::Printing::PrintMediaSize impl_IImageScannerFeederConfiguration::PageSize() const { Windows::Graphics::Printing::PrintMediaSize value {}; - check_hresult(static_cast(static_cast(*this))->get_PageSize(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_PageSize(&value)); return value; } template void impl_IImageScannerFeederConfiguration::PageSize(Windows::Graphics::Printing::PrintMediaSize value) const { - check_hresult(static_cast(static_cast(*this))->put_PageSize(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_PageSize(value)); } template Windows::Graphics::Printing::PrintOrientation impl_IImageScannerFeederConfiguration::PageOrientation() const { Windows::Graphics::Printing::PrintOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_PageOrientation(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_PageOrientation(&value)); return value; } template void impl_IImageScannerFeederConfiguration::PageOrientation(Windows::Graphics::Printing::PrintOrientation value) const { - check_hresult(static_cast(static_cast(*this))->put_PageOrientation(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_PageOrientation(value)); } template Windows::Foundation::Size impl_IImageScannerFeederConfiguration::PageSizeDimensions() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_PageSizeDimensions(put(value))); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_PageSizeDimensions(put_abi(value))); return value; } template bool impl_IImageScannerFeederConfiguration::IsPageSizeSupported(Windows::Graphics::Printing::PrintMediaSize pageSize, Windows::Graphics::Printing::PrintOrientation pageOrientation) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPageSizeSupported(pageSize, pageOrientation, &result)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->abi_IsPageSizeSupported(pageSize, pageOrientation, &result)); return result; } template uint32_t impl_IImageScannerFeederConfiguration::MaxNumberOfPages() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxNumberOfPages(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_MaxNumberOfPages(&value)); return value; } template void impl_IImageScannerFeederConfiguration::MaxNumberOfPages(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxNumberOfPages(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_MaxNumberOfPages(value)); } template bool impl_IImageScannerFeederConfiguration::CanScanDuplex() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanScanDuplex(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_CanScanDuplex(&value)); return value; } template bool impl_IImageScannerFeederConfiguration::Duplex() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Duplex(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_Duplex(&value)); return value; } template void impl_IImageScannerFeederConfiguration::Duplex(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Duplex(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_Duplex(value)); } template bool impl_IImageScannerFeederConfiguration::CanScanAhead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanScanAhead(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_CanScanAhead(&value)); return value; } template bool impl_IImageScannerFeederConfiguration::ScanAhead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanAhead(&value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->get_ScanAhead(&value)); return value; } template void impl_IImageScannerFeederConfiguration::ScanAhead(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ScanAhead(value)); + check_hresult(WINRT_SHIM(IImageScannerFeederConfiguration)->put_ScanAhead(value)); } template Windows::Foundation::Collections::IVectorView impl_IImageScannerScanResult::ScannedFiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ScannedFiles(put(value))); + check_hresult(WINRT_SHIM(IImageScannerScanResult)->get_ScannedFiles(put_abi(value))); return value; } template bool impl_IImageScannerPreviewResult::Succeeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Succeeded(&value)); + check_hresult(WINRT_SHIM(IImageScannerPreviewResult)->get_Succeeded(&value)); return value; } template Windows::Devices::Scanners::ImageScannerFormat impl_IImageScannerPreviewResult::Format() const { Windows::Devices::Scanners::ImageScannerFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(IImageScannerPreviewResult)->get_Format(&value)); return value; } template hstring impl_IImageScanner::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IImageScanner)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerScanSource impl_IImageScanner::DefaultScanSource() const { Windows::Devices::Scanners::ImageScannerScanSource value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultScanSource(&value)); + check_hresult(WINRT_SHIM(IImageScanner)->get_DefaultScanSource(&value)); return value; } template bool impl_IImageScanner::IsScanSourceSupported(Windows::Devices::Scanners::ImageScannerScanSource value) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsScanSourceSupported(value, &result)); + check_hresult(WINRT_SHIM(IImageScanner)->abi_IsScanSourceSupported(value, &result)); return result; } template Windows::Devices::Scanners::ImageScannerFlatbedConfiguration impl_IImageScanner::FlatbedConfiguration() const { Windows::Devices::Scanners::ImageScannerFlatbedConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlatbedConfiguration(put(value))); + check_hresult(WINRT_SHIM(IImageScanner)->get_FlatbedConfiguration(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerFeederConfiguration impl_IImageScanner::FeederConfiguration() const { Windows::Devices::Scanners::ImageScannerFeederConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FeederConfiguration(put(value))); + check_hresult(WINRT_SHIM(IImageScanner)->get_FeederConfiguration(put_abi(value))); return value; } template Windows::Devices::Scanners::ImageScannerAutoConfiguration impl_IImageScanner::AutoConfiguration() const { Windows::Devices::Scanners::ImageScannerAutoConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoConfiguration(put(value))); + check_hresult(WINRT_SHIM(IImageScanner)->get_AutoConfiguration(put_abi(value))); return value; } template bool impl_IImageScanner::IsPreviewSupported(Windows::Devices::Scanners::ImageScannerScanSource scanSource) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPreviewSupported(scanSource, &result)); + check_hresult(WINRT_SHIM(IImageScanner)->abi_IsPreviewSupported(scanSource, &result)); return result; } template Windows::Foundation::IAsyncOperation impl_IImageScanner::ScanPreviewToStreamAsync(Windows::Devices::Scanners::ImageScannerScanSource scanSource, const Windows::Storage::Streams::IRandomAccessStream & targetStream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ScanPreviewToStreamAsync(scanSource, get(targetStream), put(operation))); + check_hresult(WINRT_SHIM(IImageScanner)->abi_ScanPreviewToStreamAsync(scanSource, get_abi(targetStream), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IImageScanner::ScanFilesToFolderAsync(Windows::Devices::Scanners::ImageScannerScanSource scanSource, const Windows::Storage::StorageFolder & storageFolder) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_ScanFilesToFolderAsync(scanSource, get(storageFolder), put(operation))); + check_hresult(WINRT_SHIM(IImageScanner)->abi_ScanFilesToFolderAsync(scanSource, get_abi(storageFolder), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IImageScannerStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IImageScannerStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IImageScannerStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncInfo))); return asyncInfo; } template hstring impl_IImageScannerStatics::GetDeviceSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(selector))); + check_hresult(WINRT_SHIM(IImageScannerStatics)->abi_GetDeviceSelector(put_abi(selector))); return selector; } -inline Windows::Foundation::IAsyncOperation ImageScanner::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation ImageScanner::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -1323,3 +1390,122 @@ inline hstring ImageScanner::GetDeviceSelector() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerFeederConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerFormatConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerPreviewResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerScanResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerSourceConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::IImageScannerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScanner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScannerAutoConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScannerFeederConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScannerFlatbedConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScannerPreviewResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Scanners::ImageScannerScanResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Sensors.Custom.h b/10.0.14393.0/winrt/Windows.Devices.Sensors.Custom.h index 2259284fb..caea7d52c 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Sensors.Custom.h +++ b/10.0.14393.0/winrt/Windows.Devices.Sensors.Custom.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Sensors.Custom.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -33,7 +37,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -46,6 +51,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportInterval(value); return S_OK; } @@ -59,7 +65,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_ReadingChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -99,6 +108,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadingChanged(token); return S_OK; } @@ -112,11 +122,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -125,11 +136,12 @@ struct produce : pro } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -161,11 +174,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(GUID interfaceId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(GUID interfaceId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector(interfaceId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector(interfaceId)); return S_OK; } catch (...) @@ -175,11 +189,12 @@ struct produce : pro } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in sensorId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in sensorId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&sensorId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&sensorId))); return S_OK; } catch (...) @@ -197,54 +212,54 @@ namespace Windows::Devices::Sensors::Custom { template hstring impl_ICustomSensorStatics::GetDeviceSelector(GUID interfaceId) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(interfaceId, put(result))); + check_hresult(WINRT_SHIM(ICustomSensorStatics)->abi_GetDeviceSelector(interfaceId, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ICustomSensorStatics::FromIdAsync(hstring_ref sensorId) const +template Windows::Foundation::IAsyncOperation impl_ICustomSensorStatics::FromIdAsync(hstring_view sensorId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(sensorId), put(result))); + check_hresult(WINRT_SHIM(ICustomSensorStatics)->abi_FromIdAsync(get_abi(sensorId), put_abi(result))); return result; } template Windows::Devices::Sensors::Custom::CustomSensorReading impl_ICustomSensor::GetCurrentReading() const { Windows::Devices::Sensors::Custom::CustomSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(ICustomSensor)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_ICustomSensor::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(ICustomSensor)->get_MinimumReportInterval(&value)); return value; } template void impl_ICustomSensor::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(ICustomSensor)->put_ReportInterval(value)); } template uint32_t impl_ICustomSensor::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(ICustomSensor)->get_ReportInterval(&value)); return value; } template hstring impl_ICustomSensor::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ICustomSensor)->get_DeviceId(put_abi(value))); return value; } template event_token impl_ICustomSensor::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ICustomSensor)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -255,27 +270,27 @@ template event_revoker impl_ICustomSensor::Readin template void impl_ICustomSensor::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(ICustomSensor)->remove_ReadingChanged(token)); } template Windows::Foundation::DateTime impl_ICustomSensorReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ICustomSensorReading)->get_Timestamp(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_ICustomSensorReading::Properties() const +template Windows::Foundation::Collections::IMapView impl_ICustomSensorReading::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(ICustomSensorReading)->get_Properties(put_abi(value))); return value; } template Windows::Devices::Sensors::Custom::CustomSensorReading impl_ICustomSensorReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::Custom::CustomSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(ICustomSensorReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } @@ -284,7 +299,7 @@ inline hstring CustomSensor::GetDeviceSelector(GUID interfaceId) return get_activation_factory().GetDeviceSelector(interfaceId); } -inline Windows::Foundation::IAsyncOperation CustomSensor::FromIdAsync(hstring_ref sensorId) +inline Windows::Foundation::IAsyncOperation CustomSensor::FromIdAsync(hstring_view sensorId) { return get_activation_factory().FromIdAsync(sensorId); } @@ -292,3 +307,68 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::ICustomSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::ICustomSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::ICustomSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::ICustomSensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::CustomSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::CustomSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Custom::CustomSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Sensors.h b/10.0.14393.0/winrt/Windows.Devices.Sensors.h index 25b2ad9be..c987d0405 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Sensors.h +++ b/10.0.14393.0/winrt/Windows.Devices.Sensors.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.Display.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -48,6 +53,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -61,7 +67,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -70,11 +77,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -87,6 +95,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -96,11 +105,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Shaken(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Shaken(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Shaken(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -113,6 +123,7 @@ struct produce : produce_baseshim()); this->shim().Shaken(token); return S_OK; } @@ -130,6 +141,7 @@ struct produce : produce_baseshim()); this->shim().ReadingTransform(value); return S_OK; } @@ -143,7 +155,8 @@ struct produce : produce_baseshim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -160,6 +173,7 @@ struct produce : produce_baseshim()); this->shim().ReportLatency(value); return S_OK; } @@ -173,7 +187,8 @@ struct produce : produce_baseshim().ReportLatency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportLatency()); return S_OK; } catch (...) @@ -186,7 +201,8 @@ struct produce : produce_baseshim().MaxBatchSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxBatchSize()); return S_OK; } catch (...) @@ -203,7 +219,8 @@ struct produce : produce_baseshim().ReadingType()); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().ReadingType()); return S_OK; } catch (...) @@ -216,11 +233,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -234,11 +252,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -251,7 +270,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AccelerationX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccelerationX()); return S_OK; } catch (...) @@ -264,7 +284,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AccelerationY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccelerationY()); return S_OK; } catch (...) @@ -277,7 +298,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AccelerationZ()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccelerationZ()); return S_OK; } catch (...) @@ -290,11 +312,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -308,11 +331,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -325,11 +349,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -343,11 +368,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultWithAccelerometerReadingType(Windows::Devices::Sensors::AccelerometerReadingType readingType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultWithAccelerometerReadingType(Windows::Devices::Sensors::AccelerometerReadingType readingType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault(readingType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault(readingType)); return S_OK; } catch (...) @@ -361,11 +387,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReadingAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetCurrentReadingAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetCurrentReadingAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCurrentReadingAsync()); return S_OK; } catch (...) @@ -375,11 +402,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SubscribedActivities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SubscribedActivities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubscribedActivities()); return S_OK; } catch (...) @@ -393,7 +421,8 @@ struct produce : produce_baseshim().PowerInMilliwatts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerInMilliwatts()); return S_OK; } catch (...) @@ -402,11 +431,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -416,11 +446,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedActivities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedActivities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedActivities()); return S_OK; } catch (...) @@ -434,7 +465,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -443,11 +475,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -460,6 +493,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -473,11 +507,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -490,7 +525,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Activity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Activity()); return S_OK; } catch (...) @@ -503,7 +539,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Confidence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Confidence()); return S_OK; } catch (...) @@ -516,11 +553,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -534,11 +572,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -552,11 +591,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -566,11 +606,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -580,11 +621,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -594,11 +636,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetSystemHistoryAsync(abi_arg_in fromTime, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetSystemHistoryAsync(impl::abi_arg_in fromTime, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime))); return S_OK; } catch (...) @@ -608,11 +651,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetSystemHistoryWithDurationAsync(abi_arg_in fromTime, abi_arg_in duration, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetSystemHistoryWithDurationAsync(impl::abi_arg_in fromTime, impl::abi_arg_in duration, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -626,11 +670,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_ReadReports(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ReadReports(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReadReports()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadReports()); return S_OK; } catch (...) @@ -644,11 +689,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -658,11 +704,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -676,7 +723,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -689,6 +737,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -702,7 +751,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -711,11 +761,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -728,6 +779,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -741,11 +793,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -758,7 +811,8 @@ struct produce : produce_baseshim().AltitudeChangeInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AltitudeChangeInMeters()); return S_OK; } catch (...) @@ -771,11 +825,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -789,11 +844,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -807,11 +863,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -821,11 +878,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -839,7 +897,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -852,6 +911,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -865,7 +925,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -874,11 +935,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -891,6 +953,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -904,11 +967,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -921,7 +985,8 @@ struct produce : produce_baseshim().StationPressureInHectopascals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StationPressureInHectopascals()); return S_OK; } catch (...) @@ -934,11 +999,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -952,11 +1018,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -970,11 +1037,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -988,7 +1056,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -1001,6 +1070,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -1014,7 +1084,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -1023,11 +1094,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1040,6 +1112,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -1057,6 +1130,7 @@ struct produce : produce_baseshim()); this->shim().ReadingTransform(value); return S_OK; } @@ -1070,7 +1144,8 @@ struct produce : produce_baseshim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -1083,11 +1158,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1101,11 +1177,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1118,7 +1195,8 @@ struct produce : produce_baseshim().HeadingMagneticNorth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeadingMagneticNorth()); return S_OK; } catch (...) @@ -1127,11 +1205,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_HeadingTrueNorth(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().HeadingTrueNorth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeadingTrueNorth()); return S_OK; } catch (...) @@ -1145,11 +1224,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -1167,7 +1247,8 @@ struct produce : p { try { - *value = detach(this->shim().HeadingAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeadingAccuracy()); return S_OK; } catch (...) @@ -1180,11 +1261,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1198,11 +1280,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -1216,7 +1299,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -1229,6 +1313,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -1242,7 +1327,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -1251,11 +1337,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1268,6 +1355,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -1285,6 +1373,7 @@ struct produce : produce_baseshim()); this->shim().ReadingTransform(value); return S_OK; } @@ -1298,7 +1387,8 @@ struct produce : produce_baseshim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -1311,11 +1401,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1329,11 +1420,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1346,7 +1438,8 @@ struct produce : produce_baseshim().AngularVelocityX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AngularVelocityX()); return S_OK; } catch (...) @@ -1359,7 +1452,8 @@ struct produce : produce_baseshim().AngularVelocityY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AngularVelocityY()); return S_OK; } catch (...) @@ -1372,7 +1466,8 @@ struct produce : produce_baseshim().AngularVelocityZ()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AngularVelocityZ()); return S_OK; } catch (...) @@ -1385,11 +1480,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -1403,11 +1499,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1421,11 +1518,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -1439,7 +1537,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -1452,6 +1551,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -1465,7 +1565,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -1474,11 +1575,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1491,6 +1593,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -1508,6 +1611,7 @@ struct produce : produce_baseshim()); this->shim().ReadingTransform(value); return S_OK; } @@ -1521,7 +1625,8 @@ struct produce : produce_baseshim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -1534,7 +1639,8 @@ struct produce : produce_baseshim().ReadingType()); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().ReadingType()); return S_OK; } catch (...) @@ -1547,11 +1653,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1565,11 +1672,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1582,7 +1690,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().PitchDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PitchDegrees()); return S_OK; } catch (...) @@ -1595,7 +1704,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().RollDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RollDegrees()); return S_OK; } catch (...) @@ -1608,7 +1718,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().YawDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YawDegrees()); return S_OK; } catch (...) @@ -1621,11 +1732,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -1643,7 +1755,8 @@ struct produce : { try { - *value = detach(this->shim().YawAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YawAccuracy()); return S_OK; } catch (...) @@ -1656,11 +1769,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1674,11 +1788,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultForRelativeReadings(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultForRelativeReadings(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefaultForRelativeReadings()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultForRelativeReadings()); return S_OK; } catch (...) @@ -1692,11 +1807,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultWithSensorReadingType(Windows::Devices::Sensors::SensorReadingType sensorReadingtype, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultWithSensorReadingType(Windows::Devices::Sensors::SensorReadingType sensorReadingtype, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault(sensorReadingtype)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault(sensorReadingtype)); return S_OK; } catch (...) @@ -1710,11 +1826,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -1728,7 +1845,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -1741,6 +1859,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -1754,7 +1873,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -1763,11 +1883,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1780,6 +1901,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -1793,11 +1915,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1811,11 +1934,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1828,7 +1952,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IlluminanceInLux()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IlluminanceInLux()); return S_OK; } catch (...) @@ -1841,11 +1966,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -1859,11 +1985,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1877,11 +2004,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -1895,7 +2023,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -1908,6 +2037,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -1921,7 +2051,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -1930,11 +2061,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1947,6 +2079,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -1964,6 +2097,7 @@ struct produce : produce_baseshim()); this->shim().ReadingTransform(value); return S_OK; } @@ -1977,7 +2111,8 @@ struct produce : produce_baseshim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -1990,11 +2125,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2008,11 +2144,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2025,7 +2162,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MagneticFieldX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MagneticFieldX()); return S_OK; } catch (...) @@ -2038,7 +2176,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MagneticFieldY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MagneticFieldY()); return S_OK; } catch (...) @@ -2051,7 +2190,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MagneticFieldZ()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MagneticFieldZ()); return S_OK; } catch (...) @@ -2064,7 +2204,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().DirectionalAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DirectionalAccuracy()); return S_OK; } catch (...) @@ -2077,11 +2218,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -2095,11 +2237,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -2113,11 +2256,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -2131,7 +2275,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -2144,6 +2289,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportInterval(value); return S_OK; } @@ -2157,7 +2303,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -2166,11 +2313,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_ReadingChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2183,6 +2331,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadingChanged(token); return S_OK; } @@ -2200,6 +2349,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadingTransform(value); return S_OK; } @@ -2213,7 +2363,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -2226,7 +2377,8 @@ struct produce : produce_base { try { - *type = detach(this->shim().ReadingType()); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().ReadingType()); return S_OK; } catch (...) @@ -2239,11 +2391,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2257,11 +2410,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2270,11 +2424,12 @@ struct produce : produc } } - HRESULT __stdcall get_RotationMatrix(abi_arg_out value) noexcept override + HRESULT __stdcall get_RotationMatrix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RotationMatrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationMatrix()); return S_OK; } catch (...) @@ -2284,11 +2439,12 @@ struct produce : produc } } - HRESULT __stdcall get_Quaternion(abi_arg_out value) noexcept override + HRESULT __stdcall get_Quaternion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Quaternion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Quaternion()); return S_OK; } catch (...) @@ -2302,11 +2458,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -2324,7 +2481,8 @@ struct produceshim().YawAccuracy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YawAccuracy()); return S_OK; } catch (...) @@ -2337,11 +2495,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -2355,11 +2514,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultForRelativeReadings(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultForRelativeReadings(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefaultForRelativeReadings()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultForRelativeReadings()); return S_OK; } catch (...) @@ -2373,11 +2533,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultWithSensorReadingType(Windows::Devices::Sensors::SensorReadingType sensorReadingtype, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultWithSensorReadingType(Windows::Devices::Sensors::SensorReadingType sensorReadingtype, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault(sensorReadingtype)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault(sensorReadingtype)); return S_OK; } catch (...) @@ -2387,11 +2548,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(Windows::Devices::Sensors::SensorReadingType sensorReadingType, Windows::Devices::Sensors::SensorOptimizationGoal optimizationGoal, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(Windows::Devices::Sensors::SensorReadingType sensorReadingType, Windows::Devices::Sensors::SensorOptimizationGoal optimizationGoal, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault(sensorReadingType, optimizationGoal)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault(sensorReadingType, optimizationGoal)); return S_OK; } catch (...) @@ -2405,11 +2567,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2423,7 +2586,8 @@ struct produce : produce_baseshim().PowerInMilliwatts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerInMilliwatts()); return S_OK; } catch (...) @@ -2436,7 +2600,8 @@ struct produce : produce_baseshim().MinimumReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumReportInterval()); return S_OK; } catch (...) @@ -2449,6 +2614,7 @@ struct produce : produce_baseshim()); this->shim().ReportInterval(value); return S_OK; } @@ -2462,7 +2628,8 @@ struct produce : produce_baseshim().ReportInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReportInterval()); return S_OK; } catch (...) @@ -2471,11 +2638,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2488,6 +2656,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -2501,11 +2670,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReadings(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetCurrentReadings(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetCurrentReadings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReadings()); return S_OK; } catch (...) @@ -2519,11 +2689,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in sensor, int32_t stepGoal, abi_arg_out threshold) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in sensor, int32_t stepGoal, impl::abi_arg_out threshold) noexcept override { try { - *threshold = detach(this->shim().Create(*reinterpret_cast(&sensor), stepGoal)); + typename D::abi_guard guard(this->shim()); + *threshold = detach_abi(this->shim().Create(*reinterpret_cast(&sensor), stepGoal)); return S_OK; } catch (...) @@ -2541,7 +2712,8 @@ struct produce : produce_baseshim().StepKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StepKind()); return S_OK; } catch (...) @@ -2554,7 +2726,8 @@ struct produce : produce_baseshim().CumulativeSteps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CumulativeSteps()); return S_OK; } catch (...) @@ -2563,11 +2736,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2576,11 +2750,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CumulativeStepsDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CumulativeStepsDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CumulativeStepsDuration()); return S_OK; } catch (...) @@ -2593,11 +2768,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -2611,11 +2787,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -2625,11 +2802,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -2639,11 +2817,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -2653,11 +2832,12 @@ struct produce : produce_base fromTime, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetSystemHistoryAsync(impl::abi_arg_in fromTime, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime))); return S_OK; } catch (...) @@ -2667,11 +2847,12 @@ struct produce : produce_base fromTime, abi_arg_in duration, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetSystemHistoryWithDurationAsync(impl::abi_arg_in fromTime, impl::abi_arg_in duration, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime), *reinterpret_cast(&duration))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSystemHistoryAsync(*reinterpret_cast(&fromTime), *reinterpret_cast(&duration))); return S_OK; } catch (...) @@ -2685,11 +2866,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetReadingsFromTriggerDetails(abi_arg_in triggerDetails, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetReadingsFromTriggerDetails(impl::abi_arg_in triggerDetails, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetReadingsFromTriggerDetails(*reinterpret_cast(&triggerDetails))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetReadingsFromTriggerDetails(*reinterpret_cast(&triggerDetails))); return S_OK; } catch (...) @@ -2703,11 +2885,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2717,11 +2900,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_MaxDistanceInMillimeters(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxDistanceInMillimeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDistanceInMillimeters()); return S_OK; } catch (...) @@ -2731,11 +2915,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_MinDistanceInMillimeters(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MinDistanceInMillimeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDistanceInMillimeters()); return S_OK; } catch (...) @@ -2745,11 +2930,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -2759,11 +2945,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReadingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReadingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2776,6 +2963,7 @@ struct produce : produce_baseshim()); this->shim().ReadingChanged(token); return S_OK; } @@ -2785,11 +2973,12 @@ struct produce : produce_base controller) noexcept override + HRESULT __stdcall abi_CreateDisplayOnOffController(impl::abi_arg_out controller) noexcept override { try { - *controller = detach(this->shim().CreateDisplayOnOffController()); + typename D::abi_guard guard(this->shim()); + *controller = detach_abi(this->shim().CreateDisplayOnOffController()); return S_OK; } catch (...) @@ -2803,11 +2992,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in sensor, abi_arg_out threshold) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in sensor, impl::abi_arg_out threshold) noexcept override { try { - *threshold = detach(this->shim().Create(*reinterpret_cast(&sensor))); + typename D::abi_guard guard(this->shim()); + *threshold = detach_abi(this->shim().Create(*reinterpret_cast(&sensor))); return S_OK; } catch (...) @@ -2821,11 +3011,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2838,7 +3029,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsDetected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDetected()); return S_OK; } catch (...) @@ -2847,11 +3039,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DistanceInMillimeters(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DistanceInMillimeters(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DistanceInMillimeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistanceInMillimeters()); return S_OK; } catch (...) @@ -2865,11 +3058,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Reading(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reading()); return S_OK; } catch (...) @@ -2883,11 +3077,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -2897,11 +3092,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FromId(abi_arg_in sensorId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in sensorId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FromId(*reinterpret_cast(&sensorId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromId(*reinterpret_cast(&sensorId))); return S_OK; } catch (...) @@ -2915,11 +3111,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetReadingsFromTriggerDetails(abi_arg_in triggerDetails, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetReadingsFromTriggerDetails(impl::abi_arg_in triggerDetails, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetReadingsFromTriggerDetails(*reinterpret_cast(&triggerDetails))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetReadingsFromTriggerDetails(*reinterpret_cast(&triggerDetails))); return S_OK; } catch (...) @@ -2937,11 +3134,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2955,7 +3153,8 @@ struct produce { try { - *value = detach(this->shim().SensorType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SensorType()); return S_OK; } catch (...) @@ -2972,7 +3171,8 @@ struct produce : produce_baseshim().W()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().W()); return S_OK; } catch (...) @@ -2985,7 +3185,8 @@ struct produce : produce_baseshim().X()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X()); return S_OK; } catch (...) @@ -2998,7 +3199,8 @@ struct produce : produce_baseshim().Y()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Y()); return S_OK; } catch (...) @@ -3011,7 +3213,8 @@ struct produce : produce_baseshim().Z()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Z()); return S_OK; } catch (...) @@ -3028,7 +3231,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M11()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M11()); return S_OK; } catch (...) @@ -3041,7 +3245,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M12()); return S_OK; } catch (...) @@ -3054,7 +3259,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M13()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M13()); return S_OK; } catch (...) @@ -3067,7 +3273,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M21()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M21()); return S_OK; } catch (...) @@ -3080,7 +3287,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M22()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M22()); return S_OK; } catch (...) @@ -3093,7 +3301,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M23()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M23()); return S_OK; } catch (...) @@ -3106,7 +3315,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M31()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M31()); return S_OK; } catch (...) @@ -3119,7 +3329,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M32()); return S_OK; } catch (...) @@ -3132,7 +3343,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().M33()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().M33()); return S_OK; } catch (...) @@ -3149,7 +3361,8 @@ struct produce : produce { try { - *value = detach(this->shim().GetCurrentOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentOrientation()); return S_OK; } catch (...) @@ -3158,11 +3371,12 @@ struct produce : produce } } - HRESULT __stdcall add_OrientationChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OrientationChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OrientationChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OrientationChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3175,6 +3389,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OrientationChanged(token); return S_OK; } @@ -3192,6 +3407,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadingTransform(value); return S_OK; } @@ -3205,7 +3421,8 @@ struct produce : produc { try { - *value = detach(this->shim().ReadingTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadingTransform()); return S_OK; } catch (...) @@ -3218,11 +3435,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -3236,11 +3454,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -3253,7 +3472,8 @@ struct produceshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -3266,11 +3486,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -3288,68 +3509,68 @@ namespace Windows::Devices::Sensors { template hstring impl_ISensorDataThresholdTriggerDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISensorDataThresholdTriggerDetails)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::SensorType impl_ISensorDataThresholdTriggerDetails::SensorType() const { Windows::Devices::Sensors::SensorType value {}; - check_hresult(static_cast(static_cast(*this))->get_SensorType(&value)); + check_hresult(WINRT_SHIM(ISensorDataThresholdTriggerDetails)->get_SensorType(&value)); return value; } template hstring impl_IAccelerometerDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IAccelerometerDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::Accelerometer impl_IAccelerometerStatics::GetDefault() const { Windows::Devices::Sensors::Accelerometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IAccelerometerStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::Accelerometer impl_IAccelerometerStatics2::GetDefault(Windows::Devices::Sensors::AccelerometerReadingType readingType) const { Windows::Devices::Sensors::Accelerometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultWithAccelerometerReadingType(readingType, put(result))); + check_hresult(WINRT_SHIM(IAccelerometerStatics2)->abi_GetDefaultWithAccelerometerReadingType(readingType, put_abi(result))); return result; } template Windows::Devices::Sensors::AccelerometerReading impl_IAccelerometer::GetCurrentReading() const { Windows::Devices::Sensors::AccelerometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IAccelerometer)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_IAccelerometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IAccelerometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IAccelerometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IAccelerometer)->put_ReportInterval(value)); } template uint32_t impl_IAccelerometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IAccelerometer)->get_ReportInterval(&value)); return value; } template event_token impl_IAccelerometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAccelerometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -3360,13 +3581,13 @@ template event_revoker impl_IAccelerometer::Read template void impl_IAccelerometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IAccelerometer)->remove_ReadingChanged(token)); } template event_token impl_IAccelerometer::Shaken(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Shaken(get(handler), &token)); + check_hresult(WINRT_SHIM(IAccelerometer)->add_Shaken(get_abi(handler), &token)); return token; } @@ -3377,147 +3598,147 @@ template event_revoker impl_IAccelerometer::Shak template void impl_IAccelerometer::Shaken(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Shaken(token)); + check_hresult(WINRT_SHIM(IAccelerometer)->remove_Shaken(token)); } template void impl_IAccelerometer2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(IAccelerometer2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_IAccelerometer2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(IAccelerometer2)->get_ReadingTransform(&value)); return value; } template void impl_IAccelerometer3::ReportLatency(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportLatency(value)); + check_hresult(WINRT_SHIM(IAccelerometer3)->put_ReportLatency(value)); } template uint32_t impl_IAccelerometer3::ReportLatency() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportLatency(&value)); + check_hresult(WINRT_SHIM(IAccelerometer3)->get_ReportLatency(&value)); return value; } template uint32_t impl_IAccelerometer3::MaxBatchSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxBatchSize(&value)); + check_hresult(WINRT_SHIM(IAccelerometer3)->get_MaxBatchSize(&value)); return value; } template Windows::Devices::Sensors::AccelerometerReadingType impl_IAccelerometer4::ReadingType() const { Windows::Devices::Sensors::AccelerometerReadingType type {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingType(&type)); + check_hresult(WINRT_SHIM(IAccelerometer4)->get_ReadingType(&type)); return type; } template Windows::Foundation::DateTime impl_IAccelerometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IAccelerometerReading)->get_Timestamp(put_abi(value))); return value; } template double impl_IAccelerometerReading::AccelerationX() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AccelerationX(&value)); + check_hresult(WINRT_SHIM(IAccelerometerReading)->get_AccelerationX(&value)); return value; } template double impl_IAccelerometerReading::AccelerationY() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AccelerationY(&value)); + check_hresult(WINRT_SHIM(IAccelerometerReading)->get_AccelerationY(&value)); return value; } template double impl_IAccelerometerReading::AccelerationZ() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AccelerationZ(&value)); + check_hresult(WINRT_SHIM(IAccelerometerReading)->get_AccelerationZ(&value)); return value; } template Windows::Devices::Sensors::AccelerometerReading impl_IAccelerometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::AccelerometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IAccelerometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAccelerometerShakenEventArgs::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IAccelerometerShakenEventArgs)->get_Timestamp(put_abi(value))); return value; } template hstring impl_IInclinometerDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IInclinometerDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::Inclinometer impl_IInclinometerStatics::GetDefault() const { Windows::Devices::Sensors::Inclinometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IInclinometerStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::Inclinometer impl_IInclinometerStatics2::GetDefaultForRelativeReadings() const { Windows::Devices::Sensors::Inclinometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultForRelativeReadings(put(result))); + check_hresult(WINRT_SHIM(IInclinometerStatics2)->abi_GetDefaultForRelativeReadings(put_abi(result))); return result; } template Windows::Devices::Sensors::Inclinometer impl_IInclinometerStatics3::GetDefault(Windows::Devices::Sensors::SensorReadingType sensorReadingtype) const { Windows::Devices::Sensors::Inclinometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultWithSensorReadingType(sensorReadingtype, put(result))); + check_hresult(WINRT_SHIM(IInclinometerStatics3)->abi_GetDefaultWithSensorReadingType(sensorReadingtype, put_abi(result))); return result; } template Windows::Devices::Sensors::InclinometerReading impl_IInclinometer::GetCurrentReading() const { Windows::Devices::Sensors::InclinometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IInclinometer)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_IInclinometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IInclinometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IInclinometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IInclinometer)->put_ReportInterval(value)); } template uint32_t impl_IInclinometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IInclinometer)->get_ReportInterval(&value)); return value; } template event_token impl_IInclinometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IInclinometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -3528,114 +3749,114 @@ template event_revoker impl_IInclinometer::Readin template void impl_IInclinometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IInclinometer)->remove_ReadingChanged(token)); } template void impl_IInclinometer2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(IInclinometer2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_IInclinometer2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(IInclinometer2)->get_ReadingTransform(&value)); return value; } template Windows::Devices::Sensors::SensorReadingType impl_IInclinometer2::ReadingType() const { Windows::Devices::Sensors::SensorReadingType type {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingType(&type)); + check_hresult(WINRT_SHIM(IInclinometer2)->get_ReadingType(&type)); return type; } template Windows::Foundation::DateTime impl_IInclinometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IInclinometerReading)->get_Timestamp(put_abi(value))); return value; } template float impl_IInclinometerReading::PitchDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PitchDegrees(&value)); + check_hresult(WINRT_SHIM(IInclinometerReading)->get_PitchDegrees(&value)); return value; } template float impl_IInclinometerReading::RollDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RollDegrees(&value)); + check_hresult(WINRT_SHIM(IInclinometerReading)->get_RollDegrees(&value)); return value; } template float impl_IInclinometerReading::YawDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_YawDegrees(&value)); + check_hresult(WINRT_SHIM(IInclinometerReading)->get_YawDegrees(&value)); return value; } template Windows::Devices::Sensors::MagnetometerAccuracy impl_IInclinometerReadingYawAccuracy::YawAccuracy() const { Windows::Devices::Sensors::MagnetometerAccuracy value {}; - check_hresult(static_cast(static_cast(*this))->get_YawAccuracy(&value)); + check_hresult(WINRT_SHIM(IInclinometerReadingYawAccuracy)->get_YawAccuracy(&value)); return value; } template Windows::Devices::Sensors::InclinometerReading impl_IInclinometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::InclinometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IInclinometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template hstring impl_IGyrometerDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IGyrometerDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::Gyrometer impl_IGyrometerStatics::GetDefault() const { Windows::Devices::Sensors::Gyrometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IGyrometerStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::GyrometerReading impl_IGyrometer::GetCurrentReading() const { Windows::Devices::Sensors::GyrometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IGyrometer)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_IGyrometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IGyrometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IGyrometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IGyrometer)->put_ReportInterval(value)); } template uint32_t impl_IGyrometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IGyrometer)->get_ReportInterval(&value)); return value; } template event_token impl_IGyrometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGyrometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -3646,100 +3867,100 @@ template event_revoker impl_IGyrometer::ReadingChang template void impl_IGyrometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IGyrometer)->remove_ReadingChanged(token)); } template void impl_IGyrometer2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(IGyrometer2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_IGyrometer2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(IGyrometer2)->get_ReadingTransform(&value)); return value; } template Windows::Foundation::DateTime impl_IGyrometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IGyrometerReading)->get_Timestamp(put_abi(value))); return value; } template double impl_IGyrometerReading::AngularVelocityX() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AngularVelocityX(&value)); + check_hresult(WINRT_SHIM(IGyrometerReading)->get_AngularVelocityX(&value)); return value; } template double impl_IGyrometerReading::AngularVelocityY() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AngularVelocityY(&value)); + check_hresult(WINRT_SHIM(IGyrometerReading)->get_AngularVelocityY(&value)); return value; } template double impl_IGyrometerReading::AngularVelocityZ() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AngularVelocityZ(&value)); + check_hresult(WINRT_SHIM(IGyrometerReading)->get_AngularVelocityZ(&value)); return value; } template Windows::Devices::Sensors::GyrometerReading impl_IGyrometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::GyrometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IGyrometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template hstring impl_ICompassDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ICompassDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::Compass impl_ICompassStatics::GetDefault() const { Windows::Devices::Sensors::Compass result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(ICompassStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::CompassReading impl_ICompass::GetCurrentReading() const { Windows::Devices::Sensors::CompassReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(ICompass)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_ICompass::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(ICompass)->get_MinimumReportInterval(&value)); return value; } template void impl_ICompass::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(ICompass)->put_ReportInterval(value)); } template uint32_t impl_ICompass::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(ICompass)->get_ReportInterval(&value)); return value; } template event_token impl_ICompass::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ICompass)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -3750,100 +3971,100 @@ template event_revoker impl_ICompass::ReadingChanged(a template void impl_ICompass::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(ICompass)->remove_ReadingChanged(token)); } template void impl_ICompass2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(ICompass2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_ICompass2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(ICompass2)->get_ReadingTransform(&value)); return value; } template Windows::Foundation::DateTime impl_ICompassReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ICompassReading)->get_Timestamp(put_abi(value))); return value; } template double impl_ICompassReading::HeadingMagneticNorth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HeadingMagneticNorth(&value)); + check_hresult(WINRT_SHIM(ICompassReading)->get_HeadingMagneticNorth(&value)); return value; } template Windows::Foundation::IReference impl_ICompassReading::HeadingTrueNorth() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_HeadingTrueNorth(put(value))); + check_hresult(WINRT_SHIM(ICompassReading)->get_HeadingTrueNorth(put_abi(value))); return value; } template Windows::Devices::Sensors::MagnetometerAccuracy impl_ICompassReadingHeadingAccuracy::HeadingAccuracy() const { Windows::Devices::Sensors::MagnetometerAccuracy value {}; - check_hresult(static_cast(static_cast(*this))->get_HeadingAccuracy(&value)); + check_hresult(WINRT_SHIM(ICompassReadingHeadingAccuracy)->get_HeadingAccuracy(&value)); return value; } template Windows::Devices::Sensors::CompassReading impl_ICompassReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::CompassReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(ICompassReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template hstring impl_ILightSensorDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ILightSensorDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::LightSensor impl_ILightSensorStatics::GetDefault() const { Windows::Devices::Sensors::LightSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(ILightSensorStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::LightSensorReading impl_ILightSensor::GetCurrentReading() const { Windows::Devices::Sensors::LightSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(ILightSensor)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_ILightSensor::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(ILightSensor)->get_MinimumReportInterval(&value)); return value; } template void impl_ILightSensor::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(ILightSensor)->put_ReportInterval(value)); } template uint32_t impl_ILightSensor::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(ILightSensor)->get_ReportInterval(&value)); return value; } template event_token impl_ILightSensor::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ILightSensor)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -3854,186 +4075,186 @@ template event_revoker impl_ILightSensor::ReadingC template void impl_ILightSensor::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(ILightSensor)->remove_ReadingChanged(token)); } template Windows::Foundation::DateTime impl_ILightSensorReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ILightSensorReading)->get_Timestamp(put_abi(value))); return value; } template float impl_ILightSensorReading::IlluminanceInLux() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_IlluminanceInLux(&value)); + check_hresult(WINRT_SHIM(ILightSensorReading)->get_IlluminanceInLux(&value)); return value; } template Windows::Devices::Sensors::LightSensorReading impl_ILightSensorReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::LightSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(ILightSensorReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template float impl_ISensorRotationMatrix::M11() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M11(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M11(&value)); return value; } template float impl_ISensorRotationMatrix::M12() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M12(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M12(&value)); return value; } template float impl_ISensorRotationMatrix::M13() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M13(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M13(&value)); return value; } template float impl_ISensorRotationMatrix::M21() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M21(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M21(&value)); return value; } template float impl_ISensorRotationMatrix::M22() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M22(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M22(&value)); return value; } template float impl_ISensorRotationMatrix::M23() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M23(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M23(&value)); return value; } template float impl_ISensorRotationMatrix::M31() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M31(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M31(&value)); return value; } template float impl_ISensorRotationMatrix::M32() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M32(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M32(&value)); return value; } template float impl_ISensorRotationMatrix::M33() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_M33(&value)); + check_hresult(WINRT_SHIM(ISensorRotationMatrix)->get_M33(&value)); return value; } template float impl_ISensorQuaternion::W() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_W(&value)); + check_hresult(WINRT_SHIM(ISensorQuaternion)->get_W(&value)); return value; } template float impl_ISensorQuaternion::X() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_X(&value)); + check_hresult(WINRT_SHIM(ISensorQuaternion)->get_X(&value)); return value; } template float impl_ISensorQuaternion::Y() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Y(&value)); + check_hresult(WINRT_SHIM(ISensorQuaternion)->get_Y(&value)); return value; } template float impl_ISensorQuaternion::Z() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Z(&value)); + check_hresult(WINRT_SHIM(ISensorQuaternion)->get_Z(&value)); return value; } template hstring impl_IOrientationSensorDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensorDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::OrientationSensor impl_IOrientationSensorStatics::GetDefault() const { Windows::Devices::Sensors::OrientationSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IOrientationSensorStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::OrientationSensor impl_IOrientationSensorStatics2::GetDefaultForRelativeReadings() const { Windows::Devices::Sensors::OrientationSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultForRelativeReadings(put(result))); + check_hresult(WINRT_SHIM(IOrientationSensorStatics2)->abi_GetDefaultForRelativeReadings(put_abi(result))); return result; } template Windows::Devices::Sensors::OrientationSensor impl_IOrientationSensorStatics3::GetDefault(Windows::Devices::Sensors::SensorReadingType sensorReadingtype) const { Windows::Devices::Sensors::OrientationSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultWithSensorReadingType(sensorReadingtype, put(result))); + check_hresult(WINRT_SHIM(IOrientationSensorStatics3)->abi_GetDefaultWithSensorReadingType(sensorReadingtype, put_abi(result))); return result; } template Windows::Devices::Sensors::OrientationSensor impl_IOrientationSensorStatics3::GetDefault(Windows::Devices::Sensors::SensorReadingType sensorReadingType, Windows::Devices::Sensors::SensorOptimizationGoal optimizationGoal) const { Windows::Devices::Sensors::OrientationSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(sensorReadingType, optimizationGoal, put(result))); + check_hresult(WINRT_SHIM(IOrientationSensorStatics3)->abi_GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(sensorReadingType, optimizationGoal, put_abi(result))); return result; } template Windows::Devices::Sensors::OrientationSensorReading impl_IOrientationSensor::GetCurrentReading() const { Windows::Devices::Sensors::OrientationSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensor)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_IOrientationSensor::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IOrientationSensor)->get_MinimumReportInterval(&value)); return value; } template void impl_IOrientationSensor::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IOrientationSensor)->put_ReportInterval(value)); } template uint32_t impl_IOrientationSensor::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IOrientationSensor)->get_ReportInterval(&value)); return value; } template event_token impl_IOrientationSensor::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IOrientationSensor)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4044,88 +4265,88 @@ template event_revoker impl_IOrientationSensor< template void impl_IOrientationSensor::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IOrientationSensor)->remove_ReadingChanged(token)); } template void impl_IOrientationSensor2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(IOrientationSensor2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_IOrientationSensor2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(IOrientationSensor2)->get_ReadingTransform(&value)); return value; } template Windows::Devices::Sensors::SensorReadingType impl_IOrientationSensor2::ReadingType() const { Windows::Devices::Sensors::SensorReadingType type {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingType(&type)); + check_hresult(WINRT_SHIM(IOrientationSensor2)->get_ReadingType(&type)); return type; } template Windows::Foundation::DateTime impl_IOrientationSensorReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensorReading)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Sensors::SensorRotationMatrix impl_IOrientationSensorReading::RotationMatrix() const { Windows::Devices::Sensors::SensorRotationMatrix value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RotationMatrix(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensorReading)->get_RotationMatrix(put_abi(value))); return value; } template Windows::Devices::Sensors::SensorQuaternion impl_IOrientationSensorReading::Quaternion() const { Windows::Devices::Sensors::SensorQuaternion value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Quaternion(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensorReading)->get_Quaternion(put_abi(value))); return value; } template Windows::Devices::Sensors::MagnetometerAccuracy impl_IOrientationSensorReadingYawAccuracy::YawAccuracy() const { Windows::Devices::Sensors::MagnetometerAccuracy value {}; - check_hresult(static_cast(static_cast(*this))->get_YawAccuracy(&value)); + check_hresult(WINRT_SHIM(IOrientationSensorReadingYawAccuracy)->get_YawAccuracy(&value)); return value; } template Windows::Devices::Sensors::OrientationSensorReading impl_IOrientationSensorReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::OrientationSensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IOrientationSensorReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template hstring impl_ISimpleOrientationSensorDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISimpleOrientationSensorDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::SimpleOrientationSensor impl_ISimpleOrientationSensorStatics::GetDefault() const { Windows::Devices::Sensors::SimpleOrientationSensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(ISimpleOrientationSensorStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::SimpleOrientation impl_ISimpleOrientationSensor::GetCurrentOrientation() const { Windows::Devices::Sensors::SimpleOrientation value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentOrientation(&value)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensor)->abi_GetCurrentOrientation(&value)); return value; } template event_token impl_ISimpleOrientationSensor::OrientationChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OrientationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensor)->add_OrientationChanged(get_abi(handler), &token)); return token; } @@ -4136,79 +4357,79 @@ template event_revoker impl_ISimpleOrient template void impl_ISimpleOrientationSensor::OrientationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OrientationChanged(token)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensor)->remove_OrientationChanged(token)); } template void impl_ISimpleOrientationSensor2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensor2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_ISimpleOrientationSensor2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensor2)->get_ReadingTransform(&value)); return value; } template Windows::Foundation::DateTime impl_ISimpleOrientationSensorOrientationChangedEventArgs::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISimpleOrientationSensorOrientationChangedEventArgs)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Sensors::SimpleOrientation impl_ISimpleOrientationSensorOrientationChangedEventArgs::Orientation() const { Windows::Devices::Sensors::SimpleOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(ISimpleOrientationSensorOrientationChangedEventArgs)->get_Orientation(&value)); return value; } template hstring impl_IMagnetometerDeviceId::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMagnetometerDeviceId)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sensors::Magnetometer impl_IMagnetometerStatics::GetDefault() const { Windows::Devices::Sensors::Magnetometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IMagnetometerStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::MagnetometerReading impl_IMagnetometer::GetCurrentReading() const { Windows::Devices::Sensors::MagnetometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IMagnetometer)->abi_GetCurrentReading(put_abi(value))); return value; } template uint32_t impl_IMagnetometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IMagnetometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IMagnetometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IMagnetometer)->put_ReportInterval(value)); } template uint32_t impl_IMagnetometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IMagnetometer)->get_ReportInterval(&value)); return value; } template event_token impl_IMagnetometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMagnetometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4219,144 +4440,144 @@ template event_revoker impl_IMagnetometer::Readin template void impl_IMagnetometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IMagnetometer)->remove_ReadingChanged(token)); } template void impl_IMagnetometer2::ReadingTransform(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadingTransform(value)); + check_hresult(WINRT_SHIM(IMagnetometer2)->put_ReadingTransform(value)); } template Windows::Graphics::Display::DisplayOrientations impl_IMagnetometer2::ReadingTransform() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadingTransform(&value)); + check_hresult(WINRT_SHIM(IMagnetometer2)->get_ReadingTransform(&value)); return value; } template Windows::Foundation::DateTime impl_IMagnetometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IMagnetometerReading)->get_Timestamp(put_abi(value))); return value; } template float impl_IMagnetometerReading::MagneticFieldX() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MagneticFieldX(&value)); + check_hresult(WINRT_SHIM(IMagnetometerReading)->get_MagneticFieldX(&value)); return value; } template float impl_IMagnetometerReading::MagneticFieldY() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MagneticFieldY(&value)); + check_hresult(WINRT_SHIM(IMagnetometerReading)->get_MagneticFieldY(&value)); return value; } template float impl_IMagnetometerReading::MagneticFieldZ() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MagneticFieldZ(&value)); + check_hresult(WINRT_SHIM(IMagnetometerReading)->get_MagneticFieldZ(&value)); return value; } template Windows::Devices::Sensors::MagnetometerAccuracy impl_IMagnetometerReading::DirectionalAccuracy() const { Windows::Devices::Sensors::MagnetometerAccuracy value {}; - check_hresult(static_cast(static_cast(*this))->get_DirectionalAccuracy(&value)); + check_hresult(WINRT_SHIM(IMagnetometerReading)->get_DirectionalAccuracy(&value)); return value; } template Windows::Devices::Sensors::MagnetometerReading impl_IMagnetometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::MagnetometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IMagnetometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IActivitySensorStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(IActivitySensorStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } template hstring impl_IActivitySensorStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IActivitySensorStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IActivitySensorStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(IActivitySensorStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IActivitySensorStatics::GetSystemHistoryAsync(const Windows::Foundation::DateTime & fromTime) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemHistoryAsync(get(fromTime), put(result))); + check_hresult(WINRT_SHIM(IActivitySensorStatics)->abi_GetSystemHistoryAsync(get_abi(fromTime), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IActivitySensorStatics::GetSystemHistoryAsync(const Windows::Foundation::DateTime & fromTime, const Windows::Foundation::TimeSpan & duration) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemHistoryWithDurationAsync(get(fromTime), get(duration), put(result))); + check_hresult(WINRT_SHIM(IActivitySensorStatics)->abi_GetSystemHistoryWithDurationAsync(get_abi(fromTime), get_abi(duration), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IActivitySensor::GetCurrentReadingAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReadingAsync(put(result))); + check_hresult(WINRT_SHIM(IActivitySensor)->abi_GetCurrentReadingAsync(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IActivitySensor::SubscribedActivities() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SubscribedActivities(put(value))); + check_hresult(WINRT_SHIM(IActivitySensor)->get_SubscribedActivities(put_abi(value))); return value; } template double impl_IActivitySensor::PowerInMilliwatts() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerInMilliwatts(&value)); + check_hresult(WINRT_SHIM(IActivitySensor)->get_PowerInMilliwatts(&value)); return value; } template hstring impl_IActivitySensor::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IActivitySensor)->get_DeviceId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IActivitySensor::SupportedActivities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedActivities(put(value))); + check_hresult(WINRT_SHIM(IActivitySensor)->get_SupportedActivities(put_abi(value))); return value; } template uint32_t impl_IActivitySensor::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IActivitySensor)->get_MinimumReportInterval(&value)); return value; } template event_token impl_IActivitySensor::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IActivitySensor)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4367,95 +4588,95 @@ template event_revoker impl_IActivitySensor::Re template void impl_IActivitySensor::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IActivitySensor)->remove_ReadingChanged(token)); } template Windows::Foundation::DateTime impl_IActivitySensorReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorReading)->get_Timestamp(put_abi(value))); return value; } template Windows::Devices::Sensors::ActivityType impl_IActivitySensorReading::Activity() const { Windows::Devices::Sensors::ActivityType value {}; - check_hresult(static_cast(static_cast(*this))->get_Activity(&value)); + check_hresult(WINRT_SHIM(IActivitySensorReading)->get_Activity(&value)); return value; } template Windows::Devices::Sensors::ActivitySensorReadingConfidence impl_IActivitySensorReading::Confidence() const { Windows::Devices::Sensors::ActivitySensorReadingConfidence value {}; - check_hresult(static_cast(static_cast(*this))->get_Confidence(&value)); + check_hresult(WINRT_SHIM(IActivitySensorReading)->get_Confidence(&value)); return value; } template Windows::Devices::Sensors::ActivitySensorReading impl_IActivitySensorReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::ActivitySensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template Windows::Devices::Sensors::ActivitySensorReading impl_IActivitySensorReadingChangeReport::Reading() const { Windows::Devices::Sensors::ActivitySensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorReadingChangeReport)->get_Reading(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IActivitySensorTriggerDetails::ReadReports() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_ReadReports(put(value))); + check_hresult(WINRT_SHIM(IActivitySensorTriggerDetails)->abi_ReadReports(put_abi(value))); return value; } template Windows::Devices::Sensors::Barometer impl_IBarometerStatics::GetDefault() const { Windows::Devices::Sensors::Barometer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IBarometerStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::BarometerReading impl_IBarometer::GetCurrentReading() const { Windows::Devices::Sensors::BarometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IBarometer)->abi_GetCurrentReading(put_abi(value))); return value; } template hstring impl_IBarometer::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IBarometer)->get_DeviceId(put_abi(value))); return value; } template uint32_t impl_IBarometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IBarometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IBarometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IBarometer)->put_ReportInterval(value)); } template uint32_t impl_IBarometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IBarometer)->get_ReportInterval(&value)); return value; } template event_token impl_IBarometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IBarometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4466,151 +4687,151 @@ template event_revoker impl_IBarometer::ReadingChang template void impl_IBarometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IBarometer)->remove_ReadingChanged(token)); } template Windows::Foundation::DateTime impl_IBarometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IBarometerReading)->get_Timestamp(put_abi(value))); return value; } template double impl_IBarometerReading::StationPressureInHectopascals() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_StationPressureInHectopascals(&value)); + check_hresult(WINRT_SHIM(IBarometerReading)->get_StationPressureInHectopascals(&value)); return value; } template Windows::Devices::Sensors::BarometerReading impl_IBarometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::BarometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IBarometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template Windows::Devices::Sensors::PedometerStepKind impl_IPedometerReading::StepKind() const { Windows::Devices::Sensors::PedometerStepKind value {}; - check_hresult(static_cast(static_cast(*this))->get_StepKind(&value)); + check_hresult(WINRT_SHIM(IPedometerReading)->get_StepKind(&value)); return value; } template int32_t impl_IPedometerReading::CumulativeSteps() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CumulativeSteps(&value)); + check_hresult(WINRT_SHIM(IPedometerReading)->get_CumulativeSteps(&value)); return value; } template Windows::Foundation::DateTime impl_IPedometerReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IPedometerReading)->get_Timestamp(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPedometerReading::CumulativeStepsDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_CumulativeStepsDuration(put(value))); + check_hresult(WINRT_SHIM(IPedometerReading)->get_CumulativeStepsDuration(put_abi(value))); return value; } template Windows::Devices::Sensors::PedometerReading impl_IPedometerReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::PedometerReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IPedometerReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IPedometerStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IPedometerStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IPedometerStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPedometerStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(IPedometerStatics)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template hstring impl_IPedometerStatics::GetDeviceSelector() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(result))); + check_hresult(WINRT_SHIM(IPedometerStatics)->abi_GetDeviceSelector(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IPedometerStatics::GetSystemHistoryAsync(const Windows::Foundation::DateTime & fromTime) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemHistoryAsync(get(fromTime), put(operation))); + check_hresult(WINRT_SHIM(IPedometerStatics)->abi_GetSystemHistoryAsync(get_abi(fromTime), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IPedometerStatics::GetSystemHistoryAsync(const Windows::Foundation::DateTime & fromTime, const Windows::Foundation::TimeSpan & duration) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemHistoryWithDurationAsync(get(fromTime), get(duration), put(operation))); + check_hresult(WINRT_SHIM(IPedometerStatics)->abi_GetSystemHistoryWithDurationAsync(get_abi(fromTime), get_abi(duration), put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVectorView impl_IPedometerStatics2::GetReadingsFromTriggerDetails(const Windows::Devices::Sensors::SensorDataThresholdTriggerDetails & triggerDetails) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetReadingsFromTriggerDetails(get(triggerDetails), put(result))); + check_hresult(WINRT_SHIM(IPedometerStatics2)->abi_GetReadingsFromTriggerDetails(get_abi(triggerDetails), put_abi(result))); return result; } template Windows::Foundation::Collections::IMapView impl_IPedometer2::GetCurrentReadings() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReadings(put(value))); + check_hresult(WINRT_SHIM(IPedometer2)->abi_GetCurrentReadings(put_abi(value))); return value; } template hstring impl_IPedometer::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IPedometer)->get_DeviceId(put_abi(value))); return value; } template double impl_IPedometer::PowerInMilliwatts() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerInMilliwatts(&value)); + check_hresult(WINRT_SHIM(IPedometer)->get_PowerInMilliwatts(&value)); return value; } template uint32_t impl_IPedometer::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IPedometer)->get_MinimumReportInterval(&value)); return value; } template void impl_IPedometer::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IPedometer)->put_ReportInterval(value)); } template uint32_t impl_IPedometer::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IPedometer)->get_ReportInterval(&value)); return value; } template event_token impl_IPedometer::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPedometer)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4621,62 +4842,62 @@ template event_revoker impl_IPedometer::ReadingChang template void impl_IPedometer::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IPedometer)->remove_ReadingChanged(token)); } template Windows::Devices::Sensors::PedometerDataThreshold impl_IPedometerDataThresholdFactory::Create(const Windows::Devices::Sensors::Pedometer & sensor, int32_t stepGoal) const { Windows::Devices::Sensors::PedometerDataThreshold threshold { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(sensor), stepGoal, put(threshold))); + check_hresult(WINRT_SHIM(IPedometerDataThresholdFactory)->abi_Create(get_abi(sensor), stepGoal, put_abi(threshold))); return threshold; } template hstring impl_IProximitySensorStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IProximitySensorStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Devices::Sensors::ProximitySensor impl_IProximitySensorStatics::FromId(hstring_ref sensorId) const +template Windows::Devices::Sensors::ProximitySensor impl_IProximitySensorStatics::FromId(hstring_view sensorId) const { Windows::Devices::Sensors::ProximitySensor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(sensorId), put(result))); + check_hresult(WINRT_SHIM(IProximitySensorStatics)->abi_FromId(get_abi(sensorId), put_abi(result))); return result; } template hstring impl_IProximitySensor::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IProximitySensor)->get_DeviceId(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IProximitySensor::MaxDistanceInMillimeters() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxDistanceInMillimeters(put(value))); + check_hresult(WINRT_SHIM(IProximitySensor)->get_MaxDistanceInMillimeters(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IProximitySensor::MinDistanceInMillimeters() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MinDistanceInMillimeters(put(value))); + check_hresult(WINRT_SHIM(IProximitySensor)->get_MinDistanceInMillimeters(put_abi(value))); return value; } template Windows::Devices::Sensors::ProximitySensorReading impl_IProximitySensor::GetCurrentReading() const { Windows::Devices::Sensors::ProximitySensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IProximitySensor)->abi_GetCurrentReading(put_abi(value))); return value; } template event_token impl_IProximitySensor::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IProximitySensor)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4687,102 +4908,102 @@ template event_revoker impl_IProximitySensor:: template void impl_IProximitySensor::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IProximitySensor)->remove_ReadingChanged(token)); } template Windows::Devices::Sensors::ProximitySensorDisplayOnOffController impl_IProximitySensor::CreateDisplayOnOffController() const { Windows::Devices::Sensors::ProximitySensorDisplayOnOffController controller { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDisplayOnOffController(put(controller))); + check_hresult(WINRT_SHIM(IProximitySensor)->abi_CreateDisplayOnOffController(put_abi(controller))); return controller; } template Windows::Devices::Sensors::ProximitySensorReading impl_IProximitySensorReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::ProximitySensorReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IProximitySensorReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IProximitySensorReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IProximitySensorReading)->get_Timestamp(put_abi(value))); return value; } template bool impl_IProximitySensorReading::IsDetected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDetected(&value)); + check_hresult(WINRT_SHIM(IProximitySensorReading)->get_IsDetected(&value)); return value; } template Windows::Foundation::IReference impl_IProximitySensorReading::DistanceInMillimeters() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DistanceInMillimeters(put(value))); + check_hresult(WINRT_SHIM(IProximitySensorReading)->get_DistanceInMillimeters(put_abi(value))); return value; } template Windows::Devices::Sensors::ProximitySensorDataThreshold impl_IProximitySensorDataThresholdFactory::Create(const Windows::Devices::Sensors::ProximitySensor & sensor) const { Windows::Devices::Sensors::ProximitySensorDataThreshold threshold { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(sensor), put(threshold))); + check_hresult(WINRT_SHIM(IProximitySensorDataThresholdFactory)->abi_Create(get_abi(sensor), put_abi(threshold))); return threshold; } template Windows::Foundation::Collections::IVectorView impl_IProximitySensorStatics2::GetReadingsFromTriggerDetails(const Windows::Devices::Sensors::SensorDataThresholdTriggerDetails & triggerDetails) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetReadingsFromTriggerDetails(get(triggerDetails), put(result))); + check_hresult(WINRT_SHIM(IProximitySensorStatics2)->abi_GetReadingsFromTriggerDetails(get_abi(triggerDetails), put_abi(result))); return result; } template Windows::Devices::Sensors::Altimeter impl_IAltimeterStatics::GetDefault() const { Windows::Devices::Sensors::Altimeter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IAltimeterStatics)->abi_GetDefault(put_abi(result))); return result; } template Windows::Devices::Sensors::AltimeterReading impl_IAltimeter::GetCurrentReading() const { Windows::Devices::Sensors::AltimeterReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IAltimeter)->abi_GetCurrentReading(put_abi(value))); return value; } template hstring impl_IAltimeter::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IAltimeter)->get_DeviceId(put_abi(value))); return value; } template uint32_t impl_IAltimeter::MinimumReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimumReportInterval(&value)); + check_hresult(WINRT_SHIM(IAltimeter)->get_MinimumReportInterval(&value)); return value; } template void impl_IAltimeter::ReportInterval(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReportInterval(value)); + check_hresult(WINRT_SHIM(IAltimeter)->put_ReportInterval(value)); } template uint32_t impl_IAltimeter::ReportInterval() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReportInterval(&value)); + check_hresult(WINRT_SHIM(IAltimeter)->get_ReportInterval(&value)); return value; } template event_token impl_IAltimeter::ReadingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReadingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAltimeter)->add_ReadingChanged(get_abi(handler), &token)); return token; } @@ -4793,27 +5014,27 @@ template event_revoker impl_IAltimeter::ReadingChang template void impl_IAltimeter::ReadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReadingChanged(token)); + check_hresult(WINRT_SHIM(IAltimeter)->remove_ReadingChanged(token)); } template Windows::Foundation::DateTime impl_IAltimeterReading::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IAltimeterReading)->get_Timestamp(put_abi(value))); return value; } template double impl_IAltimeterReading::AltitudeChangeInMeters() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AltitudeChangeInMeters(&value)); + check_hresult(WINRT_SHIM(IAltimeterReading)->get_AltitudeChangeInMeters(&value)); return value; } template Windows::Devices::Sensors::AltimeterReading impl_IAltimeterReadingChangedEventArgs::Reading() const { Windows::Devices::Sensors::AltimeterReading value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reading(put(value))); + check_hresult(WINRT_SHIM(IAltimeterReadingChangedEventArgs)->get_Reading(put_abi(value))); return value; } @@ -4837,7 +5058,7 @@ inline hstring ActivitySensor::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation ActivitySensor::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation ActivitySensor::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -4917,7 +5138,7 @@ inline Windows::Devices::Sensors::OrientationSensor OrientationSensor::GetDefaul return get_activation_factory().GetDefault(sensorReadingType, optimizationGoal); } -inline Windows::Foundation::IAsyncOperation Pedometer::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation Pedometer::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -4956,7 +5177,7 @@ inline hstring ProximitySensor::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Devices::Sensors::ProximitySensor ProximitySensor::FromId(hstring_ref sensorId) +inline Windows::Devices::Sensors::ProximitySensor ProximitySensor::FromId(hstring_view sensorId) { return get_activation_factory().FromId(sensorId); } @@ -4978,3 +5199,1220 @@ inline Windows::Devices::Sensors::SimpleOrientationSensor SimpleOrientationSenso } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometer3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometer4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerShakenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAccelerometerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensorReadingChangeReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IActivitySensorTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAltimeter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAltimeterReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAltimeterReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IAltimeterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IBarometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IBarometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IBarometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IBarometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompass2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompassDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompassReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompassReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompassReadingHeadingAccuracy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ICompassStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometerDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IGyrometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerReadingYawAccuracy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IInclinometerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ILightSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ILightSensorDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ILightSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ILightSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ILightSensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometerDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IMagnetometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorReadingYawAccuracy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IOrientationSensorStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometerDataThresholdFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IPedometerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensorDataThresholdFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::IProximitySensorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISensorDataThreshold & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISensorDataThresholdTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISensorQuaternion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISensorRotationMatrix & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISimpleOrientationSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISimpleOrientationSensor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISimpleOrientationSensorDeviceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISimpleOrientationSensorOrientationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ISimpleOrientationSensorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Accelerometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::AccelerometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::AccelerometerShakenEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ActivitySensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ActivitySensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ActivitySensorReadingChangeReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ActivitySensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ActivitySensorTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Altimeter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::AltimeterReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::AltimeterReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Barometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::BarometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::BarometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Compass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::CompassReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::CompassReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Gyrometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::GyrometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::GyrometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Inclinometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::InclinometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::InclinometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::LightSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::LightSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::LightSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Magnetometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::MagnetometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::OrientationSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::OrientationSensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::OrientationSensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::Pedometer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::PedometerDataThreshold & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::PedometerReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::PedometerReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ProximitySensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ProximitySensorDataThreshold & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ProximitySensorDisplayOnOffController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ProximitySensorReading & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::ProximitySensorReadingChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::SensorDataThresholdTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::SensorQuaternion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::SensorRotationMatrix & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::SimpleOrientationSensor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sensors::SimpleOrientationSensorOrientationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.SerialCommunication.h b/10.0.14393.0/winrt/Windows.Devices.SerialCommunication.h index 80bfed27b..653a62357 100644 --- a/10.0.14393.0/winrt/Windows.Devices.SerialCommunication.h +++ b/10.0.14393.0/winrt/Windows.Devices.SerialCommunication.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.SerialCommunication.3.h" @@ -20,7 +23,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produce : { try { - *value = detach(this->shim().PinChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinChange()); return S_OK; } catch (...) @@ -54,7 +59,8 @@ struct produce : produc { try { - *value = detach(this->shim().BaudRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaudRate()); return S_OK; } catch (...) @@ -67,6 +73,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().BaudRate(value); return S_OK; } @@ -80,7 +87,8 @@ struct produce : produc { try { - *value = detach(this->shim().BreakSignalState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BreakSignalState()); return S_OK; } catch (...) @@ -93,6 +101,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().BreakSignalState(value); return S_OK; } @@ -106,7 +115,8 @@ struct produce : produc { try { - *value = detach(this->shim().BytesReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesReceived()); return S_OK; } catch (...) @@ -119,7 +129,8 @@ struct produce : produc { try { - *value = detach(this->shim().CarrierDetectState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CarrierDetectState()); return S_OK; } catch (...) @@ -132,7 +143,8 @@ struct produce : produc { try { - *value = detach(this->shim().ClearToSendState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClearToSendState()); return S_OK; } catch (...) @@ -145,7 +157,8 @@ struct produce : produc { try { - *value = detach(this->shim().DataBits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataBits()); return S_OK; } catch (...) @@ -158,6 +171,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().DataBits(value); return S_OK; } @@ -171,7 +185,8 @@ struct produce : produc { try { - *value = detach(this->shim().DataSetReadyState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataSetReadyState()); return S_OK; } catch (...) @@ -184,7 +199,8 @@ struct produce : produc { try { - *value = detach(this->shim().Handshake()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handshake()); return S_OK; } catch (...) @@ -197,6 +213,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Handshake(value); return S_OK; } @@ -210,7 +227,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsDataTerminalReadyEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataTerminalReadyEnabled()); return S_OK; } catch (...) @@ -223,6 +241,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsDataTerminalReadyEnabled(value); return S_OK; } @@ -236,7 +255,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsRequestToSendEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRequestToSendEnabled()); return S_OK; } catch (...) @@ -249,6 +269,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRequestToSendEnabled(value); return S_OK; } @@ -262,7 +283,8 @@ struct produce : produc { try { - *value = detach(this->shim().Parity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Parity()); return S_OK; } catch (...) @@ -275,6 +297,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Parity(value); return S_OK; } @@ -284,11 +307,12 @@ struct produce : produc } } - HRESULT __stdcall get_PortName(abi_arg_out value) noexcept override + HRESULT __stdcall get_PortName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PortName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PortName()); return S_OK; } catch (...) @@ -298,11 +322,12 @@ struct produce : produc } } - HRESULT __stdcall get_ReadTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReadTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReadTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadTimeout()); return S_OK; } catch (...) @@ -311,10 +336,11 @@ struct produce : produc } } - HRESULT __stdcall put_ReadTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_ReadTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -328,7 +354,8 @@ struct produce : produc { try { - *value = detach(this->shim().StopBits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopBits()); return S_OK; } catch (...) @@ -341,6 +368,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().StopBits(value); return S_OK; } @@ -354,7 +382,8 @@ struct produce : produc { try { - *value = detach(this->shim().UsbVendorId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsbVendorId()); return S_OK; } catch (...) @@ -367,7 +396,8 @@ struct produce : produc { try { - *value = detach(this->shim().UsbProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsbProductId()); return S_OK; } catch (...) @@ -376,11 +406,12 @@ struct produce : produc } } - HRESULT __stdcall get_WriteTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_WriteTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WriteTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WriteTimeout()); return S_OK; } catch (...) @@ -389,10 +420,11 @@ struct produce : produc } } - HRESULT __stdcall put_WriteTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_WriteTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -402,11 +434,12 @@ struct produce : produc } } - HRESULT __stdcall get_InputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -416,11 +449,12 @@ struct produce : produc } } - HRESULT __stdcall get_OutputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -430,11 +464,12 @@ struct produce : produc } } - HRESULT __stdcall add_ErrorReceived(abi_arg_in> reportHandler, event_token * token) noexcept override + HRESULT __stdcall add_ErrorReceived(impl::abi_arg_in> reportHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().ErrorReceived(*reinterpret_cast *>(&reportHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ErrorReceived(*reinterpret_cast *>(&reportHandler))); return S_OK; } catch (...) @@ -447,6 +482,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ErrorReceived(token); return S_OK; } @@ -456,11 +492,12 @@ struct produce : produc } } - HRESULT __stdcall add_PinChanged(abi_arg_in> reportHandler, event_token * token) noexcept override + HRESULT __stdcall add_PinChanged(impl::abi_arg_in> reportHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().PinChanged(*reinterpret_cast *>(&reportHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PinChanged(*reinterpret_cast *>(&reportHandler))); return S_OK; } catch (...) @@ -473,6 +510,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PinChanged(token); return S_OK; } @@ -486,11 +524,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -500,11 +539,12 @@ struct produce : } } - HRESULT __stdcall abi_GetDeviceSelectorFromPortName(abi_arg_in portName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromPortName(impl::abi_arg_in portName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector(*reinterpret_cast(&portName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector(*reinterpret_cast(&portName))); return S_OK; } catch (...) @@ -514,11 +554,12 @@ struct produce : } } - HRESULT __stdcall abi_GetDeviceSelectorFromUsbVidPid(uint16_t vendorId, uint16_t productId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromUsbVidPid(uint16_t vendorId, uint16_t productId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelectorFromUsbVidPid(vendorId, productId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelectorFromUsbVidPid(vendorId, productId)); return S_OK; } catch (...) @@ -528,11 +569,12 @@ struct produce : } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -550,232 +592,232 @@ namespace Windows::Devices::SerialCommunication { template hstring impl_ISerialDeviceStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(ISerialDeviceStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template hstring impl_ISerialDeviceStatics::GetDeviceSelector(hstring_ref portName) const +template hstring impl_ISerialDeviceStatics::GetDeviceSelector(hstring_view portName) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromPortName(get(portName), put(result))); + check_hresult(WINRT_SHIM(ISerialDeviceStatics)->abi_GetDeviceSelectorFromPortName(get_abi(portName), put_abi(result))); return result; } template hstring impl_ISerialDeviceStatics::GetDeviceSelectorFromUsbVidPid(uint16_t vendorId, uint16_t productId) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromUsbVidPid(vendorId, productId, put(result))); + check_hresult(WINRT_SHIM(ISerialDeviceStatics)->abi_GetDeviceSelectorFromUsbVidPid(vendorId, productId, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISerialDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_ISerialDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(ISerialDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template Windows::Devices::SerialCommunication::SerialError impl_IErrorReceivedEventArgs::Error() const { Windows::Devices::SerialCommunication::SerialError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IErrorReceivedEventArgs)->get_Error(&value)); return value; } template Windows::Devices::SerialCommunication::SerialPinChange impl_IPinChangedEventArgs::PinChange() const { Windows::Devices::SerialCommunication::SerialPinChange value {}; - check_hresult(static_cast(static_cast(*this))->get_PinChange(&value)); + check_hresult(WINRT_SHIM(IPinChangedEventArgs)->get_PinChange(&value)); return value; } template uint32_t impl_ISerialDevice::BaudRate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BaudRate(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_BaudRate(&value)); return value; } template void impl_ISerialDevice::BaudRate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_BaudRate(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_BaudRate(value)); } template bool impl_ISerialDevice::BreakSignalState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BreakSignalState(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_BreakSignalState(&value)); return value; } template void impl_ISerialDevice::BreakSignalState(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BreakSignalState(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_BreakSignalState(value)); } template uint32_t impl_ISerialDevice::BytesReceived() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesReceived(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_BytesReceived(&value)); return value; } template bool impl_ISerialDevice::CarrierDetectState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CarrierDetectState(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_CarrierDetectState(&value)); return value; } template bool impl_ISerialDevice::ClearToSendState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ClearToSendState(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_ClearToSendState(&value)); return value; } template uint16_t impl_ISerialDevice::DataBits() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataBits(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_DataBits(&value)); return value; } template void impl_ISerialDevice::DataBits(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataBits(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_DataBits(value)); } template bool impl_ISerialDevice::DataSetReadyState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DataSetReadyState(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_DataSetReadyState(&value)); return value; } template Windows::Devices::SerialCommunication::SerialHandshake impl_ISerialDevice::Handshake() const { Windows::Devices::SerialCommunication::SerialHandshake value {}; - check_hresult(static_cast(static_cast(*this))->get_Handshake(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_Handshake(&value)); return value; } template void impl_ISerialDevice::Handshake(Windows::Devices::SerialCommunication::SerialHandshake value) const { - check_hresult(static_cast(static_cast(*this))->put_Handshake(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_Handshake(value)); } template bool impl_ISerialDevice::IsDataTerminalReadyEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDataTerminalReadyEnabled(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_IsDataTerminalReadyEnabled(&value)); return value; } template void impl_ISerialDevice::IsDataTerminalReadyEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDataTerminalReadyEnabled(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_IsDataTerminalReadyEnabled(value)); } template bool impl_ISerialDevice::IsRequestToSendEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRequestToSendEnabled(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_IsRequestToSendEnabled(&value)); return value; } template void impl_ISerialDevice::IsRequestToSendEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRequestToSendEnabled(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_IsRequestToSendEnabled(value)); } template Windows::Devices::SerialCommunication::SerialParity impl_ISerialDevice::Parity() const { Windows::Devices::SerialCommunication::SerialParity value {}; - check_hresult(static_cast(static_cast(*this))->get_Parity(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_Parity(&value)); return value; } template void impl_ISerialDevice::Parity(Windows::Devices::SerialCommunication::SerialParity value) const { - check_hresult(static_cast(static_cast(*this))->put_Parity(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_Parity(value)); } template hstring impl_ISerialDevice::PortName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PortName(put(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->get_PortName(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ISerialDevice::ReadTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadTimeout(put(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->get_ReadTimeout(put_abi(value))); return value; } template void impl_ISerialDevice::ReadTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadTimeout(get(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->put_ReadTimeout(get_abi(value))); } template Windows::Devices::SerialCommunication::SerialStopBitCount impl_ISerialDevice::StopBits() const { Windows::Devices::SerialCommunication::SerialStopBitCount value {}; - check_hresult(static_cast(static_cast(*this))->get_StopBits(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_StopBits(&value)); return value; } template void impl_ISerialDevice::StopBits(Windows::Devices::SerialCommunication::SerialStopBitCount value) const { - check_hresult(static_cast(static_cast(*this))->put_StopBits(value)); + check_hresult(WINRT_SHIM(ISerialDevice)->put_StopBits(value)); } template uint16_t impl_ISerialDevice::UsbVendorId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsbVendorId(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_UsbVendorId(&value)); return value; } template uint16_t impl_ISerialDevice::UsbProductId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UsbProductId(&value)); + check_hresult(WINRT_SHIM(ISerialDevice)->get_UsbProductId(&value)); return value; } template Windows::Foundation::TimeSpan impl_ISerialDevice::WriteTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_WriteTimeout(put(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->get_WriteTimeout(put_abi(value))); return value; } template void impl_ISerialDevice::WriteTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_WriteTimeout(get(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->put_WriteTimeout(get_abi(value))); } template Windows::Storage::Streams::IInputStream impl_ISerialDevice::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->get_InputStream(put_abi(value))); return value; } template Windows::Storage::Streams::IOutputStream impl_ISerialDevice::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(ISerialDevice)->get_OutputStream(put_abi(value))); return value; } template event_token impl_ISerialDevice::ErrorReceived(const Windows::Foundation::TypedEventHandler & reportHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ErrorReceived(get(reportHandler), &token)); + check_hresult(WINRT_SHIM(ISerialDevice)->add_ErrorReceived(get_abi(reportHandler), &token)); return token; } @@ -786,13 +828,13 @@ template event_revoker impl_ISerialDevice::ErrorR template void impl_ISerialDevice::ErrorReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ErrorReceived(token)); + check_hresult(WINRT_SHIM(ISerialDevice)->remove_ErrorReceived(token)); } template event_token impl_ISerialDevice::PinChanged(const Windows::Foundation::TypedEventHandler & reportHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PinChanged(get(reportHandler), &token)); + check_hresult(WINRT_SHIM(ISerialDevice)->add_PinChanged(get_abi(reportHandler), &token)); return token; } @@ -803,7 +845,7 @@ template event_revoker impl_ISerialDevice::PinCha template void impl_ISerialDevice::PinChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PinChanged(token)); + check_hresult(WINRT_SHIM(ISerialDevice)->remove_PinChanged(token)); } inline hstring SerialDevice::GetDeviceSelector() @@ -811,7 +853,7 @@ inline hstring SerialDevice::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline hstring SerialDevice::GetDeviceSelector(hstring_ref portName) +inline hstring SerialDevice::GetDeviceSelector(hstring_view portName) { return get_activation_factory().GetDeviceSelector(portName); } @@ -821,7 +863,7 @@ inline hstring SerialDevice::GetDeviceSelectorFromUsbVidPid(uint16_t vendorId, u return get_activation_factory().GetDeviceSelectorFromUsbVidPid(vendorId, productId); } -inline Windows::Foundation::IAsyncOperation SerialDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation SerialDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -829,3 +871,68 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::IErrorReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::IPinChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::ISerialDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::ISerialDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::ErrorReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::PinChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SerialCommunication::SerialDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.SmartCards.h b/10.0.14393.0/winrt/Windows.Devices.SmartCards.h index 30b9b1e0b..dd519dab0 100644 --- a/10.0.14393.0/winrt/Windows.Devices.SmartCards.h +++ b/10.0.14393.0/winrt/Windows.Devices.SmartCards.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -29,7 +32,7 @@ template SmartCardPinResetHandler::SmartCardPinResetHan inline void SmartCardPinResetHandler::operator()(const Windows::Devices::SmartCards::SmartCardProvisioning & sender, const Windows::Devices::SmartCards::SmartCardPinResetRequest & request) const { - check_hresult((*this)->abi_Invoke(get(sender), get(request))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(request))); } } @@ -39,11 +42,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_SmartCard(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmartCard(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmartCard()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartCard()); return S_OK; } catch (...) @@ -57,11 +61,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_SmartCard(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmartCard(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmartCard()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartCard()); return S_OK; } catch (...) @@ -75,11 +80,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Reader(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reader()); return S_OK; } catch (...) @@ -89,11 +95,12 @@ struct produce : produce_base> result) noexcept override + HRESULT __stdcall abi_GetStatusAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetStatusAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetStatusAsync()); return S_OK; } catch (...) @@ -103,11 +110,12 @@ struct produce : produce_base> result) noexcept override + HRESULT __stdcall abi_GetAnswerToResetAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAnswerToResetAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAnswerToResetAsync()); return S_OK; } catch (...) @@ -121,11 +129,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -135,10 +144,11 @@ struct produce : produ } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -148,11 +158,12 @@ struct produce : produ } } - HRESULT __stdcall get_AppletIds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AppletIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppletIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppletIds()); return S_OK; } catch (...) @@ -166,7 +177,8 @@ struct produce : produ { try { - *value = detach(this->shim().SmartCardEmulationCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartCardEmulationCategory()); return S_OK; } catch (...) @@ -179,6 +191,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().SmartCardEmulationCategory(value); return S_OK; } @@ -192,7 +205,8 @@ struct produce : produ { try { - *value = detach(this->shim().SmartCardEmulationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartCardEmulationType()); return S_OK; } catch (...) @@ -205,6 +219,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().SmartCardEmulationType(value); return S_OK; } @@ -218,7 +233,8 @@ struct produce : produ { try { - *value = detach(this->shim().AutomaticEnablement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomaticEnablement()); return S_OK; } catch (...) @@ -231,6 +247,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AutomaticEnablement(value); return S_OK; } @@ -244,11 +261,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in displayName, abi_arg_in> appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in displayName, impl::abi_arg_in> appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&displayName), *reinterpret_cast *>(&appletIds), emulationCategory, emulationType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&displayName), *reinterpret_cast *>(&appletIds), emulationCategory, emulationType)); return S_OK; } catch (...) @@ -266,7 +284,8 @@ struct produceshim().ActivationPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivationPolicy()); return S_OK; } catch (...) @@ -275,11 +294,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppletIdGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppletIdGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppletIdGroup()); return S_OK; } catch (...) @@ -289,11 +309,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestActivationPolicyChangeAsync(Windows::Devices::SmartCards::SmartCardAppletIdGroupActivationPolicy policy, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestActivationPolicyChangeAsync(policy)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestActivationPolicyChangeAsync(policy)); return S_OK; } catch (...) @@ -307,7 +328,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -316,11 +338,12 @@ struct produce> apdus, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SetAutomaticResponseApdusAsync(impl::abi_arg_in> apdus, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SetAutomaticResponseApdusAsync(*reinterpret_cast *>(&apdus))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SetAutomaticResponseApdusAsync(*reinterpret_cast *>(&apdus))); return S_OK; } catch (...) @@ -338,7 +361,8 @@ struct produce { try { - *value = detach(this->shim().MaxAppletIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAppletIds()); return S_OK; } catch (...) @@ -351,11 +375,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_CommandApdu(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandApdu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandApdu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandApdu()); return S_OK; } catch (...) @@ -365,10 +390,11 @@ struct produce } } - HRESULT __stdcall put_CommandApdu(abi_arg_in value) noexcept override + HRESULT __stdcall put_CommandApdu(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommandApdu(*reinterpret_cast(&value)); return S_OK; } @@ -378,11 +404,12 @@ struct produce } } - HRESULT __stdcall get_CommandApduBitMask(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandApduBitMask(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandApduBitMask()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandApduBitMask()); return S_OK; } catch (...) @@ -392,10 +419,11 @@ struct produce } } - HRESULT __stdcall put_CommandApduBitMask(abi_arg_in value) noexcept override + HRESULT __stdcall put_CommandApduBitMask(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommandApduBitMask(*reinterpret_cast(&value)); return S_OK; } @@ -409,7 +437,8 @@ struct produce { try { - *value = detach(this->shim().ShouldMatchLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldMatchLength()); return S_OK; } catch (...) @@ -422,6 +451,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ShouldMatchLength(value); return S_OK; } @@ -431,11 +461,12 @@ struct produce } } - HRESULT __stdcall get_AppletId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppletId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppletId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppletId()); return S_OK; } catch (...) @@ -445,10 +476,11 @@ struct produce } } - HRESULT __stdcall put_AppletId(abi_arg_in value) noexcept override + HRESULT __stdcall put_AppletId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppletId(*reinterpret_cast(&value)); return S_OK; } @@ -458,11 +490,12 @@ struct produce } } - HRESULT __stdcall get_ResponseApdu(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResponseApdu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResponseApdu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseApdu()); return S_OK; } catch (...) @@ -472,10 +505,11 @@ struct produce } } - HRESULT __stdcall put_ResponseApdu(abi_arg_in value) noexcept override + HRESULT __stdcall put_ResponseApdu(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ResponseApdu(*reinterpret_cast(&value)); return S_OK; } @@ -489,11 +523,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_InputState(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InputState(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InputState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputState()); return S_OK; } catch (...) @@ -503,10 +538,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_InputState(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InputState(*reinterpret_cast *>(&value)); return S_OK; } @@ -516,11 +552,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_OutputState(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OutputState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputState()); return S_OK; } catch (...) @@ -530,10 +567,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_OutputState(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutputState(*reinterpret_cast *>(&value)); return S_OK; } @@ -551,7 +589,8 @@ struct produceshim().AllowWhenCryptogramGeneratorNotPrepared()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowWhenCryptogramGeneratorNotPrepared()); return S_OK; } catch (...) @@ -564,6 +603,7 @@ struct produceshim()); this->shim().AllowWhenCryptogramGeneratorNotPrepared(value); return S_OK; } @@ -577,11 +617,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in commandApdu, abi_arg_in responseApdu, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in commandApdu, impl::abi_arg_in responseApdu, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&commandApdu), *reinterpret_cast(&responseApdu))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&commandApdu), *reinterpret_cast(&responseApdu))); return S_OK; } catch (...) @@ -595,11 +636,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Challenge(abi_arg_out value) noexcept override + HRESULT __stdcall get_Challenge(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Challenge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Challenge()); return S_OK; } catch (...) @@ -609,11 +651,12 @@ struct produce : pr } } - HRESULT __stdcall abi_VerifyResponseAsync(abi_arg_in response, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_VerifyResponseAsync(impl::abi_arg_in response, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().VerifyResponseAsync(*reinterpret_cast(&response))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().VerifyResponseAsync(*reinterpret_cast(&response))); return S_OK; } catch (...) @@ -623,11 +666,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ProvisionAsync(abi_arg_in response, bool formatCard, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ProvisionAsync(impl::abi_arg_in response, bool formatCard, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ProvisionAsync(*reinterpret_cast(&response), formatCard)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProvisionAsync(*reinterpret_cast(&response), formatCard)); return S_OK; } catch (...) @@ -637,11 +681,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ProvisionAsyncWithNewCardId(abi_arg_in response, bool formatCard, GUID newCardId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ProvisionAsyncWithNewCardId(impl::abi_arg_in response, bool formatCard, GUID newCardId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ProvisionAsync(*reinterpret_cast(&response), formatCard, newCardId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProvisionAsync(*reinterpret_cast(&response), formatCard, newCardId)); return S_OK; } catch (...) @@ -651,11 +696,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ChangeAdministrativeKeyAsync(abi_arg_in response, abi_arg_in newAdministrativeKey, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ChangeAdministrativeKeyAsync(impl::abi_arg_in response, impl::abi_arg_in newAdministrativeKey, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ChangeAdministrativeKeyAsync(*reinterpret_cast(&response), *reinterpret_cast(&newAdministrativeKey))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ChangeAdministrativeKeyAsync(*reinterpret_cast(&response), *reinterpret_cast(&newAdministrativeKey))); return S_OK; } catch (...) @@ -669,11 +715,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_ConnectAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConnectAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConnectAsync()); return S_OK; } catch (...) @@ -687,11 +734,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_TransmitAsync(abi_arg_in command, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TransmitAsync(impl::abi_arg_in command, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TransmitAsync(*reinterpret_cast(&command))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TransmitAsync(*reinterpret_cast(&command))); return S_OK; } catch (...) @@ -705,11 +753,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_SupportedCryptogramMaterialTypes(abi_arg_out> result) noexcept override + HRESULT __stdcall get_SupportedCryptogramMaterialTypes(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SupportedCryptogramMaterialTypes()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedCryptogramMaterialTypes()); return S_OK; } catch (...) @@ -719,11 +768,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedCryptogramAlgorithms(abi_arg_out> result) noexcept override + HRESULT __stdcall get_SupportedCryptogramAlgorithms(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SupportedCryptogramAlgorithms()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedCryptogramAlgorithms()); return S_OK; } catch (...) @@ -733,11 +783,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedCryptogramMaterialPackageFormats(abi_arg_out> result) noexcept override + HRESULT __stdcall get_SupportedCryptogramMaterialPackageFormats(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SupportedCryptogramMaterialPackageFormats()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedCryptogramMaterialPackageFormats()); return S_OK; } catch (...) @@ -747,11 +798,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(abi_arg_out> result) noexcept override + HRESULT __stdcall get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SupportedCryptogramMaterialPackageConfirmationResponseFormats()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedCryptogramMaterialPackageConfirmationResponseFormats()); return S_OK; } catch (...) @@ -761,11 +813,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedSmartCardCryptogramStorageKeyCapabilities(abi_arg_out> result) noexcept override + HRESULT __stdcall get_SupportedSmartCardCryptogramStorageKeyCapabilities(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SupportedSmartCardCryptogramStorageKeyCapabilities()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SupportedSmartCardCryptogramStorageKeyCapabilities()); return S_OK; } catch (...) @@ -775,11 +828,12 @@ struct produce : } } - HRESULT __stdcall abi_DeleteCryptogramMaterialStorageKeyAsync(abi_arg_in storageKeyName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_DeleteCryptogramMaterialStorageKeyAsync(impl::abi_arg_in storageKeyName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DeleteCryptogramMaterialStorageKeyAsync(*reinterpret_cast(&storageKeyName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteCryptogramMaterialStorageKeyAsync(*reinterpret_cast(&storageKeyName))); return S_OK; } catch (...) @@ -789,11 +843,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateCryptogramMaterialStorageKeyAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, abi_arg_in storageKeyName, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyAlgorithm algorithm, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities capabilities, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateCryptogramMaterialStorageKeyAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, impl::abi_arg_in storageKeyName, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyAlgorithm algorithm, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities capabilities, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateCryptogramMaterialStorageKeyAsync(promptingBehavior, *reinterpret_cast(&storageKeyName), algorithm, capabilities)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCryptogramMaterialStorageKeyAsync(promptingBehavior, *reinterpret_cast(&storageKeyName), algorithm, capabilities)); return S_OK; } catch (...) @@ -803,11 +858,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestCryptogramMaterialStorageKeyInfoAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, abi_arg_in storageKeyName, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType format, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestCryptogramMaterialStorageKeyInfoAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, impl::abi_arg_in storageKeyName, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType format, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestCryptogramMaterialStorageKeyInfoAsync(promptingBehavior, *reinterpret_cast(&storageKeyName), format)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestCryptogramMaterialStorageKeyInfoAsync(promptingBehavior, *reinterpret_cast(&storageKeyName), format)); return S_OK; } catch (...) @@ -817,11 +873,12 @@ struct produce : } } - HRESULT __stdcall abi_ImportCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageFormat format, abi_arg_in storageKeyName, abi_arg_in materialPackageName, abi_arg_in cryptogramMaterialPackage, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ImportCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageFormat format, impl::abi_arg_in storageKeyName, impl::abi_arg_in materialPackageName, impl::abi_arg_in cryptogramMaterialPackage, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ImportCryptogramMaterialPackageAsync(format, *reinterpret_cast(&storageKeyName), *reinterpret_cast(&materialPackageName), *reinterpret_cast(&cryptogramMaterialPackage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ImportCryptogramMaterialPackageAsync(format, *reinterpret_cast(&storageKeyName), *reinterpret_cast(&materialPackageName), *reinterpret_cast(&cryptogramMaterialPackage))); return S_OK; } catch (...) @@ -831,11 +888,12 @@ struct produce : } } - HRESULT __stdcall abi_TryProvePossessionOfCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageConfirmationResponseFormat responseFormat, abi_arg_in materialPackageName, abi_arg_in materialName, abi_arg_in challenge, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryProvePossessionOfCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageConfirmationResponseFormat responseFormat, impl::abi_arg_in materialPackageName, impl::abi_arg_in materialName, impl::abi_arg_in challenge, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryProvePossessionOfCryptogramMaterialPackageAsync(promptingBehavior, responseFormat, *reinterpret_cast(&materialPackageName), *reinterpret_cast(&materialName), *reinterpret_cast(&challenge))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryProvePossessionOfCryptogramMaterialPackageAsync(promptingBehavior, responseFormat, *reinterpret_cast(&materialPackageName), *reinterpret_cast(&materialName), *reinterpret_cast(&challenge))); return S_OK; } catch (...) @@ -845,11 +903,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestUnlockCryptogramMaterialForUseAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestUnlockCryptogramMaterialForUseAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestUnlockCryptogramMaterialForUseAsync(promptingBehavior)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestUnlockCryptogramMaterialForUseAsync(promptingBehavior)); return S_OK; } catch (...) @@ -859,11 +918,12 @@ struct produce : } } - HRESULT __stdcall abi_DeleteCryptogramMaterialPackageAsync(abi_arg_in materialPackageName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_DeleteCryptogramMaterialPackageAsync(impl::abi_arg_in materialPackageName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DeleteCryptogramMaterialPackageAsync(*reinterpret_cast(&materialPackageName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteCryptogramMaterialPackageAsync(*reinterpret_cast(&materialPackageName))); return S_OK; } catch (...) @@ -877,11 +937,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetSmartCardCryptogramGeneratorAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetSmartCardCryptogramGeneratorAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetSmartCardCryptogramGeneratorAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSmartCardCryptogramGeneratorAsync()); return S_OK; } catch (...) @@ -899,7 +960,8 @@ struct produceshim().OperationStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OperationStatus()); return S_OK; } catch (...) @@ -908,11 +970,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Proof(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Proof()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Proof()); return S_OK; } catch (...) @@ -930,7 +993,8 @@ struct produceshim().Algorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Algorithm()); return S_OK; } catch (...) @@ -943,6 +1007,7 @@ struct produceshim()); this->shim().Algorithm(value); return S_OK; } @@ -952,11 +1017,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SourceData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceData()); return S_OK; } catch (...) @@ -966,10 +1032,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SourceData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceData(*reinterpret_cast(&value)); return S_OK; } @@ -979,11 +1046,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CryptogramMaterialPackageName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CryptogramMaterialPackageName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CryptogramMaterialPackageName()); return S_OK; } catch (...) @@ -993,10 +1061,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CryptogramMaterialPackageName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CryptogramMaterialPackageName(*reinterpret_cast(&value)); return S_OK; } @@ -1006,11 +1075,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CryptogramMaterialName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CryptogramMaterialName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CryptogramMaterialName()); return S_OK; } catch (...) @@ -1020,10 +1090,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CryptogramMaterialName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CryptogramMaterialName(*reinterpret_cast(&value)); return S_OK; } @@ -1037,7 +1108,8 @@ struct produceshim().TemplateOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateOffset()); return S_OK; } catch (...) @@ -1050,6 +1122,7 @@ struct produceshim()); this->shim().TemplateOffset(value); return S_OK; } @@ -1063,7 +1136,8 @@ struct produceshim().CryptogramOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CryptogramOffset()); return S_OK; } catch (...) @@ -1076,6 +1150,7 @@ struct produceshim()); this->shim().CryptogramOffset(value); return S_OK; } @@ -1089,7 +1164,8 @@ struct produceshim().CryptogramLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CryptogramLength()); return S_OK; } catch (...) @@ -1102,6 +1178,7 @@ struct produceshim()); this->shim().CryptogramLength(value); return S_OK; } @@ -1115,7 +1192,8 @@ struct produceshim().CryptogramPlacementOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CryptogramPlacementOptions()); return S_OK; } catch (...) @@ -1128,6 +1206,7 @@ struct produceshim()); this->shim().CryptogramPlacementOptions(value); return S_OK; } @@ -1137,11 +1216,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ChainedOutputStep(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChainedOutputStep()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChainedOutputStep()); return S_OK; } catch (...) @@ -1151,10 +1231,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ChainedOutputStep(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChainedOutputStep(*reinterpret_cast(&value)); return S_OK; } @@ -1172,7 +1253,8 @@ struct produceshim().OperationStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OperationStatus()); return S_OK; } catch (...) @@ -1185,7 +1267,8 @@ struct produceshim().PublicKeyBlobType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicKeyBlobType()); return S_OK; } catch (...) @@ -1194,11 +1277,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PublicKey(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublicKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicKey()); return S_OK; } catch (...) @@ -1212,7 +1296,8 @@ struct produceshim().AttestationStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttestationStatus()); return S_OK; } catch (...) @@ -1221,11 +1306,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Attestation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Attestation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Attestation()); return S_OK; } catch (...) @@ -1235,11 +1321,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AttestationCertificateChain(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttestationCertificateChain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttestationCertificateChain()); return S_OK; } catch (...) @@ -1253,7 +1340,8 @@ struct produceshim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -1266,11 +1354,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OperationalRequirements(abi_arg_out value) noexcept override + HRESULT __stdcall get_OperationalRequirements(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OperationalRequirements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OperationalRequirements()); return S_OK; } catch (...) @@ -1288,7 +1377,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().EnablementPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnablementPolicy()); return S_OK; } catch (...) @@ -1301,11 +1391,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall add_ApduReceived(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ApduReceived(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ApduReceived(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ApduReceived(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1318,6 +1409,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ApduReceived(value); return S_OK; } @@ -1327,11 +1419,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_ConnectionDeactivated(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ConnectionDeactivated(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ConnectionDeactivated(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ConnectionDeactivated(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1344,6 +1437,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionDeactivated(value); return S_OK; } @@ -1357,6 +1451,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -1370,7 +1465,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsHostCardEmulationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHostCardEmulationSupported()); return S_OK; } catch (...) @@ -1383,11 +1479,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_CommandApdu(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandApdu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandApdu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandApdu()); return S_OK; } catch (...) @@ -1397,11 +1494,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ConnectionProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionProperties()); return S_OK; } catch (...) @@ -1411,11 +1509,12 @@ struct produce responseApdu, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryRespondAsync(impl::abi_arg_in responseApdu, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryRespondAsync(*reinterpret_cast(&responseApdu))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRespondAsync(*reinterpret_cast(&responseApdu))); return S_OK; } catch (...) @@ -1429,7 +1528,8 @@ struct produceshim().AutomaticResponseStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomaticResponseStatus()); return S_OK; } catch (...) @@ -1446,7 +1546,8 @@ struct produceshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1455,11 +1556,12 @@ struct produce responseApdu, abi_arg_in> nextState, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryRespondWithStateAsync(impl::abi_arg_in responseApdu, impl::abi_arg_in> nextState, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryRespondAsync(*reinterpret_cast(&responseApdu), *reinterpret_cast *>(&nextState))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRespondAsync(*reinterpret_cast(&responseApdu), *reinterpret_cast *>(&nextState))); return S_OK; } catch (...) @@ -1473,11 +1575,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryRespondWithCryptogramsAsync(abi_arg_in responseTemplate, abi_arg_in> cryptogramPlacementSteps, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryRespondWithCryptogramsAsync(impl::abi_arg_in responseTemplate, impl::abi_arg_in> cryptogramPlacementSteps, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryRespondWithCryptogramsAsync(*reinterpret_cast(&responseTemplate), *reinterpret_cast *>(&cryptogramPlacementSteps))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRespondWithCryptogramsAsync(*reinterpret_cast(&responseTemplate), *reinterpret_cast *>(&cryptogramPlacementSteps))); return S_OK; } catch (...) @@ -1487,11 +1590,12 @@ struct produce responseTemplate, abi_arg_in> cryptogramPlacementSteps, abi_arg_in> nextState, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryRespondWithCryptogramsAndStateAsync(impl::abi_arg_in responseTemplate, impl::abi_arg_in> cryptogramPlacementSteps, impl::abi_arg_in> nextState, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryRespondWithCryptogramsAsync(*reinterpret_cast(&responseTemplate), *reinterpret_cast *>(&cryptogramPlacementSteps), *reinterpret_cast *>(&nextState))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRespondWithCryptogramsAsync(*reinterpret_cast(&responseTemplate), *reinterpret_cast *>(&cryptogramPlacementSteps), *reinterpret_cast *>(&nextState))); return S_OK; } catch (...) @@ -1505,11 +1609,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ConnectionProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionProperties()); return S_OK; } catch (...) @@ -1523,7 +1628,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -1540,7 +1646,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1553,7 +1660,8 @@ struct produceshim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1566,11 +1674,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -1584,11 +1693,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetAppletIdGroupRegistrationsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetAppletIdGroupRegistrationsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetAppletIdGroupRegistrationsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAppletIdGroupRegistrationsAsync()); return S_OK; } catch (...) @@ -1598,11 +1708,12 @@ struct produce : pr } } - HRESULT __stdcall abi_RegisterAppletIdGroupAsync(abi_arg_in appletIdGroup, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterAppletIdGroupAsync(impl::abi_arg_in appletIdGroup, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterAppletIdGroupAsync(*reinterpret_cast(&appletIdGroup))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterAppletIdGroupAsync(*reinterpret_cast(&appletIdGroup))); return S_OK; } catch (...) @@ -1612,11 +1723,12 @@ struct produce : pr } } - HRESULT __stdcall abi_UnregisterAppletIdGroupAsync(abi_arg_in registration, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnregisterAppletIdGroupAsync(impl::abi_arg_in registration, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnregisterAppletIdGroupAsync(*reinterpret_cast(®istration))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnregisterAppletIdGroupAsync(*reinterpret_cast(®istration))); return S_OK; } catch (...) @@ -1630,7 +1742,8 @@ struct produce : pr { try { - *value = detach(this->shim().MaxAppletIdGroupRegistrations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAppletIdGroupRegistrations()); return S_OK; } catch (...) @@ -1647,7 +1760,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MinLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinLength()); return S_OK; } catch (...) @@ -1660,6 +1774,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().MinLength(value); return S_OK; } @@ -1673,7 +1788,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MaxLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLength()); return S_OK; } catch (...) @@ -1686,6 +1802,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxLength(value); return S_OK; } @@ -1699,7 +1816,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().UppercaseLetters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UppercaseLetters()); return S_OK; } catch (...) @@ -1712,6 +1830,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().UppercaseLetters(value); return S_OK; } @@ -1725,7 +1844,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().LowercaseLetters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowercaseLetters()); return S_OK; } catch (...) @@ -1738,6 +1858,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().LowercaseLetters(value); return S_OK; } @@ -1751,7 +1872,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Digits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Digits()); return S_OK; } catch (...) @@ -1764,6 +1886,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Digits(value); return S_OK; } @@ -1777,7 +1900,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SpecialCharacters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpecialCharacters()); return S_OK; } catch (...) @@ -1790,6 +1914,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SpecialCharacters(value); return S_OK; } @@ -1807,6 +1932,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1820,11 +1946,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Challenge(abi_arg_out value) noexcept override + HRESULT __stdcall get_Challenge(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Challenge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Challenge()); return S_OK; } catch (...) @@ -1834,11 +1961,12 @@ struct produce : pro } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -1847,11 +1975,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1861,10 +1990,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SetResponse(abi_arg_in response) noexcept override + HRESULT __stdcall abi_SetResponse(impl::abi_arg_in response) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetResponse(*reinterpret_cast(&response)); return S_OK; } @@ -1878,11 +2008,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_SmartCard(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmartCard(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmartCard()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartCard()); return S_OK; } catch (...) @@ -1892,11 +2023,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetIdAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetIdAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetIdAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetIdAsync()); return S_OK; } catch (...) @@ -1906,11 +2038,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetNameAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetNameAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetNameAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetNameAsync()); return S_OK; } catch (...) @@ -1920,11 +2053,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetChallengeContextAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetChallengeContextAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetChallengeContextAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetChallengeContextAsync()); return S_OK; } catch (...) @@ -1934,11 +2068,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RequestPinChangeAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestPinChangeAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestPinChangeAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestPinChangeAsync()); return S_OK; } catch (...) @@ -1948,11 +2083,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RequestPinResetAsync(abi_arg_in handler, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestPinResetAsync(impl::abi_arg_in handler, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestPinResetAsync(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestPinResetAsync(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -1966,11 +2102,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetAuthorityKeyContainerNameAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetAuthorityKeyContainerNameAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAuthorityKeyContainerNameAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAuthorityKeyContainerNameAsync()); return S_OK; } catch (...) @@ -1984,11 +2121,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_FromSmartCardAsync(abi_arg_in card, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromSmartCardAsync(impl::abi_arg_in card, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromSmartCardAsync(*reinterpret_cast(&card))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromSmartCardAsync(*reinterpret_cast(&card))); return S_OK; } catch (...) @@ -1998,11 +2136,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestVirtualSmartCardCreationAsync(abi_arg_in friendlyName, abi_arg_in administrativeKey, abi_arg_in pinPolicy, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestVirtualSmartCardCreationAsync(impl::abi_arg_in friendlyName, impl::abi_arg_in administrativeKey, impl::abi_arg_in pinPolicy, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy))); return S_OK; } catch (...) @@ -2012,11 +2151,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestVirtualSmartCardCreationAsyncWithCardId(abi_arg_in friendlyName, abi_arg_in administrativeKey, abi_arg_in pinPolicy, GUID cardId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestVirtualSmartCardCreationAsyncWithCardId(impl::abi_arg_in friendlyName, impl::abi_arg_in administrativeKey, impl::abi_arg_in pinPolicy, GUID cardId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy), cardId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy), cardId)); return S_OK; } catch (...) @@ -2026,11 +2166,12 @@ struct produce : } } - HRESULT __stdcall abi_RequestVirtualSmartCardDeletionAsync(abi_arg_in card, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestVirtualSmartCardDeletionAsync(impl::abi_arg_in card, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestVirtualSmartCardDeletionAsync(*reinterpret_cast(&card))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestVirtualSmartCardDeletionAsync(*reinterpret_cast(&card))); return S_OK; } catch (...) @@ -2044,11 +2185,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_RequestAttestedVirtualSmartCardCreationAsync(abi_arg_in friendlyName, abi_arg_in administrativeKey, abi_arg_in pinPolicy, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAttestedVirtualSmartCardCreationAsync(impl::abi_arg_in friendlyName, impl::abi_arg_in administrativeKey, impl::abi_arg_in pinPolicy, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAttestedVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAttestedVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy))); return S_OK; } catch (...) @@ -2058,11 +2200,12 @@ struct produce } } - HRESULT __stdcall abi_RequestAttestedVirtualSmartCardCreationAsyncWithCardId(abi_arg_in friendlyName, abi_arg_in administrativeKey, abi_arg_in pinPolicy, GUID cardId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAttestedVirtualSmartCardCreationAsyncWithCardId(impl::abi_arg_in friendlyName, impl::abi_arg_in administrativeKey, impl::abi_arg_in pinPolicy, GUID cardId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAttestedVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy), cardId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAttestedVirtualSmartCardCreationAsync(*reinterpret_cast(&friendlyName), *reinterpret_cast(&administrativeKey), *reinterpret_cast(&pinPolicy), cardId)); return S_OK; } catch (...) @@ -2076,11 +2219,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2090,11 +2234,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -2108,7 +2253,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -2117,11 +2263,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetStatusAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetStatusAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetStatusAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetStatusAsync()); return S_OK; } catch (...) @@ -2131,11 +2278,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FindAllCardsAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_FindAllCardsAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().FindAllCardsAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindAllCardsAsync()); return S_OK; } catch (...) @@ -2145,11 +2293,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_CardAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CardAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CardAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CardAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2162,6 +2311,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CardAdded(token); return S_OK; } @@ -2171,11 +2321,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_CardRemoved(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CardRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CardRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CardRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2188,6 +2339,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CardRemoved(token); return S_OK; } @@ -2201,11 +2353,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -2215,11 +2368,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeviceSelectorWithKind(Windows::Devices::SmartCards::SmartCardReaderKind kind, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorWithKind(Windows::Devices::SmartCards::SmartCardReaderKind kind, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(kind)); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(kind)); return S_OK; } catch (...) @@ -2229,11 +2383,12 @@ struct produce : produ } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -2251,7 +2406,8 @@ struct produce : prod { try { - *value = detach(this->shim().TriggerType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriggerType()); return S_OK; } catch (...) @@ -2260,11 +2416,12 @@ struct produce : prod } } - HRESULT __stdcall get_SourceAppletId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceAppletId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceAppletId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceAppletId()); return S_OK; } catch (...) @@ -2274,11 +2431,12 @@ struct produce : prod } } - HRESULT __stdcall get_TriggerData(abi_arg_out value) noexcept override + HRESULT __stdcall get_TriggerData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TriggerData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriggerData()); return S_OK; } catch (...) @@ -2292,11 +2450,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Emulator(abi_arg_out value) noexcept override + HRESULT __stdcall get_Emulator(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Emulator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Emulator()); return S_OK; } catch (...) @@ -2306,11 +2465,12 @@ struct produce : pro } } - HRESULT __stdcall abi_TryLaunchCurrentAppAsync(abi_arg_in arguments, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryLaunchCurrentAppAsync(impl::abi_arg_in arguments, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryLaunchCurrentAppAsync(*reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryLaunchCurrentAppAsync(*reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -2320,11 +2480,12 @@ struct produce : pro } } - HRESULT __stdcall abi_TryLaunchCurrentAppWithBehaviorAsync(abi_arg_in arguments, Windows::Devices::SmartCards::SmartCardLaunchBehavior behavior, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_TryLaunchCurrentAppWithBehaviorAsync(impl::abi_arg_in arguments, Windows::Devices::SmartCards::SmartCardLaunchBehavior behavior, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().TryLaunchCurrentAppAsync(*reinterpret_cast(&arguments), behavior)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryLaunchCurrentAppAsync(*reinterpret_cast(&arguments), behavior)); return S_OK; } catch (...) @@ -2342,63 +2503,63 @@ namespace Windows::Devices::SmartCards { template hstring impl_ISmartCardReaderStatics::GetDeviceSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(selector))); + check_hresult(WINRT_SHIM(ISmartCardReaderStatics)->abi_GetDeviceSelector(put_abi(selector))); return selector; } template hstring impl_ISmartCardReaderStatics::GetDeviceSelector(Windows::Devices::SmartCards::SmartCardReaderKind kind) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorWithKind(kind, put(selector))); + check_hresult(WINRT_SHIM(ISmartCardReaderStatics)->abi_GetDeviceSelectorWithKind(kind, put_abi(selector))); return selector; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardReaderStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardReaderStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(ISmartCardReaderStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(result))); return result; } template hstring impl_ISmartCardReader::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISmartCardReader)->get_DeviceId(put_abi(value))); return value; } template hstring impl_ISmartCardReader::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ISmartCardReader)->get_Name(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardReaderKind impl_ISmartCardReader::Kind() const { Windows::Devices::SmartCards::SmartCardReaderKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(ISmartCardReader)->get_Kind(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCardReader::GetStatusAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetStatusAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardReader)->abi_GetStatusAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_ISmartCardReader::FindAllCardsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_FindAllCardsAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardReader)->abi_FindAllCardsAsync(put_abi(result))); return result; } template event_token impl_ISmartCardReader::CardAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CardAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(ISmartCardReader)->add_CardAdded(get_abi(handler), &token)); return token; } @@ -2409,13 +2570,13 @@ template event_revoker impl_ISmartCardReader:: template void impl_ISmartCardReader::CardAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CardAdded(token)); + check_hresult(WINRT_SHIM(ISmartCardReader)->remove_CardAdded(token)); } template event_token impl_ISmartCardReader::CardRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CardRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(ISmartCardReader)->add_CardRemoved(get_abi(handler), &token)); return token; } @@ -2426,375 +2587,375 @@ template event_revoker impl_ISmartCardReader:: template void impl_ISmartCardReader::CardRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CardRemoved(token)); + check_hresult(WINRT_SHIM(ISmartCardReader)->remove_CardRemoved(token)); } template Windows::Devices::SmartCards::SmartCard impl_ICardAddedEventArgs::SmartCard() const { Windows::Devices::SmartCards::SmartCard value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmartCard(put(value))); + check_hresult(WINRT_SHIM(ICardAddedEventArgs)->get_SmartCard(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCard impl_ICardRemovedEventArgs::SmartCard() const { Windows::Devices::SmartCards::SmartCard value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmartCard(put(value))); + check_hresult(WINRT_SHIM(ICardRemovedEventArgs)->get_SmartCard(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardReader impl_ISmartCard::Reader() const { Windows::Devices::SmartCards::SmartCardReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Reader(put(value))); + check_hresult(WINRT_SHIM(ISmartCard)->get_Reader(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCard::GetStatusAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetStatusAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCard)->abi_GetStatusAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCard::GetAnswerToResetAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAnswerToResetAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCard)->abi_GetAnswerToResetAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::FromSmartCardAsync(const Windows::Devices::SmartCards::SmartCard & card) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromSmartCardAsync(get(card), put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics)->abi_FromSmartCardAsync(get_abi(card), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::RequestVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::RequestVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestVirtualSmartCardCreationAsync(get(friendlyName), get(administrativeKey), get(pinPolicy), put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics)->abi_RequestVirtualSmartCardCreationAsync(get_abi(friendlyName), get_abi(administrativeKey), get_abi(pinPolicy), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::RequestVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::RequestVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestVirtualSmartCardCreationAsyncWithCardId(get(friendlyName), get(administrativeKey), get(pinPolicy), cardId, put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics)->abi_RequestVirtualSmartCardCreationAsyncWithCardId(get_abi(friendlyName), get_abi(administrativeKey), get_abi(pinPolicy), cardId, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics::RequestVirtualSmartCardDeletionAsync(const Windows::Devices::SmartCards::SmartCard & card) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestVirtualSmartCardDeletionAsync(get(card), put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics)->abi_RequestVirtualSmartCardDeletionAsync(get_abi(card), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics2::RequestAttestedVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics2::RequestAttestedVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAttestedVirtualSmartCardCreationAsync(get(friendlyName), get(administrativeKey), get(pinPolicy), put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics2)->abi_RequestAttestedVirtualSmartCardCreationAsync(get_abi(friendlyName), get_abi(administrativeKey), get_abi(pinPolicy), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics2::RequestAttestedVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioningStatics2::RequestAttestedVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAttestedVirtualSmartCardCreationAsyncWithCardId(get(friendlyName), get(administrativeKey), get(pinPolicy), cardId, put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioningStatics2)->abi_RequestAttestedVirtualSmartCardCreationAsyncWithCardId(get_abi(friendlyName), get_abi(administrativeKey), get_abi(pinPolicy), cardId, put_abi(result))); return result; } template Windows::Devices::SmartCards::SmartCard impl_ISmartCardProvisioning::SmartCard() const { Windows::Devices::SmartCards::SmartCard value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmartCard(put(value))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->get_SmartCard(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning::GetIdAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetIdAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->abi_GetIdAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning::GetNameAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetNameAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->abi_GetNameAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning::GetChallengeContextAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetChallengeContextAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->abi_GetChallengeContextAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning::RequestPinChangeAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestPinChangeAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->abi_RequestPinChangeAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning::RequestPinResetAsync(const Windows::Devices::SmartCards::SmartCardPinResetHandler & handler) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestPinResetAsync(get(handler), put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning)->abi_RequestPinResetAsync(get_abi(handler), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardProvisioning2::GetAuthorityKeyContainerNameAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAuthorityKeyContainerNameAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardProvisioning2)->abi_GetAuthorityKeyContainerNameAsync(put_abi(result))); return result; } template Windows::Storage::Streams::IBuffer impl_ISmartCardPinResetRequest::Challenge() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Challenge(put(value))); + check_hresult(WINRT_SHIM(ISmartCardPinResetRequest)->get_Challenge(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISmartCardPinResetRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(ISmartCardPinResetRequest)->get_Deadline(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardPinResetDeferral impl_ISmartCardPinResetRequest::GetDeferral() const { Windows::Devices::SmartCards::SmartCardPinResetDeferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(ISmartCardPinResetRequest)->abi_GetDeferral(put_abi(result))); return result; } template void impl_ISmartCardPinResetRequest::SetResponse(const Windows::Storage::Streams::IBuffer & response) const { - check_hresult(static_cast(static_cast(*this))->abi_SetResponse(get(response))); + check_hresult(WINRT_SHIM(ISmartCardPinResetRequest)->abi_SetResponse(get_abi(response))); } template void impl_ISmartCardPinResetDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ISmartCardPinResetDeferral)->abi_Complete()); } template uint32_t impl_ISmartCardPinPolicy::MinLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinLength(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_MinLength(&value)); return value; } template void impl_ISmartCardPinPolicy::MinLength(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MinLength(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_MinLength(value)); } template uint32_t impl_ISmartCardPinPolicy::MaxLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLength(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_MaxLength(&value)); return value; } template void impl_ISmartCardPinPolicy::MaxLength(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLength(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_MaxLength(value)); } template Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption impl_ISmartCardPinPolicy::UppercaseLetters() const { Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value {}; - check_hresult(static_cast(static_cast(*this))->get_UppercaseLetters(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_UppercaseLetters(&value)); return value; } template void impl_ISmartCardPinPolicy::UppercaseLetters(Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value) const { - check_hresult(static_cast(static_cast(*this))->put_UppercaseLetters(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_UppercaseLetters(value)); } template Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption impl_ISmartCardPinPolicy::LowercaseLetters() const { Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value {}; - check_hresult(static_cast(static_cast(*this))->get_LowercaseLetters(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_LowercaseLetters(&value)); return value; } template void impl_ISmartCardPinPolicy::LowercaseLetters(Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value) const { - check_hresult(static_cast(static_cast(*this))->put_LowercaseLetters(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_LowercaseLetters(value)); } template Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption impl_ISmartCardPinPolicy::Digits() const { Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value {}; - check_hresult(static_cast(static_cast(*this))->get_Digits(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_Digits(&value)); return value; } template void impl_ISmartCardPinPolicy::Digits(Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value) const { - check_hresult(static_cast(static_cast(*this))->put_Digits(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_Digits(value)); } template Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption impl_ISmartCardPinPolicy::SpecialCharacters() const { Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value {}; - check_hresult(static_cast(static_cast(*this))->get_SpecialCharacters(&value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->get_SpecialCharacters(&value)); return value; } template void impl_ISmartCardPinPolicy::SpecialCharacters(Windows::Devices::SmartCards::SmartCardPinCharacterPolicyOption value) const { - check_hresult(static_cast(static_cast(*this))->put_SpecialCharacters(value)); + check_hresult(WINRT_SHIM(ISmartCardPinPolicy)->put_SpecialCharacters(value)); } template Windows::Foundation::IAsyncOperation impl_ISmartCardConnect::ConnectAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardConnect)->abi_ConnectAsync(put_abi(result))); return result; } template Windows::Storage::Streams::IBuffer impl_ISmartCardChallengeContext::Challenge() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Challenge(put(value))); + check_hresult(WINRT_SHIM(ISmartCardChallengeContext)->get_Challenge(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCardChallengeContext::VerifyResponseAsync(const Windows::Storage::Streams::IBuffer & response) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_VerifyResponseAsync(get(response), put(result))); + check_hresult(WINRT_SHIM(ISmartCardChallengeContext)->abi_VerifyResponseAsync(get_abi(response), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_ISmartCardChallengeContext::ProvisionAsync(const Windows::Storage::Streams::IBuffer & response, bool formatCard) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ProvisionAsync(get(response), formatCard, put(result))); + check_hresult(WINRT_SHIM(ISmartCardChallengeContext)->abi_ProvisionAsync(get_abi(response), formatCard, put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_ISmartCardChallengeContext::ProvisionAsync(const Windows::Storage::Streams::IBuffer & response, bool formatCard, GUID newCardId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ProvisionAsyncWithNewCardId(get(response), formatCard, newCardId, put(result))); + check_hresult(WINRT_SHIM(ISmartCardChallengeContext)->abi_ProvisionAsyncWithNewCardId(get_abi(response), formatCard, newCardId, put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_ISmartCardChallengeContext::ChangeAdministrativeKeyAsync(const Windows::Storage::Streams::IBuffer & response, const Windows::Storage::Streams::IBuffer & newAdministrativeKey) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ChangeAdministrativeKeyAsync(get(response), get(newAdministrativeKey), put(result))); + check_hresult(WINRT_SHIM(ISmartCardChallengeContext)->abi_ChangeAdministrativeKeyAsync(get_abi(response), get_abi(newAdministrativeKey), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardConnection::TransmitAsync(const Windows::Storage::Streams::IBuffer & command) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TransmitAsync(get(command), put(result))); + check_hresult(WINRT_SHIM(ISmartCardConnection)->abi_TransmitAsync(get_abi(command), put_abi(result))); return result; } template Windows::Devices::SmartCards::SmartCardTriggerType impl_ISmartCardTriggerDetails::TriggerType() const { Windows::Devices::SmartCards::SmartCardTriggerType value {}; - check_hresult(static_cast(static_cast(*this))->get_TriggerType(&value)); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails)->get_TriggerType(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardTriggerDetails::SourceAppletId() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SourceAppletId(put(value))); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails)->get_SourceAppletId(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardTriggerDetails::TriggerData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_TriggerData(put(value))); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails)->get_TriggerData(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardEmulator impl_ISmartCardTriggerDetails2::Emulator() const { Windows::Devices::SmartCards::SmartCardEmulator value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Emulator(put(value))); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails2)->get_Emulator(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardTriggerDetails2::TryLaunchCurrentAppAsync(hstring_ref arguments) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardTriggerDetails2::TryLaunchCurrentAppAsync(hstring_view arguments) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryLaunchCurrentAppAsync(get(arguments), put(result))); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails2)->abi_TryLaunchCurrentAppAsync(get_abi(arguments), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardTriggerDetails2::TryLaunchCurrentAppAsync(hstring_ref arguments, Windows::Devices::SmartCards::SmartCardLaunchBehavior behavior) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardTriggerDetails2::TryLaunchCurrentAppAsync(hstring_view arguments, Windows::Devices::SmartCards::SmartCardLaunchBehavior behavior) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryLaunchCurrentAppWithBehaviorAsync(get(arguments), behavior, put(result))); + check_hresult(WINRT_SHIM(ISmartCardTriggerDetails2)->abi_TryLaunchCurrentAppWithBehaviorAsync(get_abi(arguments), behavior, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorStatics)->abi_GetDefaultAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_ISmartCardEmulatorStatics2::GetAppletIdGroupRegistrationsAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetAppletIdGroupRegistrationsAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorStatics2)->abi_GetAppletIdGroupRegistrationsAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorStatics2::RegisterAppletIdGroupAsync(const Windows::Devices::SmartCards::SmartCardAppletIdGroup & appletIdGroup) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterAppletIdGroupAsync(get(appletIdGroup), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorStatics2)->abi_RegisterAppletIdGroupAsync(get_abi(appletIdGroup), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_ISmartCardEmulatorStatics2::UnregisterAppletIdGroupAsync(const Windows::Devices::SmartCards::SmartCardAppletIdGroupRegistration & registration) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UnregisterAppletIdGroupAsync(get(registration), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorStatics2)->abi_UnregisterAppletIdGroupAsync(get_abi(registration), put_abi(result))); return result; } template uint16_t impl_ISmartCardEmulatorStatics2::MaxAppletIdGroupRegistrations() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAppletIdGroupRegistrations(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorStatics2)->get_MaxAppletIdGroupRegistrations(&value)); return value; } template Windows::Devices::SmartCards::SmartCardEmulatorEnablementPolicy impl_ISmartCardEmulator::EnablementPolicy() const { Windows::Devices::SmartCards::SmartCardEmulatorEnablementPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_EnablementPolicy(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulator)->get_EnablementPolicy(&value)); return value; } template event_token impl_ISmartCardEmulator2::ApduReceived(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ApduReceived(get(value), &token)); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->add_ApduReceived(get_abi(value), &token)); return token; } @@ -2805,13 +2966,13 @@ template event_revoker impl_ISmartCardEmulator template void impl_ISmartCardEmulator2::ApduReceived(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_ApduReceived(value)); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->remove_ApduReceived(value)); } template event_token impl_ISmartCardEmulator2::ConnectionDeactivated(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionDeactivated(get(value), &token)); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->add_ConnectionDeactivated(get_abi(value), &token)); return token; } @@ -2822,578 +2983,578 @@ template event_revoker impl_ISmartCardEmulator template void impl_ISmartCardEmulator2::ConnectionDeactivated(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionDeactivated(value)); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->remove_ConnectionDeactivated(value)); } template void impl_ISmartCardEmulator2::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->abi_Start()); } template bool impl_ISmartCardEmulator2::IsHostCardEmulationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsHostCardEmulationSupported(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulator2)->abi_IsHostCardEmulationSupported(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardEmulatorApduReceivedEventArgs::CommandApdu() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CommandApdu(put(value))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs)->get_CommandApdu(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardEmulatorConnectionProperties impl_ISmartCardEmulatorApduReceivedEventArgs::ConnectionProperties() const { Windows::Devices::SmartCards::SmartCardEmulatorConnectionProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionProperties(put(value))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs)->get_ConnectionProperties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgs::TryRespondAsync(const Windows::Storage::Streams::IBuffer & responseApdu) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryRespondAsync(get(responseApdu), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs)->abi_TryRespondAsync(get_abi(responseApdu), put_abi(result))); return result; } template Windows::Devices::SmartCards::SmartCardAutomaticResponseStatus impl_ISmartCardEmulatorApduReceivedEventArgs::AutomaticResponseStatus() const { Windows::Devices::SmartCards::SmartCardAutomaticResponseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_AutomaticResponseStatus(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs)->get_AutomaticResponseStatus(&value)); return value; } template uint32_t impl_ISmartCardEmulatorApduReceivedEventArgs2::State() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs2)->get_State(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgs2::TryRespondAsync(const Windows::Storage::Streams::IBuffer & responseApdu, const Windows::Foundation::IReference & nextState) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgs2::TryRespondAsync(const Windows::Storage::Streams::IBuffer & responseApdu, const optional & nextState) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryRespondWithStateAsync(get(responseApdu), get(nextState), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgs2)->abi_TryRespondWithStateAsync(get_abi(responseApdu), get_abi(nextState), put_abi(result))); return result; } template GUID impl_ISmartCardEmulatorConnectionProperties::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorConnectionProperties)->get_Id(&value)); return value; } template Windows::Devices::SmartCards::SmartCardEmulatorConnectionSource impl_ISmartCardEmulatorConnectionProperties::Source() const { Windows::Devices::SmartCards::SmartCardEmulatorConnectionSource value {}; - check_hresult(static_cast(static_cast(*this))->get_Source(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorConnectionProperties)->get_Source(&value)); return value; } template Windows::Devices::SmartCards::SmartCardEmulatorConnectionProperties impl_ISmartCardEmulatorConnectionDeactivatedEventArgs::ConnectionProperties() const { Windows::Devices::SmartCards::SmartCardEmulatorConnectionProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionProperties(put(value))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorConnectionDeactivatedEventArgs)->get_ConnectionProperties(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardEmulatorConnectionDeactivatedReason impl_ISmartCardEmulatorConnectionDeactivatedEventArgs::Reason() const { Windows::Devices::SmartCards::SmartCardEmulatorConnectionDeactivatedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(ISmartCardEmulatorConnectionDeactivatedEventArgs)->get_Reason(&value)); return value; } template hstring impl_ISmartCardAppletIdGroup::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->get_DisplayName(put_abi(value))); return value; } -template void impl_ISmartCardAppletIdGroup::DisplayName(hstring_ref value) const +template void impl_ISmartCardAppletIdGroup::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->put_DisplayName(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ISmartCardAppletIdGroup::AppletIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AppletIds(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->get_AppletIds(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardEmulationCategory impl_ISmartCardAppletIdGroup::SmartCardEmulationCategory() const { Windows::Devices::SmartCards::SmartCardEmulationCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_SmartCardEmulationCategory(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->get_SmartCardEmulationCategory(&value)); return value; } template void impl_ISmartCardAppletIdGroup::SmartCardEmulationCategory(Windows::Devices::SmartCards::SmartCardEmulationCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_SmartCardEmulationCategory(value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->put_SmartCardEmulationCategory(value)); } template Windows::Devices::SmartCards::SmartCardEmulationType impl_ISmartCardAppletIdGroup::SmartCardEmulationType() const { Windows::Devices::SmartCards::SmartCardEmulationType value {}; - check_hresult(static_cast(static_cast(*this))->get_SmartCardEmulationType(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->get_SmartCardEmulationType(&value)); return value; } template void impl_ISmartCardAppletIdGroup::SmartCardEmulationType(Windows::Devices::SmartCards::SmartCardEmulationType value) const { - check_hresult(static_cast(static_cast(*this))->put_SmartCardEmulationType(value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->put_SmartCardEmulationType(value)); } template bool impl_ISmartCardAppletIdGroup::AutomaticEnablement() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutomaticEnablement(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->get_AutomaticEnablement(&value)); return value; } template void impl_ISmartCardAppletIdGroup::AutomaticEnablement(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutomaticEnablement(value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroup)->put_AutomaticEnablement(value)); } -template Windows::Devices::SmartCards::SmartCardAppletIdGroup impl_ISmartCardAppletIdGroupFactory::Create(hstring_ref displayName, const Windows::Foundation::Collections::IVector & appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType) const +template Windows::Devices::SmartCards::SmartCardAppletIdGroup impl_ISmartCardAppletIdGroupFactory::Create(hstring_view displayName, const Windows::Foundation::Collections::IVector & appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType) const { Windows::Devices::SmartCards::SmartCardAppletIdGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(displayName), get(appletIds), emulationCategory, emulationType, put(result))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupFactory)->abi_Create(get_abi(displayName), get_abi(appletIds), emulationCategory, emulationType, put_abi(result))); return result; } template uint16_t impl_ISmartCardAppletIdGroupStatics::MaxAppletIds() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAppletIds(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupStatics)->get_MaxAppletIds(&value)); return value; } template Windows::Devices::SmartCards::SmartCardAppletIdGroupActivationPolicy impl_ISmartCardAppletIdGroupRegistration::ActivationPolicy() const { Windows::Devices::SmartCards::SmartCardAppletIdGroupActivationPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivationPolicy(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupRegistration)->get_ActivationPolicy(&value)); return value; } template Windows::Devices::SmartCards::SmartCardAppletIdGroup impl_ISmartCardAppletIdGroupRegistration::AppletIdGroup() const { Windows::Devices::SmartCards::SmartCardAppletIdGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppletIdGroup(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupRegistration)->get_AppletIdGroup(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmartCardAppletIdGroupRegistration::RequestActivationPolicyChangeAsync(Windows::Devices::SmartCards::SmartCardAppletIdGroupActivationPolicy policy) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestActivationPolicyChangeAsync(policy, put(result))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupRegistration)->abi_RequestActivationPolicyChangeAsync(policy, put_abi(result))); return result; } template GUID impl_ISmartCardAppletIdGroupRegistration::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupRegistration)->get_Id(&value)); return value; } -template Windows::Foundation::IAsyncAction impl_ISmartCardAppletIdGroupRegistration::SetAutomaticResponseApdusAsync(const Windows::Foundation::Collections::IIterable & apdus) const +template Windows::Foundation::IAsyncAction impl_ISmartCardAppletIdGroupRegistration::SetAutomaticResponseApdusAsync(iterable apdus) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SetAutomaticResponseApdusAsync(get(apdus), put(result))); + check_hresult(WINRT_SHIM(ISmartCardAppletIdGroupRegistration)->abi_SetAutomaticResponseApdusAsync(get_abi(apdus), put_abi(result))); return result; } template Windows::Storage::Streams::IBuffer impl_ISmartCardAutomaticResponseApdu::CommandApdu() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CommandApdu(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->get_CommandApdu(put_abi(value))); return value; } template void impl_ISmartCardAutomaticResponseApdu::CommandApdu(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_CommandApdu(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->put_CommandApdu(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_ISmartCardAutomaticResponseApdu::CommandApduBitMask() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CommandApduBitMask(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->get_CommandApduBitMask(put_abi(value))); return value; } template void impl_ISmartCardAutomaticResponseApdu::CommandApduBitMask(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_CommandApduBitMask(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->put_CommandApduBitMask(get_abi(value))); } template bool impl_ISmartCardAutomaticResponseApdu::ShouldMatchLength() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldMatchLength(&value)); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->get_ShouldMatchLength(&value)); return value; } template void impl_ISmartCardAutomaticResponseApdu::ShouldMatchLength(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShouldMatchLength(value)); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->put_ShouldMatchLength(value)); } template Windows::Storage::Streams::IBuffer impl_ISmartCardAutomaticResponseApdu::AppletId() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_AppletId(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->get_AppletId(put_abi(value))); return value; } template void impl_ISmartCardAutomaticResponseApdu::AppletId(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppletId(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->put_AppletId(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_ISmartCardAutomaticResponseApdu::ResponseApdu() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ResponseApdu(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->get_ResponseApdu(put_abi(value))); return value; } template void impl_ISmartCardAutomaticResponseApdu::ResponseApdu(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_ResponseApdu(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu)->put_ResponseApdu(get_abi(value))); } template Windows::Foundation::IReference impl_ISmartCardAutomaticResponseApdu2::InputState() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InputState(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu2)->get_InputState(put_abi(value))); return value; } -template void impl_ISmartCardAutomaticResponseApdu2::InputState(const Windows::Foundation::IReference & value) const +template void impl_ISmartCardAutomaticResponseApdu2::InputState(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InputState(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu2)->put_InputState(get_abi(value))); } template Windows::Foundation::IReference impl_ISmartCardAutomaticResponseApdu2::OutputState() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OutputState(put(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu2)->get_OutputState(put_abi(value))); return value; } -template void impl_ISmartCardAutomaticResponseApdu2::OutputState(const Windows::Foundation::IReference & value) const +template void impl_ISmartCardAutomaticResponseApdu2::OutputState(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutputState(get(value))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu2)->put_OutputState(get_abi(value))); } template bool impl_ISmartCardAutomaticResponseApdu3::AllowWhenCryptogramGeneratorNotPrepared() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowWhenCryptogramGeneratorNotPrepared(&value)); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu3)->get_AllowWhenCryptogramGeneratorNotPrepared(&value)); return value; } template void impl_ISmartCardAutomaticResponseApdu3::AllowWhenCryptogramGeneratorNotPrepared(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowWhenCryptogramGeneratorNotPrepared(value)); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApdu3)->put_AllowWhenCryptogramGeneratorNotPrepared(value)); } template Windows::Devices::SmartCards::SmartCardAutomaticResponseApdu impl_ISmartCardAutomaticResponseApduFactory::Create(const Windows::Storage::Streams::IBuffer & commandApdu, const Windows::Storage::Streams::IBuffer & responseApdu) const { Windows::Devices::SmartCards::SmartCardAutomaticResponseApdu result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(commandApdu), get(responseApdu), put(result))); + check_hresult(WINRT_SHIM(ISmartCardAutomaticResponseApduFactory)->abi_Create(get_abi(commandApdu), get_abi(responseApdu), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms::TryRespondWithCryptogramsAsync(const Windows::Storage::Streams::IBuffer & responseTemplate, const Windows::Foundation::Collections::IIterable & cryptogramPlacementSteps) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms::TryRespondWithCryptogramsAsync(const Windows::Storage::Streams::IBuffer & responseTemplate, iterable cryptogramPlacementSteps) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryRespondWithCryptogramsAsync(get(responseTemplate), get(cryptogramPlacementSteps), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgsWithCryptograms)->abi_TryRespondWithCryptogramsAsync(get_abi(responseTemplate), get_abi(cryptogramPlacementSteps), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms::TryRespondWithCryptogramsAsync(const Windows::Storage::Streams::IBuffer & responseTemplate, const Windows::Foundation::Collections::IIterable & cryptogramPlacementSteps, const Windows::Foundation::IReference & nextState) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms::TryRespondWithCryptogramsAsync(const Windows::Storage::Streams::IBuffer & responseTemplate, iterable cryptogramPlacementSteps, const optional & nextState) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryRespondWithCryptogramsAndStateAsync(get(responseTemplate), get(cryptogramPlacementSteps), get(nextState), put(result))); + check_hresult(WINRT_SHIM(ISmartCardEmulatorApduReceivedEventArgsWithCryptograms)->abi_TryRespondWithCryptogramsAndStateAsync(get_abi(responseTemplate), get_abi(cryptogramPlacementSteps), get_abi(nextState), put_abi(result))); return result; } template Windows::Devices::SmartCards::SmartCardCryptogramGeneratorOperationStatus impl_ISmartCardCryptogramStorageKeyInfo::OperationStatus() const { Windows::Devices::SmartCards::SmartCardCryptogramGeneratorOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_OperationStatus(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_OperationStatus(&value)); return value; } template Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType impl_ISmartCardCryptogramStorageKeyInfo::PublicKeyBlobType() const { Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType value {}; - check_hresult(static_cast(static_cast(*this))->get_PublicKeyBlobType(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_PublicKeyBlobType(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardCryptogramStorageKeyInfo::PublicKey() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_PublicKey(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_PublicKey(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardCryptographicKeyAttestationStatus impl_ISmartCardCryptogramStorageKeyInfo::AttestationStatus() const { Windows::Devices::SmartCards::SmartCardCryptographicKeyAttestationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_AttestationStatus(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_AttestationStatus(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardCryptogramStorageKeyInfo::Attestation() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Attestation(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_Attestation(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardCryptogramStorageKeyInfo::AttestationCertificateChain() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_AttestationCertificateChain(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_AttestationCertificateChain(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities impl_ISmartCardCryptogramStorageKeyInfo::Capabilities() const { Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities value {}; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo)->get_Capabilities(&value)); return value; } template hstring impl_ISmartCardCryptogramStorageKeyInfo2::OperationalRequirements() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OperationalRequirements(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramStorageKeyInfo2)->get_OperationalRequirements(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardCryptogramGeneratorOperationStatus impl_ISmartCardCryptogramMaterialPossessionProof::OperationStatus() const { Windows::Devices::SmartCards::SmartCardCryptogramGeneratorOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_OperationStatus(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramMaterialPossessionProof)->get_OperationStatus(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISmartCardCryptogramMaterialPossessionProof::Proof() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Proof(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramMaterialPossessionProof)->get_Proof(put_abi(value))); return value; } template Windows::Devices::SmartCards::SmartCardCryptogramAlgorithm impl_ISmartCardCryptogramPlacementStep::Algorithm() const { Windows::Devices::SmartCards::SmartCardCryptogramAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_Algorithm(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_Algorithm(&value)); return value; } template void impl_ISmartCardCryptogramPlacementStep::Algorithm(Windows::Devices::SmartCards::SmartCardCryptogramAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_Algorithm(value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_Algorithm(value)); } template Windows::Storage::Streams::IBuffer impl_ISmartCardCryptogramPlacementStep::SourceData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SourceData(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_SourceData(put_abi(value))); return value; } template void impl_ISmartCardCryptogramPlacementStep::SourceData(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceData(get(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_SourceData(get_abi(value))); } template hstring impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialPackageName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CryptogramMaterialPackageName(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_CryptogramMaterialPackageName(put_abi(value))); return value; } -template void impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialPackageName(hstring_ref value) const +template void impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialPackageName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CryptogramMaterialPackageName(get(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_CryptogramMaterialPackageName(get_abi(value))); } template hstring impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CryptogramMaterialName(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_CryptogramMaterialName(put_abi(value))); return value; } -template void impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialName(hstring_ref value) const +template void impl_ISmartCardCryptogramPlacementStep::CryptogramMaterialName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CryptogramMaterialName(get(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_CryptogramMaterialName(get_abi(value))); } template int32_t impl_ISmartCardCryptogramPlacementStep::TemplateOffset() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TemplateOffset(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_TemplateOffset(&value)); return value; } template void impl_ISmartCardCryptogramPlacementStep::TemplateOffset(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TemplateOffset(value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_TemplateOffset(value)); } template int32_t impl_ISmartCardCryptogramPlacementStep::CryptogramOffset() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CryptogramOffset(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_CryptogramOffset(&value)); return value; } template void impl_ISmartCardCryptogramPlacementStep::CryptogramOffset(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CryptogramOffset(value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_CryptogramOffset(value)); } template int32_t impl_ISmartCardCryptogramPlacementStep::CryptogramLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CryptogramLength(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_CryptogramLength(&value)); return value; } template void impl_ISmartCardCryptogramPlacementStep::CryptogramLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CryptogramLength(value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_CryptogramLength(value)); } template Windows::Devices::SmartCards::SmartCardCryptogramPlacementOptions impl_ISmartCardCryptogramPlacementStep::CryptogramPlacementOptions() const { Windows::Devices::SmartCards::SmartCardCryptogramPlacementOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_CryptogramPlacementOptions(&value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_CryptogramPlacementOptions(&value)); return value; } template void impl_ISmartCardCryptogramPlacementStep::CryptogramPlacementOptions(Windows::Devices::SmartCards::SmartCardCryptogramPlacementOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_CryptogramPlacementOptions(value)); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_CryptogramPlacementOptions(value)); } template Windows::Devices::SmartCards::SmartCardCryptogramPlacementStep impl_ISmartCardCryptogramPlacementStep::ChainedOutputStep() const { Windows::Devices::SmartCards::SmartCardCryptogramPlacementStep value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChainedOutputStep(put(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->get_ChainedOutputStep(put_abi(value))); return value; } template void impl_ISmartCardCryptogramPlacementStep::ChainedOutputStep(const Windows::Devices::SmartCards::SmartCardCryptogramPlacementStep & value) const { - check_hresult(static_cast(static_cast(*this))->put_ChainedOutputStep(get(value))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramPlacementStep)->put_ChainedOutputStep(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGeneratorStatics::GetSmartCardCryptogramGeneratorAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetSmartCardCryptogramGeneratorAsync(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGeneratorStatics)->abi_GetSmartCardCryptogramGeneratorAsync(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_ISmartCardCryptogramGenerator::SupportedCryptogramMaterialTypes() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_SupportedCryptogramMaterialTypes(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->get_SupportedCryptogramMaterialTypes(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_ISmartCardCryptogramGenerator::SupportedCryptogramAlgorithms() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_SupportedCryptogramAlgorithms(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->get_SupportedCryptogramAlgorithms(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_ISmartCardCryptogramGenerator::SupportedCryptogramMaterialPackageFormats() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_SupportedCryptogramMaterialPackageFormats(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->get_SupportedCryptogramMaterialPackageFormats(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_ISmartCardCryptogramGenerator::SupportedCryptogramMaterialPackageConfirmationResponseFormats() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_ISmartCardCryptogramGenerator::SupportedSmartCardCryptogramStorageKeyCapabilities() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_SupportedSmartCardCryptogramStorageKeyCapabilities(put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->get_SupportedSmartCardCryptogramStorageKeyCapabilities(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::DeleteCryptogramMaterialStorageKeyAsync(hstring_ref storageKeyName) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::DeleteCryptogramMaterialStorageKeyAsync(hstring_view storageKeyName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteCryptogramMaterialStorageKeyAsync(get(storageKeyName), put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_DeleteCryptogramMaterialStorageKeyAsync(get_abi(storageKeyName), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::CreateCryptogramMaterialStorageKeyAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, hstring_ref storageKeyName, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyAlgorithm algorithm, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities capabilities) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::CreateCryptogramMaterialStorageKeyAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, hstring_view storageKeyName, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyAlgorithm algorithm, Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyCapabilities capabilities) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateCryptogramMaterialStorageKeyAsync(promptingBehavior, get(storageKeyName), algorithm, capabilities, put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_CreateCryptogramMaterialStorageKeyAsync(promptingBehavior, get_abi(storageKeyName), algorithm, capabilities, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::RequestCryptogramMaterialStorageKeyInfoAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, hstring_ref storageKeyName, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType format) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::RequestCryptogramMaterialStorageKeyInfoAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, hstring_view storageKeyName, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType format) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestCryptogramMaterialStorageKeyInfoAsync(promptingBehavior, get(storageKeyName), format, put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_RequestCryptogramMaterialStorageKeyInfoAsync(promptingBehavior, get_abi(storageKeyName), format, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::ImportCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageFormat format, hstring_ref storageKeyName, hstring_ref materialPackageName, const Windows::Storage::Streams::IBuffer & cryptogramMaterialPackage) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::ImportCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageFormat format, hstring_view storageKeyName, hstring_view materialPackageName, const Windows::Storage::Streams::IBuffer & cryptogramMaterialPackage) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ImportCryptogramMaterialPackageAsync(format, get(storageKeyName), get(materialPackageName), get(cryptogramMaterialPackage), put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_ImportCryptogramMaterialPackageAsync(format, get_abi(storageKeyName), get_abi(materialPackageName), get_abi(cryptogramMaterialPackage), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::TryProvePossessionOfCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageConfirmationResponseFormat responseFormat, hstring_ref materialPackageName, hstring_ref materialName, const Windows::Storage::Streams::IBuffer & challenge) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::TryProvePossessionOfCryptogramMaterialPackageAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior, Windows::Devices::SmartCards::SmartCardCryptogramMaterialPackageConfirmationResponseFormat responseFormat, hstring_view materialPackageName, hstring_view materialName, const Windows::Storage::Streams::IBuffer & challenge) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_TryProvePossessionOfCryptogramMaterialPackageAsync(promptingBehavior, responseFormat, get(materialPackageName), get(materialName), get(challenge), put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_TryProvePossessionOfCryptogramMaterialPackageAsync(promptingBehavior, responseFormat, get_abi(materialPackageName), get_abi(materialName), get_abi(challenge), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::RequestUnlockCryptogramMaterialForUseAsync(Windows::Devices::SmartCards::SmartCardUnlockPromptingBehavior promptingBehavior) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestUnlockCryptogramMaterialForUseAsync(promptingBehavior, put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_RequestUnlockCryptogramMaterialForUseAsync(promptingBehavior, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::DeleteCryptogramMaterialPackageAsync(hstring_ref materialPackageName) const +template Windows::Foundation::IAsyncOperation impl_ISmartCardCryptogramGenerator::DeleteCryptogramMaterialPackageAsync(hstring_view materialPackageName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteCryptogramMaterialPackageAsync(get(materialPackageName), put(result))); + check_hresult(WINRT_SHIM(ISmartCardCryptogramGenerator)->abi_DeleteCryptogramMaterialPackageAsync(get_abi(materialPackageName), put_abi(result))); return result; } @@ -3401,7 +3562,7 @@ inline SmartCardAppletIdGroup::SmartCardAppletIdGroup() : SmartCardAppletIdGroup(activate_instance()) {} -inline SmartCardAppletIdGroup::SmartCardAppletIdGroup(hstring_ref displayName, const Windows::Foundation::Collections::IVector & appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType) : +inline SmartCardAppletIdGroup::SmartCardAppletIdGroup(hstring_view displayName, const Windows::Foundation::Collections::IVector & appletIds, Windows::Devices::SmartCards::SmartCardEmulationCategory emulationCategory, Windows::Devices::SmartCards::SmartCardEmulationType emulationType) : SmartCardAppletIdGroup(get_activation_factory().Create(displayName, appletIds, emulationCategory, emulationType)) {} @@ -3457,12 +3618,12 @@ inline Windows::Foundation::IAsyncOperation().FromSmartCardAsync(card); } -inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) +inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) { return get_activation_factory().RequestVirtualSmartCardCreationAsync(friendlyName, administrativeKey, pinPolicy); } -inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) +inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) { return get_activation_factory().RequestVirtualSmartCardCreationAsync(friendlyName, administrativeKey, pinPolicy, cardId); } @@ -3472,12 +3633,12 @@ inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::Request return get_activation_factory().RequestVirtualSmartCardDeletionAsync(card); } -inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestAttestedVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) +inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestAttestedVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy) { return get_activation_factory().RequestAttestedVirtualSmartCardCreationAsync(friendlyName, administrativeKey, pinPolicy); } -inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestAttestedVirtualSmartCardCreationAsync(hstring_ref friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) +inline Windows::Foundation::IAsyncOperation SmartCardProvisioning::RequestAttestedVirtualSmartCardCreationAsync(hstring_view friendlyName, const Windows::Storage::Streams::IBuffer & administrativeKey, const Windows::Devices::SmartCards::SmartCardPinPolicy & pinPolicy, GUID cardId) { return get_activation_factory().RequestAttestedVirtualSmartCardCreationAsync(friendlyName, administrativeKey, pinPolicy, cardId); } @@ -3492,7 +3653,7 @@ inline hstring SmartCardReader::GetDeviceSelector(Windows::Devices::SmartCards:: return get_activation_factory().GetDeviceSelector(kind); } -inline Windows::Foundation::IAsyncOperation SmartCardReader::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation SmartCardReader::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -3500,3 +3661,563 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ICardAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ICardRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCard & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAppletIdGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAppletIdGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAppletIdGroupRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAppletIdGroupStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAutomaticResponseApdu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAutomaticResponseApdu2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAutomaticResponseApdu3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardAutomaticResponseApduFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardChallengeContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardConnect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramGeneratorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramMaterialPossessionProof & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramPlacementStep & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramStorageKeyInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardCryptogramStorageKeyInfo2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulator2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorApduReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorApduReceivedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorApduReceivedEventArgsWithCryptograms & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorConnectionDeactivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorConnectionProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardEmulatorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardPinPolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardPinResetDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardPinResetRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardProvisioning & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardProvisioning2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardProvisioningStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardProvisioningStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardReaderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::ISmartCardTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::CardAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::CardRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCard & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardAppletIdGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardAppletIdGroupRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardAutomaticResponseApdu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardChallengeContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardCryptogramGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardCryptogramMaterialPossessionProof & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardCryptogramPlacementStep & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardCryptogramStorageKeyInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardEmulator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardEmulatorApduReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardEmulatorConnectionDeactivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardEmulatorConnectionProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardPinPolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardPinResetDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardPinResetRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardProvisioning & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::SmartCards::SmartCardTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Sms.h b/10.0.14393.0/winrt/Windows.Devices.Sms.h index 83266dd2c..be04b1831 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Sms.h +++ b/10.0.14393.0/winrt/Windows.Devices.Sms.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -28,7 +31,7 @@ template SmsDeviceStatusChangedEventHandler::SmsDeviceS inline void SmsDeviceStatusChangedEventHandler::operator()(const Windows::Devices::Sms::SmsDevice & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template SmsMessageReceivedEventHandler::SmsMessageReceivedEventHandler(L lambda) : @@ -45,7 +48,7 @@ template SmsMessageReceivedEventHandler::SmsMessageRece inline void SmsMessageReceivedEventHandler::operator()(const Windows::Devices::Sms::SmsDevice & sender, const Windows::Devices::Sms::SmsMessageReceivedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -55,11 +58,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -68,11 +72,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -82,10 +87,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_To(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().To(*reinterpret_cast(&value)); return S_OK; } @@ -95,11 +101,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -109,11 +116,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -123,10 +131,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Body(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Body(*reinterpret_cast(&value)); return S_OK; } @@ -136,11 +145,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CallbackNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallbackNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallbackNumber()); return S_OK; } catch (...) @@ -150,10 +160,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CallbackNumber(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CallbackNumber(*reinterpret_cast(&value)); return S_OK; } @@ -167,7 +178,8 @@ struct produce : produce_baseshim().IsDeliveryNotificationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeliveryNotificationEnabled()); return S_OK; } catch (...) @@ -180,6 +192,7 @@ struct produce : produce_baseshim()); this->shim().IsDeliveryNotificationEnabled(value); return S_OK; } @@ -193,7 +206,8 @@ struct produce : produce_baseshim().RetryAttemptCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetryAttemptCount()); return S_OK; } catch (...) @@ -206,6 +220,7 @@ struct produce : produce_baseshim()); this->shim().RetryAttemptCount(value); return S_OK; } @@ -219,7 +234,8 @@ struct produce : produce_baseshim().Encoding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Encoding()); return S_OK; } catch (...) @@ -232,6 +248,7 @@ struct produce : produce_baseshim()); this->shim().Encoding(value); return S_OK; } @@ -245,7 +262,8 @@ struct produce : produce_baseshim().PortNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PortNumber()); return S_OK; } catch (...) @@ -258,6 +276,7 @@ struct produce : produce_baseshim()); this->shim().PortNumber(value); return S_OK; } @@ -271,7 +290,8 @@ struct produce : produce_baseshim().TeleserviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TeleserviceId()); return S_OK; } catch (...) @@ -284,6 +304,7 @@ struct produce : produce_baseshim()); this->shim().TeleserviceId(value); return S_OK; } @@ -297,7 +318,8 @@ struct produce : produce_baseshim().ProtocolId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolId()); return S_OK; } catch (...) @@ -310,6 +332,7 @@ struct produce : produce_baseshim()); this->shim().ProtocolId(value); return S_OK; } @@ -319,11 +342,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BinaryBody(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BinaryBody()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BinaryBody()); return S_OK; } catch (...) @@ -333,10 +357,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BinaryBody(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BinaryBody(*reinterpret_cast(&value)); return S_OK; } @@ -354,7 +379,8 @@ struct produce : produce_baseshim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -367,6 +393,7 @@ struct produce : produce_baseshim()); this->shim().Format(value); return S_OK; } @@ -376,11 +403,12 @@ struct produce : produce_base * value) noexcept override + HRESULT __stdcall abi_GetData(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().GetData()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().GetData()); return S_OK; } catch (...) @@ -391,11 +419,12 @@ struct produce : produce_base * value) noexcept override + HRESULT __stdcall abi_SetData(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetData(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetData(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -408,11 +437,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -421,11 +451,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -435,11 +466,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -453,7 +485,8 @@ struct produce : produce_baseshim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -466,7 +499,8 @@ struct produce : produce_baseshim().GeographicalScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeographicalScope()); return S_OK; } catch (...) @@ -479,7 +513,8 @@ struct produce : produce_baseshim().MessageCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageCode()); return S_OK; } catch (...) @@ -492,7 +527,8 @@ struct produce : produce_baseshim().UpdateNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateNumber()); return S_OK; } catch (...) @@ -505,7 +541,8 @@ struct produce : produce_baseshim().BroadcastType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BroadcastType()); return S_OK; } catch (...) @@ -518,7 +555,8 @@ struct produce : produce_baseshim().IsEmergencyAlert()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEmergencyAlert()); return S_OK; } catch (...) @@ -531,7 +569,8 @@ struct produce : produce_baseshim().IsUserPopupRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUserPopupRequested()); return S_OK; } catch (...) @@ -544,11 +583,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SendMessageAsync(abi_arg_in message, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SendMessageAsync(impl::abi_arg_in message, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SendMessageAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SendMessageAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -558,11 +598,12 @@ struct produce : produce_base message, abi_arg_out encodedLength) noexcept override + HRESULT __stdcall abi_CalculateLength(impl::abi_arg_in message, impl::abi_arg_out encodedLength) noexcept override { try { - *encodedLength = detach(this->shim().CalculateLength(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *encodedLength = detach_abi(this->shim().CalculateLength(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -571,11 +612,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AccountPhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountPhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountPhoneNumber()); return S_OK; } catch (...) @@ -589,7 +631,8 @@ struct produce : produce_baseshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -598,11 +641,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MessageStore(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageStore()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageStore()); return S_OK; } catch (...) @@ -616,7 +660,8 @@ struct produce : produce_baseshim().DeviceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceStatus()); return S_OK; } catch (...) @@ -625,11 +670,12 @@ struct produce : produce_base eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_SmsMessageReceived(impl::abi_arg_in eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().SmsMessageReceived(*reinterpret_cast(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().SmsMessageReceived(*reinterpret_cast(&eventHandler))); return S_OK; } catch (...) @@ -642,6 +688,7 @@ struct produce : produce_baseshim()); this->shim().SmsMessageReceived(eventCookie); return S_OK; } @@ -651,11 +698,12 @@ struct produce : produce_base eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_SmsDeviceStatusChanged(impl::abi_arg_in eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().SmsDeviceStatusChanged(*reinterpret_cast(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().SmsDeviceStatusChanged(*reinterpret_cast(&eventHandler))); return S_OK; } catch (...) @@ -668,6 +716,7 @@ struct produce : produce_baseshim()); this->shim().SmsDeviceStatusChanged(eventCookie); return S_OK; } @@ -681,11 +730,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SmscAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmscAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmscAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmscAddress()); return S_OK; } catch (...) @@ -695,10 +745,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SmscAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SmscAddress(*reinterpret_cast(&value)); return S_OK; } @@ -708,11 +759,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -722,11 +774,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ParentDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentDeviceId()); return S_OK; } catch (...) @@ -736,11 +789,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AccountPhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountPhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountPhoneNumber()); return S_OK; } catch (...) @@ -754,7 +808,8 @@ struct produce : produce_baseshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -767,7 +822,8 @@ struct produce : produce_baseshim().DeviceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceStatus()); return S_OK; } catch (...) @@ -776,11 +832,12 @@ struct produce : produce_base message, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CalculateLength(impl::abi_arg_in message, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalculateLength(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalculateLength(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -789,11 +846,12 @@ struct produce : produce_base message, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_SendMessageAndGetResultAsync(impl::abi_arg_in message, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SendMessageAndGetResultAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SendMessageAndGetResultAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -803,11 +861,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_DeviceStatusChanged(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().DeviceStatusChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().DeviceStatusChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -820,6 +879,7 @@ struct produce : produce_baseshim()); this->shim().DeviceStatusChanged(eventCookie); return S_OK; } @@ -833,11 +893,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -847,11 +908,12 @@ struct produce : produce_base deviceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in deviceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -861,11 +923,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -875,11 +938,12 @@ struct produce : produce_base parentDeviceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromParentId(impl::abi_arg_in parentDeviceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromParentId(*reinterpret_cast(&parentDeviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromParentId(*reinterpret_cast(&parentDeviceId))); return S_OK; } catch (...) @@ -893,11 +957,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_DeleteMessageAsync(uint32_t messageId, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_DeleteMessageAsync(uint32_t messageId, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().DeleteMessageAsync(messageId)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().DeleteMessageAsync(messageId)); return S_OK; } catch (...) @@ -907,11 +972,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_DeleteMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_DeleteMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().DeleteMessagesAsync(messageFilter)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().DeleteMessagesAsync(messageFilter)); return S_OK; } catch (...) @@ -921,11 +987,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMessageAsync(uint32_t messageId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetMessageAsync(uint32_t messageId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetMessageAsync(messageId)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetMessageAsync(messageId)); return S_OK; } catch (...) @@ -935,11 +1002,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter, abi_arg_out, int32_t>> asyncInfo) noexcept override + HRESULT __stdcall abi_GetMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter, impl::abi_arg_out, int32_t>> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetMessagesAsync(messageFilter)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetMessagesAsync(messageFilter)); return S_OK; } catch (...) @@ -953,7 +1021,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().MaxMessages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxMessages()); return S_OK; } catch (...) @@ -966,11 +1035,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out phstrDeviceClassSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out phstrDeviceClassSelector) noexcept override { try { - *phstrDeviceClassSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *phstrDeviceClassSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -980,11 +1050,12 @@ struct produce : produce_base deviceId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -994,11 +1065,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -1012,11 +1084,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromNetworkAccountIdAsync(abi_arg_in networkAccountId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FromNetworkAccountIdAsync(impl::abi_arg_in networkAccountId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FromNetworkAccountIdAsync(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FromNetworkAccountIdAsync(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -1034,7 +1107,8 @@ struct produce : produce_baseshim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -1043,11 +1117,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ImsiPrefixes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ImsiPrefixes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImsiPrefixes()); return S_OK; } catch (...) @@ -1057,11 +1132,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DeviceIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeviceIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceIds()); return S_OK; } catch (...) @@ -1071,11 +1147,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SenderNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SenderNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SenderNumbers()); return S_OK; } catch (...) @@ -1085,11 +1162,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_TextMessagePrefixes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TextMessagePrefixes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextMessagePrefixes()); return S_OK; } catch (...) @@ -1099,11 +1177,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_PortNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PortNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PortNumbers()); return S_OK; } catch (...) @@ -1117,7 +1196,8 @@ struct produce : produce_baseshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -1130,6 +1210,7 @@ struct produce : produce_baseshim()); this->shim().CellularClass(value); return S_OK; } @@ -1139,11 +1220,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ProtocolIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProtocolIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolIds()); return S_OK; } catch (...) @@ -1153,11 +1235,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_TeleserviceIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TeleserviceIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TeleserviceIds()); return S_OK; } catch (...) @@ -1167,11 +1250,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_WapApplicationIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WapApplicationIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WapApplicationIds()); return S_OK; } catch (...) @@ -1181,11 +1265,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_WapContentTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WapContentTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WapContentTypes()); return S_OK; } catch (...) @@ -1195,11 +1280,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BroadcastTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BroadcastTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BroadcastTypes()); return S_OK; } catch (...) @@ -1209,11 +1295,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BroadcastChannels(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BroadcastChannels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BroadcastChannels()); return S_OK; } catch (...) @@ -1227,11 +1314,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFilterRule(Windows::Devices::Sms::SmsMessageType messageType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFilterRule(Windows::Devices::Sms::SmsMessageType messageType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFilterRule(messageType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFilterRule(messageType)); return S_OK; } catch (...) @@ -1249,7 +1337,8 @@ struct produce : produce_baseshim().ActionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActionType()); return S_OK; } catch (...) @@ -1258,11 +1347,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Rules(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Rules()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rules()); return S_OK; } catch (...) @@ -1276,11 +1366,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFilterRules(Windows::Devices::Sms::SmsFilterActionType actionType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFilterRules(Windows::Devices::Sms::SmsFilterActionType actionType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFilterRules(actionType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFilterRules(actionType)); return S_OK; } catch (...) @@ -1298,7 +1389,8 @@ struct produce : produce_baseshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1311,7 +1403,8 @@ struct produce : produce_baseshim().MessageClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageClass()); return S_OK; } catch (...) @@ -1328,7 +1421,8 @@ struct produce : produce_baseshim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -1337,11 +1431,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1355,7 +1450,8 @@ struct produce : produce_baseshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -1368,7 +1464,8 @@ struct produce : produce_baseshim().MessageClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageClass()); return S_OK; } catch (...) @@ -1377,11 +1474,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SimIccId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SimIccId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SimIccId()); return S_OK; } catch (...) @@ -1395,11 +1493,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TextMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextMessage()); return S_OK; } catch (...) @@ -1409,11 +1508,12 @@ struct produce : produce } } - HRESULT __stdcall get_BinaryMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_BinaryMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BinaryMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BinaryMessage()); return S_OK; } catch (...) @@ -1431,7 +1531,8 @@ struct produce : pr { try { - *value = detach(this->shim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -1440,11 +1541,12 @@ struct produce : pr } } - HRESULT __stdcall get_TextMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextMessage()); return S_OK; } catch (...) @@ -1454,11 +1556,12 @@ struct produce : pr } } - HRESULT __stdcall get_WapMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_WapMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WapMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WapMessage()); return S_OK; } catch (...) @@ -1468,11 +1571,12 @@ struct produce : pr } } - HRESULT __stdcall get_AppMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppMessage()); return S_OK; } catch (...) @@ -1482,11 +1586,12 @@ struct produce : pr } } - HRESULT __stdcall get_BroadcastMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_BroadcastMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BroadcastMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BroadcastMessage()); return S_OK; } catch (...) @@ -1496,11 +1601,12 @@ struct produce : pr } } - HRESULT __stdcall get_VoicemailMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_VoicemailMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VoicemailMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VoicemailMessage()); return S_OK; } catch (...) @@ -1510,11 +1616,12 @@ struct produce : pr } } - HRESULT __stdcall get_StatusMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_StatusMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StatusMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatusMessage()); return S_OK; } catch (...) @@ -1528,6 +1635,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Drop(); return S_OK; } @@ -1541,6 +1649,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Accept(); return S_OK; } @@ -1554,11 +1663,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1572,6 +1682,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Unregister(); return S_OK; } @@ -1581,11 +1692,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_MessageReceived(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_MessageReceived(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1598,6 +1710,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(eventCookie); return S_OK; } @@ -1611,11 +1724,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_AllRegistrations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AllRegistrations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllRegistrations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllRegistrations()); return S_OK; } catch (...) @@ -1625,11 +1739,12 @@ struct produce : produ } } - HRESULT __stdcall abi_Register(abi_arg_in id, abi_arg_in filterRules, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Register(impl::abi_arg_in id, impl::abi_arg_in filterRules, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Register(*reinterpret_cast(&id), *reinterpret_cast(&filterRules))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Register(*reinterpret_cast(&id), *reinterpret_cast(&filterRules))); return S_OK; } catch (...) @@ -1643,11 +1758,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1661,7 +1777,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MessageIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageIndex()); return S_OK; } catch (...) @@ -1678,7 +1795,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().MessageClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageClass()); return S_OK; } catch (...) @@ -1687,11 +1805,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_BinaryMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_BinaryMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BinaryMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BinaryMessage()); return S_OK; } catch (...) @@ -1709,7 +1828,8 @@ struct produce : produce_baseshim().IsSuccessful()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuccessful()); return S_OK; } catch (...) @@ -1718,11 +1838,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_MessageReferenceNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MessageReferenceNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageReferenceNumbers()); return S_OK; } catch (...) @@ -1736,7 +1857,8 @@ struct produce : produce_baseshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -1749,7 +1871,8 @@ struct produce : produce_baseshim().ModemErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModemErrorCode()); return S_OK; } catch (...) @@ -1762,7 +1885,8 @@ struct produce : produce_baseshim().IsErrorTransient()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsErrorTransient()); return S_OK; } catch (...) @@ -1775,7 +1899,8 @@ struct produce : produce_baseshim().NetworkCauseCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkCauseCode()); return S_OK; } catch (...) @@ -1788,7 +1913,8 @@ struct produce : produce_baseshim().TransportFailureCause()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportFailureCause()); return S_OK; } catch (...) @@ -1801,11 +1927,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_To(abi_arg_out value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -1815,11 +1942,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -1829,11 +1957,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -1847,7 +1976,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1860,7 +1990,8 @@ struct produce : produce_baseshim().MessageReferenceNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageReferenceNumber()); return S_OK; } catch (...) @@ -1869,11 +2000,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ServiceCenterTimestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceCenterTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceCenterTimestamp()); return S_OK; } catch (...) @@ -1882,11 +2014,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DischargeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DischargeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DischargeTime()); return S_OK; } catch (...) @@ -1899,11 +2032,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1916,7 +2050,8 @@ struct produce : produce_baseshim().PartReferenceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartReferenceId()); return S_OK; } catch (...) @@ -1929,7 +2064,8 @@ struct produce : produce_baseshim().PartNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartNumber()); return S_OK; } catch (...) @@ -1942,7 +2078,8 @@ struct produce : produce_baseshim().PartCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartCount()); return S_OK; } catch (...) @@ -1951,11 +2088,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -1965,10 +2103,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_To(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().To(*reinterpret_cast(&value)); return S_OK; } @@ -1978,11 +2117,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -1992,10 +2132,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_From(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().From(*reinterpret_cast(&value)); return S_OK; } @@ -2005,11 +2146,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -2019,10 +2161,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Body(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Body(*reinterpret_cast(&value)); return S_OK; } @@ -2036,7 +2179,8 @@ struct produce : produce_baseshim().Encoding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Encoding()); return S_OK; } catch (...) @@ -2049,6 +2193,7 @@ struct produce : produce_baseshim()); this->shim().Encoding(value); return S_OK; } @@ -2058,11 +2203,12 @@ struct produce : produce_base> messages) noexcept override + HRESULT __stdcall abi_ToBinaryMessages(Windows::Devices::Sms::SmsDataFormat format, impl::abi_arg_out> messages) noexcept override { try { - *messages = detach(this->shim().ToBinaryMessages(format)); + typename D::abi_guard guard(this->shim()); + *messages = detach_abi(this->shim().ToBinaryMessages(format)); return S_OK; } catch (...) @@ -2076,11 +2222,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2089,11 +2236,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -2103,10 +2251,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_To(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().To(*reinterpret_cast(&value)); return S_OK; } @@ -2116,11 +2265,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -2130,11 +2280,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -2144,10 +2295,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Body(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Body(*reinterpret_cast(&value)); return S_OK; } @@ -2161,7 +2313,8 @@ struct produce : produce_baseshim().Encoding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Encoding()); return S_OK; } catch (...) @@ -2174,6 +2327,7 @@ struct produce : produce_baseshim()); this->shim().Encoding(value); return S_OK; } @@ -2183,11 +2337,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CallbackNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallbackNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallbackNumber()); return S_OK; } catch (...) @@ -2197,10 +2352,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CallbackNumber(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CallbackNumber(*reinterpret_cast(&value)); return S_OK; } @@ -2214,7 +2370,8 @@ struct produce : produce_baseshim().IsDeliveryNotificationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeliveryNotificationEnabled()); return S_OK; } catch (...) @@ -2227,6 +2384,7 @@ struct produce : produce_baseshim()); this->shim().IsDeliveryNotificationEnabled(value); return S_OK; } @@ -2240,7 +2398,8 @@ struct produce : produce_baseshim().RetryAttemptCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetryAttemptCount()); return S_OK; } catch (...) @@ -2253,6 +2412,7 @@ struct produce : produce_baseshim()); this->shim().RetryAttemptCount(value); return S_OK; } @@ -2266,7 +2426,8 @@ struct produce : produce_baseshim().TeleserviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TeleserviceId()); return S_OK; } catch (...) @@ -2279,7 +2440,8 @@ struct produce : produce_baseshim().ProtocolId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolId()); return S_OK; } catch (...) @@ -2292,11 +2454,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromBinaryMessage(abi_arg_in binaryMessage, abi_arg_out textMessage) noexcept override + HRESULT __stdcall abi_FromBinaryMessage(impl::abi_arg_in binaryMessage, impl::abi_arg_out textMessage) noexcept override { try { - *textMessage = detach(this->shim().FromBinaryMessage(*reinterpret_cast(&binaryMessage))); + typename D::abi_guard guard(this->shim()); + *textMessage = detach_abi(this->shim().FromBinaryMessage(*reinterpret_cast(&binaryMessage))); return S_OK; } catch (...) @@ -2306,11 +2469,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, uint32_t __valueSize, abi_arg_in * value, abi_arg_out textMessage) noexcept override + HRESULT __stdcall abi_FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, uint32_t __valueSize, impl::abi_arg_in * value, impl::abi_arg_out textMessage) noexcept override { try { - *textMessage = detach(this->shim().FromBinaryData(format, array_ref(value, value + __valueSize))); + typename D::abi_guard guard(this->shim()); + *textMessage = detach_abi(this->shim().FromBinaryData(format, array_view(value, value + __valueSize))); return S_OK; } catch (...) @@ -2324,11 +2488,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2337,11 +2502,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -2351,11 +2517,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -2365,11 +2532,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_MessageCount(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MessageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageCount()); return S_OK; } catch (...) @@ -2383,11 +2551,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2396,11 +2565,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_To(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().To()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().To()); return S_OK; } catch (...) @@ -2410,11 +2580,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_From(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().From()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().From()); return S_OK; } catch (...) @@ -2424,11 +2595,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ApplicationId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationId()); return S_OK; } catch (...) @@ -2438,11 +2610,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -2452,11 +2625,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BinaryBody(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BinaryBody()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BinaryBody()); return S_OK; } catch (...) @@ -2466,11 +2640,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Headers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Headers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Headers()); return S_OK; } catch (...) @@ -2488,836 +2663,836 @@ namespace Windows::Devices::Sms { template Windows::Devices::Sms::SmsMessageType impl_ISmsMessageBase::MessageType() const { Windows::Devices::Sms::SmsMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageType(&value)); + check_hresult(WINRT_SHIM(ISmsMessageBase)->get_MessageType(&value)); return value; } template hstring impl_ISmsMessageBase::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageBase)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_ISmsMessageBase::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(ISmsMessageBase)->get_CellularClass(&value)); return value; } template Windows::Devices::Sms::SmsMessageClass impl_ISmsMessageBase::MessageClass() const { Windows::Devices::Sms::SmsMessageClass value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageClass(&value)); + check_hresult(WINRT_SHIM(ISmsMessageBase)->get_MessageClass(&value)); return value; } template hstring impl_ISmsMessageBase::SimIccId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SimIccId(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageBase)->get_SimIccId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISmsTextMessage2::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_Timestamp(put_abi(value))); return value; } template hstring impl_ISmsTextMessage2::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_To(put_abi(value))); return value; } -template void impl_ISmsTextMessage2::To(hstring_ref value) const +template void impl_ISmsTextMessage2::To(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_To(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_To(get_abi(value))); } template hstring impl_ISmsTextMessage2::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_From(put_abi(value))); return value; } template hstring impl_ISmsTextMessage2::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_Body(put_abi(value))); return value; } -template void impl_ISmsTextMessage2::Body(hstring_ref value) const +template void impl_ISmsTextMessage2::Body(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Body(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_Body(get_abi(value))); } template Windows::Devices::Sms::SmsEncoding impl_ISmsTextMessage2::Encoding() const { Windows::Devices::Sms::SmsEncoding value {}; - check_hresult(static_cast(static_cast(*this))->get_Encoding(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_Encoding(&value)); return value; } template void impl_ISmsTextMessage2::Encoding(Windows::Devices::Sms::SmsEncoding value) const { - check_hresult(static_cast(static_cast(*this))->put_Encoding(value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_Encoding(value)); } template hstring impl_ISmsTextMessage2::CallbackNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallbackNumber(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_CallbackNumber(put_abi(value))); return value; } -template void impl_ISmsTextMessage2::CallbackNumber(hstring_ref value) const +template void impl_ISmsTextMessage2::CallbackNumber(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CallbackNumber(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_CallbackNumber(get_abi(value))); } template bool impl_ISmsTextMessage2::IsDeliveryNotificationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDeliveryNotificationEnabled(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_IsDeliveryNotificationEnabled(&value)); return value; } template void impl_ISmsTextMessage2::IsDeliveryNotificationEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDeliveryNotificationEnabled(value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_IsDeliveryNotificationEnabled(value)); } template int32_t impl_ISmsTextMessage2::RetryAttemptCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RetryAttemptCount(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_RetryAttemptCount(&value)); return value; } template void impl_ISmsTextMessage2::RetryAttemptCount(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_RetryAttemptCount(value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->put_RetryAttemptCount(value)); } template int32_t impl_ISmsTextMessage2::TeleserviceId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TeleserviceId(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_TeleserviceId(&value)); return value; } template int32_t impl_ISmsTextMessage2::ProtocolId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtocolId(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage2)->get_ProtocolId(&value)); return value; } template Windows::Foundation::DateTime impl_ISmsWapMessage::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_Timestamp(put_abi(value))); return value; } template hstring impl_ISmsWapMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_To(put_abi(value))); return value; } template hstring impl_ISmsWapMessage::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_From(put_abi(value))); return value; } template hstring impl_ISmsWapMessage::ApplicationId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationId(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_ApplicationId(put_abi(value))); return value; } template hstring impl_ISmsWapMessage::ContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentType(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_ContentType(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISmsWapMessage::BinaryBody() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_BinaryBody(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_BinaryBody(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_ISmsWapMessage::Headers() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Headers(put(value))); + check_hresult(WINRT_SHIM(ISmsWapMessage)->get_Headers(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISmsAppMessage::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_Timestamp(put_abi(value))); return value; } template hstring impl_ISmsAppMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_To(put_abi(value))); return value; } -template void impl_ISmsAppMessage::To(hstring_ref value) const +template void impl_ISmsAppMessage::To(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_To(get(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_To(get_abi(value))); } template hstring impl_ISmsAppMessage::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_From(put_abi(value))); return value; } template hstring impl_ISmsAppMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_Body(put_abi(value))); return value; } -template void impl_ISmsAppMessage::Body(hstring_ref value) const +template void impl_ISmsAppMessage::Body(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Body(get(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_Body(get_abi(value))); } template hstring impl_ISmsAppMessage::CallbackNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CallbackNumber(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_CallbackNumber(put_abi(value))); return value; } -template void impl_ISmsAppMessage::CallbackNumber(hstring_ref value) const +template void impl_ISmsAppMessage::CallbackNumber(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CallbackNumber(get(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_CallbackNumber(get_abi(value))); } template bool impl_ISmsAppMessage::IsDeliveryNotificationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDeliveryNotificationEnabled(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_IsDeliveryNotificationEnabled(&value)); return value; } template void impl_ISmsAppMessage::IsDeliveryNotificationEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDeliveryNotificationEnabled(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_IsDeliveryNotificationEnabled(value)); } template int32_t impl_ISmsAppMessage::RetryAttemptCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RetryAttemptCount(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_RetryAttemptCount(&value)); return value; } template void impl_ISmsAppMessage::RetryAttemptCount(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_RetryAttemptCount(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_RetryAttemptCount(value)); } template Windows::Devices::Sms::SmsEncoding impl_ISmsAppMessage::Encoding() const { Windows::Devices::Sms::SmsEncoding value {}; - check_hresult(static_cast(static_cast(*this))->get_Encoding(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_Encoding(&value)); return value; } template void impl_ISmsAppMessage::Encoding(Windows::Devices::Sms::SmsEncoding value) const { - check_hresult(static_cast(static_cast(*this))->put_Encoding(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_Encoding(value)); } template int32_t impl_ISmsAppMessage::PortNumber() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PortNumber(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_PortNumber(&value)); return value; } template void impl_ISmsAppMessage::PortNumber(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PortNumber(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_PortNumber(value)); } template int32_t impl_ISmsAppMessage::TeleserviceId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TeleserviceId(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_TeleserviceId(&value)); return value; } template void impl_ISmsAppMessage::TeleserviceId(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TeleserviceId(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_TeleserviceId(value)); } template int32_t impl_ISmsAppMessage::ProtocolId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtocolId(&value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_ProtocolId(&value)); return value; } template void impl_ISmsAppMessage::ProtocolId(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtocolId(value)); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_ProtocolId(value)); } template Windows::Storage::Streams::IBuffer impl_ISmsAppMessage::BinaryBody() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_BinaryBody(put(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->get_BinaryBody(put_abi(value))); return value; } template void impl_ISmsAppMessage::BinaryBody(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_BinaryBody(get(value))); + check_hresult(WINRT_SHIM(ISmsAppMessage)->put_BinaryBody(get_abi(value))); } template Windows::Foundation::DateTime impl_ISmsBroadcastMessage::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_Timestamp(put_abi(value))); return value; } template hstring impl_ISmsBroadcastMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_To(put_abi(value))); return value; } template hstring impl_ISmsBroadcastMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_Body(put_abi(value))); return value; } template int32_t impl_ISmsBroadcastMessage::Channel() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Channel(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_Channel(&value)); return value; } template Windows::Devices::Sms::SmsGeographicalScope impl_ISmsBroadcastMessage::GeographicalScope() const { Windows::Devices::Sms::SmsGeographicalScope value {}; - check_hresult(static_cast(static_cast(*this))->get_GeographicalScope(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_GeographicalScope(&value)); return value; } template int32_t impl_ISmsBroadcastMessage::MessageCode() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageCode(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_MessageCode(&value)); return value; } template int32_t impl_ISmsBroadcastMessage::UpdateNumber() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateNumber(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_UpdateNumber(&value)); return value; } template Windows::Devices::Sms::SmsBroadcastType impl_ISmsBroadcastMessage::BroadcastType() const { Windows::Devices::Sms::SmsBroadcastType value {}; - check_hresult(static_cast(static_cast(*this))->get_BroadcastType(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_BroadcastType(&value)); return value; } template bool impl_ISmsBroadcastMessage::IsEmergencyAlert() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEmergencyAlert(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_IsEmergencyAlert(&value)); return value; } template bool impl_ISmsBroadcastMessage::IsUserPopupRequested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUserPopupRequested(&value)); + check_hresult(WINRT_SHIM(ISmsBroadcastMessage)->get_IsUserPopupRequested(&value)); return value; } template Windows::Foundation::DateTime impl_ISmsVoicemailMessage::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsVoicemailMessage)->get_Timestamp(put_abi(value))); return value; } template hstring impl_ISmsVoicemailMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsVoicemailMessage)->get_To(put_abi(value))); return value; } template hstring impl_ISmsVoicemailMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsVoicemailMessage)->get_Body(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISmsVoicemailMessage::MessageCount() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MessageCount(put(value))); + check_hresult(WINRT_SHIM(ISmsVoicemailMessage)->get_MessageCount(put_abi(value))); return value; } template hstring impl_ISmsStatusMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_To(put_abi(value))); return value; } template hstring impl_ISmsStatusMessage::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_From(put_abi(value))); return value; } template hstring impl_ISmsStatusMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_Body(put_abi(value))); return value; } template int32_t impl_ISmsStatusMessage::Status() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_Status(&value)); return value; } template int32_t impl_ISmsStatusMessage::MessageReferenceNumber() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageReferenceNumber(&value)); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_MessageReferenceNumber(&value)); return value; } template Windows::Foundation::DateTime impl_ISmsStatusMessage::ServiceCenterTimestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceCenterTimestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_ServiceCenterTimestamp(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ISmsStatusMessage::DischargeTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DischargeTime(put(value))); + check_hresult(WINRT_SHIM(ISmsStatusMessage)->get_DischargeTime(put_abi(value))); return value; } template bool impl_ISmsSendMessageResult::IsSuccessful() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSuccessful(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_IsSuccessful(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ISmsSendMessageResult::MessageReferenceNumbers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_MessageReferenceNumbers(put(value))); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_MessageReferenceNumbers(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_ISmsSendMessageResult::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_CellularClass(&value)); return value; } template Windows::Devices::Sms::SmsModemErrorCode impl_ISmsSendMessageResult::ModemErrorCode() const { Windows::Devices::Sms::SmsModemErrorCode value {}; - check_hresult(static_cast(static_cast(*this))->get_ModemErrorCode(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_ModemErrorCode(&value)); return value; } template bool impl_ISmsSendMessageResult::IsErrorTransient() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsErrorTransient(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_IsErrorTransient(&value)); return value; } template int32_t impl_ISmsSendMessageResult::NetworkCauseCode() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkCauseCode(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_NetworkCauseCode(&value)); return value; } template int32_t impl_ISmsSendMessageResult::TransportFailureCause() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TransportFailureCause(&value)); + check_hresult(WINRT_SHIM(ISmsSendMessageResult)->get_TransportFailureCause(&value)); return value; } template hstring impl_ISmsDevice2Statics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2Statics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Devices::Sms::SmsDevice2 impl_ISmsDevice2Statics::FromId(hstring_ref deviceId) const +template Windows::Devices::Sms::SmsDevice2 impl_ISmsDevice2Statics::FromId(hstring_view deviceId) const { Windows::Devices::Sms::SmsDevice2 value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2Statics)->abi_FromId(get_abi(deviceId), put_abi(value))); return value; } template Windows::Devices::Sms::SmsDevice2 impl_ISmsDevice2Statics::GetDefault() const { Windows::Devices::Sms::SmsDevice2 value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2Statics)->abi_GetDefault(put_abi(value))); return value; } -template Windows::Devices::Sms::SmsDevice2 impl_ISmsDevice2Statics::FromParentId(hstring_ref parentDeviceId) const +template Windows::Devices::Sms::SmsDevice2 impl_ISmsDevice2Statics::FromParentId(hstring_view parentDeviceId) const { Windows::Devices::Sms::SmsDevice2 value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromParentId(get(parentDeviceId), put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2Statics)->abi_FromParentId(get_abi(parentDeviceId), put_abi(value))); return value; } template hstring impl_ISmsDevice2::SmscAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SmscAddress(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_SmscAddress(put_abi(value))); return value; } -template void impl_ISmsDevice2::SmscAddress(hstring_ref value) const +template void impl_ISmsDevice2::SmscAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SmscAddress(get(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->put_SmscAddress(get_abi(value))); } template hstring impl_ISmsDevice2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_DeviceId(put_abi(value))); return value; } template hstring impl_ISmsDevice2::ParentDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ParentDeviceId(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_ParentDeviceId(put_abi(value))); return value; } template hstring impl_ISmsDevice2::AccountPhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountPhoneNumber(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_AccountPhoneNumber(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_ISmsDevice2::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_CellularClass(&value)); return value; } template Windows::Devices::Sms::SmsDeviceStatus impl_ISmsDevice2::DeviceStatus() const { Windows::Devices::Sms::SmsDeviceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceStatus(&value)); + check_hresult(WINRT_SHIM(ISmsDevice2)->get_DeviceStatus(&value)); return value; } template Windows::Devices::Sms::SmsEncodedLength impl_ISmsDevice2::CalculateLength(const Windows::Devices::Sms::ISmsMessageBase & message) const { Windows::Devices::Sms::SmsEncodedLength value {}; - check_hresult(static_cast(static_cast(*this))->abi_CalculateLength(get(message), put(value))); + check_hresult(WINRT_SHIM(ISmsDevice2)->abi_CalculateLength(get_abi(message), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISmsDevice2::SendMessageAndGetResultAsync(const Windows::Devices::Sms::ISmsMessageBase & message) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAndGetResultAsync(get(message), put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDevice2)->abi_SendMessageAndGetResultAsync(get_abi(message), put_abi(asyncInfo))); return asyncInfo; } -template event_token impl_ISmsDevice2::DeviceStatusChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_ISmsDevice2::DeviceStatusChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_DeviceStatusChanged(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice2)->add_DeviceStatusChanged(get_abi(eventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_ISmsDevice2::DeviceStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_ISmsDevice2::DeviceStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::Sms::ISmsDevice2::remove_DeviceStatusChanged, DeviceStatusChanged(eventHandler)); } template void impl_ISmsDevice2::DeviceStatusChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DeviceStatusChanged(eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice2)->remove_DeviceStatusChanged(eventCookie)); } template Windows::Devices::Sms::SmsMessageType impl_ISmsMessageReceivedTriggerDetails::MessageType() const { Windows::Devices::Sms::SmsMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageType(&value)); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_MessageType(&value)); return value; } template Windows::Devices::Sms::SmsTextMessage2 impl_ISmsMessageReceivedTriggerDetails::TextMessage() const { Windows::Devices::Sms::SmsTextMessage2 value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_TextMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsWapMessage impl_ISmsMessageReceivedTriggerDetails::WapMessage() const { Windows::Devices::Sms::SmsWapMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WapMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_WapMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsAppMessage impl_ISmsMessageReceivedTriggerDetails::AppMessage() const { Windows::Devices::Sms::SmsAppMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_AppMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsBroadcastMessage impl_ISmsMessageReceivedTriggerDetails::BroadcastMessage() const { Windows::Devices::Sms::SmsBroadcastMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BroadcastMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_BroadcastMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsVoicemailMessage impl_ISmsMessageReceivedTriggerDetails::VoicemailMessage() const { Windows::Devices::Sms::SmsVoicemailMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VoicemailMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_VoicemailMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsStatusMessage impl_ISmsMessageReceivedTriggerDetails::StatusMessage() const { Windows::Devices::Sms::SmsStatusMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StatusMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->get_StatusMessage(put_abi(value))); return value; } template void impl_ISmsMessageReceivedTriggerDetails::Drop() const { - check_hresult(static_cast(static_cast(*this))->abi_Drop()); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->abi_Drop()); } template void impl_ISmsMessageReceivedTriggerDetails::Accept() const { - check_hresult(static_cast(static_cast(*this))->abi_Accept()); + check_hresult(WINRT_SHIM(ISmsMessageReceivedTriggerDetails)->abi_Accept()); } template Windows::Devices::Sms::SmsMessageType impl_ISmsFilterRule::MessageType() const { Windows::Devices::Sms::SmsMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageType(&value)); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_MessageType(&value)); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::ImsiPrefixes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ImsiPrefixes(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_ImsiPrefixes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::DeviceIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DeviceIds(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_DeviceIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::SenderNumbers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SenderNumbers(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_SenderNumbers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::TextMessagePrefixes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_TextMessagePrefixes(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_TextMessagePrefixes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::PortNumbers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_PortNumbers(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_PortNumbers(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_ISmsFilterRule::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_CellularClass(&value)); return value; } template void impl_ISmsFilterRule::CellularClass(Windows::Devices::Sms::CellularClass value) const { - check_hresult(static_cast(static_cast(*this))->put_CellularClass(value)); + check_hresult(WINRT_SHIM(ISmsFilterRule)->put_CellularClass(value)); } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::ProtocolIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ProtocolIds(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_ProtocolIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::TeleserviceIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_TeleserviceIds(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_TeleserviceIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::WapApplicationIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WapApplicationIds(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_WapApplicationIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::WapContentTypes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WapContentTypes(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_WapContentTypes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::BroadcastTypes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_BroadcastTypes(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_BroadcastTypes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRule::BroadcastChannels() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_BroadcastChannels(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRule)->get_BroadcastChannels(put_abi(value))); return value; } template Windows::Devices::Sms::SmsFilterRule impl_ISmsFilterRuleFactory::CreateFilterRule(Windows::Devices::Sms::SmsMessageType messageType) const { Windows::Devices::Sms::SmsFilterRule value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFilterRule(messageType, put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRuleFactory)->abi_CreateFilterRule(messageType, put_abi(value))); return value; } template Windows::Devices::Sms::SmsFilterActionType impl_ISmsFilterRules::ActionType() const { Windows::Devices::Sms::SmsFilterActionType value {}; - check_hresult(static_cast(static_cast(*this))->get_ActionType(&value)); + check_hresult(WINRT_SHIM(ISmsFilterRules)->get_ActionType(&value)); return value; } template Windows::Foundation::Collections::IVector impl_ISmsFilterRules::Rules() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Rules(put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRules)->get_Rules(put_abi(value))); return value; } template Windows::Devices::Sms::SmsFilterRules impl_ISmsFilterRulesFactory::CreateFilterRules(Windows::Devices::Sms::SmsFilterActionType actionType) const { Windows::Devices::Sms::SmsFilterRules value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFilterRules(actionType, put(value))); + check_hresult(WINRT_SHIM(ISmsFilterRulesFactory)->abi_CreateFilterRules(actionType, put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISmsMessageRegistrationStatics::AllRegistrations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AllRegistrations(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageRegistrationStatics)->get_AllRegistrations(put_abi(value))); return value; } -template Windows::Devices::Sms::SmsMessageRegistration impl_ISmsMessageRegistrationStatics::Register(hstring_ref id, const Windows::Devices::Sms::SmsFilterRules & filterRules) const +template Windows::Devices::Sms::SmsMessageRegistration impl_ISmsMessageRegistrationStatics::Register(hstring_view id, const Windows::Devices::Sms::SmsFilterRules & filterRules) const { Windows::Devices::Sms::SmsMessageRegistration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Register(get(id), get(filterRules), put(value))); + check_hresult(WINRT_SHIM(ISmsMessageRegistrationStatics)->abi_Register(get_abi(id), get_abi(filterRules), put_abi(value))); return value; } template hstring impl_ISmsMessageRegistration::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageRegistration)->get_Id(put_abi(value))); return value; } template void impl_ISmsMessageRegistration::Unregister() const { - check_hresult(static_cast(static_cast(*this))->abi_Unregister()); + check_hresult(WINRT_SHIM(ISmsMessageRegistration)->abi_Unregister()); } template event_token impl_ISmsMessageRegistration::MessageReceived(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(ISmsMessageRegistration)->add_MessageReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3328,267 +3503,267 @@ template event_revoker impl_ISmsMessageReg template void impl_ISmsMessageRegistration::MessageReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceived(eventCookie)); + check_hresult(WINRT_SHIM(ISmsMessageRegistration)->remove_MessageReceived(eventCookie)); } template uint32_t impl_ISmsMessage::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ISmsMessage)->get_Id(&value)); return value; } template Windows::Devices::Sms::SmsMessageClass impl_ISmsMessage::MessageClass() const { Windows::Devices::Sms::SmsMessageClass value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageClass(&value)); + check_hresult(WINRT_SHIM(ISmsMessage)->get_MessageClass(&value)); return value; } template Windows::Devices::Sms::SmsDataFormat impl_ISmsBinaryMessage::Format() const { Windows::Devices::Sms::SmsDataFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(ISmsBinaryMessage)->get_Format(&value)); return value; } template void impl_ISmsBinaryMessage::Format(Windows::Devices::Sms::SmsDataFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_Format(value)); + check_hresult(WINRT_SHIM(ISmsBinaryMessage)->put_Format(value)); } template com_array impl_ISmsBinaryMessage::GetData() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetData(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ISmsBinaryMessage)->abi_GetData(impl::put_size_abi(value), put_abi(value))); return value; } -template void impl_ISmsBinaryMessage::SetData(array_ref value) const +template void impl_ISmsBinaryMessage::SetData(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetData(value.size(), get(value))); + check_hresult(WINRT_SHIM(ISmsBinaryMessage)->abi_SetData(value.size(), get_abi(value))); } template Windows::Foundation::DateTime impl_ISmsTextMessage::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_Timestamp(put_abi(value))); return value; } template uint32_t impl_ISmsTextMessage::PartReferenceId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PartReferenceId(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_PartReferenceId(&value)); return value; } template uint32_t impl_ISmsTextMessage::PartNumber() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PartNumber(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_PartNumber(&value)); return value; } template uint32_t impl_ISmsTextMessage::PartCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PartCount(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_PartCount(&value)); return value; } template hstring impl_ISmsTextMessage::To() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_To(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_To(put_abi(value))); return value; } -template void impl_ISmsTextMessage::To(hstring_ref value) const +template void impl_ISmsTextMessage::To(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_To(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->put_To(get_abi(value))); } template hstring impl_ISmsTextMessage::From() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_From(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_From(put_abi(value))); return value; } -template void impl_ISmsTextMessage::From(hstring_ref value) const +template void impl_ISmsTextMessage::From(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_From(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->put_From(get_abi(value))); } template hstring impl_ISmsTextMessage::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_Body(put_abi(value))); return value; } -template void impl_ISmsTextMessage::Body(hstring_ref value) const +template void impl_ISmsTextMessage::Body(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Body(get(value))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->put_Body(get_abi(value))); } template Windows::Devices::Sms::SmsEncoding impl_ISmsTextMessage::Encoding() const { Windows::Devices::Sms::SmsEncoding value {}; - check_hresult(static_cast(static_cast(*this))->get_Encoding(&value)); + check_hresult(WINRT_SHIM(ISmsTextMessage)->get_Encoding(&value)); return value; } template void impl_ISmsTextMessage::Encoding(Windows::Devices::Sms::SmsEncoding value) const { - check_hresult(static_cast(static_cast(*this))->put_Encoding(value)); + check_hresult(WINRT_SHIM(ISmsTextMessage)->put_Encoding(value)); } template Windows::Foundation::Collections::IVectorView impl_ISmsTextMessage::ToBinaryMessages(Windows::Devices::Sms::SmsDataFormat format) const { Windows::Foundation::Collections::IVectorView messages; - check_hresult(static_cast(static_cast(*this))->abi_ToBinaryMessages(format, put(messages))); + check_hresult(WINRT_SHIM(ISmsTextMessage)->abi_ToBinaryMessages(format, put_abi(messages))); return messages; } template Windows::Devices::Sms::SmsTextMessage impl_ISmsTextMessageStatics::FromBinaryMessage(const Windows::Devices::Sms::SmsBinaryMessage & binaryMessage) const { Windows::Devices::Sms::SmsTextMessage textMessage { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromBinaryMessage(get(binaryMessage), put(textMessage))); + check_hresult(WINRT_SHIM(ISmsTextMessageStatics)->abi_FromBinaryMessage(get_abi(binaryMessage), put_abi(textMessage))); return textMessage; } -template Windows::Devices::Sms::SmsTextMessage impl_ISmsTextMessageStatics::FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, array_ref value) const +template Windows::Devices::Sms::SmsTextMessage impl_ISmsTextMessageStatics::FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, array_view value) const { Windows::Devices::Sms::SmsTextMessage textMessage { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromBinaryData(format, value.size(), get(value), put(textMessage))); + check_hresult(WINRT_SHIM(ISmsTextMessageStatics)->abi_FromBinaryData(format, value.size(), get_abi(value), put_abi(textMessage))); return textMessage; } template Windows::Foundation::IAsyncAction impl_ISmsDeviceMessageStore::DeleteMessageAsync(uint32_t messageId) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_DeleteMessageAsync(messageId, put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceMessageStore)->abi_DeleteMessageAsync(messageId, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_ISmsDeviceMessageStore::DeleteMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_DeleteMessagesAsync(messageFilter, put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceMessageStore)->abi_DeleteMessagesAsync(messageFilter, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_ISmsDeviceMessageStore::GetMessageAsync(uint32_t messageId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageAsync(messageId, put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceMessageStore)->abi_GetMessageAsync(messageId, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperationWithProgress, int32_t> impl_ISmsDeviceMessageStore::GetMessagesAsync(Windows::Devices::Sms::SmsMessageFilter messageFilter) const { Windows::Foundation::IAsyncOperationWithProgress, int32_t> asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetMessagesAsync(messageFilter, put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceMessageStore)->abi_GetMessagesAsync(messageFilter, put_abi(asyncInfo))); return asyncInfo; } template uint32_t impl_ISmsDeviceMessageStore::MaxMessages() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxMessages(&value)); + check_hresult(WINRT_SHIM(ISmsDeviceMessageStore)->get_MaxMessages(&value)); return value; } template Windows::Devices::Sms::SmsTextMessage impl_ISmsMessageReceivedEventArgs::TextMessage() const { Windows::Devices::Sms::SmsTextMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedEventArgs)->get_TextMessage(put_abi(value))); return value; } template Windows::Devices::Sms::SmsBinaryMessage impl_ISmsMessageReceivedEventArgs::BinaryMessage() const { Windows::Devices::Sms::SmsBinaryMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BinaryMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsMessageReceivedEventArgs)->get_BinaryMessage(put_abi(value))); return value; } template hstring impl_ISmsDeviceStatics::GetDeviceSelector() const { hstring phstrDeviceClassSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(phstrDeviceClassSelector))); + check_hresult(WINRT_SHIM(ISmsDeviceStatics)->abi_GetDeviceSelector(put_abi(phstrDeviceClassSelector))); return phstrDeviceClassSelector; } -template Windows::Foundation::IAsyncOperation impl_ISmsDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_ISmsDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_ISmsDeviceStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceStatics)->abi_GetDefaultAsync(put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_ISmsDeviceStatics2::FromNetworkAccountIdAsync(hstring_ref networkAccountId) const +template Windows::Foundation::IAsyncOperation impl_ISmsDeviceStatics2::FromNetworkAccountIdAsync(hstring_view networkAccountId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FromNetworkAccountIdAsync(get(networkAccountId), put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDeviceStatics2)->abi_FromNetworkAccountIdAsync(get_abi(networkAccountId), put_abi(asyncInfo))); return asyncInfo; } template Windows::Devices::Sms::SendSmsMessageOperation impl_ISmsDevice::SendMessageAsync(const Windows::Devices::Sms::ISmsMessage & message) const { Windows::Devices::Sms::SendSmsMessageOperation asyncInfo { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAsync(get(message), put(asyncInfo))); + check_hresult(WINRT_SHIM(ISmsDevice)->abi_SendMessageAsync(get_abi(message), put_abi(asyncInfo))); return asyncInfo; } template Windows::Devices::Sms::SmsEncodedLength impl_ISmsDevice::CalculateLength(const Windows::Devices::Sms::SmsTextMessage & message) const { Windows::Devices::Sms::SmsEncodedLength encodedLength {}; - check_hresult(static_cast(static_cast(*this))->abi_CalculateLength(get(message), put(encodedLength))); + check_hresult(WINRT_SHIM(ISmsDevice)->abi_CalculateLength(get_abi(message), put_abi(encodedLength))); return encodedLength; } template hstring impl_ISmsDevice::AccountPhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountPhoneNumber(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice)->get_AccountPhoneNumber(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_ISmsDevice::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(ISmsDevice)->get_CellularClass(&value)); return value; } template Windows::Devices::Sms::SmsDeviceMessageStore impl_ISmsDevice::MessageStore() const { Windows::Devices::Sms::SmsDeviceMessageStore value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MessageStore(put(value))); + check_hresult(WINRT_SHIM(ISmsDevice)->get_MessageStore(put_abi(value))); return value; } template Windows::Devices::Sms::SmsDeviceStatus impl_ISmsDevice::DeviceStatus() const { Windows::Devices::Sms::SmsDeviceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceStatus(&value)); + check_hresult(WINRT_SHIM(ISmsDevice)->get_DeviceStatus(&value)); return value; } template event_token impl_ISmsDevice::SmsMessageReceived(const Windows::Devices::Sms::SmsMessageReceivedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_SmsMessageReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice)->add_SmsMessageReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3599,13 +3774,13 @@ template event_revoker impl_ISmsDevice::SmsMessageRe template void impl_ISmsDevice::SmsMessageReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SmsMessageReceived(eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice)->remove_SmsMessageReceived(eventCookie)); } template event_token impl_ISmsDevice::SmsDeviceStatusChanged(const Windows::Devices::Sms::SmsDeviceStatusChangedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_SmsDeviceStatusChanged(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice)->add_SmsDeviceStatusChanged(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3616,34 +3791,34 @@ template event_revoker impl_ISmsDevice::SmsDeviceSta template void impl_ISmsDevice::SmsDeviceStatusChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SmsDeviceStatusChanged(eventCookie)); + check_hresult(WINRT_SHIM(ISmsDevice)->remove_SmsDeviceStatusChanged(eventCookie)); } template hstring impl_ISmsReceivedEventDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISmsReceivedEventDetails)->get_DeviceId(put_abi(value))); return value; } template uint32_t impl_ISmsReceivedEventDetails::MessageIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageIndex(&value)); + check_hresult(WINRT_SHIM(ISmsReceivedEventDetails)->get_MessageIndex(&value)); return value; } template Windows::Devices::Sms::SmsMessageClass impl_ISmsReceivedEventDetails2::MessageClass() const { Windows::Devices::Sms::SmsMessageClass value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageClass(&value)); + check_hresult(WINRT_SHIM(ISmsReceivedEventDetails2)->get_MessageClass(&value)); return value; } template Windows::Devices::Sms::SmsBinaryMessage impl_ISmsReceivedEventDetails2::BinaryMessage() const { Windows::Devices::Sms::SmsBinaryMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BinaryMessage(put(value))); + check_hresult(WINRT_SHIM(ISmsReceivedEventDetails2)->get_BinaryMessage(put_abi(value))); return value; } @@ -3660,7 +3835,7 @@ inline hstring SmsDevice::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation SmsDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation SmsDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -3670,7 +3845,7 @@ inline Windows::Foundation::IAsyncOperation Sm return get_activation_factory().GetDefaultAsync(); } -inline Windows::Foundation::IAsyncOperation SmsDevice::FromNetworkAccountIdAsync(hstring_ref networkAccountId) +inline Windows::Foundation::IAsyncOperation SmsDevice::FromNetworkAccountIdAsync(hstring_view networkAccountId) { return get_activation_factory().FromNetworkAccountIdAsync(networkAccountId); } @@ -3680,7 +3855,7 @@ inline hstring SmsDevice2::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Devices::Sms::SmsDevice2 SmsDevice2::FromId(hstring_ref deviceId) +inline Windows::Devices::Sms::SmsDevice2 SmsDevice2::FromId(hstring_view deviceId) { return get_activation_factory().FromId(deviceId); } @@ -3690,7 +3865,7 @@ inline Windows::Devices::Sms::SmsDevice2 SmsDevice2::GetDefault() return get_activation_factory().GetDefault(); } -inline Windows::Devices::Sms::SmsDevice2 SmsDevice2::FromParentId(hstring_ref parentDeviceId) +inline Windows::Devices::Sms::SmsDevice2 SmsDevice2::FromParentId(hstring_view parentDeviceId) { return get_activation_factory().FromParentId(parentDeviceId); } @@ -3708,7 +3883,7 @@ inline Windows::Foundation::Collections::IVectorView().AllRegistrations(); } -inline Windows::Devices::Sms::SmsMessageRegistration SmsMessageRegistration::Register(hstring_ref id, const Windows::Devices::Sms::SmsFilterRules & filterRules) +inline Windows::Devices::Sms::SmsMessageRegistration SmsMessageRegistration::Register(hstring_view id, const Windows::Devices::Sms::SmsFilterRules & filterRules) { return get_activation_factory().Register(id, filterRules); } @@ -3722,7 +3897,7 @@ inline Windows::Devices::Sms::SmsTextMessage SmsTextMessage::FromBinaryMessage(c return get_activation_factory().FromBinaryMessage(binaryMessage); } -inline Windows::Devices::Sms::SmsTextMessage SmsTextMessage::FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, array_ref value) +inline Windows::Devices::Sms::SmsTextMessage SmsTextMessage::FromBinaryData(Windows::Devices::Sms::SmsDataFormat format, array_view value) { return get_activation_factory().FromBinaryData(format, value); } @@ -3734,3 +3909,473 @@ inline SmsTextMessage2::SmsTextMessage2() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsAppMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsBinaryMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsBroadcastMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDevice2Statics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDeviceMessageStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsDeviceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsFilterRule & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsFilterRuleFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsFilterRules & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsFilterRulesFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessageBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessageReceivedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessageRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsMessageRegistrationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsReceivedEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsReceivedEventDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsSendMessageResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsStatusMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsTextMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsTextMessage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsTextMessageStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsVoicemailMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::ISmsWapMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::DeleteSmsMessageOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::DeleteSmsMessagesOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::GetSmsDeviceOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::GetSmsMessageOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::GetSmsMessagesOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SendSmsMessageOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsAppMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsBinaryMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsBroadcastMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsDeviceMessageStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsFilterRule & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsFilterRules & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsMessageReceivedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsMessageRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsReceivedEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsSendMessageResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsStatusMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsTextMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsTextMessage2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsVoicemailMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Sms::SmsWapMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Spi.Provider.h b/10.0.14393.0/winrt/Windows.Devices.Spi.Provider.h index 07439f0df..7bc49591b 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Spi.Provider.h +++ b/10.0.14393.0/winrt/Windows.Devices.Spi.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Spi.Provider.3.h" #include "Windows.Devices.Spi.h" @@ -18,7 +21,8 @@ struct produceshim().ChipSelectLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChipSelectLine()); return S_OK; } catch (...) @@ -31,6 +35,7 @@ struct produceshim()); this->shim().ChipSelectLine(value); return S_OK; } @@ -44,7 +49,8 @@ struct produceshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -57,6 +63,7 @@ struct produceshim()); this->shim().Mode(value); return S_OK; } @@ -70,7 +77,8 @@ struct produceshim().DataBitLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataBitLength()); return S_OK; } catch (...) @@ -83,6 +91,7 @@ struct produceshim()); this->shim().DataBitLength(value); return S_OK; } @@ -96,7 +105,8 @@ struct produceshim().ClockFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockFrequency()); return S_OK; } catch (...) @@ -109,6 +119,7 @@ struct produceshim()); this->shim().ClockFrequency(value); return S_OK; } @@ -122,7 +133,8 @@ struct produceshim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -135,6 +147,7 @@ struct produceshim()); this->shim().SharingMode(value); return S_OK; } @@ -148,11 +161,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t chipSelectLine, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(int32_t chipSelectLine, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(chipSelectLine)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(chipSelectLine)); return S_OK; } catch (...) @@ -166,11 +180,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceProvider(abi_arg_in settings, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceProvider(impl::abi_arg_in settings, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceProvider(*reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceProvider(*reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -184,11 +199,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -198,11 +214,12 @@ struct produce : produce } } - HRESULT __stdcall get_ConnectionSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionSettings()); return S_OK; } catch (...) @@ -212,11 +229,12 @@ struct produce : produce } } - HRESULT __stdcall abi_Write(uint32_t __bufferSize, abi_arg_in * buffer) noexcept override + HRESULT __stdcall abi_Write(uint32_t __bufferSize, impl::abi_arg_in * buffer) noexcept override { try { - this->shim().Write(array_ref(buffer, buffer + __bufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Write(array_view(buffer, buffer + __bufferSize)); return S_OK; } catch (...) @@ -225,10 +243,11 @@ struct produce : produce } } - HRESULT __stdcall abi_Read(uint32_t __bufferSize, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_Read(uint32_t __bufferSize, impl::abi_arg_out buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Read(*buffer); return S_OK; } @@ -238,11 +257,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TransferSequential(uint32_t __writeBufferSize, abi_arg_in * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_TransferSequential(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().TransferSequential(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().TransferSequential(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -251,11 +271,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TransferFullDuplex(uint32_t __writeBufferSize, abi_arg_in * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_TransferFullDuplex(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().TransferFullDuplex(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().TransferFullDuplex(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -268,11 +289,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetControllersAsync(abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetControllersAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetControllersAsync()); return S_OK; } catch (...) @@ -290,116 +312,116 @@ namespace Windows::Devices::Spi::Provider { template Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings impl_IProviderSpiConnectionSettingsFactory::Create(int32_t chipSelectLine) const { Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(chipSelectLine, put(value))); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettingsFactory)->abi_Create(chipSelectLine, put_abi(value))); return value; } template int32_t impl_IProviderSpiConnectionSettings::ChipSelectLine() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChipSelectLine(&value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->get_ChipSelectLine(&value)); return value; } template void impl_IProviderSpiConnectionSettings::ChipSelectLine(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ChipSelectLine(value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->put_ChipSelectLine(value)); } template Windows::Devices::Spi::Provider::ProviderSpiMode impl_IProviderSpiConnectionSettings::Mode() const { Windows::Devices::Spi::Provider::ProviderSpiMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->get_Mode(&value)); return value; } template void impl_IProviderSpiConnectionSettings::Mode(Windows::Devices::Spi::Provider::ProviderSpiMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->put_Mode(value)); } template int32_t impl_IProviderSpiConnectionSettings::DataBitLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataBitLength(&value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->get_DataBitLength(&value)); return value; } template void impl_IProviderSpiConnectionSettings::DataBitLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataBitLength(value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->put_DataBitLength(value)); } template int32_t impl_IProviderSpiConnectionSettings::ClockFrequency() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ClockFrequency(&value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->get_ClockFrequency(&value)); return value; } template void impl_IProviderSpiConnectionSettings::ClockFrequency(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ClockFrequency(value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->put_ClockFrequency(value)); } template Windows::Devices::Spi::Provider::ProviderSpiSharingMode impl_IProviderSpiConnectionSettings::SharingMode() const { Windows::Devices::Spi::Provider::ProviderSpiSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->get_SharingMode(&value)); return value; } template void impl_IProviderSpiConnectionSettings::SharingMode(Windows::Devices::Spi::Provider::ProviderSpiSharingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SharingMode(value)); + check_hresult(WINRT_SHIM(IProviderSpiConnectionSettings)->put_SharingMode(value)); } template Windows::Devices::Spi::Provider::ISpiDeviceProvider impl_ISpiControllerProvider::GetDeviceProvider(const Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings & settings) const { Windows::Devices::Spi::Provider::ISpiDeviceProvider result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceProvider(get(settings), put(result))); + check_hresult(WINRT_SHIM(ISpiControllerProvider)->abi_GetDeviceProvider(get_abi(settings), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_ISpiProvider::GetControllersAsync() const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(put(result))); + check_hresult(WINRT_SHIM(ISpiProvider)->abi_GetControllersAsync(put_abi(result))); return result; } template hstring impl_ISpiDeviceProvider::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings impl_ISpiDeviceProvider::ConnectionSettings() const { Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionSettings(put(value))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->get_ConnectionSettings(put_abi(value))); return value; } -template void impl_ISpiDeviceProvider::Write(array_ref buffer) const +template void impl_ISpiDeviceProvider::Write(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->abi_Write(buffer.size(), get_abi(buffer))); } -template void impl_ISpiDeviceProvider::Read(array_ref buffer) const +template void impl_ISpiDeviceProvider::Read(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Read(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->abi_Read(buffer.size(), get_abi(buffer))); } -template void impl_ISpiDeviceProvider::TransferSequential(array_ref writeBuffer, array_ref readBuffer) const +template void impl_ISpiDeviceProvider::TransferSequential(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferSequential(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->abi_TransferSequential(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } -template void impl_ISpiDeviceProvider::TransferFullDuplex(array_ref writeBuffer, array_ref readBuffer) const +template void impl_ISpiDeviceProvider::TransferFullDuplex(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferFullDuplex(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(ISpiDeviceProvider)->abi_TransferFullDuplex(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } inline ProviderSpiConnectionSettings::ProviderSpiConnectionSettings(int32_t chipSelectLine) : @@ -409,3 +431,59 @@ inline ProviderSpiConnectionSettings::ProviderSpiConnectionSettings(int32_t chip } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::IProviderSpiConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::IProviderSpiConnectionSettingsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::ISpiControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::ISpiDeviceProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::ISpiProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::Provider::ProviderSpiConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Spi.h b/10.0.14393.0/winrt/Windows.Devices.Spi.h index 269c8df44..129dec1e7 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Spi.h +++ b/10.0.14393.0/winrt/Windows.Devices.Spi.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Spi.Provider.3.h" @@ -21,7 +24,8 @@ struct produce : produce_baseshim().ChipSelectLineCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChipSelectLineCount()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce_baseshim().MinClockFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinClockFrequency()); return S_OK; } catch (...) @@ -47,7 +52,8 @@ struct produce : produce_baseshim().MaxClockFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxClockFrequency()); return S_OK; } catch (...) @@ -56,11 +62,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedDataBitLengths(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedDataBitLengths()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedDataBitLengths()); return S_OK; } catch (...) @@ -78,7 +85,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ChipSelectLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChipSelectLine()); return S_OK; } catch (...) @@ -91,6 +99,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ChipSelectLine(value); return S_OK; } @@ -104,7 +113,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -117,6 +127,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -130,7 +141,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().DataBitLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataBitLength()); return S_OK; } catch (...) @@ -143,6 +155,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().DataBitLength(value); return S_OK; } @@ -156,7 +169,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ClockFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockFrequency()); return S_OK; } catch (...) @@ -169,6 +183,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ClockFrequency(value); return S_OK; } @@ -182,7 +197,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -195,6 +211,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SharingMode(value); return S_OK; } @@ -208,11 +225,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(int32_t chipSelectLine, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(int32_t chipSelectLine, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(chipSelectLine)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(chipSelectLine)); return S_OK; } catch (...) @@ -226,11 +244,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDevice(abi_arg_in settings, abi_arg_out device) noexcept override + HRESULT __stdcall abi_GetDevice(impl::abi_arg_in settings, impl::abi_arg_out device) noexcept override { try { - *device = detach(this->shim().GetDevice(*reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *device = detach_abi(this->shim().GetDevice(*reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -244,11 +263,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefaultAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDefaultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDefaultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDefaultAsync()); return S_OK; } catch (...) @@ -258,11 +278,12 @@ struct produce : produce_base provider, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetControllersAsync(impl::abi_arg_in provider, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetControllersAsync(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -276,11 +297,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -290,11 +312,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ConnectionSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionSettings()); return S_OK; } catch (...) @@ -304,11 +327,12 @@ struct produce : produce_base * buffer) noexcept override + HRESULT __stdcall abi_Write(uint32_t __bufferSize, impl::abi_arg_in * buffer) noexcept override { try { - this->shim().Write(array_ref(buffer, buffer + __bufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Write(array_view(buffer, buffer + __bufferSize)); return S_OK; } catch (...) @@ -317,10 +341,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_Read(uint32_t __bufferSize, impl::abi_arg_out buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Read(*buffer); return S_OK; } @@ -330,11 +355,12 @@ struct produce : produce_base * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_TransferSequential(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().TransferSequential(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().TransferSequential(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -343,11 +369,12 @@ struct produce : produce_base * writeBuffer, uint32_t __readBufferSize, abi_arg_out readBuffer) noexcept override + HRESULT __stdcall abi_TransferFullDuplex(uint32_t __writeBufferSize, impl::abi_arg_in * writeBuffer, uint32_t __readBufferSize, impl::abi_arg_out readBuffer) noexcept override { try { - this->shim().TransferFullDuplex(array_ref(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().TransferFullDuplex(array_view(writeBuffer, writeBuffer + __writeBufferSize), *readBuffer); return S_OK; } catch (...) @@ -360,11 +387,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -374,11 +402,12 @@ struct produce : produce_base friendlyName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromFriendlyName(impl::abi_arg_in friendlyName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(*reinterpret_cast(&friendlyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(*reinterpret_cast(&friendlyName))); return S_OK; } catch (...) @@ -388,11 +417,12 @@ struct produce : produce_base busId, abi_arg_out busInfo) noexcept override + HRESULT __stdcall abi_GetBusInfo(impl::abi_arg_in busId, impl::abi_arg_out busInfo) noexcept override { try { - *busInfo = detach(this->shim().GetBusInfo(*reinterpret_cast(&busId))); + typename D::abi_guard guard(this->shim()); + *busInfo = detach_abi(this->shim().GetBusInfo(*reinterpret_cast(&busId))); return S_OK; } catch (...) @@ -402,11 +432,12 @@ struct produce : produce_base busId, abi_arg_in settings, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in busId, impl::abi_arg_in settings, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&busId), *reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&busId), *reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -424,179 +455,179 @@ namespace Windows::Devices::Spi { template Windows::Devices::Spi::SpiConnectionSettings impl_ISpiConnectionSettingsFactory::Create(int32_t chipSelectLine) const { Windows::Devices::Spi::SpiConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(chipSelectLine, put(value))); + check_hresult(WINRT_SHIM(ISpiConnectionSettingsFactory)->abi_Create(chipSelectLine, put_abi(value))); return value; } template int32_t impl_ISpiConnectionSettings::ChipSelectLine() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChipSelectLine(&value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->get_ChipSelectLine(&value)); return value; } template void impl_ISpiConnectionSettings::ChipSelectLine(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ChipSelectLine(value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->put_ChipSelectLine(value)); } template Windows::Devices::Spi::SpiMode impl_ISpiConnectionSettings::Mode() const { Windows::Devices::Spi::SpiMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->get_Mode(&value)); return value; } template void impl_ISpiConnectionSettings::Mode(Windows::Devices::Spi::SpiMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->put_Mode(value)); } template int32_t impl_ISpiConnectionSettings::DataBitLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataBitLength(&value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->get_DataBitLength(&value)); return value; } template void impl_ISpiConnectionSettings::DataBitLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataBitLength(value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->put_DataBitLength(value)); } template int32_t impl_ISpiConnectionSettings::ClockFrequency() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ClockFrequency(&value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->get_ClockFrequency(&value)); return value; } template void impl_ISpiConnectionSettings::ClockFrequency(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ClockFrequency(value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->put_ClockFrequency(value)); } template Windows::Devices::Spi::SpiSharingMode impl_ISpiConnectionSettings::SharingMode() const { Windows::Devices::Spi::SpiSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->get_SharingMode(&value)); return value; } template void impl_ISpiConnectionSettings::SharingMode(Windows::Devices::Spi::SpiSharingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SharingMode(value)); + check_hresult(WINRT_SHIM(ISpiConnectionSettings)->put_SharingMode(value)); } template int32_t impl_ISpiBusInfo::ChipSelectLineCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChipSelectLineCount(&value)); + check_hresult(WINRT_SHIM(ISpiBusInfo)->get_ChipSelectLineCount(&value)); return value; } template int32_t impl_ISpiBusInfo::MinClockFrequency() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinClockFrequency(&value)); + check_hresult(WINRT_SHIM(ISpiBusInfo)->get_MinClockFrequency(&value)); return value; } template int32_t impl_ISpiBusInfo::MaxClockFrequency() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxClockFrequency(&value)); + check_hresult(WINRT_SHIM(ISpiBusInfo)->get_MaxClockFrequency(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpiBusInfo::SupportedDataBitLengths() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedDataBitLengths(put(value))); + check_hresult(WINRT_SHIM(ISpiBusInfo)->get_SupportedDataBitLengths(put_abi(value))); return value; } template hstring impl_ISpiDeviceStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(ISpiDeviceStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template hstring impl_ISpiDeviceStatics::GetDeviceSelector(hstring_ref friendlyName) const +template hstring impl_ISpiDeviceStatics::GetDeviceSelector(hstring_view friendlyName) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromFriendlyName(get(friendlyName), put(value))); + check_hresult(WINRT_SHIM(ISpiDeviceStatics)->abi_GetDeviceSelectorFromFriendlyName(get_abi(friendlyName), put_abi(value))); return value; } -template Windows::Devices::Spi::SpiBusInfo impl_ISpiDeviceStatics::GetBusInfo(hstring_ref busId) const +template Windows::Devices::Spi::SpiBusInfo impl_ISpiDeviceStatics::GetBusInfo(hstring_view busId) const { Windows::Devices::Spi::SpiBusInfo busInfo { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBusInfo(get(busId), put(busInfo))); + check_hresult(WINRT_SHIM(ISpiDeviceStatics)->abi_GetBusInfo(get_abi(busId), put_abi(busInfo))); return busInfo; } -template Windows::Foundation::IAsyncOperation impl_ISpiDeviceStatics::FromIdAsync(hstring_ref busId, const Windows::Devices::Spi::SpiConnectionSettings & settings) const +template Windows::Foundation::IAsyncOperation impl_ISpiDeviceStatics::FromIdAsync(hstring_view busId, const Windows::Devices::Spi::SpiConnectionSettings & settings) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(busId), get(settings), put(operation))); + check_hresult(WINRT_SHIM(ISpiDeviceStatics)->abi_FromIdAsync(get_abi(busId), get_abi(settings), put_abi(operation))); return operation; } template Windows::Devices::Spi::SpiDevice impl_ISpiController::GetDevice(const Windows::Devices::Spi::SpiConnectionSettings & settings) const { Windows::Devices::Spi::SpiDevice device { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDevice(get(settings), put(device))); + check_hresult(WINRT_SHIM(ISpiController)->abi_GetDevice(get_abi(settings), put_abi(device))); return device; } template Windows::Foundation::IAsyncOperation impl_ISpiControllerStatics::GetDefaultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAsync(put(operation))); + check_hresult(WINRT_SHIM(ISpiControllerStatics)->abi_GetDefaultAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_ISpiControllerStatics::GetControllersAsync(const Windows::Devices::Spi::Provider::ISpiProvider & provider) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetControllersAsync(get(provider), put(operation))); + check_hresult(WINRT_SHIM(ISpiControllerStatics)->abi_GetControllersAsync(get_abi(provider), put_abi(operation))); return operation; } template hstring impl_ISpiDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISpiDevice)->get_DeviceId(put_abi(value))); return value; } template Windows::Devices::Spi::SpiConnectionSettings impl_ISpiDevice::ConnectionSettings() const { Windows::Devices::Spi::SpiConnectionSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionSettings(put(value))); + check_hresult(WINRT_SHIM(ISpiDevice)->get_ConnectionSettings(put_abi(value))); return value; } -template void impl_ISpiDevice::Write(array_ref buffer) const +template void impl_ISpiDevice::Write(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Write(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(ISpiDevice)->abi_Write(buffer.size(), get_abi(buffer))); } -template void impl_ISpiDevice::Read(array_ref buffer) const +template void impl_ISpiDevice::Read(array_view buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Read(buffer.size(), get(buffer))); + check_hresult(WINRT_SHIM(ISpiDevice)->abi_Read(buffer.size(), get_abi(buffer))); } -template void impl_ISpiDevice::TransferSequential(array_ref writeBuffer, array_ref readBuffer) const +template void impl_ISpiDevice::TransferSequential(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferSequential(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(ISpiDevice)->abi_TransferSequential(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } -template void impl_ISpiDevice::TransferFullDuplex(array_ref writeBuffer, array_ref readBuffer) const +template void impl_ISpiDevice::TransferFullDuplex(array_view writeBuffer, array_view readBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferFullDuplex(writeBuffer.size(), get(writeBuffer), readBuffer.size(), get(readBuffer))); + check_hresult(WINRT_SHIM(ISpiDevice)->abi_TransferFullDuplex(writeBuffer.size(), get_abi(writeBuffer), readBuffer.size(), get_abi(readBuffer))); } inline SpiConnectionSettings::SpiConnectionSettings(int32_t chipSelectLine) : @@ -618,17 +649,17 @@ inline hstring SpiDevice::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline hstring SpiDevice::GetDeviceSelector(hstring_ref friendlyName) +inline hstring SpiDevice::GetDeviceSelector(hstring_view friendlyName) { return get_activation_factory().GetDeviceSelector(friendlyName); } -inline Windows::Devices::Spi::SpiBusInfo SpiDevice::GetBusInfo(hstring_ref busId) +inline Windows::Devices::Spi::SpiBusInfo SpiDevice::GetBusInfo(hstring_view busId) { return get_activation_factory().GetBusInfo(busId); } -inline Windows::Foundation::IAsyncOperation SpiDevice::FromIdAsync(hstring_ref busId, const Windows::Devices::Spi::SpiConnectionSettings & settings) +inline Windows::Foundation::IAsyncOperation SpiDevice::FromIdAsync(hstring_view busId, const Windows::Devices::Spi::SpiConnectionSettings & settings) { return get_activation_factory().FromIdAsync(busId, settings); } @@ -636,3 +667,104 @@ inline Windows::Foundation::IAsyncOperation Sp } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiBusInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiConnectionSettingsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::ISpiDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::SpiBusInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::SpiConnectionSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::SpiController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Spi::SpiDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.Usb.h b/10.0.14393.0/winrt/Windows.Devices.Usb.h index 791b467ed..c2813fa8b 100644 --- a/10.0.14393.0/winrt/Windows.Devices.Usb.h +++ b/10.0.14393.0/winrt/Windows.Devices.Usb.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -21,7 +24,8 @@ struct produce : produce { try { - *value = detach(this->shim().MaxPacketSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPacketSize()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce { try { - *value = detach(this->shim().EndpointNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointNumber()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce } } - HRESULT __stdcall get_Pipe(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pipe(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pipe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pipe()); return S_OK; } catch (...) @@ -65,7 +71,8 @@ struct produce : produce_baseshim().MaxTransferSizeBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxTransferSizeBytes()); return S_OK; } catch (...) @@ -74,11 +81,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointDescriptor()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_ClearStallAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ClearStallAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClearStallAsync()); return S_OK; } catch (...) @@ -106,6 +115,7 @@ struct produce : produce_baseshim()); this->shim().ReadOptions(value); return S_OK; } @@ -119,7 +129,8 @@ struct produce : produce_baseshim().ReadOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadOptions()); return S_OK; } catch (...) @@ -132,6 +143,7 @@ struct produce : produce_baseshim()); this->shim().FlushBuffer(); return S_OK; } @@ -141,11 +153,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -163,7 +176,8 @@ struct produce : produc { try { - *value = detach(this->shim().MaxPacketSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPacketSize()); return S_OK; } catch (...) @@ -176,7 +190,8 @@ struct produce : produc { try { - *value = detach(this->shim().EndpointNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointNumber()); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce : produc } } - HRESULT __stdcall get_Pipe(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pipe(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pipe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pipe()); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_EndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointDescriptor()); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_ClearStallAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ClearStallAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClearStallAsync()); return S_OK; } catch (...) @@ -235,6 +253,7 @@ struct produce : produce_baseshim()); this->shim().WriteOptions(value); return S_OK; } @@ -248,7 +267,8 @@ struct produce : produce_baseshim().WriteOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WriteOptions()); return S_OK; } catch (...) @@ -257,11 +277,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -275,11 +296,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_UsbInterfaces(abi_arg_out> value) noexcept override + HRESULT __stdcall get_UsbInterfaces(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UsbInterfaces()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsbInterfaces()); return S_OK; } catch (...) @@ -289,11 +311,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ConfigurationDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfigurationDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationDescriptor()); return S_OK; } catch (...) @@ -303,11 +326,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Descriptors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Descriptors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Descriptors()); return S_OK; } catch (...) @@ -325,7 +349,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ConfigurationValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationValue()); return S_OK; } catch (...) @@ -338,7 +363,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().MaxPowerMilliamps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPowerMilliamps()); return S_OK; } catch (...) @@ -351,7 +377,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().SelfPowered()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelfPowered()); return S_OK; } catch (...) @@ -364,7 +391,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().RemoteWakeup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteWakeup()); return S_OK; } catch (...) @@ -377,11 +405,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_TryParse(abi_arg_in descriptor, abi_arg_out parsed, bool * success) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed, bool * success) noexcept override { try { - *success = detach(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); return S_OK; } catch (...) @@ -391,11 +420,12 @@ struct produce : p } } - HRESULT __stdcall abi_Parse(abi_arg_in descriptor, abi_arg_out parsed) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed) noexcept override { try { - *parsed = detach(this->shim().Parse(*reinterpret_cast(&descriptor))); + typename D::abi_guard guard(this->shim()); + *parsed = detach_abi(this->shim().Parse(*reinterpret_cast(&descriptor))); return S_OK; } catch (...) @@ -413,7 +443,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -426,6 +457,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Direction(value); return S_OK; } @@ -439,7 +471,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ControlTransferType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlTransferType()); return S_OK; } catch (...) @@ -452,6 +485,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ControlTransferType(value); return S_OK; } @@ -465,7 +499,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Recipient()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recipient()); return S_OK; } catch (...) @@ -478,6 +513,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Recipient(value); return S_OK; } @@ -491,7 +527,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().AsByte()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AsByte()); return S_OK; } catch (...) @@ -504,6 +541,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().AsByte(value); return S_OK; } @@ -521,7 +559,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -534,7 +573,8 @@ struct produce : produce_baseshim().DescriptorType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DescriptorType()); return S_OK; } catch (...) @@ -543,10 +583,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_ReadDescriptorBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadDescriptorBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -560,11 +601,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SendControlOutTransferAsync(abi_arg_in setupPacket, abi_arg_in buffer, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendControlOutTransferAsync(impl::abi_arg_in setupPacket, impl::abi_arg_in buffer, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendControlOutTransferAsync(*reinterpret_cast(&setupPacket), *reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendControlOutTransferAsync(*reinterpret_cast(&setupPacket), *reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -574,11 +616,12 @@ struct produce : produce_base setupPacket, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendControlOutTransferAsyncNoBuffer(impl::abi_arg_in setupPacket, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendControlOutTransferAsync(*reinterpret_cast(&setupPacket))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendControlOutTransferAsync(*reinterpret_cast(&setupPacket))); return S_OK; } catch (...) @@ -588,11 +631,12 @@ struct produce : produce_base setupPacket, abi_arg_in buffer, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendControlInTransferAsync(impl::abi_arg_in setupPacket, impl::abi_arg_in buffer, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendControlInTransferAsync(*reinterpret_cast(&setupPacket), *reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendControlInTransferAsync(*reinterpret_cast(&setupPacket), *reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -602,11 +646,12 @@ struct produce : produce_base setupPacket, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendControlInTransferAsyncNoBuffer(impl::abi_arg_in setupPacket, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendControlInTransferAsync(*reinterpret_cast(&setupPacket))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendControlInTransferAsync(*reinterpret_cast(&setupPacket))); return S_OK; } catch (...) @@ -616,11 +661,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultInterface(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultInterface()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultInterface()); return S_OK; } catch (...) @@ -630,11 +676,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DeviceDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceDescriptor()); return S_OK; } catch (...) @@ -644,11 +691,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -666,7 +714,8 @@ struct produce : produce_baseshim().ClassCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClassCode()); return S_OK; } catch (...) @@ -679,6 +728,7 @@ struct produce : produce_baseshim()); this->shim().ClassCode(value); return S_OK; } @@ -688,11 +738,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SubclassCode(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SubclassCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubclassCode()); return S_OK; } catch (...) @@ -702,10 +753,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_SubclassCode(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SubclassCode(*reinterpret_cast *>(&value)); return S_OK; } @@ -715,11 +767,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ProtocolCode(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProtocolCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolCode()); return S_OK; } catch (...) @@ -729,10 +782,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ProtocolCode(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProtocolCode(*reinterpret_cast *>(&value)); return S_OK; } @@ -750,11 +804,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CdcControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_CdcControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CdcControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CdcControl()); return S_OK; } catch (...) @@ -764,11 +819,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Physical(abi_arg_out value) noexcept override + HRESULT __stdcall get_Physical(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Physical()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Physical()); return S_OK; } catch (...) @@ -778,11 +834,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_PersonalHealthcare(abi_arg_out value) noexcept override + HRESULT __stdcall get_PersonalHealthcare(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PersonalHealthcare()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PersonalHealthcare()); return S_OK; } catch (...) @@ -792,11 +849,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ActiveSync(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActiveSync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActiveSync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveSync()); return S_OK; } catch (...) @@ -806,11 +864,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_PalmSync(abi_arg_out value) noexcept override + HRESULT __stdcall get_PalmSync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PalmSync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PalmSync()); return S_OK; } catch (...) @@ -820,11 +879,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DeviceFirmwareUpdate(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceFirmwareUpdate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceFirmwareUpdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceFirmwareUpdate()); return S_OK; } catch (...) @@ -834,11 +894,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Irda(abi_arg_out value) noexcept override + HRESULT __stdcall get_Irda(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Irda()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Irda()); return S_OK; } catch (...) @@ -848,11 +909,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Measurement(abi_arg_out value) noexcept override + HRESULT __stdcall get_Measurement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Measurement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Measurement()); return S_OK; } catch (...) @@ -862,11 +924,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_VendorSpecific(abi_arg_out value) noexcept override + HRESULT __stdcall get_VendorSpecific(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VendorSpecific()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VendorSpecific()); return S_OK; } catch (...) @@ -884,7 +947,8 @@ struct produce : produce_baseshim().BcdUsb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BcdUsb()); return S_OK; } catch (...) @@ -897,7 +961,8 @@ struct produce : produce_baseshim().MaxPacketSize0()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPacketSize0()); return S_OK; } catch (...) @@ -910,7 +975,8 @@ struct produce : produce_baseshim().VendorId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VendorId()); return S_OK; } catch (...) @@ -923,7 +989,8 @@ struct produce : produce_baseshim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -936,7 +1003,8 @@ struct produce : produce_baseshim().BcdDeviceRevision()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BcdDeviceRevision()); return S_OK; } catch (...) @@ -949,7 +1017,8 @@ struct produce : produce_baseshim().NumberOfConfigurations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfConfigurations()); return S_OK; } catch (...) @@ -962,11 +1031,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(uint32_t vendorId, uint32_t productId, GUID winUsbInterfaceClass, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(uint32_t vendorId, uint32_t productId, GUID winUsbInterfaceClass, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(vendorId, productId, winUsbInterfaceClass)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(vendorId, productId, winUsbInterfaceClass)); return S_OK; } catch (...) @@ -976,11 +1046,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorGuidOnly(GUID winUsbInterfaceClass, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(winUsbInterfaceClass)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(winUsbInterfaceClass)); return S_OK; } catch (...) @@ -990,11 +1061,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorVidPidOnly(uint32_t vendorId, uint32_t productId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(vendorId, productId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(vendorId, productId)); return S_OK; } catch (...) @@ -1004,11 +1076,12 @@ struct produce : produce_base usbClass, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceClassSelector(impl::abi_arg_in usbClass, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceClassSelector(*reinterpret_cast(&usbClass))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceClassSelector(*reinterpret_cast(&usbClass))); return S_OK; } catch (...) @@ -1018,11 +1091,12 @@ struct produce : produce_base deviceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1040,7 +1114,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().EndpointNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointNumber()); return S_OK; } catch (...) @@ -1053,7 +1128,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -1066,7 +1142,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().EndpointType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointType()); return S_OK; } catch (...) @@ -1075,11 +1152,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AsBulkInEndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AsBulkInEndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AsBulkInEndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AsBulkInEndpointDescriptor()); return S_OK; } catch (...) @@ -1089,11 +1167,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AsInterruptInEndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AsInterruptInEndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AsInterruptInEndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AsInterruptInEndpointDescriptor()); return S_OK; } catch (...) @@ -1103,11 +1182,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AsBulkOutEndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AsBulkOutEndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AsBulkOutEndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AsBulkOutEndpointDescriptor()); return S_OK; } catch (...) @@ -1117,11 +1197,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AsInterruptOutEndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AsInterruptOutEndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AsInterruptOutEndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AsInterruptOutEndpointDescriptor()); return S_OK; } catch (...) @@ -1135,11 +1216,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_TryParse(abi_arg_in descriptor, abi_arg_out parsed, bool * success) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed, bool * success) noexcept override { try { - *success = detach(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); return S_OK; } catch (...) @@ -1149,11 +1231,12 @@ struct produce : produc } } - HRESULT __stdcall abi_Parse(abi_arg_in descriptor, abi_arg_out parsed) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed) noexcept override { try { - *parsed = detach(this->shim().Parse(*reinterpret_cast(&descriptor))); + typename D::abi_guard guard(this->shim()); + *parsed = detach_abi(this->shim().Parse(*reinterpret_cast(&descriptor))); return S_OK; } catch (...) @@ -1167,11 +1250,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_BulkInPipes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BulkInPipes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BulkInPipes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BulkInPipes()); return S_OK; } catch (...) @@ -1181,11 +1265,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_InterruptInPipes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InterruptInPipes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterruptInPipes()); return S_OK; } catch (...) @@ -1195,11 +1280,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BulkOutPipes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BulkOutPipes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BulkOutPipes()); return S_OK; } catch (...) @@ -1209,11 +1295,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_InterruptOutPipes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InterruptOutPipes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterruptOutPipes()); return S_OK; } catch (...) @@ -1223,11 +1310,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_InterfaceSettings(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InterfaceSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterfaceSettings()); return S_OK; } catch (...) @@ -1241,7 +1329,8 @@ struct produce : produce_baseshim().InterfaceNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterfaceNumber()); return S_OK; } catch (...) @@ -1250,11 +1339,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Descriptors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Descriptors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Descriptors()); return S_OK; } catch (...) @@ -1272,7 +1362,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ClassCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClassCode()); return S_OK; } catch (...) @@ -1285,7 +1376,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SubclassCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubclassCode()); return S_OK; } catch (...) @@ -1298,7 +1390,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ProtocolCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtocolCode()); return S_OK; } catch (...) @@ -1311,7 +1404,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().AlternateSettingNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateSettingNumber()); return S_OK; } catch (...) @@ -1324,7 +1418,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().InterfaceNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterfaceNumber()); return S_OK; } catch (...) @@ -1337,11 +1432,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_TryParse(abi_arg_in descriptor, abi_arg_out parsed, bool * success) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed, bool * success) noexcept override { try { - *success = detach(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryParse(*reinterpret_cast(&descriptor), *parsed)); return S_OK; } catch (...) @@ -1351,11 +1447,12 @@ struct produce : produ } } - HRESULT __stdcall abi_Parse(abi_arg_in descriptor, abi_arg_out parsed) noexcept override + HRESULT __stdcall abi_Parse(impl::abi_arg_in descriptor, impl::abi_arg_out parsed) noexcept override { try { - *parsed = detach(this->shim().Parse(*reinterpret_cast(&descriptor))); + typename D::abi_guard guard(this->shim()); + *parsed = detach_abi(this->shim().Parse(*reinterpret_cast(&descriptor))); return S_OK; } catch (...) @@ -1369,11 +1466,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_BulkInEndpoints(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BulkInEndpoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BulkInEndpoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BulkInEndpoints()); return S_OK; } catch (...) @@ -1383,11 +1481,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_InterruptInEndpoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InterruptInEndpoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterruptInEndpoints()); return S_OK; } catch (...) @@ -1397,11 +1496,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BulkOutEndpoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BulkOutEndpoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BulkOutEndpoints()); return S_OK; } catch (...) @@ -1411,11 +1511,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_InterruptOutEndpoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InterruptOutEndpoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterruptOutEndpoints()); return S_OK; } catch (...) @@ -1429,7 +1530,8 @@ struct produce : produce_baseshim().Selected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selected()); return S_OK; } catch (...) @@ -1438,11 +1540,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_SelectSettingAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SelectSettingAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SelectSettingAsync()); return S_OK; } catch (...) @@ -1452,11 +1555,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InterfaceDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InterfaceDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterfaceDescriptor()); return S_OK; } catch (...) @@ -1466,11 +1570,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Descriptors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Descriptors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Descriptors()); return S_OK; } catch (...) @@ -1488,7 +1593,8 @@ struct produce : pr { try { - *value = detach(this->shim().MaxPacketSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPacketSize()); return S_OK; } catch (...) @@ -1501,7 +1607,8 @@ struct produce : pr { try { - *value = detach(this->shim().EndpointNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointNumber()); return S_OK; } catch (...) @@ -1510,11 +1617,12 @@ struct produce : pr } } - HRESULT __stdcall get_Interval(abi_arg_out value) noexcept override + HRESULT __stdcall get_Interval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Interval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Interval()); return S_OK; } catch (...) @@ -1523,11 +1631,12 @@ struct produce : pr } } - HRESULT __stdcall get_Pipe(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pipe(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pipe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pipe()); return S_OK; } catch (...) @@ -1541,11 +1650,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_InterruptData(abi_arg_out value) noexcept override + HRESULT __stdcall get_InterruptData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InterruptData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterruptData()); return S_OK; } catch (...) @@ -1559,11 +1669,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_EndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointDescriptor()); return S_OK; } catch (...) @@ -1573,11 +1684,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_ClearStallAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ClearStallAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClearStallAsync()); return S_OK; } catch (...) @@ -1587,11 +1699,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_DataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1604,6 +1717,7 @@ struct produce : produce_baseshim()); this->shim().DataReceived(token); return S_OK; } @@ -1621,7 +1735,8 @@ struct produce : p { try { - *value = detach(this->shim().MaxPacketSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPacketSize()); return S_OK; } catch (...) @@ -1634,7 +1749,8 @@ struct produce : p { try { - *value = detach(this->shim().EndpointNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointNumber()); return S_OK; } catch (...) @@ -1643,11 +1759,12 @@ struct produce : p } } - HRESULT __stdcall get_Interval(abi_arg_out value) noexcept override + HRESULT __stdcall get_Interval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Interval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Interval()); return S_OK; } catch (...) @@ -1656,11 +1773,12 @@ struct produce : p } } - HRESULT __stdcall get_Pipe(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pipe(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pipe()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pipe()); return S_OK; } catch (...) @@ -1674,11 +1792,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_EndpointDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndpointDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndpointDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointDescriptor()); return S_OK; } catch (...) @@ -1688,11 +1807,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_ClearStallAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ClearStallAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ClearStallAsync()); return S_OK; } catch (...) @@ -1706,6 +1826,7 @@ struct produce : produce_baseshim()); this->shim().WriteOptions(value); return S_OK; } @@ -1719,7 +1840,8 @@ struct produce : produce_baseshim().WriteOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WriteOptions()); return S_OK; } catch (...) @@ -1728,11 +1850,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -1746,11 +1869,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_RequestType(abi_arg_out value) noexcept override + HRESULT __stdcall get_RequestType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestType()); return S_OK; } catch (...) @@ -1760,10 +1884,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RequestType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestType(*reinterpret_cast(&value)); return S_OK; } @@ -1777,7 +1902,8 @@ struct produce : produce_baseshim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1790,6 +1916,7 @@ struct produce : produce_baseshim()); this->shim().Request(value); return S_OK; } @@ -1803,7 +1930,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1816,6 +1944,7 @@ struct produce : produce_baseshim()); this->shim().Value(value); return S_OK; } @@ -1829,7 +1958,8 @@ struct produce : produce_baseshim().Index()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Index()); return S_OK; } catch (...) @@ -1842,6 +1972,7 @@ struct produce : produce_baseshim()); this->shim().Index(value); return S_OK; } @@ -1855,7 +1986,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -1868,6 +2000,7 @@ struct produce : produce_baseshim()); this->shim().Length(value); return S_OK; } @@ -1881,11 +2014,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWithEightByteBuffer(abi_arg_in eightByteBuffer, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithEightByteBuffer(impl::abi_arg_in eightByteBuffer, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithEightByteBuffer(*reinterpret_cast(&eightByteBuffer))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithEightByteBuffer(*reinterpret_cast(&eightByteBuffer))); return S_OK; } catch (...) @@ -1903,537 +2037,537 @@ namespace Windows::Devices::Usb { template Windows::Devices::Usb::UsbTransferDirection impl_IUsbControlRequestType::Direction() const { Windows::Devices::Usb::UsbTransferDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(&value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->get_Direction(&value)); return value; } template void impl_IUsbControlRequestType::Direction(Windows::Devices::Usb::UsbTransferDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_Direction(value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->put_Direction(value)); } template Windows::Devices::Usb::UsbControlTransferType impl_IUsbControlRequestType::ControlTransferType() const { Windows::Devices::Usb::UsbControlTransferType value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlTransferType(&value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->get_ControlTransferType(&value)); return value; } template void impl_IUsbControlRequestType::ControlTransferType(Windows::Devices::Usb::UsbControlTransferType value) const { - check_hresult(static_cast(static_cast(*this))->put_ControlTransferType(value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->put_ControlTransferType(value)); } template Windows::Devices::Usb::UsbControlRecipient impl_IUsbControlRequestType::Recipient() const { Windows::Devices::Usb::UsbControlRecipient value {}; - check_hresult(static_cast(static_cast(*this))->get_Recipient(&value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->get_Recipient(&value)); return value; } template void impl_IUsbControlRequestType::Recipient(Windows::Devices::Usb::UsbControlRecipient value) const { - check_hresult(static_cast(static_cast(*this))->put_Recipient(value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->put_Recipient(value)); } template uint8_t impl_IUsbControlRequestType::AsByte() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AsByte(&value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->get_AsByte(&value)); return value; } template void impl_IUsbControlRequestType::AsByte(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_AsByte(value)); + check_hresult(WINRT_SHIM(IUsbControlRequestType)->put_AsByte(value)); } template Windows::Devices::Usb::UsbSetupPacket impl_IUsbSetupPacketFactory::CreateWithEightByteBuffer(const Windows::Storage::Streams::IBuffer & eightByteBuffer) const { Windows::Devices::Usb::UsbSetupPacket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithEightByteBuffer(get(eightByteBuffer), put(value))); + check_hresult(WINRT_SHIM(IUsbSetupPacketFactory)->abi_CreateWithEightByteBuffer(get_abi(eightByteBuffer), put_abi(value))); return value; } template Windows::Devices::Usb::UsbControlRequestType impl_IUsbSetupPacket::RequestType() const { Windows::Devices::Usb::UsbControlRequestType value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RequestType(put(value))); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->get_RequestType(put_abi(value))); return value; } template void impl_IUsbSetupPacket::RequestType(const Windows::Devices::Usb::UsbControlRequestType & value) const { - check_hresult(static_cast(static_cast(*this))->put_RequestType(get(value))); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->put_RequestType(get_abi(value))); } template uint8_t impl_IUsbSetupPacket::Request() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Request(&value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->get_Request(&value)); return value; } template void impl_IUsbSetupPacket::Request(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Request(value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->put_Request(value)); } template uint32_t impl_IUsbSetupPacket::Value() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->get_Value(&value)); return value; } template void impl_IUsbSetupPacket::Value(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->put_Value(value)); } template uint32_t impl_IUsbSetupPacket::Index() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Index(&value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->get_Index(&value)); return value; } template void impl_IUsbSetupPacket::Index(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Index(value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->put_Index(value)); } template uint32_t impl_IUsbSetupPacket::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->get_Length(&value)); return value; } template void impl_IUsbSetupPacket::Length(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Length(value)); + check_hresult(WINRT_SHIM(IUsbSetupPacket)->put_Length(value)); } template uint8_t impl_IUsbDeviceClass::ClassCode() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ClassCode(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->get_ClassCode(&value)); return value; } template void impl_IUsbDeviceClass::ClassCode(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ClassCode(value)); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->put_ClassCode(value)); } template Windows::Foundation::IReference impl_IUsbDeviceClass::SubclassCode() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SubclassCode(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->get_SubclassCode(put_abi(value))); return value; } -template void impl_IUsbDeviceClass::SubclassCode(const Windows::Foundation::IReference & value) const +template void impl_IUsbDeviceClass::SubclassCode(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_SubclassCode(get(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->put_SubclassCode(get_abi(value))); } template Windows::Foundation::IReference impl_IUsbDeviceClass::ProtocolCode() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ProtocolCode(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->get_ProtocolCode(put_abi(value))); return value; } -template void impl_IUsbDeviceClass::ProtocolCode(const Windows::Foundation::IReference & value) const +template void impl_IUsbDeviceClass::ProtocolCode(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtocolCode(get(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClass)->put_ProtocolCode(get_abi(value))); } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::CdcControl() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CdcControl(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_CdcControl(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::Physical() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Physical(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_Physical(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::PersonalHealthcare() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PersonalHealthcare(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_PersonalHealthcare(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::ActiveSync() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActiveSync(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_ActiveSync(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::PalmSync() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PalmSync(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_PalmSync(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::DeviceFirmwareUpdate() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceFirmwareUpdate(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_DeviceFirmwareUpdate(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::Irda() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Irda(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_Irda(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::Measurement() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Measurement(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_Measurement(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceClass impl_IUsbDeviceClassesStatics::VendorSpecific() const { Windows::Devices::Usb::UsbDeviceClass value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VendorSpecific(put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceClassesStatics)->get_VendorSpecific(put_abi(value))); return value; } template hstring impl_IUsbDeviceStatics::GetDeviceSelector(uint32_t vendorId, uint32_t productId, GUID winUsbInterfaceClass) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(vendorId, productId, winUsbInterfaceClass, put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceStatics)->abi_GetDeviceSelector(vendorId, productId, winUsbInterfaceClass, put_abi(value))); return value; } template hstring impl_IUsbDeviceStatics::GetDeviceSelector(GUID winUsbInterfaceClass) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorGuidOnly(winUsbInterfaceClass, put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceStatics)->abi_GetDeviceSelectorGuidOnly(winUsbInterfaceClass, put_abi(value))); return value; } template hstring impl_IUsbDeviceStatics::GetDeviceSelector(uint32_t vendorId, uint32_t productId) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorVidPidOnly(vendorId, productId, put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceStatics)->abi_GetDeviceSelectorVidPidOnly(vendorId, productId, put_abi(value))); return value; } template hstring impl_IUsbDeviceStatics::GetDeviceClassSelector(const Windows::Devices::Usb::UsbDeviceClass & usbClass) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceClassSelector(get(usbClass), put(value))); + check_hresult(WINRT_SHIM(IUsbDeviceStatics)->abi_GetDeviceClassSelector(get_abi(usbClass), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IUsbDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IUsbDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(operation))); + check_hresult(WINRT_SHIM(IUsbDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(operation))); return operation; } template uint32_t impl_IUsbDeviceDescriptor::BcdUsb() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BcdUsb(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_BcdUsb(&value)); return value; } template uint8_t impl_IUsbDeviceDescriptor::MaxPacketSize0() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPacketSize0(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_MaxPacketSize0(&value)); return value; } template uint32_t impl_IUsbDeviceDescriptor::VendorId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VendorId(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_VendorId(&value)); return value; } template uint32_t impl_IUsbDeviceDescriptor::ProductId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProductId(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_ProductId(&value)); return value; } template uint32_t impl_IUsbDeviceDescriptor::BcdDeviceRevision() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BcdDeviceRevision(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_BcdDeviceRevision(&value)); return value; } template uint8_t impl_IUsbDeviceDescriptor::NumberOfConfigurations() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfConfigurations(&value)); + check_hresult(WINRT_SHIM(IUsbDeviceDescriptor)->get_NumberOfConfigurations(&value)); return value; } template uint8_t impl_IUsbConfigurationDescriptor::ConfigurationValue() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ConfigurationValue(&value)); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptor)->get_ConfigurationValue(&value)); return value; } template uint32_t impl_IUsbConfigurationDescriptor::MaxPowerMilliamps() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPowerMilliamps(&value)); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptor)->get_MaxPowerMilliamps(&value)); return value; } template bool impl_IUsbConfigurationDescriptor::SelfPowered() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SelfPowered(&value)); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptor)->get_SelfPowered(&value)); return value; } template bool impl_IUsbConfigurationDescriptor::RemoteWakeup() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteWakeup(&value)); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptor)->get_RemoteWakeup(&value)); return value; } template bool impl_IUsbConfigurationDescriptorStatics::TryParse(const Windows::Devices::Usb::UsbDescriptor & descriptor, Windows::Devices::Usb::UsbConfigurationDescriptor & parsed) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(descriptor), put(parsed), &success)); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptorStatics)->abi_TryParse(get_abi(descriptor), put_abi(parsed), &success)); return success; } template Windows::Devices::Usb::UsbConfigurationDescriptor impl_IUsbConfigurationDescriptorStatics::Parse(const Windows::Devices::Usb::UsbDescriptor & descriptor) const { Windows::Devices::Usb::UsbConfigurationDescriptor parsed { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(descriptor), put(parsed))); + check_hresult(WINRT_SHIM(IUsbConfigurationDescriptorStatics)->abi_Parse(get_abi(descriptor), put_abi(parsed))); return parsed; } template uint8_t impl_IUsbInterfaceDescriptor::ClassCode() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ClassCode(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptor)->get_ClassCode(&value)); return value; } template uint8_t impl_IUsbInterfaceDescriptor::SubclassCode() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SubclassCode(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptor)->get_SubclassCode(&value)); return value; } template uint8_t impl_IUsbInterfaceDescriptor::ProtocolCode() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtocolCode(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptor)->get_ProtocolCode(&value)); return value; } template uint8_t impl_IUsbInterfaceDescriptor::AlternateSettingNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AlternateSettingNumber(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptor)->get_AlternateSettingNumber(&value)); return value; } template uint8_t impl_IUsbInterfaceDescriptor::InterfaceNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InterfaceNumber(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptor)->get_InterfaceNumber(&value)); return value; } template bool impl_IUsbInterfaceDescriptorStatics::TryParse(const Windows::Devices::Usb::UsbDescriptor & descriptor, Windows::Devices::Usb::UsbInterfaceDescriptor & parsed) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(descriptor), put(parsed), &success)); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptorStatics)->abi_TryParse(get_abi(descriptor), put_abi(parsed), &success)); return success; } template Windows::Devices::Usb::UsbInterfaceDescriptor impl_IUsbInterfaceDescriptorStatics::Parse(const Windows::Devices::Usb::UsbDescriptor & descriptor) const { Windows::Devices::Usb::UsbInterfaceDescriptor parsed { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(descriptor), put(parsed))); + check_hresult(WINRT_SHIM(IUsbInterfaceDescriptorStatics)->abi_Parse(get_abi(descriptor), put_abi(parsed))); return parsed; } template uint8_t impl_IUsbEndpointDescriptor::EndpointNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointNumber(&value)); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_EndpointNumber(&value)); return value; } template Windows::Devices::Usb::UsbTransferDirection impl_IUsbEndpointDescriptor::Direction() const { Windows::Devices::Usb::UsbTransferDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(&value)); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_Direction(&value)); return value; } template Windows::Devices::Usb::UsbEndpointType impl_IUsbEndpointDescriptor::EndpointType() const { Windows::Devices::Usb::UsbEndpointType value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointType(&value)); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_EndpointType(&value)); return value; } template Windows::Devices::Usb::UsbBulkInEndpointDescriptor impl_IUsbEndpointDescriptor::AsBulkInEndpointDescriptor() const { Windows::Devices::Usb::UsbBulkInEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AsBulkInEndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_AsBulkInEndpointDescriptor(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptInEndpointDescriptor impl_IUsbEndpointDescriptor::AsInterruptInEndpointDescriptor() const { Windows::Devices::Usb::UsbInterruptInEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AsInterruptInEndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_AsInterruptInEndpointDescriptor(put_abi(value))); return value; } template Windows::Devices::Usb::UsbBulkOutEndpointDescriptor impl_IUsbEndpointDescriptor::AsBulkOutEndpointDescriptor() const { Windows::Devices::Usb::UsbBulkOutEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AsBulkOutEndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_AsBulkOutEndpointDescriptor(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptOutEndpointDescriptor impl_IUsbEndpointDescriptor::AsInterruptOutEndpointDescriptor() const { Windows::Devices::Usb::UsbInterruptOutEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AsInterruptOutEndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptor)->get_AsInterruptOutEndpointDescriptor(put_abi(value))); return value; } template bool impl_IUsbEndpointDescriptorStatics::TryParse(const Windows::Devices::Usb::UsbDescriptor & descriptor, Windows::Devices::Usb::UsbEndpointDescriptor & parsed) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(descriptor), put(parsed), &success)); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptorStatics)->abi_TryParse(get_abi(descriptor), put_abi(parsed), &success)); return success; } template Windows::Devices::Usb::UsbEndpointDescriptor impl_IUsbEndpointDescriptorStatics::Parse(const Windows::Devices::Usb::UsbDescriptor & descriptor) const { Windows::Devices::Usb::UsbEndpointDescriptor parsed { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Parse(get(descriptor), put(parsed))); + check_hresult(WINRT_SHIM(IUsbEndpointDescriptorStatics)->abi_Parse(get_abi(descriptor), put_abi(parsed))); return parsed; } template uint8_t impl_IUsbDescriptor::Length() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IUsbDescriptor)->get_Length(&value)); return value; } template uint8_t impl_IUsbDescriptor::DescriptorType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DescriptorType(&value)); + check_hresult(WINRT_SHIM(IUsbDescriptor)->get_DescriptorType(&value)); return value; } template void impl_IUsbDescriptor::ReadDescriptorBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_ReadDescriptorBuffer(get(buffer))); + check_hresult(WINRT_SHIM(IUsbDescriptor)->abi_ReadDescriptorBuffer(get_abi(buffer))); } template Windows::Storage::Streams::IBuffer impl_IUsbInterruptInEventArgs::InterruptData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_InterruptData(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptInEventArgs)->get_InterruptData(put_abi(value))); return value; } template uint32_t impl_IUsbBulkInPipe::MaxTransferSizeBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxTransferSizeBytes(&value)); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->get_MaxTransferSizeBytes(&value)); return value; } template Windows::Devices::Usb::UsbBulkInEndpointDescriptor impl_IUsbBulkInPipe::EndpointDescriptor() const { Windows::Devices::Usb::UsbBulkInEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->get_EndpointDescriptor(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IUsbBulkInPipe::ClearStallAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ClearStallAsync(put(operation))); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->abi_ClearStallAsync(put_abi(operation))); return operation; } template void impl_IUsbBulkInPipe::ReadOptions(Windows::Devices::Usb::UsbReadOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_ReadOptions(value)); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->put_ReadOptions(value)); } template Windows::Devices::Usb::UsbReadOptions impl_IUsbBulkInPipe::ReadOptions() const { Windows::Devices::Usb::UsbReadOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadOptions(&value)); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->get_ReadOptions(&value)); return value; } template void impl_IUsbBulkInPipe::FlushBuffer() const { - check_hresult(static_cast(static_cast(*this))->abi_FlushBuffer()); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->abi_FlushBuffer()); } template Windows::Storage::Streams::IInputStream impl_IUsbBulkInPipe::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkInPipe)->get_InputStream(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptInEndpointDescriptor impl_IUsbInterruptInPipe::EndpointDescriptor() const { Windows::Devices::Usb::UsbInterruptInEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptInPipe)->get_EndpointDescriptor(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IUsbInterruptInPipe::ClearStallAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ClearStallAsync(put(operation))); + check_hresult(WINRT_SHIM(IUsbInterruptInPipe)->abi_ClearStallAsync(put_abi(operation))); return operation; } template event_token impl_IUsbInterruptInPipe::DataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IUsbInterruptInPipe)->add_DataReceived(get_abi(handler), &token)); return token; } @@ -2444,345 +2578,345 @@ template event_revoker impl_IUsbInterruptInPip template void impl_IUsbInterruptInPipe::DataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DataReceived(token)); + check_hresult(WINRT_SHIM(IUsbInterruptInPipe)->remove_DataReceived(token)); } template Windows::Devices::Usb::UsbBulkOutEndpointDescriptor impl_IUsbBulkOutPipe::EndpointDescriptor() const { Windows::Devices::Usb::UsbBulkOutEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkOutPipe)->get_EndpointDescriptor(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IUsbBulkOutPipe::ClearStallAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ClearStallAsync(put(operation))); + check_hresult(WINRT_SHIM(IUsbBulkOutPipe)->abi_ClearStallAsync(put_abi(operation))); return operation; } template void impl_IUsbBulkOutPipe::WriteOptions(Windows::Devices::Usb::UsbWriteOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_WriteOptions(value)); + check_hresult(WINRT_SHIM(IUsbBulkOutPipe)->put_WriteOptions(value)); } template Windows::Devices::Usb::UsbWriteOptions impl_IUsbBulkOutPipe::WriteOptions() const { Windows::Devices::Usb::UsbWriteOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_WriteOptions(&value)); + check_hresult(WINRT_SHIM(IUsbBulkOutPipe)->get_WriteOptions(&value)); return value; } template Windows::Storage::Streams::IOutputStream impl_IUsbBulkOutPipe::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkOutPipe)->get_OutputStream(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptOutEndpointDescriptor impl_IUsbInterruptOutPipe::EndpointDescriptor() const { Windows::Devices::Usb::UsbInterruptOutEndpointDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EndpointDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptOutPipe)->get_EndpointDescriptor(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IUsbInterruptOutPipe::ClearStallAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ClearStallAsync(put(operation))); + check_hresult(WINRT_SHIM(IUsbInterruptOutPipe)->abi_ClearStallAsync(put_abi(operation))); return operation; } template void impl_IUsbInterruptOutPipe::WriteOptions(Windows::Devices::Usb::UsbWriteOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_WriteOptions(value)); + check_hresult(WINRT_SHIM(IUsbInterruptOutPipe)->put_WriteOptions(value)); } template Windows::Devices::Usb::UsbWriteOptions impl_IUsbInterruptOutPipe::WriteOptions() const { Windows::Devices::Usb::UsbWriteOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_WriteOptions(&value)); + check_hresult(WINRT_SHIM(IUsbInterruptOutPipe)->get_WriteOptions(&value)); return value; } template Windows::Storage::Streams::IOutputStream impl_IUsbInterruptOutPipe::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptOutPipe)->get_OutputStream(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbConfiguration::UsbInterfaces() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_UsbInterfaces(put(value))); + check_hresult(WINRT_SHIM(IUsbConfiguration)->get_UsbInterfaces(put_abi(value))); return value; } template Windows::Devices::Usb::UsbConfigurationDescriptor impl_IUsbConfiguration::ConfigurationDescriptor() const { Windows::Devices::Usb::UsbConfigurationDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConfigurationDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbConfiguration)->get_ConfigurationDescriptor(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbConfiguration::Descriptors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Descriptors(put(value))); + check_hresult(WINRT_SHIM(IUsbConfiguration)->get_Descriptors(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::BulkInPipes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_BulkInPipes(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_BulkInPipes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::InterruptInPipes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InterruptInPipes(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_InterruptInPipes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::BulkOutPipes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_BulkOutPipes(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_BulkOutPipes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::InterruptOutPipes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InterruptOutPipes(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_InterruptOutPipes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::InterfaceSettings() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InterfaceSettings(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_InterfaceSettings(put_abi(value))); return value; } template uint8_t impl_IUsbInterface::InterfaceNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InterfaceNumber(&value)); + check_hresult(WINRT_SHIM(IUsbInterface)->get_InterfaceNumber(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterface::Descriptors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Descriptors(put(value))); + check_hresult(WINRT_SHIM(IUsbInterface)->get_Descriptors(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterfaceSetting::BulkInEndpoints() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_BulkInEndpoints(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_BulkInEndpoints(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterfaceSetting::InterruptInEndpoints() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InterruptInEndpoints(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_InterruptInEndpoints(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterfaceSetting::BulkOutEndpoints() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_BulkOutEndpoints(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_BulkOutEndpoints(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterfaceSetting::InterruptOutEndpoints() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_InterruptOutEndpoints(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_InterruptOutEndpoints(put_abi(value))); return value; } template bool impl_IUsbInterfaceSetting::Selected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Selected(&value)); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_Selected(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IUsbInterfaceSetting::SelectSettingAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SelectSettingAsync(put(operation))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->abi_SelectSettingAsync(put_abi(operation))); return operation; } template Windows::Devices::Usb::UsbInterfaceDescriptor impl_IUsbInterfaceSetting::InterfaceDescriptor() const { Windows::Devices::Usb::UsbInterfaceDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InterfaceDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_InterfaceDescriptor(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IUsbInterfaceSetting::Descriptors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Descriptors(put(value))); + check_hresult(WINRT_SHIM(IUsbInterfaceSetting)->get_Descriptors(put_abi(value))); return value; } template uint32_t impl_IUsbBulkInEndpointDescriptor::MaxPacketSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPacketSize(&value)); + check_hresult(WINRT_SHIM(IUsbBulkInEndpointDescriptor)->get_MaxPacketSize(&value)); return value; } template uint8_t impl_IUsbBulkInEndpointDescriptor::EndpointNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointNumber(&value)); + check_hresult(WINRT_SHIM(IUsbBulkInEndpointDescriptor)->get_EndpointNumber(&value)); return value; } template Windows::Devices::Usb::UsbBulkInPipe impl_IUsbBulkInEndpointDescriptor::Pipe() const { Windows::Devices::Usb::UsbBulkInPipe value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pipe(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkInEndpointDescriptor)->get_Pipe(put_abi(value))); return value; } template uint32_t impl_IUsbInterruptInEndpointDescriptor::MaxPacketSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPacketSize(&value)); + check_hresult(WINRT_SHIM(IUsbInterruptInEndpointDescriptor)->get_MaxPacketSize(&value)); return value; } template uint8_t impl_IUsbInterruptInEndpointDescriptor::EndpointNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointNumber(&value)); + check_hresult(WINRT_SHIM(IUsbInterruptInEndpointDescriptor)->get_EndpointNumber(&value)); return value; } template Windows::Foundation::TimeSpan impl_IUsbInterruptInEndpointDescriptor::Interval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Interval(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptInEndpointDescriptor)->get_Interval(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptInPipe impl_IUsbInterruptInEndpointDescriptor::Pipe() const { Windows::Devices::Usb::UsbInterruptInPipe value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pipe(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptInEndpointDescriptor)->get_Pipe(put_abi(value))); return value; } template uint32_t impl_IUsbBulkOutEndpointDescriptor::MaxPacketSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPacketSize(&value)); + check_hresult(WINRT_SHIM(IUsbBulkOutEndpointDescriptor)->get_MaxPacketSize(&value)); return value; } template uint8_t impl_IUsbBulkOutEndpointDescriptor::EndpointNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointNumber(&value)); + check_hresult(WINRT_SHIM(IUsbBulkOutEndpointDescriptor)->get_EndpointNumber(&value)); return value; } template Windows::Devices::Usb::UsbBulkOutPipe impl_IUsbBulkOutEndpointDescriptor::Pipe() const { Windows::Devices::Usb::UsbBulkOutPipe value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pipe(put(value))); + check_hresult(WINRT_SHIM(IUsbBulkOutEndpointDescriptor)->get_Pipe(put_abi(value))); return value; } template uint32_t impl_IUsbInterruptOutEndpointDescriptor::MaxPacketSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPacketSize(&value)); + check_hresult(WINRT_SHIM(IUsbInterruptOutEndpointDescriptor)->get_MaxPacketSize(&value)); return value; } template uint8_t impl_IUsbInterruptOutEndpointDescriptor::EndpointNumber() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndpointNumber(&value)); + check_hresult(WINRT_SHIM(IUsbInterruptOutEndpointDescriptor)->get_EndpointNumber(&value)); return value; } template Windows::Foundation::TimeSpan impl_IUsbInterruptOutEndpointDescriptor::Interval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Interval(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptOutEndpointDescriptor)->get_Interval(put_abi(value))); return value; } template Windows::Devices::Usb::UsbInterruptOutPipe impl_IUsbInterruptOutEndpointDescriptor::Pipe() const { Windows::Devices::Usb::UsbInterruptOutPipe value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pipe(put(value))); + check_hresult(WINRT_SHIM(IUsbInterruptOutEndpointDescriptor)->get_Pipe(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IUsbDevice::SendControlOutTransferAsync(const Windows::Devices::Usb::UsbSetupPacket & setupPacket, const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendControlOutTransferAsync(get(setupPacket), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IUsbDevice)->abi_SendControlOutTransferAsync(get_abi(setupPacket), get_abi(buffer), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUsbDevice::SendControlOutTransferAsync(const Windows::Devices::Usb::UsbSetupPacket & setupPacket) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendControlOutTransferAsyncNoBuffer(get(setupPacket), put(operation))); + check_hresult(WINRT_SHIM(IUsbDevice)->abi_SendControlOutTransferAsyncNoBuffer(get_abi(setupPacket), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUsbDevice::SendControlInTransferAsync(const Windows::Devices::Usb::UsbSetupPacket & setupPacket, const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendControlInTransferAsync(get(setupPacket), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IUsbDevice)->abi_SendControlInTransferAsync(get_abi(setupPacket), get_abi(buffer), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUsbDevice::SendControlInTransferAsync(const Windows::Devices::Usb::UsbSetupPacket & setupPacket) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendControlInTransferAsyncNoBuffer(get(setupPacket), put(operation))); + check_hresult(WINRT_SHIM(IUsbDevice)->abi_SendControlInTransferAsyncNoBuffer(get_abi(setupPacket), put_abi(operation))); return operation; } template Windows::Devices::Usb::UsbInterface impl_IUsbDevice::DefaultInterface() const { Windows::Devices::Usb::UsbInterface value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultInterface(put(value))); + check_hresult(WINRT_SHIM(IUsbDevice)->get_DefaultInterface(put_abi(value))); return value; } template Windows::Devices::Usb::UsbDeviceDescriptor impl_IUsbDevice::DeviceDescriptor() const { Windows::Devices::Usb::UsbDeviceDescriptor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceDescriptor(put(value))); + check_hresult(WINRT_SHIM(IUsbDevice)->get_DeviceDescriptor(put_abi(value))); return value; } template Windows::Devices::Usb::UsbConfiguration impl_IUsbDevice::Configuration() const { Windows::Devices::Usb::UsbConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(value))); + check_hresult(WINRT_SHIM(IUsbDevice)->get_Configuration(put_abi(value))); return value; } @@ -2820,7 +2954,7 @@ inline hstring UsbDevice::GetDeviceClassSelector(const Windows::Devices::Usb::Us return get_activation_factory().GetDeviceClassSelector(usbClass); } -inline Windows::Foundation::IAsyncOperation UsbDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation UsbDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -2905,3 +3039,455 @@ inline UsbSetupPacket::UsbSetupPacket(const Windows::Storage::Streams::IBuffer & } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbBulkInEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbBulkInPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbBulkOutEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbBulkOutPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbConfigurationDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbConfigurationDescriptorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbControlRequestType & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDeviceClass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDeviceClasses & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDeviceClassesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDeviceDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbEndpointDescriptorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterfaceDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterfaceDescriptorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterfaceSetting & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterruptInEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterruptInEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterruptInPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterruptOutEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbInterruptOutPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbSetupPacket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::IUsbSetupPacketFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbBulkInEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbBulkInPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbBulkOutEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbBulkOutPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbConfigurationDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbControlRequestType & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbDeviceClass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbDeviceClasses & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbDeviceDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterfaceDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterfaceSetting & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterruptInEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterruptInEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterruptInPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterruptOutEndpointDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbInterruptOutPipe & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::Usb::UsbSetupPacket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.WiFi.h b/10.0.14393.0/winrt/Windows.Devices.WiFi.h index d28a78572..128d6fec9 100644 --- a/10.0.14393.0/winrt/Windows.Devices.WiFi.h +++ b/10.0.14393.0/winrt/Windows.Devices.WiFi.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Networking.Connectivity.3.h" #include "internal/Windows.Security.Credentials.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_NetworkAdapter(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAdapter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAdapter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapter()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ScanAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScanAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanAsync()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NetworkReport(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkReport()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produce_base> args, event_token * eventCookie) noexcept override + HRESULT __stdcall add_AvailableNetworksChanged(impl::abi_arg_in> args, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().AvailableNetworksChanged(*reinterpret_cast *>(&args))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().AvailableNetworksChanged(*reinterpret_cast *>(&args))); return S_OK; } catch (...) @@ -76,6 +83,7 @@ struct produce : produce_baseshim()); this->shim().AvailableNetworksChanged(eventCookie); return S_OK; } @@ -85,11 +93,12 @@ struct produce : produce_base availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind)); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce : produce_base availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, abi_arg_in passwordCredential, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ConnectWithPasswordCredentialAsync(impl::abi_arg_in availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, impl::abi_arg_in passwordCredential, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind, *reinterpret_cast(&passwordCredential))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind, *reinterpret_cast(&passwordCredential))); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce : produce_base availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, abi_arg_in passwordCredential, abi_arg_in ssid, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ConnectWithPasswordCredentialAndSsidAsync(impl::abi_arg_in availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, impl::abi_arg_in passwordCredential, impl::abi_arg_in ssid, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind, *reinterpret_cast(&passwordCredential), *reinterpret_cast(&ssid))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), reconnectionKind, *reinterpret_cast(&passwordCredential), *reinterpret_cast(&ssid))); return S_OK; } catch (...) @@ -131,6 +142,7 @@ struct produce : produce_baseshim()); this->shim().Disconnect(); return S_OK; } @@ -144,11 +156,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FindAllAdaptersAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllAdaptersAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllAdaptersAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllAdaptersAsync()); return S_OK; } catch (...) @@ -158,11 +171,12 @@ struct produce : produce_base deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -172,11 +186,12 @@ struct produce : produce_base deviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -186,11 +201,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -204,11 +220,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Uptime(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uptime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uptime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uptime()); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Ssid(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ssid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ssid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ssid()); return S_OK; } catch (...) @@ -231,11 +249,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Bssid(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bssid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bssid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bssid()); return S_OK; } catch (...) @@ -249,7 +268,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ChannelCenterFrequencyInKilohertz()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelCenterFrequencyInKilohertz()); return S_OK; } catch (...) @@ -262,7 +282,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().NetworkRssiInDecibelMilliwatts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkRssiInDecibelMilliwatts()); return S_OK; } catch (...) @@ -275,7 +296,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SignalBars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignalBars()); return S_OK; } catch (...) @@ -288,7 +310,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().NetworkKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkKind()); return S_OK; } catch (...) @@ -301,7 +324,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().PhyKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhyKind()); return S_OK; } catch (...) @@ -310,11 +334,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_SecuritySettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecuritySettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecuritySettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecuritySettings()); return S_OK; } catch (...) @@ -324,11 +349,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_BeaconInterval(abi_arg_out value) noexcept override + HRESULT __stdcall get_BeaconInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BeaconInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BeaconInterval()); return S_OK; } catch (...) @@ -341,7 +367,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsWiFiDirect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWiFiDirect()); return S_OK; } catch (...) @@ -358,7 +385,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -371,11 +399,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -384,11 +413,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AvailableNetworks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableNetworks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableNetworks()); return S_OK; } catch (...) @@ -406,190 +436,190 @@ namespace Windows::Devices::WiFi { template Windows::Foundation::IAsyncOperation> impl_IWiFiAdapterStatics::FindAllAdaptersAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAdaptersAsync(put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapterStatics)->abi_FindAllAdaptersAsync(put_abi(value))); return value; } template hstring impl_IWiFiAdapterStatics::GetDeviceSelector() const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(deviceSelector))); + check_hresult(WINRT_SHIM(IWiFiAdapterStatics)->abi_GetDeviceSelector(put_abi(deviceSelector))); return deviceSelector; } -template Windows::Foundation::IAsyncOperation impl_IWiFiAdapterStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IWiFiAdapterStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IWiFiAdapterStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IWiFiAdapterStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapterStatics)->abi_RequestAccessAsync(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkAdapter impl_IWiFiAdapter::NetworkAdapter() const { Windows::Networking::Connectivity::NetworkAdapter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapter(put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->get_NetworkAdapter(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IWiFiAdapter::ScanAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ScanAsync(put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->abi_ScanAsync(put_abi(value))); return value; } template Windows::Devices::WiFi::WiFiNetworkReport impl_IWiFiAdapter::NetworkReport() const { Windows::Devices::WiFi::WiFiNetworkReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkReport(put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->get_NetworkReport(put_abi(value))); return value; } -template event_token impl_IWiFiAdapter::AvailableNetworksChanged(const Windows::Foundation::TypedEventHandler & args) const +template event_token impl_IWiFiAdapter::AvailableNetworksChanged(const Windows::Foundation::TypedEventHandler & args) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_AvailableNetworksChanged(get(args), &eventCookie)); + check_hresult(WINRT_SHIM(IWiFiAdapter)->add_AvailableNetworksChanged(get_abi(args), &eventCookie)); return eventCookie; } -template event_revoker impl_IWiFiAdapter::AvailableNetworksChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & args) const +template event_revoker impl_IWiFiAdapter::AvailableNetworksChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & args) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::WiFi::IWiFiAdapter::remove_AvailableNetworksChanged, AvailableNetworksChanged(args)); } template void impl_IWiFiAdapter::AvailableNetworksChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AvailableNetworksChanged(eventCookie)); + check_hresult(WINRT_SHIM(IWiFiAdapter)->remove_AvailableNetworksChanged(eventCookie)); } template Windows::Foundation::IAsyncOperation impl_IWiFiAdapter::ConnectAsync(const Windows::Devices::WiFi::WiFiAvailableNetwork & availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(availableNetwork), reconnectionKind, put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->abi_ConnectAsync(get_abi(availableNetwork), reconnectionKind, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IWiFiAdapter::ConnectAsync(const Windows::Devices::WiFi::WiFiAvailableNetwork & availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, const Windows::Security::Credentials::PasswordCredential & passwordCredential) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithPasswordCredentialAsync(get(availableNetwork), reconnectionKind, get(passwordCredential), put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->abi_ConnectWithPasswordCredentialAsync(get_abi(availableNetwork), reconnectionKind, get_abi(passwordCredential), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IWiFiAdapter::ConnectAsync(const Windows::Devices::WiFi::WiFiAvailableNetwork & availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, const Windows::Security::Credentials::PasswordCredential & passwordCredential, hstring_ref ssid) const +template Windows::Foundation::IAsyncOperation impl_IWiFiAdapter::ConnectAsync(const Windows::Devices::WiFi::WiFiAvailableNetwork & availableNetwork, Windows::Devices::WiFi::WiFiReconnectionKind reconnectionKind, const Windows::Security::Credentials::PasswordCredential & passwordCredential, hstring_view ssid) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithPasswordCredentialAndSsidAsync(get(availableNetwork), reconnectionKind, get(passwordCredential), get(ssid), put(value))); + check_hresult(WINRT_SHIM(IWiFiAdapter)->abi_ConnectWithPasswordCredentialAndSsidAsync(get_abi(availableNetwork), reconnectionKind, get_abi(passwordCredential), get_abi(ssid), put_abi(value))); return value; } template void impl_IWiFiAdapter::Disconnect() const { - check_hresult(static_cast(static_cast(*this))->abi_Disconnect()); + check_hresult(WINRT_SHIM(IWiFiAdapter)->abi_Disconnect()); } template Windows::Foundation::DateTime impl_IWiFiNetworkReport::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IWiFiNetworkReport)->get_Timestamp(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWiFiNetworkReport::AvailableNetworks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableNetworks(put(value))); + check_hresult(WINRT_SHIM(IWiFiNetworkReport)->get_AvailableNetworks(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IWiFiAvailableNetwork::Uptime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Uptime(put(value))); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_Uptime(put_abi(value))); return value; } template hstring impl_IWiFiAvailableNetwork::Ssid() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ssid(put(value))); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_Ssid(put_abi(value))); return value; } template hstring impl_IWiFiAvailableNetwork::Bssid() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bssid(put(value))); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_Bssid(put_abi(value))); return value; } template int32_t impl_IWiFiAvailableNetwork::ChannelCenterFrequencyInKilohertz() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelCenterFrequencyInKilohertz(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_ChannelCenterFrequencyInKilohertz(&value)); return value; } template double impl_IWiFiAvailableNetwork::NetworkRssiInDecibelMilliwatts() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkRssiInDecibelMilliwatts(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_NetworkRssiInDecibelMilliwatts(&value)); return value; } template uint8_t impl_IWiFiAvailableNetwork::SignalBars() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SignalBars(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_SignalBars(&value)); return value; } template Windows::Devices::WiFi::WiFiNetworkKind impl_IWiFiAvailableNetwork::NetworkKind() const { Windows::Devices::WiFi::WiFiNetworkKind value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkKind(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_NetworkKind(&value)); return value; } template Windows::Devices::WiFi::WiFiPhyKind impl_IWiFiAvailableNetwork::PhyKind() const { Windows::Devices::WiFi::WiFiPhyKind value {}; - check_hresult(static_cast(static_cast(*this))->get_PhyKind(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_PhyKind(&value)); return value; } template Windows::Networking::Connectivity::NetworkSecuritySettings impl_IWiFiAvailableNetwork::SecuritySettings() const { Windows::Networking::Connectivity::NetworkSecuritySettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecuritySettings(put(value))); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_SecuritySettings(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IWiFiAvailableNetwork::BeaconInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_BeaconInterval(put(value))); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_BeaconInterval(put_abi(value))); return value; } template bool impl_IWiFiAvailableNetwork::IsWiFiDirect() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWiFiDirect(&value)); + check_hresult(WINRT_SHIM(IWiFiAvailableNetwork)->get_IsWiFiDirect(&value)); return value; } template Windows::Devices::WiFi::WiFiConnectionStatus impl_IWiFiConnectionResult::ConnectionStatus() const { Windows::Devices::WiFi::WiFiConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IWiFiConnectionResult)->get_ConnectionStatus(&value)); return value; } @@ -603,7 +633,7 @@ inline hstring WiFiAdapter::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation WiFiAdapter::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation WiFiAdapter::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -616,3 +646,86 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::IWiFiAdapter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::IWiFiAdapterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::IWiFiConnectionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::IWiFiNetworkReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::WiFiAdapter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::WiFiAvailableNetwork & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::WiFiConnectionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFi::WiFiNetworkReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.Services.h b/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.Services.h index 39de07fcd..a505089b6 100644 --- a/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.Services.h +++ b/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.Services.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_RemoteServiceInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteServiceInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteServiceInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteServiceInfo()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedConfigurationMethods(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedConfigurationMethods(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedConfigurationMethods()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedConfigurationMethods()); return S_OK; } catch (...) @@ -51,7 +56,8 @@ struct produce : { try { - *value = detach(this->shim().PreferGroupOwnerMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferGroupOwnerMode()); return S_OK; } catch (...) @@ -64,6 +70,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferGroupOwnerMode(value); return S_OK; } @@ -73,11 +80,12 @@ struct produce : } } - HRESULT __stdcall get_SessionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_SessionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionInfo()); return S_OK; } catch (...) @@ -87,10 +95,11 @@ struct produce : } } - HRESULT __stdcall put_SessionInfo(abi_arg_in value) noexcept override + HRESULT __stdcall put_SessionInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SessionInfo(*reinterpret_cast(&value)); return S_OK; } @@ -104,7 +113,8 @@ struct produce : { try { - *value = detach(this->shim().ServiceError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceError()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce : } } - HRESULT __stdcall add_SessionDeferred(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SessionDeferred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SessionDeferred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SessionDeferred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -130,6 +141,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SessionDeferred(token); return S_OK; } @@ -139,11 +151,12 @@ struct produce : } } - HRESULT __stdcall abi_GetProvisioningInfoAsync(Windows::Devices::WiFiDirect::Services::WiFiDirectServiceConfigurationMethod selectedConfigurationMethod, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetProvisioningInfoAsync(Windows::Devices::WiFiDirect::Services::WiFiDirectServiceConfigurationMethod selectedConfigurationMethod, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetProvisioningInfoAsync(selectedConfigurationMethod)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetProvisioningInfoAsync(selectedConfigurationMethod)); return S_OK; } catch (...) @@ -153,11 +166,12 @@ struct produce : } } - HRESULT __stdcall abi_ConnectAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConnectAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConnectAsync()); return S_OK; } catch (...) @@ -167,11 +181,12 @@ struct produce : } } - HRESULT __stdcall abi_ConnectAsyncWithPin(abi_arg_in pin, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConnectAsyncWithPin(impl::abi_arg_in pin, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConnectAsync(*reinterpret_cast(&pin))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&pin))); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceName()); return S_OK; } catch (...) @@ -199,11 +215,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ServiceNamePrefixes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServiceNamePrefixes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceNamePrefixes()); return S_OK; } catch (...) @@ -213,11 +230,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceInfo()); return S_OK; } catch (...) @@ -227,10 +245,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ServiceInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceInfo(*reinterpret_cast(&value)); return S_OK; } @@ -244,7 +263,8 @@ struct produceshim().AutoAcceptSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoAcceptSession()); return S_OK; } catch (...) @@ -257,6 +277,7 @@ struct produceshim()); this->shim().AutoAcceptSession(value); return S_OK; } @@ -270,7 +291,8 @@ struct produceshim().PreferGroupOwnerMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferGroupOwnerMode()); return S_OK; } catch (...) @@ -283,6 +305,7 @@ struct produceshim()); this->shim().PreferGroupOwnerMode(value); return S_OK; } @@ -292,11 +315,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PreferredConfigurationMethods(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PreferredConfigurationMethods()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredConfigurationMethods()); return S_OK; } catch (...) @@ -310,7 +334,8 @@ struct produceshim().ServiceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceStatus()); return S_OK; } catch (...) @@ -323,6 +348,7 @@ struct produceshim()); this->shim().ServiceStatus(value); return S_OK; } @@ -336,7 +362,8 @@ struct produceshim().CustomServiceStatusCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomServiceStatusCode()); return S_OK; } catch (...) @@ -349,6 +376,7 @@ struct produceshim()); this->shim().CustomServiceStatusCode(value); return S_OK; } @@ -358,11 +386,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeferredSessionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeferredSessionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeferredSessionInfo()); return S_OK; } catch (...) @@ -372,10 +401,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DeferredSessionInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeferredSessionInfo(*reinterpret_cast(&value)); return S_OK; } @@ -389,7 +419,8 @@ struct produceshim().AdvertisementStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisementStatus()); return S_OK; } catch (...) @@ -402,7 +433,8 @@ struct produceshim().ServiceError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceError()); return S_OK; } catch (...) @@ -411,11 +443,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SessionRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SessionRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SessionRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -428,6 +461,7 @@ struct produceshim()); this->shim().SessionRequested(token); return S_OK; } @@ -437,11 +471,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_AutoAcceptSessionConnected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AutoAcceptSessionConnected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AutoAcceptSessionConnected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -454,6 +489,7 @@ struct produceshim()); this->shim().AutoAcceptSessionConnected(token); return S_OK; } @@ -463,11 +499,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_AdvertisementStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AdvertisementStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AdvertisementStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -480,6 +517,7 @@ struct produceshim()); this->shim().AdvertisementStatusChanged(token); return S_OK; } @@ -489,11 +527,12 @@ struct produce deviceInfo, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in deviceInfo, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConnectAsync(*reinterpret_cast(&deviceInfo))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&deviceInfo))); return S_OK; } catch (...) @@ -503,11 +542,12 @@ struct produce deviceInfo, abi_arg_in pin, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ConnectAsyncWithPin(impl::abi_arg_in deviceInfo, impl::abi_arg_in pin, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ConnectAsync(*reinterpret_cast(&deviceInfo), *reinterpret_cast(&pin))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&deviceInfo), *reinterpret_cast(&pin))); return S_OK; } catch (...) @@ -521,6 +561,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -534,6 +575,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -547,11 +589,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWiFiDirectServiceAdvertiser(abi_arg_in serviceName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWiFiDirectServiceAdvertiser(impl::abi_arg_in serviceName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWiFiDirectServiceAdvertiser(*reinterpret_cast(&serviceName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWiFiDirectServiceAdvertiser(*reinterpret_cast(&serviceName))); return S_OK; } catch (...) @@ -565,11 +608,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -579,11 +623,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SessionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionInfo()); return S_OK; } catch (...) @@ -601,7 +646,8 @@ struct produceshim().SelectedConfigurationMethod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedConfigurationMethod()); return S_OK; } catch (...) @@ -614,7 +660,8 @@ struct produceshim().IsGroupFormationNeeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupFormationNeeded()); return S_OK; } catch (...) @@ -627,11 +674,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EndpointPairs(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EndpointPairs(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EndpointPairs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndpointPairs()); return S_OK; } catch (...) @@ -645,7 +693,8 @@ struct produceshim().Protocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Protocol()); return S_OK; } catch (...) @@ -658,11 +707,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceName()); return S_OK; } catch (...) @@ -676,7 +726,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -689,7 +740,8 @@ struct produceshim().ErrorStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorStatus()); return S_OK; } catch (...) @@ -702,7 +754,8 @@ struct produceshim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -715,7 +768,8 @@ struct produceshim().AdvertisementId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisementId()); return S_OK; } catch (...) @@ -724,11 +778,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceAddress()); return S_OK; } catch (...) @@ -738,11 +793,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SessionAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionAddress()); return S_OK; } catch (...) @@ -752,11 +808,12 @@ struct produce> value) noexcept override + HRESULT __stdcall abi_GetConnectionEndpointPairs(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConnectionEndpointPairs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectionEndpointPairs()); return S_OK; } catch (...) @@ -766,11 +823,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_SessionStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SessionStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SessionStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -783,6 +841,7 @@ struct produceshim()); this->shim().SessionStatusChanged(token); return S_OK; } @@ -792,11 +851,12 @@ struct produce value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AddStreamSocketListenerAsync(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AddStreamSocketListenerAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AddStreamSocketListenerAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -806,11 +866,12 @@ struct produce value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AddDatagramSocketAsync(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AddDatagramSocketAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AddDatagramSocketAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -820,11 +881,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemotePortAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemotePortAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemotePortAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -837,6 +899,7 @@ struct produceshim()); this->shim().RemotePortAdded(token); return S_OK; } @@ -850,11 +913,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeferredSessionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeferredSessionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeferredSessionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeferredSessionInfo()); return S_OK; } catch (...) @@ -868,11 +932,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -882,11 +947,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProvisioningInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProvisioningInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProvisioningInfo()); return S_OK; } catch (...) @@ -896,11 +962,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SessionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionInfo()); return S_OK; } catch (...) @@ -914,11 +981,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetSessionRequest(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetSessionRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetSessionRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSessionRequest()); return S_OK; } catch (...) @@ -932,11 +1000,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetSelector(abi_arg_in serviceName, abi_arg_out serviceSelector) noexcept override + HRESULT __stdcall abi_GetSelector(impl::abi_arg_in serviceName, impl::abi_arg_out serviceSelector) noexcept override { try { - *serviceSelector = detach(this->shim().GetSelector(*reinterpret_cast(&serviceName))); + typename D::abi_guard guard(this->shim()); + *serviceSelector = detach_abi(this->shim().GetSelector(*reinterpret_cast(&serviceName))); return S_OK; } catch (...) @@ -946,11 +1015,12 @@ struct produce serviceName, abi_arg_in serviceInfoFilter, abi_arg_out serviceSelector) noexcept override + HRESULT __stdcall abi_GetSelectorWithFilter(impl::abi_arg_in serviceName, impl::abi_arg_in serviceInfoFilter, impl::abi_arg_out serviceSelector) noexcept override { try { - *serviceSelector = detach(this->shim().GetSelector(*reinterpret_cast(&serviceName), *reinterpret_cast(&serviceInfoFilter))); + typename D::abi_guard guard(this->shim()); + *serviceSelector = detach_abi(this->shim().GetSelector(*reinterpret_cast(&serviceName), *reinterpret_cast(&serviceInfoFilter))); return S_OK; } catch (...) @@ -960,11 +1030,12 @@ struct produce deviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -982,177 +1053,177 @@ namespace Windows::Devices::WiFiDirect::Services { template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceConfigurationMethod impl_IWiFiDirectServiceProvisioningInfo::SelectedConfigurationMethod() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceConfigurationMethod value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedConfigurationMethod(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceProvisioningInfo)->get_SelectedConfigurationMethod(&value)); return value; } template bool impl_IWiFiDirectServiceProvisioningInfo::IsGroupFormationNeeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGroupFormationNeeded(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceProvisioningInfo)->get_IsGroupFormationNeeded(&value)); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSession impl_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs::Session() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs)->get_Session(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs::SessionInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SessionInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs)->get_SessionInfo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWiFiDirectServiceRemotePortAddedEventArgs::EndpointPairs() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EndpointPairs(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceRemotePortAddedEventArgs)->get_EndpointPairs(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceIPProtocol impl_IWiFiDirectServiceRemotePortAddedEventArgs::Protocol() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceIPProtocol value {}; - check_hresult(static_cast(static_cast(*this))->get_Protocol(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceRemotePortAddedEventArgs)->get_Protocol(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectServiceSessionDeferredEventArgs::DeferredSessionInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DeferredSessionInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSessionDeferredEventArgs)->get_DeferredSessionInfo(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionRequest impl_IWiFiDirectServiceSessionRequestedEventArgs::GetSessionRequest() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSessionRequest(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSessionRequestedEventArgs)->abi_GetSessionRequest(put_abi(value))); return value; } -template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertiser impl_IWiFiDirectServiceAdvertiserFactory::CreateWiFiDirectServiceAdvertiser(hstring_ref serviceName) const +template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertiser impl_IWiFiDirectServiceAdvertiserFactory::CreateWiFiDirectServiceAdvertiser(hstring_view serviceName) const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertiser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWiFiDirectServiceAdvertiser(get(serviceName), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiserFactory)->abi_CreateWiFiDirectServiceAdvertiser(get_abi(serviceName), put_abi(result))); return result; } template hstring impl_IWiFiDirectServiceAdvertiser::ServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceName(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_ServiceName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IWiFiDirectServiceAdvertiser::ServiceNamePrefixes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ServiceNamePrefixes(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_ServiceNamePrefixes(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectServiceAdvertiser::ServiceInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ServiceInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_ServiceInfo(put_abi(value))); return value; } template void impl_IWiFiDirectServiceAdvertiser::ServiceInfo(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceInfo(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_ServiceInfo(get_abi(value))); } template bool impl_IWiFiDirectServiceAdvertiser::AutoAcceptSession() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoAcceptSession(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_AutoAcceptSession(&value)); return value; } template void impl_IWiFiDirectServiceAdvertiser::AutoAcceptSession(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoAcceptSession(value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_AutoAcceptSession(value)); } template bool impl_IWiFiDirectServiceAdvertiser::PreferGroupOwnerMode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferGroupOwnerMode(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_PreferGroupOwnerMode(&value)); return value; } template void impl_IWiFiDirectServiceAdvertiser::PreferGroupOwnerMode(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferGroupOwnerMode(value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_PreferGroupOwnerMode(value)); } template Windows::Foundation::Collections::IVector impl_IWiFiDirectServiceAdvertiser::PreferredConfigurationMethods() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_PreferredConfigurationMethods(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_PreferredConfigurationMethods(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceStatus impl_IWiFiDirectServiceAdvertiser::ServiceStatus() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceStatus(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_ServiceStatus(&value)); return value; } template void impl_IWiFiDirectServiceAdvertiser::ServiceStatus(Windows::Devices::WiFiDirect::Services::WiFiDirectServiceStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceStatus(value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_ServiceStatus(value)); } template uint32_t impl_IWiFiDirectServiceAdvertiser::CustomServiceStatusCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CustomServiceStatusCode(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_CustomServiceStatusCode(&value)); return value; } template void impl_IWiFiDirectServiceAdvertiser::CustomServiceStatusCode(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomServiceStatusCode(value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_CustomServiceStatusCode(value)); } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectServiceAdvertiser::DeferredSessionInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DeferredSessionInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_DeferredSessionInfo(put_abi(value))); return value; } template void impl_IWiFiDirectServiceAdvertiser::DeferredSessionInfo(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_DeferredSessionInfo(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->put_DeferredSessionInfo(get_abi(value))); } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertisementStatus impl_IWiFiDirectServiceAdvertiser::AdvertisementStatus() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertisementStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_AdvertisementStatus(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_AdvertisementStatus(&value)); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceError impl_IWiFiDirectServiceAdvertiser::ServiceError() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceError value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceError(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->get_ServiceError(&value)); return value; } template event_token impl_IWiFiDirectServiceAdvertiser::SessionRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SessionRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->add_SessionRequested(get_abi(handler), &token)); return token; } @@ -1163,13 +1234,13 @@ template event_revoker impl_IWiFiDire template void impl_IWiFiDirectServiceAdvertiser::SessionRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SessionRequested(token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->remove_SessionRequested(token)); } template event_token impl_IWiFiDirectServiceAdvertiser::AutoAcceptSessionConnected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AutoAcceptSessionConnected(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->add_AutoAcceptSessionConnected(get_abi(handler), &token)); return token; } @@ -1180,120 +1251,120 @@ template event_revoker impl_IWiFiDire template void impl_IWiFiDirectServiceAdvertiser::AutoAcceptSessionConnected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AutoAcceptSessionConnected(token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->remove_AutoAcceptSessionConnected(token)); } -template event_token impl_IWiFiDirectServiceAdvertiser::AdvertisementStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWiFiDirectServiceAdvertiser::AdvertisementStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AdvertisementStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->add_AdvertisementStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IWiFiDirectServiceAdvertiser::AdvertisementStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWiFiDirectServiceAdvertiser::AdvertisementStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceAdvertiser::remove_AdvertisementStatusChanged, AdvertisementStatusChanged(handler)); } template void impl_IWiFiDirectServiceAdvertiser::AdvertisementStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AdvertisementStatusChanged(token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->remove_AdvertisementStatusChanged(token)); } template Windows::Foundation::IAsyncOperation impl_IWiFiDirectServiceAdvertiser::ConnectAsync(const Windows::Devices::Enumeration::DeviceInformation & deviceInfo) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(deviceInfo), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->abi_ConnectAsync(get_abi(deviceInfo), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IWiFiDirectServiceAdvertiser::ConnectAsync(const Windows::Devices::Enumeration::DeviceInformation & deviceInfo, hstring_ref pin) const +template Windows::Foundation::IAsyncOperation impl_IWiFiDirectServiceAdvertiser::ConnectAsync(const Windows::Devices::Enumeration::DeviceInformation & deviceInfo, hstring_view pin) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsyncWithPin(get(deviceInfo), get(pin), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->abi_ConnectAsyncWithPin(get_abi(deviceInfo), get_abi(pin), put_abi(result))); return result; } template void impl_IWiFiDirectServiceAdvertiser::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->abi_Start()); } template void impl_IWiFiDirectServiceAdvertiser::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IWiFiDirectServiceAdvertiser)->abi_Stop()); } -template hstring impl_IWiFiDirectServiceStatics::GetSelector(hstring_ref serviceName) const +template hstring impl_IWiFiDirectServiceStatics::GetSelector(hstring_view serviceName) const { hstring serviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetSelector(get(serviceName), put(serviceSelector))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceStatics)->abi_GetSelector(get_abi(serviceName), put_abi(serviceSelector))); return serviceSelector; } -template hstring impl_IWiFiDirectServiceStatics::GetSelector(hstring_ref serviceName, const Windows::Storage::Streams::IBuffer & serviceInfoFilter) const +template hstring impl_IWiFiDirectServiceStatics::GetSelector(hstring_view serviceName, const Windows::Storage::Streams::IBuffer & serviceInfoFilter) const { hstring serviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetSelectorWithFilter(get(serviceName), get(serviceInfoFilter), put(serviceSelector))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceStatics)->abi_GetSelectorWithFilter(get_abi(serviceName), get_abi(serviceInfoFilter), put_abi(serviceSelector))); return serviceSelector; } -template Windows::Foundation::IAsyncOperation impl_IWiFiDirectServiceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IWiFiDirectServiceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncOp))); return asyncOp; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectService::RemoteServiceInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_RemoteServiceInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->get_RemoteServiceInfo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWiFiDirectService::SupportedConfigurationMethods() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedConfigurationMethods(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->get_SupportedConfigurationMethods(put_abi(value))); return value; } template bool impl_IWiFiDirectService::PreferGroupOwnerMode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferGroupOwnerMode(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectService)->get_PreferGroupOwnerMode(&value)); return value; } template void impl_IWiFiDirectService::PreferGroupOwnerMode(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferGroupOwnerMode(value)); + check_hresult(WINRT_SHIM(IWiFiDirectService)->put_PreferGroupOwnerMode(value)); } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectService::SessionInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SessionInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->get_SessionInfo(put_abi(value))); return value; } template void impl_IWiFiDirectService::SessionInfo(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_SessionInfo(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->put_SessionInfo(get_abi(value))); } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceError impl_IWiFiDirectService::ServiceError() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceError value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceError(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectService)->get_ServiceError(&value)); return value; } template event_token impl_IWiFiDirectService::SessionDeferred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SessionDeferred(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectService)->add_SessionDeferred(get_abi(handler), &token)); return token; } @@ -1304,142 +1375,142 @@ template event_revoker impl_IWiFiDirectService< template void impl_IWiFiDirectService::SessionDeferred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SessionDeferred(token)); + check_hresult(WINRT_SHIM(IWiFiDirectService)->remove_SessionDeferred(token)); } template Windows::Foundation::IAsyncOperation impl_IWiFiDirectService::GetProvisioningInfoAsync(Windows::Devices::WiFiDirect::Services::WiFiDirectServiceConfigurationMethod selectedConfigurationMethod) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetProvisioningInfoAsync(selectedConfigurationMethod, put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->abi_GetProvisioningInfoAsync(selectedConfigurationMethod, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IWiFiDirectService::ConnectAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->abi_ConnectAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IWiFiDirectService::ConnectAsync(hstring_ref pin) const +template Windows::Foundation::IAsyncOperation impl_IWiFiDirectService::ConnectAsync(hstring_view pin) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsyncWithPin(get(pin), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectService)->abi_ConnectAsyncWithPin(get_abi(pin), put_abi(result))); return result; } template Windows::Devices::Enumeration::DeviceInformation impl_IWiFiDirectServiceSessionRequest::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSessionRequest)->get_DeviceInformation(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceProvisioningInfo impl_IWiFiDirectServiceSessionRequest::ProvisioningInfo() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceProvisioningInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProvisioningInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSessionRequest)->get_ProvisioningInfo(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectServiceSessionRequest::SessionInfo() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SessionInfo(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSessionRequest)->get_SessionInfo(put_abi(value))); return value; } template hstring impl_IWiFiDirectServiceSession::ServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceName(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_ServiceName(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionStatus impl_IWiFiDirectServiceSession::Status() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_Status(&value)); return value; } template Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionErrorStatus impl_IWiFiDirectServiceSession::ErrorStatus() const { Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionErrorStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorStatus(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_ErrorStatus(&value)); return value; } template uint32_t impl_IWiFiDirectServiceSession::SessionId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionId(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_SessionId(&value)); return value; } template uint32_t impl_IWiFiDirectServiceSession::AdvertisementId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AdvertisementId(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_AdvertisementId(&value)); return value; } template hstring impl_IWiFiDirectServiceSession::ServiceAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceAddress(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_ServiceAddress(put_abi(value))); return value; } template hstring impl_IWiFiDirectServiceSession::SessionAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SessionAddress(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->get_SessionAddress(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWiFiDirectServiceSession::GetConnectionEndpointPairs() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionEndpointPairs(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->abi_GetConnectionEndpointPairs(put_abi(value))); return value; } -template event_token impl_IWiFiDirectServiceSession::SessionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWiFiDirectServiceSession::SessionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SessionStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->add_SessionStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IWiFiDirectServiceSession::SessionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWiFiDirectServiceSession::SessionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceSession::remove_SessionStatusChanged, SessionStatusChanged(handler)); } template void impl_IWiFiDirectServiceSession::SessionStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SessionStatusChanged(token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->remove_SessionStatusChanged(token)); } template Windows::Foundation::IAsyncAction impl_IWiFiDirectServiceSession::AddStreamSocketListenerAsync(const Windows::Networking::Sockets::StreamSocketListener & value) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AddStreamSocketListenerAsync(get(value), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->abi_AddStreamSocketListenerAsync(get_abi(value), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IWiFiDirectServiceSession::AddDatagramSocketAsync(const Windows::Networking::Sockets::DatagramSocket & value) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AddDatagramSocketAsync(get(value), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->abi_AddDatagramSocketAsync(get_abi(value), put_abi(result))); return result; } template event_token impl_IWiFiDirectServiceSession::RemotePortAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemotePortAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->add_RemotePortAdded(get_abi(handler), &token)); return token; } @@ -1450,28 +1521,210 @@ template event_revoker impl_IWiFiDirectS template void impl_IWiFiDirectServiceSession::RemotePortAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemotePortAdded(token)); + check_hresult(WINRT_SHIM(IWiFiDirectServiceSession)->remove_RemotePortAdded(token)); } -inline hstring WiFiDirectService::GetSelector(hstring_ref serviceName) +inline hstring WiFiDirectService::GetSelector(hstring_view serviceName) { return get_activation_factory().GetSelector(serviceName); } -inline hstring WiFiDirectService::GetSelector(hstring_ref serviceName, const Windows::Storage::Streams::IBuffer & serviceInfoFilter) +inline hstring WiFiDirectService::GetSelector(hstring_view serviceName, const Windows::Storage::Streams::IBuffer & serviceInfoFilter) { return get_activation_factory().GetSelector(serviceName, serviceInfoFilter); } -inline Windows::Foundation::IAsyncOperation WiFiDirectService::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation WiFiDirectService::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } -inline WiFiDirectServiceAdvertiser::WiFiDirectServiceAdvertiser(hstring_ref serviceName) : +inline WiFiDirectServiceAdvertiser::WiFiDirectServiceAdvertiser(hstring_view serviceName) : WiFiDirectServiceAdvertiser(get_activation_factory().CreateWiFiDirectServiceAdvertiser(serviceName)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceAdvertiser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceAdvertiserFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceProvisioningInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceRemotePortAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceSessionDeferredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceSessionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceSessionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::IWiFiDirectServiceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAdvertiser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceAutoAcceptSessionConnectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceProvisioningInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceRemotePortAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionDeferredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::Services::WiFiDirectServiceSessionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.h b/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.h index 27c9a5fe6..f64aff074 100644 --- a/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.h +++ b/10.0.14393.0/winrt/Windows.Devices.WiFiDirect.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,11 +23,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_InformationElements(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InformationElements(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InformationElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InformationElements()); return S_OK; } catch (...) @@ -34,10 +38,11 @@ struct produce : prod } } - HRESULT __stdcall put_InformationElements(abi_arg_in> value) noexcept override + HRESULT __stdcall put_InformationElements(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InformationElements(*reinterpret_cast *>(&value)); return S_OK; } @@ -51,7 +56,8 @@ struct produce : prod { try { - *value = detach(this->shim().ListenStateDiscoverability()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListenStateDiscoverability()); return S_OK; } catch (...) @@ -64,6 +70,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ListenStateDiscoverability(value); return S_OK; } @@ -77,7 +84,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsAutonomousGroupOwnerEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAutonomousGroupOwnerEnabled()); return S_OK; } catch (...) @@ -90,6 +98,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsAutonomousGroupOwnerEnabled(value); return S_OK; } @@ -99,11 +108,12 @@ struct produce : prod } } - HRESULT __stdcall get_LegacySettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_LegacySettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LegacySettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LegacySettings()); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_SupportedConfigurationMethods(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedConfigurationMethods(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedConfigurationMethods()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedConfigurationMethods()); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Advertisement(abi_arg_out value) noexcept override + HRESULT __stdcall get_Advertisement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Advertisement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Advertisement()); return S_OK; } catch (...) @@ -153,7 +165,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_StatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -179,6 +193,7 @@ struct produceshim()); this->shim().StatusChanged(token); return S_OK; } @@ -192,6 +207,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -205,6 +221,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -222,7 +239,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -235,7 +253,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -248,11 +267,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_ConnectionRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ConnectionRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ConnectionRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ConnectionRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -265,6 +285,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionRequested(token); return S_OK; } @@ -282,7 +303,8 @@ struct produce { try { - *value = detach(this->shim().GroupOwnerIntent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupOwnerIntent()); return S_OK; } catch (...) @@ -295,6 +317,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupOwnerIntent(value); return S_OK; } @@ -308,11 +331,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_PreferenceOrderedConfigurationMethods(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PreferenceOrderedConfigurationMethods(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PreferenceOrderedConfigurationMethods()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferenceOrderedConfigurationMethods()); return S_OK; } catch (...) @@ -326,7 +350,8 @@ struct produceshim().PreferredPairingProcedure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredPairingProcedure()); return S_OK; } catch (...) @@ -339,6 +364,7 @@ struct produceshim()); this->shim().PreferredPairingProcedure(value); return S_OK; } @@ -356,7 +382,8 @@ struct produceshim().GetDevicePairingKinds(configurationMethod)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDevicePairingKinds(configurationMethod)); return S_OK; } catch (...) @@ -369,11 +396,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -387,11 +415,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetConnectionRequest(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetConnectionRequest(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetConnectionRequest()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetConnectionRequest()); return S_OK; } catch (...) @@ -409,7 +438,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -418,11 +448,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -432,11 +463,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_ConnectionStatusChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ConnectionStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ConnectionStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -449,6 +481,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionStatusChanged(token); return S_OK; } @@ -458,11 +491,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetConnectionEndpointPairs(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetConnectionEndpointPairs(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConnectionEndpointPairs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectionEndpointPairs()); return S_OK; } catch (...) @@ -476,11 +510,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out deviceSelector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out deviceSelector) noexcept override { try { - *deviceSelector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *deviceSelector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -490,11 +525,12 @@ struct produce : prod } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -508,11 +544,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(Windows::Devices::WiFiDirect::WiFiDirectDeviceSelectorType type, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(Windows::Devices::WiFiDirect::WiFiDirectDeviceSelectorType type, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeviceSelector(type)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeviceSelector(type)); return S_OK; } catch (...) @@ -522,11 +559,12 @@ struct produce : pro } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in deviceId, abi_arg_in connectionParameters, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in deviceId, impl::abi_arg_in connectionParameters, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&connectionParameters))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&connectionParameters))); return S_OK; } catch (...) @@ -540,11 +578,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Oui(abi_arg_out value) noexcept override + HRESULT __stdcall get_Oui(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Oui()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Oui()); return S_OK; } catch (...) @@ -554,10 +593,11 @@ struct produce : } } - HRESULT __stdcall put_Oui(abi_arg_in value) noexcept override + HRESULT __stdcall put_Oui(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Oui(*reinterpret_cast(&value)); return S_OK; } @@ -571,7 +611,8 @@ struct produce : { try { - *value = detach(this->shim().OuiType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuiType()); return S_OK; } catch (...) @@ -584,6 +625,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().OuiType(value); return S_OK; } @@ -593,11 +635,12 @@ struct produce : } } - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -607,10 +650,11 @@ struct produce : } } - HRESULT __stdcall put_Value(abi_arg_in value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return S_OK; } @@ -624,11 +668,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromBuffer(abi_arg_in buffer, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromBuffer(impl::abi_arg_in buffer, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromBuffer(*reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromBuffer(*reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -638,11 +683,12 @@ struct produce deviceInformation, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromDeviceInformation(impl::abi_arg_in deviceInformation, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromDeviceInformation(*reinterpret_cast(&deviceInformation))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromDeviceInformation(*reinterpret_cast(&deviceInformation))); return S_OK; } catch (...) @@ -660,7 +706,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -673,6 +720,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return S_OK; } @@ -682,11 +730,12 @@ struct produce : pro } } - HRESULT __stdcall get_Ssid(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ssid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ssid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ssid()); return S_OK; } catch (...) @@ -696,10 +745,11 @@ struct produce : pro } } - HRESULT __stdcall put_Ssid(abi_arg_in value) noexcept override + HRESULT __stdcall put_Ssid(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ssid(*reinterpret_cast(&value)); return S_OK; } @@ -709,11 +759,12 @@ struct produce : pro } } - HRESULT __stdcall get_Passphrase(abi_arg_out value) noexcept override + HRESULT __stdcall get_Passphrase(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Passphrase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Passphrase()); return S_OK; } catch (...) @@ -723,10 +774,11 @@ struct produce : pro } } - HRESULT __stdcall put_Passphrase(abi_arg_in value) noexcept override + HRESULT __stdcall put_Passphrase(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Passphrase(*reinterpret_cast(&value)); return S_OK; } @@ -744,199 +796,199 @@ namespace Windows::Devices::WiFiDirect { template hstring impl_IWiFiDirectDeviceStatics::GetDeviceSelector() const { hstring deviceSelector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(deviceSelector))); + check_hresult(WINRT_SHIM(IWiFiDirectDeviceStatics)->abi_GetDeviceSelector(put_abi(deviceSelector))); return deviceSelector; } -template Windows::Foundation::IAsyncOperation impl_IWiFiDirectDeviceStatics::FromIdAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncOperation impl_IWiFiDirectDeviceStatics::FromIdAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), put(asyncOp))); + check_hresult(WINRT_SHIM(IWiFiDirectDeviceStatics)->abi_FromIdAsync(get_abi(deviceId), put_abi(asyncOp))); return asyncOp; } template hstring impl_IWiFiDirectDeviceStatics2::GetDeviceSelector(Windows::Devices::WiFiDirect::WiFiDirectDeviceSelectorType type) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(type, put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectDeviceStatics2)->abi_GetDeviceSelector(type, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IWiFiDirectDeviceStatics2::FromIdAsync(hstring_ref deviceId, const Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters & connectionParameters) const +template Windows::Foundation::IAsyncOperation impl_IWiFiDirectDeviceStatics2::FromIdAsync(hstring_view deviceId, const Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters & connectionParameters) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(deviceId), get(connectionParameters), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectDeviceStatics2)->abi_FromIdAsync(get_abi(deviceId), get_abi(connectionParameters), put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IWiFiDirectInformationElementStatics::CreateFromBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromBuffer(get(buffer), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElementStatics)->abi_CreateFromBuffer(get_abi(buffer), put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IWiFiDirectInformationElementStatics::CreateFromDeviceInformation(const Windows::Devices::Enumeration::DeviceInformation & deviceInformation) const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromDeviceInformation(get(deviceInformation), put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElementStatics)->abi_CreateFromDeviceInformation(get_abi(deviceInformation), put_abi(result))); return result; } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectInformationElement::Oui() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Oui(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->get_Oui(put_abi(value))); return value; } template void impl_IWiFiDirectInformationElement::Oui(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Oui(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->put_Oui(get_abi(value))); } template uint8_t impl_IWiFiDirectInformationElement::OuiType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OuiType(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->get_OuiType(&value)); return value; } template void impl_IWiFiDirectInformationElement::OuiType(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OuiType(value)); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->put_OuiType(value)); } template Windows::Storage::Streams::IBuffer impl_IWiFiDirectInformationElement::Value() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->get_Value(put_abi(value))); return value; } template void impl_IWiFiDirectInformationElement::Value(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectInformationElement)->put_Value(get_abi(value))); } template bool impl_IWiFiDirectLegacySettings::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->get_IsEnabled(&value)); return value; } template void impl_IWiFiDirectLegacySettings::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->put_IsEnabled(value)); } template hstring impl_IWiFiDirectLegacySettings::Ssid() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ssid(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->get_Ssid(put_abi(value))); return value; } -template void impl_IWiFiDirectLegacySettings::Ssid(hstring_ref value) const +template void impl_IWiFiDirectLegacySettings::Ssid(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Ssid(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->put_Ssid(get_abi(value))); } template Windows::Security::Credentials::PasswordCredential impl_IWiFiDirectLegacySettings::Passphrase() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Passphrase(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->get_Passphrase(put_abi(value))); return value; } template void impl_IWiFiDirectLegacySettings::Passphrase(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_Passphrase(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectLegacySettings)->put_Passphrase(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IWiFiDirectAdvertisement::InformationElements() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_InformationElements(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->get_InformationElements(put_abi(value))); return value; } template void impl_IWiFiDirectAdvertisement::InformationElements(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_InformationElements(get(value))); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->put_InformationElements(get_abi(value))); } template Windows::Devices::WiFiDirect::WiFiDirectAdvertisementListenStateDiscoverability impl_IWiFiDirectAdvertisement::ListenStateDiscoverability() const { Windows::Devices::WiFiDirect::WiFiDirectAdvertisementListenStateDiscoverability value {}; - check_hresult(static_cast(static_cast(*this))->get_ListenStateDiscoverability(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->get_ListenStateDiscoverability(&value)); return value; } template void impl_IWiFiDirectAdvertisement::ListenStateDiscoverability(Windows::Devices::WiFiDirect::WiFiDirectAdvertisementListenStateDiscoverability value) const { - check_hresult(static_cast(static_cast(*this))->put_ListenStateDiscoverability(value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->put_ListenStateDiscoverability(value)); } template bool impl_IWiFiDirectAdvertisement::IsAutonomousGroupOwnerEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAutonomousGroupOwnerEnabled(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->get_IsAutonomousGroupOwnerEnabled(&value)); return value; } template void impl_IWiFiDirectAdvertisement::IsAutonomousGroupOwnerEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAutonomousGroupOwnerEnabled(value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->put_IsAutonomousGroupOwnerEnabled(value)); } template Windows::Devices::WiFiDirect::WiFiDirectLegacySettings impl_IWiFiDirectAdvertisement::LegacySettings() const { Windows::Devices::WiFiDirect::WiFiDirectLegacySettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LegacySettings(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement)->get_LegacySettings(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IWiFiDirectAdvertisement2::SupportedConfigurationMethods() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedConfigurationMethods(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisement2)->get_SupportedConfigurationMethods(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus impl_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs::Status() const { Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisherStatusChangedEventArgs)->get_Status(&value)); return value; } template Windows::Devices::WiFiDirect::WiFiDirectError impl_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs::Error() const { Windows::Devices::WiFiDirect::WiFiDirectError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisherStatusChangedEventArgs)->get_Error(&value)); return value; } template Windows::Devices::WiFiDirect::WiFiDirectAdvertisement impl_IWiFiDirectAdvertisementPublisher::Advertisement() const { Windows::Devices::WiFiDirect::WiFiDirectAdvertisement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Advertisement(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->get_Advertisement(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus impl_IWiFiDirectAdvertisementPublisher::Status() const { Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->get_Status(&value)); return value; } template event_token impl_IWiFiDirectAdvertisementPublisher::StatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->add_StatusChanged(get_abi(handler), &token)); return token; } @@ -947,68 +999,68 @@ template event_revoker impl_IWiF template void impl_IWiFiDirectAdvertisementPublisher::StatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StatusChanged(token)); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->remove_StatusChanged(token)); } template void impl_IWiFiDirectAdvertisementPublisher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->abi_Start()); } template void impl_IWiFiDirectAdvertisementPublisher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IWiFiDirectAdvertisementPublisher)->abi_Stop()); } template Windows::Devices::Enumeration::DevicePairingKinds impl_IWiFiDirectConnectionParametersStatics::GetDevicePairingKinds(Windows::Devices::WiFiDirect::WiFiDirectConfigurationMethod configurationMethod) const { Windows::Devices::Enumeration::DevicePairingKinds result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDevicePairingKinds(configurationMethod, &result)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParametersStatics)->abi_GetDevicePairingKinds(configurationMethod, &result)); return result; } template int16_t impl_IWiFiDirectConnectionParameters::GroupOwnerIntent() const { int16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupOwnerIntent(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParameters)->get_GroupOwnerIntent(&value)); return value; } template void impl_IWiFiDirectConnectionParameters::GroupOwnerIntent(int16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupOwnerIntent(value)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParameters)->put_GroupOwnerIntent(value)); } template Windows::Foundation::Collections::IVector impl_IWiFiDirectConnectionParameters2::PreferenceOrderedConfigurationMethods() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_PreferenceOrderedConfigurationMethods(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParameters2)->get_PreferenceOrderedConfigurationMethods(put_abi(value))); return value; } template Windows::Devices::WiFiDirect::WiFiDirectPairingProcedure impl_IWiFiDirectConnectionParameters2::PreferredPairingProcedure() const { Windows::Devices::WiFiDirect::WiFiDirectPairingProcedure value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferredPairingProcedure(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParameters2)->get_PreferredPairingProcedure(&value)); return value; } template void impl_IWiFiDirectConnectionParameters2::PreferredPairingProcedure(Windows::Devices::WiFiDirect::WiFiDirectPairingProcedure value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredPairingProcedure(value)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionParameters2)->put_PreferredPairingProcedure(value)); } template Windows::Devices::WiFiDirect::WiFiDirectConnectionRequest impl_IWiFiDirectConnectionRequestedEventArgs::GetConnectionRequest() const { Windows::Devices::WiFiDirect::WiFiDirectConnectionRequest result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionRequest(put(result))); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionRequestedEventArgs)->abi_GetConnectionRequest(put_abi(result))); return result; } template event_token impl_IWiFiDirectConnectionListener::ConnectionRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionListener)->add_ConnectionRequested(get_abi(handler), &token)); return token; } @@ -1019,51 +1071,51 @@ template event_revoker impl_IWiFiDir template void impl_IWiFiDirectConnectionListener::ConnectionRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionRequested(token)); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionListener)->remove_ConnectionRequested(token)); } template Windows::Devices::WiFiDirect::WiFiDirectConnectionStatus impl_IWiFiDirectDevice::ConnectionStatus() const { Windows::Devices::WiFiDirect::WiFiDirectConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IWiFiDirectDevice)->get_ConnectionStatus(&value)); return value; } template hstring impl_IWiFiDirectDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectDevice)->get_DeviceId(put_abi(value))); return value; } -template event_token impl_IWiFiDirectDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWiFiDirectDevice::ConnectionStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IWiFiDirectDevice)->add_ConnectionStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IWiFiDirectDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWiFiDirectDevice::ConnectionStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Devices::WiFiDirect::IWiFiDirectDevice::remove_ConnectionStatusChanged, ConnectionStatusChanged(handler)); } template void impl_IWiFiDirectDevice::ConnectionStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionStatusChanged(token)); + check_hresult(WINRT_SHIM(IWiFiDirectDevice)->remove_ConnectionStatusChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IWiFiDirectDevice::GetConnectionEndpointPairs() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionEndpointPairs(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectDevice)->abi_GetConnectionEndpointPairs(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IWiFiDirectConnectionRequest::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IWiFiDirectConnectionRequest)->get_DeviceInformation(put_abi(value))); return value; } @@ -1089,7 +1141,7 @@ inline hstring WiFiDirectDevice::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Foundation::IAsyncOperation WiFiDirectDevice::FromIdAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncOperation WiFiDirectDevice::FromIdAsync(hstring_view deviceId) { return get_activation_factory().FromIdAsync(deviceId); } @@ -1099,7 +1151,7 @@ inline hstring WiFiDirectDevice::GetDeviceSelector(Windows::Devices::WiFiDirect: return get_activation_factory().GetDeviceSelector(type); } -inline Windows::Foundation::IAsyncOperation WiFiDirectDevice::FromIdAsync(hstring_ref deviceId, const Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters & connectionParameters) +inline Windows::Foundation::IAsyncOperation WiFiDirectDevice::FromIdAsync(hstring_view deviceId, const Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters & connectionParameters) { return get_activation_factory().FromIdAsync(deviceId, connectionParameters); } @@ -1121,3 +1173,239 @@ inline Windows::Foundation::Collections::IVector +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisherStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParametersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElementStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectInformationElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::WiFiDirect::WiFiDirectLegacySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Devices.h b/10.0.14393.0/winrt/Windows.Devices.h index efb13e60b..02b899338 100644 --- a/10.0.14393.0/winrt/Windows.Devices.h +++ b/10.0.14393.0/winrt/Windows.Devices.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Devices.Adc.Provider.3.h" #include "internal/Windows.Devices.Pwm.Provider.3.h" #include "internal/Windows.Devices.Gpio.Provider.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AdcControllerProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdcControllerProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdcControllerProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdcControllerProvider()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce } } - HRESULT __stdcall get_PwmControllerProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_PwmControllerProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PwmControllerProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PwmControllerProvider()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce } } - HRESULT __stdcall get_GpioControllerProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_GpioControllerProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GpioControllerProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GpioControllerProvider()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produce } } - HRESULT __stdcall get_I2cControllerProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_I2cControllerProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().I2cControllerProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().I2cControllerProvider()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce : produce } } - HRESULT __stdcall get_SpiControllerProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_SpiControllerProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SpiControllerProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpiControllerProvider()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in adc, abi_arg_in pwm, abi_arg_in gpio, abi_arg_in i2c, abi_arg_in spi, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in adc, impl::abi_arg_in pwm, impl::abi_arg_in gpio, impl::abi_arg_in i2c, impl::abi_arg_in spi, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&adc), *reinterpret_cast(&pwm), *reinterpret_cast(&gpio), *reinterpret_cast(&i2c), *reinterpret_cast(&spi))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&adc), *reinterpret_cast(&pwm), *reinterpret_cast(&gpio), *reinterpret_cast(&i2c), *reinterpret_cast(&spi))); return S_OK; } catch (...) @@ -113,11 +122,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DefaultProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultProvider()); return S_OK; } catch (...) @@ -127,10 +137,11 @@ struct produce : produce } } - HRESULT __stdcall put_DefaultProvider(abi_arg_in value) noexcept override + HRESULT __stdcall put_DefaultProvider(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultProvider(*reinterpret_cast(&value)); return S_OK; } @@ -148,55 +159,55 @@ namespace Windows::Devices { template Windows::Devices::Adc::Provider::IAdcControllerProvider impl_ILowLevelDevicesAggregateProvider::AdcControllerProvider() const { Windows::Devices::Adc::Provider::IAdcControllerProvider value; - check_hresult(static_cast(static_cast(*this))->get_AdcControllerProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProvider)->get_AdcControllerProvider(put_abi(value))); return value; } template Windows::Devices::Pwm::Provider::IPwmControllerProvider impl_ILowLevelDevicesAggregateProvider::PwmControllerProvider() const { Windows::Devices::Pwm::Provider::IPwmControllerProvider value; - check_hresult(static_cast(static_cast(*this))->get_PwmControllerProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProvider)->get_PwmControllerProvider(put_abi(value))); return value; } template Windows::Devices::Gpio::Provider::IGpioControllerProvider impl_ILowLevelDevicesAggregateProvider::GpioControllerProvider() const { Windows::Devices::Gpio::Provider::IGpioControllerProvider value; - check_hresult(static_cast(static_cast(*this))->get_GpioControllerProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProvider)->get_GpioControllerProvider(put_abi(value))); return value; } template Windows::Devices::I2c::Provider::II2cControllerProvider impl_ILowLevelDevicesAggregateProvider::I2cControllerProvider() const { Windows::Devices::I2c::Provider::II2cControllerProvider value; - check_hresult(static_cast(static_cast(*this))->get_I2cControllerProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProvider)->get_I2cControllerProvider(put_abi(value))); return value; } template Windows::Devices::Spi::Provider::ISpiControllerProvider impl_ILowLevelDevicesAggregateProvider::SpiControllerProvider() const { Windows::Devices::Spi::Provider::ISpiControllerProvider value; - check_hresult(static_cast(static_cast(*this))->get_SpiControllerProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProvider)->get_SpiControllerProvider(put_abi(value))); return value; } template Windows::Devices::LowLevelDevicesAggregateProvider impl_ILowLevelDevicesAggregateProviderFactory::Create(const Windows::Devices::Adc::Provider::IAdcControllerProvider & adc, const Windows::Devices::Pwm::Provider::IPwmControllerProvider & pwm, const Windows::Devices::Gpio::Provider::IGpioControllerProvider & gpio, const Windows::Devices::I2c::Provider::II2cControllerProvider & i2c, const Windows::Devices::Spi::Provider::ISpiControllerProvider & spi) const { Windows::Devices::LowLevelDevicesAggregateProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(adc), get(pwm), get(gpio), get(i2c), get(spi), put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesAggregateProviderFactory)->abi_Create(get_abi(adc), get_abi(pwm), get_abi(gpio), get_abi(i2c), get_abi(spi), put_abi(value))); return value; } template Windows::Devices::ILowLevelDevicesAggregateProvider impl_ILowLevelDevicesControllerStatics::DefaultProvider() const { Windows::Devices::ILowLevelDevicesAggregateProvider value; - check_hresult(static_cast(static_cast(*this))->get_DefaultProvider(put(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesControllerStatics)->get_DefaultProvider(put_abi(value))); return value; } template void impl_ILowLevelDevicesControllerStatics::DefaultProvider(const Windows::Devices::ILowLevelDevicesAggregateProvider & value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultProvider(get(value))); + check_hresult(WINRT_SHIM(ILowLevelDevicesControllerStatics)->put_DefaultProvider(get_abi(value))); } inline LowLevelDevicesAggregateProvider::LowLevelDevicesAggregateProvider(const Windows::Devices::Adc::Provider::IAdcControllerProvider & adc, const Windows::Devices::Pwm::Provider::IPwmControllerProvider & pwm, const Windows::Devices::Gpio::Provider::IGpioControllerProvider & gpio, const Windows::Devices::I2c::Provider::II2cControllerProvider & i2c, const Windows::Devices::Spi::Provider::ISpiControllerProvider & spi) : @@ -216,3 +227,59 @@ inline void LowLevelDevicesController::DefaultProvider(const Windows::Devices::I } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::ILowLevelDevicesAggregateProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::ILowLevelDevicesAggregateProviderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::ILowLevelDevicesController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::ILowLevelDevicesControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::LowLevelDevicesAggregateProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Devices::LowLevelDevicesController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Embedded.DeviceLockdown.h b/10.0.14393.0/winrt/Windows.Embedded.DeviceLockdown.h index 2817c4ba0..4078bcebc 100644 --- a/10.0.14393.0/winrt/Windows.Embedded.DeviceLockdown.h +++ b/10.0.14393.0/winrt/Windows.Embedded.DeviceLockdown.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Embedded.DeviceLockdown.3.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out phProfileName) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out phProfileName) noexcept override { try { - *phProfileName = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *phProfileName = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetSupportedLockdownProfiles(abi_arg_out> ppProfileIDs) noexcept override + HRESULT __stdcall abi_GetSupportedLockdownProfiles(impl::abi_arg_out> ppProfileIDs) noexcept override { try { - *ppProfileIDs = detach(this->shim().GetSupportedLockdownProfiles()); + typename D::abi_guard guard(this->shim()); + *ppProfileIDs = detach_abi(this->shim().GetSupportedLockdownProfiles()); return S_OK; } catch (...) @@ -50,7 +55,8 @@ struct produceshim().GetCurrentLockdownProfile()); + typename D::abi_guard guard(this->shim()); + *pProfileID = detach_abi(this->shim().GetCurrentLockdownProfile()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce ppWaitableOperation) noexcept override + HRESULT __stdcall abi_ApplyLockdownProfileAsync(GUID profileID, impl::abi_arg_out ppWaitableOperation) noexcept override { try { - *ppWaitableOperation = detach(this->shim().ApplyLockdownProfileAsync(profileID)); + typename D::abi_guard guard(this->shim()); + *ppWaitableOperation = detach_abi(this->shim().ApplyLockdownProfileAsync(profileID)); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce ppInformation) noexcept override + HRESULT __stdcall abi_GetLockdownProfileInformation(GUID profileID, impl::abi_arg_out ppInformation) noexcept override { try { - *ppInformation = detach(this->shim().GetLockdownProfileInformation(profileID)); + typename D::abi_guard guard(this->shim()); + *ppInformation = detach_abi(this->shim().GetLockdownProfileInformation(profileID)); return S_OK; } catch (...) @@ -95,35 +103,35 @@ namespace Windows::Embedded::DeviceLockdown { template hstring impl_IDeviceLockdownProfileInformation::Name() const { hstring phProfileName; - check_hresult(static_cast(static_cast(*this))->get_Name(put(phProfileName))); + check_hresult(WINRT_SHIM(IDeviceLockdownProfileInformation)->get_Name(put_abi(phProfileName))); return phProfileName; } template Windows::Foundation::Collections::IVectorView impl_IDeviceLockdownProfileStatics::GetSupportedLockdownProfiles() const { Windows::Foundation::Collections::IVectorView ppProfileIDs; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedLockdownProfiles(put(ppProfileIDs))); + check_hresult(WINRT_SHIM(IDeviceLockdownProfileStatics)->abi_GetSupportedLockdownProfiles(put_abi(ppProfileIDs))); return ppProfileIDs; } template GUID impl_IDeviceLockdownProfileStatics::GetCurrentLockdownProfile() const { GUID pProfileID {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentLockdownProfile(&pProfileID)); + check_hresult(WINRT_SHIM(IDeviceLockdownProfileStatics)->abi_GetCurrentLockdownProfile(&pProfileID)); return pProfileID; } template Windows::Foundation::IAsyncAction impl_IDeviceLockdownProfileStatics::ApplyLockdownProfileAsync(GUID profileID) const { Windows::Foundation::IAsyncAction ppWaitableOperation; - check_hresult(static_cast(static_cast(*this))->abi_ApplyLockdownProfileAsync(profileID, put(ppWaitableOperation))); + check_hresult(WINRT_SHIM(IDeviceLockdownProfileStatics)->abi_ApplyLockdownProfileAsync(profileID, put_abi(ppWaitableOperation))); return ppWaitableOperation; } template Windows::Embedded::DeviceLockdown::DeviceLockdownProfileInformation impl_IDeviceLockdownProfileStatics::GetLockdownProfileInformation(GUID profileID) const { Windows::Embedded::DeviceLockdown::DeviceLockdownProfileInformation ppInformation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLockdownProfileInformation(profileID, put(ppInformation))); + check_hresult(WINRT_SHIM(IDeviceLockdownProfileStatics)->abi_GetLockdownProfileInformation(profileID, put_abi(ppInformation))); return ppInformation; } @@ -150,3 +158,32 @@ inline Windows::Embedded::DeviceLockdown::DeviceLockdownProfileInformation Devic } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Embedded::DeviceLockdown::IDeviceLockdownProfileInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Embedded::DeviceLockdown::IDeviceLockdownProfileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Embedded::DeviceLockdown::DeviceLockdownProfileInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Foundation.Collections.h b/10.0.14393.0/winrt/Windows.Foundation.Collections.h index 6ed21fe76..2c8d205ae 100644 --- a/10.0.14393.0/winrt/Windows.Foundation.Collections.h +++ b/10.0.14393.0/winrt/Windows.Foundation.Collections.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "Windows.Foundation.h" @@ -33,3 +36,41 @@ inline ValueSet::ValueSet() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Collections::IPropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Collections::PropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Collections::StringMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Collections::ValueSet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Foundation.Diagnostics.h b/10.0.14393.0/winrt/Windows.Foundation.Diagnostics.h index fec01dd96..865635d94 100644 --- a/10.0.14393.0/winrt/Windows.Foundation.Diagnostics.h +++ b/10.0.14393.0/winrt/Windows.Foundation.Diagnostics.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.Diagnostics.3.h" @@ -15,10 +18,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, abi_arg_in operationName, uint64_t relatedContext) noexcept override + HRESULT __stdcall abi_TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, impl::abi_arg_in operationName, uint64_t relatedContext) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TraceOperationCreation(traceLevel, source, platformId, operationId, *reinterpret_cast(&operationName), relatedContext); return S_OK; } @@ -32,6 +36,7 @@ struct produceshim()); this->shim().TraceOperationCompletion(traceLevel, source, platformId, operationId, status); return S_OK; } @@ -45,6 +50,7 @@ struct produceshim()); this->shim().TraceOperationRelation(traceLevel, source, platformId, operationId, relation); return S_OK; } @@ -58,6 +64,7 @@ struct produceshim()); this->shim().TraceSynchronousWorkStart(traceLevel, source, platformId, operationId, work); return S_OK; } @@ -71,6 +78,7 @@ struct produceshim()); this->shim().TraceSynchronousWorkCompletion(traceLevel, source, work); return S_OK; } @@ -80,11 +88,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_TracingStatusChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().TracingStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().TracingStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -97,6 +106,7 @@ struct produceshim()); this->shim().TracingStatusChanged(cookie); return S_OK; } @@ -110,11 +120,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -124,11 +135,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_LongDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_LongDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LongDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LongDescription()); return S_OK; } catch (...) @@ -138,11 +150,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HelpUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_HelpUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HelpUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HelpUri()); return S_OK; } catch (...) @@ -156,11 +169,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromHResultAsync(int32_t errorCode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromHResultAsync(int32_t errorCode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromHResultAsync(errorCode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromHResultAsync(errorCode)); return S_OK; } catch (...) @@ -178,6 +192,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SetErrorOptions(value); return S_OK; } @@ -191,7 +206,8 @@ struct produce : p { try { - *value = detach(this->shim().GetErrorOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetErrorOptions()); return S_OK; } catch (...) @@ -204,11 +220,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -218,10 +235,11 @@ struct produce : produ } } - HRESULT __stdcall abi_AddLoggingChannel(abi_arg_in loggingChannel) noexcept override + HRESULT __stdcall abi_AddLoggingChannel(impl::abi_arg_in loggingChannel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddLoggingChannel(*reinterpret_cast(&loggingChannel)); return S_OK; } @@ -231,10 +249,11 @@ struct produce : produ } } - HRESULT __stdcall abi_AddLoggingChannelWithLevel(abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) noexcept override + HRESULT __stdcall abi_AddLoggingChannelWithLevel(impl::abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddLoggingChannel(*reinterpret_cast(&loggingChannel), maxLevel); return S_OK; } @@ -244,10 +263,11 @@ struct produce : produ } } - HRESULT __stdcall abi_RemoveLoggingChannel(abi_arg_in loggingChannel) noexcept override + HRESULT __stdcall abi_RemoveLoggingChannel(impl::abi_arg_in loggingChannel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveLoggingChannel(*reinterpret_cast(&loggingChannel)); return S_OK; } @@ -257,11 +277,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CloseAndSaveToFileAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CloseAndSaveToFileAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CloseAndSaveToFileAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CloseAndSaveToFileAsync()); return S_OK; } catch (...) @@ -271,11 +292,12 @@ struct produce : produ } } - HRESULT __stdcall add_LogFileGenerated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LogFileGenerated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LogFileGenerated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LogFileGenerated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -288,6 +310,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().LogFileGenerated(token); return S_OK; } @@ -301,11 +324,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in name, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in name, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -319,11 +343,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_File(abi_arg_out value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -337,11 +362,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -355,7 +381,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -368,11 +395,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Channel(abi_arg_out value) noexcept override + HRESULT __stdcall get_Channel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Channel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Channel()); return S_OK; } catch (...) @@ -382,10 +410,11 @@ struct produce : produce } } - HRESULT __stdcall abi_StopActivity(abi_arg_in stopEventName) noexcept override + HRESULT __stdcall abi_StopActivity(impl::abi_arg_in stopEventName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StopActivity(*reinterpret_cast(&stopEventName)); return S_OK; } @@ -395,10 +424,11 @@ struct produce : produce } } - HRESULT __stdcall abi_StopActivityWithFields(abi_arg_in stopEventName, abi_arg_in fields) noexcept override + HRESULT __stdcall abi_StopActivityWithFields(impl::abi_arg_in stopEventName, impl::abi_arg_in fields) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StopActivity(*reinterpret_cast(&stopEventName), *reinterpret_cast(&fields)); return S_OK; } @@ -408,10 +438,11 @@ struct produce : produce } } - HRESULT __stdcall abi_StopActivityWithFieldsAndOptions(abi_arg_in stopEventName, abi_arg_in fields, abi_arg_in options) noexcept override + HRESULT __stdcall abi_StopActivityWithFieldsAndOptions(impl::abi_arg_in stopEventName, impl::abi_arg_in fields, impl::abi_arg_in options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StopActivity(*reinterpret_cast(&stopEventName), *reinterpret_cast(&fields), *reinterpret_cast(&options)); return S_OK; } @@ -425,11 +456,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateLoggingActivity(abi_arg_in activityName, abi_arg_in loggingChannel, abi_arg_out loggingActivity) noexcept override + HRESULT __stdcall abi_CreateLoggingActivity(impl::abi_arg_in activityName, impl::abi_arg_in loggingChannel, impl::abi_arg_out loggingActivity) noexcept override { try { - *loggingActivity = detach(this->shim().CreateLoggingActivity(*reinterpret_cast(&activityName), *reinterpret_cast(&loggingChannel))); + typename D::abi_guard guard(this->shim()); + *loggingActivity = detach_abi(this->shim().CreateLoggingActivity(*reinterpret_cast(&activityName), *reinterpret_cast(&loggingChannel))); return S_OK; } catch (...) @@ -439,11 +471,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateLoggingActivityWithLevel(abi_arg_in activityName, abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level, abi_arg_out loggingActivity) noexcept override + HRESULT __stdcall abi_CreateLoggingActivityWithLevel(impl::abi_arg_in activityName, impl::abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level, impl::abi_arg_out loggingActivity) noexcept override { try { - *loggingActivity = detach(this->shim().CreateLoggingActivityWithLevel(*reinterpret_cast(&activityName), *reinterpret_cast(&loggingChannel), level)); + typename D::abi_guard guard(this->shim()); + *loggingActivity = detach_abi(this->shim().CreateLoggingActivityWithLevel(*reinterpret_cast(&activityName), *reinterpret_cast(&loggingChannel), level)); return S_OK; } catch (...) @@ -457,11 +490,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -475,7 +509,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -488,7 +523,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Level()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Level()); return S_OK; } catch (...) @@ -497,10 +533,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_LogMessage(abi_arg_in eventString) noexcept override + HRESULT __stdcall abi_LogMessage(impl::abi_arg_in eventString) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogMessage(*reinterpret_cast(&eventString)); return S_OK; } @@ -510,10 +547,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_LogMessageWithLevel(abi_arg_in eventString, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override + HRESULT __stdcall abi_LogMessageWithLevel(impl::abi_arg_in eventString, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogMessage(*reinterpret_cast(&eventString), level); return S_OK; } @@ -523,10 +561,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_LogValuePair(abi_arg_in value1, int32_t value2) noexcept override + HRESULT __stdcall abi_LogValuePair(impl::abi_arg_in value1, int32_t value2) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogValuePair(*reinterpret_cast(&value1), value2); return S_OK; } @@ -536,10 +575,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_LogValuePairWithLevel(abi_arg_in value1, int32_t value2, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override + HRESULT __stdcall abi_LogValuePairWithLevel(impl::abi_arg_in value1, int32_t value2, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogValuePair(*reinterpret_cast(&value1), value2, level); return S_OK; } @@ -549,11 +589,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_LoggingEnabled(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LoggingEnabled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LoggingEnabled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LoggingEnabled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -566,6 +607,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().LoggingEnabled(token); return S_OK; } @@ -583,7 +625,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -596,11 +639,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in name, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in name, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -614,11 +658,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithOptions(abi_arg_in name, abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithOptions(impl::abi_arg_in name, impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithOptions(*reinterpret_cast(&name), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithOptions(*reinterpret_cast(&name), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -628,11 +673,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateWithOptionsAndId(abi_arg_in name, abi_arg_in options, GUID id, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithOptionsAndId(impl::abi_arg_in name, impl::abi_arg_in options, GUID id, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithOptionsAndId(*reinterpret_cast(&name), *reinterpret_cast(&options), id)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithOptionsAndId(*reinterpret_cast(&name), *reinterpret_cast(&options), id)); return S_OK; } catch (...) @@ -650,7 +696,8 @@ struct produce : pr { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -663,6 +710,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Group(value); return S_OK; } @@ -676,11 +724,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_Create(GUID group, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(GUID group, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(group)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(group)); return S_OK; } catch (...) @@ -698,6 +747,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -707,10 +757,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_BeginStruct(abi_arg_in name) noexcept override + HRESULT __stdcall abi_BeginStruct(impl::abi_arg_in name) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeginStruct(*reinterpret_cast(&name)); return S_OK; } @@ -720,10 +771,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_BeginStructWithTags(abi_arg_in name, int32_t tags) noexcept override + HRESULT __stdcall abi_BeginStructWithTags(impl::abi_arg_in name, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeginStruct(*reinterpret_cast(&name), tags); return S_OK; } @@ -737,6 +789,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().EndStruct(); return S_OK; } @@ -746,10 +799,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddEmpty(abi_arg_in name) noexcept override + HRESULT __stdcall abi_AddEmpty(impl::abi_arg_in name) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddEmpty(*reinterpret_cast(&name)); return S_OK; } @@ -759,10 +813,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddEmptyWithFormat(abi_arg_in name, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddEmptyWithFormat(impl::abi_arg_in name, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddEmpty(*reinterpret_cast(&name), format); return S_OK; } @@ -772,10 +827,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddEmptyWithFormatAndTags(abi_arg_in name, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddEmptyWithFormatAndTags(impl::abi_arg_in name, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddEmpty(*reinterpret_cast(&name), format, tags); return S_OK; } @@ -785,10 +841,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8(abi_arg_in name, uint8_t value) noexcept override + HRESULT __stdcall abi_AddUInt8(impl::abi_arg_in name, uint8_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt8(*reinterpret_cast(&name), value); return S_OK; } @@ -798,10 +855,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8WithFormat(abi_arg_in name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt8WithFormat(impl::abi_arg_in name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt8(*reinterpret_cast(&name), value, format); return S_OK; } @@ -811,10 +869,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8WithFormatAndTags(abi_arg_in name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt8WithFormatAndTags(impl::abi_arg_in name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt8(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -824,11 +883,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddUInt8Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddUInt8Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt8Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -837,11 +897,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt8ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddUInt8Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt8Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -850,11 +911,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt8ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt8ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddUInt8Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt8Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -863,10 +925,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16(abi_arg_in name, int16_t value) noexcept override + HRESULT __stdcall abi_AddInt16(impl::abi_arg_in name, int16_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt16(*reinterpret_cast(&name), value); return S_OK; } @@ -876,10 +939,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16WithFormat(abi_arg_in name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt16WithFormat(impl::abi_arg_in name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt16(*reinterpret_cast(&name), value, format); return S_OK; } @@ -889,10 +953,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16WithFormatAndTags(abi_arg_in name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt16WithFormatAndTags(impl::abi_arg_in name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt16(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -902,11 +967,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddInt16Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -915,11 +981,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt16ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -928,11 +995,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt16ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt16ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -941,10 +1009,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16(abi_arg_in name, uint16_t value) noexcept override + HRESULT __stdcall abi_AddUInt16(impl::abi_arg_in name, uint16_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt16(*reinterpret_cast(&name), value); return S_OK; } @@ -954,10 +1023,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16WithFormat(abi_arg_in name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt16WithFormat(impl::abi_arg_in name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt16(*reinterpret_cast(&name), value, format); return S_OK; } @@ -967,10 +1037,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16WithFormatAndTags(abi_arg_in name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt16WithFormatAndTags(impl::abi_arg_in name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt16(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -980,11 +1051,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddUInt16Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddUInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -993,11 +1065,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt16ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddUInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1006,11 +1079,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt16ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt16ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddUInt16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1019,10 +1093,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32(abi_arg_in name, int32_t value) noexcept override + HRESULT __stdcall abi_AddInt32(impl::abi_arg_in name, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt32(*reinterpret_cast(&name), value); return S_OK; } @@ -1032,10 +1107,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32WithFormat(abi_arg_in name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt32WithFormat(impl::abi_arg_in name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt32(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1045,10 +1121,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32WithFormatAndTags(abi_arg_in name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt32WithFormatAndTags(impl::abi_arg_in name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt32(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1058,11 +1135,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddInt32Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1071,11 +1149,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt32ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1084,11 +1163,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt32ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt32ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1097,10 +1177,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32(abi_arg_in name, uint32_t value) noexcept override + HRESULT __stdcall abi_AddUInt32(impl::abi_arg_in name, uint32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt32(*reinterpret_cast(&name), value); return S_OK; } @@ -1110,10 +1191,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32WithFormat(abi_arg_in name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt32WithFormat(impl::abi_arg_in name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt32(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1123,10 +1205,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32WithFormatAndTags(abi_arg_in name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt32WithFormatAndTags(impl::abi_arg_in name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt32(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1136,11 +1219,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddUInt32Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddUInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1149,11 +1233,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt32ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddUInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1162,11 +1247,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt32ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt32ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddUInt32Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt32Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1175,10 +1261,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64(abi_arg_in name, int64_t value) noexcept override + HRESULT __stdcall abi_AddInt64(impl::abi_arg_in name, int64_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt64(*reinterpret_cast(&name), value); return S_OK; } @@ -1188,10 +1275,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64WithFormat(abi_arg_in name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt64WithFormat(impl::abi_arg_in name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt64(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1201,10 +1289,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64WithFormatAndTags(abi_arg_in name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt64WithFormatAndTags(impl::abi_arg_in name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInt64(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1214,11 +1303,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddInt64Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1227,11 +1317,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddInt64ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1240,11 +1331,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddInt64ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddInt64ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1253,10 +1345,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64(abi_arg_in name, uint64_t value) noexcept override + HRESULT __stdcall abi_AddUInt64(impl::abi_arg_in name, uint64_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt64(*reinterpret_cast(&name), value); return S_OK; } @@ -1266,10 +1359,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64WithFormat(abi_arg_in name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt64WithFormat(impl::abi_arg_in name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt64(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1279,10 +1373,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64WithFormatAndTags(abi_arg_in name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt64WithFormatAndTags(impl::abi_arg_in name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddUInt64(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1292,11 +1387,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddUInt64Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddUInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1305,11 +1401,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddUInt64ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddUInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1318,11 +1415,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddUInt64ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddUInt64ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddUInt64Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddUInt64Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1331,10 +1429,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingle(abi_arg_in name, float value) noexcept override + HRESULT __stdcall abi_AddSingle(impl::abi_arg_in name, float value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSingle(*reinterpret_cast(&name), value); return S_OK; } @@ -1344,10 +1443,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingleWithFormat(abi_arg_in name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddSingleWithFormat(impl::abi_arg_in name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSingle(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1357,10 +1457,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingleWithFormatAndTags(abi_arg_in name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddSingleWithFormatAndTags(impl::abi_arg_in name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSingle(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1370,11 +1471,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingleArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddSingleArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddSingleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddSingleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1383,11 +1485,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingleArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddSingleArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddSingleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddSingleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1396,11 +1499,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSingleArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddSingleArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddSingleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddSingleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1409,10 +1513,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDouble(abi_arg_in name, double value) noexcept override + HRESULT __stdcall abi_AddDouble(impl::abi_arg_in name, double value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDouble(*reinterpret_cast(&name), value); return S_OK; } @@ -1422,10 +1527,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDoubleWithFormat(abi_arg_in name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddDoubleWithFormat(impl::abi_arg_in name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDouble(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1435,10 +1541,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDoubleWithFormatAndTags(abi_arg_in name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddDoubleWithFormatAndTags(impl::abi_arg_in name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDouble(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1448,11 +1555,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDoubleArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddDoubleArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddDoubleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddDoubleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1461,11 +1569,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDoubleArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddDoubleArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddDoubleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddDoubleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1474,11 +1583,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDoubleArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddDoubleArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddDoubleArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddDoubleArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1487,10 +1597,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16(abi_arg_in name, wchar_t value) noexcept override + HRESULT __stdcall abi_AddChar16(impl::abi_arg_in name, wchar_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddChar16(*reinterpret_cast(&name), value); return S_OK; } @@ -1500,10 +1611,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16WithFormat(abi_arg_in name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddChar16WithFormat(impl::abi_arg_in name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddChar16(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1513,10 +1625,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16WithFormatAndTags(abi_arg_in name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddChar16WithFormatAndTags(impl::abi_arg_in name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddChar16(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1526,11 +1639,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16Array(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddChar16Array(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddChar16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddChar16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1539,11 +1653,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16ArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddChar16ArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddChar16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddChar16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1552,11 +1667,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddChar16ArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddChar16ArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddChar16Array(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddChar16Array(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1565,10 +1681,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBoolean(abi_arg_in name, bool value) noexcept override + HRESULT __stdcall abi_AddBoolean(impl::abi_arg_in name, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddBoolean(*reinterpret_cast(&name), value); return S_OK; } @@ -1578,10 +1695,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBooleanWithFormat(abi_arg_in name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddBooleanWithFormat(impl::abi_arg_in name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddBoolean(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1591,10 +1709,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBooleanWithFormatAndTags(abi_arg_in name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddBooleanWithFormatAndTags(impl::abi_arg_in name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddBoolean(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1604,11 +1723,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBooleanArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddBooleanArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddBooleanArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddBooleanArray(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1617,11 +1737,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBooleanArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddBooleanArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddBooleanArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddBooleanArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1630,11 +1751,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddBooleanArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddBooleanArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddBooleanArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddBooleanArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1643,10 +1765,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddString(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddString(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddString(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1656,10 +1779,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddStringWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddStringWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddString(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1669,10 +1793,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddStringWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddStringWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddString(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1682,10 +1807,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddStringArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddStringArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStringArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1696,10 +1822,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddStringArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddStringArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStringArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1710,10 +1837,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddStringArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddStringArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStringArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1724,10 +1852,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuid(abi_arg_in name, GUID value) noexcept override + HRESULT __stdcall abi_AddGuid(impl::abi_arg_in name, GUID value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddGuid(*reinterpret_cast(&name), value); return S_OK; } @@ -1737,10 +1866,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuidWithFormat(abi_arg_in name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddGuidWithFormat(impl::abi_arg_in name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddGuid(*reinterpret_cast(&name), value, format); return S_OK; } @@ -1750,10 +1880,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuidWithFormatAndTags(abi_arg_in name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddGuidWithFormatAndTags(impl::abi_arg_in name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddGuid(*reinterpret_cast(&name), value, format, tags); return S_OK; } @@ -1763,11 +1894,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuidArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddGuidArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().AddGuidArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddGuidArray(*reinterpret_cast(&name), array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1776,11 +1908,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuidArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddGuidArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { - this->shim().AddGuidArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format); + typename D::abi_guard guard(this->shim()); + this->shim().AddGuidArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format); return S_OK; } catch (...) @@ -1789,11 +1922,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddGuidArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddGuidArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { - this->shim().AddGuidArray(*reinterpret_cast(&name), array_ref(value, value + __valueSize), format, tags); + typename D::abi_guard guard(this->shim()); + this->shim().AddGuidArray(*reinterpret_cast(&name), array_view(value, value + __valueSize), format, tags); return S_OK; } catch (...) @@ -1802,10 +1936,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTime(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddDateTime(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTime(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1815,10 +1950,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTimeWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddDateTimeWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTime(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1828,10 +1964,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTimeWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddDateTimeWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTime(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1841,10 +1978,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTimeArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddDateTimeArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTimeArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1854,10 +1992,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTimeArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddDateTimeArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTimeArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1867,10 +2006,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddDateTimeArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddDateTimeArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddDateTimeArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1880,10 +2020,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpan(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddTimeSpan(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpan(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1893,10 +2034,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpanWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddTimeSpanWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpan(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1906,10 +2048,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpanWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddTimeSpanWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpan(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1919,10 +2062,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpanArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddTimeSpanArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpanArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1932,10 +2076,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpanArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddTimeSpanArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpanArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1945,10 +2090,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddTimeSpanArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddTimeSpanArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTimeSpanArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1958,10 +2104,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPoint(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddPoint(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPoint(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -1971,10 +2118,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPointWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddPointWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPoint(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -1984,10 +2132,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPointWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddPointWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPoint(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -1997,10 +2146,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPointArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddPointArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPointArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -2010,10 +2160,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPointArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddPointArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPointArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -2023,10 +2174,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddPointArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddPointArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddPointArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -2036,10 +2188,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSize(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddSize(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSize(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -2049,10 +2202,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSizeWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddSizeWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSize(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -2062,10 +2216,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSizeWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddSizeWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSize(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -2075,10 +2230,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSizeArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddSizeArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSizeArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -2088,10 +2244,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSizeArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddSizeArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSizeArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -2101,10 +2258,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddSizeArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddSizeArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddSizeArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -2114,10 +2272,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRect(abi_arg_in name, abi_arg_in value) noexcept override + HRESULT __stdcall abi_AddRect(impl::abi_arg_in name, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRect(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -2127,10 +2286,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRectWithFormat(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddRectWithFormat(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRect(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -2140,10 +2300,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRectWithFormatAndTags(abi_arg_in name, abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddRectWithFormatAndTags(impl::abi_arg_in name, impl::abi_arg_in value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRect(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -2153,10 +2314,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRectArray(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_AddRectArray(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRectArray(*reinterpret_cast(&name), *reinterpret_cast(&value)); return S_OK; } @@ -2166,10 +2328,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRectArrayWithFormat(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override + HRESULT __stdcall abi_AddRectArrayWithFormat(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRectArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format); return S_OK; } @@ -2179,10 +2342,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_AddRectArrayWithFormatAndTags(abi_arg_in name, uint32_t __valueSize, abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override + HRESULT __stdcall abi_AddRectArrayWithFormatAndTags(impl::abi_arg_in name, uint32_t __valueSize, impl::abi_arg_in * value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddRectArray(*reinterpret_cast(&name), *reinterpret_cast(&value), format, tags); return S_OK; } @@ -2200,7 +2364,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -2213,6 +2378,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Keywords(value); return S_OK; } @@ -2226,7 +2392,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Tags()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tags()); return S_OK; } catch (...) @@ -2239,6 +2406,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Tags(value); return S_OK; } @@ -2252,7 +2420,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Task()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Task()); return S_OK; } catch (...) @@ -2265,6 +2434,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Task(value); return S_OK; } @@ -2278,7 +2448,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Opcode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opcode()); return S_OK; } catch (...) @@ -2291,6 +2462,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Opcode(value); return S_OK; } @@ -2304,7 +2476,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -2317,6 +2490,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ActivityId(value); return S_OK; } @@ -2330,7 +2504,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().RelatedActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelatedActivityId()); return S_OK; } catch (...) @@ -2343,6 +2518,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().RelatedActivityId(value); return S_OK; } @@ -2356,11 +2532,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithKeywords(int64_t keywords, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithKeywords(int64_t keywords, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithKeywords(keywords)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithKeywords(keywords)); return S_OK; } catch (...) @@ -2374,11 +2551,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -2388,11 +2566,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SaveToFileAsync(abi_arg_in folder, abi_arg_in fileName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SaveToFileAsync(impl::abi_arg_in folder, impl::abi_arg_in fileName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SaveToFileAsync(*reinterpret_cast(&folder), *reinterpret_cast(&fileName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveToFileAsync(*reinterpret_cast(&folder), *reinterpret_cast(&fileName))); return S_OK; } catch (...) @@ -2402,10 +2581,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_AddLoggingChannel(abi_arg_in loggingChannel) noexcept override + HRESULT __stdcall abi_AddLoggingChannel(impl::abi_arg_in loggingChannel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddLoggingChannel(*reinterpret_cast(&loggingChannel)); return S_OK; } @@ -2415,10 +2595,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_AddLoggingChannelWithLevel(abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) noexcept override + HRESULT __stdcall abi_AddLoggingChannelWithLevel(impl::abi_arg_in loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddLoggingChannel(*reinterpret_cast(&loggingChannel), maxLevel); return S_OK; } @@ -2428,10 +2609,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RemoveLoggingChannel(abi_arg_in loggingChannel) noexcept override + HRESULT __stdcall abi_RemoveLoggingChannel(impl::abi_arg_in loggingChannel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveLoggingChannel(*reinterpret_cast(&loggingChannel)); return S_OK; } @@ -2445,11 +2627,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in name, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in name, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -2467,7 +2650,8 @@ struct produce : produce_ba { try { - *result = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2480,7 +2664,8 @@ struct produce : produce_ba { try { - *result = detach(this->shim().IsEnabled(level)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsEnabled(level)); return S_OK; } catch (...) @@ -2493,7 +2678,8 @@ struct produce : produce_ba { try { - *result = detach(this->shim().IsEnabled(level, keywords)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsEnabled(level, keywords)); return S_OK; } catch (...) @@ -2502,10 +2688,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_LogEvent(abi_arg_in eventName) noexcept override + HRESULT __stdcall abi_LogEvent(impl::abi_arg_in eventName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogEvent(*reinterpret_cast(&eventName)); return S_OK; } @@ -2515,10 +2702,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_LogEventWithFields(abi_arg_in eventName, abi_arg_in fields) noexcept override + HRESULT __stdcall abi_LogEventWithFields(impl::abi_arg_in eventName, impl::abi_arg_in fields) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogEvent(*reinterpret_cast(&eventName), *reinterpret_cast(&fields)); return S_OK; } @@ -2528,10 +2716,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_LogEventWithFieldsAndLevel(abi_arg_in eventName, abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override + HRESULT __stdcall abi_LogEventWithFieldsAndLevel(impl::abi_arg_in eventName, impl::abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogEvent(*reinterpret_cast(&eventName), *reinterpret_cast(&fields), level); return S_OK; } @@ -2541,10 +2730,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_LogEventWithFieldsAndOptions(abi_arg_in eventName, abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, abi_arg_in options) noexcept override + HRESULT __stdcall abi_LogEventWithFieldsAndOptions(impl::abi_arg_in eventName, impl::abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, impl::abi_arg_in options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogEvent(*reinterpret_cast(&eventName), *reinterpret_cast(&fields), level, *reinterpret_cast(&options)); return S_OK; } @@ -2554,11 +2744,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StartActivity(abi_arg_in startEventName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartActivity(impl::abi_arg_in startEventName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartActivity(*reinterpret_cast(&startEventName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartActivity(*reinterpret_cast(&startEventName))); return S_OK; } catch (...) @@ -2568,11 +2759,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StartActivityWithFields(abi_arg_in startEventName, abi_arg_in fields, abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartActivityWithFields(impl::abi_arg_in startEventName, impl::abi_arg_in fields, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields))); return S_OK; } catch (...) @@ -2582,11 +2774,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StartActivityWithFieldsAndLevel(abi_arg_in startEventName, abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartActivityWithFieldsAndLevel(impl::abi_arg_in startEventName, impl::abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields), level)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields), level)); return S_OK; } catch (...) @@ -2596,11 +2789,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StartActivityWithFieldsAndOptions(abi_arg_in startEventName, abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartActivityWithFieldsAndOptions(impl::abi_arg_in startEventName, impl::abi_arg_in fields, Windows::Foundation::Diagnostics::LoggingLevel level, impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields), level, *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartActivity(*reinterpret_cast(&startEventName), *reinterpret_cast(&fields), level, *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -2618,7 +2812,8 @@ struct produceshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *enabled = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -2631,7 +2826,8 @@ struct produceshim().TraceLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TraceLevel()); return S_OK; } catch (...) @@ -2648,46 +2844,46 @@ namespace Windows::Foundation::Diagnostics { template bool impl_ITracingStatusChangedEventArgs::Enabled() const { bool enabled {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&enabled)); + check_hresult(WINRT_SHIM(ITracingStatusChangedEventArgs)->get_Enabled(&enabled)); return enabled; } template Windows::Foundation::Diagnostics::CausalityTraceLevel impl_ITracingStatusChangedEventArgs::TraceLevel() const { Windows::Foundation::Diagnostics::CausalityTraceLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_TraceLevel(&value)); + check_hresult(WINRT_SHIM(ITracingStatusChangedEventArgs)->get_TraceLevel(&value)); return value; } -template void impl_IAsyncCausalityTracerStatics::TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, hstring_ref operationName, uint64_t relatedContext) const +template void impl_IAsyncCausalityTracerStatics::TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, hstring_view operationName, uint64_t relatedContext) const { - check_hresult(static_cast(static_cast(*this))->abi_TraceOperationCreation(traceLevel, source, platformId, operationId, get(operationName), relatedContext)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->abi_TraceOperationCreation(traceLevel, source, platformId, operationId, get_abi(operationName), relatedContext)); } template void impl_IAsyncCausalityTracerStatics::TraceOperationCompletion(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, Windows::Foundation::AsyncStatus status) const { - check_hresult(static_cast(static_cast(*this))->abi_TraceOperationCompletion(traceLevel, source, platformId, operationId, status)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->abi_TraceOperationCompletion(traceLevel, source, platformId, operationId, status)); } template void impl_IAsyncCausalityTracerStatics::TraceOperationRelation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, Windows::Foundation::Diagnostics::CausalityRelation relation) const { - check_hresult(static_cast(static_cast(*this))->abi_TraceOperationRelation(traceLevel, source, platformId, operationId, relation)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->abi_TraceOperationRelation(traceLevel, source, platformId, operationId, relation)); } template void impl_IAsyncCausalityTracerStatics::TraceSynchronousWorkStart(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, Windows::Foundation::Diagnostics::CausalitySynchronousWork work) const { - check_hresult(static_cast(static_cast(*this))->abi_TraceSynchronousWorkStart(traceLevel, source, platformId, operationId, work)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->abi_TraceSynchronousWorkStart(traceLevel, source, platformId, operationId, work)); } template void impl_IAsyncCausalityTracerStatics::TraceSynchronousWorkCompletion(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, Windows::Foundation::Diagnostics::CausalitySynchronousWork work) const { - check_hresult(static_cast(static_cast(*this))->abi_TraceSynchronousWorkCompletion(traceLevel, source, work)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->abi_TraceSynchronousWorkCompletion(traceLevel, source, work)); } template event_token impl_IAsyncCausalityTracerStatics::TracingStatusChanged(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_TracingStatusChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->add_TracingStatusChanged(get_abi(handler), &cookie)); return cookie; } @@ -2698,1003 +2894,1003 @@ template event_revoker impl_IAsyncCau template void impl_IAsyncCausalityTracerStatics::TracingStatusChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TracingStatusChanged(cookie)); + check_hresult(WINRT_SHIM(IAsyncCausalityTracerStatics)->remove_TracingStatusChanged(cookie)); } template void impl_IErrorReportingSettings::SetErrorOptions(Windows::Foundation::Diagnostics::ErrorOptions value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetErrorOptions(value)); + check_hresult(WINRT_SHIM(IErrorReportingSettings)->abi_SetErrorOptions(value)); } template Windows::Foundation::Diagnostics::ErrorOptions impl_IErrorReportingSettings::GetErrorOptions() const { Windows::Foundation::Diagnostics::ErrorOptions value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetErrorOptions(&value)); + check_hresult(WINRT_SHIM(IErrorReportingSettings)->abi_GetErrorOptions(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IErrorDetailsStatics::CreateFromHResultAsync(int32_t errorCode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromHResultAsync(errorCode, put(operation))); + check_hresult(WINRT_SHIM(IErrorDetailsStatics)->abi_CreateFromHResultAsync(errorCode, put_abi(operation))); return operation; } template hstring impl_IErrorDetails::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IErrorDetails)->get_Description(put_abi(value))); return value; } template hstring impl_IErrorDetails::LongDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LongDescription(put(value))); + check_hresult(WINRT_SHIM(IErrorDetails)->get_LongDescription(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IErrorDetails::HelpUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HelpUri(put(value))); + check_hresult(WINRT_SHIM(IErrorDetails)->get_HelpUri(put_abi(value))); return value; } template int64_t impl_ILoggingOptions::Keywords() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Keywords(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_Keywords(&value)); return value; } template void impl_ILoggingOptions::Keywords(int64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Keywords(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_Keywords(value)); } template int32_t impl_ILoggingOptions::Tags() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Tags(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_Tags(&value)); return value; } template void impl_ILoggingOptions::Tags(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Tags(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_Tags(value)); } template int16_t impl_ILoggingOptions::Task() const { int16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Task(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_Task(&value)); return value; } template void impl_ILoggingOptions::Task(int16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Task(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_Task(value)); } template Windows::Foundation::Diagnostics::LoggingOpcode impl_ILoggingOptions::Opcode() const { Windows::Foundation::Diagnostics::LoggingOpcode value {}; - check_hresult(static_cast(static_cast(*this))->get_Opcode(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_Opcode(&value)); return value; } template void impl_ILoggingOptions::Opcode(Windows::Foundation::Diagnostics::LoggingOpcode value) const { - check_hresult(static_cast(static_cast(*this))->put_Opcode(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_Opcode(value)); } template GUID impl_ILoggingOptions::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_ActivityId(&value)); return value; } template void impl_ILoggingOptions::ActivityId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_ActivityId(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_ActivityId(value)); } template GUID impl_ILoggingOptions::RelatedActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RelatedActivityId(&value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->get_RelatedActivityId(&value)); return value; } template void impl_ILoggingOptions::RelatedActivityId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_RelatedActivityId(value)); + check_hresult(WINRT_SHIM(ILoggingOptions)->put_RelatedActivityId(value)); } template Windows::Foundation::Diagnostics::LoggingOptions impl_ILoggingOptionsFactory::CreateWithKeywords(int64_t keywords) const { Windows::Foundation::Diagnostics::LoggingOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithKeywords(keywords, put(result))); + check_hresult(WINRT_SHIM(ILoggingOptionsFactory)->abi_CreateWithKeywords(keywords, put_abi(result))); return result; } template GUID impl_ILoggingChannelOptions::Group() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Group(&value)); + check_hresult(WINRT_SHIM(ILoggingChannelOptions)->get_Group(&value)); return value; } template void impl_ILoggingChannelOptions::Group(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_Group(value)); + check_hresult(WINRT_SHIM(ILoggingChannelOptions)->put_Group(value)); } template Windows::Foundation::Diagnostics::LoggingChannelOptions impl_ILoggingChannelOptionsFactory::Create(GUID group) const { Windows::Foundation::Diagnostics::LoggingChannelOptions result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(group, put(result))); + check_hresult(WINRT_SHIM(ILoggingChannelOptionsFactory)->abi_Create(group, put_abi(result))); return result; } template void impl_ILoggingFields::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_Clear()); } -template void impl_ILoggingFields::BeginStruct(hstring_ref name) const +template void impl_ILoggingFields::BeginStruct(hstring_view name) const { - check_hresult(static_cast(static_cast(*this))->abi_BeginStruct(get(name))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_BeginStruct(get_abi(name))); } -template void impl_ILoggingFields::BeginStruct(hstring_ref name, int32_t tags) const +template void impl_ILoggingFields::BeginStruct(hstring_view name, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_BeginStructWithTags(get(name), tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_BeginStructWithTags(get_abi(name), tags)); } template void impl_ILoggingFields::EndStruct() const { - check_hresult(static_cast(static_cast(*this))->abi_EndStruct()); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_EndStruct()); } -template void impl_ILoggingFields::AddEmpty(hstring_ref name) const +template void impl_ILoggingFields::AddEmpty(hstring_view name) const { - check_hresult(static_cast(static_cast(*this))->abi_AddEmpty(get(name))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddEmpty(get_abi(name))); } -template void impl_ILoggingFields::AddEmpty(hstring_ref name, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddEmpty(hstring_view name, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddEmptyWithFormat(get(name), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddEmptyWithFormat(get_abi(name), format)); } -template void impl_ILoggingFields::AddEmpty(hstring_ref name, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddEmpty(hstring_view name, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddEmptyWithFormatAndTags(get(name), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddEmptyWithFormatAndTags(get_abi(name), format, tags)); } -template void impl_ILoggingFields::AddUInt8(hstring_ref name, uint8_t value) const +template void impl_ILoggingFields::AddUInt8(hstring_view name, uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8(get_abi(name), value)); } -template void impl_ILoggingFields::AddUInt8(hstring_ref name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt8(hstring_view name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddUInt8(hstring_ref name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt8(hstring_view name, uint8_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddUInt8Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddUInt8Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddUInt8Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt8Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddUInt8Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt8Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt8ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt8ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddInt16(hstring_ref name, int16_t value) const +template void impl_ILoggingFields::AddInt16(hstring_view name, int16_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16(get_abi(name), value)); } -template void impl_ILoggingFields::AddInt16(hstring_ref name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt16(hstring_view name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddInt16(hstring_ref name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt16(hstring_view name, int16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddInt16Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddInt16Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddInt16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddInt16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt16ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt16ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddUInt16(hstring_ref name, uint16_t value) const +template void impl_ILoggingFields::AddUInt16(hstring_view name, uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16(get_abi(name), value)); } -template void impl_ILoggingFields::AddUInt16(hstring_ref name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt16(hstring_view name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddUInt16(hstring_ref name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt16(hstring_view name, uint16_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddUInt16Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddUInt16Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddUInt16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddUInt16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt16ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt16ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddInt32(hstring_ref name, int32_t value) const +template void impl_ILoggingFields::AddInt32(hstring_view name, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32(get_abi(name), value)); } -template void impl_ILoggingFields::AddInt32(hstring_ref name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt32(hstring_view name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddInt32(hstring_ref name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt32(hstring_view name, int32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddInt32Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddInt32Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddInt32Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt32Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddInt32Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt32Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt32ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt32ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddUInt32(hstring_ref name, uint32_t value) const +template void impl_ILoggingFields::AddUInt32(hstring_view name, uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32(get_abi(name), value)); } -template void impl_ILoggingFields::AddUInt32(hstring_ref name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt32(hstring_view name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddUInt32(hstring_ref name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt32(hstring_view name, uint32_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddUInt32Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddUInt32Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddUInt32Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt32Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddUInt32Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt32Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt32ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt32ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddInt64(hstring_ref name, int64_t value) const +template void impl_ILoggingFields::AddInt64(hstring_view name, int64_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64(get_abi(name), value)); } -template void impl_ILoggingFields::AddInt64(hstring_ref name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt64(hstring_view name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddInt64(hstring_ref name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt64(hstring_view name, int64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddInt64Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddInt64Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddInt64Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddInt64Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddInt64Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddInt64Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInt64ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddInt64ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddUInt64(hstring_ref name, uint64_t value) const +template void impl_ILoggingFields::AddUInt64(hstring_view name, uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64(get_abi(name), value)); } -template void impl_ILoggingFields::AddUInt64(hstring_ref name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt64(hstring_view name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddUInt64(hstring_ref name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt64(hstring_view name, uint64_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddUInt64Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddUInt64Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddUInt64Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddUInt64Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddUInt64Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddUInt64Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddUInt64ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddUInt64ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddSingle(hstring_ref name, float value) const +template void impl_ILoggingFields::AddSingle(hstring_view name, float value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingle(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingle(get_abi(name), value)); } -template void impl_ILoggingFields::AddSingle(hstring_ref name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddSingle(hstring_view name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingleWithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingleWithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddSingle(hstring_ref name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddSingle(hstring_view name, float value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingleWithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingleWithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddSingleArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddSingleArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingleArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingleArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddSingleArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddSingleArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingleArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingleArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddSingleArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddSingleArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSingleArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSingleArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddDouble(hstring_ref name, double value) const +template void impl_ILoggingFields::AddDouble(hstring_view name, double value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDouble(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDouble(get_abi(name), value)); } -template void impl_ILoggingFields::AddDouble(hstring_ref name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddDouble(hstring_view name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDoubleWithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDoubleWithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddDouble(hstring_ref name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddDouble(hstring_view name, double value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDoubleWithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDoubleWithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddDoubleArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddDoubleArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDoubleArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDoubleArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddDoubleArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddDoubleArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDoubleArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDoubleArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddDoubleArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddDoubleArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDoubleArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDoubleArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddChar16(hstring_ref name, wchar_t value) const +template void impl_ILoggingFields::AddChar16(hstring_view name, wchar_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16(get_abi(name), value)); } -template void impl_ILoggingFields::AddChar16(hstring_ref name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddChar16(hstring_view name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16WithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16WithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddChar16(hstring_ref name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddChar16(hstring_view name, wchar_t value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16WithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16WithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddChar16Array(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddChar16Array(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16Array(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16Array(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddChar16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddChar16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16ArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16ArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddChar16Array(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddChar16Array(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddChar16ArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddChar16ArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddBoolean(hstring_ref name, bool value) const +template void impl_ILoggingFields::AddBoolean(hstring_view name, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBoolean(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBoolean(get_abi(name), value)); } -template void impl_ILoggingFields::AddBoolean(hstring_ref name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddBoolean(hstring_view name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBooleanWithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBooleanWithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddBoolean(hstring_ref name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddBoolean(hstring_view name, bool value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBooleanWithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBooleanWithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddBooleanArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddBooleanArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBooleanArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBooleanArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddBooleanArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddBooleanArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBooleanArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBooleanArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddBooleanArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddBooleanArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddBooleanArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddBooleanArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddString(hstring_ref name, hstring_ref value) const +template void impl_ILoggingFields::AddString(hstring_view name, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddString(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddString(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddString(hstring_ref name, hstring_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddString(hstring_view name, hstring_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStringWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddStringWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddString(hstring_ref name, hstring_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddString(hstring_view name, hstring_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStringWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddStringWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddStringArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddStringArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStringArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddStringArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddStringArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddStringArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStringArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddStringArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddStringArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddStringArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStringArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddStringArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddGuid(hstring_ref name, GUID value) const +template void impl_ILoggingFields::AddGuid(hstring_view name, GUID value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuid(get(name), value)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuid(get_abi(name), value)); } -template void impl_ILoggingFields::AddGuid(hstring_ref name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddGuid(hstring_view name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuidWithFormat(get(name), value, format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuidWithFormat(get_abi(name), value, format)); } -template void impl_ILoggingFields::AddGuid(hstring_ref name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddGuid(hstring_view name, GUID value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuidWithFormatAndTags(get(name), value, format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuidWithFormatAndTags(get_abi(name), value, format, tags)); } -template void impl_ILoggingFields::AddGuidArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddGuidArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuidArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuidArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddGuidArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddGuidArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuidArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuidArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddGuidArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddGuidArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddGuidArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddGuidArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddDateTime(hstring_ref name, const Windows::Foundation::DateTime & value) const +template void impl_ILoggingFields::AddDateTime(hstring_view name, const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTime(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTime(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddDateTime(hstring_ref name, const Windows::Foundation::DateTime & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddDateTime(hstring_view name, const Windows::Foundation::DateTime & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTimeWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTimeWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddDateTime(hstring_ref name, const Windows::Foundation::DateTime & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddDateTime(hstring_view name, const Windows::Foundation::DateTime & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTimeWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTimeWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddDateTimeArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddDateTimeArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTimeArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTimeArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddDateTimeArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddDateTimeArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTimeArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTimeArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddDateTimeArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddDateTimeArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDateTimeArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddDateTimeArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddTimeSpan(hstring_ref name, const Windows::Foundation::TimeSpan & value) const +template void impl_ILoggingFields::AddTimeSpan(hstring_view name, const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpan(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpan(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddTimeSpan(hstring_ref name, const Windows::Foundation::TimeSpan & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddTimeSpan(hstring_view name, const Windows::Foundation::TimeSpan & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpanWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpanWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddTimeSpan(hstring_ref name, const Windows::Foundation::TimeSpan & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddTimeSpan(hstring_view name, const Windows::Foundation::TimeSpan & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpanWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpanWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddTimeSpanArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddTimeSpanArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpanArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpanArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddTimeSpanArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddTimeSpanArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpanArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpanArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddTimeSpanArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddTimeSpanArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTimeSpanArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddTimeSpanArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddPoint(hstring_ref name, const Windows::Foundation::Point & value) const +template void impl_ILoggingFields::AddPoint(hstring_view name, const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPoint(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPoint(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddPoint(hstring_ref name, const Windows::Foundation::Point & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddPoint(hstring_view name, const Windows::Foundation::Point & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPointWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPointWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddPoint(hstring_ref name, const Windows::Foundation::Point & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddPoint(hstring_view name, const Windows::Foundation::Point & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPointWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPointWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddPointArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddPointArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPointArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPointArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddPointArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddPointArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPointArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPointArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddPointArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddPointArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPointArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddPointArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddSize(hstring_ref name, const Windows::Foundation::Size & value) const +template void impl_ILoggingFields::AddSize(hstring_view name, const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSize(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSize(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddSize(hstring_ref name, const Windows::Foundation::Size & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddSize(hstring_view name, const Windows::Foundation::Size & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSizeWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSizeWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddSize(hstring_ref name, const Windows::Foundation::Size & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddSize(hstring_view name, const Windows::Foundation::Size & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSizeWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSizeWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddSizeArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddSizeArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSizeArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSizeArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddSizeArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddSizeArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSizeArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSizeArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddSizeArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddSizeArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSizeArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddSizeArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddRect(hstring_ref name, const Windows::Foundation::Rect & value) const +template void impl_ILoggingFields::AddRect(hstring_view name, const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRect(get(name), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRect(get_abi(name), get_abi(value))); } -template void impl_ILoggingFields::AddRect(hstring_ref name, const Windows::Foundation::Rect & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddRect(hstring_view name, const Windows::Foundation::Rect & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRectWithFormat(get(name), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRectWithFormat(get_abi(name), get_abi(value), format)); } -template void impl_ILoggingFields::AddRect(hstring_ref name, const Windows::Foundation::Rect & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddRect(hstring_view name, const Windows::Foundation::Rect & value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRectWithFormatAndTags(get(name), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRectWithFormatAndTags(get_abi(name), get_abi(value), format, tags)); } -template void impl_ILoggingFields::AddRectArray(hstring_ref name, array_ref value) const +template void impl_ILoggingFields::AddRectArray(hstring_view name, array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRectArray(get(name), value.size(), get(value))); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRectArray(get_abi(name), value.size(), get_abi(value))); } -template void impl_ILoggingFields::AddRectArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const +template void impl_ILoggingFields::AddRectArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRectArrayWithFormat(get(name), value.size(), get(value), format)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRectArrayWithFormat(get_abi(name), value.size(), get_abi(value), format)); } -template void impl_ILoggingFields::AddRectArray(hstring_ref name, array_ref value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const +template void impl_ILoggingFields::AddRectArray(hstring_view name, array_view value, Windows::Foundation::Diagnostics::LoggingFieldFormat format, int32_t tags) const { - check_hresult(static_cast(static_cast(*this))->abi_AddRectArrayWithFormatAndTags(get(name), value.size(), get(value), format, tags)); + check_hresult(WINRT_SHIM(ILoggingFields)->abi_AddRectArrayWithFormatAndTags(get_abi(name), value.size(), get_abi(value), format, tags)); } template bool impl_ILoggingTarget::IsEnabled() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnabled(&result)); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_IsEnabled(&result)); return result; } template bool impl_ILoggingTarget::IsEnabled(Windows::Foundation::Diagnostics::LoggingLevel level) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnabledWithLevel(level, &result)); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_IsEnabledWithLevel(level, &result)); return result; } template bool impl_ILoggingTarget::IsEnabled(Windows::Foundation::Diagnostics::LoggingLevel level, int64_t keywords) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnabledWithLevelAndKeywords(level, keywords, &result)); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_IsEnabledWithLevelAndKeywords(level, keywords, &result)); return result; } -template void impl_ILoggingTarget::LogEvent(hstring_ref eventName) const +template void impl_ILoggingTarget::LogEvent(hstring_view eventName) const { - check_hresult(static_cast(static_cast(*this))->abi_LogEvent(get(eventName))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_LogEvent(get_abi(eventName))); } -template void impl_ILoggingTarget::LogEvent(hstring_ref eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const +template void impl_ILoggingTarget::LogEvent(hstring_view eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const { - check_hresult(static_cast(static_cast(*this))->abi_LogEventWithFields(get(eventName), get(fields))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_LogEventWithFields(get_abi(eventName), get_abi(fields))); } -template void impl_ILoggingTarget::LogEvent(hstring_ref eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level) const +template void impl_ILoggingTarget::LogEvent(hstring_view eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level) const { - check_hresult(static_cast(static_cast(*this))->abi_LogEventWithFieldsAndLevel(get(eventName), get(fields), level)); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_LogEventWithFieldsAndLevel(get_abi(eventName), get_abi(fields), level)); } -template void impl_ILoggingTarget::LogEvent(hstring_ref eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level, const Windows::Foundation::Diagnostics::LoggingOptions & options) const +template void impl_ILoggingTarget::LogEvent(hstring_view eventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level, const Windows::Foundation::Diagnostics::LoggingOptions & options) const { - check_hresult(static_cast(static_cast(*this))->abi_LogEventWithFieldsAndOptions(get(eventName), get(fields), level, get(options))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_LogEventWithFieldsAndOptions(get_abi(eventName), get_abi(fields), level, get_abi(options))); } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_ref startEventName) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_view startEventName) const { Windows::Foundation::Diagnostics::LoggingActivity result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StartActivity(get(startEventName), put(result))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_StartActivity(get_abi(startEventName), put_abi(result))); return result; } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_ref startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_view startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const { Windows::Foundation::Diagnostics::LoggingActivity result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StartActivityWithFields(get(startEventName), get(fields), put(result))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_StartActivityWithFields(get_abi(startEventName), get_abi(fields), put_abi(result))); return result; } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_ref startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_view startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level) const { Windows::Foundation::Diagnostics::LoggingActivity result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StartActivityWithFieldsAndLevel(get(startEventName), get(fields), level, put(result))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_StartActivityWithFieldsAndLevel(get_abi(startEventName), get_abi(fields), level, put_abi(result))); return result; } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_ref startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level, const Windows::Foundation::Diagnostics::LoggingOptions & options) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingTarget::StartActivity(hstring_view startEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, Windows::Foundation::Diagnostics::LoggingLevel level, const Windows::Foundation::Diagnostics::LoggingOptions & options) const { Windows::Foundation::Diagnostics::LoggingActivity result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StartActivityWithFieldsAndOptions(get(startEventName), get(fields), level, get(options), put(result))); + check_hresult(WINRT_SHIM(ILoggingTarget)->abi_StartActivityWithFieldsAndOptions(get_abi(startEventName), get_abi(fields), level, get_abi(options), put_abi(result))); return result; } template hstring impl_ILoggingChannel::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ILoggingChannel)->get_Name(put_abi(value))); return value; } template bool impl_ILoggingChannel::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(ILoggingChannel)->get_Enabled(&value)); return value; } template Windows::Foundation::Diagnostics::LoggingLevel impl_ILoggingChannel::Level() const { Windows::Foundation::Diagnostics::LoggingLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_Level(&value)); + check_hresult(WINRT_SHIM(ILoggingChannel)->get_Level(&value)); return value; } -template void impl_ILoggingChannel::LogMessage(hstring_ref eventString) const +template void impl_ILoggingChannel::LogMessage(hstring_view eventString) const { - check_hresult(static_cast(static_cast(*this))->abi_LogMessage(get(eventString))); + check_hresult(WINRT_SHIM(ILoggingChannel)->abi_LogMessage(get_abi(eventString))); } -template void impl_ILoggingChannel::LogMessage(hstring_ref eventString, Windows::Foundation::Diagnostics::LoggingLevel level) const +template void impl_ILoggingChannel::LogMessage(hstring_view eventString, Windows::Foundation::Diagnostics::LoggingLevel level) const { - check_hresult(static_cast(static_cast(*this))->abi_LogMessageWithLevel(get(eventString), level)); + check_hresult(WINRT_SHIM(ILoggingChannel)->abi_LogMessageWithLevel(get_abi(eventString), level)); } -template void impl_ILoggingChannel::LogValuePair(hstring_ref value1, int32_t value2) const +template void impl_ILoggingChannel::LogValuePair(hstring_view value1, int32_t value2) const { - check_hresult(static_cast(static_cast(*this))->abi_LogValuePair(get(value1), value2)); + check_hresult(WINRT_SHIM(ILoggingChannel)->abi_LogValuePair(get_abi(value1), value2)); } -template void impl_ILoggingChannel::LogValuePair(hstring_ref value1, int32_t value2, Windows::Foundation::Diagnostics::LoggingLevel level) const +template void impl_ILoggingChannel::LogValuePair(hstring_view value1, int32_t value2, Windows::Foundation::Diagnostics::LoggingLevel level) const { - check_hresult(static_cast(static_cast(*this))->abi_LogValuePairWithLevel(get(value1), value2, level)); + check_hresult(WINRT_SHIM(ILoggingChannel)->abi_LogValuePairWithLevel(get_abi(value1), value2, level)); } -template event_token impl_ILoggingChannel::LoggingEnabled(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ILoggingChannel::LoggingEnabled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LoggingEnabled(get(handler), &token)); + check_hresult(WINRT_SHIM(ILoggingChannel)->add_LoggingEnabled(get_abi(handler), &token)); return token; } -template event_revoker impl_ILoggingChannel::LoggingEnabled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ILoggingChannel::LoggingEnabled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Foundation::Diagnostics::ILoggingChannel::remove_LoggingEnabled, LoggingEnabled(handler)); } template void impl_ILoggingChannel::LoggingEnabled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LoggingEnabled(token)); + check_hresult(WINRT_SHIM(ILoggingChannel)->remove_LoggingEnabled(token)); } template GUID impl_ILoggingChannel2::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ILoggingChannel2)->get_Id(&value)); return value; } -template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory::Create(hstring_ref name) const +template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory::Create(hstring_view name) const { Windows::Foundation::Diagnostics::LoggingChannel result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(name), put(result))); + check_hresult(WINRT_SHIM(ILoggingChannelFactory)->abi_Create(get_abi(name), put_abi(result))); return result; } -template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory2::CreateWithOptions(hstring_ref name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options) const +template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory2::CreateWithOptions(hstring_view name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options) const { Windows::Foundation::Diagnostics::LoggingChannel result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithOptions(get(name), get(options), put(result))); + check_hresult(WINRT_SHIM(ILoggingChannelFactory2)->abi_CreateWithOptions(get_abi(name), get_abi(options), put_abi(result))); return result; } -template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory2::CreateWithOptionsAndId(hstring_ref name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options, GUID id) const +template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingChannelFactory2::CreateWithOptionsAndId(hstring_view name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options, GUID id) const { Windows::Foundation::Diagnostics::LoggingChannel result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithOptionsAndId(get(name), get(options), id, put(result))); + check_hresult(WINRT_SHIM(ILoggingChannelFactory2)->abi_CreateWithOptionsAndId(get_abi(name), get_abi(options), id, put_abi(result))); return result; } template hstring impl_ILoggingActivity::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ILoggingActivity)->get_Name(put_abi(value))); return value; } template GUID impl_ILoggingActivity::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ILoggingActivity)->get_Id(&value)); return value; } template Windows::Foundation::Diagnostics::LoggingChannel impl_ILoggingActivity2::Channel() const { Windows::Foundation::Diagnostics::LoggingChannel value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Channel(put(value))); + check_hresult(WINRT_SHIM(ILoggingActivity2)->get_Channel(put_abi(value))); return value; } -template void impl_ILoggingActivity2::StopActivity(hstring_ref stopEventName) const +template void impl_ILoggingActivity2::StopActivity(hstring_view stopEventName) const { - check_hresult(static_cast(static_cast(*this))->abi_StopActivity(get(stopEventName))); + check_hresult(WINRT_SHIM(ILoggingActivity2)->abi_StopActivity(get_abi(stopEventName))); } -template void impl_ILoggingActivity2::StopActivity(hstring_ref stopEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const +template void impl_ILoggingActivity2::StopActivity(hstring_view stopEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields) const { - check_hresult(static_cast(static_cast(*this))->abi_StopActivityWithFields(get(stopEventName), get(fields))); + check_hresult(WINRT_SHIM(ILoggingActivity2)->abi_StopActivityWithFields(get_abi(stopEventName), get_abi(fields))); } -template void impl_ILoggingActivity2::StopActivity(hstring_ref stopEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, const Windows::Foundation::Diagnostics::LoggingOptions & options) const +template void impl_ILoggingActivity2::StopActivity(hstring_view stopEventName, const Windows::Foundation::Diagnostics::LoggingFields & fields, const Windows::Foundation::Diagnostics::LoggingOptions & options) const { - check_hresult(static_cast(static_cast(*this))->abi_StopActivityWithFieldsAndOptions(get(stopEventName), get(fields), get(options))); + check_hresult(WINRT_SHIM(ILoggingActivity2)->abi_StopActivityWithFieldsAndOptions(get_abi(stopEventName), get_abi(fields), get_abi(options))); } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingActivityFactory::CreateLoggingActivity(hstring_ref activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingActivityFactory::CreateLoggingActivity(hstring_view activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const { Windows::Foundation::Diagnostics::LoggingActivity loggingActivity { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLoggingActivity(get(activityName), get(loggingChannel), put(loggingActivity))); + check_hresult(WINRT_SHIM(ILoggingActivityFactory)->abi_CreateLoggingActivity(get_abi(activityName), get_abi(loggingChannel), put_abi(loggingActivity))); return loggingActivity; } -template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingActivityFactory::CreateLoggingActivityWithLevel(hstring_ref activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level) const +template Windows::Foundation::Diagnostics::LoggingActivity impl_ILoggingActivityFactory::CreateLoggingActivityWithLevel(hstring_view activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level) const { Windows::Foundation::Diagnostics::LoggingActivity loggingActivity { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLoggingActivityWithLevel(get(activityName), get(loggingChannel), level, put(loggingActivity))); + check_hresult(WINRT_SHIM(ILoggingActivityFactory)->abi_CreateLoggingActivityWithLevel(get_abi(activityName), get_abi(loggingChannel), level, put_abi(loggingActivity))); return loggingActivity; } template hstring impl_ILoggingSession::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ILoggingSession)->get_Name(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ILoggingSession::SaveToFileAsync(const Windows::Storage::IStorageFolder & folder, hstring_ref fileName) const +template Windows::Foundation::IAsyncOperation impl_ILoggingSession::SaveToFileAsync(const Windows::Storage::IStorageFolder & folder, hstring_view fileName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveToFileAsync(get(folder), get(fileName), put(operation))); + check_hresult(WINRT_SHIM(ILoggingSession)->abi_SaveToFileAsync(get_abi(folder), get_abi(fileName), put_abi(operation))); return operation; } template void impl_ILoggingSession::AddLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const { - check_hresult(static_cast(static_cast(*this))->abi_AddLoggingChannel(get(loggingChannel))); + check_hresult(WINRT_SHIM(ILoggingSession)->abi_AddLoggingChannel(get_abi(loggingChannel))); } template void impl_ILoggingSession::AddLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) const { - check_hresult(static_cast(static_cast(*this))->abi_AddLoggingChannelWithLevel(get(loggingChannel), maxLevel)); + check_hresult(WINRT_SHIM(ILoggingSession)->abi_AddLoggingChannelWithLevel(get_abi(loggingChannel), maxLevel)); } template void impl_ILoggingSession::RemoveLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveLoggingChannel(get(loggingChannel))); + check_hresult(WINRT_SHIM(ILoggingSession)->abi_RemoveLoggingChannel(get_abi(loggingChannel))); } -template Windows::Foundation::Diagnostics::LoggingSession impl_ILoggingSessionFactory::Create(hstring_ref name) const +template Windows::Foundation::Diagnostics::LoggingSession impl_ILoggingSessionFactory::Create(hstring_view name) const { Windows::Foundation::Diagnostics::LoggingSession result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(name), put(result))); + check_hresult(WINRT_SHIM(ILoggingSessionFactory)->abi_Create(get_abi(name), put_abi(result))); return result; } template Windows::Storage::StorageFile impl_ILogFileGeneratedEventArgs::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(ILogFileGeneratedEventArgs)->get_File(put_abi(value))); return value; } template hstring impl_IFileLoggingSession::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IFileLoggingSession)->get_Name(put_abi(value))); return value; } template void impl_IFileLoggingSession::AddLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const { - check_hresult(static_cast(static_cast(*this))->abi_AddLoggingChannel(get(loggingChannel))); + check_hresult(WINRT_SHIM(IFileLoggingSession)->abi_AddLoggingChannel(get_abi(loggingChannel))); } template void impl_IFileLoggingSession::AddLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel maxLevel) const { - check_hresult(static_cast(static_cast(*this))->abi_AddLoggingChannelWithLevel(get(loggingChannel), maxLevel)); + check_hresult(WINRT_SHIM(IFileLoggingSession)->abi_AddLoggingChannelWithLevel(get_abi(loggingChannel), maxLevel)); } template void impl_IFileLoggingSession::RemoveLoggingChannel(const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveLoggingChannel(get(loggingChannel))); + check_hresult(WINRT_SHIM(IFileLoggingSession)->abi_RemoveLoggingChannel(get_abi(loggingChannel))); } template Windows::Foundation::IAsyncOperation impl_IFileLoggingSession::CloseAndSaveToFileAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CloseAndSaveToFileAsync(put(operation))); + check_hresult(WINRT_SHIM(IFileLoggingSession)->abi_CloseAndSaveToFileAsync(put_abi(operation))); return operation; } template event_token impl_IFileLoggingSession::LogFileGenerated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LogFileGenerated(get(handler), &token)); + check_hresult(WINRT_SHIM(IFileLoggingSession)->add_LogFileGenerated(get_abi(handler), &token)); return token; } @@ -3705,17 +3901,17 @@ template event_revoker impl_IFileLoggingSessio template void impl_IFileLoggingSession::LogFileGenerated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LogFileGenerated(token)); + check_hresult(WINRT_SHIM(IFileLoggingSession)->remove_LogFileGenerated(token)); } -template Windows::Foundation::Diagnostics::FileLoggingSession impl_IFileLoggingSessionFactory::Create(hstring_ref name) const +template Windows::Foundation::Diagnostics::FileLoggingSession impl_IFileLoggingSessionFactory::Create(hstring_view name) const { Windows::Foundation::Diagnostics::FileLoggingSession result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(name), put(result))); + check_hresult(WINRT_SHIM(IFileLoggingSessionFactory)->abi_Create(get_abi(name), put_abi(result))); return result; } -inline void AsyncCausalityTracer::TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, hstring_ref operationName, uint64_t relatedContext) +inline void AsyncCausalityTracer::TraceOperationCreation(Windows::Foundation::Diagnostics::CausalityTraceLevel traceLevel, Windows::Foundation::Diagnostics::CausalitySource source, GUID platformId, uint64_t operationId, hstring_view operationName, uint64_t relatedContext) { get_activation_factory().TraceOperationCreation(traceLevel, source, platformId, operationId, operationName, relatedContext); } @@ -3761,27 +3957,27 @@ inline Windows::Foundation::IAsyncOperation().CreateFromHResultAsync(errorCode); } -inline FileLoggingSession::FileLoggingSession(hstring_ref name) : +inline FileLoggingSession::FileLoggingSession(hstring_view name) : FileLoggingSession(get_activation_factory().Create(name)) {} -inline LoggingActivity::LoggingActivity(hstring_ref activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) : +inline LoggingActivity::LoggingActivity(hstring_view activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel) : LoggingActivity(get_activation_factory().CreateLoggingActivity(activityName, loggingChannel)) {} -inline LoggingActivity::LoggingActivity(hstring_ref activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level) : +inline LoggingActivity::LoggingActivity(hstring_view activityName, const Windows::Foundation::Diagnostics::ILoggingChannel & loggingChannel, Windows::Foundation::Diagnostics::LoggingLevel level) : LoggingActivity(get_activation_factory().CreateLoggingActivityWithLevel(activityName, loggingChannel, level)) {} -inline LoggingChannel::LoggingChannel(hstring_ref name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options) : +inline LoggingChannel::LoggingChannel(hstring_view name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options) : LoggingChannel(get_activation_factory().CreateWithOptions(name, options)) {} -inline LoggingChannel::LoggingChannel(hstring_ref name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options, GUID id) : +inline LoggingChannel::LoggingChannel(hstring_view name, const Windows::Foundation::Diagnostics::LoggingChannelOptions & options, GUID id) : LoggingChannel(get_activation_factory().CreateWithOptionsAndId(name, options, id)) {} -inline LoggingChannel::LoggingChannel(hstring_ref name) : +inline LoggingChannel::LoggingChannel(hstring_view name) : LoggingChannel(get_activation_factory().Create(name)) {} @@ -3805,7 +4001,7 @@ inline LoggingOptions::LoggingOptions(int64_t keywords) : LoggingOptions(get_activation_factory().CreateWithKeywords(keywords)) {} -inline LoggingSession::LoggingSession(hstring_ref name) : +inline LoggingSession::LoggingSession(hstring_view name) : LoggingSession(get_activation_factory().Create(name)) {} @@ -3816,3 +4012,311 @@ inline RuntimeBrokerErrorSettings::RuntimeBrokerErrorSettings() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IAsyncCausalityTracerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IErrorDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IErrorDetailsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IErrorReportingSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IFileLoggingSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::IFileLoggingSessionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILogFileGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingActivity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingActivity2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingActivityFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannel2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannelFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannelFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannelOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingChannelOptionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingFields & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingOptionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingSessionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ILoggingTarget & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ITracingStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::ErrorDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::FileLoggingSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LogFileGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingActivity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingChannelOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingFields & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::LoggingSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::RuntimeBrokerErrorSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Diagnostics::TracingStatusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Foundation.Metadata.h b/10.0.14393.0/winrt/Windows.Foundation.Metadata.h index 8f9c2ce17..ba199a25a 100644 --- a/10.0.14393.0/winrt/Windows.Foundation.Metadata.h +++ b/10.0.14393.0/winrt/Windows.Foundation.Metadata.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Metadata.3.h" #include "Windows.Foundation.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_IsTypePresent(abi_arg_in typeName, bool * value) noexcept override + HRESULT __stdcall abi_IsTypePresent(impl::abi_arg_in typeName, bool * value) noexcept override { try { - *value = detach(this->shim().IsTypePresent(*reinterpret_cast(&typeName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTypePresent(*reinterpret_cast(&typeName))); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsMethodPresent(abi_arg_in typeName, abi_arg_in methodName, bool * value) noexcept override + HRESULT __stdcall abi_IsMethodPresent(impl::abi_arg_in typeName, impl::abi_arg_in methodName, bool * value) noexcept override { try { - *value = detach(this->shim().IsMethodPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&methodName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMethodPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&methodName))); return S_OK; } catch (...) @@ -39,11 +44,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsMethodPresentWithArity(abi_arg_in typeName, abi_arg_in methodName, uint32_t inputParameterCount, bool * value) noexcept override + HRESULT __stdcall abi_IsMethodPresentWithArity(impl::abi_arg_in typeName, impl::abi_arg_in methodName, uint32_t inputParameterCount, bool * value) noexcept override { try { - *value = detach(this->shim().IsMethodPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&methodName), inputParameterCount)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMethodPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&methodName), inputParameterCount)); return S_OK; } catch (...) @@ -52,11 +58,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsEventPresent(abi_arg_in typeName, abi_arg_in eventName, bool * value) noexcept override + HRESULT __stdcall abi_IsEventPresent(impl::abi_arg_in typeName, impl::abi_arg_in eventName, bool * value) noexcept override { try { - *value = detach(this->shim().IsEventPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&eventName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEventPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&eventName))); return S_OK; } catch (...) @@ -65,11 +72,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsPropertyPresent(abi_arg_in typeName, abi_arg_in propertyName, bool * value) noexcept override + HRESULT __stdcall abi_IsPropertyPresent(impl::abi_arg_in typeName, impl::abi_arg_in propertyName, bool * value) noexcept override { try { - *value = detach(this->shim().IsPropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); return S_OK; } catch (...) @@ -78,11 +86,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsReadOnlyPropertyPresent(abi_arg_in typeName, abi_arg_in propertyName, bool * value) noexcept override + HRESULT __stdcall abi_IsReadOnlyPropertyPresent(impl::abi_arg_in typeName, impl::abi_arg_in propertyName, bool * value) noexcept override { try { - *value = detach(this->shim().IsReadOnlyPropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnlyPropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); return S_OK; } catch (...) @@ -91,11 +100,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsWriteablePropertyPresent(abi_arg_in typeName, abi_arg_in propertyName, bool * value) noexcept override + HRESULT __stdcall abi_IsWriteablePropertyPresent(impl::abi_arg_in typeName, impl::abi_arg_in propertyName, bool * value) noexcept override { try { - *value = detach(this->shim().IsWriteablePropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWriteablePropertyPresent(*reinterpret_cast(&typeName), *reinterpret_cast(&propertyName))); return S_OK; } catch (...) @@ -104,11 +114,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsEnumNamedValuePresent(abi_arg_in enumTypeName, abi_arg_in valueName, bool * value) noexcept override + HRESULT __stdcall abi_IsEnumNamedValuePresent(impl::abi_arg_in enumTypeName, impl::abi_arg_in valueName, bool * value) noexcept override { try { - *value = detach(this->shim().IsEnumNamedValuePresent(*reinterpret_cast(&enumTypeName), *reinterpret_cast(&valueName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnumNamedValuePresent(*reinterpret_cast(&enumTypeName), *reinterpret_cast(&valueName))); return S_OK; } catch (...) @@ -117,11 +128,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsApiContractPresentByMajor(abi_arg_in contractName, uint16_t majorVersion, bool * value) noexcept override + HRESULT __stdcall abi_IsApiContractPresentByMajor(impl::abi_arg_in contractName, uint16_t majorVersion, bool * value) noexcept override { try { - *value = detach(this->shim().IsApiContractPresent(*reinterpret_cast(&contractName), majorVersion)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsApiContractPresent(*reinterpret_cast(&contractName), majorVersion)); return S_OK; } catch (...) @@ -130,11 +142,12 @@ struct produce : produ } } - HRESULT __stdcall abi_IsApiContractPresentByMajorAndMinor(abi_arg_in contractName, uint16_t majorVersion, uint16_t minorVersion, bool * value) noexcept override + HRESULT __stdcall abi_IsApiContractPresentByMajorAndMinor(impl::abi_arg_in contractName, uint16_t majorVersion, uint16_t minorVersion, bool * value) noexcept override { try { - *value = detach(this->shim().IsApiContractPresent(*reinterpret_cast(&contractName), majorVersion, minorVersion)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsApiContractPresent(*reinterpret_cast(&contractName), majorVersion, minorVersion)); return S_OK; } catch (...) @@ -148,122 +161,122 @@ struct produce : produ namespace Windows::Foundation::Metadata { -template bool impl_IApiInformationStatics::IsTypePresent(hstring_ref typeName) const +template bool impl_IApiInformationStatics::IsTypePresent(hstring_view typeName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsTypePresent(get(typeName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsTypePresent(get_abi(typeName), &value)); return value; } -template bool impl_IApiInformationStatics::IsMethodPresent(hstring_ref typeName, hstring_ref methodName) const +template bool impl_IApiInformationStatics::IsMethodPresent(hstring_view typeName, hstring_view methodName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsMethodPresent(get(typeName), get(methodName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsMethodPresent(get_abi(typeName), get_abi(methodName), &value)); return value; } -template bool impl_IApiInformationStatics::IsMethodPresent(hstring_ref typeName, hstring_ref methodName, uint32_t inputParameterCount) const +template bool impl_IApiInformationStatics::IsMethodPresent(hstring_view typeName, hstring_view methodName, uint32_t inputParameterCount) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsMethodPresentWithArity(get(typeName), get(methodName), inputParameterCount, &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsMethodPresentWithArity(get_abi(typeName), get_abi(methodName), inputParameterCount, &value)); return value; } -template bool impl_IApiInformationStatics::IsEventPresent(hstring_ref typeName, hstring_ref eventName) const +template bool impl_IApiInformationStatics::IsEventPresent(hstring_view typeName, hstring_view eventName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEventPresent(get(typeName), get(eventName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsEventPresent(get_abi(typeName), get_abi(eventName), &value)); return value; } -template bool impl_IApiInformationStatics::IsPropertyPresent(hstring_ref typeName, hstring_ref propertyName) const +template bool impl_IApiInformationStatics::IsPropertyPresent(hstring_view typeName, hstring_view propertyName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPropertyPresent(get(typeName), get(propertyName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsPropertyPresent(get_abi(typeName), get_abi(propertyName), &value)); return value; } -template bool impl_IApiInformationStatics::IsReadOnlyPropertyPresent(hstring_ref typeName, hstring_ref propertyName) const +template bool impl_IApiInformationStatics::IsReadOnlyPropertyPresent(hstring_view typeName, hstring_view propertyName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsReadOnlyPropertyPresent(get(typeName), get(propertyName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsReadOnlyPropertyPresent(get_abi(typeName), get_abi(propertyName), &value)); return value; } -template bool impl_IApiInformationStatics::IsWriteablePropertyPresent(hstring_ref typeName, hstring_ref propertyName) const +template bool impl_IApiInformationStatics::IsWriteablePropertyPresent(hstring_view typeName, hstring_view propertyName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsWriteablePropertyPresent(get(typeName), get(propertyName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsWriteablePropertyPresent(get_abi(typeName), get_abi(propertyName), &value)); return value; } -template bool impl_IApiInformationStatics::IsEnumNamedValuePresent(hstring_ref enumTypeName, hstring_ref valueName) const +template bool impl_IApiInformationStatics::IsEnumNamedValuePresent(hstring_view enumTypeName, hstring_view valueName) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnumNamedValuePresent(get(enumTypeName), get(valueName), &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsEnumNamedValuePresent(get_abi(enumTypeName), get_abi(valueName), &value)); return value; } -template bool impl_IApiInformationStatics::IsApiContractPresent(hstring_ref contractName, uint16_t majorVersion) const +template bool impl_IApiInformationStatics::IsApiContractPresent(hstring_view contractName, uint16_t majorVersion) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsApiContractPresentByMajor(get(contractName), majorVersion, &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsApiContractPresentByMajor(get_abi(contractName), majorVersion, &value)); return value; } -template bool impl_IApiInformationStatics::IsApiContractPresent(hstring_ref contractName, uint16_t majorVersion, uint16_t minorVersion) const +template bool impl_IApiInformationStatics::IsApiContractPresent(hstring_view contractName, uint16_t majorVersion, uint16_t minorVersion) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsApiContractPresentByMajorAndMinor(get(contractName), majorVersion, minorVersion, &value)); + check_hresult(WINRT_SHIM(IApiInformationStatics)->abi_IsApiContractPresentByMajorAndMinor(get_abi(contractName), majorVersion, minorVersion, &value)); return value; } -inline bool ApiInformation::IsTypePresent(hstring_ref typeName) +inline bool ApiInformation::IsTypePresent(hstring_view typeName) { return get_activation_factory().IsTypePresent(typeName); } -inline bool ApiInformation::IsMethodPresent(hstring_ref typeName, hstring_ref methodName) +inline bool ApiInformation::IsMethodPresent(hstring_view typeName, hstring_view methodName) { return get_activation_factory().IsMethodPresent(typeName, methodName); } -inline bool ApiInformation::IsMethodPresent(hstring_ref typeName, hstring_ref methodName, uint32_t inputParameterCount) +inline bool ApiInformation::IsMethodPresent(hstring_view typeName, hstring_view methodName, uint32_t inputParameterCount) { return get_activation_factory().IsMethodPresent(typeName, methodName, inputParameterCount); } -inline bool ApiInformation::IsEventPresent(hstring_ref typeName, hstring_ref eventName) +inline bool ApiInformation::IsEventPresent(hstring_view typeName, hstring_view eventName) { return get_activation_factory().IsEventPresent(typeName, eventName); } -inline bool ApiInformation::IsPropertyPresent(hstring_ref typeName, hstring_ref propertyName) +inline bool ApiInformation::IsPropertyPresent(hstring_view typeName, hstring_view propertyName) { return get_activation_factory().IsPropertyPresent(typeName, propertyName); } -inline bool ApiInformation::IsReadOnlyPropertyPresent(hstring_ref typeName, hstring_ref propertyName) +inline bool ApiInformation::IsReadOnlyPropertyPresent(hstring_view typeName, hstring_view propertyName) { return get_activation_factory().IsReadOnlyPropertyPresent(typeName, propertyName); } -inline bool ApiInformation::IsWriteablePropertyPresent(hstring_ref typeName, hstring_ref propertyName) +inline bool ApiInformation::IsWriteablePropertyPresent(hstring_view typeName, hstring_view propertyName) { return get_activation_factory().IsWriteablePropertyPresent(typeName, propertyName); } -inline bool ApiInformation::IsEnumNamedValuePresent(hstring_ref enumTypeName, hstring_ref valueName) +inline bool ApiInformation::IsEnumNamedValuePresent(hstring_view enumTypeName, hstring_view valueName) { return get_activation_factory().IsEnumNamedValuePresent(enumTypeName, valueName); } -inline bool ApiInformation::IsApiContractPresent(hstring_ref contractName, uint16_t majorVersion) +inline bool ApiInformation::IsApiContractPresent(hstring_view contractName, uint16_t majorVersion) { return get_activation_factory().IsApiContractPresent(contractName, majorVersion); } -inline bool ApiInformation::IsApiContractPresent(hstring_ref contractName, uint16_t majorVersion, uint16_t minorVersion) +inline bool ApiInformation::IsApiContractPresent(hstring_view contractName, uint16_t majorVersion, uint16_t minorVersion) { return get_activation_factory().IsApiContractPresent(contractName, majorVersion, minorVersion); } @@ -271,3 +284,14 @@ inline bool ApiInformation::IsApiContractPresent(hstring_ref contractName, uint1 } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Foundation::Metadata::IApiInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Foundation.h b/10.0.14393.0/winrt/Windows.Foundation.h index c6938f14d..75f25a5ab 100644 --- a/10.0.14393.0/winrt/Windows.Foundation.h +++ b/10.0.14393.0/winrt/Windows.Foundation.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "Windows.Foundation.Collections.h" @@ -24,7 +27,7 @@ template DeferralCompletedHandler::DeferralCompletedHan inline void DeferralCompletedHandler::operator()() const { - check_hresult((*this)->abi_Invoke()); + check_hresult((*(abi **)this)->abi_Invoke()); } } @@ -38,6 +41,7 @@ struct produce : produce_baseshim()); this->shim().Close(); return S_OK; } @@ -55,6 +59,7 @@ struct produce : produce_baseshim()); this->shim().Complete(); return S_OK; } @@ -68,11 +73,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in handler, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in handler, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -86,11 +92,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetActivationFactory(abi_arg_in activatableClassId, abi_arg_out factory) noexcept override + HRESULT __stdcall abi_GetActivationFactory(impl::abi_arg_in activatableClassId, impl::abi_arg_out factory) noexcept override { try { - *factory = detach(this->shim().GetActivationFactory(*reinterpret_cast(&activatableClassId))); + typename D::abi_guard guard(this->shim()); + *factory = detach_abi(this->shim().GetActivationFactory(*reinterpret_cast(&activatableClassId))); return S_OK; } catch (...) @@ -104,11 +111,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateReference(abi_arg_out reference) noexcept override + HRESULT __stdcall abi_CreateReference(impl::abi_arg_out reference) noexcept override { try { - *reference = detach(this->shim().CreateReference()); + typename D::abi_guard guard(this->shim()); + *reference = detach_abi(this->shim().CreateReference()); return S_OK; } catch (...) @@ -122,11 +130,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t capacity, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint32_t capacity, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(capacity)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(capacity)); return S_OK; } catch (...) @@ -144,7 +153,8 @@ struct produce : produce_baseshim().Capacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capacity()); return S_OK; } catch (...) @@ -153,11 +163,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Closed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Closed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -170,6 +181,7 @@ struct produce : produce_baseshim()); this->shim().Closed(cookie); return S_OK; } @@ -181,182 +193,14 @@ struct produce : produce_base -struct produce : produce_base +struct produce : produce_base { - HRESULT __stdcall get_Type(Windows::Foundation::PropertyType * value) noexcept override - { - try - { - *value = detach(this->shim().Type()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_IsNumericScalar(bool * value) noexcept override - { - try - { - *value = detach(this->shim().IsNumericScalar()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetUInt8(uint8_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetUInt8()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetInt16(int16_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetInt16()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetUInt16(uint16_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetUInt16()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetInt32(int32_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetInt32()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetUInt32(uint32_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetUInt32()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetInt64(int64_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetInt64()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetUInt64(uint64_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetUInt64()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetSingle(float * value) noexcept override - { - try - { - *value = detach(this->shim().GetSingle()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetDouble(double * value) noexcept override - { - try - { - *value = detach(this->shim().GetDouble()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetChar16(wchar_t * value) noexcept override - { - try - { - *value = detach(this->shim().GetChar16()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetBoolean(bool * value) noexcept override - { - try - { - *value = detach(this->shim().GetBoolean()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_GetString(abi_arg_out value) noexcept override + HRESULT __stdcall abi_ToString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToString()); return S_OK; } catch (...) @@ -365,365 +209,394 @@ struct produce : produce_base +struct produce : produce_base +{ + HRESULT __stdcall abi_UnescapeComponent(impl::abi_arg_in toUnescape, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetGuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnescapeComponent(*reinterpret_cast(&toUnescape))); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetDateTime(abi_arg_out value) noexcept override + HRESULT __stdcall abi_EscapeComponent(impl::abi_arg_in toEscape, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EscapeComponent(*reinterpret_cast(&toEscape))); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_GetTimeSpan(abi_arg_out value) noexcept override +template +struct produce : produce_base +{ + HRESULT __stdcall get_AbsoluteUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetTimeSpan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteUri()); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayUri()); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_Domain(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Domain()); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_Extension(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Extension()); return S_OK; } catch (...) { + *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetUInt8Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Fragment(impl::abi_arg_out value) noexcept override { try { - this->shim().GetUInt8Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fragment()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetInt16Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Host(impl::abi_arg_out value) noexcept override { try { - this->shim().GetInt16Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Host()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetUInt16Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Password(impl::abi_arg_out value) noexcept override { try { - this->shim().GetUInt16Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Password()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetInt32Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - this->shim().GetInt32Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetUInt32Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Query(impl::abi_arg_out value) noexcept override { try { - this->shim().GetUInt32Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Query()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetInt64Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_QueryParsed(impl::abi_arg_out ppWwwFormUrlDecoder) noexcept override { try { - this->shim().GetInt64Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *ppWwwFormUrlDecoder = detach_abi(this->shim().QueryParsed()); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; + *ppWwwFormUrlDecoder = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetUInt64Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_RawUri(impl::abi_arg_out value) noexcept override { try { - this->shim().GetUInt64Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawUri()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetSingleArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_SchemeName(impl::abi_arg_out value) noexcept override { try { - this->shim().GetSingleArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SchemeName()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetDoubleArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out value) noexcept override { try { - this->shim().GetDoubleArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserName()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetChar16Array(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Port(int32_t * value) noexcept override { try { - this->shim().GetChar16Array(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Port()); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetBooleanArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Suspicious(bool * value) noexcept override { try { - this->shim().GetBooleanArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Suspicious()); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetStringArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_Equals(impl::abi_arg_in pUri, bool * value) noexcept override { try { - this->shim().GetStringArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Equals(*reinterpret_cast(&pUri))); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetInspectableArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_CombineUri(impl::abi_arg_in relativeUri, impl::abi_arg_out instance) noexcept override { try { - this->shim().GetInspectableArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CombineUri(*reinterpret_cast(&relativeUri))); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; + *instance = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_GetGuidArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override +template +struct produce : produce_base +{ + HRESULT __stdcall abi_CreateUri(impl::abi_arg_in uri, impl::abi_arg_out instance) noexcept override { try { - this->shim().GetGuidArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateUri(*reinterpret_cast(&uri))); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; + *instance = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetDateTimeArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_CreateWithRelativeUri(impl::abi_arg_in baseUri, impl::abi_arg_in relativeUri, impl::abi_arg_out instance) noexcept override { try { - this->shim().GetDateTimeArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWithRelativeUri(*reinterpret_cast(&baseUri), *reinterpret_cast(&relativeUri))); return S_OK; } catch (...) { - *__valueSize = 0; - *value = nullptr; + *instance = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_GetTimeSpanArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override +template +struct produce : produce_base +{ + HRESULT __stdcall get_AbsoluteCanonicalUri(impl::abi_arg_out value) noexcept override { try { - this->shim().GetTimeSpanArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteCanonicalUri()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetPointArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_DisplayIri(impl::abi_arg_out value) noexcept override { try { - this->shim().GetPointArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayIri()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_GetSizeArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override +template +struct produce : produce_base +{ + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - this->shim().GetSizeArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } } - HRESULT __stdcall abi_GetRectArray(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - this->shim().GetRectArray(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) { - *__valueSize = 0; *value = nullptr; return impl::to_hresult(); } @@ -731,1745 +604,302 @@ struct produce : produce_base -struct produce : produce_base +struct produce : produce_base { - HRESULT __stdcall abi_CreateEmpty(abi_arg_out propertyValue) noexcept override + HRESULT __stdcall abi_GetFirstValueByName(impl::abi_arg_in name, impl::abi_arg_out phstrValue) noexcept override { try { - *propertyValue = detach(this->shim().CreateEmpty()); + typename D::abi_guard guard(this->shim()); + *phstrValue = detach_abi(this->shim().GetFirstValueByName(*reinterpret_cast(&name))); return S_OK; } catch (...) { - *propertyValue = nullptr; + *phstrValue = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_CreateUInt8(uint8_t value, abi_arg_out propertyValue) noexcept override +template +struct produce : produce_base +{ + HRESULT __stdcall abi_CreateWwwFormUrlDecoder(impl::abi_arg_in query, impl::abi_arg_out instance) noexcept override { try { - *propertyValue = detach(this->shim().CreateUInt8(value)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWwwFormUrlDecoder(*reinterpret_cast(&query))); return S_OK; } catch (...) { - *propertyValue = nullptr; + *instance = nullptr; return impl::to_hresult(); } } +}; - HRESULT __stdcall abi_CreateInt16(int16_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt16(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } +} - HRESULT __stdcall abi_CreateUInt16(uint16_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt16(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } +namespace Windows::Foundation { - HRESULT __stdcall abi_CreateInt32(int32_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt32(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } +template void impl_IClosable::Close() const +{ + check_hresult(WINRT_SHIM(IClosable)->abi_Close()); +} - HRESULT __stdcall abi_CreateUInt32(uint32_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt32(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } +template hstring impl_IStringable::ToString() const +{ + hstring value; + check_hresult(WINRT_SHIM(IStringable)->abi_ToString(put_abi(value))); + return value; +} - HRESULT __stdcall abi_CreateInt64(int64_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt64(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateUInt64(uint64_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt64(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateSingle(float value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateSingle(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateDouble(double value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateDouble(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateChar16(wchar_t value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateChar16(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateBoolean(bool value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateBoolean(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateString(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateString(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateInspectable(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInspectable(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateGuid(GUID value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateGuid(value)); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateDateTime(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateDateTime(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateTimeSpan(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateTimeSpan(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreatePoint(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreatePoint(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateSize(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateSize(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateRect(abi_arg_in value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateRect(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateUInt8Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt8Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateInt16Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt16Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateUInt16Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt16Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateInt32Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt32Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateUInt32Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt32Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateInt64Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInt64Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateUInt64Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateUInt64Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateSingleArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateSingleArray(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateDoubleArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateDoubleArray(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateChar16Array(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateChar16Array(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateBooleanArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateBooleanArray(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateStringArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateStringArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *value = nullptr; - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateInspectableArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateInspectableArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *value = nullptr; - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateGuidArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateGuidArray(array_ref(value, value + __valueSize))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateDateTimeArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateDateTimeArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateTimeSpanArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateTimeSpanArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreatePointArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreatePointArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateSizeArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateSizeArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateRectArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out propertyValue) noexcept override - { - try - { - *propertyValue = detach(this->shim().CreateRectArray(*reinterpret_cast(&value))); - return S_OK; - } - catch (...) - { - *propertyValue = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall abi_ToString(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().ToString()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall abi_UnescapeComponent(abi_arg_in toUnescape, abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().UnescapeComponent(*reinterpret_cast(&toUnescape))); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_EscapeComponent(abi_arg_in toEscape, abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().EscapeComponent(*reinterpret_cast(&toEscape))); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall get_AbsoluteUri(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().AbsoluteUri()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_DisplayUri(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().DisplayUri()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Domain(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Domain()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Extension(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Extension()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Fragment(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Fragment()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Host(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Host()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Password(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Password()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Path(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Path()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Query(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Query()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_QueryParsed(abi_arg_out ppWwwFormUrlDecoder) noexcept override - { - try - { - *ppWwwFormUrlDecoder = detach(this->shim().QueryParsed()); - return S_OK; - } - catch (...) - { - *ppWwwFormUrlDecoder = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_RawUri(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().RawUri()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_SchemeName(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().SchemeName()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_UserName(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().UserName()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Port(int32_t * value) noexcept override - { - try - { - *value = detach(this->shim().Port()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Suspicious(bool * value) noexcept override - { - try - { - *value = detach(this->shim().Suspicious()); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_Equals(abi_arg_in pUri, bool * value) noexcept override - { - try - { - *value = detach(this->shim().Equals(*reinterpret_cast(&pUri))); - return S_OK; - } - catch (...) - { - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CombineUri(abi_arg_in relativeUri, abi_arg_out instance) noexcept override - { - try - { - *instance = detach(this->shim().CombineUri(*reinterpret_cast(&relativeUri))); - return S_OK; - } - catch (...) - { - *instance = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall abi_CreateUri(abi_arg_in uri, abi_arg_out instance) noexcept override - { - try - { - *instance = detach(this->shim().CreateUri(*reinterpret_cast(&uri))); - return S_OK; - } - catch (...) - { - *instance = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall abi_CreateWithRelativeUri(abi_arg_in baseUri, abi_arg_in relativeUri, abi_arg_out instance) noexcept override - { - try - { - *instance = detach(this->shim().CreateWithRelativeUri(*reinterpret_cast(&baseUri), *reinterpret_cast(&relativeUri))); - return S_OK; - } - catch (...) - { - *instance = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall get_AbsoluteCanonicalUri(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().AbsoluteCanonicalUri()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_DisplayIri(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().DisplayIri()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Name()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } - - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override - { - try - { - *value = detach(this->shim().Value()); - return S_OK; - } - catch (...) - { - *value = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall abi_GetFirstValueByName(abi_arg_in name, abi_arg_out phstrValue) noexcept override - { - try - { - *phstrValue = detach(this->shim().GetFirstValueByName(*reinterpret_cast(&name))); - return S_OK; - } - catch (...) - { - *phstrValue = nullptr; - return impl::to_hresult(); - } - } -}; - -template -struct produce : produce_base -{ - HRESULT __stdcall abi_CreateWwwFormUrlDecoder(abi_arg_in query, abi_arg_out instance) noexcept override - { - try - { - *instance = detach(this->shim().CreateWwwFormUrlDecoder(*reinterpret_cast(&query))); - return S_OK; - } - catch (...) - { - *instance = nullptr; - return impl::to_hresult(); - } - } -}; - -} - -namespace Windows::Foundation { - -template void impl_IClosable::Close() const -{ - check_hresult(static_cast(static_cast(*this))->abi_Close()); -} - -template Windows::Foundation::PropertyType impl_IPropertyValue::Type() const -{ - Windows::Foundation::PropertyType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); - return value; -} - -template bool impl_IPropertyValue::IsNumericScalar() const -{ - bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNumericScalar(&value)); - return value; -} - -template uint8_t impl_IPropertyValue::GetUInt8() const -{ - uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUInt8(&value)); - return value; -} - -template int16_t impl_IPropertyValue::GetInt16() const -{ - int16_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetInt16(&value)); - return value; -} - -template uint16_t impl_IPropertyValue::GetUInt16() const -{ - uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUInt16(&value)); - return value; -} - -template int32_t impl_IPropertyValue::GetInt32() const -{ - int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetInt32(&value)); - return value; -} - -template uint32_t impl_IPropertyValue::GetUInt32() const -{ - uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUInt32(&value)); - return value; -} - -template int64_t impl_IPropertyValue::GetInt64() const -{ - int64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetInt64(&value)); - return value; -} - -template uint64_t impl_IPropertyValue::GetUInt64() const -{ - uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUInt64(&value)); - return value; -} - -template float impl_IPropertyValue::GetSingle() const -{ - float value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSingle(&value)); - return value; -} - -template double impl_IPropertyValue::GetDouble() const -{ - double value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDouble(&value)); - return value; -} - -template wchar_t impl_IPropertyValue::GetChar16() const -{ - wchar_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetChar16(&value)); - return value; -} - -template bool impl_IPropertyValue::GetBoolean() const -{ - bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetBoolean(&value)); - return value; -} - -template hstring impl_IPropertyValue::GetString() const -{ - hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetString(put(value))); - return value; -} - -template GUID impl_IPropertyValue::GetGuid() const -{ - GUID value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetGuid(&value)); - return value; -} - -template Windows::Foundation::DateTime impl_IPropertyValue::GetDateTime() const -{ - Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDateTime(put(value))); - return value; -} - -template Windows::Foundation::TimeSpan impl_IPropertyValue::GetTimeSpan() const -{ - Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetTimeSpan(put(value))); - return value; -} - -template Windows::Foundation::Point impl_IPropertyValue::GetPoint() const -{ - Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPoint(put(value))); - return value; -} - -template Windows::Foundation::Size impl_IPropertyValue::GetSize() const -{ - Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSize(put(value))); - return value; -} - -template Windows::Foundation::Rect impl_IPropertyValue::GetRect() const -{ - Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRect(put(value))); - return value; -} - -template void impl_IPropertyValue::GetUInt8Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetUInt8Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetInt16Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetInt16Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetUInt16Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetUInt16Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetInt32Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetInt32Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetUInt32Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetUInt32Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetInt64Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetInt64Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetUInt64Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetUInt64Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetSingleArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetSingleArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetDoubleArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetDoubleArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetChar16Array(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetChar16Array(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetBooleanArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetBooleanArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetStringArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetStringArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetInspectableArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetInspectableArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetGuidArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetGuidArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetDateTimeArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetDateTimeArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetTimeSpanArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetTimeSpanArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetPointArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetPointArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetSizeArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetSizeArray(put_size(value), put(value))); -} - -template void impl_IPropertyValue::GetRectArray(com_array & value) const -{ - check_hresult(static_cast(static_cast(*this))->abi_GetRectArray(put_size(value), put(value))); -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateEmpty() const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateEmpty(put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt8(uint8_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt8(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt16(int16_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt16(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt16(uint16_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt16(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt32(int32_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt32(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt32(uint32_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt32(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt64(int64_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt64(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt64(uint64_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt64(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateSingle(float value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateSingle(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateDouble(double value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateDouble(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateChar16(wchar_t value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateChar16(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateBoolean(bool value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateBoolean(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateString(hstring_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateString(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInspectable(const Windows::IInspectable & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInspectable(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateGuid(GUID value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateGuid(value, put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateDateTime(const Windows::Foundation::DateTime & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTime(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateTimeSpan(const Windows::Foundation::TimeSpan & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateTimeSpan(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreatePoint(const Windows::Foundation::Point & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreatePoint(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateSize(const Windows::Foundation::Size & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateSize(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateRect(const Windows::Foundation::Rect & value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateRect(get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt8Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt8Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt16Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt16Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt16Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt16Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt32Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt32Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt32Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt32Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInt64Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInt64Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateUInt64Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateUInt64Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateSingleArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateSingleArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateDoubleArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateDoubleArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateChar16Array(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateChar16Array(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateBooleanArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateBooleanArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateStringArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateStringArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateInspectableArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateInspectableArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateGuidArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateGuidArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateDateTimeArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateTimeSpanArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateTimeSpanArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreatePointArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreatePointArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateSizeArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateSizeArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template Windows::IInspectable impl_IPropertyValueStatics::CreateRectArray(array_ref value) const -{ - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateRectArray(value.size(), get(value), put(propertyValue))); - return propertyValue; -} - -template hstring impl_IStringable::ToString() const -{ - hstring value; - check_hresult(static_cast(static_cast(*this))->abi_ToString(put(value))); - return value; -} - -template void impl_IDeferral::Complete() const -{ - check_hresult(static_cast(static_cast(*this))->abi_Complete()); -} +template void impl_IDeferral::Complete() const +{ + check_hresult(WINRT_SHIM(IDeferral)->abi_Complete()); +} template Windows::Foundation::Deferral impl_IDeferralFactory::Create(const Windows::Foundation::DeferralCompletedHandler & handler) const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(handler), put(result))); + check_hresult(WINRT_SHIM(IDeferralFactory)->abi_Create(get_abi(handler), put_abi(result))); return result; } template hstring impl_IUriRuntimeClass::AbsoluteUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteUri(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_AbsoluteUri(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::DisplayUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayUri(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_DisplayUri(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Domain() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Domain(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Domain(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Extension() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Extension(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Extension(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Fragment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Fragment(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Fragment(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Host() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Host(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Host(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Password() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Password(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Password(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Path() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Path(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::Query() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Query(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Query(put_abi(value))); return value; } template Windows::Foundation::WwwFormUrlDecoder impl_IUriRuntimeClass::QueryParsed() const { Windows::Foundation::WwwFormUrlDecoder ppWwwFormUrlDecoder { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_QueryParsed(put(ppWwwFormUrlDecoder))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_QueryParsed(put_abi(ppWwwFormUrlDecoder))); return ppWwwFormUrlDecoder; } template hstring impl_IUriRuntimeClass::RawUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RawUri(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_RawUri(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::SchemeName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SchemeName(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_SchemeName(put_abi(value))); return value; } template hstring impl_IUriRuntimeClass::UserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_UserName(put_abi(value))); return value; } template int32_t impl_IUriRuntimeClass::Port() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Port(&value)); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Port(&value)); return value; } template bool impl_IUriRuntimeClass::Suspicious() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Suspicious(&value)); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->get_Suspicious(&value)); return value; } template bool impl_IUriRuntimeClass::Equals(const Windows::Foundation::Uri & pUri) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_Equals(get(pUri), &value)); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->abi_Equals(get_abi(pUri), &value)); return value; } -template Windows::Foundation::Uri impl_IUriRuntimeClass::CombineUri(hstring_ref relativeUri) const +template Windows::Foundation::Uri impl_IUriRuntimeClass::CombineUri(hstring_view relativeUri) const { Windows::Foundation::Uri instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CombineUri(get(relativeUri), put(instance))); + check_hresult(WINRT_SHIM(IUriRuntimeClass)->abi_CombineUri(get_abi(relativeUri), put_abi(instance))); return instance; } template hstring impl_IUriRuntimeClassWithAbsoluteCanonicalUri::AbsoluteCanonicalUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteCanonicalUri(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClassWithAbsoluteCanonicalUri)->get_AbsoluteCanonicalUri(put_abi(value))); return value; } template hstring impl_IUriRuntimeClassWithAbsoluteCanonicalUri::DisplayIri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayIri(put(value))); + check_hresult(WINRT_SHIM(IUriRuntimeClassWithAbsoluteCanonicalUri)->get_DisplayIri(put_abi(value))); return value; } -template hstring impl_IUriEscapeStatics::UnescapeComponent(hstring_ref toUnescape) const +template hstring impl_IUriEscapeStatics::UnescapeComponent(hstring_view toUnescape) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_UnescapeComponent(get(toUnescape), put(value))); + check_hresult(WINRT_SHIM(IUriEscapeStatics)->abi_UnescapeComponent(get_abi(toUnescape), put_abi(value))); return value; } -template hstring impl_IUriEscapeStatics::EscapeComponent(hstring_ref toEscape) const +template hstring impl_IUriEscapeStatics::EscapeComponent(hstring_view toEscape) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_EscapeComponent(get(toEscape), put(value))); + check_hresult(WINRT_SHIM(IUriEscapeStatics)->abi_EscapeComponent(get_abi(toEscape), put_abi(value))); return value; } -template Windows::Foundation::Uri impl_IUriRuntimeClassFactory::CreateUri(hstring_ref uri) const +template Windows::Foundation::Uri impl_IUriRuntimeClassFactory::CreateUri(hstring_view uri) const { Windows::Foundation::Uri instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateUri(get(uri), put(instance))); + check_hresult(WINRT_SHIM(IUriRuntimeClassFactory)->abi_CreateUri(get_abi(uri), put_abi(instance))); return instance; } -template Windows::Foundation::Uri impl_IUriRuntimeClassFactory::CreateWithRelativeUri(hstring_ref baseUri, hstring_ref relativeUri) const +template Windows::Foundation::Uri impl_IUriRuntimeClassFactory::CreateWithRelativeUri(hstring_view baseUri, hstring_view relativeUri) const { Windows::Foundation::Uri instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithRelativeUri(get(baseUri), get(relativeUri), put(instance))); + check_hresult(WINRT_SHIM(IUriRuntimeClassFactory)->abi_CreateWithRelativeUri(get_abi(baseUri), get_abi(relativeUri), put_abi(instance))); return instance; } template hstring impl_IWwwFormUrlDecoderEntry::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IWwwFormUrlDecoderEntry)->get_Name(put_abi(value))); return value; } template hstring impl_IWwwFormUrlDecoderEntry::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IWwwFormUrlDecoderEntry)->get_Value(put_abi(value))); return value; } -template hstring impl_IWwwFormUrlDecoderRuntimeClass::GetFirstValueByName(hstring_ref name) const +template hstring impl_IWwwFormUrlDecoderRuntimeClass::GetFirstValueByName(hstring_view name) const { hstring phstrValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFirstValueByName(get(name), put(phstrValue))); + check_hresult(WINRT_SHIM(IWwwFormUrlDecoderRuntimeClass)->abi_GetFirstValueByName(get_abi(name), put_abi(phstrValue))); return phstrValue; } -template Windows::Foundation::WwwFormUrlDecoder impl_IWwwFormUrlDecoderRuntimeClassFactory::CreateWwwFormUrlDecoder(hstring_ref query) const +template Windows::Foundation::WwwFormUrlDecoder impl_IWwwFormUrlDecoderRuntimeClassFactory::CreateWwwFormUrlDecoder(hstring_view query) const { Windows::Foundation::WwwFormUrlDecoder instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWwwFormUrlDecoder(get(query), put(instance))); + check_hresult(WINRT_SHIM(IWwwFormUrlDecoderRuntimeClassFactory)->abi_CreateWwwFormUrlDecoder(get_abi(query), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IGetActivationFactory::GetActivationFactory(hstring_ref activatableClassId) const +template Windows::Foundation::IInspectable impl_IGetActivationFactory::GetActivationFactory(hstring_view activatableClassId) const { - Windows::IInspectable factory; - check_hresult(static_cast(static_cast(*this))->abi_GetActivationFactory(get(activatableClassId), put(factory))); + Windows::Foundation::IInspectable factory; + check_hresult(WINRT_SHIM(IGetActivationFactory)->abi_GetActivationFactory(get_abi(activatableClassId), put_abi(factory))); return factory; } template uint32_t impl_IMemoryBufferReference::Capacity() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Capacity(&value)); + check_hresult(WINRT_SHIM(IMemoryBufferReference)->get_Capacity(&value)); return value; } -template event_token impl_IMemoryBufferReference::Closed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMemoryBufferReference::Closed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMemoryBufferReference)->add_Closed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMemoryBufferReference::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMemoryBufferReference::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Foundation::IMemoryBufferReference::remove_Closed, Closed(handler)); } template void impl_IMemoryBufferReference::Closed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(cookie)); + check_hresult(WINRT_SHIM(IMemoryBufferReference)->remove_Closed(cookie)); } template Windows::Foundation::IMemoryBufferReference impl_IMemoryBuffer::CreateReference() const { Windows::Foundation::IMemoryBufferReference reference; - check_hresult(static_cast(static_cast(*this))->abi_CreateReference(put(reference))); + check_hresult(WINRT_SHIM(IMemoryBuffer)->abi_CreateReference(put_abi(reference))); return reference; } template Windows::Foundation::MemoryBuffer impl_IMemoryBufferFactory::Create(uint32_t capacity) const { Windows::Foundation::MemoryBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(capacity, put(value))); + check_hresult(WINRT_SHIM(IMemoryBufferFactory)->abi_Create(capacity, put_abi(value))); return value; } @@ -2481,223 +911,210 @@ inline MemoryBuffer::MemoryBuffer(uint32_t capacity) : MemoryBuffer(get_activation_factory().Create(capacity)) {} -inline Windows::IInspectable PropertyValue::CreateEmpty() -{ - return get_activation_factory().CreateEmpty(); -} - -inline Windows::IInspectable PropertyValue::CreateUInt8(uint8_t value) -{ - return get_activation_factory().CreateUInt8(value); -} - -inline Windows::IInspectable PropertyValue::CreateInt16(int16_t value) -{ - return get_activation_factory().CreateInt16(value); -} - -inline Windows::IInspectable PropertyValue::CreateUInt16(uint16_t value) -{ - return get_activation_factory().CreateUInt16(value); -} - -inline Windows::IInspectable PropertyValue::CreateInt32(int32_t value) -{ - return get_activation_factory().CreateInt32(value); -} - -inline Windows::IInspectable PropertyValue::CreateUInt32(uint32_t value) -{ - return get_activation_factory().CreateUInt32(value); -} - -inline Windows::IInspectable PropertyValue::CreateInt64(int64_t value) -{ - return get_activation_factory().CreateInt64(value); -} - -inline Windows::IInspectable PropertyValue::CreateUInt64(uint64_t value) -{ - return get_activation_factory().CreateUInt64(value); -} - -inline Windows::IInspectable PropertyValue::CreateSingle(float value) -{ - return get_activation_factory().CreateSingle(value); -} - -inline Windows::IInspectable PropertyValue::CreateDouble(double value) -{ - return get_activation_factory().CreateDouble(value); -} - -inline Windows::IInspectable PropertyValue::CreateChar16(wchar_t value) -{ - return get_activation_factory().CreateChar16(value); -} - -inline Windows::IInspectable PropertyValue::CreateBoolean(bool value) -{ - return get_activation_factory().CreateBoolean(value); -} - -inline Windows::IInspectable PropertyValue::CreateString(hstring_ref value) -{ - return get_activation_factory().CreateString(value); -} - -inline Windows::IInspectable PropertyValue::CreateInspectable(const Windows::IInspectable & value) -{ - return get_activation_factory().CreateInspectable(value); -} - -inline Windows::IInspectable PropertyValue::CreateGuid(GUID value) -{ - return get_activation_factory().CreateGuid(value); -} +inline Uri::Uri(hstring_view uri) : + Uri(get_activation_factory().CreateUri(uri)) +{} -inline Windows::IInspectable PropertyValue::CreateDateTime(const Windows::Foundation::DateTime & value) -{ - return get_activation_factory().CreateDateTime(value); -} +inline Uri::Uri(hstring_view baseUri, hstring_view relativeUri) : + Uri(get_activation_factory().CreateWithRelativeUri(baseUri, relativeUri)) +{} -inline Windows::IInspectable PropertyValue::CreateTimeSpan(const Windows::Foundation::TimeSpan & value) +inline hstring Uri::UnescapeComponent(hstring_view toUnescape) { - return get_activation_factory().CreateTimeSpan(value); + return get_activation_factory().UnescapeComponent(toUnescape); } -inline Windows::IInspectable PropertyValue::CreatePoint(const Windows::Foundation::Point & value) +inline hstring Uri::EscapeComponent(hstring_view toEscape) { - return get_activation_factory().CreatePoint(value); + return get_activation_factory().EscapeComponent(toEscape); } -inline Windows::IInspectable PropertyValue::CreateSize(const Windows::Foundation::Size & value) -{ - return get_activation_factory().CreateSize(value); -} +inline WwwFormUrlDecoder::WwwFormUrlDecoder(hstring_view query) : + WwwFormUrlDecoder(get_activation_factory().CreateWwwFormUrlDecoder(query)) +{} -inline Windows::IInspectable PropertyValue::CreateRect(const Windows::Foundation::Rect & value) -{ - return get_activation_factory().CreateRect(value); } -inline Windows::IInspectable PropertyValue::CreateUInt8Array(array_ref value) -{ - return get_activation_factory().CreateUInt8Array(value); } -inline Windows::IInspectable PropertyValue::CreateInt16Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateInt16Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IClosable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateUInt16Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateUInt16Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateInt32Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateInt32Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IDeferralFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateUInt32Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateUInt32Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IGetActivationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateInt64Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateInt64Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IMemoryBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateUInt64Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateUInt64Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IMemoryBufferFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateSingleArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateSingleArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IMemoryBufferReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateDoubleArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateDoubleArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IStringable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateChar16Array(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateChar16Array(value); -} + size_t operator()(const winrt::Windows::Foundation::IUriEscapeStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateBooleanArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateBooleanArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IUriRuntimeClass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateStringArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateStringArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IUriRuntimeClassFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateInspectableArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateInspectableArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IUriRuntimeClassWithAbsoluteCanonicalUri & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateGuidArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateGuidArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IWwwFormUrlDecoderEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateDateTimeArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateDateTimeArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IWwwFormUrlDecoderRuntimeClass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateTimeSpanArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateTimeSpanArray(value); -} + size_t operator()(const winrt::Windows::Foundation::IWwwFormUrlDecoderRuntimeClassFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreatePointArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreatePointArray(value); -} + size_t operator()(const winrt::Windows::Foundation::Deferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateSizeArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateSizeArray(value); -} + size_t operator()(const winrt::Windows::Foundation::MemoryBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline Windows::IInspectable PropertyValue::CreateRectArray(array_ref value) +template<> +struct std::hash { - return get_activation_factory().CreateRectArray(value); -} - -inline Uri::Uri(hstring_ref uri) : - Uri(get_activation_factory().CreateUri(uri)) -{} - -inline Uri::Uri(hstring_ref baseUri, hstring_ref relativeUri) : - Uri(get_activation_factory().CreateWithRelativeUri(baseUri, relativeUri)) -{} + size_t operator()(const winrt::Windows::Foundation::Uri & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline hstring Uri::UnescapeComponent(hstring_ref toUnescape) +template<> +struct std::hash { - return get_activation_factory().UnescapeComponent(toUnescape); -} + size_t operator()(const winrt::Windows::Foundation::WwwFormUrlDecoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -inline hstring Uri::EscapeComponent(hstring_ref toEscape) +template<> +struct std::hash { - return get_activation_factory().EscapeComponent(toEscape); -} - -inline WwwFormUrlDecoder::WwwFormUrlDecoder(hstring_ref query) : - WwwFormUrlDecoder(get_activation_factory().CreateWwwFormUrlDecoder(query)) -{} - -} + size_t operator()(const winrt::Windows::Foundation::WwwFormUrlDecoderEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; -} +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Gaming.Input.Custom.h b/10.0.14393.0/winrt/Windows.Gaming.Input.Custom.h index e867a174c..e1afb301b 100644 --- a/10.0.14393.0/winrt/Windows.Gaming.Input.Custom.h +++ b/10.0.14393.0/winrt/Windows.Gaming.Input.Custom.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Gaming.Input.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_CreateGameController(abi_arg_in provider, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateGameController(impl::abi_arg_in provider, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateGameController(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateGameController(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -30,10 +34,11 @@ struct produce } } - HRESULT __stdcall abi_OnGameControllerAdded(abi_arg_in value) noexcept override + HRESULT __stdcall abi_OnGameControllerAdded(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnGameControllerAdded(*reinterpret_cast(&value)); return S_OK; } @@ -43,10 +48,11 @@ struct produce } } - HRESULT __stdcall abi_OnGameControllerRemoved(abi_arg_in value) noexcept override + HRESULT __stdcall abi_OnGameControllerRemoved(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnGameControllerRemoved(*reinterpret_cast(&value)); return S_OK; } @@ -60,10 +66,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_RegisterCustomFactoryForGipInterface(abi_arg_in factory, GUID interfaceId) noexcept override + HRESULT __stdcall abi_RegisterCustomFactoryForGipInterface(impl::abi_arg_in factory, GUID interfaceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterCustomFactoryForGipInterface(*reinterpret_cast(&factory), interfaceId); return S_OK; } @@ -73,10 +80,11 @@ struct produce factory, uint16_t hardwareVendorId, uint16_t hardwareProductId) noexcept override + HRESULT __stdcall abi_RegisterCustomFactoryForHardwareId(impl::abi_arg_in factory, uint16_t hardwareVendorId, uint16_t hardwareProductId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterCustomFactoryForHardwareId(*reinterpret_cast(&factory), hardwareVendorId, hardwareProductId); return S_OK; } @@ -86,10 +94,11 @@ struct produce factory, Windows::Gaming::Input::Custom::XusbDeviceType xusbType, Windows::Gaming::Input::Custom::XusbDeviceSubtype xusbSubtype) noexcept override + HRESULT __stdcall abi_RegisterCustomFactoryForXusbType(impl::abi_arg_in factory, Windows::Gaming::Input::Custom::XusbDeviceType xusbType, Windows::Gaming::Input::Custom::XusbDeviceSubtype xusbSubtype) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterCustomFactoryForXusbType(*reinterpret_cast(&factory), xusbType, xusbSubtype); return S_OK; } @@ -107,6 +116,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().OnInputResumed(timestamp); return S_OK; } @@ -120,6 +130,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().OnInputSuspended(timestamp); return S_OK; } @@ -133,11 +144,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_FirmwareVersionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirmwareVersionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirmwareVersionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirmwareVersionInfo()); return S_OK; } catch (...) @@ -150,7 +162,8 @@ struct produce : pro { try { - *value = detach(this->shim().HardwareProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareProductId()); return S_OK; } catch (...) @@ -163,7 +176,8 @@ struct produce : pro { try { - *value = detach(this->shim().HardwareVendorId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareVendorId()); return S_OK; } catch (...) @@ -172,11 +186,12 @@ struct produce : pro } } - HRESULT __stdcall get_HardwareVersionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_HardwareVersionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HardwareVersionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareVersionInfo()); return S_OK; } catch (...) @@ -189,7 +204,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsConnected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsConnected()); return S_OK; } catch (...) @@ -206,7 +222,8 @@ struct produce : pr { try { - *value = detach(this->shim().ExtendedErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedErrorCode()); return S_OK; } catch (...) @@ -219,7 +236,8 @@ struct produce : pr { try { - *value = detach(this->shim().FinalComponentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalComponentId()); return S_OK; } catch (...) @@ -232,7 +250,8 @@ struct produce : pr { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -249,6 +268,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().OnKeyReceived(timestamp, keyCode, isPressed); return S_OK; } @@ -258,11 +278,12 @@ struct produce : } } - HRESULT __stdcall abi_OnMessageReceived(uint64_t timestamp, Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint8_t sequenceId, uint32_t __messageBufferSize, abi_arg_in * messageBuffer) noexcept override + HRESULT __stdcall abi_OnMessageReceived(uint64_t timestamp, Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint8_t sequenceId, uint32_t __messageBufferSize, impl::abi_arg_in * messageBuffer) noexcept override { try { - this->shim().OnMessageReceived(timestamp, messageClass, messageId, sequenceId, array_ref(messageBuffer, messageBuffer + __messageBufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().OnMessageReceived(timestamp, messageClass, messageId, sequenceId, array_view(messageBuffer, messageBuffer + __messageBufferSize)); return S_OK; } catch (...) @@ -275,11 +296,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_SendMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint32_t __messageBufferSize, abi_arg_in * messageBuffer) noexcept override + HRESULT __stdcall abi_SendMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint32_t __messageBufferSize, impl::abi_arg_in * messageBuffer) noexcept override { try { - this->shim().SendMessage(messageClass, messageId, array_ref(messageBuffer, messageBuffer + __messageBufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SendMessage(messageClass, messageId, array_view(messageBuffer, messageBuffer + __messageBufferSize)); return S_OK; } catch (...) @@ -288,11 +310,12 @@ struct produce : } } - HRESULT __stdcall abi_SendReceiveMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint32_t __requestMessageBufferSize, abi_arg_in * requestMessageBuffer, uint32_t __responseMessageBufferSize, abi_arg_out responseMessageBuffer) noexcept override + HRESULT __stdcall abi_SendReceiveMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint32_t __requestMessageBufferSize, impl::abi_arg_in * requestMessageBuffer, uint32_t __responseMessageBufferSize, impl::abi_arg_out responseMessageBuffer) noexcept override { try { - this->shim().SendReceiveMessage(messageClass, messageId, array_ref(requestMessageBuffer, requestMessageBuffer + __requestMessageBufferSize), *responseMessageBuffer); + typename D::abi_guard guard(this->shim()); + this->shim().SendReceiveMessage(messageClass, messageId, array_view(requestMessageBuffer, requestMessageBuffer + __requestMessageBufferSize), *responseMessageBuffer); return S_OK; } catch (...) @@ -301,11 +324,12 @@ struct produce : } } - HRESULT __stdcall abi_UpdateFirmwareAsync(abi_arg_in firmwareImage, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UpdateFirmwareAsync(impl::abi_arg_in firmwareImage, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UpdateFirmwareAsync(*reinterpret_cast(&firmwareImage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateFirmwareAsync(*reinterpret_cast(&firmwareImage))); return S_OK; } catch (...) @@ -319,11 +343,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_OnInputReceived(uint64_t timestamp, uint8_t reportId, uint32_t __inputBufferSize, abi_arg_in * inputBuffer) noexcept override + HRESULT __stdcall abi_OnInputReceived(uint64_t timestamp, uint8_t reportId, uint32_t __inputBufferSize, impl::abi_arg_in * inputBuffer) noexcept override { try { - this->shim().OnInputReceived(timestamp, reportId, array_ref(inputBuffer, inputBuffer + __inputBufferSize)); + typename D::abi_guard guard(this->shim()); + this->shim().OnInputReceived(timestamp, reportId, array_view(inputBuffer, inputBuffer + __inputBufferSize)); return S_OK; } catch (...) @@ -340,6 +365,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVibration(lowFrequencyMotorSpeed, highFrequencyMotorSpeed); return S_OK; } @@ -356,137 +382,137 @@ namespace Windows::Gaming::Input::Custom { template void impl_IGameControllerInputSink::OnInputResumed(uint64_t timestamp) const { - check_hresult(static_cast(static_cast(*this))->abi_OnInputResumed(timestamp)); + check_hresult(WINRT_SHIM(IGameControllerInputSink)->abi_OnInputResumed(timestamp)); } template void impl_IGameControllerInputSink::OnInputSuspended(uint64_t timestamp) const { - check_hresult(static_cast(static_cast(*this))->abi_OnInputSuspended(timestamp)); + check_hresult(WINRT_SHIM(IGameControllerInputSink)->abi_OnInputSuspended(timestamp)); } template void impl_IGipGameControllerInputSink::OnKeyReceived(uint64_t timestamp, uint8_t keyCode, bool isPressed) const { - check_hresult(static_cast(static_cast(*this))->abi_OnKeyReceived(timestamp, keyCode, isPressed)); + check_hresult(WINRT_SHIM(IGipGameControllerInputSink)->abi_OnKeyReceived(timestamp, keyCode, isPressed)); } -template void impl_IGipGameControllerInputSink::OnMessageReceived(uint64_t timestamp, Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint8_t sequenceId, array_ref messageBuffer) const +template void impl_IGipGameControllerInputSink::OnMessageReceived(uint64_t timestamp, Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, uint8_t sequenceId, array_view messageBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_OnMessageReceived(timestamp, messageClass, messageId, sequenceId, messageBuffer.size(), get(messageBuffer))); + check_hresult(WINRT_SHIM(IGipGameControllerInputSink)->abi_OnMessageReceived(timestamp, messageClass, messageId, sequenceId, messageBuffer.size(), get_abi(messageBuffer))); } -template void impl_IXusbGameControllerInputSink::OnInputReceived(uint64_t timestamp, uint8_t reportId, array_ref inputBuffer) const +template void impl_IXusbGameControllerInputSink::OnInputReceived(uint64_t timestamp, uint8_t reportId, array_view inputBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_OnInputReceived(timestamp, reportId, inputBuffer.size(), get(inputBuffer))); + check_hresult(WINRT_SHIM(IXusbGameControllerInputSink)->abi_OnInputReceived(timestamp, reportId, inputBuffer.size(), get_abi(inputBuffer))); } template uint32_t impl_IGipFirmwareUpdateResult::ExtendedErrorCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedErrorCode(&value)); + check_hresult(WINRT_SHIM(IGipFirmwareUpdateResult)->get_ExtendedErrorCode(&value)); return value; } template uint32_t impl_IGipFirmwareUpdateResult::FinalComponentId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FinalComponentId(&value)); + check_hresult(WINRT_SHIM(IGipFirmwareUpdateResult)->get_FinalComponentId(&value)); return value; } template Windows::Gaming::Input::Custom::GipFirmwareUpdateStatus impl_IGipFirmwareUpdateResult::Status() const { Windows::Gaming::Input::Custom::GipFirmwareUpdateStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IGipFirmwareUpdateResult)->get_Status(&value)); return value; } template Windows::Gaming::Input::Custom::GameControllerVersionInfo impl_IGameControllerProvider::FirmwareVersionInfo() const { Windows::Gaming::Input::Custom::GameControllerVersionInfo value {}; - check_hresult(static_cast(static_cast(*this))->get_FirmwareVersionInfo(put(value))); + check_hresult(WINRT_SHIM(IGameControllerProvider)->get_FirmwareVersionInfo(put_abi(value))); return value; } template uint16_t impl_IGameControllerProvider::HardwareProductId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareProductId(&value)); + check_hresult(WINRT_SHIM(IGameControllerProvider)->get_HardwareProductId(&value)); return value; } template uint16_t impl_IGameControllerProvider::HardwareVendorId() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareVendorId(&value)); + check_hresult(WINRT_SHIM(IGameControllerProvider)->get_HardwareVendorId(&value)); return value; } template Windows::Gaming::Input::Custom::GameControllerVersionInfo impl_IGameControllerProvider::HardwareVersionInfo() const { Windows::Gaming::Input::Custom::GameControllerVersionInfo value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareVersionInfo(put(value))); + check_hresult(WINRT_SHIM(IGameControllerProvider)->get_HardwareVersionInfo(put_abi(value))); return value; } template bool impl_IGameControllerProvider::IsConnected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsConnected(&value)); + check_hresult(WINRT_SHIM(IGameControllerProvider)->get_IsConnected(&value)); return value; } -template void impl_IGipGameControllerProvider::SendMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, array_ref messageBuffer) const +template void impl_IGipGameControllerProvider::SendMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, array_view messageBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_SendMessage(messageClass, messageId, messageBuffer.size(), get(messageBuffer))); + check_hresult(WINRT_SHIM(IGipGameControllerProvider)->abi_SendMessage(messageClass, messageId, messageBuffer.size(), get_abi(messageBuffer))); } -template void impl_IGipGameControllerProvider::SendReceiveMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, array_ref requestMessageBuffer, array_ref responseMessageBuffer) const +template void impl_IGipGameControllerProvider::SendReceiveMessage(Windows::Gaming::Input::Custom::GipMessageClass messageClass, uint8_t messageId, array_view requestMessageBuffer, array_view responseMessageBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_SendReceiveMessage(messageClass, messageId, requestMessageBuffer.size(), get(requestMessageBuffer), responseMessageBuffer.size(), get(responseMessageBuffer))); + check_hresult(WINRT_SHIM(IGipGameControllerProvider)->abi_SendReceiveMessage(messageClass, messageId, requestMessageBuffer.size(), get_abi(requestMessageBuffer), responseMessageBuffer.size(), get_abi(responseMessageBuffer))); } template Windows::Foundation::IAsyncOperationWithProgress impl_IGipGameControllerProvider::UpdateFirmwareAsync(const Windows::Storage::Streams::IInputStream & firmwareImage) const { Windows::Foundation::IAsyncOperationWithProgress result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateFirmwareAsync(get(firmwareImage), put(result))); + check_hresult(WINRT_SHIM(IGipGameControllerProvider)->abi_UpdateFirmwareAsync(get_abi(firmwareImage), put_abi(result))); return result; } template void impl_IXusbGameControllerProvider::SetVibration(double lowFrequencyMotorSpeed, double highFrequencyMotorSpeed) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVibration(lowFrequencyMotorSpeed, highFrequencyMotorSpeed)); + check_hresult(WINRT_SHIM(IXusbGameControllerProvider)->abi_SetVibration(lowFrequencyMotorSpeed, highFrequencyMotorSpeed)); } -template Windows::IInspectable impl_ICustomGameControllerFactory::CreateGameController(const Windows::Gaming::Input::Custom::IGameControllerProvider & provider) const +template Windows::Foundation::IInspectable impl_ICustomGameControllerFactory::CreateGameController(const Windows::Gaming::Input::Custom::IGameControllerProvider & provider) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_CreateGameController(get(provider), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICustomGameControllerFactory)->abi_CreateGameController(get_abi(provider), put_abi(value))); return value; } template void impl_ICustomGameControllerFactory::OnGameControllerAdded(const Windows::Gaming::Input::IGameController & value) const { - check_hresult(static_cast(static_cast(*this))->abi_OnGameControllerAdded(get(value))); + check_hresult(WINRT_SHIM(ICustomGameControllerFactory)->abi_OnGameControllerAdded(get_abi(value))); } template void impl_ICustomGameControllerFactory::OnGameControllerRemoved(const Windows::Gaming::Input::IGameController & value) const { - check_hresult(static_cast(static_cast(*this))->abi_OnGameControllerRemoved(get(value))); + check_hresult(WINRT_SHIM(ICustomGameControllerFactory)->abi_OnGameControllerRemoved(get_abi(value))); } template void impl_IGameControllerFactoryManagerStatics::RegisterCustomFactoryForGipInterface(const Windows::Gaming::Input::Custom::ICustomGameControllerFactory & factory, GUID interfaceId) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterCustomFactoryForGipInterface(get(factory), interfaceId)); + check_hresult(WINRT_SHIM(IGameControllerFactoryManagerStatics)->abi_RegisterCustomFactoryForGipInterface(get_abi(factory), interfaceId)); } template void impl_IGameControllerFactoryManagerStatics::RegisterCustomFactoryForHardwareId(const Windows::Gaming::Input::Custom::ICustomGameControllerFactory & factory, uint16_t hardwareVendorId, uint16_t hardwareProductId) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterCustomFactoryForHardwareId(get(factory), hardwareVendorId, hardwareProductId)); + check_hresult(WINRT_SHIM(IGameControllerFactoryManagerStatics)->abi_RegisterCustomFactoryForHardwareId(get_abi(factory), hardwareVendorId, hardwareProductId)); } template void impl_IGameControllerFactoryManagerStatics::RegisterCustomFactoryForXusbType(const Windows::Gaming::Input::Custom::ICustomGameControllerFactory & factory, Windows::Gaming::Input::Custom::XusbDeviceType xusbType, Windows::Gaming::Input::Custom::XusbDeviceSubtype xusbSubtype) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterCustomFactoryForXusbType(get(factory), xusbType, xusbSubtype)); + check_hresult(WINRT_SHIM(IGameControllerFactoryManagerStatics)->abi_RegisterCustomFactoryForXusbType(get_abi(factory), xusbType, xusbSubtype)); } inline void GameControllerFactoryManager::RegisterCustomFactoryForGipInterface(const Windows::Gaming::Input::Custom::ICustomGameControllerFactory & factory, GUID interfaceId) @@ -507,3 +533,113 @@ inline void GameControllerFactoryManager::RegisterCustomFactoryForXusbType(const } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::ICustomGameControllerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGameControllerFactoryManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGameControllerInputSink & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGameControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGipFirmwareUpdateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGipGameControllerInputSink & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IGipGameControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IXusbGameControllerInputSink & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::IXusbGameControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::GipFirmwareUpdateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::GipGameControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Custom::XusbGameControllerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Gaming.Input.ForceFeedback.h b/10.0.14393.0/winrt/Windows.Gaming.Input.ForceFeedback.h index cef8caf37..a4e2f62c2 100644 --- a/10.0.14393.0/winrt/Windows.Gaming.Input.ForceFeedback.h +++ b/10.0.14393.0/winrt/Windows.Gaming.Input.ForceFeedback.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Gaming.Input.ForceFeedback.3.h" #include "Windows.Gaming.Input.h" @@ -18,7 +21,8 @@ struct produce { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -27,10 +31,11 @@ struct produce } } - HRESULT __stdcall abi_SetParameters(abi_arg_in direction, float positiveCoefficient, float negativeCoefficient, float maxPositiveMagnitude, float maxNegativeMagnitude, float deadZone, float bias) noexcept override + HRESULT __stdcall abi_SetParameters(impl::abi_arg_in direction, float positiveCoefficient, float negativeCoefficient, float maxPositiveMagnitude, float maxNegativeMagnitude, float deadZone, float bias) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParameters(*reinterpret_cast(&direction), positiveCoefficient, negativeCoefficient, maxPositiveMagnitude, maxNegativeMagnitude, deadZone, bias); return S_OK; } @@ -44,11 +49,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind effectKind, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind effectKind, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateInstance(effectKind)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateInstance(effectKind)); return S_OK; } catch (...) @@ -62,10 +68,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetParameters(abi_arg_in vector, abi_arg_in duration) noexcept override + HRESULT __stdcall abi_SetParameters(impl::abi_arg_in vector, impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParameters(*reinterpret_cast(&vector), *reinterpret_cast(&duration)); return S_OK; } @@ -75,10 +82,11 @@ struct produce : } } - HRESULT __stdcall abi_SetParametersWithEnvelope(abi_arg_in vector, float attackGain, float sustainGain, float releaseGain, abi_arg_in startDelay, abi_arg_in attackDuration, abi_arg_in sustainDuration, abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override + HRESULT __stdcall abi_SetParametersWithEnvelope(impl::abi_arg_in vector, float attackGain, float sustainGain, float releaseGain, impl::abi_arg_in startDelay, impl::abi_arg_in attackDuration, impl::abi_arg_in sustainDuration, impl::abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParametersWithEnvelope(*reinterpret_cast(&vector), attackGain, sustainGain, releaseGain, *reinterpret_cast(&startDelay), *reinterpret_cast(&attackDuration), *reinterpret_cast(&sustainDuration), *reinterpret_cast(&releaseDuration), repeatCount); return S_OK; } @@ -96,7 +104,8 @@ struct produce : { try { - *value = detach(this->shim().Gain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gain()); return S_OK; } catch (...) @@ -109,6 +118,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Gain(value); return S_OK; } @@ -122,7 +132,8 @@ struct produce : { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -135,6 +146,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -148,6 +160,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -165,7 +178,8 @@ struct produce : { try { - *value = detach(this->shim().AreEffectsPaused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreEffectsPaused()); return S_OK; } catch (...) @@ -178,7 +192,8 @@ struct produce : { try { - *value = detach(this->shim().MasterGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MasterGain()); return S_OK; } catch (...) @@ -191,6 +206,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().MasterGain(value); return S_OK; } @@ -204,7 +220,8 @@ struct produce : { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -217,7 +234,8 @@ struct produce : { try { - *value = detach(this->shim().SupportedAxes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedAxes()); return S_OK; } catch (...) @@ -226,11 +244,12 @@ struct produce : } } - HRESULT __stdcall abi_LoadEffectAsync(abi_arg_in effect, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_LoadEffectAsync(impl::abi_arg_in effect, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().LoadEffectAsync(*reinterpret_cast(&effect))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().LoadEffectAsync(*reinterpret_cast(&effect))); return S_OK; } catch (...) @@ -244,6 +263,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().PauseAllEffects(); return S_OK; } @@ -257,6 +277,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ResumeAllEffects(); return S_OK; } @@ -270,6 +291,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().StopAllEffects(); return S_OK; } @@ -279,11 +301,12 @@ struct produce : } } - HRESULT __stdcall abi_TryDisableAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryDisableAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryDisableAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryDisableAsync()); return S_OK; } catch (...) @@ -293,11 +316,12 @@ struct produce : } } - HRESULT __stdcall abi_TryEnableAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryEnableAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryEnableAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryEnableAsync()); return S_OK; } catch (...) @@ -307,11 +331,12 @@ struct produce : } } - HRESULT __stdcall abi_TryResetAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryResetAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryResetAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryResetAsync()); return S_OK; } catch (...) @@ -321,11 +346,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUnloadEffectAsync(abi_arg_in effect, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryUnloadEffectAsync(impl::abi_arg_in effect, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryUnloadEffectAsync(*reinterpret_cast(&effect))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryUnloadEffectAsync(*reinterpret_cast(&effect))); return S_OK; } catch (...) @@ -343,7 +369,8 @@ struct produce : { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -352,10 +379,11 @@ struct produce : } } - HRESULT __stdcall abi_SetParameters(abi_arg_in vector, float frequency, float phase, float bias, abi_arg_in duration) noexcept override + HRESULT __stdcall abi_SetParameters(impl::abi_arg_in vector, float frequency, float phase, float bias, impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParameters(*reinterpret_cast(&vector), frequency, phase, bias, *reinterpret_cast(&duration)); return S_OK; } @@ -365,10 +393,11 @@ struct produce : } } - HRESULT __stdcall abi_SetParametersWithEnvelope(abi_arg_in vector, float frequency, float phase, float bias, float attackGain, float sustainGain, float releaseGain, abi_arg_in startDelay, abi_arg_in attackDuration, abi_arg_in sustainDuration, abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override + HRESULT __stdcall abi_SetParametersWithEnvelope(impl::abi_arg_in vector, float frequency, float phase, float bias, float attackGain, float sustainGain, float releaseGain, impl::abi_arg_in startDelay, impl::abi_arg_in attackDuration, impl::abi_arg_in sustainDuration, impl::abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParametersWithEnvelope(*reinterpret_cast(&vector), frequency, phase, bias, attackGain, sustainGain, releaseGain, *reinterpret_cast(&startDelay), *reinterpret_cast(&attackDuration), *reinterpret_cast(&sustainDuration), *reinterpret_cast(&releaseDuration), repeatCount); return S_OK; } @@ -382,11 +411,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind effectKind, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind effectKind, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateInstance(effectKind)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateInstance(effectKind)); return S_OK; } catch (...) @@ -400,10 +430,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetParameters(abi_arg_in startVector, abi_arg_in endVector, abi_arg_in duration) noexcept override + HRESULT __stdcall abi_SetParameters(impl::abi_arg_in startVector, impl::abi_arg_in endVector, impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParameters(*reinterpret_cast(&startVector), *reinterpret_cast(&endVector), *reinterpret_cast(&duration)); return S_OK; } @@ -413,10 +444,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SetParametersWithEnvelope(abi_arg_in startVector, abi_arg_in endVector, float attackGain, float sustainGain, float releaseGain, abi_arg_in startDelay, abi_arg_in attackDuration, abi_arg_in sustainDuration, abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override + HRESULT __stdcall abi_SetParametersWithEnvelope(impl::abi_arg_in startVector, impl::abi_arg_in endVector, float attackGain, float sustainGain, float releaseGain, impl::abi_arg_in startDelay, impl::abi_arg_in attackDuration, impl::abi_arg_in sustainDuration, impl::abi_arg_in releaseDuration, uint32_t repeatCount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParametersWithEnvelope(*reinterpret_cast(&startVector), *reinterpret_cast(&endVector), attackGain, sustainGain, releaseGain, *reinterpret_cast(&startDelay), *reinterpret_cast(&attackDuration), *reinterpret_cast(&sustainDuration), *reinterpret_cast(&releaseDuration), repeatCount); return S_OK; } @@ -434,175 +466,175 @@ namespace Windows::Gaming::Input::ForceFeedback { template double impl_IForceFeedbackEffect::Gain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Gain(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackEffect)->get_Gain(&value)); return value; } template void impl_IForceFeedbackEffect::Gain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Gain(value)); + check_hresult(WINRT_SHIM(IForceFeedbackEffect)->put_Gain(value)); } template Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectState impl_IForceFeedbackEffect::State() const { Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackEffect)->get_State(&value)); return value; } template void impl_IForceFeedbackEffect::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IForceFeedbackEffect)->abi_Start()); } template void impl_IForceFeedbackEffect::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IForceFeedbackEffect)->abi_Stop()); } template Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind impl_IConditionForceEffect::Kind() const { Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IConditionForceEffect)->get_Kind(&value)); return value; } template void impl_IConditionForceEffect::SetParameters(const Windows::Foundation::Numerics::float3 & direction, float positiveCoefficient, float negativeCoefficient, float maxPositiveMagnitude, float maxNegativeMagnitude, float deadZone, float bias) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParameters(get(direction), positiveCoefficient, negativeCoefficient, maxPositiveMagnitude, maxNegativeMagnitude, deadZone, bias)); + check_hresult(WINRT_SHIM(IConditionForceEffect)->abi_SetParameters(get_abi(direction), positiveCoefficient, negativeCoefficient, maxPositiveMagnitude, maxNegativeMagnitude, deadZone, bias)); } template Windows::Gaming::Input::ForceFeedback::ConditionForceEffect impl_IConditionForceEffectFactory::CreateInstance(Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind effectKind) const { Windows::Gaming::Input::ForceFeedback::ConditionForceEffect value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(effectKind, put(value))); + check_hresult(WINRT_SHIM(IConditionForceEffectFactory)->abi_CreateInstance(effectKind, put_abi(value))); return value; } template void impl_IConstantForceEffect::SetParameters(const Windows::Foundation::Numerics::float3 & vector, const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParameters(get(vector), get(duration))); + check_hresult(WINRT_SHIM(IConstantForceEffect)->abi_SetParameters(get_abi(vector), get_abi(duration))); } template void impl_IConstantForceEffect::SetParametersWithEnvelope(const Windows::Foundation::Numerics::float3 & vector, float attackGain, float sustainGain, float releaseGain, const Windows::Foundation::TimeSpan & startDelay, const Windows::Foundation::TimeSpan & attackDuration, const Windows::Foundation::TimeSpan & sustainDuration, const Windows::Foundation::TimeSpan & releaseDuration, uint32_t repeatCount) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParametersWithEnvelope(get(vector), attackGain, sustainGain, releaseGain, get(startDelay), get(attackDuration), get(sustainDuration), get(releaseDuration), repeatCount)); + check_hresult(WINRT_SHIM(IConstantForceEffect)->abi_SetParametersWithEnvelope(get_abi(vector), attackGain, sustainGain, releaseGain, get_abi(startDelay), get_abi(attackDuration), get_abi(sustainDuration), get_abi(releaseDuration), repeatCount)); } template Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind impl_IPeriodicForceEffect::Kind() const { Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IPeriodicForceEffect)->get_Kind(&value)); return value; } template void impl_IPeriodicForceEffect::SetParameters(const Windows::Foundation::Numerics::float3 & vector, float frequency, float phase, float bias, const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParameters(get(vector), frequency, phase, bias, get(duration))); + check_hresult(WINRT_SHIM(IPeriodicForceEffect)->abi_SetParameters(get_abi(vector), frequency, phase, bias, get_abi(duration))); } template void impl_IPeriodicForceEffect::SetParametersWithEnvelope(const Windows::Foundation::Numerics::float3 & vector, float frequency, float phase, float bias, float attackGain, float sustainGain, float releaseGain, const Windows::Foundation::TimeSpan & startDelay, const Windows::Foundation::TimeSpan & attackDuration, const Windows::Foundation::TimeSpan & sustainDuration, const Windows::Foundation::TimeSpan & releaseDuration, uint32_t repeatCount) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParametersWithEnvelope(get(vector), frequency, phase, bias, attackGain, sustainGain, releaseGain, get(startDelay), get(attackDuration), get(sustainDuration), get(releaseDuration), repeatCount)); + check_hresult(WINRT_SHIM(IPeriodicForceEffect)->abi_SetParametersWithEnvelope(get_abi(vector), frequency, phase, bias, attackGain, sustainGain, releaseGain, get_abi(startDelay), get_abi(attackDuration), get_abi(sustainDuration), get_abi(releaseDuration), repeatCount)); } template Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect impl_IPeriodicForceEffectFactory::CreateInstance(Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind effectKind) const { Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(effectKind, put(value))); + check_hresult(WINRT_SHIM(IPeriodicForceEffectFactory)->abi_CreateInstance(effectKind, put_abi(value))); return value; } template void impl_IRampForceEffect::SetParameters(const Windows::Foundation::Numerics::float3 & startVector, const Windows::Foundation::Numerics::float3 & endVector, const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParameters(get(startVector), get(endVector), get(duration))); + check_hresult(WINRT_SHIM(IRampForceEffect)->abi_SetParameters(get_abi(startVector), get_abi(endVector), get_abi(duration))); } template void impl_IRampForceEffect::SetParametersWithEnvelope(const Windows::Foundation::Numerics::float3 & startVector, const Windows::Foundation::Numerics::float3 & endVector, float attackGain, float sustainGain, float releaseGain, const Windows::Foundation::TimeSpan & startDelay, const Windows::Foundation::TimeSpan & attackDuration, const Windows::Foundation::TimeSpan & sustainDuration, const Windows::Foundation::TimeSpan & releaseDuration, uint32_t repeatCount) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParametersWithEnvelope(get(startVector), get(endVector), attackGain, sustainGain, releaseGain, get(startDelay), get(attackDuration), get(sustainDuration), get(releaseDuration), repeatCount)); + check_hresult(WINRT_SHIM(IRampForceEffect)->abi_SetParametersWithEnvelope(get_abi(startVector), get_abi(endVector), attackGain, sustainGain, releaseGain, get_abi(startDelay), get_abi(attackDuration), get_abi(sustainDuration), get_abi(releaseDuration), repeatCount)); } template bool impl_IForceFeedbackMotor::AreEffectsPaused() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreEffectsPaused(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->get_AreEffectsPaused(&value)); return value; } template double impl_IForceFeedbackMotor::MasterGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MasterGain(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->get_MasterGain(&value)); return value; } template void impl_IForceFeedbackMotor::MasterGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MasterGain(value)); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->put_MasterGain(value)); } template bool impl_IForceFeedbackMotor::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->get_IsEnabled(&value)); return value; } template Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectAxes impl_IForceFeedbackMotor::SupportedAxes() const { Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectAxes value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedAxes(&value)); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->get_SupportedAxes(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IForceFeedbackMotor::LoadEffectAsync(const Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect & effect) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_LoadEffectAsync(get(effect), put(asyncOperation))); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_LoadEffectAsync(get_abi(effect), put_abi(asyncOperation))); return asyncOperation; } template void impl_IForceFeedbackMotor::PauseAllEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_PauseAllEffects()); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_PauseAllEffects()); } template void impl_IForceFeedbackMotor::ResumeAllEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_ResumeAllEffects()); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_ResumeAllEffects()); } template void impl_IForceFeedbackMotor::StopAllEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_StopAllEffects()); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_StopAllEffects()); } template Windows::Foundation::IAsyncOperation impl_IForceFeedbackMotor::TryDisableAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryDisableAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_TryDisableAsync(put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IForceFeedbackMotor::TryEnableAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryEnableAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_TryEnableAsync(put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IForceFeedbackMotor::TryResetAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryResetAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_TryResetAsync(put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IForceFeedbackMotor::TryUnloadEffectAsync(const Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect & effect) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryUnloadEffectAsync(get(effect), put(asyncOperation))); + check_hresult(WINRT_SHIM(IForceFeedbackMotor)->abi_TryUnloadEffectAsync(get_abi(effect), put_abi(asyncOperation))); return asyncOperation; } @@ -625,3 +657,122 @@ inline RampForceEffect::RampForceEffect() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IConditionForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IConditionForceEffectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IConstantForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackMotor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IPeriodicForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IPeriodicForceEffectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::IRampForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Gaming.Input.h b/10.0.14393.0/winrt/Windows.Gaming.Input.h index b1749caaa..97185b9e4 100644 --- a/10.0.14393.0/winrt/Windows.Gaming.Input.h +++ b/10.0.14393.0/winrt/Windows.Gaming.Input.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,7 +23,8 @@ struct produce : produce_baseshim().GetButtonLabel(button)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetButtonLabel(button)); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_ArcadeStickAdded(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ArcadeStickAdded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ArcadeStickAdded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ArcadeStickAdded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -63,6 +69,7 @@ struct produce : produce_baseshim()); this->shim().ArcadeStickAdded(token); return S_OK; } @@ -72,11 +79,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ArcadeStickRemoved(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ArcadeStickRemoved(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ArcadeStickRemoved(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -89,6 +97,7 @@ struct produce : produce_baseshim()); this->shim().ArcadeStickRemoved(token); return S_OK; } @@ -98,11 +107,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ArcadeSticks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ArcadeSticks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ArcadeSticks()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_HeadsetConnected(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_HeadsetConnected(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().HeadsetConnected(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HeadsetConnected(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -133,6 +144,7 @@ struct produce : produce_baseshim()); this->shim().HeadsetConnected(token); return S_OK; } @@ -142,11 +154,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_HeadsetDisconnected(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().HeadsetDisconnected(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HeadsetDisconnected(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -159,6 +172,7 @@ struct produce : produce_baseshim()); this->shim().HeadsetDisconnected(token); return S_OK; } @@ -168,11 +182,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_UserChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UserChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UserChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -185,6 +200,7 @@ struct produce : produce_baseshim()); this->shim().UserChanged(token); return S_OK; } @@ -194,11 +210,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Headset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Headset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Headset()); return S_OK; } catch (...) @@ -212,7 +229,8 @@ struct produce : produce_baseshim().IsWireless()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWireless()); return S_OK; } catch (...) @@ -221,11 +239,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -239,11 +258,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Vibration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Vibration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Vibration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Vibration()); return S_OK; } catch (...) @@ -252,10 +272,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Vibration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Vibration(*reinterpret_cast(&value)); return S_OK; } @@ -265,11 +286,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -286,7 +308,8 @@ struct produce : produce_baseshim().GetButtonLabel(button)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetButtonLabel(button)); return S_OK; } catch (...) @@ -299,11 +322,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_GamepadAdded(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_GamepadAdded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().GamepadAdded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GamepadAdded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -316,6 +340,7 @@ struct produce : produce_baseshim()); this->shim().GamepadAdded(token); return S_OK; } @@ -325,11 +350,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_GamepadRemoved(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().GamepadRemoved(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GamepadRemoved(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -342,6 +368,7 @@ struct produce : produce_baseshim()); this->shim().GamepadRemoved(token); return S_OK; } @@ -351,11 +378,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Gamepads(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gamepads()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gamepads()); return S_OK; } catch (...) @@ -369,11 +397,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CaptureDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_CaptureDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CaptureDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaptureDeviceId()); return S_OK; } catch (...) @@ -383,11 +412,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RenderDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RenderDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RenderDeviceId()); return S_OK; } catch (...) @@ -405,7 +435,8 @@ struct produce : produce_baseshim().HasClutch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasClutch()); return S_OK; } catch (...) @@ -418,7 +449,8 @@ struct produce : produce_baseshim().HasHandbrake()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasHandbrake()); return S_OK; } catch (...) @@ -431,7 +463,8 @@ struct produce : produce_baseshim().HasPatternShifter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasPatternShifter()); return S_OK; } catch (...) @@ -444,7 +477,8 @@ struct produce : produce_baseshim().MaxPatternShifterGear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPatternShifterGear()); return S_OK; } catch (...) @@ -457,7 +491,8 @@ struct produce : produce_baseshim().MaxWheelAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWheelAngle()); return S_OK; } catch (...) @@ -466,11 +501,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_WheelMotor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WheelMotor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WheelMotor()); return S_OK; } catch (...) @@ -484,7 +520,8 @@ struct produce : produce_baseshim().GetButtonLabel(button)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetButtonLabel(button)); return S_OK; } catch (...) @@ -493,11 +530,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -510,11 +548,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_RacingWheelAdded(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_RacingWheelAdded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().RacingWheelAdded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RacingWheelAdded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -527,6 +566,7 @@ struct produce : produce_baseshim()); this->shim().RacingWheelAdded(token); return S_OK; } @@ -536,11 +576,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_RacingWheelRemoved(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().RacingWheelRemoved(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RacingWheelRemoved(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -553,6 +594,7 @@ struct produce : produce_baseshim()); this->shim().RacingWheelRemoved(token); return S_OK; } @@ -562,11 +604,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RacingWheels(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RacingWheels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RacingWheels()); return S_OK; } catch (...) @@ -580,11 +623,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentReading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentReading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentReading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentReading()); return S_OK; } catch (...) @@ -597,7 +641,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().GetOptionalButtonLabel(button)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetOptionalButtonLabel(button)); return S_OK; } catch (...) @@ -610,7 +655,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().GetRequiredButtonLabel(button)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRequiredButtonLabel(button)); return S_OK; } catch (...) @@ -623,11 +669,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall add_UINavigationControllerAdded(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_UINavigationControllerAdded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UINavigationControllerAdded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UINavigationControllerAdded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -640,6 +687,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().UINavigationControllerAdded(token); return S_OK; } @@ -649,11 +697,12 @@ struct produce : prod } } - HRESULT __stdcall add_UINavigationControllerRemoved(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_UINavigationControllerRemoved(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UINavigationControllerRemoved(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UINavigationControllerRemoved(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -666,6 +715,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().UINavigationControllerRemoved(token); return S_OK; } @@ -675,11 +725,12 @@ struct produce : prod } } - HRESULT __stdcall get_UINavigationControllers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_UINavigationControllers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UINavigationControllers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UINavigationControllers()); return S_OK; } catch (...) @@ -697,7 +748,7 @@ namespace Windows::Gaming::Input { template event_token impl_IGameController::HeadsetConnected(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HeadsetConnected(get(value), &token)); + check_hresult(WINRT_SHIM(IGameController)->add_HeadsetConnected(get_abi(value), &token)); return token; } @@ -708,13 +759,13 @@ template event_revoker impl_IGameController::He template void impl_IGameController::HeadsetConnected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HeadsetConnected(token)); + check_hresult(WINRT_SHIM(IGameController)->remove_HeadsetConnected(token)); } template event_token impl_IGameController::HeadsetDisconnected(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HeadsetDisconnected(get(value), &token)); + check_hresult(WINRT_SHIM(IGameController)->add_HeadsetDisconnected(get_abi(value), &token)); return token; } @@ -725,13 +776,13 @@ template event_revoker impl_IGameController::He template void impl_IGameController::HeadsetDisconnected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HeadsetDisconnected(token)); + check_hresult(WINRT_SHIM(IGameController)->remove_HeadsetDisconnected(token)); } template event_token impl_IGameController::UserChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UserChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IGameController)->add_UserChanged(get_abi(value), &token)); return token; } @@ -742,48 +793,48 @@ template event_revoker impl_IGameController::Us template void impl_IGameController::UserChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UserChanged(token)); + check_hresult(WINRT_SHIM(IGameController)->remove_UserChanged(token)); } template Windows::Gaming::Input::Headset impl_IGameController::Headset() const { Windows::Gaming::Input::Headset value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Headset(put(value))); + check_hresult(WINRT_SHIM(IGameController)->get_Headset(put_abi(value))); return value; } template bool impl_IGameController::IsWireless() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWireless(&value)); + check_hresult(WINRT_SHIM(IGameController)->get_IsWireless(&value)); return value; } template Windows::System::User impl_IGameController::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IGameController)->get_User(put_abi(value))); return value; } template Windows::Gaming::Input::GameControllerButtonLabel impl_IArcadeStick::GetButtonLabel(Windows::Gaming::Input::ArcadeStickButtons button) const { Windows::Gaming::Input::GameControllerButtonLabel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetButtonLabel(button, &value)); + check_hresult(WINRT_SHIM(IArcadeStick)->abi_GetButtonLabel(button, &value)); return value; } template Windows::Gaming::Input::ArcadeStickReading impl_IArcadeStick::GetCurrentReading() const { Windows::Gaming::Input::ArcadeStickReading value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IArcadeStick)->abi_GetCurrentReading(put_abi(value))); return value; } template event_token impl_IArcadeStickStatics::ArcadeStickAdded(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ArcadeStickAdded(get(value), &token)); + check_hresult(WINRT_SHIM(IArcadeStickStatics)->add_ArcadeStickAdded(get_abi(value), &token)); return token; } @@ -794,13 +845,13 @@ template event_revoker impl_IArcadeStickStatic template void impl_IArcadeStickStatics::ArcadeStickAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ArcadeStickAdded(token)); + check_hresult(WINRT_SHIM(IArcadeStickStatics)->remove_ArcadeStickAdded(token)); } template event_token impl_IArcadeStickStatics::ArcadeStickRemoved(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ArcadeStickRemoved(get(value), &token)); + check_hresult(WINRT_SHIM(IArcadeStickStatics)->add_ArcadeStickRemoved(get_abi(value), &token)); return token; } @@ -811,46 +862,46 @@ template event_revoker impl_IArcadeStickStatic template void impl_IArcadeStickStatics::ArcadeStickRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ArcadeStickRemoved(token)); + check_hresult(WINRT_SHIM(IArcadeStickStatics)->remove_ArcadeStickRemoved(token)); } template Windows::Foundation::Collections::IVectorView impl_IArcadeStickStatics::ArcadeSticks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ArcadeSticks(put(value))); + check_hresult(WINRT_SHIM(IArcadeStickStatics)->get_ArcadeSticks(put_abi(value))); return value; } template Windows::Gaming::Input::GamepadVibration impl_IGamepad::Vibration() const { Windows::Gaming::Input::GamepadVibration value {}; - check_hresult(static_cast(static_cast(*this))->get_Vibration(put(value))); + check_hresult(WINRT_SHIM(IGamepad)->get_Vibration(put_abi(value))); return value; } template void impl_IGamepad::Vibration(const Windows::Gaming::Input::GamepadVibration & value) const { - check_hresult(static_cast(static_cast(*this))->put_Vibration(get(value))); + check_hresult(WINRT_SHIM(IGamepad)->put_Vibration(get_abi(value))); } template Windows::Gaming::Input::GamepadReading impl_IGamepad::GetCurrentReading() const { Windows::Gaming::Input::GamepadReading value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IGamepad)->abi_GetCurrentReading(put_abi(value))); return value; } template Windows::Gaming::Input::GameControllerButtonLabel impl_IGamepad2::GetButtonLabel(Windows::Gaming::Input::GamepadButtons button) const { Windows::Gaming::Input::GameControllerButtonLabel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetButtonLabel(button, &value)); + check_hresult(WINRT_SHIM(IGamepad2)->abi_GetButtonLabel(button, &value)); return value; } template event_token impl_IGamepadStatics::GamepadAdded(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GamepadAdded(get(value), &token)); + check_hresult(WINRT_SHIM(IGamepadStatics)->add_GamepadAdded(get_abi(value), &token)); return token; } @@ -861,13 +912,13 @@ template event_revoker impl_IGamepadStatics::Ga template void impl_IGamepadStatics::GamepadAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GamepadAdded(token)); + check_hresult(WINRT_SHIM(IGamepadStatics)->remove_GamepadAdded(token)); } template event_token impl_IGamepadStatics::GamepadRemoved(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GamepadRemoved(get(value), &token)); + check_hresult(WINRT_SHIM(IGamepadStatics)->add_GamepadRemoved(get_abi(value), &token)); return token; } @@ -878,90 +929,90 @@ template event_revoker impl_IGamepadStatics::Ga template void impl_IGamepadStatics::GamepadRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GamepadRemoved(token)); + check_hresult(WINRT_SHIM(IGamepadStatics)->remove_GamepadRemoved(token)); } template Windows::Foundation::Collections::IVectorView impl_IGamepadStatics::Gamepads() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gamepads(put(value))); + check_hresult(WINRT_SHIM(IGamepadStatics)->get_Gamepads(put_abi(value))); return value; } template hstring impl_IHeadset::CaptureDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CaptureDeviceId(put(value))); + check_hresult(WINRT_SHIM(IHeadset)->get_CaptureDeviceId(put_abi(value))); return value; } template hstring impl_IHeadset::RenderDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RenderDeviceId(put(value))); + check_hresult(WINRT_SHIM(IHeadset)->get_RenderDeviceId(put_abi(value))); return value; } template bool impl_IRacingWheel::HasClutch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasClutch(&value)); + check_hresult(WINRT_SHIM(IRacingWheel)->get_HasClutch(&value)); return value; } template bool impl_IRacingWheel::HasHandbrake() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasHandbrake(&value)); + check_hresult(WINRT_SHIM(IRacingWheel)->get_HasHandbrake(&value)); return value; } template bool impl_IRacingWheel::HasPatternShifter() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasPatternShifter(&value)); + check_hresult(WINRT_SHIM(IRacingWheel)->get_HasPatternShifter(&value)); return value; } template int32_t impl_IRacingWheel::MaxPatternShifterGear() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPatternShifterGear(&value)); + check_hresult(WINRT_SHIM(IRacingWheel)->get_MaxPatternShifterGear(&value)); return value; } template double impl_IRacingWheel::MaxWheelAngle() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxWheelAngle(&value)); + check_hresult(WINRT_SHIM(IRacingWheel)->get_MaxWheelAngle(&value)); return value; } template Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor impl_IRacingWheel::WheelMotor() const { Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WheelMotor(put(value))); + check_hresult(WINRT_SHIM(IRacingWheel)->get_WheelMotor(put_abi(value))); return value; } template Windows::Gaming::Input::GameControllerButtonLabel impl_IRacingWheel::GetButtonLabel(Windows::Gaming::Input::RacingWheelButtons button) const { Windows::Gaming::Input::GameControllerButtonLabel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetButtonLabel(button, &value)); + check_hresult(WINRT_SHIM(IRacingWheel)->abi_GetButtonLabel(button, &value)); return value; } template Windows::Gaming::Input::RacingWheelReading impl_IRacingWheel::GetCurrentReading() const { Windows::Gaming::Input::RacingWheelReading value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IRacingWheel)->abi_GetCurrentReading(put_abi(value))); return value; } template event_token impl_IRacingWheelStatics::RacingWheelAdded(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RacingWheelAdded(get(value), &token)); + check_hresult(WINRT_SHIM(IRacingWheelStatics)->add_RacingWheelAdded(get_abi(value), &token)); return token; } @@ -972,13 +1023,13 @@ template event_revoker impl_IRacingWheelStatic template void impl_IRacingWheelStatics::RacingWheelAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RacingWheelAdded(token)); + check_hresult(WINRT_SHIM(IRacingWheelStatics)->remove_RacingWheelAdded(token)); } template event_token impl_IRacingWheelStatics::RacingWheelRemoved(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RacingWheelRemoved(get(value), &token)); + check_hresult(WINRT_SHIM(IRacingWheelStatics)->add_RacingWheelRemoved(get_abi(value), &token)); return token; } @@ -989,41 +1040,41 @@ template event_revoker impl_IRacingWheelStatic template void impl_IRacingWheelStatics::RacingWheelRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RacingWheelRemoved(token)); + check_hresult(WINRT_SHIM(IRacingWheelStatics)->remove_RacingWheelRemoved(token)); } template Windows::Foundation::Collections::IVectorView impl_IRacingWheelStatics::RacingWheels() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RacingWheels(put(value))); + check_hresult(WINRT_SHIM(IRacingWheelStatics)->get_RacingWheels(put_abi(value))); return value; } template Windows::Gaming::Input::UINavigationReading impl_IUINavigationController::GetCurrentReading() const { Windows::Gaming::Input::UINavigationReading value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentReading(put(value))); + check_hresult(WINRT_SHIM(IUINavigationController)->abi_GetCurrentReading(put_abi(value))); return value; } template Windows::Gaming::Input::GameControllerButtonLabel impl_IUINavigationController::GetOptionalButtonLabel(Windows::Gaming::Input::OptionalUINavigationButtons button) const { Windows::Gaming::Input::GameControllerButtonLabel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetOptionalButtonLabel(button, &value)); + check_hresult(WINRT_SHIM(IUINavigationController)->abi_GetOptionalButtonLabel(button, &value)); return value; } template Windows::Gaming::Input::GameControllerButtonLabel impl_IUINavigationController::GetRequiredButtonLabel(Windows::Gaming::Input::RequiredUINavigationButtons button) const { Windows::Gaming::Input::GameControllerButtonLabel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRequiredButtonLabel(button, &value)); + check_hresult(WINRT_SHIM(IUINavigationController)->abi_GetRequiredButtonLabel(button, &value)); return value; } template event_token impl_IUINavigationControllerStatics::UINavigationControllerAdded(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UINavigationControllerAdded(get(value), &token)); + check_hresult(WINRT_SHIM(IUINavigationControllerStatics)->add_UINavigationControllerAdded(get_abi(value), &token)); return token; } @@ -1034,13 +1085,13 @@ template event_revoker impl_IUINavi template void impl_IUINavigationControllerStatics::UINavigationControllerAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UINavigationControllerAdded(token)); + check_hresult(WINRT_SHIM(IUINavigationControllerStatics)->remove_UINavigationControllerAdded(token)); } template event_token impl_IUINavigationControllerStatics::UINavigationControllerRemoved(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UINavigationControllerRemoved(get(value), &token)); + check_hresult(WINRT_SHIM(IUINavigationControllerStatics)->add_UINavigationControllerRemoved(get_abi(value), &token)); return token; } @@ -1051,13 +1102,13 @@ template event_revoker impl_IUINavi template void impl_IUINavigationControllerStatics::UINavigationControllerRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UINavigationControllerRemoved(token)); + check_hresult(WINRT_SHIM(IUINavigationControllerStatics)->remove_UINavigationControllerRemoved(token)); } template Windows::Foundation::Collections::IVectorView impl_IUINavigationControllerStatics::UINavigationControllers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_UINavigationControllers(put(value))); + check_hresult(WINRT_SHIM(IUINavigationControllerStatics)->get_UINavigationControllers(put_abi(value))); return value; } @@ -1212,3 +1263,149 @@ inline Windows::Foundation::Collections::IVectorView +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IArcadeStick & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IArcadeStickStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IGameController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IGamepad & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IGamepad2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IGamepadStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IHeadset & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IRacingWheel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IRacingWheelStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IUINavigationController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::IUINavigationControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::ArcadeStick & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Gamepad & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::Headset & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::RacingWheel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Input::UINavigationController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Gaming.Preview.GamesEnumeration.h b/10.0.14393.0/winrt/Windows.Gaming.Preview.GamesEnumeration.h index dadd55d25..6a89955db 100644 --- a/10.0.14393.0/winrt/Windows.Gaming.Preview.GamesEnumeration.h +++ b/10.0.14393.0/winrt/Windows.Gaming.Preview.GamesEnumeration.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -26,7 +29,7 @@ template GameListChangedEventHandler::GameListChangedEv inline void GameListChangedEventHandler::operator()(const Windows::Gaming::Preview::GamesEnumeration::GameListEntry & game) const { - check_hresult((*this)->abi_Invoke(get(game))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(game))); } template GameListRemovedEventHandler::GameListRemovedEventHandler(L lambda) : @@ -41,9 +44,9 @@ template GameListRemovedEventHandler::GameListRemovedEv GameListRemovedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void GameListRemovedEventHandler::operator()(hstring_ref identifier) const +inline void GameListRemovedEventHandler::operator()(hstring_view identifier) const { - check_hresult((*this)->abi_Invoke(get(identifier))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(identifier))); } } @@ -53,11 +56,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DisplayInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayInfo()); return S_OK; } catch (...) @@ -67,11 +71,12 @@ struct produce : } } - HRESULT __stdcall abi_LaunchAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchAsync()); return S_OK; } catch (...) @@ -85,7 +90,8 @@ struct produce : { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -94,11 +100,12 @@ struct produce : } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -108,11 +115,12 @@ struct produce : } } - HRESULT __stdcall abi_SetCategoryAsync(Windows::Gaming::Preview::GamesEnumeration::GameListCategory value, abi_arg_out action) noexcept override + HRESULT __stdcall abi_SetCategoryAsync(Windows::Gaming::Preview::GamesEnumeration::GameListCategory value, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().SetCategoryAsync(value)); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().SetCategoryAsync(value)); return S_OK; } catch (...) @@ -126,11 +134,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_FindAllAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -140,11 +149,12 @@ struct produce } } - HRESULT __stdcall abi_FindAllAsyncPackageFamilyName(abi_arg_in packageFamilyName, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsyncPackageFamilyName(impl::abi_arg_in packageFamilyName, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync(*reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -154,11 +164,12 @@ struct produce } } - HRESULT __stdcall add_GameAdded(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_GameAdded(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GameAdded(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GameAdded(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -171,6 +182,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().GameAdded(token); return S_OK; } @@ -180,11 +192,12 @@ struct produce } } - HRESULT __stdcall add_GameRemoved(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_GameRemoved(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GameRemoved(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GameRemoved(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -197,6 +210,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().GameRemoved(token); return S_OK; } @@ -206,11 +220,12 @@ struct produce } } - HRESULT __stdcall add_GameUpdated(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_GameUpdated(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GameUpdated(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GameUpdated(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -223,6 +238,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().GameUpdated(token); return S_OK; } @@ -240,56 +256,56 @@ namespace Windows::Gaming::Preview::GamesEnumeration { template Windows::ApplicationModel::AppDisplayInfo impl_IGameListEntry::DisplayInfo() const { Windows::ApplicationModel::AppDisplayInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayInfo(put(value))); + check_hresult(WINRT_SHIM(IGameListEntry)->get_DisplayInfo(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGameListEntry::LaunchAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchAsync(put(operation))); + check_hresult(WINRT_SHIM(IGameListEntry)->abi_LaunchAsync(put_abi(operation))); return operation; } template Windows::Gaming::Preview::GamesEnumeration::GameListCategory impl_IGameListEntry::Category() const { Windows::Gaming::Preview::GamesEnumeration::GameListCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_Category(&value)); + check_hresult(WINRT_SHIM(IGameListEntry)->get_Category(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IGameListEntry::Properties() const +template Windows::Foundation::Collections::IMapView impl_IGameListEntry::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IGameListEntry)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IGameListEntry::SetCategoryAsync(Windows::Gaming::Preview::GamesEnumeration::GameListCategory value) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_SetCategoryAsync(value, put(action))); + check_hresult(WINRT_SHIM(IGameListEntry)->abi_SetCategoryAsync(value, put_abi(action))); return action; } template Windows::Foundation::IAsyncOperation> impl_IGameListStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(operation))); + check_hresult(WINRT_SHIM(IGameListStatics)->abi_FindAllAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IGameListStatics::FindAllAsync(hstring_ref packageFamilyName) const +template Windows::Foundation::IAsyncOperation> impl_IGameListStatics::FindAllAsync(hstring_view packageFamilyName) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncPackageFamilyName(get(packageFamilyName), put(operation))); + check_hresult(WINRT_SHIM(IGameListStatics)->abi_FindAllAsyncPackageFamilyName(get_abi(packageFamilyName), put_abi(operation))); return operation; } template event_token impl_IGameListStatics::GameAdded(const Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GameAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IGameListStatics)->add_GameAdded(get_abi(handler), &token)); return token; } @@ -300,13 +316,13 @@ template event_revoker impl_IGameListStatics:: template void impl_IGameListStatics::GameAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GameAdded(token)); + check_hresult(WINRT_SHIM(IGameListStatics)->remove_GameAdded(token)); } template event_token impl_IGameListStatics::GameRemoved(const Windows::Gaming::Preview::GamesEnumeration::GameListRemovedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GameRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IGameListStatics)->add_GameRemoved(get_abi(handler), &token)); return token; } @@ -317,13 +333,13 @@ template event_revoker impl_IGameListStatics:: template void impl_IGameListStatics::GameRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GameRemoved(token)); + check_hresult(WINRT_SHIM(IGameListStatics)->remove_GameRemoved(token)); } template event_token impl_IGameListStatics::GameUpdated(const Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GameUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IGameListStatics)->add_GameUpdated(get_abi(handler), &token)); return token; } @@ -334,7 +350,7 @@ template event_revoker impl_IGameListStatics:: template void impl_IGameListStatics::GameUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GameUpdated(token)); + check_hresult(WINRT_SHIM(IGameListStatics)->remove_GameUpdated(token)); } inline Windows::Foundation::IAsyncOperation> GameList::FindAllAsync() @@ -342,7 +358,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation> GameList::FindAllAsync(hstring_ref packageFamilyName) +inline Windows::Foundation::IAsyncOperation> GameList::FindAllAsync(hstring_view packageFamilyName) { return get_activation_factory().FindAllAsync(packageFamilyName); } @@ -398,3 +414,32 @@ inline void GameList::GameUpdated(event_token token) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Preview::GamesEnumeration::IGameListEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Preview::GamesEnumeration::IGameListStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Gaming.UI.h b/10.0.14393.0/winrt/Windows.Gaming.UI.h index c0d5d6faf..ddea43429 100644 --- a/10.0.14393.0/winrt/Windows.Gaming.UI.h +++ b/10.0.14393.0/winrt/Windows.Gaming.UI.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Gaming.UI.3.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_VisibilityChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VisibilityChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -30,6 +34,7 @@ struct produce : produce_baseshim()); this->shim().VisibilityChanged(token); return S_OK; } @@ -39,11 +44,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_IsInputRedirectedChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().IsInputRedirectedChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsInputRedirectedChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -56,6 +62,7 @@ struct produce : produce_baseshim()); this->shim().IsInputRedirectedChanged(token); return S_OK; } @@ -69,7 +76,8 @@ struct produce : produce_baseshim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -82,7 +90,8 @@ struct produce : produce_baseshim().IsInputRedirected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInputRedirected()); return S_OK; } catch (...) @@ -96,60 +105,60 @@ struct produce : produce_base event_token impl_IGameBarStatics::VisibilityChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IGameBarStatics::VisibilityChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VisibilityChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGameBarStatics)->add_VisibilityChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IGameBarStatics::VisibilityChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IGameBarStatics::VisibilityChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Gaming::UI::IGameBarStatics::remove_VisibilityChanged, VisibilityChanged(handler)); } template void impl_IGameBarStatics::VisibilityChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VisibilityChanged(token)); + check_hresult(WINRT_SHIM(IGameBarStatics)->remove_VisibilityChanged(token)); } -template event_token impl_IGameBarStatics::IsInputRedirectedChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IGameBarStatics::IsInputRedirectedChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_IsInputRedirectedChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IGameBarStatics)->add_IsInputRedirectedChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IGameBarStatics::IsInputRedirectedChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IGameBarStatics::IsInputRedirectedChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Gaming::UI::IGameBarStatics::remove_IsInputRedirectedChanged, IsInputRedirectedChanged(handler)); } template void impl_IGameBarStatics::IsInputRedirectedChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_IsInputRedirectedChanged(token)); + check_hresult(WINRT_SHIM(IGameBarStatics)->remove_IsInputRedirectedChanged(token)); } template bool impl_IGameBarStatics::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IGameBarStatics)->get_Visible(&value)); return value; } template bool impl_IGameBarStatics::IsInputRedirected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInputRedirected(&value)); + check_hresult(WINRT_SHIM(IGameBarStatics)->get_IsInputRedirected(&value)); return value; } -inline event_token GameBar::VisibilityChanged(const Windows::Foundation::EventHandler & handler) +inline event_token GameBar::VisibilityChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().VisibilityChanged(handler); } -inline factory_event_revoker GameBar::VisibilityChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker GameBar::VisibilityChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Gaming::UI::IGameBarStatics::remove_VisibilityChanged, factory.VisibilityChanged(handler) }; @@ -160,12 +169,12 @@ inline void GameBar::VisibilityChanged(event_token token) get_activation_factory().VisibilityChanged(token); } -inline event_token GameBar::IsInputRedirectedChanged(const Windows::Foundation::EventHandler & handler) +inline event_token GameBar::IsInputRedirectedChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().IsInputRedirectedChanged(handler); } -inline factory_event_revoker GameBar::IsInputRedirectedChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker GameBar::IsInputRedirectedChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Gaming::UI::IGameBarStatics::remove_IsInputRedirectedChanged, factory.IsInputRedirectedChanged(handler) }; @@ -189,3 +198,14 @@ inline bool GameBar::IsInputRedirected() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Gaming::UI::IGameBarStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.Collation.h b/10.0.14393.0/winrt/Windows.Globalization.Collation.h index cdc0c13e1..ecda4d611 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.Collation.h +++ b/10.0.14393.0/winrt/Windows.Globalization.Collation.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Globalization.Collation.3.h" #include "Windows.Globalization.h" #include "Windows.Foundation.Collections.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_First(abi_arg_out value) noexcept override + HRESULT __stdcall get_First(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().First()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().First()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produ } } - HRESULT __stdcall get_Label(abi_arg_out value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Lookup(abi_arg_in text, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Lookup(impl::abi_arg_in text, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Lookup(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Lookup(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -68,21 +74,21 @@ namespace Windows::Globalization::Collation { template hstring impl_ICharacterGrouping::First() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_First(put(value))); + check_hresult(WINRT_SHIM(ICharacterGrouping)->get_First(put_abi(value))); return value; } template hstring impl_ICharacterGrouping::Label() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Label(put(value))); + check_hresult(WINRT_SHIM(ICharacterGrouping)->get_Label(put_abi(value))); return value; } -template hstring impl_ICharacterGroupings::Lookup(hstring_ref text) const +template hstring impl_ICharacterGroupings::Lookup(hstring_view text) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_Lookup(get(text), put(result))); + check_hresult(WINRT_SHIM(ICharacterGroupings)->abi_Lookup(get_abi(text), put_abi(result))); return result; } @@ -93,3 +99,41 @@ inline CharacterGroupings::CharacterGroupings() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Collation::ICharacterGrouping & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Collation::ICharacterGroupings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Collation::CharacterGrouping & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Collation::CharacterGroupings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.DateTimeFormatting.h b/10.0.14393.0/winrt/Windows.Globalization.DateTimeFormatting.h index 3c665ddba..b94ebc076 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.DateTimeFormatting.h +++ b/10.0.14393.0/winrt/Windows.Globalization.DateTimeFormatting.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Globalization.DateTimeFormatting.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Languages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeographicRegion()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Calendar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Calendar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Calendar()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Clock(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clock()); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NumeralSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumeralSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumeralSystem()); return S_OK; } catch (...) @@ -85,10 +93,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_NumeralSystem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NumeralSystem(*reinterpret_cast(&value)); return S_OK; } @@ -98,11 +107,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Patterns(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Patterns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Patterns()); return S_OK; } catch (...) @@ -112,11 +122,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Template(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Template()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Template()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Format(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -144,7 +156,8 @@ struct produceshim().IncludeYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeYear()); return S_OK; } catch (...) @@ -157,7 +170,8 @@ struct produceshim().IncludeMonth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeMonth()); return S_OK; } catch (...) @@ -170,7 +184,8 @@ struct produceshim().IncludeDayOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeDayOfWeek()); return S_OK; } catch (...) @@ -183,7 +198,8 @@ struct produceshim().IncludeDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeDay()); return S_OK; } catch (...) @@ -196,7 +212,8 @@ struct produceshim().IncludeHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeHour()); return S_OK; } catch (...) @@ -209,7 +226,8 @@ struct produceshim().IncludeMinute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeMinute()); return S_OK; } catch (...) @@ -222,7 +240,8 @@ struct produceshim().IncludeSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeSecond()); return S_OK; } catch (...) @@ -231,11 +250,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -245,11 +265,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResolvedGeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedGeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedGeographicRegion()); return S_OK; } catch (...) @@ -263,11 +284,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FormatUsingTimeZone(abi_arg_in datetime, abi_arg_in timeZoneId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatUsingTimeZone(impl::abi_arg_in datetime, impl::abi_arg_in timeZoneId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(*reinterpret_cast(&datetime), *reinterpret_cast(&timeZoneId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(*reinterpret_cast(&datetime), *reinterpret_cast(&timeZoneId))); return S_OK; } catch (...) @@ -281,11 +303,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateDateTimeFormatter(abi_arg_in formatTemplate, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatter(impl::abi_arg_in formatTemplate, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatter(*reinterpret_cast(&formatTemplate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatter(*reinterpret_cast(&formatTemplate))); return S_OK; } catch (...) @@ -295,11 +318,12 @@ struct produce formatTemplate, abi_arg_in> languages, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterLanguages(impl::abi_arg_in formatTemplate, impl::abi_arg_in> languages, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterLanguages(*reinterpret_cast(&formatTemplate), *reinterpret_cast *>(&languages))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterLanguages(*reinterpret_cast(&formatTemplate), *reinterpret_cast *>(&languages))); return S_OK; } catch (...) @@ -309,11 +333,12 @@ struct produce formatTemplate, abi_arg_in> languages, abi_arg_in geographicRegion, abi_arg_in calendar, abi_arg_in clock, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterContext(impl::abi_arg_in formatTemplate, impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_in calendar, impl::abi_arg_in clock, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterContext(*reinterpret_cast(&formatTemplate), *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterContext(*reinterpret_cast(&formatTemplate), *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); return S_OK; } catch (...) @@ -323,11 +348,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterDate(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterDate(yearFormat, monthFormat, dayFormat, dayOfWeekFormat)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterDate(yearFormat, monthFormat, dayFormat, dayOfWeekFormat)); return S_OK; } catch (...) @@ -337,11 +363,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterTime(Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterTime(hourFormat, minuteFormat, secondFormat)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterTime(hourFormat, minuteFormat, secondFormat)); return S_OK; } catch (...) @@ -351,11 +378,12 @@ struct produce> languages, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterDateTimeLanguages(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, impl::abi_arg_in> languages, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterDateTimeLanguages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, *reinterpret_cast *>(&languages))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterDateTimeLanguages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, *reinterpret_cast *>(&languages))); return S_OK; } catch (...) @@ -365,11 +393,12 @@ struct produce> languages, abi_arg_in geographicRegion, abi_arg_in calendar, abi_arg_in clock, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDateTimeFormatterDateTimeContext(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_in calendar, impl::abi_arg_in clock, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDateTimeFormatterDateTimeContext(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDateTimeFormatterDateTimeContext(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); return S_OK; } catch (...) @@ -383,11 +412,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LongDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_LongDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LongDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LongDate()); return S_OK; } catch (...) @@ -397,11 +427,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LongTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LongTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LongTime()); return S_OK; } catch (...) @@ -411,11 +442,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ShortDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShortDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShortDate()); return S_OK; } catch (...) @@ -425,11 +457,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ShortTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShortTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShortTime()); return S_OK; } catch (...) @@ -447,220 +480,220 @@ namespace Windows::Globalization::DateTimeFormatting { template Windows::Foundation::Collections::IVectorView impl_IDateTimeFormatter::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_Languages(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::GeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GeographicRegion(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_GeographicRegion(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::Calendar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Calendar(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_Calendar(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::Clock() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Clock(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_Clock(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::NumeralSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumeralSystem(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_NumeralSystem(put_abi(value))); return value; } -template void impl_IDateTimeFormatter::NumeralSystem(hstring_ref value) const +template void impl_IDateTimeFormatter::NumeralSystem(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_NumeralSystem(get(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->put_NumeralSystem(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IDateTimeFormatter::Patterns() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Patterns(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_Patterns(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::Template() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Template(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_Template(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::Format(const Windows::Foundation::DateTime & value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_Format(get(value), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->abi_Format(get_abi(value), put_abi(result))); return result; } template Windows::Globalization::DateTimeFormatting::YearFormat impl_IDateTimeFormatter::IncludeYear() const { Windows::Globalization::DateTimeFormatting::YearFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeYear(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeYear(&value)); return value; } template Windows::Globalization::DateTimeFormatting::MonthFormat impl_IDateTimeFormatter::IncludeMonth() const { Windows::Globalization::DateTimeFormatting::MonthFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeMonth(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeMonth(&value)); return value; } template Windows::Globalization::DateTimeFormatting::DayOfWeekFormat impl_IDateTimeFormatter::IncludeDayOfWeek() const { Windows::Globalization::DateTimeFormatting::DayOfWeekFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeDayOfWeek(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeDayOfWeek(&value)); return value; } template Windows::Globalization::DateTimeFormatting::DayFormat impl_IDateTimeFormatter::IncludeDay() const { Windows::Globalization::DateTimeFormatting::DayFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeDay(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeDay(&value)); return value; } template Windows::Globalization::DateTimeFormatting::HourFormat impl_IDateTimeFormatter::IncludeHour() const { Windows::Globalization::DateTimeFormatting::HourFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeHour(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeHour(&value)); return value; } template Windows::Globalization::DateTimeFormatting::MinuteFormat impl_IDateTimeFormatter::IncludeMinute() const { Windows::Globalization::DateTimeFormatting::MinuteFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeMinute(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeMinute(&value)); return value; } template Windows::Globalization::DateTimeFormatting::SecondFormat impl_IDateTimeFormatter::IncludeSecond() const { Windows::Globalization::DateTimeFormatting::SecondFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeSecond(&value)); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_IncludeSecond(&value)); return value; } template hstring impl_IDateTimeFormatter::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_ResolvedLanguage(put_abi(value))); return value; } template hstring impl_IDateTimeFormatter::ResolvedGeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedGeographicRegion(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatter)->get_ResolvedGeographicRegion(put_abi(value))); return value; } -template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatter(hstring_ref formatTemplate) const +template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatter(hstring_view formatTemplate) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatter(get(formatTemplate), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatter(get_abi(formatTemplate), put_abi(result))); return result; } -template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterLanguages(hstring_ref formatTemplate, const Windows::Foundation::Collections::IIterable & languages) const +template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterLanguages(hstring_view formatTemplate, iterable languages) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterLanguages(get(formatTemplate), get(languages), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterLanguages(get_abi(formatTemplate), get_abi(languages), put_abi(result))); return result; } -template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterContext(hstring_ref formatTemplate, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion, hstring_ref calendar, hstring_ref clock) const +template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterContext(hstring_view formatTemplate, iterable languages, hstring_view geographicRegion, hstring_view calendar, hstring_view clock) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterContext(get(formatTemplate), get(languages), get(geographicRegion), get(calendar), get(clock), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterContext(get_abi(formatTemplate), get_abi(languages), get_abi(geographicRegion), get_abi(calendar), get_abi(clock), put_abi(result))); return result; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterDate(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterDate(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterDate(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, put_abi(result))); return result; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterTime(Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterTime(hourFormat, minuteFormat, secondFormat, put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterTime(hourFormat, minuteFormat, secondFormat, put_abi(result))); return result; } -template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterDateTimeLanguages(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, const Windows::Foundation::Collections::IIterable & languages) const +template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterDateTimeLanguages(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, iterable languages) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterDateTimeLanguages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, get(languages), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterDateTimeLanguages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, get_abi(languages), put_abi(result))); return result; } -template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterDateTimeContext(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion, hstring_ref calendar, hstring_ref clock) const +template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterFactory::CreateDateTimeFormatterDateTimeContext(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, iterable languages, hstring_view geographicRegion, hstring_view calendar, hstring_view clock) const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDateTimeFormatterDateTimeContext(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, get(languages), get(geographicRegion), get(calendar), get(clock), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatterFactory)->abi_CreateDateTimeFormatterDateTimeContext(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, get_abi(languages), get_abi(geographicRegion), get_abi(calendar), get_abi(clock), put_abi(result))); return result; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterStatics::LongDate() const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LongDate(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatterStatics)->get_LongDate(put_abi(value))); return value; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterStatics::LongTime() const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LongTime(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatterStatics)->get_LongTime(put_abi(value))); return value; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterStatics::ShortDate() const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShortDate(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatterStatics)->get_ShortDate(put_abi(value))); return value; } template Windows::Globalization::DateTimeFormatting::DateTimeFormatter impl_IDateTimeFormatterStatics::ShortTime() const { Windows::Globalization::DateTimeFormatting::DateTimeFormatter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShortTime(put(value))); + check_hresult(WINRT_SHIM(IDateTimeFormatterStatics)->get_ShortTime(put_abi(value))); return value; } -template hstring impl_IDateTimeFormatter2::Format(const Windows::Foundation::DateTime & datetime, hstring_ref timeZoneId) const +template hstring impl_IDateTimeFormatter2::Format(const Windows::Foundation::DateTime & datetime, hstring_view timeZoneId) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatUsingTimeZone(get(datetime), get(timeZoneId), put(result))); + check_hresult(WINRT_SHIM(IDateTimeFormatter2)->abi_FormatUsingTimeZone(get_abi(datetime), get_abi(timeZoneId), put_abi(result))); return result; } -inline DateTimeFormatter::DateTimeFormatter(hstring_ref formatTemplate) : +inline DateTimeFormatter::DateTimeFormatter(hstring_view formatTemplate) : DateTimeFormatter(get_activation_factory().CreateDateTimeFormatter(formatTemplate)) {} -inline DateTimeFormatter::DateTimeFormatter(hstring_ref formatTemplate, const Windows::Foundation::Collections::IIterable & languages) : +inline DateTimeFormatter::DateTimeFormatter(hstring_view formatTemplate, iterable languages) : DateTimeFormatter(get_activation_factory().CreateDateTimeFormatterLanguages(formatTemplate, languages)) {} -inline DateTimeFormatter::DateTimeFormatter(hstring_ref formatTemplate, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion, hstring_ref calendar, hstring_ref clock) : +inline DateTimeFormatter::DateTimeFormatter(hstring_view formatTemplate, iterable languages, hstring_view geographicRegion, hstring_view calendar, hstring_view clock) : DateTimeFormatter(get_activation_factory().CreateDateTimeFormatterContext(formatTemplate, languages, geographicRegion, calendar, clock)) {} @@ -672,11 +705,11 @@ inline DateTimeFormatter::DateTimeFormatter(Windows::Globalization::DateTimeForm DateTimeFormatter(get_activation_factory().CreateDateTimeFormatterTime(hourFormat, minuteFormat, secondFormat)) {} -inline DateTimeFormatter::DateTimeFormatter(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, const Windows::Foundation::Collections::IIterable & languages) : +inline DateTimeFormatter::DateTimeFormatter(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, iterable languages) : DateTimeFormatter(get_activation_factory().CreateDateTimeFormatterDateTimeLanguages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages)) {} -inline DateTimeFormatter::DateTimeFormatter(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion, hstring_ref calendar, hstring_ref clock) : +inline DateTimeFormatter::DateTimeFormatter(Windows::Globalization::DateTimeFormatting::YearFormat yearFormat, Windows::Globalization::DateTimeFormatting::MonthFormat monthFormat, Windows::Globalization::DateTimeFormatting::DayFormat dayFormat, Windows::Globalization::DateTimeFormatting::DayOfWeekFormat dayOfWeekFormat, Windows::Globalization::DateTimeFormatting::HourFormat hourFormat, Windows::Globalization::DateTimeFormatting::MinuteFormat minuteFormat, Windows::Globalization::DateTimeFormatting::SecondFormat secondFormat, iterable languages, hstring_view geographicRegion, hstring_view calendar, hstring_view clock) : DateTimeFormatter(get_activation_factory().CreateDateTimeFormatterDateTimeContext(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages, geographicRegion, calendar, clock)) {} @@ -703,3 +736,50 @@ inline Windows::Globalization::DateTimeFormatting::DateTimeFormatter DateTimeFor } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::DateTimeFormatting::IDateTimeFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::DateTimeFormatting::IDateTimeFormatter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::DateTimeFormatting::IDateTimeFormatterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::DateTimeFormatting::IDateTimeFormatterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::DateTimeFormatting::DateTimeFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.Fonts.h b/10.0.14393.0/winrt/Windows.Globalization.Fonts.h index 888701edd..92a9ed000 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.Fonts.h +++ b/10.0.14393.0/winrt/Windows.Globalization.Fonts.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Text.3.h" #include "internal/Windows.Globalization.Fonts.3.h" #include "Windows.Globalization.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FontFamily(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produce_base weight) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out weight) noexcept override { try { - *weight = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *weight = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -45,7 +50,8 @@ struct produce : produce_baseshim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *stretch = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -58,7 +64,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *style = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -71,7 +78,8 @@ struct produce : produce_baseshim().ScaleFactor()); + typename D::abi_guard guard(this->shim()); + *scale = detach_abi(this->shim().ScaleFactor()); return S_OK; } catch (...) @@ -84,11 +92,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_UITextFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_UITextFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UITextFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UITextFont()); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_UIHeadingFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_UIHeadingFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UIHeadingFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UIHeadingFont()); return S_OK; } catch (...) @@ -112,11 +122,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_UITitleFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_UITitleFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UITitleFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UITitleFont()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_UICaptionFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_UICaptionFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UICaptionFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UICaptionFont()); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_UINotificationHeadingFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_UINotificationHeadingFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UINotificationHeadingFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UINotificationHeadingFont()); return S_OK; } catch (...) @@ -154,11 +167,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TraditionalDocumentFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_TraditionalDocumentFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TraditionalDocumentFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TraditionalDocumentFont()); return S_OK; } catch (...) @@ -168,11 +182,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ModernDocumentFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_ModernDocumentFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModernDocumentFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModernDocumentFont()); return S_OK; } catch (...) @@ -182,11 +197,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DocumentHeadingFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentHeadingFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentHeadingFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentHeadingFont()); return S_OK; } catch (...) @@ -196,11 +212,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FixedWidthTextFont(abi_arg_out value) noexcept override + HRESULT __stdcall get_FixedWidthTextFont(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FixedWidthTextFont()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FixedWidthTextFont()); return S_OK; } catch (...) @@ -210,11 +227,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DocumentAlternate1Font(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentAlternate1Font(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentAlternate1Font()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentAlternate1Font()); return S_OK; } catch (...) @@ -224,11 +242,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DocumentAlternate2Font(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentAlternate2Font(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentAlternate2Font()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentAlternate2Font()); return S_OK; } catch (...) @@ -242,11 +261,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateLanguageFontGroup(abi_arg_in languageTag, abi_arg_out recommendedFonts) noexcept override + HRESULT __stdcall abi_CreateLanguageFontGroup(impl::abi_arg_in languageTag, impl::abi_arg_out recommendedFonts) noexcept override { try { - *recommendedFonts = detach(this->shim().CreateLanguageFontGroup(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *recommendedFonts = detach_abi(this->shim().CreateLanguageFontGroup(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -264,126 +284,173 @@ namespace Windows::Globalization::Fonts { template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::UITextFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UITextFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_UITextFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::UIHeadingFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UIHeadingFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_UIHeadingFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::UITitleFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UITitleFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_UITitleFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::UICaptionFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UICaptionFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_UICaptionFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::UINotificationHeadingFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UINotificationHeadingFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_UINotificationHeadingFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::TraditionalDocumentFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TraditionalDocumentFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_TraditionalDocumentFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::ModernDocumentFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ModernDocumentFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_ModernDocumentFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::DocumentHeadingFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentHeadingFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_DocumentHeadingFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::FixedWidthTextFont() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FixedWidthTextFont(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_FixedWidthTextFont(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::DocumentAlternate1Font() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentAlternate1Font(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_DocumentAlternate1Font(put_abi(value))); return value; } template Windows::Globalization::Fonts::LanguageFont impl_ILanguageFontGroup::DocumentAlternate2Font() const { Windows::Globalization::Fonts::LanguageFont value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentAlternate2Font(put(value))); + check_hresult(WINRT_SHIM(ILanguageFontGroup)->get_DocumentAlternate2Font(put_abi(value))); return value; } -template Windows::Globalization::Fonts::LanguageFontGroup impl_ILanguageFontGroupFactory::CreateLanguageFontGroup(hstring_ref languageTag) const +template Windows::Globalization::Fonts::LanguageFontGroup impl_ILanguageFontGroupFactory::CreateLanguageFontGroup(hstring_view languageTag) const { Windows::Globalization::Fonts::LanguageFontGroup recommendedFonts { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLanguageFontGroup(get(languageTag), put(recommendedFonts))); + check_hresult(WINRT_SHIM(ILanguageFontGroupFactory)->abi_CreateLanguageFontGroup(get_abi(languageTag), put_abi(recommendedFonts))); return recommendedFonts; } template hstring impl_ILanguageFont::FontFamily() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(ILanguageFont)->get_FontFamily(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_ILanguageFont::FontWeight() const { Windows::UI::Text::FontWeight weight {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(put(weight))); + check_hresult(WINRT_SHIM(ILanguageFont)->get_FontWeight(put_abi(weight))); return weight; } template Windows::UI::Text::FontStretch impl_ILanguageFont::FontStretch() const { Windows::UI::Text::FontStretch stretch {}; - check_hresult(static_cast(static_cast(*this))->get_FontStretch(&stretch)); + check_hresult(WINRT_SHIM(ILanguageFont)->get_FontStretch(&stretch)); return stretch; } template Windows::UI::Text::FontStyle impl_ILanguageFont::FontStyle() const { Windows::UI::Text::FontStyle style {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&style)); + check_hresult(WINRT_SHIM(ILanguageFont)->get_FontStyle(&style)); return style; } template double impl_ILanguageFont::ScaleFactor() const { double scale {}; - check_hresult(static_cast(static_cast(*this))->get_ScaleFactor(&scale)); + check_hresult(WINRT_SHIM(ILanguageFont)->get_ScaleFactor(&scale)); return scale; } -inline LanguageFontGroup::LanguageFontGroup(hstring_ref languageTag) : +inline LanguageFontGroup::LanguageFontGroup(hstring_view languageTag) : LanguageFontGroup(get_activation_factory().CreateLanguageFontGroup(languageTag)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Fonts::ILanguageFont & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Fonts::ILanguageFontGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Fonts::ILanguageFontGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Fonts::LanguageFont & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Fonts::LanguageFontGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.NumberFormatting.h b/10.0.14393.0/winrt/Windows.Globalization.NumberFormatting.h index bfa7d1e73..320fdf802 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.NumberFormatting.h +++ b/10.0.14393.0/winrt/Windows.Globalization.NumberFormatting.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Globalization.NumberFormatting.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Currency(abi_arg_out value) noexcept override + HRESULT __stdcall get_Currency(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Currency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Currency()); return S_OK; } catch (...) @@ -29,10 +33,11 @@ struct produce } } - HRESULT __stdcall put_Currency(abi_arg_in value) noexcept override + HRESULT __stdcall put_Currency(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Currency(*reinterpret_cast(&value)); return S_OK; } @@ -50,7 +55,8 @@ struct produce { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -63,6 +69,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -76,6 +83,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplyRoundingForCurrency(roundingAlgorithm); return S_OK; } @@ -89,11 +97,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateCurrencyFormatterCode(abi_arg_in currencyCode, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCurrencyFormatterCode(impl::abi_arg_in currencyCode, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCurrencyFormatterCode(*reinterpret_cast(¤cyCode))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCurrencyFormatterCode(*reinterpret_cast(¤cyCode))); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce currencyCode, abi_arg_in> languages, abi_arg_in geographicRegion, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCurrencyFormatterCodeContext(impl::abi_arg_in currencyCode, impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCurrencyFormatterCodeContext(*reinterpret_cast(¤cyCode), *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCurrencyFormatterCodeContext(*reinterpret_cast(¤cyCode), *reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateDecimalFormatter(abi_arg_in> languages, abi_arg_in geographicRegion, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDecimalFormatter(impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDecimalFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDecimalFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); return S_OK; } catch (...) @@ -143,7 +154,8 @@ struct produceshim().RoundingAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoundingAlgorithm()); return S_OK; } catch (...) @@ -156,6 +168,7 @@ struct produceshim()); this->shim().RoundingAlgorithm(value); return S_OK; } @@ -169,7 +182,8 @@ struct produceshim().Increment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Increment()); return S_OK; } catch (...) @@ -182,6 +196,7 @@ struct produceshim()); this->shim().Increment(value); return S_OK; } @@ -195,11 +210,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FormatInt(int64_t value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatInt(int64_t value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(value)); return S_OK; } catch (...) @@ -209,11 +225,12 @@ struct produce : } } - HRESULT __stdcall abi_FormatUInt(uint64_t value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatUInt(uint64_t value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(value)); return S_OK; } catch (...) @@ -223,11 +240,12 @@ struct produce : } } - HRESULT __stdcall abi_FormatDouble(double value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatDouble(double value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(value)); return S_OK; } catch (...) @@ -241,11 +259,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_FormatInt(int64_t value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatInt(int64_t value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatInt(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatInt(value)); return S_OK; } catch (...) @@ -255,11 +274,12 @@ struct produce : } } - HRESULT __stdcall abi_FormatUInt(uint64_t value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatUInt(uint64_t value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatUInt(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatUInt(value)); return S_OK; } catch (...) @@ -269,11 +289,12 @@ struct produce : } } - HRESULT __stdcall abi_FormatDouble(double value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatDouble(double value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatDouble(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatDouble(value)); return S_OK; } catch (...) @@ -287,11 +308,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Languages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -301,11 +323,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeographicRegion()); return S_OK; } catch (...) @@ -319,7 +342,8 @@ struct produceshim().IntegerDigits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntegerDigits()); return S_OK; } catch (...) @@ -332,6 +356,7 @@ struct produceshim()); this->shim().IntegerDigits(value); return S_OK; } @@ -345,7 +370,8 @@ struct produceshim().FractionDigits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FractionDigits()); return S_OK; } catch (...) @@ -358,6 +384,7 @@ struct produceshim()); this->shim().FractionDigits(value); return S_OK; } @@ -371,7 +398,8 @@ struct produceshim().IsGrouped()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGrouped()); return S_OK; } catch (...) @@ -384,6 +412,7 @@ struct produceshim()); this->shim().IsGrouped(value); return S_OK; } @@ -397,7 +426,8 @@ struct produceshim().IsDecimalPointAlwaysDisplayed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDecimalPointAlwaysDisplayed()); return S_OK; } catch (...) @@ -410,6 +440,7 @@ struct produceshim()); this->shim().IsDecimalPointAlwaysDisplayed(value); return S_OK; } @@ -419,11 +450,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NumeralSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumeralSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumeralSystem()); return S_OK; } catch (...) @@ -433,10 +465,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_NumeralSystem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NumeralSystem(*reinterpret_cast(&value)); return S_OK; } @@ -446,11 +479,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -460,11 +494,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResolvedGeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedGeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedGeographicRegion()); return S_OK; } catch (...) @@ -478,11 +513,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ParseInt(abi_arg_in text, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ParseInt(impl::abi_arg_in text, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ParseInt(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ParseInt(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -492,11 +528,12 @@ struct produce : pro } } - HRESULT __stdcall abi_ParseUInt(abi_arg_in text, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ParseUInt(impl::abi_arg_in text, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ParseUInt(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ParseUInt(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -506,11 +543,12 @@ struct produce : pro } } - HRESULT __stdcall abi_ParseDouble(abi_arg_in text, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ParseDouble(impl::abi_arg_in text, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ParseDouble(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ParseDouble(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -528,7 +566,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundInt32(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundInt32(value)); return S_OK; } catch (...) @@ -541,7 +580,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundUInt32(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundUInt32(value)); return S_OK; } catch (...) @@ -554,7 +594,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundInt64(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundInt64(value)); return S_OK; } catch (...) @@ -567,7 +608,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundUInt64(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundUInt64(value)); return S_OK; } catch (...) @@ -580,7 +622,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundSingle(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundSingle(value)); return S_OK; } catch (...) @@ -593,7 +636,8 @@ struct produce : pr { try { - *result = detach(this->shim().RoundDouble(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RoundDouble(value)); return S_OK; } catch (...) @@ -606,11 +650,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_NumberRounder(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumberRounder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumberRounder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberRounder()); return S_OK; } catch (...) @@ -620,10 +665,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_NumberRounder(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NumberRounder(*reinterpret_cast(&value)); return S_OK; } @@ -637,11 +683,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Languages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -651,11 +698,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -665,11 +713,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NumeralSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumeralSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumeralSystem()); return S_OK; } catch (...) @@ -679,10 +728,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_NumeralSystem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NumeralSystem(*reinterpret_cast(&value)); return S_OK; } @@ -692,11 +742,12 @@ struct produce value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_TranslateNumerals(impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TranslateNumerals(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TranslateNumerals(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -710,11 +761,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> languages, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> languages, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast *>(&languages))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast *>(&languages))); return S_OK; } catch (...) @@ -728,11 +780,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreatePercentFormatter(abi_arg_in> languages, abi_arg_in geographicRegion, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreatePercentFormatter(impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreatePercentFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreatePercentFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); return S_OK; } catch (...) @@ -746,11 +799,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreatePermilleFormatter(abi_arg_in> languages, abi_arg_in geographicRegion, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreatePermilleFormatter(impl::abi_arg_in> languages, impl::abi_arg_in geographicRegion, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreatePermilleFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreatePermilleFormatter(*reinterpret_cast *>(&languages), *reinterpret_cast(&geographicRegion))); return S_OK; } catch (...) @@ -768,7 +822,8 @@ struct produce : { try { - *value = detach(this->shim().IsZeroSigned()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZeroSigned()); return S_OK; } catch (...) @@ -781,6 +836,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsZeroSigned(value); return S_OK; } @@ -798,7 +854,8 @@ struct produceshim().RoundingAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoundingAlgorithm()); return S_OK; } catch (...) @@ -811,6 +868,7 @@ struct produceshim()); this->shim().RoundingAlgorithm(value); return S_OK; } @@ -824,7 +882,8 @@ struct produceshim().SignificantDigits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignificantDigits()); return S_OK; } catch (...) @@ -837,6 +896,7 @@ struct produceshim()); this->shim().SignificantDigits(value); return S_OK; } @@ -854,7 +914,8 @@ struct produceshim().SignificantDigits()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignificantDigits()); return S_OK; } catch (...) @@ -867,6 +928,7 @@ struct produceshim()); this->shim().SignificantDigits(value); return S_OK; } @@ -884,389 +946,389 @@ namespace Windows::Globalization::NumberFormatting { template int32_t impl_INumberRounder::RoundInt32(int32_t value) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundInt32(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundInt32(value, &result)); return result; } template uint32_t impl_INumberRounder::RoundUInt32(uint32_t value) const { uint32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundUInt32(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundUInt32(value, &result)); return result; } template int64_t impl_INumberRounder::RoundInt64(int64_t value) const { int64_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundInt64(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundInt64(value, &result)); return result; } template uint64_t impl_INumberRounder::RoundUInt64(uint64_t value) const { uint64_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundUInt64(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundUInt64(value, &result)); return result; } template float impl_INumberRounder::RoundSingle(float value) const { float result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundSingle(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundSingle(value, &result)); return result; } template double impl_INumberRounder::RoundDouble(double value) const { double result {}; - check_hresult(static_cast(static_cast(*this))->abi_RoundDouble(value, &result)); + check_hresult(WINRT_SHIM(INumberRounder)->abi_RoundDouble(value, &result)); return result; } template Windows::Globalization::NumberFormatting::RoundingAlgorithm impl_ISignificantDigitsNumberRounder::RoundingAlgorithm() const { Windows::Globalization::NumberFormatting::RoundingAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_RoundingAlgorithm(&value)); + check_hresult(WINRT_SHIM(ISignificantDigitsNumberRounder)->get_RoundingAlgorithm(&value)); return value; } template void impl_ISignificantDigitsNumberRounder::RoundingAlgorithm(Windows::Globalization::NumberFormatting::RoundingAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_RoundingAlgorithm(value)); + check_hresult(WINRT_SHIM(ISignificantDigitsNumberRounder)->put_RoundingAlgorithm(value)); } template uint32_t impl_ISignificantDigitsNumberRounder::SignificantDigits() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SignificantDigits(&value)); + check_hresult(WINRT_SHIM(ISignificantDigitsNumberRounder)->get_SignificantDigits(&value)); return value; } template void impl_ISignificantDigitsNumberRounder::SignificantDigits(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SignificantDigits(value)); + check_hresult(WINRT_SHIM(ISignificantDigitsNumberRounder)->put_SignificantDigits(value)); } template Windows::Globalization::NumberFormatting::RoundingAlgorithm impl_IIncrementNumberRounder::RoundingAlgorithm() const { Windows::Globalization::NumberFormatting::RoundingAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_RoundingAlgorithm(&value)); + check_hresult(WINRT_SHIM(IIncrementNumberRounder)->get_RoundingAlgorithm(&value)); return value; } template void impl_IIncrementNumberRounder::RoundingAlgorithm(Windows::Globalization::NumberFormatting::RoundingAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_RoundingAlgorithm(value)); + check_hresult(WINRT_SHIM(IIncrementNumberRounder)->put_RoundingAlgorithm(value)); } template double impl_IIncrementNumberRounder::Increment() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Increment(&value)); + check_hresult(WINRT_SHIM(IIncrementNumberRounder)->get_Increment(&value)); return value; } template void impl_IIncrementNumberRounder::Increment(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Increment(value)); + check_hresult(WINRT_SHIM(IIncrementNumberRounder)->put_Increment(value)); } template hstring impl_INumberFormatter::Format(int64_t value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatInt(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter)->abi_FormatInt(value, put_abi(result))); return result; } template hstring impl_INumberFormatter::Format(uint64_t value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatUInt(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter)->abi_FormatUInt(value, put_abi(result))); return result; } template hstring impl_INumberFormatter::Format(double value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatDouble(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter)->abi_FormatDouble(value, put_abi(result))); return result; } template hstring impl_INumberFormatter2::FormatInt(int64_t value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatInt(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter2)->abi_FormatInt(value, put_abi(result))); return result; } template hstring impl_INumberFormatter2::FormatUInt(uint64_t value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatUInt(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter2)->abi_FormatUInt(value, put_abi(result))); return result; } template hstring impl_INumberFormatter2::FormatDouble(double value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatDouble(value, put(result))); + check_hresult(WINRT_SHIM(INumberFormatter2)->abi_FormatDouble(value, put_abi(result))); return result; } -template Windows::Foundation::IReference impl_INumberParser::ParseInt(hstring_ref text) const +template Windows::Foundation::IReference impl_INumberParser::ParseInt(hstring_view text) const { Windows::Foundation::IReference result; - check_hresult(static_cast(static_cast(*this))->abi_ParseInt(get(text), put(result))); + check_hresult(WINRT_SHIM(INumberParser)->abi_ParseInt(get_abi(text), put_abi(result))); return result; } -template Windows::Foundation::IReference impl_INumberParser::ParseUInt(hstring_ref text) const +template Windows::Foundation::IReference impl_INumberParser::ParseUInt(hstring_view text) const { Windows::Foundation::IReference result; - check_hresult(static_cast(static_cast(*this))->abi_ParseUInt(get(text), put(result))); + check_hresult(WINRT_SHIM(INumberParser)->abi_ParseUInt(get_abi(text), put_abi(result))); return result; } -template Windows::Foundation::IReference impl_INumberParser::ParseDouble(hstring_ref text) const +template Windows::Foundation::IReference impl_INumberParser::ParseDouble(hstring_view text) const { Windows::Foundation::IReference result; - check_hresult(static_cast(static_cast(*this))->abi_ParseDouble(get(text), put(result))); + check_hresult(WINRT_SHIM(INumberParser)->abi_ParseDouble(get_abi(text), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_INumberFormatterOptions::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_Languages(put_abi(value))); return value; } template hstring impl_INumberFormatterOptions::GeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GeographicRegion(put(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_GeographicRegion(put_abi(value))); return value; } template int32_t impl_INumberFormatterOptions::IntegerDigits() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IntegerDigits(&value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_IntegerDigits(&value)); return value; } template void impl_INumberFormatterOptions::IntegerDigits(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IntegerDigits(value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->put_IntegerDigits(value)); } template int32_t impl_INumberFormatterOptions::FractionDigits() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FractionDigits(&value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_FractionDigits(&value)); return value; } template void impl_INumberFormatterOptions::FractionDigits(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_FractionDigits(value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->put_FractionDigits(value)); } template bool impl_INumberFormatterOptions::IsGrouped() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGrouped(&value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_IsGrouped(&value)); return value; } template void impl_INumberFormatterOptions::IsGrouped(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsGrouped(value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->put_IsGrouped(value)); } template bool impl_INumberFormatterOptions::IsDecimalPointAlwaysDisplayed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDecimalPointAlwaysDisplayed(&value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_IsDecimalPointAlwaysDisplayed(&value)); return value; } template void impl_INumberFormatterOptions::IsDecimalPointAlwaysDisplayed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDecimalPointAlwaysDisplayed(value)); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->put_IsDecimalPointAlwaysDisplayed(value)); } template hstring impl_INumberFormatterOptions::NumeralSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumeralSystem(put(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_NumeralSystem(put_abi(value))); return value; } -template void impl_INumberFormatterOptions::NumeralSystem(hstring_ref value) const +template void impl_INumberFormatterOptions::NumeralSystem(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_NumeralSystem(get(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->put_NumeralSystem(get_abi(value))); } template hstring impl_INumberFormatterOptions::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_ResolvedLanguage(put_abi(value))); return value; } template hstring impl_INumberFormatterOptions::ResolvedGeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedGeographicRegion(put(value))); + check_hresult(WINRT_SHIM(INumberFormatterOptions)->get_ResolvedGeographicRegion(put_abi(value))); return value; } template int32_t impl_ISignificantDigitsOption::SignificantDigits() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SignificantDigits(&value)); + check_hresult(WINRT_SHIM(ISignificantDigitsOption)->get_SignificantDigits(&value)); return value; } template void impl_ISignificantDigitsOption::SignificantDigits(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SignificantDigits(value)); + check_hresult(WINRT_SHIM(ISignificantDigitsOption)->put_SignificantDigits(value)); } template Windows::Globalization::NumberFormatting::INumberRounder impl_INumberRounderOption::NumberRounder() const { Windows::Globalization::NumberFormatting::INumberRounder value; - check_hresult(static_cast(static_cast(*this))->get_NumberRounder(put(value))); + check_hresult(WINRT_SHIM(INumberRounderOption)->get_NumberRounder(put_abi(value))); return value; } template void impl_INumberRounderOption::NumberRounder(const Windows::Globalization::NumberFormatting::INumberRounder & value) const { - check_hresult(static_cast(static_cast(*this))->put_NumberRounder(get(value))); + check_hresult(WINRT_SHIM(INumberRounderOption)->put_NumberRounder(get_abi(value))); } template bool impl_ISignedZeroOption::IsZeroSigned() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZeroSigned(&value)); + check_hresult(WINRT_SHIM(ISignedZeroOption)->get_IsZeroSigned(&value)); return value; } template void impl_ISignedZeroOption::IsZeroSigned(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZeroSigned(value)); + check_hresult(WINRT_SHIM(ISignedZeroOption)->put_IsZeroSigned(value)); } -template Windows::Globalization::NumberFormatting::DecimalFormatter impl_IDecimalFormatterFactory::CreateDecimalFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) const +template Windows::Globalization::NumberFormatting::DecimalFormatter impl_IDecimalFormatterFactory::CreateDecimalFormatter(iterable languages, hstring_view geographicRegion) const { Windows::Globalization::NumberFormatting::DecimalFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDecimalFormatter(get(languages), get(geographicRegion), put(result))); + check_hresult(WINRT_SHIM(IDecimalFormatterFactory)->abi_CreateDecimalFormatter(get_abi(languages), get_abi(geographicRegion), put_abi(result))); return result; } -template Windows::Globalization::NumberFormatting::PercentFormatter impl_IPercentFormatterFactory::CreatePercentFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) const +template Windows::Globalization::NumberFormatting::PercentFormatter impl_IPercentFormatterFactory::CreatePercentFormatter(iterable languages, hstring_view geographicRegion) const { Windows::Globalization::NumberFormatting::PercentFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePercentFormatter(get(languages), get(geographicRegion), put(result))); + check_hresult(WINRT_SHIM(IPercentFormatterFactory)->abi_CreatePercentFormatter(get_abi(languages), get_abi(geographicRegion), put_abi(result))); return result; } -template Windows::Globalization::NumberFormatting::PermilleFormatter impl_IPermilleFormatterFactory::CreatePermilleFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) const +template Windows::Globalization::NumberFormatting::PermilleFormatter impl_IPermilleFormatterFactory::CreatePermilleFormatter(iterable languages, hstring_view geographicRegion) const { Windows::Globalization::NumberFormatting::PermilleFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePermilleFormatter(get(languages), get(geographicRegion), put(result))); + check_hresult(WINRT_SHIM(IPermilleFormatterFactory)->abi_CreatePermilleFormatter(get_abi(languages), get_abi(geographicRegion), put_abi(result))); return result; } -template Windows::Globalization::NumberFormatting::CurrencyFormatter impl_ICurrencyFormatterFactory::CreateCurrencyFormatterCode(hstring_ref currencyCode) const +template Windows::Globalization::NumberFormatting::CurrencyFormatter impl_ICurrencyFormatterFactory::CreateCurrencyFormatterCode(hstring_view currencyCode) const { Windows::Globalization::NumberFormatting::CurrencyFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCurrencyFormatterCode(get(currencyCode), put(result))); + check_hresult(WINRT_SHIM(ICurrencyFormatterFactory)->abi_CreateCurrencyFormatterCode(get_abi(currencyCode), put_abi(result))); return result; } -template Windows::Globalization::NumberFormatting::CurrencyFormatter impl_ICurrencyFormatterFactory::CreateCurrencyFormatterCodeContext(hstring_ref currencyCode, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) const +template Windows::Globalization::NumberFormatting::CurrencyFormatter impl_ICurrencyFormatterFactory::CreateCurrencyFormatterCodeContext(hstring_view currencyCode, iterable languages, hstring_view geographicRegion) const { Windows::Globalization::NumberFormatting::CurrencyFormatter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCurrencyFormatterCodeContext(get(currencyCode), get(languages), get(geographicRegion), put(result))); + check_hresult(WINRT_SHIM(ICurrencyFormatterFactory)->abi_CreateCurrencyFormatterCodeContext(get_abi(currencyCode), get_abi(languages), get_abi(geographicRegion), put_abi(result))); return result; } template hstring impl_ICurrencyFormatter::Currency() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Currency(put(value))); + check_hresult(WINRT_SHIM(ICurrencyFormatter)->get_Currency(put_abi(value))); return value; } -template void impl_ICurrencyFormatter::Currency(hstring_ref value) const +template void impl_ICurrencyFormatter::Currency(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Currency(get(value))); + check_hresult(WINRT_SHIM(ICurrencyFormatter)->put_Currency(get_abi(value))); } template Windows::Globalization::NumberFormatting::CurrencyFormatterMode impl_ICurrencyFormatter2::Mode() const { Windows::Globalization::NumberFormatting::CurrencyFormatterMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(ICurrencyFormatter2)->get_Mode(&value)); return value; } template void impl_ICurrencyFormatter2::Mode(Windows::Globalization::NumberFormatting::CurrencyFormatterMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(ICurrencyFormatter2)->put_Mode(value)); } template void impl_ICurrencyFormatter2::ApplyRoundingForCurrency(Windows::Globalization::NumberFormatting::RoundingAlgorithm roundingAlgorithm) const { - check_hresult(static_cast(static_cast(*this))->abi_ApplyRoundingForCurrency(roundingAlgorithm)); + check_hresult(WINRT_SHIM(ICurrencyFormatter2)->abi_ApplyRoundingForCurrency(roundingAlgorithm)); } -template Windows::Globalization::NumberFormatting::NumeralSystemTranslator impl_INumeralSystemTranslatorFactory::Create(const Windows::Foundation::Collections::IIterable & languages) const +template Windows::Globalization::NumberFormatting::NumeralSystemTranslator impl_INumeralSystemTranslatorFactory::Create(iterable languages) const { Windows::Globalization::NumberFormatting::NumeralSystemTranslator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(languages), put(result))); + check_hresult(WINRT_SHIM(INumeralSystemTranslatorFactory)->abi_Create(get_abi(languages), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_INumeralSystemTranslator::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemTranslator)->get_Languages(put_abi(value))); return value; } template hstring impl_INumeralSystemTranslator::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemTranslator)->get_ResolvedLanguage(put_abi(value))); return value; } template hstring impl_INumeralSystemTranslator::NumeralSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumeralSystem(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemTranslator)->get_NumeralSystem(put_abi(value))); return value; } -template void impl_INumeralSystemTranslator::NumeralSystem(hstring_ref value) const +template void impl_INumeralSystemTranslator::NumeralSystem(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_NumeralSystem(get(value))); + check_hresult(WINRT_SHIM(INumeralSystemTranslator)->put_NumeralSystem(get_abi(value))); } -template hstring impl_INumeralSystemTranslator::TranslateNumerals(hstring_ref value) const +template hstring impl_INumeralSystemTranslator::TranslateNumerals(hstring_view value) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_TranslateNumerals(get(value), put(result))); + check_hresult(WINRT_SHIM(INumeralSystemTranslator)->abi_TranslateNumerals(get_abi(value), put_abi(result))); return result; } -inline CurrencyFormatter::CurrencyFormatter(hstring_ref currencyCode) : +inline CurrencyFormatter::CurrencyFormatter(hstring_view currencyCode) : CurrencyFormatter(get_activation_factory().CreateCurrencyFormatterCode(currencyCode)) {} -inline CurrencyFormatter::CurrencyFormatter(hstring_ref currencyCode, const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) : +inline CurrencyFormatter::CurrencyFormatter(hstring_view currencyCode, iterable languages, hstring_view geographicRegion) : CurrencyFormatter(get_activation_factory().CreateCurrencyFormatterCodeContext(currencyCode, languages, geographicRegion)) {} @@ -1274,7 +1336,7 @@ inline DecimalFormatter::DecimalFormatter() : DecimalFormatter(activate_instance()) {} -inline DecimalFormatter::DecimalFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) : +inline DecimalFormatter::DecimalFormatter(iterable languages, hstring_view geographicRegion) : DecimalFormatter(get_activation_factory().CreateDecimalFormatter(languages, geographicRegion)) {} @@ -1286,7 +1348,7 @@ inline NumeralSystemTranslator::NumeralSystemTranslator() : NumeralSystemTranslator(activate_instance()) {} -inline NumeralSystemTranslator::NumeralSystemTranslator(const Windows::Foundation::Collections::IIterable & languages) : +inline NumeralSystemTranslator::NumeralSystemTranslator(iterable languages) : NumeralSystemTranslator(get_activation_factory().Create(languages)) {} @@ -1294,7 +1356,7 @@ inline PercentFormatter::PercentFormatter() : PercentFormatter(activate_instance()) {} -inline PercentFormatter::PercentFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) : +inline PercentFormatter::PercentFormatter(iterable languages, hstring_view geographicRegion) : PercentFormatter(get_activation_factory().CreatePercentFormatter(languages, geographicRegion)) {} @@ -1302,7 +1364,7 @@ inline PermilleFormatter::PermilleFormatter() : PermilleFormatter(activate_instance()) {} -inline PermilleFormatter::PermilleFormatter(const Windows::Foundation::Collections::IIterable & languages, hstring_ref geographicRegion) : +inline PermilleFormatter::PermilleFormatter(iterable languages, hstring_view geographicRegion) : PermilleFormatter(get_activation_factory().CreatePermilleFormatter(languages, geographicRegion)) {} @@ -1313,3 +1375,230 @@ inline SignificantDigitsNumberRounder::SignificantDigitsNumberRounder() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ICurrencyFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ICurrencyFormatter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ICurrencyFormatterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::IDecimalFormatterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::IIncrementNumberRounder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberFormatter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberFormatterOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberParser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberRounder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumberRounderOption & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumeralSystemTranslator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::INumeralSystemTranslatorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::IPercentFormatterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::IPermilleFormatterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ISignedZeroOption & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ISignificantDigitsNumberRounder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::ISignificantDigitsOption & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::CurrencyFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::DecimalFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::IncrementNumberRounder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::NumeralSystemTranslator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::PercentFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::PermilleFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::NumberFormatting::SignificantDigitsNumberRounder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.PhoneNumberFormatting.h b/10.0.14393.0/winrt/Windows.Globalization.PhoneNumberFormatting.h index b586bdbce..188ea834f 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.PhoneNumberFormatting.h +++ b/10.0.14393.0/winrt/Windows.Globalization.PhoneNumberFormatting.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Globalization.PhoneNumberFormatting.3.h" #include "Windows.Globalization.h" #include "Windows.Foundation.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_Format(abi_arg_in number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Format(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce number, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormat numberFormat, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatWithOutputFormat(impl::abi_arg_in number, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormat numberFormat, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Format(*reinterpret_cast(&number), numberFormat)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Format(*reinterpret_cast(&number), numberFormat)); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatPartialString(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatPartialString(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatPartialString(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -56,11 +62,12 @@ struct produce number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatString(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatString(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatString(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -70,11 +77,12 @@ struct produce number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FormatStringWithLeftToRightMarkers(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FormatStringWithLeftToRightMarkers(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FormatStringWithLeftToRightMarkers(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -88,10 +96,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryCreate(abi_arg_in regionCode, abi_arg_out phoneNumber) noexcept override + HRESULT __stdcall abi_TryCreate(impl::abi_arg_in regionCode, impl::abi_arg_out phoneNumber) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TryCreate(*reinterpret_cast(®ionCode), *phoneNumber); return S_OK; } @@ -102,11 +111,12 @@ struct produce regionCode, int32_t * result) noexcept override + HRESULT __stdcall abi_GetCountryCodeForRegion(impl::abi_arg_in regionCode, int32_t * result) noexcept override { try { - *result = detach(this->shim().GetCountryCodeForRegion(*reinterpret_cast(®ionCode))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCountryCodeForRegion(*reinterpret_cast(®ionCode))); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce regionCode, bool stripNonDigit, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetNationalDirectDialingPrefixForRegion(impl::abi_arg_in regionCode, bool stripNonDigit, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetNationalDirectDialingPrefixForRegion(*reinterpret_cast(®ionCode), stripNonDigit)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetNationalDirectDialingPrefixForRegion(*reinterpret_cast(®ionCode), stripNonDigit)); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_WrapWithLeftToRightMarkers(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().WrapWithLeftToRightMarkers(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().WrapWithLeftToRightMarkers(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -151,7 +163,8 @@ struct produceshim().CountryCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CountryCode()); return S_OK; } catch (...) @@ -160,11 +173,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -178,7 +192,8 @@ struct produceshim().GetLengthOfGeographicalAreaCode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetLengthOfGeographicalAreaCode()); return S_OK; } catch (...) @@ -187,11 +202,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetNationalSignificantNumber(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetNationalSignificantNumber()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetNationalSignificantNumber()); return S_OK; } catch (...) @@ -205,7 +221,8 @@ struct produceshim().GetLengthOfNationalDestinationCode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetLengthOfNationalDestinationCode()); return S_OK; } catch (...) @@ -218,7 +235,8 @@ struct produceshim().PredictNumberKind()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PredictNumberKind()); return S_OK; } catch (...) @@ -227,11 +245,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetGeographicRegionCode(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetGeographicRegionCode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetGeographicRegionCode()); return S_OK; } catch (...) @@ -241,11 +260,12 @@ struct produce otherNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberMatchResult * result) noexcept override + HRESULT __stdcall abi_CheckNumberMatch(impl::abi_arg_in otherNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberMatchResult * result) noexcept override { try { - *result = detach(this->shim().CheckNumberMatch(*reinterpret_cast(&otherNumber))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CheckNumberMatch(*reinterpret_cast(&otherNumber))); return S_OK; } catch (...) @@ -258,11 +278,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in number, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in number, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&number))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&number))); return S_OK; } catch (...) @@ -276,11 +297,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryParse(abi_arg_in input, abi_arg_out phoneNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult * result) noexcept override + HRESULT __stdcall abi_TryParse(impl::abi_arg_in input, impl::abi_arg_out phoneNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult * result) noexcept override { try { - *result = detach(this->shim().TryParse(*reinterpret_cast(&input), *phoneNumber)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryParse(*reinterpret_cast(&input), *phoneNumber)); return S_OK; } catch (...) @@ -290,11 +312,12 @@ struct produce input, abi_arg_in regionCode, abi_arg_out phoneNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult * result) noexcept override + HRESULT __stdcall abi_TryParseWithRegion(impl::abi_arg_in input, impl::abi_arg_in regionCode, impl::abi_arg_out phoneNumber, Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult * result) noexcept override { try { - *result = detach(this->shim().TryParse(*reinterpret_cast(&input), *reinterpret_cast(®ionCode), *phoneNumber)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryParse(*reinterpret_cast(&input), *reinterpret_cast(®ionCode), *phoneNumber)); return S_OK; } catch (...) @@ -312,138 +335,138 @@ namespace Windows::Globalization::PhoneNumberFormatting { template int32_t impl_IPhoneNumberInfo::CountryCode() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CountryCode(&value)); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->get_CountryCode(&value)); return value; } template hstring impl_IPhoneNumberInfo::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->get_PhoneNumber(put_abi(value))); return value; } template int32_t impl_IPhoneNumberInfo::GetLengthOfGeographicalAreaCode() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLengthOfGeographicalAreaCode(&result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_GetLengthOfGeographicalAreaCode(&result)); return result; } template hstring impl_IPhoneNumberInfo::GetNationalSignificantNumber() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetNationalSignificantNumber(put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_GetNationalSignificantNumber(put_abi(result))); return result; } template int32_t impl_IPhoneNumberInfo::GetLengthOfNationalDestinationCode() const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLengthOfNationalDestinationCode(&result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_GetLengthOfNationalDestinationCode(&result)); return result; } template Windows::Globalization::PhoneNumberFormatting::PredictedPhoneNumberKind impl_IPhoneNumberInfo::PredictNumberKind() const { Windows::Globalization::PhoneNumberFormatting::PredictedPhoneNumberKind result {}; - check_hresult(static_cast(static_cast(*this))->abi_PredictNumberKind(&result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_PredictNumberKind(&result)); return result; } template hstring impl_IPhoneNumberInfo::GetGeographicRegionCode() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetGeographicRegionCode(put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_GetGeographicRegionCode(put_abi(result))); return result; } template Windows::Globalization::PhoneNumberFormatting::PhoneNumberMatchResult impl_IPhoneNumberInfo::CheckNumberMatch(const Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & otherNumber) const { Windows::Globalization::PhoneNumberFormatting::PhoneNumberMatchResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckNumberMatch(get(otherNumber), &result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfo)->abi_CheckNumberMatch(get_abi(otherNumber), &result)); return result; } template hstring impl_IPhoneNumberFormatter::Format(const Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & number) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_Format(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatter)->abi_Format(get_abi(number), put_abi(result))); return result; } template hstring impl_IPhoneNumberFormatter::Format(const Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & number, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormat numberFormat) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatWithOutputFormat(get(number), numberFormat, put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatter)->abi_FormatWithOutputFormat(get_abi(number), numberFormat, put_abi(result))); return result; } -template hstring impl_IPhoneNumberFormatter::FormatPartialString(hstring_ref number) const +template hstring impl_IPhoneNumberFormatter::FormatPartialString(hstring_view number) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatPartialString(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatter)->abi_FormatPartialString(get_abi(number), put_abi(result))); return result; } -template hstring impl_IPhoneNumberFormatter::FormatString(hstring_ref number) const +template hstring impl_IPhoneNumberFormatter::FormatString(hstring_view number) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatString(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatter)->abi_FormatString(get_abi(number), put_abi(result))); return result; } -template hstring impl_IPhoneNumberFormatter::FormatStringWithLeftToRightMarkers(hstring_ref number) const +template hstring impl_IPhoneNumberFormatter::FormatStringWithLeftToRightMarkers(hstring_view number) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_FormatStringWithLeftToRightMarkers(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatter)->abi_FormatStringWithLeftToRightMarkers(get_abi(number), put_abi(result))); return result; } -template Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo impl_IPhoneNumberInfoFactory::Create(hstring_ref number) const +template Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo impl_IPhoneNumberInfoFactory::Create(hstring_view number) const { Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberInfoFactory)->abi_Create(get_abi(number), put_abi(result))); return result; } -template Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult impl_IPhoneNumberInfoStatics::TryParse(hstring_ref input, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) const +template Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult impl_IPhoneNumberInfoStatics::TryParse(hstring_view input, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) const { Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParse(get(input), put(phoneNumber), &result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfoStatics)->abi_TryParse(get_abi(input), put_abi(phoneNumber), &result)); return result; } -template Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult impl_IPhoneNumberInfoStatics::TryParse(hstring_ref input, hstring_ref regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) const +template Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult impl_IPhoneNumberInfoStatics::TryParse(hstring_view input, hstring_view regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) const { Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryParseWithRegion(get(input), get(regionCode), put(phoneNumber), &result)); + check_hresult(WINRT_SHIM(IPhoneNumberInfoStatics)->abi_TryParseWithRegion(get_abi(input), get_abi(regionCode), put_abi(phoneNumber), &result)); return result; } -template void impl_IPhoneNumberFormatterStatics::TryCreate(hstring_ref regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter & phoneNumber) const +template void impl_IPhoneNumberFormatterStatics::TryCreate(hstring_view regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter & phoneNumber) const { - check_hresult(static_cast(static_cast(*this))->abi_TryCreate(get(regionCode), put(phoneNumber))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatterStatics)->abi_TryCreate(get_abi(regionCode), put_abi(phoneNumber))); } -template int32_t impl_IPhoneNumberFormatterStatics::GetCountryCodeForRegion(hstring_ref regionCode) const +template int32_t impl_IPhoneNumberFormatterStatics::GetCountryCodeForRegion(hstring_view regionCode) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCountryCodeForRegion(get(regionCode), &result)); + check_hresult(WINRT_SHIM(IPhoneNumberFormatterStatics)->abi_GetCountryCodeForRegion(get_abi(regionCode), &result)); return result; } -template hstring impl_IPhoneNumberFormatterStatics::GetNationalDirectDialingPrefixForRegion(hstring_ref regionCode, bool stripNonDigit) const +template hstring impl_IPhoneNumberFormatterStatics::GetNationalDirectDialingPrefixForRegion(hstring_view regionCode, bool stripNonDigit) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_GetNationalDirectDialingPrefixForRegion(get(regionCode), stripNonDigit, put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatterStatics)->abi_GetNationalDirectDialingPrefixForRegion(get_abi(regionCode), stripNonDigit, put_abi(result))); return result; } -template hstring impl_IPhoneNumberFormatterStatics::WrapWithLeftToRightMarkers(hstring_ref number) const +template hstring impl_IPhoneNumberFormatterStatics::WrapWithLeftToRightMarkers(hstring_view number) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_WrapWithLeftToRightMarkers(get(number), put(result))); + check_hresult(WINRT_SHIM(IPhoneNumberFormatterStatics)->abi_WrapWithLeftToRightMarkers(get_abi(number), put_abi(result))); return result; } @@ -451,36 +474,36 @@ inline PhoneNumberFormatter::PhoneNumberFormatter() : PhoneNumberFormatter(activate_instance()) {} -inline void PhoneNumberFormatter::TryCreate(hstring_ref regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter & phoneNumber) +inline void PhoneNumberFormatter::TryCreate(hstring_view regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter & phoneNumber) { get_activation_factory().TryCreate(regionCode, phoneNumber); } -inline int32_t PhoneNumberFormatter::GetCountryCodeForRegion(hstring_ref regionCode) +inline int32_t PhoneNumberFormatter::GetCountryCodeForRegion(hstring_view regionCode) { return get_activation_factory().GetCountryCodeForRegion(regionCode); } -inline hstring PhoneNumberFormatter::GetNationalDirectDialingPrefixForRegion(hstring_ref regionCode, bool stripNonDigit) +inline hstring PhoneNumberFormatter::GetNationalDirectDialingPrefixForRegion(hstring_view regionCode, bool stripNonDigit) { return get_activation_factory().GetNationalDirectDialingPrefixForRegion(regionCode, stripNonDigit); } -inline hstring PhoneNumberFormatter::WrapWithLeftToRightMarkers(hstring_ref number) +inline hstring PhoneNumberFormatter::WrapWithLeftToRightMarkers(hstring_view number) { return get_activation_factory().WrapWithLeftToRightMarkers(number); } -inline PhoneNumberInfo::PhoneNumberInfo(hstring_ref number) : +inline PhoneNumberInfo::PhoneNumberInfo(hstring_view number) : PhoneNumberInfo(get_activation_factory().Create(number)) {} -inline Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult PhoneNumberInfo::TryParse(hstring_ref input, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) +inline Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult PhoneNumberInfo::TryParse(hstring_view input, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) { return get_activation_factory().TryParse(input, phoneNumber); } -inline Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult PhoneNumberInfo::TryParse(hstring_ref input, hstring_ref regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) +inline Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult PhoneNumberInfo::TryParse(hstring_view input, hstring_view regionCode, Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & phoneNumber) { return get_activation_factory().TryParse(input, regionCode, phoneNumber); } @@ -488,3 +511,68 @@ inline Windows::Globalization::PhoneNumberFormatting::PhoneNumberParseResult Pho } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::IPhoneNumberFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::IPhoneNumberFormatterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::IPhoneNumberInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::IPhoneNumberInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::IPhoneNumberInfoStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberFormatter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::PhoneNumberFormatting::PhoneNumberInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Globalization.h b/10.0.14393.0/winrt/Windows.Globalization.h index 0e0aa4b5b..96a243492 100644 --- a/10.0.14393.0/winrt/Windows.Globalization.h +++ b/10.0.14393.0/winrt/Windows.Globalization.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Globalization.3.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_PrimaryLanguageOverride(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryLanguageOverride(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryLanguageOverride()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryLanguageOverride()); return S_OK; } catch (...) @@ -28,10 +32,11 @@ struct produce : produc } } - HRESULT __stdcall put_PrimaryLanguageOverride(abi_arg_in value) noexcept override + HRESULT __stdcall put_PrimaryLanguageOverride(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrimaryLanguageOverride(*reinterpret_cast(&value)); return S_OK; } @@ -41,11 +46,12 @@ struct produce : produc } } - HRESULT __stdcall get_Languages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce : produc } } - HRESULT __stdcall get_ManifestLanguages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ManifestLanguages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ManifestLanguages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManifestLanguages()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Clone(abi_arg_out value) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -91,6 +99,7 @@ struct produce : produce_baseshim()); this->shim().SetToMin(); return S_OK; } @@ -104,6 +113,7 @@ struct produce : produce_baseshim()); this->shim().SetToMax(); return S_OK; } @@ -113,11 +123,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NumeralSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumeralSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumeralSystem()); return S_OK; } catch (...) @@ -141,10 +153,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_NumeralSystem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NumeralSystem(*reinterpret_cast(&value)); return S_OK; } @@ -154,11 +167,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCalendarSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCalendarSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCalendarSystem()); return S_OK; } catch (...) @@ -168,10 +182,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ChangeCalendarSystem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChangeCalendarSystem(*reinterpret_cast(&value)); return S_OK; } @@ -181,11 +196,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetClock(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetClock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetClock()); return S_OK; } catch (...) @@ -195,10 +211,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ChangeClock(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChangeClock(*reinterpret_cast(&value)); return S_OK; } @@ -208,11 +225,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetDateTime(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDateTime()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDateTime()); return S_OK; } catch (...) @@ -221,10 +239,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetDateTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDateTime(*reinterpret_cast(&value)); return S_OK; } @@ -238,6 +257,7 @@ struct produce : produce_baseshim()); this->shim().SetToNow(); return S_OK; } @@ -251,7 +271,8 @@ struct produce : produce_baseshim().FirstEra()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstEra()); return S_OK; } catch (...) @@ -264,7 +285,8 @@ struct produce : produce_baseshim().LastEra()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastEra()); return S_OK; } catch (...) @@ -277,7 +299,8 @@ struct produce : produce_baseshim().NumberOfEras()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfEras()); return S_OK; } catch (...) @@ -290,7 +313,8 @@ struct produce : produce_baseshim().Era()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Era()); return S_OK; } catch (...) @@ -303,6 +327,7 @@ struct produce : produce_baseshim()); this->shim().Era(value); return S_OK; } @@ -316,6 +341,7 @@ struct produce : produce_baseshim()); this->shim().AddEras(eras); return S_OK; } @@ -325,11 +351,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_EraAsFullString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().EraAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EraAsString()); return S_OK; } catch (...) @@ -339,11 +366,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_EraAsString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().EraAsString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EraAsString(idealLength)); return S_OK; } catch (...) @@ -357,7 +385,8 @@ struct produce : produce_baseshim().FirstYearInThisEra()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstYearInThisEra()); return S_OK; } catch (...) @@ -370,7 +399,8 @@ struct produce : produce_baseshim().LastYearInThisEra()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastYearInThisEra()); return S_OK; } catch (...) @@ -383,7 +413,8 @@ struct produce : produce_baseshim().NumberOfYearsInThisEra()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfYearsInThisEra()); return S_OK; } catch (...) @@ -396,7 +427,8 @@ struct produce : produce_baseshim().Year()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Year()); return S_OK; } catch (...) @@ -409,6 +441,7 @@ struct produce : produce_baseshim()); this->shim().Year(value); return S_OK; } @@ -422,6 +455,7 @@ struct produce : produce_baseshim()); this->shim().AddYears(years); return S_OK; } @@ -431,11 +465,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_YearAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().YearAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().YearAsString()); return S_OK; } catch (...) @@ -445,11 +480,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_YearAsTruncatedString(int32_t remainingDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().YearAsTruncatedString(remainingDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().YearAsTruncatedString(remainingDigits)); return S_OK; } catch (...) @@ -459,11 +495,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_YearAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().YearAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().YearAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -477,7 +514,8 @@ struct produce : produce_baseshim().FirstMonthInThisYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstMonthInThisYear()); return S_OK; } catch (...) @@ -490,7 +528,8 @@ struct produce : produce_baseshim().LastMonthInThisYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastMonthInThisYear()); return S_OK; } catch (...) @@ -503,7 +542,8 @@ struct produce : produce_baseshim().NumberOfMonthsInThisYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfMonthsInThisYear()); return S_OK; } catch (...) @@ -516,7 +556,8 @@ struct produce : produce_baseshim().Month()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Month()); return S_OK; } catch (...) @@ -529,6 +570,7 @@ struct produce : produce_baseshim()); this->shim().Month(value); return S_OK; } @@ -542,6 +584,7 @@ struct produce : produce_baseshim()); this->shim().AddMonths(months); return S_OK; } @@ -551,11 +594,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsFullString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsString()); return S_OK; } catch (...) @@ -565,11 +609,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsString(idealLength)); return S_OK; } catch (...) @@ -579,11 +624,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsFullSoloString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsSoloString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsSoloString()); return S_OK; } catch (...) @@ -593,11 +639,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsSoloString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsSoloString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsSoloString(idealLength)); return S_OK; } catch (...) @@ -607,11 +654,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsNumericString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsNumericString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsNumericString()); return S_OK; } catch (...) @@ -621,11 +669,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MonthAsPaddedNumericString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MonthAsPaddedNumericString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MonthAsPaddedNumericString(minDigits)); return S_OK; } catch (...) @@ -639,6 +688,7 @@ struct produce : produce_baseshim()); this->shim().AddWeeks(weeks); return S_OK; } @@ -652,7 +702,8 @@ struct produce : produce_baseshim().FirstDayInThisMonth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstDayInThisMonth()); return S_OK; } catch (...) @@ -665,7 +716,8 @@ struct produce : produce_baseshim().LastDayInThisMonth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastDayInThisMonth()); return S_OK; } catch (...) @@ -678,7 +730,8 @@ struct produce : produce_baseshim().NumberOfDaysInThisMonth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfDaysInThisMonth()); return S_OK; } catch (...) @@ -691,7 +744,8 @@ struct produce : produce_baseshim().Day()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Day()); return S_OK; } catch (...) @@ -704,6 +758,7 @@ struct produce : produce_baseshim()); this->shim().Day(value); return S_OK; } @@ -717,6 +772,7 @@ struct produce : produce_baseshim()); this->shim().AddDays(days); return S_OK; } @@ -726,11 +782,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayAsString()); return S_OK; } catch (...) @@ -740,11 +797,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -758,7 +816,8 @@ struct produce : produce_baseshim().DayOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeek()); return S_OK; } catch (...) @@ -767,11 +826,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayOfWeekAsFullString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayOfWeekAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayOfWeekAsString()); return S_OK; } catch (...) @@ -781,11 +841,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayOfWeekAsString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayOfWeekAsString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayOfWeekAsString(idealLength)); return S_OK; } catch (...) @@ -795,11 +856,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayOfWeekAsFullSoloString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayOfWeekAsSoloString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayOfWeekAsSoloString()); return S_OK; } catch (...) @@ -809,11 +871,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_DayOfWeekAsSoloString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DayOfWeekAsSoloString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DayOfWeekAsSoloString(idealLength)); return S_OK; } catch (...) @@ -827,7 +890,8 @@ struct produce : produce_baseshim().FirstPeriodInThisDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstPeriodInThisDay()); return S_OK; } catch (...) @@ -840,7 +904,8 @@ struct produce : produce_baseshim().LastPeriodInThisDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastPeriodInThisDay()); return S_OK; } catch (...) @@ -853,7 +918,8 @@ struct produce : produce_baseshim().NumberOfPeriodsInThisDay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfPeriodsInThisDay()); return S_OK; } catch (...) @@ -866,7 +932,8 @@ struct produce : produce_baseshim().Period()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Period()); return S_OK; } catch (...) @@ -879,6 +946,7 @@ struct produce : produce_baseshim()); this->shim().Period(value); return S_OK; } @@ -892,6 +960,7 @@ struct produce : produce_baseshim()); this->shim().AddPeriods(periods); return S_OK; } @@ -901,11 +970,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_PeriodAsFullString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().PeriodAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PeriodAsString()); return S_OK; } catch (...) @@ -915,11 +985,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_PeriodAsString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().PeriodAsString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PeriodAsString(idealLength)); return S_OK; } catch (...) @@ -933,7 +1004,8 @@ struct produce : produce_baseshim().FirstHourInThisPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstHourInThisPeriod()); return S_OK; } catch (...) @@ -946,7 +1018,8 @@ struct produce : produce_baseshim().LastHourInThisPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastHourInThisPeriod()); return S_OK; } catch (...) @@ -959,7 +1032,8 @@ struct produce : produce_baseshim().NumberOfHoursInThisPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfHoursInThisPeriod()); return S_OK; } catch (...) @@ -972,7 +1046,8 @@ struct produce : produce_baseshim().Hour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hour()); return S_OK; } catch (...) @@ -985,6 +1060,7 @@ struct produce : produce_baseshim()); this->shim().Hour(value); return S_OK; } @@ -998,6 +1074,7 @@ struct produce : produce_baseshim()); this->shim().AddHours(hours); return S_OK; } @@ -1007,11 +1084,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_HourAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().HourAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().HourAsString()); return S_OK; } catch (...) @@ -1021,11 +1099,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_HourAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().HourAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().HourAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -1039,7 +1118,8 @@ struct produce : produce_baseshim().Minute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Minute()); return S_OK; } catch (...) @@ -1052,6 +1132,7 @@ struct produce : produce_baseshim()); this->shim().Minute(value); return S_OK; } @@ -1065,6 +1146,7 @@ struct produce : produce_baseshim()); this->shim().AddMinutes(minutes); return S_OK; } @@ -1074,11 +1156,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MinuteAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MinuteAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MinuteAsString()); return S_OK; } catch (...) @@ -1088,11 +1171,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_MinuteAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MinuteAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MinuteAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -1106,7 +1190,8 @@ struct produce : produce_baseshim().Second()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Second()); return S_OK; } catch (...) @@ -1119,6 +1204,7 @@ struct produce : produce_baseshim()); this->shim().Second(value); return S_OK; } @@ -1132,6 +1218,7 @@ struct produce : produce_baseshim()); this->shim().AddSeconds(seconds); return S_OK; } @@ -1141,11 +1228,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_SecondAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SecondAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SecondAsString()); return S_OK; } catch (...) @@ -1155,11 +1243,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_SecondAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SecondAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SecondAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -1173,7 +1262,8 @@ struct produce : produce_baseshim().Nanosecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nanosecond()); return S_OK; } catch (...) @@ -1186,6 +1276,7 @@ struct produce : produce_baseshim()); this->shim().Nanosecond(value); return S_OK; } @@ -1199,6 +1290,7 @@ struct produce : produce_baseshim()); this->shim().AddNanoseconds(nanoseconds); return S_OK; } @@ -1208,11 +1300,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_NanosecondAsString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().NanosecondAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().NanosecondAsString()); return S_OK; } catch (...) @@ -1222,11 +1315,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_NanosecondAsPaddedString(int32_t minDigits, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().NanosecondAsPaddedString(minDigits)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().NanosecondAsPaddedString(minDigits)); return S_OK; } catch (...) @@ -1236,11 +1330,12 @@ struct produce : produce_base other, int32_t * result) noexcept override + HRESULT __stdcall abi_Compare(impl::abi_arg_in other, int32_t * result) noexcept override { try { - *result = detach(this->shim().Compare(*reinterpret_cast(&other))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Compare(*reinterpret_cast(&other))); return S_OK; } catch (...) @@ -1249,11 +1344,12 @@ struct produce : produce_base other, int32_t * result) noexcept override + HRESULT __stdcall abi_CompareDateTime(impl::abi_arg_in other, int32_t * result) noexcept override { try { - *result = detach(this->shim().CompareDateTime(*reinterpret_cast(&other))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CompareDateTime(*reinterpret_cast(&other))); return S_OK; } catch (...) @@ -1262,10 +1358,11 @@ struct produce : produce_base other) noexcept override + HRESULT __stdcall abi_CopyTo(impl::abi_arg_in other) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CopyTo(*reinterpret_cast(&other)); return S_OK; } @@ -1279,7 +1376,8 @@ struct produce : produce_baseshim().FirstMinuteInThisHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstMinuteInThisHour()); return S_OK; } catch (...) @@ -1292,7 +1390,8 @@ struct produce : produce_baseshim().LastMinuteInThisHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastMinuteInThisHour()); return S_OK; } catch (...) @@ -1305,7 +1404,8 @@ struct produce : produce_baseshim().NumberOfMinutesInThisHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfMinutesInThisHour()); return S_OK; } catch (...) @@ -1318,7 +1418,8 @@ struct produce : produce_baseshim().FirstSecondInThisMinute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstSecondInThisMinute()); return S_OK; } catch (...) @@ -1331,7 +1432,8 @@ struct produce : produce_baseshim().LastSecondInThisMinute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSecondInThisMinute()); return S_OK; } catch (...) @@ -1344,7 +1446,8 @@ struct produce : produce_baseshim().NumberOfSecondsInThisMinute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfSecondsInThisMinute()); return S_OK; } catch (...) @@ -1353,11 +1456,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ResolvedLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResolvedLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolvedLanguage()); return S_OK; } catch (...) @@ -1371,7 +1475,8 @@ struct produce : produce_baseshim().IsDaylightSavingTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDaylightSavingTime()); return S_OK; } catch (...) @@ -1384,11 +1489,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCalendarDefaultCalendarAndClock(abi_arg_in> languages, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCalendarDefaultCalendarAndClock(impl::abi_arg_in> languages, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCalendarDefaultCalendarAndClock(*reinterpret_cast *>(&languages))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCalendarDefaultCalendarAndClock(*reinterpret_cast *>(&languages))); return S_OK; } catch (...) @@ -1398,11 +1504,12 @@ struct produce : produce_base> languages, abi_arg_in calendar, abi_arg_in clock, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCalendar(impl::abi_arg_in> languages, impl::abi_arg_in calendar, impl::abi_arg_in clock, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCalendar(*reinterpret_cast *>(&languages), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCalendar(*reinterpret_cast *>(&languages), *reinterpret_cast(&calendar), *reinterpret_cast(&clock))); return S_OK; } catch (...) @@ -1416,11 +1523,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCalendarWithTimeZone(abi_arg_in> languages, abi_arg_in calendar, abi_arg_in clock, abi_arg_in timeZoneId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCalendarWithTimeZone(impl::abi_arg_in> languages, impl::abi_arg_in calendar, impl::abi_arg_in clock, impl::abi_arg_in timeZoneId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCalendarWithTimeZone(*reinterpret_cast *>(&languages), *reinterpret_cast(&calendar), *reinterpret_cast(&clock), *reinterpret_cast(&timeZoneId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCalendarWithTimeZone(*reinterpret_cast *>(&languages), *reinterpret_cast(&calendar), *reinterpret_cast(&clock), *reinterpret_cast(&timeZoneId))); return S_OK; } catch (...) @@ -1434,11 +1542,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Gregorian(abi_arg_out value) noexcept override + HRESULT __stdcall get_Gregorian(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Gregorian()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gregorian()); return S_OK; } catch (...) @@ -1448,11 +1557,12 @@ struct produce : produce } } - HRESULT __stdcall get_Hebrew(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hebrew(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hebrew()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hebrew()); return S_OK; } catch (...) @@ -1462,11 +1572,12 @@ struct produce : produce } } - HRESULT __stdcall get_Hijri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hijri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hijri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hijri()); return S_OK; } catch (...) @@ -1476,11 +1587,12 @@ struct produce : produce } } - HRESULT __stdcall get_Japanese(abi_arg_out value) noexcept override + HRESULT __stdcall get_Japanese(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Japanese()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Japanese()); return S_OK; } catch (...) @@ -1490,11 +1602,12 @@ struct produce : produce } } - HRESULT __stdcall get_Julian(abi_arg_out value) noexcept override + HRESULT __stdcall get_Julian(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Julian()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Julian()); return S_OK; } catch (...) @@ -1504,11 +1617,12 @@ struct produce : produce } } - HRESULT __stdcall get_Korean(abi_arg_out value) noexcept override + HRESULT __stdcall get_Korean(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Korean()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Korean()); return S_OK; } catch (...) @@ -1518,11 +1632,12 @@ struct produce : produce } } - HRESULT __stdcall get_Taiwan(abi_arg_out value) noexcept override + HRESULT __stdcall get_Taiwan(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Taiwan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Taiwan()); return S_OK; } catch (...) @@ -1532,11 +1647,12 @@ struct produce : produce } } - HRESULT __stdcall get_Thai(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thai(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thai()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thai()); return S_OK; } catch (...) @@ -1546,11 +1662,12 @@ struct produce : produce } } - HRESULT __stdcall get_UmAlQura(abi_arg_out value) noexcept override + HRESULT __stdcall get_UmAlQura(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UmAlQura()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UmAlQura()); return S_OK; } catch (...) @@ -1564,11 +1681,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Persian(abi_arg_out value) noexcept override + HRESULT __stdcall get_Persian(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Persian()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Persian()); return S_OK; } catch (...) @@ -1582,11 +1700,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ChineseLunar(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChineseLunar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChineseLunar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChineseLunar()); return S_OK; } catch (...) @@ -1596,11 +1715,12 @@ struct produce : produc } } - HRESULT __stdcall get_JapaneseLunar(abi_arg_out value) noexcept override + HRESULT __stdcall get_JapaneseLunar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JapaneseLunar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JapaneseLunar()); return S_OK; } catch (...) @@ -1610,11 +1730,12 @@ struct produce : produc } } - HRESULT __stdcall get_KoreanLunar(abi_arg_out value) noexcept override + HRESULT __stdcall get_KoreanLunar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KoreanLunar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KoreanLunar()); return S_OK; } catch (...) @@ -1624,11 +1745,12 @@ struct produce : produc } } - HRESULT __stdcall get_TaiwanLunar(abi_arg_out value) noexcept override + HRESULT __stdcall get_TaiwanLunar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TaiwanLunar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaiwanLunar()); return S_OK; } catch (...) @@ -1638,11 +1760,12 @@ struct produce : produc } } - HRESULT __stdcall get_VietnameseLunar(abi_arg_out value) noexcept override + HRESULT __stdcall get_VietnameseLunar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VietnameseLunar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VietnameseLunar()); return S_OK; } catch (...) @@ -1656,11 +1779,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_TwelveHour(abi_arg_out value) noexcept override + HRESULT __stdcall get_TwelveHour(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TwelveHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TwelveHour()); return S_OK; } catch (...) @@ -1670,11 +1794,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_TwentyFourHour(abi_arg_out value) noexcept override + HRESULT __stdcall get_TwentyFourHour(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TwentyFourHour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TwentyFourHour()); return S_OK; } catch (...) @@ -1688,11 +1813,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_AED(abi_arg_out value) noexcept override + HRESULT __stdcall get_AED(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AED()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AED()); return S_OK; } catch (...) @@ -1702,11 +1828,12 @@ struct produce : produce } } - HRESULT __stdcall get_AFN(abi_arg_out value) noexcept override + HRESULT __stdcall get_AFN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AFN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AFN()); return S_OK; } catch (...) @@ -1716,11 +1843,12 @@ struct produce : produce } } - HRESULT __stdcall get_ALL(abi_arg_out value) noexcept override + HRESULT __stdcall get_ALL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ALL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ALL()); return S_OK; } catch (...) @@ -1730,11 +1858,12 @@ struct produce : produce } } - HRESULT __stdcall get_AMD(abi_arg_out value) noexcept override + HRESULT __stdcall get_AMD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AMD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AMD()); return S_OK; } catch (...) @@ -1744,11 +1873,12 @@ struct produce : produce } } - HRESULT __stdcall get_ANG(abi_arg_out value) noexcept override + HRESULT __stdcall get_ANG(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ANG()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ANG()); return S_OK; } catch (...) @@ -1758,11 +1888,12 @@ struct produce : produce } } - HRESULT __stdcall get_AOA(abi_arg_out value) noexcept override + HRESULT __stdcall get_AOA(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AOA()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AOA()); return S_OK; } catch (...) @@ -1772,11 +1903,12 @@ struct produce : produce } } - HRESULT __stdcall get_ARS(abi_arg_out value) noexcept override + HRESULT __stdcall get_ARS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ARS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ARS()); return S_OK; } catch (...) @@ -1786,11 +1918,12 @@ struct produce : produce } } - HRESULT __stdcall get_AUD(abi_arg_out value) noexcept override + HRESULT __stdcall get_AUD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AUD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AUD()); return S_OK; } catch (...) @@ -1800,11 +1933,12 @@ struct produce : produce } } - HRESULT __stdcall get_AWG(abi_arg_out value) noexcept override + HRESULT __stdcall get_AWG(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AWG()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AWG()); return S_OK; } catch (...) @@ -1814,11 +1948,12 @@ struct produce : produce } } - HRESULT __stdcall get_AZN(abi_arg_out value) noexcept override + HRESULT __stdcall get_AZN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AZN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AZN()); return S_OK; } catch (...) @@ -1828,11 +1963,12 @@ struct produce : produce } } - HRESULT __stdcall get_BAM(abi_arg_out value) noexcept override + HRESULT __stdcall get_BAM(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BAM()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BAM()); return S_OK; } catch (...) @@ -1842,11 +1978,12 @@ struct produce : produce } } - HRESULT __stdcall get_BBD(abi_arg_out value) noexcept override + HRESULT __stdcall get_BBD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BBD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BBD()); return S_OK; } catch (...) @@ -1856,11 +1993,12 @@ struct produce : produce } } - HRESULT __stdcall get_BDT(abi_arg_out value) noexcept override + HRESULT __stdcall get_BDT(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BDT()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BDT()); return S_OK; } catch (...) @@ -1870,11 +2008,12 @@ struct produce : produce } } - HRESULT __stdcall get_BGN(abi_arg_out value) noexcept override + HRESULT __stdcall get_BGN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BGN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BGN()); return S_OK; } catch (...) @@ -1884,11 +2023,12 @@ struct produce : produce } } - HRESULT __stdcall get_BHD(abi_arg_out value) noexcept override + HRESULT __stdcall get_BHD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BHD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BHD()); return S_OK; } catch (...) @@ -1898,11 +2038,12 @@ struct produce : produce } } - HRESULT __stdcall get_BIF(abi_arg_out value) noexcept override + HRESULT __stdcall get_BIF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BIF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BIF()); return S_OK; } catch (...) @@ -1912,11 +2053,12 @@ struct produce : produce } } - HRESULT __stdcall get_BMD(abi_arg_out value) noexcept override + HRESULT __stdcall get_BMD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BMD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BMD()); return S_OK; } catch (...) @@ -1926,11 +2068,12 @@ struct produce : produce } } - HRESULT __stdcall get_BND(abi_arg_out value) noexcept override + HRESULT __stdcall get_BND(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BND()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BND()); return S_OK; } catch (...) @@ -1940,11 +2083,12 @@ struct produce : produce } } - HRESULT __stdcall get_BOB(abi_arg_out value) noexcept override + HRESULT __stdcall get_BOB(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BOB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BOB()); return S_OK; } catch (...) @@ -1954,11 +2098,12 @@ struct produce : produce } } - HRESULT __stdcall get_BRL(abi_arg_out value) noexcept override + HRESULT __stdcall get_BRL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BRL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BRL()); return S_OK; } catch (...) @@ -1968,11 +2113,12 @@ struct produce : produce } } - HRESULT __stdcall get_BSD(abi_arg_out value) noexcept override + HRESULT __stdcall get_BSD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BSD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BSD()); return S_OK; } catch (...) @@ -1982,11 +2128,12 @@ struct produce : produce } } - HRESULT __stdcall get_BTN(abi_arg_out value) noexcept override + HRESULT __stdcall get_BTN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BTN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BTN()); return S_OK; } catch (...) @@ -1996,11 +2143,12 @@ struct produce : produce } } - HRESULT __stdcall get_BWP(abi_arg_out value) noexcept override + HRESULT __stdcall get_BWP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BWP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BWP()); return S_OK; } catch (...) @@ -2010,11 +2158,12 @@ struct produce : produce } } - HRESULT __stdcall get_BYR(abi_arg_out value) noexcept override + HRESULT __stdcall get_BYR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BYR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BYR()); return S_OK; } catch (...) @@ -2024,11 +2173,12 @@ struct produce : produce } } - HRESULT __stdcall get_BZD(abi_arg_out value) noexcept override + HRESULT __stdcall get_BZD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BZD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BZD()); return S_OK; } catch (...) @@ -2038,11 +2188,12 @@ struct produce : produce } } - HRESULT __stdcall get_CAD(abi_arg_out value) noexcept override + HRESULT __stdcall get_CAD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CAD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CAD()); return S_OK; } catch (...) @@ -2052,11 +2203,12 @@ struct produce : produce } } - HRESULT __stdcall get_CDF(abi_arg_out value) noexcept override + HRESULT __stdcall get_CDF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CDF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CDF()); return S_OK; } catch (...) @@ -2066,11 +2218,12 @@ struct produce : produce } } - HRESULT __stdcall get_CHF(abi_arg_out value) noexcept override + HRESULT __stdcall get_CHF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CHF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CHF()); return S_OK; } catch (...) @@ -2080,11 +2233,12 @@ struct produce : produce } } - HRESULT __stdcall get_CLP(abi_arg_out value) noexcept override + HRESULT __stdcall get_CLP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CLP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CLP()); return S_OK; } catch (...) @@ -2094,11 +2248,12 @@ struct produce : produce } } - HRESULT __stdcall get_CNY(abi_arg_out value) noexcept override + HRESULT __stdcall get_CNY(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CNY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CNY()); return S_OK; } catch (...) @@ -2108,11 +2263,12 @@ struct produce : produce } } - HRESULT __stdcall get_COP(abi_arg_out value) noexcept override + HRESULT __stdcall get_COP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().COP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().COP()); return S_OK; } catch (...) @@ -2122,11 +2278,12 @@ struct produce : produce } } - HRESULT __stdcall get_CRC(abi_arg_out value) noexcept override + HRESULT __stdcall get_CRC(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CRC()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CRC()); return S_OK; } catch (...) @@ -2136,11 +2293,12 @@ struct produce : produce } } - HRESULT __stdcall get_CUP(abi_arg_out value) noexcept override + HRESULT __stdcall get_CUP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CUP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CUP()); return S_OK; } catch (...) @@ -2150,11 +2308,12 @@ struct produce : produce } } - HRESULT __stdcall get_CVE(abi_arg_out value) noexcept override + HRESULT __stdcall get_CVE(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CVE()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CVE()); return S_OK; } catch (...) @@ -2164,11 +2323,12 @@ struct produce : produce } } - HRESULT __stdcall get_CZK(abi_arg_out value) noexcept override + HRESULT __stdcall get_CZK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CZK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CZK()); return S_OK; } catch (...) @@ -2178,11 +2338,12 @@ struct produce : produce } } - HRESULT __stdcall get_DJF(abi_arg_out value) noexcept override + HRESULT __stdcall get_DJF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DJF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DJF()); return S_OK; } catch (...) @@ -2192,11 +2353,12 @@ struct produce : produce } } - HRESULT __stdcall get_DKK(abi_arg_out value) noexcept override + HRESULT __stdcall get_DKK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DKK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DKK()); return S_OK; } catch (...) @@ -2206,11 +2368,12 @@ struct produce : produce } } - HRESULT __stdcall get_DOP(abi_arg_out value) noexcept override + HRESULT __stdcall get_DOP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DOP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DOP()); return S_OK; } catch (...) @@ -2220,11 +2383,12 @@ struct produce : produce } } - HRESULT __stdcall get_DZD(abi_arg_out value) noexcept override + HRESULT __stdcall get_DZD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DZD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DZD()); return S_OK; } catch (...) @@ -2234,11 +2398,12 @@ struct produce : produce } } - HRESULT __stdcall get_EGP(abi_arg_out value) noexcept override + HRESULT __stdcall get_EGP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EGP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EGP()); return S_OK; } catch (...) @@ -2248,11 +2413,12 @@ struct produce : produce } } - HRESULT __stdcall get_ERN(abi_arg_out value) noexcept override + HRESULT __stdcall get_ERN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ERN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ERN()); return S_OK; } catch (...) @@ -2262,11 +2428,12 @@ struct produce : produce } } - HRESULT __stdcall get_ETB(abi_arg_out value) noexcept override + HRESULT __stdcall get_ETB(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ETB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ETB()); return S_OK; } catch (...) @@ -2276,11 +2443,12 @@ struct produce : produce } } - HRESULT __stdcall get_EUR(abi_arg_out value) noexcept override + HRESULT __stdcall get_EUR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EUR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EUR()); return S_OK; } catch (...) @@ -2290,11 +2458,12 @@ struct produce : produce } } - HRESULT __stdcall get_FJD(abi_arg_out value) noexcept override + HRESULT __stdcall get_FJD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FJD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FJD()); return S_OK; } catch (...) @@ -2304,11 +2473,12 @@ struct produce : produce } } - HRESULT __stdcall get_FKP(abi_arg_out value) noexcept override + HRESULT __stdcall get_FKP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FKP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FKP()); return S_OK; } catch (...) @@ -2318,11 +2488,12 @@ struct produce : produce } } - HRESULT __stdcall get_GBP(abi_arg_out value) noexcept override + HRESULT __stdcall get_GBP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GBP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GBP()); return S_OK; } catch (...) @@ -2332,11 +2503,12 @@ struct produce : produce } } - HRESULT __stdcall get_GEL(abi_arg_out value) noexcept override + HRESULT __stdcall get_GEL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GEL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GEL()); return S_OK; } catch (...) @@ -2346,11 +2518,12 @@ struct produce : produce } } - HRESULT __stdcall get_GHS(abi_arg_out value) noexcept override + HRESULT __stdcall get_GHS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GHS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GHS()); return S_OK; } catch (...) @@ -2360,11 +2533,12 @@ struct produce : produce } } - HRESULT __stdcall get_GIP(abi_arg_out value) noexcept override + HRESULT __stdcall get_GIP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GIP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GIP()); return S_OK; } catch (...) @@ -2374,11 +2548,12 @@ struct produce : produce } } - HRESULT __stdcall get_GMD(abi_arg_out value) noexcept override + HRESULT __stdcall get_GMD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GMD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GMD()); return S_OK; } catch (...) @@ -2388,11 +2563,12 @@ struct produce : produce } } - HRESULT __stdcall get_GNF(abi_arg_out value) noexcept override + HRESULT __stdcall get_GNF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GNF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GNF()); return S_OK; } catch (...) @@ -2402,11 +2578,12 @@ struct produce : produce } } - HRESULT __stdcall get_GTQ(abi_arg_out value) noexcept override + HRESULT __stdcall get_GTQ(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GTQ()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GTQ()); return S_OK; } catch (...) @@ -2416,11 +2593,12 @@ struct produce : produce } } - HRESULT __stdcall get_GYD(abi_arg_out value) noexcept override + HRESULT __stdcall get_GYD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GYD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GYD()); return S_OK; } catch (...) @@ -2430,11 +2608,12 @@ struct produce : produce } } - HRESULT __stdcall get_HKD(abi_arg_out value) noexcept override + HRESULT __stdcall get_HKD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HKD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HKD()); return S_OK; } catch (...) @@ -2444,11 +2623,12 @@ struct produce : produce } } - HRESULT __stdcall get_HNL(abi_arg_out value) noexcept override + HRESULT __stdcall get_HNL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HNL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HNL()); return S_OK; } catch (...) @@ -2458,11 +2638,12 @@ struct produce : produce } } - HRESULT __stdcall get_HRK(abi_arg_out value) noexcept override + HRESULT __stdcall get_HRK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HRK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HRK()); return S_OK; } catch (...) @@ -2472,11 +2653,12 @@ struct produce : produce } } - HRESULT __stdcall get_HTG(abi_arg_out value) noexcept override + HRESULT __stdcall get_HTG(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HTG()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HTG()); return S_OK; } catch (...) @@ -2486,11 +2668,12 @@ struct produce : produce } } - HRESULT __stdcall get_HUF(abi_arg_out value) noexcept override + HRESULT __stdcall get_HUF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HUF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HUF()); return S_OK; } catch (...) @@ -2500,11 +2683,12 @@ struct produce : produce } } - HRESULT __stdcall get_IDR(abi_arg_out value) noexcept override + HRESULT __stdcall get_IDR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IDR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IDR()); return S_OK; } catch (...) @@ -2514,11 +2698,12 @@ struct produce : produce } } - HRESULT __stdcall get_ILS(abi_arg_out value) noexcept override + HRESULT __stdcall get_ILS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ILS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ILS()); return S_OK; } catch (...) @@ -2528,11 +2713,12 @@ struct produce : produce } } - HRESULT __stdcall get_INR(abi_arg_out value) noexcept override + HRESULT __stdcall get_INR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().INR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().INR()); return S_OK; } catch (...) @@ -2542,11 +2728,12 @@ struct produce : produce } } - HRESULT __stdcall get_IQD(abi_arg_out value) noexcept override + HRESULT __stdcall get_IQD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IQD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IQD()); return S_OK; } catch (...) @@ -2556,11 +2743,12 @@ struct produce : produce } } - HRESULT __stdcall get_IRR(abi_arg_out value) noexcept override + HRESULT __stdcall get_IRR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IRR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IRR()); return S_OK; } catch (...) @@ -2570,11 +2758,12 @@ struct produce : produce } } - HRESULT __stdcall get_ISK(abi_arg_out value) noexcept override + HRESULT __stdcall get_ISK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ISK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ISK()); return S_OK; } catch (...) @@ -2584,11 +2773,12 @@ struct produce : produce } } - HRESULT __stdcall get_JMD(abi_arg_out value) noexcept override + HRESULT __stdcall get_JMD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JMD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JMD()); return S_OK; } catch (...) @@ -2598,11 +2788,12 @@ struct produce : produce } } - HRESULT __stdcall get_JOD(abi_arg_out value) noexcept override + HRESULT __stdcall get_JOD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JOD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JOD()); return S_OK; } catch (...) @@ -2612,11 +2803,12 @@ struct produce : produce } } - HRESULT __stdcall get_JPY(abi_arg_out value) noexcept override + HRESULT __stdcall get_JPY(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JPY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JPY()); return S_OK; } catch (...) @@ -2626,11 +2818,12 @@ struct produce : produce } } - HRESULT __stdcall get_KES(abi_arg_out value) noexcept override + HRESULT __stdcall get_KES(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KES()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KES()); return S_OK; } catch (...) @@ -2640,11 +2833,12 @@ struct produce : produce } } - HRESULT __stdcall get_KGS(abi_arg_out value) noexcept override + HRESULT __stdcall get_KGS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KGS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KGS()); return S_OK; } catch (...) @@ -2654,11 +2848,12 @@ struct produce : produce } } - HRESULT __stdcall get_KHR(abi_arg_out value) noexcept override + HRESULT __stdcall get_KHR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KHR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KHR()); return S_OK; } catch (...) @@ -2668,11 +2863,12 @@ struct produce : produce } } - HRESULT __stdcall get_KMF(abi_arg_out value) noexcept override + HRESULT __stdcall get_KMF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KMF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KMF()); return S_OK; } catch (...) @@ -2682,11 +2878,12 @@ struct produce : produce } } - HRESULT __stdcall get_KPW(abi_arg_out value) noexcept override + HRESULT __stdcall get_KPW(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KPW()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KPW()); return S_OK; } catch (...) @@ -2696,11 +2893,12 @@ struct produce : produce } } - HRESULT __stdcall get_KRW(abi_arg_out value) noexcept override + HRESULT __stdcall get_KRW(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KRW()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KRW()); return S_OK; } catch (...) @@ -2710,11 +2908,12 @@ struct produce : produce } } - HRESULT __stdcall get_KWD(abi_arg_out value) noexcept override + HRESULT __stdcall get_KWD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KWD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KWD()); return S_OK; } catch (...) @@ -2724,11 +2923,12 @@ struct produce : produce } } - HRESULT __stdcall get_KYD(abi_arg_out value) noexcept override + HRESULT __stdcall get_KYD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KYD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KYD()); return S_OK; } catch (...) @@ -2738,11 +2938,12 @@ struct produce : produce } } - HRESULT __stdcall get_KZT(abi_arg_out value) noexcept override + HRESULT __stdcall get_KZT(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KZT()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KZT()); return S_OK; } catch (...) @@ -2752,11 +2953,12 @@ struct produce : produce } } - HRESULT __stdcall get_LAK(abi_arg_out value) noexcept override + HRESULT __stdcall get_LAK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LAK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LAK()); return S_OK; } catch (...) @@ -2766,11 +2968,12 @@ struct produce : produce } } - HRESULT __stdcall get_LBP(abi_arg_out value) noexcept override + HRESULT __stdcall get_LBP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LBP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LBP()); return S_OK; } catch (...) @@ -2780,11 +2983,12 @@ struct produce : produce } } - HRESULT __stdcall get_LKR(abi_arg_out value) noexcept override + HRESULT __stdcall get_LKR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LKR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LKR()); return S_OK; } catch (...) @@ -2794,11 +2998,12 @@ struct produce : produce } } - HRESULT __stdcall get_LRD(abi_arg_out value) noexcept override + HRESULT __stdcall get_LRD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LRD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LRD()); return S_OK; } catch (...) @@ -2808,11 +3013,12 @@ struct produce : produce } } - HRESULT __stdcall get_LSL(abi_arg_out value) noexcept override + HRESULT __stdcall get_LSL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LSL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LSL()); return S_OK; } catch (...) @@ -2822,11 +3028,12 @@ struct produce : produce } } - HRESULT __stdcall get_LTL(abi_arg_out value) noexcept override + HRESULT __stdcall get_LTL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LTL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LTL()); return S_OK; } catch (...) @@ -2836,11 +3043,12 @@ struct produce : produce } } - HRESULT __stdcall get_LVL(abi_arg_out value) noexcept override + HRESULT __stdcall get_LVL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LVL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LVL()); return S_OK; } catch (...) @@ -2850,11 +3058,12 @@ struct produce : produce } } - HRESULT __stdcall get_LYD(abi_arg_out value) noexcept override + HRESULT __stdcall get_LYD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LYD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LYD()); return S_OK; } catch (...) @@ -2864,11 +3073,12 @@ struct produce : produce } } - HRESULT __stdcall get_MAD(abi_arg_out value) noexcept override + HRESULT __stdcall get_MAD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MAD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MAD()); return S_OK; } catch (...) @@ -2878,11 +3088,12 @@ struct produce : produce } } - HRESULT __stdcall get_MDL(abi_arg_out value) noexcept override + HRESULT __stdcall get_MDL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MDL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MDL()); return S_OK; } catch (...) @@ -2892,11 +3103,12 @@ struct produce : produce } } - HRESULT __stdcall get_MGA(abi_arg_out value) noexcept override + HRESULT __stdcall get_MGA(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MGA()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MGA()); return S_OK; } catch (...) @@ -2906,11 +3118,12 @@ struct produce : produce } } - HRESULT __stdcall get_MKD(abi_arg_out value) noexcept override + HRESULT __stdcall get_MKD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MKD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MKD()); return S_OK; } catch (...) @@ -2920,11 +3133,12 @@ struct produce : produce } } - HRESULT __stdcall get_MMK(abi_arg_out value) noexcept override + HRESULT __stdcall get_MMK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MMK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MMK()); return S_OK; } catch (...) @@ -2934,11 +3148,12 @@ struct produce : produce } } - HRESULT __stdcall get_MNT(abi_arg_out value) noexcept override + HRESULT __stdcall get_MNT(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MNT()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MNT()); return S_OK; } catch (...) @@ -2948,11 +3163,12 @@ struct produce : produce } } - HRESULT __stdcall get_MOP(abi_arg_out value) noexcept override + HRESULT __stdcall get_MOP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MOP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MOP()); return S_OK; } catch (...) @@ -2962,11 +3178,12 @@ struct produce : produce } } - HRESULT __stdcall get_MRO(abi_arg_out value) noexcept override + HRESULT __stdcall get_MRO(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MRO()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MRO()); return S_OK; } catch (...) @@ -2976,11 +3193,12 @@ struct produce : produce } } - HRESULT __stdcall get_MUR(abi_arg_out value) noexcept override + HRESULT __stdcall get_MUR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MUR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MUR()); return S_OK; } catch (...) @@ -2990,11 +3208,12 @@ struct produce : produce } } - HRESULT __stdcall get_MVR(abi_arg_out value) noexcept override + HRESULT __stdcall get_MVR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MVR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MVR()); return S_OK; } catch (...) @@ -3004,11 +3223,12 @@ struct produce : produce } } - HRESULT __stdcall get_MWK(abi_arg_out value) noexcept override + HRESULT __stdcall get_MWK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MWK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MWK()); return S_OK; } catch (...) @@ -3018,11 +3238,12 @@ struct produce : produce } } - HRESULT __stdcall get_MXN(abi_arg_out value) noexcept override + HRESULT __stdcall get_MXN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MXN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MXN()); return S_OK; } catch (...) @@ -3032,11 +3253,12 @@ struct produce : produce } } - HRESULT __stdcall get_MYR(abi_arg_out value) noexcept override + HRESULT __stdcall get_MYR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MYR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MYR()); return S_OK; } catch (...) @@ -3046,11 +3268,12 @@ struct produce : produce } } - HRESULT __stdcall get_MZN(abi_arg_out value) noexcept override + HRESULT __stdcall get_MZN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MZN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MZN()); return S_OK; } catch (...) @@ -3060,11 +3283,12 @@ struct produce : produce } } - HRESULT __stdcall get_NAD(abi_arg_out value) noexcept override + HRESULT __stdcall get_NAD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NAD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NAD()); return S_OK; } catch (...) @@ -3074,11 +3298,12 @@ struct produce : produce } } - HRESULT __stdcall get_NGN(abi_arg_out value) noexcept override + HRESULT __stdcall get_NGN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NGN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NGN()); return S_OK; } catch (...) @@ -3088,11 +3313,12 @@ struct produce : produce } } - HRESULT __stdcall get_NIO(abi_arg_out value) noexcept override + HRESULT __stdcall get_NIO(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NIO()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NIO()); return S_OK; } catch (...) @@ -3102,11 +3328,12 @@ struct produce : produce } } - HRESULT __stdcall get_NOK(abi_arg_out value) noexcept override + HRESULT __stdcall get_NOK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NOK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NOK()); return S_OK; } catch (...) @@ -3116,11 +3343,12 @@ struct produce : produce } } - HRESULT __stdcall get_NPR(abi_arg_out value) noexcept override + HRESULT __stdcall get_NPR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NPR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NPR()); return S_OK; } catch (...) @@ -3130,11 +3358,12 @@ struct produce : produce } } - HRESULT __stdcall get_NZD(abi_arg_out value) noexcept override + HRESULT __stdcall get_NZD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NZD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NZD()); return S_OK; } catch (...) @@ -3144,11 +3373,12 @@ struct produce : produce } } - HRESULT __stdcall get_OMR(abi_arg_out value) noexcept override + HRESULT __stdcall get_OMR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OMR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OMR()); return S_OK; } catch (...) @@ -3158,11 +3388,12 @@ struct produce : produce } } - HRESULT __stdcall get_PAB(abi_arg_out value) noexcept override + HRESULT __stdcall get_PAB(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PAB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PAB()); return S_OK; } catch (...) @@ -3172,11 +3403,12 @@ struct produce : produce } } - HRESULT __stdcall get_PEN(abi_arg_out value) noexcept override + HRESULT __stdcall get_PEN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PEN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PEN()); return S_OK; } catch (...) @@ -3186,11 +3418,12 @@ struct produce : produce } } - HRESULT __stdcall get_PGK(abi_arg_out value) noexcept override + HRESULT __stdcall get_PGK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PGK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PGK()); return S_OK; } catch (...) @@ -3200,11 +3433,12 @@ struct produce : produce } } - HRESULT __stdcall get_PHP(abi_arg_out value) noexcept override + HRESULT __stdcall get_PHP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PHP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PHP()); return S_OK; } catch (...) @@ -3214,11 +3448,12 @@ struct produce : produce } } - HRESULT __stdcall get_PKR(abi_arg_out value) noexcept override + HRESULT __stdcall get_PKR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PKR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PKR()); return S_OK; } catch (...) @@ -3228,11 +3463,12 @@ struct produce : produce } } - HRESULT __stdcall get_PLN(abi_arg_out value) noexcept override + HRESULT __stdcall get_PLN(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PLN()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PLN()); return S_OK; } catch (...) @@ -3242,11 +3478,12 @@ struct produce : produce } } - HRESULT __stdcall get_PYG(abi_arg_out value) noexcept override + HRESULT __stdcall get_PYG(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PYG()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PYG()); return S_OK; } catch (...) @@ -3256,11 +3493,12 @@ struct produce : produce } } - HRESULT __stdcall get_QAR(abi_arg_out value) noexcept override + HRESULT __stdcall get_QAR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QAR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QAR()); return S_OK; } catch (...) @@ -3270,11 +3508,12 @@ struct produce : produce } } - HRESULT __stdcall get_RON(abi_arg_out value) noexcept override + HRESULT __stdcall get_RON(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RON()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RON()); return S_OK; } catch (...) @@ -3284,11 +3523,12 @@ struct produce : produce } } - HRESULT __stdcall get_RSD(abi_arg_out value) noexcept override + HRESULT __stdcall get_RSD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RSD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RSD()); return S_OK; } catch (...) @@ -3298,11 +3538,12 @@ struct produce : produce } } - HRESULT __stdcall get_RUB(abi_arg_out value) noexcept override + HRESULT __stdcall get_RUB(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RUB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RUB()); return S_OK; } catch (...) @@ -3312,11 +3553,12 @@ struct produce : produce } } - HRESULT __stdcall get_RWF(abi_arg_out value) noexcept override + HRESULT __stdcall get_RWF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RWF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RWF()); return S_OK; } catch (...) @@ -3326,11 +3568,12 @@ struct produce : produce } } - HRESULT __stdcall get_SAR(abi_arg_out value) noexcept override + HRESULT __stdcall get_SAR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SAR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SAR()); return S_OK; } catch (...) @@ -3340,11 +3583,12 @@ struct produce : produce } } - HRESULT __stdcall get_SBD(abi_arg_out value) noexcept override + HRESULT __stdcall get_SBD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SBD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SBD()); return S_OK; } catch (...) @@ -3354,11 +3598,12 @@ struct produce : produce } } - HRESULT __stdcall get_SCR(abi_arg_out value) noexcept override + HRESULT __stdcall get_SCR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SCR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SCR()); return S_OK; } catch (...) @@ -3368,11 +3613,12 @@ struct produce : produce } } - HRESULT __stdcall get_SDG(abi_arg_out value) noexcept override + HRESULT __stdcall get_SDG(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SDG()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SDG()); return S_OK; } catch (...) @@ -3382,11 +3628,12 @@ struct produce : produce } } - HRESULT __stdcall get_SEK(abi_arg_out value) noexcept override + HRESULT __stdcall get_SEK(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SEK()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SEK()); return S_OK; } catch (...) @@ -3396,11 +3643,12 @@ struct produce : produce } } - HRESULT __stdcall get_SGD(abi_arg_out value) noexcept override + HRESULT __stdcall get_SGD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SGD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SGD()); return S_OK; } catch (...) @@ -3410,11 +3658,12 @@ struct produce : produce } } - HRESULT __stdcall get_SHP(abi_arg_out value) noexcept override + HRESULT __stdcall get_SHP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SHP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SHP()); return S_OK; } catch (...) @@ -3424,11 +3673,12 @@ struct produce : produce } } - HRESULT __stdcall get_SLL(abi_arg_out value) noexcept override + HRESULT __stdcall get_SLL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SLL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SLL()); return S_OK; } catch (...) @@ -3438,11 +3688,12 @@ struct produce : produce } } - HRESULT __stdcall get_SOS(abi_arg_out value) noexcept override + HRESULT __stdcall get_SOS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SOS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SOS()); return S_OK; } catch (...) @@ -3452,11 +3703,12 @@ struct produce : produce } } - HRESULT __stdcall get_SRD(abi_arg_out value) noexcept override + HRESULT __stdcall get_SRD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SRD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SRD()); return S_OK; } catch (...) @@ -3466,11 +3718,12 @@ struct produce : produce } } - HRESULT __stdcall get_STD(abi_arg_out value) noexcept override + HRESULT __stdcall get_STD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().STD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().STD()); return S_OK; } catch (...) @@ -3480,11 +3733,12 @@ struct produce : produce } } - HRESULT __stdcall get_SYP(abi_arg_out value) noexcept override + HRESULT __stdcall get_SYP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SYP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SYP()); return S_OK; } catch (...) @@ -3494,11 +3748,12 @@ struct produce : produce } } - HRESULT __stdcall get_SZL(abi_arg_out value) noexcept override + HRESULT __stdcall get_SZL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SZL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SZL()); return S_OK; } catch (...) @@ -3508,11 +3763,12 @@ struct produce : produce } } - HRESULT __stdcall get_THB(abi_arg_out value) noexcept override + HRESULT __stdcall get_THB(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().THB()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().THB()); return S_OK; } catch (...) @@ -3522,11 +3778,12 @@ struct produce : produce } } - HRESULT __stdcall get_TJS(abi_arg_out value) noexcept override + HRESULT __stdcall get_TJS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TJS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TJS()); return S_OK; } catch (...) @@ -3536,11 +3793,12 @@ struct produce : produce } } - HRESULT __stdcall get_TMT(abi_arg_out value) noexcept override + HRESULT __stdcall get_TMT(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TMT()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TMT()); return S_OK; } catch (...) @@ -3550,11 +3808,12 @@ struct produce : produce } } - HRESULT __stdcall get_TND(abi_arg_out value) noexcept override + HRESULT __stdcall get_TND(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TND()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TND()); return S_OK; } catch (...) @@ -3564,11 +3823,12 @@ struct produce : produce } } - HRESULT __stdcall get_TOP(abi_arg_out value) noexcept override + HRESULT __stdcall get_TOP(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TOP()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TOP()); return S_OK; } catch (...) @@ -3578,11 +3838,12 @@ struct produce : produce } } - HRESULT __stdcall get_TRY(abi_arg_out value) noexcept override + HRESULT __stdcall get_TRY(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TRY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TRY()); return S_OK; } catch (...) @@ -3592,11 +3853,12 @@ struct produce : produce } } - HRESULT __stdcall get_TTD(abi_arg_out value) noexcept override + HRESULT __stdcall get_TTD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TTD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TTD()); return S_OK; } catch (...) @@ -3606,11 +3868,12 @@ struct produce : produce } } - HRESULT __stdcall get_TWD(abi_arg_out value) noexcept override + HRESULT __stdcall get_TWD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TWD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TWD()); return S_OK; } catch (...) @@ -3620,11 +3883,12 @@ struct produce : produce } } - HRESULT __stdcall get_TZS(abi_arg_out value) noexcept override + HRESULT __stdcall get_TZS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TZS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TZS()); return S_OK; } catch (...) @@ -3634,11 +3898,12 @@ struct produce : produce } } - HRESULT __stdcall get_UAH(abi_arg_out value) noexcept override + HRESULT __stdcall get_UAH(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UAH()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UAH()); return S_OK; } catch (...) @@ -3648,11 +3913,12 @@ struct produce : produce } } - HRESULT __stdcall get_UGX(abi_arg_out value) noexcept override + HRESULT __stdcall get_UGX(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UGX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UGX()); return S_OK; } catch (...) @@ -3662,11 +3928,12 @@ struct produce : produce } } - HRESULT __stdcall get_USD(abi_arg_out value) noexcept override + HRESULT __stdcall get_USD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().USD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().USD()); return S_OK; } catch (...) @@ -3676,11 +3943,12 @@ struct produce : produce } } - HRESULT __stdcall get_UYU(abi_arg_out value) noexcept override + HRESULT __stdcall get_UYU(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UYU()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UYU()); return S_OK; } catch (...) @@ -3690,11 +3958,12 @@ struct produce : produce } } - HRESULT __stdcall get_UZS(abi_arg_out value) noexcept override + HRESULT __stdcall get_UZS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UZS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UZS()); return S_OK; } catch (...) @@ -3704,11 +3973,12 @@ struct produce : produce } } - HRESULT __stdcall get_VEF(abi_arg_out value) noexcept override + HRESULT __stdcall get_VEF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VEF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VEF()); return S_OK; } catch (...) @@ -3718,11 +3988,12 @@ struct produce : produce } } - HRESULT __stdcall get_VND(abi_arg_out value) noexcept override + HRESULT __stdcall get_VND(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VND()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VND()); return S_OK; } catch (...) @@ -3732,11 +4003,12 @@ struct produce : produce } } - HRESULT __stdcall get_VUV(abi_arg_out value) noexcept override + HRESULT __stdcall get_VUV(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VUV()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VUV()); return S_OK; } catch (...) @@ -3746,11 +4018,12 @@ struct produce : produce } } - HRESULT __stdcall get_WST(abi_arg_out value) noexcept override + HRESULT __stdcall get_WST(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WST()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WST()); return S_OK; } catch (...) @@ -3760,11 +4033,12 @@ struct produce : produce } } - HRESULT __stdcall get_XAF(abi_arg_out value) noexcept override + HRESULT __stdcall get_XAF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XAF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XAF()); return S_OK; } catch (...) @@ -3774,11 +4048,12 @@ struct produce : produce } } - HRESULT __stdcall get_XCD(abi_arg_out value) noexcept override + HRESULT __stdcall get_XCD(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XCD()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XCD()); return S_OK; } catch (...) @@ -3788,11 +4063,12 @@ struct produce : produce } } - HRESULT __stdcall get_XOF(abi_arg_out value) noexcept override + HRESULT __stdcall get_XOF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XOF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XOF()); return S_OK; } catch (...) @@ -3802,11 +4078,12 @@ struct produce : produce } } - HRESULT __stdcall get_XPF(abi_arg_out value) noexcept override + HRESULT __stdcall get_XPF(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XPF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XPF()); return S_OK; } catch (...) @@ -3816,11 +4093,12 @@ struct produce : produce } } - HRESULT __stdcall get_XXX(abi_arg_out value) noexcept override + HRESULT __stdcall get_XXX(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XXX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XXX()); return S_OK; } catch (...) @@ -3830,11 +4108,12 @@ struct produce : produce } } - HRESULT __stdcall get_YER(abi_arg_out value) noexcept override + HRESULT __stdcall get_YER(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YER()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YER()); return S_OK; } catch (...) @@ -3844,11 +4123,12 @@ struct produce : produce } } - HRESULT __stdcall get_ZAR(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZAR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZAR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZAR()); return S_OK; } catch (...) @@ -3858,11 +4138,12 @@ struct produce : produce } } - HRESULT __stdcall get_ZMW(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZMW(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZMW()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZMW()); return S_OK; } catch (...) @@ -3872,11 +4153,12 @@ struct produce : produce } } - HRESULT __stdcall get_ZWL(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZWL(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZWL()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZWL()); return S_OK; } catch (...) @@ -3890,11 +4172,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Code(abi_arg_out value) noexcept override + HRESULT __stdcall get_Code(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Code()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code()); return S_OK; } catch (...) @@ -3904,11 +4187,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CodeTwoLetter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CodeTwoLetter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodeTwoLetter()); return S_OK; } catch (...) @@ -3918,11 +4202,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CodeThreeLetter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CodeThreeLetter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodeThreeLetter()); return S_OK; } catch (...) @@ -3932,11 +4217,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CodeThreeDigit(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CodeThreeDigit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodeThreeDigit()); return S_OK; } catch (...) @@ -3946,11 +4232,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -3960,11 +4247,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NativeName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NativeName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NativeName()); return S_OK; } catch (...) @@ -3974,11 +4262,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_CurrenciesInUse(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CurrenciesInUse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrenciesInUse()); return S_OK; } catch (...) @@ -3992,11 +4281,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateGeographicRegion(abi_arg_in geographicRegionCode, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateGeographicRegion(impl::abi_arg_in geographicRegionCode, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateGeographicRegion(*reinterpret_cast(&geographicRegionCode))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateGeographicRegion(*reinterpret_cast(&geographicRegionCode))); return S_OK; } catch (...) @@ -4010,11 +4300,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_IsSupported(abi_arg_in geographicRegionCode, bool * result) noexcept override + HRESULT __stdcall abi_IsSupported(impl::abi_arg_in geographicRegionCode, bool * result) noexcept override { try { - *result = detach(this->shim().IsSupported(*reinterpret_cast(&geographicRegionCode))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSupported(*reinterpret_cast(&geographicRegionCode))); return S_OK; } catch (...) @@ -4027,11 +4318,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_DisplayText(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayText()); return S_OK; } catch (...) @@ -4041,11 +4333,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_YomiText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiText()); return S_OK; } catch (...) @@ -4059,7 +4352,8 @@ struct produce : produce_baseshim().IsPhraseStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPhraseStart()); return S_OK; } catch (...) @@ -4072,11 +4366,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetWords(abi_arg_in input, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetWords(impl::abi_arg_in input, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetWords(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetWords(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -4086,11 +4381,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetWordsWithMonoRubyOption(abi_arg_in input, bool monoRuby, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetWordsWithMonoRubyOption(impl::abi_arg_in input, bool monoRuby, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetWords(*reinterpret_cast(&input), monoRuby)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetWords(*reinterpret_cast(&input), monoRuby)); return S_OK; } catch (...) @@ -4104,11 +4400,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_LanguageTag(abi_arg_out value) noexcept override + HRESULT __stdcall get_LanguageTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LanguageTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanguageTag()); return S_OK; } catch (...) @@ -4118,11 +4415,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -4132,11 +4430,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NativeName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NativeName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NativeName()); return S_OK; } catch (...) @@ -4146,11 +4445,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Script(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Script()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Script()); return S_OK; } catch (...) @@ -4164,11 +4464,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetExtensionSubtags(abi_arg_in singleton, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetExtensionSubtags(impl::abi_arg_in singleton, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetExtensionSubtags(*reinterpret_cast(&singleton))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetExtensionSubtags(*reinterpret_cast(&singleton))); return S_OK; } catch (...) @@ -4182,11 +4483,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateLanguage(abi_arg_in languageTag, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateLanguage(impl::abi_arg_in languageTag, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateLanguage(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateLanguage(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -4200,11 +4502,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_IsWellFormed(abi_arg_in languageTag, bool * result) noexcept override + HRESULT __stdcall abi_IsWellFormed(impl::abi_arg_in languageTag, bool * result) noexcept override { try { - *result = detach(this->shim().IsWellFormed(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsWellFormed(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -4213,11 +4516,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrentInputMethodLanguageTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentInputMethodLanguageTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentInputMethodLanguageTag()); return S_OK; } catch (...) @@ -4231,11 +4535,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_TrySetInputMethodLanguageTag(abi_arg_in languageTag, bool * result) noexcept override + HRESULT __stdcall abi_TrySetInputMethodLanguageTag(impl::abi_arg_in languageTag, bool * result) noexcept override { try { - *result = detach(this->shim().TrySetInputMethodLanguageTag(*reinterpret_cast(&languageTag))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetInputMethodLanguageTag(*reinterpret_cast(&languageTag))); return S_OK; } catch (...) @@ -4248,11 +4553,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Arab(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arab(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arab()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arab()); return S_OK; } catch (...) @@ -4262,11 +4568,12 @@ struct produce : pr } } - HRESULT __stdcall get_ArabExt(abi_arg_out value) noexcept override + HRESULT __stdcall get_ArabExt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ArabExt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ArabExt()); return S_OK; } catch (...) @@ -4276,11 +4583,12 @@ struct produce : pr } } - HRESULT __stdcall get_Bali(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bali(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bali()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bali()); return S_OK; } catch (...) @@ -4290,11 +4598,12 @@ struct produce : pr } } - HRESULT __stdcall get_Beng(abi_arg_out value) noexcept override + HRESULT __stdcall get_Beng(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Beng()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Beng()); return S_OK; } catch (...) @@ -4304,11 +4613,12 @@ struct produce : pr } } - HRESULT __stdcall get_Cham(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cham(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cham()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cham()); return S_OK; } catch (...) @@ -4318,11 +4628,12 @@ struct produce : pr } } - HRESULT __stdcall get_Deva(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deva(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deva()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deva()); return S_OK; } catch (...) @@ -4332,11 +4643,12 @@ struct produce : pr } } - HRESULT __stdcall get_FullWide(abi_arg_out value) noexcept override + HRESULT __stdcall get_FullWide(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullWide()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullWide()); return S_OK; } catch (...) @@ -4346,11 +4658,12 @@ struct produce : pr } } - HRESULT __stdcall get_Gujr(abi_arg_out value) noexcept override + HRESULT __stdcall get_Gujr(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Gujr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gujr()); return S_OK; } catch (...) @@ -4360,11 +4673,12 @@ struct produce : pr } } - HRESULT __stdcall get_Guru(abi_arg_out value) noexcept override + HRESULT __stdcall get_Guru(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Guru()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Guru()); return S_OK; } catch (...) @@ -4374,11 +4688,12 @@ struct produce : pr } } - HRESULT __stdcall get_HaniDec(abi_arg_out value) noexcept override + HRESULT __stdcall get_HaniDec(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HaniDec()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HaniDec()); return S_OK; } catch (...) @@ -4388,11 +4703,12 @@ struct produce : pr } } - HRESULT __stdcall get_Java(abi_arg_out value) noexcept override + HRESULT __stdcall get_Java(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Java()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Java()); return S_OK; } catch (...) @@ -4402,11 +4718,12 @@ struct produce : pr } } - HRESULT __stdcall get_Kali(abi_arg_out value) noexcept override + HRESULT __stdcall get_Kali(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Kali()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kali()); return S_OK; } catch (...) @@ -4416,11 +4733,12 @@ struct produce : pr } } - HRESULT __stdcall get_Khmr(abi_arg_out value) noexcept override + HRESULT __stdcall get_Khmr(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Khmr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Khmr()); return S_OK; } catch (...) @@ -4430,11 +4748,12 @@ struct produce : pr } } - HRESULT __stdcall get_Knda(abi_arg_out value) noexcept override + HRESULT __stdcall get_Knda(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Knda()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Knda()); return S_OK; } catch (...) @@ -4444,11 +4763,12 @@ struct produce : pr } } - HRESULT __stdcall get_Lana(abi_arg_out value) noexcept override + HRESULT __stdcall get_Lana(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Lana()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Lana()); return S_OK; } catch (...) @@ -4458,11 +4778,12 @@ struct produce : pr } } - HRESULT __stdcall get_LanaTham(abi_arg_out value) noexcept override + HRESULT __stdcall get_LanaTham(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LanaTham()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanaTham()); return S_OK; } catch (...) @@ -4472,11 +4793,12 @@ struct produce : pr } } - HRESULT __stdcall get_Laoo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Laoo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Laoo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Laoo()); return S_OK; } catch (...) @@ -4486,11 +4808,12 @@ struct produce : pr } } - HRESULT __stdcall get_Latn(abi_arg_out value) noexcept override + HRESULT __stdcall get_Latn(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Latn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Latn()); return S_OK; } catch (...) @@ -4500,11 +4823,12 @@ struct produce : pr } } - HRESULT __stdcall get_Lepc(abi_arg_out value) noexcept override + HRESULT __stdcall get_Lepc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Lepc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Lepc()); return S_OK; } catch (...) @@ -4514,11 +4838,12 @@ struct produce : pr } } - HRESULT __stdcall get_Limb(abi_arg_out value) noexcept override + HRESULT __stdcall get_Limb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Limb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Limb()); return S_OK; } catch (...) @@ -4528,11 +4853,12 @@ struct produce : pr } } - HRESULT __stdcall get_Mlym(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mlym(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mlym()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mlym()); return S_OK; } catch (...) @@ -4542,11 +4868,12 @@ struct produce : pr } } - HRESULT __stdcall get_Mong(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mong(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mong()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mong()); return S_OK; } catch (...) @@ -4556,11 +4883,12 @@ struct produce : pr } } - HRESULT __stdcall get_Mtei(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mtei(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mtei()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mtei()); return S_OK; } catch (...) @@ -4570,11 +4898,12 @@ struct produce : pr } } - HRESULT __stdcall get_Mymr(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mymr(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mymr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mymr()); return S_OK; } catch (...) @@ -4584,11 +4913,12 @@ struct produce : pr } } - HRESULT __stdcall get_MymrShan(abi_arg_out value) noexcept override + HRESULT __stdcall get_MymrShan(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MymrShan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MymrShan()); return S_OK; } catch (...) @@ -4598,11 +4928,12 @@ struct produce : pr } } - HRESULT __stdcall get_Nkoo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Nkoo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Nkoo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nkoo()); return S_OK; } catch (...) @@ -4612,11 +4943,12 @@ struct produce : pr } } - HRESULT __stdcall get_Olck(abi_arg_out value) noexcept override + HRESULT __stdcall get_Olck(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Olck()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Olck()); return S_OK; } catch (...) @@ -4626,11 +4958,12 @@ struct produce : pr } } - HRESULT __stdcall get_Orya(abi_arg_out value) noexcept override + HRESULT __stdcall get_Orya(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orya()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orya()); return S_OK; } catch (...) @@ -4640,11 +4973,12 @@ struct produce : pr } } - HRESULT __stdcall get_Saur(abi_arg_out value) noexcept override + HRESULT __stdcall get_Saur(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Saur()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Saur()); return S_OK; } catch (...) @@ -4654,11 +4988,12 @@ struct produce : pr } } - HRESULT __stdcall get_Sund(abi_arg_out value) noexcept override + HRESULT __stdcall get_Sund(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sund()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sund()); return S_OK; } catch (...) @@ -4668,11 +5003,12 @@ struct produce : pr } } - HRESULT __stdcall get_Talu(abi_arg_out value) noexcept override + HRESULT __stdcall get_Talu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Talu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Talu()); return S_OK; } catch (...) @@ -4682,11 +5018,12 @@ struct produce : pr } } - HRESULT __stdcall get_TamlDec(abi_arg_out value) noexcept override + HRESULT __stdcall get_TamlDec(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TamlDec()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TamlDec()); return S_OK; } catch (...) @@ -4696,11 +5033,12 @@ struct produce : pr } } - HRESULT __stdcall get_Telu(abi_arg_out value) noexcept override + HRESULT __stdcall get_Telu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Telu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Telu()); return S_OK; } catch (...) @@ -4710,11 +5048,12 @@ struct produce : pr } } - HRESULT __stdcall get_Thai(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thai(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thai()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thai()); return S_OK; } catch (...) @@ -4724,11 +5063,12 @@ struct produce : pr } } - HRESULT __stdcall get_Tibt(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tibt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tibt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tibt()); return S_OK; } catch (...) @@ -4738,11 +5078,12 @@ struct produce : pr } } - HRESULT __stdcall get_Vaii(abi_arg_out value) noexcept override + HRESULT __stdcall get_Vaii(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Vaii()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Vaii()); return S_OK; } catch (...) @@ -4756,11 +5097,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Brah(abi_arg_out value) noexcept override + HRESULT __stdcall get_Brah(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Brah()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Brah()); return S_OK; } catch (...) @@ -4770,11 +5112,12 @@ struct produce : p } } - HRESULT __stdcall get_Osma(abi_arg_out value) noexcept override + HRESULT __stdcall get_Osma(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Osma()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Osma()); return S_OK; } catch (...) @@ -4784,11 +5127,12 @@ struct produce : p } } - HRESULT __stdcall get_MathBold(abi_arg_out value) noexcept override + HRESULT __stdcall get_MathBold(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MathBold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MathBold()); return S_OK; } catch (...) @@ -4798,11 +5142,12 @@ struct produce : p } } - HRESULT __stdcall get_MathDbl(abi_arg_out value) noexcept override + HRESULT __stdcall get_MathDbl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MathDbl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MathDbl()); return S_OK; } catch (...) @@ -4812,11 +5157,12 @@ struct produce : p } } - HRESULT __stdcall get_MathSans(abi_arg_out value) noexcept override + HRESULT __stdcall get_MathSans(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MathSans()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MathSans()); return S_OK; } catch (...) @@ -4826,11 +5172,12 @@ struct produce : p } } - HRESULT __stdcall get_MathSanb(abi_arg_out value) noexcept override + HRESULT __stdcall get_MathSanb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MathSanb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MathSanb()); return S_OK; } catch (...) @@ -4840,11 +5187,12 @@ struct produce : p } } - HRESULT __stdcall get_MathMono(abi_arg_out value) noexcept override + HRESULT __stdcall get_MathMono(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MathMono()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MathMono()); return S_OK; } catch (...) @@ -4854,11 +5202,12 @@ struct produce : p } } - HRESULT __stdcall get_ZmthBold(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZmthBold(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZmthBold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZmthBold()); return S_OK; } catch (...) @@ -4868,11 +5217,12 @@ struct produce : p } } - HRESULT __stdcall get_ZmthDbl(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZmthDbl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZmthDbl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZmthDbl()); return S_OK; } catch (...) @@ -4882,11 +5232,12 @@ struct produce : p } } - HRESULT __stdcall get_ZmthSans(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZmthSans(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZmthSans()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZmthSans()); return S_OK; } catch (...) @@ -4896,11 +5247,12 @@ struct produce : p } } - HRESULT __stdcall get_ZmthSanb(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZmthSanb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZmthSanb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZmthSanb()); return S_OK; } catch (...) @@ -4910,11 +5262,12 @@ struct produce : p } } - HRESULT __stdcall get_ZmthMono(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZmthMono(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZmthMono()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZmthMono()); return S_OK; } catch (...) @@ -4928,11 +5281,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetTimeZone(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetTimeZone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetTimeZone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTimeZone()); return S_OK; } catch (...) @@ -4942,10 +5296,11 @@ struct produce : produce_base timeZoneId) noexcept override + HRESULT __stdcall abi_ChangeTimeZone(impl::abi_arg_in timeZoneId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChangeTimeZone(*reinterpret_cast(&timeZoneId)); return S_OK; } @@ -4955,11 +5310,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_TimeZoneAsFullString(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TimeZoneAsString()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TimeZoneAsString()); return S_OK; } catch (...) @@ -4969,11 +5325,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_TimeZoneAsString(int32_t idealLength, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TimeZoneAsString(idealLength)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TimeZoneAsString(idealLength)); return S_OK; } catch (...) @@ -4991,2420 +5348,2420 @@ namespace Windows::Globalization { template hstring impl_ICalendarIdentifiersStatics::Gregorian() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Gregorian(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Gregorian(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Hebrew() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Hebrew(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Hebrew(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Hijri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Hijri(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Hijri(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Japanese() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Japanese(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Japanese(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Julian() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Julian(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Julian(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Korean() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Korean(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Korean(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Taiwan() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Taiwan(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Taiwan(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::Thai() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Thai(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_Thai(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics::UmAlQura() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UmAlQura(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics)->get_UmAlQura(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics2::Persian() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Persian(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics2)->get_Persian(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics3::ChineseLunar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ChineseLunar(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics3)->get_ChineseLunar(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics3::JapaneseLunar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JapaneseLunar(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics3)->get_JapaneseLunar(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics3::KoreanLunar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KoreanLunar(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics3)->get_KoreanLunar(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics3::TaiwanLunar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TaiwanLunar(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics3)->get_TaiwanLunar(put_abi(value))); return value; } template hstring impl_ICalendarIdentifiersStatics3::VietnameseLunar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VietnameseLunar(put(value))); + check_hresult(WINRT_SHIM(ICalendarIdentifiersStatics3)->get_VietnameseLunar(put_abi(value))); return value; } template hstring impl_IClockIdentifiersStatics::TwelveHour() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TwelveHour(put(value))); + check_hresult(WINRT_SHIM(IClockIdentifiersStatics)->get_TwelveHour(put_abi(value))); return value; } template hstring impl_IClockIdentifiersStatics::TwentyFourHour() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TwentyFourHour(put(value))); + check_hresult(WINRT_SHIM(IClockIdentifiersStatics)->get_TwentyFourHour(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Arab() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arab(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Arab(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::ArabExt() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ArabExt(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_ArabExt(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Bali() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bali(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Bali(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Beng() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Beng(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Beng(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Cham() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Cham(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Cham(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Deva() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Deva(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Deva(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::FullWide() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FullWide(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_FullWide(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Gujr() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Gujr(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Gujr(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Guru() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Guru(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Guru(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::HaniDec() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HaniDec(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_HaniDec(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Java() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Java(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Java(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Kali() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Kali(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Kali(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Khmr() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Khmr(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Khmr(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Knda() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Knda(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Knda(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Lana() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Lana(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Lana(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::LanaTham() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LanaTham(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_LanaTham(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Laoo() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Laoo(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Laoo(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Latn() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Latn(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Latn(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Lepc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Lepc(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Lepc(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Limb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Limb(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Limb(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Mlym() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mlym(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Mlym(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Mong() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mong(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Mong(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Mtei() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mtei(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Mtei(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Mymr() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mymr(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Mymr(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::MymrShan() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MymrShan(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_MymrShan(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Nkoo() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Nkoo(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Nkoo(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Olck() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Olck(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Olck(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Orya() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Orya(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Orya(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Saur() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Saur(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Saur(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Sund() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sund(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Sund(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Talu() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Talu(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Talu(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::TamlDec() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TamlDec(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_TamlDec(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Telu() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Telu(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Telu(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Thai() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Thai(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Thai(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Tibt() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tibt(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Tibt(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics::Vaii() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Vaii(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics)->get_Vaii(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::Brah() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Brah(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_Brah(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::Osma() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Osma(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_Osma(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::MathBold() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MathBold(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_MathBold(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::MathDbl() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MathDbl(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_MathDbl(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::MathSans() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MathSans(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_MathSans(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::MathSanb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MathSanb(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_MathSanb(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::MathMono() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MathMono(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_MathMono(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::ZmthBold() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZmthBold(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_ZmthBold(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::ZmthDbl() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZmthDbl(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_ZmthDbl(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::ZmthSans() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZmthSans(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_ZmthSans(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::ZmthSanb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZmthSanb(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_ZmthSanb(put_abi(value))); return value; } template hstring impl_INumeralSystemIdentifiersStatics2::ZmthMono() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZmthMono(put(value))); + check_hresult(WINRT_SHIM(INumeralSystemIdentifiersStatics2)->get_ZmthMono(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AED() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AED(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AED(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AFN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AFN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AFN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ALL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ALL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ALL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AMD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AMD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AMD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ANG() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ANG(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ANG(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AOA() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AOA(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AOA(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ARS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ARS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ARS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AUD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AUD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AUD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AWG() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AWG(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AWG(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::AZN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AZN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_AZN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BAM() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BAM(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BAM(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BBD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BBD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BBD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BDT() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BDT(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BDT(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BGN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BGN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BGN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BHD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BHD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BHD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BIF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BIF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BIF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BMD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BMD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BMD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BND() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BND(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BND(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BOB() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BOB(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BOB(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BRL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BRL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BRL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BSD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BSD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BSD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BTN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BTN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BTN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BWP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BWP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BWP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BYR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BYR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BYR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::BZD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BZD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_BZD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CAD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CAD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CAD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CDF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CDF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CDF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CHF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CHF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CHF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CLP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CLP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CLP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CNY() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CNY(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CNY(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::COP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_COP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_COP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CRC() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CRC(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CRC(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CUP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CUP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CUP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CVE() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CVE(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CVE(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::CZK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CZK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_CZK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::DJF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DJF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_DJF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::DKK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DKK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_DKK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::DOP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DOP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_DOP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::DZD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DZD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_DZD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::EGP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EGP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_EGP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ERN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ERN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ERN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ETB() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ETB(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ETB(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::EUR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EUR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_EUR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::FJD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FJD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_FJD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::FKP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FKP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_FKP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GBP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GBP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GBP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GEL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GEL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GEL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GHS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GHS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GHS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GIP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GIP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GIP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GMD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GMD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GMD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GNF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GNF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GNF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GTQ() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GTQ(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GTQ(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::GYD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GYD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_GYD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::HKD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HKD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_HKD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::HNL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HNL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_HNL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::HRK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HRK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_HRK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::HTG() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HTG(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_HTG(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::HUF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HUF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_HUF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::IDR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IDR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_IDR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ILS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ILS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ILS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::INR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_INR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_INR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::IQD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IQD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_IQD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::IRR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IRR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_IRR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ISK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ISK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ISK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::JMD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JMD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_JMD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::JOD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JOD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_JOD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::JPY() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JPY(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_JPY(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KES() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KES(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KES(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KGS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KGS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KGS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KHR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KHR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KHR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KMF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KMF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KMF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KPW() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KPW(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KPW(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KRW() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KRW(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KRW(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KWD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KWD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KWD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KYD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KYD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KYD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::KZT() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KZT(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_KZT(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LAK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LAK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LAK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LBP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LBP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LBP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LKR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LKR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LKR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LRD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LRD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LRD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LSL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LSL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LSL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LTL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LTL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LTL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LVL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LVL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LVL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::LYD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LYD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_LYD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MAD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MAD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MAD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MDL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MDL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MDL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MGA() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MGA(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MGA(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MKD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MKD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MKD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MMK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MMK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MMK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MNT() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MNT(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MNT(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MOP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MOP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MOP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MRO() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MRO(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MRO(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MUR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MUR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MUR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MVR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MVR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MVR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MWK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MWK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MWK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MXN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MXN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MXN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MYR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MYR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MYR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::MZN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MZN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_MZN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NAD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NAD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NAD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NGN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NGN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NGN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NIO() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NIO(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NIO(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NOK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NOK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NOK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NPR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NPR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NPR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::NZD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NZD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_NZD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::OMR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OMR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_OMR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PAB() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PAB(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PAB(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PEN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PEN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PEN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PGK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PGK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PGK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PHP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PHP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PHP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PKR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PKR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PKR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PLN() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PLN(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PLN(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::PYG() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PYG(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_PYG(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::QAR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QAR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_QAR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::RON() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RON(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_RON(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::RSD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RSD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_RSD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::RUB() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RUB(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_RUB(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::RWF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RWF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_RWF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SAR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SAR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SAR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SBD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SBD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SBD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SCR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SCR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SCR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SDG() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SDG(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SDG(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SEK() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SEK(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SEK(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SGD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SGD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SGD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SHP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SHP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SHP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SLL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SLL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SLL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SOS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SOS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SOS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SRD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SRD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SRD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::STD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_STD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_STD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SYP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SYP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SYP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::SZL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SZL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_SZL(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::THB() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_THB(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_THB(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TJS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TJS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TJS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TMT() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TMT(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TMT(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TND() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TND(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TND(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TOP() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TOP(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TOP(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TRY() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TRY(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TRY(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TTD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TTD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TTD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TWD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TWD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TWD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::TZS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TZS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_TZS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::UAH() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UAH(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_UAH(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::UGX() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UGX(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_UGX(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::USD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_USD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_USD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::UYU() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UYU(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_UYU(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::UZS() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UZS(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_UZS(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::VEF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VEF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_VEF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::VND() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VND(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_VND(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::VUV() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VUV(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_VUV(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::WST() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WST(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_WST(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::XAF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_XAF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_XAF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::XCD() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_XCD(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_XCD(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::XOF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_XOF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_XOF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::XPF() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_XPF(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_XPF(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::XXX() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_XXX(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_XXX(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::YER() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YER(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_YER(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ZAR() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZAR(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ZAR(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ZMW() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZMW(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ZMW(put_abi(value))); return value; } template hstring impl_ICurrencyIdentifiersStatics::ZWL() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ZWL(put(value))); + check_hresult(WINRT_SHIM(ICurrencyIdentifiersStatics)->get_ZWL(put_abi(value))); return value; } template hstring impl_IGeographicRegion::Code() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Code(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_Code(put_abi(value))); return value; } template hstring impl_IGeographicRegion::CodeTwoLetter() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CodeTwoLetter(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_CodeTwoLetter(put_abi(value))); return value; } template hstring impl_IGeographicRegion::CodeThreeLetter() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CodeThreeLetter(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_CodeThreeLetter(put_abi(value))); return value; } template hstring impl_IGeographicRegion::CodeThreeDigit() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CodeThreeDigit(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_CodeThreeDigit(put_abi(value))); return value; } template hstring impl_IGeographicRegion::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IGeographicRegion::NativeName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NativeName(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_NativeName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGeographicRegion::CurrenciesInUse() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_CurrenciesInUse(put(value))); + check_hresult(WINRT_SHIM(IGeographicRegion)->get_CurrenciesInUse(put_abi(value))); return value; } -template Windows::Globalization::GeographicRegion impl_IGeographicRegionFactory::CreateGeographicRegion(hstring_ref geographicRegionCode) const +template Windows::Globalization::GeographicRegion impl_IGeographicRegionFactory::CreateGeographicRegion(hstring_view geographicRegionCode) const { Windows::Globalization::GeographicRegion result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateGeographicRegion(get(geographicRegionCode), put(result))); + check_hresult(WINRT_SHIM(IGeographicRegionFactory)->abi_CreateGeographicRegion(get_abi(geographicRegionCode), put_abi(result))); return result; } -template bool impl_IGeographicRegionStatics::IsSupported(hstring_ref geographicRegionCode) const +template bool impl_IGeographicRegionStatics::IsSupported(hstring_view geographicRegionCode) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(get(geographicRegionCode), &result)); + check_hresult(WINRT_SHIM(IGeographicRegionStatics)->abi_IsSupported(get_abi(geographicRegionCode), &result)); return result; } template hstring impl_ILanguage::LanguageTag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LanguageTag(put(value))); + check_hresult(WINRT_SHIM(ILanguage)->get_LanguageTag(put_abi(value))); return value; } template hstring impl_ILanguage::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(ILanguage)->get_DisplayName(put_abi(value))); return value; } template hstring impl_ILanguage::NativeName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NativeName(put(value))); + check_hresult(WINRT_SHIM(ILanguage)->get_NativeName(put_abi(value))); return value; } template hstring impl_ILanguage::Script() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Script(put(value))); + check_hresult(WINRT_SHIM(ILanguage)->get_Script(put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_ILanguageExtensionSubtags::GetExtensionSubtags(hstring_ref singleton) const +template Windows::Foundation::Collections::IVectorView impl_ILanguageExtensionSubtags::GetExtensionSubtags(hstring_view singleton) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetExtensionSubtags(get(singleton), put(value))); + check_hresult(WINRT_SHIM(ILanguageExtensionSubtags)->abi_GetExtensionSubtags(get_abi(singleton), put_abi(value))); return value; } -template Windows::Globalization::Language impl_ILanguageFactory::CreateLanguage(hstring_ref languageTag) const +template Windows::Globalization::Language impl_ILanguageFactory::CreateLanguage(hstring_view languageTag) const { Windows::Globalization::Language result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLanguage(get(languageTag), put(result))); + check_hresult(WINRT_SHIM(ILanguageFactory)->abi_CreateLanguage(get_abi(languageTag), put_abi(result))); return result; } -template bool impl_ILanguageStatics::IsWellFormed(hstring_ref languageTag) const +template bool impl_ILanguageStatics::IsWellFormed(hstring_view languageTag) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsWellFormed(get(languageTag), &result)); + check_hresult(WINRT_SHIM(ILanguageStatics)->abi_IsWellFormed(get_abi(languageTag), &result)); return result; } template hstring impl_ILanguageStatics::CurrentInputMethodLanguageTag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrentInputMethodLanguageTag(put(value))); + check_hresult(WINRT_SHIM(ILanguageStatics)->get_CurrentInputMethodLanguageTag(put_abi(value))); return value; } -template bool impl_ILanguageStatics2::TrySetInputMethodLanguageTag(hstring_ref languageTag) const +template bool impl_ILanguageStatics2::TrySetInputMethodLanguageTag(hstring_view languageTag) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetInputMethodLanguageTag(get(languageTag), &result)); + check_hresult(WINRT_SHIM(ILanguageStatics2)->abi_TrySetInputMethodLanguageTag(get_abi(languageTag), &result)); return result; } template Windows::Globalization::Calendar impl_ICalendar::Clone() const { Windows::Globalization::Calendar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_Clone(put_abi(value))); return value; } template void impl_ICalendar::SetToMin() const { - check_hresult(static_cast(static_cast(*this))->abi_SetToMin()); + check_hresult(WINRT_SHIM(ICalendar)->abi_SetToMin()); } template void impl_ICalendar::SetToMax() const { - check_hresult(static_cast(static_cast(*this))->abi_SetToMax()); + check_hresult(WINRT_SHIM(ICalendar)->abi_SetToMax()); } template Windows::Foundation::Collections::IVectorView impl_ICalendar::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->get_Languages(put_abi(value))); return value; } template hstring impl_ICalendar::NumeralSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumeralSystem(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->get_NumeralSystem(put_abi(value))); return value; } -template void impl_ICalendar::NumeralSystem(hstring_ref value) const +template void impl_ICalendar::NumeralSystem(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_NumeralSystem(get(value))); + check_hresult(WINRT_SHIM(ICalendar)->put_NumeralSystem(get_abi(value))); } template hstring impl_ICalendar::GetCalendarSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetCalendarSystem(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_GetCalendarSystem(put_abi(value))); return value; } -template void impl_ICalendar::ChangeCalendarSystem(hstring_ref value) const +template void impl_ICalendar::ChangeCalendarSystem(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangeCalendarSystem(get(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_ChangeCalendarSystem(get_abi(value))); } template hstring impl_ICalendar::GetClock() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetClock(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_GetClock(put_abi(value))); return value; } -template void impl_ICalendar::ChangeClock(hstring_ref value) const +template void impl_ICalendar::ChangeClock(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangeClock(get(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_ChangeClock(get_abi(value))); } template Windows::Foundation::DateTime impl_ICalendar::GetDateTime() const { Windows::Foundation::DateTime result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDateTime(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_GetDateTime(put_abi(result))); return result; } template void impl_ICalendar::SetDateTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDateTime(get(value))); + check_hresult(WINRT_SHIM(ICalendar)->abi_SetDateTime(get_abi(value))); } template void impl_ICalendar::SetToNow() const { - check_hresult(static_cast(static_cast(*this))->abi_SetToNow()); + check_hresult(WINRT_SHIM(ICalendar)->abi_SetToNow()); } template int32_t impl_ICalendar::FirstEra() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstEra(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstEra(&value)); return value; } template int32_t impl_ICalendar::LastEra() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastEra(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastEra(&value)); return value; } template int32_t impl_ICalendar::NumberOfEras() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfEras(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfEras(&value)); return value; } template int32_t impl_ICalendar::Era() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Era(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Era(&value)); return value; } template void impl_ICalendar::Era(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Era(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Era(value)); } template void impl_ICalendar::AddEras(int32_t eras) const { - check_hresult(static_cast(static_cast(*this))->abi_AddEras(eras)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddEras(eras)); } template hstring impl_ICalendar::EraAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_EraAsFullString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_EraAsFullString(put_abi(result))); return result; } template hstring impl_ICalendar::EraAsString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_EraAsString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_EraAsString(idealLength, put_abi(result))); return result; } template int32_t impl_ICalendar::FirstYearInThisEra() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstYearInThisEra(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstYearInThisEra(&value)); return value; } template int32_t impl_ICalendar::LastYearInThisEra() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastYearInThisEra(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastYearInThisEra(&value)); return value; } template int32_t impl_ICalendar::NumberOfYearsInThisEra() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfYearsInThisEra(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfYearsInThisEra(&value)); return value; } template int32_t impl_ICalendar::Year() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Year(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Year(&value)); return value; } template void impl_ICalendar::Year(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Year(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Year(value)); } template void impl_ICalendar::AddYears(int32_t years) const { - check_hresult(static_cast(static_cast(*this))->abi_AddYears(years)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddYears(years)); } template hstring impl_ICalendar::YearAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_YearAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_YearAsString(put_abi(result))); return result; } template hstring impl_ICalendar::YearAsTruncatedString(int32_t remainingDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_YearAsTruncatedString(remainingDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_YearAsTruncatedString(remainingDigits, put_abi(result))); return result; } template hstring impl_ICalendar::YearAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_YearAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_YearAsPaddedString(minDigits, put_abi(result))); return result; } template int32_t impl_ICalendar::FirstMonthInThisYear() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstMonthInThisYear(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstMonthInThisYear(&value)); return value; } template int32_t impl_ICalendar::LastMonthInThisYear() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastMonthInThisYear(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastMonthInThisYear(&value)); return value; } template int32_t impl_ICalendar::NumberOfMonthsInThisYear() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfMonthsInThisYear(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfMonthsInThisYear(&value)); return value; } template int32_t impl_ICalendar::Month() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Month(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Month(&value)); return value; } template void impl_ICalendar::Month(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Month(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Month(value)); } template void impl_ICalendar::AddMonths(int32_t months) const { - check_hresult(static_cast(static_cast(*this))->abi_AddMonths(months)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddMonths(months)); } template hstring impl_ICalendar::MonthAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsFullString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsFullString(put_abi(result))); return result; } template hstring impl_ICalendar::MonthAsString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsString(idealLength, put_abi(result))); return result; } template hstring impl_ICalendar::MonthAsSoloString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsFullSoloString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsFullSoloString(put_abi(result))); return result; } template hstring impl_ICalendar::MonthAsSoloString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsSoloString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsSoloString(idealLength, put_abi(result))); return result; } template hstring impl_ICalendar::MonthAsNumericString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsNumericString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsNumericString(put_abi(result))); return result; } template hstring impl_ICalendar::MonthAsPaddedNumericString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MonthAsPaddedNumericString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MonthAsPaddedNumericString(minDigits, put_abi(result))); return result; } template void impl_ICalendar::AddWeeks(int32_t weeks) const { - check_hresult(static_cast(static_cast(*this))->abi_AddWeeks(weeks)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddWeeks(weeks)); } template int32_t impl_ICalendar::FirstDayInThisMonth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstDayInThisMonth(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstDayInThisMonth(&value)); return value; } template int32_t impl_ICalendar::LastDayInThisMonth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastDayInThisMonth(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastDayInThisMonth(&value)); return value; } template int32_t impl_ICalendar::NumberOfDaysInThisMonth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfDaysInThisMonth(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfDaysInThisMonth(&value)); return value; } template int32_t impl_ICalendar::Day() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Day(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Day(&value)); return value; } template void impl_ICalendar::Day(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Day(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Day(value)); } template void impl_ICalendar::AddDays(int32_t days) const { - check_hresult(static_cast(static_cast(*this))->abi_AddDays(days)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddDays(days)); } template hstring impl_ICalendar::DayAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayAsString(put_abi(result))); return result; } template hstring impl_ICalendar::DayAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayAsPaddedString(minDigits, put_abi(result))); return result; } template Windows::Globalization::DayOfWeek impl_ICalendar::DayOfWeek() const { Windows::Globalization::DayOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeek(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_DayOfWeek(&value)); return value; } template hstring impl_ICalendar::DayOfWeekAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayOfWeekAsFullString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayOfWeekAsFullString(put_abi(result))); return result; } template hstring impl_ICalendar::DayOfWeekAsString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayOfWeekAsString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayOfWeekAsString(idealLength, put_abi(result))); return result; } template hstring impl_ICalendar::DayOfWeekAsSoloString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayOfWeekAsFullSoloString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayOfWeekAsFullSoloString(put_abi(result))); return result; } template hstring impl_ICalendar::DayOfWeekAsSoloString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_DayOfWeekAsSoloString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_DayOfWeekAsSoloString(idealLength, put_abi(result))); return result; } template int32_t impl_ICalendar::FirstPeriodInThisDay() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstPeriodInThisDay(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstPeriodInThisDay(&value)); return value; } template int32_t impl_ICalendar::LastPeriodInThisDay() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastPeriodInThisDay(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastPeriodInThisDay(&value)); return value; } template int32_t impl_ICalendar::NumberOfPeriodsInThisDay() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfPeriodsInThisDay(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfPeriodsInThisDay(&value)); return value; } template int32_t impl_ICalendar::Period() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Period(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Period(&value)); return value; } template void impl_ICalendar::Period(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Period(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Period(value)); } template void impl_ICalendar::AddPeriods(int32_t periods) const { - check_hresult(static_cast(static_cast(*this))->abi_AddPeriods(periods)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddPeriods(periods)); } template hstring impl_ICalendar::PeriodAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_PeriodAsFullString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_PeriodAsFullString(put_abi(result))); return result; } template hstring impl_ICalendar::PeriodAsString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_PeriodAsString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_PeriodAsString(idealLength, put_abi(result))); return result; } template int32_t impl_ICalendar::FirstHourInThisPeriod() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstHourInThisPeriod(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstHourInThisPeriod(&value)); return value; } template int32_t impl_ICalendar::LastHourInThisPeriod() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastHourInThisPeriod(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastHourInThisPeriod(&value)); return value; } template int32_t impl_ICalendar::NumberOfHoursInThisPeriod() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfHoursInThisPeriod(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfHoursInThisPeriod(&value)); return value; } template int32_t impl_ICalendar::Hour() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Hour(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Hour(&value)); return value; } template void impl_ICalendar::Hour(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Hour(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Hour(value)); } template void impl_ICalendar::AddHours(int32_t hours) const { - check_hresult(static_cast(static_cast(*this))->abi_AddHours(hours)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddHours(hours)); } template hstring impl_ICalendar::HourAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_HourAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_HourAsString(put_abi(result))); return result; } template hstring impl_ICalendar::HourAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_HourAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_HourAsPaddedString(minDigits, put_abi(result))); return result; } template int32_t impl_ICalendar::Minute() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Minute(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Minute(&value)); return value; } template void impl_ICalendar::Minute(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Minute(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Minute(value)); } template void impl_ICalendar::AddMinutes(int32_t minutes) const { - check_hresult(static_cast(static_cast(*this))->abi_AddMinutes(minutes)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddMinutes(minutes)); } template hstring impl_ICalendar::MinuteAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MinuteAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MinuteAsString(put_abi(result))); return result; } template hstring impl_ICalendar::MinuteAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_MinuteAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_MinuteAsPaddedString(minDigits, put_abi(result))); return result; } template int32_t impl_ICalendar::Second() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Second(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Second(&value)); return value; } template void impl_ICalendar::Second(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Second(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Second(value)); } template void impl_ICalendar::AddSeconds(int32_t seconds) const { - check_hresult(static_cast(static_cast(*this))->abi_AddSeconds(seconds)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddSeconds(seconds)); } template hstring impl_ICalendar::SecondAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_SecondAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_SecondAsString(put_abi(result))); return result; } template hstring impl_ICalendar::SecondAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_SecondAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_SecondAsPaddedString(minDigits, put_abi(result))); return result; } template int32_t impl_ICalendar::Nanosecond() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Nanosecond(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_Nanosecond(&value)); return value; } template void impl_ICalendar::Nanosecond(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Nanosecond(value)); + check_hresult(WINRT_SHIM(ICalendar)->put_Nanosecond(value)); } template void impl_ICalendar::AddNanoseconds(int32_t nanoseconds) const { - check_hresult(static_cast(static_cast(*this))->abi_AddNanoseconds(nanoseconds)); + check_hresult(WINRT_SHIM(ICalendar)->abi_AddNanoseconds(nanoseconds)); } template hstring impl_ICalendar::NanosecondAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_NanosecondAsString(put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_NanosecondAsString(put_abi(result))); return result; } template hstring impl_ICalendar::NanosecondAsPaddedString(int32_t minDigits) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_NanosecondAsPaddedString(minDigits, put(result))); + check_hresult(WINRT_SHIM(ICalendar)->abi_NanosecondAsPaddedString(minDigits, put_abi(result))); return result; } template int32_t impl_ICalendar::Compare(const Windows::Globalization::Calendar & other) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_Compare(get(other), &result)); + check_hresult(WINRT_SHIM(ICalendar)->abi_Compare(get_abi(other), &result)); return result; } template int32_t impl_ICalendar::CompareDateTime(const Windows::Foundation::DateTime & other) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_CompareDateTime(get(other), &result)); + check_hresult(WINRT_SHIM(ICalendar)->abi_CompareDateTime(get_abi(other), &result)); return result; } template void impl_ICalendar::CopyTo(const Windows::Globalization::Calendar & other) const { - check_hresult(static_cast(static_cast(*this))->abi_CopyTo(get(other))); + check_hresult(WINRT_SHIM(ICalendar)->abi_CopyTo(get_abi(other))); } template int32_t impl_ICalendar::FirstMinuteInThisHour() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstMinuteInThisHour(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstMinuteInThisHour(&value)); return value; } template int32_t impl_ICalendar::LastMinuteInThisHour() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastMinuteInThisHour(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastMinuteInThisHour(&value)); return value; } template int32_t impl_ICalendar::NumberOfMinutesInThisHour() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfMinutesInThisHour(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfMinutesInThisHour(&value)); return value; } template int32_t impl_ICalendar::FirstSecondInThisMinute() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstSecondInThisMinute(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_FirstSecondInThisMinute(&value)); return value; } template int32_t impl_ICalendar::LastSecondInThisMinute() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSecondInThisMinute(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_LastSecondInThisMinute(&value)); return value; } template int32_t impl_ICalendar::NumberOfSecondsInThisMinute() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfSecondsInThisMinute(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_NumberOfSecondsInThisMinute(&value)); return value; } template hstring impl_ICalendar::ResolvedLanguage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResolvedLanguage(put(value))); + check_hresult(WINRT_SHIM(ICalendar)->get_ResolvedLanguage(put_abi(value))); return value; } template bool impl_ICalendar::IsDaylightSavingTime() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDaylightSavingTime(&value)); + check_hresult(WINRT_SHIM(ICalendar)->get_IsDaylightSavingTime(&value)); return value; } -template Windows::Globalization::Calendar impl_ICalendarFactory2::CreateCalendarWithTimeZone(const Windows::Foundation::Collections::IIterable & languages, hstring_ref calendar, hstring_ref clock, hstring_ref timeZoneId) const +template Windows::Globalization::Calendar impl_ICalendarFactory2::CreateCalendarWithTimeZone(iterable languages, hstring_view calendar, hstring_view clock, hstring_view timeZoneId) const { Windows::Globalization::Calendar result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCalendarWithTimeZone(get(languages), get(calendar), get(clock), get(timeZoneId), put(result))); + check_hresult(WINRT_SHIM(ICalendarFactory2)->abi_CreateCalendarWithTimeZone(get_abi(languages), get_abi(calendar), get_abi(clock), get_abi(timeZoneId), put_abi(result))); return result; } template hstring impl_ITimeZoneOnCalendar::GetTimeZone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetTimeZone(put(value))); + check_hresult(WINRT_SHIM(ITimeZoneOnCalendar)->abi_GetTimeZone(put_abi(value))); return value; } -template void impl_ITimeZoneOnCalendar::ChangeTimeZone(hstring_ref timeZoneId) const +template void impl_ITimeZoneOnCalendar::ChangeTimeZone(hstring_view timeZoneId) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangeTimeZone(get(timeZoneId))); + check_hresult(WINRT_SHIM(ITimeZoneOnCalendar)->abi_ChangeTimeZone(get_abi(timeZoneId))); } template hstring impl_ITimeZoneOnCalendar::TimeZoneAsString() const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_TimeZoneAsFullString(put(result))); + check_hresult(WINRT_SHIM(ITimeZoneOnCalendar)->abi_TimeZoneAsFullString(put_abi(result))); return result; } template hstring impl_ITimeZoneOnCalendar::TimeZoneAsString(int32_t idealLength) const { hstring result; - check_hresult(static_cast(static_cast(*this))->abi_TimeZoneAsString(idealLength, put(result))); + check_hresult(WINRT_SHIM(ITimeZoneOnCalendar)->abi_TimeZoneAsString(idealLength, put_abi(result))); return result; } -template Windows::Globalization::Calendar impl_ICalendarFactory::CreateCalendarDefaultCalendarAndClock(const Windows::Foundation::Collections::IIterable & languages) const +template Windows::Globalization::Calendar impl_ICalendarFactory::CreateCalendarDefaultCalendarAndClock(iterable languages) const { Windows::Globalization::Calendar result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCalendarDefaultCalendarAndClock(get(languages), put(result))); + check_hresult(WINRT_SHIM(ICalendarFactory)->abi_CreateCalendarDefaultCalendarAndClock(get_abi(languages), put_abi(result))); return result; } -template Windows::Globalization::Calendar impl_ICalendarFactory::CreateCalendar(const Windows::Foundation::Collections::IIterable & languages, hstring_ref calendar, hstring_ref clock) const +template Windows::Globalization::Calendar impl_ICalendarFactory::CreateCalendar(iterable languages, hstring_view calendar, hstring_view clock) const { Windows::Globalization::Calendar result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCalendar(get(languages), get(calendar), get(clock), put(result))); + check_hresult(WINRT_SHIM(ICalendarFactory)->abi_CreateCalendar(get_abi(languages), get_abi(calendar), get_abi(clock), put_abi(result))); return result; } template hstring impl_IApplicationLanguagesStatics::PrimaryLanguageOverride() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrimaryLanguageOverride(put(value))); + check_hresult(WINRT_SHIM(IApplicationLanguagesStatics)->get_PrimaryLanguageOverride(put_abi(value))); return value; } -template void impl_IApplicationLanguagesStatics::PrimaryLanguageOverride(hstring_ref value) const +template void impl_IApplicationLanguagesStatics::PrimaryLanguageOverride(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryLanguageOverride(get(value))); + check_hresult(WINRT_SHIM(IApplicationLanguagesStatics)->put_PrimaryLanguageOverride(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IApplicationLanguagesStatics::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(IApplicationLanguagesStatics)->get_Languages(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IApplicationLanguagesStatics::ManifestLanguages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ManifestLanguages(put(value))); + check_hresult(WINRT_SHIM(IApplicationLanguagesStatics)->get_ManifestLanguages(put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_IJapanesePhoneticAnalyzerStatics::GetWords(hstring_ref input) const +template Windows::Foundation::Collections::IVectorView impl_IJapanesePhoneticAnalyzerStatics::GetWords(hstring_view input) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetWords(get(input), put(result))); + check_hresult(WINRT_SHIM(IJapanesePhoneticAnalyzerStatics)->abi_GetWords(get_abi(input), put_abi(result))); return result; } -template Windows::Foundation::Collections::IVectorView impl_IJapanesePhoneticAnalyzerStatics::GetWords(hstring_ref input, bool monoRuby) const +template Windows::Foundation::Collections::IVectorView impl_IJapanesePhoneticAnalyzerStatics::GetWords(hstring_view input, bool monoRuby) const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetWordsWithMonoRubyOption(get(input), monoRuby, put(result))); + check_hresult(WINRT_SHIM(IJapanesePhoneticAnalyzerStatics)->abi_GetWordsWithMonoRubyOption(get_abi(input), monoRuby, put_abi(result))); return result; } template hstring impl_IJapanesePhoneme::DisplayText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayText(put(value))); + check_hresult(WINRT_SHIM(IJapanesePhoneme)->get_DisplayText(put_abi(value))); return value; } template hstring impl_IJapanesePhoneme::YomiText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiText(put(value))); + check_hresult(WINRT_SHIM(IJapanesePhoneme)->get_YomiText(put_abi(value))); return value; } template bool impl_IJapanesePhoneme::IsPhraseStart() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPhraseStart(&value)); + check_hresult(WINRT_SHIM(IJapanesePhoneme)->get_IsPhraseStart(&value)); return value; } @@ -7413,7 +7770,7 @@ inline hstring ApplicationLanguages::PrimaryLanguageOverride() return get_activation_factory().PrimaryLanguageOverride(); } -inline void ApplicationLanguages::PrimaryLanguageOverride(hstring_ref value) +inline void ApplicationLanguages::PrimaryLanguageOverride(hstring_view value) { get_activation_factory().PrimaryLanguageOverride(value); } @@ -7432,15 +7789,15 @@ inline Calendar::Calendar() : Calendar(activate_instance()) {} -inline Calendar::Calendar(const Windows::Foundation::Collections::IIterable & languages, hstring_ref calendar, hstring_ref clock, hstring_ref timeZoneId) : +inline Calendar::Calendar(iterable languages, hstring_view calendar, hstring_view clock, hstring_view timeZoneId) : Calendar(get_activation_factory().CreateCalendarWithTimeZone(languages, calendar, clock, timeZoneId)) {} -inline Calendar::Calendar(const Windows::Foundation::Collections::IIterable & languages) : +inline Calendar::Calendar(iterable languages) : Calendar(get_activation_factory().CreateCalendarDefaultCalendarAndClock(languages)) {} -inline Calendar::Calendar(const Windows::Foundation::Collections::IIterable & languages, hstring_ref calendar, hstring_ref clock) : +inline Calendar::Calendar(iterable languages, hstring_view calendar, hstring_view clock) : Calendar(get_activation_factory().CreateCalendar(languages, calendar, clock)) {} @@ -8318,30 +8675,30 @@ inline GeographicRegion::GeographicRegion() : GeographicRegion(activate_instance()) {} -inline GeographicRegion::GeographicRegion(hstring_ref geographicRegionCode) : +inline GeographicRegion::GeographicRegion(hstring_view geographicRegionCode) : GeographicRegion(get_activation_factory().CreateGeographicRegion(geographicRegionCode)) {} -inline bool GeographicRegion::IsSupported(hstring_ref geographicRegionCode) +inline bool GeographicRegion::IsSupported(hstring_view geographicRegionCode) { return get_activation_factory().IsSupported(geographicRegionCode); } -inline Windows::Foundation::Collections::IVectorView JapanesePhoneticAnalyzer::GetWords(hstring_ref input) +inline Windows::Foundation::Collections::IVectorView JapanesePhoneticAnalyzer::GetWords(hstring_view input) { return get_activation_factory().GetWords(input); } -inline Windows::Foundation::Collections::IVectorView JapanesePhoneticAnalyzer::GetWords(hstring_ref input, bool monoRuby) +inline Windows::Foundation::Collections::IVectorView JapanesePhoneticAnalyzer::GetWords(hstring_view input, bool monoRuby) { return get_activation_factory().GetWords(input, monoRuby); } -inline Language::Language(hstring_ref languageTag) : +inline Language::Language(hstring_view languageTag) : Language(get_activation_factory().CreateLanguage(languageTag)) {} -inline bool Language::IsWellFormed(hstring_ref languageTag) +inline bool Language::IsWellFormed(hstring_view languageTag) { return get_activation_factory().IsWellFormed(languageTag); } @@ -8351,7 +8708,7 @@ inline hstring Language::CurrentInputMethodLanguageTag() return get_activation_factory().CurrentInputMethodLanguageTag(); } -inline bool Language::TrySetInputMethodLanguageTag(hstring_ref languageTag) +inline bool Language::TrySetInputMethodLanguageTag(hstring_view languageTag) { return get_activation_factory().TrySetInputMethodLanguageTag(languageTag); } @@ -8599,3 +8956,239 @@ inline hstring NumeralSystemIdentifiers::ZmthMono() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IApplicationLanguagesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendarFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendarFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendarIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendarIdentifiersStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICalendarIdentifiersStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IClockIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ICurrencyIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IGeographicRegion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IGeographicRegionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IGeographicRegionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IJapanesePhoneme & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::IJapanesePhoneticAnalyzerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ILanguage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ILanguageExtensionSubtags & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ILanguageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ILanguageStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ILanguageStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::INumeralSystemIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::INumeralSystemIdentifiersStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::ITimeZoneOnCalendar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Calendar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::GeographicRegion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::JapanesePhoneme & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Globalization::Language & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.DirectX.Direct3D11.h b/10.0.14393.0/winrt/Windows.Graphics.DirectX.Direct3D11.h index 2468d6f3b..45367e771 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.DirectX.Direct3D11.h +++ b/10.0.14393.0/winrt/Windows.Graphics.DirectX.Direct3D11.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.DirectX.Direct3D11.3.h" #include "Windows.Graphics.DirectX.h" @@ -17,6 +20,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Trim(); return S_OK; } @@ -30,11 +34,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -50,16 +55,36 @@ namespace Windows::Graphics::DirectX::Direct3D11 { template void impl_IDirect3DDevice::Trim() const { - check_hresult(static_cast(static_cast(*this))->abi_Trim()); + check_hresult(WINRT_SHIM(IDirect3DDevice)->abi_Trim()); } template Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription impl_IDirect3DSurface::Description() const { Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription value {}; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IDirect3DSurface)->get_Description(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.DirectX.h b/10.0.14393.0/winrt/Windows.Graphics.DirectX.h index 5460a34d6..08f00641b 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.DirectX.h +++ b/10.0.14393.0/winrt/Windows.Graphics.DirectX.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.DirectX.3.h" WINRT_EXPORT namespace winrt { @@ -12,3 +15,5 @@ namespace impl { } } + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Display.h b/10.0.14393.0/winrt/Windows.Graphics.Display.h index a24ef7a39..94759afdd 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Display.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Display.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.Display.3.h" @@ -22,9 +25,9 @@ template DisplayPropertiesEventHandler::DisplayProperti DisplayPropertiesEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void DisplayPropertiesEventHandler::operator()(const Windows::IInspectable & sender) const +inline void DisplayPropertiesEventHandler::operator()(const Windows::Foundation::IInspectable & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } } @@ -38,7 +41,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CurrentOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentOrientation()); return S_OK; } catch (...) @@ -51,7 +55,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().NativeOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NativeOrientation()); return S_OK; } catch (...) @@ -60,11 +65,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_OrientationChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OrientationChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OrientationChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OrientationChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -77,6 +83,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().OrientationChanged(token); return S_OK; } @@ -90,7 +97,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ResolutionScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolutionScale()); return S_OK; } catch (...) @@ -103,7 +111,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().LogicalDpi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogicalDpi()); return S_OK; } catch (...) @@ -116,7 +125,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().RawDpiX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawDpiX()); return S_OK; } catch (...) @@ -129,7 +139,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().RawDpiY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawDpiY()); return S_OK; } catch (...) @@ -138,11 +149,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DpiChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DpiChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DpiChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DpiChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -155,6 +167,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DpiChanged(token); return S_OK; } @@ -168,7 +181,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().StereoEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoEnabled()); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_StereoEnabledChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StereoEnabledChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StereoEnabledChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StereoEnabledChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -194,6 +209,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StereoEnabledChanged(token); return S_OK; } @@ -203,11 +219,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetColorProfileAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetColorProfileAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetColorProfileAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetColorProfileAsync()); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_ColorProfileChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ColorProfileChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ColorProfileChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ColorProfileChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -234,6 +252,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ColorProfileChanged(token); return S_OK; } @@ -251,7 +270,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().RawPixelsPerViewPixel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawPixelsPerViewPixel()); return S_OK; } catch (...) @@ -264,11 +284,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_DiagonalSizeInInches(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DiagonalSizeInInches(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DiagonalSizeInInches()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiagonalSizeInInches()); return S_OK; } catch (...) @@ -286,7 +307,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ScreenWidthInRawPixels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenWidthInRawPixels()); return S_OK; } catch (...) @@ -299,7 +321,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ScreenHeightInRawPixels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenHeightInRawPixels()); return S_OK; } catch (...) @@ -312,11 +335,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -330,7 +354,8 @@ struct produce : prod { try { - *value = detach(this->shim().AutoRotationPreferences()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRotationPreferences()); return S_OK; } catch (...) @@ -343,6 +368,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoRotationPreferences(value); return S_OK; } @@ -352,11 +378,12 @@ struct produce : prod } } - HRESULT __stdcall add_DisplayContentsInvalidated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DisplayContentsInvalidated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DisplayContentsInvalidated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DisplayContentsInvalidated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -369,6 +396,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayContentsInvalidated(token); return S_OK; } @@ -386,7 +414,8 @@ struct produce : produ { try { - *value = detach(this->shim().CurrentOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentOrientation()); return S_OK; } catch (...) @@ -399,7 +428,8 @@ struct produce : produ { try { - *value = detach(this->shim().NativeOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NativeOrientation()); return S_OK; } catch (...) @@ -412,7 +442,8 @@ struct produce : produ { try { - *value = detach(this->shim().AutoRotationPreferences()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRotationPreferences()); return S_OK; } catch (...) @@ -425,6 +456,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoRotationPreferences(value); return S_OK; } @@ -434,11 +466,12 @@ struct produce : produ } } - HRESULT __stdcall add_OrientationChanged(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_OrientationChanged(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OrientationChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OrientationChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -451,6 +484,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().OrientationChanged(token); return S_OK; } @@ -464,7 +498,8 @@ struct produce : produ { try { - *value = detach(this->shim().ResolutionScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResolutionScale()); return S_OK; } catch (...) @@ -477,7 +512,8 @@ struct produce : produ { try { - *value = detach(this->shim().LogicalDpi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogicalDpi()); return S_OK; } catch (...) @@ -486,11 +522,12 @@ struct produce : produ } } - HRESULT __stdcall add_LogicalDpiChanged(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_LogicalDpiChanged(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LogicalDpiChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LogicalDpiChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -503,6 +540,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().LogicalDpiChanged(token); return S_OK; } @@ -516,7 +554,8 @@ struct produce : produ { try { - *value = detach(this->shim().StereoEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoEnabled()); return S_OK; } catch (...) @@ -525,11 +564,12 @@ struct produce : produ } } - HRESULT __stdcall add_StereoEnabledChanged(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_StereoEnabledChanged(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StereoEnabledChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StereoEnabledChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -542,6 +582,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().StereoEnabledChanged(token); return S_OK; } @@ -551,11 +592,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetColorProfileAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetColorProfileAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetColorProfileAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetColorProfileAsync()); return S_OK; } catch (...) @@ -565,11 +607,12 @@ struct produce : produ } } - HRESULT __stdcall add_ColorProfileChanged(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_ColorProfileChanged(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ColorProfileChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ColorProfileChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -582,6 +625,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ColorProfileChanged(token); return S_OK; } @@ -591,11 +635,12 @@ struct produce : produ } } - HRESULT __stdcall add_DisplayContentsInvalidated(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_DisplayContentsInvalidated(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DisplayContentsInvalidated(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DisplayContentsInvalidated(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -608,6 +653,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayContentsInvalidated(token); return S_OK; } @@ -625,221 +671,221 @@ namespace Windows::Graphics::Display { template Windows::Graphics::Display::DisplayInformation impl_IDisplayInformationStatics::GetForCurrentView() const { Windows::Graphics::Display::DisplayInformation current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(IDisplayInformationStatics)->abi_GetForCurrentView(put_abi(current))); return current; } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayInformationStatics::AutoRotationPreferences() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoRotationPreferences(&value)); + check_hresult(WINRT_SHIM(IDisplayInformationStatics)->get_AutoRotationPreferences(&value)); return value; } template void impl_IDisplayInformationStatics::AutoRotationPreferences(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoRotationPreferences(value)); + check_hresult(WINRT_SHIM(IDisplayInformationStatics)->put_AutoRotationPreferences(value)); } -template event_token impl_IDisplayInformationStatics::DisplayContentsInvalidated(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDisplayInformationStatics::DisplayContentsInvalidated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DisplayContentsInvalidated(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayInformationStatics)->add_DisplayContentsInvalidated(get_abi(handler), &token)); return token; } -template event_revoker impl_IDisplayInformationStatics::DisplayContentsInvalidated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDisplayInformationStatics::DisplayContentsInvalidated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Display::IDisplayInformationStatics::remove_DisplayContentsInvalidated, DisplayContentsInvalidated(handler)); } template void impl_IDisplayInformationStatics::DisplayContentsInvalidated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DisplayContentsInvalidated(token)); + check_hresult(WINRT_SHIM(IDisplayInformationStatics)->remove_DisplayContentsInvalidated(token)); } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayInformation::CurrentOrientation() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentOrientation(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_CurrentOrientation(&value)); return value; } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayInformation::NativeOrientation() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_NativeOrientation(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_NativeOrientation(&value)); return value; } -template event_token impl_IDisplayInformation::OrientationChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDisplayInformation::OrientationChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OrientationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->add_OrientationChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IDisplayInformation::OrientationChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDisplayInformation::OrientationChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Display::IDisplayInformation::remove_OrientationChanged, OrientationChanged(handler)); } template void impl_IDisplayInformation::OrientationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OrientationChanged(token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->remove_OrientationChanged(token)); } template Windows::Graphics::Display::ResolutionScale impl_IDisplayInformation::ResolutionScale() const { Windows::Graphics::Display::ResolutionScale value {}; - check_hresult(static_cast(static_cast(*this))->get_ResolutionScale(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_ResolutionScale(&value)); return value; } template float impl_IDisplayInformation::LogicalDpi() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LogicalDpi(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_LogicalDpi(&value)); return value; } template float impl_IDisplayInformation::RawDpiX() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RawDpiX(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_RawDpiX(&value)); return value; } template float impl_IDisplayInformation::RawDpiY() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RawDpiY(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_RawDpiY(&value)); return value; } -template event_token impl_IDisplayInformation::DpiChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDisplayInformation::DpiChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DpiChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->add_DpiChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IDisplayInformation::DpiChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDisplayInformation::DpiChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Display::IDisplayInformation::remove_DpiChanged, DpiChanged(handler)); } template void impl_IDisplayInformation::DpiChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DpiChanged(token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->remove_DpiChanged(token)); } template bool impl_IDisplayInformation::StereoEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoEnabled(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation)->get_StereoEnabled(&value)); return value; } -template event_token impl_IDisplayInformation::StereoEnabledChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDisplayInformation::StereoEnabledChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StereoEnabledChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->add_StereoEnabledChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IDisplayInformation::StereoEnabledChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDisplayInformation::StereoEnabledChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Display::IDisplayInformation::remove_StereoEnabledChanged, StereoEnabledChanged(handler)); } template void impl_IDisplayInformation::StereoEnabledChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StereoEnabledChanged(token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->remove_StereoEnabledChanged(token)); } template Windows::Foundation::IAsyncOperation impl_IDisplayInformation::GetColorProfileAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetColorProfileAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IDisplayInformation)->abi_GetColorProfileAsync(put_abi(asyncInfo))); return asyncInfo; } -template event_token impl_IDisplayInformation::ColorProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDisplayInformation::ColorProfileChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ColorProfileChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->add_ColorProfileChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IDisplayInformation::ColorProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDisplayInformation::ColorProfileChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Display::IDisplayInformation::remove_ColorProfileChanged, ColorProfileChanged(handler)); } template void impl_IDisplayInformation::ColorProfileChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ColorProfileChanged(token)); + check_hresult(WINRT_SHIM(IDisplayInformation)->remove_ColorProfileChanged(token)); } template double impl_IDisplayInformation2::RawPixelsPerViewPixel() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RawPixelsPerViewPixel(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation2)->get_RawPixelsPerViewPixel(&value)); return value; } template Windows::Foundation::IReference impl_IDisplayInformation3::DiagonalSizeInInches() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DiagonalSizeInInches(put(value))); + check_hresult(WINRT_SHIM(IDisplayInformation3)->get_DiagonalSizeInInches(put_abi(value))); return value; } template uint32_t impl_IDisplayInformation4::ScreenWidthInRawPixels() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScreenWidthInRawPixels(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation4)->get_ScreenWidthInRawPixels(&value)); return value; } template uint32_t impl_IDisplayInformation4::ScreenHeightInRawPixels() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScreenHeightInRawPixels(&value)); + check_hresult(WINRT_SHIM(IDisplayInformation4)->get_ScreenHeightInRawPixels(&value)); return value; } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayPropertiesStatics::CurrentOrientation() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentOrientation(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_CurrentOrientation(&value)); return value; } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayPropertiesStatics::NativeOrientation() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_NativeOrientation(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_NativeOrientation(&value)); return value; } template Windows::Graphics::Display::DisplayOrientations impl_IDisplayPropertiesStatics::AutoRotationPreferences() const { Windows::Graphics::Display::DisplayOrientations value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoRotationPreferences(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_AutoRotationPreferences(&value)); return value; } template void impl_IDisplayPropertiesStatics::AutoRotationPreferences(Windows::Graphics::Display::DisplayOrientations value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoRotationPreferences(value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->put_AutoRotationPreferences(value)); } template event_token impl_IDisplayPropertiesStatics::OrientationChanged(const Windows::Graphics::Display::DisplayPropertiesEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OrientationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->add_OrientationChanged(get_abi(handler), &token)); return token; } @@ -850,27 +896,27 @@ template event_revoker impl_IDisplayProp template void impl_IDisplayPropertiesStatics::OrientationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OrientationChanged(token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->remove_OrientationChanged(token)); } template Windows::Graphics::Display::ResolutionScale impl_IDisplayPropertiesStatics::ResolutionScale() const { Windows::Graphics::Display::ResolutionScale value {}; - check_hresult(static_cast(static_cast(*this))->get_ResolutionScale(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_ResolutionScale(&value)); return value; } template float impl_IDisplayPropertiesStatics::LogicalDpi() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LogicalDpi(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_LogicalDpi(&value)); return value; } template event_token impl_IDisplayPropertiesStatics::LogicalDpiChanged(const Windows::Graphics::Display::DisplayPropertiesEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LogicalDpiChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->add_LogicalDpiChanged(get_abi(handler), &token)); return token; } @@ -881,20 +927,20 @@ template event_revoker impl_IDisplayProp template void impl_IDisplayPropertiesStatics::LogicalDpiChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LogicalDpiChanged(token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->remove_LogicalDpiChanged(token)); } template bool impl_IDisplayPropertiesStatics::StereoEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoEnabled(&value)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->get_StereoEnabled(&value)); return value; } template event_token impl_IDisplayPropertiesStatics::StereoEnabledChanged(const Windows::Graphics::Display::DisplayPropertiesEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StereoEnabledChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->add_StereoEnabledChanged(get_abi(handler), &token)); return token; } @@ -905,20 +951,20 @@ template event_revoker impl_IDisplayProp template void impl_IDisplayPropertiesStatics::StereoEnabledChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StereoEnabledChanged(token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->remove_StereoEnabledChanged(token)); } template Windows::Foundation::IAsyncOperation impl_IDisplayPropertiesStatics::GetColorProfileAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetColorProfileAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->abi_GetColorProfileAsync(put_abi(asyncInfo))); return asyncInfo; } template event_token impl_IDisplayPropertiesStatics::ColorProfileChanged(const Windows::Graphics::Display::DisplayPropertiesEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ColorProfileChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->add_ColorProfileChanged(get_abi(handler), &token)); return token; } @@ -929,13 +975,13 @@ template event_revoker impl_IDisplayProp template void impl_IDisplayPropertiesStatics::ColorProfileChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ColorProfileChanged(token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->remove_ColorProfileChanged(token)); } template event_token impl_IDisplayPropertiesStatics::DisplayContentsInvalidated(const Windows::Graphics::Display::DisplayPropertiesEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DisplayContentsInvalidated(get(handler), &token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->add_DisplayContentsInvalidated(get_abi(handler), &token)); return token; } @@ -946,7 +992,7 @@ template event_revoker impl_IDisplayProp template void impl_IDisplayPropertiesStatics::DisplayContentsInvalidated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DisplayContentsInvalidated(token)); + check_hresult(WINRT_SHIM(IDisplayPropertiesStatics)->remove_DisplayContentsInvalidated(token)); } inline Windows::Graphics::Display::DisplayInformation DisplayInformation::GetForCurrentView() @@ -964,12 +1010,12 @@ inline void DisplayInformation::AutoRotationPreferences(Windows::Graphics::Displ get_activation_factory().AutoRotationPreferences(value); } -inline event_token DisplayInformation::DisplayContentsInvalidated(const Windows::Foundation::TypedEventHandler & handler) +inline event_token DisplayInformation::DisplayContentsInvalidated(const Windows::Foundation::TypedEventHandler & handler) { return get_activation_factory().DisplayContentsInvalidated(handler); } -inline factory_event_revoker DisplayInformation::DisplayContentsInvalidated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) +inline factory_event_revoker DisplayInformation::DisplayContentsInvalidated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Graphics::Display::IDisplayInformationStatics::remove_DisplayContentsInvalidated, factory.DisplayContentsInvalidated(handler) }; @@ -1103,3 +1149,68 @@ inline void DisplayProperties::DisplayContentsInvalidated(event_token token) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayInformation3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayInformation4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::IDisplayPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Display::DisplayInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Effects.h b/10.0.14393.0/winrt/Windows.Graphics.Effects.h index 6bb9b61fb..bd6998032 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Effects.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Effects.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.Effects.3.h" WINRT_EXPORT namespace winrt { @@ -12,11 +15,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out name) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out name) noexcept override { try { - *name = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *name = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -26,10 +30,11 @@ struct produce : produce_base name) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in name) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&name)); return S_OK; } @@ -51,15 +56,35 @@ namespace Windows::Graphics::Effects { template hstring impl_IGraphicsEffect::Name() const { hstring name; - check_hresult(static_cast(static_cast(*this))->get_Name(put(name))); + check_hresult(WINRT_SHIM(IGraphicsEffect)->get_Name(put_abi(name))); return name; } -template void impl_IGraphicsEffect::Name(hstring_ref name) const +template void impl_IGraphicsEffect::Name(hstring_view name) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(name))); + check_hresult(WINRT_SHIM(IGraphicsEffect)->put_Name(get_abi(name))); } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Effects::IGraphicsEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Effects::IGraphicsEffectSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Holographic.h b/10.0.14393.0/winrt/Windows.Graphics.Holographic.h index 0a3c98ee3..3049441b7 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Holographic.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Holographic.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.DirectX.Direct3D11.3.h" #include "internal/Windows.UI.Core.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_RenderTargetSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_RenderTargetSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RenderTargetSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RenderTargetSize()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ViewportScaleFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportScaleFactor()); return S_OK; } catch (...) @@ -48,6 +53,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().ViewportScaleFactor(value); return S_OK; } @@ -61,7 +67,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsStereo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStereo()); return S_OK; } catch (...) @@ -74,7 +81,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -87,6 +95,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SetNearPlaneDistance(value); return S_OK; } @@ -100,6 +109,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFarPlaneDistance(value); return S_OK; } @@ -113,11 +123,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_HolographicCamera(abi_arg_out value) noexcept override + HRESULT __stdcall get_HolographicCamera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HolographicCamera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HolographicCamera()); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce : prod } } - HRESULT __stdcall get_Viewport(abi_arg_out value) noexcept override + HRESULT __stdcall get_Viewport(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Viewport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Viewport()); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce : prod } } - HRESULT __stdcall abi_TryGetViewTransform(abi_arg_in coordinateSystem, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetViewTransform(impl::abi_arg_in coordinateSystem, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetViewTransform(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetViewTransform(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -154,11 +167,12 @@ struct produce : prod } } - HRESULT __stdcall get_ProjectionTransform(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProjectionTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProjectionTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProjectionTransform()); return S_OK; } catch (...) @@ -167,11 +181,12 @@ struct produce : prod } } - HRESULT __stdcall abi_TryGetCullingFrustum(abi_arg_in coordinateSystem, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetCullingFrustum(impl::abi_arg_in coordinateSystem, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetCullingFrustum(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetCullingFrustum(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -181,11 +196,12 @@ struct produce : prod } } - HRESULT __stdcall abi_TryGetVisibleFrustum(abi_arg_in coordinateSystem, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetVisibleFrustum(impl::abi_arg_in coordinateSystem, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetVisibleFrustum(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetVisibleFrustum(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -199,7 +215,8 @@ struct produce : prod { try { - *value = detach(this->shim().NearPlaneDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NearPlaneDistance()); return S_OK; } catch (...) @@ -212,7 +229,8 @@ struct produce : prod { try { - *value = detach(this->shim().FarPlaneDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FarPlaneDistance()); return S_OK; } catch (...) @@ -225,10 +243,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_SetFocusPoint(abi_arg_in coordinateSystem, abi_arg_in position) noexcept override + HRESULT __stdcall abi_SetFocusPoint(impl::abi_arg_in coordinateSystem, impl::abi_arg_in position) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFocusPoint(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position)); return S_OK; } @@ -238,10 +257,11 @@ struct produce coordinateSystem, abi_arg_in position, abi_arg_in normal) noexcept override + HRESULT __stdcall abi_SetFocusPointWithNormal(impl::abi_arg_in coordinateSystem, impl::abi_arg_in position, impl::abi_arg_in normal) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFocusPoint(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position), *reinterpret_cast(&normal)); return S_OK; } @@ -251,10 +271,11 @@ struct produce coordinateSystem, abi_arg_in position, abi_arg_in normal, abi_arg_in linearVelocity) noexcept override + HRESULT __stdcall abi_SetFocusPointWithNormalLinearVelocity(impl::abi_arg_in coordinateSystem, impl::abi_arg_in position, impl::abi_arg_in normal, impl::abi_arg_in linearVelocity) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFocusPoint(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position), *reinterpret_cast(&normal), *reinterpret_cast(&linearVelocity)); return S_OK; } @@ -264,11 +285,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Direct3D11Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direct3D11Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direct3D11Device()); return S_OK; } catch (...) @@ -278,11 +300,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Direct3D11BackBuffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direct3D11BackBuffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direct3D11BackBuffer()); return S_OK; } catch (...) @@ -296,11 +319,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AddedCameras(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AddedCameras(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddedCameras()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddedCameras()); return S_OK; } catch (...) @@ -310,11 +334,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_RemovedCameras(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemovedCameras(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemovedCameras()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedCameras()); return S_OK; } catch (...) @@ -324,11 +349,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetRenderingParameters(abi_arg_in cameraPose, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetRenderingParameters(impl::abi_arg_in cameraPose, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRenderingParameters(*reinterpret_cast(&cameraPose))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRenderingParameters(*reinterpret_cast(&cameraPose))); return S_OK; } catch (...) @@ -338,11 +364,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -351,11 +378,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CurrentPrediction(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentPrediction(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentPrediction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentPrediction()); return S_OK; } catch (...) @@ -369,6 +397,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateCurrentPrediction(); return S_OK; } @@ -382,7 +411,8 @@ struct produce : produce_b { try { - *result = detach(this->shim().PresentUsingCurrentPrediction()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PresentUsingCurrentPrediction()); return S_OK; } catch (...) @@ -395,7 +425,8 @@ struct produce : produce_b { try { - *result = detach(this->shim().PresentUsingCurrentPrediction(waitBehavior)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().PresentUsingCurrentPrediction(waitBehavior)); return S_OK; } catch (...) @@ -408,6 +439,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().WaitForFrameToFinish(); return S_OK; } @@ -421,11 +453,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_CameraPoses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_CameraPoses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CameraPoses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraPoses()); return S_OK; } catch (...) @@ -435,11 +468,12 @@ struct produce : } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -453,11 +487,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_PrimaryAdapterId(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryAdapterId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryAdapterId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryAdapterId()); return S_OK; } catch (...) @@ -466,10 +501,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetDirect3D11Device(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetDirect3D11Device(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDirect3D11Device(*reinterpret_cast(&value)); return S_OK; } @@ -479,11 +515,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_CameraAdded(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_CameraAdded(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().CameraAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().CameraAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -496,6 +533,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraAdded(cookie); return S_OK; } @@ -505,11 +543,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_CameraRemoved(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_CameraRemoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().CameraRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().CameraRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -522,6 +561,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraRemoved(cookie); return S_OK; } @@ -531,11 +571,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateNextFrame(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateNextFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateNextFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateNextFrame()); return S_OK; } catch (...) @@ -549,11 +590,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Camera(abi_arg_out value) noexcept override + HRESULT __stdcall get_Camera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Camera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Camera()); return S_OK; } catch (...) @@ -563,11 +605,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -581,11 +624,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Camera(abi_arg_out value) noexcept override + HRESULT __stdcall get_Camera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Camera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Camera()); return S_OK; } catch (...) @@ -599,11 +643,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateForCoreWindow(abi_arg_in window, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateForCoreWindow(impl::abi_arg_in window, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateForCoreWindow(*reinterpret_cast(&window))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateForCoreWindow(*reinterpret_cast(&window))); return S_OK; } catch (...) @@ -621,83 +666,83 @@ namespace Windows::Graphics::Holographic { template Windows::Foundation::Size impl_IHolographicCamera::RenderTargetSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_RenderTargetSize(put(value))); + check_hresult(WINRT_SHIM(IHolographicCamera)->get_RenderTargetSize(put_abi(value))); return value; } template double impl_IHolographicCamera::ViewportScaleFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportScaleFactor(&value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->get_ViewportScaleFactor(&value)); return value; } template void impl_IHolographicCamera::ViewportScaleFactor(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ViewportScaleFactor(value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->put_ViewportScaleFactor(value)); } template bool impl_IHolographicCamera::IsStereo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStereo(&value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->get_IsStereo(&value)); return value; } template uint32_t impl_IHolographicCamera::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->get_Id(&value)); return value; } template void impl_IHolographicCamera::SetNearPlaneDistance(double value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetNearPlaneDistance(value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->abi_SetNearPlaneDistance(value)); } template void impl_IHolographicCamera::SetFarPlaneDistance(double value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFarPlaneDistance(value)); + check_hresult(WINRT_SHIM(IHolographicCamera)->abi_SetFarPlaneDistance(value)); } template Windows::Graphics::Holographic::HolographicCamera impl_IHolographicSpaceCameraAddedEventArgs::Camera() const { Windows::Graphics::Holographic::HolographicCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Camera(put(value))); + check_hresult(WINRT_SHIM(IHolographicSpaceCameraAddedEventArgs)->get_Camera(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IHolographicSpaceCameraAddedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IHolographicSpaceCameraAddedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicCamera impl_IHolographicSpaceCameraRemovedEventArgs::Camera() const { Windows::Graphics::Holographic::HolographicCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Camera(put(value))); + check_hresult(WINRT_SHIM(IHolographicSpaceCameraRemovedEventArgs)->get_Camera(put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicAdapterId impl_IHolographicSpace::PrimaryAdapterId() const { Windows::Graphics::Holographic::HolographicAdapterId value {}; - check_hresult(static_cast(static_cast(*this))->get_PrimaryAdapterId(put(value))); + check_hresult(WINRT_SHIM(IHolographicSpace)->get_PrimaryAdapterId(put_abi(value))); return value; } template void impl_IHolographicSpace::SetDirect3D11Device(const Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDirect3D11Device(get(value))); + check_hresult(WINRT_SHIM(IHolographicSpace)->abi_SetDirect3D11Device(get_abi(value))); } template event_token impl_IHolographicSpace::CameraAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_CameraAdded(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IHolographicSpace)->add_CameraAdded(get_abi(handler), &cookie)); return cookie; } @@ -708,13 +753,13 @@ template event_revoker impl_IHolographicSpace template void impl_IHolographicSpace::CameraAdded(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraAdded(cookie)); + check_hresult(WINRT_SHIM(IHolographicSpace)->remove_CameraAdded(cookie)); } template event_token impl_IHolographicSpace::CameraRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_CameraRemoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IHolographicSpace)->add_CameraRemoved(get_abi(handler), &cookie)); return cookie; } @@ -725,179 +770,179 @@ template event_revoker impl_IHolographicSpace template void impl_IHolographicSpace::CameraRemoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraRemoved(cookie)); + check_hresult(WINRT_SHIM(IHolographicSpace)->remove_CameraRemoved(cookie)); } template Windows::Graphics::Holographic::HolographicFrame impl_IHolographicSpace::CreateNextFrame() const { Windows::Graphics::Holographic::HolographicFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNextFrame(put(value))); + check_hresult(WINRT_SHIM(IHolographicSpace)->abi_CreateNextFrame(put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicSpace impl_IHolographicSpaceStatics::CreateForCoreWindow(const Windows::UI::Core::CoreWindow & window) const { Windows::Graphics::Holographic::HolographicSpace value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateForCoreWindow(get(window), put(value))); + check_hresult(WINRT_SHIM(IHolographicSpaceStatics)->abi_CreateForCoreWindow(get_abi(window), put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicCamera impl_IHolographicCameraPose::HolographicCamera() const { Windows::Graphics::Holographic::HolographicCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HolographicCamera(put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->get_HolographicCamera(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IHolographicCameraPose::Viewport() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Viewport(put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->get_Viewport(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IHolographicCameraPose::TryGetViewTransform(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetViewTransform(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->abi_TryGetViewTransform(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicStereoTransform impl_IHolographicCameraPose::ProjectionTransform() const { Windows::Graphics::Holographic::HolographicStereoTransform value {}; - check_hresult(static_cast(static_cast(*this))->get_ProjectionTransform(put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->get_ProjectionTransform(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IHolographicCameraPose::TryGetCullingFrustum(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetCullingFrustum(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->abi_TryGetCullingFrustum(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Foundation::IReference impl_IHolographicCameraPose::TryGetVisibleFrustum(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetVisibleFrustum(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->abi_TryGetVisibleFrustum(get_abi(coordinateSystem), put_abi(value))); return value; } template double impl_IHolographicCameraPose::NearPlaneDistance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NearPlaneDistance(&value)); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->get_NearPlaneDistance(&value)); return value; } template double impl_IHolographicCameraPose::FarPlaneDistance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FarPlaneDistance(&value)); + check_hresult(WINRT_SHIM(IHolographicCameraPose)->get_FarPlaneDistance(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IHolographicFramePrediction::CameraPoses() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_CameraPoses(put(value))); + check_hresult(WINRT_SHIM(IHolographicFramePrediction)->get_CameraPoses(put_abi(value))); return value; } template Windows::Perception::PerceptionTimestamp impl_IHolographicFramePrediction::Timestamp() const { Windows::Perception::PerceptionTimestamp value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IHolographicFramePrediction)->get_Timestamp(put_abi(value))); return value; } template void impl_IHolographicCameraRenderingParameters::SetFocusPoint(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Foundation::Numerics::float3 & position) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocusPoint(get(coordinateSystem), get(position))); + check_hresult(WINRT_SHIM(IHolographicCameraRenderingParameters)->abi_SetFocusPoint(get_abi(coordinateSystem), get_abi(position))); } template void impl_IHolographicCameraRenderingParameters::SetFocusPoint(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::float3 & normal) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocusPointWithNormal(get(coordinateSystem), get(position), get(normal))); + check_hresult(WINRT_SHIM(IHolographicCameraRenderingParameters)->abi_SetFocusPointWithNormal(get_abi(coordinateSystem), get_abi(position), get_abi(normal))); } template void impl_IHolographicCameraRenderingParameters::SetFocusPoint(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::float3 & normal, const Windows::Foundation::Numerics::float3 & linearVelocity) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocusPointWithNormalLinearVelocity(get(coordinateSystem), get(position), get(normal), get(linearVelocity))); + check_hresult(WINRT_SHIM(IHolographicCameraRenderingParameters)->abi_SetFocusPointWithNormalLinearVelocity(get_abi(coordinateSystem), get_abi(position), get_abi(normal), get_abi(linearVelocity))); } template Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice impl_IHolographicCameraRenderingParameters::Direct3D11Device() const { Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice value; - check_hresult(static_cast(static_cast(*this))->get_Direct3D11Device(put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraRenderingParameters)->get_Direct3D11Device(put_abi(value))); return value; } template Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface impl_IHolographicCameraRenderingParameters::Direct3D11BackBuffer() const { Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface value; - check_hresult(static_cast(static_cast(*this))->get_Direct3D11BackBuffer(put(value))); + check_hresult(WINRT_SHIM(IHolographicCameraRenderingParameters)->get_Direct3D11BackBuffer(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IHolographicFrame::AddedCameras() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AddedCameras(put(value))); + check_hresult(WINRT_SHIM(IHolographicFrame)->get_AddedCameras(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IHolographicFrame::RemovedCameras() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RemovedCameras(put(value))); + check_hresult(WINRT_SHIM(IHolographicFrame)->get_RemovedCameras(put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicCameraRenderingParameters impl_IHolographicFrame::GetRenderingParameters(const Windows::Graphics::Holographic::HolographicCameraPose & cameraPose) const { Windows::Graphics::Holographic::HolographicCameraRenderingParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetRenderingParameters(get(cameraPose), put(value))); + check_hresult(WINRT_SHIM(IHolographicFrame)->abi_GetRenderingParameters(get_abi(cameraPose), put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IHolographicFrame::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IHolographicFrame)->get_Duration(put_abi(value))); return value; } template Windows::Graphics::Holographic::HolographicFramePrediction impl_IHolographicFrame::CurrentPrediction() const { Windows::Graphics::Holographic::HolographicFramePrediction value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentPrediction(put(value))); + check_hresult(WINRT_SHIM(IHolographicFrame)->get_CurrentPrediction(put_abi(value))); return value; } template void impl_IHolographicFrame::UpdateCurrentPrediction() const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateCurrentPrediction()); + check_hresult(WINRT_SHIM(IHolographicFrame)->abi_UpdateCurrentPrediction()); } template Windows::Graphics::Holographic::HolographicFramePresentResult impl_IHolographicFrame::PresentUsingCurrentPrediction() const { Windows::Graphics::Holographic::HolographicFramePresentResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_PresentUsingCurrentPrediction(&result)); + check_hresult(WINRT_SHIM(IHolographicFrame)->abi_PresentUsingCurrentPrediction(&result)); return result; } template Windows::Graphics::Holographic::HolographicFramePresentResult impl_IHolographicFrame::PresentUsingCurrentPrediction(Windows::Graphics::Holographic::HolographicFramePresentWaitBehavior waitBehavior) const { Windows::Graphics::Holographic::HolographicFramePresentResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_PresentUsingCurrentPredictionWithBehavior(waitBehavior, &result)); + check_hresult(WINRT_SHIM(IHolographicFrame)->abi_PresentUsingCurrentPredictionWithBehavior(waitBehavior, &result)); return result; } template void impl_IHolographicFrame::WaitForFrameToFinish() const { - check_hresult(static_cast(static_cast(*this))->abi_WaitForFrameToFinish()); + check_hresult(WINRT_SHIM(IHolographicFrame)->abi_WaitForFrameToFinish()); } inline Windows::Graphics::Holographic::HolographicSpace HolographicSpace::CreateForCoreWindow(const Windows::UI::Core::CoreWindow & window) @@ -908,3 +953,158 @@ inline Windows::Graphics::Holographic::HolographicSpace HolographicSpace::Create } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicCamera & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicCameraPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicCameraRenderingParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicFramePrediction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicSpace & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicSpaceCameraAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicSpaceCameraRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::IHolographicSpaceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicCamera & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicCameraPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicCameraRenderingParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicFramePrediction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicSpace & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicSpaceCameraAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Holographic::HolographicSpaceCameraRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Imaging.h b/10.0.14393.0/winrt/Windows.Graphics.Imaging.h index 0d4629493..548753f9d 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Imaging.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Imaging.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -23,7 +26,8 @@ struct produce : produce_baseshim().GetPlaneCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPlaneCount()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetPlaneDescription(int32_t index, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetPlaneDescription(index)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPlaneDescription(index)); return S_OK; } catch (...) @@ -53,7 +58,8 @@ struct produce : produce { try { - *value = detach(this->shim().CodecId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CodecId()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : produce } } - HRESULT __stdcall get_FileExtensions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FileExtensions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileExtensions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileExtensions()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produce } } - HRESULT __stdcall get_FriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : produce } } - HRESULT __stdcall get_MimeTypes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MimeTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MimeTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MimeTypes()); return S_OK; } catch (...) @@ -108,11 +117,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_BitmapContainerProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_BitmapContainerProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapContainerProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapContainerProperties()); return S_OK; } catch (...) @@ -122,11 +132,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DecoderInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DecoderInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecoderInformation()); return S_OK; } catch (...) @@ -140,7 +151,8 @@ struct produce : produce_baseshim().FrameCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameCount()); return S_OK; } catch (...) @@ -149,11 +161,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPreviewAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPreviewAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPreviewAsync()); return S_OK; } catch (...) @@ -163,11 +176,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_GetFrameAsync(uint32_t frameIndex, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetFrameAsync(frameIndex)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetFrameAsync(frameIndex)); return S_OK; } catch (...) @@ -185,7 +199,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().BmpDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BmpDecoderId()); return S_OK; } catch (...) @@ -198,7 +213,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().JpegDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JpegDecoderId()); return S_OK; } catch (...) @@ -211,7 +227,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PngDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PngDecoderId()); return S_OK; } catch (...) @@ -224,7 +241,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().TiffDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiffDecoderId()); return S_OK; } catch (...) @@ -237,7 +255,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().GifDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GifDecoderId()); return S_OK; } catch (...) @@ -250,7 +269,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().JpegXRDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JpegXRDecoderId()); return S_OK; } catch (...) @@ -263,7 +283,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IcoDecoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IcoDecoderId()); return S_OK; } catch (...) @@ -272,11 +293,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDecoderInformationEnumerator(abi_arg_out> decoderInformationEnumerator) noexcept override + HRESULT __stdcall abi_GetDecoderInformationEnumerator(impl::abi_arg_out> decoderInformationEnumerator) noexcept override { try { - *decoderInformationEnumerator = detach(this->shim().GetDecoderInformationEnumerator()); + typename D::abi_guard guard(this->shim()); + *decoderInformationEnumerator = detach_abi(this->shim().GetDecoderInformationEnumerator()); return S_OK; } catch (...) @@ -286,11 +308,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateAsync(abi_arg_in stream, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_in stream, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -300,11 +323,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateWithIdAsync(GUID decoderId, abi_arg_in stream, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateWithIdAsync(GUID decoderId, impl::abi_arg_in stream, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateAsync(decoderId, *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateAsync(decoderId, *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -318,11 +342,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_EncoderInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_EncoderInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncoderInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncoderInformation()); return S_OK; } catch (...) @@ -332,11 +357,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BitmapProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapProperties()); return S_OK; } catch (...) @@ -346,11 +372,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BitmapContainerProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapContainerProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapContainerProperties()); return S_OK; } catch (...) @@ -364,7 +391,8 @@ struct produce : produce_baseshim().IsThumbnailGenerated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsThumbnailGenerated()); return S_OK; } catch (...) @@ -377,6 +405,7 @@ struct produce : produce_baseshim()); this->shim().IsThumbnailGenerated(value); return S_OK; } @@ -390,7 +419,8 @@ struct produce : produce_baseshim().GeneratedThumbnailWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeneratedThumbnailWidth()); return S_OK; } catch (...) @@ -403,6 +433,7 @@ struct produce : produce_baseshim()); this->shim().GeneratedThumbnailWidth(value); return S_OK; } @@ -416,7 +447,8 @@ struct produce : produce_baseshim().GeneratedThumbnailHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeneratedThumbnailHeight()); return S_OK; } catch (...) @@ -429,6 +461,7 @@ struct produce : produce_baseshim()); this->shim().GeneratedThumbnailHeight(value); return S_OK; } @@ -438,11 +471,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BitmapTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapTransform()); return S_OK; } catch (...) @@ -452,11 +486,12 @@ struct produce : produce_base * pixels) noexcept override + HRESULT __stdcall abi_SetPixelData(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, uint32_t width, uint32_t height, double dpiX, double dpiY, uint32_t __pixelsSize, impl::abi_arg_in * pixels) noexcept override { try { - this->shim().SetPixelData(pixelFormat, alphaMode, width, height, dpiX, dpiY, array_ref(pixels, pixels + __pixelsSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetPixelData(pixelFormat, alphaMode, width, height, dpiX, dpiY, array_view(pixels, pixels + __pixelsSize)); return S_OK; } catch (...) @@ -465,11 +500,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_GoToNextFrameAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GoToNextFrameAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GoToNextFrameAsync()); return S_OK; } catch (...) @@ -479,11 +515,12 @@ struct produce : produce_base>> encodingOptions, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_GoToNextFrameWithEncodingOptionsAsync(impl::abi_arg_in>> encodingOptions, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GoToNextFrameAsync(*reinterpret_cast> *>(&encodingOptions))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GoToNextFrameAsync(*reinterpret_cast> *>(&encodingOptions))); return S_OK; } catch (...) @@ -493,11 +530,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_FlushAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FlushAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FlushAsync()); return S_OK; } catch (...) @@ -515,7 +553,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().BmpEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BmpEncoderId()); return S_OK; } catch (...) @@ -528,7 +567,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().JpegEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JpegEncoderId()); return S_OK; } catch (...) @@ -541,7 +581,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PngEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PngEncoderId()); return S_OK; } catch (...) @@ -554,7 +595,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().TiffEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiffEncoderId()); return S_OK; } catch (...) @@ -567,7 +609,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().GifEncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GifEncoderId()); return S_OK; } catch (...) @@ -580,7 +623,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().JpegXREncoderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JpegXREncoderId()); return S_OK; } catch (...) @@ -589,11 +633,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetEncoderInformationEnumerator(abi_arg_out> encoderInformationEnumerator) noexcept override + HRESULT __stdcall abi_GetEncoderInformationEnumerator(impl::abi_arg_out> encoderInformationEnumerator) noexcept override { try { - *encoderInformationEnumerator = detach(this->shim().GetEncoderInformationEnumerator()); + typename D::abi_guard guard(this->shim()); + *encoderInformationEnumerator = detach_abi(this->shim().GetEncoderInformationEnumerator()); return S_OK; } catch (...) @@ -603,11 +648,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateAsync(GUID encoderId, abi_arg_in stream, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateAsync(GUID encoderId, impl::abi_arg_in stream, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateAsync(encoderId, *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateAsync(encoderId, *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -617,11 +663,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateWithEncodingOptionsAsync(GUID encoderId, abi_arg_in stream, abi_arg_in>> encodingOptions, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateWithEncodingOptionsAsync(GUID encoderId, impl::abi_arg_in stream, impl::abi_arg_in>> encodingOptions, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateAsync(encoderId, *reinterpret_cast(&stream), *reinterpret_cast> *>(&encodingOptions))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateAsync(encoderId, *reinterpret_cast(&stream), *reinterpret_cast> *>(&encodingOptions))); return S_OK; } catch (...) @@ -631,11 +678,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateForTranscodingAsync(abi_arg_in stream, abi_arg_in bitmapDecoder, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateForTranscodingAsync(impl::abi_arg_in stream, impl::abi_arg_in bitmapDecoder, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateForTranscodingAsync(*reinterpret_cast(&stream), *reinterpret_cast(&bitmapDecoder))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateForTranscodingAsync(*reinterpret_cast(&stream), *reinterpret_cast(&bitmapDecoder))); return S_OK; } catch (...) @@ -645,11 +693,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateForInPlacePropertyEncodingAsync(abi_arg_in bitmapDecoder, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_CreateForInPlacePropertyEncodingAsync(impl::abi_arg_in bitmapDecoder, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CreateForInPlacePropertyEncodingAsync(*reinterpret_cast(&bitmapDecoder))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CreateForInPlacePropertyEncodingAsync(*reinterpret_cast(&bitmapDecoder))); return S_OK; } catch (...) @@ -663,10 +712,11 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_SetSoftwareBitmap(abi_arg_in bitmap) noexcept override + HRESULT __stdcall abi_SetSoftwareBitmap(impl::abi_arg_in bitmap) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSoftwareBitmap(*reinterpret_cast(&bitmap)); return S_OK; } @@ -680,11 +730,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetThumbnailAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetThumbnailAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetThumbnailAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetThumbnailAsync()); return S_OK; } catch (...) @@ -694,11 +745,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BitmapProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BitmapProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapProperties()); return S_OK; } catch (...) @@ -712,7 +764,8 @@ struct produce : produce_baseshim().BitmapPixelFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapPixelFormat()); return S_OK; } catch (...) @@ -725,7 +778,8 @@ struct produce : produce_baseshim().BitmapAlphaMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapAlphaMode()); return S_OK; } catch (...) @@ -738,7 +792,8 @@ struct produce : produce_baseshim().DpiX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiX()); return S_OK; } catch (...) @@ -751,7 +806,8 @@ struct produce : produce_baseshim().DpiY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiY()); return S_OK; } catch (...) @@ -764,7 +820,8 @@ struct produce : produce_baseshim().PixelWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelWidth()); return S_OK; } catch (...) @@ -777,7 +834,8 @@ struct produce : produce_baseshim().PixelHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelHeight()); return S_OK; } catch (...) @@ -790,7 +848,8 @@ struct produce : produce_baseshim().OrientedPixelWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientedPixelWidth()); return S_OK; } catch (...) @@ -803,7 +862,8 @@ struct produce : produce_baseshim().OrientedPixelHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientedPixelHeight()); return S_OK; } catch (...) @@ -812,11 +872,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPixelDataAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPixelDataAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPixelDataAsync()); return S_OK; } catch (...) @@ -826,11 +887,12 @@ struct produce : produce_base transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPixelDataTransformedAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, impl::abi_arg_in transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPixelDataAsync(pixelFormat, alphaMode, *reinterpret_cast(&transform), exifOrientationMode, colorManagementMode)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPixelDataAsync(pixelFormat, alphaMode, *reinterpret_cast(&transform), exifOrientationMode, colorManagementMode)); return S_OK; } catch (...) @@ -844,11 +906,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetSoftwareBitmapAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSoftwareBitmapAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSoftwareBitmapAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSoftwareBitmapAsync()); return S_OK; } catch (...) @@ -858,11 +921,12 @@ struct produce : } } - HRESULT __stdcall abi_GetSoftwareBitmapConvertedAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSoftwareBitmapConvertedAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSoftwareBitmapAsync(pixelFormat, alphaMode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSoftwareBitmapAsync(pixelFormat, alphaMode)); return S_OK; } catch (...) @@ -872,11 +936,12 @@ struct produce : } } - HRESULT __stdcall abi_GetSoftwareBitmapTransformedAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, abi_arg_in transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSoftwareBitmapTransformedAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, impl::abi_arg_in transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSoftwareBitmapAsync(pixelFormat, alphaMode, *reinterpret_cast(&transform), exifOrientationMode, colorManagementMode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSoftwareBitmapAsync(pixelFormat, alphaMode, *reinterpret_cast(&transform), exifOrientationMode, colorManagementMode)); return S_OK; } catch (...) @@ -890,11 +955,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_SetPropertiesAsync(abi_arg_in>> propertiesToSet, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetPropertiesAsync(impl::abi_arg_in>> propertiesToSet, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPropertiesAsync(*reinterpret_cast> *>(&propertiesToSet))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPropertiesAsync(*reinterpret_cast> *>(&propertiesToSet))); return S_OK; } catch (...) @@ -908,11 +974,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetPropertiesAsync(abi_arg_in> propertiesToRetrieve, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPropertiesAsync(impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPropertiesAsync(*reinterpret_cast *>(&propertiesToRetrieve))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPropertiesAsync(*reinterpret_cast *>(&propertiesToRetrieve))); return S_OK; } catch (...) @@ -930,7 +997,8 @@ struct produce : produce_baseshim().ScaledWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaledWidth()); return S_OK; } catch (...) @@ -943,6 +1011,7 @@ struct produce : produce_baseshim()); this->shim().ScaledWidth(value); return S_OK; } @@ -956,7 +1025,8 @@ struct produce : produce_baseshim().ScaledHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaledHeight()); return S_OK; } catch (...) @@ -969,6 +1039,7 @@ struct produce : produce_baseshim()); this->shim().ScaledHeight(value); return S_OK; } @@ -982,7 +1053,8 @@ struct produce : produce_baseshim().InterpolationMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterpolationMode()); return S_OK; } catch (...) @@ -995,6 +1067,7 @@ struct produce : produce_baseshim()); this->shim().InterpolationMode(value); return S_OK; } @@ -1008,7 +1081,8 @@ struct produce : produce_baseshim().Flip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flip()); return S_OK; } catch (...) @@ -1021,6 +1095,7 @@ struct produce : produce_baseshim()); this->shim().Flip(value); return S_OK; } @@ -1034,7 +1109,8 @@ struct produce : produce_baseshim().Rotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rotation()); return S_OK; } catch (...) @@ -1047,6 +1123,7 @@ struct produce : produce_baseshim()); this->shim().Rotation(value); return S_OK; } @@ -1056,11 +1133,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -1069,10 +1147,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Bounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return S_OK; } @@ -1086,11 +1165,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1104,7 +1184,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1117,11 +1198,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in value, Windows::Foundation::PropertyType type, abi_arg_out bitmapTypedValue) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in value, Windows::Foundation::PropertyType type, impl::abi_arg_out bitmapTypedValue) noexcept override { try { - *bitmapTypedValue = detach(this->shim().Create(*reinterpret_cast(&value), type)); + typename D::abi_guard guard(this->shim()); + *bitmapTypedValue = detach_abi(this->shim().Create(*reinterpret_cast(&value), type)); return S_OK; } catch (...) @@ -1135,11 +1217,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_DetachPixelData(uint32_t * __pixelDataSize, abi_arg_out * pixelData) noexcept override + HRESULT __stdcall abi_DetachPixelData(uint32_t * __pixelDataSize, impl::abi_arg_out * pixelData) noexcept override { try { - std::tie(*__pixelDataSize, *pixelData) = detach(this->shim().DetachPixelData()); + typename D::abi_guard guard(this->shim()); + std::tie(*__pixelDataSize, *pixelData) = detach_abi(this->shim().DetachPixelData()); return S_OK; } catch (...) @@ -1158,7 +1241,8 @@ struct produce : produce_baseshim().BitmapPixelFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapPixelFormat()); return S_OK; } catch (...) @@ -1171,7 +1255,8 @@ struct produce : produce_baseshim().BitmapAlphaMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapAlphaMode()); return S_OK; } catch (...) @@ -1184,7 +1269,8 @@ struct produce : produce_baseshim().PixelWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelWidth()); return S_OK; } catch (...) @@ -1197,7 +1283,8 @@ struct produce : produce_baseshim().PixelHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelHeight()); return S_OK; } catch (...) @@ -1210,7 +1297,8 @@ struct produce : produce_baseshim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -1223,6 +1311,7 @@ struct produce : produce_baseshim()); this->shim().DpiX(value); return S_OK; } @@ -1236,7 +1325,8 @@ struct produce : produce_baseshim().DpiX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiX()); return S_OK; } catch (...) @@ -1249,6 +1339,7 @@ struct produce : produce_baseshim()); this->shim().DpiY(value); return S_OK; } @@ -1262,7 +1353,8 @@ struct produce : produce_baseshim().DpiY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiY()); return S_OK; } catch (...) @@ -1271,11 +1363,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_LockBuffer(Windows::Graphics::Imaging::BitmapBufferAccessMode mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LockBuffer(mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockBuffer(mode)); return S_OK; } catch (...) @@ -1285,10 +1378,11 @@ struct produce : produce_base bitmap) noexcept override + HRESULT __stdcall abi_CopyTo(impl::abi_arg_in bitmap) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CopyTo(*reinterpret_cast(&bitmap)); return S_OK; } @@ -1298,10 +1392,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_CopyFromBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CopyFromBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -1311,10 +1406,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_CopyToBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CopyToBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -1324,11 +1420,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetReadOnlyView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetReadOnlyView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetReadOnlyView()); return S_OK; } catch (...) @@ -1342,11 +1439,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(format, width, height)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(format, width, height)); return S_OK; } catch (...) @@ -1356,11 +1454,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateWithAlpha(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithAlpha(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAlpha(format, width, height, alpha)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAlpha(format, width, height, alpha)); return S_OK; } catch (...) @@ -1374,11 +1473,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_Copy(abi_arg_in source, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Copy(impl::abi_arg_in source, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Copy(*reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Copy(*reinterpret_cast(&source))); return S_OK; } catch (...) @@ -1388,11 +1488,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_Convert(abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Convert(impl::abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Convert(*reinterpret_cast(&source), format)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Convert(*reinterpret_cast(&source), format)); return S_OK; } catch (...) @@ -1402,11 +1503,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ConvertWithAlpha(abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, Windows::Graphics::Imaging::BitmapAlphaMode alpha, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ConvertWithAlpha(impl::abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Convert(*reinterpret_cast(&source), format, alpha)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Convert(*reinterpret_cast(&source), format, alpha)); return S_OK; } catch (...) @@ -1416,11 +1518,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateCopyFromBuffer(abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateCopyFromBuffer(impl::abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateCopyFromBuffer(*reinterpret_cast(&source), format, width, height)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCopyFromBuffer(*reinterpret_cast(&source), format, width, height)); return S_OK; } catch (...) @@ -1430,11 +1533,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateCopyWithAlphaFromBuffer(abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateCopyWithAlphaFromBuffer(impl::abi_arg_in source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateCopyFromBuffer(*reinterpret_cast(&source), format, width, height, alpha)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCopyFromBuffer(*reinterpret_cast(&source), format, width, height, alpha)); return S_OK; } catch (...) @@ -1444,11 +1548,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateCopyFromSurfaceAsync(abi_arg_in surface, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateCopyFromSurfaceAsync(impl::abi_arg_in surface, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateCopyFromSurfaceAsync(*reinterpret_cast(&surface))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCopyFromSurfaceAsync(*reinterpret_cast(&surface))); return S_OK; } catch (...) @@ -1458,11 +1563,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateCopyWithAlphaFromSurfaceAsync(abi_arg_in surface, Windows::Graphics::Imaging::BitmapAlphaMode alpha, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateCopyWithAlphaFromSurfaceAsync(impl::abi_arg_in surface, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateCopyFromSurfaceAsync(*reinterpret_cast(&surface), alpha)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCopyFromSurfaceAsync(*reinterpret_cast(&surface), alpha)); return S_OK; } catch (...) @@ -1480,689 +1586,689 @@ namespace Windows::Graphics::Imaging { template uint32_t impl_IBitmapTransform::ScaledWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaledWidth(&value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_ScaledWidth(&value)); return value; } template void impl_IBitmapTransform::ScaledWidth(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaledWidth(value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_ScaledWidth(value)); } template uint32_t impl_IBitmapTransform::ScaledHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaledHeight(&value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_ScaledHeight(&value)); return value; } template void impl_IBitmapTransform::ScaledHeight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaledHeight(value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_ScaledHeight(value)); } template Windows::Graphics::Imaging::BitmapInterpolationMode impl_IBitmapTransform::InterpolationMode() const { Windows::Graphics::Imaging::BitmapInterpolationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_InterpolationMode(&value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_InterpolationMode(&value)); return value; } template void impl_IBitmapTransform::InterpolationMode(Windows::Graphics::Imaging::BitmapInterpolationMode value) const { - check_hresult(static_cast(static_cast(*this))->put_InterpolationMode(value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_InterpolationMode(value)); } template Windows::Graphics::Imaging::BitmapFlip impl_IBitmapTransform::Flip() const { Windows::Graphics::Imaging::BitmapFlip value {}; - check_hresult(static_cast(static_cast(*this))->get_Flip(&value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_Flip(&value)); return value; } template void impl_IBitmapTransform::Flip(Windows::Graphics::Imaging::BitmapFlip value) const { - check_hresult(static_cast(static_cast(*this))->put_Flip(value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_Flip(value)); } template Windows::Graphics::Imaging::BitmapRotation impl_IBitmapTransform::Rotation() const { Windows::Graphics::Imaging::BitmapRotation value {}; - check_hresult(static_cast(static_cast(*this))->get_Rotation(&value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_Rotation(&value)); return value; } template void impl_IBitmapTransform::Rotation(Windows::Graphics::Imaging::BitmapRotation value) const { - check_hresult(static_cast(static_cast(*this))->put_Rotation(value)); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_Rotation(value)); } template Windows::Graphics::Imaging::BitmapBounds impl_IBitmapTransform::Bounds() const { Windows::Graphics::Imaging::BitmapBounds value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(IBitmapTransform)->get_Bounds(put_abi(value))); return value; } template void impl_IBitmapTransform::Bounds(const Windows::Graphics::Imaging::BitmapBounds & value) const { - check_hresult(static_cast(static_cast(*this))->put_Bounds(get(value))); + check_hresult(WINRT_SHIM(IBitmapTransform)->put_Bounds(get_abi(value))); } -template Windows::IInspectable impl_IBitmapTypedValue::Value() const +template Windows::Foundation::IInspectable impl_IBitmapTypedValue::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IBitmapTypedValue)->get_Value(put_abi(value))); return value; } template Windows::Foundation::PropertyType impl_IBitmapTypedValue::Type() const { Windows::Foundation::PropertyType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IBitmapTypedValue)->get_Type(&value)); return value; } -template Windows::Graphics::Imaging::BitmapTypedValue impl_IBitmapTypedValueFactory::Create(const Windows::IInspectable & value, Windows::Foundation::PropertyType type) const +template Windows::Graphics::Imaging::BitmapTypedValue impl_IBitmapTypedValueFactory::Create(const Windows::Foundation::IInspectable & value, Windows::Foundation::PropertyType type) const { Windows::Graphics::Imaging::BitmapTypedValue bitmapTypedValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(value), type, put(bitmapTypedValue))); + check_hresult(WINRT_SHIM(IBitmapTypedValueFactory)->abi_Create(get_abi(value), type, put_abi(bitmapTypedValue))); return bitmapTypedValue; } -template Windows::Foundation::IAsyncOperation impl_IBitmapPropertiesView::GetPropertiesAsync(const Windows::Foundation::Collections::IIterable & propertiesToRetrieve) const +template Windows::Foundation::IAsyncOperation impl_IBitmapPropertiesView::GetPropertiesAsync(iterable propertiesToRetrieve) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertiesAsync(get(propertiesToRetrieve), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapPropertiesView)->abi_GetPropertiesAsync(get_abi(propertiesToRetrieve), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IBitmapProperties::SetPropertiesAsync(const Windows::Foundation::Collections::IIterable> & propertiesToSet) const +template Windows::Foundation::IAsyncAction impl_IBitmapProperties::SetPropertiesAsync(iterable> propertiesToSet) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPropertiesAsync(get(propertiesToSet), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapProperties)->abi_SetPropertiesAsync(get_abi(propertiesToSet), put_abi(asyncInfo))); return asyncInfo; } template com_array impl_IPixelDataProvider::DetachPixelData() const { com_array pixelData {}; - check_hresult(static_cast(static_cast(*this))->abi_DetachPixelData(put_size(pixelData), put(pixelData))); + check_hresult(WINRT_SHIM(IPixelDataProvider)->abi_DetachPixelData(impl::put_size_abi(pixelData), put_abi(pixelData))); return pixelData; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrame::GetThumbnailAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapFrame)->abi_GetThumbnailAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Graphics::Imaging::BitmapPropertiesView impl_IBitmapFrame::BitmapProperties() const { Windows::Graphics::Imaging::BitmapPropertiesView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BitmapProperties(put(value))); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_BitmapProperties(put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapPixelFormat impl_IBitmapFrame::BitmapPixelFormat() const { Windows::Graphics::Imaging::BitmapPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapPixelFormat(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_BitmapPixelFormat(&value)); return value; } template Windows::Graphics::Imaging::BitmapAlphaMode impl_IBitmapFrame::BitmapAlphaMode() const { Windows::Graphics::Imaging::BitmapAlphaMode value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapAlphaMode(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_BitmapAlphaMode(&value)); return value; } template double impl_IBitmapFrame::DpiX() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiX(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_DpiX(&value)); return value; } template double impl_IBitmapFrame::DpiY() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiY(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_DpiY(&value)); return value; } template uint32_t impl_IBitmapFrame::PixelWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PixelWidth(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_PixelWidth(&value)); return value; } template uint32_t impl_IBitmapFrame::PixelHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PixelHeight(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_PixelHeight(&value)); return value; } template uint32_t impl_IBitmapFrame::OrientedPixelWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OrientedPixelWidth(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_OrientedPixelWidth(&value)); return value; } template uint32_t impl_IBitmapFrame::OrientedPixelHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OrientedPixelHeight(&value)); + check_hresult(WINRT_SHIM(IBitmapFrame)->get_OrientedPixelHeight(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrame::GetPixelDataAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPixelDataAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapFrame)->abi_GetPixelDataAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrame::GetPixelDataAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, const Windows::Graphics::Imaging::BitmapTransform & transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPixelDataTransformedAsync(pixelFormat, alphaMode, get(transform), exifOrientationMode, colorManagementMode, put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapFrame)->abi_GetPixelDataTransformedAsync(pixelFormat, alphaMode, get_abi(transform), exifOrientationMode, colorManagementMode, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrameWithSoftwareBitmap::GetSoftwareBitmapAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetSoftwareBitmapAsync(put(value))); + check_hresult(WINRT_SHIM(IBitmapFrameWithSoftwareBitmap)->abi_GetSoftwareBitmapAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrameWithSoftwareBitmap::GetSoftwareBitmapAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetSoftwareBitmapConvertedAsync(pixelFormat, alphaMode, put(value))); + check_hresult(WINRT_SHIM(IBitmapFrameWithSoftwareBitmap)->abi_GetSoftwareBitmapConvertedAsync(pixelFormat, alphaMode, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBitmapFrameWithSoftwareBitmap::GetSoftwareBitmapAsync(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, const Windows::Graphics::Imaging::BitmapTransform & transform, Windows::Graphics::Imaging::ExifOrientationMode exifOrientationMode, Windows::Graphics::Imaging::ColorManagementMode colorManagementMode) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetSoftwareBitmapTransformedAsync(pixelFormat, alphaMode, get(transform), exifOrientationMode, colorManagementMode, put(value))); + check_hresult(WINRT_SHIM(IBitmapFrameWithSoftwareBitmap)->abi_GetSoftwareBitmapTransformedAsync(pixelFormat, alphaMode, get_abi(transform), exifOrientationMode, colorManagementMode, put_abi(value))); return value; } template GUID impl_IBitmapCodecInformation::CodecId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_CodecId(&value)); + check_hresult(WINRT_SHIM(IBitmapCodecInformation)->get_CodecId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBitmapCodecInformation::FileExtensions() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FileExtensions(put(value))); + check_hresult(WINRT_SHIM(IBitmapCodecInformation)->get_FileExtensions(put_abi(value))); return value; } template hstring impl_IBitmapCodecInformation::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IBitmapCodecInformation)->get_FriendlyName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBitmapCodecInformation::MimeTypes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_MimeTypes(put(value))); + check_hresult(WINRT_SHIM(IBitmapCodecInformation)->get_MimeTypes(put_abi(value))); return value; } template GUID impl_IBitmapDecoderStatics::BmpDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BmpDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_BmpDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::JpegDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_JpegDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_JpegDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::PngDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PngDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_PngDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::TiffDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TiffDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_TiffDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::GifDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GifDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_GifDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::JpegXRDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_JpegXRDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_JpegXRDecoderId(&value)); return value; } template GUID impl_IBitmapDecoderStatics::IcoDecoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_IcoDecoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->get_IcoDecoderId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBitmapDecoderStatics::GetDecoderInformationEnumerator() const { Windows::Foundation::Collections::IVectorView decoderInformationEnumerator; - check_hresult(static_cast(static_cast(*this))->abi_GetDecoderInformationEnumerator(put(decoderInformationEnumerator))); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->abi_GetDecoderInformationEnumerator(put_abi(decoderInformationEnumerator))); return decoderInformationEnumerator; } template Windows::Foundation::IAsyncOperation impl_IBitmapDecoderStatics::CreateAsync(const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(get(stream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->abi_CreateAsync(get_abi(stream), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapDecoderStatics::CreateAsync(GUID decoderId, const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithIdAsync(decoderId, get(stream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapDecoderStatics)->abi_CreateWithIdAsync(decoderId, get_abi(stream), put_abi(asyncInfo))); return asyncInfo; } template Windows::Graphics::Imaging::BitmapPropertiesView impl_IBitmapDecoder::BitmapContainerProperties() const { Windows::Graphics::Imaging::BitmapPropertiesView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BitmapContainerProperties(put(value))); + check_hresult(WINRT_SHIM(IBitmapDecoder)->get_BitmapContainerProperties(put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapCodecInformation impl_IBitmapDecoder::DecoderInformation() const { Windows::Graphics::Imaging::BitmapCodecInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DecoderInformation(put(value))); + check_hresult(WINRT_SHIM(IBitmapDecoder)->get_DecoderInformation(put_abi(value))); return value; } template uint32_t impl_IBitmapDecoder::FrameCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FrameCount(&value)); + check_hresult(WINRT_SHIM(IBitmapDecoder)->get_FrameCount(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IBitmapDecoder::GetPreviewAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPreviewAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapDecoder)->abi_GetPreviewAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapDecoder::GetFrameAsync(uint32_t frameIndex) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetFrameAsync(frameIndex, put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapDecoder)->abi_GetFrameAsync(frameIndex, put_abi(asyncInfo))); return asyncInfo; } template GUID impl_IBitmapEncoderStatics::BmpEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_BmpEncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_BmpEncoderId(&value)); return value; } template GUID impl_IBitmapEncoderStatics::JpegEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_JpegEncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_JpegEncoderId(&value)); return value; } template GUID impl_IBitmapEncoderStatics::PngEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PngEncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_PngEncoderId(&value)); return value; } template GUID impl_IBitmapEncoderStatics::TiffEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TiffEncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_TiffEncoderId(&value)); return value; } template GUID impl_IBitmapEncoderStatics::GifEncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_GifEncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_GifEncoderId(&value)); return value; } template GUID impl_IBitmapEncoderStatics::JpegXREncoderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_JpegXREncoderId(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->get_JpegXREncoderId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBitmapEncoderStatics::GetEncoderInformationEnumerator() const { Windows::Foundation::Collections::IVectorView encoderInformationEnumerator; - check_hresult(static_cast(static_cast(*this))->abi_GetEncoderInformationEnumerator(put(encoderInformationEnumerator))); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->abi_GetEncoderInformationEnumerator(put_abi(encoderInformationEnumerator))); return encoderInformationEnumerator; } template Windows::Foundation::IAsyncOperation impl_IBitmapEncoderStatics::CreateAsync(GUID encoderId, const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(encoderId, get(stream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->abi_CreateAsync(encoderId, get_abi(stream), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IBitmapEncoderStatics::CreateAsync(GUID encoderId, const Windows::Storage::Streams::IRandomAccessStream & stream, const Windows::Foundation::Collections::IIterable> & encodingOptions) const +template Windows::Foundation::IAsyncOperation impl_IBitmapEncoderStatics::CreateAsync(GUID encoderId, const Windows::Storage::Streams::IRandomAccessStream & stream, iterable> encodingOptions) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithEncodingOptionsAsync(encoderId, get(stream), get(encodingOptions), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->abi_CreateWithEncodingOptionsAsync(encoderId, get_abi(stream), get_abi(encodingOptions), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapEncoderStatics::CreateForTranscodingAsync(const Windows::Storage::Streams::IRandomAccessStream & stream, const Windows::Graphics::Imaging::BitmapDecoder & bitmapDecoder) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateForTranscodingAsync(get(stream), get(bitmapDecoder), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->abi_CreateForTranscodingAsync(get_abi(stream), get_abi(bitmapDecoder), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IBitmapEncoderStatics::CreateForInPlacePropertyEncodingAsync(const Windows::Graphics::Imaging::BitmapDecoder & bitmapDecoder) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CreateForInPlacePropertyEncodingAsync(get(bitmapDecoder), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoderStatics)->abi_CreateForInPlacePropertyEncodingAsync(get_abi(bitmapDecoder), put_abi(asyncInfo))); return asyncInfo; } template Windows::Graphics::Imaging::BitmapCodecInformation impl_IBitmapEncoder::EncoderInformation() const { Windows::Graphics::Imaging::BitmapCodecInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncoderInformation(put(value))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_EncoderInformation(put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapProperties impl_IBitmapEncoder::BitmapProperties() const { Windows::Graphics::Imaging::BitmapProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BitmapProperties(put(value))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_BitmapProperties(put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapProperties impl_IBitmapEncoder::BitmapContainerProperties() const { Windows::Graphics::Imaging::BitmapProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BitmapContainerProperties(put(value))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_BitmapContainerProperties(put_abi(value))); return value; } template bool impl_IBitmapEncoder::IsThumbnailGenerated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsThumbnailGenerated(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_IsThumbnailGenerated(&value)); return value; } template void impl_IBitmapEncoder::IsThumbnailGenerated(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsThumbnailGenerated(value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->put_IsThumbnailGenerated(value)); } template uint32_t impl_IBitmapEncoder::GeneratedThumbnailWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GeneratedThumbnailWidth(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_GeneratedThumbnailWidth(&value)); return value; } template void impl_IBitmapEncoder::GeneratedThumbnailWidth(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_GeneratedThumbnailWidth(value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->put_GeneratedThumbnailWidth(value)); } template uint32_t impl_IBitmapEncoder::GeneratedThumbnailHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GeneratedThumbnailHeight(&value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_GeneratedThumbnailHeight(&value)); return value; } template void impl_IBitmapEncoder::GeneratedThumbnailHeight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_GeneratedThumbnailHeight(value)); + check_hresult(WINRT_SHIM(IBitmapEncoder)->put_GeneratedThumbnailHeight(value)); } template Windows::Graphics::Imaging::BitmapTransform impl_IBitmapEncoder::BitmapTransform() const { Windows::Graphics::Imaging::BitmapTransform value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BitmapTransform(put(value))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->get_BitmapTransform(put_abi(value))); return value; } -template void impl_IBitmapEncoder::SetPixelData(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, uint32_t width, uint32_t height, double dpiX, double dpiY, array_ref pixels) const +template void impl_IBitmapEncoder::SetPixelData(Windows::Graphics::Imaging::BitmapPixelFormat pixelFormat, Windows::Graphics::Imaging::BitmapAlphaMode alphaMode, uint32_t width, uint32_t height, double dpiX, double dpiY, array_view pixels) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPixelData(pixelFormat, alphaMode, width, height, dpiX, dpiY, pixels.size(), get(pixels))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->abi_SetPixelData(pixelFormat, alphaMode, width, height, dpiX, dpiY, pixels.size(), get_abi(pixels))); } template Windows::Foundation::IAsyncAction impl_IBitmapEncoder::GoToNextFrameAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GoToNextFrameAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->abi_GoToNextFrameAsync(put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IBitmapEncoder::GoToNextFrameAsync(const Windows::Foundation::Collections::IIterable> & encodingOptions) const +template Windows::Foundation::IAsyncAction impl_IBitmapEncoder::GoToNextFrameAsync(iterable> encodingOptions) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GoToNextFrameWithEncodingOptionsAsync(get(encodingOptions), put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->abi_GoToNextFrameWithEncodingOptionsAsync(get_abi(encodingOptions), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IBitmapEncoder::FlushAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FlushAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IBitmapEncoder)->abi_FlushAsync(put_abi(asyncInfo))); return asyncInfo; } template void impl_IBitmapEncoderWithSoftwareBitmap::SetSoftwareBitmap(const Windows::Graphics::Imaging::SoftwareBitmap & bitmap) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSoftwareBitmap(get(bitmap))); + check_hresult(WINRT_SHIM(IBitmapEncoderWithSoftwareBitmap)->abi_SetSoftwareBitmap(get_abi(bitmap))); } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapFactory::Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(format, width, height, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapFactory)->abi_Create(format, width, height, put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapFactory::CreateWithAlpha(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAlpha(format, width, height, alpha, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapFactory)->abi_CreateWithAlpha(format, width, height, alpha, put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapStatics::Copy(const Windows::Graphics::Imaging::SoftwareBitmap & source) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Copy(get(source), put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_Copy(get_abi(source), put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapStatics::Convert(const Windows::Graphics::Imaging::SoftwareBitmap & source, Windows::Graphics::Imaging::BitmapPixelFormat format) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Convert(get(source), format, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_Convert(get_abi(source), format, put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapStatics::Convert(const Windows::Graphics::Imaging::SoftwareBitmap & source, Windows::Graphics::Imaging::BitmapPixelFormat format, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ConvertWithAlpha(get(source), format, alpha, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_ConvertWithAlpha(get_abi(source), format, alpha, put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapStatics::CreateCopyFromBuffer(const Windows::Storage::Streams::IBuffer & source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCopyFromBuffer(get(source), format, width, height, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_CreateCopyFromBuffer(get_abi(source), format, width, height, put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmapStatics::CreateCopyFromBuffer(const Windows::Storage::Streams::IBuffer & source, Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCopyWithAlphaFromBuffer(get(source), format, width, height, alpha, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_CreateCopyWithAlphaFromBuffer(get_abi(source), format, width, height, alpha, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISoftwareBitmapStatics::CreateCopyFromSurfaceAsync(const Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface & surface) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateCopyFromSurfaceAsync(get(surface), put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_CreateCopyFromSurfaceAsync(get_abi(surface), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISoftwareBitmapStatics::CreateCopyFromSurfaceAsync(const Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface & surface, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateCopyWithAlphaFromSurfaceAsync(get(surface), alpha, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmapStatics)->abi_CreateCopyWithAlphaFromSurfaceAsync(get_abi(surface), alpha, put_abi(value))); return value; } template Windows::Graphics::Imaging::BitmapPixelFormat impl_ISoftwareBitmap::BitmapPixelFormat() const { Windows::Graphics::Imaging::BitmapPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapPixelFormat(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_BitmapPixelFormat(&value)); return value; } template Windows::Graphics::Imaging::BitmapAlphaMode impl_ISoftwareBitmap::BitmapAlphaMode() const { Windows::Graphics::Imaging::BitmapAlphaMode value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapAlphaMode(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_BitmapAlphaMode(&value)); return value; } template int32_t impl_ISoftwareBitmap::PixelWidth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PixelWidth(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_PixelWidth(&value)); return value; } template int32_t impl_ISoftwareBitmap::PixelHeight() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PixelHeight(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_PixelHeight(&value)); return value; } template bool impl_ISoftwareBitmap::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_IsReadOnly(&value)); return value; } template void impl_ISoftwareBitmap::DpiX(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DpiX(value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->put_DpiX(value)); } template double impl_ISoftwareBitmap::DpiX() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiX(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_DpiX(&value)); return value; } template void impl_ISoftwareBitmap::DpiY(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DpiY(value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->put_DpiY(value)); } template double impl_ISoftwareBitmap::DpiY() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiY(&value)); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->get_DpiY(&value)); return value; } template Windows::Graphics::Imaging::BitmapBuffer impl_ISoftwareBitmap::LockBuffer(Windows::Graphics::Imaging::BitmapBufferAccessMode mode) const { Windows::Graphics::Imaging::BitmapBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_LockBuffer(mode, put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->abi_LockBuffer(mode, put_abi(value))); return value; } template void impl_ISoftwareBitmap::CopyTo(const Windows::Graphics::Imaging::SoftwareBitmap & bitmap) const { - check_hresult(static_cast(static_cast(*this))->abi_CopyTo(get(bitmap))); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->abi_CopyTo(get_abi(bitmap))); } template void impl_ISoftwareBitmap::CopyFromBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_CopyFromBuffer(get(buffer))); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->abi_CopyFromBuffer(get_abi(buffer))); } template void impl_ISoftwareBitmap::CopyToBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_CopyToBuffer(get(buffer))); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->abi_CopyToBuffer(get_abi(buffer))); } template Windows::Graphics::Imaging::SoftwareBitmap impl_ISoftwareBitmap::GetReadOnlyView() const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetReadOnlyView(put(value))); + check_hresult(WINRT_SHIM(ISoftwareBitmap)->abi_GetReadOnlyView(put_abi(value))); return value; } template int32_t impl_IBitmapBuffer::GetPlaneCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPlaneCount(&value)); + check_hresult(WINRT_SHIM(IBitmapBuffer)->abi_GetPlaneCount(&value)); return value; } template Windows::Graphics::Imaging::BitmapPlaneDescription impl_IBitmapBuffer::GetPlaneDescription(int32_t index) const { Windows::Graphics::Imaging::BitmapPlaneDescription value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPlaneDescription(index, put(value))); + check_hresult(WINRT_SHIM(IBitmapBuffer)->abi_GetPlaneDescription(index, put_abi(value))); return value; } @@ -2256,7 +2362,7 @@ inline Windows::Foundation::IAsyncOperation().CreateAsync(encoderId, stream); } -inline Windows::Foundation::IAsyncOperation BitmapEncoder::CreateAsync(GUID encoderId, const Windows::Storage::Streams::IRandomAccessStream & stream, const Windows::Foundation::Collections::IIterable> & encodingOptions) +inline Windows::Foundation::IAsyncOperation BitmapEncoder::CreateAsync(GUID encoderId, const Windows::Storage::Streams::IRandomAccessStream & stream, iterable> encodingOptions) { return get_activation_factory().CreateAsync(encoderId, stream, encodingOptions); } @@ -2279,7 +2385,7 @@ inline BitmapTransform::BitmapTransform() : BitmapTransform(activate_instance()) {} -inline BitmapTypedValue::BitmapTypedValue(const Windows::IInspectable & value, Windows::Foundation::PropertyType type) : +inline BitmapTypedValue::BitmapTypedValue(const Windows::Foundation::IInspectable & value, Windows::Foundation::PropertyType type) : BitmapTypedValue(get_activation_factory().Create(value, type)) {} @@ -2329,3 +2435,284 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapCodecInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapDecoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapDecoderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapEncoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapEncoderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapEncoderWithSoftwareBitmap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapFrameWithSoftwareBitmap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapPropertiesView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapTransform & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapTypedValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IBitmapTypedValueFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::IPixelDataProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::ISoftwareBitmap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::ISoftwareBitmapFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::ISoftwareBitmapStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapCodecInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapDecoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapEncoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapPropertiesView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapPropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapTransform & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::BitmapTypedValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::ImageStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::PixelDataProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Imaging::SoftwareBitmap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Printing.OptionDetails.h b/10.0.14393.0/winrt/Windows.Graphics.Printing.OptionDetails.h index ee3f65eae..8413a35b7 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Printing.OptionDetails.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Printing.OptionDetails.h @@ -1,10 +1,13 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once -#include "internal/Windows.Foundation.Collections.3.h" +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" +#include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Graphics.Printing.3.h" #include "internal/Windows.Graphics.Printing.OptionDetails.3.h" #include "Windows.Graphics.Printing.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ItemId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemId()); return S_OK; } catch (...) @@ -30,10 +34,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ItemDisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemDisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemDisplayName()); return S_OK; } catch (...) @@ -61,10 +67,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddItem(abi_arg_in itemId, abi_arg_in displayName) noexcept override + HRESULT __stdcall abi_AddItem(impl::abi_arg_in itemId, impl::abi_arg_in displayName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddItem(*reinterpret_cast(&itemId), *reinterpret_cast(&displayName)); return S_OK; } @@ -78,10 +85,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -91,11 +99,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -113,6 +122,7 @@ struct produceshim()); this->shim().MaxCharacters(value); return S_OK; } @@ -126,7 +136,8 @@ struct produceshim().MaxCharacters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxCharacters()); return S_OK; } catch (...) @@ -139,11 +150,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -161,7 +173,8 @@ struct produceshim().MinValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinValue()); return S_OK; } catch (...) @@ -174,7 +187,8 @@ struct produceshim().MaxValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxValue()); return S_OK; } catch (...) @@ -187,11 +201,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OptionId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OptionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OptionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OptionId()); return S_OK; } catch (...) @@ -205,7 +220,8 @@ struct produceshim().OptionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OptionType()); return S_OK; } catch (...) @@ -214,10 +230,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ErrorText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ErrorText(*reinterpret_cast(&value)); return S_OK; } @@ -227,11 +244,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ErrorText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorText()); return S_OK; } catch (...) @@ -245,6 +263,7 @@ struct produceshim()); this->shim().State(value); return S_OK; } @@ -258,7 +277,8 @@ struct produceshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -267,11 +287,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -281,11 +302,12 @@ struct produce value, bool * succeeded) noexcept override + HRESULT __stdcall abi_TrySetValue(impl::abi_arg_in value, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TrySetValue(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetValue(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -298,11 +320,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OptionId(abi_arg_out value) noexcept override + HRESULT __stdcall get_OptionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OptionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OptionId()); return S_OK; } catch (...) @@ -316,11 +339,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Options(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Options(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -330,11 +354,12 @@ struct produce optionId, abi_arg_in displayName, abi_arg_out itemListOption) noexcept override + HRESULT __stdcall abi_CreateItemListOption(impl::abi_arg_in optionId, impl::abi_arg_in displayName, impl::abi_arg_out itemListOption) noexcept override { try { - *itemListOption = detach(this->shim().CreateItemListOption(*reinterpret_cast(&optionId), *reinterpret_cast(&displayName))); + typename D::abi_guard guard(this->shim()); + *itemListOption = detach_abi(this->shim().CreateItemListOption(*reinterpret_cast(&optionId), *reinterpret_cast(&displayName))); return S_OK; } catch (...) @@ -344,11 +369,12 @@ struct produce optionId, abi_arg_in displayName, abi_arg_out textOption) noexcept override + HRESULT __stdcall abi_CreateTextOption(impl::abi_arg_in optionId, impl::abi_arg_in displayName, impl::abi_arg_out textOption) noexcept override { try { - *textOption = detach(this->shim().CreateTextOption(*reinterpret_cast(&optionId), *reinterpret_cast(&displayName))); + typename D::abi_guard guard(this->shim()); + *textOption = detach_abi(this->shim().CreateTextOption(*reinterpret_cast(&optionId), *reinterpret_cast(&displayName))); return S_OK; } catch (...) @@ -358,11 +384,12 @@ struct produce> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_OptionChanged(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().OptionChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().OptionChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -375,6 +402,7 @@ struct produceshim()); this->shim().OptionChanged(eventCookie); return S_OK; } @@ -384,11 +412,12 @@ struct produce> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_BeginValidation(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().BeginValidation(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().BeginValidation(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -401,6 +430,7 @@ struct produceshim()); this->shim().BeginValidation(eventCookie); return S_OK; } @@ -414,11 +444,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetFromPrintTaskOptions(abi_arg_in printTaskOptions, abi_arg_out printTaskOptionDetails) noexcept override + HRESULT __stdcall abi_GetFromPrintTaskOptions(impl::abi_arg_in printTaskOptions, impl::abi_arg_out printTaskOptionDetails) noexcept override { try { - *printTaskOptionDetails = detach(this->shim().GetFromPrintTaskOptions(*reinterpret_cast(&printTaskOptions))); + typename D::abi_guard guard(this->shim()); + *printTaskOptionDetails = detach_abi(this->shim().GetFromPrintTaskOptions(*reinterpret_cast(&printTaskOptions))); return S_OK; } catch (...) @@ -436,7 +467,8 @@ struct produceshim().MaxCharacters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxCharacters()); return S_OK; } catch (...) @@ -453,163 +485,163 @@ namespace Windows::Graphics::Printing::OptionDetails { template hstring impl_IPrintOptionDetails::OptionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OptionId(put(value))); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->get_OptionId(put_abi(value))); return value; } template Windows::Graphics::Printing::OptionDetails::PrintOptionType impl_IPrintOptionDetails::OptionType() const { Windows::Graphics::Printing::OptionDetails::PrintOptionType value {}; - check_hresult(static_cast(static_cast(*this))->get_OptionType(&value)); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->get_OptionType(&value)); return value; } -template void impl_IPrintOptionDetails::ErrorText(hstring_ref value) const +template void impl_IPrintOptionDetails::ErrorText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ErrorText(get(value))); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->put_ErrorText(get_abi(value))); } template hstring impl_IPrintOptionDetails::ErrorText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ErrorText(put(value))); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->get_ErrorText(put_abi(value))); return value; } template void impl_IPrintOptionDetails::State(Windows::Graphics::Printing::OptionDetails::PrintOptionStates value) const { - check_hresult(static_cast(static_cast(*this))->put_State(value)); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->put_State(value)); } template Windows::Graphics::Printing::OptionDetails::PrintOptionStates impl_IPrintOptionDetails::State() const { Windows::Graphics::Printing::OptionDetails::PrintOptionStates value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->get_State(&value)); return value; } -template Windows::IInspectable impl_IPrintOptionDetails::Value() const +template Windows::Foundation::IInspectable impl_IPrintOptionDetails::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IPrintOptionDetails)->get_Value(put_abi(value))); return value; } -template bool impl_IPrintOptionDetails::TrySetValue(const Windows::IInspectable & value) const +template bool impl_IPrintOptionDetails::TrySetValue(const Windows::Foundation::IInspectable & value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetValue(get(value), &succeeded)); + check_hresult(WINRT_SHIM(IPrintOptionDetails)->abi_TrySetValue(get_abi(value), &succeeded)); return succeeded; } template uint32_t impl_IPrintNumberOptionDetails::MinValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinValue(&value)); + check_hresult(WINRT_SHIM(IPrintNumberOptionDetails)->get_MinValue(&value)); return value; } template uint32_t impl_IPrintNumberOptionDetails::MaxValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxValue(&value)); + check_hresult(WINRT_SHIM(IPrintNumberOptionDetails)->get_MaxValue(&value)); return value; } template uint32_t impl_IPrintTextOptionDetails::MaxCharacters() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxCharacters(&value)); + check_hresult(WINRT_SHIM(IPrintTextOptionDetails)->get_MaxCharacters(&value)); return value; } -template Windows::Foundation::Collections::IVectorView impl_IPrintItemListOptionDetails::Items() const +template Windows::Foundation::Collections::IVectorView impl_IPrintItemListOptionDetails::Items() const { - Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + Windows::Foundation::Collections::IVectorView value; + check_hresult(WINRT_SHIM(IPrintItemListOptionDetails)->get_Items(put_abi(value))); return value; } -template void impl_IPrintCustomOptionDetails::DisplayName(hstring_ref value) const +template void impl_IPrintCustomOptionDetails::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPrintCustomOptionDetails)->put_DisplayName(get_abi(value))); } template hstring impl_IPrintCustomOptionDetails::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPrintCustomOptionDetails)->get_DisplayName(put_abi(value))); return value; } template void impl_IPrintCustomTextOptionDetails::MaxCharacters(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxCharacters(value)); + check_hresult(WINRT_SHIM(IPrintCustomTextOptionDetails)->put_MaxCharacters(value)); } template uint32_t impl_IPrintCustomTextOptionDetails::MaxCharacters() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxCharacters(&value)); + check_hresult(WINRT_SHIM(IPrintCustomTextOptionDetails)->get_MaxCharacters(&value)); return value; } template hstring impl_IPrintCustomItemDetails::ItemId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ItemId(put(value))); + check_hresult(WINRT_SHIM(IPrintCustomItemDetails)->get_ItemId(put_abi(value))); return value; } -template void impl_IPrintCustomItemDetails::ItemDisplayName(hstring_ref value) const +template void impl_IPrintCustomItemDetails::ItemDisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemDisplayName(get(value))); + check_hresult(WINRT_SHIM(IPrintCustomItemDetails)->put_ItemDisplayName(get_abi(value))); } template hstring impl_IPrintCustomItemDetails::ItemDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ItemDisplayName(put(value))); + check_hresult(WINRT_SHIM(IPrintCustomItemDetails)->get_ItemDisplayName(put_abi(value))); return value; } -template void impl_IPrintCustomItemListOptionDetails::AddItem(hstring_ref itemId, hstring_ref displayName) const +template void impl_IPrintCustomItemListOptionDetails::AddItem(hstring_view itemId, hstring_view displayName) const { - check_hresult(static_cast(static_cast(*this))->abi_AddItem(get(itemId), get(displayName))); + check_hresult(WINRT_SHIM(IPrintCustomItemListOptionDetails)->abi_AddItem(get_abi(itemId), get_abi(displayName))); } -template Windows::IInspectable impl_IPrintTaskOptionChangedEventArgs::OptionId() const +template Windows::Foundation::IInspectable impl_IPrintTaskOptionChangedEventArgs::OptionId() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_OptionId(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IPrintTaskOptionChangedEventArgs)->get_OptionId(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IPrintTaskOptionDetails::Options() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Options(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->get_Options(put_abi(value))); return value; } -template Windows::Graphics::Printing::OptionDetails::PrintCustomItemListOptionDetails impl_IPrintTaskOptionDetails::CreateItemListOption(hstring_ref optionId, hstring_ref displayName) const +template Windows::Graphics::Printing::OptionDetails::PrintCustomItemListOptionDetails impl_IPrintTaskOptionDetails::CreateItemListOption(hstring_view optionId, hstring_view displayName) const { Windows::Graphics::Printing::OptionDetails::PrintCustomItemListOptionDetails itemListOption { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateItemListOption(get(optionId), get(displayName), put(itemListOption))); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->abi_CreateItemListOption(get_abi(optionId), get_abi(displayName), put_abi(itemListOption))); return itemListOption; } -template Windows::Graphics::Printing::OptionDetails::PrintCustomTextOptionDetails impl_IPrintTaskOptionDetails::CreateTextOption(hstring_ref optionId, hstring_ref displayName) const +template Windows::Graphics::Printing::OptionDetails::PrintCustomTextOptionDetails impl_IPrintTaskOptionDetails::CreateTextOption(hstring_view optionId, hstring_view displayName) const { Windows::Graphics::Printing::OptionDetails::PrintCustomTextOptionDetails textOption { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTextOption(get(optionId), get(displayName), put(textOption))); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->abi_CreateTextOption(get_abi(optionId), get_abi(displayName), put_abi(textOption))); return textOption; } template event_token impl_IPrintTaskOptionDetails::OptionChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_OptionChanged(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->add_OptionChanged(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -620,30 +652,30 @@ template event_revoker impl_IPrintTaskOpti template void impl_IPrintTaskOptionDetails::OptionChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_OptionChanged(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->remove_OptionChanged(eventCookie)); } -template event_token impl_IPrintTaskOptionDetails::BeginValidation(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IPrintTaskOptionDetails::BeginValidation(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_BeginValidation(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->add_BeginValidation(get_abi(eventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IPrintTaskOptionDetails::BeginValidation(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IPrintTaskOptionDetails::BeginValidation(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Printing::OptionDetails::IPrintTaskOptionDetails::remove_BeginValidation, BeginValidation(eventHandler)); } template void impl_IPrintTaskOptionDetails::BeginValidation(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_BeginValidation(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetails)->remove_BeginValidation(eventCookie)); } template Windows::Graphics::Printing::OptionDetails::PrintTaskOptionDetails impl_IPrintTaskOptionDetailsStatic::GetFromPrintTaskOptions(const Windows::Graphics::Printing::PrintTaskOptions & printTaskOptions) const { Windows::Graphics::Printing::OptionDetails::PrintTaskOptionDetails printTaskOptionDetails { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetFromPrintTaskOptions(get(printTaskOptions), put(printTaskOptionDetails))); + check_hresult(WINRT_SHIM(IPrintTaskOptionDetailsStatic)->abi_GetFromPrintTaskOptions(get_abi(printTaskOptions), put_abi(printTaskOptionDetails))); return printTaskOptionDetails; } @@ -655,3 +687,257 @@ inline Windows::Graphics::Printing::OptionDetails::PrintTaskOptionDetails PrintT } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintCustomItemDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintCustomItemListOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintCustomOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintCustomTextOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintItemListOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintNumberOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintTaskOptionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintTaskOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintTaskOptionDetailsStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::IPrintTextOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintBindingOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintBorderingOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintCollationOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintColorModeOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintCopiesOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintCustomItemDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintCustomItemListOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintCustomTextOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintDuplexOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintHolePunchOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintMediaSizeOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintMediaTypeOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintOrientationOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintQualityOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintStapleOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintTaskOptionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::OptionDetails::PrintTaskOptionDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Printing.h b/10.0.14393.0/winrt/Windows.Graphics.Printing.h index a4019b7c0..4ecd9e458 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Printing.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Printing.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -27,7 +30,7 @@ template PrintTaskSourceRequestedHandler::PrintTaskSour inline void PrintTaskSourceRequestedHandler::operator()(const Windows::Graphics::Printing::PrintTaskSourceRequestedArgs & args) const { - check_hresult((*this)->abi_Invoke(get(args))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(args))); } } @@ -41,11 +44,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall add_PrintTaskRequested(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_PrintTaskRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().PrintTaskRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().PrintTaskRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -58,6 +62,7 @@ struct produce : produce_baseshim()); this->shim().PrintTaskRequested(eventCookie); return S_OK; } @@ -71,11 +76,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out printingManager) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out printingManager) noexcept override { try { - *printingManager = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *printingManager = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -85,11 +91,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ShowPrintUIAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ShowPrintUIAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ShowPrintUIAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowPrintUIAsync()); return S_OK; } catch (...) @@ -107,7 +114,8 @@ struct produce : produce_b { try { - *result = detach(this->shim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -124,6 +132,7 @@ struct produce : produce_baseshim()); this->shim().MediaSize(value); return S_OK; } @@ -137,7 +146,8 @@ struct produce : produce_baseshim().MediaSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSize()); return S_OK; } catch (...) @@ -146,10 +156,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PageSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PageSize(*reinterpret_cast(&value)); return S_OK; } @@ -159,11 +170,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PageSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageSize()); return S_OK; } catch (...) @@ -176,6 +188,7 @@ struct produce : produce_baseshim()); this->shim().DpiX(value); return S_OK; } @@ -189,7 +202,8 @@ struct produce : produce_baseshim().DpiX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiX()); return S_OK; } catch (...) @@ -202,6 +216,7 @@ struct produce : produce_baseshim()); this->shim().DpiY(value); return S_OK; } @@ -215,7 +230,8 @@ struct produce : produce_baseshim().DpiY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DpiY()); return S_OK; } catch (...) @@ -228,6 +244,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -241,7 +258,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -254,11 +272,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -268,11 +287,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -282,11 +302,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Options(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -296,11 +317,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Previewing(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Previewing(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Previewing(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -313,6 +335,7 @@ struct produce : produce_baseshim()); this->shim().Previewing(eventCookie); return S_OK; } @@ -322,11 +345,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Submitting(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Submitting(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Submitting(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -339,6 +363,7 @@ struct produce : produce_baseshim()); this->shim().Submitting(eventCookie); return S_OK; } @@ -348,11 +373,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Progressing(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Progressing(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Progressing(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -365,6 +391,7 @@ struct produce : produce_baseshim()); this->shim().Progressing(eventCookie); return S_OK; } @@ -374,11 +401,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Completed(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Completed(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -391,6 +419,7 @@ struct produce : produce_baseshim()); this->shim().Completed(eventCookie); return S_OK; } @@ -408,6 +437,7 @@ struct produce : produce_baseshim()); this->shim().IsPreviewEnabled(value); return S_OK; } @@ -421,7 +451,8 @@ struct produce : produce_baseshim().IsPreviewEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPreviewEnabled()); return S_OK; } catch (...) @@ -438,7 +469,8 @@ struct produce : p { try { - *value = detach(this->shim().Completion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Completion()); return S_OK; } catch (...) @@ -455,6 +487,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Bordering(value); return S_OK; } @@ -468,7 +501,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Bordering()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bordering()); return S_OK; } catch (...) @@ -477,11 +511,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetPagePrintTicket(abi_arg_in printPageInfo, abi_arg_out printTicket) noexcept override + HRESULT __stdcall abi_GetPagePrintTicket(impl::abi_arg_in printPageInfo, impl::abi_arg_out printTicket) noexcept override { try { - *printTicket = detach(this->shim().GetPagePrintTicket(*reinterpret_cast(&printPageInfo))); + typename D::abi_guard guard(this->shim()); + *printTicket = detach_abi(this->shim().GetPagePrintTicket(*reinterpret_cast(&printPageInfo))); return S_OK; } catch (...) @@ -495,11 +530,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetPageDescription(uint32_t jobPageNumber, abi_arg_out description) noexcept override + HRESULT __stdcall abi_GetPageDescription(uint32_t jobPageNumber, impl::abi_arg_out description) noexcept override { try { - *description = detach(this->shim().GetPageDescription(jobPageNumber)); + typename D::abi_guard guard(this->shim()); + *description = detach_abi(this->shim().GetPageDescription(jobPageNumber)); return S_OK; } catch (...) @@ -516,6 +552,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MediaSize(value); return S_OK; } @@ -529,7 +566,8 @@ struct produce { try { - *value = detach(this->shim().MediaSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSize()); return S_OK; } catch (...) @@ -542,6 +580,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MediaType(value); return S_OK; } @@ -555,7 +594,8 @@ struct produce { try { - *value = detach(this->shim().MediaType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaType()); return S_OK; } catch (...) @@ -568,6 +608,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(value); return S_OK; } @@ -581,7 +622,8 @@ struct produce { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -594,6 +636,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintQuality(value); return S_OK; } @@ -607,7 +650,8 @@ struct produce { try { - *value = detach(this->shim().PrintQuality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintQuality()); return S_OK; } catch (...) @@ -620,6 +664,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ColorMode(value); return S_OK; } @@ -633,7 +678,8 @@ struct produce { try { - *value = detach(this->shim().ColorMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorMode()); return S_OK; } catch (...) @@ -646,6 +692,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Duplex(value); return S_OK; } @@ -659,7 +706,8 @@ struct produce { try { - *value = detach(this->shim().Duplex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duplex()); return S_OK; } catch (...) @@ -672,6 +720,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Collation(value); return S_OK; } @@ -685,7 +734,8 @@ struct produce { try { - *value = detach(this->shim().Collation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Collation()); return S_OK; } catch (...) @@ -698,6 +748,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Staple(value); return S_OK; } @@ -711,7 +762,8 @@ struct produce { try { - *value = detach(this->shim().Staple()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Staple()); return S_OK; } catch (...) @@ -724,6 +776,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().HolePunch(value); return S_OK; } @@ -737,7 +790,8 @@ struct produce { try { - *value = detach(this->shim().HolePunch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HolePunch()); return S_OK; } catch (...) @@ -750,6 +804,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Binding(value); return S_OK; } @@ -763,7 +818,8 @@ struct produce { try { - *value = detach(this->shim().Binding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Binding()); return S_OK; } catch (...) @@ -776,7 +832,8 @@ struct produce { try { - *value = detach(this->shim().MinCopies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinCopies()); return S_OK; } catch (...) @@ -789,7 +846,8 @@ struct produce { try { - *value = detach(this->shim().MaxCopies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxCopies()); return S_OK; } catch (...) @@ -802,6 +860,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().NumberOfCopies(value); return S_OK; } @@ -815,7 +874,8 @@ struct produce { try { - *value = detach(this->shim().NumberOfCopies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfCopies()); return S_OK; } catch (...) @@ -828,11 +888,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayedOptions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DisplayedOptions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DisplayedOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayedOptions()); return S_OK; } catch (...) @@ -850,7 +911,8 @@ struct produce : { try { - *value = detach(this->shim().DocumentPageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentPageCount()); return S_OK; } catch (...) @@ -863,11 +925,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -876,11 +939,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreatePrintTask(abi_arg_in title, abi_arg_in handler, abi_arg_out task) noexcept override + HRESULT __stdcall abi_CreatePrintTask(impl::abi_arg_in title, impl::abi_arg_in handler, impl::abi_arg_out task) noexcept override { try { - *task = detach(this->shim().CreatePrintTask(*reinterpret_cast(&title), *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *task = detach_abi(this->shim().CreatePrintTask(*reinterpret_cast(&title), *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -890,11 +954,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -912,6 +977,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -925,11 +991,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -943,11 +1010,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -956,10 +1024,11 @@ struct produce : } } - HRESULT __stdcall abi_SetSource(abi_arg_in source) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&source)); return S_OK; } @@ -969,11 +1038,12 @@ struct produce : } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -991,6 +1061,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -1008,6 +1079,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPrinterTargetEnabled(value); return S_OK; } @@ -1021,7 +1093,8 @@ struct produce : { try { - *value = detach(this->shim().IsPrinterTargetEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrinterTargetEnabled()); return S_OK; } catch (...) @@ -1034,6 +1107,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Is3DManufacturingTargetEnabled(value); return S_OK; } @@ -1047,7 +1121,8 @@ struct produce : { try { - *value = detach(this->shim().Is3DManufacturingTargetEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Is3DManufacturingTargetEnabled()); return S_OK; } catch (...) @@ -1060,11 +1135,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_MediaSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSize()); return S_OK; } catch (...) @@ -1074,11 +1150,12 @@ struct produce } } - HRESULT __stdcall get_MediaType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaType()); return S_OK; } catch (...) @@ -1088,11 +1165,12 @@ struct produce } } - HRESULT __stdcall get_Orientation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -1102,11 +1180,12 @@ struct produce } } - HRESULT __stdcall get_PrintQuality(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrintQuality(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrintQuality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintQuality()); return S_OK; } catch (...) @@ -1116,11 +1195,12 @@ struct produce } } - HRESULT __stdcall get_ColorMode(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColorMode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColorMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorMode()); return S_OK; } catch (...) @@ -1130,11 +1210,12 @@ struct produce } } - HRESULT __stdcall get_Duplex(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duplex(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duplex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duplex()); return S_OK; } catch (...) @@ -1144,11 +1225,12 @@ struct produce } } - HRESULT __stdcall get_Collation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Collation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Collation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Collation()); return S_OK; } catch (...) @@ -1158,11 +1240,12 @@ struct produce } } - HRESULT __stdcall get_Staple(abi_arg_out value) noexcept override + HRESULT __stdcall get_Staple(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Staple()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Staple()); return S_OK; } catch (...) @@ -1172,11 +1255,12 @@ struct produce } } - HRESULT __stdcall get_HolePunch(abi_arg_out value) noexcept override + HRESULT __stdcall get_HolePunch(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HolePunch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HolePunch()); return S_OK; } catch (...) @@ -1186,11 +1270,12 @@ struct produce } } - HRESULT __stdcall get_Binding(abi_arg_out value) noexcept override + HRESULT __stdcall get_Binding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Binding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Binding()); return S_OK; } catch (...) @@ -1200,11 +1285,12 @@ struct produce } } - HRESULT __stdcall get_Copies(abi_arg_out value) noexcept override + HRESULT __stdcall get_Copies(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Copies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Copies()); return S_OK; } catch (...) @@ -1214,11 +1300,12 @@ struct produce } } - HRESULT __stdcall get_NUp(abi_arg_out value) noexcept override + HRESULT __stdcall get_NUp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NUp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NUp()); return S_OK; } catch (...) @@ -1228,11 +1315,12 @@ struct produce } } - HRESULT __stdcall get_InputBin(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputBin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputBin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputBin()); return S_OK; } catch (...) @@ -1246,11 +1334,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Bordering(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bordering(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bordering()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bordering()); return S_OK; } catch (...) @@ -1267,414 +1356,414 @@ namespace Windows::Graphics::Printing { template void impl_IPrintTaskOptionsCoreProperties::MediaSize(Windows::Graphics::Printing::PrintMediaSize value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaSize(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_MediaSize(value)); } template Windows::Graphics::Printing::PrintMediaSize impl_IPrintTaskOptionsCoreProperties::MediaSize() const { Windows::Graphics::Printing::PrintMediaSize value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaSize(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_MediaSize(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::MediaType(Windows::Graphics::Printing::PrintMediaType value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaType(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_MediaType(value)); } template Windows::Graphics::Printing::PrintMediaType impl_IPrintTaskOptionsCoreProperties::MediaType() const { Windows::Graphics::Printing::PrintMediaType value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaType(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_MediaType(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::Orientation(Windows::Graphics::Printing::PrintOrientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_Orientation(value)); } template Windows::Graphics::Printing::PrintOrientation impl_IPrintTaskOptionsCoreProperties::Orientation() const { Windows::Graphics::Printing::PrintOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_Orientation(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::PrintQuality(Windows::Graphics::Printing::PrintQuality value) const { - check_hresult(static_cast(static_cast(*this))->put_PrintQuality(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_PrintQuality(value)); } template Windows::Graphics::Printing::PrintQuality impl_IPrintTaskOptionsCoreProperties::PrintQuality() const { Windows::Graphics::Printing::PrintQuality value {}; - check_hresult(static_cast(static_cast(*this))->get_PrintQuality(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_PrintQuality(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::ColorMode(Windows::Graphics::Printing::PrintColorMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ColorMode(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_ColorMode(value)); } template Windows::Graphics::Printing::PrintColorMode impl_IPrintTaskOptionsCoreProperties::ColorMode() const { Windows::Graphics::Printing::PrintColorMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ColorMode(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_ColorMode(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::Duplex(Windows::Graphics::Printing::PrintDuplex value) const { - check_hresult(static_cast(static_cast(*this))->put_Duplex(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_Duplex(value)); } template Windows::Graphics::Printing::PrintDuplex impl_IPrintTaskOptionsCoreProperties::Duplex() const { Windows::Graphics::Printing::PrintDuplex value {}; - check_hresult(static_cast(static_cast(*this))->get_Duplex(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_Duplex(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::Collation(Windows::Graphics::Printing::PrintCollation value) const { - check_hresult(static_cast(static_cast(*this))->put_Collation(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_Collation(value)); } template Windows::Graphics::Printing::PrintCollation impl_IPrintTaskOptionsCoreProperties::Collation() const { Windows::Graphics::Printing::PrintCollation value {}; - check_hresult(static_cast(static_cast(*this))->get_Collation(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_Collation(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::Staple(Windows::Graphics::Printing::PrintStaple value) const { - check_hresult(static_cast(static_cast(*this))->put_Staple(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_Staple(value)); } template Windows::Graphics::Printing::PrintStaple impl_IPrintTaskOptionsCoreProperties::Staple() const { Windows::Graphics::Printing::PrintStaple value {}; - check_hresult(static_cast(static_cast(*this))->get_Staple(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_Staple(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::HolePunch(Windows::Graphics::Printing::PrintHolePunch value) const { - check_hresult(static_cast(static_cast(*this))->put_HolePunch(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_HolePunch(value)); } template Windows::Graphics::Printing::PrintHolePunch impl_IPrintTaskOptionsCoreProperties::HolePunch() const { Windows::Graphics::Printing::PrintHolePunch value {}; - check_hresult(static_cast(static_cast(*this))->get_HolePunch(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_HolePunch(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::Binding(Windows::Graphics::Printing::PrintBinding value) const { - check_hresult(static_cast(static_cast(*this))->put_Binding(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_Binding(value)); } template Windows::Graphics::Printing::PrintBinding impl_IPrintTaskOptionsCoreProperties::Binding() const { Windows::Graphics::Printing::PrintBinding value {}; - check_hresult(static_cast(static_cast(*this))->get_Binding(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_Binding(&value)); return value; } template uint32_t impl_IPrintTaskOptionsCoreProperties::MinCopies() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinCopies(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_MinCopies(&value)); return value; } template uint32_t impl_IPrintTaskOptionsCoreProperties::MaxCopies() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxCopies(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_MaxCopies(&value)); return value; } template void impl_IPrintTaskOptionsCoreProperties::NumberOfCopies(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_NumberOfCopies(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->put_NumberOfCopies(value)); } template uint32_t impl_IPrintTaskOptionsCoreProperties::NumberOfCopies() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfCopies(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreProperties)->get_NumberOfCopies(&value)); return value; } template void impl_IPrintPageInfo::MediaSize(Windows::Graphics::Printing::PrintMediaSize value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaSize(value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->put_MediaSize(value)); } template Windows::Graphics::Printing::PrintMediaSize impl_IPrintPageInfo::MediaSize() const { Windows::Graphics::Printing::PrintMediaSize value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaSize(&value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->get_MediaSize(&value)); return value; } template void impl_IPrintPageInfo::PageSize(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_PageSize(get(value))); + check_hresult(WINRT_SHIM(IPrintPageInfo)->put_PageSize(get_abi(value))); } template Windows::Foundation::Size impl_IPrintPageInfo::PageSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_PageSize(put(value))); + check_hresult(WINRT_SHIM(IPrintPageInfo)->get_PageSize(put_abi(value))); return value; } template void impl_IPrintPageInfo::DpiX(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DpiX(value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->put_DpiX(value)); } template uint32_t impl_IPrintPageInfo::DpiX() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiX(&value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->get_DpiX(&value)); return value; } template void impl_IPrintPageInfo::DpiY(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DpiY(value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->put_DpiY(value)); } template uint32_t impl_IPrintPageInfo::DpiY() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DpiY(&value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->get_DpiY(&value)); return value; } template void impl_IPrintPageInfo::Orientation(Windows::Graphics::Printing::PrintOrientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->put_Orientation(value)); } template Windows::Graphics::Printing::PrintOrientation impl_IPrintPageInfo::Orientation() const { Windows::Graphics::Printing::PrintOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IPrintPageInfo)->get_Orientation(&value)); return value; } template void impl_IPrintTaskOptions::Bordering(Windows::Graphics::Printing::PrintBordering value) const { - check_hresult(static_cast(static_cast(*this))->put_Bordering(value)); + check_hresult(WINRT_SHIM(IPrintTaskOptions)->put_Bordering(value)); } template Windows::Graphics::Printing::PrintBordering impl_IPrintTaskOptions::Bordering() const { Windows::Graphics::Printing::PrintBordering value {}; - check_hresult(static_cast(static_cast(*this))->get_Bordering(&value)); + check_hresult(WINRT_SHIM(IPrintTaskOptions)->get_Bordering(&value)); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_IPrintTaskOptions::GetPagePrintTicket(const Windows::Graphics::Printing::PrintPageInfo & printPageInfo) const { Windows::Storage::Streams::IRandomAccessStream printTicket; - check_hresult(static_cast(static_cast(*this))->abi_GetPagePrintTicket(get(printPageInfo), put(printTicket))); + check_hresult(WINRT_SHIM(IPrintTaskOptions)->abi_GetPagePrintTicket(get_abi(printPageInfo), put_abi(printTicket))); return printTicket; } template Windows::Foundation::Collections::IVector impl_IPrintTaskOptionsCoreUIConfiguration::DisplayedOptions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DisplayedOptions(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCoreUIConfiguration)->get_DisplayedOptions(put_abi(value))); return value; } template Windows::Graphics::Printing::PrintPageDescription impl_IPrintTaskOptionsCore::GetPageDescription(uint32_t jobPageNumber) const { Windows::Graphics::Printing::PrintPageDescription description {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPageDescription(jobPageNumber, put(description))); + check_hresult(WINRT_SHIM(IPrintTaskOptionsCore)->abi_GetPageDescription(jobPageNumber, put_abi(description))); return description; } template hstring impl_IStandardPrintTaskOptionsStatic::MediaSize() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MediaSize(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_MediaSize(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::MediaType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MediaType(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_MediaType(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Orientation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Orientation(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::PrintQuality() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrintQuality(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_PrintQuality(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::ColorMode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ColorMode(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_ColorMode(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Duplex() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Duplex(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Duplex(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Collation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Collation(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Collation(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Staple() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Staple(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Staple(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::HolePunch() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HolePunch(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_HolePunch(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Binding() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Binding(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Binding(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::Copies() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Copies(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_Copies(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::NUp() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NUp(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_NUp(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic::InputBin() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InputBin(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic)->get_InputBin(put_abi(value))); return value; } template hstring impl_IStandardPrintTaskOptionsStatic2::Bordering() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bordering(put(value))); + check_hresult(WINRT_SHIM(IStandardPrintTaskOptionsStatic2)->get_Bordering(put_abi(value))); return value; } template uint32_t impl_IPrintTaskProgressingEventArgs::DocumentPageCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DocumentPageCount(&value)); + check_hresult(WINRT_SHIM(IPrintTaskProgressingEventArgs)->get_DocumentPageCount(&value)); return value; } template Windows::Graphics::Printing::PrintTaskCompletion impl_IPrintTaskCompletedEventArgs::Completion() const { Windows::Graphics::Printing::PrintTaskCompletion value {}; - check_hresult(static_cast(static_cast(*this))->get_Completion(&value)); + check_hresult(WINRT_SHIM(IPrintTaskCompletedEventArgs)->get_Completion(&value)); return value; } template Windows::ApplicationModel::DataTransfer::DataPackagePropertySet impl_IPrintTask::Properties() const { Windows::ApplicationModel::DataTransfer::DataPackagePropertySet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IPrintTask)->get_Properties(put_abi(value))); return value; } template Windows::Graphics::Printing::IPrintDocumentSource impl_IPrintTask::Source() const { Windows::Graphics::Printing::IPrintDocumentSource value; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPrintTask)->get_Source(put_abi(value))); return value; } template Windows::Graphics::Printing::PrintTaskOptions impl_IPrintTask::Options() const { Windows::Graphics::Printing::PrintTaskOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Options(put(value))); + check_hresult(WINRT_SHIM(IPrintTask)->get_Options(put_abi(value))); return value; } -template event_token impl_IPrintTask::Previewing(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IPrintTask::Previewing(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Previewing(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->add_Previewing(get_abi(eventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IPrintTask::Previewing(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IPrintTask::Previewing(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Printing::IPrintTask::remove_Previewing, Previewing(eventHandler)); } template void impl_IPrintTask::Previewing(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Previewing(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->remove_Previewing(eventCookie)); } -template event_token impl_IPrintTask::Submitting(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IPrintTask::Submitting(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Submitting(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->add_Submitting(get_abi(eventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IPrintTask::Submitting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IPrintTask::Submitting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Printing::IPrintTask::remove_Submitting, Submitting(eventHandler)); } template void impl_IPrintTask::Submitting(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Submitting(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->remove_Submitting(eventCookie)); } template event_token impl_IPrintTask::Progressing(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Progressing(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->add_Progressing(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -1685,13 +1774,13 @@ template event_revoker impl_IPrintTask::Progressing( template void impl_IPrintTask::Progressing(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Progressing(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->remove_Progressing(eventCookie)); } template event_token impl_IPrintTask::Completed(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->add_Completed(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -1702,127 +1791,127 @@ template event_revoker impl_IPrintTask::Completed(au template void impl_IPrintTask::Completed(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(eventCookie)); + check_hresult(WINRT_SHIM(IPrintTask)->remove_Completed(eventCookie)); } template void impl_IPrintTaskTargetDeviceSupport::IsPrinterTargetEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPrinterTargetEnabled(value)); + check_hresult(WINRT_SHIM(IPrintTaskTargetDeviceSupport)->put_IsPrinterTargetEnabled(value)); } template bool impl_IPrintTaskTargetDeviceSupport::IsPrinterTargetEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrinterTargetEnabled(&value)); + check_hresult(WINRT_SHIM(IPrintTaskTargetDeviceSupport)->get_IsPrinterTargetEnabled(&value)); return value; } template void impl_IPrintTaskTargetDeviceSupport::Is3DManufacturingTargetEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Is3DManufacturingTargetEnabled(value)); + check_hresult(WINRT_SHIM(IPrintTaskTargetDeviceSupport)->put_Is3DManufacturingTargetEnabled(value)); } template bool impl_IPrintTaskTargetDeviceSupport::Is3DManufacturingTargetEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Is3DManufacturingTargetEnabled(&value)); + check_hresult(WINRT_SHIM(IPrintTaskTargetDeviceSupport)->get_Is3DManufacturingTargetEnabled(&value)); return value; } template void impl_IPrintTask2::IsPreviewEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPreviewEnabled(value)); + check_hresult(WINRT_SHIM(IPrintTask2)->put_IsPreviewEnabled(value)); } template bool impl_IPrintTask2::IsPreviewEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPreviewEnabled(&value)); + check_hresult(WINRT_SHIM(IPrintTask2)->get_IsPreviewEnabled(&value)); return value; } template void impl_IPrintTaskSourceRequestedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IPrintTaskSourceRequestedDeferral)->abi_Complete()); } template Windows::Foundation::DateTime impl_IPrintTaskSourceRequestedArgs::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskSourceRequestedArgs)->get_Deadline(put_abi(value))); return value; } template void impl_IPrintTaskSourceRequestedArgs::SetSource(const Windows::Graphics::Printing::IPrintDocumentSource & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(source))); + check_hresult(WINRT_SHIM(IPrintTaskSourceRequestedArgs)->abi_SetSource(get_abi(source))); } template Windows::Graphics::Printing::PrintTaskSourceRequestedDeferral impl_IPrintTaskSourceRequestedArgs::GetDeferral() const { Windows::Graphics::Printing::PrintTaskSourceRequestedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IPrintTaskSourceRequestedArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IPrintTaskRequestedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IPrintTaskRequestedDeferral)->abi_Complete()); } template Windows::Foundation::DateTime impl_IPrintTaskRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskRequest)->get_Deadline(put_abi(value))); return value; } -template Windows::Graphics::Printing::PrintTask impl_IPrintTaskRequest::CreatePrintTask(hstring_ref title, const Windows::Graphics::Printing::PrintTaskSourceRequestedHandler & handler) const +template Windows::Graphics::Printing::PrintTask impl_IPrintTaskRequest::CreatePrintTask(hstring_view title, const Windows::Graphics::Printing::PrintTaskSourceRequestedHandler & handler) const { Windows::Graphics::Printing::PrintTask task { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePrintTask(get(title), get(handler), put(task))); + check_hresult(WINRT_SHIM(IPrintTaskRequest)->abi_CreatePrintTask(get_abi(title), get_abi(handler), put_abi(task))); return task; } template Windows::Graphics::Printing::PrintTaskRequestedDeferral impl_IPrintTaskRequest::GetDeferral() const { Windows::Graphics::Printing::PrintTaskRequestedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IPrintTaskRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Graphics::Printing::PrintTaskRequest impl_IPrintTaskRequestedEventArgs::Request() const { Windows::Graphics::Printing::PrintTaskRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IPrintTaskRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Graphics::Printing::PrintManager impl_IPrintManagerStatic::GetForCurrentView() const { Windows::Graphics::Printing::PrintManager printingManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(printingManager))); + check_hresult(WINRT_SHIM(IPrintManagerStatic)->abi_GetForCurrentView(put_abi(printingManager))); return printingManager; } template Windows::Foundation::IAsyncOperation impl_IPrintManagerStatic::ShowPrintUIAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowPrintUIAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrintManagerStatic)->abi_ShowPrintUIAsync(put_abi(operation))); return operation; } template bool impl_IPrintManagerStatic2::IsSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&result)); + check_hresult(WINRT_SHIM(IPrintManagerStatic2)->abi_IsSupported(&result)); return result; } template event_token impl_IPrintManager::PrintTaskRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_PrintTaskRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrintManager)->add_PrintTaskRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -1833,7 +1922,7 @@ template event_revoker impl_IPrintManager::PrintT template void impl_IPrintManager::PrintTaskRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PrintTaskRequested(eventCookie)); + check_hresult(WINRT_SHIM(IPrintManager)->remove_PrintTaskRequested(eventCookie)); } inline Windows::Graphics::Printing::PrintManager PrintManager::GetForCurrentView() @@ -1928,3 +2017,293 @@ inline hstring StandardPrintTaskOptions::Bordering() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintDocumentSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintManagerStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintManagerStatic2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintPageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTask2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskOptionsCore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskOptionsCoreProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskOptionsCoreUIConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskProgressingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskSourceRequestedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskSourceRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IPrintTaskTargetDeviceSupport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IStandardPrintTaskOptionsStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::IStandardPrintTaskOptionsStatic2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintPageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskProgressingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskSourceRequestedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing::PrintTaskSourceRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Graphics.Printing3D.h b/10.0.14393.0/winrt/Windows.Graphics.Printing3D.h index cb6d69b67..63ae01542 100644 --- a/10.0.14393.0/winrt/Windows.Graphics.Printing3D.h +++ b/10.0.14393.0/winrt/Windows.Graphics.Printing3D.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -27,7 +30,7 @@ template Print3DTaskSourceRequestedHandler::Print3DTask inline void Print3DTaskSourceRequestedHandler::operator()(const Windows::Graphics::Printing3D::Print3DTaskSourceRequestedArgs & args) const { - check_hresult((*this)->abi_Invoke(get(args))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(args))); } } @@ -37,11 +40,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_TaskRequested(abi_arg_in> eventHandler, event_token * token) noexcept override + HRESULT __stdcall add_TaskRequested(impl::abi_arg_in> eventHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().TaskRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TaskRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -54,6 +58,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().TaskRequested(token); return S_OK; } @@ -67,11 +72,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -81,11 +87,12 @@ struct produce : produ } } - HRESULT __stdcall abi_ShowPrintUIAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ShowPrintUIAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ShowPrintUIAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowPrintUIAsync()); return S_OK; } catch (...) @@ -99,11 +106,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -113,11 +121,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Submitting(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Submitting(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Submitting(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -130,6 +139,7 @@ struct produce : produce_baseshim()); this->shim().Submitting(eventCookie); return S_OK; } @@ -139,11 +149,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Completed(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Completed(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -156,6 +167,7 @@ struct produce : produce_baseshim()); this->shim().Completed(eventCookie); return S_OK; } @@ -165,11 +177,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_SourceChanged(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().SourceChanged(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().SourceChanged(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -182,6 +195,7 @@ struct produce : produce_baseshim()); this->shim().SourceChanged(eventCookie); return S_OK; } @@ -199,7 +213,8 @@ struct produce { try { - *value = detach(this->shim().Completion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Completion()); return S_OK; } catch (...) @@ -212,7 +227,8 @@ struct produce { try { - *value = detach(this->shim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -225,11 +241,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateTask(abi_arg_in title, abi_arg_in printerId, abi_arg_in handler, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateTask(impl::abi_arg_in title, impl::abi_arg_in printerId, impl::abi_arg_in handler, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateTask(*reinterpret_cast(&title), *reinterpret_cast(&printerId), *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateTask(*reinterpret_cast(&title), *reinterpret_cast(&printerId), *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -243,11 +260,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -261,11 +279,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -279,10 +298,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetSource(abi_arg_in source) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&source)); return S_OK; } @@ -296,11 +316,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SaveAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -310,11 +331,12 @@ struct produce : produc } } - HRESULT __stdcall get_PrintTicket(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrintTicket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrintTicket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrintTicket()); return S_OK; } catch (...) @@ -324,10 +346,11 @@ struct produce : produc } } - HRESULT __stdcall put_PrintTicket(abi_arg_in value) noexcept override + HRESULT __stdcall put_PrintTicket(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrintTicket(*reinterpret_cast(&value)); return S_OK; } @@ -337,11 +360,12 @@ struct produce : produc } } - HRESULT __stdcall get_ModelPart(abi_arg_out value) noexcept override + HRESULT __stdcall get_ModelPart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModelPart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelPart()); return S_OK; } catch (...) @@ -351,10 +375,11 @@ struct produce : produc } } - HRESULT __stdcall put_ModelPart(abi_arg_in value) noexcept override + HRESULT __stdcall put_ModelPart(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ModelPart(*reinterpret_cast(&value)); return S_OK; } @@ -364,11 +389,12 @@ struct produce : produc } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -378,10 +404,11 @@ struct produce : produc } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -391,11 +418,12 @@ struct produce : produc } } - HRESULT __stdcall get_Textures(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Textures(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Textures()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Textures()); return S_OK; } catch (...) @@ -405,11 +433,12 @@ struct produce : produc } } - HRESULT __stdcall abi_LoadModelFromPackageAsync(abi_arg_in value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LoadModelFromPackageAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LoadModelFromPackageAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadModelFromPackageAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -419,11 +448,12 @@ struct produce : produc } } - HRESULT __stdcall abi_SaveModelToPackageAsync(abi_arg_in value, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SaveModelToPackageAsync(impl::abi_arg_in value, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SaveModelToPackageAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveModelToPackageAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -437,11 +467,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_LoadAsync(abi_arg_in value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LoadAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LoadAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -455,11 +486,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -469,10 +501,11 @@ struct produce : prod } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -482,11 +515,12 @@ struct produce : prod } } - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -496,10 +530,11 @@ struct produce : prod } } - HRESULT __stdcall put_Color(abi_arg_in value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -513,11 +548,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Bases(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Bases(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Bases()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bases()); return S_OK; } catch (...) @@ -531,7 +567,8 @@ struct produce : { try { - *value = detach(this->shim().MaterialGroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupId()); return S_OK; } catch (...) @@ -544,11 +581,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(MaterialGroupId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(MaterialGroupId)); return S_OK; } catch (...) @@ -562,11 +600,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Abs(abi_arg_out value) noexcept override + HRESULT __stdcall get_Abs(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Abs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Abs()); return S_OK; } catch (...) @@ -576,11 +615,12 @@ struct produce } } - HRESULT __stdcall get_Pla(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pla(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pla()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pla()); return S_OK; } catch (...) @@ -598,7 +638,8 @@ struct produce : pro { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -611,6 +652,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(value); return S_OK; } @@ -624,11 +666,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -637,10 +680,11 @@ struct produce : pr } } - HRESULT __stdcall put_Color(abi_arg_in value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -654,11 +698,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Colors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Colors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Colors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Colors()); return S_OK; } catch (...) @@ -672,7 +717,8 @@ struct produce { try { - *value = detach(this->shim().MaterialGroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupId()); return S_OK; } catch (...) @@ -685,11 +731,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(MaterialGroupId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(MaterialGroupId)); return S_OK; } catch (...) @@ -703,11 +750,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Mesh(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mesh(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mesh()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mesh()); return S_OK; } catch (...) @@ -717,10 +765,11 @@ struct produce : produce } } - HRESULT __stdcall put_Mesh(abi_arg_in value) noexcept override + HRESULT __stdcall put_Mesh(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Mesh(*reinterpret_cast(&value)); return S_OK; } @@ -730,11 +779,12 @@ struct produce : produce } } - HRESULT __stdcall get_Components(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Components(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Components()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Components()); return S_OK; } catch (...) @@ -744,11 +794,12 @@ struct produce : produce } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -758,10 +809,11 @@ struct produce : produce } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -775,7 +827,8 @@ struct produce : produce { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -788,6 +841,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Type(value); return S_OK; } @@ -797,11 +851,12 @@ struct produce : produce } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -811,10 +866,11 @@ struct produce : produce } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -824,11 +880,12 @@ struct produce : produce } } - HRESULT __stdcall get_PartNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_PartNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PartNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PartNumber()); return S_OK; } catch (...) @@ -838,10 +895,11 @@ struct produce : produce } } - HRESULT __stdcall put_PartNumber(abi_arg_in value) noexcept override + HRESULT __stdcall put_PartNumber(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PartNumber(*reinterpret_cast(&value)); return S_OK; } @@ -855,11 +913,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Component(abi_arg_out value) noexcept override + HRESULT __stdcall get_Component(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Component()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Component()); return S_OK; } catch (...) @@ -869,10 +928,11 @@ struct produce } } - HRESULT __stdcall put_Component(abi_arg_in value) noexcept override + HRESULT __stdcall put_Component(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Component(*reinterpret_cast(&value)); return S_OK; } @@ -882,11 +942,12 @@ struct produce } } - HRESULT __stdcall get_Matrix(abi_arg_out value) noexcept override + HRESULT __stdcall get_Matrix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Matrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Matrix()); return S_OK; } catch (...) @@ -895,10 +956,11 @@ struct produce } } - HRESULT __stdcall put_Matrix(abi_arg_in value) noexcept override + HRESULT __stdcall put_Matrix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Matrix(*reinterpret_cast(&value)); return S_OK; } @@ -912,11 +974,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Values(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Values(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Values()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Values()); return S_OK; } catch (...) @@ -930,11 +993,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Composites(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Composites(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Composites()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Composites()); return S_OK; } catch (...) @@ -948,7 +1012,8 @@ struct produceshim().MaterialGroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupId()); return S_OK; } catch (...) @@ -957,11 +1022,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaterialIndices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaterialIndices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialIndices()); return S_OK; } catch (...) @@ -975,11 +1041,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_BaseMaterialGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_BaseMaterialGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BaseMaterialGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaseMaterialGroup()); return S_OK; } catch (...) @@ -989,10 +1056,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_BaseMaterialGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BaseMaterialGroup(*reinterpret_cast(&value)); return S_OK; } @@ -1006,11 +1074,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(MaterialGroupId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(MaterialGroupId)); return S_OK; } catch (...) @@ -1028,7 +1097,8 @@ struct produceshim().MaxReductionArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxReductionArea()); return S_OK; } catch (...) @@ -1041,6 +1111,7 @@ struct produceshim()); this->shim().MaxReductionArea(value); return S_OK; } @@ -1054,7 +1125,8 @@ struct produceshim().TargetTriangleCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetTriangleCount()); return S_OK; } catch (...) @@ -1067,6 +1139,7 @@ struct produceshim()); this->shim().TargetTriangleCount(value); return S_OK; } @@ -1080,7 +1153,8 @@ struct produceshim().MaxEdgeLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxEdgeLength()); return S_OK; } catch (...) @@ -1093,6 +1167,7 @@ struct produceshim()); this->shim().MaxEdgeLength(value); return S_OK; } @@ -1106,11 +1181,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_BaseGroups(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BaseGroups(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BaseGroups()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaseGroups()); return S_OK; } catch (...) @@ -1120,11 +1196,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ColorGroups(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ColorGroups(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ColorGroups()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorGroups()); return S_OK; } catch (...) @@ -1134,11 +1211,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Texture2CoordGroups(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Texture2CoordGroups(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Texture2CoordGroups()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Texture2CoordGroups()); return S_OK; } catch (...) @@ -1148,11 +1226,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CompositeGroups(abi_arg_out> value) noexcept override + HRESULT __stdcall get_CompositeGroups(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CompositeGroups()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositeGroups()); return S_OK; } catch (...) @@ -1162,11 +1241,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MultiplePropertyGroups(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MultiplePropertyGroups(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MultiplePropertyGroups()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MultiplePropertyGroups()); return S_OK; } catch (...) @@ -1184,7 +1264,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().VertexCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexCount()); return S_OK; } catch (...) @@ -1197,6 +1278,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().VertexCount(value); return S_OK; } @@ -1210,7 +1292,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IndexCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndexCount()); return S_OK; } catch (...) @@ -1223,6 +1306,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().IndexCount(value); return S_OK; } @@ -1232,11 +1316,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_VertexPositionsDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_VertexPositionsDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VertexPositionsDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexPositionsDescription()); return S_OK; } catch (...) @@ -1245,10 +1330,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_VertexPositionsDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_VertexPositionsDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VertexPositionsDescription(*reinterpret_cast(&value)); return S_OK; } @@ -1258,11 +1344,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_VertexNormalsDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_VertexNormalsDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VertexNormalsDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexNormalsDescription()); return S_OK; } catch (...) @@ -1271,10 +1358,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_VertexNormalsDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_VertexNormalsDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VertexNormalsDescription(*reinterpret_cast(&value)); return S_OK; } @@ -1284,11 +1372,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TriangleIndicesDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_TriangleIndicesDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TriangleIndicesDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriangleIndicesDescription()); return S_OK; } catch (...) @@ -1297,10 +1386,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TriangleIndicesDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_TriangleIndicesDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TriangleIndicesDescription(*reinterpret_cast(&value)); return S_OK; } @@ -1310,11 +1400,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TriangleMaterialIndicesDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_TriangleMaterialIndicesDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TriangleMaterialIndicesDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriangleMaterialIndicesDescription()); return S_OK; } catch (...) @@ -1323,10 +1414,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TriangleMaterialIndicesDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_TriangleMaterialIndicesDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TriangleMaterialIndicesDescription(*reinterpret_cast(&value)); return S_OK; } @@ -1336,11 +1428,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetVertexPositions(abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_GetVertexPositions(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().GetVertexPositions()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().GetVertexPositions()); return S_OK; } catch (...) @@ -1354,6 +1447,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CreateVertexPositions(value); return S_OK; } @@ -1363,11 +1457,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetVertexNormals(abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_GetVertexNormals(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().GetVertexNormals()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().GetVertexNormals()); return S_OK; } catch (...) @@ -1381,6 +1476,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CreateVertexNormals(value); return S_OK; } @@ -1390,11 +1486,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetTriangleIndices(abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_GetTriangleIndices(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().GetTriangleIndices()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().GetTriangleIndices()); return S_OK; } catch (...) @@ -1408,6 +1505,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CreateTriangleIndices(value); return S_OK; } @@ -1417,11 +1515,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetTriangleMaterialIndices(abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_GetTriangleMaterialIndices(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().GetTriangleMaterialIndices()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().GetTriangleMaterialIndices()); return S_OK; } catch (...) @@ -1435,6 +1534,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CreateTriangleMaterialIndices(value); return S_OK; } @@ -1444,11 +1544,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_BufferDescriptionSet(abi_arg_out value) noexcept override + HRESULT __stdcall get_BufferDescriptionSet(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BufferDescriptionSet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferDescriptionSet()); return S_OK; } catch (...) @@ -1458,11 +1559,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_BufferSet(abi_arg_out value) noexcept override + HRESULT __stdcall get_BufferSet(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BufferSet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferSet()); return S_OK; } catch (...) @@ -1472,11 +1574,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_VerifyAsync(Windows::Graphics::Printing3D::Printing3DMeshVerificationMode value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_VerifyAsync(Windows::Graphics::Printing3D::Printing3DMeshVerificationMode value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().VerifyAsync(value)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().VerifyAsync(value)); return S_OK; } catch (...) @@ -1494,7 +1597,8 @@ struct produceshim().IsValid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsValid()); return S_OK; } catch (...) @@ -1503,11 +1607,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_NonmanifoldTriangles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NonmanifoldTriangles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonmanifoldTriangles()); return S_OK; } catch (...) @@ -1517,11 +1622,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ReversedNormalTriangles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ReversedNormalTriangles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReversedNormalTriangles()); return S_OK; } catch (...) @@ -1539,7 +1645,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Unit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Unit()); return S_OK; } catch (...) @@ -1552,6 +1659,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Unit(value); return S_OK; } @@ -1561,11 +1669,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Textures(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Textures(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Textures()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Textures()); return S_OK; } catch (...) @@ -1575,11 +1684,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Meshes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Meshes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Meshes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Meshes()); return S_OK; } catch (...) @@ -1589,11 +1699,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Components(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Components(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Components()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Components()); return S_OK; } catch (...) @@ -1603,11 +1714,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Material(abi_arg_out value) noexcept override + HRESULT __stdcall get_Material(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Material()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Material()); return S_OK; } catch (...) @@ -1617,10 +1729,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Material(abi_arg_in value) noexcept override + HRESULT __stdcall put_Material(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Material(*reinterpret_cast(&value)); return S_OK; } @@ -1630,11 +1743,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Build(abi_arg_out value) noexcept override + HRESULT __stdcall get_Build(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Build()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Build()); return S_OK; } catch (...) @@ -1644,10 +1758,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Build(abi_arg_in value) noexcept override + HRESULT __stdcall put_Build(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Build(*reinterpret_cast(&value)); return S_OK; } @@ -1657,11 +1772,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Version(abi_arg_out value) noexcept override + HRESULT __stdcall get_Version(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Version()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Version()); return S_OK; } catch (...) @@ -1671,10 +1787,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Version(abi_arg_in value) noexcept override + HRESULT __stdcall put_Version(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Version(*reinterpret_cast(&value)); return S_OK; } @@ -1684,11 +1801,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_RequiredExtensions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RequiredExtensions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequiredExtensions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiredExtensions()); return S_OK; } catch (...) @@ -1698,11 +1816,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Metadata(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Metadata(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Metadata()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Metadata()); return S_OK; } catch (...) @@ -1712,11 +1831,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_RepairAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RepairAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RepairAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RepairAsync()); return S_OK; } catch (...) @@ -1726,11 +1846,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_Clone(abi_arg_out value) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -1744,11 +1865,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_TryPartialRepairAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryPartialRepairAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryPartialRepairAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryPartialRepairAsync()); return S_OK; } catch (...) @@ -1758,11 +1880,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryPartialRepairWithTimeAsync(abi_arg_in maxWaitTime, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryPartialRepairWithTimeAsync(impl::abi_arg_in maxWaitTime, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryPartialRepairAsync(*reinterpret_cast(&maxWaitTime))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryPartialRepairAsync(*reinterpret_cast(&maxWaitTime))); return S_OK; } catch (...) @@ -1772,11 +1895,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryReduceFacesAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryReduceFacesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryReduceFacesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryReduceFacesAsync()); return S_OK; } catch (...) @@ -1786,11 +1910,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryReduceFacesWithOptionsAsync(abi_arg_in printing3DFaceReductionOptions, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryReduceFacesWithOptionsAsync(impl::abi_arg_in printing3DFaceReductionOptions, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryReduceFacesAsync(*reinterpret_cast(&printing3DFaceReductionOptions))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryReduceFacesAsync(*reinterpret_cast(&printing3DFaceReductionOptions))); return S_OK; } catch (...) @@ -1800,11 +1925,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_TryReduceFacesWithOptionsAndTimeAsync(abi_arg_in printing3DFaceReductionOptions, abi_arg_in maxWait, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryReduceFacesWithOptionsAndTimeAsync(impl::abi_arg_in printing3DFaceReductionOptions, impl::abi_arg_in maxWait, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryReduceFacesAsync(*reinterpret_cast(&printing3DFaceReductionOptions), *reinterpret_cast(&maxWait))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryReduceFacesAsync(*reinterpret_cast(&printing3DFaceReductionOptions), *reinterpret_cast(&maxWait))); return S_OK; } catch (...) @@ -1814,11 +1940,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_RepairWithProgressAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RepairWithProgressAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RepairWithProgressAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RepairWithProgressAsync()); return S_OK; } catch (...) @@ -1832,11 +1959,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_TextureResource(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextureResource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextureResource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextureResource()); return S_OK; } catch (...) @@ -1846,10 +1974,11 @@ struct produce : prod } } - HRESULT __stdcall put_TextureResource(abi_arg_in value) noexcept override + HRESULT __stdcall put_TextureResource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextureResource(*reinterpret_cast(&value)); return S_OK; } @@ -1863,7 +1992,8 @@ struct produce : prod { try { - *value = detach(this->shim().TileStyleU()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileStyleU()); return S_OK; } catch (...) @@ -1876,6 +2006,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().TileStyleU(value); return S_OK; } @@ -1889,7 +2020,8 @@ struct produce : prod { try { - *value = detach(this->shim().TileStyleV()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileStyleV()); return S_OK; } catch (...) @@ -1902,6 +2034,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().TileStyleV(value); return S_OK; } @@ -1915,11 +2048,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_MaterialIndices(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MaterialIndices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaterialIndices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialIndices()); return S_OK; } catch (...) @@ -1933,11 +2067,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MultipleProperties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MultipleProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MultipleProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MultipleProperties()); return S_OK; } catch (...) @@ -1947,11 +2082,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaterialGroupIndices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaterialGroupIndices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupIndices()); return S_OK; } catch (...) @@ -1965,7 +2101,8 @@ struct produceshim().MaterialGroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupId()); return S_OK; } catch (...) @@ -1978,11 +2115,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(MaterialGroupId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(MaterialGroupId)); return S_OK; } catch (...) @@ -1996,11 +2134,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Texture(abi_arg_out value) noexcept override + HRESULT __stdcall get_Texture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Texture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Texture()); return S_OK; } catch (...) @@ -2010,10 +2149,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Texture(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Texture(*reinterpret_cast(&value)); return S_OK; } @@ -2027,7 +2167,8 @@ struct produceshim().U()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().U()); return S_OK; } catch (...) @@ -2040,6 +2181,7 @@ struct produceshim()); this->shim().U(value); return S_OK; } @@ -2053,7 +2195,8 @@ struct produceshim().V()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().V()); return S_OK; } catch (...) @@ -2066,6 +2209,7 @@ struct produceshim()); this->shim().V(value); return S_OK; } @@ -2079,11 +2223,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Texture2Coords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Texture2Coords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Texture2Coords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Texture2Coords()); return S_OK; } catch (...) @@ -2097,7 +2242,8 @@ struct produceshim().MaterialGroupId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaterialGroupId()); return S_OK; } catch (...) @@ -2110,11 +2256,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Texture(abi_arg_out value) noexcept override + HRESULT __stdcall get_Texture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Texture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Texture()); return S_OK; } catch (...) @@ -2124,10 +2271,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Texture(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Texture(*reinterpret_cast(&value)); return S_OK; } @@ -2141,11 +2289,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(uint32_t MaterialGroupId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(MaterialGroupId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(MaterialGroupId)); return S_OK; } catch (...) @@ -2159,11 +2308,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TextureData(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextureData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextureData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextureData()); return S_OK; } catch (...) @@ -2173,10 +2323,11 @@ struct produce : p } } - HRESULT __stdcall put_TextureData(abi_arg_in value) noexcept override + HRESULT __stdcall put_TextureData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextureData(*reinterpret_cast(&value)); return S_OK; } @@ -2186,11 +2337,12 @@ struct produce : p } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -2200,10 +2352,11 @@ struct produce : p } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -2221,52 +2374,52 @@ namespace Windows::Graphics::Printing3D { template Windows::Graphics::Printing3D::Print3DTaskCompletion impl_IPrint3DTaskCompletedEventArgs::Completion() const { Windows::Graphics::Printing3D::Print3DTaskCompletion value {}; - check_hresult(static_cast(static_cast(*this))->get_Completion(&value)); + check_hresult(WINRT_SHIM(IPrint3DTaskCompletedEventArgs)->get_Completion(&value)); return value; } template Windows::Graphics::Printing3D::Print3DTaskDetail impl_IPrint3DTaskCompletedEventArgs::ExtendedStatus() const { Windows::Graphics::Printing3D::Print3DTaskDetail value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(IPrint3DTaskCompletedEventArgs)->get_ExtendedStatus(&value)); return value; } template Windows::Graphics::Printing3D::Printing3D3MFPackage impl_IPrint3DTaskSourceChangedEventArgs::Source() const { Windows::Graphics::Printing3D::Printing3D3MFPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPrint3DTaskSourceChangedEventArgs)->get_Source(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3D3MFPackage impl_IPrint3DTask::Source() const { Windows::Graphics::Printing3D::Printing3D3MFPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPrint3DTask)->get_Source(put_abi(value))); return value; } -template event_token impl_IPrint3DTask::Submitting(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IPrint3DTask::Submitting(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Submitting(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->add_Submitting(get_abi(eventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IPrint3DTask::Submitting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IPrint3DTask::Submitting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Graphics::Printing3D::IPrint3DTask::remove_Submitting, Submitting(eventHandler)); } template void impl_IPrint3DTask::Submitting(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Submitting(eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->remove_Submitting(eventCookie)); } template event_token impl_IPrint3DTask::Completed(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->add_Completed(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -2277,13 +2430,13 @@ template event_revoker impl_IPrint3DTask::Complete template void impl_IPrint3DTask::Completed(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->remove_Completed(eventCookie)); } template event_token impl_IPrint3DTask::SourceChanged(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_SourceChanged(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->add_SourceChanged(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -2294,46 +2447,46 @@ template event_revoker impl_IPrint3DTask::SourceCh template void impl_IPrint3DTask::SourceChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceChanged(eventCookie)); + check_hresult(WINRT_SHIM(IPrint3DTask)->remove_SourceChanged(eventCookie)); } template void impl_IPrint3DTaskSourceRequestedArgs::SetSource(const Windows::Graphics::Printing3D::Printing3D3MFPackage & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(source))); + check_hresult(WINRT_SHIM(IPrint3DTaskSourceRequestedArgs)->abi_SetSource(get_abi(source))); } -template Windows::Graphics::Printing3D::Print3DTask impl_IPrint3DTaskRequest::CreateTask(hstring_ref title, hstring_ref printerId, const Windows::Graphics::Printing3D::Print3DTaskSourceRequestedHandler & handler) const +template Windows::Graphics::Printing3D::Print3DTask impl_IPrint3DTaskRequest::CreateTask(hstring_view title, hstring_view printerId, const Windows::Graphics::Printing3D::Print3DTaskSourceRequestedHandler & handler) const { Windows::Graphics::Printing3D::Print3DTask result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTask(get(title), get(printerId), get(handler), put(result))); + check_hresult(WINRT_SHIM(IPrint3DTaskRequest)->abi_CreateTask(get_abi(title), get_abi(printerId), get_abi(handler), put_abi(result))); return result; } template Windows::Graphics::Printing3D::Print3DTaskRequest impl_IPrint3DTaskRequestedEventArgs::Request() const { Windows::Graphics::Printing3D::Print3DTaskRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IPrint3DTaskRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Print3DManager impl_IPrint3DManagerStatics::GetForCurrentView() const { Windows::Graphics::Printing3D::Print3DManager result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(result))); + check_hresult(WINRT_SHIM(IPrint3DManagerStatics)->abi_GetForCurrentView(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPrint3DManagerStatics::ShowPrintUIAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ShowPrintUIAsync(put(result))); + check_hresult(WINRT_SHIM(IPrint3DManagerStatics)->abi_ShowPrintUIAsync(put_abi(result))); return result; } template event_token impl_IPrint3DManager::TaskRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TaskRequested(get(eventHandler), &token)); + check_hresult(WINRT_SHIM(IPrint3DManager)->add_TaskRequested(get_abi(eventHandler), &token)); return token; } @@ -2344,855 +2497,855 @@ template event_revoker impl_IPrint3DManager::Ta template void impl_IPrint3DManager::TaskRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TaskRequested(token)); + check_hresult(WINRT_SHIM(IPrint3DManager)->remove_TaskRequested(token)); } template uint32_t impl_IPrinting3DMesh::VertexCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexCount(&value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_VertexCount(&value)); return value; } template void impl_IPrinting3DMesh::VertexCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_VertexCount(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_VertexCount(value)); } template uint32_t impl_IPrinting3DMesh::IndexCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IndexCount(&value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_IndexCount(&value)); return value; } template void impl_IPrinting3DMesh::IndexCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IndexCount(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_IndexCount(value)); } template Windows::Graphics::Printing3D::Printing3DBufferDescription impl_IPrinting3DMesh::VertexPositionsDescription() const { Windows::Graphics::Printing3D::Printing3DBufferDescription value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexPositionsDescription(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_VertexPositionsDescription(put_abi(value))); return value; } template void impl_IPrinting3DMesh::VertexPositionsDescription(const Windows::Graphics::Printing3D::Printing3DBufferDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_VertexPositionsDescription(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_VertexPositionsDescription(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DBufferDescription impl_IPrinting3DMesh::VertexNormalsDescription() const { Windows::Graphics::Printing3D::Printing3DBufferDescription value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexNormalsDescription(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_VertexNormalsDescription(put_abi(value))); return value; } template void impl_IPrinting3DMesh::VertexNormalsDescription(const Windows::Graphics::Printing3D::Printing3DBufferDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_VertexNormalsDescription(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_VertexNormalsDescription(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DBufferDescription impl_IPrinting3DMesh::TriangleIndicesDescription() const { Windows::Graphics::Printing3D::Printing3DBufferDescription value {}; - check_hresult(static_cast(static_cast(*this))->get_TriangleIndicesDescription(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_TriangleIndicesDescription(put_abi(value))); return value; } template void impl_IPrinting3DMesh::TriangleIndicesDescription(const Windows::Graphics::Printing3D::Printing3DBufferDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_TriangleIndicesDescription(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_TriangleIndicesDescription(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DBufferDescription impl_IPrinting3DMesh::TriangleMaterialIndicesDescription() const { Windows::Graphics::Printing3D::Printing3DBufferDescription value {}; - check_hresult(static_cast(static_cast(*this))->get_TriangleMaterialIndicesDescription(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_TriangleMaterialIndicesDescription(put_abi(value))); return value; } template void impl_IPrinting3DMesh::TriangleMaterialIndicesDescription(const Windows::Graphics::Printing3D::Printing3DBufferDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_TriangleMaterialIndicesDescription(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->put_TriangleMaterialIndicesDescription(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_IPrinting3DMesh::GetVertexPositions() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_GetVertexPositions(put(buffer))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_GetVertexPositions(put_abi(buffer))); return buffer; } template void impl_IPrinting3DMesh::CreateVertexPositions(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_CreateVertexPositions(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_CreateVertexPositions(value)); } template Windows::Storage::Streams::IBuffer impl_IPrinting3DMesh::GetVertexNormals() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_GetVertexNormals(put(buffer))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_GetVertexNormals(put_abi(buffer))); return buffer; } template void impl_IPrinting3DMesh::CreateVertexNormals(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_CreateVertexNormals(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_CreateVertexNormals(value)); } template Windows::Storage::Streams::IBuffer impl_IPrinting3DMesh::GetTriangleIndices() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_GetTriangleIndices(put(buffer))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_GetTriangleIndices(put_abi(buffer))); return buffer; } template void impl_IPrinting3DMesh::CreateTriangleIndices(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_CreateTriangleIndices(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_CreateTriangleIndices(value)); } template Windows::Storage::Streams::IBuffer impl_IPrinting3DMesh::GetTriangleMaterialIndices() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_GetTriangleMaterialIndices(put(buffer))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_GetTriangleMaterialIndices(put_abi(buffer))); return buffer; } template void impl_IPrinting3DMesh::CreateTriangleMaterialIndices(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_CreateTriangleMaterialIndices(value)); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_CreateTriangleMaterialIndices(value)); } template Windows::Foundation::Collections::IPropertySet impl_IPrinting3DMesh::BufferDescriptionSet() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_BufferDescriptionSet(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_BufferDescriptionSet(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_IPrinting3DMesh::BufferSet() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_BufferSet(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->get_BufferSet(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPrinting3DMesh::VerifyAsync(Windows::Graphics::Printing3D::Printing3DMeshVerificationMode value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_VerifyAsync(value, put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DMesh)->abi_VerifyAsync(value, put_abi(operation))); return operation; } template Windows::Graphics::Printing3D::Printing3DTextureResource impl_IPrinting3DModelTexture::TextureResource() const { Windows::Graphics::Printing3D::Printing3DTextureResource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextureResource(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->get_TextureResource(put_abi(value))); return value; } template void impl_IPrinting3DModelTexture::TextureResource(const Windows::Graphics::Printing3D::Printing3DTextureResource & value) const { - check_hresult(static_cast(static_cast(*this))->put_TextureResource(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->put_TextureResource(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior impl_IPrinting3DModelTexture::TileStyleU() const { Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_TileStyleU(&value)); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->get_TileStyleU(&value)); return value; } template void impl_IPrinting3DModelTexture::TileStyleU(Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_TileStyleU(value)); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->put_TileStyleU(value)); } template Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior impl_IPrinting3DModelTexture::TileStyleV() const { Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_TileStyleV(&value)); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->get_TileStyleV(&value)); return value; } template void impl_IPrinting3DModelTexture::TileStyleV(Windows::Graphics::Printing3D::Printing3DTextureEdgeBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_TileStyleV(value)); + check_hresult(WINRT_SHIM(IPrinting3DModelTexture)->put_TileStyleV(value)); } template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_IPrinting3DTextureResource::TextureData() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType value; - check_hresult(static_cast(static_cast(*this))->get_TextureData(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DTextureResource)->get_TextureData(put_abi(value))); return value; } template void impl_IPrinting3DTextureResource::TextureData(const Windows::Storage::Streams::IRandomAccessStreamWithContentType & value) const { - check_hresult(static_cast(static_cast(*this))->put_TextureData(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DTextureResource)->put_TextureData(get_abi(value))); } template hstring impl_IPrinting3DTextureResource::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DTextureResource)->get_Name(put_abi(value))); return value; } -template void impl_IPrinting3DTextureResource::Name(hstring_ref value) const +template void impl_IPrinting3DTextureResource::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DTextureResource)->put_Name(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DComponent impl_IPrinting3DComponentWithMatrix::Component() const { Windows::Graphics::Printing3D::Printing3DComponent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Component(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponentWithMatrix)->get_Component(put_abi(value))); return value; } template void impl_IPrinting3DComponentWithMatrix::Component(const Windows::Graphics::Printing3D::Printing3DComponent & value) const { - check_hresult(static_cast(static_cast(*this))->put_Component(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponentWithMatrix)->put_Component(get_abi(value))); } template Windows::Foundation::Numerics::float4x4 impl_IPrinting3DComponentWithMatrix::Matrix() const { Windows::Foundation::Numerics::float4x4 value {}; - check_hresult(static_cast(static_cast(*this))->get_Matrix(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponentWithMatrix)->get_Matrix(put_abi(value))); return value; } template void impl_IPrinting3DComponentWithMatrix::Matrix(const Windows::Foundation::Numerics::float4x4 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Matrix(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponentWithMatrix)->put_Matrix(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DMesh impl_IPrinting3DComponent::Mesh() const { Windows::Graphics::Printing3D::Printing3DMesh value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Mesh(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_Mesh(put_abi(value))); return value; } template void impl_IPrinting3DComponent::Mesh(const Windows::Graphics::Printing3D::Printing3DMesh & value) const { - check_hresult(static_cast(static_cast(*this))->put_Mesh(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->put_Mesh(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IPrinting3DComponent::Components() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Components(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_Components(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3DTextureResource impl_IPrinting3DComponent::Thumbnail() const { Windows::Graphics::Printing3D::Printing3DTextureResource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_Thumbnail(put_abi(value))); return value; } template void impl_IPrinting3DComponent::Thumbnail(const Windows::Graphics::Printing3D::Printing3DTextureResource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->put_Thumbnail(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DObjectType impl_IPrinting3DComponent::Type() const { Windows::Graphics::Printing3D::Printing3DObjectType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_Type(&value)); return value; } template void impl_IPrinting3DComponent::Type(Windows::Graphics::Printing3D::Printing3DObjectType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->put_Type(value)); } template hstring impl_IPrinting3DComponent::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_Name(put_abi(value))); return value; } -template void impl_IPrinting3DComponent::Name(hstring_ref value) const +template void impl_IPrinting3DComponent::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->put_Name(get_abi(value))); } template hstring impl_IPrinting3DComponent::PartNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PartNumber(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->get_PartNumber(put_abi(value))); return value; } -template void impl_IPrinting3DComponent::PartNumber(hstring_ref value) const +template void impl_IPrinting3DComponent::PartNumber(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PartNumber(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DComponent)->put_PartNumber(get_abi(value))); } template hstring impl_IPrinting3DBaseMaterialStatics::Abs() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Abs(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterialStatics)->get_Abs(put_abi(value))); return value; } template hstring impl_IPrinting3DBaseMaterialStatics::Pla() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pla(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterialStatics)->get_Pla(put_abi(value))); return value; } template hstring impl_IPrinting3DBaseMaterial::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterial)->get_Name(put_abi(value))); return value; } -template void impl_IPrinting3DBaseMaterial::Name(hstring_ref value) const +template void impl_IPrinting3DBaseMaterial::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterial)->put_Name(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DColorMaterial impl_IPrinting3DBaseMaterial::Color() const { Windows::Graphics::Printing3D::Printing3DColorMaterial value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterial)->get_Color(put_abi(value))); return value; } template void impl_IPrinting3DBaseMaterial::Color(const Windows::Graphics::Printing3D::Printing3DColorMaterial & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterial)->put_Color(get_abi(value))); } template uint32_t impl_IPrinting3DColorMaterial::Value() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterial)->get_Value(&value)); return value; } template void impl_IPrinting3DColorMaterial::Value(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterial)->put_Value(value)); } template Windows::UI::Color impl_IPrinting3DColorMaterial2::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterial2)->get_Color(put_abi(value))); return value; } template void impl_IPrinting3DColorMaterial2::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterial2)->put_Color(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DModelTexture impl_IPrinting3DTexture2CoordMaterial::Texture() const { Windows::Graphics::Printing3D::Printing3DModelTexture value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Texture(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->get_Texture(put_abi(value))); return value; } template void impl_IPrinting3DTexture2CoordMaterial::Texture(const Windows::Graphics::Printing3D::Printing3DModelTexture & value) const { - check_hresult(static_cast(static_cast(*this))->put_Texture(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->put_Texture(get_abi(value))); } template double impl_IPrinting3DTexture2CoordMaterial::U() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_U(&value)); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->get_U(&value)); return value; } template void impl_IPrinting3DTexture2CoordMaterial::U(double value) const { - check_hresult(static_cast(static_cast(*this))->put_U(value)); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->put_U(value)); } template double impl_IPrinting3DTexture2CoordMaterial::V() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_V(&value)); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->get_V(&value)); return value; } template void impl_IPrinting3DTexture2CoordMaterial::V(double value) const { - check_hresult(static_cast(static_cast(*this))->put_V(value)); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterial)->put_V(value)); } template Windows::Foundation::Collections::IVector impl_IPrinting3DCompositeMaterial::Values() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Values(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterial)->get_Values(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMultiplePropertyMaterial::MaterialIndices() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MaterialIndices(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMultiplePropertyMaterial)->get_MaterialIndices(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup impl_IPrinting3DBaseMaterialGroupFactory::Create(uint32_t MaterialGroupId) const { Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(MaterialGroupId, put(result))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterialGroupFactory)->abi_Create(MaterialGroupId, put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IPrinting3DBaseMaterialGroup::Bases() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Bases(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterialGroup)->get_Bases(put_abi(value))); return value; } template uint32_t impl_IPrinting3DBaseMaterialGroup::MaterialGroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupId(&value)); + check_hresult(WINRT_SHIM(IPrinting3DBaseMaterialGroup)->get_MaterialGroupId(&value)); return value; } template Windows::Graphics::Printing3D::Printing3DColorMaterialGroup impl_IPrinting3DColorMaterialGroupFactory::Create(uint32_t MaterialGroupId) const { Windows::Graphics::Printing3D::Printing3DColorMaterialGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(MaterialGroupId, put(result))); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterialGroupFactory)->abi_Create(MaterialGroupId, put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IPrinting3DColorMaterialGroup::Colors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Colors(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterialGroup)->get_Colors(put_abi(value))); return value; } template uint32_t impl_IPrinting3DColorMaterialGroup::MaterialGroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupId(&value)); + check_hresult(WINRT_SHIM(IPrinting3DColorMaterialGroup)->get_MaterialGroupId(&value)); return value; } template Windows::Graphics::Printing3D::Printing3DTexture2CoordMaterialGroup impl_IPrinting3DTexture2CoordMaterialGroupFactory::Create(uint32_t MaterialGroupId) const { Windows::Graphics::Printing3D::Printing3DTexture2CoordMaterialGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(MaterialGroupId, put(result))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterialGroupFactory)->abi_Create(MaterialGroupId, put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IPrinting3DTexture2CoordMaterialGroup::Texture2Coords() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Texture2Coords(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterialGroup)->get_Texture2Coords(put_abi(value))); return value; } template uint32_t impl_IPrinting3DTexture2CoordMaterialGroup::MaterialGroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupId(&value)); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterialGroup)->get_MaterialGroupId(&value)); return value; } template Windows::Graphics::Printing3D::Printing3DModelTexture impl_IPrinting3DTexture2CoordMaterialGroup2::Texture() const { Windows::Graphics::Printing3D::Printing3DModelTexture value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Texture(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterialGroup2)->get_Texture(put_abi(value))); return value; } template void impl_IPrinting3DTexture2CoordMaterialGroup2::Texture(const Windows::Graphics::Printing3D::Printing3DModelTexture & value) const { - check_hresult(static_cast(static_cast(*this))->put_Texture(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DTexture2CoordMaterialGroup2)->put_Texture(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DCompositeMaterialGroup impl_IPrinting3DCompositeMaterialGroupFactory::Create(uint32_t MaterialGroupId) const { Windows::Graphics::Printing3D::Printing3DCompositeMaterialGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(MaterialGroupId, put(result))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroupFactory)->abi_Create(MaterialGroupId, put_abi(result))); return result; } template Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup impl_IPrinting3DCompositeMaterialGroup2::BaseMaterialGroup() const { Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BaseMaterialGroup(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroup2)->get_BaseMaterialGroup(put_abi(value))); return value; } template void impl_IPrinting3DCompositeMaterialGroup2::BaseMaterialGroup(const Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup & value) const { - check_hresult(static_cast(static_cast(*this))->put_BaseMaterialGroup(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroup2)->put_BaseMaterialGroup(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IPrinting3DCompositeMaterialGroup::Composites() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Composites(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroup)->get_Composites(put_abi(value))); return value; } template uint32_t impl_IPrinting3DCompositeMaterialGroup::MaterialGroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupId(&value)); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroup)->get_MaterialGroupId(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DCompositeMaterialGroup::MaterialIndices() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MaterialIndices(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DCompositeMaterialGroup)->get_MaterialIndices(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3DMultiplePropertyMaterialGroup impl_IPrinting3DMultiplePropertyMaterialGroupFactory::Create(uint32_t MaterialGroupId) const { Windows::Graphics::Printing3D::Printing3DMultiplePropertyMaterialGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(MaterialGroupId, put(result))); + check_hresult(WINRT_SHIM(IPrinting3DMultiplePropertyMaterialGroupFactory)->abi_Create(MaterialGroupId, put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMultiplePropertyMaterialGroup::MultipleProperties() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MultipleProperties(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMultiplePropertyMaterialGroup)->get_MultipleProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMultiplePropertyMaterialGroup::MaterialGroupIndices() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupIndices(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMultiplePropertyMaterialGroup)->get_MaterialGroupIndices(put_abi(value))); return value; } template uint32_t impl_IPrinting3DMultiplePropertyMaterialGroup::MaterialGroupId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaterialGroupId(&value)); + check_hresult(WINRT_SHIM(IPrinting3DMultiplePropertyMaterialGroup)->get_MaterialGroupId(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMaterial::BaseGroups() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_BaseGroups(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMaterial)->get_BaseGroups(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMaterial::ColorGroups() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ColorGroups(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMaterial)->get_ColorGroups(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMaterial::Texture2CoordGroups() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Texture2CoordGroups(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMaterial)->get_Texture2CoordGroups(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMaterial::CompositeGroups() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_CompositeGroups(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMaterial)->get_CompositeGroups(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DMaterial::MultiplePropertyGroups() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MultiplePropertyGroups(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMaterial)->get_MultiplePropertyGroups(put_abi(value))); return value; } template bool impl_IPrinting3DMeshVerificationResult::IsValid() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsValid(&value)); + check_hresult(WINRT_SHIM(IPrinting3DMeshVerificationResult)->get_IsValid(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IPrinting3DMeshVerificationResult::NonmanifoldTriangles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_NonmanifoldTriangles(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMeshVerificationResult)->get_NonmanifoldTriangles(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPrinting3DMeshVerificationResult::ReversedNormalTriangles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ReversedNormalTriangles(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DMeshVerificationResult)->get_ReversedNormalTriangles(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3DModelUnit impl_IPrinting3DModel::Unit() const { Windows::Graphics::Printing3D::Printing3DModelUnit value {}; - check_hresult(static_cast(static_cast(*this))->get_Unit(&value)); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Unit(&value)); return value; } template void impl_IPrinting3DModel::Unit(Windows::Graphics::Printing3D::Printing3DModelUnit value) const { - check_hresult(static_cast(static_cast(*this))->put_Unit(value)); + check_hresult(WINRT_SHIM(IPrinting3DModel)->put_Unit(value)); } template Windows::Foundation::Collections::IVector impl_IPrinting3DModel::Textures() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Textures(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Textures(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DModel::Meshes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Meshes(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Meshes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IPrinting3DModel::Components() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Components(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Components(put_abi(value))); return value; } template Windows::Graphics::Printing3D::Printing3DMaterial impl_IPrinting3DModel::Material() const { Windows::Graphics::Printing3D::Printing3DMaterial value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Material(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Material(put_abi(value))); return value; } template void impl_IPrinting3DModel::Material(const Windows::Graphics::Printing3D::Printing3DMaterial & value) const { - check_hresult(static_cast(static_cast(*this))->put_Material(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->put_Material(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DComponent impl_IPrinting3DModel::Build() const { Windows::Graphics::Printing3D::Printing3DComponent value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Build(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Build(put_abi(value))); return value; } template void impl_IPrinting3DModel::Build(const Windows::Graphics::Printing3D::Printing3DComponent & value) const { - check_hresult(static_cast(static_cast(*this))->put_Build(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->put_Build(get_abi(value))); } template hstring impl_IPrinting3DModel::Version() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Version(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Version(put_abi(value))); return value; } -template void impl_IPrinting3DModel::Version(hstring_ref value) const +template void impl_IPrinting3DModel::Version(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Version(get(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->put_Version(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IPrinting3DModel::RequiredExtensions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RequiredExtensions(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_RequiredExtensions(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IPrinting3DModel::Metadata() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Metadata(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->get_Metadata(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IPrinting3DModel::RepairAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RepairAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->abi_RepairAsync(put_abi(operation))); return operation; } template Windows::Graphics::Printing3D::Printing3DModel impl_IPrinting3DModel::Clone() const { Windows::Graphics::Printing3D::Printing3DModel value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(value))); + check_hresult(WINRT_SHIM(IPrinting3DModel)->abi_Clone(put_abi(value))); return value; } template double impl_IPrinting3DFaceReductionOptions::MaxReductionArea() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxReductionArea(&value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->get_MaxReductionArea(&value)); return value; } template void impl_IPrinting3DFaceReductionOptions::MaxReductionArea(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxReductionArea(value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->put_MaxReductionArea(value)); } template uint32_t impl_IPrinting3DFaceReductionOptions::TargetTriangleCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TargetTriangleCount(&value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->get_TargetTriangleCount(&value)); return value; } template void impl_IPrinting3DFaceReductionOptions::TargetTriangleCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetTriangleCount(value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->put_TargetTriangleCount(value)); } template double impl_IPrinting3DFaceReductionOptions::MaxEdgeLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxEdgeLength(&value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->get_MaxEdgeLength(&value)); return value; } template void impl_IPrinting3DFaceReductionOptions::MaxEdgeLength(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxEdgeLength(value)); + check_hresult(WINRT_SHIM(IPrinting3DFaceReductionOptions)->put_MaxEdgeLength(value)); } template Windows::Foundation::IAsyncOperation impl_IPrinting3DModel2::TryPartialRepairAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryPartialRepairAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_TryPartialRepairAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPrinting3DModel2::TryPartialRepairAsync(const Windows::Foundation::TimeSpan & maxWaitTime) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryPartialRepairWithTimeAsync(get(maxWaitTime), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_TryPartialRepairWithTimeAsync(get_abi(maxWaitTime), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPrinting3DModel2::TryReduceFacesAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_TryReduceFacesAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_TryReduceFacesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPrinting3DModel2::TryReduceFacesAsync(const Windows::Graphics::Printing3D::Printing3DFaceReductionOptions & printing3DFaceReductionOptions) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_TryReduceFacesWithOptionsAsync(get(printing3DFaceReductionOptions), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_TryReduceFacesWithOptionsAsync(get_abi(printing3DFaceReductionOptions), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPrinting3DModel2::TryReduceFacesAsync(const Windows::Graphics::Printing3D::Printing3DFaceReductionOptions & printing3DFaceReductionOptions, const Windows::Foundation::TimeSpan & maxWait) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_TryReduceFacesWithOptionsAndTimeAsync(get(printing3DFaceReductionOptions), get(maxWait), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_TryReduceFacesWithOptionsAndTimeAsync(get_abi(printing3DFaceReductionOptions), get_abi(maxWait), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPrinting3DModel2::RepairWithProgressAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RepairWithProgressAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrinting3DModel2)->abi_RepairWithProgressAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPrinting3D3MFPackageStatics::LoadAsync(const Windows::Storage::Streams::IRandomAccessStream & value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LoadAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackageStatics)->abi_LoadAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPrinting3D3MFPackage::SaveAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->abi_SaveAsync(put_abi(operation))); return operation; } template Windows::Storage::Streams::IRandomAccessStream impl_IPrinting3D3MFPackage::PrintTicket() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_PrintTicket(put(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->get_PrintTicket(put_abi(value))); return value; } template void impl_IPrinting3D3MFPackage::PrintTicket(const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_PrintTicket(get(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->put_PrintTicket(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStream impl_IPrinting3D3MFPackage::ModelPart() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_ModelPart(put(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->get_ModelPart(put_abi(value))); return value; } template void impl_IPrinting3D3MFPackage::ModelPart(const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_ModelPart(get(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->put_ModelPart(get_abi(value))); } template Windows::Graphics::Printing3D::Printing3DTextureResource impl_IPrinting3D3MFPackage::Thumbnail() const { Windows::Graphics::Printing3D::Printing3DTextureResource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->get_Thumbnail(put_abi(value))); return value; } template void impl_IPrinting3D3MFPackage::Thumbnail(const Windows::Graphics::Printing3D::Printing3DTextureResource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->put_Thumbnail(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IPrinting3D3MFPackage::Textures() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Textures(put(value))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->get_Textures(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPrinting3D3MFPackage::LoadModelFromPackageAsync(const Windows::Storage::Streams::IRandomAccessStream & value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LoadModelFromPackageAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->abi_LoadModelFromPackageAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IPrinting3D3MFPackage::SaveModelToPackageAsync(const Windows::Graphics::Printing3D::Printing3DModel & value) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveModelToPackageAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(IPrinting3D3MFPackage)->abi_SaveModelToPackageAsync(get_abi(value), put_abi(operation))); return operation; } @@ -3300,3 +3453,599 @@ inline Printing3DTextureResource::Printing3DTextureResource() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTaskRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTaskRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTaskSourceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrint3DTaskSourceRequestedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3D3MFPackage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3D3MFPackageStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DBaseMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DBaseMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DBaseMaterialGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DBaseMaterialStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DColorMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DColorMaterial2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DColorMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DColorMaterialGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DComponent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DComponentWithMatrix & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DCompositeMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DCompositeMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DCompositeMaterialGroup2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DCompositeMaterialGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DFaceReductionOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMesh & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMeshVerificationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DModel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DModel2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DModelTexture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMultiplePropertyMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMultiplePropertyMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DMultiplePropertyMaterialGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DTexture2CoordMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DTexture2CoordMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DTexture2CoordMaterialGroup2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DTexture2CoordMaterialGroupFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::IPrinting3DTextureResource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTask & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTaskCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTaskRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTaskRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTaskSourceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Print3DTaskSourceRequestedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3D3MFPackage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DBaseMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DBaseMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DColorMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DColorMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DComponent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DComponentWithMatrix & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DCompositeMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DCompositeMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DFaceReductionOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DMesh & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DMeshVerificationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DModel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DModelTexture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DMultiplePropertyMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DMultiplePropertyMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DTexture2CoordMaterial & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DTexture2CoordMaterialGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Graphics::Printing3D::Printing3DTextureResource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Management.Core.h b/10.0.14393.0/winrt/Windows.Management.Core.h index 83f730c57..b15959756 100644 --- a/10.0.14393.0/winrt/Windows.Management.Core.h +++ b/10.0.14393.0/winrt/Windows.Management.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Management.Core.3.h" @@ -17,11 +20,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateForPackageFamily(abi_arg_in packageFamilyName, abi_arg_out applicationData) noexcept override + HRESULT __stdcall abi_CreateForPackageFamily(impl::abi_arg_in packageFamilyName, impl::abi_arg_out applicationData) noexcept override { try { - *applicationData = detach(this->shim().CreateForPackageFamily(*reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *applicationData = detach_abi(this->shim().CreateForPackageFamily(*reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -36,14 +40,14 @@ struct produce : p namespace Windows::Management::Core { -template Windows::Storage::ApplicationData impl_IApplicationDataManagerStatics::CreateForPackageFamily(hstring_ref packageFamilyName) const +template Windows::Storage::ApplicationData impl_IApplicationDataManagerStatics::CreateForPackageFamily(hstring_view packageFamilyName) const { Windows::Storage::ApplicationData applicationData { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateForPackageFamily(get(packageFamilyName), put(applicationData))); + check_hresult(WINRT_SHIM(IApplicationDataManagerStatics)->abi_CreateForPackageFamily(get_abi(packageFamilyName), put_abi(applicationData))); return applicationData; } -inline Windows::Storage::ApplicationData ApplicationDataManager::CreateForPackageFamily(hstring_ref packageFamilyName) +inline Windows::Storage::ApplicationData ApplicationDataManager::CreateForPackageFamily(hstring_view packageFamilyName) { return get_activation_factory().CreateForPackageFamily(packageFamilyName); } @@ -51,3 +55,32 @@ inline Windows::Storage::ApplicationData ApplicationDataManager::CreateForPackag } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Core::IApplicationDataManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Core::IApplicationDataManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Core::ApplicationDataManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Management.Deployment.Preview.h b/10.0.14393.0/winrt/Windows.Management.Deployment.Preview.h index 9e11bcea7..3736b58d1 100644 --- a/10.0.14393.0/winrt/Windows.Management.Deployment.Preview.h +++ b/10.0.14393.0/winrt/Windows.Management.Deployment.Preview.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Management.Deployment.Preview.3.h" #include "Windows.Management.Deployment.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_FindInstalledApp(abi_arg_in appUninstallKey, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FindInstalledApp(impl::abi_arg_in appUninstallKey, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FindInstalledApp(*reinterpret_cast(&appUninstallKey))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindInstalledApp(*reinterpret_cast(&appUninstallKey))); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplayVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayVersion()); return S_OK; } catch (...) @@ -67,25 +73,25 @@ namespace Windows::Management::Deployment::Preview { template hstring impl_IInstalledClassicAppInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IInstalledClassicAppInfo)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IInstalledClassicAppInfo::DisplayVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayVersion(put(value))); + check_hresult(WINRT_SHIM(IInstalledClassicAppInfo)->get_DisplayVersion(put_abi(value))); return value; } -template Windows::Management::Deployment::Preview::InstalledClassicAppInfo impl_IClassicAppManagerStatics::FindInstalledApp(hstring_ref appUninstallKey) const +template Windows::Management::Deployment::Preview::InstalledClassicAppInfo impl_IClassicAppManagerStatics::FindInstalledApp(hstring_view appUninstallKey) const { Windows::Management::Deployment::Preview::InstalledClassicAppInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindInstalledApp(get(appUninstallKey), put(result))); + check_hresult(WINRT_SHIM(IClassicAppManagerStatics)->abi_FindInstalledApp(get_abi(appUninstallKey), put_abi(result))); return result; } -inline Windows::Management::Deployment::Preview::InstalledClassicAppInfo ClassicAppManager::FindInstalledApp(hstring_ref appUninstallKey) +inline Windows::Management::Deployment::Preview::InstalledClassicAppInfo ClassicAppManager::FindInstalledApp(hstring_view appUninstallKey) { return get_activation_factory().FindInstalledApp(appUninstallKey); } @@ -93,3 +99,32 @@ inline Windows::Management::Deployment::Preview::InstalledClassicAppInfo Classic } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::Preview::IClassicAppManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::Preview::IInstalledClassicAppInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::Preview::InstalledClassicAppInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Management.Deployment.h b/10.0.14393.0/winrt/Windows.Management.Deployment.h index e817f721f..04715f06c 100644 --- a/10.0.14393.0/winrt/Windows.Management.Deployment.h +++ b/10.0.14393.0/winrt/Windows.Management.Deployment.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.ApplicationModel.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ErrorText(abi_arg_out value) noexcept override + HRESULT __stdcall get_ErrorText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorText()); return S_OK; } catch (...) @@ -33,7 +37,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ActivityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityId()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ExtendedErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedErrorCode()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_AddPackageAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_AddPackageAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().AddPackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().AddPackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_UpdatePackageAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_UpdatePackageAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().UpdatePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().UpdatePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_RemovePackageAsync(abi_arg_in packageFullName, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RemovePackageAsync(impl::abi_arg_in packageFullName, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StagePackageAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_StagePackageAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris))); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_RegisterPackageAsync(abi_arg_in manifestUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RegisterPackageAsync(impl::abi_arg_in manifestUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackages(abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackages(impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages()); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackagesByUserSecurityId(abi_arg_in userSecurityId, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityId(impl::abi_arg_in userSecurityId, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId))); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackagesByNamePublisher(abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByNamePublisher(impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisher(abi_arg_in userSecurityId, abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisher(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindUsers(abi_arg_in packageFullName, abi_arg_out> users) noexcept override + HRESULT __stdcall abi_FindUsers(impl::abi_arg_in packageFullName, impl::abi_arg_out> users) noexcept override { try { - *users = detach(this->shim().FindUsers(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *users = detach_abi(this->shim().FindUsers(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -199,10 +215,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetPackageState(abi_arg_in packageFullName, Windows::Management::Deployment::PackageState packageState) noexcept override + HRESULT __stdcall abi_SetPackageState(impl::abi_arg_in packageFullName, Windows::Management::Deployment::PackageState packageState) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPackageState(*reinterpret_cast(&packageFullName), packageState); return S_OK; } @@ -212,11 +229,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackageByPackageFullName(abi_arg_in packageFullName, abi_arg_out packageInformation) noexcept override + HRESULT __stdcall abi_FindPackageByPackageFullName(impl::abi_arg_in packageFullName, impl::abi_arg_out packageInformation) noexcept override { try { - *packageInformation = detach(this->shim().FindPackage(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *packageInformation = detach_abi(this->shim().FindPackage(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -226,11 +244,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CleanupPackageForUserAsync(abi_arg_in packageName, abi_arg_in userSecurityId, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_CleanupPackageForUserAsync(impl::abi_arg_in packageName, impl::abi_arg_in userSecurityId, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().CleanupPackageForUserAsync(*reinterpret_cast(&packageName), *reinterpret_cast(&userSecurityId))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().CleanupPackageForUserAsync(*reinterpret_cast(&packageName), *reinterpret_cast(&userSecurityId))); return S_OK; } catch (...) @@ -240,11 +259,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackagesByPackageFamilyName(abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByPackageFamilyName(impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages(*reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages(*reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -254,11 +274,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyName(abi_arg_in userSecurityId, abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyName(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -268,11 +289,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FindPackageByUserSecurityIdPackageFullName(abi_arg_in userSecurityId, abi_arg_in packageFullName, abi_arg_out packageInformation) noexcept override + HRESULT __stdcall abi_FindPackageByUserSecurityIdPackageFullName(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageFullName, impl::abi_arg_out packageInformation) noexcept override { try { - *packageInformation = detach(this->shim().FindPackageForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *packageInformation = detach_abi(this->shim().FindPackageForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -286,11 +308,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_RemovePackageWithOptionsAsync(abi_arg_in packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RemovePackageWithOptionsAsync(impl::abi_arg_in packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName), removalOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName), removalOptions)); return S_OK; } catch (...) @@ -300,11 +323,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_StagePackageWithOptionsAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_StagePackageWithOptionsAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); return S_OK; } catch (...) @@ -314,11 +338,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RegisterPackageByFullNameAsync(abi_arg_in mainPackageFullName, abi_arg_in> dependencyPackageFullNames, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RegisterPackageByFullNameAsync(impl::abi_arg_in mainPackageFullName, impl::abi_arg_in> dependencyPackageFullNames, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RegisterPackageByFullNameAsync(*reinterpret_cast(&mainPackageFullName), *reinterpret_cast *>(&dependencyPackageFullNames), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RegisterPackageByFullNameAsync(*reinterpret_cast(&mainPackageFullName), *reinterpret_cast *>(&dependencyPackageFullNames), deploymentOptions)); return S_OK; } catch (...) @@ -328,11 +353,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(packageTypes)); return S_OK; } catch (...) @@ -342,11 +368,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdWithPackageTypes(abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdWithPackageTypes(impl::abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes)); return S_OK; } catch (...) @@ -356,11 +383,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesByNamePublisherWithPackageTypes(abi_arg_in packageName, abi_arg_in packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByNamePublisherWithPackageTypes(impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher), packageTypes)); return S_OK; } catch (...) @@ -370,11 +398,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(abi_arg_in userSecurityId, abi_arg_in packageName, abi_arg_in packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher), packageTypes)); return S_OK; } catch (...) @@ -384,11 +413,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesByPackageFamilyNameWithPackageTypes(abi_arg_in packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByPackageFamilyNameWithPackageTypes(impl::abi_arg_in packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(*reinterpret_cast(&packageFamilyName), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(*reinterpret_cast(&packageFamilyName), packageTypes)); return S_OK; } catch (...) @@ -398,11 +428,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(abi_arg_in userSecurityId, abi_arg_in packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName), packageTypes)); return S_OK; } catch (...) @@ -412,11 +443,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_StageUserDataAsync(abi_arg_in packageFullName, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_StageUserDataAsync(impl::abi_arg_in packageFullName, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().StageUserDataAsync(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().StageUserDataAsync(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -430,11 +462,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_AddPackageVolumeAsync(abi_arg_in packageStorePath, abi_arg_out> packageVolume) noexcept override + HRESULT __stdcall abi_AddPackageVolumeAsync(impl::abi_arg_in packageStorePath, impl::abi_arg_out> packageVolume) noexcept override { try { - *packageVolume = detach(this->shim().AddPackageVolumeAsync(*reinterpret_cast(&packageStorePath))); + typename D::abi_guard guard(this->shim()); + *packageVolume = detach_abi(this->shim().AddPackageVolumeAsync(*reinterpret_cast(&packageStorePath))); return S_OK; } catch (...) @@ -444,11 +477,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_AddPackageToVolumeAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_in targetVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_AddPackageToVolumeAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_in targetVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().AddPackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&targetVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().AddPackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&targetVolume))); return S_OK; } catch (...) @@ -458,10 +492,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_ClearPackageStatus(abi_arg_in packageFullName, Windows::Management::Deployment::PackageStatus status) noexcept override + HRESULT __stdcall abi_ClearPackageStatus(impl::abi_arg_in packageFullName, Windows::Management::Deployment::PackageStatus status) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearPackageStatus(*reinterpret_cast(&packageFullName), status); return S_OK; } @@ -471,11 +506,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RegisterPackageWithAppDataVolumeAsync(abi_arg_in manifestUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_in appDataVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RegisterPackageWithAppDataVolumeAsync(impl::abi_arg_in manifestUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_in appDataVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&appDataVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&appDataVolume))); return S_OK; } catch (...) @@ -485,11 +521,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackageVolumeByName(abi_arg_in volumeName, abi_arg_out volume) noexcept override + HRESULT __stdcall abi_FindPackageVolumeByName(impl::abi_arg_in volumeName, impl::abi_arg_out volume) noexcept override { try { - *volume = detach(this->shim().FindPackageVolume(*reinterpret_cast(&volumeName))); + typename D::abi_guard guard(this->shim()); + *volume = detach_abi(this->shim().FindPackageVolume(*reinterpret_cast(&volumeName))); return S_OK; } catch (...) @@ -499,11 +536,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindPackageVolumes(abi_arg_out> volumeCollection) noexcept override + HRESULT __stdcall abi_FindPackageVolumes(impl::abi_arg_out> volumeCollection) noexcept override { try { - *volumeCollection = detach(this->shim().FindPackageVolumes()); + typename D::abi_guard guard(this->shim()); + *volumeCollection = detach_abi(this->shim().FindPackageVolumes()); return S_OK; } catch (...) @@ -513,11 +551,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDefaultPackageVolume(abi_arg_out volume) noexcept override + HRESULT __stdcall abi_GetDefaultPackageVolume(impl::abi_arg_out volume) noexcept override { try { - *volume = detach(this->shim().GetDefaultPackageVolume()); + typename D::abi_guard guard(this->shim()); + *volume = detach_abi(this->shim().GetDefaultPackageVolume()); return S_OK; } catch (...) @@ -527,11 +566,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_MovePackageToVolumeAsync(abi_arg_in packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_in targetVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_MovePackageToVolumeAsync(impl::abi_arg_in packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_in targetVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().MovePackageToVolumeAsync(*reinterpret_cast(&packageFullName), deploymentOptions, *reinterpret_cast(&targetVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().MovePackageToVolumeAsync(*reinterpret_cast(&packageFullName), deploymentOptions, *reinterpret_cast(&targetVolume))); return S_OK; } catch (...) @@ -541,11 +581,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_RemovePackageVolumeAsync(abi_arg_in volume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_RemovePackageVolumeAsync(impl::abi_arg_in volume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().RemovePackageVolumeAsync(*reinterpret_cast(&volume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().RemovePackageVolumeAsync(*reinterpret_cast(&volume))); return S_OK; } catch (...) @@ -555,10 +596,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetDefaultPackageVolume(abi_arg_in volume) noexcept override + HRESULT __stdcall abi_SetDefaultPackageVolume(impl::abi_arg_in volume) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultPackageVolume(*reinterpret_cast(&volume)); return S_OK; } @@ -568,10 +610,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetPackageStatus(abi_arg_in packageFullName, Windows::Management::Deployment::PackageStatus status) noexcept override + HRESULT __stdcall abi_SetPackageStatus(impl::abi_arg_in packageFullName, Windows::Management::Deployment::PackageStatus status) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPackageStatus(*reinterpret_cast(&packageFullName), status); return S_OK; } @@ -581,11 +624,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetPackageVolumeOfflineAsync(abi_arg_in packageVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_SetPackageVolumeOfflineAsync(impl::abi_arg_in packageVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().SetPackageVolumeOfflineAsync(*reinterpret_cast(&packageVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().SetPackageVolumeOfflineAsync(*reinterpret_cast(&packageVolume))); return S_OK; } catch (...) @@ -595,11 +639,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetPackageVolumeOnlineAsync(abi_arg_in packageVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_SetPackageVolumeOnlineAsync(impl::abi_arg_in packageVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().SetPackageVolumeOnlineAsync(*reinterpret_cast(&packageVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().SetPackageVolumeOnlineAsync(*reinterpret_cast(&packageVolume))); return S_OK; } catch (...) @@ -609,11 +654,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_StagePackageToVolumeAsync(abi_arg_in packageUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_in targetVolume, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_StagePackageToVolumeAsync(impl::abi_arg_in packageUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_in targetVolume, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&targetVolume))); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().StagePackageAsync(*reinterpret_cast(&packageUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions, *reinterpret_cast(&targetVolume))); return S_OK; } catch (...) @@ -623,11 +669,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_StageUserDataWithOptionsAsync(abi_arg_in packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> deploymentOperation) noexcept override + HRESULT __stdcall abi_StageUserDataWithOptionsAsync(impl::abi_arg_in packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> deploymentOperation) noexcept override { try { - *deploymentOperation = detach(this->shim().StageUserDataAsync(*reinterpret_cast(&packageFullName), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *deploymentOperation = detach_abi(this->shim().StageUserDataAsync(*reinterpret_cast(&packageFullName), deploymentOptions)); return S_OK; } catch (...) @@ -641,11 +688,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetPackageVolumesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetPackageVolumesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetPackageVolumesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPackageVolumesAsync()); return S_OK; } catch (...) @@ -659,11 +707,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_UserSecurityId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserSecurityId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserSecurityId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserSecurityId()); return S_OK; } catch (...) @@ -677,7 +726,8 @@ struct produce : pr { try { - *value = detach(this->shim().InstallState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallState()); return S_OK; } catch (...) @@ -694,7 +744,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsOffline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOffline()); return S_OK; } catch (...) @@ -707,7 +758,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsSystemVolume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSystemVolume()); return S_OK; } catch (...) @@ -716,11 +768,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MountPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_MountPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MountPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MountPoint()); return S_OK; } catch (...) @@ -730,11 +783,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -744,11 +798,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_PackageStorePath(abi_arg_out value) noexcept override + HRESULT __stdcall get_PackageStorePath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PackageStorePath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PackageStorePath()); return S_OK; } catch (...) @@ -762,7 +817,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().SupportsHardLinks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsHardLinks()); return S_OK; } catch (...) @@ -771,11 +827,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackages(abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackages(impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages()); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages()); return S_OK; } catch (...) @@ -785,11 +842,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByNamePublisher(abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByNamePublisher(impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -799,11 +857,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByPackageFamilyName(abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByPackageFamilyName(impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackages(*reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackages(*reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -813,11 +872,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(packageTypes)); return S_OK; } catch (...) @@ -827,11 +887,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByNamePublisherWithPackagesTypes(Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByNamePublisherWithPackagesTypes(Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(packageTypes, *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(packageTypes, *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -841,11 +902,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByPackageFamilyNameWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByPackageFamilyNameWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesWithPackageTypes(packageTypes, *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesWithPackageTypes(packageTypes, *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -855,11 +917,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackageByPackageFullName(abi_arg_in packageFullName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackageByPackageFullName(impl::abi_arg_in packageFullName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackage(*reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackage(*reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -869,11 +932,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityId(abi_arg_in userSecurityId, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityId(impl::abi_arg_in userSecurityId, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId))); return S_OK; } catch (...) @@ -883,11 +947,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisher(abi_arg_in userSecurityId, abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisher(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -897,11 +962,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyName(abi_arg_in userSecurityId, abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyName(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -911,11 +977,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdWithPackageTypes(abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdWithPackageTypes(impl::abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes)); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes)); return S_OK; } catch (...) @@ -925,11 +992,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_in packageName, abi_arg_in packagePublisher, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(impl::abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes, *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes, *reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -939,11 +1007,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, abi_arg_in packageFamilyName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(impl::abi_arg_in userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes, *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackagesForUserWithPackageTypes(*reinterpret_cast(&userSecurityId), packageTypes, *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -953,11 +1022,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindPackageByUserSecurityIdPackageFullName(abi_arg_in userSecurityId, abi_arg_in packageFullName, abi_arg_out> packageCollection) noexcept override + HRESULT __stdcall abi_FindPackageByUserSecurityIdPackageFullName(impl::abi_arg_in userSecurityId, impl::abi_arg_in packageFullName, impl::abi_arg_out> packageCollection) noexcept override { try { - *packageCollection = detach(this->shim().FindPackageForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFullName))); + typename D::abi_guard guard(this->shim()); + *packageCollection = detach_abi(this->shim().FindPackageForUser(*reinterpret_cast(&userSecurityId), *reinterpret_cast(&packageFullName))); return S_OK; } catch (...) @@ -975,7 +1045,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsFullTrustPackageSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullTrustPackageSupported()); return S_OK; } catch (...) @@ -988,7 +1059,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsAppxInstallSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAppxInstallSupported()); return S_OK; } catch (...) @@ -997,11 +1069,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetAvailableSpaceAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAvailableSpaceAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAvailableSpaceAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAvailableSpaceAsync()); return S_OK; } catch (...) @@ -1019,482 +1092,482 @@ namespace Windows::Management::Deployment { template hstring impl_IDeploymentResult::ErrorText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ErrorText(put(value))); + check_hresult(WINRT_SHIM(IDeploymentResult)->get_ErrorText(put_abi(value))); return value; } template GUID impl_IDeploymentResult::ActivityId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityId(&value)); + check_hresult(WINRT_SHIM(IDeploymentResult)->get_ActivityId(&value)); return value; } template HRESULT impl_IDeploymentResult::ExtendedErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedErrorCode(&value)); + check_hresult(WINRT_SHIM(IDeploymentResult)->get_ExtendedErrorCode(&value)); return value; } template hstring impl_IPackageUserInformation::UserSecurityId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserSecurityId(put(value))); + check_hresult(WINRT_SHIM(IPackageUserInformation)->get_UserSecurityId(put_abi(value))); return value; } template Windows::Management::Deployment::PackageInstallState impl_IPackageUserInformation::InstallState() const { Windows::Management::Deployment::PackageInstallState value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallState(&value)); + check_hresult(WINRT_SHIM(IPackageUserInformation)->get_InstallState(&value)); return value; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::AddPackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::AddPackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_AddPackageAsync(get(packageUri), get(dependencyPackageUris), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_AddPackageAsync(get_abi(packageUri), get_abi(dependencyPackageUris), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::UpdatePackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::UpdatePackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_UpdatePackageAsync(get(packageUri), get(dependencyPackageUris), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_UpdatePackageAsync(get_abi(packageUri), get_abi(dependencyPackageUris), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::RemovePackageAsync(hstring_ref packageFullName) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::RemovePackageAsync(hstring_view packageFullName) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RemovePackageAsync(get(packageFullName), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_RemovePackageAsync(get_abi(packageFullName), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::StagePackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::StagePackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_StagePackageAsync(get(packageUri), get(dependencyPackageUris), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_StagePackageAsync(get_abi(packageUri), get_abi(dependencyPackageUris), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RegisterPackageAsync(get(manifestUri), get(dependencyPackageUris), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_RegisterPackageAsync(get_abi(manifestUri), get_abi(dependencyPackageUris), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackages() const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackages(put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackages(put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_ref userSecurityId) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_view userSecurityId) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityId(get(userSecurityId), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackagesByUserSecurityId(get_abi(userSecurityId), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackages(hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackages(hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByNamePublisher(get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackagesByNamePublisher(get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_ref userSecurityId, hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_view userSecurityId, hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdNamePublisher(get(userSecurityId), get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackagesByUserSecurityIdNamePublisher(get_abi(userSecurityId), get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindUsers(hstring_ref packageFullName) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindUsers(hstring_view packageFullName) const { Windows::Foundation::Collections::IIterable users; - check_hresult(static_cast(static_cast(*this))->abi_FindUsers(get(packageFullName), put(users))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindUsers(get_abi(packageFullName), put_abi(users))); return users; } -template void impl_IPackageManager::SetPackageState(hstring_ref packageFullName, Windows::Management::Deployment::PackageState packageState) const +template void impl_IPackageManager::SetPackageState(hstring_view packageFullName, Windows::Management::Deployment::PackageState packageState) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPackageState(get(packageFullName), packageState)); + check_hresult(WINRT_SHIM(IPackageManager)->abi_SetPackageState(get_abi(packageFullName), packageState)); } -template Windows::ApplicationModel::Package impl_IPackageManager::FindPackage(hstring_ref packageFullName) const +template Windows::ApplicationModel::Package impl_IPackageManager::FindPackage(hstring_view packageFullName) const { Windows::ApplicationModel::Package packageInformation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageByPackageFullName(get(packageFullName), put(packageInformation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackageByPackageFullName(get_abi(packageFullName), put_abi(packageInformation))); return packageInformation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::CleanupPackageForUserAsync(hstring_ref packageName, hstring_ref userSecurityId) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager::CleanupPackageForUserAsync(hstring_view packageName, hstring_view userSecurityId) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_CleanupPackageForUserAsync(get(packageName), get(userSecurityId), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_CleanupPackageForUserAsync(get_abi(packageName), get_abi(userSecurityId), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackages(hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackages(hstring_view packageFamilyName) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByPackageFamilyName(get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackagesByPackageFamilyName(get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_ref userSecurityId, hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager::FindPackagesForUser(hstring_view userSecurityId, hstring_view packageFamilyName) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdPackageFamilyName(get(userSecurityId), get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackagesByUserSecurityIdPackageFamilyName(get_abi(userSecurityId), get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } -template Windows::ApplicationModel::Package impl_IPackageManager::FindPackageForUser(hstring_ref userSecurityId, hstring_ref packageFullName) const +template Windows::ApplicationModel::Package impl_IPackageManager::FindPackageForUser(hstring_view userSecurityId, hstring_view packageFullName) const { Windows::ApplicationModel::Package packageInformation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageByUserSecurityIdPackageFullName(get(userSecurityId), get(packageFullName), put(packageInformation))); + check_hresult(WINRT_SHIM(IPackageManager)->abi_FindPackageByUserSecurityIdPackageFullName(get_abi(userSecurityId), get_abi(packageFullName), put_abi(packageInformation))); return packageInformation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::RemovePackageAsync(hstring_ref packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::RemovePackageAsync(hstring_view packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RemovePackageWithOptionsAsync(get(packageFullName), removalOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_RemovePackageWithOptionsAsync(get_abi(packageFullName), removalOptions, put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::StagePackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::StagePackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_StagePackageWithOptionsAsync(get(packageUri), get(dependencyPackageUris), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_StagePackageWithOptionsAsync(get_abi(packageUri), get_abi(dependencyPackageUris), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::RegisterPackageByFullNameAsync(hstring_ref mainPackageFullName, const Windows::Foundation::Collections::IIterable & dependencyPackageFullNames, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::RegisterPackageByFullNameAsync(hstring_view mainPackageFullName, iterable dependencyPackageFullNames, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RegisterPackageByFullNameAsync(get(mainPackageFullName), get(dependencyPackageFullNames), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_RegisterPackageByFullNameAsync(get_abi(mainPackageFullName), get_abi(dependencyPackageFullNames), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesWithPackageTypes(packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesWithPackageTypes(packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdWithPackageTypes(get(userSecurityId), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesByUserSecurityIdWithPackageTypes(get_abi(userSecurityId), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesWithPackageTypes(hstring_ref packageName, hstring_ref packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesWithPackageTypes(hstring_view packageName, hstring_view packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByNamePublisherWithPackageTypes(get(packageName), get(packagePublisher), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesByNamePublisherWithPackageTypes(get_abi(packageName), get_abi(packagePublisher), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, hstring_ref packageName, hstring_ref packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, hstring_view packageName, hstring_view packagePublisher, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(get(userSecurityId), get(packageName), get(packagePublisher), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(get_abi(userSecurityId), get_abi(packageName), get_abi(packagePublisher), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesWithPackageTypes(hstring_ref packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesWithPackageTypes(hstring_view packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByPackageFamilyNameWithPackageTypes(get(packageFamilyName), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesByPackageFamilyNameWithPackageTypes(get_abi(packageFamilyName), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, hstring_ref packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IIterable impl_IPackageManager2::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, hstring_view packageFamilyName, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IIterable packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(get(userSecurityId), get(packageFamilyName), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(get_abi(userSecurityId), get_abi(packageFamilyName), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::StageUserDataAsync(hstring_ref packageFullName) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager2::StageUserDataAsync(hstring_view packageFullName) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_StageUserDataAsync(get(packageFullName), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager2)->abi_StageUserDataAsync(get_abi(packageFullName), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperation impl_IPackageManager3::AddPackageVolumeAsync(hstring_ref packageStorePath) const +template Windows::Foundation::IAsyncOperation impl_IPackageManager3::AddPackageVolumeAsync(hstring_view packageStorePath) const { Windows::Foundation::IAsyncOperation packageVolume; - check_hresult(static_cast(static_cast(*this))->abi_AddPackageVolumeAsync(get(packageStorePath), put(packageVolume))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_AddPackageVolumeAsync(get_abi(packageStorePath), put_abi(packageVolume))); return packageVolume; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::AddPackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::AddPackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_AddPackageToVolumeAsync(get(packageUri), get(dependencyPackageUris), deploymentOptions, get(targetVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_AddPackageToVolumeAsync(get_abi(packageUri), get_abi(dependencyPackageUris), deploymentOptions, get_abi(targetVolume), put_abi(deploymentOperation))); return deploymentOperation; } -template void impl_IPackageManager3::ClearPackageStatus(hstring_ref packageFullName, Windows::Management::Deployment::PackageStatus status) const +template void impl_IPackageManager3::ClearPackageStatus(hstring_view packageFullName, Windows::Management::Deployment::PackageStatus status) const { - check_hresult(static_cast(static_cast(*this))->abi_ClearPackageStatus(get(packageFullName), status)); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_ClearPackageStatus(get_abi(packageFullName), status)); } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & appDataVolume) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & appDataVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RegisterPackageWithAppDataVolumeAsync(get(manifestUri), get(dependencyPackageUris), deploymentOptions, get(appDataVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_RegisterPackageWithAppDataVolumeAsync(get_abi(manifestUri), get_abi(dependencyPackageUris), deploymentOptions, get_abi(appDataVolume), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Management::Deployment::PackageVolume impl_IPackageManager3::FindPackageVolume(hstring_ref volumeName) const +template Windows::Management::Deployment::PackageVolume impl_IPackageManager3::FindPackageVolume(hstring_view volumeName) const { Windows::Management::Deployment::PackageVolume volume { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageVolumeByName(get(volumeName), put(volume))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_FindPackageVolumeByName(get_abi(volumeName), put_abi(volume))); return volume; } template Windows::Foundation::Collections::IIterable impl_IPackageManager3::FindPackageVolumes() const { Windows::Foundation::Collections::IIterable volumeCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageVolumes(put(volumeCollection))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_FindPackageVolumes(put_abi(volumeCollection))); return volumeCollection; } template Windows::Management::Deployment::PackageVolume impl_IPackageManager3::GetDefaultPackageVolume() const { Windows::Management::Deployment::PackageVolume volume { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultPackageVolume(put(volume))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_GetDefaultPackageVolume(put_abi(volume))); return volume; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::MovePackageToVolumeAsync(hstring_ref packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::MovePackageToVolumeAsync(hstring_view packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_MovePackageToVolumeAsync(get(packageFullName), deploymentOptions, get(targetVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_MovePackageToVolumeAsync(get_abi(packageFullName), deploymentOptions, get_abi(targetVolume), put_abi(deploymentOperation))); return deploymentOperation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::RemovePackageVolumeAsync(const Windows::Management::Deployment::PackageVolume & volume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_RemovePackageVolumeAsync(get(volume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_RemovePackageVolumeAsync(get_abi(volume), put_abi(deploymentOperation))); return deploymentOperation; } template void impl_IPackageManager3::SetDefaultPackageVolume(const Windows::Management::Deployment::PackageVolume & volume) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultPackageVolume(get(volume))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_SetDefaultPackageVolume(get_abi(volume))); } -template void impl_IPackageManager3::SetPackageStatus(hstring_ref packageFullName, Windows::Management::Deployment::PackageStatus status) const +template void impl_IPackageManager3::SetPackageStatus(hstring_view packageFullName, Windows::Management::Deployment::PackageStatus status) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPackageStatus(get(packageFullName), status)); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_SetPackageStatus(get_abi(packageFullName), status)); } template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::SetPackageVolumeOfflineAsync(const Windows::Management::Deployment::PackageVolume & packageVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_SetPackageVolumeOfflineAsync(get(packageVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_SetPackageVolumeOfflineAsync(get_abi(packageVolume), put_abi(deploymentOperation))); return deploymentOperation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::SetPackageVolumeOnlineAsync(const Windows::Management::Deployment::PackageVolume & packageVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_SetPackageVolumeOnlineAsync(get(packageVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_SetPackageVolumeOnlineAsync(get_abi(packageVolume), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::StagePackageAsync(const Windows::Foundation::Uri & packageUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::StagePackageAsync(const Windows::Foundation::Uri & packageUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, const Windows::Management::Deployment::PackageVolume & targetVolume) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_StagePackageToVolumeAsync(get(packageUri), get(dependencyPackageUris), deploymentOptions, get(targetVolume), put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_StagePackageToVolumeAsync(get_abi(packageUri), get_abi(dependencyPackageUris), deploymentOptions, get_abi(targetVolume), put_abi(deploymentOperation))); return deploymentOperation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::StageUserDataAsync(hstring_ref packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IPackageManager3::StageUserDataAsync(hstring_view packageFullName, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress deploymentOperation; - check_hresult(static_cast(static_cast(*this))->abi_StageUserDataWithOptionsAsync(get(packageFullName), deploymentOptions, put(deploymentOperation))); + check_hresult(WINRT_SHIM(IPackageManager3)->abi_StageUserDataWithOptionsAsync(get_abi(packageFullName), deploymentOptions, put_abi(deploymentOperation))); return deploymentOperation; } template Windows::Foundation::IAsyncOperation> impl_IPackageManager4::GetPackageVolumesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPackageVolumesAsync(put(operation))); + check_hresult(WINRT_SHIM(IPackageManager4)->abi_GetPackageVolumesAsync(put_abi(operation))); return operation; } template bool impl_IPackageVolume::IsOffline() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOffline(&value)); + check_hresult(WINRT_SHIM(IPackageVolume)->get_IsOffline(&value)); return value; } template bool impl_IPackageVolume::IsSystemVolume() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSystemVolume(&value)); + check_hresult(WINRT_SHIM(IPackageVolume)->get_IsSystemVolume(&value)); return value; } template hstring impl_IPackageVolume::MountPoint() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MountPoint(put(value))); + check_hresult(WINRT_SHIM(IPackageVolume)->get_MountPoint(put_abi(value))); return value; } template hstring impl_IPackageVolume::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPackageVolume)->get_Name(put_abi(value))); return value; } template hstring impl_IPackageVolume::PackageStorePath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PackageStorePath(put(value))); + check_hresult(WINRT_SHIM(IPackageVolume)->get_PackageStorePath(put_abi(value))); return value; } template bool impl_IPackageVolume::SupportsHardLinks() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsHardLinks(&value)); + check_hresult(WINRT_SHIM(IPackageVolume)->get_SupportsHardLinks(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackages() const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackages(put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackages(put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackages(hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackages(hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByNamePublisher(get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByNamePublisher(get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackages(hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackages(hstring_view packageFamilyName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByPackageFamilyName(get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByPackageFamilyName(get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesWithPackageTypes(packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesWithPackageTypes(packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByNamePublisherWithPackagesTypes(packageTypes, get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByNamePublisherWithPackagesTypes(packageTypes, get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesWithPackageTypes(Windows::Management::Deployment::PackageTypes packageTypes, hstring_view packageFamilyName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByPackageFamilyNameWithPackageTypes(packageTypes, get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByPackageFamilyNameWithPackageTypes(packageTypes, get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackage(hstring_ref packageFullName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackage(hstring_view packageFullName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageByPackageFullName(get(packageFullName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackageByPackageFullName(get_abi(packageFullName), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_ref userSecurityId) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_view userSecurityId) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityId(get(userSecurityId), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityId(get_abi(userSecurityId), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_ref userSecurityId, hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_view userSecurityId, hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdNamePublisher(get(userSecurityId), get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityIdNamePublisher(get_abi(userSecurityId), get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_ref userSecurityId, hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUser(hstring_view userSecurityId, hstring_view packageFamilyName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdPackageFamilyName(get(userSecurityId), get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityIdPackageFamilyName(get_abi(userSecurityId), get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdWithPackageTypes(get(userSecurityId), packageTypes, put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityIdWithPackageTypes(get_abi(userSecurityId), packageTypes, put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(get(userSecurityId), packageTypes, get(packageName), get(packagePublisher), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(get_abi(userSecurityId), packageTypes, get_abi(packageName), get_abi(packagePublisher), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_ref userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, hstring_ref packageFamilyName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackagesForUserWithPackageTypes(hstring_view userSecurityId, Windows::Management::Deployment::PackageTypes packageTypes, hstring_view packageFamilyName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(get(userSecurityId), packageTypes, get(packageFamilyName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(get_abi(userSecurityId), packageTypes, get_abi(packageFamilyName), put_abi(packageCollection))); return packageCollection; } -template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackageForUser(hstring_ref userSecurityId, hstring_ref packageFullName) const +template Windows::Foundation::Collections::IVector impl_IPackageVolume::FindPackageForUser(hstring_view userSecurityId, hstring_view packageFullName) const { Windows::Foundation::Collections::IVector packageCollection; - check_hresult(static_cast(static_cast(*this))->abi_FindPackageByUserSecurityIdPackageFullName(get(userSecurityId), get(packageFullName), put(packageCollection))); + check_hresult(WINRT_SHIM(IPackageVolume)->abi_FindPackageByUserSecurityIdPackageFullName(get_abi(userSecurityId), get_abi(packageFullName), put_abi(packageCollection))); return packageCollection; } template bool impl_IPackageVolume2::IsFullTrustPackageSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullTrustPackageSupported(&value)); + check_hresult(WINRT_SHIM(IPackageVolume2)->get_IsFullTrustPackageSupported(&value)); return value; } template bool impl_IPackageVolume2::IsAppxInstallSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAppxInstallSupported(&value)); + check_hresult(WINRT_SHIM(IPackageVolume2)->get_IsAppxInstallSupported(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IPackageVolume2::GetAvailableSpaceAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAvailableSpaceAsync(put(operation))); + check_hresult(WINRT_SHIM(IPackageVolume2)->abi_GetAvailableSpaceAsync(put_abi(operation))); return operation; } @@ -1505,3 +1578,113 @@ inline PackageManager::PackageManager() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IDeploymentResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageManager3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageManager4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageUserInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageVolume & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::IPackageVolume2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::DeploymentResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::PackageManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::PackageUserInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Deployment::PackageVolume & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Management.Orchestration.h b/10.0.14393.0/winrt/Windows.Management.Orchestration.h index 883b45764..e40c3c9ae 100644 --- a/10.0.14393.0/winrt/Windows.Management.Orchestration.h +++ b/10.0.14393.0/winrt/Windows.Management.Orchestration.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Management.Orchestration.3.h" #include "Windows.Foundation.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_StartSingleAppMode(abi_arg_out result) noexcept override + HRESULT __stdcall abi_StartSingleAppMode(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().StartSingleAppMode()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartSingleAppMode()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -57,14 +62,14 @@ namespace Windows::Management::Orchestration { template Windows::Management::Orchestration::CurrentAppOrchestration impl_ICurrentAppOrchestrationStatics::GetForCurrentView() const { Windows::Management::Orchestration::CurrentAppOrchestration result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(result))); + check_hresult(WINRT_SHIM(ICurrentAppOrchestrationStatics)->abi_GetForCurrentView(put_abi(result))); return result; } template Windows::Management::Orchestration::SingleAppModeContext impl_ICurrentAppOrchestration::StartSingleAppMode() const { Windows::Management::Orchestration::SingleAppModeContext result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StartSingleAppMode(put(result))); + check_hresult(WINRT_SHIM(ICurrentAppOrchestration)->abi_StartSingleAppMode(put_abi(result))); return result; } @@ -76,3 +81,50 @@ inline Windows::Management::Orchestration::CurrentAppOrchestration CurrentAppOrc } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Orchestration::ICurrentAppOrchestration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Orchestration::ICurrentAppOrchestrationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Orchestration::ISingleAppModeContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Orchestration::CurrentAppOrchestration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Orchestration::SingleAppModeContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Management.Workplace.h b/10.0.14393.0/winrt/Windows.Management.Workplace.h index c64910478..593b5b0c2 100644 --- a/10.0.14393.0/winrt/Windows.Management.Workplace.h +++ b/10.0.14393.0/winrt/Windows.Management.Workplace.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Management.Workplace.3.h" WINRT_EXPORT namespace winrt { @@ -16,7 +19,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsBrowserAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBrowserAllowed()); return S_OK; } catch (...) @@ -29,7 +33,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsCameraAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCameraAllowed()); return S_OK; } catch (...) @@ -42,7 +47,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsMicrosoftAccountAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMicrosoftAccountAllowed()); return S_OK; } catch (...) @@ -55,7 +61,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsStoreAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStoreAllowed()); return S_OK; } catch (...) @@ -72,7 +79,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().GetMessagingSyncPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetMessagingSyncPolicy()); return S_OK; } catch (...) @@ -89,7 +97,8 @@ struct produce : p { try { - *value = detach(this->shim().IsMicrosoftAccountOptional()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMicrosoftAccountOptional()); return S_OK; } catch (...) @@ -106,42 +115,42 @@ namespace Windows::Management::Workplace { template bool impl_IMdmAllowPolicyStatics::IsBrowserAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsBrowserAllowed(&value)); + check_hresult(WINRT_SHIM(IMdmAllowPolicyStatics)->abi_IsBrowserAllowed(&value)); return value; } template bool impl_IMdmAllowPolicyStatics::IsCameraAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCameraAllowed(&value)); + check_hresult(WINRT_SHIM(IMdmAllowPolicyStatics)->abi_IsCameraAllowed(&value)); return value; } template bool impl_IMdmAllowPolicyStatics::IsMicrosoftAccountAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsMicrosoftAccountAllowed(&value)); + check_hresult(WINRT_SHIM(IMdmAllowPolicyStatics)->abi_IsMicrosoftAccountAllowed(&value)); return value; } template bool impl_IMdmAllowPolicyStatics::IsStoreAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsStoreAllowed(&value)); + check_hresult(WINRT_SHIM(IMdmAllowPolicyStatics)->abi_IsStoreAllowed(&value)); return value; } template Windows::Management::Workplace::MessagingSyncPolicy impl_IMdmPolicyStatics2::GetMessagingSyncPolicy() const { Windows::Management::Workplace::MessagingSyncPolicy value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetMessagingSyncPolicy(&value)); + check_hresult(WINRT_SHIM(IMdmPolicyStatics2)->abi_GetMessagingSyncPolicy(&value)); return value; } template bool impl_IWorkplaceSettingsStatics::IsMicrosoftAccountOptional() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMicrosoftAccountOptional(&value)); + check_hresult(WINRT_SHIM(IWorkplaceSettingsStatics)->get_IsMicrosoftAccountOptional(&value)); return value; } @@ -178,3 +187,32 @@ inline bool WorkplaceSettings::IsMicrosoftAccountOptional() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Workplace::IMdmAllowPolicyStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Workplace::IMdmPolicyStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Management::Workplace::IWorkplaceSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Audio.h b/10.0.14393.0/winrt/Windows.Media.Audio.h index c131e193f..0ac2e7502 100644 --- a/10.0.14393.0/winrt/Windows.Media.Audio.h +++ b/10.0.14393.0/winrt/Windows.Media.Audio.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Media.Render.3.h" #include "internal/Windows.Media.MediaProperties.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -24,11 +27,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -42,11 +46,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -64,6 +69,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackSpeedFactor(value); return S_OK; } @@ -77,7 +83,8 @@ struct produce : produce_baseshim().PlaybackSpeedFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackSpeedFactor()); return S_OK; } catch (...) @@ -86,11 +93,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -99,10 +107,11 @@ struct produce : produce_base position) noexcept override + HRESULT __stdcall abi_Seek(impl::abi_arg_in position) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Seek(*reinterpret_cast(&position)); return S_OK; } @@ -112,11 +121,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -126,10 +136,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -139,11 +150,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_EndTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EndTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndTime()); return S_OK; } catch (...) @@ -153,10 +165,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_EndTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EndTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -166,11 +179,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_LoopCount(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LoopCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LoopCount()); return S_OK; } catch (...) @@ -180,10 +194,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_LoopCount(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoopCount(*reinterpret_cast *>(&value)); return S_OK; } @@ -193,11 +208,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -206,11 +222,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourceFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceFile()); return S_OK; } catch (...) @@ -220,11 +237,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_FileCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FileCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FileCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -237,6 +255,7 @@ struct produce : produce_baseshim()); this->shim().FileCompleted(token); return S_OK; } @@ -250,11 +269,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_File(abi_arg_out value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -264,11 +284,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FileEncodingProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileEncodingProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileEncodingProfile()); return S_OK; } catch (...) @@ -278,11 +299,12 @@ struct produce : produce_base> result) noexcept override + HRESULT __stdcall abi_FinalizeAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FinalizeAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FinalizeAsync()); return S_OK; } catch (...) @@ -296,11 +318,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -318,6 +341,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackSpeedFactor(value); return S_OK; } @@ -331,7 +355,8 @@ struct produce : produce_baseshim().PlaybackSpeedFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackSpeedFactor()); return S_OK; } catch (...) @@ -340,10 +365,11 @@ struct produce : produce_base frame) noexcept override + HRESULT __stdcall abi_AddFrame(impl::abi_arg_in frame) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddFrame(*reinterpret_cast(&frame)); return S_OK; } @@ -357,6 +383,7 @@ struct produce : produce_baseshim()); this->shim().DiscardQueuedFrames(); return S_OK; } @@ -370,7 +397,8 @@ struct produce : produce_baseshim().QueuedSampleCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueuedSampleCount()); return S_OK; } catch (...) @@ -379,11 +407,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AudioFrameCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioFrameCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioFrameCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -396,6 +425,7 @@ struct produce : produce_baseshim()); this->shim().AudioFrameCompleted(token); return S_OK; } @@ -405,11 +435,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_QuantumStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().QuantumStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuantumStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -422,6 +453,7 @@ struct produce : produce_baseshim()); this->shim().QuantumStarted(token); return S_OK; } @@ -435,11 +467,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetFrame(abi_arg_out audioFrame) noexcept override + HRESULT __stdcall abi_GetFrame(impl::abi_arg_out audioFrame) noexcept override { try { - *audioFrame = detach(this->shim().GetFrame()); + typename D::abi_guard guard(this->shim()); + *audioFrame = detach_abi(this->shim().GetFrame()); return S_OK; } catch (...) @@ -453,11 +486,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFrameInputNode(abi_arg_out frameInputNode) noexcept override + HRESULT __stdcall abi_CreateFrameInputNode(impl::abi_arg_out frameInputNode) noexcept override { try { - *frameInputNode = detach(this->shim().CreateFrameInputNode()); + typename D::abi_guard guard(this->shim()); + *frameInputNode = detach_abi(this->shim().CreateFrameInputNode()); return S_OK; } catch (...) @@ -467,11 +501,12 @@ struct produce : produce_base encodingProperties, abi_arg_out frameInputNode) noexcept override + HRESULT __stdcall abi_CreateFrameInputNodeWithFormat(impl::abi_arg_in encodingProperties, impl::abi_arg_out frameInputNode) noexcept override { try { - *frameInputNode = detach(this->shim().CreateFrameInputNode(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *frameInputNode = detach_abi(this->shim().CreateFrameInputNode(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -481,11 +516,12 @@ struct produce : produce_base> result) noexcept override + HRESULT __stdcall abi_CreateDeviceInputNodeAsync(Windows::Media::Capture::MediaCategory category, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceInputNodeAsync(category)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceInputNodeAsync(category)); return S_OK; } catch (...) @@ -495,11 +531,12 @@ struct produce : produce_base encodingProperties, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateDeviceInputNodeWithFormatAsync(Windows::Media::Capture::MediaCategory category, impl::abi_arg_in encodingProperties, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -509,11 +546,12 @@ struct produce : produce_base encodingProperties, abi_arg_in device, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateDeviceInputNodeWithFormatOnDeviceAsync(Windows::Media::Capture::MediaCategory category, impl::abi_arg_in encodingProperties, impl::abi_arg_in device, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties), *reinterpret_cast(&device))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties), *reinterpret_cast(&device))); return S_OK; } catch (...) @@ -523,11 +561,12 @@ struct produce : produce_base frameOutputNode) noexcept override + HRESULT __stdcall abi_CreateFrameOutputNode(impl::abi_arg_out frameOutputNode) noexcept override { try { - *frameOutputNode = detach(this->shim().CreateFrameOutputNode()); + typename D::abi_guard guard(this->shim()); + *frameOutputNode = detach_abi(this->shim().CreateFrameOutputNode()); return S_OK; } catch (...) @@ -537,11 +576,12 @@ struct produce : produce_base encodingProperties, abi_arg_out frameOutputNode) noexcept override + HRESULT __stdcall abi_CreateFrameOutputNodeWithFormat(impl::abi_arg_in encodingProperties, impl::abi_arg_out frameOutputNode) noexcept override { try { - *frameOutputNode = detach(this->shim().CreateFrameOutputNode(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *frameOutputNode = detach_abi(this->shim().CreateFrameOutputNode(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -551,11 +591,12 @@ struct produce : produce_base> result) noexcept override + HRESULT __stdcall abi_CreateDeviceOutputNodeAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceOutputNodeAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceOutputNodeAsync()); return S_OK; } catch (...) @@ -565,11 +606,12 @@ struct produce : produce_base file, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFileInputNodeAsync(impl::abi_arg_in file, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFileInputNodeAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFileInputNodeAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -579,11 +621,12 @@ struct produce : produce_base file, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFileOutputNodeAsync(impl::abi_arg_in file, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFileOutputNodeAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFileOutputNodeAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -593,11 +636,12 @@ struct produce : produce_base file, abi_arg_in fileEncodingProfile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFileOutputNodeWithFileProfileAsync(impl::abi_arg_in file, impl::abi_arg_in fileEncodingProfile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFileOutputNodeAsync(*reinterpret_cast(&file), *reinterpret_cast(&fileEncodingProfile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFileOutputNodeAsync(*reinterpret_cast(&file), *reinterpret_cast(&fileEncodingProfile))); return S_OK; } catch (...) @@ -607,11 +651,12 @@ struct produce : produce_base submixNode) noexcept override + HRESULT __stdcall abi_CreateSubmixNode(impl::abi_arg_out submixNode) noexcept override { try { - *submixNode = detach(this->shim().CreateSubmixNode()); + typename D::abi_guard guard(this->shim()); + *submixNode = detach_abi(this->shim().CreateSubmixNode()); return S_OK; } catch (...) @@ -621,11 +666,12 @@ struct produce : produce_base encodingProperties, abi_arg_out submixNode) noexcept override + HRESULT __stdcall abi_CreateSubmixNodeWithFormat(impl::abi_arg_in encodingProperties, impl::abi_arg_out submixNode) noexcept override { try { - *submixNode = detach(this->shim().CreateSubmixNode(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *submixNode = detach_abi(this->shim().CreateSubmixNode(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -639,6 +685,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -652,6 +699,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -665,6 +713,7 @@ struct produce : produce_baseshim()); this->shim().ResetAllNodes(); return S_OK; } @@ -674,11 +723,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_QuantumStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().QuantumStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuantumStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -691,6 +741,7 @@ struct produce : produce_baseshim()); this->shim().QuantumStarted(token); return S_OK; } @@ -700,11 +751,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_QuantumProcessed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().QuantumProcessed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuantumProcessed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -717,6 +769,7 @@ struct produce : produce_baseshim()); this->shim().QuantumProcessed(token); return S_OK; } @@ -726,11 +779,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_UnrecoverableErrorOccurred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UnrecoverableErrorOccurred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UnrecoverableErrorOccurred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -743,6 +797,7 @@ struct produce : produce_baseshim()); this->shim().UnrecoverableErrorOccurred(token); return S_OK; } @@ -756,7 +811,8 @@ struct produce : produce_baseshim().CompletedQuantumCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompletedQuantumCount()); return S_OK; } catch (...) @@ -765,11 +821,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodingProperties()); return S_OK; } catch (...) @@ -783,7 +840,8 @@ struct produce : produce_baseshim().LatencyInSamples()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LatencyInSamples()); return S_OK; } catch (...) @@ -792,11 +850,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrimaryRenderDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryRenderDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryRenderDevice()); return S_OK; } catch (...) @@ -810,7 +869,8 @@ struct produce : produce_baseshim().RenderDeviceAudioProcessing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RenderDeviceAudioProcessing()); return S_OK; } catch (...) @@ -823,7 +883,8 @@ struct produce : produce_baseshim().SamplesPerQuantum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SamplesPerQuantum()); return S_OK; } catch (...) @@ -836,11 +897,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFrameInputNodeWithFormatAndEmitter(abi_arg_in encodingProperties, abi_arg_in emitter, abi_arg_out frameInputNode) noexcept override + HRESULT __stdcall abi_CreateFrameInputNodeWithFormatAndEmitter(impl::abi_arg_in encodingProperties, impl::abi_arg_in emitter, impl::abi_arg_out frameInputNode) noexcept override { try { - *frameInputNode = detach(this->shim().CreateFrameInputNode(*reinterpret_cast(&encodingProperties), *reinterpret_cast(&emitter))); + typename D::abi_guard guard(this->shim()); + *frameInputNode = detach_abi(this->shim().CreateFrameInputNode(*reinterpret_cast(&encodingProperties), *reinterpret_cast(&emitter))); return S_OK; } catch (...) @@ -850,11 +912,12 @@ struct produce : produce_base encodingProperties, abi_arg_in device, abi_arg_in emitter, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(Windows::Media::Capture::MediaCategory category, impl::abi_arg_in encodingProperties, impl::abi_arg_in device, impl::abi_arg_in emitter, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties), *reinterpret_cast(&device), *reinterpret_cast(&emitter))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDeviceInputNodeAsync(category, *reinterpret_cast(&encodingProperties), *reinterpret_cast(&device), *reinterpret_cast(&emitter))); return S_OK; } catch (...) @@ -864,11 +927,12 @@ struct produce : produce_base file, abi_arg_in emitter, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFileInputNodeWithEmitterAsync(impl::abi_arg_in file, impl::abi_arg_in emitter, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFileInputNodeAsync(*reinterpret_cast(&file), *reinterpret_cast(&emitter))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFileInputNodeAsync(*reinterpret_cast(&file), *reinterpret_cast(&emitter))); return S_OK; } catch (...) @@ -878,11 +942,12 @@ struct produce : produce_base encodingProperties, abi_arg_in emitter, abi_arg_out submixNode) noexcept override + HRESULT __stdcall abi_CreateSubmixNodeWithFormatAndEmitter(impl::abi_arg_in encodingProperties, impl::abi_arg_in emitter, impl::abi_arg_out submixNode) noexcept override { try { - *submixNode = detach(this->shim().CreateSubmixNode(*reinterpret_cast(&encodingProperties), *reinterpret_cast(&emitter))); + typename D::abi_guard guard(this->shim()); + *submixNode = detach_abi(this->shim().CreateSubmixNode(*reinterpret_cast(&encodingProperties), *reinterpret_cast(&emitter))); return S_OK; } catch (...) @@ -892,11 +957,12 @@ struct produce : produce_base updater) noexcept override + HRESULT __stdcall abi_CreateBatchUpdater(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBatchUpdater()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBatchUpdater()); return S_OK; } catch (...) @@ -910,11 +976,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Destination(abi_arg_out value) noexcept override + HRESULT __stdcall get_Destination(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Destination()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Destination()); return S_OK; } catch (...) @@ -928,6 +995,7 @@ struct produce : produce_baseshim()); this->shim().Gain(value); return S_OK; } @@ -941,7 +1009,8 @@ struct produce : produce_baseshim().Gain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gain()); return S_OK; } catch (...) @@ -954,11 +1023,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_EncodingProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_EncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodingProperties()); return S_OK; } catch (...) @@ -968,10 +1038,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_EncodingProperties(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EncodingProperties(*reinterpret_cast(&value)); return S_OK; } @@ -981,11 +1052,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrimaryRenderDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryRenderDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryRenderDevice()); return S_OK; } catch (...) @@ -995,10 +1067,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PrimaryRenderDevice(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrimaryRenderDevice(*reinterpret_cast(&value)); return S_OK; } @@ -1012,7 +1085,8 @@ struct produce : produce_baseshim().QuantumSizeSelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QuantumSizeSelectionMode()); return S_OK; } catch (...) @@ -1025,6 +1099,7 @@ struct produce : produce_baseshim()); this->shim().QuantumSizeSelectionMode(value); return S_OK; } @@ -1038,7 +1113,8 @@ struct produce : produce_baseshim().DesiredSamplesPerQuantum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredSamplesPerQuantum()); return S_OK; } catch (...) @@ -1051,6 +1127,7 @@ struct produce : produce_baseshim()); this->shim().DesiredSamplesPerQuantum(value); return S_OK; } @@ -1064,7 +1141,8 @@ struct produce : produce_baseshim().AudioRenderCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioRenderCategory()); return S_OK; } catch (...) @@ -1077,6 +1155,7 @@ struct produce : produce_baseshim()); this->shim().AudioRenderCategory(value); return S_OK; } @@ -1090,7 +1169,8 @@ struct produce : produce_baseshim().DesiredRenderDeviceAudioProcessing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredRenderDeviceAudioProcessing()); return S_OK; } catch (...) @@ -1103,6 +1183,7 @@ struct produce : produce_baseshim()); this->shim().DesiredRenderDeviceAudioProcessing(value); return S_OK; } @@ -1116,11 +1197,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Media::Render::AudioRenderCategory audioRenderCategory, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(Windows::Media::Render::AudioRenderCategory audioRenderCategory, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(audioRenderCategory)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(audioRenderCategory)); return S_OK; } catch (...) @@ -1134,11 +1216,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateAsync(abi_arg_in settings, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_in settings, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateAsync(*reinterpret_cast(&settings))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateAsync(*reinterpret_cast(&settings))); return S_OK; } catch (...) @@ -1156,7 +1239,8 @@ struct produceshim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -1169,11 +1253,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OutgoingConnections(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OutgoingConnections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OutgoingConnections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingConnections()); return S_OK; } catch (...) @@ -1183,10 +1268,11 @@ struct produce : produce_base destination) noexcept override + HRESULT __stdcall abi_AddOutgoingConnection(impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddOutgoingConnection(*reinterpret_cast(&destination)); return S_OK; } @@ -1196,10 +1282,11 @@ struct produce : produce_base destination, double gain) noexcept override + HRESULT __stdcall abi_AddOutgoingConnectionWithGain(impl::abi_arg_in destination, double gain) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddOutgoingConnection(*reinterpret_cast(&destination), gain); return S_OK; } @@ -1209,10 +1296,11 @@ struct produce : produce_base destination) noexcept override + HRESULT __stdcall abi_RemoveOutgoingConnection(impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveOutgoingConnection(*reinterpret_cast(&destination)); return S_OK; } @@ -1226,11 +1314,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Emitter(abi_arg_out value) noexcept override + HRESULT __stdcall get_Emitter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Emitter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Emitter()); return S_OK; } catch (...) @@ -1244,11 +1333,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_EffectDefinitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EffectDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EffectDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EffectDefinitions()); return S_OK; } catch (...) @@ -1262,6 +1352,7 @@ struct produce : produce_baseshim()); this->shim().OutgoingGain(value); return S_OK; } @@ -1275,7 +1366,8 @@ struct produce : produce_baseshim().OutgoingGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutgoingGain()); return S_OK; } catch (...) @@ -1284,11 +1376,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodingProperties()); return S_OK; } catch (...) @@ -1302,7 +1395,8 @@ struct produce : produce_baseshim().ConsumeInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConsumeInput()); return S_OK; } catch (...) @@ -1315,6 +1409,7 @@ struct produce : produce_baseshim()); this->shim().ConsumeInput(value); return S_OK; } @@ -1328,6 +1423,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -1341,6 +1437,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -1354,6 +1451,7 @@ struct produce : produce_baseshim()); this->shim().Reset(); return S_OK; } @@ -1363,10 +1461,11 @@ struct produce : produce_base definition) noexcept override + HRESULT __stdcall abi_DisableEffectsByDefinition(impl::abi_arg_in definition) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableEffectsByDefinition(*reinterpret_cast(&definition)); return S_OK; } @@ -1376,10 +1475,11 @@ struct produce : produce_base definition) noexcept override + HRESULT __stdcall abi_EnableEffectsByDefinition(impl::abi_arg_in definition) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableEffectsByDefinition(*reinterpret_cast(&definition)); return S_OK; } @@ -1393,11 +1493,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1406,10 +1507,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -1419,11 +1521,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Direction(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -1432,10 +1535,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Direction(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Direction(*reinterpret_cast(&value)); return S_OK; } @@ -1445,11 +1549,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Shape(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Shape()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Shape()); return S_OK; } catch (...) @@ -1459,11 +1564,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DecayModel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DecayModel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecayModel()); return S_OK; } catch (...) @@ -1477,7 +1583,8 @@ struct produce : produce_baseshim().Gain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gain()); return S_OK; } catch (...) @@ -1490,6 +1597,7 @@ struct produce : produce_baseshim()); this->shim().Gain(value); return S_OK; } @@ -1503,7 +1611,8 @@ struct produce : produce_baseshim().DistanceScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistanceScale()); return S_OK; } catch (...) @@ -1516,6 +1625,7 @@ struct produce : produce_baseshim()); this->shim().DistanceScale(value); return S_OK; } @@ -1529,7 +1639,8 @@ struct produce : produce_baseshim().DopplerScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DopplerScale()); return S_OK; } catch (...) @@ -1542,6 +1653,7 @@ struct produce : produce_baseshim()); this->shim().DopplerScale(value); return S_OK; } @@ -1551,11 +1663,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DopplerVelocity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DopplerVelocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DopplerVelocity()); return S_OK; } catch (...) @@ -1564,10 +1677,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DopplerVelocity(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DopplerVelocity(*reinterpret_cast(&value)); return S_OK; } @@ -1581,7 +1695,8 @@ struct produce : produce_baseshim().IsDopplerDisabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDopplerDisabled()); return S_OK; } catch (...) @@ -1598,7 +1713,8 @@ struct produce : produce_baseshim().SpatialAudioModel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpatialAudioModel()); return S_OK; } catch (...) @@ -1611,6 +1727,7 @@ struct produce : produce_baseshim()); this->shim().SpatialAudioModel(value); return S_OK; } @@ -1628,7 +1745,8 @@ struct produce : prod { try { - *value = detach(this->shim().InnerAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InnerAngle()); return S_OK; } catch (...) @@ -1641,7 +1759,8 @@ struct produce : prod { try { - *value = detach(this->shim().OuterAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuterAngle()); return S_OK; } catch (...) @@ -1654,7 +1773,8 @@ struct produce : prod { try { - *value = detach(this->shim().OuterAngleGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuterAngleGain()); return S_OK; } catch (...) @@ -1671,7 +1791,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -1684,7 +1805,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().MinGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinGain()); return S_OK; } catch (...) @@ -1697,7 +1819,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().MaxGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxGain()); return S_OK; } catch (...) @@ -1706,11 +1829,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_NaturalProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalProperties()); return S_OK; } catch (...) @@ -1724,11 +1848,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateNatural(double minGain, double maxGain, double unityGainDistance, double cutoffDistance, abi_arg_out decayModel) noexcept override + HRESULT __stdcall abi_CreateNatural(double minGain, double maxGain, double unityGainDistance, double cutoffDistance, impl::abi_arg_out decayModel) noexcept override { try { - *decayModel = detach(this->shim().CreateNatural(minGain, maxGain, unityGainDistance, cutoffDistance)); + typename D::abi_guard guard(this->shim()); + *decayModel = detach_abi(this->shim().CreateNatural(minGain, maxGain, unityGainDistance, cutoffDistance)); return S_OK; } catch (...) @@ -1738,11 +1863,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateCustom(double minGain, double maxGain, abi_arg_out decayModel) noexcept override + HRESULT __stdcall abi_CreateCustom(double minGain, double maxGain, impl::abi_arg_out decayModel) noexcept override { try { - *decayModel = detach(this->shim().CreateCustom(minGain, maxGain)); + typename D::abi_guard guard(this->shim()); + *decayModel = detach_abi(this->shim().CreateCustom(minGain, maxGain)); return S_OK; } catch (...) @@ -1756,11 +1882,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateAudioNodeEmitter(abi_arg_in shape, abi_arg_in decayModel, Windows::Media::Audio::AudioNodeEmitterSettings settings, abi_arg_out emitter) noexcept override + HRESULT __stdcall abi_CreateAudioNodeEmitter(impl::abi_arg_in shape, impl::abi_arg_in decayModel, Windows::Media::Audio::AudioNodeEmitterSettings settings, impl::abi_arg_out emitter) noexcept override { try { - *emitter = detach(this->shim().CreateAudioNodeEmitter(*reinterpret_cast(&shape), *reinterpret_cast(&decayModel), settings)); + typename D::abi_guard guard(this->shim()); + *emitter = detach_abi(this->shim().CreateAudioNodeEmitter(*reinterpret_cast(&shape), *reinterpret_cast(&decayModel), settings)); return S_OK; } catch (...) @@ -1778,7 +1905,8 @@ struct produceshim().UnityGainDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnityGainDistance()); return S_OK; } catch (...) @@ -1791,7 +1919,8 @@ struct produceshim().CutoffDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CutoffDistance()); return S_OK; } catch (...) @@ -1808,7 +1937,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -1817,11 +1947,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ConeProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConeProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConeProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConeProperties()); return S_OK; } catch (...) @@ -1835,11 +1966,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateCone(double innerAngle, double outerAngle, double outerAngleGain, abi_arg_out shape) noexcept override + HRESULT __stdcall abi_CreateCone(double innerAngle, double outerAngle, double outerAngleGain, impl::abi_arg_out shape) noexcept override { try { - *shape = detach(this->shim().CreateCone(innerAngle, outerAngle, outerAngleGain)); + typename D::abi_guard guard(this->shim()); + *shape = detach_abi(this->shim().CreateCone(innerAngle, outerAngle, outerAngleGain)); return S_OK; } catch (...) @@ -1849,11 +1981,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateOmnidirectional(abi_arg_out shape) noexcept override + HRESULT __stdcall abi_CreateOmnidirectional(impl::abi_arg_out shape) noexcept override { try { - *shape = detach(this->shim().CreateOmnidirectional()); + typename D::abi_guard guard(this->shim()); + *shape = detach_abi(this->shim().CreateOmnidirectional()); return S_OK; } catch (...) @@ -1867,11 +2000,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1880,10 +2014,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -1893,11 +2028,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -1906,10 +2042,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Orientation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(*reinterpret_cast(&value)); return S_OK; } @@ -1923,7 +2060,8 @@ struct produce : produce_baseshim().SpeedOfSound()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpeedOfSound()); return S_OK; } catch (...) @@ -1936,6 +2074,7 @@ struct produce : produce_baseshim()); this->shim().SpeedOfSound(value); return S_OK; } @@ -1945,11 +2084,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DopplerVelocity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DopplerVelocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DopplerVelocity()); return S_OK; } catch (...) @@ -1958,10 +2098,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DopplerVelocity(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DopplerVelocity(*reinterpret_cast(&value)); return S_OK; } @@ -1975,10 +2116,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_Listener(abi_arg_in value) noexcept override + HRESULT __stdcall put_Listener(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Listener(*reinterpret_cast(&value)); return S_OK; } @@ -1988,11 +2130,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Listener(abi_arg_out value) noexcept override + HRESULT __stdcall get_Listener(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Listener()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Listener()); return S_OK; } catch (...) @@ -2010,7 +2153,8 @@ struct produce : pr { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2019,11 +2163,12 @@ struct produce : pr } } - HRESULT __stdcall get_DeviceInputNode(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInputNode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInputNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInputNode()); return S_OK; } catch (...) @@ -2041,7 +2186,8 @@ struct produce : p { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2050,11 +2196,12 @@ struct produce : p } } - HRESULT __stdcall get_DeviceOutputNode(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceOutputNode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceOutputNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceOutputNode()); return S_OK; } catch (...) @@ -2072,7 +2219,8 @@ struct produce : prod { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2081,11 +2229,12 @@ struct produce : prod } } - HRESULT __stdcall get_FileInputNode(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileInputNode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileInputNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileInputNode()); return S_OK; } catch (...) @@ -2103,7 +2252,8 @@ struct produce : pro { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2112,11 +2262,12 @@ struct produce : pro } } - HRESULT __stdcall get_FileOutputNode(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileOutputNode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileOutputNode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileOutputNode()); return S_OK; } catch (...) @@ -2134,7 +2285,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2143,11 +2295,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Graph(abi_arg_out value) noexcept override + HRESULT __stdcall get_Graph(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Graph()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Graph()); return S_OK; } catch (...) @@ -2165,6 +2318,7 @@ struct produce : produce_baseshim()); this->shim().WetDryMix(value); return S_OK; } @@ -2178,7 +2332,8 @@ struct produce : produce_baseshim().WetDryMix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WetDryMix()); return S_OK; } catch (...) @@ -2191,6 +2346,7 @@ struct produce : produce_baseshim()); this->shim().Feedback(value); return S_OK; } @@ -2204,7 +2360,8 @@ struct produce : produce_baseshim().Feedback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Feedback()); return S_OK; } catch (...) @@ -2217,6 +2374,7 @@ struct produce : produce_baseshim()); this->shim().Delay(value); return S_OK; } @@ -2230,7 +2388,8 @@ struct produce : produce_baseshim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -2243,11 +2402,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in audioGraph, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in audioGraph, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&audioGraph))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&audioGraph))); return S_OK; } catch (...) @@ -2265,7 +2425,8 @@ struct produce : produce_baseshim().Bandwidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bandwidth()); return S_OK; } catch (...) @@ -2278,6 +2439,7 @@ struct produce : produce_baseshim()); this->shim().Bandwidth(value); return S_OK; } @@ -2291,7 +2453,8 @@ struct produce : produce_baseshim().FrequencyCenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrequencyCenter()); return S_OK; } catch (...) @@ -2304,6 +2467,7 @@ struct produce : produce_baseshim()); this->shim().FrequencyCenter(value); return S_OK; } @@ -2317,7 +2481,8 @@ struct produce : produce_baseshim().Gain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gain()); return S_OK; } catch (...) @@ -2330,6 +2495,7 @@ struct produce : produce_baseshim()); this->shim().Gain(value); return S_OK; } @@ -2343,11 +2509,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Bands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Bands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Bands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bands()); return S_OK; } catch (...) @@ -2361,11 +2528,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in audioGraph, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in audioGraph, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&audioGraph))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&audioGraph))); return S_OK; } catch (...) @@ -2383,7 +2551,8 @@ struct produce { try { - *value = detach(this->shim().RequiredSamples()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiredSamples()); return S_OK; } catch (...) @@ -2400,6 +2569,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Release(value); return S_OK; } @@ -2413,7 +2583,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Release()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Release()); return S_OK; } catch (...) @@ -2426,6 +2597,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Loudness(value); return S_OK; } @@ -2439,7 +2611,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Loudness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Loudness()); return S_OK; } catch (...) @@ -2452,11 +2625,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in audioGraph, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in audioGraph, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&audioGraph))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&audioGraph))); return S_OK; } catch (...) @@ -2474,6 +2648,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().WetDryMix(value); return S_OK; } @@ -2487,7 +2662,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().WetDryMix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WetDryMix()); return S_OK; } catch (...) @@ -2500,6 +2676,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReflectionsDelay(value); return S_OK; } @@ -2513,7 +2690,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ReflectionsDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReflectionsDelay()); return S_OK; } catch (...) @@ -2526,6 +2704,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReverbDelay(value); return S_OK; } @@ -2539,7 +2718,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ReverbDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReverbDelay()); return S_OK; } catch (...) @@ -2552,6 +2732,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().RearDelay(value); return S_OK; } @@ -2565,7 +2746,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().RearDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RearDelay()); return S_OK; } catch (...) @@ -2578,6 +2760,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionLeft(value); return S_OK; } @@ -2591,7 +2774,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PositionLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionLeft()); return S_OK; } catch (...) @@ -2604,6 +2788,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionRight(value); return S_OK; } @@ -2617,7 +2802,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PositionRight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionRight()); return S_OK; } catch (...) @@ -2630,6 +2816,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionMatrixLeft(value); return S_OK; } @@ -2643,7 +2830,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PositionMatrixLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionMatrixLeft()); return S_OK; } catch (...) @@ -2656,6 +2844,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionMatrixRight(value); return S_OK; } @@ -2669,7 +2858,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PositionMatrixRight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionMatrixRight()); return S_OK; } catch (...) @@ -2682,6 +2872,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().EarlyDiffusion(value); return S_OK; } @@ -2695,7 +2886,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().EarlyDiffusion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EarlyDiffusion()); return S_OK; } catch (...) @@ -2708,6 +2900,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LateDiffusion(value); return S_OK; } @@ -2721,7 +2914,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().LateDiffusion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LateDiffusion()); return S_OK; } catch (...) @@ -2734,6 +2928,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LowEQGain(value); return S_OK; } @@ -2747,7 +2942,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().LowEQGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowEQGain()); return S_OK; } catch (...) @@ -2760,6 +2956,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LowEQCutoff(value); return S_OK; } @@ -2773,7 +2970,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().LowEQCutoff()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowEQCutoff()); return S_OK; } catch (...) @@ -2786,6 +2984,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().HighEQGain(value); return S_OK; } @@ -2799,7 +2998,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().HighEQGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighEQGain()); return S_OK; } catch (...) @@ -2812,6 +3012,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().HighEQCutoff(value); return S_OK; } @@ -2825,7 +3026,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().HighEQCutoff()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighEQCutoff()); return S_OK; } catch (...) @@ -2838,6 +3040,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().RoomFilterFreq(value); return S_OK; } @@ -2851,7 +3054,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().RoomFilterFreq()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoomFilterFreq()); return S_OK; } catch (...) @@ -2864,6 +3068,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().RoomFilterMain(value); return S_OK; } @@ -2877,7 +3082,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().RoomFilterMain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoomFilterMain()); return S_OK; } catch (...) @@ -2890,6 +3096,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().RoomFilterHF(value); return S_OK; } @@ -2903,7 +3110,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().RoomFilterHF()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoomFilterHF()); return S_OK; } catch (...) @@ -2916,6 +3124,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReflectionsGain(value); return S_OK; } @@ -2929,7 +3138,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ReflectionsGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReflectionsGain()); return S_OK; } catch (...) @@ -2942,6 +3152,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReverbGain(value); return S_OK; } @@ -2955,7 +3166,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ReverbGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReverbGain()); return S_OK; } catch (...) @@ -2968,6 +3180,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().DecayTime(value); return S_OK; } @@ -2981,7 +3194,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().DecayTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecayTime()); return S_OK; } catch (...) @@ -2994,6 +3208,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Density(value); return S_OK; } @@ -3007,7 +3222,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Density()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Density()); return S_OK; } catch (...) @@ -3020,6 +3236,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().RoomSize(value); return S_OK; } @@ -3033,7 +3250,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().RoomSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoomSize()); return S_OK; } catch (...) @@ -3046,6 +3264,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableLateField(value); return S_OK; } @@ -3059,7 +3278,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().DisableLateField()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisableLateField()); return S_OK; } catch (...) @@ -3072,11 +3292,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in audioGraph, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in audioGraph, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&audioGraph))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&audioGraph))); return S_OK; } catch (...) @@ -3094,310 +3315,310 @@ namespace Windows::Media::Audio { template Windows::Media::Audio::AudioGraphCreationStatus impl_ICreateAudioGraphResult::Status() const { Windows::Media::Audio::AudioGraphCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ICreateAudioGraphResult)->get_Status(&value)); return value; } template Windows::Media::Audio::AudioGraph impl_ICreateAudioGraphResult::Graph() const { Windows::Media::Audio::AudioGraph value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Graph(put(value))); + check_hresult(WINRT_SHIM(ICreateAudioGraphResult)->get_Graph(put_abi(value))); return value; } template Windows::Media::Audio::AudioGraphSettings impl_IAudioGraphSettingsFactory::Create(Windows::Media::Render::AudioRenderCategory audioRenderCategory) const { Windows::Media::Audio::AudioGraphSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(audioRenderCategory, put(value))); + check_hresult(WINRT_SHIM(IAudioGraphSettingsFactory)->abi_Create(audioRenderCategory, put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioGraphSettings::EncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_EncodingProperties(put_abi(value))); return value; } template void impl_IAudioGraphSettings::EncodingProperties(const Windows::Media::MediaProperties::AudioEncodingProperties & value) const { - check_hresult(static_cast(static_cast(*this))->put_EncodingProperties(get(value))); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_EncodingProperties(get_abi(value))); } template Windows::Devices::Enumeration::DeviceInformation impl_IAudioGraphSettings::PrimaryRenderDevice() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryRenderDevice(put(value))); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_PrimaryRenderDevice(put_abi(value))); return value; } template void impl_IAudioGraphSettings::PrimaryRenderDevice(const Windows::Devices::Enumeration::DeviceInformation & value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryRenderDevice(get(value))); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_PrimaryRenderDevice(get_abi(value))); } template Windows::Media::Audio::QuantumSizeSelectionMode impl_IAudioGraphSettings::QuantumSizeSelectionMode() const { Windows::Media::Audio::QuantumSizeSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_QuantumSizeSelectionMode(&value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_QuantumSizeSelectionMode(&value)); return value; } template void impl_IAudioGraphSettings::QuantumSizeSelectionMode(Windows::Media::Audio::QuantumSizeSelectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_QuantumSizeSelectionMode(value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_QuantumSizeSelectionMode(value)); } template int32_t impl_IAudioGraphSettings::DesiredSamplesPerQuantum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredSamplesPerQuantum(&value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_DesiredSamplesPerQuantum(&value)); return value; } template void impl_IAudioGraphSettings::DesiredSamplesPerQuantum(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredSamplesPerQuantum(value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_DesiredSamplesPerQuantum(value)); } template Windows::Media::Render::AudioRenderCategory impl_IAudioGraphSettings::AudioRenderCategory() const { Windows::Media::Render::AudioRenderCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioRenderCategory(&value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_AudioRenderCategory(&value)); return value; } template void impl_IAudioGraphSettings::AudioRenderCategory(Windows::Media::Render::AudioRenderCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioRenderCategory(value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_AudioRenderCategory(value)); } template Windows::Media::AudioProcessing impl_IAudioGraphSettings::DesiredRenderDeviceAudioProcessing() const { Windows::Media::AudioProcessing value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredRenderDeviceAudioProcessing(&value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->get_DesiredRenderDeviceAudioProcessing(&value)); return value; } template void impl_IAudioGraphSettings::DesiredRenderDeviceAudioProcessing(Windows::Media::AudioProcessing value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredRenderDeviceAudioProcessing(value)); + check_hresult(WINRT_SHIM(IAudioGraphSettings)->put_DesiredRenderDeviceAudioProcessing(value)); } template Windows::Foundation::IAsyncOperation impl_IAudioGraphStatics::CreateAsync(const Windows::Media::Audio::AudioGraphSettings & settings) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(get(settings), put(result))); + check_hresult(WINRT_SHIM(IAudioGraphStatics)->abi_CreateAsync(get_abi(settings), put_abi(result))); return result; } template Windows::Media::Audio::AudioDeviceNodeCreationStatus impl_ICreateAudioDeviceInputNodeResult::Status() const { Windows::Media::Audio::AudioDeviceNodeCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ICreateAudioDeviceInputNodeResult)->get_Status(&value)); return value; } template Windows::Media::Audio::AudioDeviceInputNode impl_ICreateAudioDeviceInputNodeResult::DeviceInputNode() const { Windows::Media::Audio::AudioDeviceInputNode value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInputNode(put(value))); + check_hresult(WINRT_SHIM(ICreateAudioDeviceInputNodeResult)->get_DeviceInputNode(put_abi(value))); return value; } template Windows::Media::Audio::AudioDeviceNodeCreationStatus impl_ICreateAudioDeviceOutputNodeResult::Status() const { Windows::Media::Audio::AudioDeviceNodeCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ICreateAudioDeviceOutputNodeResult)->get_Status(&value)); return value; } template Windows::Media::Audio::AudioDeviceOutputNode impl_ICreateAudioDeviceOutputNodeResult::DeviceOutputNode() const { Windows::Media::Audio::AudioDeviceOutputNode value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceOutputNode(put(value))); + check_hresult(WINRT_SHIM(ICreateAudioDeviceOutputNodeResult)->get_DeviceOutputNode(put_abi(value))); return value; } template Windows::Media::Audio::AudioFileNodeCreationStatus impl_ICreateAudioFileInputNodeResult::Status() const { Windows::Media::Audio::AudioFileNodeCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ICreateAudioFileInputNodeResult)->get_Status(&value)); return value; } template Windows::Media::Audio::AudioFileInputNode impl_ICreateAudioFileInputNodeResult::FileInputNode() const { Windows::Media::Audio::AudioFileInputNode value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FileInputNode(put(value))); + check_hresult(WINRT_SHIM(ICreateAudioFileInputNodeResult)->get_FileInputNode(put_abi(value))); return value; } template Windows::Media::Audio::AudioFileNodeCreationStatus impl_ICreateAudioFileOutputNodeResult::Status() const { Windows::Media::Audio::AudioFileNodeCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ICreateAudioFileOutputNodeResult)->get_Status(&value)); return value; } template Windows::Media::Audio::AudioFileOutputNode impl_ICreateAudioFileOutputNodeResult::FileOutputNode() const { Windows::Media::Audio::AudioFileOutputNode value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FileOutputNode(put(value))); + check_hresult(WINRT_SHIM(ICreateAudioFileOutputNodeResult)->get_FileOutputNode(put_abi(value))); return value; } template Windows::Media::Audio::AudioGraphUnrecoverableError impl_IAudioGraphUnrecoverableErrorOccurredEventArgs::Error() const { Windows::Media::Audio::AudioGraphUnrecoverableError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IAudioGraphUnrecoverableErrorOccurredEventArgs)->get_Error(&value)); return value; } template Windows::Media::Audio::AudioFrameInputNode impl_IAudioGraph::CreateFrameInputNode() const { Windows::Media::Audio::AudioFrameInputNode frameInputNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameInputNode(put(frameInputNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFrameInputNode(put_abi(frameInputNode))); return frameInputNode; } template Windows::Media::Audio::AudioFrameInputNode impl_IAudioGraph::CreateFrameInputNode(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { Windows::Media::Audio::AudioFrameInputNode frameInputNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameInputNodeWithFormat(get(encodingProperties), put(frameInputNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFrameInputNodeWithFormat(get_abi(encodingProperties), put_abi(frameInputNode))); return frameInputNode; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateDeviceInputNodeAsync(Windows::Media::Capture::MediaCategory category) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceInputNodeAsync(category, put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateDeviceInputNodeAsync(category, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateDeviceInputNodeAsync(Windows::Media::Capture::MediaCategory category, const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceInputNodeWithFormatAsync(category, get(encodingProperties), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateDeviceInputNodeWithFormatAsync(category, get_abi(encodingProperties), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateDeviceInputNodeAsync(Windows::Media::Capture::MediaCategory category, const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties, const Windows::Devices::Enumeration::DeviceInformation & device) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceInputNodeWithFormatOnDeviceAsync(category, get(encodingProperties), get(device), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateDeviceInputNodeWithFormatOnDeviceAsync(category, get_abi(encodingProperties), get_abi(device), put_abi(result))); return result; } template Windows::Media::Audio::AudioFrameOutputNode impl_IAudioGraph::CreateFrameOutputNode() const { Windows::Media::Audio::AudioFrameOutputNode frameOutputNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameOutputNode(put(frameOutputNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFrameOutputNode(put_abi(frameOutputNode))); return frameOutputNode; } template Windows::Media::Audio::AudioFrameOutputNode impl_IAudioGraph::CreateFrameOutputNode(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { Windows::Media::Audio::AudioFrameOutputNode frameOutputNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameOutputNodeWithFormat(get(encodingProperties), put(frameOutputNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFrameOutputNodeWithFormat(get_abi(encodingProperties), put_abi(frameOutputNode))); return frameOutputNode; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateDeviceOutputNodeAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceOutputNodeAsync(put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateDeviceOutputNodeAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateFileInputNodeAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileInputNodeAsync(get(file), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFileInputNodeAsync(get_abi(file), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateFileOutputNodeAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileOutputNodeAsync(get(file), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFileOutputNodeAsync(get_abi(file), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph::CreateFileOutputNodeAsync(const Windows::Storage::IStorageFile & file, const Windows::Media::MediaProperties::MediaEncodingProfile & fileEncodingProfile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileOutputNodeWithFileProfileAsync(get(file), get(fileEncodingProfile), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateFileOutputNodeWithFileProfileAsync(get_abi(file), get_abi(fileEncodingProfile), put_abi(result))); return result; } template Windows::Media::Audio::AudioSubmixNode impl_IAudioGraph::CreateSubmixNode() const { Windows::Media::Audio::AudioSubmixNode submixNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSubmixNode(put(submixNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateSubmixNode(put_abi(submixNode))); return submixNode; } template Windows::Media::Audio::AudioSubmixNode impl_IAudioGraph::CreateSubmixNode(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { Windows::Media::Audio::AudioSubmixNode submixNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSubmixNodeWithFormat(get(encodingProperties), put(submixNode))); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_CreateSubmixNodeWithFormat(get_abi(encodingProperties), put_abi(submixNode))); return submixNode; } template void impl_IAudioGraph::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_Start()); } template void impl_IAudioGraph::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_Stop()); } template void impl_IAudioGraph::ResetAllNodes() const { - check_hresult(static_cast(static_cast(*this))->abi_ResetAllNodes()); + check_hresult(WINRT_SHIM(IAudioGraph)->abi_ResetAllNodes()); } -template event_token impl_IAudioGraph::QuantumStarted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAudioGraph::QuantumStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuantumStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioGraph)->add_QuantumStarted(get_abi(handler), &token)); return token; } -template event_revoker impl_IAudioGraph::QuantumStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAudioGraph::QuantumStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Audio::IAudioGraph::remove_QuantumStarted, QuantumStarted(handler)); } template void impl_IAudioGraph::QuantumStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuantumStarted(token)); + check_hresult(WINRT_SHIM(IAudioGraph)->remove_QuantumStarted(token)); } -template event_token impl_IAudioGraph::QuantumProcessed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAudioGraph::QuantumProcessed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuantumProcessed(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioGraph)->add_QuantumProcessed(get_abi(handler), &token)); return token; } -template event_revoker impl_IAudioGraph::QuantumProcessed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAudioGraph::QuantumProcessed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Audio::IAudioGraph::remove_QuantumProcessed, QuantumProcessed(handler)); } template void impl_IAudioGraph::QuantumProcessed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuantumProcessed(token)); + check_hresult(WINRT_SHIM(IAudioGraph)->remove_QuantumProcessed(token)); } template event_token impl_IAudioGraph::UnrecoverableErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UnrecoverableErrorOccurred(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioGraph)->add_UnrecoverableErrorOccurred(get_abi(handler), &token)); return token; } @@ -3408,223 +3629,223 @@ template event_revoker impl_IAudioGraph::Unrecovera template void impl_IAudioGraph::UnrecoverableErrorOccurred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UnrecoverableErrorOccurred(token)); + check_hresult(WINRT_SHIM(IAudioGraph)->remove_UnrecoverableErrorOccurred(token)); } template uint64_t impl_IAudioGraph::CompletedQuantumCount() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CompletedQuantumCount(&value)); + check_hresult(WINRT_SHIM(IAudioGraph)->get_CompletedQuantumCount(&value)); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioGraph::EncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioGraph)->get_EncodingProperties(put_abi(value))); return value; } template int32_t impl_IAudioGraph::LatencyInSamples() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LatencyInSamples(&value)); + check_hresult(WINRT_SHIM(IAudioGraph)->get_LatencyInSamples(&value)); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IAudioGraph::PrimaryRenderDevice() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryRenderDevice(put(value))); + check_hresult(WINRT_SHIM(IAudioGraph)->get_PrimaryRenderDevice(put_abi(value))); return value; } template Windows::Media::AudioProcessing impl_IAudioGraph::RenderDeviceAudioProcessing() const { Windows::Media::AudioProcessing value {}; - check_hresult(static_cast(static_cast(*this))->get_RenderDeviceAudioProcessing(&value)); + check_hresult(WINRT_SHIM(IAudioGraph)->get_RenderDeviceAudioProcessing(&value)); return value; } template int32_t impl_IAudioGraph::SamplesPerQuantum() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SamplesPerQuantum(&value)); + check_hresult(WINRT_SHIM(IAudioGraph)->get_SamplesPerQuantum(&value)); return value; } template Windows::Media::Audio::AudioFrameInputNode impl_IAudioGraph2::CreateFrameInputNode(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties, const Windows::Media::Audio::AudioNodeEmitter & emitter) const { Windows::Media::Audio::AudioFrameInputNode frameInputNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameInputNodeWithFormatAndEmitter(get(encodingProperties), get(emitter), put(frameInputNode))); + check_hresult(WINRT_SHIM(IAudioGraph2)->abi_CreateFrameInputNodeWithFormatAndEmitter(get_abi(encodingProperties), get_abi(emitter), put_abi(frameInputNode))); return frameInputNode; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph2::CreateDeviceInputNodeAsync(Windows::Media::Capture::MediaCategory category, const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties, const Windows::Devices::Enumeration::DeviceInformation & device, const Windows::Media::Audio::AudioNodeEmitter & emitter) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(category, get(encodingProperties), get(device), get(emitter), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph2)->abi_CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(category, get_abi(encodingProperties), get_abi(device), get_abi(emitter), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAudioGraph2::CreateFileInputNodeAsync(const Windows::Storage::IStorageFile & file, const Windows::Media::Audio::AudioNodeEmitter & emitter) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileInputNodeWithEmitterAsync(get(file), get(emitter), put(result))); + check_hresult(WINRT_SHIM(IAudioGraph2)->abi_CreateFileInputNodeWithEmitterAsync(get_abi(file), get_abi(emitter), put_abi(result))); return result; } template Windows::Media::Audio::AudioSubmixNode impl_IAudioGraph2::CreateSubmixNode(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties, const Windows::Media::Audio::AudioNodeEmitter & emitter) const { Windows::Media::Audio::AudioSubmixNode submixNode { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSubmixNodeWithFormatAndEmitter(get(encodingProperties), get(emitter), put(submixNode))); + check_hresult(WINRT_SHIM(IAudioGraph2)->abi_CreateSubmixNodeWithFormatAndEmitter(get_abi(encodingProperties), get_abi(emitter), put_abi(submixNode))); return submixNode; } template Windows::Media::Audio::AudioGraphBatchUpdater impl_IAudioGraph2::CreateBatchUpdater() const { Windows::Media::Audio::AudioGraphBatchUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBatchUpdater(put(updater))); + check_hresult(WINRT_SHIM(IAudioGraph2)->abi_CreateBatchUpdater(put_abi(updater))); return updater; } template Windows::Foundation::Collections::IVector impl_IAudioNode::EffectDefinitions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_EffectDefinitions(put(value))); + check_hresult(WINRT_SHIM(IAudioNode)->get_EffectDefinitions(put_abi(value))); return value; } template void impl_IAudioNode::OutgoingGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_OutgoingGain(value)); + check_hresult(WINRT_SHIM(IAudioNode)->put_OutgoingGain(value)); } template double impl_IAudioNode::OutgoingGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OutgoingGain(&value)); + check_hresult(WINRT_SHIM(IAudioNode)->get_OutgoingGain(&value)); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioNode::EncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioNode)->get_EncodingProperties(put_abi(value))); return value; } template bool impl_IAudioNode::ConsumeInput() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ConsumeInput(&value)); + check_hresult(WINRT_SHIM(IAudioNode)->get_ConsumeInput(&value)); return value; } template void impl_IAudioNode::ConsumeInput(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ConsumeInput(value)); + check_hresult(WINRT_SHIM(IAudioNode)->put_ConsumeInput(value)); } template void impl_IAudioNode::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IAudioNode)->abi_Start()); } template void impl_IAudioNode::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IAudioNode)->abi_Stop()); } template void impl_IAudioNode::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IAudioNode)->abi_Reset()); } template void impl_IAudioNode::DisableEffectsByDefinition(const Windows::Media::Effects::IAudioEffectDefinition & definition) const { - check_hresult(static_cast(static_cast(*this))->abi_DisableEffectsByDefinition(get(definition))); + check_hresult(WINRT_SHIM(IAudioNode)->abi_DisableEffectsByDefinition(get_abi(definition))); } template void impl_IAudioNode::EnableEffectsByDefinition(const Windows::Media::Effects::IAudioEffectDefinition & definition) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableEffectsByDefinition(get(definition))); + check_hresult(WINRT_SHIM(IAudioNode)->abi_EnableEffectsByDefinition(get_abi(definition))); } template void impl_IAudioNodeWithListener::Listener(const Windows::Media::Audio::AudioNodeListener & value) const { - check_hresult(static_cast(static_cast(*this))->put_Listener(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeWithListener)->put_Listener(get_abi(value))); } template Windows::Media::Audio::AudioNodeListener impl_IAudioNodeWithListener::Listener() const { Windows::Media::Audio::AudioNodeListener value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Listener(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeWithListener)->get_Listener(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IAudioInputNode::OutgoingConnections() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_OutgoingConnections(put(value))); + check_hresult(WINRT_SHIM(IAudioInputNode)->get_OutgoingConnections(put_abi(value))); return value; } template void impl_IAudioInputNode::AddOutgoingConnection(const Windows::Media::Audio::IAudioNode & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_AddOutgoingConnection(get(destination))); + check_hresult(WINRT_SHIM(IAudioInputNode)->abi_AddOutgoingConnection(get_abi(destination))); } template void impl_IAudioInputNode::AddOutgoingConnection(const Windows::Media::Audio::IAudioNode & destination, double gain) const { - check_hresult(static_cast(static_cast(*this))->abi_AddOutgoingConnectionWithGain(get(destination), gain)); + check_hresult(WINRT_SHIM(IAudioInputNode)->abi_AddOutgoingConnectionWithGain(get_abi(destination), gain)); } template void impl_IAudioInputNode::RemoveOutgoingConnection(const Windows::Media::Audio::IAudioNode & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveOutgoingConnection(get(destination))); + check_hresult(WINRT_SHIM(IAudioInputNode)->abi_RemoveOutgoingConnection(get_abi(destination))); } template Windows::Media::Audio::AudioNodeEmitter impl_IAudioInputNode2::Emitter() const { Windows::Media::Audio::AudioNodeEmitter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Emitter(put(value))); + check_hresult(WINRT_SHIM(IAudioInputNode2)->get_Emitter(put_abi(value))); return value; } template void impl_IAudioFrameInputNode::PlaybackSpeedFactor(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackSpeedFactor(value)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->put_PlaybackSpeedFactor(value)); } template double impl_IAudioFrameInputNode::PlaybackSpeedFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackSpeedFactor(&value)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->get_PlaybackSpeedFactor(&value)); return value; } template void impl_IAudioFrameInputNode::AddFrame(const Windows::Media::AudioFrame & frame) const { - check_hresult(static_cast(static_cast(*this))->abi_AddFrame(get(frame))); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->abi_AddFrame(get_abi(frame))); } template void impl_IAudioFrameInputNode::DiscardQueuedFrames() const { - check_hresult(static_cast(static_cast(*this))->abi_DiscardQueuedFrames()); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->abi_DiscardQueuedFrames()); } template uint64_t impl_IAudioFrameInputNode::QueuedSampleCount() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_QueuedSampleCount(&value)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->get_QueuedSampleCount(&value)); return value; } template event_token impl_IAudioFrameInputNode::AudioFrameCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioFrameCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->add_AudioFrameCompleted(get_abi(handler), &token)); return token; } @@ -3635,13 +3856,13 @@ template event_revoker impl_IAudioFrameInputN template void impl_IAudioFrameInputNode::AudioFrameCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioFrameCompleted(token)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->remove_AudioFrameCompleted(token)); } template event_token impl_IAudioFrameInputNode::QuantumStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuantumStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->add_QuantumStarted(get_abi(handler), &token)); return token; } @@ -3652,844 +3873,844 @@ template event_revoker impl_IAudioFrameInputN template void impl_IAudioFrameInputNode::QuantumStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuantumStarted(token)); + check_hresult(WINRT_SHIM(IAudioFrameInputNode)->remove_QuantumStarted(token)); } template void impl_IAudioFileInputNode::PlaybackSpeedFactor(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackSpeedFactor(value)); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->put_PlaybackSpeedFactor(value)); } template double impl_IAudioFileInputNode::PlaybackSpeedFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackSpeedFactor(&value)); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_PlaybackSpeedFactor(&value)); return value; } template Windows::Foundation::TimeSpan impl_IAudioFileInputNode::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_Position(put_abi(value))); return value; } template void impl_IAudioFileInputNode::Seek(const Windows::Foundation::TimeSpan & position) const { - check_hresult(static_cast(static_cast(*this))->abi_Seek(get(position))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->abi_Seek(get_abi(position))); } template Windows::Foundation::IReference impl_IAudioFileInputNode::StartTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_StartTime(put_abi(value))); return value; } -template void impl_IAudioFileInputNode::StartTime(const Windows::Foundation::IReference & value) const +template void impl_IAudioFileInputNode::StartTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->put_StartTime(get_abi(value))); } template Windows::Foundation::IReference impl_IAudioFileInputNode::EndTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_EndTime(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_EndTime(put_abi(value))); return value; } -template void impl_IAudioFileInputNode::EndTime(const Windows::Foundation::IReference & value) const +template void impl_IAudioFileInputNode::EndTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_EndTime(get(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->put_EndTime(get_abi(value))); } template Windows::Foundation::IReference impl_IAudioFileInputNode::LoopCount() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_LoopCount(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_LoopCount(put_abi(value))); return value; } -template void impl_IAudioFileInputNode::LoopCount(const Windows::Foundation::IReference & value) const +template void impl_IAudioFileInputNode::LoopCount(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_LoopCount(get(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->put_LoopCount(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IAudioFileInputNode::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_Duration(put_abi(value))); return value; } template Windows::Storage::StorageFile impl_IAudioFileInputNode::SourceFile() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceFile(put(value))); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->get_SourceFile(put_abi(value))); return value; } -template event_token impl_IAudioFileInputNode::FileCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAudioFileInputNode::FileCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FileCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->add_FileCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IAudioFileInputNode::FileCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAudioFileInputNode::FileCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Audio::IAudioFileInputNode::remove_FileCompleted, FileCompleted(handler)); } template void impl_IAudioFileInputNode::FileCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FileCompleted(token)); + check_hresult(WINRT_SHIM(IAudioFileInputNode)->remove_FileCompleted(token)); } template Windows::Devices::Enumeration::DeviceInformation impl_IAudioDeviceInputNode::Device() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IAudioDeviceInputNode)->get_Device(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IAudioDeviceOutputNode::Device() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IAudioDeviceOutputNode)->get_Device(put_abi(value))); return value; } template Windows::Media::AudioFrame impl_IAudioFrameOutputNode::GetFrame() const { Windows::Media::AudioFrame audioFrame { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetFrame(put(audioFrame))); + check_hresult(WINRT_SHIM(IAudioFrameOutputNode)->abi_GetFrame(put_abi(audioFrame))); return audioFrame; } template Windows::Storage::IStorageFile impl_IAudioFileOutputNode::File() const { Windows::Storage::IStorageFile value; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IAudioFileOutputNode)->get_File(put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IAudioFileOutputNode::FileEncodingProfile() const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FileEncodingProfile(put(value))); + check_hresult(WINRT_SHIM(IAudioFileOutputNode)->get_FileEncodingProfile(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IAudioFileOutputNode::FinalizeAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FinalizeAsync(put(result))); + check_hresult(WINRT_SHIM(IAudioFileOutputNode)->abi_FinalizeAsync(put_abi(result))); return result; } template Windows::Media::AudioFrame impl_IAudioFrameCompletedEventArgs::Frame() const { Windows::Media::AudioFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IAudioFrameCompletedEventArgs)->get_Frame(put_abi(value))); return value; } template int32_t impl_IFrameInputNodeQuantumStartedEventArgs::RequiredSamples() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequiredSamples(&value)); + check_hresult(WINRT_SHIM(IFrameInputNodeQuantumStartedEventArgs)->get_RequiredSamples(&value)); return value; } template Windows::Media::Audio::IAudioNode impl_IAudioGraphConnection::Destination() const { Windows::Media::Audio::IAudioNode value; - check_hresult(static_cast(static_cast(*this))->get_Destination(put(value))); + check_hresult(WINRT_SHIM(IAudioGraphConnection)->get_Destination(put_abi(value))); return value; } template void impl_IAudioGraphConnection::Gain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Gain(value)); + check_hresult(WINRT_SHIM(IAudioGraphConnection)->put_Gain(value)); } template double impl_IAudioGraphConnection::Gain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Gain(&value)); + check_hresult(WINRT_SHIM(IAudioGraphConnection)->get_Gain(&value)); return value; } template double impl_IEqualizerBand::Bandwidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Bandwidth(&value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->get_Bandwidth(&value)); return value; } template void impl_IEqualizerBand::Bandwidth(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Bandwidth(value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->put_Bandwidth(value)); } template double impl_IEqualizerBand::FrequencyCenter() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FrequencyCenter(&value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->get_FrequencyCenter(&value)); return value; } template void impl_IEqualizerBand::FrequencyCenter(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FrequencyCenter(value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->put_FrequencyCenter(value)); } template double impl_IEqualizerBand::Gain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Gain(&value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->get_Gain(&value)); return value; } template void impl_IEqualizerBand::Gain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Gain(value)); + check_hresult(WINRT_SHIM(IEqualizerBand)->put_Gain(value)); } template Windows::Media::Audio::EqualizerEffectDefinition impl_IEqualizerEffectDefinitionFactory::Create(const Windows::Media::Audio::AudioGraph & audioGraph) const { Windows::Media::Audio::EqualizerEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(audioGraph), put(value))); + check_hresult(WINRT_SHIM(IEqualizerEffectDefinitionFactory)->abi_Create(get_abi(audioGraph), put_abi(value))); return value; } template Windows::Media::Audio::ReverbEffectDefinition impl_IReverbEffectDefinitionFactory::Create(const Windows::Media::Audio::AudioGraph & audioGraph) const { Windows::Media::Audio::ReverbEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(audioGraph), put(value))); + check_hresult(WINRT_SHIM(IReverbEffectDefinitionFactory)->abi_Create(get_abi(audioGraph), put_abi(value))); return value; } template Windows::Media::Audio::EchoEffectDefinition impl_IEchoEffectDefinitionFactory::Create(const Windows::Media::Audio::AudioGraph & audioGraph) const { Windows::Media::Audio::EchoEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(audioGraph), put(value))); + check_hresult(WINRT_SHIM(IEchoEffectDefinitionFactory)->abi_Create(get_abi(audioGraph), put_abi(value))); return value; } template Windows::Media::Audio::LimiterEffectDefinition impl_ILimiterEffectDefinitionFactory::Create(const Windows::Media::Audio::AudioGraph & audioGraph) const { Windows::Media::Audio::LimiterEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(audioGraph), put(value))); + check_hresult(WINRT_SHIM(ILimiterEffectDefinitionFactory)->abi_Create(get_abi(audioGraph), put_abi(value))); return value; } template double impl_IAudioNodeEmitterConeProperties::InnerAngle() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_InnerAngle(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterConeProperties)->get_InnerAngle(&value)); return value; } template double impl_IAudioNodeEmitterConeProperties::OuterAngle() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OuterAngle(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterConeProperties)->get_OuterAngle(&value)); return value; } template double impl_IAudioNodeEmitterConeProperties::OuterAngleGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OuterAngleGain(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterConeProperties)->get_OuterAngleGain(&value)); return value; } template Windows::Media::Audio::AudioNodeEmitterShapeKind impl_IAudioNodeEmitterShape::Kind() const { Windows::Media::Audio::AudioNodeEmitterShapeKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterShape)->get_Kind(&value)); return value; } template Windows::Media::Audio::AudioNodeEmitterConeProperties impl_IAudioNodeEmitterShape::ConeProperties() const { Windows::Media::Audio::AudioNodeEmitterConeProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConeProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterShape)->get_ConeProperties(put_abi(value))); return value; } template Windows::Media::Audio::AudioNodeEmitterShape impl_IAudioNodeEmitterShapeStatics::CreateCone(double innerAngle, double outerAngle, double outerAngleGain) const { Windows::Media::Audio::AudioNodeEmitterShape shape { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCone(innerAngle, outerAngle, outerAngleGain, put(shape))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterShapeStatics)->abi_CreateCone(innerAngle, outerAngle, outerAngleGain, put_abi(shape))); return shape; } template Windows::Media::Audio::AudioNodeEmitterShape impl_IAudioNodeEmitterShapeStatics::CreateOmnidirectional() const { Windows::Media::Audio::AudioNodeEmitterShape shape { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOmnidirectional(put(shape))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterShapeStatics)->abi_CreateOmnidirectional(put_abi(shape))); return shape; } template double impl_IAudioNodeEmitterNaturalDecayModelProperties::UnityGainDistance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_UnityGainDistance(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterNaturalDecayModelProperties)->get_UnityGainDistance(&value)); return value; } template double impl_IAudioNodeEmitterNaturalDecayModelProperties::CutoffDistance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CutoffDistance(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterNaturalDecayModelProperties)->get_CutoffDistance(&value)); return value; } template Windows::Media::Audio::AudioNodeEmitterDecayKind impl_IAudioNodeEmitterDecayModel::Kind() const { Windows::Media::Audio::AudioNodeEmitterDecayKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModel)->get_Kind(&value)); return value; } template double impl_IAudioNodeEmitterDecayModel::MinGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinGain(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModel)->get_MinGain(&value)); return value; } template double impl_IAudioNodeEmitterDecayModel::MaxGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxGain(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModel)->get_MaxGain(&value)); return value; } template Windows::Media::Audio::AudioNodeEmitterNaturalDecayModelProperties impl_IAudioNodeEmitterDecayModel::NaturalProperties() const { Windows::Media::Audio::AudioNodeEmitterNaturalDecayModelProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NaturalProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModel)->get_NaturalProperties(put_abi(value))); return value; } template Windows::Media::Audio::AudioNodeEmitterDecayModel impl_IAudioNodeEmitterDecayModelStatics::CreateNatural(double minGain, double maxGain, double unityGainDistance, double cutoffDistance) const { Windows::Media::Audio::AudioNodeEmitterDecayModel decayModel { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNatural(minGain, maxGain, unityGainDistance, cutoffDistance, put(decayModel))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModelStatics)->abi_CreateNatural(minGain, maxGain, unityGainDistance, cutoffDistance, put_abi(decayModel))); return decayModel; } template Windows::Media::Audio::AudioNodeEmitterDecayModel impl_IAudioNodeEmitterDecayModelStatics::CreateCustom(double minGain, double maxGain) const { Windows::Media::Audio::AudioNodeEmitterDecayModel decayModel { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCustom(minGain, maxGain, put(decayModel))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterDecayModelStatics)->abi_CreateCustom(minGain, maxGain, put_abi(decayModel))); return decayModel; } template Windows::Foundation::Numerics::float3 impl_IAudioNodeEmitter::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_Position(put_abi(value))); return value; } template void impl_IAudioNodeEmitter::Position(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_Position(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_IAudioNodeEmitter::Direction() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_Direction(put_abi(value))); return value; } template void impl_IAudioNodeEmitter::Direction(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Direction(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_Direction(get_abi(value))); } template Windows::Media::Audio::AudioNodeEmitterShape impl_IAudioNodeEmitter::Shape() const { Windows::Media::Audio::AudioNodeEmitterShape value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Shape(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_Shape(put_abi(value))); return value; } template Windows::Media::Audio::AudioNodeEmitterDecayModel impl_IAudioNodeEmitter::DecayModel() const { Windows::Media::Audio::AudioNodeEmitterDecayModel value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DecayModel(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_DecayModel(put_abi(value))); return value; } template double impl_IAudioNodeEmitter::Gain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Gain(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_Gain(&value)); return value; } template void impl_IAudioNodeEmitter::Gain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Gain(value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_Gain(value)); } template double impl_IAudioNodeEmitter::DistanceScale() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DistanceScale(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_DistanceScale(&value)); return value; } template void impl_IAudioNodeEmitter::DistanceScale(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DistanceScale(value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_DistanceScale(value)); } template double impl_IAudioNodeEmitter::DopplerScale() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DopplerScale(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_DopplerScale(&value)); return value; } template void impl_IAudioNodeEmitter::DopplerScale(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DopplerScale(value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_DopplerScale(value)); } template Windows::Foundation::Numerics::float3 impl_IAudioNodeEmitter::DopplerVelocity() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_DopplerVelocity(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_DopplerVelocity(put_abi(value))); return value; } template void impl_IAudioNodeEmitter::DopplerVelocity(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_DopplerVelocity(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->put_DopplerVelocity(get_abi(value))); } template bool impl_IAudioNodeEmitter::IsDopplerDisabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDopplerDisabled(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter)->get_IsDopplerDisabled(&value)); return value; } template Windows::Media::Audio::SpatialAudioModel impl_IAudioNodeEmitter2::SpatialAudioModel() const { Windows::Media::Audio::SpatialAudioModel value {}; - check_hresult(static_cast(static_cast(*this))->get_SpatialAudioModel(&value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter2)->get_SpatialAudioModel(&value)); return value; } template void impl_IAudioNodeEmitter2::SpatialAudioModel(Windows::Media::Audio::SpatialAudioModel value) const { - check_hresult(static_cast(static_cast(*this))->put_SpatialAudioModel(value)); + check_hresult(WINRT_SHIM(IAudioNodeEmitter2)->put_SpatialAudioModel(value)); } template Windows::Media::Audio::AudioNodeEmitter impl_IAudioNodeEmitterFactory::CreateAudioNodeEmitter(const Windows::Media::Audio::AudioNodeEmitterShape & shape, const Windows::Media::Audio::AudioNodeEmitterDecayModel & decayModel, Windows::Media::Audio::AudioNodeEmitterSettings settings) const { Windows::Media::Audio::AudioNodeEmitter emitter { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAudioNodeEmitter(get(shape), get(decayModel), settings, put(emitter))); + check_hresult(WINRT_SHIM(IAudioNodeEmitterFactory)->abi_CreateAudioNodeEmitter(get_abi(shape), get_abi(decayModel), settings, put_abi(emitter))); return emitter; } template Windows::Foundation::Numerics::float3 impl_IAudioNodeListener::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->get_Position(put_abi(value))); return value; } template void impl_IAudioNodeListener::Position(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->put_Position(get_abi(value))); } template Windows::Foundation::Numerics::quaternion impl_IAudioNodeListener::Orientation() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->get_Orientation(put_abi(value))); return value; } template void impl_IAudioNodeListener::Orientation(const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->put_Orientation(get_abi(value))); } template double impl_IAudioNodeListener::SpeedOfSound() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SpeedOfSound(&value)); + check_hresult(WINRT_SHIM(IAudioNodeListener)->get_SpeedOfSound(&value)); return value; } template void impl_IAudioNodeListener::SpeedOfSound(double value) const { - check_hresult(static_cast(static_cast(*this))->put_SpeedOfSound(value)); + check_hresult(WINRT_SHIM(IAudioNodeListener)->put_SpeedOfSound(value)); } template Windows::Foundation::Numerics::float3 impl_IAudioNodeListener::DopplerVelocity() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_DopplerVelocity(put(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->get_DopplerVelocity(put_abi(value))); return value; } template void impl_IAudioNodeListener::DopplerVelocity(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_DopplerVelocity(get(value))); + check_hresult(WINRT_SHIM(IAudioNodeListener)->put_DopplerVelocity(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IEqualizerEffectDefinition::Bands() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Bands(put(value))); + check_hresult(WINRT_SHIM(IEqualizerEffectDefinition)->get_Bands(put_abi(value))); return value; } template void impl_IReverbEffectDefinition::WetDryMix(double value) const { - check_hresult(static_cast(static_cast(*this))->put_WetDryMix(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_WetDryMix(value)); } template double impl_IReverbEffectDefinition::WetDryMix() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_WetDryMix(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_WetDryMix(&value)); return value; } template void impl_IReverbEffectDefinition::ReflectionsDelay(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReflectionsDelay(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_ReflectionsDelay(value)); } template uint32_t impl_IReverbEffectDefinition::ReflectionsDelay() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReflectionsDelay(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_ReflectionsDelay(&value)); return value; } template void impl_IReverbEffectDefinition::ReverbDelay(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ReverbDelay(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_ReverbDelay(value)); } template uint8_t impl_IReverbEffectDefinition::ReverbDelay() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReverbDelay(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_ReverbDelay(&value)); return value; } template void impl_IReverbEffectDefinition::RearDelay(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_RearDelay(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_RearDelay(value)); } template uint8_t impl_IReverbEffectDefinition::RearDelay() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RearDelay(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_RearDelay(&value)); return value; } template void impl_IReverbEffectDefinition::PositionLeft(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionLeft(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_PositionLeft(value)); } template uint8_t impl_IReverbEffectDefinition::PositionLeft() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionLeft(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_PositionLeft(&value)); return value; } template void impl_IReverbEffectDefinition::PositionRight(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionRight(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_PositionRight(value)); } template uint8_t impl_IReverbEffectDefinition::PositionRight() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionRight(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_PositionRight(&value)); return value; } template void impl_IReverbEffectDefinition::PositionMatrixLeft(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionMatrixLeft(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_PositionMatrixLeft(value)); } template uint8_t impl_IReverbEffectDefinition::PositionMatrixLeft() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionMatrixLeft(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_PositionMatrixLeft(&value)); return value; } template void impl_IReverbEffectDefinition::PositionMatrixRight(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionMatrixRight(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_PositionMatrixRight(value)); } template uint8_t impl_IReverbEffectDefinition::PositionMatrixRight() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionMatrixRight(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_PositionMatrixRight(&value)); return value; } template void impl_IReverbEffectDefinition::EarlyDiffusion(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_EarlyDiffusion(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_EarlyDiffusion(value)); } template uint8_t impl_IReverbEffectDefinition::EarlyDiffusion() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EarlyDiffusion(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_EarlyDiffusion(&value)); return value; } template void impl_IReverbEffectDefinition::LateDiffusion(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_LateDiffusion(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_LateDiffusion(value)); } template uint8_t impl_IReverbEffectDefinition::LateDiffusion() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LateDiffusion(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_LateDiffusion(&value)); return value; } template void impl_IReverbEffectDefinition::LowEQGain(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_LowEQGain(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_LowEQGain(value)); } template uint8_t impl_IReverbEffectDefinition::LowEQGain() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LowEQGain(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_LowEQGain(&value)); return value; } template void impl_IReverbEffectDefinition::LowEQCutoff(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_LowEQCutoff(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_LowEQCutoff(value)); } template uint8_t impl_IReverbEffectDefinition::LowEQCutoff() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LowEQCutoff(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_LowEQCutoff(&value)); return value; } template void impl_IReverbEffectDefinition::HighEQGain(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_HighEQGain(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_HighEQGain(value)); } template uint8_t impl_IReverbEffectDefinition::HighEQGain() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HighEQGain(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_HighEQGain(&value)); return value; } template void impl_IReverbEffectDefinition::HighEQCutoff(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_HighEQCutoff(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_HighEQCutoff(value)); } template uint8_t impl_IReverbEffectDefinition::HighEQCutoff() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HighEQCutoff(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_HighEQCutoff(&value)); return value; } template void impl_IReverbEffectDefinition::RoomFilterFreq(double value) const { - check_hresult(static_cast(static_cast(*this))->put_RoomFilterFreq(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_RoomFilterFreq(value)); } template double impl_IReverbEffectDefinition::RoomFilterFreq() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RoomFilterFreq(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_RoomFilterFreq(&value)); return value; } template void impl_IReverbEffectDefinition::RoomFilterMain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_RoomFilterMain(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_RoomFilterMain(value)); } template double impl_IReverbEffectDefinition::RoomFilterMain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RoomFilterMain(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_RoomFilterMain(&value)); return value; } template void impl_IReverbEffectDefinition::RoomFilterHF(double value) const { - check_hresult(static_cast(static_cast(*this))->put_RoomFilterHF(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_RoomFilterHF(value)); } template double impl_IReverbEffectDefinition::RoomFilterHF() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RoomFilterHF(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_RoomFilterHF(&value)); return value; } template void impl_IReverbEffectDefinition::ReflectionsGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ReflectionsGain(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_ReflectionsGain(value)); } template double impl_IReverbEffectDefinition::ReflectionsGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ReflectionsGain(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_ReflectionsGain(&value)); return value; } template void impl_IReverbEffectDefinition::ReverbGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ReverbGain(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_ReverbGain(value)); } template double impl_IReverbEffectDefinition::ReverbGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ReverbGain(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_ReverbGain(&value)); return value; } template void impl_IReverbEffectDefinition::DecayTime(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DecayTime(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_DecayTime(value)); } template double impl_IReverbEffectDefinition::DecayTime() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DecayTime(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_DecayTime(&value)); return value; } template void impl_IReverbEffectDefinition::Density(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Density(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_Density(value)); } template double impl_IReverbEffectDefinition::Density() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Density(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_Density(&value)); return value; } template void impl_IReverbEffectDefinition::RoomSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_RoomSize(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_RoomSize(value)); } template double impl_IReverbEffectDefinition::RoomSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RoomSize(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_RoomSize(&value)); return value; } template void impl_IReverbEffectDefinition::DisableLateField(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DisableLateField(value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->put_DisableLateField(value)); } template bool impl_IReverbEffectDefinition::DisableLateField() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DisableLateField(&value)); + check_hresult(WINRT_SHIM(IReverbEffectDefinition)->get_DisableLateField(&value)); return value; } template void impl_IEchoEffectDefinition::WetDryMix(double value) const { - check_hresult(static_cast(static_cast(*this))->put_WetDryMix(value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->put_WetDryMix(value)); } template double impl_IEchoEffectDefinition::WetDryMix() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_WetDryMix(&value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->get_WetDryMix(&value)); return value; } template void impl_IEchoEffectDefinition::Feedback(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Feedback(value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->put_Feedback(value)); } template double impl_IEchoEffectDefinition::Feedback() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Feedback(&value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->get_Feedback(&value)); return value; } template void impl_IEchoEffectDefinition::Delay(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Delay(value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->put_Delay(value)); } template double impl_IEchoEffectDefinition::Delay() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(&value)); + check_hresult(WINRT_SHIM(IEchoEffectDefinition)->get_Delay(&value)); return value; } template void impl_ILimiterEffectDefinition::Release(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Release(value)); + check_hresult(WINRT_SHIM(ILimiterEffectDefinition)->put_Release(value)); } template uint32_t impl_ILimiterEffectDefinition::Release() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Release(&value)); + check_hresult(WINRT_SHIM(ILimiterEffectDefinition)->get_Release(&value)); return value; } template void impl_ILimiterEffectDefinition::Loudness(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Loudness(value)); + check_hresult(WINRT_SHIM(ILimiterEffectDefinition)->put_Loudness(value)); } template uint32_t impl_ILimiterEffectDefinition::Loudness() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Loudness(&value)); + check_hresult(WINRT_SHIM(ILimiterEffectDefinition)->get_Loudness(&value)); return value; } @@ -4553,3 +4774,662 @@ inline ReverbEffectDefinition::ReverbEffectDefinition(const Windows::Media::Audi } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioDeviceInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioDeviceOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioFileInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioFileOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioFrameCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioFrameInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioFrameOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraph & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraph2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraphConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraphSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraphSettingsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraphStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioGraphUnrecoverableErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioInputNode2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterConeProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterDecayModel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterDecayModelStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterNaturalDecayModelProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterShape & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeEmitterShapeStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IAudioNodeWithListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ICreateAudioDeviceInputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ICreateAudioDeviceOutputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ICreateAudioFileInputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ICreateAudioFileOutputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ICreateAudioGraphResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IEchoEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IEchoEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IEqualizerBand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IEqualizerEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IEqualizerEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IFrameInputNodeQuantumStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ILimiterEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ILimiterEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IReverbEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::IReverbEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioDeviceInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioDeviceOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioFileInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioFileOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioFrameCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioFrameInputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioFrameOutputNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioGraph & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioGraphBatchUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioGraphConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioGraphSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioGraphUnrecoverableErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeEmitter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeEmitterConeProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeEmitterDecayModel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeEmitterNaturalDecayModelProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeEmitterShape & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioNodeListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::AudioSubmixNode & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::CreateAudioDeviceInputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::CreateAudioDeviceOutputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::CreateAudioFileInputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::CreateAudioFileOutputNodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::CreateAudioGraphResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::EchoEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::EqualizerBand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::EqualizerEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::FrameInputNodeQuantumStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::LimiterEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Audio::ReverbEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Capture.Core.h b/10.0.14393.0/winrt/Windows.Media.Capture.Core.h index 348f9ed69..e6459563d 100644 --- a/10.0.14393.0/winrt/Windows.Media.Capture.Core.h +++ b/10.0.14393.0/winrt/Windows.Media.Capture.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Media.Capture.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.Capture.Core.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CaptureTimeOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CaptureTimeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaptureTimeOffset()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_UsedFrameControllerIndex(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UsedFrameControllerIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsedFrameControllerIndex()); return S_OK; } catch (...) @@ -56,11 +62,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CapturedFrameControlValues(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapturedFrameControlValues()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapturedFrameControlValues()); return S_OK; } catch (...) @@ -74,11 +81,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_StartAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce } } - HRESULT __stdcall abi_StopAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce } } - HRESULT __stdcall abi_FinishAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce } } - HRESULT __stdcall add_PhotoCaptured(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PhotoCaptured(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PhotoCaptured(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PhotoCaptured(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -133,6 +144,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotoCaptured(token); return S_OK; } @@ -142,11 +154,12 @@ struct produce } } - HRESULT __stdcall add_Stopped(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -159,6 +172,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Stopped(token); return S_OK; } @@ -172,11 +186,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_UpdateSettingsAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_UpdateSettingsAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().UpdateSettingsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateSettingsAsync()); return S_OK; } catch (...) @@ -194,56 +209,56 @@ namespace Windows::Media::Capture::Core { template Windows::Media::Capture::CapturedFrame impl_IVariablePhotoCapturedEventArgs::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoCapturedEventArgs)->get_Frame(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IVariablePhotoCapturedEventArgs::CaptureTimeOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_CaptureTimeOffset(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoCapturedEventArgs)->get_CaptureTimeOffset(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IVariablePhotoCapturedEventArgs::UsedFrameControllerIndex() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_UsedFrameControllerIndex(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoCapturedEventArgs)->get_UsedFrameControllerIndex(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrameControlValues impl_IVariablePhotoCapturedEventArgs::CapturedFrameControlValues() const { Windows::Media::Capture::CapturedFrameControlValues value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CapturedFrameControlValues(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoCapturedEventArgs)->get_CapturedFrameControlValues(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IVariablePhotoSequenceCapture::StartAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IVariablePhotoSequenceCapture::StopAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(operation))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->abi_StopAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IVariablePhotoSequenceCapture::FinishAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->abi_FinishAsync(put_abi(operation))); return operation; } template event_token impl_IVariablePhotoSequenceCapture::PhotoCaptured(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PhotoCaptured(get(handler), &token)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->add_PhotoCaptured(get_abi(handler), &token)); return token; } @@ -254,33 +269,80 @@ template event_revoker impl_IVariabl template void impl_IVariablePhotoSequenceCapture::PhotoCaptured(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PhotoCaptured(token)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->remove_PhotoCaptured(token)); } -template event_token impl_IVariablePhotoSequenceCapture::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IVariablePhotoSequenceCapture::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IVariablePhotoSequenceCapture::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IVariablePhotoSequenceCapture::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::Core::IVariablePhotoSequenceCapture::remove_Stopped, Stopped(handler)); } template void impl_IVariablePhotoSequenceCapture::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture)->remove_Stopped(token)); } template Windows::Foundation::IAsyncAction impl_IVariablePhotoSequenceCapture2::UpdateSettingsAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateSettingsAsync(put(operation))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceCapture2)->abi_UpdateSettingsAsync(put_abi(operation))); return operation; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Core::IVariablePhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Core::IVariablePhotoSequenceCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Core::IVariablePhotoSequenceCapture2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Core::VariablePhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Core::VariablePhotoSequenceCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Capture.Frames.h b/10.0.14393.0/winrt/Windows.Media.Capture.Frames.h index d87840bae..556653bd2 100644 --- a/10.0.14393.0/winrt/Windows.Media.Capture.Frames.h +++ b/10.0.14393.0/winrt/Windows.Media.Capture.Frames.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.Capture.3.h" @@ -26,11 +29,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FrameReference(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameReference(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameReference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameReference()); return S_OK; } catch (...) @@ -40,11 +44,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Buffer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Buffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Buffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffer()); return S_OK; } catch (...) @@ -58,11 +63,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_FrameReference(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameReference(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameReference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameReference()); return S_OK; } catch (...) @@ -72,11 +78,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VideoMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoMediaFrame()); return S_OK; } catch (...) @@ -86,11 +93,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DepthFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_DepthFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DepthFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepthFormat()); return S_OK; } catch (...) @@ -100,11 +108,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryCreateCoordinateMapper(abi_arg_in cameraIntrinsics, abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryCreateCoordinateMapper(impl::abi_arg_in cameraIntrinsics, impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCreateCoordinateMapper(*reinterpret_cast(&cameraIntrinsics), *reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCreateCoordinateMapper(*reinterpret_cast(&cameraIntrinsics), *reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -118,11 +127,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_VideoFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFormat()); return S_OK; } catch (...) @@ -136,7 +146,8 @@ struct produce : pro { try { - *value = detach(this->shim().DepthScaleInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepthScaleInMeters()); return S_OK; } catch (...) @@ -149,11 +160,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_FrameReference(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameReference(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameReference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameReference()); return S_OK; } catch (...) @@ -163,11 +175,12 @@ struct produce : produc } } - HRESULT __stdcall get_VideoMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoMediaFrame()); return S_OK; } catch (...) @@ -181,7 +194,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsIlluminated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIlluminated()); return S_OK; } catch (...) @@ -198,11 +212,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_MajorType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MajorType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MajorType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MajorType()); return S_OK; } catch (...) @@ -212,11 +227,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Subtype(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subtype(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtype()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtype()); return S_OK; } catch (...) @@ -226,11 +242,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FrameRate(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameRate()); return S_OK; } catch (...) @@ -240,11 +257,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -254,11 +272,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_VideoFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFormat()); return S_OK; } catch (...) @@ -272,11 +291,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall add_FrameArrived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FrameArrived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameArrived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -289,6 +309,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(token); return S_OK; } @@ -298,11 +319,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_TryAcquireLatestFrame(abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryAcquireLatestFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryAcquireLatestFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryAcquireLatestFrame()); return S_OK; } catch (...) @@ -312,11 +334,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StartAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -326,11 +349,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StopAsync(abi_arg_out action) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -348,7 +372,8 @@ struct produce : produ { try { - *value = detach(this->shim().SourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceKind()); return S_OK; } catch (...) @@ -357,11 +382,12 @@ struct produce : produ } } - HRESULT __stdcall get_Format(abi_arg_out value) noexcept override + HRESULT __stdcall get_Format(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -371,11 +397,12 @@ struct produce : produ } } - HRESULT __stdcall get_SystemRelativeTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SystemRelativeTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SystemRelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemRelativeTime()); return S_OK; } catch (...) @@ -385,11 +412,12 @@ struct produce : produ } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -398,11 +426,12 @@ struct produce : produ } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -412,11 +441,12 @@ struct produce : produ } } - HRESULT __stdcall get_BufferMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_BufferMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BufferMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferMediaFrame()); return S_OK; } catch (...) @@ -426,11 +456,12 @@ struct produce : produ } } - HRESULT __stdcall get_VideoMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoMediaFrame()); return S_OK; } catch (...) @@ -440,11 +471,12 @@ struct produce : produ } } - HRESULT __stdcall get_CoordinateSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSystem()); return S_OK; } catch (...) @@ -458,11 +490,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Info(abi_arg_out value) noexcept override + HRESULT __stdcall get_Info(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Info()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Info()); return S_OK; } catch (...) @@ -472,11 +505,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Controller(abi_arg_out value) noexcept override + HRESULT __stdcall get_Controller(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Controller()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Controller()); return S_OK; } catch (...) @@ -486,11 +520,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SupportedFormats(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedFormats()); return S_OK; } catch (...) @@ -500,11 +535,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CurrentFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentFormat()); return S_OK; } catch (...) @@ -514,11 +550,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetFormatAsync(abi_arg_in format, abi_arg_out value) noexcept override + HRESULT __stdcall abi_SetFormatAsync(impl::abi_arg_in format, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SetFormatAsync(*reinterpret_cast(&format))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SetFormatAsync(*reinterpret_cast(&format))); return S_OK; } catch (...) @@ -528,11 +565,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_FormatChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FormatChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FormatChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FormatChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -545,6 +583,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().FormatChanged(token); return S_OK; } @@ -554,11 +593,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_TryGetCameraIntrinsics(abi_arg_in format, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetCameraIntrinsics(impl::abi_arg_in format, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetCameraIntrinsics(*reinterpret_cast(&format))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetCameraIntrinsics(*reinterpret_cast(&format))); return S_OK; } catch (...) @@ -572,11 +612,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetPropertyAsync(abi_arg_in propertyId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetPropertyAsync(impl::abi_arg_in propertyId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetPropertyAsync(*reinterpret_cast(&propertyId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPropertyAsync(*reinterpret_cast(&propertyId))); return S_OK; } catch (...) @@ -586,11 +627,12 @@ struct produce } } - HRESULT __stdcall abi_SetPropertyAsync(abi_arg_in propertyId, abi_arg_in propertyValue, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_SetPropertyAsync(impl::abi_arg_in propertyId, impl::abi_arg_in propertyValue, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SetPropertyAsync(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SetPropertyAsync(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue))); return S_OK; } catch (...) @@ -600,11 +642,12 @@ struct produce } } - HRESULT __stdcall get_VideoDeviceController(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceController()); return S_OK; } catch (...) @@ -622,7 +665,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -631,11 +675,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -649,11 +694,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -663,11 +709,12 @@ struct produce : pro } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -677,11 +724,12 @@ struct produce : pro } } - HRESULT __stdcall get_SourceInfos(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SourceInfos(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SourceInfos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceInfos()); return S_OK; } catch (...) @@ -695,11 +743,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_FindAllAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -709,11 +758,12 @@ struct produce id, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in id, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FromIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -723,11 +773,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -741,11 +792,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -759,7 +811,8 @@ struct produce : prod { try { - *value = detach(this->shim().MediaStreamType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaStreamType()); return S_OK; } catch (...) @@ -772,7 +825,8 @@ struct produce : prod { try { - *value = detach(this->shim().SourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceKind()); return S_OK; } catch (...) @@ -781,11 +835,12 @@ struct produce : prod } } - HRESULT __stdcall get_SourceGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceGroup()); return S_OK; } catch (...) @@ -795,11 +850,12 @@ struct produce : prod } } - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -809,11 +865,12 @@ struct produce : prod } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -823,11 +880,12 @@ struct produce : prod } } - HRESULT __stdcall get_CoordinateSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSystem()); return S_OK; } catch (...) @@ -841,11 +899,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_FrameReference(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameReference(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameReference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameReference()); return S_OK; } catch (...) @@ -855,11 +914,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VideoFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoFormat()); return S_OK; } catch (...) @@ -869,11 +929,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SoftwareBitmap(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoftwareBitmap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareBitmap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareBitmap()); return S_OK; } catch (...) @@ -883,11 +944,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Direct3DSurface(abi_arg_out value) noexcept override + HRESULT __stdcall get_Direct3DSurface(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direct3DSurface()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direct3DSurface()); return S_OK; } catch (...) @@ -897,11 +959,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CameraIntrinsics(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraIntrinsics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraIntrinsics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraIntrinsics()); return S_OK; } catch (...) @@ -911,11 +974,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_InfraredMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_InfraredMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InfraredMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InfraredMediaFrame()); return S_OK; } catch (...) @@ -925,11 +989,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DepthMediaFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_DepthMediaFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DepthMediaFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepthMediaFrame()); return S_OK; } catch (...) @@ -939,11 +1004,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetVideoFrame(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetVideoFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetVideoFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetVideoFrame()); return S_OK; } catch (...) @@ -957,11 +1023,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_MediaFrameFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaFrameFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaFrameFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaFrameFormat()); return S_OK; } catch (...) @@ -971,11 +1038,12 @@ struct produce : pro } } - HRESULT __stdcall get_DepthFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_DepthFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DepthFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepthFormat()); return S_OK; } catch (...) @@ -989,7 +1057,8 @@ struct produce : pro { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -1002,7 +1071,8 @@ struct produce : pro { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -1019,157 +1089,157 @@ namespace Windows::Media::Capture::Frames { template hstring impl_IMediaFrameSourceGroup::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroup)->get_Id(put_abi(value))); return value; } template hstring impl_IMediaFrameSourceGroup::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroup)->get_DisplayName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaFrameSourceGroup::SourceInfos() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SourceInfos(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroup)->get_SourceInfos(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IMediaFrameSourceGroupStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroupStatics)->abi_FindAllAsync(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceGroupStatics::FromIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceGroupStatics::FromIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(id), put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroupStatics)->abi_FromIdAsync(get_abi(id), put_abi(value))); return value; } template hstring impl_IMediaFrameSourceGroupStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceGroupStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } template hstring impl_IMediaFrameSourceInfo::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_Id(put_abi(value))); return value; } template Windows::Media::Capture::MediaStreamType impl_IMediaFrameSourceInfo::MediaStreamType() const { Windows::Media::Capture::MediaStreamType value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaStreamType(&value)); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_MediaStreamType(&value)); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceKind impl_IMediaFrameSourceInfo::SourceKind() const { Windows::Media::Capture::Frames::MediaFrameSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceKind(&value)); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_SourceKind(&value)); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceGroup impl_IMediaFrameSourceInfo::SourceGroup() const { Windows::Media::Capture::Frames::MediaFrameSourceGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceGroup(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_SourceGroup(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IMediaFrameSourceInfo::DeviceInformation() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_DeviceInformation(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMediaFrameSourceInfo::Properties() const +template Windows::Foundation::Collections::IMapView impl_IMediaFrameSourceInfo::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_Properties(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_IMediaFrameSourceInfo::CoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceInfo)->get_CoordinateSystem(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceInfo impl_IMediaFrameSource::Info() const { Windows::Media::Capture::Frames::MediaFrameSourceInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Info(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->get_Info(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceController impl_IMediaFrameSource::Controller() const { Windows::Media::Capture::Frames::MediaFrameSourceController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Controller(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->get_Controller(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaFrameSource::SupportedFormats() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedFormats(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->get_SupportedFormats(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameFormat impl_IMediaFrameSource::CurrentFormat() const { Windows::Media::Capture::Frames::MediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentFormat(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->get_CurrentFormat(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IMediaFrameSource::SetFormatAsync(const Windows::Media::Capture::Frames::MediaFrameFormat & format) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_SetFormatAsync(get(format), put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->abi_SetFormatAsync(get_abi(format), put_abi(value))); return value; } -template event_token impl_IMediaFrameSource::FormatChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaFrameSource::FormatChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FormatChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaFrameSource)->add_FormatChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaFrameSource::FormatChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaFrameSource::FormatChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::Frames::IMediaFrameSource::remove_FormatChanged, FormatChanged(handler)); } template void impl_IMediaFrameSource::FormatChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FormatChanged(token)); + check_hresult(WINRT_SHIM(IMediaFrameSource)->remove_FormatChanged(token)); } template Windows::Media::Devices::Core::CameraIntrinsics impl_IMediaFrameSource::TryGetCameraIntrinsics(const Windows::Media::Capture::Frames::MediaFrameFormat & format) const { Windows::Media::Devices::Core::CameraIntrinsics value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetCameraIntrinsics(get(format), put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSource)->abi_TryGetCameraIntrinsics(get_abi(format), put_abi(value))); return value; } template event_token impl_IMediaFrameReader::FrameArrived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameArrived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaFrameReader)->add_FrameArrived(get_abi(handler), &token)); return token; } @@ -1180,314 +1250,314 @@ template event_revoker impl_IMediaFrameReader template void impl_IMediaFrameReader::FrameArrived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameArrived(token)); + check_hresult(WINRT_SHIM(IMediaFrameReader)->remove_FrameArrived(token)); } template Windows::Media::Capture::Frames::MediaFrameReference impl_IMediaFrameReader::TryAcquireLatestFrame() const { Windows::Media::Capture::Frames::MediaFrameReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryAcquireLatestFrame(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReader)->abi_TryAcquireLatestFrame(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaFrameReader::StartAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(IMediaFrameReader)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IMediaFrameReader::StopAsync() const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(action))); + check_hresult(WINRT_SHIM(IMediaFrameReader)->abi_StopAsync(put_abi(action))); return action; } -template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceController::GetPropertyAsync(hstring_ref propertyId) const +template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceController::GetPropertyAsync(hstring_view propertyId) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertyAsync(get(propertyId), put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceController)->abi_GetPropertyAsync(get_abi(propertyId), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceController::SetPropertyAsync(hstring_ref propertyId, const Windows::IInspectable & propertyValue) const +template Windows::Foundation::IAsyncOperation impl_IMediaFrameSourceController::SetPropertyAsync(hstring_view propertyId, const Windows::Foundation::IInspectable & propertyValue) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_SetPropertyAsync(get(propertyId), get(propertyValue), put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceController)->abi_SetPropertyAsync(get_abi(propertyId), get_abi(propertyValue), put_abi(value))); return value; } template Windows::Media::Devices::VideoDeviceController impl_IMediaFrameSourceController::VideoDeviceController() const { Windows::Media::Devices::VideoDeviceController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceController(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameSourceController)->get_VideoDeviceController(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceGetPropertyStatus impl_IMediaFrameSourceGetPropertyResult::Status() const { Windows::Media::Capture::Frames::MediaFrameSourceGetPropertyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMediaFrameSourceGetPropertyResult)->get_Status(&value)); return value; } -template Windows::IInspectable impl_IMediaFrameSourceGetPropertyResult::Value() const +template Windows::Foundation::IInspectable impl_IMediaFrameSourceGetPropertyResult::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IMediaFrameSourceGetPropertyResult)->get_Value(put_abi(value))); return value; } template hstring impl_IMediaFrameFormat::MajorType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MajorType(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameFormat)->get_MajorType(put_abi(value))); return value; } template hstring impl_IMediaFrameFormat::Subtype() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtype(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameFormat)->get_Subtype(put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_IMediaFrameFormat::FrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameRate(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameFormat)->get_FrameRate(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMediaFrameFormat::Properties() const +template Windows::Foundation::Collections::IMapView impl_IMediaFrameFormat::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMediaFrameFormat)->get_Properties(put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrameFormat impl_IMediaFrameFormat::VideoFormat() const { Windows::Media::Capture::Frames::VideoMediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFormat(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameFormat)->get_VideoFormat(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameFormat impl_IVideoMediaFrameFormat::MediaFrameFormat() const { Windows::Media::Capture::Frames::MediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaFrameFormat(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrameFormat)->get_MediaFrameFormat(put_abi(value))); return value; } template Windows::Media::Capture::Frames::DepthMediaFrameFormat impl_IVideoMediaFrameFormat::DepthFormat() const { Windows::Media::Capture::Frames::DepthMediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DepthFormat(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrameFormat)->get_DepthFormat(put_abi(value))); return value; } template uint32_t impl_IVideoMediaFrameFormat::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IVideoMediaFrameFormat)->get_Width(&value)); return value; } template uint32_t impl_IVideoMediaFrameFormat::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IVideoMediaFrameFormat)->get_Height(&value)); return value; } template Windows::Media::Capture::Frames::MediaFrameSourceKind impl_IMediaFrameReference::SourceKind() const { Windows::Media::Capture::Frames::MediaFrameSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceKind(&value)); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_SourceKind(&value)); return value; } template Windows::Media::Capture::Frames::MediaFrameFormat impl_IMediaFrameReference::Format() const { Windows::Media::Capture::Frames::MediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Format(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_Format(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaFrameReference::SystemRelativeTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SystemRelativeTime(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_SystemRelativeTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaFrameReference::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_Duration(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMediaFrameReference::Properties() const +template Windows::Foundation::Collections::IMapView impl_IMediaFrameReference::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_Properties(put_abi(value))); return value; } template Windows::Media::Capture::Frames::BufferMediaFrame impl_IMediaFrameReference::BufferMediaFrame() const { Windows::Media::Capture::Frames::BufferMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BufferMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_BufferMediaFrame(put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrame impl_IMediaFrameReference::VideoMediaFrame() const { Windows::Media::Capture::Frames::VideoMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_VideoMediaFrame(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_IMediaFrameReference::CoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(IMediaFrameReference)->get_CoordinateSystem(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameReference impl_IBufferMediaFrame::FrameReference() const { Windows::Media::Capture::Frames::MediaFrameReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameReference(put(value))); + check_hresult(WINRT_SHIM(IBufferMediaFrame)->get_FrameReference(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IBufferMediaFrame::Buffer() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Buffer(put(value))); + check_hresult(WINRT_SHIM(IBufferMediaFrame)->get_Buffer(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameReference impl_IVideoMediaFrame::FrameReference() const { Windows::Media::Capture::Frames::MediaFrameReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameReference(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_FrameReference(put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrameFormat impl_IVideoMediaFrame::VideoFormat() const { Windows::Media::Capture::Frames::VideoMediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFormat(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_VideoFormat(put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_IVideoMediaFrame::SoftwareBitmap() const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SoftwareBitmap(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_SoftwareBitmap(put_abi(value))); return value; } template Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface impl_IVideoMediaFrame::Direct3DSurface() const { Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface value; - check_hresult(static_cast(static_cast(*this))->get_Direct3DSurface(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_Direct3DSurface(put_abi(value))); return value; } template Windows::Media::Devices::Core::CameraIntrinsics impl_IVideoMediaFrame::CameraIntrinsics() const { Windows::Media::Devices::Core::CameraIntrinsics value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CameraIntrinsics(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_CameraIntrinsics(put_abi(value))); return value; } template Windows::Media::Capture::Frames::InfraredMediaFrame impl_IVideoMediaFrame::InfraredMediaFrame() const { Windows::Media::Capture::Frames::InfraredMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InfraredMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_InfraredMediaFrame(put_abi(value))); return value; } template Windows::Media::Capture::Frames::DepthMediaFrame impl_IVideoMediaFrame::DepthMediaFrame() const { Windows::Media::Capture::Frames::DepthMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DepthMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->get_DepthMediaFrame(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IVideoMediaFrame::GetVideoFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetVideoFrame(put(value))); + check_hresult(WINRT_SHIM(IVideoMediaFrame)->abi_GetVideoFrame(put_abi(value))); return value; } template Windows::Media::Capture::Frames::MediaFrameReference impl_IInfraredMediaFrame::FrameReference() const { Windows::Media::Capture::Frames::MediaFrameReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameReference(put(value))); + check_hresult(WINRT_SHIM(IInfraredMediaFrame)->get_FrameReference(put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrame impl_IInfraredMediaFrame::VideoMediaFrame() const { Windows::Media::Capture::Frames::VideoMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IInfraredMediaFrame)->get_VideoMediaFrame(put_abi(value))); return value; } template bool impl_IInfraredMediaFrame::IsIlluminated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIlluminated(&value)); + check_hresult(WINRT_SHIM(IInfraredMediaFrame)->get_IsIlluminated(&value)); return value; } template Windows::Media::Capture::Frames::MediaFrameReference impl_IDepthMediaFrame::FrameReference() const { Windows::Media::Capture::Frames::MediaFrameReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameReference(put(value))); + check_hresult(WINRT_SHIM(IDepthMediaFrame)->get_FrameReference(put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrame impl_IDepthMediaFrame::VideoMediaFrame() const { Windows::Media::Capture::Frames::VideoMediaFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoMediaFrame(put(value))); + check_hresult(WINRT_SHIM(IDepthMediaFrame)->get_VideoMediaFrame(put_abi(value))); return value; } template Windows::Media::Capture::Frames::DepthMediaFrameFormat impl_IDepthMediaFrame::DepthFormat() const { Windows::Media::Capture::Frames::DepthMediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DepthFormat(put(value))); + check_hresult(WINRT_SHIM(IDepthMediaFrame)->get_DepthFormat(put_abi(value))); return value; } template Windows::Media::Devices::Core::DepthCorrelatedCoordinateMapper impl_IDepthMediaFrame::TryCreateCoordinateMapper(const Windows::Media::Devices::Core::CameraIntrinsics & cameraIntrinsics, const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Media::Devices::Core::DepthCorrelatedCoordinateMapper value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateCoordinateMapper(get(cameraIntrinsics), get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(IDepthMediaFrame)->abi_TryCreateCoordinateMapper(get_abi(cameraIntrinsics), get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Media::Capture::Frames::VideoMediaFrameFormat impl_IDepthMediaFrameFormat::VideoFormat() const { Windows::Media::Capture::Frames::VideoMediaFrameFormat value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoFormat(put(value))); + check_hresult(WINRT_SHIM(IDepthMediaFrameFormat)->get_VideoFormat(put_abi(value))); return value; } template double impl_IDepthMediaFrameFormat::DepthScaleInMeters() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DepthScaleInMeters(&value)); + check_hresult(WINRT_SHIM(IDepthMediaFrameFormat)->get_DepthScaleInMeters(&value)); return value; } @@ -1496,7 +1566,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation MediaFrameSourceGroup::FromIdAsync(hstring_ref id) +inline Windows::Foundation::IAsyncOperation MediaFrameSourceGroup::FromIdAsync(hstring_view id) { return get_activation_factory().FromIdAsync(id); } @@ -1509,3 +1579,284 @@ inline hstring MediaFrameSourceGroup::GetDeviceSelector() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IBufferMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IDepthMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IDepthMediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IInfraredMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGetPropertyResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroupStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IVideoMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::IVideoMediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::BufferMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::DepthMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::DepthMediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::InfraredMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameArrivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameSourceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameSourceGetPropertyResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameSourceGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::MediaFrameSourceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::VideoMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::Frames::VideoMediaFrameFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Capture.h b/10.0.14393.0/winrt/Windows.Media.Capture.h index dc1831bdf..4d0cf3b1d 100644 --- a/10.0.14393.0/winrt/Windows.Media.Capture.h +++ b/10.0.14393.0/winrt/Windows.Media.Capture.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.3.h" @@ -38,7 +41,7 @@ template MediaCaptureFailedEventHandler::MediaCaptureFa inline void MediaCaptureFailedEventHandler::operator()(const Windows::Media::Capture::MediaCapture & sender, const Windows::Media::Capture::MediaCaptureFailedEventArgs & errorEventArgs) const { - check_hresult((*this)->abi_Invoke(get(sender), get(errorEventArgs))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(errorEventArgs))); } template RecordLimitationExceededEventHandler::RecordLimitationExceededEventHandler(L lambda) : @@ -55,7 +58,7 @@ template RecordLimitationExceededEventHandler::RecordLi inline void RecordLimitationExceededEventHandler::operator()(const Windows::Media::Capture::MediaCapture & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } } @@ -65,11 +68,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -83,7 +87,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -92,11 +97,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Context(abi_arg_out value) noexcept override + HRESULT __stdcall get_Context(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Context()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Context()); return S_OK; } catch (...) @@ -110,11 +116,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_FrameBoundsRelativeToReferencePhoto(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FrameBoundsRelativeToReferencePhoto(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FrameBoundsRelativeToReferencePhoto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameBoundsRelativeToReferencePhoto()); return S_OK; } catch (...) @@ -128,11 +135,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CaptureAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CaptureAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CaptureAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CaptureAsync()); return S_OK; } catch (...) @@ -142,11 +150,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CaptureWithContextAsync(abi_arg_in context, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CaptureWithContextAsync(impl::abi_arg_in context, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CaptureAsync(*reinterpret_cast(&context))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CaptureAsync(*reinterpret_cast(&context))); return S_OK; } catch (...) @@ -156,11 +165,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_OptionalReferencePhotoCaptured(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OptionalReferencePhotoCaptured(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OptionalReferencePhotoCaptured(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OptionalReferencePhotoCaptured(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -173,6 +183,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().OptionalReferencePhotoCaptured(token); return S_OK; } @@ -182,11 +193,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_AllPhotosCaptured(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AllPhotosCaptured(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AllPhotosCaptured(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AllPhotosCaptured(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -199,6 +211,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().AllPhotosCaptured(token); return S_OK; } @@ -208,11 +221,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FinishAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -230,7 +244,8 @@ struct produce : produce_baseshim().IsCapturingAudio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCapturingAudio()); return S_OK; } catch (...) @@ -243,7 +258,8 @@ struct produce : produce_baseshim().IsCapturingVideo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCapturingVideo()); return S_OK; } catch (...) @@ -252,11 +268,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_CapturingChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CapturingChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CapturingChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -269,6 +286,7 @@ struct produce : produce_baseshim()); this->shim().CapturingChanged(token); return S_OK; } @@ -286,6 +304,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleGameBarKey(value); return S_OK; } @@ -299,7 +318,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleGameBarKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleGameBarKey()); return S_OK; } catch (...) @@ -312,6 +332,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleGameBarKeyModifiers(value); return S_OK; } @@ -325,7 +346,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleGameBarKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleGameBarKeyModifiers()); return S_OK; } catch (...) @@ -338,6 +360,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SaveHistoricalVideoKey(value); return S_OK; } @@ -351,7 +374,8 @@ struct produce : p { try { - *value = detach(this->shim().SaveHistoricalVideoKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaveHistoricalVideoKey()); return S_OK; } catch (...) @@ -364,6 +388,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SaveHistoricalVideoKeyModifiers(value); return S_OK; } @@ -377,7 +402,8 @@ struct produce : p { try { - *value = detach(this->shim().SaveHistoricalVideoKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaveHistoricalVideoKeyModifiers()); return S_OK; } catch (...) @@ -390,6 +416,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleRecordingKey(value); return S_OK; } @@ -403,7 +430,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleRecordingKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleRecordingKey()); return S_OK; } catch (...) @@ -416,6 +444,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleRecordingKeyModifiers(value); return S_OK; } @@ -429,7 +458,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleRecordingKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleRecordingKeyModifiers()); return S_OK; } catch (...) @@ -442,6 +472,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().TakeScreenshotKey(value); return S_OK; } @@ -455,7 +486,8 @@ struct produce : p { try { - *value = detach(this->shim().TakeScreenshotKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TakeScreenshotKey()); return S_OK; } catch (...) @@ -468,6 +500,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().TakeScreenshotKeyModifiers(value); return S_OK; } @@ -481,7 +514,8 @@ struct produce : p { try { - *value = detach(this->shim().TakeScreenshotKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TakeScreenshotKeyModifiers()); return S_OK; } catch (...) @@ -494,6 +528,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleRecordingIndicatorKey(value); return S_OK; } @@ -507,7 +542,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleRecordingIndicatorKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleRecordingIndicatorKey()); return S_OK; } catch (...) @@ -520,6 +556,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleRecordingIndicatorKeyModifiers(value); return S_OK; } @@ -533,7 +570,8 @@ struct produce : p { try { - *value = detach(this->shim().ToggleRecordingIndicatorKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleRecordingIndicatorKeyModifiers()); return S_OK; } catch (...) @@ -550,6 +588,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleMicrophoneCaptureKey(value); return S_OK; } @@ -563,7 +602,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleMicrophoneCaptureKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleMicrophoneCaptureKey()); return S_OK; } catch (...) @@ -576,6 +616,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleMicrophoneCaptureKeyModifiers(value); return S_OK; } @@ -589,7 +630,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleMicrophoneCaptureKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleMicrophoneCaptureKeyModifiers()); return S_OK; } catch (...) @@ -606,6 +648,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleCameraCaptureKey(value); return S_OK; } @@ -619,7 +662,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleCameraCaptureKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleCameraCaptureKey()); return S_OK; } catch (...) @@ -632,6 +676,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleCameraCaptureKeyModifiers(value); return S_OK; } @@ -645,7 +690,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleCameraCaptureKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleCameraCaptureKeyModifiers()); return S_OK; } catch (...) @@ -658,6 +704,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleBroadcastKey(value); return S_OK; } @@ -671,7 +718,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleBroadcastKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleBroadcastKey()); return S_OK; } catch (...) @@ -684,6 +732,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ToggleBroadcastKeyModifiers(value); return S_OK; } @@ -697,7 +746,8 @@ struct produce : { try { - *value = detach(this->shim().ToggleBroadcastKeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleBroadcastKeyModifiers()); return S_OK; } catch (...) @@ -710,11 +760,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentSettings(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentSettings()); return S_OK; } catch (...) @@ -724,10 +775,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ApplySettings(abi_arg_in appCaptureSettings) noexcept override + HRESULT __stdcall abi_ApplySettings(impl::abi_arg_in appCaptureSettings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplySettings(*reinterpret_cast(&appCaptureSettings)); return S_OK; } @@ -741,10 +793,11 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall put_AppCaptureDestinationFolder(abi_arg_in value) noexcept override + HRESULT __stdcall put_AppCaptureDestinationFolder(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppCaptureDestinationFolder(*reinterpret_cast(&value)); return S_OK; } @@ -754,11 +807,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AppCaptureDestinationFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppCaptureDestinationFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppCaptureDestinationFolder()); return S_OK; } catch (...) @@ -772,6 +826,7 @@ struct produce : produce_baseshim()); this->shim().AudioEncodingBitrate(value); return S_OK; } @@ -785,7 +840,8 @@ struct produce : produce_baseshim().AudioEncodingBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEncodingBitrate()); return S_OK; } catch (...) @@ -798,6 +854,7 @@ struct produce : produce_baseshim()); this->shim().IsAudioCaptureEnabled(value); return S_OK; } @@ -811,7 +868,8 @@ struct produce : produce_baseshim().IsAudioCaptureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAudioCaptureEnabled()); return S_OK; } catch (...) @@ -824,6 +882,7 @@ struct produce : produce_baseshim()); this->shim().CustomVideoEncodingBitrate(value); return S_OK; } @@ -837,7 +896,8 @@ struct produce : produce_baseshim().CustomVideoEncodingBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomVideoEncodingBitrate()); return S_OK; } catch (...) @@ -850,6 +910,7 @@ struct produce : produce_baseshim()); this->shim().CustomVideoEncodingHeight(value); return S_OK; } @@ -863,7 +924,8 @@ struct produce : produce_baseshim().CustomVideoEncodingHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomVideoEncodingHeight()); return S_OK; } catch (...) @@ -876,6 +938,7 @@ struct produce : produce_baseshim()); this->shim().CustomVideoEncodingWidth(value); return S_OK; } @@ -889,7 +952,8 @@ struct produce : produce_baseshim().CustomVideoEncodingWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomVideoEncodingWidth()); return S_OK; } catch (...) @@ -902,6 +966,7 @@ struct produce : produce_baseshim()); this->shim().HistoricalBufferLength(value); return S_OK; } @@ -915,7 +980,8 @@ struct produce : produce_baseshim().HistoricalBufferLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HistoricalBufferLength()); return S_OK; } catch (...) @@ -928,6 +994,7 @@ struct produce : produce_baseshim()); this->shim().HistoricalBufferLengthUnit(value); return S_OK; } @@ -941,7 +1008,8 @@ struct produce : produce_baseshim().HistoricalBufferLengthUnit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HistoricalBufferLengthUnit()); return S_OK; } catch (...) @@ -954,6 +1022,7 @@ struct produce : produce_baseshim()); this->shim().IsHistoricalCaptureEnabled(value); return S_OK; } @@ -967,7 +1036,8 @@ struct produce : produce_baseshim().IsHistoricalCaptureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHistoricalCaptureEnabled()); return S_OK; } catch (...) @@ -980,6 +1050,7 @@ struct produce : produce_baseshim()); this->shim().IsHistoricalCaptureOnBatteryAllowed(value); return S_OK; } @@ -993,7 +1064,8 @@ struct produce : produce_baseshim().IsHistoricalCaptureOnBatteryAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHistoricalCaptureOnBatteryAllowed()); return S_OK; } catch (...) @@ -1006,6 +1078,7 @@ struct produce : produce_baseshim()); this->shim().IsHistoricalCaptureOnWirelessDisplayAllowed(value); return S_OK; } @@ -1019,7 +1092,8 @@ struct produce : produce_baseshim().IsHistoricalCaptureOnWirelessDisplayAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHistoricalCaptureOnWirelessDisplayAllowed()); return S_OK; } catch (...) @@ -1028,10 +1102,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MaximumRecordLength(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaximumRecordLength(*reinterpret_cast(&value)); return S_OK; } @@ -1041,11 +1116,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaximumRecordLength(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumRecordLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRecordLength()); return S_OK; } catch (...) @@ -1054,10 +1130,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ScreenshotDestinationFolder(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ScreenshotDestinationFolder(*reinterpret_cast(&value)); return S_OK; } @@ -1067,11 +1144,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ScreenshotDestinationFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScreenshotDestinationFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenshotDestinationFolder()); return S_OK; } catch (...) @@ -1085,6 +1163,7 @@ struct produce : produce_baseshim()); this->shim().VideoEncodingBitrateMode(value); return S_OK; } @@ -1098,7 +1177,8 @@ struct produce : produce_baseshim().VideoEncodingBitrateMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoEncodingBitrateMode()); return S_OK; } catch (...) @@ -1111,6 +1191,7 @@ struct produce : produce_baseshim()); this->shim().VideoEncodingResolutionMode(value); return S_OK; } @@ -1124,7 +1205,8 @@ struct produce : produce_baseshim().VideoEncodingResolutionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoEncodingResolutionMode()); return S_OK; } catch (...) @@ -1137,6 +1219,7 @@ struct produce : produce_baseshim()); this->shim().IsAppCaptureEnabled(value); return S_OK; } @@ -1150,7 +1233,8 @@ struct produce : produce_baseshim().IsAppCaptureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAppCaptureEnabled()); return S_OK; } catch (...) @@ -1163,7 +1247,8 @@ struct produce : produce_baseshim().IsCpuConstrained()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCpuConstrained()); return S_OK; } catch (...) @@ -1176,7 +1261,8 @@ struct produce : produce_baseshim().IsDisabledByPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDisabledByPolicy()); return S_OK; } catch (...) @@ -1189,7 +1275,8 @@ struct produce : produce_baseshim().IsMemoryConstrained()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMemoryConstrained()); return S_OK; } catch (...) @@ -1202,7 +1289,8 @@ struct produce : produce_baseshim().HasHardwareEncoder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasHardwareEncoder()); return S_OK; } catch (...) @@ -1219,7 +1307,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsGpuConstrained()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGpuConstrained()); return S_OK; } catch (...) @@ -1228,11 +1317,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AlternateShortcutKeys(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlternateShortcutKeys(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlternateShortcutKeys()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateShortcutKeys()); return S_OK; } catch (...) @@ -1250,6 +1340,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsMicrophoneCaptureEnabled(value); return S_OK; } @@ -1263,7 +1354,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsMicrophoneCaptureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMicrophoneCaptureEnabled()); return S_OK; } catch (...) @@ -1280,6 +1372,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsMicrophoneCaptureEnabledByDefault(value); return S_OK; } @@ -1293,7 +1386,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsMicrophoneCaptureEnabledByDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMicrophoneCaptureEnabledByDefault()); return S_OK; } catch (...) @@ -1306,6 +1400,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemAudioGain(value); return S_OK; } @@ -1319,7 +1414,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SystemAudioGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemAudioGain()); return S_OK; } catch (...) @@ -1332,6 +1428,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().MicrophoneGain(value); return S_OK; } @@ -1345,7 +1442,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().MicrophoneGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MicrophoneGain()); return S_OK; } catch (...) @@ -1358,6 +1456,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoEncodingFrameRateMode(value); return S_OK; } @@ -1371,7 +1470,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().VideoEncodingFrameRateMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoEncodingFrameRateMode()); return S_OK; } catch (...) @@ -1384,11 +1484,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1402,11 +1503,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PhotoSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhotoSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhotoSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoSettings()); return S_OK; } catch (...) @@ -1416,11 +1518,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoSettings()); return S_OK; } catch (...) @@ -1430,11 +1533,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_CaptureFileAsync(Windows::Media::Capture::CameraCaptureUIMode mode, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CaptureFileAsync(mode)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CaptureFileAsync(mode)); return S_OK; } catch (...) @@ -1452,7 +1556,8 @@ struct produce { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -1465,6 +1570,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Format(value); return S_OK; } @@ -1478,7 +1584,8 @@ struct produce { try { - *value = detach(this->shim().MaxResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxResolution()); return S_OK; } catch (...) @@ -1491,6 +1598,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxResolution(value); return S_OK; } @@ -1500,11 +1608,12 @@ struct produce } } - HRESULT __stdcall get_CroppedSizeInPixels(abi_arg_out value) noexcept override + HRESULT __stdcall get_CroppedSizeInPixels(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CroppedSizeInPixels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CroppedSizeInPixels()); return S_OK; } catch (...) @@ -1513,10 +1622,11 @@ struct produce } } - HRESULT __stdcall put_CroppedSizeInPixels(abi_arg_in value) noexcept override + HRESULT __stdcall put_CroppedSizeInPixels(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CroppedSizeInPixels(*reinterpret_cast(&value)); return S_OK; } @@ -1526,11 +1636,12 @@ struct produce } } - HRESULT __stdcall get_CroppedAspectRatio(abi_arg_out value) noexcept override + HRESULT __stdcall get_CroppedAspectRatio(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CroppedAspectRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CroppedAspectRatio()); return S_OK; } catch (...) @@ -1539,10 +1650,11 @@ struct produce } } - HRESULT __stdcall put_CroppedAspectRatio(abi_arg_in value) noexcept override + HRESULT __stdcall put_CroppedAspectRatio(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CroppedAspectRatio(*reinterpret_cast(&value)); return S_OK; } @@ -1556,7 +1668,8 @@ struct produce { try { - *value = detach(this->shim().AllowCropping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowCropping()); return S_OK; } catch (...) @@ -1569,6 +1682,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowCropping(value); return S_OK; } @@ -1586,7 +1700,8 @@ struct produce { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -1599,6 +1714,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Format(value); return S_OK; } @@ -1612,7 +1728,8 @@ struct produce { try { - *value = detach(this->shim().MaxResolution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxResolution()); return S_OK; } catch (...) @@ -1625,6 +1742,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxResolution(value); return S_OK; } @@ -1638,7 +1756,8 @@ struct produce { try { - *value = detach(this->shim().MaxDurationInSeconds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDurationInSeconds()); return S_OK; } catch (...) @@ -1651,6 +1770,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxDurationInSeconds(value); return S_OK; } @@ -1664,7 +1784,8 @@ struct produce { try { - *value = detach(this->shim().AllowTrimming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowTrimming()); return S_OK; } catch (...) @@ -1677,6 +1798,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowTrimming(value); return S_OK; } @@ -1690,10 +1812,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Show(abi_arg_in mediaCapture) noexcept override + HRESULT __stdcall abi_Show(impl::abi_arg_in mediaCapture) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&mediaCapture)); return S_OK; } @@ -1711,7 +1834,8 @@ struct produce : produce_baseshim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -1724,7 +1848,8 @@ struct produce : produce_baseshim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -1737,11 +1862,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Exposure(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Exposure(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Exposure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exposure()); return S_OK; } catch (...) @@ -1751,11 +1877,12 @@ struct produce : produc } } - HRESULT __stdcall get_ExposureCompensation(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExposureCompensation(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExposureCompensation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensation()); return S_OK; } catch (...) @@ -1765,11 +1892,12 @@ struct produce : produc } } - HRESULT __stdcall get_IsoSpeed(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsoSpeed(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsoSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoSpeed()); return S_OK; } catch (...) @@ -1779,11 +1907,12 @@ struct produce : produc } } - HRESULT __stdcall get_Focus(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Focus(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Focus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Focus()); return S_OK; } catch (...) @@ -1793,11 +1922,12 @@ struct produce : produc } } - HRESULT __stdcall get_SceneMode(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SceneMode(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SceneMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SceneMode()); return S_OK; } catch (...) @@ -1807,11 +1937,12 @@ struct produce : produc } } - HRESULT __stdcall get_Flashed(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Flashed(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Flashed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flashed()); return S_OK; } catch (...) @@ -1821,11 +1952,12 @@ struct produce : produc } } - HRESULT __stdcall get_FlashPowerPercent(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FlashPowerPercent(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FlashPowerPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlashPowerPercent()); return S_OK; } catch (...) @@ -1835,11 +1967,12 @@ struct produce : produc } } - HRESULT __stdcall get_WhiteBalance(abi_arg_out> value) noexcept override + HRESULT __stdcall get_WhiteBalance(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WhiteBalance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WhiteBalance()); return S_OK; } catch (...) @@ -1849,11 +1982,12 @@ struct produce : produc } } - HRESULT __stdcall get_ZoomFactor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ZoomFactor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ZoomFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomFactor()); return S_OK; } catch (...) @@ -1867,11 +2001,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_FocusState(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FocusState(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FocusState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusState()); return S_OK; } catch (...) @@ -1881,11 +2016,12 @@ struct produce : produ } } - HRESULT __stdcall get_IsoDigitalGain(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsoDigitalGain(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsoDigitalGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoDigitalGain()); return S_OK; } catch (...) @@ -1895,11 +2031,12 @@ struct produce : produ } } - HRESULT __stdcall get_IsoAnalogGain(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsoAnalogGain(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsoAnalogGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoAnalogGain()); return S_OK; } catch (...) @@ -1909,11 +2046,12 @@ struct produce : produ } } - HRESULT __stdcall get_SensorFrameRate(abi_arg_out value) noexcept override + HRESULT __stdcall get_SensorFrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SensorFrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SensorFrameRate()); return S_OK; } catch (...) @@ -1923,11 +2061,12 @@ struct produce : produ } } - HRESULT __stdcall get_WhiteBalanceGain(abi_arg_out> value) noexcept override + HRESULT __stdcall get_WhiteBalanceGain(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WhiteBalanceGain()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WhiteBalanceGain()); return S_OK; } catch (...) @@ -1941,11 +2080,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_SoftwareBitmap(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoftwareBitmap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareBitmap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareBitmap()); return S_OK; } catch (...) @@ -1959,11 +2099,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -1973,11 +2114,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1991,11 +2133,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_StartAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -2005,11 +2148,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_StopAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -2019,11 +2163,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FinishAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -2037,11 +2182,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_PauseAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_PauseAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().PauseAsync(behavior)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PauseAsync(behavior)); return S_OK; } catch (...) @@ -2051,11 +2197,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_ResumeAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ResumeAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ResumeAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ResumeAsync()); return S_OK; } catch (...) @@ -2069,11 +2216,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_PauseWithResultAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PauseWithResultAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PauseWithResultAsync(behavior)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PauseWithResultAsync(behavior)); return S_OK; } catch (...) @@ -2083,11 +2231,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_StopWithResultAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StopWithResultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StopWithResultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopWithResultAsync()); return S_OK; } catch (...) @@ -2101,11 +2250,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CaptureAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CaptureAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CaptureAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CaptureAsync()); return S_OK; } catch (...) @@ -2115,11 +2265,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -2133,11 +2284,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_StartAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -2147,11 +2299,12 @@ struct produce : produc } } - HRESULT __stdcall abi_StopAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -2161,11 +2314,12 @@ struct produce : produc } } - HRESULT __stdcall abi_FinishAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -2175,11 +2329,12 @@ struct produce : produc } } - HRESULT __stdcall add_PhotoCaptured(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PhotoCaptured(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PhotoCaptured(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PhotoCaptured(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2192,6 +2347,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotoCaptured(token); return S_OK; } @@ -2205,11 +2361,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_InitializeAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_InitializeAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().InitializeAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().InitializeAsync()); return S_OK; } catch (...) @@ -2219,11 +2376,12 @@ struct produce : produce_base mediaCaptureInitializationSettings, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_InitializeWithSettingsAsync(impl::abi_arg_in mediaCaptureInitializationSettings, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().InitializeAsync(*reinterpret_cast(&mediaCaptureInitializationSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().InitializeAsync(*reinterpret_cast(&mediaCaptureInitializationSettings))); return S_OK; } catch (...) @@ -2233,11 +2391,12 @@ struct produce : produce_base encodingProfile, abi_arg_in file, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartRecordToStorageFileAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in file, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartRecordToStorageFileAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartRecordToStorageFileAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&file))); return S_OK; } catch (...) @@ -2247,11 +2406,12 @@ struct produce : produce_base encodingProfile, abi_arg_in stream, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartRecordToStreamAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in stream, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartRecordToStreamAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartRecordToStreamAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -2261,11 +2421,12 @@ struct produce : produce_base encodingProfile, abi_arg_in customMediaSink, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartRecordToCustomSinkAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customMediaSink, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); return S_OK; } catch (...) @@ -2275,11 +2436,12 @@ struct produce : produce_base encodingProfile, abi_arg_in customSinkActivationId, abi_arg_in customSinkSettings, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartRecordToCustomSinkIdAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customSinkActivationId, impl::abi_arg_in customSinkSettings, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); return S_OK; } catch (...) @@ -2289,11 +2451,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_StopRecordAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StopRecordAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StopRecordAsync()); return S_OK; } catch (...) @@ -2303,11 +2466,12 @@ struct produce : produce_base type, abi_arg_in file, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_CapturePhotoToStorageFileAsync(impl::abi_arg_in type, impl::abi_arg_in file, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CapturePhotoToStorageFileAsync(*reinterpret_cast(&type), *reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CapturePhotoToStorageFileAsync(*reinterpret_cast(&type), *reinterpret_cast(&file))); return S_OK; } catch (...) @@ -2317,11 +2481,12 @@ struct produce : produce_base type, abi_arg_in stream, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_CapturePhotoToStreamAsync(impl::abi_arg_in type, impl::abi_arg_in stream, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().CapturePhotoToStreamAsync(*reinterpret_cast(&type), *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().CapturePhotoToStreamAsync(*reinterpret_cast(&type), *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -2331,11 +2496,12 @@ struct produce : produce_base effectActivationID, abi_arg_in effectSettings, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_AddEffectAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_in effectActivationID, impl::abi_arg_in effectSettings, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddEffectAsync(mediaStreamType, *reinterpret_cast(&effectActivationID), *reinterpret_cast(&effectSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddEffectAsync(mediaStreamType, *reinterpret_cast(&effectActivationID), *reinterpret_cast(&effectSettings))); return S_OK; } catch (...) @@ -2345,11 +2511,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_ClearEffectsAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ClearEffectsAsync(mediaStreamType)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ClearEffectsAsync(mediaStreamType)); return S_OK; } catch (...) @@ -2359,11 +2526,12 @@ struct produce : produce_base propertyValue) noexcept override + HRESULT __stdcall abi_SetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId, impl::abi_arg_in propertyValue) noexcept override { try { - this->shim().SetEncoderProperty(mediaStreamType, propertyId, *reinterpret_cast(&propertyValue)); + typename D::abi_guard guard(this->shim()); + this->shim().SetEncoderProperty(mediaStreamType, propertyId, *reinterpret_cast(&propertyValue)); return S_OK; } catch (...) @@ -2372,11 +2540,12 @@ struct produce : produce_base propertyValue) noexcept override + HRESULT __stdcall abi_GetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId, impl::abi_arg_out propertyValue) noexcept override { try { - *propertyValue = detach(this->shim().GetEncoderProperty(mediaStreamType, propertyId)); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_abi(this->shim().GetEncoderProperty(mediaStreamType, propertyId)); return S_OK; } catch (...) @@ -2386,11 +2555,12 @@ struct produce : produce_base errorEventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Failed(impl::abi_arg_in errorEventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Failed(*reinterpret_cast(&errorEventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Failed(*reinterpret_cast(&errorEventHandler))); return S_OK; } catch (...) @@ -2403,6 +2573,7 @@ struct produce : produce_baseshim()); this->shim().Failed(eventCookie); return S_OK; } @@ -2412,11 +2583,12 @@ struct produce : produce_base recordLimitationExceededEventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_RecordLimitationExceeded(impl::abi_arg_in recordLimitationExceededEventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().RecordLimitationExceeded(*reinterpret_cast(&recordLimitationExceededEventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().RecordLimitationExceeded(*reinterpret_cast(&recordLimitationExceededEventHandler))); return S_OK; } catch (...) @@ -2429,6 +2601,7 @@ struct produce : produce_baseshim()); this->shim().RecordLimitationExceeded(eventCookie); return S_OK; } @@ -2438,11 +2611,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MediaCaptureSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaCaptureSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaCaptureSettings()); return S_OK; } catch (...) @@ -2452,11 +2626,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AudioDeviceController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDeviceController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceController()); return S_OK; } catch (...) @@ -2466,11 +2641,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoDeviceController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceController()); return S_OK; } catch (...) @@ -2484,6 +2660,7 @@ struct produce : produce_baseshim()); this->shim().SetPreviewMirroring(value); return S_OK; } @@ -2497,7 +2674,8 @@ struct produce : produce_baseshim().GetPreviewMirroring()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPreviewMirroring()); return S_OK; } catch (...) @@ -2510,6 +2688,7 @@ struct produce : produce_baseshim()); this->shim().SetPreviewRotation(value); return S_OK; } @@ -2523,7 +2702,8 @@ struct produce : produce_baseshim().GetPreviewRotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPreviewRotation()); return S_OK; } catch (...) @@ -2536,6 +2716,7 @@ struct produce : produce_baseshim()); this->shim().SetRecordRotation(value); return S_OK; } @@ -2549,7 +2730,8 @@ struct produce : produce_baseshim().GetRecordRotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRecordRotation()); return S_OK; } catch (...) @@ -2562,11 +2744,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_PrepareLowLagRecordToStorageFileAsync(abi_arg_in encodingProfile, abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagRecordToStorageFileAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagRecordToStorageFileAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagRecordToStorageFileAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&file))); return S_OK; } catch (...) @@ -2576,11 +2759,12 @@ struct produce : produce_base encodingProfile, abi_arg_in stream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagRecordToStreamAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in stream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagRecordToStreamAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagRecordToStreamAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -2590,11 +2774,12 @@ struct produce : produce_base encodingProfile, abi_arg_in customMediaSink, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagRecordToCustomSinkAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customMediaSink, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); return S_OK; } catch (...) @@ -2604,11 +2789,12 @@ struct produce : produce_base encodingProfile, abi_arg_in customSinkActivationId, abi_arg_in customSinkSettings, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagRecordToCustomSinkIdAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customSinkActivationId, impl::abi_arg_in customSinkSettings, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagRecordToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); return S_OK; } catch (...) @@ -2618,11 +2804,12 @@ struct produce : produce_base type, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagPhotoCaptureAsync(impl::abi_arg_in type, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagPhotoCaptureAsync(*reinterpret_cast(&type))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagPhotoCaptureAsync(*reinterpret_cast(&type))); return S_OK; } catch (...) @@ -2632,11 +2819,12 @@ struct produce : produce_base type, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareLowLagPhotoSequenceCaptureAsync(impl::abi_arg_in type, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareLowLagPhotoSequenceCaptureAsync(*reinterpret_cast(&type))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareLowLagPhotoSequenceCaptureAsync(*reinterpret_cast(&type))); return S_OK; } catch (...) @@ -2646,11 +2834,12 @@ struct produce : produce_base mediaEncodingProperties, abi_arg_in> encoderProperties, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SetEncodingPropertiesAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_in mediaEncodingProperties, impl::abi_arg_in> encoderProperties, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SetEncodingPropertiesAsync(mediaStreamType, *reinterpret_cast(&mediaEncodingProperties), *reinterpret_cast(&encoderProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetEncodingPropertiesAsync(mediaStreamType, *reinterpret_cast(&mediaEncodingProperties), *reinterpret_cast(&encoderProperties))); return S_OK; } catch (...) @@ -2664,11 +2853,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_PrepareVariablePhotoSequenceCaptureAsync(abi_arg_in type, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareVariablePhotoSequenceCaptureAsync(impl::abi_arg_in type, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareVariablePhotoSequenceCaptureAsync(*reinterpret_cast(&type))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareVariablePhotoSequenceCaptureAsync(*reinterpret_cast(&type))); return S_OK; } catch (...) @@ -2678,11 +2868,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_FocusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FocusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FocusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2695,6 +2886,7 @@ struct produce : produce_baseshim()); this->shim().FocusChanged(token); return S_OK; } @@ -2704,11 +2896,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PhotoConfirmationCaptured(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PhotoConfirmationCaptured(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PhotoConfirmationCaptured(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2721,6 +2914,7 @@ struct produce : produce_baseshim()); this->shim().PhotoConfirmationCaptured(token); return S_OK; } @@ -2734,11 +2928,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_AddAudioEffectAsync(abi_arg_in definition, abi_arg_out> op) noexcept override + HRESULT __stdcall abi_AddAudioEffectAsync(impl::abi_arg_in definition, impl::abi_arg_out> op) noexcept override { try { - *op = detach(this->shim().AddAudioEffectAsync(*reinterpret_cast(&definition))); + typename D::abi_guard guard(this->shim()); + *op = detach_abi(this->shim().AddAudioEffectAsync(*reinterpret_cast(&definition))); return S_OK; } catch (...) @@ -2748,11 +2943,12 @@ struct produce : produce_base definition, Windows::Media::Capture::MediaStreamType mediaStreamType, abi_arg_out> op) noexcept override + HRESULT __stdcall abi_AddVideoEffectAsync(impl::abi_arg_in definition, Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_out> op) noexcept override { try { - *op = detach(this->shim().AddVideoEffectAsync(*reinterpret_cast(&definition), mediaStreamType)); + typename D::abi_guard guard(this->shim()); + *op = detach_abi(this->shim().AddVideoEffectAsync(*reinterpret_cast(&definition), mediaStreamType)); return S_OK; } catch (...) @@ -2762,11 +2958,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_PauseRecordAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().PauseRecordAsync(behavior)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().PauseRecordAsync(behavior)); return S_OK; } catch (...) @@ -2776,11 +2973,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_ResumeRecordAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ResumeRecordAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ResumeRecordAsync()); return S_OK; } catch (...) @@ -2790,11 +2988,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraStreamStateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraStreamStateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraStreamStateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2807,6 +3006,7 @@ struct produce : produce_baseshim()); this->shim().CameraStreamStateChanged(token); return S_OK; } @@ -2820,7 +3020,8 @@ struct produce : produce_baseshim().CameraStreamState()); + typename D::abi_guard guard(this->shim()); + *streamState = detach_abi(this->shim().CameraStreamState()); return S_OK; } catch (...) @@ -2829,11 +3030,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetPreviewFrameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPreviewFrameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPreviewFrameAsync()); return S_OK; } catch (...) @@ -2843,11 +3045,12 @@ struct produce : produce_base destination, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPreviewFrameCopyAsync(impl::abi_arg_in destination, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPreviewFrameAsync(*reinterpret_cast(&destination))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPreviewFrameAsync(*reinterpret_cast(&destination))); return S_OK; } catch (...) @@ -2857,11 +3060,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ThermalStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ThermalStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ThermalStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2874,6 +3078,7 @@ struct produce : produce_baseshim()); this->shim().ThermalStatusChanged(token); return S_OK; } @@ -2887,7 +3092,8 @@ struct produce : produce_baseshim().ThermalStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThermalStatus()); return S_OK; } catch (...) @@ -2896,11 +3102,12 @@ struct produce : produce_base encodingProperties, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareAdvancedPhotoCaptureAsync(impl::abi_arg_in encodingProperties, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareAdvancedPhotoCaptureAsync(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareAdvancedPhotoCaptureAsync(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -2914,11 +3121,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RemoveEffectAsync(abi_arg_in effect, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_RemoveEffectAsync(impl::abi_arg_in effect, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RemoveEffectAsync(*reinterpret_cast(&effect))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RemoveEffectAsync(*reinterpret_cast(&effect))); return S_OK; } catch (...) @@ -2928,11 +3136,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_PauseRecordWithResultAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PauseRecordWithResultAsync(behavior)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PauseRecordWithResultAsync(behavior)); return S_OK; } catch (...) @@ -2942,11 +3151,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_StopRecordWithResultAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StopRecordWithResultAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopRecordWithResultAsync()); return S_OK; } catch (...) @@ -2956,11 +3166,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_FrameSources(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FrameSources()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameSources()); return S_OK; } catch (...) @@ -2970,11 +3181,12 @@ struct produce : produce_base inputSource, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateFrameReaderAsync(impl::abi_arg_in inputSource, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource))); return S_OK; } catch (...) @@ -2984,11 +3196,12 @@ struct produce : produce_base inputSource, abi_arg_in outputSubtype, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateFrameReaderWithSubtypeAsync(impl::abi_arg_in inputSource, impl::abi_arg_in outputSubtype, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource), *reinterpret_cast(&outputSubtype))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource), *reinterpret_cast(&outputSubtype))); return S_OK; } catch (...) @@ -2998,11 +3211,12 @@ struct produce : produce_base inputSource, abi_arg_in outputSubtype, abi_arg_in outputSize, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateFrameReaderWithSubtypeAndSizeAsync(impl::abi_arg_in inputSource, impl::abi_arg_in outputSubtype, impl::abi_arg_in outputSize, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&outputSize))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFrameReaderAsync(*reinterpret_cast(&inputSource), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&outputSize))); return S_OK; } catch (...) @@ -3016,11 +3230,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -3034,7 +3249,8 @@ struct produce : produ { try { - *value = detach(this->shim().Code()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code()); return S_OK; } catch (...) @@ -3051,7 +3267,8 @@ struct produce : { try { - *value = detach(this->shim().FocusState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusState()); return S_OK; } catch (...) @@ -3064,10 +3281,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall put_AudioDeviceId(abi_arg_in value) noexcept override + HRESULT __stdcall put_AudioDeviceId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioDeviceId(*reinterpret_cast(&value)); return S_OK; } @@ -3077,11 +3295,12 @@ struct produce } } - HRESULT __stdcall get_AudioDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceId()); return S_OK; } catch (...) @@ -3091,10 +3310,11 @@ struct produce } } - HRESULT __stdcall put_VideoDeviceId(abi_arg_in value) noexcept override + HRESULT __stdcall put_VideoDeviceId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoDeviceId(*reinterpret_cast(&value)); return S_OK; } @@ -3104,11 +3324,12 @@ struct produce } } - HRESULT __stdcall get_VideoDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceId()); return S_OK; } catch (...) @@ -3122,6 +3343,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().StreamingCaptureMode(value); return S_OK; } @@ -3135,7 +3357,8 @@ struct produce { try { - *value = detach(this->shim().StreamingCaptureMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamingCaptureMode()); return S_OK; } catch (...) @@ -3148,6 +3371,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotoCaptureSource(value); return S_OK; } @@ -3161,7 +3385,8 @@ struct produce { try { - *value = detach(this->shim().PhotoCaptureSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoCaptureSource()); return S_OK; } catch (...) @@ -3178,6 +3403,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MediaCategory(value); return S_OK; } @@ -3191,7 +3417,8 @@ struct produce { try { - *value = detach(this->shim().MediaCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaCategory()); return S_OK; } catch (...) @@ -3204,6 +3431,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioProcessing(value); return S_OK; } @@ -3217,7 +3445,8 @@ struct produce { try { - *value = detach(this->shim().AudioProcessing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioProcessing()); return S_OK; } catch (...) @@ -3230,10 +3459,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall put_AudioSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_AudioSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioSource(*reinterpret_cast(&value)); return S_OK; } @@ -3243,11 +3473,12 @@ struct produce } } - HRESULT __stdcall get_AudioSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioSource()); return S_OK; } catch (...) @@ -3257,10 +3488,11 @@ struct produce } } - HRESULT __stdcall put_VideoSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_VideoSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoSource(*reinterpret_cast(&value)); return S_OK; } @@ -3270,11 +3502,12 @@ struct produce } } - HRESULT __stdcall get_VideoSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoSource()); return S_OK; } catch (...) @@ -3288,11 +3521,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_VideoProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProfile()); return S_OK; } catch (...) @@ -3302,10 +3536,11 @@ struct produce } } - HRESULT __stdcall put_VideoProfile(abi_arg_in value) noexcept override + HRESULT __stdcall put_VideoProfile(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoProfile(*reinterpret_cast(&value)); return S_OK; } @@ -3315,11 +3550,12 @@ struct produce } } - HRESULT __stdcall get_PreviewMediaDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreviewMediaDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviewMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviewMediaDescription()); return S_OK; } catch (...) @@ -3329,10 +3565,11 @@ struct produce } } - HRESULT __stdcall put_PreviewMediaDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_PreviewMediaDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreviewMediaDescription(*reinterpret_cast(&value)); return S_OK; } @@ -3342,11 +3579,12 @@ struct produce } } - HRESULT __stdcall get_RecordMediaDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_RecordMediaDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RecordMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordMediaDescription()); return S_OK; } catch (...) @@ -3356,10 +3594,11 @@ struct produce } } - HRESULT __stdcall put_RecordMediaDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_RecordMediaDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RecordMediaDescription(*reinterpret_cast(&value)); return S_OK; } @@ -3369,11 +3608,12 @@ struct produce } } - HRESULT __stdcall get_PhotoMediaDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhotoMediaDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhotoMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoMediaDescription()); return S_OK; } catch (...) @@ -3383,10 +3623,11 @@ struct produce } } - HRESULT __stdcall put_PhotoMediaDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_PhotoMediaDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotoMediaDescription(*reinterpret_cast(&value)); return S_OK; } @@ -3400,11 +3641,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_SourceGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceGroup()); return S_OK; } catch (...) @@ -3414,10 +3656,11 @@ struct produce } } - HRESULT __stdcall put_SourceGroup(abi_arg_in value) noexcept override + HRESULT __stdcall put_SourceGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceGroup(*reinterpret_cast(&value)); return S_OK; } @@ -3431,7 +3674,8 @@ struct produce { try { - *value = detach(this->shim().SharingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharingMode()); return S_OK; } catch (...) @@ -3444,6 +3688,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SharingMode(value); return S_OK; } @@ -3457,7 +3702,8 @@ struct produce { try { - *value = detach(this->shim().MemoryPreference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MemoryPreference()); return S_OK; } catch (...) @@ -3470,6 +3716,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MemoryPreference(value); return S_OK; } @@ -3483,11 +3730,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_LastFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastFrame()); return S_OK; } catch (...) @@ -3497,11 +3745,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_RecordDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_RecordDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RecordDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordDuration()); return S_OK; } catch (...) @@ -3514,11 +3763,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_AudioDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceId()); return S_OK; } catch (...) @@ -3528,11 +3778,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_VideoDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceId()); return S_OK; } catch (...) @@ -3546,7 +3797,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().StreamingCaptureMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamingCaptureMode()); return S_OK; } catch (...) @@ -3559,7 +3811,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PhotoCaptureSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoCaptureSource()); return S_OK; } catch (...) @@ -3572,7 +3825,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().VideoDeviceCharacteristic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceCharacteristic()); return S_OK; } catch (...) @@ -3589,7 +3843,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ConcurrentRecordAndPhotoSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConcurrentRecordAndPhotoSupported()); return S_OK; } catch (...) @@ -3602,7 +3857,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ConcurrentRecordAndPhotoSequenceSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConcurrentRecordAndPhotoSequenceSupported()); return S_OK; } catch (...) @@ -3615,7 +3871,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CameraSoundRequiredForRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraSoundRequiredForRegion()); return S_OK; } catch (...) @@ -3624,11 +3881,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Horizontal35mmEquivalentFocalLength(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Horizontal35mmEquivalentFocalLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Horizontal35mmEquivalentFocalLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Horizontal35mmEquivalentFocalLength()); return S_OK; } catch (...) @@ -3638,11 +3896,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_PitchOffsetDegrees(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PitchOffsetDegrees(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PitchOffsetDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PitchOffsetDegrees()); return S_OK; } catch (...) @@ -3652,11 +3911,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Vertical35mmEquivalentFocalLength(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Vertical35mmEquivalentFocalLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Vertical35mmEquivalentFocalLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Vertical35mmEquivalentFocalLength()); return S_OK; } catch (...) @@ -3670,7 +3930,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MediaCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaCategory()); return S_OK; } catch (...) @@ -3683,7 +3944,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().AudioProcessing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioProcessing()); return S_OK; } catch (...) @@ -3696,11 +3958,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_IsVideoProfileSupported(abi_arg_in videoDeviceId, bool * value) noexcept override + HRESULT __stdcall abi_IsVideoProfileSupported(impl::abi_arg_in videoDeviceId, bool * value) noexcept override { try { - *value = detach(this->shim().IsVideoProfileSupported(*reinterpret_cast(&videoDeviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVideoProfileSupported(*reinterpret_cast(&videoDeviceId))); return S_OK; } catch (...) @@ -3709,11 +3972,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_FindAllVideoProfiles(abi_arg_in videoDeviceId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FindAllVideoProfiles(impl::abi_arg_in videoDeviceId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FindAllVideoProfiles(*reinterpret_cast(&videoDeviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllVideoProfiles(*reinterpret_cast(&videoDeviceId))); return S_OK; } catch (...) @@ -3723,11 +3987,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_FindConcurrentProfiles(abi_arg_in videoDeviceId, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FindConcurrentProfiles(impl::abi_arg_in videoDeviceId, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FindConcurrentProfiles(*reinterpret_cast(&videoDeviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindConcurrentProfiles(*reinterpret_cast(&videoDeviceId))); return S_OK; } catch (...) @@ -3737,11 +4002,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_FindKnownVideoProfiles(abi_arg_in videoDeviceId, Windows::Media::Capture::KnownVideoProfile name, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_FindKnownVideoProfiles(impl::abi_arg_in videoDeviceId, Windows::Media::Capture::KnownVideoProfile name, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FindKnownVideoProfiles(*reinterpret_cast(&videoDeviceId), name)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindKnownVideoProfiles(*reinterpret_cast(&videoDeviceId), name)); return S_OK; } catch (...) @@ -3755,11 +4021,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_LastFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastFrame()); return S_OK; } catch (...) @@ -3769,11 +4036,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_RecordDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_RecordDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RecordDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordDuration()); return S_OK; } catch (...) @@ -3786,11 +4054,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_StartPreviewAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartPreviewAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartPreviewAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartPreviewAsync()); return S_OK; } catch (...) @@ -3800,11 +4069,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StartPreviewToCustomSinkAsync(abi_arg_in encodingProfile, abi_arg_in customMediaSink, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartPreviewToCustomSinkAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customMediaSink, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartPreviewToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartPreviewToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customMediaSink))); return S_OK; } catch (...) @@ -3814,11 +4084,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StartPreviewToCustomSinkIdAsync(abi_arg_in encodingProfile, abi_arg_in customSinkActivationId, abi_arg_in customSinkSettings, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StartPreviewToCustomSinkIdAsync(impl::abi_arg_in encodingProfile, impl::abi_arg_in customSinkActivationId, impl::abi_arg_in customSinkSettings, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartPreviewToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartPreviewToCustomSinkAsync(*reinterpret_cast(&encodingProfile), *reinterpret_cast(&customSinkActivationId), *reinterpret_cast(&customSinkSettings))); return S_OK; } catch (...) @@ -3828,11 +4099,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StopPreviewAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_StopPreviewAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StopPreviewAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StopPreviewAsync()); return S_OK; } catch (...) @@ -3846,11 +4118,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -3860,11 +4133,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_VideoDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoDeviceId()); return S_OK; } catch (...) @@ -3874,11 +4148,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SupportedPreviewMediaDescription(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedPreviewMediaDescription(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedPreviewMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedPreviewMediaDescription()); return S_OK; } catch (...) @@ -3888,11 +4163,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SupportedRecordMediaDescription(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedRecordMediaDescription(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedRecordMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedRecordMediaDescription()); return S_OK; } catch (...) @@ -3902,11 +4178,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SupportedPhotoMediaDescription(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedPhotoMediaDescription(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedPhotoMediaDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedPhotoMediaDescription()); return S_OK; } catch (...) @@ -3916,11 +4193,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetConcurrency(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetConcurrency(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConcurrency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConcurrency()); return S_OK; } catch (...) @@ -3938,7 +4216,8 @@ struct produceshim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -3951,7 +4230,8 @@ struct produceshim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -3964,7 +4244,8 @@ struct produceshim().FrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameRate()); return S_OK; } catch (...) @@ -3977,7 +4258,8 @@ struct produceshim().IsVariablePhotoSequenceSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVariablePhotoSequenceSupported()); return S_OK; } catch (...) @@ -3990,7 +4272,8 @@ struct produceshim().IsHdrVideoSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHdrVideoSupported()); return S_OK; } catch (...) @@ -4003,11 +4286,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -4017,11 +4301,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Context(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Context()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Context()); return S_OK; } catch (...) @@ -4035,11 +4320,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -4049,11 +4335,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -4063,11 +4350,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_CaptureTimeOffset(abi_arg_out value) noexcept override + HRESULT __stdcall get_CaptureTimeOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CaptureTimeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaptureTimeOffset()); return S_OK; } catch (...) @@ -4080,11 +4368,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -4094,11 +4383,12 @@ struct produce } } - HRESULT __stdcall get_CaptureTimeOffset(abi_arg_out value) noexcept override + HRESULT __stdcall get_CaptureTimeOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CaptureTimeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaptureTimeOffset()); return S_OK; } catch (...) @@ -4111,11 +4401,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_AudioSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioSource()); return S_OK; } catch (...) @@ -4125,11 +4416,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoSource()); return S_OK; } catch (...) @@ -4143,7 +4435,8 @@ struct produce : produce_baseshim().IsAudioSuspended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAudioSuspended()); return S_OK; } catch (...) @@ -4156,7 +4449,8 @@ struct produce : produce_baseshim().IsVideoSuspended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVideoSuspended()); return S_OK; } catch (...) @@ -4165,11 +4459,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceSuspensionChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceSuspensionChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceSuspensionChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -4182,6 +4477,7 @@ struct produce : produce_baseshim()); this->shim().SourceSuspensionChanged(token); return S_OK; } @@ -4195,11 +4491,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -4217,7 +4514,8 @@ struct produce : { try { - *value = detach(this->shim().IsAudioSuspended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAudioSuspended()); return S_OK; } catch (...) @@ -4230,7 +4528,8 @@ struct produce : { try { - *value = detach(this->shim().IsVideoSuspended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVideoSuspended()); return S_OK; } catch (...) @@ -4243,11 +4542,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_InputProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputProperties()); return S_OK; } catch (...) @@ -4257,11 +4557,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OutputProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputProperties()); return S_OK; } catch (...) @@ -4279,562 +4580,562 @@ namespace Windows::Media::Capture { template bool impl_IAppCapture::IsCapturingAudio() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCapturingAudio(&value)); + check_hresult(WINRT_SHIM(IAppCapture)->get_IsCapturingAudio(&value)); return value; } template bool impl_IAppCapture::IsCapturingVideo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCapturingVideo(&value)); + check_hresult(WINRT_SHIM(IAppCapture)->get_IsCapturingVideo(&value)); return value; } -template event_token impl_IAppCapture::CapturingChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAppCapture::CapturingChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CapturingChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAppCapture)->add_CapturingChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IAppCapture::CapturingChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAppCapture::CapturingChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::IAppCapture::remove_CapturingChanged, CapturingChanged(handler)); } template void impl_IAppCapture::CapturingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CapturingChanged(token)); + check_hresult(WINRT_SHIM(IAppCapture)->remove_CapturingChanged(token)); } template Windows::Media::Capture::AppCapture impl_IAppCaptureStatics::GetForCurrentView() const { Windows::Media::Capture::AppCapture value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureStatics)->abi_GetForCurrentView(put_abi(value))); return value; } template Windows::Media::Capture::CameraCaptureUIPhotoFormat impl_ICameraCaptureUIPhotoCaptureSettings::Format() const { Windows::Media::Capture::CameraCaptureUIPhotoFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->get_Format(&value)); return value; } template void impl_ICameraCaptureUIPhotoCaptureSettings::Format(Windows::Media::Capture::CameraCaptureUIPhotoFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_Format(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->put_Format(value)); } template Windows::Media::Capture::CameraCaptureUIMaxPhotoResolution impl_ICameraCaptureUIPhotoCaptureSettings::MaxResolution() const { Windows::Media::Capture::CameraCaptureUIMaxPhotoResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxResolution(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->get_MaxResolution(&value)); return value; } template void impl_ICameraCaptureUIPhotoCaptureSettings::MaxResolution(Windows::Media::Capture::CameraCaptureUIMaxPhotoResolution value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxResolution(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->put_MaxResolution(value)); } template Windows::Foundation::Size impl_ICameraCaptureUIPhotoCaptureSettings::CroppedSizeInPixels() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_CroppedSizeInPixels(put(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->get_CroppedSizeInPixels(put_abi(value))); return value; } template void impl_ICameraCaptureUIPhotoCaptureSettings::CroppedSizeInPixels(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_CroppedSizeInPixels(get(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->put_CroppedSizeInPixels(get_abi(value))); } template Windows::Foundation::Size impl_ICameraCaptureUIPhotoCaptureSettings::CroppedAspectRatio() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_CroppedAspectRatio(put(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->get_CroppedAspectRatio(put_abi(value))); return value; } template void impl_ICameraCaptureUIPhotoCaptureSettings::CroppedAspectRatio(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_CroppedAspectRatio(get(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->put_CroppedAspectRatio(get_abi(value))); } template bool impl_ICameraCaptureUIPhotoCaptureSettings::AllowCropping() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowCropping(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->get_AllowCropping(&value)); return value; } template void impl_ICameraCaptureUIPhotoCaptureSettings::AllowCropping(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowCropping(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIPhotoCaptureSettings)->put_AllowCropping(value)); } template Windows::Media::Capture::CameraCaptureUIVideoFormat impl_ICameraCaptureUIVideoCaptureSettings::Format() const { Windows::Media::Capture::CameraCaptureUIVideoFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->get_Format(&value)); return value; } template void impl_ICameraCaptureUIVideoCaptureSettings::Format(Windows::Media::Capture::CameraCaptureUIVideoFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_Format(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->put_Format(value)); } template Windows::Media::Capture::CameraCaptureUIMaxVideoResolution impl_ICameraCaptureUIVideoCaptureSettings::MaxResolution() const { Windows::Media::Capture::CameraCaptureUIMaxVideoResolution value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxResolution(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->get_MaxResolution(&value)); return value; } template void impl_ICameraCaptureUIVideoCaptureSettings::MaxResolution(Windows::Media::Capture::CameraCaptureUIMaxVideoResolution value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxResolution(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->put_MaxResolution(value)); } template float impl_ICameraCaptureUIVideoCaptureSettings::MaxDurationInSeconds() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDurationInSeconds(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->get_MaxDurationInSeconds(&value)); return value; } template void impl_ICameraCaptureUIVideoCaptureSettings::MaxDurationInSeconds(float value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDurationInSeconds(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->put_MaxDurationInSeconds(value)); } template bool impl_ICameraCaptureUIVideoCaptureSettings::AllowTrimming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowTrimming(&value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->get_AllowTrimming(&value)); return value; } template void impl_ICameraCaptureUIVideoCaptureSettings::AllowTrimming(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowTrimming(value)); + check_hresult(WINRT_SHIM(ICameraCaptureUIVideoCaptureSettings)->put_AllowTrimming(value)); } template Windows::Media::Capture::CameraCaptureUIPhotoCaptureSettings impl_ICameraCaptureUI::PhotoSettings() const { Windows::Media::Capture::CameraCaptureUIPhotoCaptureSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PhotoSettings(put(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUI)->get_PhotoSettings(put_abi(value))); return value; } template Windows::Media::Capture::CameraCaptureUIVideoCaptureSettings impl_ICameraCaptureUI::VideoSettings() const { Windows::Media::Capture::CameraCaptureUIVideoCaptureSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoSettings(put(value))); + check_hresult(WINRT_SHIM(ICameraCaptureUI)->get_VideoSettings(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICameraCaptureUI::CaptureFileAsync(Windows::Media::Capture::CameraCaptureUIMode mode) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CaptureFileAsync(mode, put(asyncInfo))); + check_hresult(WINRT_SHIM(ICameraCaptureUI)->abi_CaptureFileAsync(mode, put_abi(asyncInfo))); return asyncInfo; } template hstring impl_IMediaCaptureFailedEventArgs::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureFailedEventArgs)->get_Message(put_abi(value))); return value; } template uint32_t impl_IMediaCaptureFailedEventArgs::Code() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureFailedEventArgs)->get_Code(&value)); return value; } template uint32_t impl_IMediaCaptureVideoProfileMediaDescription::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfileMediaDescription)->get_Width(&value)); return value; } template uint32_t impl_IMediaCaptureVideoProfileMediaDescription::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfileMediaDescription)->get_Height(&value)); return value; } template double impl_IMediaCaptureVideoProfileMediaDescription::FrameRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FrameRate(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfileMediaDescription)->get_FrameRate(&value)); return value; } template bool impl_IMediaCaptureVideoProfileMediaDescription::IsVariablePhotoSequenceSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVariablePhotoSequenceSupported(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfileMediaDescription)->get_IsVariablePhotoSequenceSupported(&value)); return value; } template bool impl_IMediaCaptureVideoProfileMediaDescription::IsHdrVideoSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHdrVideoSupported(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfileMediaDescription)->get_IsHdrVideoSupported(&value)); return value; } template hstring impl_IMediaCaptureVideoProfile::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->get_Id(put_abi(value))); return value; } template hstring impl_IMediaCaptureVideoProfile::VideoDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceId(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->get_VideoDeviceId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureVideoProfile::SupportedPreviewMediaDescription() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedPreviewMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->get_SupportedPreviewMediaDescription(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureVideoProfile::SupportedRecordMediaDescription() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedRecordMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->get_SupportedRecordMediaDescription(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureVideoProfile::SupportedPhotoMediaDescription() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedPhotoMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->get_SupportedPhotoMediaDescription(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureVideoProfile::GetConcurrency() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetConcurrency(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoProfile)->abi_GetConcurrency(put_abi(value))); return value; } -template void impl_IMediaCaptureInitializationSettings::AudioDeviceId(hstring_ref value) const +template void impl_IMediaCaptureInitializationSettings::AudioDeviceId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioDeviceId(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->put_AudioDeviceId(get_abi(value))); } template hstring impl_IMediaCaptureInitializationSettings::AudioDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceId(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->get_AudioDeviceId(put_abi(value))); return value; } -template void impl_IMediaCaptureInitializationSettings::VideoDeviceId(hstring_ref value) const +template void impl_IMediaCaptureInitializationSettings::VideoDeviceId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoDeviceId(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->put_VideoDeviceId(get_abi(value))); } template hstring impl_IMediaCaptureInitializationSettings::VideoDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceId(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->get_VideoDeviceId(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings::StreamingCaptureMode(Windows::Media::Capture::StreamingCaptureMode value) const { - check_hresult(static_cast(static_cast(*this))->put_StreamingCaptureMode(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->put_StreamingCaptureMode(value)); } template Windows::Media::Capture::StreamingCaptureMode impl_IMediaCaptureInitializationSettings::StreamingCaptureMode() const { Windows::Media::Capture::StreamingCaptureMode value {}; - check_hresult(static_cast(static_cast(*this))->get_StreamingCaptureMode(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->get_StreamingCaptureMode(&value)); return value; } template void impl_IMediaCaptureInitializationSettings::PhotoCaptureSource(Windows::Media::Capture::PhotoCaptureSource value) const { - check_hresult(static_cast(static_cast(*this))->put_PhotoCaptureSource(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->put_PhotoCaptureSource(value)); } template Windows::Media::Capture::PhotoCaptureSource impl_IMediaCaptureInitializationSettings::PhotoCaptureSource() const { Windows::Media::Capture::PhotoCaptureSource value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotoCaptureSource(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings)->get_PhotoCaptureSource(&value)); return value; } template void impl_IMediaCaptureInitializationSettings2::MediaCategory(Windows::Media::Capture::MediaCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaCategory(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings2)->put_MediaCategory(value)); } template Windows::Media::Capture::MediaCategory impl_IMediaCaptureInitializationSettings2::MediaCategory() const { Windows::Media::Capture::MediaCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaCategory(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings2)->get_MediaCategory(&value)); return value; } template void impl_IMediaCaptureInitializationSettings2::AudioProcessing(Windows::Media::AudioProcessing value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioProcessing(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings2)->put_AudioProcessing(value)); } template Windows::Media::AudioProcessing impl_IMediaCaptureInitializationSettings2::AudioProcessing() const { Windows::Media::AudioProcessing value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioProcessing(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings2)->get_AudioProcessing(&value)); return value; } template void impl_IMediaCaptureInitializationSettings3::AudioSource(const Windows::Media::Core::IMediaSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioSource(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings3)->put_AudioSource(get_abi(value))); } template Windows::Media::Core::IMediaSource impl_IMediaCaptureInitializationSettings3::AudioSource() const { Windows::Media::Core::IMediaSource value; - check_hresult(static_cast(static_cast(*this))->get_AudioSource(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings3)->get_AudioSource(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings3::VideoSource(const Windows::Media::Core::IMediaSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoSource(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings3)->put_VideoSource(get_abi(value))); } template Windows::Media::Core::IMediaSource impl_IMediaCaptureInitializationSettings3::VideoSource() const { Windows::Media::Core::IMediaSource value; - check_hresult(static_cast(static_cast(*this))->get_VideoSource(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings3)->get_VideoSource(put_abi(value))); return value; } template Windows::Media::Capture::MediaCaptureVideoProfile impl_IMediaCaptureInitializationSettings4::VideoProfile() const { Windows::Media::Capture::MediaCaptureVideoProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProfile(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->get_VideoProfile(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings4::VideoProfile(const Windows::Media::Capture::MediaCaptureVideoProfile & value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoProfile(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->put_VideoProfile(get_abi(value))); } template Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription impl_IMediaCaptureInitializationSettings4::PreviewMediaDescription() const { Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreviewMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->get_PreviewMediaDescription(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings4::PreviewMediaDescription(const Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_PreviewMediaDescription(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->put_PreviewMediaDescription(get_abi(value))); } template Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription impl_IMediaCaptureInitializationSettings4::RecordMediaDescription() const { Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RecordMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->get_RecordMediaDescription(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings4::RecordMediaDescription(const Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_RecordMediaDescription(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->put_RecordMediaDescription(get_abi(value))); } template Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription impl_IMediaCaptureInitializationSettings4::PhotoMediaDescription() const { Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PhotoMediaDescription(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->get_PhotoMediaDescription(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings4::PhotoMediaDescription(const Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription & value) const { - check_hresult(static_cast(static_cast(*this))->put_PhotoMediaDescription(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings4)->put_PhotoMediaDescription(get_abi(value))); } template Windows::Media::Capture::Frames::MediaFrameSourceGroup impl_IMediaCaptureInitializationSettings5::SourceGroup() const { Windows::Media::Capture::Frames::MediaFrameSourceGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceGroup(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->get_SourceGroup(put_abi(value))); return value; } template void impl_IMediaCaptureInitializationSettings5::SourceGroup(const Windows::Media::Capture::Frames::MediaFrameSourceGroup & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceGroup(get(value))); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->put_SourceGroup(get_abi(value))); } template Windows::Media::Capture::MediaCaptureSharingMode impl_IMediaCaptureInitializationSettings5::SharingMode() const { Windows::Media::Capture::MediaCaptureSharingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SharingMode(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->get_SharingMode(&value)); return value; } template void impl_IMediaCaptureInitializationSettings5::SharingMode(Windows::Media::Capture::MediaCaptureSharingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SharingMode(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->put_SharingMode(value)); } template Windows::Media::Capture::MediaCaptureMemoryPreference impl_IMediaCaptureInitializationSettings5::MemoryPreference() const { Windows::Media::Capture::MediaCaptureMemoryPreference value {}; - check_hresult(static_cast(static_cast(*this))->get_MemoryPreference(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->get_MemoryPreference(&value)); return value; } template void impl_IMediaCaptureInitializationSettings5::MemoryPreference(Windows::Media::Capture::MediaCaptureMemoryPreference value) const { - check_hresult(static_cast(static_cast(*this))->put_MemoryPreference(value)); + check_hresult(WINRT_SHIM(IMediaCaptureInitializationSettings5)->put_MemoryPreference(value)); } -template bool impl_IMediaCaptureStatics::IsVideoProfileSupported(hstring_ref videoDeviceId) const +template bool impl_IMediaCaptureStatics::IsVideoProfileSupported(hstring_view videoDeviceId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsVideoProfileSupported(get(videoDeviceId), &value)); + check_hresult(WINRT_SHIM(IMediaCaptureStatics)->abi_IsVideoProfileSupported(get_abi(videoDeviceId), &value)); return value; } -template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindAllVideoProfiles(hstring_ref videoDeviceId) const +template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindAllVideoProfiles(hstring_view videoDeviceId) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllVideoProfiles(get(videoDeviceId), put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureStatics)->abi_FindAllVideoProfiles(get_abi(videoDeviceId), put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindConcurrentProfiles(hstring_ref videoDeviceId) const +template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindConcurrentProfiles(hstring_view videoDeviceId) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_FindConcurrentProfiles(get(videoDeviceId), put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureStatics)->abi_FindConcurrentProfiles(get_abi(videoDeviceId), put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindKnownVideoProfiles(hstring_ref videoDeviceId, Windows::Media::Capture::KnownVideoProfile name) const +template Windows::Foundation::Collections::IVectorView impl_IMediaCaptureStatics::FindKnownVideoProfiles(hstring_view videoDeviceId, Windows::Media::Capture::KnownVideoProfile name) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_FindKnownVideoProfiles(get(videoDeviceId), name, put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureStatics)->abi_FindKnownVideoProfiles(get_abi(videoDeviceId), name, put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::InitializeAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_InitializeAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_InitializeAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::InitializeAsync(const Windows::Media::Capture::MediaCaptureInitializationSettings & mediaCaptureInitializationSettings) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_InitializeWithSettingsAsync(get(mediaCaptureInitializationSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_InitializeWithSettingsAsync(get_abi(mediaCaptureInitializationSettings), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::StartRecordToStorageFileAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartRecordToStorageFileAsync(get(encodingProfile), get(file), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_StartRecordToStorageFileAsync(get_abi(encodingProfile), get_abi(file), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::StartRecordToStreamAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartRecordToStreamAsync(get(encodingProfile), get(stream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_StartRecordToStreamAsync(get_abi(encodingProfile), get_abi(stream), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::StartRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Media::IMediaExtension & customMediaSink) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartRecordToCustomSinkAsync(get(encodingProfile), get(customMediaSink), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_StartRecordToCustomSinkAsync(get_abi(encodingProfile), get_abi(customMediaSink), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IMediaCapture::StartRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_ref customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const +template Windows::Foundation::IAsyncAction impl_IMediaCapture::StartRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_view customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartRecordToCustomSinkIdAsync(get(encodingProfile), get(customSinkActivationId), get(customSinkSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_StartRecordToCustomSinkIdAsync(get_abi(encodingProfile), get_abi(customSinkActivationId), get_abi(customSinkSettings), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::StopRecordAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StopRecordAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_StopRecordAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::CapturePhotoToStorageFileAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & type, const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CapturePhotoToStorageFileAsync(get(type), get(file), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_CapturePhotoToStorageFileAsync(get_abi(type), get_abi(file), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::CapturePhotoToStreamAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & type, const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_CapturePhotoToStreamAsync(get(type), get(stream), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_CapturePhotoToStreamAsync(get_abi(type), get_abi(stream), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IMediaCapture::AddEffectAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, hstring_ref effectActivationID, const Windows::Foundation::Collections::IPropertySet & effectSettings) const +template Windows::Foundation::IAsyncAction impl_IMediaCapture::AddEffectAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, hstring_view effectActivationID, const Windows::Foundation::Collections::IPropertySet & effectSettings) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddEffectAsync(mediaStreamType, get(effectActivationID), get(effectSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_AddEffectAsync(mediaStreamType, get_abi(effectActivationID), get_abi(effectSettings), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture::ClearEffectsAsync(Windows::Media::Capture::MediaStreamType mediaStreamType) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ClearEffectsAsync(mediaStreamType, put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_ClearEffectsAsync(mediaStreamType, put_abi(asyncInfo))); return asyncInfo; } -template void impl_IMediaCapture::SetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId, const Windows::IInspectable & propertyValue) const +template void impl_IMediaCapture::SetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId, const Windows::Foundation::IInspectable & propertyValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetEncoderProperty(mediaStreamType, propertyId, get(propertyValue))); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_SetEncoderProperty(mediaStreamType, propertyId, get_abi(propertyValue))); } -template Windows::IInspectable impl_IMediaCapture::GetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId) const +template Windows::Foundation::IInspectable impl_IMediaCapture::GetEncoderProperty(Windows::Media::Capture::MediaStreamType mediaStreamType, GUID propertyId) const { - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_GetEncoderProperty(mediaStreamType, propertyId, put(propertyValue))); + Windows::Foundation::IInspectable propertyValue; + check_hresult(WINRT_SHIM(IMediaCapture)->abi_GetEncoderProperty(mediaStreamType, propertyId, put_abi(propertyValue))); return propertyValue; } template event_token impl_IMediaCapture::Failed(const Windows::Media::Capture::MediaCaptureFailedEventHandler & errorEventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Failed(get(errorEventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMediaCapture)->add_Failed(get_abi(errorEventHandler), &eventCookie)); return eventCookie; } @@ -4845,13 +5146,13 @@ template event_revoker impl_IMediaCapture::Failed template void impl_IMediaCapture::Failed(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Failed(eventCookie)); + check_hresult(WINRT_SHIM(IMediaCapture)->remove_Failed(eventCookie)); } template event_token impl_IMediaCapture::RecordLimitationExceeded(const Windows::Media::Capture::RecordLimitationExceededEventHandler & recordLimitationExceededEventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_RecordLimitationExceeded(get(recordLimitationExceededEventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMediaCapture)->add_RecordLimitationExceeded(get_abi(recordLimitationExceededEventHandler), &eventCookie)); return eventCookie; } @@ -4862,126 +5163,126 @@ template event_revoker impl_IMediaCapture::Record template void impl_IMediaCapture::RecordLimitationExceeded(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RecordLimitationExceeded(eventCookie)); + check_hresult(WINRT_SHIM(IMediaCapture)->remove_RecordLimitationExceeded(eventCookie)); } template Windows::Media::Capture::MediaCaptureSettings impl_IMediaCapture::MediaCaptureSettings() const { Windows::Media::Capture::MediaCaptureSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaCaptureSettings(put(value))); + check_hresult(WINRT_SHIM(IMediaCapture)->get_MediaCaptureSettings(put_abi(value))); return value; } template Windows::Media::Devices::AudioDeviceController impl_IMediaCapture::AudioDeviceController() const { Windows::Media::Devices::AudioDeviceController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceController(put(value))); + check_hresult(WINRT_SHIM(IMediaCapture)->get_AudioDeviceController(put_abi(value))); return value; } template Windows::Media::Devices::VideoDeviceController impl_IMediaCapture::VideoDeviceController() const { Windows::Media::Devices::VideoDeviceController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceController(put(value))); + check_hresult(WINRT_SHIM(IMediaCapture)->get_VideoDeviceController(put_abi(value))); return value; } template void impl_IMediaCapture::SetPreviewMirroring(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPreviewMirroring(value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_SetPreviewMirroring(value)); } template bool impl_IMediaCapture::GetPreviewMirroring() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPreviewMirroring(&value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_GetPreviewMirroring(&value)); return value; } template void impl_IMediaCapture::SetPreviewRotation(Windows::Media::Capture::VideoRotation value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPreviewRotation(value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_SetPreviewRotation(value)); } template Windows::Media::Capture::VideoRotation impl_IMediaCapture::GetPreviewRotation() const { Windows::Media::Capture::VideoRotation value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPreviewRotation(&value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_GetPreviewRotation(&value)); return value; } template void impl_IMediaCapture::SetRecordRotation(Windows::Media::Capture::VideoRotation value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRecordRotation(value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_SetRecordRotation(value)); } template Windows::Media::Capture::VideoRotation impl_IMediaCapture::GetRecordRotation() const { Windows::Media::Capture::VideoRotation value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRecordRotation(&value)); + check_hresult(WINRT_SHIM(IMediaCapture)->abi_GetRecordRotation(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagRecordToStorageFileAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagRecordToStorageFileAsync(get(encodingProfile), get(file), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagRecordToStorageFileAsync(get_abi(encodingProfile), get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagRecordToStreamAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagRecordToStreamAsync(get(encodingProfile), get(stream), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagRecordToStreamAsync(get_abi(encodingProfile), get_abi(stream), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Media::IMediaExtension & customMediaSink) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagRecordToCustomSinkAsync(get(encodingProfile), get(customMediaSink), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagRecordToCustomSinkAsync(get_abi(encodingProfile), get_abi(customMediaSink), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_ref customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const +template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagRecordToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_view customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagRecordToCustomSinkIdAsync(get(encodingProfile), get(customSinkActivationId), get(customSinkSettings), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagRecordToCustomSinkIdAsync(get_abi(encodingProfile), get_abi(customSinkActivationId), get_abi(customSinkSettings), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagPhotoCaptureAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & type) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagPhotoCaptureAsync(get(type), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagPhotoCaptureAsync(get_abi(type), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture2::PrepareLowLagPhotoSequenceCaptureAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & type) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareLowLagPhotoSequenceCaptureAsync(get(type), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_PrepareLowLagPhotoSequenceCaptureAsync(get_abi(type), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IMediaCapture2::SetEncodingPropertiesAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, const Windows::Media::MediaProperties::IMediaEncodingProperties & mediaEncodingProperties, const Windows::Media::MediaProperties::MediaPropertySet & encoderProperties) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SetEncodingPropertiesAsync(mediaStreamType, get(mediaEncodingProperties), get(encoderProperties), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture2)->abi_SetEncodingPropertiesAsync(mediaStreamType, get_abi(mediaEncodingProperties), get_abi(encoderProperties), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture3::PrepareVariablePhotoSequenceCaptureAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & type) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareVariablePhotoSequenceCaptureAsync(get(type), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture3)->abi_PrepareVariablePhotoSequenceCaptureAsync(get_abi(type), put_abi(operation))); return operation; } template event_token impl_IMediaCapture3::FocusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FocusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaCapture3)->add_FocusChanged(get_abi(handler), &token)); return token; } @@ -4992,13 +5293,13 @@ template event_revoker impl_IMediaCapture3::Focu template void impl_IMediaCapture3::FocusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FocusChanged(token)); + check_hresult(WINRT_SHIM(IMediaCapture3)->remove_FocusChanged(token)); } template event_token impl_IMediaCapture3::PhotoConfirmationCaptured(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PhotoConfirmationCaptured(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaCapture3)->add_PhotoConfirmationCaptured(get_abi(handler), &token)); return token; } @@ -5009,187 +5310,187 @@ template event_revoker impl_IMediaCapture3::Phot template void impl_IMediaCapture3::PhotoConfirmationCaptured(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PhotoConfirmationCaptured(token)); + check_hresult(WINRT_SHIM(IMediaCapture3)->remove_PhotoConfirmationCaptured(token)); } template Windows::Foundation::IAsyncOperation impl_IMediaCapture4::AddAudioEffectAsync(const Windows::Media::Effects::IAudioEffectDefinition & definition) const { Windows::Foundation::IAsyncOperation op; - check_hresult(static_cast(static_cast(*this))->abi_AddAudioEffectAsync(get(definition), put(op))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_AddAudioEffectAsync(get_abi(definition), put_abi(op))); return op; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture4::AddVideoEffectAsync(const Windows::Media::Effects::IVideoEffectDefinition & definition, Windows::Media::Capture::MediaStreamType mediaStreamType) const { Windows::Foundation::IAsyncOperation op; - check_hresult(static_cast(static_cast(*this))->abi_AddVideoEffectAsync(get(definition), mediaStreamType, put(op))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_AddVideoEffectAsync(get_abi(definition), mediaStreamType, put_abi(op))); return op; } template Windows::Foundation::IAsyncAction impl_IMediaCapture4::PauseRecordAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_PauseRecordAsync(behavior, put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_PauseRecordAsync(behavior, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCapture4::ResumeRecordAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ResumeRecordAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_ResumeRecordAsync(put_abi(asyncInfo))); return asyncInfo; } -template event_token impl_IMediaCapture4::CameraStreamStateChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaCapture4::CameraStreamStateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraStreamStateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaCapture4)->add_CameraStreamStateChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaCapture4::CameraStreamStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaCapture4::CameraStreamStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::IMediaCapture4::remove_CameraStreamStateChanged, CameraStreamStateChanged(handler)); } template void impl_IMediaCapture4::CameraStreamStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraStreamStateChanged(token)); + check_hresult(WINRT_SHIM(IMediaCapture4)->remove_CameraStreamStateChanged(token)); } template Windows::Media::Devices::CameraStreamState impl_IMediaCapture4::CameraStreamState() const { Windows::Media::Devices::CameraStreamState streamState {}; - check_hresult(static_cast(static_cast(*this))->get_CameraStreamState(&streamState)); + check_hresult(WINRT_SHIM(IMediaCapture4)->get_CameraStreamState(&streamState)); return streamState; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture4::GetPreviewFrameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPreviewFrameAsync(put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_GetPreviewFrameAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture4::GetPreviewFrameAsync(const Windows::Media::VideoFrame & destination) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPreviewFrameCopyAsync(get(destination), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_GetPreviewFrameCopyAsync(get_abi(destination), put_abi(operation))); return operation; } -template event_token impl_IMediaCapture4::ThermalStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaCapture4::ThermalStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ThermalStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaCapture4)->add_ThermalStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaCapture4::ThermalStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaCapture4::ThermalStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::IMediaCapture4::remove_ThermalStatusChanged, ThermalStatusChanged(handler)); } template void impl_IMediaCapture4::ThermalStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ThermalStatusChanged(token)); + check_hresult(WINRT_SHIM(IMediaCapture4)->remove_ThermalStatusChanged(token)); } template Windows::Media::Capture::MediaCaptureThermalStatus impl_IMediaCapture4::ThermalStatus() const { Windows::Media::Capture::MediaCaptureThermalStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ThermalStatus(&value)); + check_hresult(WINRT_SHIM(IMediaCapture4)->get_ThermalStatus(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture4::PrepareAdvancedPhotoCaptureAsync(const Windows::Media::MediaProperties::ImageEncodingProperties & encodingProperties) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareAdvancedPhotoCaptureAsync(get(encodingProperties), put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture4)->abi_PrepareAdvancedPhotoCaptureAsync(get_abi(encodingProperties), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IMediaCapture5::RemoveEffectAsync(const Windows::Media::IMediaExtension & effect) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RemoveEffectAsync(get(effect), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_RemoveEffectAsync(get_abi(effect), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::PauseRecordWithResultAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PauseRecordWithResultAsync(behavior, put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_PauseRecordWithResultAsync(behavior, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::StopRecordWithResultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StopRecordWithResultAsync(put(operation))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_StopRecordWithResultAsync(put_abi(operation))); return operation; } template Windows::Foundation::Collections::IMapView impl_IMediaCapture5::FrameSources() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_FrameSources(put(value))); + check_hresult(WINRT_SHIM(IMediaCapture5)->get_FrameSources(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::CreateFrameReaderAsync(const Windows::Media::Capture::Frames::MediaFrameSource & inputSource) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameReaderAsync(get(inputSource), put(value))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_CreateFrameReaderAsync(get_abi(inputSource), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::CreateFrameReaderAsync(const Windows::Media::Capture::Frames::MediaFrameSource & inputSource, hstring_ref outputSubtype) const +template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::CreateFrameReaderAsync(const Windows::Media::Capture::Frames::MediaFrameSource & inputSource, hstring_view outputSubtype) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameReaderWithSubtypeAsync(get(inputSource), get(outputSubtype), put(value))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_CreateFrameReaderWithSubtypeAsync(get_abi(inputSource), get_abi(outputSubtype), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::CreateFrameReaderAsync(const Windows::Media::Capture::Frames::MediaFrameSource & inputSource, hstring_ref outputSubtype, const Windows::Graphics::Imaging::BitmapSize & outputSize) const +template Windows::Foundation::IAsyncOperation impl_IMediaCapture5::CreateFrameReaderAsync(const Windows::Media::Capture::Frames::MediaFrameSource & inputSource, hstring_view outputSubtype, const Windows::Graphics::Imaging::BitmapSize & outputSize) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateFrameReaderWithSubtypeAndSizeAsync(get(inputSource), get(outputSubtype), get(outputSize), put(value))); + check_hresult(WINRT_SHIM(IMediaCapture5)->abi_CreateFrameReaderWithSubtypeAndSizeAsync(get_abi(inputSource), get_abi(outputSubtype), get_abi(outputSize), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ILowLagPhotoCapture::CaptureAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CaptureAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagPhotoCapture)->abi_CaptureAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagPhotoCapture::FinishAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagPhotoCapture)->abi_FinishAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IAdvancedPhotoCapture::CaptureAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CaptureAsync(put(operation))); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->abi_CaptureAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IAdvancedPhotoCapture::CaptureAsync(const Windows::IInspectable & context) const +template Windows::Foundation::IAsyncOperation impl_IAdvancedPhotoCapture::CaptureAsync(const Windows::Foundation::IInspectable & context) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CaptureWithContextAsync(get(context), put(operation))); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->abi_CaptureWithContextAsync(get_abi(context), put_abi(operation))); return operation; } template event_token impl_IAdvancedPhotoCapture::OptionalReferencePhotoCaptured(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OptionalReferencePhotoCaptured(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->add_OptionalReferencePhotoCaptured(get_abi(handler), &token)); return token; } @@ -5200,177 +5501,177 @@ template event_revoker impl_IAdvancedPhotoCa template void impl_IAdvancedPhotoCapture::OptionalReferencePhotoCaptured(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OptionalReferencePhotoCaptured(token)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->remove_OptionalReferencePhotoCaptured(token)); } -template event_token impl_IAdvancedPhotoCapture::AllPhotosCaptured(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAdvancedPhotoCapture::AllPhotosCaptured(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AllPhotosCaptured(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->add_AllPhotosCaptured(get_abi(handler), &token)); return token; } -template event_revoker impl_IAdvancedPhotoCapture::AllPhotosCaptured(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAdvancedPhotoCapture::AllPhotosCaptured(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Capture::IAdvancedPhotoCapture::remove_AllPhotosCaptured, AllPhotosCaptured(handler)); } template void impl_IAdvancedPhotoCapture::AllPhotosCaptured(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AllPhotosCaptured(token)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->remove_AllPhotosCaptured(token)); } template Windows::Foundation::IAsyncAction impl_IAdvancedPhotoCapture::FinishAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(IAdvancedPhotoCapture)->abi_FinishAsync(put_abi(operation))); return operation; } template Windows::Media::Capture::CapturedFrame impl_IAdvancedCapturedPhoto::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IAdvancedCapturedPhoto)->get_Frame(put_abi(value))); return value; } template Windows::Media::Devices::AdvancedPhotoMode impl_IAdvancedCapturedPhoto::Mode() const { Windows::Media::Devices::AdvancedPhotoMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IAdvancedCapturedPhoto)->get_Mode(&value)); return value; } -template Windows::IInspectable impl_IAdvancedCapturedPhoto::Context() const +template Windows::Foundation::IInspectable impl_IAdvancedCapturedPhoto::Context() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Context(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IAdvancedCapturedPhoto)->get_Context(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdvancedCapturedPhoto2::FrameBoundsRelativeToReferencePhoto() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_FrameBoundsRelativeToReferencePhoto(put(value))); + check_hresult(WINRT_SHIM(IAdvancedCapturedPhoto2)->get_FrameBoundsRelativeToReferencePhoto(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrame impl_IOptionalReferencePhotoCapturedEventArgs::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IOptionalReferencePhotoCapturedEventArgs)->get_Frame(put_abi(value))); return value; } -template Windows::IInspectable impl_IOptionalReferencePhotoCapturedEventArgs::Context() const +template Windows::Foundation::IInspectable impl_IOptionalReferencePhotoCapturedEventArgs::Context() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Context(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IOptionalReferencePhotoCapturedEventArgs)->get_Context(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ILowLagMediaRecording::StartAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagMediaRecording::StopAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording)->abi_StopAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagMediaRecording::FinishAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording)->abi_FinishAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagMediaRecording2::PauseAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_PauseAsync(behavior, put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording2)->abi_PauseAsync(behavior, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagMediaRecording2::ResumeAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ResumeAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording2)->abi_ResumeAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILowLagMediaRecording3::PauseWithResultAsync(Windows::Media::Devices::MediaCapturePauseBehavior behavior) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PauseWithResultAsync(behavior, put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording3)->abi_PauseWithResultAsync(behavior, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILowLagMediaRecording3::StopWithResultAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StopWithResultAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagMediaRecording3)->abi_StopWithResultAsync(put_abi(operation))); return operation; } template Windows::Media::VideoFrame impl_IMediaCapturePauseResult::LastFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LastFrame(put(value))); + check_hresult(WINRT_SHIM(IMediaCapturePauseResult)->get_LastFrame(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaCapturePauseResult::RecordDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RecordDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaCapturePauseResult)->get_RecordDuration(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IMediaCaptureStopResult::LastFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LastFrame(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureStopResult)->get_LastFrame(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaCaptureStopResult::RecordDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RecordDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureStopResult)->get_RecordDuration(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ILowLagPhotoSequenceCapture::StartAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceCapture)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagPhotoSequenceCapture::StopAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceCapture)->abi_StopAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_ILowLagPhotoSequenceCapture::FinishAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceCapture)->abi_FinishAsync(put_abi(operation))); return operation; } template event_token impl_ILowLagPhotoSequenceCapture::PhotoCaptured(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PhotoCaptured(get(handler), &token)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceCapture)->add_PhotoCaptured(get_abi(handler), &token)); return token; } @@ -5381,866 +5682,866 @@ template event_revoker impl_ILowLagPho template void impl_ILowLagPhotoSequenceCapture::PhotoCaptured(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PhotoCaptured(token)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceCapture)->remove_PhotoCaptured(token)); } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::Exposure() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Exposure(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_Exposure(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::ExposureCompensation() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensation(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_ExposureCompensation(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::IsoSpeed() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsoSpeed(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_IsoSpeed(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::Focus() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Focus(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_Focus(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::SceneMode() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SceneMode(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_SceneMode(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::Flashed() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Flashed(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_Flashed(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::FlashPowerPercent() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_FlashPowerPercent(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_FlashPowerPercent(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::WhiteBalance() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_WhiteBalance(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_WhiteBalance(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues::ZoomFactor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ZoomFactor(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues)->get_ZoomFactor(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues2::FocusState() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_FocusState(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues2)->get_FocusState(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues2::IsoDigitalGain() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsoDigitalGain(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues2)->get_IsoDigitalGain(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues2::IsoAnalogGain() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsoAnalogGain(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues2)->get_IsoAnalogGain(put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_ICapturedFrameControlValues2::SensorFrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SensorFrameRate(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues2)->get_SensorFrameRate(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICapturedFrameControlValues2::WhiteBalanceGain() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_WhiteBalanceGain(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameControlValues2)->get_WhiteBalanceGain(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrame impl_IPhotoCapturedEventArgs::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IPhotoCapturedEventArgs)->get_Frame(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrame impl_IPhotoCapturedEventArgs::Thumbnail() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IPhotoCapturedEventArgs)->get_Thumbnail(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPhotoCapturedEventArgs::CaptureTimeOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_CaptureTimeOffset(put(value))); + check_hresult(WINRT_SHIM(IPhotoCapturedEventArgs)->get_CaptureTimeOffset(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrame impl_ICapturedPhoto::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(ICapturedPhoto)->get_Frame(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrame impl_ICapturedPhoto::Thumbnail() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(ICapturedPhoto)->get_Thumbnail(put_abi(value))); return value; } template uint32_t impl_ICapturedFrame::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(ICapturedFrame)->get_Width(&value)); return value; } template uint32_t impl_ICapturedFrame::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(ICapturedFrame)->get_Height(&value)); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_ICapturedFrameWithSoftwareBitmap::SoftwareBitmap() const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SoftwareBitmap(put(value))); + check_hresult(WINRT_SHIM(ICapturedFrameWithSoftwareBitmap)->get_SoftwareBitmap(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IMediaCaptureVideoPreview::StartPreviewAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartPreviewAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoPreview)->abi_StartPreviewAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCaptureVideoPreview::StartPreviewToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, const Windows::Media::IMediaExtension & customMediaSink) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartPreviewToCustomSinkAsync(get(encodingProfile), get(customMediaSink), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoPreview)->abi_StartPreviewToCustomSinkAsync(get_abi(encodingProfile), get_abi(customMediaSink), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IMediaCaptureVideoPreview::StartPreviewToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_ref customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const +template Windows::Foundation::IAsyncAction impl_IMediaCaptureVideoPreview::StartPreviewToCustomSinkAsync(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile, hstring_view customSinkActivationId, const Windows::Foundation::Collections::IPropertySet & customSinkSettings) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartPreviewToCustomSinkIdAsync(get(encodingProfile), get(customSinkActivationId), get(customSinkSettings), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoPreview)->abi_StartPreviewToCustomSinkIdAsync(get_abi(encodingProfile), get_abi(customSinkActivationId), get_abi(customSinkSettings), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IMediaCaptureVideoPreview::StopPreviewAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StopPreviewAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaCaptureVideoPreview)->abi_StopPreviewAsync(put_abi(asyncInfo))); return asyncInfo; } template hstring impl_IMediaCaptureSettings::AudioDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceId(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureSettings)->get_AudioDeviceId(put_abi(value))); return value; } template hstring impl_IMediaCaptureSettings::VideoDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceId(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureSettings)->get_VideoDeviceId(put_abi(value))); return value; } template Windows::Media::Capture::StreamingCaptureMode impl_IMediaCaptureSettings::StreamingCaptureMode() const { Windows::Media::Capture::StreamingCaptureMode value {}; - check_hresult(static_cast(static_cast(*this))->get_StreamingCaptureMode(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings)->get_StreamingCaptureMode(&value)); return value; } template Windows::Media::Capture::PhotoCaptureSource impl_IMediaCaptureSettings::PhotoCaptureSource() const { Windows::Media::Capture::PhotoCaptureSource value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotoCaptureSource(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings)->get_PhotoCaptureSource(&value)); return value; } template Windows::Media::Capture::VideoDeviceCharacteristic impl_IMediaCaptureSettings::VideoDeviceCharacteristic() const { Windows::Media::Capture::VideoDeviceCharacteristic value {}; - check_hresult(static_cast(static_cast(*this))->get_VideoDeviceCharacteristic(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings)->get_VideoDeviceCharacteristic(&value)); return value; } template bool impl_IMediaCaptureSettings2::ConcurrentRecordAndPhotoSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ConcurrentRecordAndPhotoSupported(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_ConcurrentRecordAndPhotoSupported(&value)); return value; } template bool impl_IMediaCaptureSettings2::ConcurrentRecordAndPhotoSequenceSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ConcurrentRecordAndPhotoSequenceSupported(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_ConcurrentRecordAndPhotoSequenceSupported(&value)); return value; } template bool impl_IMediaCaptureSettings2::CameraSoundRequiredForRegion() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CameraSoundRequiredForRegion(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_CameraSoundRequiredForRegion(&value)); return value; } template Windows::Foundation::IReference impl_IMediaCaptureSettings2::Horizontal35mmEquivalentFocalLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Horizontal35mmEquivalentFocalLength(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_Horizontal35mmEquivalentFocalLength(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaCaptureSettings2::PitchOffsetDegrees() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PitchOffsetDegrees(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_PitchOffsetDegrees(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaCaptureSettings2::Vertical35mmEquivalentFocalLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Vertical35mmEquivalentFocalLength(put(value))); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_Vertical35mmEquivalentFocalLength(put_abi(value))); return value; } template Windows::Media::Capture::MediaCategory impl_IMediaCaptureSettings2::MediaCategory() const { Windows::Media::Capture::MediaCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaCategory(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_MediaCategory(&value)); return value; } template Windows::Media::AudioProcessing impl_IMediaCaptureSettings2::AudioProcessing() const { Windows::Media::AudioProcessing value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioProcessing(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureSettings2)->get_AudioProcessing(&value)); return value; } template Windows::Media::Devices::MediaCaptureFocusState impl_IMediaCaptureFocusChangedEventArgs::FocusState() const { Windows::Media::Devices::MediaCaptureFocusState value {}; - check_hresult(static_cast(static_cast(*this))->get_FocusState(&value)); + check_hresult(WINRT_SHIM(IMediaCaptureFocusChangedEventArgs)->get_FocusState(&value)); return value; } template Windows::Media::Capture::CapturedFrame impl_IPhotoConfirmationCapturedEventArgs::Frame() const { Windows::Media::Capture::CapturedFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Frame(put(value))); + check_hresult(WINRT_SHIM(IPhotoConfirmationCapturedEventArgs)->get_Frame(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPhotoConfirmationCapturedEventArgs::CaptureTimeOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_CaptureTimeOffset(put(value))); + check_hresult(WINRT_SHIM(IPhotoConfirmationCapturedEventArgs)->get_CaptureTimeOffset(put_abi(value))); return value; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoStreamConfiguration::InputProperties() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputProperties(put(value))); + check_hresult(WINRT_SHIM(IVideoStreamConfiguration)->get_InputProperties(put_abi(value))); return value; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoStreamConfiguration::OutputProperties() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutputProperties(put(value))); + check_hresult(WINRT_SHIM(IVideoStreamConfiguration)->get_OutputProperties(put_abi(value))); return value; } template Windows::Media::Capture::AppCaptureSettings impl_IAppCaptureManagerStatics::GetCurrentSettings() const { Windows::Media::Capture::AppCaptureSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentSettings(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureManagerStatics)->abi_GetCurrentSettings(put_abi(value))); return value; } template void impl_IAppCaptureManagerStatics::ApplySettings(const Windows::Media::Capture::AppCaptureSettings & appCaptureSettings) const { - check_hresult(static_cast(static_cast(*this))->abi_ApplySettings(get(appCaptureSettings))); + check_hresult(WINRT_SHIM(IAppCaptureManagerStatics)->abi_ApplySettings(get_abi(appCaptureSettings))); } template void impl_IAppCaptureAlternateShortcutKeys::ToggleGameBarKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleGameBarKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleGameBarKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys::ToggleGameBarKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleGameBarKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleGameBarKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::ToggleGameBarKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleGameBarKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleGameBarKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys::ToggleGameBarKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleGameBarKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleGameBarKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::SaveHistoricalVideoKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_SaveHistoricalVideoKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_SaveHistoricalVideoKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys::SaveHistoricalVideoKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_SaveHistoricalVideoKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_SaveHistoricalVideoKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::SaveHistoricalVideoKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_SaveHistoricalVideoKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_SaveHistoricalVideoKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys::SaveHistoricalVideoKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_SaveHistoricalVideoKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_SaveHistoricalVideoKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleRecordingKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleRecordingKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleRecordingKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleRecordingKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleRecordingKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleRecordingKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleRecordingKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleRecordingKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::TakeScreenshotKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_TakeScreenshotKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_TakeScreenshotKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys::TakeScreenshotKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_TakeScreenshotKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_TakeScreenshotKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::TakeScreenshotKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_TakeScreenshotKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_TakeScreenshotKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys::TakeScreenshotKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_TakeScreenshotKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_TakeScreenshotKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingIndicatorKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleRecordingIndicatorKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleRecordingIndicatorKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingIndicatorKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleRecordingIndicatorKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleRecordingIndicatorKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingIndicatorKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleRecordingIndicatorKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->put_ToggleRecordingIndicatorKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys::ToggleRecordingIndicatorKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleRecordingIndicatorKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys)->get_ToggleRecordingIndicatorKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys2::ToggleMicrophoneCaptureKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleMicrophoneCaptureKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys2)->put_ToggleMicrophoneCaptureKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys2::ToggleMicrophoneCaptureKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleMicrophoneCaptureKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys2)->get_ToggleMicrophoneCaptureKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys2::ToggleMicrophoneCaptureKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleMicrophoneCaptureKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys2)->put_ToggleMicrophoneCaptureKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys2::ToggleMicrophoneCaptureKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleMicrophoneCaptureKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys2)->get_ToggleMicrophoneCaptureKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys3::ToggleCameraCaptureKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleCameraCaptureKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->put_ToggleCameraCaptureKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys3::ToggleCameraCaptureKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleCameraCaptureKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->get_ToggleCameraCaptureKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys3::ToggleCameraCaptureKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleCameraCaptureKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->put_ToggleCameraCaptureKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys3::ToggleCameraCaptureKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleCameraCaptureKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->get_ToggleCameraCaptureKeyModifiers(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys3::ToggleBroadcastKey(Windows::System::VirtualKey value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleBroadcastKey(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->put_ToggleBroadcastKey(value)); } template Windows::System::VirtualKey impl_IAppCaptureAlternateShortcutKeys3::ToggleBroadcastKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleBroadcastKey(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->get_ToggleBroadcastKey(&value)); return value; } template void impl_IAppCaptureAlternateShortcutKeys3::ToggleBroadcastKeyModifiers(Windows::System::VirtualKeyModifiers value) const { - check_hresult(static_cast(static_cast(*this))->put_ToggleBroadcastKeyModifiers(value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->put_ToggleBroadcastKeyModifiers(value)); } template Windows::System::VirtualKeyModifiers impl_IAppCaptureAlternateShortcutKeys3::ToggleBroadcastKeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleBroadcastKeyModifiers(&value)); + check_hresult(WINRT_SHIM(IAppCaptureAlternateShortcutKeys3)->get_ToggleBroadcastKeyModifiers(&value)); return value; } template void impl_IAppCaptureSettings::AppCaptureDestinationFolder(const Windows::Storage::StorageFolder & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppCaptureDestinationFolder(get(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_AppCaptureDestinationFolder(get_abi(value))); } template Windows::Storage::StorageFolder impl_IAppCaptureSettings::AppCaptureDestinationFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppCaptureDestinationFolder(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_AppCaptureDestinationFolder(put_abi(value))); return value; } template void impl_IAppCaptureSettings::AudioEncodingBitrate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioEncodingBitrate(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_AudioEncodingBitrate(value)); } template uint32_t impl_IAppCaptureSettings::AudioEncodingBitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioEncodingBitrate(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_AudioEncodingBitrate(&value)); return value; } template void impl_IAppCaptureSettings::IsAudioCaptureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAudioCaptureEnabled(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_IsAudioCaptureEnabled(value)); } template bool impl_IAppCaptureSettings::IsAudioCaptureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAudioCaptureEnabled(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsAudioCaptureEnabled(&value)); return value; } template void impl_IAppCaptureSettings::CustomVideoEncodingBitrate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomVideoEncodingBitrate(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_CustomVideoEncodingBitrate(value)); } template uint32_t impl_IAppCaptureSettings::CustomVideoEncodingBitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CustomVideoEncodingBitrate(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_CustomVideoEncodingBitrate(&value)); return value; } template void impl_IAppCaptureSettings::CustomVideoEncodingHeight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomVideoEncodingHeight(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_CustomVideoEncodingHeight(value)); } template uint32_t impl_IAppCaptureSettings::CustomVideoEncodingHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CustomVideoEncodingHeight(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_CustomVideoEncodingHeight(&value)); return value; } template void impl_IAppCaptureSettings::CustomVideoEncodingWidth(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomVideoEncodingWidth(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_CustomVideoEncodingWidth(value)); } template uint32_t impl_IAppCaptureSettings::CustomVideoEncodingWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CustomVideoEncodingWidth(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_CustomVideoEncodingWidth(&value)); return value; } template void impl_IAppCaptureSettings::HistoricalBufferLength(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_HistoricalBufferLength(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_HistoricalBufferLength(value)); } template uint32_t impl_IAppCaptureSettings::HistoricalBufferLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HistoricalBufferLength(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_HistoricalBufferLength(&value)); return value; } template void impl_IAppCaptureSettings::HistoricalBufferLengthUnit(Windows::Media::Capture::AppCaptureHistoricalBufferLengthUnit value) const { - check_hresult(static_cast(static_cast(*this))->put_HistoricalBufferLengthUnit(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_HistoricalBufferLengthUnit(value)); } template Windows::Media::Capture::AppCaptureHistoricalBufferLengthUnit impl_IAppCaptureSettings::HistoricalBufferLengthUnit() const { Windows::Media::Capture::AppCaptureHistoricalBufferLengthUnit value {}; - check_hresult(static_cast(static_cast(*this))->get_HistoricalBufferLengthUnit(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_HistoricalBufferLengthUnit(&value)); return value; } template void impl_IAppCaptureSettings::IsHistoricalCaptureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHistoricalCaptureEnabled(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_IsHistoricalCaptureEnabled(value)); } template bool impl_IAppCaptureSettings::IsHistoricalCaptureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHistoricalCaptureEnabled(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsHistoricalCaptureEnabled(&value)); return value; } template void impl_IAppCaptureSettings::IsHistoricalCaptureOnBatteryAllowed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHistoricalCaptureOnBatteryAllowed(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_IsHistoricalCaptureOnBatteryAllowed(value)); } template bool impl_IAppCaptureSettings::IsHistoricalCaptureOnBatteryAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHistoricalCaptureOnBatteryAllowed(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsHistoricalCaptureOnBatteryAllowed(&value)); return value; } template void impl_IAppCaptureSettings::IsHistoricalCaptureOnWirelessDisplayAllowed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHistoricalCaptureOnWirelessDisplayAllowed(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_IsHistoricalCaptureOnWirelessDisplayAllowed(value)); } template bool impl_IAppCaptureSettings::IsHistoricalCaptureOnWirelessDisplayAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHistoricalCaptureOnWirelessDisplayAllowed(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsHistoricalCaptureOnWirelessDisplayAllowed(&value)); return value; } template void impl_IAppCaptureSettings::MaximumRecordLength(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaximumRecordLength(get(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_MaximumRecordLength(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IAppCaptureSettings::MaximumRecordLength() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaximumRecordLength(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_MaximumRecordLength(put_abi(value))); return value; } template void impl_IAppCaptureSettings::ScreenshotDestinationFolder(const Windows::Storage::StorageFolder & value) const { - check_hresult(static_cast(static_cast(*this))->put_ScreenshotDestinationFolder(get(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_ScreenshotDestinationFolder(get_abi(value))); } template Windows::Storage::StorageFolder impl_IAppCaptureSettings::ScreenshotDestinationFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ScreenshotDestinationFolder(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_ScreenshotDestinationFolder(put_abi(value))); return value; } template void impl_IAppCaptureSettings::VideoEncodingBitrateMode(Windows::Media::Capture::AppCaptureVideoEncodingBitrateMode value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoEncodingBitrateMode(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_VideoEncodingBitrateMode(value)); } template Windows::Media::Capture::AppCaptureVideoEncodingBitrateMode impl_IAppCaptureSettings::VideoEncodingBitrateMode() const { Windows::Media::Capture::AppCaptureVideoEncodingBitrateMode value {}; - check_hresult(static_cast(static_cast(*this))->get_VideoEncodingBitrateMode(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_VideoEncodingBitrateMode(&value)); return value; } template void impl_IAppCaptureSettings::VideoEncodingResolutionMode(Windows::Media::Capture::AppCaptureVideoEncodingResolutionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoEncodingResolutionMode(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_VideoEncodingResolutionMode(value)); } template Windows::Media::Capture::AppCaptureVideoEncodingResolutionMode impl_IAppCaptureSettings::VideoEncodingResolutionMode() const { Windows::Media::Capture::AppCaptureVideoEncodingResolutionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_VideoEncodingResolutionMode(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_VideoEncodingResolutionMode(&value)); return value; } template void impl_IAppCaptureSettings::IsAppCaptureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsAppCaptureEnabled(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->put_IsAppCaptureEnabled(value)); } template bool impl_IAppCaptureSettings::IsAppCaptureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAppCaptureEnabled(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsAppCaptureEnabled(&value)); return value; } template bool impl_IAppCaptureSettings::IsCpuConstrained() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCpuConstrained(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsCpuConstrained(&value)); return value; } template bool impl_IAppCaptureSettings::IsDisabledByPolicy() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDisabledByPolicy(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsDisabledByPolicy(&value)); return value; } template bool impl_IAppCaptureSettings::IsMemoryConstrained() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMemoryConstrained(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_IsMemoryConstrained(&value)); return value; } template bool impl_IAppCaptureSettings::HasHardwareEncoder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasHardwareEncoder(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings)->get_HasHardwareEncoder(&value)); return value; } template bool impl_IAppCaptureSettings2::IsGpuConstrained() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGpuConstrained(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings2)->get_IsGpuConstrained(&value)); return value; } template Windows::Media::Capture::AppCaptureAlternateShortcutKeys impl_IAppCaptureSettings2::AlternateShortcutKeys() const { Windows::Media::Capture::AppCaptureAlternateShortcutKeys value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlternateShortcutKeys(put(value))); + check_hresult(WINRT_SHIM(IAppCaptureSettings2)->get_AlternateShortcutKeys(put_abi(value))); return value; } template void impl_IAppCaptureSettings3::IsMicrophoneCaptureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMicrophoneCaptureEnabled(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings3)->put_IsMicrophoneCaptureEnabled(value)); } template bool impl_IAppCaptureSettings3::IsMicrophoneCaptureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMicrophoneCaptureEnabled(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings3)->get_IsMicrophoneCaptureEnabled(&value)); return value; } template void impl_IAppCaptureSettings4::IsMicrophoneCaptureEnabledByDefault(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMicrophoneCaptureEnabledByDefault(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->put_IsMicrophoneCaptureEnabledByDefault(value)); } template bool impl_IAppCaptureSettings4::IsMicrophoneCaptureEnabledByDefault() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMicrophoneCaptureEnabledByDefault(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->get_IsMicrophoneCaptureEnabledByDefault(&value)); return value; } template void impl_IAppCaptureSettings4::SystemAudioGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemAudioGain(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->put_SystemAudioGain(value)); } template double impl_IAppCaptureSettings4::SystemAudioGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemAudioGain(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->get_SystemAudioGain(&value)); return value; } template void impl_IAppCaptureSettings4::MicrophoneGain(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MicrophoneGain(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->put_MicrophoneGain(value)); } template double impl_IAppCaptureSettings4::MicrophoneGain() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MicrophoneGain(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->get_MicrophoneGain(&value)); return value; } template void impl_IAppCaptureSettings4::VideoEncodingFrameRateMode(Windows::Media::Capture::AppCaptureVideoEncodingFrameRateMode value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoEncodingFrameRateMode(value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->put_VideoEncodingFrameRateMode(value)); } template Windows::Media::Capture::AppCaptureVideoEncodingFrameRateMode impl_IAppCaptureSettings4::VideoEncodingFrameRateMode() const { Windows::Media::Capture::AppCaptureVideoEncodingFrameRateMode value {}; - check_hresult(static_cast(static_cast(*this))->get_VideoEncodingFrameRateMode(&value)); + check_hresult(WINRT_SHIM(IAppCaptureSettings4)->get_VideoEncodingFrameRateMode(&value)); return value; } template void impl_ICameraOptionsUIStatics::Show(const Windows::Media::Capture::MediaCapture & mediaCapture) const { - check_hresult(static_cast(static_cast(*this))->abi_Show(get(mediaCapture))); + check_hresult(WINRT_SHIM(ICameraOptionsUIStatics)->abi_Show(get_abi(mediaCapture))); } template bool impl_ISourceSuspensionChangedEventArgs::IsAudioSuspended() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAudioSuspended(&value)); + check_hresult(WINRT_SHIM(ISourceSuspensionChangedEventArgs)->get_IsAudioSuspended(&value)); return value; } template bool impl_ISourceSuspensionChangedEventArgs::IsVideoSuspended() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVideoSuspended(&value)); + check_hresult(WINRT_SHIM(ISourceSuspensionChangedEventArgs)->get_IsVideoSuspended(&value)); return value; } template Windows::Media::Core::IMediaSource impl_IScreenCapture::AudioSource() const { Windows::Media::Core::IMediaSource value; - check_hresult(static_cast(static_cast(*this))->get_AudioSource(put(value))); + check_hresult(WINRT_SHIM(IScreenCapture)->get_AudioSource(put_abi(value))); return value; } template Windows::Media::Core::IMediaSource impl_IScreenCapture::VideoSource() const { Windows::Media::Core::IMediaSource value; - check_hresult(static_cast(static_cast(*this))->get_VideoSource(put(value))); + check_hresult(WINRT_SHIM(IScreenCapture)->get_VideoSource(put_abi(value))); return value; } template bool impl_IScreenCapture::IsAudioSuspended() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAudioSuspended(&value)); + check_hresult(WINRT_SHIM(IScreenCapture)->get_IsAudioSuspended(&value)); return value; } template bool impl_IScreenCapture::IsVideoSuspended() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVideoSuspended(&value)); + check_hresult(WINRT_SHIM(IScreenCapture)->get_IsVideoSuspended(&value)); return value; } template event_token impl_IScreenCapture::SourceSuspensionChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceSuspensionChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IScreenCapture)->add_SourceSuspensionChanged(get_abi(handler), &token)); return token; } @@ -6251,13 +6552,13 @@ template event_revoker impl_IScreenCapture::Sour template void impl_IScreenCapture::SourceSuspensionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceSuspensionChanged(token)); + check_hresult(WINRT_SHIM(IScreenCapture)->remove_SourceSuspensionChanged(token)); } template Windows::Media::Capture::ScreenCapture impl_IScreenCaptureStatics::GetForCurrentView() const { Windows::Media::Capture::ScreenCapture value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(IScreenCaptureStatics)->abi_GetForCurrentView(put_abi(value))); return value; } @@ -6289,22 +6590,22 @@ inline MediaCapture::MediaCapture() : MediaCapture(activate_instance()) {} -inline bool MediaCapture::IsVideoProfileSupported(hstring_ref videoDeviceId) +inline bool MediaCapture::IsVideoProfileSupported(hstring_view videoDeviceId) { return get_activation_factory().IsVideoProfileSupported(videoDeviceId); } -inline Windows::Foundation::Collections::IVectorView MediaCapture::FindAllVideoProfiles(hstring_ref videoDeviceId) +inline Windows::Foundation::Collections::IVectorView MediaCapture::FindAllVideoProfiles(hstring_view videoDeviceId) { return get_activation_factory().FindAllVideoProfiles(videoDeviceId); } -inline Windows::Foundation::Collections::IVectorView MediaCapture::FindConcurrentProfiles(hstring_ref videoDeviceId) +inline Windows::Foundation::Collections::IVectorView MediaCapture::FindConcurrentProfiles(hstring_view videoDeviceId) { return get_activation_factory().FindConcurrentProfiles(videoDeviceId); } -inline Windows::Foundation::Collections::IVectorView MediaCapture::FindKnownVideoProfiles(hstring_ref videoDeviceId, Windows::Media::Capture::KnownVideoProfile name) +inline Windows::Foundation::Collections::IVectorView MediaCapture::FindKnownVideoProfiles(hstring_view videoDeviceId, Windows::Media::Capture::KnownVideoProfile name) { return get_activation_factory().FindKnownVideoProfiles(videoDeviceId, name); } @@ -6321,3 +6622,752 @@ inline Windows::Media::Capture::ScreenCapture ScreenCapture::GetForCurrentView() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAdvancedCapturedPhoto & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAdvancedCapturedPhoto2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAdvancedPhotoCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureAlternateShortcutKeys & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureAlternateShortcutKeys2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureAlternateShortcutKeys3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureSettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureSettings3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureSettings4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IAppCaptureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICameraCaptureUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICameraOptionsUIStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICapturedFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICapturedFrameControlValues & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICapturedFrameControlValues2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICapturedFrameWithSoftwareBitmap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ICapturedPhoto & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ILowLagMediaRecording & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ILowLagMediaRecording2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ILowLagMediaRecording3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ILowLagPhotoCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ILowLagPhotoSequenceCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapture2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapture3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapture4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapture5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureFocusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureInitializationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureInitializationSettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureInitializationSettings3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureInitializationSettings4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureInitializationSettings5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCapturePauseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureSettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureStopResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureVideoPreview & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureVideoProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IMediaCaptureVideoProfileMediaDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IOptionalReferencePhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IPhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IPhotoConfirmationCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IScreenCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IScreenCaptureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ISourceSuspensionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::IVideoStreamConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::AdvancedCapturedPhoto & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::AdvancedPhotoCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::AppCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::AppCaptureAlternateShortcutKeys & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::AppCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CameraCaptureUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CameraCaptureUIPhotoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CameraCaptureUIVideoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CapturedFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CapturedFrameControlValues & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::CapturedPhoto & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::LowLagMediaRecording & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::LowLagPhotoCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::LowLagPhotoSequenceCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureFocusChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureInitializationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCapturePauseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureStopResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureVideoProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::MediaCaptureVideoProfileMediaDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::OptionalReferencePhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::PhotoCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::PhotoConfirmationCapturedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::ScreenCapture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::SourceSuspensionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Capture::VideoStreamConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Casting.h b/10.0.14393.0/winrt/Windows.Media.Casting.h index 4754f2fe7..dc93e486e 100644 --- a/10.0.14393.0/winrt/Windows.Media.Casting.h +++ b/10.0.14393.0/winrt/Windows.Media.Casting.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -23,7 +26,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -60,10 +66,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -73,11 +80,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -90,6 +98,7 @@ struct produce : produce_baseshim()); this->shim().StateChanged(token); return S_OK; } @@ -99,11 +108,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ErrorOccurred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -116,6 +126,7 @@ struct produce : produce_baseshim()); this->shim().ErrorOccurred(token); return S_OK; } @@ -125,11 +136,12 @@ struct produce : produce_base value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStartCastingAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStartCastingAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStartCastingAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -139,11 +151,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_DisconnectAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DisconnectAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DisconnectAsync()); return S_OK; } catch (...) @@ -161,7 +174,8 @@ struct produceshim().ErrorStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorStatus()); return S_OK; } catch (...) @@ -170,11 +184,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -188,11 +203,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -202,11 +218,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -216,11 +233,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -230,11 +248,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetSupportedCastingPlaybackTypesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetSupportedCastingPlaybackTypesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSupportedCastingPlaybackTypesAsync()); return S_OK; } catch (...) @@ -244,11 +263,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_CreateCastingConnection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateCastingConnection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCastingConnection()); return S_OK; } catch (...) @@ -262,11 +282,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Filter(abi_arg_out value) noexcept override + HRESULT __stdcall get_Filter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Filter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Filter()); return S_OK; } catch (...) @@ -276,11 +297,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Appearance(abi_arg_out value) noexcept override + HRESULT __stdcall get_Appearance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appearance()); return S_OK; } catch (...) @@ -290,11 +312,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_CastingDeviceSelected(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CastingDeviceSelected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CastingDeviceSelected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CastingDeviceSelected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -307,6 +330,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CastingDeviceSelected(token); return S_OK; } @@ -316,11 +340,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_CastingDevicePickerDismissed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CastingDevicePickerDismissed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CastingDevicePickerDismissed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CastingDevicePickerDismissed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -333,6 +358,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CastingDevicePickerDismissed(token); return S_OK; } @@ -342,10 +368,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_Show(abi_arg_in selection) noexcept override + HRESULT __stdcall abi_Show(impl::abi_arg_in selection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection)); return S_OK; } @@ -355,10 +382,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ShowWithPlacement(abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override + HRESULT __stdcall abi_ShowWithPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection), preferredPlacement); return S_OK; } @@ -372,6 +400,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Hide(); return S_OK; } @@ -389,7 +418,8 @@ struct produce : produce { try { - *value = detach(this->shim().SupportsAudio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsAudio()); return S_OK; } catch (...) @@ -402,6 +432,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportsAudio(value); return S_OK; } @@ -415,7 +446,8 @@ struct produce : produce { try { - *value = detach(this->shim().SupportsVideo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsVideo()); return S_OK; } catch (...) @@ -428,6 +460,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportsVideo(value); return S_OK; } @@ -441,7 +474,8 @@ struct produce : produce { try { - *value = detach(this->shim().SupportsPictures()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsPictures()); return S_OK; } catch (...) @@ -454,6 +488,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SupportsPictures(value); return S_OK; } @@ -463,11 +498,12 @@ struct produce : produce } } - HRESULT __stdcall get_SupportedCastingSources(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedCastingSources(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedCastingSources()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedCastingSources()); return S_OK; } catch (...) @@ -481,11 +517,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_SelectedCastingDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedCastingDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedCastingDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedCastingDevice()); return S_OK; } catch (...) @@ -499,11 +536,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(Windows::Media::Casting::CastingPlaybackTypes type, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(Windows::Media::Casting::CastingPlaybackTypes type, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector(type)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector(type)); return S_OK; } catch (...) @@ -513,11 +551,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetDeviceSelectorFromCastingSourceAsync(abi_arg_in castingSource, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDeviceSelectorFromCastingSourceAsync(impl::abi_arg_in castingSource, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDeviceSelectorFromCastingSourceAsync(*reinterpret_cast(&castingSource))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDeviceSelectorFromCastingSourceAsync(*reinterpret_cast(&castingSource))); return S_OK; } catch (...) @@ -527,11 +566,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -541,11 +581,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_DeviceInfoSupportsCastingAsync(abi_arg_in device, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_DeviceInfoSupportsCastingAsync(impl::abi_arg_in device, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DeviceInfoSupportsCastingAsync(*reinterpret_cast(&device))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeviceInfoSupportsCastingAsync(*reinterpret_cast(&device))); return S_OK; } catch (...) @@ -559,11 +600,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_PreferredSourceUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreferredSourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreferredSourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredSourceUri()); return S_OK; } catch (...) @@ -573,10 +615,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PreferredSourceUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredSourceUri(*reinterpret_cast(&value)); return S_OK; } @@ -594,76 +637,76 @@ namespace Windows::Media::Casting { template Windows::Foundation::Uri impl_ICastingSource::PreferredSourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreferredSourceUri(put(value))); + check_hresult(WINRT_SHIM(ICastingSource)->get_PreferredSourceUri(put_abi(value))); return value; } template void impl_ICastingSource::PreferredSourceUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredSourceUri(get(value))); + check_hresult(WINRT_SHIM(ICastingSource)->put_PreferredSourceUri(get_abi(value))); } template Windows::Media::Casting::CastingConnectionErrorStatus impl_ICastingConnectionErrorOccurredEventArgs::ErrorStatus() const { Windows::Media::Casting::CastingConnectionErrorStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorStatus(&value)); + check_hresult(WINRT_SHIM(ICastingConnectionErrorOccurredEventArgs)->get_ErrorStatus(&value)); return value; } template hstring impl_ICastingConnectionErrorOccurredEventArgs::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(ICastingConnectionErrorOccurredEventArgs)->get_Message(put_abi(value))); return value; } template Windows::Media::Casting::CastingConnectionState impl_ICastingConnection::State() const { Windows::Media::Casting::CastingConnectionState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ICastingConnection)->get_State(&value)); return value; } template Windows::Media::Casting::CastingDevice impl_ICastingConnection::Device() const { Windows::Media::Casting::CastingDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(ICastingConnection)->get_Device(put_abi(value))); return value; } template Windows::Media::Casting::CastingSource impl_ICastingConnection::Source() const { Windows::Media::Casting::CastingSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ICastingConnection)->get_Source(put_abi(value))); return value; } template void impl_ICastingConnection::Source(const Windows::Media::Casting::CastingSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(ICastingConnection)->put_Source(get_abi(value))); } -template event_token impl_ICastingConnection::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICastingConnection::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ICastingConnection)->add_StateChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ICastingConnection::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICastingConnection::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Casting::ICastingConnection::remove_StateChanged, StateChanged(handler)); } template void impl_ICastingConnection::StateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(token)); + check_hresult(WINRT_SHIM(ICastingConnection)->remove_StateChanged(token)); } template event_token impl_ICastingConnection::ErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ErrorOccurred(get(handler), &token)); + check_hresult(WINRT_SHIM(ICastingConnection)->add_ErrorOccurred(get_abi(handler), &token)); return token; } @@ -674,154 +717,154 @@ template event_revoker impl_ICastingConnection< template void impl_ICastingConnection::ErrorOccurred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ErrorOccurred(token)); + check_hresult(WINRT_SHIM(ICastingConnection)->remove_ErrorOccurred(token)); } template Windows::Foundation::IAsyncOperation impl_ICastingConnection::RequestStartCastingAsync(const Windows::Media::Casting::CastingSource & value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStartCastingAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(ICastingConnection)->abi_RequestStartCastingAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ICastingConnection::DisconnectAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DisconnectAsync(put(operation))); + check_hresult(WINRT_SHIM(ICastingConnection)->abi_DisconnectAsync(put_abi(operation))); return operation; } template hstring impl_ICastingDevice::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(ICastingDevice)->get_Id(put_abi(value))); return value; } template hstring impl_ICastingDevice::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(ICastingDevice)->get_FriendlyName(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_ICastingDevice::Icon() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType value; - check_hresult(static_cast(static_cast(*this))->get_Icon(put(value))); + check_hresult(WINRT_SHIM(ICastingDevice)->get_Icon(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICastingDevice::GetSupportedCastingPlaybackTypesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedCastingPlaybackTypesAsync(put(operation))); + check_hresult(WINRT_SHIM(ICastingDevice)->abi_GetSupportedCastingPlaybackTypesAsync(put_abi(operation))); return operation; } template Windows::Media::Casting::CastingConnection impl_ICastingDevice::CreateCastingConnection() const { Windows::Media::Casting::CastingConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCastingConnection(put(value))); + check_hresult(WINRT_SHIM(ICastingDevice)->abi_CreateCastingConnection(put_abi(value))); return value; } template hstring impl_ICastingDeviceStatics::GetDeviceSelector(Windows::Media::Casting::CastingPlaybackTypes type) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(type, put(value))); + check_hresult(WINRT_SHIM(ICastingDeviceStatics)->abi_GetDeviceSelector(type, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICastingDeviceStatics::GetDeviceSelectorFromCastingSourceAsync(const Windows::Media::Casting::CastingSource & castingSource) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelectorFromCastingSourceAsync(get(castingSource), put(operation))); + check_hresult(WINRT_SHIM(ICastingDeviceStatics)->abi_GetDeviceSelectorFromCastingSourceAsync(get_abi(castingSource), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICastingDeviceStatics::FromIdAsync(hstring_ref value) const +template Windows::Foundation::IAsyncOperation impl_ICastingDeviceStatics::FromIdAsync(hstring_view value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(ICastingDeviceStatics)->abi_FromIdAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ICastingDeviceStatics::DeviceInfoSupportsCastingAsync(const Windows::Devices::Enumeration::DeviceInformation & device) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DeviceInfoSupportsCastingAsync(get(device), put(operation))); + check_hresult(WINRT_SHIM(ICastingDeviceStatics)->abi_DeviceInfoSupportsCastingAsync(get_abi(device), put_abi(operation))); return operation; } template Windows::Media::Casting::CastingDevice impl_ICastingDeviceSelectedEventArgs::SelectedCastingDevice() const { Windows::Media::Casting::CastingDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedCastingDevice(put(value))); + check_hresult(WINRT_SHIM(ICastingDeviceSelectedEventArgs)->get_SelectedCastingDevice(put_abi(value))); return value; } template bool impl_ICastingDevicePickerFilter::SupportsAudio() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsAudio(&value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->get_SupportsAudio(&value)); return value; } template void impl_ICastingDevicePickerFilter::SupportsAudio(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsAudio(value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->put_SupportsAudio(value)); } template bool impl_ICastingDevicePickerFilter::SupportsVideo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsVideo(&value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->get_SupportsVideo(&value)); return value; } template void impl_ICastingDevicePickerFilter::SupportsVideo(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsVideo(value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->put_SupportsVideo(value)); } template bool impl_ICastingDevicePickerFilter::SupportsPictures() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsPictures(&value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->get_SupportsPictures(&value)); return value; } template void impl_ICastingDevicePickerFilter::SupportsPictures(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsPictures(value)); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->put_SupportsPictures(value)); } template Windows::Foundation::Collections::IVector impl_ICastingDevicePickerFilter::SupportedCastingSources() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedCastingSources(put(value))); + check_hresult(WINRT_SHIM(ICastingDevicePickerFilter)->get_SupportedCastingSources(put_abi(value))); return value; } template Windows::Media::Casting::CastingDevicePickerFilter impl_ICastingDevicePicker::Filter() const { Windows::Media::Casting::CastingDevicePickerFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Filter(put(value))); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->get_Filter(put_abi(value))); return value; } template Windows::Devices::Enumeration::DevicePickerAppearance impl_ICastingDevicePicker::Appearance() const { Windows::Devices::Enumeration::DevicePickerAppearance value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appearance(put(value))); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->get_Appearance(put_abi(value))); return value; } template event_token impl_ICastingDevicePicker::CastingDeviceSelected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CastingDeviceSelected(get(handler), &token)); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->add_CastingDeviceSelected(get_abi(handler), &token)); return token; } @@ -832,39 +875,39 @@ template event_revoker impl_ICastingDevicePic template void impl_ICastingDevicePicker::CastingDeviceSelected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CastingDeviceSelected(token)); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->remove_CastingDeviceSelected(token)); } -template event_token impl_ICastingDevicePicker::CastingDevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICastingDevicePicker::CastingDevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CastingDevicePickerDismissed(get(handler), &token)); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->add_CastingDevicePickerDismissed(get_abi(handler), &token)); return token; } -template event_revoker impl_ICastingDevicePicker::CastingDevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICastingDevicePicker::CastingDevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Casting::ICastingDevicePicker::remove_CastingDevicePickerDismissed, CastingDevicePickerDismissed(handler)); } template void impl_ICastingDevicePicker::CastingDevicePickerDismissed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CastingDevicePickerDismissed(token)); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->remove_CastingDevicePickerDismissed(token)); } template void impl_ICastingDevicePicker::Show(const Windows::Foundation::Rect & selection) const { - check_hresult(static_cast(static_cast(*this))->abi_Show(get(selection))); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->abi_Show(get_abi(selection))); } template void impl_ICastingDevicePicker::Show(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowWithPlacement(get(selection), preferredPlacement)); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->abi_ShowWithPlacement(get_abi(selection), preferredPlacement)); } template void impl_ICastingDevicePicker::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(ICastingDevicePicker)->abi_Hide()); } inline hstring CastingDevice::GetDeviceSelector(Windows::Media::Casting::CastingPlaybackTypes type) @@ -877,7 +920,7 @@ inline Windows::Foundation::IAsyncOperation CastingDevice::GetDeviceSel return get_activation_factory().GetDeviceSelectorFromCastingSourceAsync(castingSource); } -inline Windows::Foundation::IAsyncOperation CastingDevice::FromIdAsync(hstring_ref value) +inline Windows::Foundation::IAsyncOperation CastingDevice::FromIdAsync(hstring_view value) { return get_activation_factory().FromIdAsync(value); } @@ -894,3 +937,140 @@ inline CastingDevicePicker::CastingDevicePicker() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingConnectionErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingDevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingDevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingDeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::ICastingSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingConnectionErrorOccurredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingDevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingDevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingDeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Casting::CastingSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.ClosedCaptioning.h b/10.0.14393.0/winrt/Windows.Media.ClosedCaptioning.h index 0b9e4e84a..1e43d7e74 100644 --- a/10.0.14393.0/winrt/Windows.Media.ClosedCaptioning.h +++ b/10.0.14393.0/winrt/Windows.Media.ClosedCaptioning.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.3.h" #include "internal/Windows.Media.ClosedCaptioning.3.h" #include "Windows.Media.h" @@ -18,7 +21,8 @@ struct produceshim().FontColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontColor()); return S_OK; } catch (...) @@ -27,11 +31,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ComputedFontColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ComputedFontColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedFontColor()); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produceshim().FontOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontOpacity()); return S_OK; } catch (...) @@ -57,7 +63,8 @@ struct produceshim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -70,7 +77,8 @@ struct produceshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -83,7 +91,8 @@ struct produceshim().FontEffect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontEffect()); return S_OK; } catch (...) @@ -96,7 +105,8 @@ struct produceshim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -105,11 +115,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ComputedBackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ComputedBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedBackgroundColor()); return S_OK; } catch (...) @@ -122,7 +133,8 @@ struct produceshim().BackgroundOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundOpacity()); return S_OK; } catch (...) @@ -135,7 +147,8 @@ struct produceshim().RegionColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegionColor()); return S_OK; } catch (...) @@ -144,11 +157,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ComputedRegionColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ComputedRegionColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedRegionColor()); return S_OK; } catch (...) @@ -161,7 +175,8 @@ struct produceshim().RegionOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegionOpacity()); return S_OK; } catch (...) @@ -178,84 +193,84 @@ namespace Windows::Media::ClosedCaptioning { template Windows::Media::ClosedCaptioning::ClosedCaptionColor impl_IClosedCaptionPropertiesStatics::FontColor() const { Windows::Media::ClosedCaptioning::ClosedCaptionColor value {}; - check_hresult(static_cast(static_cast(*this))->get_FontColor(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_FontColor(&value)); return value; } template Windows::UI::Color impl_IClosedCaptionPropertiesStatics::ComputedFontColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ComputedFontColor(put(value))); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_ComputedFontColor(put_abi(value))); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionOpacity impl_IClosedCaptionPropertiesStatics::FontOpacity() const { Windows::Media::ClosedCaptioning::ClosedCaptionOpacity value {}; - check_hresult(static_cast(static_cast(*this))->get_FontOpacity(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_FontOpacity(&value)); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionSize impl_IClosedCaptionPropertiesStatics::FontSize() const { Windows::Media::ClosedCaptioning::ClosedCaptionSize value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_FontSize(&value)); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionStyle impl_IClosedCaptionPropertiesStatics::FontStyle() const { Windows::Media::ClosedCaptioning::ClosedCaptionStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_FontStyle(&value)); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionEdgeEffect impl_IClosedCaptionPropertiesStatics::FontEffect() const { Windows::Media::ClosedCaptioning::ClosedCaptionEdgeEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_FontEffect(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_FontEffect(&value)); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionColor impl_IClosedCaptionPropertiesStatics::BackgroundColor() const { Windows::Media::ClosedCaptioning::ClosedCaptionColor value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_BackgroundColor(&value)); return value; } template Windows::UI::Color impl_IClosedCaptionPropertiesStatics::ComputedBackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ComputedBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_ComputedBackgroundColor(put_abi(value))); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionOpacity impl_IClosedCaptionPropertiesStatics::BackgroundOpacity() const { Windows::Media::ClosedCaptioning::ClosedCaptionOpacity value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundOpacity(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_BackgroundOpacity(&value)); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionColor impl_IClosedCaptionPropertiesStatics::RegionColor() const { Windows::Media::ClosedCaptioning::ClosedCaptionColor value {}; - check_hresult(static_cast(static_cast(*this))->get_RegionColor(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_RegionColor(&value)); return value; } template Windows::UI::Color impl_IClosedCaptionPropertiesStatics::ComputedRegionColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ComputedRegionColor(put(value))); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_ComputedRegionColor(put_abi(value))); return value; } template Windows::Media::ClosedCaptioning::ClosedCaptionOpacity impl_IClosedCaptionPropertiesStatics::RegionOpacity() const { Windows::Media::ClosedCaptioning::ClosedCaptionOpacity value {}; - check_hresult(static_cast(static_cast(*this))->get_RegionOpacity(&value)); + check_hresult(WINRT_SHIM(IClosedCaptionPropertiesStatics)->get_RegionOpacity(&value)); return value; } @@ -322,3 +337,14 @@ inline Windows::Media::ClosedCaptioning::ClosedCaptionOpacity ClosedCaptionPrope } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ClosedCaptioning::IClosedCaptionPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.ContentRestrictions.h b/10.0.14393.0/winrt/Windows.Media.ContentRestrictions.h index 8f8cedf44..4a78faf98 100644 --- a/10.0.14393.0/winrt/Windows.Media.ContentRestrictions.h +++ b/10.0.14393.0/winrt/Windows.Media.ContentRestrictions.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_GeographicRegion(abi_arg_out value) noexcept override + HRESULT __stdcall get_GeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeographicRegion()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_MaxBrowsableAgeRating(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxBrowsableAgeRating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxBrowsableAgeRating()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PreferredAgeRating(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PreferredAgeRating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredAgeRating()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -76,10 +83,11 @@ struct produce } } - HRESULT __stdcall put_Id(abi_arg_in value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -89,11 +97,12 @@ struct produce } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -103,10 +112,11 @@ struct produce } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -116,11 +126,12 @@ struct produce } } - HRESULT __stdcall get_Image(abi_arg_out value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -130,10 +141,11 @@ struct produce } } - HRESULT __stdcall put_Image(abi_arg_in value) noexcept override + HRESULT __stdcall put_Image(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Image(*reinterpret_cast(&value)); return S_OK; } @@ -147,7 +159,8 @@ struct produce { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -160,6 +173,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Category(value); return S_OK; } @@ -169,11 +183,12 @@ struct produce } } - HRESULT __stdcall get_Ratings(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Ratings(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Ratings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ratings()); return S_OK; } catch (...) @@ -183,10 +198,11 @@ struct produce } } - HRESULT __stdcall put_Ratings(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Ratings(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ratings(*reinterpret_cast *>(&value)); return S_OK; } @@ -200,11 +216,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in id, abi_arg_in title, Windows::Media::ContentRestrictions::RatedContentCategory category, abi_arg_out RatedContentDescription) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in id, impl::abi_arg_in title, Windows::Media::ContentRestrictions::RatedContentCategory category, impl::abi_arg_out RatedContentDescription) noexcept override { try { - *RatedContentDescription = detach(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&title), category)); + typename D::abi_guard guard(this->shim()); + *RatedContentDescription = detach_abi(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&title), category)); return S_OK; } catch (...) @@ -218,11 +235,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetBrowsePolicyAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetBrowsePolicyAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetBrowsePolicyAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetBrowsePolicyAsync()); return S_OK; } catch (...) @@ -232,11 +250,12 @@ struct produce RatedContentDescription, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetRestrictionLevelAsync(impl::abi_arg_in RatedContentDescription, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetRestrictionLevelAsync(*reinterpret_cast(&RatedContentDescription))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetRestrictionLevelAsync(*reinterpret_cast(&RatedContentDescription))); return S_OK; } catch (...) @@ -246,11 +265,12 @@ struct produce RatedContentDescription, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestContentAccessAsync(impl::abi_arg_in RatedContentDescription, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestContentAccessAsync(*reinterpret_cast(&RatedContentDescription))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestContentAccessAsync(*reinterpret_cast(&RatedContentDescription))); return S_OK; } catch (...) @@ -260,11 +280,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_RestrictionsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RestrictionsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RestrictionsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -277,6 +298,7 @@ struct produceshim()); this->shim().RestrictionsChanged(token); return S_OK; } @@ -290,11 +312,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWithMaxAgeRating(uint32_t maxAgeRating, abi_arg_out ratedContentRestrictions) noexcept override + HRESULT __stdcall abi_CreateWithMaxAgeRating(uint32_t maxAgeRating, impl::abi_arg_out ratedContentRestrictions) noexcept override { try { - *ratedContentRestrictions = detach(this->shim().CreateWithMaxAgeRating(maxAgeRating)); + typename D::abi_guard guard(this->shim()); + *ratedContentRestrictions = detach_abi(this->shim().CreateWithMaxAgeRating(maxAgeRating)); return S_OK; } catch (...) @@ -312,137 +335,137 @@ namespace Windows::Media::ContentRestrictions { template hstring impl_IRatedContentDescription::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->get_Id(put_abi(value))); return value; } -template void impl_IRatedContentDescription::Id(hstring_ref value) const +template void impl_IRatedContentDescription::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->put_Id(get_abi(value))); } template hstring impl_IRatedContentDescription::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->get_Title(put_abi(value))); return value; } -template void impl_IRatedContentDescription::Title(hstring_ref value) const +template void impl_IRatedContentDescription::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->put_Title(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IRatedContentDescription::Image() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->get_Image(put_abi(value))); return value; } template void impl_IRatedContentDescription::Image(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Image(get(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->put_Image(get_abi(value))); } template Windows::Media::ContentRestrictions::RatedContentCategory impl_IRatedContentDescription::Category() const { Windows::Media::ContentRestrictions::RatedContentCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_Category(&value)); + check_hresult(WINRT_SHIM(IRatedContentDescription)->get_Category(&value)); return value; } template void impl_IRatedContentDescription::Category(Windows::Media::ContentRestrictions::RatedContentCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_Category(value)); + check_hresult(WINRT_SHIM(IRatedContentDescription)->put_Category(value)); } template Windows::Foundation::Collections::IVector impl_IRatedContentDescription::Ratings() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Ratings(put(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->get_Ratings(put_abi(value))); return value; } template void impl_IRatedContentDescription::Ratings(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Ratings(get(value))); + check_hresult(WINRT_SHIM(IRatedContentDescription)->put_Ratings(get_abi(value))); } -template Windows::Media::ContentRestrictions::RatedContentDescription impl_IRatedContentDescriptionFactory::Create(hstring_ref id, hstring_ref title, Windows::Media::ContentRestrictions::RatedContentCategory category) const +template Windows::Media::ContentRestrictions::RatedContentDescription impl_IRatedContentDescriptionFactory::Create(hstring_view id, hstring_view title, Windows::Media::ContentRestrictions::RatedContentCategory category) const { Windows::Media::ContentRestrictions::RatedContentDescription RatedContentDescription { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(id), get(title), category, put(RatedContentDescription))); + check_hresult(WINRT_SHIM(IRatedContentDescriptionFactory)->abi_Create(get_abi(id), get_abi(title), category, put_abi(RatedContentDescription))); return RatedContentDescription; } template hstring impl_IContentRestrictionsBrowsePolicy::GeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GeographicRegion(put(value))); + check_hresult(WINRT_SHIM(IContentRestrictionsBrowsePolicy)->get_GeographicRegion(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IContentRestrictionsBrowsePolicy::MaxBrowsableAgeRating() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxBrowsableAgeRating(put(value))); + check_hresult(WINRT_SHIM(IContentRestrictionsBrowsePolicy)->get_MaxBrowsableAgeRating(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IContentRestrictionsBrowsePolicy::PreferredAgeRating() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PreferredAgeRating(put(value))); + check_hresult(WINRT_SHIM(IContentRestrictionsBrowsePolicy)->get_PreferredAgeRating(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IRatedContentRestrictions::GetBrowsePolicyAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetBrowsePolicyAsync(put(operation))); + check_hresult(WINRT_SHIM(IRatedContentRestrictions)->abi_GetBrowsePolicyAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IRatedContentRestrictions::GetRestrictionLevelAsync(const Windows::Media::ContentRestrictions::RatedContentDescription & RatedContentDescription) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRestrictionLevelAsync(get(RatedContentDescription), put(operation))); + check_hresult(WINRT_SHIM(IRatedContentRestrictions)->abi_GetRestrictionLevelAsync(get_abi(RatedContentDescription), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IRatedContentRestrictions::RequestContentAccessAsync(const Windows::Media::ContentRestrictions::RatedContentDescription & RatedContentDescription) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestContentAccessAsync(get(RatedContentDescription), put(operation))); + check_hresult(WINRT_SHIM(IRatedContentRestrictions)->abi_RequestContentAccessAsync(get_abi(RatedContentDescription), put_abi(operation))); return operation; } -template event_token impl_IRatedContentRestrictions::RestrictionsChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IRatedContentRestrictions::RestrictionsChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RestrictionsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IRatedContentRestrictions)->add_RestrictionsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IRatedContentRestrictions::RestrictionsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IRatedContentRestrictions::RestrictionsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::ContentRestrictions::IRatedContentRestrictions::remove_RestrictionsChanged, RestrictionsChanged(handler)); } template void impl_IRatedContentRestrictions::RestrictionsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RestrictionsChanged(token)); + check_hresult(WINRT_SHIM(IRatedContentRestrictions)->remove_RestrictionsChanged(token)); } template Windows::Media::ContentRestrictions::RatedContentRestrictions impl_IRatedContentRestrictionsFactory::CreateWithMaxAgeRating(uint32_t maxAgeRating) const { Windows::Media::ContentRestrictions::RatedContentRestrictions ratedContentRestrictions { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithMaxAgeRating(maxAgeRating, put(ratedContentRestrictions))); + check_hresult(WINRT_SHIM(IRatedContentRestrictionsFactory)->abi_CreateWithMaxAgeRating(maxAgeRating, put_abi(ratedContentRestrictions))); return ratedContentRestrictions; } -inline RatedContentDescription::RatedContentDescription(hstring_ref id, hstring_ref title, Windows::Media::ContentRestrictions::RatedContentCategory category) : +inline RatedContentDescription::RatedContentDescription(hstring_view id, hstring_view title, Windows::Media::ContentRestrictions::RatedContentCategory category) : RatedContentDescription(get_activation_factory().Create(id, title, category)) {} @@ -457,3 +480,77 @@ inline RatedContentRestrictions::RatedContentRestrictions(uint32_t maxAgeRating) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::IContentRestrictionsBrowsePolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::IRatedContentDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::IRatedContentDescriptionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::IRatedContentRestrictions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::IRatedContentRestrictionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::ContentRestrictionsBrowsePolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::RatedContentDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ContentRestrictions::RatedContentRestrictions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Core.h b/10.0.14393.0/winrt/Windows.Media.Core.h index 723f927ba..2712fb5e6 100644 --- a/10.0.14393.0/winrt/Windows.Media.Core.h +++ b/10.0.14393.0/winrt/Windows.Media.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Media.MediaProperties.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.Protection.3.h" @@ -29,11 +32,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_EncodingProperties(abi_arg_out encodingProperties) noexcept override + HRESULT __stdcall get_EncodingProperties(impl::abi_arg_out encodingProperties) noexcept override { try { - *encodingProperties = detach(this->shim().EncodingProperties()); + typename D::abi_guard guard(this->shim()); + *encodingProperties = detach_abi(this->shim().EncodingProperties()); return S_OK; } catch (...) @@ -47,10 +51,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_LeadingEncoderPadding(abi_arg_in> value) noexcept override + HRESULT __stdcall put_LeadingEncoderPadding(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LeadingEncoderPadding(*reinterpret_cast *>(&value)); return S_OK; } @@ -60,11 +65,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_LeadingEncoderPadding(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LeadingEncoderPadding(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LeadingEncoderPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeadingEncoderPadding()); return S_OK; } catch (...) @@ -74,10 +80,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_TrailingEncoderPadding(abi_arg_in> value) noexcept override + HRESULT __stdcall put_TrailingEncoderPadding(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrailingEncoderPadding(*reinterpret_cast *>(&value)); return S_OK; } @@ -87,11 +94,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TrailingEncoderPadding(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TrailingEncoderPadding(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TrailingEncoderPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrailingEncoderPadding()); return S_OK; } catch (...) @@ -105,11 +113,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in encodingProperties, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in encodingProperties, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -123,11 +132,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall add_OpenFailed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OpenFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OpenFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OpenFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -140,6 +150,7 @@ struct produce : produce_baseshim()); this->shim().OpenFailed(token); return S_OK; } @@ -149,11 +160,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetEncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetEncodingProperties()); return S_OK; } catch (...) @@ -163,11 +175,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaybackItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackItem()); return S_OK; } catch (...) @@ -177,11 +190,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -191,11 +205,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SupportInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportInfo()); return S_OK; } catch (...) @@ -213,7 +228,8 @@ struct produce : produc { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -230,7 +246,8 @@ struct produce : produce_baseshim().DecoderStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecoderStatus()); return S_OK; } catch (...) @@ -243,7 +260,8 @@ struct produce : produce_baseshim().Degradation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Degradation()); return S_OK; } catch (...) @@ -256,7 +274,8 @@ struct produce : produce_baseshim().DegradationReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DegradationReason()); return S_OK; } catch (...) @@ -269,7 +288,8 @@ struct produce : produce_baseshim().MediaSourceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSourceStatus()); return S_OK; } catch (...) @@ -282,10 +302,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_Data(abi_arg_in value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -295,11 +316,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -313,11 +335,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ResultFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResultFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResultFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResultFrame()); return S_OK; } catch (...) @@ -335,6 +358,7 @@ struct produce : produce_baseshim()); this->shim().Enabled(value); return S_OK; } @@ -348,7 +372,8 @@ struct produce : produce_baseshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -357,10 +382,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DesiredDetectionInterval(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredDetectionInterval(*reinterpret_cast(&value)); return S_OK; } @@ -370,11 +396,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DesiredDetectionInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredDetectionInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredDetectionInterval()); return S_OK; } catch (...) @@ -383,11 +410,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_FaceDetected(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().FaceDetected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().FaceDetected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -400,6 +428,7 @@ struct produce : produce_baseshim()); this->shim().FaceDetected(cookie); return S_OK; } @@ -417,6 +446,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().DetectionMode(value); return S_OK; } @@ -430,7 +460,8 @@ struct produce : produc { try { - *value = detach(this->shim().DetectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetectionMode()); return S_OK; } catch (...) @@ -443,6 +474,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SynchronousDetectionEnabled(value); return S_OK; } @@ -456,7 +488,8 @@ struct produce : produc { try { - *value = detach(this->shim().SynchronousDetectionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SynchronousDetectionEnabled()); return S_OK; } catch (...) @@ -469,11 +502,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_DetectedFaces(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DetectedFaces(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DetectedFaces()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DetectedFaces()); return S_OK; } catch (...) @@ -491,6 +525,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return S_OK; } @@ -504,7 +539,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -521,7 +557,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Certainty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certainty()); return S_OK; } catch (...) @@ -530,11 +567,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FrameControllers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FrameControllers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FrameControllers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameControllers()); return S_OK; } catch (...) @@ -548,11 +586,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall add_Binding(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Binding(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Binding(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Binding(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -565,6 +604,7 @@ struct produce : produce_baseshim()); this->shim().Binding(token); return S_OK; } @@ -574,11 +614,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Token(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Token()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Token()); return S_OK; } catch (...) @@ -588,10 +629,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Token(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Token(*reinterpret_cast(&value)); return S_OK; } @@ -601,11 +643,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -619,11 +662,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Canceled(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Canceled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Canceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Canceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -636,6 +680,7 @@ struct produce : produce_baseshim()); this->shim().Canceled(token); return S_OK; } @@ -645,11 +690,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MediaBinder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaBinder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaBinder()); return S_OK; } catch (...) @@ -659,11 +705,12 @@ struct produce : produce_base deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -673,10 +720,11 @@ struct produce : produce_base uri) noexcept override + HRESULT __stdcall abi_SetUri(impl::abi_arg_in uri) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetUri(*reinterpret_cast(&uri)); return S_OK; } @@ -686,10 +734,11 @@ struct produce : produce_base stream, abi_arg_in contentType) noexcept override + HRESULT __stdcall abi_SetStream(impl::abi_arg_in stream, impl::abi_arg_in contentType) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStream(*reinterpret_cast(&stream), *reinterpret_cast(&contentType)); return S_OK; } @@ -699,10 +748,11 @@ struct produce : produce_base stream, abi_arg_in contentType) noexcept override + HRESULT __stdcall abi_SetStreamReference(impl::abi_arg_in stream, impl::abi_arg_in contentType) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStreamReference(*reinterpret_cast(&stream), *reinterpret_cast(&contentType)); return S_OK; } @@ -716,10 +766,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_StartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -729,11 +780,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -742,10 +794,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -755,11 +808,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -768,10 +822,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -781,11 +836,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -799,11 +855,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Cue(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cue()); return S_OK; } catch (...) @@ -821,11 +878,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_OpenOperationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OpenOperationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OpenOperationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OpenOperationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -838,6 +896,7 @@ struct produce : produce_baseshim()); this->shim().OpenOperationCompleted(token); return S_OK; } @@ -847,11 +906,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomProperties()); return S_OK; } catch (...) @@ -861,11 +921,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -879,7 +940,8 @@ struct produce : produce_baseshim().IsOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpen()); return S_OK; } catch (...) @@ -888,11 +950,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ExternalTimedTextSources(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExternalTimedTextSources()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExternalTimedTextSources()); return S_OK; } catch (...) @@ -902,11 +965,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ExternalTimedMetadataTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExternalTimedMetadataTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExternalTimedMetadataTracks()); return S_OK; } catch (...) @@ -920,11 +984,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_StateChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -937,6 +1002,7 @@ struct produce : produce_baseshim()); this->shim().StateChanged(token); return S_OK; } @@ -950,7 +1016,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -963,6 +1030,7 @@ struct produce : produce_baseshim()); this->shim().Reset(); return S_OK; } @@ -980,7 +1048,8 @@ struct produce : produce_baseshim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -993,11 +1062,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Error(abi_arg_out value) noexcept override + HRESULT __stdcall get_Error(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -1015,7 +1085,8 @@ struct produce : pro { try { - *value = detach(this->shim().OldState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldState()); return S_OK; } catch (...) @@ -1028,7 +1099,8 @@ struct produce : pro { try { - *value = detach(this->shim().NewState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewState()); return S_OK; } catch (...) @@ -1041,11 +1113,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromAdaptiveMediaSource(abi_arg_in mediaSource, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromAdaptiveMediaSource(impl::abi_arg_in mediaSource, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromAdaptiveMediaSource(*reinterpret_cast(&mediaSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromAdaptiveMediaSource(*reinterpret_cast(&mediaSource))); return S_OK; } catch (...) @@ -1055,11 +1128,12 @@ struct produce : produce_base mediaSource, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromMediaStreamSource(impl::abi_arg_in mediaSource, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromMediaStreamSource(*reinterpret_cast(&mediaSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromMediaStreamSource(*reinterpret_cast(&mediaSource))); return S_OK; } catch (...) @@ -1069,11 +1143,12 @@ struct produce : produce_base mediaSource, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromMseStreamSource(impl::abi_arg_in mediaSource, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromMseStreamSource(*reinterpret_cast(&mediaSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromMseStreamSource(*reinterpret_cast(&mediaSource))); return S_OK; } catch (...) @@ -1083,11 +1158,12 @@ struct produce : produce_base mediaSource, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromIMediaSource(impl::abi_arg_in mediaSource, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromIMediaSource(*reinterpret_cast(&mediaSource))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromIMediaSource(*reinterpret_cast(&mediaSource))); return S_OK; } catch (...) @@ -1097,11 +1173,12 @@ struct produce : produce_base file, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromStorageFile(impl::abi_arg_in file, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromStorageFile(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromStorageFile(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -1111,11 +1188,12 @@ struct produce : produce_base stream, abi_arg_in contentType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromStream(impl::abi_arg_in stream, impl::abi_arg_in contentType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromStream(*reinterpret_cast(&stream), *reinterpret_cast(&contentType))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromStream(*reinterpret_cast(&stream), *reinterpret_cast(&contentType))); return S_OK; } catch (...) @@ -1125,11 +1203,12 @@ struct produce : produce_base stream, abi_arg_in contentType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromStreamReference(impl::abi_arg_in stream, impl::abi_arg_in contentType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromStreamReference(*reinterpret_cast(&stream), *reinterpret_cast(&contentType))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromStreamReference(*reinterpret_cast(&stream), *reinterpret_cast(&contentType))); return S_OK; } catch (...) @@ -1139,11 +1218,12 @@ struct produce : produce_base uri, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromUri(impl::abi_arg_in uri, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromUri(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromUri(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1157,11 +1237,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFromMediaBinder(abi_arg_in binder, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromMediaBinder(impl::abi_arg_in binder, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromMediaBinder(*reinterpret_cast(&binder))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromMediaBinder(*reinterpret_cast(&binder))); return S_OK; } catch (...) @@ -1179,7 +1260,8 @@ struct produce : produce_baseshim().IsSelected()); + typename D::abi_guard guard(this->shim()); + *selected = detach_abi(this->shim().IsSelected()); return S_OK; } catch (...) @@ -1188,10 +1270,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -1201,11 +1284,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1215,10 +1299,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -1228,11 +1313,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1246,11 +1332,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Processed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Processed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Processed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Processed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1263,6 +1350,7 @@ struct produce : produce_baseshim()); this->shim().Processed(token); return S_OK; } @@ -1272,11 +1360,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Buffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Buffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffer()); return S_OK; } catch (...) @@ -1286,11 +1375,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1299,11 +1389,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -1313,11 +1404,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Protection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Protection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Protection()); return S_OK; } catch (...) @@ -1327,10 +1419,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DecodeTimestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DecodeTimestamp(*reinterpret_cast(&value)); return S_OK; } @@ -1340,11 +1433,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DecodeTimestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DecodeTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecodeTimestamp()); return S_OK; } catch (...) @@ -1353,10 +1447,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -1366,11 +1461,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -1383,6 +1479,7 @@ struct produce : produce_baseshim()); this->shim().KeyFrame(value); return S_OK; } @@ -1396,7 +1493,8 @@ struct produce : produce_baseshim().KeyFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyFrame()); return S_OK; } catch (...) @@ -1409,6 +1507,7 @@ struct produce : produce_baseshim()); this->shim().Discontinuous(value); return S_OK; } @@ -1422,7 +1521,8 @@ struct produce : produce_baseshim().Discontinuous()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Discontinuous()); return S_OK; } catch (...) @@ -1435,11 +1535,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SetKeyIdentifier(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetKeyIdentifier(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetKeyIdentifier(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetKeyIdentifier(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1448,11 +1549,12 @@ struct produce } } - HRESULT __stdcall abi_GetKeyIdentifier(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetKeyIdentifier(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().GetKeyIdentifier(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().GetKeyIdentifier(detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -1463,11 +1565,12 @@ struct produce } } - HRESULT __stdcall abi_SetInitializationVector(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetInitializationVector(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetInitializationVector(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetInitializationVector(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1476,11 +1579,12 @@ struct produce } } - HRESULT __stdcall abi_GetInitializationVector(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetInitializationVector(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().GetInitializationVector(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().GetInitializationVector(detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -1491,11 +1595,12 @@ struct produce } } - HRESULT __stdcall abi_SetSubSampleMapping(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetSubSampleMapping(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetSubSampleMapping(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetSubSampleMapping(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1504,11 +1609,12 @@ struct produce } } - HRESULT __stdcall abi_GetSubSampleMapping(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetSubSampleMapping(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().GetSubSampleMapping(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().GetSubSampleMapping(detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -1523,11 +1629,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromBuffer(abi_arg_in buffer, abi_arg_in timestamp, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromBuffer(impl::abi_arg_in buffer, impl::abi_arg_in timestamp, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromBuffer(*reinterpret_cast(&buffer), *reinterpret_cast(×tamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromBuffer(*reinterpret_cast(&buffer), *reinterpret_cast(×tamp))); return S_OK; } catch (...) @@ -1537,11 +1644,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateFromStreamAsync(abi_arg_in stream, uint32_t count, abi_arg_in timestamp, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateFromStreamAsync(impl::abi_arg_in stream, uint32_t count, impl::abi_arg_in timestamp, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), count, *reinterpret_cast(×tamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), count, *reinterpret_cast(×tamp))); return S_OK; } catch (...) @@ -1555,11 +1663,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall add_Closed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1572,6 +1681,7 @@ struct produce : produce_baseshim()); this->shim().Closed(token); return S_OK; } @@ -1581,11 +1691,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Starting(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Starting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Starting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1598,6 +1709,7 @@ struct produce : produce_baseshim()); this->shim().Starting(token); return S_OK; } @@ -1607,11 +1719,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Paused(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Paused(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Paused(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1624,6 +1737,7 @@ struct produce : produce_baseshim()); this->shim().Paused(token); return S_OK; } @@ -1633,11 +1747,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SampleRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SampleRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SampleRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1650,6 +1765,7 @@ struct produce : produce_baseshim()); this->shim().SampleRequested(token); return S_OK; } @@ -1659,11 +1775,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SwitchStreamsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SwitchStreamsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SwitchStreamsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1676,6 +1793,7 @@ struct produce : produce_baseshim()); this->shim().SwitchStreamsRequested(token); return S_OK; } @@ -1689,6 +1807,7 @@ struct produce : produce_baseshim()); this->shim().NotifyError(errorStatus); return S_OK; } @@ -1698,10 +1817,11 @@ struct produce : produce_base descriptor) noexcept override + HRESULT __stdcall abi_AddStreamDescriptor(impl::abi_arg_in descriptor) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStreamDescriptor(*reinterpret_cast(&descriptor)); return S_OK; } @@ -1711,10 +1831,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MediaProtectionManager(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MediaProtectionManager(*reinterpret_cast(&value)); return S_OK; } @@ -1724,11 +1845,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MediaProtectionManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaProtectionManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaProtectionManager()); return S_OK; } catch (...) @@ -1738,10 +1860,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -1751,11 +1874,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -1768,6 +1892,7 @@ struct produce : produce_baseshim()); this->shim().CanSeek(value); return S_OK; } @@ -1781,7 +1906,8 @@ struct produce : produce_baseshim().CanSeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSeek()); return S_OK; } catch (...) @@ -1790,10 +1916,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BufferTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BufferTime(*reinterpret_cast(&value)); return S_OK; } @@ -1803,11 +1930,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BufferTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BufferTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferTime()); return S_OK; } catch (...) @@ -1816,10 +1944,11 @@ struct produce : produce_base startOffset, abi_arg_in endOffset) noexcept override + HRESULT __stdcall abi_SetBufferedRange(impl::abi_arg_in startOffset, impl::abi_arg_in endOffset) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBufferedRange(*reinterpret_cast(&startOffset), *reinterpret_cast(&endOffset)); return S_OK; } @@ -1829,11 +1958,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MusicProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MusicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MusicProperties()); return S_OK; } catch (...) @@ -1843,11 +1973,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProperties()); return S_OK; } catch (...) @@ -1857,10 +1988,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -1870,11 +2002,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1884,11 +2017,12 @@ struct produce : produce_base streamDescriptor, uint32_t __keyIdentifierSize, abi_arg_in * keyIdentifier, uint32_t __licenseDataSize, abi_arg_in * licenseData) noexcept override + HRESULT __stdcall abi_AddProtectionKey(impl::abi_arg_in streamDescriptor, uint32_t __keyIdentifierSize, impl::abi_arg_in * keyIdentifier, uint32_t __licenseDataSize, impl::abi_arg_in * licenseData) noexcept override { try { - this->shim().AddProtectionKey(*reinterpret_cast(&streamDescriptor), array_ref(keyIdentifier, keyIdentifier + __keyIdentifierSize), array_ref(licenseData, licenseData + __licenseDataSize)); + typename D::abi_guard guard(this->shim()); + this->shim().AddProtectionKey(*reinterpret_cast(&streamDescriptor), array_view(keyIdentifier, keyIdentifier + __keyIdentifierSize), array_view(licenseData, licenseData + __licenseDataSize)); return S_OK; } catch (...) @@ -1901,11 +2035,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_SampleRendered(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SampleRendered(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SampleRendered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SampleRendered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1918,6 +2053,7 @@ struct produce : produce_baseshim()); this->shim().SampleRendered(token); return S_OK; } @@ -1931,11 +2067,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1953,7 +2090,8 @@ struct produce : produ { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -1966,11 +2104,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromDescriptor(abi_arg_in descriptor, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromDescriptor(impl::abi_arg_in descriptor, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromDescriptor(*reinterpret_cast(&descriptor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromDescriptor(*reinterpret_cast(&descriptor))); return S_OK; } catch (...) @@ -1980,11 +2119,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateFromDescriptors(abi_arg_in descriptor, abi_arg_in descriptor2, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromDescriptors(impl::abi_arg_in descriptor, impl::abi_arg_in descriptor2, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromDescriptors(*reinterpret_cast(&descriptor), *reinterpret_cast(&descriptor2))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromDescriptors(*reinterpret_cast(&descriptor), *reinterpret_cast(&descriptor2))); return S_OK; } catch (...) @@ -1998,11 +2138,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_SampleLag(abi_arg_out value) noexcept override + HRESULT __stdcall get_SampleLag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SampleLag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SampleLag()); return S_OK; } catch (...) @@ -2015,11 +2156,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_StreamDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_StreamDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreamDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamDescriptor()); return S_OK; } catch (...) @@ -2029,11 +2171,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2043,10 +2186,11 @@ struct produce : produ } } - HRESULT __stdcall put_Sample(abi_arg_in value) noexcept override + HRESULT __stdcall put_Sample(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Sample(*reinterpret_cast(&value)); return S_OK; } @@ -2056,11 +2200,12 @@ struct produce : produ } } - HRESULT __stdcall get_Sample(abi_arg_out value) noexcept override + HRESULT __stdcall get_Sample(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sample()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sample()); return S_OK; } catch (...) @@ -2074,6 +2219,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportSampleProgress(progress); return S_OK; } @@ -2091,6 +2237,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -2104,11 +2251,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -2122,11 +2270,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -2140,11 +2289,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_StartPosition(abi_arg_out> value) noexcept override + HRESULT __stdcall get_StartPosition(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StartPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartPosition()); return S_OK; } catch (...) @@ -2154,11 +2304,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2168,10 +2319,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SetActualStartPosition(abi_arg_in position) noexcept override + HRESULT __stdcall abi_SetActualStartPosition(impl::abi_arg_in position) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetActualStartPosition(*reinterpret_cast(&position)); return S_OK; } @@ -2189,6 +2341,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -2202,11 +2355,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_OldStreamDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldStreamDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldStreamDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldStreamDescriptor()); return S_OK; } catch (...) @@ -2216,11 +2370,12 @@ struct produce } } - HRESULT __stdcall get_NewStreamDescriptor(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewStreamDescriptor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewStreamDescriptor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewStreamDescriptor()); return S_OK; } catch (...) @@ -2230,11 +2385,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2252,6 +2408,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -2265,11 +2422,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -2283,11 +2441,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2297,11 +2456,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -2315,7 +2475,8 @@ struct produce : produce_baseshim().TrackKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackKind()); return S_OK; } catch (...) @@ -2324,10 +2485,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -2337,11 +2499,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -2355,11 +2518,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_UpdateStarting(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UpdateStarting(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UpdateStarting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UpdateStarting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2372,6 +2536,7 @@ struct produce : produce_baseshim()); this->shim().UpdateStarting(token); return S_OK; } @@ -2381,11 +2546,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2398,6 +2564,7 @@ struct produce : produce_baseshim()); this->shim().Updated(token); return S_OK; } @@ -2407,11 +2574,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_UpdateEnded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UpdateEnded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UpdateEnded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2424,6 +2592,7 @@ struct produce : produce_baseshim()); this->shim().UpdateEnded(token); return S_OK; } @@ -2433,11 +2602,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ErrorOccurred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ErrorOccurred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2450,6 +2620,7 @@ struct produce : produce_baseshim()); this->shim().ErrorOccurred(token); return S_OK; } @@ -2459,11 +2630,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Aborted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Aborted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Aborted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2476,6 +2648,7 @@ struct produce : produce_baseshim()); this->shim().Aborted(token); return S_OK; } @@ -2489,7 +2662,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -2502,6 +2676,7 @@ struct produce : produce_baseshim()); this->shim().Mode(value); return S_OK; } @@ -2515,7 +2690,8 @@ struct produce : produce_baseshim().IsUpdating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUpdating()); return S_OK; } catch (...) @@ -2524,11 +2700,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Buffered(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Buffered()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffered()); return S_OK; } catch (...) @@ -2538,11 +2715,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TimestampOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimestampOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimestampOffset()); return S_OK; } catch (...) @@ -2551,10 +2729,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TimestampOffset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TimestampOffset(*reinterpret_cast(&value)); return S_OK; } @@ -2564,11 +2743,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AppendWindowStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppendWindowStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppendWindowStart()); return S_OK; } catch (...) @@ -2577,10 +2757,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AppendWindowStart(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendWindowStart(*reinterpret_cast(&value)); return S_OK; } @@ -2590,11 +2771,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AppendWindowEnd(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppendWindowEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppendWindowEnd()); return S_OK; } catch (...) @@ -2604,10 +2786,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_AppendWindowEnd(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendWindowEnd(*reinterpret_cast *>(&value)); return S_OK; } @@ -2617,10 +2800,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_AppendBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -2630,10 +2814,11 @@ struct produce : produce_base stream) noexcept override + HRESULT __stdcall abi_AppendStream(impl::abi_arg_in stream) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendStream(*reinterpret_cast(&stream)); return S_OK; } @@ -2643,10 +2828,11 @@ struct produce : produce_base stream, uint64_t maxSize) noexcept override + HRESULT __stdcall abi_AppendStreamMaxSize(impl::abi_arg_in stream, uint64_t maxSize) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppendStream(*reinterpret_cast(&stream), maxSize); return S_OK; } @@ -2660,6 +2846,7 @@ struct produce : produce_baseshim()); this->shim().Abort(); return S_OK; } @@ -2669,10 +2856,11 @@ struct produce : produce_base start, abi_arg_in> end) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in start, impl::abi_arg_in> end) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&start), *reinterpret_cast *>(&end)); return S_OK; } @@ -2686,11 +2874,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_SourceBufferAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceBufferAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceBufferAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceBufferAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2703,6 +2892,7 @@ struct produce : produce_baseshim()); this->shim().SourceBufferAdded(token); return S_OK; } @@ -2712,11 +2902,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceBufferRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceBufferRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceBufferRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2729,6 +2920,7 @@ struct produce : produce_baseshim()); this->shim().SourceBufferRemoved(token); return S_OK; } @@ -2738,11 +2930,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Buffers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Buffers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffers()); return S_OK; } catch (...) @@ -2756,11 +2949,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Opened(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2773,6 +2967,7 @@ struct produce : produce_baseshim()); this->shim().Opened(token); return S_OK; } @@ -2782,11 +2977,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Ended(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Ended(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Ended(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2799,6 +2995,7 @@ struct produce : produce_baseshim()); this->shim().Ended(token); return S_OK; } @@ -2808,11 +3005,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2825,6 +3023,7 @@ struct produce : produce_baseshim()); this->shim().Closed(token); return S_OK; } @@ -2834,11 +3033,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourceBuffers(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceBuffers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceBuffers()); return S_OK; } catch (...) @@ -2848,11 +3048,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ActiveSourceBuffers(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActiveSourceBuffers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveSourceBuffers()); return S_OK; } catch (...) @@ -2866,7 +3067,8 @@ struct produce : produce_baseshim().ReadyState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadyState()); return S_OK; } catch (...) @@ -2875,11 +3077,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -2889,10 +3092,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast *>(&value)); return S_OK; } @@ -2902,11 +3106,12 @@ struct produce : produce_base mimeType, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_AddSourceBuffer(impl::abi_arg_in mimeType, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().AddSourceBuffer(*reinterpret_cast(&mimeType))); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().AddSourceBuffer(*reinterpret_cast(&mimeType))); return S_OK; } catch (...) @@ -2916,10 +3121,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_RemoveSourceBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveSourceBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -2933,6 +3139,7 @@ struct produce : produce_baseshim()); this->shim().EndOfStream(status); return S_OK; } @@ -2946,11 +3153,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_IsContentTypeSupported(abi_arg_in contentType, bool * value) noexcept override + HRESULT __stdcall abi_IsContentTypeSupported(impl::abi_arg_in contentType, bool * value) noexcept override { try { - *value = detach(this->shim().IsContentTypeSupported(*reinterpret_cast(&contentType))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsContentTypeSupported(*reinterpret_cast(&contentType))); return S_OK; } catch (...) @@ -2963,11 +3171,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_HighDynamicRangeAnalyzer(abi_arg_out value) noexcept override + HRESULT __stdcall get_HighDynamicRangeAnalyzer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HighDynamicRangeAnalyzer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighDynamicRangeAnalyzer()); return S_OK; } catch (...) @@ -2977,10 +3186,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DesiredAnalysisInterval(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredAnalysisInterval(*reinterpret_cast(&value)); return S_OK; } @@ -2990,11 +3200,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DesiredAnalysisInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredAnalysisInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredAnalysisInterval()); return S_OK; } catch (...) @@ -3003,11 +3214,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_SceneAnalyzed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().SceneAnalyzed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().SceneAnalyzed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3020,6 +3232,7 @@ struct produce : produce_baseshim()); this->shim().SceneAnalyzed(cookie); return S_OK; } @@ -3033,11 +3246,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FrameControlValues(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameControlValues(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameControlValues()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameControlValues()); return S_OK; } catch (...) @@ -3047,11 +3261,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HighDynamicRange(abi_arg_out value) noexcept override + HRESULT __stdcall get_HighDynamicRange(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HighDynamicRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighDynamicRange()); return S_OK; } catch (...) @@ -3065,11 +3280,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_ResultFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResultFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResultFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResultFrame()); return S_OK; } catch (...) @@ -3083,11 +3299,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall add_SelectedIndexChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SelectedIndexChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectedIndexChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectedIndexChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3100,6 +3317,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedIndexChanged(token); return S_OK; } @@ -3113,6 +3331,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedIndex(value); return S_OK; } @@ -3126,7 +3345,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -3139,11 +3359,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall add_CueEntered(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CueEntered(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CueEntered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CueEntered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3156,6 +3377,7 @@ struct produce : produce_baseshim()); this->shim().CueEntered(token); return S_OK; } @@ -3165,11 +3387,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_CueExited(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CueExited(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CueExited(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3182,6 +3405,7 @@ struct produce : produce_baseshim()); this->shim().CueExited(token); return S_OK; } @@ -3191,11 +3415,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_TrackFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TrackFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TrackFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3208,6 +3433,7 @@ struct produce : produce_baseshim()); this->shim().TrackFailed(token); return S_OK; } @@ -3217,11 +3443,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Cues(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Cues()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cues()); return S_OK; } catch (...) @@ -3231,11 +3458,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ActiveCues(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ActiveCues()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveCues()); return S_OK; } catch (...) @@ -3249,7 +3477,8 @@ struct produce : produce_baseshim().TimedMetadataKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimedMetadataKind()); return S_OK; } catch (...) @@ -3258,11 +3487,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DispatchType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DispatchType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DispatchType()); return S_OK; } catch (...) @@ -3272,10 +3502,11 @@ struct produce : produce_base cue) noexcept override + HRESULT __stdcall abi_AddCue(impl::abi_arg_in cue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddCue(*reinterpret_cast(&cue)); return S_OK; } @@ -3285,10 +3516,11 @@ struct produce : produce_base cue) noexcept override + HRESULT __stdcall abi_RemoveCue(impl::abi_arg_in cue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveCue(*reinterpret_cast(&cue)); return S_OK; } @@ -3302,11 +3534,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PlaybackItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaybackItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackItem()); return S_OK; } catch (...) @@ -3316,11 +3549,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -3338,7 +3572,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -3351,7 +3586,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -3364,11 +3600,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in id, abi_arg_in language, Windows::Media::Core::TimedMetadataKind kind, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in id, impl::abi_arg_in language, Windows::Media::Core::TimedMetadataKind kind, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&language), kind)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&id), *reinterpret_cast(&language), kind)); return S_OK; } catch (...) @@ -3382,11 +3619,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Error(abi_arg_out value) noexcept override + HRESULT __stdcall get_Error(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -3400,11 +3638,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_CueRegion(abi_arg_out value) noexcept override + HRESULT __stdcall get_CueRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CueRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CueRegion()); return S_OK; } catch (...) @@ -3414,10 +3653,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CueRegion(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CueRegion(*reinterpret_cast(&value)); return S_OK; } @@ -3427,11 +3667,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CueStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CueStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CueStyle()); return S_OK; } catch (...) @@ -3441,10 +3682,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CueStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CueStyle(*reinterpret_cast(&value)); return S_OK; } @@ -3454,11 +3696,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Lines(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Lines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Lines()); return S_OK; } catch (...) @@ -3472,11 +3715,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -3486,10 +3730,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -3499,11 +3744,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Subformats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Subformats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subformats()); return S_OK; } catch (...) @@ -3517,11 +3763,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -3531,10 +3778,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -3544,11 +3792,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3557,10 +3806,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -3570,11 +3820,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Extent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Extent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Extent()); return S_OK; } catch (...) @@ -3583,10 +3834,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Extent(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Extent(*reinterpret_cast(&value)); return S_OK; } @@ -3596,11 +3848,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -3609,10 +3862,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -3626,7 +3880,8 @@ struct produce : produce_baseshim().WritingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WritingMode()); return S_OK; } catch (...) @@ -3639,6 +3894,7 @@ struct produce : produce_baseshim()); this->shim().WritingMode(value); return S_OK; } @@ -3652,7 +3908,8 @@ struct produce : produce_baseshim().DisplayAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayAlignment()); return S_OK; } catch (...) @@ -3665,6 +3922,7 @@ struct produce : produce_baseshim()); this->shim().DisplayAlignment(value); return S_OK; } @@ -3674,11 +3932,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LineHeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeight()); return S_OK; } catch (...) @@ -3687,10 +3946,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LineHeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LineHeight(*reinterpret_cast(&value)); return S_OK; } @@ -3704,7 +3964,8 @@ struct produce : produce_baseshim().IsOverflowClipped()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOverflowClipped()); return S_OK; } catch (...) @@ -3717,6 +3978,7 @@ struct produce : produce_baseshim()); this->shim().IsOverflowClipped(value); return S_OK; } @@ -3726,11 +3988,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -3739,10 +4002,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -3756,7 +4020,8 @@ struct produce : produce_baseshim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -3769,6 +4034,7 @@ struct produce : produce_baseshim()); this->shim().TextWrapping(value); return S_OK; } @@ -3782,7 +4048,8 @@ struct produce : produce_baseshim().ZIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndex()); return S_OK; } catch (...) @@ -3795,6 +4062,7 @@ struct produce : produce_baseshim()); this->shim().ZIndex(value); return S_OK; } @@ -3808,7 +4076,8 @@ struct produce : produce_baseshim().ScrollMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollMode()); return S_OK; } catch (...) @@ -3821,6 +4090,7 @@ struct produce : produce_baseshim()); this->shim().ScrollMode(value); return S_OK; } @@ -3834,11 +4104,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Resolved(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Resolved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Resolved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Resolved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3851,6 +4122,7 @@ struct produce : produce_baseshim()); this->shim().Resolved(token); return S_OK; } @@ -3864,11 +4136,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Error(abi_arg_out value) noexcept override + HRESULT __stdcall get_Error(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -3878,11 +4151,12 @@ struct produce } } - HRESULT __stdcall get_Tracks(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Tracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Tracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tracks()); return S_OK; } catch (...) @@ -3896,11 +4170,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromStream(abi_arg_in stream, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromStream(impl::abi_arg_in stream, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromStream(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromStream(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -3910,11 +4185,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateFromUri(abi_arg_in uri, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromUri(impl::abi_arg_in uri, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromUri(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromUri(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -3924,11 +4200,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateFromStreamWithLanguage(abi_arg_in stream, abi_arg_in defaultLanguage, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromStreamWithLanguage(impl::abi_arg_in stream, impl::abi_arg_in defaultLanguage, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromStream(*reinterpret_cast(&stream), *reinterpret_cast(&defaultLanguage))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromStream(*reinterpret_cast(&stream), *reinterpret_cast(&defaultLanguage))); return S_OK; } catch (...) @@ -3938,11 +4215,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateFromUriWithLanguage(abi_arg_in uri, abi_arg_in defaultLanguage, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromUriWithLanguage(impl::abi_arg_in uri, impl::abi_arg_in defaultLanguage, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromUri(*reinterpret_cast(&uri), *reinterpret_cast(&defaultLanguage))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromUri(*reinterpret_cast(&uri), *reinterpret_cast(&defaultLanguage))); return S_OK; } catch (...) @@ -3956,11 +4234,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -3970,10 +4249,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -3983,11 +4263,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -3997,10 +4278,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -4010,11 +4292,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -4023,10 +4306,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontSize(*reinterpret_cast(&value)); return S_OK; } @@ -4040,7 +4324,8 @@ struct produce : produce_baseshim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -4053,6 +4338,7 @@ struct produce : produce_baseshim()); this->shim().FontWeight(value); return S_OK; } @@ -4062,11 +4348,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -4075,10 +4362,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -4088,11 +4376,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -4101,10 +4390,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -4118,7 +4408,8 @@ struct produce : produce_baseshim().IsBackgroundAlwaysShown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBackgroundAlwaysShown()); return S_OK; } catch (...) @@ -4131,6 +4422,7 @@ struct produce : produce_baseshim()); this->shim().IsBackgroundAlwaysShown(value); return S_OK; } @@ -4144,7 +4436,8 @@ struct produce : produce_baseshim().FlowDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowDirection()); return S_OK; } catch (...) @@ -4157,6 +4450,7 @@ struct produce : produce_baseshim()); this->shim().FlowDirection(value); return S_OK; } @@ -4170,7 +4464,8 @@ struct produce : produce_baseshim().LineAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineAlignment()); return S_OK; } catch (...) @@ -4183,6 +4478,7 @@ struct produce : produce_baseshim()); this->shim().LineAlignment(value); return S_OK; } @@ -4192,11 +4488,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutlineColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutlineColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutlineColor()); return S_OK; } catch (...) @@ -4205,10 +4502,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OutlineColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutlineColor(*reinterpret_cast(&value)); return S_OK; } @@ -4218,11 +4516,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutlineThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutlineThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutlineThickness()); return S_OK; } catch (...) @@ -4231,10 +4530,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OutlineThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutlineThickness(*reinterpret_cast(&value)); return S_OK; } @@ -4244,11 +4544,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutlineRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutlineRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutlineRadius()); return S_OK; } catch (...) @@ -4257,10 +4558,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OutlineRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutlineRadius(*reinterpret_cast(&value)); return S_OK; } @@ -4278,7 +4580,8 @@ struct produce : produce_baseshim().StartIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartIndex()); return S_OK; } catch (...) @@ -4291,6 +4594,7 @@ struct produce : produce_baseshim()); this->shim().StartIndex(value); return S_OK; } @@ -4304,7 +4608,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -4317,6 +4622,7 @@ struct produce : produce_baseshim()); this->shim().Length(value); return S_OK; } @@ -4326,11 +4632,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SubformatStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubformatStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubformatStyle()); return S_OK; } catch (...) @@ -4340,10 +4647,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SubformatStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SubformatStyle(*reinterpret_cast(&value)); return S_OK; } @@ -4361,6 +4669,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return S_OK; } @@ -4374,7 +4683,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -4383,11 +4693,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_EnabledChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_EnabledChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().EnabledChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().EnabledChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -4400,6 +4711,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().EnabledChanged(cookie); return S_OK; } @@ -4409,11 +4721,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetRecommendedStreamConfiguration(abi_arg_in controller, abi_arg_in desiredProperties, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetRecommendedStreamConfiguration(impl::abi_arg_in controller, impl::abi_arg_in desiredProperties, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRecommendedStreamConfiguration(*reinterpret_cast(&controller), *reinterpret_cast(&desiredProperties))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRecommendedStreamConfiguration(*reinterpret_cast(&controller), *reinterpret_cast(&desiredProperties))); return S_OK; } catch (...) @@ -4431,7 +4744,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -4444,11 +4758,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EncodingProperties(abi_arg_out encodingProperties) noexcept override + HRESULT __stdcall get_EncodingProperties(impl::abi_arg_out encodingProperties) noexcept override { try { - *encodingProperties = detach(this->shim().EncodingProperties()); + typename D::abi_guard guard(this->shim()); + *encodingProperties = detach_abi(this->shim().EncodingProperties()); return S_OK; } catch (...) @@ -4462,11 +4777,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in encodingProperties, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in encodingProperties, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&encodingProperties))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&encodingProperties))); return S_OK; } catch (...) @@ -4480,11 +4796,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall add_OpenFailed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_OpenFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OpenFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OpenFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -4497,6 +4814,7 @@ struct produce : produce_baseshim()); this->shim().OpenFailed(token); return S_OK; } @@ -4506,11 +4824,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetEncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetEncodingProperties()); return S_OK; } catch (...) @@ -4520,11 +4839,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaybackItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackItem()); return S_OK; } catch (...) @@ -4534,11 +4854,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -4548,11 +4869,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SupportInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportInfo()); return S_OK; } catch (...) @@ -4570,7 +4892,8 @@ struct produce : produc { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -4587,7 +4910,8 @@ struct produce : produce_baseshim().DecoderStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecoderStatus()); return S_OK; } catch (...) @@ -4600,7 +4924,8 @@ struct produce : produce_baseshim().MediaSourceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSourceStatus()); return S_OK; } catch (...) @@ -4617,90 +4942,90 @@ namespace Windows::Media::Core { template bool impl_IMediaStreamDescriptor::IsSelected() const { bool selected {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelected(&selected)); + check_hresult(WINRT_SHIM(IMediaStreamDescriptor)->get_IsSelected(&selected)); return selected; } -template void impl_IMediaStreamDescriptor::Name(hstring_ref value) const +template void impl_IMediaStreamDescriptor::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamDescriptor)->put_Name(get_abi(value))); } template hstring impl_IMediaStreamDescriptor::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamDescriptor)->get_Name(put_abi(value))); return value; } -template void impl_IMediaStreamDescriptor::Language(hstring_ref value) const +template void impl_IMediaStreamDescriptor::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamDescriptor)->put_Language(get_abi(value))); } template hstring impl_IMediaStreamDescriptor::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamDescriptor)->get_Language(put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioStreamDescriptor::EncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties encodingProperties { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncodingProperties(put(encodingProperties))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptor)->get_EncodingProperties(put_abi(encodingProperties))); return encodingProperties; } -template void impl_IAudioStreamDescriptor2::LeadingEncoderPadding(const Windows::Foundation::IReference & value) const +template void impl_IAudioStreamDescriptor2::LeadingEncoderPadding(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_LeadingEncoderPadding(get(value))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptor2)->put_LeadingEncoderPadding(get_abi(value))); } template Windows::Foundation::IReference impl_IAudioStreamDescriptor2::LeadingEncoderPadding() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_LeadingEncoderPadding(put(value))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptor2)->get_LeadingEncoderPadding(put_abi(value))); return value; } -template void impl_IAudioStreamDescriptor2::TrailingEncoderPadding(const Windows::Foundation::IReference & value) const +template void impl_IAudioStreamDescriptor2::TrailingEncoderPadding(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrailingEncoderPadding(get(value))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptor2)->put_TrailingEncoderPadding(get_abi(value))); } template Windows::Foundation::IReference impl_IAudioStreamDescriptor2::TrailingEncoderPadding() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_TrailingEncoderPadding(put(value))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptor2)->get_TrailingEncoderPadding(put_abi(value))); return value; } template Windows::Media::Core::AudioStreamDescriptor impl_IAudioStreamDescriptorFactory::Create(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { Windows::Media::Core::AudioStreamDescriptor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(encodingProperties), put(result))); + check_hresult(WINRT_SHIM(IAudioStreamDescriptorFactory)->abi_Create(get_abi(encodingProperties), put_abi(result))); return result; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoStreamDescriptor::EncodingProperties() const { Windows::Media::MediaProperties::VideoEncodingProperties encodingProperties { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EncodingProperties(put(encodingProperties))); + check_hresult(WINRT_SHIM(IVideoStreamDescriptor)->get_EncodingProperties(put_abi(encodingProperties))); return encodingProperties; } template Windows::Media::Core::VideoStreamDescriptor impl_IVideoStreamDescriptorFactory::Create(const Windows::Media::MediaProperties::VideoEncodingProperties & encodingProperties) const { Windows::Media::Core::VideoStreamDescriptor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(encodingProperties), put(result))); + check_hresult(WINRT_SHIM(IVideoStreamDescriptorFactory)->abi_Create(get_abi(encodingProperties), put_abi(result))); return result; } template event_token impl_IMediaStreamSource::Closed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->add_Closed(get_abi(handler), &token)); return token; } @@ -4711,13 +5036,13 @@ template event_revoker impl_IMediaStreamSource< template void impl_IMediaStreamSource::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->remove_Closed(token)); } template event_token impl_IMediaStreamSource::Starting(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Starting(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->add_Starting(get_abi(handler), &token)); return token; } @@ -4728,30 +5053,30 @@ template event_revoker impl_IMediaStreamSource< template void impl_IMediaStreamSource::Starting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Starting(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->remove_Starting(token)); } -template event_token impl_IMediaStreamSource::Paused(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaStreamSource::Paused(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Paused(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->add_Paused(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaStreamSource::Paused(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaStreamSource::Paused(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMediaStreamSource::remove_Paused, Paused(handler)); } template void impl_IMediaStreamSource::Paused(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Paused(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->remove_Paused(token)); } template event_token impl_IMediaStreamSource::SampleRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SampleRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->add_SampleRequested(get_abi(handler), &token)); return token; } @@ -4762,13 +5087,13 @@ template event_revoker impl_IMediaStreamSource< template void impl_IMediaStreamSource::SampleRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SampleRequested(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->remove_SampleRequested(token)); } template event_token impl_IMediaStreamSource::SwitchStreamsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SwitchStreamsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->add_SwitchStreamsRequested(get_abi(handler), &token)); return token; } @@ -4779,107 +5104,107 @@ template event_revoker impl_IMediaStreamSource< template void impl_IMediaStreamSource::SwitchStreamsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SwitchStreamsRequested(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->remove_SwitchStreamsRequested(token)); } template void impl_IMediaStreamSource::NotifyError(Windows::Media::Core::MediaStreamSourceErrorStatus errorStatus) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyError(errorStatus)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->abi_NotifyError(errorStatus)); } template void impl_IMediaStreamSource::AddStreamDescriptor(const Windows::Media::Core::IMediaStreamDescriptor & descriptor) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStreamDescriptor(get(descriptor))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->abi_AddStreamDescriptor(get_abi(descriptor))); } template void impl_IMediaStreamSource::MediaProtectionManager(const Windows::Media::Protection::MediaProtectionManager & value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaProtectionManager(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->put_MediaProtectionManager(get_abi(value))); } template Windows::Media::Protection::MediaProtectionManager impl_IMediaStreamSource::MediaProtectionManager() const { Windows::Media::Protection::MediaProtectionManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaProtectionManager(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_MediaProtectionManager(put_abi(value))); return value; } template void impl_IMediaStreamSource::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->put_Duration(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaStreamSource::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_Duration(put_abi(value))); return value; } template void impl_IMediaStreamSource::CanSeek(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanSeek(value)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->put_CanSeek(value)); } template bool impl_IMediaStreamSource::CanSeek() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSeek(&value)); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_CanSeek(&value)); return value; } template void impl_IMediaStreamSource::BufferTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_BufferTime(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->put_BufferTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaStreamSource::BufferTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_BufferTime(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_BufferTime(put_abi(value))); return value; } template void impl_IMediaStreamSource::SetBufferedRange(const Windows::Foundation::TimeSpan & startOffset, const Windows::Foundation::TimeSpan & endOffset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBufferedRange(get(startOffset), get(endOffset))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->abi_SetBufferedRange(get_abi(startOffset), get_abi(endOffset))); } template Windows::Storage::FileProperties::MusicProperties impl_IMediaStreamSource::MusicProperties() const { Windows::Storage::FileProperties::MusicProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MusicProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_MusicProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::VideoProperties impl_IMediaStreamSource::VideoProperties() const { Windows::Storage::FileProperties::VideoProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_VideoProperties(put_abi(value))); return value; } template void impl_IMediaStreamSource::Thumbnail(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->put_Thumbnail(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IMediaStreamSource::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->get_Thumbnail(put_abi(value))); return value; } -template void impl_IMediaStreamSource::AddProtectionKey(const Windows::Media::Core::IMediaStreamDescriptor & streamDescriptor, array_ref keyIdentifier, array_ref licenseData) const +template void impl_IMediaStreamSource::AddProtectionKey(const Windows::Media::Core::IMediaStreamDescriptor & streamDescriptor, array_view keyIdentifier, array_view licenseData) const { - check_hresult(static_cast(static_cast(*this))->abi_AddProtectionKey(get(streamDescriptor), keyIdentifier.size(), get(keyIdentifier), licenseData.size(), get(licenseData))); + check_hresult(WINRT_SHIM(IMediaStreamSource)->abi_AddProtectionKey(get_abi(streamDescriptor), keyIdentifier.size(), get_abi(keyIdentifier), licenseData.size(), get_abi(licenseData))); } template event_token impl_IMediaStreamSource2::SampleRendered(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SampleRendered(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSource2)->add_SampleRendered(get_abi(handler), &token)); return token; } @@ -4890,644 +5215,644 @@ template event_revoker impl_IMediaStreamSource template void impl_IMediaStreamSource2::SampleRendered(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SampleRendered(token)); + check_hresult(WINRT_SHIM(IMediaStreamSource2)->remove_SampleRendered(token)); } template Windows::Media::Core::MediaStreamSource impl_IMediaStreamSourceFactory::CreateFromDescriptor(const Windows::Media::Core::IMediaStreamDescriptor & descriptor) const { Windows::Media::Core::MediaStreamSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromDescriptor(get(descriptor), put(result))); + check_hresult(WINRT_SHIM(IMediaStreamSourceFactory)->abi_CreateFromDescriptor(get_abi(descriptor), put_abi(result))); return result; } template Windows::Media::Core::MediaStreamSource impl_IMediaStreamSourceFactory::CreateFromDescriptors(const Windows::Media::Core::IMediaStreamDescriptor & descriptor, const Windows::Media::Core::IMediaStreamDescriptor & descriptor2) const { Windows::Media::Core::MediaStreamSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromDescriptors(get(descriptor), get(descriptor2), put(result))); + check_hresult(WINRT_SHIM(IMediaStreamSourceFactory)->abi_CreateFromDescriptors(get_abi(descriptor), get_abi(descriptor2), put_abi(result))); return result; } -template event_token impl_IMediaStreamSample::Processed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaStreamSample::Processed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Processed(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->add_Processed(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaStreamSample::Processed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaStreamSample::Processed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMediaStreamSample::remove_Processed, Processed(handler)); } template void impl_IMediaStreamSample::Processed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Processed(token)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->remove_Processed(token)); } template Windows::Storage::Streams::Buffer impl_IMediaStreamSample::Buffer() const { Windows::Storage::Streams::Buffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Buffer(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_Buffer(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaStreamSample::Timestamp() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_Timestamp(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSamplePropertySet impl_IMediaStreamSample::ExtendedProperties() const { Windows::Media::Core::MediaStreamSamplePropertySet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_ExtendedProperties(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSampleProtectionProperties impl_IMediaStreamSample::Protection() const { Windows::Media::Core::MediaStreamSampleProtectionProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Protection(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_Protection(put_abi(value))); return value; } template void impl_IMediaStreamSample::DecodeTimestamp(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DecodeTimestamp(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->put_DecodeTimestamp(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaStreamSample::DecodeTimestamp() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DecodeTimestamp(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_DecodeTimestamp(put_abi(value))); return value; } template void impl_IMediaStreamSample::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->put_Duration(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaStreamSample::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_Duration(put_abi(value))); return value; } template void impl_IMediaStreamSample::KeyFrame(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyFrame(value)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->put_KeyFrame(value)); } template bool impl_IMediaStreamSample::KeyFrame() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyFrame(&value)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_KeyFrame(&value)); return value; } template void impl_IMediaStreamSample::Discontinuous(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Discontinuous(value)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->put_Discontinuous(value)); } template bool impl_IMediaStreamSample::Discontinuous() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Discontinuous(&value)); + check_hresult(WINRT_SHIM(IMediaStreamSample)->get_Discontinuous(&value)); return value; } template Windows::Media::Core::MediaStreamSample impl_IMediaStreamSampleStatics::CreateFromBuffer(const Windows::Storage::Streams::IBuffer & buffer, const Windows::Foundation::TimeSpan & timestamp) const { Windows::Media::Core::MediaStreamSample value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromBuffer(get(buffer), get(timestamp), put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleStatics)->abi_CreateFromBuffer(get_abi(buffer), get_abi(timestamp), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaStreamSampleStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, uint32_t count, const Windows::Foundation::TimeSpan & timestamp) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamAsync(get(stream), count, get(timestamp), put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleStatics)->abi_CreateFromStreamAsync(get_abi(stream), count, get_abi(timestamp), put_abi(value))); return value; } -template void impl_IMediaStreamSampleProtectionProperties::SetKeyIdentifier(array_ref value) const +template void impl_IMediaStreamSampleProtectionProperties::SetKeyIdentifier(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetKeyIdentifier(value.size(), get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_SetKeyIdentifier(value.size(), get_abi(value))); } template void impl_IMediaStreamSampleProtectionProperties::GetKeyIdentifier(com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetKeyIdentifier(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_GetKeyIdentifier(impl::put_size_abi(value), put_abi(value))); } -template void impl_IMediaStreamSampleProtectionProperties::SetInitializationVector(array_ref value) const +template void impl_IMediaStreamSampleProtectionProperties::SetInitializationVector(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetInitializationVector(value.size(), get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_SetInitializationVector(value.size(), get_abi(value))); } template void impl_IMediaStreamSampleProtectionProperties::GetInitializationVector(com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetInitializationVector(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_GetInitializationVector(impl::put_size_abi(value), put_abi(value))); } -template void impl_IMediaStreamSampleProtectionProperties::SetSubSampleMapping(array_ref value) const +template void impl_IMediaStreamSampleProtectionProperties::SetSubSampleMapping(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSubSampleMapping(value.size(), get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_SetSubSampleMapping(value.size(), get_abi(value))); } template void impl_IMediaStreamSampleProtectionProperties::GetSubSampleMapping(com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetSubSampleMapping(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSampleProtectionProperties)->abi_GetSubSampleMapping(impl::put_size_abi(value), put_abi(value))); } template Windows::Media::Core::MediaStreamSourceClosedReason impl_IMediaStreamSourceClosedRequest::Reason() const { Windows::Media::Core::MediaStreamSourceClosedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IMediaStreamSourceClosedRequest)->get_Reason(&value)); return value; } template Windows::Media::Core::MediaStreamSourceClosedRequest impl_IMediaStreamSourceClosedEventArgs::Request() const { Windows::Media::Core::MediaStreamSourceClosedRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceClosedEventArgs)->get_Request(put_abi(value))); return value; } template void impl_IMediaStreamSourceStartingRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IMediaStreamSourceStartingRequestDeferral)->abi_Complete()); } template Windows::Foundation::IReference impl_IMediaStreamSourceStartingRequest::StartPosition() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_StartPosition(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceStartingRequest)->get_StartPosition(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSourceStartingRequestDeferral impl_IMediaStreamSourceStartingRequest::GetDeferral() const { Windows::Media::Core::MediaStreamSourceStartingRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IMediaStreamSourceStartingRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IMediaStreamSourceStartingRequest::SetActualStartPosition(const Windows::Foundation::TimeSpan & position) const { - check_hresult(static_cast(static_cast(*this))->abi_SetActualStartPosition(get(position))); + check_hresult(WINRT_SHIM(IMediaStreamSourceStartingRequest)->abi_SetActualStartPosition(get_abi(position))); } template Windows::Media::Core::MediaStreamSourceStartingRequest impl_IMediaStreamSourceStartingEventArgs::Request() const { Windows::Media::Core::MediaStreamSourceStartingRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceStartingEventArgs)->get_Request(put_abi(value))); return value; } template void impl_IMediaStreamSourceSampleRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequestDeferral)->abi_Complete()); } template Windows::Media::Core::IMediaStreamDescriptor impl_IMediaStreamSourceSampleRequest::StreamDescriptor() const { Windows::Media::Core::IMediaStreamDescriptor value; - check_hresult(static_cast(static_cast(*this))->get_StreamDescriptor(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequest)->get_StreamDescriptor(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSourceSampleRequestDeferral impl_IMediaStreamSourceSampleRequest::GetDeferral() const { Windows::Media::Core::MediaStreamSourceSampleRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IMediaStreamSourceSampleRequest::Sample(const Windows::Media::Core::MediaStreamSample & value) const { - check_hresult(static_cast(static_cast(*this))->put_Sample(get(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequest)->put_Sample(get_abi(value))); } template Windows::Media::Core::MediaStreamSample impl_IMediaStreamSourceSampleRequest::Sample() const { Windows::Media::Core::MediaStreamSample value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Sample(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequest)->get_Sample(put_abi(value))); return value; } template void impl_IMediaStreamSourceSampleRequest::ReportSampleProgress(uint32_t progress) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportSampleProgress(progress)); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequest)->abi_ReportSampleProgress(progress)); } template Windows::Media::Core::MediaStreamSourceSampleRequest impl_IMediaStreamSourceSampleRequestedEventArgs::Request() const { Windows::Media::Core::MediaStreamSourceSampleRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRequestedEventArgs)->get_Request(put_abi(value))); return value; } template void impl_IMediaStreamSourceSwitchStreamsRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IMediaStreamSourceSwitchStreamsRequestDeferral)->abi_Complete()); } template Windows::Media::Core::IMediaStreamDescriptor impl_IMediaStreamSourceSwitchStreamsRequest::OldStreamDescriptor() const { Windows::Media::Core::IMediaStreamDescriptor value; - check_hresult(static_cast(static_cast(*this))->get_OldStreamDescriptor(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSwitchStreamsRequest)->get_OldStreamDescriptor(put_abi(value))); return value; } template Windows::Media::Core::IMediaStreamDescriptor impl_IMediaStreamSourceSwitchStreamsRequest::NewStreamDescriptor() const { Windows::Media::Core::IMediaStreamDescriptor value; - check_hresult(static_cast(static_cast(*this))->get_NewStreamDescriptor(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSwitchStreamsRequest)->get_NewStreamDescriptor(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSourceSwitchStreamsRequestDeferral impl_IMediaStreamSourceSwitchStreamsRequest::GetDeferral() const { Windows::Media::Core::MediaStreamSourceSwitchStreamsRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSwitchStreamsRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Media::Core::MediaStreamSourceSwitchStreamsRequest impl_IMediaStreamSourceSwitchStreamsRequestedEventArgs::Request() const { Windows::Media::Core::MediaStreamSourceSwitchStreamsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSwitchStreamsRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaStreamSourceSampleRenderedEventArgs::SampleLag() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_SampleLag(put(value))); + check_hresult(WINRT_SHIM(IMediaStreamSourceSampleRenderedEventArgs)->get_SampleLag(put_abi(value))); return value; } -template bool impl_IMseStreamSourceStatics::IsContentTypeSupported(hstring_ref contentType) const +template bool impl_IMseStreamSourceStatics::IsContentTypeSupported(hstring_view contentType) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsContentTypeSupported(get(contentType), &value)); + check_hresult(WINRT_SHIM(IMseStreamSourceStatics)->abi_IsContentTypeSupported(get_abi(contentType), &value)); return value; } -template event_token impl_IMseStreamSource::Opened(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseStreamSource::Opened(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->add_Opened(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseStreamSource::Opened(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseStreamSource::Opened(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseStreamSource::remove_Opened, Opened(handler)); } template void impl_IMseStreamSource::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->remove_Opened(token)); } -template event_token impl_IMseStreamSource::Ended(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseStreamSource::Ended(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Ended(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->add_Ended(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseStreamSource::Ended(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseStreamSource::Ended(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseStreamSource::remove_Ended, Ended(handler)); } template void impl_IMseStreamSource::Ended(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Ended(token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->remove_Ended(token)); } -template event_token impl_IMseStreamSource::Closed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseStreamSource::Closed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->add_Closed(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseStreamSource::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseStreamSource::Closed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseStreamSource::remove_Closed, Closed(handler)); } template void impl_IMseStreamSource::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IMseStreamSource)->remove_Closed(token)); } template Windows::Media::Core::MseSourceBufferList impl_IMseStreamSource::SourceBuffers() const { Windows::Media::Core::MseSourceBufferList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceBuffers(put(value))); + check_hresult(WINRT_SHIM(IMseStreamSource)->get_SourceBuffers(put_abi(value))); return value; } template Windows::Media::Core::MseSourceBufferList impl_IMseStreamSource::ActiveSourceBuffers() const { Windows::Media::Core::MseSourceBufferList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActiveSourceBuffers(put(value))); + check_hresult(WINRT_SHIM(IMseStreamSource)->get_ActiveSourceBuffers(put_abi(value))); return value; } template Windows::Media::Core::MseReadyState impl_IMseStreamSource::ReadyState() const { Windows::Media::Core::MseReadyState value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadyState(&value)); + check_hresult(WINRT_SHIM(IMseStreamSource)->get_ReadyState(&value)); return value; } template Windows::Foundation::IReference impl_IMseStreamSource::Duration() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMseStreamSource)->get_Duration(put_abi(value))); return value; } -template void impl_IMseStreamSource::Duration(const Windows::Foundation::IReference & value) const +template void impl_IMseStreamSource::Duration(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IMseStreamSource)->put_Duration(get_abi(value))); } -template Windows::Media::Core::MseSourceBuffer impl_IMseStreamSource::AddSourceBuffer(hstring_ref mimeType) const +template Windows::Media::Core::MseSourceBuffer impl_IMseStreamSource::AddSourceBuffer(hstring_view mimeType) const { Windows::Media::Core::MseSourceBuffer buffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AddSourceBuffer(get(mimeType), put(buffer))); + check_hresult(WINRT_SHIM(IMseStreamSource)->abi_AddSourceBuffer(get_abi(mimeType), put_abi(buffer))); return buffer; } template void impl_IMseStreamSource::RemoveSourceBuffer(const Windows::Media::Core::MseSourceBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveSourceBuffer(get(buffer))); + check_hresult(WINRT_SHIM(IMseStreamSource)->abi_RemoveSourceBuffer(get_abi(buffer))); } template void impl_IMseStreamSource::EndOfStream(Windows::Media::Core::MseEndOfStreamStatus status) const { - check_hresult(static_cast(static_cast(*this))->abi_EndOfStream(status)); + check_hresult(WINRT_SHIM(IMseStreamSource)->abi_EndOfStream(status)); } -template event_token impl_IMseSourceBuffer::UpdateStarting(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBuffer::UpdateStarting(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UpdateStarting(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->add_UpdateStarting(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBuffer::UpdateStarting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBuffer::UpdateStarting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBuffer::remove_UpdateStarting, UpdateStarting(handler)); } template void impl_IMseSourceBuffer::UpdateStarting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UpdateStarting(token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->remove_UpdateStarting(token)); } -template event_token impl_IMseSourceBuffer::Updated(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBuffer::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->add_Updated(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBuffer::Updated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBuffer::Updated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBuffer::remove_Updated, Updated(handler)); } template void impl_IMseSourceBuffer::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->remove_Updated(token)); } -template event_token impl_IMseSourceBuffer::UpdateEnded(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBuffer::UpdateEnded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UpdateEnded(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->add_UpdateEnded(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBuffer::UpdateEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBuffer::UpdateEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBuffer::remove_UpdateEnded, UpdateEnded(handler)); } template void impl_IMseSourceBuffer::UpdateEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UpdateEnded(token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->remove_UpdateEnded(token)); } -template event_token impl_IMseSourceBuffer::ErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBuffer::ErrorOccurred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ErrorOccurred(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->add_ErrorOccurred(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBuffer::ErrorOccurred(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBuffer::ErrorOccurred(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBuffer::remove_ErrorOccurred, ErrorOccurred(handler)); } template void impl_IMseSourceBuffer::ErrorOccurred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ErrorOccurred(token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->remove_ErrorOccurred(token)); } -template event_token impl_IMseSourceBuffer::Aborted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBuffer::Aborted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Aborted(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->add_Aborted(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBuffer::Aborted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBuffer::Aborted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBuffer::remove_Aborted, Aborted(handler)); } template void impl_IMseSourceBuffer::Aborted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Aborted(token)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->remove_Aborted(token)); } template Windows::Media::Core::MseAppendMode impl_IMseSourceBuffer::Mode() const { Windows::Media::Core::MseAppendMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_Mode(&value)); return value; } template void impl_IMseSourceBuffer::Mode(Windows::Media::Core::MseAppendMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->put_Mode(value)); } template bool impl_IMseSourceBuffer::IsUpdating() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUpdating(&value)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_IsUpdating(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMseSourceBuffer::Buffered() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Buffered(put(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_Buffered(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMseSourceBuffer::TimestampOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TimestampOffset(put(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_TimestampOffset(put_abi(value))); return value; } template void impl_IMseSourceBuffer::TimestampOffset(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TimestampOffset(get(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->put_TimestampOffset(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMseSourceBuffer::AppendWindowStart() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_AppendWindowStart(put(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_AppendWindowStart(put_abi(value))); return value; } template void impl_IMseSourceBuffer::AppendWindowStart(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppendWindowStart(get(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->put_AppendWindowStart(get_abi(value))); } template Windows::Foundation::IReference impl_IMseSourceBuffer::AppendWindowEnd() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AppendWindowEnd(put(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->get_AppendWindowEnd(put_abi(value))); return value; } -template void impl_IMseSourceBuffer::AppendWindowEnd(const Windows::Foundation::IReference & value) const +template void impl_IMseSourceBuffer::AppendWindowEnd(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppendWindowEnd(get(value))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->put_AppendWindowEnd(get_abi(value))); } template void impl_IMseSourceBuffer::AppendBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendBuffer(get(buffer))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->abi_AppendBuffer(get_abi(buffer))); } template void impl_IMseSourceBuffer::AppendStream(const Windows::Storage::Streams::IInputStream & stream) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendStream(get(stream))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->abi_AppendStream(get_abi(stream))); } template void impl_IMseSourceBuffer::AppendStream(const Windows::Storage::Streams::IInputStream & stream, uint64_t maxSize) const { - check_hresult(static_cast(static_cast(*this))->abi_AppendStreamMaxSize(get(stream), maxSize)); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->abi_AppendStreamMaxSize(get_abi(stream), maxSize)); } template void impl_IMseSourceBuffer::Abort() const { - check_hresult(static_cast(static_cast(*this))->abi_Abort()); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->abi_Abort()); } -template void impl_IMseSourceBuffer::Remove(const Windows::Foundation::TimeSpan & start, const Windows::Foundation::IReference & end) const +template void impl_IMseSourceBuffer::Remove(const Windows::Foundation::TimeSpan & start, const optional & end) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(start), get(end))); + check_hresult(WINRT_SHIM(IMseSourceBuffer)->abi_Remove(get_abi(start), get_abi(end))); } -template event_token impl_IMseSourceBufferList::SourceBufferAdded(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBufferList::SourceBufferAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceBufferAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBufferList)->add_SourceBufferAdded(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBufferList::SourceBufferAdded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBufferList::SourceBufferAdded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBufferList::remove_SourceBufferAdded, SourceBufferAdded(handler)); } template void impl_IMseSourceBufferList::SourceBufferAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceBufferAdded(token)); + check_hresult(WINRT_SHIM(IMseSourceBufferList)->remove_SourceBufferAdded(token)); } -template event_token impl_IMseSourceBufferList::SourceBufferRemoved(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMseSourceBufferList::SourceBufferRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceBufferRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IMseSourceBufferList)->add_SourceBufferRemoved(get_abi(handler), &token)); return token; } -template event_revoker impl_IMseSourceBufferList::SourceBufferRemoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMseSourceBufferList::SourceBufferRemoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMseSourceBufferList::remove_SourceBufferRemoved, SourceBufferRemoved(handler)); } template void impl_IMseSourceBufferList::SourceBufferRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceBufferRemoved(token)); + check_hresult(WINRT_SHIM(IMseSourceBufferList)->remove_SourceBufferRemoved(token)); } template Windows::Foundation::Collections::IVectorView impl_IMseSourceBufferList::Buffers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Buffers(put(value))); + check_hresult(WINRT_SHIM(IMseSourceBufferList)->get_Buffers(put_abi(value))); return value; } template void impl_IHighDynamicRangeControl::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IHighDynamicRangeControl)->put_Enabled(value)); } template bool impl_IHighDynamicRangeControl::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IHighDynamicRangeControl)->get_Enabled(&value)); return value; } template Windows::Media::Core::HighDynamicRangeControl impl_ISceneAnalysisEffect::HighDynamicRangeAnalyzer() const { Windows::Media::Core::HighDynamicRangeControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HighDynamicRangeAnalyzer(put(value))); + check_hresult(WINRT_SHIM(ISceneAnalysisEffect)->get_HighDynamicRangeAnalyzer(put_abi(value))); return value; } template void impl_ISceneAnalysisEffect::DesiredAnalysisInterval(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredAnalysisInterval(get(value))); + check_hresult(WINRT_SHIM(ISceneAnalysisEffect)->put_DesiredAnalysisInterval(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISceneAnalysisEffect::DesiredAnalysisInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredAnalysisInterval(put(value))); + check_hresult(WINRT_SHIM(ISceneAnalysisEffect)->get_DesiredAnalysisInterval(put_abi(value))); return value; } template event_token impl_ISceneAnalysisEffect::SceneAnalyzed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_SceneAnalyzed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISceneAnalysisEffect)->add_SceneAnalyzed(get_abi(handler), &cookie)); return cookie; } @@ -5538,86 +5863,86 @@ template event_revoker impl_ISceneAnalysisEff template void impl_ISceneAnalysisEffect::SceneAnalyzed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SceneAnalyzed(cookie)); + check_hresult(WINRT_SHIM(ISceneAnalysisEffect)->remove_SceneAnalyzed(cookie)); } template double impl_IHighDynamicRangeOutput::Certainty() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Certainty(&value)); + check_hresult(WINRT_SHIM(IHighDynamicRangeOutput)->get_Certainty(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IHighDynamicRangeOutput::FrameControllers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FrameControllers(put(value))); + check_hresult(WINRT_SHIM(IHighDynamicRangeOutput)->get_FrameControllers(put_abi(value))); return value; } template Windows::Media::Capture::CapturedFrameControlValues impl_ISceneAnalysisEffectFrame::FrameControlValues() const { Windows::Media::Capture::CapturedFrameControlValues value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameControlValues(put(value))); + check_hresult(WINRT_SHIM(ISceneAnalysisEffectFrame)->get_FrameControlValues(put_abi(value))); return value; } template Windows::Media::Core::HighDynamicRangeOutput impl_ISceneAnalysisEffectFrame::HighDynamicRange() const { Windows::Media::Core::HighDynamicRangeOutput value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HighDynamicRange(put(value))); + check_hresult(WINRT_SHIM(ISceneAnalysisEffectFrame)->get_HighDynamicRange(put_abi(value))); return value; } template Windows::Media::Core::SceneAnalysisEffectFrame impl_ISceneAnalyzedEventArgs::ResultFrame() const { Windows::Media::Core::SceneAnalysisEffectFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResultFrame(put(value))); + check_hresult(WINRT_SHIM(ISceneAnalyzedEventArgs)->get_ResultFrame(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IFaceDetectionEffectFrame::DetectedFaces() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DetectedFaces(put(value))); + check_hresult(WINRT_SHIM(IFaceDetectionEffectFrame)->get_DetectedFaces(put_abi(value))); return value; } template Windows::Media::Core::FaceDetectionEffectFrame impl_IFaceDetectedEventArgs::ResultFrame() const { Windows::Media::Core::FaceDetectionEffectFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResultFrame(put(value))); + check_hresult(WINRT_SHIM(IFaceDetectedEventArgs)->get_ResultFrame(put_abi(value))); return value; } template void impl_IFaceDetectionEffect::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->put_Enabled(value)); } template bool impl_IFaceDetectionEffect::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->get_Enabled(&value)); return value; } template void impl_IFaceDetectionEffect::DesiredDetectionInterval(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredDetectionInterval(get(value))); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->put_DesiredDetectionInterval(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IFaceDetectionEffect::DesiredDetectionInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredDetectionInterval(put(value))); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->get_DesiredDetectionInterval(put_abi(value))); return value; } template event_token impl_IFaceDetectionEffect::FaceDetected(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_FaceDetected(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->add_FaceDetected(get_abi(handler), &cookie)); return cookie; } @@ -5628,56 +5953,56 @@ template event_revoker impl_IFaceDetectionEff template void impl_IFaceDetectionEffect::FaceDetected(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_FaceDetected(cookie)); + check_hresult(WINRT_SHIM(IFaceDetectionEffect)->remove_FaceDetected(cookie)); } template void impl_IFaceDetectionEffectDefinition::DetectionMode(Windows::Media::Core::FaceDetectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_DetectionMode(value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffectDefinition)->put_DetectionMode(value)); } template Windows::Media::Core::FaceDetectionMode impl_IFaceDetectionEffectDefinition::DetectionMode() const { Windows::Media::Core::FaceDetectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DetectionMode(&value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffectDefinition)->get_DetectionMode(&value)); return value; } template void impl_IFaceDetectionEffectDefinition::SynchronousDetectionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SynchronousDetectionEnabled(value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffectDefinition)->put_SynchronousDetectionEnabled(value)); } template bool impl_IFaceDetectionEffectDefinition::SynchronousDetectionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SynchronousDetectionEnabled(&value)); + check_hresult(WINRT_SHIM(IFaceDetectionEffectDefinition)->get_SynchronousDetectionEnabled(&value)); return value; } template Windows::Media::Core::VideoStabilizationEffectEnabledChangedReason impl_IVideoStabilizationEffectEnabledChangedEventArgs::Reason() const { Windows::Media::Core::VideoStabilizationEffectEnabledChangedReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IVideoStabilizationEffectEnabledChangedEventArgs)->get_Reason(&value)); return value; } template void impl_IVideoStabilizationEffect::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IVideoStabilizationEffect)->put_Enabled(value)); } template bool impl_IVideoStabilizationEffect::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IVideoStabilizationEffect)->get_Enabled(&value)); return value; } template event_token impl_IVideoStabilizationEffect::EnabledChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_EnabledChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IVideoStabilizationEffect)->add_EnabledChanged(get_abi(handler), &cookie)); return cookie; } @@ -5688,111 +6013,111 @@ template event_revoker impl_IVideoStabil template void impl_IVideoStabilizationEffect::EnabledChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_EnabledChanged(cookie)); + check_hresult(WINRT_SHIM(IVideoStabilizationEffect)->remove_EnabledChanged(cookie)); } template Windows::Media::Capture::VideoStreamConfiguration impl_IVideoStabilizationEffect::GetRecommendedStreamConfiguration(const Windows::Media::Devices::VideoDeviceController & controller, const Windows::Media::MediaProperties::VideoEncodingProperties & desiredProperties) const { Windows::Media::Capture::VideoStreamConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetRecommendedStreamConfiguration(get(controller), get(desiredProperties), put(value))); + check_hresult(WINRT_SHIM(IVideoStabilizationEffect)->abi_GetRecommendedStreamConfiguration(get_abi(controller), get_abi(desiredProperties), put_abi(value))); return value; } template HRESULT impl_IMediaSourceError::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IMediaSourceError)->get_ExtendedError(&value)); return value; } template Windows::Media::Core::MediaSourceError impl_IMediaSourceOpenOperationCompletedEventArgs::Error() const { Windows::Media::Core::MediaSourceError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Error(put(value))); + check_hresult(WINRT_SHIM(IMediaSourceOpenOperationCompletedEventArgs)->get_Error(put_abi(value))); return value; } template Windows::Media::Core::MediaSourceState impl_IMediaSourceStateChangedEventArgs::OldState() const { Windows::Media::Core::MediaSourceState value {}; - check_hresult(static_cast(static_cast(*this))->get_OldState(&value)); + check_hresult(WINRT_SHIM(IMediaSourceStateChangedEventArgs)->get_OldState(&value)); return value; } template Windows::Media::Core::MediaSourceState impl_IMediaSourceStateChangedEventArgs::NewState() const { Windows::Media::Core::MediaSourceState value {}; - check_hresult(static_cast(static_cast(*this))->get_NewState(&value)); + check_hresult(WINRT_SHIM(IMediaSourceStateChangedEventArgs)->get_NewState(&value)); return value; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromAdaptiveMediaSource(const Windows::Media::Streaming::Adaptive::AdaptiveMediaSource & mediaSource) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromAdaptiveMediaSource(get(mediaSource), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromAdaptiveMediaSource(get_abi(mediaSource), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromMediaStreamSource(const Windows::Media::Core::MediaStreamSource & mediaSource) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromMediaStreamSource(get(mediaSource), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromMediaStreamSource(get_abi(mediaSource), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromMseStreamSource(const Windows::Media::Core::MseStreamSource & mediaSource) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromMseStreamSource(get(mediaSource), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromMseStreamSource(get_abi(mediaSource), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromIMediaSource(const Windows::Media::Core::IMediaSource & mediaSource) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIMediaSource(get(mediaSource), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromIMediaSource(get_abi(mediaSource), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromStorageFile(const Windows::Storage::IStorageFile & file) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStorageFile(get(file), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromStorageFile(get_abi(file), put_abi(result))); return result; } -template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref contentType) const +template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view contentType) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStream(get(stream), get(contentType), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromStream(get_abi(stream), get_abi(contentType), put_abi(result))); return result; } -template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_ref contentType) const +template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_view contentType) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamReference(get(stream), get(contentType), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromStreamReference(get_abi(stream), get_abi(contentType), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics::CreateFromUri(const Windows::Foundation::Uri & uri) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUri(get(uri), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics)->abi_CreateFromUri(get_abi(uri), put_abi(result))); return result; } template Windows::Media::Core::MediaSource impl_IMediaSourceStatics2::CreateFromMediaBinder(const Windows::Media::Core::MediaBinder & binder) const { Windows::Media::Core::MediaSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromMediaBinder(get(binder), put(result))); + check_hresult(WINRT_SHIM(IMediaSourceStatics2)->abi_CreateFromMediaBinder(get_abi(binder), put_abi(result))); return result; } template event_token impl_IMediaBinder::Binding(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Binding(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBinder)->add_Binding(get_abi(handler), &token)); return token; } @@ -5803,78 +6128,78 @@ template event_revoker impl_IMediaBinder::Binding( template void impl_IMediaBinder::Binding(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Binding(token)); + check_hresult(WINRT_SHIM(IMediaBinder)->remove_Binding(token)); } template hstring impl_IMediaBinder::Token() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Token(put(value))); + check_hresult(WINRT_SHIM(IMediaBinder)->get_Token(put_abi(value))); return value; } -template void impl_IMediaBinder::Token(hstring_ref value) const +template void impl_IMediaBinder::Token(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Token(get(value))); + check_hresult(WINRT_SHIM(IMediaBinder)->put_Token(get_abi(value))); } template Windows::Media::Core::MediaSource impl_IMediaBinder::Source() const { Windows::Media::Core::MediaSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IMediaBinder)->get_Source(put_abi(value))); return value; } -template event_token impl_IMediaBindingEventArgs::Canceled(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaBindingEventArgs::Canceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Canceled(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->add_Canceled(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaBindingEventArgs::Canceled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaBindingEventArgs::Canceled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::IMediaBindingEventArgs::remove_Canceled, Canceled(handler)); } template void impl_IMediaBindingEventArgs::Canceled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Canceled(token)); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->remove_Canceled(token)); } template Windows::Media::Core::MediaBinder impl_IMediaBindingEventArgs::MediaBinder() const { Windows::Media::Core::MediaBinder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaBinder(put(value))); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->get_MediaBinder(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IMediaBindingEventArgs::GetDeferral() const { Windows::Foundation::Deferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IMediaBindingEventArgs::SetUri(const Windows::Foundation::Uri & uri) const { - check_hresult(static_cast(static_cast(*this))->abi_SetUri(get(uri))); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->abi_SetUri(get_abi(uri))); } -template void impl_IMediaBindingEventArgs::SetStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref contentType) const +template void impl_IMediaBindingEventArgs::SetStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view contentType) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStream(get(stream), get(contentType))); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->abi_SetStream(get_abi(stream), get_abi(contentType))); } -template void impl_IMediaBindingEventArgs::SetStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_ref contentType) const +template void impl_IMediaBindingEventArgs::SetStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_view contentType) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStreamReference(get(stream), get(contentType))); + check_hresult(WINRT_SHIM(IMediaBindingEventArgs)->abi_SetStreamReference(get_abi(stream), get_abi(contentType))); } template event_token impl_IMediaSource2::OpenOperationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OpenOperationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaSource2)->add_OpenOperationCompleted(get_abi(handler), &token)); return token; } @@ -5885,48 +6210,48 @@ template event_revoker impl_IMediaSource2::OpenOp template void impl_IMediaSource2::OpenOperationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OpenOperationCompleted(token)); + check_hresult(WINRT_SHIM(IMediaSource2)->remove_OpenOperationCompleted(token)); } template Windows::Foundation::Collections::ValueSet impl_IMediaSource2::CustomProperties() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CustomProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaSource2)->get_CustomProperties(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaSource2::Duration() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaSource2)->get_Duration(put_abi(value))); return value; } template bool impl_IMediaSource2::IsOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOpen(&value)); + check_hresult(WINRT_SHIM(IMediaSource2)->get_IsOpen(&value)); return value; } template Windows::Foundation::Collections::IObservableVector impl_IMediaSource2::ExternalTimedTextSources() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_ExternalTimedTextSources(put(value))); + check_hresult(WINRT_SHIM(IMediaSource2)->get_ExternalTimedTextSources(put_abi(value))); return value; } template Windows::Foundation::Collections::IObservableVector impl_IMediaSource2::ExternalTimedMetadataTracks() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_ExternalTimedMetadataTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaSource2)->get_ExternalTimedMetadataTracks(put_abi(value))); return value; } template event_token impl_IMediaSource3::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaSource3)->add_StateChanged(get_abi(handler), &token)); return token; } @@ -5937,544 +6262,544 @@ template event_revoker impl_IMediaSource3::StateC template void impl_IMediaSource3::StateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(token)); + check_hresult(WINRT_SHIM(IMediaSource3)->remove_StateChanged(token)); } template Windows::Media::Core::MediaSourceState impl_IMediaSource3::State() const { Windows::Media::Core::MediaSourceState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IMediaSource3)->get_State(&value)); return value; } template void impl_IMediaSource3::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IMediaSource3)->abi_Reset()); } template void impl_IMediaCue::StartTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(IMediaCue)->put_StartTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaCue::StartTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IMediaCue)->get_StartTime(put_abi(value))); return value; } template void impl_IMediaCue::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IMediaCue)->put_Duration(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaCue::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaCue)->get_Duration(put_abi(value))); return value; } -template void impl_IMediaCue::Id(hstring_ref value) const +template void impl_IMediaCue::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IMediaCue)->put_Id(get_abi(value))); } template hstring impl_IMediaCue::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMediaCue)->get_Id(put_abi(value))); return value; } template Windows::Media::Core::TimedTextRegion impl_ITimedTextCue::CueRegion() const { Windows::Media::Core::TimedTextRegion value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CueRegion(put(value))); + check_hresult(WINRT_SHIM(ITimedTextCue)->get_CueRegion(put_abi(value))); return value; } template void impl_ITimedTextCue::CueRegion(const Windows::Media::Core::TimedTextRegion & value) const { - check_hresult(static_cast(static_cast(*this))->put_CueRegion(get(value))); + check_hresult(WINRT_SHIM(ITimedTextCue)->put_CueRegion(get_abi(value))); } template Windows::Media::Core::TimedTextStyle impl_ITimedTextCue::CueStyle() const { Windows::Media::Core::TimedTextStyle value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CueStyle(put(value))); + check_hresult(WINRT_SHIM(ITimedTextCue)->get_CueStyle(put_abi(value))); return value; } template void impl_ITimedTextCue::CueStyle(const Windows::Media::Core::TimedTextStyle & value) const { - check_hresult(static_cast(static_cast(*this))->put_CueStyle(get(value))); + check_hresult(WINRT_SHIM(ITimedTextCue)->put_CueStyle(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ITimedTextCue::Lines() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Lines(put(value))); + check_hresult(WINRT_SHIM(ITimedTextCue)->get_Lines(put_abi(value))); return value; } template hstring impl_ITimedTextRegion::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_Name(put_abi(value))); return value; } -template void impl_ITimedTextRegion::Name(hstring_ref value) const +template void impl_ITimedTextRegion::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_Name(get_abi(value))); } template Windows::Media::Core::TimedTextPoint impl_ITimedTextRegion::Position() const { Windows::Media::Core::TimedTextPoint value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_Position(put_abi(value))); return value; } template void impl_ITimedTextRegion::Position(const Windows::Media::Core::TimedTextPoint & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_Position(get_abi(value))); } template Windows::Media::Core::TimedTextSize impl_ITimedTextRegion::Extent() const { Windows::Media::Core::TimedTextSize value {}; - check_hresult(static_cast(static_cast(*this))->get_Extent(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_Extent(put_abi(value))); return value; } template void impl_ITimedTextRegion::Extent(const Windows::Media::Core::TimedTextSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_Extent(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_Extent(get_abi(value))); } template Windows::UI::Color impl_ITimedTextRegion::Background() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Background(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_Background(put_abi(value))); return value; } template void impl_ITimedTextRegion::Background(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Background(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_Background(get_abi(value))); } template Windows::Media::Core::TimedTextWritingMode impl_ITimedTextRegion::WritingMode() const { Windows::Media::Core::TimedTextWritingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_WritingMode(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_WritingMode(&value)); return value; } template void impl_ITimedTextRegion::WritingMode(Windows::Media::Core::TimedTextWritingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_WritingMode(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_WritingMode(value)); } template Windows::Media::Core::TimedTextDisplayAlignment impl_ITimedTextRegion::DisplayAlignment() const { Windows::Media::Core::TimedTextDisplayAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayAlignment(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_DisplayAlignment(&value)); return value; } template void impl_ITimedTextRegion::DisplayAlignment(Windows::Media::Core::TimedTextDisplayAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayAlignment(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_DisplayAlignment(value)); } template Windows::Media::Core::TimedTextDouble impl_ITimedTextRegion::LineHeight() const { Windows::Media::Core::TimedTextDouble value {}; - check_hresult(static_cast(static_cast(*this))->get_LineHeight(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_LineHeight(put_abi(value))); return value; } template void impl_ITimedTextRegion::LineHeight(const Windows::Media::Core::TimedTextDouble & value) const { - check_hresult(static_cast(static_cast(*this))->put_LineHeight(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_LineHeight(get_abi(value))); } template bool impl_ITimedTextRegion::IsOverflowClipped() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOverflowClipped(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_IsOverflowClipped(&value)); return value; } template void impl_ITimedTextRegion::IsOverflowClipped(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOverflowClipped(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_IsOverflowClipped(value)); } template Windows::Media::Core::TimedTextPadding impl_ITimedTextRegion::Padding() const { Windows::Media::Core::TimedTextPadding value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_Padding(put_abi(value))); return value; } template void impl_ITimedTextRegion::Padding(const Windows::Media::Core::TimedTextPadding & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_Padding(get_abi(value))); } template Windows::Media::Core::TimedTextWrapping impl_ITimedTextRegion::TextWrapping() const { Windows::Media::Core::TimedTextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_TextWrapping(&value)); return value; } template void impl_ITimedTextRegion::TextWrapping(Windows::Media::Core::TimedTextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_TextWrapping(value)); } template int32_t impl_ITimedTextRegion::ZIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZIndex(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_ZIndex(&value)); return value; } template void impl_ITimedTextRegion::ZIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ZIndex(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_ZIndex(value)); } template Windows::Media::Core::TimedTextScrollMode impl_ITimedTextRegion::ScrollMode() const { Windows::Media::Core::TimedTextScrollMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollMode(&value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->get_ScrollMode(&value)); return value; } template void impl_ITimedTextRegion::ScrollMode(Windows::Media::Core::TimedTextScrollMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ScrollMode(value)); + check_hresult(WINRT_SHIM(ITimedTextRegion)->put_ScrollMode(value)); } template hstring impl_ITimedTextStyle::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_Name(put_abi(value))); return value; } -template void impl_ITimedTextStyle::Name(hstring_ref value) const +template void impl_ITimedTextStyle::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_Name(get_abi(value))); } template hstring impl_ITimedTextStyle::FontFamily() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_FontFamily(put_abi(value))); return value; } -template void impl_ITimedTextStyle::FontFamily(hstring_ref value) const +template void impl_ITimedTextStyle::FontFamily(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FontFamily(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_FontFamily(get_abi(value))); } template Windows::Media::Core::TimedTextDouble impl_ITimedTextStyle::FontSize() const { Windows::Media::Core::TimedTextDouble value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_FontSize(put_abi(value))); return value; } template void impl_ITimedTextStyle::FontSize(const Windows::Media::Core::TimedTextDouble & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontSize(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_FontSize(get_abi(value))); } template Windows::Media::Core::TimedTextWeight impl_ITimedTextStyle::FontWeight() const { Windows::Media::Core::TimedTextWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(&value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_FontWeight(&value)); return value; } template void impl_ITimedTextStyle::FontWeight(Windows::Media::Core::TimedTextWeight value) const { - check_hresult(static_cast(static_cast(*this))->put_FontWeight(value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_FontWeight(value)); } template Windows::UI::Color impl_ITimedTextStyle::Foreground() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Foreground(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_Foreground(put_abi(value))); return value; } template void impl_ITimedTextStyle::Foreground(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Foreground(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_Foreground(get_abi(value))); } template Windows::UI::Color impl_ITimedTextStyle::Background() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Background(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_Background(put_abi(value))); return value; } template void impl_ITimedTextStyle::Background(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Background(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_Background(get_abi(value))); } template bool impl_ITimedTextStyle::IsBackgroundAlwaysShown() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBackgroundAlwaysShown(&value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_IsBackgroundAlwaysShown(&value)); return value; } template void impl_ITimedTextStyle::IsBackgroundAlwaysShown(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsBackgroundAlwaysShown(value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_IsBackgroundAlwaysShown(value)); } template Windows::Media::Core::TimedTextFlowDirection impl_ITimedTextStyle::FlowDirection() const { Windows::Media::Core::TimedTextFlowDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_FlowDirection(&value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_FlowDirection(&value)); return value; } template void impl_ITimedTextStyle::FlowDirection(Windows::Media::Core::TimedTextFlowDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_FlowDirection(value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_FlowDirection(value)); } template Windows::Media::Core::TimedTextLineAlignment impl_ITimedTextStyle::LineAlignment() const { Windows::Media::Core::TimedTextLineAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_LineAlignment(&value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_LineAlignment(&value)); return value; } template void impl_ITimedTextStyle::LineAlignment(Windows::Media::Core::TimedTextLineAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_LineAlignment(value)); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_LineAlignment(value)); } template Windows::UI::Color impl_ITimedTextStyle::OutlineColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_OutlineColor(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_OutlineColor(put_abi(value))); return value; } template void impl_ITimedTextStyle::OutlineColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutlineColor(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_OutlineColor(get_abi(value))); } template Windows::Media::Core::TimedTextDouble impl_ITimedTextStyle::OutlineThickness() const { Windows::Media::Core::TimedTextDouble value {}; - check_hresult(static_cast(static_cast(*this))->get_OutlineThickness(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_OutlineThickness(put_abi(value))); return value; } template void impl_ITimedTextStyle::OutlineThickness(const Windows::Media::Core::TimedTextDouble & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutlineThickness(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_OutlineThickness(get_abi(value))); } template Windows::Media::Core::TimedTextDouble impl_ITimedTextStyle::OutlineRadius() const { Windows::Media::Core::TimedTextDouble value {}; - check_hresult(static_cast(static_cast(*this))->get_OutlineRadius(put(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->get_OutlineRadius(put_abi(value))); return value; } template void impl_ITimedTextStyle::OutlineRadius(const Windows::Media::Core::TimedTextDouble & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutlineRadius(get(value))); + check_hresult(WINRT_SHIM(ITimedTextStyle)->put_OutlineRadius(get_abi(value))); } template int32_t impl_ITimedTextSubformat::StartIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartIndex(&value)); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->get_StartIndex(&value)); return value; } template void impl_ITimedTextSubformat::StartIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_StartIndex(value)); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->put_StartIndex(value)); } template int32_t impl_ITimedTextSubformat::Length() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->get_Length(&value)); return value; } template void impl_ITimedTextSubformat::Length(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Length(value)); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->put_Length(value)); } template Windows::Media::Core::TimedTextStyle impl_ITimedTextSubformat::SubformatStyle() const { Windows::Media::Core::TimedTextStyle value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SubformatStyle(put(value))); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->get_SubformatStyle(put_abi(value))); return value; } template void impl_ITimedTextSubformat::SubformatStyle(const Windows::Media::Core::TimedTextStyle & value) const { - check_hresult(static_cast(static_cast(*this))->put_SubformatStyle(get(value))); + check_hresult(WINRT_SHIM(ITimedTextSubformat)->put_SubformatStyle(get_abi(value))); } template hstring impl_ITimedTextLine::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ITimedTextLine)->get_Text(put_abi(value))); return value; } -template void impl_ITimedTextLine::Text(hstring_ref value) const +template void impl_ITimedTextLine::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(ITimedTextLine)->put_Text(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ITimedTextLine::Subformats() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Subformats(put(value))); + check_hresult(WINRT_SHIM(ITimedTextLine)->get_Subformats(put_abi(value))); return value; } -template event_token impl_ISingleSelectMediaTrackList::SelectedIndexChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ISingleSelectMediaTrackList::SelectedIndexChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectedIndexChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISingleSelectMediaTrackList)->add_SelectedIndexChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ISingleSelectMediaTrackList::SelectedIndexChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ISingleSelectMediaTrackList::SelectedIndexChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Core::ISingleSelectMediaTrackList::remove_SelectedIndexChanged, SelectedIndexChanged(handler)); } template void impl_ISingleSelectMediaTrackList::SelectedIndexChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectedIndexChanged(token)); + check_hresult(WINRT_SHIM(ISingleSelectMediaTrackList)->remove_SelectedIndexChanged(token)); } template void impl_ISingleSelectMediaTrackList::SelectedIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedIndex(value)); + check_hresult(WINRT_SHIM(ISingleSelectMediaTrackList)->put_SelectedIndex(value)); } template int32_t impl_ISingleSelectMediaTrackList::SelectedIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndex(&value)); + check_hresult(WINRT_SHIM(ISingleSelectMediaTrackList)->get_SelectedIndex(&value)); return value; } template hstring impl_IMediaTrack::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMediaTrack)->get_Id(put_abi(value))); return value; } template hstring impl_IMediaTrack::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IMediaTrack)->get_Language(put_abi(value))); return value; } template Windows::Media::Core::MediaTrackKind impl_IMediaTrack::TrackKind() const { Windows::Media::Core::MediaTrackKind value {}; - check_hresult(static_cast(static_cast(*this))->get_TrackKind(&value)); + check_hresult(WINRT_SHIM(IMediaTrack)->get_TrackKind(&value)); return value; } -template void impl_IMediaTrack::Label(hstring_ref value) const +template void impl_IMediaTrack::Label(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Label(get(value))); + check_hresult(WINRT_SHIM(IMediaTrack)->put_Label(get_abi(value))); } template hstring impl_IMediaTrack::Label() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Label(put(value))); + check_hresult(WINRT_SHIM(IMediaTrack)->get_Label(put_abi(value))); return value; } template Windows::Media::Core::TimedMetadataTrackErrorCode impl_ITimedMetadataTrackError::ErrorCode() const { Windows::Media::Core::TimedMetadataTrackErrorCode value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(ITimedMetadataTrackError)->get_ErrorCode(&value)); return value; } template HRESULT impl_ITimedMetadataTrackError::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(ITimedMetadataTrackError)->get_ExtendedError(&value)); return value; } template Windows::Media::Core::IMediaCue impl_IMediaCueEventArgs::Cue() const { Windows::Media::Core::IMediaCue value; - check_hresult(static_cast(static_cast(*this))->get_Cue(put(value))); + check_hresult(WINRT_SHIM(IMediaCueEventArgs)->get_Cue(put_abi(value))); return value; } template Windows::Media::Core::TimedMetadataTrackError impl_ITimedMetadataTrackFailedEventArgs::Error() const { Windows::Media::Core::TimedMetadataTrackError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Error(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrackFailedEventArgs)->get_Error(put_abi(value))); return value; } template void impl_IDataCue::Data(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IDataCue)->put_Data(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_IDataCue::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IDataCue)->get_Data(put_abi(value))); return value; } -template Windows::Media::Core::TimedMetadataTrack impl_ITimedMetadataTrackFactory::Create(hstring_ref id, hstring_ref language, Windows::Media::Core::TimedMetadataKind kind) const +template Windows::Media::Core::TimedMetadataTrack impl_ITimedMetadataTrackFactory::Create(hstring_view id, hstring_view language, Windows::Media::Core::TimedMetadataKind kind) const { Windows::Media::Core::TimedMetadataTrack value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(id), get(language), kind, put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrackFactory)->abi_Create(get_abi(id), get_abi(language), kind, put_abi(value))); return value; } template event_token impl_ITimedMetadataTrack::CueEntered(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CueEntered(get(handler), &token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->add_CueEntered(get_abi(handler), &token)); return token; } @@ -6485,13 +6810,13 @@ template event_revoker impl_ITimedMetadataTrac template void impl_ITimedMetadataTrack::CueEntered(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CueEntered(token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->remove_CueEntered(token)); } template event_token impl_ITimedMetadataTrack::CueExited(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CueExited(get(handler), &token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->add_CueExited(get_abi(handler), &token)); return token; } @@ -6502,13 +6827,13 @@ template event_revoker impl_ITimedMetadataTrac template void impl_ITimedMetadataTrack::CueExited(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CueExited(token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->remove_CueExited(token)); } template event_token impl_ITimedMetadataTrack::TrackFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TrackFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->add_TrackFailed(get_abi(handler), &token)); return token; } @@ -6519,65 +6844,65 @@ template event_revoker impl_ITimedMetadataTrac template void impl_ITimedMetadataTrack::TrackFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TrackFailed(token)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->remove_TrackFailed(token)); } template Windows::Foundation::Collections::IVectorView impl_ITimedMetadataTrack::Cues() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Cues(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->get_Cues(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ITimedMetadataTrack::ActiveCues() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ActiveCues(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->get_ActiveCues(put_abi(value))); return value; } template Windows::Media::Core::TimedMetadataKind impl_ITimedMetadataTrack::TimedMetadataKind() const { Windows::Media::Core::TimedMetadataKind value {}; - check_hresult(static_cast(static_cast(*this))->get_TimedMetadataKind(&value)); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->get_TimedMetadataKind(&value)); return value; } template hstring impl_ITimedMetadataTrack::DispatchType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DispatchType(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->get_DispatchType(put_abi(value))); return value; } template void impl_ITimedMetadataTrack::AddCue(const Windows::Media::Core::IMediaCue & cue) const { - check_hresult(static_cast(static_cast(*this))->abi_AddCue(get(cue))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->abi_AddCue(get_abi(cue))); } template void impl_ITimedMetadataTrack::RemoveCue(const Windows::Media::Core::IMediaCue & cue) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveCue(get(cue))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack)->abi_RemoveCue(get_abi(cue))); } template Windows::Media::Core::TimedMetadataTrackError impl_ITimedTextSourceResolveResultEventArgs::Error() const { Windows::Media::Core::TimedMetadataTrackError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Error(put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceResolveResultEventArgs)->get_Error(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ITimedTextSourceResolveResultEventArgs::Tracks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Tracks(put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceResolveResultEventArgs)->get_Tracks(put_abi(value))); return value; } template event_token impl_ITimedTextSource::Resolved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Resolved(get(handler), &token)); + check_hresult(WINRT_SHIM(ITimedTextSource)->add_Resolved(get_abi(handler), &token)); return token; } @@ -6588,97 +6913,97 @@ template event_revoker impl_ITimedTextSource:: template void impl_ITimedTextSource::Resolved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Resolved(token)); + check_hresult(WINRT_SHIM(ITimedTextSource)->remove_Resolved(token)); } template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Media::Core::TimedTextSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStream(get(stream), put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceStatics)->abi_CreateFromStream(get_abi(stream), put_abi(value))); return value; } template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromUri(const Windows::Foundation::Uri & uri) const { Windows::Media::Core::TimedTextSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUri(get(uri), put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceStatics)->abi_CreateFromUri(get_abi(uri), put_abi(value))); return value; } -template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref defaultLanguage) const +template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view defaultLanguage) const { Windows::Media::Core::TimedTextSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamWithLanguage(get(stream), get(defaultLanguage), put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceStatics)->abi_CreateFromStreamWithLanguage(get_abi(stream), get_abi(defaultLanguage), put_abi(value))); return value; } -template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromUri(const Windows::Foundation::Uri & uri, hstring_ref defaultLanguage) const +template Windows::Media::Core::TimedTextSource impl_ITimedTextSourceStatics::CreateFromUri(const Windows::Foundation::Uri & uri, hstring_view defaultLanguage) const { Windows::Media::Core::TimedTextSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUriWithLanguage(get(uri), get(defaultLanguage), put(value))); + check_hresult(WINRT_SHIM(ITimedTextSourceStatics)->abi_CreateFromUriWithLanguage(get_abi(uri), get_abi(defaultLanguage), put_abi(value))); return value; } template Windows::Media::Core::MediaDecoderStatus impl_IVideoTrackSupportInfo::DecoderStatus() const { Windows::Media::Core::MediaDecoderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_DecoderStatus(&value)); + check_hresult(WINRT_SHIM(IVideoTrackSupportInfo)->get_DecoderStatus(&value)); return value; } template Windows::Media::Core::MediaSourceStatus impl_IVideoTrackSupportInfo::MediaSourceStatus() const { Windows::Media::Core::MediaSourceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaSourceStatus(&value)); + check_hresult(WINRT_SHIM(IVideoTrackSupportInfo)->get_MediaSourceStatus(&value)); return value; } template Windows::Media::Core::MediaDecoderStatus impl_IAudioTrackSupportInfo::DecoderStatus() const { Windows::Media::Core::MediaDecoderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_DecoderStatus(&value)); + check_hresult(WINRT_SHIM(IAudioTrackSupportInfo)->get_DecoderStatus(&value)); return value; } template Windows::Media::Core::AudioDecoderDegradation impl_IAudioTrackSupportInfo::Degradation() const { Windows::Media::Core::AudioDecoderDegradation value {}; - check_hresult(static_cast(static_cast(*this))->get_Degradation(&value)); + check_hresult(WINRT_SHIM(IAudioTrackSupportInfo)->get_Degradation(&value)); return value; } template Windows::Media::Core::AudioDecoderDegradationReason impl_IAudioTrackSupportInfo::DegradationReason() const { Windows::Media::Core::AudioDecoderDegradationReason value {}; - check_hresult(static_cast(static_cast(*this))->get_DegradationReason(&value)); + check_hresult(WINRT_SHIM(IAudioTrackSupportInfo)->get_DegradationReason(&value)); return value; } template Windows::Media::Core::MediaSourceStatus impl_IAudioTrackSupportInfo::MediaSourceStatus() const { Windows::Media::Core::MediaSourceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaSourceStatus(&value)); + check_hresult(WINRT_SHIM(IAudioTrackSupportInfo)->get_MediaSourceStatus(&value)); return value; } template HRESULT impl_IVideoTrackOpenFailedEventArgs::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IVideoTrackOpenFailedEventArgs)->get_ExtendedError(&value)); return value; } template HRESULT impl_IAudioTrackOpenFailedEventArgs::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IAudioTrackOpenFailedEventArgs)->get_ExtendedError(&value)); return value; } template event_token impl_IVideoTrack::OpenFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OpenFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(IVideoTrack)->add_OpenFailed(get_abi(handler), &token)); return token; } @@ -6689,41 +7014,41 @@ template event_revoker impl_IVideoTrack::OpenFailed template void impl_IVideoTrack::OpenFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OpenFailed(token)); + check_hresult(WINRT_SHIM(IVideoTrack)->remove_OpenFailed(token)); } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoTrack::GetEncodingProperties() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IVideoTrack)->abi_GetEncodingProperties(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IVideoTrack::PlaybackItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackItem(put(value))); + check_hresult(WINRT_SHIM(IVideoTrack)->get_PlaybackItem(put_abi(value))); return value; } template hstring impl_IVideoTrack::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IVideoTrack)->get_Name(put_abi(value))); return value; } template Windows::Media::Core::VideoTrackSupportInfo impl_IVideoTrack::SupportInfo() const { Windows::Media::Core::VideoTrackSupportInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportInfo(put(value))); + check_hresult(WINRT_SHIM(IVideoTrack)->get_SupportInfo(put_abi(value))); return value; } template event_token impl_IAudioTrack::OpenFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OpenFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioTrack)->add_OpenFailed(get_abi(handler), &token)); return token; } @@ -6734,48 +7059,48 @@ template event_revoker impl_IAudioTrack::OpenFailed template void impl_IAudioTrack::OpenFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OpenFailed(token)); + check_hresult(WINRT_SHIM(IAudioTrack)->remove_OpenFailed(token)); } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioTrack::GetEncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IAudioTrack)->abi_GetEncodingProperties(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IAudioTrack::PlaybackItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackItem(put(value))); + check_hresult(WINRT_SHIM(IAudioTrack)->get_PlaybackItem(put_abi(value))); return value; } template hstring impl_IAudioTrack::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IAudioTrack)->get_Name(put_abi(value))); return value; } template Windows::Media::Core::AudioTrackSupportInfo impl_IAudioTrack::SupportInfo() const { Windows::Media::Core::AudioTrackSupportInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportInfo(put(value))); + check_hresult(WINRT_SHIM(IAudioTrack)->get_SupportInfo(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_ITimedMetadataTrack2::PlaybackItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackItem(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack2)->get_PlaybackItem(put_abi(value))); return value; } template hstring impl_ITimedMetadataTrack2::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataTrack2)->get_Name(put_abi(value))); return value; } @@ -6820,12 +7145,12 @@ inline Windows::Media::Core::MediaSource MediaSource::CreateFromStorageFile(cons return get_activation_factory().CreateFromStorageFile(file); } -inline Windows::Media::Core::MediaSource MediaSource::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref contentType) +inline Windows::Media::Core::MediaSource MediaSource::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view contentType) { return get_activation_factory().CreateFromStream(stream, contentType); } -inline Windows::Media::Core::MediaSource MediaSource::CreateFromStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_ref contentType) +inline Windows::Media::Core::MediaSource MediaSource::CreateFromStreamReference(const Windows::Storage::Streams::IRandomAccessStreamReference & stream, hstring_view contentType) { return get_activation_factory().CreateFromStreamReference(stream, contentType); } @@ -6862,7 +7187,7 @@ inline MseStreamSource::MseStreamSource() : MseStreamSource(activate_instance()) {} -inline bool MseStreamSource::IsContentTypeSupported(hstring_ref contentType) +inline bool MseStreamSource::IsContentTypeSupported(hstring_view contentType) { return get_activation_factory().IsContentTypeSupported(contentType); } @@ -6871,7 +7196,7 @@ inline SceneAnalysisEffectDefinition::SceneAnalysisEffectDefinition() : SceneAnalysisEffectDefinition(activate_instance()) {} -inline TimedMetadataTrack::TimedMetadataTrack(hstring_ref id, hstring_ref language, Windows::Media::Core::TimedMetadataKind kind) : +inline TimedMetadataTrack::TimedMetadataTrack(hstring_view id, hstring_view language, Windows::Media::Core::TimedMetadataKind kind) : TimedMetadataTrack(get_activation_factory().Create(id, language, kind)) {} @@ -6897,12 +7222,12 @@ inline Windows::Media::Core::TimedTextSource TimedTextSource::CreateFromUri(cons return get_activation_factory().CreateFromUri(uri); } -inline Windows::Media::Core::TimedTextSource TimedTextSource::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref defaultLanguage) +inline Windows::Media::Core::TimedTextSource TimedTextSource::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view defaultLanguage) { return get_activation_factory().CreateFromStream(stream, defaultLanguage); } -inline Windows::Media::Core::TimedTextSource TimedTextSource::CreateFromUri(const Windows::Foundation::Uri & uri, hstring_ref defaultLanguage) +inline Windows::Media::Core::TimedTextSource TimedTextSource::CreateFromUri(const Windows::Foundation::Uri & uri, hstring_view defaultLanguage) { return get_activation_factory().CreateFromUri(uri, defaultLanguage); } @@ -6926,3 +7251,1184 @@ inline VideoStreamDescriptor::VideoStreamDescriptor(const Windows::Media::MediaP } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioStreamDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioStreamDescriptor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioStreamDescriptorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioTrackOpenFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IAudioTrackSupportInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IDataCue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IFaceDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IFaceDetectionEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IFaceDetectionEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IFaceDetectionEffectFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IHighDynamicRangeControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IHighDynamicRangeOutput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaBinder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaBindingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaCue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaCueEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSource3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSourceError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSourceOpenOperationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSourceStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaSourceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSample & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSampleProtectionProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSampleStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceClosedRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSampleRenderedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSampleRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSampleRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSampleRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceStartingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceStartingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceStartingRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSwitchStreamsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSwitchStreamsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaStreamSourceSwitchStreamsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMediaTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMseSourceBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMseSourceBufferList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMseStreamSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IMseStreamSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ISceneAnalysisEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ISceneAnalysisEffectFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ISceneAnalyzedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ISingleSelectMediaTrackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedMetadataTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedMetadataTrack2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedMetadataTrackError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedMetadataTrackFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedMetadataTrackFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextCue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextRegion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextSourceResolveResultEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextStyle & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::ITimedTextSubformat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoStabilizationEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoStabilizationEffectEnabledChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoStreamDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoStreamDescriptorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoTrackOpenFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::IVideoTrackSupportInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::AudioStreamDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::AudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::AudioTrackOpenFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::AudioTrackSupportInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::DataCue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::FaceDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::FaceDetectionEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::FaceDetectionEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::FaceDetectionEffectFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::HighDynamicRangeControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::HighDynamicRangeOutput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaBinder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaBindingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaCueEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaSourceError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaSourceOpenOperationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaSourceStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSample & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSamplePropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSampleProtectionProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceClosedRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSampleRenderedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSampleRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSampleRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSampleRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceStartingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceStartingRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceStartingRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSwitchStreamsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSwitchStreamsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MediaStreamSourceSwitchStreamsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MseSourceBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MseSourceBufferList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::MseStreamSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::SceneAnalysisEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::SceneAnalysisEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::SceneAnalysisEffectFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::SceneAnalyzedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedMetadataTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedMetadataTrackError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedMetadataTrackFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextCue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextRegion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextSourceResolveResultEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextStyle & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::TimedTextSubformat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoStabilizationEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoStabilizationEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoStabilizationEffectEnabledChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoStreamDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoTrackOpenFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Core::VideoTrackSupportInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Devices.Core.h b/10.0.14393.0/winrt/Windows.Media.Devices.Core.h index 111ecad88..92bbb8904 100644 --- a/10.0.14393.0/winrt/Windows.Media.Devices.Core.h +++ b/10.0.14393.0/winrt/Windows.Media.Devices.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.MediaProperties.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FocalLength(abi_arg_out value) noexcept override + HRESULT __stdcall get_FocalLength(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocalLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocalLength()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_PrincipalPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrincipalPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrincipalPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrincipalPoint()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_RadialDistortion(abi_arg_out value) noexcept override + HRESULT __stdcall get_RadialDistortion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RadialDistortion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RadialDistortion()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_TangentialDistortion(abi_arg_out value) noexcept override + HRESULT __stdcall get_TangentialDistortion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TangentialDistortion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TangentialDistortion()); return S_OK; } catch (...) @@ -74,7 +81,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ImageWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageWidth()); return S_OK; } catch (...) @@ -87,7 +95,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ImageHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageHeight()); return S_OK; } catch (...) @@ -96,11 +105,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ProjectOntoFrame(abi_arg_in coordinate, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ProjectOntoFrame(impl::abi_arg_in coordinate, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ProjectOntoFrame(*reinterpret_cast(&coordinate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProjectOntoFrame(*reinterpret_cast(&coordinate))); return S_OK; } catch (...) @@ -109,11 +119,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_UnprojectAtUnitDepth(abi_arg_in pixelCoordinate, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnprojectAtUnitDepth(impl::abi_arg_in pixelCoordinate, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnprojectAtUnitDepth(*reinterpret_cast(&pixelCoordinate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprojectAtUnitDepth(*reinterpret_cast(&pixelCoordinate))); return S_OK; } catch (...) @@ -122,10 +133,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ProjectManyOntoFrame(uint32_t __coordinatesSize, abi_arg_in * coordinates, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_ProjectManyOntoFrame(uint32_t __coordinatesSize, impl::abi_arg_in * coordinates, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProjectManyOntoFrame(*reinterpret_cast(&coordinates), *results); return S_OK; } @@ -135,10 +147,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_UnprojectPixelsAtUnitDepth(uint32_t __pixelCoordinatesSize, abi_arg_in * pixelCoordinates, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_UnprojectPixelsAtUnitDepth(uint32_t __pixelCoordinatesSize, impl::abi_arg_in * pixelCoordinates, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnprojectPixelsAtUnitDepth(*reinterpret_cast(&pixelCoordinates), *results); return S_OK; } @@ -152,11 +165,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_UndistortedProjectionTransform(abi_arg_out value) noexcept override + HRESULT __stdcall get_UndistortedProjectionTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UndistortedProjectionTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndistortedProjectionTransform()); return S_OK; } catch (...) @@ -165,11 +179,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_DistortPoint(abi_arg_in input, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DistortPoint(impl::abi_arg_in input, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DistortPoint(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DistortPoint(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -178,10 +193,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_DistortPoints(uint32_t __inputsSize, abi_arg_in * inputs, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_DistortPoints(uint32_t __inputsSize, impl::abi_arg_in * inputs, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DistortPoints(*reinterpret_cast(&inputs), *results); return S_OK; } @@ -191,11 +207,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_UndistortPoint(abi_arg_in input, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UndistortPoint(impl::abi_arg_in input, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UndistortPoint(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UndistortPoint(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -204,10 +221,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_UndistortPoints(uint32_t __inputsSize, abi_arg_in * inputs, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_UndistortPoints(uint32_t __inputsSize, impl::abi_arg_in * inputs, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UndistortPoints(*reinterpret_cast(&inputs), *results); return S_OK; } @@ -221,11 +239,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in focalLength, abi_arg_in principalPoint, abi_arg_in radialDistortion, abi_arg_in tangentialDistortion, uint32_t imageWidth, uint32_t imageHeight, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in focalLength, impl::abi_arg_in principalPoint, impl::abi_arg_in radialDistortion, impl::abi_arg_in tangentialDistortion, uint32_t imageWidth, uint32_t imageHeight, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&focalLength), *reinterpret_cast(&principalPoint), *reinterpret_cast(&radialDistortion), *reinterpret_cast(&tangentialDistortion), imageWidth, imageHeight)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&focalLength), *reinterpret_cast(&principalPoint), *reinterpret_cast(&radialDistortion), *reinterpret_cast(&tangentialDistortion), imageWidth, imageHeight)); return S_OK; } catch (...) @@ -239,11 +258,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_UnprojectPoint(abi_arg_in sourcePoint, abi_arg_in targetCoordinateSystem, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnprojectPoint(impl::abi_arg_in sourcePoint, impl::abi_arg_in targetCoordinateSystem, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnprojectPoint(*reinterpret_cast(&sourcePoint), *reinterpret_cast(&targetCoordinateSystem))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprojectPoint(*reinterpret_cast(&sourcePoint), *reinterpret_cast(&targetCoordinateSystem))); return S_OK; } catch (...) @@ -252,10 +272,11 @@ struct produce * sourcePoints, abi_arg_in targetCoordinateSystem, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_UnprojectPoints(uint32_t __sourcePointsSize, impl::abi_arg_in * sourcePoints, impl::abi_arg_in targetCoordinateSystem, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UnprojectPoints(*reinterpret_cast(&sourcePoints), *reinterpret_cast(&targetCoordinateSystem), *results); return S_OK; } @@ -265,11 +286,12 @@ struct produce sourcePoint, abi_arg_in targetCoordinateSystem, abi_arg_in targetCameraIntrinsics, abi_arg_out result) noexcept override + HRESULT __stdcall abi_MapPoint(impl::abi_arg_in sourcePoint, impl::abi_arg_in targetCoordinateSystem, impl::abi_arg_in targetCameraIntrinsics, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().MapPoint(*reinterpret_cast(&sourcePoint), *reinterpret_cast(&targetCoordinateSystem), *reinterpret_cast(&targetCameraIntrinsics))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().MapPoint(*reinterpret_cast(&sourcePoint), *reinterpret_cast(&targetCoordinateSystem), *reinterpret_cast(&targetCameraIntrinsics))); return S_OK; } catch (...) @@ -278,10 +300,11 @@ struct produce * sourcePoints, abi_arg_in targetCoordinateSystem, abi_arg_in targetCameraIntrinsics, uint32_t __resultsSize, abi_arg_out results) noexcept override + HRESULT __stdcall abi_MapPoints(uint32_t __sourcePointsSize, impl::abi_arg_in * sourcePoints, impl::abi_arg_in targetCoordinateSystem, impl::abi_arg_in targetCameraIntrinsics, uint32_t __resultsSize, impl::abi_arg_out results) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MapPoints(*reinterpret_cast(&sourcePoints), *reinterpret_cast(&targetCoordinateSystem), *reinterpret_cast(&targetCameraIntrinsics), *results); return S_OK; } @@ -295,11 +318,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Exposure(abi_arg_out value) noexcept override + HRESULT __stdcall get_Exposure(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Exposure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exposure()); return S_OK; } catch (...) @@ -309,11 +333,12 @@ struct produce : pr } } - HRESULT __stdcall get_ExposureCompensation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExposureCompensation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureCompensation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensation()); return S_OK; } catch (...) @@ -323,11 +348,12 @@ struct produce : pr } } - HRESULT __stdcall get_IsoSpeed(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsoSpeed(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsoSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoSpeed()); return S_OK; } catch (...) @@ -337,11 +363,12 @@ struct produce : pr } } - HRESULT __stdcall get_Focus(abi_arg_out value) noexcept override + HRESULT __stdcall get_Focus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Focus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Focus()); return S_OK; } catch (...) @@ -355,7 +382,8 @@ struct produce : pr { try { - *value = detach(this->shim().PhotoConfirmationSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoConfirmationSupported()); return S_OK; } catch (...) @@ -368,11 +396,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Flash(abi_arg_out value) noexcept override + HRESULT __stdcall get_Flash(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Flash()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flash()); return S_OK; } catch (...) @@ -386,11 +415,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_ExposureControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExposureControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureControl()); return S_OK; } catch (...) @@ -400,11 +430,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ExposureCompensationControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExposureCompensationControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureCompensationControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensationControl()); return S_OK; } catch (...) @@ -414,11 +445,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_IsoSpeedControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsoSpeedControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsoSpeedControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoSpeedControl()); return S_OK; } catch (...) @@ -428,11 +460,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_FocusControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_FocusControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusControl()); return S_OK; } catch (...) @@ -442,11 +475,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_PhotoConfirmationEnabled(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PhotoConfirmationEnabled(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PhotoConfirmationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoConfirmationEnabled()); return S_OK; } catch (...) @@ -456,10 +490,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_PhotoConfirmationEnabled(abi_arg_in> value) noexcept override + HRESULT __stdcall put_PhotoConfirmationEnabled(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotoConfirmationEnabled(*reinterpret_cast *>(&value)); return S_OK; } @@ -473,11 +508,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_FlashControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_FlashControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlashControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlashControl()); return S_OK; } catch (...) @@ -495,7 +531,8 @@ struct produce : p { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -504,11 +541,12 @@ struct produce : p } } - HRESULT __stdcall get_Min(abi_arg_out value) noexcept override + HRESULT __stdcall get_Min(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -517,11 +555,12 @@ struct produce : p } } - HRESULT __stdcall get_Max(abi_arg_out value) noexcept override + HRESULT __stdcall get_Max(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -530,11 +569,12 @@ struct produce : p } } - HRESULT __stdcall get_Step(abi_arg_out value) noexcept override + HRESULT __stdcall get_Step(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -551,7 +591,8 @@ struct produceshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -564,7 +605,8 @@ struct produceshim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -577,7 +619,8 @@ struct produceshim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -590,7 +633,8 @@ struct produceshim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -603,11 +647,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -617,10 +662,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast *>(&value)); return S_OK; } @@ -638,7 +684,8 @@ struct produce : produc { try { - *value = detach(this->shim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -651,6 +698,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Auto(value); return S_OK; } @@ -660,11 +708,12 @@ struct produce : produc } } - HRESULT __stdcall get_Value(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -674,10 +723,11 @@ struct produce : produc } } - HRESULT __stdcall put_Value(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast *>(&value)); return S_OK; } @@ -695,7 +745,8 @@ struct produce : prod { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -708,7 +759,8 @@ struct produce : prod { try { - *value = detach(this->shim().RedEyeReductionSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedEyeReductionSupported()); return S_OK; } catch (...) @@ -721,7 +773,8 @@ struct produce : prod { try { - *value = detach(this->shim().PowerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSupported()); return S_OK; } catch (...) @@ -738,7 +791,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -751,6 +805,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -764,7 +819,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -777,6 +833,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Auto(value); return S_OK; } @@ -790,7 +847,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().RedEyeReduction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedEyeReduction()); return S_OK; } catch (...) @@ -803,6 +861,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().RedEyeReduction(value); return S_OK; } @@ -816,7 +875,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PowerPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerPercent()); return S_OK; } catch (...) @@ -829,6 +889,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().PowerPercent(value); return S_OK; } @@ -846,7 +907,8 @@ struct produce : prod { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -859,7 +921,8 @@ struct produce : prod { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -872,7 +935,8 @@ struct produce : prod { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -885,7 +949,8 @@ struct produce : prod { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -898,11 +963,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -912,10 +978,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Value(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast *>(&value)); return S_OK; } @@ -933,7 +1000,8 @@ struct produce : p { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -946,7 +1014,8 @@ struct produce : p { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -959,7 +1028,8 @@ struct produce : p { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -972,7 +1042,8 @@ struct produce : p { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -989,7 +1060,8 @@ struct produce : produc { try { - *value = detach(this->shim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -1002,6 +1074,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Auto(value); return S_OK; } @@ -1011,11 +1084,12 @@ struct produce : produc } } - HRESULT __stdcall get_Value(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1025,10 +1099,11 @@ struct produce : produc } } - HRESULT __stdcall put_Value(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast *>(&value)); return S_OK; } @@ -1046,7 +1121,8 @@ struct produceshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1059,7 +1135,8 @@ struct produceshim().MaxPhotosPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPhotosPerSecond()); return S_OK; } catch (...) @@ -1072,7 +1149,8 @@ struct produceshim().PhotosPerSecondLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosPerSecondLimit()); return S_OK; } catch (...) @@ -1085,6 +1163,7 @@ struct produceshim()); this->shim().PhotosPerSecondLimit(value); return S_OK; } @@ -1094,11 +1173,12 @@ struct produce captureProperties, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetHighestConcurrentFrameRate(impl::abi_arg_in captureProperties, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); return S_OK; } catch (...) @@ -1108,11 +1188,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetCurrentFrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentFrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentFrameRate()); return S_OK; } catch (...) @@ -1122,11 +1203,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FrameCapabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameCapabilities()); return S_OK; } catch (...) @@ -1136,11 +1218,12 @@ struct produce> items) noexcept override + HRESULT __stdcall get_DesiredFrameControllers(impl::abi_arg_out> items) noexcept override { try { - *items = detach(this->shim().DesiredFrameControllers()); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().DesiredFrameControllers()); return S_OK; } catch (...) @@ -1158,525 +1241,525 @@ namespace Windows::Media::Devices::Core { template bool impl_IFrameExposureCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFrameExposureCapabilities)->get_Supported(&value)); return value; } template Windows::Foundation::TimeSpan impl_IFrameExposureCapabilities::Min() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(put(value))); + check_hresult(WINRT_SHIM(IFrameExposureCapabilities)->get_Min(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IFrameExposureCapabilities::Max() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(put(value))); + check_hresult(WINRT_SHIM(IFrameExposureCapabilities)->get_Max(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IFrameExposureCapabilities::Step() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(put(value))); + check_hresult(WINRT_SHIM(IFrameExposureCapabilities)->get_Step(put_abi(value))); return value; } template bool impl_IFrameExposureCompensationCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFrameExposureCompensationCapabilities)->get_Supported(&value)); return value; } template float impl_IFrameExposureCompensationCapabilities::Min() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IFrameExposureCompensationCapabilities)->get_Min(&value)); return value; } template float impl_IFrameExposureCompensationCapabilities::Max() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IFrameExposureCompensationCapabilities)->get_Max(&value)); return value; } template float impl_IFrameExposureCompensationCapabilities::Step() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IFrameExposureCompensationCapabilities)->get_Step(&value)); return value; } template bool impl_IFrameIsoSpeedCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedCapabilities)->get_Supported(&value)); return value; } template uint32_t impl_IFrameIsoSpeedCapabilities::Min() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedCapabilities)->get_Min(&value)); return value; } template uint32_t impl_IFrameIsoSpeedCapabilities::Max() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedCapabilities)->get_Max(&value)); return value; } template uint32_t impl_IFrameIsoSpeedCapabilities::Step() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedCapabilities)->get_Step(&value)); return value; } template bool impl_IFrameFocusCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFrameFocusCapabilities)->get_Supported(&value)); return value; } template uint32_t impl_IFrameFocusCapabilities::Min() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IFrameFocusCapabilities)->get_Min(&value)); return value; } template uint32_t impl_IFrameFocusCapabilities::Max() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IFrameFocusCapabilities)->get_Max(&value)); return value; } template uint32_t impl_IFrameFocusCapabilities::Step() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IFrameFocusCapabilities)->get_Step(&value)); return value; } template bool impl_IFrameFlashCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFrameFlashCapabilities)->get_Supported(&value)); return value; } template bool impl_IFrameFlashCapabilities::RedEyeReductionSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RedEyeReductionSupported(&value)); + check_hresult(WINRT_SHIM(IFrameFlashCapabilities)->get_RedEyeReductionSupported(&value)); return value; } template bool impl_IFrameFlashCapabilities::PowerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSupported(&value)); + check_hresult(WINRT_SHIM(IFrameFlashCapabilities)->get_PowerSupported(&value)); return value; } template Windows::Media::Devices::Core::FrameExposureCapabilities impl_IFrameControlCapabilities::Exposure() const { Windows::Media::Devices::Core::FrameExposureCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Exposure(put(value))); + check_hresult(WINRT_SHIM(IFrameControlCapabilities)->get_Exposure(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameExposureCompensationCapabilities impl_IFrameControlCapabilities::ExposureCompensation() const { Windows::Media::Devices::Core::FrameExposureCompensationCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensation(put(value))); + check_hresult(WINRT_SHIM(IFrameControlCapabilities)->get_ExposureCompensation(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameIsoSpeedCapabilities impl_IFrameControlCapabilities::IsoSpeed() const { Windows::Media::Devices::Core::FrameIsoSpeedCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsoSpeed(put(value))); + check_hresult(WINRT_SHIM(IFrameControlCapabilities)->get_IsoSpeed(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameFocusCapabilities impl_IFrameControlCapabilities::Focus() const { Windows::Media::Devices::Core::FrameFocusCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Focus(put(value))); + check_hresult(WINRT_SHIM(IFrameControlCapabilities)->get_Focus(put_abi(value))); return value; } template bool impl_IFrameControlCapabilities::PhotoConfirmationSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotoConfirmationSupported(&value)); + check_hresult(WINRT_SHIM(IFrameControlCapabilities)->get_PhotoConfirmationSupported(&value)); return value; } template Windows::Media::Devices::Core::FrameFlashCapabilities impl_IFrameControlCapabilities2::Flash() const { Windows::Media::Devices::Core::FrameFlashCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Flash(put(value))); + check_hresult(WINRT_SHIM(IFrameControlCapabilities2)->get_Flash(put_abi(value))); return value; } template bool impl_IFrameExposureControl::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IFrameExposureControl)->get_Auto(&value)); return value; } template void impl_IFrameExposureControl::Auto(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Auto(value)); + check_hresult(WINRT_SHIM(IFrameExposureControl)->put_Auto(value)); } template Windows::Foundation::IReference impl_IFrameExposureControl::Value() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IFrameExposureControl)->get_Value(put_abi(value))); return value; } -template void impl_IFrameExposureControl::Value(const Windows::Foundation::IReference & value) const +template void impl_IFrameExposureControl::Value(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IFrameExposureControl)->put_Value(get_abi(value))); } template Windows::Foundation::IReference impl_IFrameExposureCompensationControl::Value() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IFrameExposureCompensationControl)->get_Value(put_abi(value))); return value; } -template void impl_IFrameExposureCompensationControl::Value(const Windows::Foundation::IReference & value) const +template void impl_IFrameExposureCompensationControl::Value(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IFrameExposureCompensationControl)->put_Value(get_abi(value))); } template bool impl_IFrameIsoSpeedControl::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedControl)->get_Auto(&value)); return value; } template void impl_IFrameIsoSpeedControl::Auto(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Auto(value)); + check_hresult(WINRT_SHIM(IFrameIsoSpeedControl)->put_Auto(value)); } template Windows::Foundation::IReference impl_IFrameIsoSpeedControl::Value() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IFrameIsoSpeedControl)->get_Value(put_abi(value))); return value; } -template void impl_IFrameIsoSpeedControl::Value(const Windows::Foundation::IReference & value) const +template void impl_IFrameIsoSpeedControl::Value(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IFrameIsoSpeedControl)->put_Value(get_abi(value))); } template Windows::Foundation::IReference impl_IFrameFocusControl::Value() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IFrameFocusControl)->get_Value(put_abi(value))); return value; } -template void impl_IFrameFocusControl::Value(const Windows::Foundation::IReference & value) const +template void impl_IFrameFocusControl::Value(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IFrameFocusControl)->put_Value(get_abi(value))); } template Windows::Media::Devices::Core::FrameFlashMode impl_IFrameFlashControl::Mode() const { Windows::Media::Devices::Core::FrameFlashMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->get_Mode(&value)); return value; } template void impl_IFrameFlashControl::Mode(Windows::Media::Devices::Core::FrameFlashMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->put_Mode(value)); } template bool impl_IFrameFlashControl::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->get_Auto(&value)); return value; } template void impl_IFrameFlashControl::Auto(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Auto(value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->put_Auto(value)); } template bool impl_IFrameFlashControl::RedEyeReduction() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RedEyeReduction(&value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->get_RedEyeReduction(&value)); return value; } template void impl_IFrameFlashControl::RedEyeReduction(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RedEyeReduction(value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->put_RedEyeReduction(value)); } template float impl_IFrameFlashControl::PowerPercent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerPercent(&value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->get_PowerPercent(&value)); return value; } template void impl_IFrameFlashControl::PowerPercent(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PowerPercent(value)); + check_hresult(WINRT_SHIM(IFrameFlashControl)->put_PowerPercent(value)); } template Windows::Media::Devices::Core::FrameExposureControl impl_IFrameController::ExposureControl() const { Windows::Media::Devices::Core::FrameExposureControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposureControl(put(value))); + check_hresult(WINRT_SHIM(IFrameController)->get_ExposureControl(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameExposureCompensationControl impl_IFrameController::ExposureCompensationControl() const { Windows::Media::Devices::Core::FrameExposureCompensationControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensationControl(put(value))); + check_hresult(WINRT_SHIM(IFrameController)->get_ExposureCompensationControl(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameIsoSpeedControl impl_IFrameController::IsoSpeedControl() const { Windows::Media::Devices::Core::FrameIsoSpeedControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsoSpeedControl(put(value))); + check_hresult(WINRT_SHIM(IFrameController)->get_IsoSpeedControl(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameFocusControl impl_IFrameController::FocusControl() const { Windows::Media::Devices::Core::FrameFocusControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusControl(put(value))); + check_hresult(WINRT_SHIM(IFrameController)->get_FocusControl(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IFrameController::PhotoConfirmationEnabled() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PhotoConfirmationEnabled(put(value))); + check_hresult(WINRT_SHIM(IFrameController)->get_PhotoConfirmationEnabled(put_abi(value))); return value; } -template void impl_IFrameController::PhotoConfirmationEnabled(const Windows::Foundation::IReference & value) const +template void impl_IFrameController::PhotoConfirmationEnabled(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_PhotoConfirmationEnabled(get(value))); + check_hresult(WINRT_SHIM(IFrameController)->put_PhotoConfirmationEnabled(get_abi(value))); } template Windows::Media::Devices::Core::FrameFlashControl impl_IFrameController2::FlashControl() const { Windows::Media::Devices::Core::FrameFlashControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlashControl(put(value))); + check_hresult(WINRT_SHIM(IFrameController2)->get_FlashControl(put_abi(value))); return value; } template bool impl_IVariablePhotoSequenceController::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->get_Supported(&value)); return value; } template float impl_IVariablePhotoSequenceController::MaxPhotosPerSecond() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPhotosPerSecond(&value)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->get_MaxPhotosPerSecond(&value)); return value; } template float impl_IVariablePhotoSequenceController::PhotosPerSecondLimit() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosPerSecondLimit(&value)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->get_PhotosPerSecondLimit(&value)); return value; } template void impl_IVariablePhotoSequenceController::PhotosPerSecondLimit(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PhotosPerSecondLimit(value)); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->put_PhotosPerSecondLimit(value)); } template Windows::Media::MediaProperties::MediaRatio impl_IVariablePhotoSequenceController::GetHighestConcurrentFrameRate(const Windows::Media::MediaProperties::IMediaEncodingProperties & captureProperties) const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetHighestConcurrentFrameRate(get(captureProperties), put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->abi_GetHighestConcurrentFrameRate(get_abi(captureProperties), put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_IVariablePhotoSequenceController::GetCurrentFrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentFrameRate(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->abi_GetCurrentFrameRate(put_abi(value))); return value; } template Windows::Media::Devices::Core::FrameControlCapabilities impl_IVariablePhotoSequenceController::FrameCapabilities() const { Windows::Media::Devices::Core::FrameControlCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameCapabilities(put(value))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->get_FrameCapabilities(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVariablePhotoSequenceController::DesiredFrameControllers() const { Windows::Foundation::Collections::IVector items; - check_hresult(static_cast(static_cast(*this))->get_DesiredFrameControllers(put(items))); + check_hresult(WINRT_SHIM(IVariablePhotoSequenceController)->get_DesiredFrameControllers(put_abi(items))); return items; } template Windows::Media::Devices::Core::CameraIntrinsics impl_ICameraIntrinsicsFactory::Create(const Windows::Foundation::Numerics::float2 & focalLength, const Windows::Foundation::Numerics::float2 & principalPoint, const Windows::Foundation::Numerics::float3 & radialDistortion, const Windows::Foundation::Numerics::float2 & tangentialDistortion, uint32_t imageWidth, uint32_t imageHeight) const { Windows::Media::Devices::Core::CameraIntrinsics result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(focalLength), get(principalPoint), get(radialDistortion), get(tangentialDistortion), imageWidth, imageHeight, put(result))); + check_hresult(WINRT_SHIM(ICameraIntrinsicsFactory)->abi_Create(get_abi(focalLength), get_abi(principalPoint), get_abi(radialDistortion), get_abi(tangentialDistortion), imageWidth, imageHeight, put_abi(result))); return result; } template Windows::Foundation::Numerics::float2 impl_ICameraIntrinsics::FocalLength() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_FocalLength(put(value))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_FocalLength(put_abi(value))); return value; } template Windows::Foundation::Numerics::float2 impl_ICameraIntrinsics::PrincipalPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_PrincipalPoint(put(value))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_PrincipalPoint(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_ICameraIntrinsics::RadialDistortion() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_RadialDistortion(put(value))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_RadialDistortion(put_abi(value))); return value; } template Windows::Foundation::Numerics::float2 impl_ICameraIntrinsics::TangentialDistortion() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_TangentialDistortion(put(value))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_TangentialDistortion(put_abi(value))); return value; } template uint32_t impl_ICameraIntrinsics::ImageWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ImageWidth(&value)); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_ImageWidth(&value)); return value; } template uint32_t impl_ICameraIntrinsics::ImageHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ImageHeight(&value)); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->get_ImageHeight(&value)); return value; } template Windows::Foundation::Point impl_ICameraIntrinsics::ProjectOntoFrame(const Windows::Foundation::Numerics::float3 & coordinate) const { Windows::Foundation::Point result {}; - check_hresult(static_cast(static_cast(*this))->abi_ProjectOntoFrame(get(coordinate), put(result))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->abi_ProjectOntoFrame(get_abi(coordinate), put_abi(result))); return result; } template Windows::Foundation::Numerics::float2 impl_ICameraIntrinsics::UnprojectAtUnitDepth(const Windows::Foundation::Point & pixelCoordinate) const { Windows::Foundation::Numerics::float2 result {}; - check_hresult(static_cast(static_cast(*this))->abi_UnprojectAtUnitDepth(get(pixelCoordinate), put(result))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->abi_UnprojectAtUnitDepth(get_abi(pixelCoordinate), put_abi(result))); return result; } -template void impl_ICameraIntrinsics::ProjectManyOntoFrame(array_ref coordinates, array_ref results) const +template void impl_ICameraIntrinsics::ProjectManyOntoFrame(array_view coordinates, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_ProjectManyOntoFrame(coordinates.size(), get(coordinates), results.size(), get(results))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->abi_ProjectManyOntoFrame(coordinates.size(), get_abi(coordinates), results.size(), get_abi(results))); } -template void impl_ICameraIntrinsics::UnprojectPixelsAtUnitDepth(array_ref pixelCoordinates, array_ref results) const +template void impl_ICameraIntrinsics::UnprojectPixelsAtUnitDepth(array_view pixelCoordinates, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_UnprojectPixelsAtUnitDepth(pixelCoordinates.size(), get(pixelCoordinates), results.size(), get(results))); + check_hresult(WINRT_SHIM(ICameraIntrinsics)->abi_UnprojectPixelsAtUnitDepth(pixelCoordinates.size(), get_abi(pixelCoordinates), results.size(), get_abi(results))); } template Windows::Foundation::Numerics::float4x4 impl_ICameraIntrinsics2::UndistortedProjectionTransform() const { Windows::Foundation::Numerics::float4x4 value {}; - check_hresult(static_cast(static_cast(*this))->get_UndistortedProjectionTransform(put(value))); + check_hresult(WINRT_SHIM(ICameraIntrinsics2)->get_UndistortedProjectionTransform(put_abi(value))); return value; } template Windows::Foundation::Point impl_ICameraIntrinsics2::DistortPoint(const Windows::Foundation::Point & input) const { Windows::Foundation::Point result {}; - check_hresult(static_cast(static_cast(*this))->abi_DistortPoint(get(input), put(result))); + check_hresult(WINRT_SHIM(ICameraIntrinsics2)->abi_DistortPoint(get_abi(input), put_abi(result))); return result; } -template void impl_ICameraIntrinsics2::DistortPoints(array_ref inputs, array_ref results) const +template void impl_ICameraIntrinsics2::DistortPoints(array_view inputs, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_DistortPoints(inputs.size(), get(inputs), results.size(), get(results))); + check_hresult(WINRT_SHIM(ICameraIntrinsics2)->abi_DistortPoints(inputs.size(), get_abi(inputs), results.size(), get_abi(results))); } template Windows::Foundation::Point impl_ICameraIntrinsics2::UndistortPoint(const Windows::Foundation::Point & input) const { Windows::Foundation::Point result {}; - check_hresult(static_cast(static_cast(*this))->abi_UndistortPoint(get(input), put(result))); + check_hresult(WINRT_SHIM(ICameraIntrinsics2)->abi_UndistortPoint(get_abi(input), put_abi(result))); return result; } -template void impl_ICameraIntrinsics2::UndistortPoints(array_ref inputs, array_ref results) const +template void impl_ICameraIntrinsics2::UndistortPoints(array_view inputs, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_UndistortPoints(inputs.size(), get(inputs), results.size(), get(results))); + check_hresult(WINRT_SHIM(ICameraIntrinsics2)->abi_UndistortPoints(inputs.size(), get_abi(inputs), results.size(), get_abi(results))); } template Windows::Foundation::Numerics::float3 impl_IDepthCorrelatedCoordinateMapper::UnprojectPoint(const Windows::Foundation::Point & sourcePoint, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem) const { Windows::Foundation::Numerics::float3 result {}; - check_hresult(static_cast(static_cast(*this))->abi_UnprojectPoint(get(sourcePoint), get(targetCoordinateSystem), put(result))); + check_hresult(WINRT_SHIM(IDepthCorrelatedCoordinateMapper)->abi_UnprojectPoint(get_abi(sourcePoint), get_abi(targetCoordinateSystem), put_abi(result))); return result; } -template void impl_IDepthCorrelatedCoordinateMapper::UnprojectPoints(array_ref sourcePoints, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem, array_ref results) const +template void impl_IDepthCorrelatedCoordinateMapper::UnprojectPoints(array_view sourcePoints, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_UnprojectPoints(sourcePoints.size(), get(sourcePoints), get(targetCoordinateSystem), results.size(), get(results))); + check_hresult(WINRT_SHIM(IDepthCorrelatedCoordinateMapper)->abi_UnprojectPoints(sourcePoints.size(), get_abi(sourcePoints), get_abi(targetCoordinateSystem), results.size(), get_abi(results))); } template Windows::Foundation::Point impl_IDepthCorrelatedCoordinateMapper::MapPoint(const Windows::Foundation::Point & sourcePoint, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem, const Windows::Media::Devices::Core::CameraIntrinsics & targetCameraIntrinsics) const { Windows::Foundation::Point result {}; - check_hresult(static_cast(static_cast(*this))->abi_MapPoint(get(sourcePoint), get(targetCoordinateSystem), get(targetCameraIntrinsics), put(result))); + check_hresult(WINRT_SHIM(IDepthCorrelatedCoordinateMapper)->abi_MapPoint(get_abi(sourcePoint), get_abi(targetCoordinateSystem), get_abi(targetCameraIntrinsics), put_abi(result))); return result; } -template void impl_IDepthCorrelatedCoordinateMapper::MapPoints(array_ref sourcePoints, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem, const Windows::Media::Devices::Core::CameraIntrinsics & targetCameraIntrinsics, array_ref results) const +template void impl_IDepthCorrelatedCoordinateMapper::MapPoints(array_view sourcePoints, const Windows::Perception::Spatial::SpatialCoordinateSystem & targetCoordinateSystem, const Windows::Media::Devices::Core::CameraIntrinsics & targetCameraIntrinsics, array_view results) const { - check_hresult(static_cast(static_cast(*this))->abi_MapPoints(sourcePoints.size(), get(sourcePoints), get(targetCoordinateSystem), get(targetCameraIntrinsics), results.size(), get(results))); + check_hresult(WINRT_SHIM(IDepthCorrelatedCoordinateMapper)->abi_MapPoints(sourcePoints.size(), get_abi(sourcePoints), get_abi(targetCoordinateSystem), get_abi(targetCameraIntrinsics), results.size(), get_abi(results))); } inline FrameController::FrameController() : @@ -1686,3 +1769,311 @@ inline FrameController::FrameController() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::ICameraIntrinsics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::ICameraIntrinsics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::ICameraIntrinsicsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IDepthCorrelatedCoordinateMapper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameControlCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameControlCapabilities2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameController2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameExposureCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameExposureCompensationCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameExposureCompensationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameExposureControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameFlashCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameFlashControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameFocusCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameFocusControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameIsoSpeedCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IFrameIsoSpeedControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::IVariablePhotoSequenceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::CameraIntrinsics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::DepthCorrelatedCoordinateMapper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameControlCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameExposureCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameExposureCompensationCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameExposureCompensationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameExposureControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameFlashCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameFlashControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameFocusCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameFocusControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameIsoSpeedCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::FrameIsoSpeedControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::Core::VariablePhotoSequenceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Devices.h b/10.0.14393.0/winrt/Windows.Media.Devices.h index c3a7c66e0..61ce7c206 100644 --- a/10.0.14393.0/winrt/Windows.Media.Devices.h +++ b/10.0.14393.0/winrt/Windows.Media.Devices.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.Capture.3.h" @@ -29,7 +32,7 @@ template CallControlEventHandler::CallControlEventHandl inline void CallControlEventHandler::operator()(const Windows::Media::Devices::CallControl & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template DialRequestedEventHandler::DialRequestedEventHandler(L lambda) : @@ -46,7 +49,7 @@ template DialRequestedEventHandler::DialRequestedEventH inline void DialRequestedEventHandler::operator()(const Windows::Media::Devices::CallControl & sender, const Windows::Media::Devices::DialRequestedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template KeypadPressedEventHandler::KeypadPressedEventHandler(L lambda) : @@ -63,7 +66,7 @@ template KeypadPressedEventHandler::KeypadPressedEventH inline void KeypadPressedEventHandler::operator()(const Windows::Media::Devices::CallControl & sender, const Windows::Media::Devices::KeypadPressedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template RedialRequestedEventHandler::RedialRequestedEventHandler(L lambda) : @@ -80,7 +83,7 @@ template RedialRequestedEventHandler::RedialRequestedEv inline void RedialRequestedEventHandler::operator()(const Windows::Media::Devices::CallControl & sender, const Windows::Media::Devices::RedialRequestedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -94,7 +97,8 @@ struct produce : prod { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -107,6 +111,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -124,7 +129,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -133,11 +139,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SupportedModes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedModes()); return S_OK; } catch (...) @@ -151,7 +158,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -160,10 +168,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Configure(abi_arg_in settings) noexcept override + HRESULT __stdcall abi_Configure(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return S_OK; } @@ -177,11 +186,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_SetDeviceProperty(abi_arg_in propertyId, abi_arg_in propertyValue) noexcept override + HRESULT __stdcall abi_SetDeviceProperty(impl::abi_arg_in propertyId, impl::abi_arg_in propertyValue) noexcept override { try { - this->shim().SetDeviceProperty(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue)); + typename D::abi_guard guard(this->shim()); + this->shim().SetDeviceProperty(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue)); return S_OK; } catch (...) @@ -190,11 +200,12 @@ struct produce propertyId, abi_arg_out propertyValue) noexcept override + HRESULT __stdcall abi_GetDeviceProperty(impl::abi_arg_in propertyId, impl::abi_arg_out propertyValue) noexcept override { try { - *propertyValue = detach(this->shim().GetDeviceProperty(*reinterpret_cast(&propertyId))); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_abi(this->shim().GetDeviceProperty(*reinterpret_cast(&propertyId))); return S_OK; } catch (...) @@ -208,11 +219,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LowLagPhotoSequence(abi_arg_out value) noexcept override + HRESULT __stdcall get_LowLagPhotoSequence(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LowLagPhotoSequence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowLagPhotoSequence()); return S_OK; } catch (...) @@ -222,11 +234,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LowLagPhoto(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LowLagPhoto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowLagPhoto()); return S_OK; } catch (...) @@ -236,11 +249,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SceneModeControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SceneModeControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SceneModeControl()); return S_OK; } catch (...) @@ -250,11 +264,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TorchControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TorchControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TorchControl()); return S_OK; } catch (...) @@ -264,11 +279,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FlashControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlashControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlashControl()); return S_OK; } catch (...) @@ -278,11 +294,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WhiteBalanceControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WhiteBalanceControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WhiteBalanceControl()); return S_OK; } catch (...) @@ -292,11 +309,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExposureControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureControl()); return S_OK; } catch (...) @@ -306,11 +324,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusControl()); return S_OK; } catch (...) @@ -320,11 +339,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExposureCompensationControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposureCompensationControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposureCompensationControl()); return S_OK; } catch (...) @@ -334,11 +354,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsoSpeedControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsoSpeedControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsoSpeedControl()); return S_OK; } catch (...) @@ -348,11 +369,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RegionsOfInterestControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RegionsOfInterestControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegionsOfInterestControl()); return S_OK; } catch (...) @@ -366,7 +388,8 @@ struct produceshim().PrimaryUse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryUse()); return S_OK; } catch (...) @@ -379,6 +402,7 @@ struct produceshim()); this->shim().PrimaryUse(value); return S_OK; } @@ -392,11 +416,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_VariablePhotoSequenceController(abi_arg_out value) noexcept override + HRESULT __stdcall get_VariablePhotoSequenceController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VariablePhotoSequenceController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VariablePhotoSequenceController()); return S_OK; } catch (...) @@ -406,11 +431,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PhotoConfirmationControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhotoConfirmationControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotoConfirmationControl()); return S_OK; } catch (...) @@ -420,11 +446,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ZoomControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomControl()); return S_OK; } catch (...) @@ -438,11 +465,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ExposurePriorityVideoControl(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExposurePriorityVideoControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExposurePriorityVideoControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExposurePriorityVideoControl()); return S_OK; } catch (...) @@ -456,7 +484,8 @@ struct produceshim().DesiredOptimization()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredOptimization()); return S_OK; } catch (...) @@ -469,6 +498,7 @@ struct produceshim()); this->shim().DesiredOptimization(value); return S_OK; } @@ -478,11 +508,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HdrVideoControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HdrVideoControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HdrVideoControl()); return S_OK; } catch (...) @@ -492,11 +523,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OpticalImageStabilizationControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpticalImageStabilizationControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalImageStabilizationControl()); return S_OK; } catch (...) @@ -506,11 +538,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AdvancedPhotoControl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvancedPhotoControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvancedPhotoControl()); return S_OK; } catch (...) @@ -528,6 +561,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Muted(value); return S_OK; } @@ -541,7 +575,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Muted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Muted()); return S_OK; } catch (...) @@ -554,6 +589,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().VolumePercent(value); return S_OK; } @@ -567,7 +603,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().VolumePercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VolumePercent()); return S_OK; } catch (...) @@ -580,11 +617,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_IndicateNewIncomingCall(bool enableRinger, abi_arg_in callerId, uint64_t * callToken) noexcept override + HRESULT __stdcall abi_IndicateNewIncomingCall(bool enableRinger, impl::abi_arg_in callerId, uint64_t * callToken) noexcept override { try { - *callToken = detach(this->shim().IndicateNewIncomingCall(enableRinger, *reinterpret_cast(&callerId))); + typename D::abi_guard guard(this->shim()); + *callToken = detach_abi(this->shim().IndicateNewIncomingCall(enableRinger, *reinterpret_cast(&callerId))); return S_OK; } catch (...) @@ -597,7 +635,8 @@ struct produce : produce_baseshim().IndicateNewOutgoingCall()); + typename D::abi_guard guard(this->shim()); + *callToken = detach_abi(this->shim().IndicateNewOutgoingCall()); return S_OK; } catch (...) @@ -610,6 +649,7 @@ struct produce : produce_baseshim()); this->shim().IndicateActiveCall(callToken); return S_OK; } @@ -623,6 +663,7 @@ struct produce : produce_baseshim()); this->shim().EndCall(callToken); return S_OK; } @@ -636,7 +677,8 @@ struct produce : produce_baseshim().HasRinger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasRinger()); return S_OK; } catch (...) @@ -645,11 +687,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_AnswerRequested(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AnswerRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AnswerRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -662,6 +705,7 @@ struct produce : produce_baseshim()); this->shim().AnswerRequested(token); return S_OK; } @@ -671,11 +715,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_HangUpRequested(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HangUpRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HangUpRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -688,6 +733,7 @@ struct produce : produce_baseshim()); this->shim().HangUpRequested(token); return S_OK; } @@ -697,11 +743,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_DialRequested(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DialRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DialRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -714,6 +761,7 @@ struct produce : produce_baseshim()); this->shim().DialRequested(token); return S_OK; } @@ -723,11 +771,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_RedialRequested(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RedialRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RedialRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -740,6 +789,7 @@ struct produce : produce_baseshim()); this->shim().RedialRequested(token); return S_OK; } @@ -749,11 +799,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_KeypadPressed(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().KeypadPressed(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().KeypadPressed(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -766,6 +817,7 @@ struct produce : produce_baseshim()); this->shim().KeypadPressed(token); return S_OK; } @@ -775,11 +827,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_AudioTransferRequested(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioTransferRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioTransferRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -792,6 +845,7 @@ struct produce : produce_baseshim()); this->shim().AudioTransferRequested(token); return S_OK; } @@ -805,11 +859,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out callControl) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out callControl) noexcept override { try { - *callControl = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *callControl = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -819,11 +874,12 @@ struct produce : produce_base deviceId, abi_arg_out callControl) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in deviceId, impl::abi_arg_out callControl) noexcept override { try { - *callControl = detach(this->shim().FromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *callControl = detach_abi(this->shim().FromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -837,11 +893,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -855,7 +912,8 @@ struct produce { try { - *value = detach(this->shim().Role()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Role()); return S_OK; } catch (...) @@ -872,6 +930,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(); return S_OK; } @@ -881,11 +940,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -903,7 +963,8 @@ struct produce : produ { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -916,7 +977,8 @@ struct produce : produ { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -929,7 +991,8 @@ struct produce : produ { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -942,7 +1005,8 @@ struct produce : produ { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -955,7 +1019,8 @@ struct produce : produ { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -964,11 +1029,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetValueAsync(float value, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(float value, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(value)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(value)); return S_OK; } catch (...) @@ -986,7 +1052,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -999,7 +1066,8 @@ struct produce : produce_baseshim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -1008,11 +1076,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetAutoAsync(bool value, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetAutoAsync(value)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetAutoAsync(value)); return S_OK; } catch (...) @@ -1022,11 +1091,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Min(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -1035,11 +1105,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Max(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -1048,11 +1119,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Step(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -1061,11 +1133,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1074,11 +1147,12 @@ struct produce : produce_base shutterDuration, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(impl::abi_arg_in shutterDuration, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(*reinterpret_cast(&shutterDuration))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(*reinterpret_cast(&shutterDuration))); return S_OK; } catch (...) @@ -1096,7 +1170,8 @@ struct produce : prod { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1109,7 +1184,8 @@ struct produce : prod { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -1122,6 +1198,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return S_OK; } @@ -1139,7 +1216,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1152,7 +1230,8 @@ struct produce : produce_baseshim().PowerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSupported()); return S_OK; } catch (...) @@ -1165,7 +1244,8 @@ struct produce : produce_baseshim().RedEyeReductionSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedEyeReductionSupported()); return S_OK; } catch (...) @@ -1178,7 +1258,8 @@ struct produce : produce_baseshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -1191,6 +1272,7 @@ struct produce : produce_baseshim()); this->shim().Enabled(value); return S_OK; } @@ -1204,7 +1286,8 @@ struct produce : produce_baseshim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -1217,6 +1300,7 @@ struct produce : produce_baseshim()); this->shim().Auto(value); return S_OK; } @@ -1230,7 +1314,8 @@ struct produce : produce_baseshim().RedEyeReduction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedEyeReduction()); return S_OK; } catch (...) @@ -1243,6 +1328,7 @@ struct produce : produce_baseshim()); this->shim().RedEyeReduction(value); return S_OK; } @@ -1256,7 +1342,8 @@ struct produce : produce_baseshim().PowerPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerPercent()); return S_OK; } catch (...) @@ -1269,6 +1356,7 @@ struct produce : produce_baseshim()); this->shim().PowerPercent(value); return S_OK; } @@ -1286,7 +1374,8 @@ struct produce : produce_baseshim().AssistantLightSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AssistantLightSupported()); return S_OK; } catch (...) @@ -1299,7 +1388,8 @@ struct produce : produce_baseshim().AssistantLightEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AssistantLightEnabled()); return S_OK; } catch (...) @@ -1312,6 +1402,7 @@ struct produce : produce_baseshim()); this->shim().AssistantLightEnabled(value); return S_OK; } @@ -1329,7 +1420,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1338,11 +1430,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedPresets(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedPresets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedPresets()); return S_OK; } catch (...) @@ -1356,7 +1449,8 @@ struct produce : produce_baseshim().Preset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Preset()); return S_OK; } catch (...) @@ -1365,11 +1459,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetPresetAsync(Windows::Media::Devices::FocusPreset preset, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPresetAsync(preset)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPresetAsync(preset)); return S_OK; } catch (...) @@ -1379,11 +1474,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetPresetWithCompletionOptionAsync(Windows::Media::Devices::FocusPreset preset, bool completeBeforeFocus, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPresetAsync(preset, completeBeforeFocus)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPresetAsync(preset, completeBeforeFocus)); return S_OK; } catch (...) @@ -1397,7 +1493,8 @@ struct produce : produce_baseshim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -1410,7 +1507,8 @@ struct produce : produce_baseshim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -1423,7 +1521,8 @@ struct produce : produce_baseshim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -1436,7 +1535,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1445,11 +1545,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(uint32_t focus, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(focus)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(focus)); return S_OK; } catch (...) @@ -1459,11 +1560,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_FocusAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FocusAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FocusAsync()); return S_OK; } catch (...) @@ -1481,7 +1583,8 @@ struct produce : produce_baseshim().FocusChangedSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusChangedSupported()); return S_OK; } catch (...) @@ -1494,7 +1597,8 @@ struct produce : produce_baseshim().WaitForFocusSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WaitForFocusSupported()); return S_OK; } catch (...) @@ -1503,11 +1607,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedFocusModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedFocusModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedFocusModes()); return S_OK; } catch (...) @@ -1517,11 +1622,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedFocusDistances(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedFocusDistances()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedFocusDistances()); return S_OK; } catch (...) @@ -1531,11 +1637,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedFocusRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedFocusRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedFocusRanges()); return S_OK; } catch (...) @@ -1549,7 +1656,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -1562,7 +1670,8 @@ struct produce : produce_baseshim().FocusState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusState()); return S_OK; } catch (...) @@ -1571,11 +1680,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_UnlockAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().UnlockAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().UnlockAsync()); return S_OK; } catch (...) @@ -1585,11 +1695,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_LockAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().LockAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().LockAsync()); return S_OK; } catch (...) @@ -1599,10 +1710,11 @@ struct produce : produce_base settings) noexcept override + HRESULT __stdcall abi_Configure(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return S_OK; } @@ -1620,7 +1732,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -1633,6 +1746,7 @@ struct produce : produce_baseshim()); this->shim().Mode(value); return S_OK; } @@ -1646,7 +1760,8 @@ struct produce : produce_baseshim().AutoFocusRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoFocusRange()); return S_OK; } catch (...) @@ -1659,6 +1774,7 @@ struct produce : produce_baseshim()); this->shim().AutoFocusRange(value); return S_OK; } @@ -1668,11 +1784,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1682,10 +1799,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast *>(&value)); return S_OK; } @@ -1695,11 +1813,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Distance(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Distance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Distance()); return S_OK; } catch (...) @@ -1709,10 +1828,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_Distance(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Distance(*reinterpret_cast *>(&value)); return S_OK; } @@ -1726,7 +1846,8 @@ struct produce : produce_baseshim().WaitForFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WaitForFocus()); return S_OK; } catch (...) @@ -1739,6 +1860,7 @@ struct produce : produce_baseshim()); this->shim().WaitForFocus(value); return S_OK; } @@ -1752,7 +1874,8 @@ struct produce : produce_baseshim().DisableDriverFallback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisableDriverFallback()); return S_OK; } catch (...) @@ -1765,6 +1888,7 @@ struct produce : produce_baseshim()); this->shim().DisableDriverFallback(value); return S_OK; } @@ -1782,7 +1906,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1791,11 +1916,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedModes()); return S_OK; } catch (...) @@ -1809,7 +1935,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -1822,6 +1949,7 @@ struct produce : produce_baseshim()); this->shim().Mode(value); return S_OK; } @@ -1839,7 +1967,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -1848,11 +1977,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedPresets(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedPresets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedPresets()); return S_OK; } catch (...) @@ -1866,7 +1996,8 @@ struct produce : produce_baseshim().Preset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Preset()); return S_OK; } catch (...) @@ -1875,11 +2006,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetPresetAsync(Windows::Media::Devices::IsoSpeedPreset preset, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPresetAsync(preset)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPresetAsync(preset)); return S_OK; } catch (...) @@ -1897,7 +2029,8 @@ struct produce : produce_baseshim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -1910,7 +2043,8 @@ struct produce : produce_baseshim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -1923,7 +2057,8 @@ struct produce : produce_baseshim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -1936,7 +2071,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1945,11 +2081,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(uint32_t isoSpeed, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(isoSpeed)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(isoSpeed)); return S_OK; } catch (...) @@ -1963,7 +2100,8 @@ struct produce : produce_baseshim().Auto()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Auto()); return S_OK; } catch (...) @@ -1972,11 +2110,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetAutoAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetAutoAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetAutoAsync()); return S_OK; } catch (...) @@ -1994,7 +2133,8 @@ struct produce : produce_ba { try { - *telephonyKey = detach(this->shim().TelephonyKey()); + typename D::abi_guard guard(this->shim()); + *telephonyKey = detach_abi(this->shim().TelephonyKey()); return S_OK; } catch (...) @@ -2007,11 +2147,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetHighestConcurrentFrameRate(abi_arg_in captureProperties, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetHighestConcurrentFrameRate(impl::abi_arg_in captureProperties, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); return S_OK; } catch (...) @@ -2021,11 +2162,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentFrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentFrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentFrameRate()); return S_OK; } catch (...) @@ -2039,7 +2181,8 @@ struct produce : produce_baseshim().ThumbnailEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbnailEnabled()); return S_OK; } catch (...) @@ -2052,6 +2195,7 @@ struct produce : produce_baseshim()); this->shim().ThumbnailEnabled(value); return S_OK; } @@ -2065,7 +2209,8 @@ struct produce : produce_baseshim().ThumbnailFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbnailFormat()); return S_OK; } catch (...) @@ -2078,6 +2223,7 @@ struct produce : produce_baseshim()); this->shim().ThumbnailFormat(value); return S_OK; } @@ -2091,7 +2237,8 @@ struct produce : produce_baseshim().DesiredThumbnailSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredThumbnailSize()); return S_OK; } catch (...) @@ -2104,6 +2251,7 @@ struct produce : produce_baseshim()); this->shim().DesiredThumbnailSize(value); return S_OK; } @@ -2117,7 +2265,8 @@ struct produce : produce_baseshim().HardwareAcceleratedThumbnailSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareAcceleratedThumbnailSupported()); return S_OK; } catch (...) @@ -2134,7 +2283,8 @@ struct produce : produc { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -2147,7 +2297,8 @@ struct produce : produc { try { - *value = detach(this->shim().MaxPastPhotos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPastPhotos()); return S_OK; } catch (...) @@ -2160,7 +2311,8 @@ struct produce : produc { try { - *value = detach(this->shim().MaxPhotosPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPhotosPerSecond()); return S_OK; } catch (...) @@ -2173,7 +2325,8 @@ struct produce : produc { try { - *value = detach(this->shim().PastPhotoLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PastPhotoLimit()); return S_OK; } catch (...) @@ -2186,6 +2339,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PastPhotoLimit(value); return S_OK; } @@ -2199,7 +2353,8 @@ struct produce : produc { try { - *value = detach(this->shim().PhotosPerSecondLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosPerSecondLimit()); return S_OK; } catch (...) @@ -2212,6 +2367,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PhotosPerSecondLimit(value); return S_OK; } @@ -2221,11 +2377,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetHighestConcurrentFrameRate(abi_arg_in captureProperties, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetHighestConcurrentFrameRate(impl::abi_arg_in captureProperties, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); return S_OK; } catch (...) @@ -2235,11 +2392,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetCurrentFrameRate(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentFrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentFrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentFrameRate()); return S_OK; } catch (...) @@ -2253,7 +2411,8 @@ struct produce : produc { try { - *value = detach(this->shim().ThumbnailEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbnailEnabled()); return S_OK; } catch (...) @@ -2266,6 +2425,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ThumbnailEnabled(value); return S_OK; } @@ -2279,7 +2439,8 @@ struct produce : produc { try { - *value = detach(this->shim().ThumbnailFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbnailFormat()); return S_OK; } catch (...) @@ -2292,6 +2453,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ThumbnailFormat(value); return S_OK; } @@ -2305,7 +2467,8 @@ struct produce : produc { try { - *value = detach(this->shim().DesiredThumbnailSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredThumbnailSize()); return S_OK; } catch (...) @@ -2318,6 +2481,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredThumbnailSize(value); return S_OK; } @@ -2331,7 +2495,8 @@ struct produce : produc { try { - *value = detach(this->shim().HardwareAcceleratedThumbnailSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareAcceleratedThumbnailSupported()); return S_OK; } catch (...) @@ -2344,11 +2509,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Capabilities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Capabilities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Capabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capabilities()); return S_OK; } catch (...) @@ -2362,7 +2528,8 @@ struct produce : produce_baseshim().TryGetValue(*value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryGetValue(*value)); return S_OK; } catch (...) @@ -2375,7 +2542,8 @@ struct produce : produce_baseshim().TrySetValue(value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetValue(value)); return S_OK; } catch (...) @@ -2388,7 +2556,8 @@ struct produce : produce_baseshim().TryGetAuto(*value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryGetAuto(*value)); return S_OK; } catch (...) @@ -2401,7 +2570,8 @@ struct produce : produce_baseshim().TrySetAuto(value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetAuto(value)); return S_OK; } catch (...) @@ -2418,7 +2588,8 @@ struct produce : pr { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -2431,7 +2602,8 @@ struct produce : pr { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -2444,7 +2616,8 @@ struct produce : pr { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -2457,7 +2630,8 @@ struct produce : pr { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -2470,7 +2644,8 @@ struct produce : pr { try { - *value = detach(this->shim().Default()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Default()); return S_OK; } catch (...) @@ -2483,7 +2658,8 @@ struct produce : pr { try { - *value = detach(this->shim().AutoModeSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoModeSupported()); return S_OK; } catch (...) @@ -2496,11 +2672,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetAvailableMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetAvailableMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAvailableMediaStreamProperties(mediaStreamType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAvailableMediaStreamProperties(mediaStreamType)); return S_OK; } catch (...) @@ -2510,11 +2687,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetMediaStreamProperties(mediaStreamType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetMediaStreamProperties(mediaStreamType)); return S_OK; } catch (...) @@ -2524,11 +2702,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetMediaStreamPropertiesAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, abi_arg_in mediaEncodingProperties, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetMediaStreamPropertiesAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, impl::abi_arg_in mediaEncodingProperties, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetMediaStreamPropertiesAsync(mediaStreamType, *reinterpret_cast(&mediaEncodingProperties))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetMediaStreamPropertiesAsync(mediaStreamType, *reinterpret_cast(&mediaEncodingProperties))); return S_OK; } catch (...) @@ -2542,11 +2721,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetAudioCaptureSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetAudioCaptureSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetAudioCaptureSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetAudioCaptureSelector()); return S_OK; } catch (...) @@ -2556,11 +2736,12 @@ struct produce : produce_base selector) noexcept override + HRESULT __stdcall abi_GetAudioRenderSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetAudioRenderSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetAudioRenderSelector()); return S_OK; } catch (...) @@ -2570,11 +2751,12 @@ struct produce : produce_base selector) noexcept override + HRESULT __stdcall abi_GetVideoCaptureSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetVideoCaptureSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetVideoCaptureSelector()); return S_OK; } catch (...) @@ -2584,11 +2766,12 @@ struct produce : produce_base deviceId) noexcept override + HRESULT __stdcall abi_GetDefaultAudioCaptureId(Windows::Media::Devices::AudioDeviceRole role, impl::abi_arg_out deviceId) noexcept override { try { - *deviceId = detach(this->shim().GetDefaultAudioCaptureId(role)); + typename D::abi_guard guard(this->shim()); + *deviceId = detach_abi(this->shim().GetDefaultAudioCaptureId(role)); return S_OK; } catch (...) @@ -2598,11 +2781,12 @@ struct produce : produce_base deviceId) noexcept override + HRESULT __stdcall abi_GetDefaultAudioRenderId(Windows::Media::Devices::AudioDeviceRole role, impl::abi_arg_out deviceId) noexcept override { try { - *deviceId = detach(this->shim().GetDefaultAudioRenderId(role)); + typename D::abi_guard guard(this->shim()); + *deviceId = detach_abi(this->shim().GetDefaultAudioRenderId(role)); return S_OK; } catch (...) @@ -2612,11 +2796,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_DefaultAudioCaptureDeviceChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().DefaultAudioCaptureDeviceChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().DefaultAudioCaptureDeviceChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2629,6 +2814,7 @@ struct produce : produce_baseshim()); this->shim().DefaultAudioCaptureDeviceChanged(cookie); return S_OK; } @@ -2638,11 +2824,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_DefaultAudioRenderDeviceChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().DefaultAudioRenderDeviceChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().DefaultAudioRenderDeviceChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2655,6 +2842,7 @@ struct produce : produce_baseshim()); this->shim().DefaultAudioRenderDeviceChanged(cookie); return S_OK; } @@ -2672,7 +2860,8 @@ struct produce : { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -2681,11 +2870,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedModes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedModes()); return S_OK; } catch (...) @@ -2699,7 +2889,8 @@ struct produce : { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -2712,6 +2903,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -2729,7 +2921,8 @@ struct produce : produce_ { try { - *pbSupported = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *pbSupported = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -2742,7 +2935,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -2755,6 +2949,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return S_OK; } @@ -2768,7 +2963,8 @@ struct produce : produce_ { try { - *format = detach(this->shim().PixelFormat()); + typename D::abi_guard guard(this->shim()); + *format = detach_abi(this->shim().PixelFormat()); return S_OK; } catch (...) @@ -2781,6 +2977,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().PixelFormat(format); return S_OK; } @@ -2798,6 +2995,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(); return S_OK; } @@ -2815,7 +3013,8 @@ struct produce : produce_baseshim().AutoFocusEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoFocusEnabled()); return S_OK; } catch (...) @@ -2828,6 +3027,7 @@ struct produce : produce_baseshim()); this->shim().AutoFocusEnabled(value); return S_OK; } @@ -2841,7 +3041,8 @@ struct produce : produce_baseshim().AutoWhiteBalanceEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoWhiteBalanceEnabled()); return S_OK; } catch (...) @@ -2854,6 +3055,7 @@ struct produce : produce_baseshim()); this->shim().AutoWhiteBalanceEnabled(value); return S_OK; } @@ -2867,7 +3069,8 @@ struct produce : produce_baseshim().AutoExposureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoExposureEnabled()); return S_OK; } catch (...) @@ -2880,6 +3083,7 @@ struct produce : produce_baseshim()); this->shim().AutoExposureEnabled(value); return S_OK; } @@ -2889,11 +3093,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -2902,10 +3107,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Bounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return S_OK; } @@ -2923,7 +3129,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -2936,6 +3143,7 @@ struct produce : produce_baseshim()); this->shim().Type(value); return S_OK; } @@ -2949,7 +3157,8 @@ struct produce : produce_baseshim().BoundsNormalized()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundsNormalized()); return S_OK; } catch (...) @@ -2962,6 +3171,7 @@ struct produce : produce_baseshim()); this->shim().BoundsNormalized(value); return S_OK; } @@ -2975,7 +3185,8 @@ struct produce : produce_baseshim().Weight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Weight()); return S_OK; } catch (...) @@ -2988,6 +3199,7 @@ struct produce : produce_baseshim()); this->shim().Weight(value); return S_OK; } @@ -3005,7 +3217,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().MaxRegions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxRegions()); return S_OK; } catch (...) @@ -3014,11 +3227,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetRegionsAsync(abi_arg_in> regions, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetRegionsAsync(impl::abi_arg_in> regions, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetRegionsAsync(*reinterpret_cast *>(®ions))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetRegionsAsync(*reinterpret_cast *>(®ions))); return S_OK; } catch (...) @@ -3028,11 +3242,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetRegionsWithLockAsync(abi_arg_in> regions, bool lockValues, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetRegionsWithLockAsync(impl::abi_arg_in> regions, bool lockValues, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetRegionsAsync(*reinterpret_cast *>(®ions), lockValues)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetRegionsAsync(*reinterpret_cast *>(®ions), lockValues)); return S_OK; } catch (...) @@ -3042,11 +3257,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ClearRegionsAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ClearRegionsAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ClearRegionsAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ClearRegionsAsync()); return S_OK; } catch (...) @@ -3060,7 +3276,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AutoFocusSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoFocusSupported()); return S_OK; } catch (...) @@ -3073,7 +3290,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AutoWhiteBalanceSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoWhiteBalanceSupported()); return S_OK; } catch (...) @@ -3086,7 +3304,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AutoExposureSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoExposureSupported()); return S_OK; } catch (...) @@ -3099,11 +3318,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_SupportedModes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedModes()); return S_OK; } catch (...) @@ -3117,7 +3337,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -3126,11 +3347,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(Windows::Media::Devices::CaptureSceneMode sceneMode, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(sceneMode)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(sceneMode)); return S_OK; } catch (...) @@ -3148,7 +3370,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -3161,7 +3384,8 @@ struct produce : produce_baseshim().PowerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSupported()); return S_OK; } catch (...) @@ -3174,7 +3398,8 @@ struct produce : produce_baseshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -3187,6 +3412,7 @@ struct produce : produce_baseshim()); this->shim().Enabled(value); return S_OK; } @@ -3200,7 +3426,8 @@ struct produce : produce_baseshim().PowerPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerPercent()); return S_OK; } catch (...) @@ -3213,6 +3440,7 @@ struct produce : produce_baseshim()); this->shim().PowerPercent(value); return S_OK; } @@ -3226,11 +3454,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Brightness(abi_arg_out value) noexcept override + HRESULT __stdcall get_Brightness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Brightness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Brightness()); return S_OK; } catch (...) @@ -3240,11 +3469,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Contrast(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contrast(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contrast()); return S_OK; } catch (...) @@ -3254,11 +3484,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Hue(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hue()); return S_OK; } catch (...) @@ -3268,11 +3499,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_WhiteBalance(abi_arg_out value) noexcept override + HRESULT __stdcall get_WhiteBalance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WhiteBalance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WhiteBalance()); return S_OK; } catch (...) @@ -3282,11 +3514,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_BacklightCompensation(abi_arg_out value) noexcept override + HRESULT __stdcall get_BacklightCompensation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BacklightCompensation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BacklightCompensation()); return S_OK; } catch (...) @@ -3296,11 +3529,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Pan(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pan(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pan()); return S_OK; } catch (...) @@ -3310,11 +3544,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Tilt(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tilt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tilt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tilt()); return S_OK; } catch (...) @@ -3324,11 +3559,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Zoom(abi_arg_out value) noexcept override + HRESULT __stdcall get_Zoom(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Zoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Zoom()); return S_OK; } catch (...) @@ -3338,11 +3574,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Roll(abi_arg_out value) noexcept override + HRESULT __stdcall get_Roll(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Roll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Roll()); return S_OK; } catch (...) @@ -3352,11 +3589,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Exposure(abi_arg_out value) noexcept override + HRESULT __stdcall get_Exposure(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Exposure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exposure()); return S_OK; } catch (...) @@ -3366,11 +3604,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Focus(abi_arg_out value) noexcept override + HRESULT __stdcall get_Focus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Focus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Focus()); return S_OK; } catch (...) @@ -3384,7 +3623,8 @@ struct produce : produce_bas { try { - *succeeded = detach(this->shim().TrySetPowerlineFrequency(value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetPowerlineFrequency(value)); return S_OK; } catch (...) @@ -3397,7 +3637,8 @@ struct produce : produce_bas { try { - *succeeded = detach(this->shim().TryGetPowerlineFrequency(*value)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TryGetPowerlineFrequency(*value)); return S_OK; } catch (...) @@ -3414,7 +3655,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -3427,7 +3669,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Preset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Preset()); return S_OK; } catch (...) @@ -3436,11 +3679,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_SetPresetAsync(Windows::Media::Devices::ColorTemperaturePreset preset, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetPresetAsync(Windows::Media::Devices::ColorTemperaturePreset preset, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPresetAsync(preset)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPresetAsync(preset)); return S_OK; } catch (...) @@ -3454,7 +3698,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -3467,7 +3712,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -3480,7 +3726,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -3493,7 +3740,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -3502,11 +3750,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_SetValueAsync(uint32_t temperature, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetValueAsync(uint32_t temperature, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetValueAsync(temperature)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetValueAsync(temperature)); return S_OK; } catch (...) @@ -3524,7 +3773,8 @@ struct produce : produce_baseshim().Supported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Supported()); return S_OK; } catch (...) @@ -3537,7 +3787,8 @@ struct produce : produce_baseshim().Min()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Min()); return S_OK; } catch (...) @@ -3550,7 +3801,8 @@ struct produce : produce_baseshim().Max()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Max()); return S_OK; } catch (...) @@ -3563,7 +3815,8 @@ struct produce : produce_baseshim().Step()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Step()); return S_OK; } catch (...) @@ -3576,7 +3829,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -3589,6 +3843,7 @@ struct produce : produce_baseshim()); this->shim().Value(value); return S_OK; } @@ -3602,11 +3857,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SupportedModes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedModes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedModes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedModes()); return S_OK; } catch (...) @@ -3620,7 +3876,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -3629,10 +3886,11 @@ struct produce : produce_base settings) noexcept override + HRESULT __stdcall abi_Configure(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return S_OK; } @@ -3650,7 +3908,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -3663,6 +3922,7 @@ struct produce : produce_baseshim()); this->shim().Mode(value); return S_OK; } @@ -3676,7 +3936,8 @@ struct produce : produce_baseshim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -3689,6 +3950,7 @@ struct produce : produce_baseshim()); this->shim().Value(value); return S_OK; } @@ -3706,1630 +3968,1630 @@ namespace Windows::Media::Devices { template hstring impl_IDefaultAudioDeviceChangedEventArgs::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IDefaultAudioDeviceChangedEventArgs)->get_Id(put_abi(value))); return value; } template Windows::Media::Devices::AudioDeviceRole impl_IDefaultAudioDeviceChangedEventArgs::Role() const { Windows::Media::Devices::AudioDeviceRole value {}; - check_hresult(static_cast(static_cast(*this))->get_Role(&value)); + check_hresult(WINRT_SHIM(IDefaultAudioDeviceChangedEventArgs)->get_Role(&value)); return value; } template hstring impl_IMediaDeviceStatics::GetAudioCaptureSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioCaptureSelector(put(selector))); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->abi_GetAudioCaptureSelector(put_abi(selector))); return selector; } template hstring impl_IMediaDeviceStatics::GetAudioRenderSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioRenderSelector(put(selector))); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->abi_GetAudioRenderSelector(put_abi(selector))); return selector; } template hstring impl_IMediaDeviceStatics::GetVideoCaptureSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetVideoCaptureSelector(put(selector))); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->abi_GetVideoCaptureSelector(put_abi(selector))); return selector; } template hstring impl_IMediaDeviceStatics::GetDefaultAudioCaptureId(Windows::Media::Devices::AudioDeviceRole role) const { hstring deviceId; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAudioCaptureId(role, put(deviceId))); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->abi_GetDefaultAudioCaptureId(role, put_abi(deviceId))); return deviceId; } template hstring impl_IMediaDeviceStatics::GetDefaultAudioRenderId(Windows::Media::Devices::AudioDeviceRole role) const { hstring deviceId; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultAudioRenderId(role, put(deviceId))); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->abi_GetDefaultAudioRenderId(role, put_abi(deviceId))); return deviceId; } -template event_token impl_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_DefaultAudioCaptureDeviceChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->add_DefaultAudioCaptureDeviceChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Devices::IMediaDeviceStatics::remove_DefaultAudioCaptureDeviceChanged, DefaultAudioCaptureDeviceChanged(handler)); } template void impl_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DefaultAudioCaptureDeviceChanged(cookie)); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->remove_DefaultAudioCaptureDeviceChanged(cookie)); } -template event_token impl_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_DefaultAudioRenderDeviceChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->add_DefaultAudioRenderDeviceChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Devices::IMediaDeviceStatics::remove_DefaultAudioRenderDeviceChanged, DefaultAudioRenderDeviceChanged(handler)); } template void impl_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DefaultAudioRenderDeviceChanged(cookie)); + check_hresult(WINRT_SHIM(IMediaDeviceStatics)->remove_DefaultAudioRenderDeviceChanged(cookie)); } template Windows::Foundation::Collections::IVectorView impl_ISceneModeControl::SupportedModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedModes(put(value))); + check_hresult(WINRT_SHIM(ISceneModeControl)->get_SupportedModes(put_abi(value))); return value; } template Windows::Media::Devices::CaptureSceneMode impl_ISceneModeControl::Value() const { Windows::Media::Devices::CaptureSceneMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(ISceneModeControl)->get_Value(&value)); return value; } template Windows::Foundation::IAsyncAction impl_ISceneModeControl::SetValueAsync(Windows::Media::Devices::CaptureSceneMode sceneMode) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(sceneMode, put(asyncInfo))); + check_hresult(WINRT_SHIM(ISceneModeControl)->abi_SetValueAsync(sceneMode, put_abi(asyncInfo))); return asyncInfo; } template bool impl_ITorchControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(ITorchControl)->get_Supported(&value)); return value; } template bool impl_ITorchControl::PowerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSupported(&value)); + check_hresult(WINRT_SHIM(ITorchControl)->get_PowerSupported(&value)); return value; } template bool impl_ITorchControl::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(ITorchControl)->get_Enabled(&value)); return value; } template void impl_ITorchControl::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(ITorchControl)->put_Enabled(value)); } template float impl_ITorchControl::PowerPercent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerPercent(&value)); + check_hresult(WINRT_SHIM(ITorchControl)->get_PowerPercent(&value)); return value; } template void impl_ITorchControl::PowerPercent(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PowerPercent(value)); + check_hresult(WINRT_SHIM(ITorchControl)->put_PowerPercent(value)); } template bool impl_IFlashControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_Supported(&value)); return value; } template bool impl_IFlashControl::PowerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSupported(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_PowerSupported(&value)); return value; } template bool impl_IFlashControl::RedEyeReductionSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RedEyeReductionSupported(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_RedEyeReductionSupported(&value)); return value; } template bool impl_IFlashControl::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_Enabled(&value)); return value; } template void impl_IFlashControl::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IFlashControl)->put_Enabled(value)); } template bool impl_IFlashControl::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_Auto(&value)); return value; } template void impl_IFlashControl::Auto(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Auto(value)); + check_hresult(WINRT_SHIM(IFlashControl)->put_Auto(value)); } template bool impl_IFlashControl::RedEyeReduction() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RedEyeReduction(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_RedEyeReduction(&value)); return value; } template void impl_IFlashControl::RedEyeReduction(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RedEyeReduction(value)); + check_hresult(WINRT_SHIM(IFlashControl)->put_RedEyeReduction(value)); } template float impl_IFlashControl::PowerPercent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerPercent(&value)); + check_hresult(WINRT_SHIM(IFlashControl)->get_PowerPercent(&value)); return value; } template void impl_IFlashControl::PowerPercent(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PowerPercent(value)); + check_hresult(WINRT_SHIM(IFlashControl)->put_PowerPercent(value)); } template bool impl_IFlashControl2::AssistantLightSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AssistantLightSupported(&value)); + check_hresult(WINRT_SHIM(IFlashControl2)->get_AssistantLightSupported(&value)); return value; } template bool impl_IFlashControl2::AssistantLightEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AssistantLightEnabled(&value)); + check_hresult(WINRT_SHIM(IFlashControl2)->get_AssistantLightEnabled(&value)); return value; } template void impl_IFlashControl2::AssistantLightEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AssistantLightEnabled(value)); + check_hresult(WINRT_SHIM(IFlashControl2)->put_AssistantLightEnabled(value)); } template bool impl_IExposureCompensationControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->get_Supported(&value)); return value; } template float impl_IExposureCompensationControl::Min() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->get_Min(&value)); return value; } template float impl_IExposureCompensationControl::Max() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->get_Max(&value)); return value; } template float impl_IExposureCompensationControl::Step() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->get_Step(&value)); return value; } template float impl_IExposureCompensationControl::Value() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->get_Value(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IExposureCompensationControl::SetValueAsync(float value) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(value, put(asyncInfo))); + check_hresult(WINRT_SHIM(IExposureCompensationControl)->abi_SetValueAsync(value, put_abi(asyncInfo))); return asyncInfo; } template bool impl_IIsoSpeedControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl)->get_Supported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IIsoSpeedControl::SupportedPresets() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedPresets(put(value))); + check_hresult(WINRT_SHIM(IIsoSpeedControl)->get_SupportedPresets(put_abi(value))); return value; } template Windows::Media::Devices::IsoSpeedPreset impl_IIsoSpeedControl::Preset() const { Windows::Media::Devices::IsoSpeedPreset value {}; - check_hresult(static_cast(static_cast(*this))->get_Preset(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl)->get_Preset(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IIsoSpeedControl::SetPresetAsync(Windows::Media::Devices::IsoSpeedPreset preset) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPresetAsync(preset, put(asyncInfo))); + check_hresult(WINRT_SHIM(IIsoSpeedControl)->abi_SetPresetAsync(preset, put_abi(asyncInfo))); return asyncInfo; } template uint32_t impl_IIsoSpeedControl2::Min() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->get_Min(&value)); return value; } template uint32_t impl_IIsoSpeedControl2::Max() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->get_Max(&value)); return value; } template uint32_t impl_IIsoSpeedControl2::Step() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->get_Step(&value)); return value; } template uint32_t impl_IIsoSpeedControl2::Value() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->get_Value(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IIsoSpeedControl2::SetValueAsync(uint32_t isoSpeed) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(isoSpeed, put(asyncInfo))); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->abi_SetValueAsync(isoSpeed, put_abi(asyncInfo))); return asyncInfo; } template bool impl_IIsoSpeedControl2::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->get_Auto(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IIsoSpeedControl2::SetAutoAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetAutoAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IIsoSpeedControl2)->abi_SetAutoAsync(put_abi(asyncInfo))); return asyncInfo; } template bool impl_IWhiteBalanceControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Supported(&value)); return value; } template Windows::Media::Devices::ColorTemperaturePreset impl_IWhiteBalanceControl::Preset() const { Windows::Media::Devices::ColorTemperaturePreset value {}; - check_hresult(static_cast(static_cast(*this))->get_Preset(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Preset(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IWhiteBalanceControl::SetPresetAsync(Windows::Media::Devices::ColorTemperaturePreset preset) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPresetAsync(preset, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->abi_SetPresetAsync(preset, put_abi(asyncInfo))); return asyncInfo; } template uint32_t impl_IWhiteBalanceControl::Min() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Min(&value)); return value; } template uint32_t impl_IWhiteBalanceControl::Max() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Max(&value)); return value; } template uint32_t impl_IWhiteBalanceControl::Step() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Step(&value)); return value; } template uint32_t impl_IWhiteBalanceControl::Value() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->get_Value(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IWhiteBalanceControl::SetValueAsync(uint32_t temperature) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(temperature, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWhiteBalanceControl)->abi_SetValueAsync(temperature, put_abi(asyncInfo))); return asyncInfo; } template bool impl_IExposureControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IExposureControl)->get_Supported(&value)); return value; } template bool impl_IExposureControl::Auto() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Auto(&value)); + check_hresult(WINRT_SHIM(IExposureControl)->get_Auto(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IExposureControl::SetAutoAsync(bool value) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetAutoAsync(value, put(asyncInfo))); + check_hresult(WINRT_SHIM(IExposureControl)->abi_SetAutoAsync(value, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::TimeSpan impl_IExposureControl::Min() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(put(value))); + check_hresult(WINRT_SHIM(IExposureControl)->get_Min(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IExposureControl::Max() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(put(value))); + check_hresult(WINRT_SHIM(IExposureControl)->get_Max(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IExposureControl::Step() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(put(value))); + check_hresult(WINRT_SHIM(IExposureControl)->get_Step(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IExposureControl::Value() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IExposureControl)->get_Value(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IExposureControl::SetValueAsync(const Windows::Foundation::TimeSpan & shutterDuration) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(get(shutterDuration), put(asyncInfo))); + check_hresult(WINRT_SHIM(IExposureControl)->abi_SetValueAsync(get_abi(shutterDuration), put_abi(asyncInfo))); return asyncInfo; } template Windows::Media::Devices::ZoomTransitionMode impl_IZoomSettings::Mode() const { Windows::Media::Devices::ZoomTransitionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IZoomSettings)->get_Mode(&value)); return value; } template void impl_IZoomSettings::Mode(Windows::Media::Devices::ZoomTransitionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IZoomSettings)->put_Mode(value)); } template float impl_IZoomSettings::Value() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IZoomSettings)->get_Value(&value)); return value; } template void impl_IZoomSettings::Value(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IZoomSettings)->put_Value(value)); } template bool impl_IZoomControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IZoomControl)->get_Supported(&value)); return value; } template float impl_IZoomControl::Min() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IZoomControl)->get_Min(&value)); return value; } template float impl_IZoomControl::Max() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IZoomControl)->get_Max(&value)); return value; } template float impl_IZoomControl::Step() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IZoomControl)->get_Step(&value)); return value; } template float impl_IZoomControl::Value() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IZoomControl)->get_Value(&value)); return value; } template void impl_IZoomControl::Value(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IZoomControl)->put_Value(value)); } template Windows::Foundation::Collections::IVectorView impl_IZoomControl2::SupportedModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedModes(put(value))); + check_hresult(WINRT_SHIM(IZoomControl2)->get_SupportedModes(put_abi(value))); return value; } template Windows::Media::Devices::ZoomTransitionMode impl_IZoomControl2::Mode() const { Windows::Media::Devices::ZoomTransitionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IZoomControl2)->get_Mode(&value)); return value; } template void impl_IZoomControl2::Configure(const Windows::Media::Devices::ZoomSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_Configure(get(settings))); + check_hresult(WINRT_SHIM(IZoomControl2)->abi_Configure(get_abi(settings))); } template Windows::Media::Devices::FocusMode impl_IFocusSettings::Mode() const { Windows::Media::Devices::FocusMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IFocusSettings)->get_Mode(&value)); return value; } template void impl_IFocusSettings::Mode(Windows::Media::Devices::FocusMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IFocusSettings)->put_Mode(value)); } template Windows::Media::Devices::AutoFocusRange impl_IFocusSettings::AutoFocusRange() const { Windows::Media::Devices::AutoFocusRange value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoFocusRange(&value)); + check_hresult(WINRT_SHIM(IFocusSettings)->get_AutoFocusRange(&value)); return value; } template void impl_IFocusSettings::AutoFocusRange(Windows::Media::Devices::AutoFocusRange value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoFocusRange(value)); + check_hresult(WINRT_SHIM(IFocusSettings)->put_AutoFocusRange(value)); } template Windows::Foundation::IReference impl_IFocusSettings::Value() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IFocusSettings)->get_Value(put_abi(value))); return value; } -template void impl_IFocusSettings::Value(const Windows::Foundation::IReference & value) const +template void impl_IFocusSettings::Value(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IFocusSettings)->put_Value(get_abi(value))); } template Windows::Foundation::IReference impl_IFocusSettings::Distance() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Distance(put(value))); + check_hresult(WINRT_SHIM(IFocusSettings)->get_Distance(put_abi(value))); return value; } -template void impl_IFocusSettings::Distance(const Windows::Foundation::IReference & value) const +template void impl_IFocusSettings::Distance(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Distance(get(value))); + check_hresult(WINRT_SHIM(IFocusSettings)->put_Distance(get_abi(value))); } template bool impl_IFocusSettings::WaitForFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_WaitForFocus(&value)); + check_hresult(WINRT_SHIM(IFocusSettings)->get_WaitForFocus(&value)); return value; } template void impl_IFocusSettings::WaitForFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_WaitForFocus(value)); + check_hresult(WINRT_SHIM(IFocusSettings)->put_WaitForFocus(value)); } template bool impl_IFocusSettings::DisableDriverFallback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DisableDriverFallback(&value)); + check_hresult(WINRT_SHIM(IFocusSettings)->get_DisableDriverFallback(&value)); return value; } template void impl_IFocusSettings::DisableDriverFallback(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DisableDriverFallback(value)); + check_hresult(WINRT_SHIM(IFocusSettings)->put_DisableDriverFallback(value)); } template bool impl_IFocusControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Supported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IFocusControl::SupportedPresets() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedPresets(put(value))); + check_hresult(WINRT_SHIM(IFocusControl)->get_SupportedPresets(put_abi(value))); return value; } template Windows::Media::Devices::FocusPreset impl_IFocusControl::Preset() const { Windows::Media::Devices::FocusPreset value {}; - check_hresult(static_cast(static_cast(*this))->get_Preset(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Preset(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IFocusControl::SetPresetAsync(Windows::Media::Devices::FocusPreset preset) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPresetAsync(preset, put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl)->abi_SetPresetAsync(preset, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IFocusControl::SetPresetAsync(Windows::Media::Devices::FocusPreset preset, bool completeBeforeFocus) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPresetWithCompletionOptionAsync(preset, completeBeforeFocus, put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl)->abi_SetPresetWithCompletionOptionAsync(preset, completeBeforeFocus, put_abi(asyncInfo))); return asyncInfo; } template uint32_t impl_IFocusControl::Min() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Min(&value)); return value; } template uint32_t impl_IFocusControl::Max() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Max(&value)); return value; } template uint32_t impl_IFocusControl::Step() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Step(&value)); return value; } template uint32_t impl_IFocusControl::Value() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IFocusControl)->get_Value(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IFocusControl::SetValueAsync(uint32_t focus) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetValueAsync(focus, put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl)->abi_SetValueAsync(focus, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IFocusControl::FocusAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FocusAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl)->abi_FocusAsync(put_abi(asyncInfo))); return asyncInfo; } template bool impl_IFocusControl2::FocusChangedSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_FocusChangedSupported(&value)); + check_hresult(WINRT_SHIM(IFocusControl2)->get_FocusChangedSupported(&value)); return value; } template bool impl_IFocusControl2::WaitForFocusSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_WaitForFocusSupported(&value)); + check_hresult(WINRT_SHIM(IFocusControl2)->get_WaitForFocusSupported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IFocusControl2::SupportedFocusModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedFocusModes(put(value))); + check_hresult(WINRT_SHIM(IFocusControl2)->get_SupportedFocusModes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IFocusControl2::SupportedFocusDistances() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedFocusDistances(put(value))); + check_hresult(WINRT_SHIM(IFocusControl2)->get_SupportedFocusDistances(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IFocusControl2::SupportedFocusRanges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedFocusRanges(put(value))); + check_hresult(WINRT_SHIM(IFocusControl2)->get_SupportedFocusRanges(put_abi(value))); return value; } template Windows::Media::Devices::FocusMode impl_IFocusControl2::Mode() const { Windows::Media::Devices::FocusMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IFocusControl2)->get_Mode(&value)); return value; } template Windows::Media::Devices::MediaCaptureFocusState impl_IFocusControl2::FocusState() const { Windows::Media::Devices::MediaCaptureFocusState value {}; - check_hresult(static_cast(static_cast(*this))->get_FocusState(&value)); + check_hresult(WINRT_SHIM(IFocusControl2)->get_FocusState(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IFocusControl2::UnlockAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_UnlockAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl2)->abi_UnlockAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IFocusControl2::LockAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_LockAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IFocusControl2)->abi_LockAsync(put_abi(asyncInfo))); return asyncInfo; } template void impl_IFocusControl2::Configure(const Windows::Media::Devices::FocusSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_Configure(get(settings))); + check_hresult(WINRT_SHIM(IFocusControl2)->abi_Configure(get_abi(settings))); } template bool impl_IRegionOfInterest::AutoFocusEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoFocusEnabled(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->get_AutoFocusEnabled(&value)); return value; } template void impl_IRegionOfInterest::AutoFocusEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoFocusEnabled(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->put_AutoFocusEnabled(value)); } template bool impl_IRegionOfInterest::AutoWhiteBalanceEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoWhiteBalanceEnabled(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->get_AutoWhiteBalanceEnabled(&value)); return value; } template void impl_IRegionOfInterest::AutoWhiteBalanceEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoWhiteBalanceEnabled(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->put_AutoWhiteBalanceEnabled(value)); } template bool impl_IRegionOfInterest::AutoExposureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoExposureEnabled(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->get_AutoExposureEnabled(&value)); return value; } template void impl_IRegionOfInterest::AutoExposureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoExposureEnabled(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest)->put_AutoExposureEnabled(value)); } template Windows::Foundation::Rect impl_IRegionOfInterest::Bounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(IRegionOfInterest)->get_Bounds(put_abi(value))); return value; } template void impl_IRegionOfInterest::Bounds(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_Bounds(get(value))); + check_hresult(WINRT_SHIM(IRegionOfInterest)->put_Bounds(get_abi(value))); } template Windows::Media::Devices::RegionOfInterestType impl_IRegionOfInterest2::Type() const { Windows::Media::Devices::RegionOfInterestType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->get_Type(&value)); return value; } template void impl_IRegionOfInterest2::Type(Windows::Media::Devices::RegionOfInterestType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->put_Type(value)); } template bool impl_IRegionOfInterest2::BoundsNormalized() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BoundsNormalized(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->get_BoundsNormalized(&value)); return value; } template void impl_IRegionOfInterest2::BoundsNormalized(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BoundsNormalized(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->put_BoundsNormalized(value)); } template uint32_t impl_IRegionOfInterest2::Weight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Weight(&value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->get_Weight(&value)); return value; } template void impl_IRegionOfInterest2::Weight(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Weight(value)); + check_hresult(WINRT_SHIM(IRegionOfInterest2)->put_Weight(value)); } template uint32_t impl_IRegionsOfInterestControl::MaxRegions() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxRegions(&value)); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->get_MaxRegions(&value)); return value; } -template Windows::Foundation::IAsyncAction impl_IRegionsOfInterestControl::SetRegionsAsync(const Windows::Foundation::Collections::IIterable & regions) const +template Windows::Foundation::IAsyncAction impl_IRegionsOfInterestControl::SetRegionsAsync(iterable regions) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetRegionsAsync(get(regions), put(asyncInfo))); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->abi_SetRegionsAsync(get_abi(regions), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IRegionsOfInterestControl::SetRegionsAsync(const Windows::Foundation::Collections::IIterable & regions, bool lockValues) const +template Windows::Foundation::IAsyncAction impl_IRegionsOfInterestControl::SetRegionsAsync(iterable regions, bool lockValues) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetRegionsWithLockAsync(get(regions), lockValues, put(asyncInfo))); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->abi_SetRegionsWithLockAsync(get_abi(regions), lockValues, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IRegionsOfInterestControl::ClearRegionsAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ClearRegionsAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->abi_ClearRegionsAsync(put_abi(asyncInfo))); return asyncInfo; } template bool impl_IRegionsOfInterestControl::AutoFocusSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoFocusSupported(&value)); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->get_AutoFocusSupported(&value)); return value; } template bool impl_IRegionsOfInterestControl::AutoWhiteBalanceSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoWhiteBalanceSupported(&value)); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->get_AutoWhiteBalanceSupported(&value)); return value; } template bool impl_IRegionsOfInterestControl::AutoExposureSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoExposureSupported(&value)); + check_hresult(WINRT_SHIM(IRegionsOfInterestControl)->get_AutoExposureSupported(&value)); return value; } template bool impl_IExposurePriorityVideoControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IExposurePriorityVideoControl)->get_Supported(&value)); return value; } template bool impl_IExposurePriorityVideoControl::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IExposurePriorityVideoControl)->get_Enabled(&value)); return value; } template void impl_IExposurePriorityVideoControl::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IExposurePriorityVideoControl)->put_Enabled(value)); } template bool impl_IHdrVideoControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IHdrVideoControl)->get_Supported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IHdrVideoControl::SupportedModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedModes(put(value))); + check_hresult(WINRT_SHIM(IHdrVideoControl)->get_SupportedModes(put_abi(value))); return value; } template Windows::Media::Devices::HdrVideoMode impl_IHdrVideoControl::Mode() const { Windows::Media::Devices::HdrVideoMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IHdrVideoControl)->get_Mode(&value)); return value; } template void impl_IHdrVideoControl::Mode(Windows::Media::Devices::HdrVideoMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IHdrVideoControl)->put_Mode(value)); } template Windows::Media::Devices::AdvancedPhotoMode impl_IAdvancedPhotoCaptureSettings::Mode() const { Windows::Media::Devices::AdvancedPhotoMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCaptureSettings)->get_Mode(&value)); return value; } template void impl_IAdvancedPhotoCaptureSettings::Mode(Windows::Media::Devices::AdvancedPhotoMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IAdvancedPhotoCaptureSettings)->put_Mode(value)); } template bool impl_IAdvancedPhotoControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IAdvancedPhotoControl)->get_Supported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IAdvancedPhotoControl::SupportedModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedModes(put(value))); + check_hresult(WINRT_SHIM(IAdvancedPhotoControl)->get_SupportedModes(put_abi(value))); return value; } template Windows::Media::Devices::AdvancedPhotoMode impl_IAdvancedPhotoControl::Mode() const { Windows::Media::Devices::AdvancedPhotoMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IAdvancedPhotoControl)->get_Mode(&value)); return value; } template void impl_IAdvancedPhotoControl::Configure(const Windows::Media::Devices::AdvancedPhotoCaptureSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_Configure(get(settings))); + check_hresult(WINRT_SHIM(IAdvancedPhotoControl)->abi_Configure(get_abi(settings))); } template bool impl_IOpticalImageStabilizationControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IOpticalImageStabilizationControl)->get_Supported(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IOpticalImageStabilizationControl::SupportedModes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedModes(put(value))); + check_hresult(WINRT_SHIM(IOpticalImageStabilizationControl)->get_SupportedModes(put_abi(value))); return value; } template Windows::Media::Devices::OpticalImageStabilizationMode impl_IOpticalImageStabilizationControl::Mode() const { Windows::Media::Devices::OpticalImageStabilizationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IOpticalImageStabilizationControl)->get_Mode(&value)); return value; } template void impl_IOpticalImageStabilizationControl::Mode(Windows::Media::Devices::OpticalImageStabilizationMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IOpticalImageStabilizationControl)->put_Mode(value)); } template Windows::Foundation::Collections::IVectorView impl_IMediaDeviceController::GetAvailableMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetAvailableMediaStreamProperties(mediaStreamType, put(value))); + check_hresult(WINRT_SHIM(IMediaDeviceController)->abi_GetAvailableMediaStreamProperties(mediaStreamType, put_abi(value))); return value; } template Windows::Media::MediaProperties::IMediaEncodingProperties impl_IMediaDeviceController::GetMediaStreamProperties(Windows::Media::Capture::MediaStreamType mediaStreamType) const { Windows::Media::MediaProperties::IMediaEncodingProperties value; - check_hresult(static_cast(static_cast(*this))->abi_GetMediaStreamProperties(mediaStreamType, put(value))); + check_hresult(WINRT_SHIM(IMediaDeviceController)->abi_GetMediaStreamProperties(mediaStreamType, put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IMediaDeviceController::SetMediaStreamPropertiesAsync(Windows::Media::Capture::MediaStreamType mediaStreamType, const Windows::Media::MediaProperties::IMediaEncodingProperties & mediaEncodingProperties) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetMediaStreamPropertiesAsync(mediaStreamType, get(mediaEncodingProperties), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMediaDeviceController)->abi_SetMediaStreamPropertiesAsync(mediaStreamType, get_abi(mediaEncodingProperties), put_abi(asyncInfo))); return asyncInfo; } template void impl_IAudioDeviceController::Muted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Muted(value)); + check_hresult(WINRT_SHIM(IAudioDeviceController)->put_Muted(value)); } template bool impl_IAudioDeviceController::Muted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Muted(&value)); + check_hresult(WINRT_SHIM(IAudioDeviceController)->get_Muted(&value)); return value; } template void impl_IAudioDeviceController::VolumePercent(float value) const { - check_hresult(static_cast(static_cast(*this))->put_VolumePercent(value)); + check_hresult(WINRT_SHIM(IAudioDeviceController)->put_VolumePercent(value)); } template float impl_IAudioDeviceController::VolumePercent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_VolumePercent(&value)); + check_hresult(WINRT_SHIM(IAudioDeviceController)->get_VolumePercent(&value)); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Brightness() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Brightness(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Brightness(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Contrast() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contrast(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Contrast(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Hue() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Hue(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Hue(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::WhiteBalance() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WhiteBalance(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_WhiteBalance(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::BacklightCompensation() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BacklightCompensation(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_BacklightCompensation(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Pan() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pan(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Pan(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Tilt() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Tilt(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Tilt(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Zoom() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Zoom(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Zoom(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Roll() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Roll(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Roll(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Exposure() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Exposure(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Exposure(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControl impl_IVideoDeviceController::Focus() const { Windows::Media::Devices::MediaDeviceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Focus(put(value))); + check_hresult(WINRT_SHIM(IVideoDeviceController)->get_Focus(put_abi(value))); return value; } template bool impl_IVideoDeviceController::TrySetPowerlineFrequency(Windows::Media::Capture::PowerlineFrequency value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetPowerlineFrequency(value, &succeeded)); + check_hresult(WINRT_SHIM(IVideoDeviceController)->abi_TrySetPowerlineFrequency(value, &succeeded)); return succeeded; } template bool impl_IVideoDeviceController::TryGetPowerlineFrequency(Windows::Media::Capture::PowerlineFrequency & value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPowerlineFrequency(&value, &succeeded)); + check_hresult(WINRT_SHIM(IVideoDeviceController)->abi_TryGetPowerlineFrequency(&value, &succeeded)); return succeeded; } template Windows::Media::Devices::LowLagPhotoSequenceControl impl_IAdvancedVideoCaptureDeviceController2::LowLagPhotoSequence() const { Windows::Media::Devices::LowLagPhotoSequenceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LowLagPhotoSequence(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_LowLagPhotoSequence(put_abi(value))); return value; } template Windows::Media::Devices::LowLagPhotoControl impl_IAdvancedVideoCaptureDeviceController2::LowLagPhoto() const { Windows::Media::Devices::LowLagPhotoControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LowLagPhoto(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_LowLagPhoto(put_abi(value))); return value; } template Windows::Media::Devices::SceneModeControl impl_IAdvancedVideoCaptureDeviceController2::SceneModeControl() const { Windows::Media::Devices::SceneModeControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SceneModeControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_SceneModeControl(put_abi(value))); return value; } template Windows::Media::Devices::TorchControl impl_IAdvancedVideoCaptureDeviceController2::TorchControl() const { Windows::Media::Devices::TorchControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TorchControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_TorchControl(put_abi(value))); return value; } template Windows::Media::Devices::FlashControl impl_IAdvancedVideoCaptureDeviceController2::FlashControl() const { Windows::Media::Devices::FlashControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlashControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_FlashControl(put_abi(value))); return value; } template Windows::Media::Devices::WhiteBalanceControl impl_IAdvancedVideoCaptureDeviceController2::WhiteBalanceControl() const { Windows::Media::Devices::WhiteBalanceControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WhiteBalanceControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_WhiteBalanceControl(put_abi(value))); return value; } template Windows::Media::Devices::ExposureControl impl_IAdvancedVideoCaptureDeviceController2::ExposureControl() const { Windows::Media::Devices::ExposureControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposureControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_ExposureControl(put_abi(value))); return value; } template Windows::Media::Devices::FocusControl impl_IAdvancedVideoCaptureDeviceController2::FocusControl() const { Windows::Media::Devices::FocusControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_FocusControl(put_abi(value))); return value; } template Windows::Media::Devices::ExposureCompensationControl impl_IAdvancedVideoCaptureDeviceController2::ExposureCompensationControl() const { Windows::Media::Devices::ExposureCompensationControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposureCompensationControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_ExposureCompensationControl(put_abi(value))); return value; } template Windows::Media::Devices::IsoSpeedControl impl_IAdvancedVideoCaptureDeviceController2::IsoSpeedControl() const { Windows::Media::Devices::IsoSpeedControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsoSpeedControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_IsoSpeedControl(put_abi(value))); return value; } template Windows::Media::Devices::RegionsOfInterestControl impl_IAdvancedVideoCaptureDeviceController2::RegionsOfInterestControl() const { Windows::Media::Devices::RegionsOfInterestControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RegionsOfInterestControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_RegionsOfInterestControl(put_abi(value))); return value; } template Windows::Media::Devices::CaptureUse impl_IAdvancedVideoCaptureDeviceController2::PrimaryUse() const { Windows::Media::Devices::CaptureUse value {}; - check_hresult(static_cast(static_cast(*this))->get_PrimaryUse(&value)); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->get_PrimaryUse(&value)); return value; } template void impl_IAdvancedVideoCaptureDeviceController2::PrimaryUse(Windows::Media::Devices::CaptureUse value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryUse(value)); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController2)->put_PrimaryUse(value)); } template Windows::Media::Devices::Core::VariablePhotoSequenceController impl_IAdvancedVideoCaptureDeviceController3::VariablePhotoSequenceController() const { Windows::Media::Devices::Core::VariablePhotoSequenceController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VariablePhotoSequenceController(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController3)->get_VariablePhotoSequenceController(put_abi(value))); return value; } template Windows::Media::Devices::PhotoConfirmationControl impl_IAdvancedVideoCaptureDeviceController3::PhotoConfirmationControl() const { Windows::Media::Devices::PhotoConfirmationControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PhotoConfirmationControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController3)->get_PhotoConfirmationControl(put_abi(value))); return value; } template Windows::Media::Devices::ZoomControl impl_IAdvancedVideoCaptureDeviceController3::ZoomControl() const { Windows::Media::Devices::ZoomControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController3)->get_ZoomControl(put_abi(value))); return value; } template Windows::Media::Devices::ExposurePriorityVideoControl impl_IAdvancedVideoCaptureDeviceController4::ExposurePriorityVideoControl() const { Windows::Media::Devices::ExposurePriorityVideoControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExposurePriorityVideoControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->get_ExposurePriorityVideoControl(put_abi(value))); return value; } template Windows::Media::Devices::MediaCaptureOptimization impl_IAdvancedVideoCaptureDeviceController4::DesiredOptimization() const { Windows::Media::Devices::MediaCaptureOptimization value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredOptimization(&value)); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->get_DesiredOptimization(&value)); return value; } template void impl_IAdvancedVideoCaptureDeviceController4::DesiredOptimization(Windows::Media::Devices::MediaCaptureOptimization value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredOptimization(value)); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->put_DesiredOptimization(value)); } template Windows::Media::Devices::HdrVideoControl impl_IAdvancedVideoCaptureDeviceController4::HdrVideoControl() const { Windows::Media::Devices::HdrVideoControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HdrVideoControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->get_HdrVideoControl(put_abi(value))); return value; } template Windows::Media::Devices::OpticalImageStabilizationControl impl_IAdvancedVideoCaptureDeviceController4::OpticalImageStabilizationControl() const { Windows::Media::Devices::OpticalImageStabilizationControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OpticalImageStabilizationControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->get_OpticalImageStabilizationControl(put_abi(value))); return value; } template Windows::Media::Devices::AdvancedPhotoControl impl_IAdvancedVideoCaptureDeviceController4::AdvancedPhotoControl() const { Windows::Media::Devices::AdvancedPhotoControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AdvancedPhotoControl(put(value))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController4)->get_AdvancedPhotoControl(put_abi(value))); return value; } template Windows::Media::Devices::MediaDeviceControlCapabilities impl_IMediaDeviceControl::Capabilities() const { Windows::Media::Devices::MediaDeviceControlCapabilities value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Capabilities(put(value))); + check_hresult(WINRT_SHIM(IMediaDeviceControl)->get_Capabilities(put_abi(value))); return value; } template bool impl_IMediaDeviceControl::TryGetValue(double & value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetValue(&value, &succeeded)); + check_hresult(WINRT_SHIM(IMediaDeviceControl)->abi_TryGetValue(&value, &succeeded)); return succeeded; } template bool impl_IMediaDeviceControl::TrySetValue(double value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetValue(value, &succeeded)); + check_hresult(WINRT_SHIM(IMediaDeviceControl)->abi_TrySetValue(value, &succeeded)); return succeeded; } template bool impl_IMediaDeviceControl::TryGetAuto(bool & value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetAuto(&value, &succeeded)); + check_hresult(WINRT_SHIM(IMediaDeviceControl)->abi_TryGetAuto(&value, &succeeded)); return succeeded; } template bool impl_IMediaDeviceControl::TrySetAuto(bool value) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetAuto(value, &succeeded)); + check_hresult(WINRT_SHIM(IMediaDeviceControl)->abi_TrySetAuto(value, &succeeded)); return succeeded; } template bool impl_IMediaDeviceControlCapabilities::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_Supported(&value)); return value; } template double impl_IMediaDeviceControlCapabilities::Min() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Min(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_Min(&value)); return value; } template double impl_IMediaDeviceControlCapabilities::Max() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Max(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_Max(&value)); return value; } template double impl_IMediaDeviceControlCapabilities::Step() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Step(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_Step(&value)); return value; } template double impl_IMediaDeviceControlCapabilities::Default() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Default(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_Default(&value)); return value; } template bool impl_IMediaDeviceControlCapabilities::AutoModeSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoModeSupported(&value)); + check_hresult(WINRT_SHIM(IMediaDeviceControlCapabilities)->get_AutoModeSupported(&value)); return value; } -template void impl_IAdvancedVideoCaptureDeviceController::SetDeviceProperty(hstring_ref propertyId, const Windows::IInspectable & propertyValue) const +template void impl_IAdvancedVideoCaptureDeviceController::SetDeviceProperty(hstring_view propertyId, const Windows::Foundation::IInspectable & propertyValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDeviceProperty(get(propertyId), get(propertyValue))); + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController)->abi_SetDeviceProperty(get_abi(propertyId), get_abi(propertyValue))); } -template Windows::IInspectable impl_IAdvancedVideoCaptureDeviceController::GetDeviceProperty(hstring_ref propertyId) const +template Windows::Foundation::IInspectable impl_IAdvancedVideoCaptureDeviceController::GetDeviceProperty(hstring_view propertyId) const { - Windows::IInspectable propertyValue; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceProperty(get(propertyId), put(propertyValue))); + Windows::Foundation::IInspectable propertyValue; + check_hresult(WINRT_SHIM(IAdvancedVideoCaptureDeviceController)->abi_GetDeviceProperty(get_abi(propertyId), put_abi(propertyValue))); return propertyValue; } template bool impl_ILowLagPhotoSequenceControl::Supported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_Supported(&value)); return value; } template uint32_t impl_ILowLagPhotoSequenceControl::MaxPastPhotos() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPastPhotos(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_MaxPastPhotos(&value)); return value; } template float impl_ILowLagPhotoSequenceControl::MaxPhotosPerSecond() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPhotosPerSecond(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_MaxPhotosPerSecond(&value)); return value; } template uint32_t impl_ILowLagPhotoSequenceControl::PastPhotoLimit() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PastPhotoLimit(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_PastPhotoLimit(&value)); return value; } template void impl_ILowLagPhotoSequenceControl::PastPhotoLimit(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PastPhotoLimit(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->put_PastPhotoLimit(value)); } template float impl_ILowLagPhotoSequenceControl::PhotosPerSecondLimit() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosPerSecondLimit(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_PhotosPerSecondLimit(&value)); return value; } template void impl_ILowLagPhotoSequenceControl::PhotosPerSecondLimit(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PhotosPerSecondLimit(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->put_PhotosPerSecondLimit(value)); } template Windows::Media::MediaProperties::MediaRatio impl_ILowLagPhotoSequenceControl::GetHighestConcurrentFrameRate(const Windows::Media::MediaProperties::IMediaEncodingProperties & captureProperties) const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetHighestConcurrentFrameRate(get(captureProperties), put(value))); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->abi_GetHighestConcurrentFrameRate(get_abi(captureProperties), put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_ILowLagPhotoSequenceControl::GetCurrentFrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentFrameRate(put(value))); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->abi_GetCurrentFrameRate(put_abi(value))); return value; } template bool impl_ILowLagPhotoSequenceControl::ThumbnailEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ThumbnailEnabled(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_ThumbnailEnabled(&value)); return value; } template void impl_ILowLagPhotoSequenceControl::ThumbnailEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ThumbnailEnabled(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->put_ThumbnailEnabled(value)); } template Windows::Media::MediaProperties::MediaThumbnailFormat impl_ILowLagPhotoSequenceControl::ThumbnailFormat() const { Windows::Media::MediaProperties::MediaThumbnailFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_ThumbnailFormat(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_ThumbnailFormat(&value)); return value; } template void impl_ILowLagPhotoSequenceControl::ThumbnailFormat(Windows::Media::MediaProperties::MediaThumbnailFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_ThumbnailFormat(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->put_ThumbnailFormat(value)); } template uint32_t impl_ILowLagPhotoSequenceControl::DesiredThumbnailSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredThumbnailSize(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_DesiredThumbnailSize(&value)); return value; } template void impl_ILowLagPhotoSequenceControl::DesiredThumbnailSize(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredThumbnailSize(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->put_DesiredThumbnailSize(value)); } template uint32_t impl_ILowLagPhotoSequenceControl::HardwareAcceleratedThumbnailSupported() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareAcceleratedThumbnailSupported(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoSequenceControl)->get_HardwareAcceleratedThumbnailSupported(&value)); return value; } template Windows::Media::MediaProperties::MediaRatio impl_ILowLagPhotoControl::GetHighestConcurrentFrameRate(const Windows::Media::MediaProperties::IMediaEncodingProperties & captureProperties) const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetHighestConcurrentFrameRate(get(captureProperties), put(value))); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->abi_GetHighestConcurrentFrameRate(get_abi(captureProperties), put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_ILowLagPhotoControl::GetCurrentFrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentFrameRate(put(value))); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->abi_GetCurrentFrameRate(put_abi(value))); return value; } template bool impl_ILowLagPhotoControl::ThumbnailEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ThumbnailEnabled(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->get_ThumbnailEnabled(&value)); return value; } template void impl_ILowLagPhotoControl::ThumbnailEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ThumbnailEnabled(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->put_ThumbnailEnabled(value)); } template Windows::Media::MediaProperties::MediaThumbnailFormat impl_ILowLagPhotoControl::ThumbnailFormat() const { Windows::Media::MediaProperties::MediaThumbnailFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_ThumbnailFormat(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->get_ThumbnailFormat(&value)); return value; } template void impl_ILowLagPhotoControl::ThumbnailFormat(Windows::Media::MediaProperties::MediaThumbnailFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_ThumbnailFormat(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->put_ThumbnailFormat(value)); } template uint32_t impl_ILowLagPhotoControl::DesiredThumbnailSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredThumbnailSize(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->get_DesiredThumbnailSize(&value)); return value; } template void impl_ILowLagPhotoControl::DesiredThumbnailSize(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredThumbnailSize(value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->put_DesiredThumbnailSize(value)); } template uint32_t impl_ILowLagPhotoControl::HardwareAcceleratedThumbnailSupported() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareAcceleratedThumbnailSupported(&value)); + check_hresult(WINRT_SHIM(ILowLagPhotoControl)->get_HardwareAcceleratedThumbnailSupported(&value)); return value; } template bool impl_IPhotoConfirmationControl::Supported() const { bool pbSupported {}; - check_hresult(static_cast(static_cast(*this))->get_Supported(&pbSupported)); + check_hresult(WINRT_SHIM(IPhotoConfirmationControl)->get_Supported(&pbSupported)); return pbSupported; } template bool impl_IPhotoConfirmationControl::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IPhotoConfirmationControl)->get_Enabled(&value)); return value; } template void impl_IPhotoConfirmationControl::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IPhotoConfirmationControl)->put_Enabled(value)); } template Windows::Media::MediaProperties::MediaPixelFormat impl_IPhotoConfirmationControl::PixelFormat() const { Windows::Media::MediaProperties::MediaPixelFormat format {}; - check_hresult(static_cast(static_cast(*this))->get_PixelFormat(&format)); + check_hresult(WINRT_SHIM(IPhotoConfirmationControl)->get_PixelFormat(&format)); return format; } template void impl_IPhotoConfirmationControl::PixelFormat(Windows::Media::MediaProperties::MediaPixelFormat format) const { - check_hresult(static_cast(static_cast(*this))->put_PixelFormat(format)); + check_hresult(WINRT_SHIM(IPhotoConfirmationControl)->put_PixelFormat(format)); } template void impl_IDialRequestedEventArgs::Handled() const { - check_hresult(static_cast(static_cast(*this))->abi_Handled()); + check_hresult(WINRT_SHIM(IDialRequestedEventArgs)->abi_Handled()); } -template Windows::IInspectable impl_IDialRequestedEventArgs::Contact() const +template Windows::Foundation::IInspectable impl_IDialRequestedEventArgs::Contact() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDialRequestedEventArgs)->get_Contact(put_abi(value))); return value; } template void impl_IRedialRequestedEventArgs::Handled() const { - check_hresult(static_cast(static_cast(*this))->abi_Handled()); + check_hresult(WINRT_SHIM(IRedialRequestedEventArgs)->abi_Handled()); } template Windows::Media::Devices::TelephonyKey impl_IKeypadPressedEventArgs::TelephonyKey() const { Windows::Media::Devices::TelephonyKey telephonyKey {}; - check_hresult(static_cast(static_cast(*this))->get_TelephonyKey(&telephonyKey)); + check_hresult(WINRT_SHIM(IKeypadPressedEventArgs)->get_TelephonyKey(&telephonyKey)); return telephonyKey; } -template uint64_t impl_ICallControl::IndicateNewIncomingCall(bool enableRinger, hstring_ref callerId) const +template uint64_t impl_ICallControl::IndicateNewIncomingCall(bool enableRinger, hstring_view callerId) const { uint64_t callToken {}; - check_hresult(static_cast(static_cast(*this))->abi_IndicateNewIncomingCall(enableRinger, get(callerId), &callToken)); + check_hresult(WINRT_SHIM(ICallControl)->abi_IndicateNewIncomingCall(enableRinger, get_abi(callerId), &callToken)); return callToken; } template uint64_t impl_ICallControl::IndicateNewOutgoingCall() const { uint64_t callToken {}; - check_hresult(static_cast(static_cast(*this))->abi_IndicateNewOutgoingCall(&callToken)); + check_hresult(WINRT_SHIM(ICallControl)->abi_IndicateNewOutgoingCall(&callToken)); return callToken; } template void impl_ICallControl::IndicateActiveCall(uint64_t callToken) const { - check_hresult(static_cast(static_cast(*this))->abi_IndicateActiveCall(callToken)); + check_hresult(WINRT_SHIM(ICallControl)->abi_IndicateActiveCall(callToken)); } template void impl_ICallControl::EndCall(uint64_t callToken) const { - check_hresult(static_cast(static_cast(*this))->abi_EndCall(callToken)); + check_hresult(WINRT_SHIM(ICallControl)->abi_EndCall(callToken)); } template bool impl_ICallControl::HasRinger() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasRinger(&value)); + check_hresult(WINRT_SHIM(ICallControl)->get_HasRinger(&value)); return value; } template event_token impl_ICallControl::AnswerRequested(const Windows::Media::Devices::CallControlEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AnswerRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_AnswerRequested(get_abi(handler), &token)); return token; } @@ -5340,13 +5602,13 @@ template event_revoker impl_ICallControl::AnswerRe template void impl_ICallControl::AnswerRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AnswerRequested(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_AnswerRequested(token)); } template event_token impl_ICallControl::HangUpRequested(const Windows::Media::Devices::CallControlEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HangUpRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_HangUpRequested(get_abi(handler), &token)); return token; } @@ -5357,13 +5619,13 @@ template event_revoker impl_ICallControl::HangUpRe template void impl_ICallControl::HangUpRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HangUpRequested(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_HangUpRequested(token)); } template event_token impl_ICallControl::DialRequested(const Windows::Media::Devices::DialRequestedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DialRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_DialRequested(get_abi(handler), &token)); return token; } @@ -5374,13 +5636,13 @@ template event_revoker impl_ICallControl::DialRequ template void impl_ICallControl::DialRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DialRequested(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_DialRequested(token)); } template event_token impl_ICallControl::RedialRequested(const Windows::Media::Devices::RedialRequestedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RedialRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_RedialRequested(get_abi(handler), &token)); return token; } @@ -5391,13 +5653,13 @@ template event_revoker impl_ICallControl::RedialRe template void impl_ICallControl::RedialRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RedialRequested(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_RedialRequested(token)); } template event_token impl_ICallControl::KeypadPressed(const Windows::Media::Devices::KeypadPressedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_KeypadPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_KeypadPressed(get_abi(handler), &token)); return token; } @@ -5408,13 +5670,13 @@ template event_revoker impl_ICallControl::KeypadPr template void impl_ICallControl::KeypadPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_KeypadPressed(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_KeypadPressed(token)); } template event_token impl_ICallControl::AudioTransferRequested(const Windows::Media::Devices::CallControlEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioTransferRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICallControl)->add_AudioTransferRequested(get_abi(handler), &token)); return token; } @@ -5425,20 +5687,20 @@ template event_revoker impl_ICallControl::AudioTra template void impl_ICallControl::AudioTransferRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioTransferRequested(token)); + check_hresult(WINRT_SHIM(ICallControl)->remove_AudioTransferRequested(token)); } template Windows::Media::Devices::CallControl impl_ICallControlStatics::GetDefault() const { Windows::Media::Devices::CallControl callControl { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(callControl))); + check_hresult(WINRT_SHIM(ICallControlStatics)->abi_GetDefault(put_abi(callControl))); return callControl; } -template Windows::Media::Devices::CallControl impl_ICallControlStatics::FromId(hstring_ref deviceId) const +template Windows::Media::Devices::CallControl impl_ICallControlStatics::FromId(hstring_view deviceId) const { Windows::Media::Devices::CallControl callControl { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(deviceId), put(callControl))); + check_hresult(WINRT_SHIM(ICallControlStatics)->abi_FromId(get_abi(deviceId), put_abi(callControl))); return callControl; } @@ -5451,7 +5713,7 @@ inline Windows::Media::Devices::CallControl CallControl::GetDefault() return get_activation_factory().GetDefault(); } -inline Windows::Media::Devices::CallControl CallControl::FromId(hstring_ref deviceId) +inline Windows::Media::Devices::CallControl CallControl::FromId(hstring_view deviceId) { return get_activation_factory().FromId(deviceId); } @@ -5485,12 +5747,12 @@ inline hstring MediaDevice::GetDefaultAudioRenderId(Windows::Media::Devices::Aud return get_activation_factory().GetDefaultAudioRenderId(role); } -inline event_token MediaDevice::DefaultAudioCaptureDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) +inline event_token MediaDevice::DefaultAudioCaptureDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) { return get_activation_factory().DefaultAudioCaptureDeviceChanged(handler); } -inline factory_event_revoker MediaDevice::DefaultAudioCaptureDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) +inline factory_event_revoker MediaDevice::DefaultAudioCaptureDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::Devices::IMediaDeviceStatics::remove_DefaultAudioCaptureDeviceChanged, factory.DefaultAudioCaptureDeviceChanged(handler) }; @@ -5501,12 +5763,12 @@ inline void MediaDevice::DefaultAudioCaptureDeviceChanged(event_token cookie) get_activation_factory().DefaultAudioCaptureDeviceChanged(cookie); } -inline event_token MediaDevice::DefaultAudioRenderDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) +inline event_token MediaDevice::DefaultAudioRenderDeviceChanged(const Windows::Foundation::TypedEventHandler & handler) { return get_activation_factory().DefaultAudioRenderDeviceChanged(handler); } -inline factory_event_revoker MediaDevice::DefaultAudioRenderDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) +inline factory_event_revoker MediaDevice::DefaultAudioRenderDeviceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::Devices::IMediaDeviceStatics::remove_DefaultAudioRenderDeviceChanged, factory.DefaultAudioRenderDeviceChanged(handler) }; @@ -5528,3 +5790,662 @@ inline ZoomSettings::ZoomSettings() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedPhotoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedPhotoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedVideoCaptureDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedVideoCaptureDeviceController2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedVideoCaptureDeviceController3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAdvancedVideoCaptureDeviceController4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IAudioDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ICallControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ICallControlStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IDefaultAudioDeviceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IDialRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IExposureCompensationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IExposureControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IExposurePriorityVideoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IFlashControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IFlashControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IFocusControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IFocusControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IFocusSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IHdrVideoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IIsoSpeedControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IIsoSpeedControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IKeypadPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ILowLagPhotoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ILowLagPhotoSequenceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IMediaDeviceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IMediaDeviceControlCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IMediaDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IMediaDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IOpticalImageStabilizationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IPhotoConfirmationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IRedialRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IRegionOfInterest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IRegionOfInterest2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IRegionsOfInterestControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ISceneModeControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ITorchControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IVideoDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IWhiteBalanceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IZoomControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IZoomControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IZoomSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::AdvancedPhotoCaptureSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::AdvancedPhotoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::AudioDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::CallControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::DefaultAudioCaptureDeviceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::DefaultAudioRenderDeviceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::DialRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ExposureCompensationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ExposureControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ExposurePriorityVideoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::FlashControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::FocusControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::FocusSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::HdrVideoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::IsoSpeedControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::KeypadPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::LowLagPhotoControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::LowLagPhotoSequenceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::MediaDeviceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::MediaDeviceControlCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::OpticalImageStabilizationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::PhotoConfirmationControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::RedialRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::RegionOfInterest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::RegionsOfInterestControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::SceneModeControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::TorchControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::VideoDeviceController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::WhiteBalanceControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ZoomControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Devices::ZoomSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.DialProtocol.h b/10.0.14393.0/winrt/Windows.Media.DialProtocol.h index 886b137b4..8138fcc05 100644 --- a/10.0.14393.0/winrt/Windows.Media.DialProtocol.h +++ b/10.0.14393.0/winrt/Windows.Media.DialProtocol.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AppName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppName()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produce_base appArgument, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestLaunchAsync(impl::abi_arg_in appArgument, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestLaunchAsync(*reinterpret_cast(&appArgument))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestLaunchAsync(*reinterpret_cast(&appArgument))); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -60,11 +66,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_GetAppStateAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAppStateAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAppStateAsync()); return S_OK; } catch (...) @@ -82,7 +89,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FullXml(abi_arg_out value) noexcept override + HRESULT __stdcall get_FullXml(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullXml()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullXml()); return S_OK; } catch (...) @@ -109,11 +118,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -123,11 +133,12 @@ struct produce : produce_base appName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDialApp(impl::abi_arg_in appName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDialApp(*reinterpret_cast(&appName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDialApp(*reinterpret_cast(&appName))); return S_OK; } catch (...) @@ -141,11 +152,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -155,11 +167,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -173,11 +186,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Filter(abi_arg_out value) noexcept override + HRESULT __stdcall get_Filter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Filter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Filter()); return S_OK; } catch (...) @@ -187,11 +201,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Appearance(abi_arg_out value) noexcept override + HRESULT __stdcall get_Appearance(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appearance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appearance()); return S_OK; } catch (...) @@ -201,11 +216,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DialDeviceSelected(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DialDeviceSelected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DialDeviceSelected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DialDeviceSelected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -218,6 +234,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DialDeviceSelected(token); return S_OK; } @@ -227,11 +244,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DisconnectButtonClicked(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DisconnectButtonClicked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DisconnectButtonClicked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DisconnectButtonClicked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -244,6 +262,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DisconnectButtonClicked(token); return S_OK; } @@ -253,11 +272,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DialDevicePickerDismissed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DialDevicePickerDismissed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DialDevicePickerDismissed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DialDevicePickerDismissed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -270,6 +290,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DialDevicePickerDismissed(token); return S_OK; } @@ -279,10 +300,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_Show(abi_arg_in selection) noexcept override + HRESULT __stdcall abi_Show(impl::abi_arg_in selection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection)); return S_OK; } @@ -292,10 +314,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_ShowWithPlacement(abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override + HRESULT __stdcall abi_ShowWithPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection), preferredPlacement); return S_OK; } @@ -305,11 +328,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_PickSingleDialDeviceAsync(abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickSingleDialDeviceAsync(impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -319,11 +343,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_PickSingleDialDeviceAsyncWithPlacement(abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickSingleDialDeviceAsyncWithPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -337,6 +362,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Hide(); return S_OK; } @@ -346,10 +372,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetDisplayStatus(abi_arg_in device, Windows::Media::DialProtocol::DialDeviceDisplayStatus status) noexcept override + HRESULT __stdcall abi_SetDisplayStatus(impl::abi_arg_in device, Windows::Media::DialProtocol::DialDeviceDisplayStatus status) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDisplayStatus(*reinterpret_cast(&device), status); return S_OK; } @@ -363,11 +390,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_SupportedAppNames(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedAppNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedAppNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedAppNames()); return S_OK; } catch (...) @@ -381,11 +409,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_SelectedDialDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedDialDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedDialDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedDialDevice()); return S_OK; } catch (...) @@ -399,11 +428,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_in appName, abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_in appName, impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector(*reinterpret_cast(&appName))); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector(*reinterpret_cast(&appName))); return S_OK; } catch (...) @@ -413,11 +443,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_FromIdAsync(abi_arg_in value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -427,11 +458,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_DeviceInfoSupportsDialAsync(abi_arg_in device, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_DeviceInfoSupportsDialAsync(impl::abi_arg_in device, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DeviceInfoSupportsDialAsync(*reinterpret_cast(&device))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeviceInfoSupportsDialAsync(*reinterpret_cast(&device))); return S_OK; } catch (...) @@ -445,11 +477,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Device(abi_arg_out value) noexcept override + HRESULT __stdcall get_Device(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Device()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Device()); return S_OK; } catch (...) @@ -467,133 +500,133 @@ namespace Windows::Media::DialProtocol { template Windows::Media::DialProtocol::DialAppState impl_IDialAppStateDetails::State() const { Windows::Media::DialProtocol::DialAppState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IDialAppStateDetails)->get_State(&value)); return value; } template hstring impl_IDialAppStateDetails::FullXml() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FullXml(put(value))); + check_hresult(WINRT_SHIM(IDialAppStateDetails)->get_FullXml(put_abi(value))); return value; } template hstring impl_IDialApp::AppName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppName(put(value))); + check_hresult(WINRT_SHIM(IDialApp)->get_AppName(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IDialApp::RequestLaunchAsync(hstring_ref appArgument) const +template Windows::Foundation::IAsyncOperation impl_IDialApp::RequestLaunchAsync(hstring_view appArgument) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestLaunchAsync(get(appArgument), put(value))); + check_hresult(WINRT_SHIM(IDialApp)->abi_RequestLaunchAsync(get_abi(appArgument), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDialApp::StopAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(value))); + check_hresult(WINRT_SHIM(IDialApp)->abi_StopAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDialApp::GetAppStateAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetAppStateAsync(put(value))); + check_hresult(WINRT_SHIM(IDialApp)->abi_GetAppStateAsync(put_abi(value))); return value; } template hstring impl_IDialDevice::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IDialDevice)->get_Id(put_abi(value))); return value; } -template Windows::Media::DialProtocol::DialApp impl_IDialDevice::GetDialApp(hstring_ref appName) const +template Windows::Media::DialProtocol::DialApp impl_IDialDevice::GetDialApp(hstring_view appName) const { Windows::Media::DialProtocol::DialApp value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDialApp(get(appName), put(value))); + check_hresult(WINRT_SHIM(IDialDevice)->abi_GetDialApp(get_abi(appName), put_abi(value))); return value; } template hstring impl_IDialDevice2::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IDialDevice2)->get_FriendlyName(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IDialDevice2::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IDialDevice2)->get_Thumbnail(put_abi(value))); return value; } -template hstring impl_IDialDeviceStatics::GetDeviceSelector(hstring_ref appName) const +template hstring impl_IDialDeviceStatics::GetDeviceSelector(hstring_view appName) const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(get(appName), put(selector))); + check_hresult(WINRT_SHIM(IDialDeviceStatics)->abi_GetDeviceSelector(get_abi(appName), put_abi(selector))); return selector; } -template Windows::Foundation::IAsyncOperation impl_IDialDeviceStatics::FromIdAsync(hstring_ref value) const +template Windows::Foundation::IAsyncOperation impl_IDialDeviceStatics::FromIdAsync(hstring_view value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(IDialDeviceStatics)->abi_FromIdAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDialDeviceStatics::DeviceInfoSupportsDialAsync(const Windows::Devices::Enumeration::DeviceInformation & device) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DeviceInfoSupportsDialAsync(get(device), put(operation))); + check_hresult(WINRT_SHIM(IDialDeviceStatics)->abi_DeviceInfoSupportsDialAsync(get_abi(device), put_abi(operation))); return operation; } template Windows::Media::DialProtocol::DialDevice impl_IDialDeviceSelectedEventArgs::SelectedDialDevice() const { Windows::Media::DialProtocol::DialDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedDialDevice(put(value))); + check_hresult(WINRT_SHIM(IDialDeviceSelectedEventArgs)->get_SelectedDialDevice(put_abi(value))); return value; } template Windows::Media::DialProtocol::DialDevice impl_IDialDisconnectButtonClickedEventArgs::Device() const { Windows::Media::DialProtocol::DialDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Device(put(value))); + check_hresult(WINRT_SHIM(IDialDisconnectButtonClickedEventArgs)->get_Device(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IDialDevicePickerFilter::SupportedAppNames() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedAppNames(put(value))); + check_hresult(WINRT_SHIM(IDialDevicePickerFilter)->get_SupportedAppNames(put_abi(value))); return value; } template Windows::Media::DialProtocol::DialDevicePickerFilter impl_IDialDevicePicker::Filter() const { Windows::Media::DialProtocol::DialDevicePickerFilter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Filter(put(value))); + check_hresult(WINRT_SHIM(IDialDevicePicker)->get_Filter(put_abi(value))); return value; } template Windows::Devices::Enumeration::DevicePickerAppearance impl_IDialDevicePicker::Appearance() const { Windows::Devices::Enumeration::DevicePickerAppearance value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appearance(put(value))); + check_hresult(WINRT_SHIM(IDialDevicePicker)->get_Appearance(put_abi(value))); return value; } template event_token impl_IDialDevicePicker::DialDeviceSelected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DialDeviceSelected(get(handler), &token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->add_DialDeviceSelected(get_abi(handler), &token)); return token; } @@ -604,13 +637,13 @@ template event_revoker impl_IDialDevicePicker template void impl_IDialDevicePicker::DialDeviceSelected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DialDeviceSelected(token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->remove_DialDeviceSelected(token)); } template event_token impl_IDialDevicePicker::DisconnectButtonClicked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DisconnectButtonClicked(get(handler), &token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->add_DisconnectButtonClicked(get_abi(handler), &token)); return token; } @@ -621,66 +654,66 @@ template event_revoker impl_IDialDevicePicker template void impl_IDialDevicePicker::DisconnectButtonClicked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DisconnectButtonClicked(token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->remove_DisconnectButtonClicked(token)); } -template event_token impl_IDialDevicePicker::DialDevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDialDevicePicker::DialDevicePickerDismissed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DialDevicePickerDismissed(get(handler), &token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->add_DialDevicePickerDismissed(get_abi(handler), &token)); return token; } -template event_revoker impl_IDialDevicePicker::DialDevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDialDevicePicker::DialDevicePickerDismissed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::DialProtocol::IDialDevicePicker::remove_DialDevicePickerDismissed, DialDevicePickerDismissed(handler)); } template void impl_IDialDevicePicker::DialDevicePickerDismissed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DialDevicePickerDismissed(token)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->remove_DialDevicePickerDismissed(token)); } template void impl_IDialDevicePicker::Show(const Windows::Foundation::Rect & selection) const { - check_hresult(static_cast(static_cast(*this))->abi_Show(get(selection))); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_Show(get_abi(selection))); } template void impl_IDialDevicePicker::Show(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowWithPlacement(get(selection), preferredPlacement)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_ShowWithPlacement(get_abi(selection), preferredPlacement)); } template Windows::Foundation::IAsyncOperation impl_IDialDevicePicker::PickSingleDialDeviceAsync(const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleDialDeviceAsync(get(selection), put(operation))); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_PickSingleDialDeviceAsync(get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDialDevicePicker::PickSingleDialDeviceAsync(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleDialDeviceAsyncWithPlacement(get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_PickSingleDialDeviceAsyncWithPlacement(get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } template void impl_IDialDevicePicker::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_Hide()); } template void impl_IDialDevicePicker::SetDisplayStatus(const Windows::Media::DialProtocol::DialDevice & device, Windows::Media::DialProtocol::DialDeviceDisplayStatus status) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDisplayStatus(get(device), status)); + check_hresult(WINRT_SHIM(IDialDevicePicker)->abi_SetDisplayStatus(get_abi(device), status)); } -inline hstring DialDevice::GetDeviceSelector(hstring_ref appName) +inline hstring DialDevice::GetDeviceSelector(hstring_view appName) { return get_activation_factory().GetDeviceSelector(appName); } -inline Windows::Foundation::IAsyncOperation DialDevice::FromIdAsync(hstring_ref value) +inline Windows::Foundation::IAsyncOperation DialDevice::FromIdAsync(hstring_view value) { return get_activation_factory().FromIdAsync(value); } @@ -697,3 +730,149 @@ inline DialDevicePicker::DialDevicePicker() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialApp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialAppStateDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDevice2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::IDialDisconnectButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialApp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialAppStateDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialDevicePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialDevicePickerFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialDeviceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::DialProtocol::DialDisconnectButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Editing.h b/10.0.14393.0/winrt/Windows.Media.Editing.h index 5c8ac33ec..57fcb9557 100644 --- a/10.0.14393.0/winrt/Windows.Media.Editing.h +++ b/10.0.14393.0/winrt/Windows.Media.Editing.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.MediaProperties.3.h" @@ -21,11 +24,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_TrimTimeFromStart(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimTimeFromStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimTimeFromStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimTimeFromStart()); return S_OK; } catch (...) @@ -34,10 +38,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TrimTimeFromStart(abi_arg_in value) noexcept override + HRESULT __stdcall put_TrimTimeFromStart(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimTimeFromStart(*reinterpret_cast(&value)); return S_OK; } @@ -47,11 +52,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TrimTimeFromEnd(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimTimeFromEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimTimeFromEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimTimeFromEnd()); return S_OK; } catch (...) @@ -60,10 +66,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TrimTimeFromEnd(abi_arg_in value) noexcept override + HRESULT __stdcall put_TrimTimeFromEnd(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimTimeFromEnd(*reinterpret_cast(&value)); return S_OK; } @@ -73,11 +80,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_OriginalDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_OriginalDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OriginalDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalDuration()); return S_OK; } catch (...) @@ -86,11 +94,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TrimmedDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimmedDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimmedDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimmedDuration()); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_UserData(abi_arg_out> value) noexcept override + HRESULT __stdcall get_UserData(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UserData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserData()); return S_OK; } catch (...) @@ -113,10 +123,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Delay(abi_arg_in value) noexcept override + HRESULT __stdcall put_Delay(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Delay(*reinterpret_cast(&value)); return S_OK; } @@ -126,11 +137,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Delay(abi_arg_out value) noexcept override + HRESULT __stdcall get_Delay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -143,6 +155,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Volume(value); return S_OK; } @@ -156,7 +169,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -165,11 +179,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Clone(abi_arg_out value) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -179,11 +194,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetAudioEncodingProperties(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAudioEncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAudioEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAudioEncodingProperties()); return S_OK; } catch (...) @@ -193,11 +209,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AudioEffectDefinitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AudioEffectDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AudioEffectDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEffectDefinitions()); return S_OK; } catch (...) @@ -211,11 +228,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromEmbeddedAudioTrack(abi_arg_in embeddedAudioTrack, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromEmbeddedAudioTrack(impl::abi_arg_in embeddedAudioTrack, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromEmbeddedAudioTrack(*reinterpret_cast(&embeddedAudioTrack))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromEmbeddedAudioTrack(*reinterpret_cast(&embeddedAudioTrack))); return S_OK; } catch (...) @@ -225,11 +243,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateFromFileAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromFileAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -243,11 +262,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetAudioEncodingProperties(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAudioEncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAudioEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAudioEncodingProperties()); return S_OK; } catch (...) @@ -261,11 +281,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TrimTimeFromStart(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimTimeFromStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimTimeFromStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimTimeFromStart()); return S_OK; } catch (...) @@ -274,10 +295,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TrimTimeFromStart(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimTimeFromStart(*reinterpret_cast(&value)); return S_OK; } @@ -287,11 +309,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrimTimeFromEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimTimeFromEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimTimeFromEnd()); return S_OK; } catch (...) @@ -300,10 +323,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TrimTimeFromEnd(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimTimeFromEnd(*reinterpret_cast(&value)); return S_OK; } @@ -313,11 +337,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OriginalDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OriginalDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalDuration()); return S_OK; } catch (...) @@ -326,11 +351,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrimmedDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimmedDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimmedDuration()); return S_OK; } catch (...) @@ -339,11 +365,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_UserData(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UserData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserData()); return S_OK; } catch (...) @@ -353,11 +380,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -367,11 +395,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StartTimeInComposition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTimeInComposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTimeInComposition()); return S_OK; } catch (...) @@ -380,11 +409,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EndTimeInComposition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndTimeInComposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndTimeInComposition()); return S_OK; } catch (...) @@ -393,11 +423,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_EmbeddedAudioTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EmbeddedAudioTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmbeddedAudioTracks()); return S_OK; } catch (...) @@ -411,7 +442,8 @@ struct produce : produce_baseshim().SelectedEmbeddedAudioTrackIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedEmbeddedAudioTrackIndex()); return S_OK; } catch (...) @@ -424,6 +456,7 @@ struct produce : produce_baseshim()); this->shim().SelectedEmbeddedAudioTrackIndex(value); return S_OK; } @@ -437,6 +470,7 @@ struct produce : produce_baseshim()); this->shim().Volume(value); return S_OK; } @@ -450,7 +484,8 @@ struct produce : produce_baseshim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -459,11 +494,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetVideoEncodingProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetVideoEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetVideoEncodingProperties()); return S_OK; } catch (...) @@ -473,11 +509,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AudioEffectDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AudioEffectDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEffectDefinitions()); return S_OK; } catch (...) @@ -487,11 +524,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_VideoEffectDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().VideoEffectDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoEffectDefinitions()); return S_OK; } catch (...) @@ -505,11 +543,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFromColor(abi_arg_in color, abi_arg_in originalDuration, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromColor(impl::abi_arg_in color, impl::abi_arg_in originalDuration, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromColor(*reinterpret_cast(&color), *reinterpret_cast(&originalDuration))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromColor(*reinterpret_cast(&color), *reinterpret_cast(&originalDuration))); return S_OK; } catch (...) @@ -519,11 +558,12 @@ struct produce : produce_base file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromFileAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -533,11 +573,12 @@ struct produce : produce_base file, abi_arg_in originalDuration, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromImageFileAsync(impl::abi_arg_in file, impl::abi_arg_in originalDuration, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromImageFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&originalDuration))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromImageFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&originalDuration))); return S_OK; } catch (...) @@ -551,11 +592,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFromSurface(abi_arg_in surface, abi_arg_in originalDuration, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFromSurface(impl::abi_arg_in surface, impl::abi_arg_in originalDuration, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFromSurface(*reinterpret_cast(&surface), *reinterpret_cast(&originalDuration))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFromSurface(*reinterpret_cast(&surface), *reinterpret_cast(&originalDuration))); return S_OK; } catch (...) @@ -569,11 +611,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -582,11 +625,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Clips(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Clips()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clips()); return S_OK; } catch (...) @@ -596,11 +640,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BackgroundAudioTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BackgroundAudioTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundAudioTracks()); return S_OK; } catch (...) @@ -610,11 +655,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_UserData(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UserData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserData()); return S_OK; } catch (...) @@ -624,11 +670,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -638,11 +685,12 @@ struct produce : produce_base file, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_in file, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SaveAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -652,11 +700,12 @@ struct produce : produce_base timeFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailAsync(impl::abi_arg_in timeFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailAsync(*reinterpret_cast(&timeFromStart), scaledWidth, scaledHeight, framePrecision)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailAsync(*reinterpret_cast(&timeFromStart), scaledWidth, scaledHeight, framePrecision)); return S_OK; } catch (...) @@ -666,11 +715,12 @@ struct produce : produce_base> timesFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailsAsync(impl::abi_arg_in> timesFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailsAsync(*reinterpret_cast *>(×FromStart), scaledWidth, scaledHeight, framePrecision)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailsAsync(*reinterpret_cast *>(×FromStart), scaledWidth, scaledHeight, framePrecision)); return S_OK; } catch (...) @@ -680,11 +730,12 @@ struct produce : produce_base destination, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RenderToFileAsync(impl::abi_arg_in destination, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RenderToFileAsync(*reinterpret_cast(&destination))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenderToFileAsync(*reinterpret_cast(&destination))); return S_OK; } catch (...) @@ -694,11 +745,12 @@ struct produce : produce_base destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RenderToFileWithTrimmingPreferenceAsync(impl::abi_arg_in destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RenderToFileAsync(*reinterpret_cast(&destination), trimmingPreference)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenderToFileAsync(*reinterpret_cast(&destination), trimmingPreference)); return S_OK; } catch (...) @@ -708,11 +760,12 @@ struct produce : produce_base destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference, abi_arg_in encodingProfile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RenderToFileWithProfileAsync(impl::abi_arg_in destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference, impl::abi_arg_in encodingProfile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RenderToFileAsync(*reinterpret_cast(&destination), trimmingPreference, *reinterpret_cast(&encodingProfile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenderToFileAsync(*reinterpret_cast(&destination), trimmingPreference, *reinterpret_cast(&encodingProfile))); return S_OK; } catch (...) @@ -722,11 +775,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_CreateDefaultEncodingProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateDefaultEncodingProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateDefaultEncodingProfile()); return S_OK; } catch (...) @@ -736,11 +790,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GenerateMediaStreamSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GenerateMediaStreamSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GenerateMediaStreamSource()); return S_OK; } catch (...) @@ -750,11 +805,12 @@ struct produce : produce_base encodingProfile, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GenerateMediaStreamSourceWithProfile(impl::abi_arg_in encodingProfile, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GenerateMediaStreamSource(*reinterpret_cast(&encodingProfile))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GenerateMediaStreamSource(*reinterpret_cast(&encodingProfile))); return S_OK; } catch (...) @@ -764,11 +820,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GeneratePreviewMediaStreamSource(int32_t scaledWidth, int32_t scaledHeight, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GeneratePreviewMediaStreamSource(scaledWidth, scaledHeight)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GeneratePreviewMediaStreamSource(scaledWidth, scaledHeight)); return S_OK; } catch (...) @@ -782,11 +839,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_OverlayLayers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OverlayLayers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OverlayLayers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverlayLayers()); return S_OK; } catch (...) @@ -800,11 +858,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LoadAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LoadAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LoadAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -818,11 +877,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -831,10 +891,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -844,10 +905,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Delay(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Delay(*reinterpret_cast(&value)); return S_OK; } @@ -857,11 +919,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Delay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -874,7 +937,8 @@ struct produce : produce_baseshim().Opacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opacity()); return S_OK; } catch (...) @@ -887,6 +951,7 @@ struct produce : produce_baseshim()); this->shim().Opacity(value); return S_OK; } @@ -896,11 +961,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -910,11 +976,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Clip(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clip()); return S_OK; } catch (...) @@ -928,7 +995,8 @@ struct produce : produce_baseshim().AudioEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEnabled()); return S_OK; } catch (...) @@ -941,6 +1009,7 @@ struct produce : produce_baseshim()); this->shim().AudioEnabled(value); return S_OK; } @@ -954,11 +1023,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in clip, abi_arg_out mediaOverlay) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in clip, impl::abi_arg_out mediaOverlay) noexcept override { try { - *mediaOverlay = detach(this->shim().Create(*reinterpret_cast(&clip))); + typename D::abi_guard guard(this->shim()); + *mediaOverlay = detach_abi(this->shim().Create(*reinterpret_cast(&clip))); return S_OK; } catch (...) @@ -968,11 +1038,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateWithPositionAndOpacity(abi_arg_in clip, abi_arg_in position, double opacity, abi_arg_out mediaOverlay) noexcept override + HRESULT __stdcall abi_CreateWithPositionAndOpacity(impl::abi_arg_in clip, impl::abi_arg_in position, double opacity, impl::abi_arg_out mediaOverlay) noexcept override { try { - *mediaOverlay = detach(this->shim().CreateWithPositionAndOpacity(*reinterpret_cast(&clip), *reinterpret_cast(&position), opacity)); + typename D::abi_guard guard(this->shim()); + *mediaOverlay = detach_abi(this->shim().CreateWithPositionAndOpacity(*reinterpret_cast(&clip), *reinterpret_cast(&position), opacity)); return S_OK; } catch (...) @@ -986,11 +1057,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Clone(abi_arg_out result) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -1000,11 +1072,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Overlays(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Overlays()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Overlays()); return S_OK; } catch (...) @@ -1014,11 +1087,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomCompositorDefinition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomCompositorDefinition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomCompositorDefinition()); return S_OK; } catch (...) @@ -1032,11 +1106,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWithCompositorDefinition(abi_arg_in compositorDefinition, abi_arg_out mediaOverlayLayer) noexcept override + HRESULT __stdcall abi_CreateWithCompositorDefinition(impl::abi_arg_in compositorDefinition, impl::abi_arg_out mediaOverlayLayer) noexcept override { try { - *mediaOverlayLayer = detach(this->shim().CreateWithCompositorDefinition(*reinterpret_cast(&compositorDefinition))); + typename D::abi_guard guard(this->shim()); + *mediaOverlayLayer = detach_abi(this->shim().CreateWithCompositorDefinition(*reinterpret_cast(&compositorDefinition))); return S_OK; } catch (...) @@ -1054,480 +1129,480 @@ namespace Windows::Media::Editing { template Windows::Foundation::TimeSpan impl_IMediaClip::TrimTimeFromStart() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimTimeFromStart(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_TrimTimeFromStart(put_abi(value))); return value; } template void impl_IMediaClip::TrimTimeFromStart(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimTimeFromStart(get(value))); + check_hresult(WINRT_SHIM(IMediaClip)->put_TrimTimeFromStart(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaClip::TrimTimeFromEnd() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimTimeFromEnd(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_TrimTimeFromEnd(put_abi(value))); return value; } template void impl_IMediaClip::TrimTimeFromEnd(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimTimeFromEnd(get(value))); + check_hresult(WINRT_SHIM(IMediaClip)->put_TrimTimeFromEnd(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaClip::OriginalDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_OriginalDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_OriginalDuration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaClip::TrimmedDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimmedDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_TrimmedDuration(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IMediaClip::UserData() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_UserData(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_UserData(put_abi(value))); return value; } template Windows::Media::Editing::MediaClip impl_IMediaClip::Clone() const { Windows::Media::Editing::MediaClip result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(result))); + check_hresult(WINRT_SHIM(IMediaClip)->abi_Clone(put_abi(result))); return result; } template Windows::Foundation::TimeSpan impl_IMediaClip::StartTimeInComposition() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTimeInComposition(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_StartTimeInComposition(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaClip::EndTimeInComposition() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_EndTimeInComposition(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_EndTimeInComposition(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaClip::EmbeddedAudioTracks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EmbeddedAudioTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_EmbeddedAudioTracks(put_abi(value))); return value; } template uint32_t impl_IMediaClip::SelectedEmbeddedAudioTrackIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedEmbeddedAudioTrackIndex(&value)); + check_hresult(WINRT_SHIM(IMediaClip)->get_SelectedEmbeddedAudioTrackIndex(&value)); return value; } template void impl_IMediaClip::SelectedEmbeddedAudioTrackIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedEmbeddedAudioTrackIndex(value)); + check_hresult(WINRT_SHIM(IMediaClip)->put_SelectedEmbeddedAudioTrackIndex(value)); } template void impl_IMediaClip::Volume(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Volume(value)); + check_hresult(WINRT_SHIM(IMediaClip)->put_Volume(value)); } template double impl_IMediaClip::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IMediaClip)->get_Volume(&value)); return value; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IMediaClip::GetVideoEncodingProperties() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetVideoEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->abi_GetVideoEncodingProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMediaClip::AudioEffectDefinitions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AudioEffectDefinitions(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_AudioEffectDefinitions(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMediaClip::VideoEffectDefinitions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_VideoEffectDefinitions(put(value))); + check_hresult(WINRT_SHIM(IMediaClip)->get_VideoEffectDefinitions(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaComposition::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->get_Duration(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMediaComposition::Clips() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Clips(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->get_Clips(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMediaComposition::BackgroundAudioTracks() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_BackgroundAudioTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->get_BackgroundAudioTracks(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IMediaComposition::UserData() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_UserData(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->get_UserData(put_abi(value))); return value; } template Windows::Media::Editing::MediaComposition impl_IMediaComposition::Clone() const { Windows::Media::Editing::MediaComposition result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(result))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_Clone(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IMediaComposition::SaveAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_SaveAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaComposition::GetThumbnailAsync(const Windows::Foundation::TimeSpan & timeFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsync(get(timeFromStart), scaledWidth, scaledHeight, framePrecision, put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_GetThumbnailAsync(get_abi(timeFromStart), scaledWidth, scaledHeight, framePrecision, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IMediaComposition::GetThumbnailsAsync(const Windows::Foundation::Collections::IIterable & timesFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision) const +template Windows::Foundation::IAsyncOperation> impl_IMediaComposition::GetThumbnailsAsync(iterable timesFromStart, int32_t scaledWidth, int32_t scaledHeight, Windows::Media::Editing::VideoFramePrecision framePrecision) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailsAsync(get(timesFromStart), scaledWidth, scaledHeight, framePrecision, put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_GetThumbnailsAsync(get_abi(timesFromStart), scaledWidth, scaledHeight, framePrecision, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IMediaComposition::RenderToFileAsync(const Windows::Storage::IStorageFile & destination) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RenderToFileAsync(get(destination), put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_RenderToFileAsync(get_abi(destination), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IMediaComposition::RenderToFileAsync(const Windows::Storage::IStorageFile & destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RenderToFileWithTrimmingPreferenceAsync(get(destination), trimmingPreference, put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_RenderToFileWithTrimmingPreferenceAsync(get_abi(destination), trimmingPreference, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IMediaComposition::RenderToFileAsync(const Windows::Storage::IStorageFile & destination, Windows::Media::Editing::MediaTrimmingPreference trimmingPreference, const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RenderToFileWithProfileAsync(get(destination), trimmingPreference, get(encodingProfile), put(operation))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_RenderToFileWithProfileAsync(get_abi(destination), trimmingPreference, get_abi(encodingProfile), put_abi(operation))); return operation; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaComposition::CreateDefaultEncodingProfile() const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDefaultEncodingProfile(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_CreateDefaultEncodingProfile(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSource impl_IMediaComposition::GenerateMediaStreamSource() const { Windows::Media::Core::MediaStreamSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GenerateMediaStreamSource(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_GenerateMediaStreamSource(put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSource impl_IMediaComposition::GenerateMediaStreamSource(const Windows::Media::MediaProperties::MediaEncodingProfile & encodingProfile) const { Windows::Media::Core::MediaStreamSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GenerateMediaStreamSourceWithProfile(get(encodingProfile), put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_GenerateMediaStreamSourceWithProfile(get_abi(encodingProfile), put_abi(value))); return value; } template Windows::Media::Core::MediaStreamSource impl_IMediaComposition::GeneratePreviewMediaStreamSource(int32_t scaledWidth, int32_t scaledHeight) const { Windows::Media::Core::MediaStreamSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GeneratePreviewMediaStreamSource(scaledWidth, scaledHeight, put(value))); + check_hresult(WINRT_SHIM(IMediaComposition)->abi_GeneratePreviewMediaStreamSource(scaledWidth, scaledHeight, put_abi(value))); return value; } template Windows::Media::Editing::MediaClip impl_IMediaClipStatics::CreateFromColor(const Windows::UI::Color & color, const Windows::Foundation::TimeSpan & originalDuration) const { Windows::Media::Editing::MediaClip value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromColor(get(color), get(originalDuration), put(value))); + check_hresult(WINRT_SHIM(IMediaClipStatics)->abi_CreateFromColor(get_abi(color), get_abi(originalDuration), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaClipStatics::CreateFromFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromFileAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IMediaClipStatics)->abi_CreateFromFileAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaClipStatics::CreateFromImageFileAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::TimeSpan & originalDuration) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromImageFileAsync(get(file), get(originalDuration), put(operation))); + check_hresult(WINRT_SHIM(IMediaClipStatics)->abi_CreateFromImageFileAsync(get_abi(file), get_abi(originalDuration), put_abi(operation))); return operation; } template Windows::Media::Editing::MediaClip impl_IMediaClipStatics2::CreateFromSurface(const Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface & surface, const Windows::Foundation::TimeSpan & originalDuration) const { Windows::Media::Editing::MediaClip value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromSurface(get(surface), get(originalDuration), put(value))); + check_hresult(WINRT_SHIM(IMediaClipStatics2)->abi_CreateFromSurface(get_abi(surface), get_abi(originalDuration), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaCompositionStatics::LoadAsync(const Windows::Storage::StorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LoadAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IMediaCompositionStatics)->abi_LoadAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IEmbeddedAudioTrack::GetAudioEncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IEmbeddedAudioTrack)->abi_GetAudioEncodingProperties(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBackgroundAudioTrack::TrimTimeFromStart() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimTimeFromStart(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_TrimTimeFromStart(put_abi(value))); return value; } template void impl_IBackgroundAudioTrack::TrimTimeFromStart(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimTimeFromStart(get(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->put_TrimTimeFromStart(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IBackgroundAudioTrack::TrimTimeFromEnd() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimTimeFromEnd(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_TrimTimeFromEnd(put_abi(value))); return value; } template void impl_IBackgroundAudioTrack::TrimTimeFromEnd(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimTimeFromEnd(get(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->put_TrimTimeFromEnd(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IBackgroundAudioTrack::OriginalDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_OriginalDuration(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_OriginalDuration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IBackgroundAudioTrack::TrimmedDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimmedDuration(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_TrimmedDuration(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IBackgroundAudioTrack::UserData() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_UserData(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_UserData(put_abi(value))); return value; } template void impl_IBackgroundAudioTrack::Delay(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Delay(get(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->put_Delay(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IBackgroundAudioTrack::Delay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_Delay(put_abi(value))); return value; } template void impl_IBackgroundAudioTrack::Volume(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Volume(value)); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->put_Volume(value)); } template double impl_IBackgroundAudioTrack::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_Volume(&value)); return value; } template Windows::Media::Editing::BackgroundAudioTrack impl_IBackgroundAudioTrack::Clone() const { Windows::Media::Editing::BackgroundAudioTrack value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->abi_Clone(put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IBackgroundAudioTrack::GetAudioEncodingProperties() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->abi_GetAudioEncodingProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IBackgroundAudioTrack::AudioEffectDefinitions() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AudioEffectDefinitions(put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrack)->get_AudioEffectDefinitions(put_abi(value))); return value; } template Windows::Media::Editing::BackgroundAudioTrack impl_IBackgroundAudioTrackStatics::CreateFromEmbeddedAudioTrack(const Windows::Media::Editing::EmbeddedAudioTrack & embeddedAudioTrack) const { Windows::Media::Editing::BackgroundAudioTrack value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromEmbeddedAudioTrack(get(embeddedAudioTrack), put(value))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrackStatics)->abi_CreateFromEmbeddedAudioTrack(get_abi(embeddedAudioTrack), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IBackgroundAudioTrackStatics::CreateFromFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromFileAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundAudioTrackStatics)->abi_CreateFromFileAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVector impl_IMediaComposition2::OverlayLayers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_OverlayLayers(put(value))); + check_hresult(WINRT_SHIM(IMediaComposition2)->get_OverlayLayers(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IMediaOverlay::Position() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaOverlay)->get_Position(put_abi(value))); return value; } template void impl_IMediaOverlay::Position(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IMediaOverlay)->put_Position(get_abi(value))); } template void impl_IMediaOverlay::Delay(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Delay(get(value))); + check_hresult(WINRT_SHIM(IMediaOverlay)->put_Delay(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaOverlay::Delay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(put(value))); + check_hresult(WINRT_SHIM(IMediaOverlay)->get_Delay(put_abi(value))); return value; } template double impl_IMediaOverlay::Opacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Opacity(&value)); + check_hresult(WINRT_SHIM(IMediaOverlay)->get_Opacity(&value)); return value; } template void impl_IMediaOverlay::Opacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Opacity(value)); + check_hresult(WINRT_SHIM(IMediaOverlay)->put_Opacity(value)); } template Windows::Media::Editing::MediaOverlay impl_IMediaOverlay::Clone() const { Windows::Media::Editing::MediaOverlay result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(result))); + check_hresult(WINRT_SHIM(IMediaOverlay)->abi_Clone(put_abi(result))); return result; } template Windows::Media::Editing::MediaClip impl_IMediaOverlay::Clip() const { Windows::Media::Editing::MediaClip value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Clip(put(value))); + check_hresult(WINRT_SHIM(IMediaOverlay)->get_Clip(put_abi(value))); return value; } template bool impl_IMediaOverlay::AudioEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaOverlay)->get_AudioEnabled(&value)); return value; } template void impl_IMediaOverlay::AudioEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioEnabled(value)); + check_hresult(WINRT_SHIM(IMediaOverlay)->put_AudioEnabled(value)); } template Windows::Media::Editing::MediaOverlay impl_IMediaOverlayFactory::Create(const Windows::Media::Editing::MediaClip & clip) const { Windows::Media::Editing::MediaOverlay mediaOverlay { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(clip), put(mediaOverlay))); + check_hresult(WINRT_SHIM(IMediaOverlayFactory)->abi_Create(get_abi(clip), put_abi(mediaOverlay))); return mediaOverlay; } template Windows::Media::Editing::MediaOverlay impl_IMediaOverlayFactory::CreateWithPositionAndOpacity(const Windows::Media::Editing::MediaClip & clip, const Windows::Foundation::Rect & position, double opacity) const { Windows::Media::Editing::MediaOverlay mediaOverlay { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithPositionAndOpacity(get(clip), get(position), opacity, put(mediaOverlay))); + check_hresult(WINRT_SHIM(IMediaOverlayFactory)->abi_CreateWithPositionAndOpacity(get_abi(clip), get_abi(position), opacity, put_abi(mediaOverlay))); return mediaOverlay; } template Windows::Media::Editing::MediaOverlayLayer impl_IMediaOverlayLayerFactory::CreateWithCompositorDefinition(const Windows::Media::Effects::IVideoCompositorDefinition & compositorDefinition) const { Windows::Media::Editing::MediaOverlayLayer mediaOverlayLayer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithCompositorDefinition(get(compositorDefinition), put(mediaOverlayLayer))); + check_hresult(WINRT_SHIM(IMediaOverlayLayerFactory)->abi_CreateWithCompositorDefinition(get_abi(compositorDefinition), put_abi(mediaOverlayLayer))); return mediaOverlayLayer; } template Windows::Media::Editing::MediaOverlayLayer impl_IMediaOverlayLayer::Clone() const { Windows::Media::Editing::MediaOverlayLayer result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(result))); + check_hresult(WINRT_SHIM(IMediaOverlayLayer)->abi_Clone(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IMediaOverlayLayer::Overlays() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Overlays(put(value))); + check_hresult(WINRT_SHIM(IMediaOverlayLayer)->get_Overlays(put_abi(value))); return value; } template Windows::Media::Effects::IVideoCompositorDefinition impl_IMediaOverlayLayer::CustomCompositorDefinition() const { Windows::Media::Effects::IVideoCompositorDefinition value; - check_hresult(static_cast(static_cast(*this))->get_CustomCompositorDefinition(put(value))); + check_hresult(WINRT_SHIM(IMediaOverlayLayer)->get_CustomCompositorDefinition(put_abi(value))); return value; } @@ -1589,3 +1664,176 @@ inline MediaOverlayLayer::MediaOverlayLayer(const Windows::Media::Effects::IVide } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IBackgroundAudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IBackgroundAudioTrackStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IEmbeddedAudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaClipStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaClipStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaComposition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaComposition2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaCompositionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaOverlay & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaOverlayFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaOverlayLayer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::IMediaOverlayLayerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::BackgroundAudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::EmbeddedAudioTrack & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::MediaClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::MediaComposition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::MediaOverlay & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Editing::MediaOverlayLayer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Effects.h b/10.0.14393.0/winrt/Windows.Media.Effects.h index df53e5fde..ab216be68 100644 --- a/10.0.14393.0/winrt/Windows.Media.Effects.h +++ b/10.0.14393.0/winrt/Windows.Media.Effects.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.3.h" #include "internal/Windows.Graphics.DirectX.Direct3D11.3.h" @@ -24,11 +27,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_AudioCaptureEffectsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AudioCaptureEffectsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioCaptureEffectsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioCaptureEffectsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -41,6 +45,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioCaptureEffectsChanged(token); return S_OK; } @@ -50,11 +55,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetAudioCaptureEffects(abi_arg_out> effects) noexcept override + HRESULT __stdcall abi_GetAudioCaptureEffects(impl::abi_arg_out> effects) noexcept override { try { - *effects = detach(this->shim().GetAudioCaptureEffects()); + typename D::abi_guard guard(this->shim()); + *effects = detach_abi(this->shim().GetAudioCaptureEffects()); return S_OK; } catch (...) @@ -72,7 +78,8 @@ struct produce : produce_baseshim().AudioEffectType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioEffectType()); return S_OK; } catch (...) @@ -85,11 +92,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ActivatableClassId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActivatableClassId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActivatableClassId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivatableClassId()); return S_OK; } catch (...) @@ -99,11 +107,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -117,11 +126,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in activatableClassId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in activatableClassId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&activatableClassId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&activatableClassId))); return S_OK; } catch (...) @@ -131,11 +141,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateWithProperties(abi_arg_in activatableClassId, abi_arg_in props, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithProperties(impl::abi_arg_in activatableClassId, impl::abi_arg_in props, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); return S_OK; } catch (...) @@ -149,11 +160,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateAudioRenderEffectsManager(abi_arg_in deviceId, Windows::Media::Render::AudioRenderCategory category, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAudioRenderEffectsManager(impl::abi_arg_in deviceId, Windows::Media::Render::AudioRenderCategory category, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAudioRenderEffectsManager(*reinterpret_cast(&deviceId), category)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAudioRenderEffectsManager(*reinterpret_cast(&deviceId), category)); return S_OK; } catch (...) @@ -163,11 +175,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateAudioRenderEffectsManagerWithMode(abi_arg_in deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAudioRenderEffectsManagerWithMode(impl::abi_arg_in deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAudioRenderEffectsManager(*reinterpret_cast(&deviceId), category, mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAudioRenderEffectsManager(*reinterpret_cast(&deviceId), category, mode)); return S_OK; } catch (...) @@ -177,11 +190,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateAudioCaptureEffectsManager(abi_arg_in deviceId, Windows::Media::Capture::MediaCategory category, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAudioCaptureEffectsManager(impl::abi_arg_in deviceId, Windows::Media::Capture::MediaCategory category, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAudioCaptureEffectsManager(*reinterpret_cast(&deviceId), category)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAudioCaptureEffectsManager(*reinterpret_cast(&deviceId), category)); return S_OK; } catch (...) @@ -191,11 +205,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateAudioCaptureEffectsManagerWithMode(abi_arg_in deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAudioCaptureEffectsManagerWithMode(impl::abi_arg_in deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAudioCaptureEffectsManager(*reinterpret_cast(&deviceId), category, mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAudioCaptureEffectsManager(*reinterpret_cast(&deviceId), category, mode)); return S_OK; } catch (...) @@ -209,11 +224,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall add_AudioRenderEffectsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AudioRenderEffectsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioRenderEffectsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioRenderEffectsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -226,6 +242,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioRenderEffectsChanged(token); return S_OK; } @@ -235,11 +252,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetAudioRenderEffects(abi_arg_out> effects) noexcept override + HRESULT __stdcall abi_GetAudioRenderEffects(impl::abi_arg_out> effects) noexcept override { try { - *effects = detach(this->shim().GetAudioRenderEffects()); + typename D::abi_guard guard(this->shim()); + *effects = detach_abi(this->shim().GetAudioRenderEffects()); return S_OK; } catch (...) @@ -253,11 +271,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_EffectsProviderThumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_EffectsProviderThumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EffectsProviderThumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EffectsProviderThumbnail()); return S_OK; } catch (...) @@ -267,11 +286,12 @@ struct produce : produc } } - HRESULT __stdcall get_EffectsProviderSettingsLabel(abi_arg_out value) noexcept override + HRESULT __stdcall get_EffectsProviderSettingsLabel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EffectsProviderSettingsLabel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EffectsProviderSettingsLabel()); return S_OK; } catch (...) @@ -285,6 +305,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowSettingsUI(); return S_OK; } @@ -302,7 +323,8 @@ struct produce : produce_baseshim().UseInputFrameForOutput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseInputFrameForOutput()); return S_OK; } catch (...) @@ -311,11 +333,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedEncodingProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedEncodingProperties()); return S_OK; } catch (...) @@ -325,10 +348,11 @@ struct produce : produce_base encodingProperties) noexcept override + HRESULT __stdcall abi_SetEncodingProperties(impl::abi_arg_in encodingProperties) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetEncodingProperties(*reinterpret_cast(&encodingProperties)); return S_OK; } @@ -338,10 +362,11 @@ struct produce : produce_base context) noexcept override + HRESULT __stdcall abi_ProcessFrame(impl::abi_arg_in context) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessFrame(*reinterpret_cast(&context)); return S_OK; } @@ -355,6 +380,7 @@ struct produce : produce_baseshim()); this->shim().Close(reason); return S_OK; } @@ -368,6 +394,7 @@ struct produce : produce_baseshim()); this->shim().DiscardQueuedFrames(); return S_OK; } @@ -385,7 +412,8 @@ struct produce : produce_baseshim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -398,7 +426,8 @@ struct produce : produce_baseshim().SupportedMemoryTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedMemoryTypes()); return S_OK; } catch (...) @@ -411,7 +440,8 @@ struct produce : produce_baseshim().TimeIndependent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeIndependent()); return S_OK; } catch (...) @@ -420,11 +450,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedEncodingProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedEncodingProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedEncodingProperties()); return S_OK; } catch (...) @@ -434,10 +465,11 @@ struct produce : produce_base encodingProperties, abi_arg_in device) noexcept override + HRESULT __stdcall abi_SetEncodingProperties(impl::abi_arg_in encodingProperties, impl::abi_arg_in device) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetEncodingProperties(*reinterpret_cast(&encodingProperties), *reinterpret_cast(&device)); return S_OK; } @@ -447,10 +479,11 @@ struct produce : produce_base context) noexcept override + HRESULT __stdcall abi_ProcessFrame(impl::abi_arg_in context) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessFrame(*reinterpret_cast(&context)); return S_OK; } @@ -464,6 +497,7 @@ struct produce : produce_baseshim()); this->shim().Close(reason); return S_OK; } @@ -477,6 +511,7 @@ struct produce : produce_baseshim()); this->shim().DiscardQueuedFrames(); return S_OK; } @@ -490,11 +525,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SurfacesToOverlay(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SurfacesToOverlay(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SurfacesToOverlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SurfacesToOverlay()); return S_OK; } catch (...) @@ -504,11 +540,12 @@ struct produce : produc } } - HRESULT __stdcall get_BackgroundFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundFrame()); return S_OK; } catch (...) @@ -518,11 +555,12 @@ struct produce : produc } } - HRESULT __stdcall get_OutputFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputFrame()); return S_OK; } catch (...) @@ -532,11 +570,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetOverlayForSurface(abi_arg_in surfaceToOverlay, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetOverlayForSurface(impl::abi_arg_in surfaceToOverlay, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetOverlayForSurface(*reinterpret_cast(&surfaceToOverlay))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetOverlayForSurface(*reinterpret_cast(&surfaceToOverlay))); return S_OK; } catch (...) @@ -550,11 +589,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_InputFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputFrame()); return S_OK; } catch (...) @@ -564,11 +604,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OutputFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputFrame()); return S_OK; } catch (...) @@ -582,11 +623,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_InputFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputFrame()); return S_OK; } catch (...) @@ -596,11 +638,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OutputFrame(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputFrame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputFrame()); return S_OK; } catch (...) @@ -618,7 +661,8 @@ struct produce : produc { try { - *value = detach(this->shim().TimeStretchRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeStretchRate()); return S_OK; } catch (...) @@ -631,6 +675,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().TimeStretchRate(value); return S_OK; } @@ -648,7 +693,8 @@ struct produce : produce_baseshim().TimeIndependent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeIndependent()); return S_OK; } catch (...) @@ -657,10 +703,11 @@ struct produce : produce_base backgroundProperties, abi_arg_in device) noexcept override + HRESULT __stdcall abi_SetEncodingProperties(impl::abi_arg_in backgroundProperties, impl::abi_arg_in device) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetEncodingProperties(*reinterpret_cast(&backgroundProperties), *reinterpret_cast(&device)); return S_OK; } @@ -670,10 +717,11 @@ struct produce : produce_base context) noexcept override + HRESULT __stdcall abi_CompositeFrame(impl::abi_arg_in context) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompositeFrame(*reinterpret_cast(&context)); return S_OK; } @@ -687,6 +735,7 @@ struct produce : produce_baseshim()); this->shim().Close(reason); return S_OK; } @@ -700,6 +749,7 @@ struct produce : produce_baseshim()); this->shim().DiscardQueuedFrames(); return S_OK; } @@ -713,11 +763,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ActivatableClassId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActivatableClassId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActivatableClassId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivatableClassId()); return S_OK; } catch (...) @@ -727,11 +778,12 @@ struct produce : produce } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -745,11 +797,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in activatableClassId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in activatableClassId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&activatableClassId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&activatableClassId))); return S_OK; } catch (...) @@ -759,11 +812,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithProperties(abi_arg_in activatableClassId, abi_arg_in props, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithProperties(impl::abi_arg_in activatableClassId, impl::abi_arg_in props, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); return S_OK; } catch (...) @@ -777,11 +831,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ActivatableClassId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActivatableClassId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActivatableClassId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivatableClassId()); return S_OK; } catch (...) @@ -791,11 +846,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -809,11 +865,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in activatableClassId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in activatableClassId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&activatableClassId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&activatableClassId))); return S_OK; } catch (...) @@ -823,11 +880,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateWithProperties(abi_arg_in activatableClassId, abi_arg_in props, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithProperties(impl::abi_arg_in activatableClassId, impl::abi_arg_in props, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithProperties(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&props))); return S_OK; } catch (...) @@ -841,11 +899,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_PaddingColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingColor()); return S_OK; } catch (...) @@ -854,10 +913,11 @@ struct produce : pr } } - HRESULT __stdcall put_PaddingColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_PaddingColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PaddingColor(*reinterpret_cast(&value)); return S_OK; } @@ -867,11 +927,12 @@ struct produce : pr } } - HRESULT __stdcall get_OutputSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputSize()); return S_OK; } catch (...) @@ -880,10 +941,11 @@ struct produce : pr } } - HRESULT __stdcall put_OutputSize(abi_arg_in value) noexcept override + HRESULT __stdcall put_OutputSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutputSize(*reinterpret_cast(&value)); return S_OK; } @@ -893,11 +955,12 @@ struct produce : pr } } - HRESULT __stdcall get_CropRectangle(abi_arg_out value) noexcept override + HRESULT __stdcall get_CropRectangle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CropRectangle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CropRectangle()); return S_OK; } catch (...) @@ -906,10 +969,11 @@ struct produce : pr } } - HRESULT __stdcall put_CropRectangle(abi_arg_in value) noexcept override + HRESULT __stdcall put_CropRectangle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CropRectangle(*reinterpret_cast(&value)); return S_OK; } @@ -923,7 +987,8 @@ struct produce : pr { try { - *value = detach(this->shim().Rotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rotation()); return S_OK; } catch (...) @@ -936,6 +1001,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Rotation(value); return S_OK; } @@ -949,7 +1015,8 @@ struct produce : pr { try { - *value = detach(this->shim().Mirror()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mirror()); return S_OK; } catch (...) @@ -962,6 +1029,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Mirror(value); return S_OK; } @@ -975,6 +1043,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessingAlgorithm(value); return S_OK; } @@ -988,7 +1057,8 @@ struct produce : pr { try { - *value = detach(this->shim().ProcessingAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProcessingAlgorithm()); return S_OK; } catch (...) @@ -1005,462 +1075,462 @@ namespace Windows::Media::Effects { template hstring impl_IVideoCompositorDefinition::ActivatableClassId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ActivatableClassId(put(value))); + check_hresult(WINRT_SHIM(IVideoCompositorDefinition)->get_ActivatableClassId(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_IVideoCompositorDefinition::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IVideoCompositorDefinition)->get_Properties(put_abi(value))); return value; } -template Windows::Media::Effects::VideoCompositorDefinition impl_IVideoCompositorDefinitionFactory::Create(hstring_ref activatableClassId) const +template Windows::Media::Effects::VideoCompositorDefinition impl_IVideoCompositorDefinitionFactory::Create(hstring_view activatableClassId) const { Windows::Media::Effects::VideoCompositorDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(activatableClassId), put(value))); + check_hresult(WINRT_SHIM(IVideoCompositorDefinitionFactory)->abi_Create(get_abi(activatableClassId), put_abi(value))); return value; } -template Windows::Media::Effects::VideoCompositorDefinition impl_IVideoCompositorDefinitionFactory::CreateWithProperties(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const +template Windows::Media::Effects::VideoCompositorDefinition impl_IVideoCompositorDefinitionFactory::CreateWithProperties(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const { Windows::Media::Effects::VideoCompositorDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithProperties(get(activatableClassId), get(props), put(value))); + check_hresult(WINRT_SHIM(IVideoCompositorDefinitionFactory)->abi_CreateWithProperties(get_abi(activatableClassId), get_abi(props), put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICompositeVideoFrameContext::SurfacesToOverlay() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SurfacesToOverlay(put(value))); + check_hresult(WINRT_SHIM(ICompositeVideoFrameContext)->get_SurfacesToOverlay(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_ICompositeVideoFrameContext::BackgroundFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BackgroundFrame(put(value))); + check_hresult(WINRT_SHIM(ICompositeVideoFrameContext)->get_BackgroundFrame(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_ICompositeVideoFrameContext::OutputFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutputFrame(put(value))); + check_hresult(WINRT_SHIM(ICompositeVideoFrameContext)->get_OutputFrame(put_abi(value))); return value; } template Windows::Media::Editing::MediaOverlay impl_ICompositeVideoFrameContext::GetOverlayForSurface(const Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface & surfaceToOverlay) const { Windows::Media::Editing::MediaOverlay value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetOverlayForSurface(get(surfaceToOverlay), put(value))); + check_hresult(WINRT_SHIM(ICompositeVideoFrameContext)->abi_GetOverlayForSurface(get_abi(surfaceToOverlay), put_abi(value))); return value; } template Windows::Media::Effects::AudioEffectType impl_IAudioEffect::AudioEffectType() const { Windows::Media::Effects::AudioEffectType value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioEffectType(&value)); + check_hresult(WINRT_SHIM(IAudioEffect)->get_AudioEffectType(&value)); return value; } -template Windows::Media::Effects::AudioRenderEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioRenderEffectsManager(hstring_ref deviceId, Windows::Media::Render::AudioRenderCategory category) const +template Windows::Media::Effects::AudioRenderEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioRenderEffectsManager(hstring_view deviceId, Windows::Media::Render::AudioRenderCategory category) const { Windows::Media::Effects::AudioRenderEffectsManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAudioRenderEffectsManager(get(deviceId), category, put(value))); + check_hresult(WINRT_SHIM(IAudioEffectsManagerStatics)->abi_CreateAudioRenderEffectsManager(get_abi(deviceId), category, put_abi(value))); return value; } -template Windows::Media::Effects::AudioRenderEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioRenderEffectsManager(hstring_ref deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode) const +template Windows::Media::Effects::AudioRenderEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioRenderEffectsManager(hstring_view deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode) const { Windows::Media::Effects::AudioRenderEffectsManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAudioRenderEffectsManagerWithMode(get(deviceId), category, mode, put(value))); + check_hresult(WINRT_SHIM(IAudioEffectsManagerStatics)->abi_CreateAudioRenderEffectsManagerWithMode(get_abi(deviceId), category, mode, put_abi(value))); return value; } -template Windows::Media::Effects::AudioCaptureEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioCaptureEffectsManager(hstring_ref deviceId, Windows::Media::Capture::MediaCategory category) const +template Windows::Media::Effects::AudioCaptureEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioCaptureEffectsManager(hstring_view deviceId, Windows::Media::Capture::MediaCategory category) const { Windows::Media::Effects::AudioCaptureEffectsManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAudioCaptureEffectsManager(get(deviceId), category, put(value))); + check_hresult(WINRT_SHIM(IAudioEffectsManagerStatics)->abi_CreateAudioCaptureEffectsManager(get_abi(deviceId), category, put_abi(value))); return value; } -template Windows::Media::Effects::AudioCaptureEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioCaptureEffectsManager(hstring_ref deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode) const +template Windows::Media::Effects::AudioCaptureEffectsManager impl_IAudioEffectsManagerStatics::CreateAudioCaptureEffectsManager(hstring_view deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode) const { Windows::Media::Effects::AudioCaptureEffectsManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAudioCaptureEffectsManagerWithMode(get(deviceId), category, mode, put(value))); + check_hresult(WINRT_SHIM(IAudioEffectsManagerStatics)->abi_CreateAudioCaptureEffectsManagerWithMode(get_abi(deviceId), category, mode, put_abi(value))); return value; } -template event_token impl_IAudioRenderEffectsManager::AudioRenderEffectsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAudioRenderEffectsManager::AudioRenderEffectsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioRenderEffectsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager)->add_AudioRenderEffectsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IAudioRenderEffectsManager::AudioRenderEffectsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAudioRenderEffectsManager::AudioRenderEffectsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Effects::IAudioRenderEffectsManager::remove_AudioRenderEffectsChanged, AudioRenderEffectsChanged(handler)); } template void impl_IAudioRenderEffectsManager::AudioRenderEffectsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioRenderEffectsChanged(token)); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager)->remove_AudioRenderEffectsChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IAudioRenderEffectsManager::GetAudioRenderEffects() const { Windows::Foundation::Collections::IVectorView effects; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioRenderEffects(put(effects))); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager)->abi_GetAudioRenderEffects(put_abi(effects))); return effects; } template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_IAudioRenderEffectsManager2::EffectsProviderThumbnail() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType value; - check_hresult(static_cast(static_cast(*this))->get_EffectsProviderThumbnail(put(value))); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager2)->get_EffectsProviderThumbnail(put_abi(value))); return value; } template hstring impl_IAudioRenderEffectsManager2::EffectsProviderSettingsLabel() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EffectsProviderSettingsLabel(put(value))); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager2)->get_EffectsProviderSettingsLabel(put_abi(value))); return value; } template void impl_IAudioRenderEffectsManager2::ShowSettingsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowSettingsUI()); + check_hresult(WINRT_SHIM(IAudioRenderEffectsManager2)->abi_ShowSettingsUI()); } -template event_token impl_IAudioCaptureEffectsManager::AudioCaptureEffectsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAudioCaptureEffectsManager::AudioCaptureEffectsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioCaptureEffectsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAudioCaptureEffectsManager)->add_AudioCaptureEffectsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IAudioCaptureEffectsManager::AudioCaptureEffectsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAudioCaptureEffectsManager::AudioCaptureEffectsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Effects::IAudioCaptureEffectsManager::remove_AudioCaptureEffectsChanged, AudioCaptureEffectsChanged(handler)); } template void impl_IAudioCaptureEffectsManager::AudioCaptureEffectsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioCaptureEffectsChanged(token)); + check_hresult(WINRT_SHIM(IAudioCaptureEffectsManager)->remove_AudioCaptureEffectsChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IAudioCaptureEffectsManager::GetAudioCaptureEffects() const { Windows::Foundation::Collections::IVectorView effects; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioCaptureEffects(put(effects))); + check_hresult(WINRT_SHIM(IAudioCaptureEffectsManager)->abi_GetAudioCaptureEffects(put_abi(effects))); return effects; } template bool impl_IVideoCompositor::TimeIndependent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeIndependent(&value)); + check_hresult(WINRT_SHIM(IVideoCompositor)->get_TimeIndependent(&value)); return value; } template void impl_IVideoCompositor::SetEncodingProperties(const Windows::Media::MediaProperties::VideoEncodingProperties & backgroundProperties, const Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice & device) const { - check_hresult(static_cast(static_cast(*this))->abi_SetEncodingProperties(get(backgroundProperties), get(device))); + check_hresult(WINRT_SHIM(IVideoCompositor)->abi_SetEncodingProperties(get_abi(backgroundProperties), get_abi(device))); } template void impl_IVideoCompositor::CompositeFrame(const Windows::Media::Effects::CompositeVideoFrameContext & context) const { - check_hresult(static_cast(static_cast(*this))->abi_CompositeFrame(get(context))); + check_hresult(WINRT_SHIM(IVideoCompositor)->abi_CompositeFrame(get_abi(context))); } template void impl_IVideoCompositor::Close(Windows::Media::Effects::MediaEffectClosedReason reason) const { - check_hresult(static_cast(static_cast(*this))->abi_Close(reason)); + check_hresult(WINRT_SHIM(IVideoCompositor)->abi_Close(reason)); } template void impl_IVideoCompositor::DiscardQueuedFrames() const { - check_hresult(static_cast(static_cast(*this))->abi_DiscardQueuedFrames()); + check_hresult(WINRT_SHIM(IVideoCompositor)->abi_DiscardQueuedFrames()); } template hstring impl_IAudioEffectDefinition::ActivatableClassId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ActivatableClassId(put(value))); + check_hresult(WINRT_SHIM(IAudioEffectDefinition)->get_ActivatableClassId(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_IAudioEffectDefinition::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IAudioEffectDefinition)->get_Properties(put_abi(value))); return value; } template hstring impl_IVideoEffectDefinition::ActivatableClassId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ActivatableClassId(put(value))); + check_hresult(WINRT_SHIM(IVideoEffectDefinition)->get_ActivatableClassId(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_IVideoEffectDefinition::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IVideoEffectDefinition)->get_Properties(put_abi(value))); return value; } -template Windows::Media::Effects::VideoEffectDefinition impl_IVideoEffectDefinitionFactory::Create(hstring_ref activatableClassId) const +template Windows::Media::Effects::VideoEffectDefinition impl_IVideoEffectDefinitionFactory::Create(hstring_view activatableClassId) const { Windows::Media::Effects::VideoEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(activatableClassId), put(value))); + check_hresult(WINRT_SHIM(IVideoEffectDefinitionFactory)->abi_Create(get_abi(activatableClassId), put_abi(value))); return value; } -template Windows::Media::Effects::VideoEffectDefinition impl_IVideoEffectDefinitionFactory::CreateWithProperties(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const +template Windows::Media::Effects::VideoEffectDefinition impl_IVideoEffectDefinitionFactory::CreateWithProperties(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const { Windows::Media::Effects::VideoEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithProperties(get(activatableClassId), get(props), put(value))); + check_hresult(WINRT_SHIM(IVideoEffectDefinitionFactory)->abi_CreateWithProperties(get_abi(activatableClassId), get_abi(props), put_abi(value))); return value; } -template Windows::Media::Effects::AudioEffectDefinition impl_IAudioEffectDefinitionFactory::Create(hstring_ref activatableClassId) const +template Windows::Media::Effects::AudioEffectDefinition impl_IAudioEffectDefinitionFactory::Create(hstring_view activatableClassId) const { Windows::Media::Effects::AudioEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(activatableClassId), put(value))); + check_hresult(WINRT_SHIM(IAudioEffectDefinitionFactory)->abi_Create(get_abi(activatableClassId), put_abi(value))); return value; } -template Windows::Media::Effects::AudioEffectDefinition impl_IAudioEffectDefinitionFactory::CreateWithProperties(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const +template Windows::Media::Effects::AudioEffectDefinition impl_IAudioEffectDefinitionFactory::CreateWithProperties(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) const { Windows::Media::Effects::AudioEffectDefinition value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithProperties(get(activatableClassId), get(props), put(value))); + check_hresult(WINRT_SHIM(IAudioEffectDefinitionFactory)->abi_CreateWithProperties(get_abi(activatableClassId), get_abi(props), put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IProcessVideoFrameContext::InputFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputFrame(put(value))); + check_hresult(WINRT_SHIM(IProcessVideoFrameContext)->get_InputFrame(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IProcessVideoFrameContext::OutputFrame() const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutputFrame(put(value))); + check_hresult(WINRT_SHIM(IProcessVideoFrameContext)->get_OutputFrame(put_abi(value))); return value; } template bool impl_IBasicVideoEffect::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->get_IsReadOnly(&value)); return value; } template Windows::Media::Effects::MediaMemoryTypes impl_IBasicVideoEffect::SupportedMemoryTypes() const { Windows::Media::Effects::MediaMemoryTypes value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedMemoryTypes(&value)); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->get_SupportedMemoryTypes(&value)); return value; } template bool impl_IBasicVideoEffect::TimeIndependent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeIndependent(&value)); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->get_TimeIndependent(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBasicVideoEffect::SupportedEncodingProperties() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->get_SupportedEncodingProperties(put_abi(value))); return value; } template void impl_IBasicVideoEffect::SetEncodingProperties(const Windows::Media::MediaProperties::VideoEncodingProperties & encodingProperties, const Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice & device) const { - check_hresult(static_cast(static_cast(*this))->abi_SetEncodingProperties(get(encodingProperties), get(device))); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->abi_SetEncodingProperties(get_abi(encodingProperties), get_abi(device))); } template void impl_IBasicVideoEffect::ProcessFrame(const Windows::Media::Effects::ProcessVideoFrameContext & context) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessFrame(get(context))); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->abi_ProcessFrame(get_abi(context))); } template void impl_IBasicVideoEffect::Close(Windows::Media::Effects::MediaEffectClosedReason reason) const { - check_hresult(static_cast(static_cast(*this))->abi_Close(reason)); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->abi_Close(reason)); } template void impl_IBasicVideoEffect::DiscardQueuedFrames() const { - check_hresult(static_cast(static_cast(*this))->abi_DiscardQueuedFrames()); + check_hresult(WINRT_SHIM(IBasicVideoEffect)->abi_DiscardQueuedFrames()); } template Windows::Media::AudioFrame impl_IProcessAudioFrameContext::InputFrame() const { Windows::Media::AudioFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputFrame(put(value))); + check_hresult(WINRT_SHIM(IProcessAudioFrameContext)->get_InputFrame(put_abi(value))); return value; } template Windows::Media::AudioFrame impl_IProcessAudioFrameContext::OutputFrame() const { Windows::Media::AudioFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutputFrame(put(value))); + check_hresult(WINRT_SHIM(IProcessAudioFrameContext)->get_OutputFrame(put_abi(value))); return value; } template bool impl_IBasicAudioEffect::UseInputFrameForOutput() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UseInputFrameForOutput(&value)); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->get_UseInputFrameForOutput(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IBasicAudioEffect::SupportedEncodingProperties() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedEncodingProperties(put(value))); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->get_SupportedEncodingProperties(put_abi(value))); return value; } template void impl_IBasicAudioEffect::SetEncodingProperties(const Windows::Media::MediaProperties::AudioEncodingProperties & encodingProperties) const { - check_hresult(static_cast(static_cast(*this))->abi_SetEncodingProperties(get(encodingProperties))); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->abi_SetEncodingProperties(get_abi(encodingProperties))); } template void impl_IBasicAudioEffect::ProcessFrame(const Windows::Media::Effects::ProcessAudioFrameContext & context) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessFrame(get(context))); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->abi_ProcessFrame(get_abi(context))); } template void impl_IBasicAudioEffect::Close(Windows::Media::Effects::MediaEffectClosedReason reason) const { - check_hresult(static_cast(static_cast(*this))->abi_Close(reason)); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->abi_Close(reason)); } template void impl_IBasicAudioEffect::DiscardQueuedFrames() const { - check_hresult(static_cast(static_cast(*this))->abi_DiscardQueuedFrames()); + check_hresult(WINRT_SHIM(IBasicAudioEffect)->abi_DiscardQueuedFrames()); } template Windows::UI::Color impl_IVideoTransformEffectDefinition::PaddingColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_PaddingColor(put(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_PaddingColor(put_abi(value))); return value; } template void impl_IVideoTransformEffectDefinition::PaddingColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_PaddingColor(get(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_PaddingColor(get_abi(value))); } template Windows::Foundation::Size impl_IVideoTransformEffectDefinition::OutputSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_OutputSize(put(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_OutputSize(put_abi(value))); return value; } template void impl_IVideoTransformEffectDefinition::OutputSize(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutputSize(get(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_OutputSize(get_abi(value))); } template Windows::Foundation::Rect impl_IVideoTransformEffectDefinition::CropRectangle() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_CropRectangle(put(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_CropRectangle(put_abi(value))); return value; } template void impl_IVideoTransformEffectDefinition::CropRectangle(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_CropRectangle(get(value))); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_CropRectangle(get_abi(value))); } template Windows::Media::MediaProperties::MediaRotation impl_IVideoTransformEffectDefinition::Rotation() const { Windows::Media::MediaProperties::MediaRotation value {}; - check_hresult(static_cast(static_cast(*this))->get_Rotation(&value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_Rotation(&value)); return value; } template void impl_IVideoTransformEffectDefinition::Rotation(Windows::Media::MediaProperties::MediaRotation value) const { - check_hresult(static_cast(static_cast(*this))->put_Rotation(value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_Rotation(value)); } template Windows::Media::MediaProperties::MediaMirroringOptions impl_IVideoTransformEffectDefinition::Mirror() const { Windows::Media::MediaProperties::MediaMirroringOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_Mirror(&value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_Mirror(&value)); return value; } template void impl_IVideoTransformEffectDefinition::Mirror(Windows::Media::MediaProperties::MediaMirroringOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_Mirror(value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_Mirror(value)); } template void impl_IVideoTransformEffectDefinition::ProcessingAlgorithm(Windows::Media::Transcoding::MediaVideoProcessingAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_ProcessingAlgorithm(value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->put_ProcessingAlgorithm(value)); } template Windows::Media::Transcoding::MediaVideoProcessingAlgorithm impl_IVideoTransformEffectDefinition::ProcessingAlgorithm() const { Windows::Media::Transcoding::MediaVideoProcessingAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_ProcessingAlgorithm(&value)); + check_hresult(WINRT_SHIM(IVideoTransformEffectDefinition)->get_ProcessingAlgorithm(&value)); return value; } template double impl_ISlowMotionEffectDefinition::TimeStretchRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeStretchRate(&value)); + check_hresult(WINRT_SHIM(ISlowMotionEffectDefinition)->get_TimeStretchRate(&value)); return value; } template void impl_ISlowMotionEffectDefinition::TimeStretchRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_TimeStretchRate(value)); + check_hresult(WINRT_SHIM(ISlowMotionEffectDefinition)->put_TimeStretchRate(value)); } -inline AudioEffectDefinition::AudioEffectDefinition(hstring_ref activatableClassId) : +inline AudioEffectDefinition::AudioEffectDefinition(hstring_view activatableClassId) : AudioEffectDefinition(get_activation_factory().Create(activatableClassId)) {} -inline AudioEffectDefinition::AudioEffectDefinition(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : +inline AudioEffectDefinition::AudioEffectDefinition(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : AudioEffectDefinition(get_activation_factory().CreateWithProperties(activatableClassId, props)) {} -inline Windows::Media::Effects::AudioRenderEffectsManager AudioEffectsManager::CreateAudioRenderEffectsManager(hstring_ref deviceId, Windows::Media::Render::AudioRenderCategory category) +inline Windows::Media::Effects::AudioRenderEffectsManager AudioEffectsManager::CreateAudioRenderEffectsManager(hstring_view deviceId, Windows::Media::Render::AudioRenderCategory category) { return get_activation_factory().CreateAudioRenderEffectsManager(deviceId, category); } -inline Windows::Media::Effects::AudioRenderEffectsManager AudioEffectsManager::CreateAudioRenderEffectsManager(hstring_ref deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode) +inline Windows::Media::Effects::AudioRenderEffectsManager AudioEffectsManager::CreateAudioRenderEffectsManager(hstring_view deviceId, Windows::Media::Render::AudioRenderCategory category, Windows::Media::AudioProcessing mode) { return get_activation_factory().CreateAudioRenderEffectsManager(deviceId, category, mode); } -inline Windows::Media::Effects::AudioCaptureEffectsManager AudioEffectsManager::CreateAudioCaptureEffectsManager(hstring_ref deviceId, Windows::Media::Capture::MediaCategory category) +inline Windows::Media::Effects::AudioCaptureEffectsManager AudioEffectsManager::CreateAudioCaptureEffectsManager(hstring_view deviceId, Windows::Media::Capture::MediaCategory category) { return get_activation_factory().CreateAudioCaptureEffectsManager(deviceId, category); } -inline Windows::Media::Effects::AudioCaptureEffectsManager AudioEffectsManager::CreateAudioCaptureEffectsManager(hstring_ref deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode) +inline Windows::Media::Effects::AudioCaptureEffectsManager AudioEffectsManager::CreateAudioCaptureEffectsManager(hstring_view deviceId, Windows::Media::Capture::MediaCategory category, Windows::Media::AudioProcessing mode) { return get_activation_factory().CreateAudioCaptureEffectsManager(deviceId, category, mode); } @@ -1469,19 +1539,19 @@ inline SlowMotionEffectDefinition::SlowMotionEffectDefinition() : SlowMotionEffectDefinition(activate_instance()) {} -inline VideoCompositorDefinition::VideoCompositorDefinition(hstring_ref activatableClassId) : +inline VideoCompositorDefinition::VideoCompositorDefinition(hstring_view activatableClassId) : VideoCompositorDefinition(get_activation_factory().Create(activatableClassId)) {} -inline VideoCompositorDefinition::VideoCompositorDefinition(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : +inline VideoCompositorDefinition::VideoCompositorDefinition(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : VideoCompositorDefinition(get_activation_factory().CreateWithProperties(activatableClassId, props)) {} -inline VideoEffectDefinition::VideoEffectDefinition(hstring_ref activatableClassId) : +inline VideoEffectDefinition::VideoEffectDefinition(hstring_view activatableClassId) : VideoEffectDefinition(get_activation_factory().Create(activatableClassId)) {} -inline VideoEffectDefinition::VideoEffectDefinition(hstring_ref activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : +inline VideoEffectDefinition::VideoEffectDefinition(hstring_view activatableClassId, const Windows::Foundation::Collections::IPropertySet & props) : VideoEffectDefinition(get_activation_factory().CreateWithProperties(activatableClassId, props)) {} @@ -1492,3 +1562,275 @@ inline VideoTransformEffectDefinition::VideoTransformEffectDefinition() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioCaptureEffectsManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioEffectsManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioRenderEffectsManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IAudioRenderEffectsManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IBasicAudioEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IBasicVideoEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::ICompositeVideoFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IProcessAudioFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IProcessVideoFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::ISlowMotionEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoCompositor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoCompositorDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoCompositorDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoEffectDefinitionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::IVideoTransformEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::AudioCaptureEffectsManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::AudioEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::AudioEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::AudioRenderEffectsManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::CompositeVideoFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::ProcessAudioFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::ProcessVideoFrameContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::SlowMotionEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::VideoCompositorDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::VideoEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Effects::VideoTransformEffectDefinition & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.FaceAnalysis.h b/10.0.14393.0/winrt/Windows.Media.FaceAnalysis.h index bd9786df6..9e8dd2902 100644 --- a/10.0.14393.0/winrt/Windows.Media.FaceAnalysis.h +++ b/10.0.14393.0/winrt/Windows.Media.FaceAnalysis.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.Imaging.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_FaceBox(abi_arg_out returnValue) noexcept override + HRESULT __stdcall get_FaceBox(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FaceBox()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FaceBox()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_DetectFacesAsync(abi_arg_in image, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_DetectFacesAsync(impl::abi_arg_in image, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().DetectFacesAsync(*reinterpret_cast(&image))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DetectFacesAsync(*reinterpret_cast(&image))); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce : produce_base image, abi_arg_in searchArea, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_DetectFacesWithSearchAreaAsync(impl::abi_arg_in image, impl::abi_arg_in searchArea, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().DetectFacesAsync(*reinterpret_cast(&image), *reinterpret_cast(&searchArea))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DetectFacesAsync(*reinterpret_cast(&image), *reinterpret_cast(&searchArea))); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall get_MinDetectableFaceSize(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MinDetectableFaceSize()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MinDetectableFaceSize()); return S_OK; } catch (...) @@ -75,10 +82,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MinDetectableFaceSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinDetectableFaceSize(*reinterpret_cast(&value)); return S_OK; } @@ -88,11 +96,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall get_MaxDetectableFaceSize(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MaxDetectableFaceSize()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MaxDetectableFaceSize()); return S_OK; } catch (...) @@ -101,10 +110,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MaxDetectableFaceSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxDetectableFaceSize(*reinterpret_cast(&value)); return S_OK; } @@ -118,11 +128,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateAsync(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateAsync()); return S_OK; } catch (...) @@ -132,11 +143,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetSupportedBitmapPixelFormats(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetSupportedBitmapPixelFormats(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetSupportedBitmapPixelFormats()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSupportedBitmapPixelFormats()); return S_OK; } catch (...) @@ -150,7 +162,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().IsBitmapPixelFormatSupported(bitmapPixelFormat)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsBitmapPixelFormatSupported(bitmapPixelFormat)); return S_OK; } catch (...) @@ -163,7 +176,8 @@ struct produce : produce_ { try { - *returnValue = detach(this->shim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_ProcessNextFrameAsync(abi_arg_in videoFrame, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_ProcessNextFrameAsync(impl::abi_arg_in videoFrame, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ProcessNextFrameAsync(*reinterpret_cast(&videoFrame))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ProcessNextFrameAsync(*reinterpret_cast(&videoFrame))); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall get_MinDetectableFaceSize(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MinDetectableFaceSize()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MinDetectableFaceSize()); return S_OK; } catch (...) @@ -203,10 +219,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MinDetectableFaceSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinDetectableFaceSize(*reinterpret_cast(&value)); return S_OK; } @@ -216,11 +233,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall get_MaxDetectableFaceSize(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MaxDetectableFaceSize()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MaxDetectableFaceSize()); return S_OK; } catch (...) @@ -229,10 +247,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MaxDetectableFaceSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxDetectableFaceSize(*reinterpret_cast(&value)); return S_OK; } @@ -246,11 +265,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateAsync(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateAsync()); return S_OK; } catch (...) @@ -260,11 +280,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetSupportedBitmapPixelFormats(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetSupportedBitmapPixelFormats(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetSupportedBitmapPixelFormats()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSupportedBitmapPixelFormats()); return S_OK; } catch (...) @@ -278,7 +299,8 @@ struct produce : produce_b { try { - *result = detach(this->shim().IsBitmapPixelFormatSupported(bitmapPixelFormat)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsBitmapPixelFormatSupported(bitmapPixelFormat)); return S_OK; } catch (...) @@ -291,7 +313,8 @@ struct produce : produce_b { try { - *returnValue = detach(this->shim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -308,132 +331,132 @@ namespace Windows::Media::FaceAnalysis { template Windows::Graphics::Imaging::BitmapBounds impl_IDetectedFace::FaceBox() const { Windows::Graphics::Imaging::BitmapBounds returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_FaceBox(put(returnValue))); + check_hresult(WINRT_SHIM(IDetectedFace)->get_FaceBox(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation> impl_IFaceDetector::DetectFacesAsync(const Windows::Graphics::Imaging::SoftwareBitmap & image) const { Windows::Foundation::IAsyncOperation> returnValue; - check_hresult(static_cast(static_cast(*this))->abi_DetectFacesAsync(get(image), put(returnValue))); + check_hresult(WINRT_SHIM(IFaceDetector)->abi_DetectFacesAsync(get_abi(image), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation> impl_IFaceDetector::DetectFacesAsync(const Windows::Graphics::Imaging::SoftwareBitmap & image, const Windows::Graphics::Imaging::BitmapBounds & searchArea) const { Windows::Foundation::IAsyncOperation> returnValue; - check_hresult(static_cast(static_cast(*this))->abi_DetectFacesWithSearchAreaAsync(get(image), get(searchArea), put(returnValue))); + check_hresult(WINRT_SHIM(IFaceDetector)->abi_DetectFacesWithSearchAreaAsync(get_abi(image), get_abi(searchArea), put_abi(returnValue))); return returnValue; } template Windows::Graphics::Imaging::BitmapSize impl_IFaceDetector::MinDetectableFaceSize() const { Windows::Graphics::Imaging::BitmapSize returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_MinDetectableFaceSize(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceDetector)->get_MinDetectableFaceSize(put_abi(returnValue))); return returnValue; } template void impl_IFaceDetector::MinDetectableFaceSize(const Windows::Graphics::Imaging::BitmapSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinDetectableFaceSize(get(value))); + check_hresult(WINRT_SHIM(IFaceDetector)->put_MinDetectableFaceSize(get_abi(value))); } template Windows::Graphics::Imaging::BitmapSize impl_IFaceDetector::MaxDetectableFaceSize() const { Windows::Graphics::Imaging::BitmapSize returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDetectableFaceSize(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceDetector)->get_MaxDetectableFaceSize(put_abi(returnValue))); return returnValue; } template void impl_IFaceDetector::MaxDetectableFaceSize(const Windows::Graphics::Imaging::BitmapSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDetectableFaceSize(get(value))); + check_hresult(WINRT_SHIM(IFaceDetector)->put_MaxDetectableFaceSize(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IFaceDetectorStatics::CreateAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceDetectorStatics)->abi_CreateAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVectorView impl_IFaceDetectorStatics::GetSupportedBitmapPixelFormats() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedBitmapPixelFormats(put(result))); + check_hresult(WINRT_SHIM(IFaceDetectorStatics)->abi_GetSupportedBitmapPixelFormats(put_abi(result))); return result; } template bool impl_IFaceDetectorStatics::IsBitmapPixelFormatSupported(Windows::Graphics::Imaging::BitmapPixelFormat bitmapPixelFormat) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsBitmapPixelFormatSupported(bitmapPixelFormat, &result)); + check_hresult(WINRT_SHIM(IFaceDetectorStatics)->abi_IsBitmapPixelFormatSupported(bitmapPixelFormat, &result)); return result; } template bool impl_IFaceDetectorStatics::IsSupported() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_IsSupported(&returnValue)); + check_hresult(WINRT_SHIM(IFaceDetectorStatics)->get_IsSupported(&returnValue)); return returnValue; } template Windows::Foundation::IAsyncOperation> impl_IFaceTracker::ProcessNextFrameAsync(const Windows::Media::VideoFrame & videoFrame) const { Windows::Foundation::IAsyncOperation> returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ProcessNextFrameAsync(get(videoFrame), put(returnValue))); + check_hresult(WINRT_SHIM(IFaceTracker)->abi_ProcessNextFrameAsync(get_abi(videoFrame), put_abi(returnValue))); return returnValue; } template Windows::Graphics::Imaging::BitmapSize impl_IFaceTracker::MinDetectableFaceSize() const { Windows::Graphics::Imaging::BitmapSize returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_MinDetectableFaceSize(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceTracker)->get_MinDetectableFaceSize(put_abi(returnValue))); return returnValue; } template void impl_IFaceTracker::MinDetectableFaceSize(const Windows::Graphics::Imaging::BitmapSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinDetectableFaceSize(get(value))); + check_hresult(WINRT_SHIM(IFaceTracker)->put_MinDetectableFaceSize(get_abi(value))); } template Windows::Graphics::Imaging::BitmapSize impl_IFaceTracker::MaxDetectableFaceSize() const { Windows::Graphics::Imaging::BitmapSize returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDetectableFaceSize(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceTracker)->get_MaxDetectableFaceSize(put_abi(returnValue))); return returnValue; } template void impl_IFaceTracker::MaxDetectableFaceSize(const Windows::Graphics::Imaging::BitmapSize & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDetectableFaceSize(get(value))); + check_hresult(WINRT_SHIM(IFaceTracker)->put_MaxDetectableFaceSize(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IFaceTrackerStatics::CreateAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IFaceTrackerStatics)->abi_CreateAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVectorView impl_IFaceTrackerStatics::GetSupportedBitmapPixelFormats() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedBitmapPixelFormats(put(result))); + check_hresult(WINRT_SHIM(IFaceTrackerStatics)->abi_GetSupportedBitmapPixelFormats(put_abi(result))); return result; } template bool impl_IFaceTrackerStatics::IsBitmapPixelFormatSupported(Windows::Graphics::Imaging::BitmapPixelFormat bitmapPixelFormat) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsBitmapPixelFormatSupported(bitmapPixelFormat, &result)); + check_hresult(WINRT_SHIM(IFaceTrackerStatics)->abi_IsBitmapPixelFormatSupported(bitmapPixelFormat, &result)); return result; } template bool impl_IFaceTrackerStatics::IsSupported() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_IsSupported(&returnValue)); + check_hresult(WINRT_SHIM(IFaceTrackerStatics)->get_IsSupported(&returnValue)); return returnValue; } @@ -480,3 +503,77 @@ inline bool FaceTracker::IsSupported() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::IDetectedFace & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::IFaceDetector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::IFaceTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::DetectedFace & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::FaceDetector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::FaceAnalysis::FaceTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Import.h b/10.0.14393.0/winrt/Windows.Media.Import.h index bb60f3e2e..fcaf507e9 100644 --- a/10.0.14393.0/winrt/Windows.Media.Import.h +++ b/10.0.14393.0/winrt/Windows.Media.Import.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produceshim().HasSucceeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasSucceeded()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DeletedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeletedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeletedItems()); return S_OK; } catch (...) @@ -63,7 +69,8 @@ struct produceshim().PhotosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosCount()); return S_OK; } catch (...) @@ -76,7 +83,8 @@ struct produceshim().PhotosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosSizeInBytes()); return S_OK; } catch (...) @@ -89,7 +97,8 @@ struct produceshim().VideosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosCount()); return S_OK; } catch (...) @@ -102,7 +111,8 @@ struct produceshim().VideosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosSizeInBytes()); return S_OK; } catch (...) @@ -115,7 +125,8 @@ struct produceshim().SidecarsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsCount()); return S_OK; } catch (...) @@ -128,7 +139,8 @@ struct produceshim().SidecarsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsSizeInBytes()); return S_OK; } catch (...) @@ -141,7 +153,8 @@ struct produceshim().SiblingsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsCount()); return S_OK; } catch (...) @@ -154,7 +167,8 @@ struct produceshim().SiblingsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsSizeInBytes()); return S_OK; } catch (...) @@ -167,7 +181,8 @@ struct produceshim().TotalCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalCount()); return S_OK; } catch (...) @@ -180,7 +195,8 @@ struct produceshim().TotalSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalSizeInBytes()); return S_OK; } catch (...) @@ -193,11 +209,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -211,7 +228,8 @@ struct produce : produce { try { - *value = detach(this->shim().HasSucceeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasSucceeded()); return S_OK; } catch (...) @@ -220,11 +238,12 @@ struct produce : produce } } - HRESULT __stdcall get_FoundItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FoundItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FoundItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FoundItems()); return S_OK; } catch (...) @@ -238,7 +257,8 @@ struct produce : produce { try { - *value = detach(this->shim().PhotosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosCount()); return S_OK; } catch (...) @@ -251,7 +271,8 @@ struct produce : produce { try { - *value = detach(this->shim().PhotosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosSizeInBytes()); return S_OK; } catch (...) @@ -264,7 +285,8 @@ struct produce : produce { try { - *value = detach(this->shim().VideosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosCount()); return S_OK; } catch (...) @@ -277,7 +299,8 @@ struct produce : produce { try { - *value = detach(this->shim().VideosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosSizeInBytes()); return S_OK; } catch (...) @@ -290,7 +313,8 @@ struct produce : produce { try { - *value = detach(this->shim().SidecarsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsCount()); return S_OK; } catch (...) @@ -303,7 +327,8 @@ struct produce : produce { try { - *value = detach(this->shim().SidecarsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsSizeInBytes()); return S_OK; } catch (...) @@ -316,7 +341,8 @@ struct produce : produce { try { - *value = detach(this->shim().SiblingsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsCount()); return S_OK; } catch (...) @@ -329,7 +355,8 @@ struct produce : produce { try { - *value = detach(this->shim().SiblingsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsSizeInBytes()); return S_OK; } catch (...) @@ -342,7 +369,8 @@ struct produce : produce { try { - *value = detach(this->shim().TotalCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalCount()); return S_OK; } catch (...) @@ -355,7 +383,8 @@ struct produce : produce { try { - *value = detach(this->shim().TotalSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalSizeInBytes()); return S_OK; } catch (...) @@ -368,6 +397,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectAll(); return S_OK; } @@ -381,6 +411,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectNone(); return S_OK; } @@ -390,11 +421,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SelectNewAsync(abi_arg_out action) noexcept override + HRESULT __stdcall abi_SelectNewAsync(impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().SelectNewAsync()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().SelectNewAsync()); return S_OK; } catch (...) @@ -408,6 +440,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetImportMode(value); return S_OK; } @@ -421,7 +454,8 @@ struct produce : produce { try { - *value = detach(this->shim().ImportMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportMode()); return S_OK; } catch (...) @@ -434,7 +468,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedPhotosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPhotosCount()); return S_OK; } catch (...) @@ -447,7 +482,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedPhotosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPhotosSizeInBytes()); return S_OK; } catch (...) @@ -460,7 +496,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedVideosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedVideosCount()); return S_OK; } catch (...) @@ -473,7 +510,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedVideosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedVideosSizeInBytes()); return S_OK; } catch (...) @@ -486,7 +524,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedSidecarsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedSidecarsCount()); return S_OK; } catch (...) @@ -499,7 +538,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedSidecarsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedSidecarsSizeInBytes()); return S_OK; } catch (...) @@ -512,7 +552,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedSiblingsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedSiblingsCount()); return S_OK; } catch (...) @@ -525,7 +566,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedSiblingsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedSiblingsSizeInBytes()); return S_OK; } catch (...) @@ -538,7 +580,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedTotalCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedTotalCount()); return S_OK; } catch (...) @@ -551,7 +594,8 @@ struct produce : produce { try { - *value = detach(this->shim().SelectedTotalSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedTotalSizeInBytes()); return S_OK; } catch (...) @@ -560,11 +604,12 @@ struct produce : produce } } - HRESULT __stdcall add_SelectionChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -577,6 +622,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionChanged(token); return S_OK; } @@ -586,11 +632,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ImportItemsAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ImportItemsAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ImportItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ImportItemsAsync()); return S_OK; } catch (...) @@ -600,11 +647,12 @@ struct produce : produce } } - HRESULT __stdcall add_ItemImported(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ItemImported(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemImported(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemImported(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -617,6 +665,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemImported(token); return S_OK; } @@ -630,10 +679,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_AddItemsInDateRangeToSelection(abi_arg_in rangeStart, abi_arg_in rangeLength) noexcept override + HRESULT __stdcall abi_AddItemsInDateRangeToSelection(impl::abi_arg_in rangeStart, impl::abi_arg_in rangeLength) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddItemsInDateRangeToSelection(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength)); return S_OK; } @@ -647,11 +697,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -665,7 +716,8 @@ struct produce : produ { try { - *value = detach(this->shim().HasSucceeded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasSucceeded()); return S_OK; } catch (...) @@ -674,11 +726,12 @@ struct produce : produ } } - HRESULT __stdcall get_ImportedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ImportedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ImportedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportedItems()); return S_OK; } catch (...) @@ -692,7 +745,8 @@ struct produce : produ { try { - *value = detach(this->shim().PhotosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosCount()); return S_OK; } catch (...) @@ -705,7 +759,8 @@ struct produce : produ { try { - *value = detach(this->shim().PhotosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhotosSizeInBytes()); return S_OK; } catch (...) @@ -718,7 +773,8 @@ struct produce : produ { try { - *value = detach(this->shim().VideosCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosCount()); return S_OK; } catch (...) @@ -731,7 +787,8 @@ struct produce : produ { try { - *value = detach(this->shim().VideosSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosSizeInBytes()); return S_OK; } catch (...) @@ -744,7 +801,8 @@ struct produce : produ { try { - *value = detach(this->shim().SidecarsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsCount()); return S_OK; } catch (...) @@ -757,7 +815,8 @@ struct produce : produ { try { - *value = detach(this->shim().SidecarsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SidecarsSizeInBytes()); return S_OK; } catch (...) @@ -770,7 +829,8 @@ struct produce : produ { try { - *value = detach(this->shim().SiblingsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsCount()); return S_OK; } catch (...) @@ -783,7 +843,8 @@ struct produce : produ { try { - *value = detach(this->shim().SiblingsSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SiblingsSizeInBytes()); return S_OK; } catch (...) @@ -796,7 +857,8 @@ struct produce : produ { try { - *value = detach(this->shim().TotalCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalCount()); return S_OK; } catch (...) @@ -809,7 +871,8 @@ struct produce : produ { try { - *value = detach(this->shim().TotalSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalSizeInBytes()); return S_OK; } catch (...) @@ -818,11 +881,12 @@ struct produce : produ } } - HRESULT __stdcall abi_DeleteImportedItemsFromSourceAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_DeleteImportedItemsFromSourceAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().DeleteImportedItemsFromSourceAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteImportedItemsFromSourceAsync()); return S_OK; } catch (...) @@ -836,11 +900,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -854,7 +919,8 @@ struct produce : produce_baseshim().ItemKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemKey()); return S_OK; } catch (...) @@ -867,7 +933,8 @@ struct produce : produce_baseshim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -880,7 +947,8 @@ struct produce : produce_baseshim().SizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeInBytes()); return S_OK; } catch (...) @@ -889,11 +957,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -902,11 +971,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Sibling(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sibling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sibling()); return S_OK; } catch (...) @@ -916,11 +986,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Sidecars(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Sidecars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sidecars()); return S_OK; } catch (...) @@ -930,11 +1001,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_VideoSegments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().VideoSegments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoSegments()); return S_OK; } catch (...) @@ -948,7 +1020,8 @@ struct produce : produce_baseshim().IsSelected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelected()); return S_OK; } catch (...) @@ -961,6 +1034,7 @@ struct produce : produce_baseshim()); this->shim().IsSelected(value); return S_OK; } @@ -970,11 +1044,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -984,11 +1059,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ImportedFileNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ImportedFileNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportedFileNames()); return S_OK; } catch (...) @@ -998,11 +1074,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DeletedFileNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeletedFileNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeletedFileNames()); return S_OK; } catch (...) @@ -1016,11 +1093,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ImportedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImportedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportedItem()); return S_OK; } catch (...) @@ -1034,11 +1112,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_IsSupportedAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_IsSupportedAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().IsSupportedAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().IsSupportedAsync()); return S_OK; } catch (...) @@ -1048,11 +1127,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindAllSourcesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllSourcesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllSourcesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllSourcesAsync()); return S_OK; } catch (...) @@ -1062,11 +1142,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetPendingOperations(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetPendingOperations(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetPendingOperations()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetPendingOperations()); return S_OK; } catch (...) @@ -1084,7 +1165,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Stage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stage()); return S_OK; } catch (...) @@ -1093,11 +1175,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Session(abi_arg_out value) noexcept override + HRESULT __stdcall get_Session(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Session()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Session()); return S_OK; } catch (...) @@ -1107,11 +1190,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ContinueFindingItemsAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall get_ContinueFindingItemsAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ContinueFindingItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ContinueFindingItemsAsync()); return S_OK; } catch (...) @@ -1121,11 +1205,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ContinueImportingItemsAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall get_ContinueImportingItemsAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ContinueImportingItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ContinueImportingItemsAsync()); return S_OK; } catch (...) @@ -1135,11 +1220,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ContinueDeletingImportedItemsFromSourceAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall get_ContinueDeletingImportedItemsFromSourceAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ContinueDeletingImportedItemsFromSourceAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ContinueDeletingImportedItemsFromSourceAsync()); return S_OK; } catch (...) @@ -1157,7 +1243,8 @@ struct produce { try { - *value = detach(this->shim().IsSelectionEmpty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectionEmpty()); return S_OK; } catch (...) @@ -1170,11 +1257,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1188,7 +1276,8 @@ struct produce : produce_baseshim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -1197,10 +1286,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DestinationFolder(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DestinationFolder(*reinterpret_cast(&value)); return S_OK; } @@ -1210,11 +1300,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DestinationFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DestinationFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DestinationFolder()); return S_OK; } catch (...) @@ -1228,6 +1319,7 @@ struct produce : produce_baseshim()); this->shim().AppendSessionDateToDestinationFolder(value); return S_OK; } @@ -1241,7 +1333,8 @@ struct produce : produce_baseshim().AppendSessionDateToDestinationFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppendSessionDateToDestinationFolder()); return S_OK; } catch (...) @@ -1254,6 +1347,7 @@ struct produce : produce_baseshim()); this->shim().SubfolderCreationMode(value); return S_OK; } @@ -1267,7 +1361,8 @@ struct produce : produce_baseshim().SubfolderCreationMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubfolderCreationMode()); return S_OK; } catch (...) @@ -1276,10 +1371,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DestinationFileNamePrefix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DestinationFileNamePrefix(*reinterpret_cast(&value)); return S_OK; } @@ -1289,11 +1385,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DestinationFileNamePrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DestinationFileNamePrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DestinationFileNamePrefix()); return S_OK; } catch (...) @@ -1303,11 +1400,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_FindItemsAsync(Windows::Media::Import::PhotoImportContentTypeFilter contentTypeFilter, Windows::Media::Import::PhotoImportItemSelectionMode itemSelectionMode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FindItemsAsync(contentTypeFilter, itemSelectionMode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindItemsAsync(contentTypeFilter, itemSelectionMode)); return S_OK; } catch (...) @@ -1325,6 +1423,7 @@ struct produce : produce_baseshim()); this->shim().SubfolderDateFormat(value); return S_OK; } @@ -1338,7 +1437,8 @@ struct produce : produce_baseshim().SubfolderDateFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubfolderDateFormat()); return S_OK; } catch (...) @@ -1351,6 +1451,7 @@ struct produce : produce_baseshim()); this->shim().RememberDeselectedItems(value); return S_OK; } @@ -1364,7 +1465,8 @@ struct produce : produce_baseshim().RememberDeselectedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RememberDeselectedItems()); return S_OK; } catch (...) @@ -1377,11 +1479,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1395,7 +1498,8 @@ struct produce : produce_baseshim().SizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeInBytes()); return S_OK; } catch (...) @@ -1404,11 +1508,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -1421,11 +1526,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1435,11 +1541,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1449,11 +1556,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1463,11 +1571,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Manufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Manufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manufacturer()); return S_OK; } catch (...) @@ -1477,11 +1586,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Model(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Model()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Model()); return S_OK; } catch (...) @@ -1491,11 +1601,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SerialNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SerialNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerialNumber()); return S_OK; } catch (...) @@ -1505,11 +1616,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ConnectionProtocol(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionProtocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionProtocol()); return S_OK; } catch (...) @@ -1523,7 +1635,8 @@ struct produce : produce_baseshim().ConnectionTransport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionTransport()); return S_OK; } catch (...) @@ -1536,7 +1649,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1549,7 +1663,8 @@ struct produce : produce_baseshim().PowerSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSource()); return S_OK; } catch (...) @@ -1558,11 +1673,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BatteryLevelPercent(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BatteryLevelPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BatteryLevelPercent()); return S_OK; } catch (...) @@ -1572,11 +1688,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DateTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTime()); return S_OK; } catch (...) @@ -1586,11 +1703,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_StorageMedia(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StorageMedia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorageMedia()); return S_OK; } catch (...) @@ -1600,11 +1718,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_IsLocked(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsLocked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLocked()); return S_OK; } catch (...) @@ -1618,7 +1737,8 @@ struct produce : produce_baseshim().IsMassStorage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMassStorage()); return S_OK; } catch (...) @@ -1627,11 +1747,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1641,11 +1762,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateImportSession(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateImportSession()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateImportSession()); return S_OK; } catch (...) @@ -1659,11 +1781,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromIdAsync(abi_arg_in sourceId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromIdAsync(impl::abi_arg_in sourceId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromIdAsync(*reinterpret_cast(&sourceId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromIdAsync(*reinterpret_cast(&sourceId))); return S_OK; } catch (...) @@ -1673,11 +1796,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FromFolderAsync(abi_arg_in sourceRootFolder, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FromFolderAsync(impl::abi_arg_in sourceRootFolder, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FromFolderAsync(*reinterpret_cast(&sourceRootFolder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FromFolderAsync(*reinterpret_cast(&sourceRootFolder))); return S_OK; } catch (...) @@ -1691,11 +1815,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1705,11 +1830,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1719,11 +1845,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SerialNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_SerialNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SerialNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerialNumber()); return S_OK; } catch (...) @@ -1737,7 +1864,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().StorageMediumType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorageMediumType()); return S_OK; } catch (...) @@ -1750,7 +1878,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SupportedAccessMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedAccessMode()); return S_OK; } catch (...) @@ -1763,7 +1892,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().CapacityInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapacityInBytes()); return S_OK; } catch (...) @@ -1776,7 +1906,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().AvailableSpaceInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableSpaceInBytes()); return S_OK; } catch (...) @@ -1789,6 +1920,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Refresh(); return S_OK; } @@ -1802,11 +1934,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1820,7 +1953,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().SizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeInBytes()); return S_OK; } catch (...) @@ -1829,11 +1963,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Date(abi_arg_out value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -1842,11 +1977,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Sibling(abi_arg_out value) noexcept override + HRESULT __stdcall get_Sibling(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sibling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sibling()); return S_OK; } catch (...) @@ -1856,11 +1992,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Sidecars(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Sidecars(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Sidecars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sidecars()); return S_OK; } catch (...) @@ -1878,622 +2015,622 @@ namespace Windows::Media::Import { template Windows::Foundation::IAsyncOperation impl_IPhotoImportManagerStatics::IsSupportedAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_IsSupportedAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportManagerStatics)->abi_IsSupportedAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IPhotoImportManagerStatics::FindAllSourcesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllSourcesAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportManagerStatics)->abi_FindAllSourcesAsync(put_abi(operation))); return operation; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportManagerStatics::GetPendingOperations() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetPendingOperations(put(result))); + check_hresult(WINRT_SHIM(IPhotoImportManagerStatics)->abi_GetPendingOperations(put_abi(result))); return result; } template Windows::Media::Import::PhotoImportStage impl_IPhotoImportOperation::Stage() const { Windows::Media::Import::PhotoImportStage value {}; - check_hresult(static_cast(static_cast(*this))->get_Stage(&value)); + check_hresult(WINRT_SHIM(IPhotoImportOperation)->get_Stage(&value)); return value; } template Windows::Media::Import::PhotoImportSession impl_IPhotoImportOperation::Session() const { Windows::Media::Import::PhotoImportSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportOperation)->get_Session(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportOperation::ContinueFindingItemsAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->get_ContinueFindingItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportOperation)->get_ContinueFindingItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportOperation::ContinueImportingItemsAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->get_ContinueImportingItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportOperation)->get_ContinueImportingItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportOperation::ContinueDeletingImportedItemsFromSourceAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->get_ContinueDeletingImportedItemsFromSourceAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportOperation)->get_ContinueDeletingImportedItemsFromSourceAsync(put_abi(operation))); return operation; } template hstring impl_IPhotoImportStorageMedium::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_Name(put_abi(value))); return value; } template hstring impl_IPhotoImportStorageMedium::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_Description(put_abi(value))); return value; } template hstring impl_IPhotoImportStorageMedium::SerialNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SerialNumber(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_SerialNumber(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportStorageMediumType impl_IPhotoImportStorageMedium::StorageMediumType() const { Windows::Media::Import::PhotoImportStorageMediumType value {}; - check_hresult(static_cast(static_cast(*this))->get_StorageMediumType(&value)); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_StorageMediumType(&value)); return value; } template Windows::Media::Import::PhotoImportAccessMode impl_IPhotoImportStorageMedium::SupportedAccessMode() const { Windows::Media::Import::PhotoImportAccessMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedAccessMode(&value)); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_SupportedAccessMode(&value)); return value; } template uint64_t impl_IPhotoImportStorageMedium::CapacityInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CapacityInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_CapacityInBytes(&value)); return value; } template uint64_t impl_IPhotoImportStorageMedium::AvailableSpaceInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AvailableSpaceInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->get_AvailableSpaceInBytes(&value)); return value; } template void impl_IPhotoImportStorageMedium::Refresh() const { - check_hresult(static_cast(static_cast(*this))->abi_Refresh()); + check_hresult(WINRT_SHIM(IPhotoImportStorageMedium)->abi_Refresh()); } -template Windows::Foundation::IAsyncOperation impl_IPhotoImportSourceStatics::FromIdAsync(hstring_ref sourceId) const +template Windows::Foundation::IAsyncOperation impl_IPhotoImportSourceStatics::FromIdAsync(hstring_view sourceId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromIdAsync(get(sourceId), put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportSourceStatics)->abi_FromIdAsync(get_abi(sourceId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPhotoImportSourceStatics::FromFolderAsync(const Windows::Storage::IStorageFolder & sourceRootFolder) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FromFolderAsync(get(sourceRootFolder), put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportSourceStatics)->abi_FromFolderAsync(get_abi(sourceRootFolder), put_abi(operation))); return operation; } template hstring impl_IPhotoImportSource::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Id(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Description(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::Manufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Manufacturer(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Manufacturer(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::Model() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Model(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Model(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::SerialNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SerialNumber(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_SerialNumber(put_abi(value))); return value; } template hstring impl_IPhotoImportSource::ConnectionProtocol() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ConnectionProtocol(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_ConnectionProtocol(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportConnectionTransport impl_IPhotoImportSource::ConnectionTransport() const { Windows::Media::Import::PhotoImportConnectionTransport value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionTransport(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_ConnectionTransport(&value)); return value; } template Windows::Media::Import::PhotoImportSourceType impl_IPhotoImportSource::Type() const { Windows::Media::Import::PhotoImportSourceType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Type(&value)); return value; } template Windows::Media::Import::PhotoImportPowerSource impl_IPhotoImportSource::PowerSource() const { Windows::Media::Import::PhotoImportPowerSource value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSource(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_PowerSource(&value)); return value; } template Windows::Foundation::IReference impl_IPhotoImportSource::BatteryLevelPercent() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_BatteryLevelPercent(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_BatteryLevelPercent(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IPhotoImportSource::DateTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DateTime(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_DateTime(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportSource::StorageMedia() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_StorageMedia(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_StorageMedia(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IPhotoImportSource::IsLocked() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsLocked(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_IsLocked(put_abi(value))); return value; } template bool impl_IPhotoImportSource::IsMassStorage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMassStorage(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_IsMassStorage(&value)); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IPhotoImportSource::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->get_Thumbnail(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportSession impl_IPhotoImportSource::CreateImportSession() const { Windows::Media::Import::PhotoImportSession result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateImportSession(put(result))); + check_hresult(WINRT_SHIM(IPhotoImportSource)->abi_CreateImportSession(put_abi(result))); return result; } template Windows::Media::Import::PhotoImportSource impl_IPhotoImportSession::Source() const { Windows::Media::Import::PhotoImportSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_Source(put_abi(value))); return value; } template GUID impl_IPhotoImportSession::SessionId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionId(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_SessionId(&value)); return value; } template void impl_IPhotoImportSession::DestinationFolder(const Windows::Storage::IStorageFolder & value) const { - check_hresult(static_cast(static_cast(*this))->put_DestinationFolder(get(value))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->put_DestinationFolder(get_abi(value))); } template Windows::Storage::IStorageFolder impl_IPhotoImportSession::DestinationFolder() const { Windows::Storage::IStorageFolder value; - check_hresult(static_cast(static_cast(*this))->get_DestinationFolder(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_DestinationFolder(put_abi(value))); return value; } template void impl_IPhotoImportSession::AppendSessionDateToDestinationFolder(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AppendSessionDateToDestinationFolder(value)); + check_hresult(WINRT_SHIM(IPhotoImportSession)->put_AppendSessionDateToDestinationFolder(value)); } template bool impl_IPhotoImportSession::AppendSessionDateToDestinationFolder() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AppendSessionDateToDestinationFolder(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_AppendSessionDateToDestinationFolder(&value)); return value; } template void impl_IPhotoImportSession::SubfolderCreationMode(Windows::Media::Import::PhotoImportSubfolderCreationMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SubfolderCreationMode(value)); + check_hresult(WINRT_SHIM(IPhotoImportSession)->put_SubfolderCreationMode(value)); } template Windows::Media::Import::PhotoImportSubfolderCreationMode impl_IPhotoImportSession::SubfolderCreationMode() const { Windows::Media::Import::PhotoImportSubfolderCreationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SubfolderCreationMode(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_SubfolderCreationMode(&value)); return value; } -template void impl_IPhotoImportSession::DestinationFileNamePrefix(hstring_ref value) const +template void impl_IPhotoImportSession::DestinationFileNamePrefix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DestinationFileNamePrefix(get(value))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->put_DestinationFileNamePrefix(get_abi(value))); } template hstring impl_IPhotoImportSession::DestinationFileNamePrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DestinationFileNamePrefix(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->get_DestinationFileNamePrefix(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportSession::FindItemsAsync(Windows::Media::Import::PhotoImportContentTypeFilter contentTypeFilter, Windows::Media::Import::PhotoImportItemSelectionMode itemSelectionMode) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_FindItemsAsync(contentTypeFilter, itemSelectionMode, put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportSession)->abi_FindItemsAsync(contentTypeFilter, itemSelectionMode, put_abi(operation))); return operation; } template void impl_IPhotoImportSession2::SubfolderDateFormat(Windows::Media::Import::PhotoImportSubfolderDateFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_SubfolderDateFormat(value)); + check_hresult(WINRT_SHIM(IPhotoImportSession2)->put_SubfolderDateFormat(value)); } template Windows::Media::Import::PhotoImportSubfolderDateFormat impl_IPhotoImportSession2::SubfolderDateFormat() const { Windows::Media::Import::PhotoImportSubfolderDateFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_SubfolderDateFormat(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSession2)->get_SubfolderDateFormat(&value)); return value; } template void impl_IPhotoImportSession2::RememberDeselectedItems(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RememberDeselectedItems(value)); + check_hresult(WINRT_SHIM(IPhotoImportSession2)->put_RememberDeselectedItems(value)); } template bool impl_IPhotoImportSession2::RememberDeselectedItems() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RememberDeselectedItems(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSession2)->get_RememberDeselectedItems(&value)); return value; } template hstring impl_IPhotoImportItem::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_Name(put_abi(value))); return value; } template uint64_t impl_IPhotoImportItem::ItemKey() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemKey(&value)); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_ItemKey(&value)); return value; } template Windows::Media::Import::PhotoImportContentType impl_IPhotoImportItem::ContentType() const { Windows::Media::Import::PhotoImportContentType value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentType(&value)); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_ContentType(&value)); return value; } template uint64_t impl_IPhotoImportItem::SizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_SizeInBytes(&value)); return value; } template Windows::Foundation::DateTime impl_IPhotoImportItem::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_Date(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportSidecar impl_IPhotoImportItem::Sibling() const { Windows::Media::Import::PhotoImportSidecar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Sibling(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_Sibling(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportItem::Sidecars() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Sidecars(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_Sidecars(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportItem::VideoSegments() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_VideoSegments(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_VideoSegments(put_abi(value))); return value; } template bool impl_IPhotoImportItem::IsSelected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelected(&value)); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_IsSelected(&value)); return value; } template void impl_IPhotoImportItem::IsSelected(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSelected(value)); + check_hresult(WINRT_SHIM(IPhotoImportItem)->put_IsSelected(value)); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IPhotoImportItem::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_Thumbnail(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportItem::ImportedFileNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ImportedFileNames(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_ImportedFileNames(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportItem::DeletedFileNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DeletedFileNames(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItem)->get_DeletedFileNames(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportSession impl_IPhotoImportFindItemsResult::Session() const { Windows::Media::Import::PhotoImportSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_Session(put_abi(value))); return value; } template bool impl_IPhotoImportFindItemsResult::HasSucceeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasSucceeded(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_HasSucceeded(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportFindItemsResult::FoundItems() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_FoundItems(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_FoundItems(put_abi(value))); return value; } template uint32_t impl_IPhotoImportFindItemsResult::PhotosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_PhotosCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::PhotosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_PhotosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::VideosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_VideosCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::VideosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_VideosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SidecarsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SidecarsCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SidecarsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SidecarsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SiblingsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SiblingsCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SiblingsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SiblingsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::TotalCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_TotalCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::TotalSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_TotalSizeInBytes(&value)); return value; } template void impl_IPhotoImportFindItemsResult::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->abi_SelectAll()); } template void impl_IPhotoImportFindItemsResult::SelectNone() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectNone()); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->abi_SelectNone()); } template Windows::Foundation::IAsyncAction impl_IPhotoImportFindItemsResult::SelectNewAsync() const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_SelectNewAsync(put(action))); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->abi_SelectNewAsync(put_abi(action))); return action; } template void impl_IPhotoImportFindItemsResult::SetImportMode(Windows::Media::Import::PhotoImportImportMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetImportMode(value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->abi_SetImportMode(value)); } template Windows::Media::Import::PhotoImportImportMode impl_IPhotoImportFindItemsResult::ImportMode() const { Windows::Media::Import::PhotoImportImportMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ImportMode(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_ImportMode(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SelectedPhotosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedPhotosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedPhotosCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SelectedPhotosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedPhotosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedPhotosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SelectedVideosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedVideosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedVideosCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SelectedVideosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedVideosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedVideosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SelectedSidecarsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedSidecarsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedSidecarsCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SelectedSidecarsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedSidecarsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedSidecarsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SelectedSiblingsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedSiblingsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedSiblingsCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SelectedSiblingsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedSiblingsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedSiblingsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportFindItemsResult::SelectedTotalCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedTotalCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedTotalCount(&value)); return value; } template uint64_t impl_IPhotoImportFindItemsResult::SelectedTotalSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedTotalSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->get_SelectedTotalSizeInBytes(&value)); return value; } template event_token impl_IPhotoImportFindItemsResult::SelectionChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -2504,20 +2641,20 @@ template event_revoker impl_IPhotoImpo template void impl_IPhotoImportFindItemsResult::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->remove_SelectionChanged(token)); } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportFindItemsResult::ImportItemsAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_ImportItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->abi_ImportItemsAsync(put_abi(operation))); return operation; } template event_token impl_IPhotoImportFindItemsResult::ItemImported(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemImported(get(value), &token)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->add_ItemImported(get_abi(value), &token)); return token; } @@ -2528,270 +2665,270 @@ template event_revoker impl_IPhotoImpo template void impl_IPhotoImportFindItemsResult::ItemImported(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemImported(token)); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult)->remove_ItemImported(token)); } template void impl_IPhotoImportFindItemsResult2::AddItemsInDateRangeToSelection(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const { - check_hresult(static_cast(static_cast(*this))->abi_AddItemsInDateRangeToSelection(get(rangeStart), get(rangeLength))); + check_hresult(WINRT_SHIM(IPhotoImportFindItemsResult2)->abi_AddItemsInDateRangeToSelection(get_abi(rangeStart), get_abi(rangeLength))); } template Windows::Media::Import::PhotoImportSession impl_IPhotoImportImportItemsResult::Session() const { Windows::Media::Import::PhotoImportSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_Session(put_abi(value))); return value; } template bool impl_IPhotoImportImportItemsResult::HasSucceeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasSucceeded(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_HasSucceeded(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportImportItemsResult::ImportedItems() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ImportedItems(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_ImportedItems(put_abi(value))); return value; } template uint32_t impl_IPhotoImportImportItemsResult::PhotosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_PhotosCount(&value)); return value; } template uint64_t impl_IPhotoImportImportItemsResult::PhotosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_PhotosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportImportItemsResult::VideosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_VideosCount(&value)); return value; } template uint64_t impl_IPhotoImportImportItemsResult::VideosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_VideosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportImportItemsResult::SidecarsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_SidecarsCount(&value)); return value; } template uint64_t impl_IPhotoImportImportItemsResult::SidecarsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_SidecarsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportImportItemsResult::SiblingsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_SiblingsCount(&value)); return value; } template uint64_t impl_IPhotoImportImportItemsResult::SiblingsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_SiblingsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportImportItemsResult::TotalCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_TotalCount(&value)); return value; } template uint64_t impl_IPhotoImportImportItemsResult::TotalSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->get_TotalSizeInBytes(&value)); return value; } template Windows::Foundation::IAsyncOperationWithProgress impl_IPhotoImportImportItemsResult::DeleteImportedItemsFromSourceAsync() const { Windows::Foundation::IAsyncOperationWithProgress result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteImportedItemsFromSourceAsync(put(result))); + check_hresult(WINRT_SHIM(IPhotoImportImportItemsResult)->abi_DeleteImportedItemsFromSourceAsync(put_abi(result))); return result; } template Windows::Media::Import::PhotoImportSession impl_IPhotoImportDeleteImportedItemsFromSourceResult::Session() const { Windows::Media::Import::PhotoImportSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Session(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_Session(put_abi(value))); return value; } template bool impl_IPhotoImportDeleteImportedItemsFromSourceResult::HasSucceeded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasSucceeded(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_HasSucceeded(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportDeleteImportedItemsFromSourceResult::DeletedItems() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DeletedItems(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_DeletedItems(put_abi(value))); return value; } template uint32_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::PhotosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_PhotosCount(&value)); return value; } template uint64_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::PhotosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PhotosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_PhotosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::VideosCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_VideosCount(&value)); return value; } template uint64_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::VideosSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VideosSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_VideosSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::SidecarsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_SidecarsCount(&value)); return value; } template uint64_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::SidecarsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SidecarsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_SidecarsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::SiblingsCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_SiblingsCount(&value)); return value; } template uint64_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::SiblingsSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SiblingsSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_SiblingsSizeInBytes(&value)); return value; } template uint32_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::TotalCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalCount(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_TotalCount(&value)); return value; } template uint64_t impl_IPhotoImportDeleteImportedItemsFromSourceResult::TotalSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportDeleteImportedItemsFromSourceResult)->get_TotalSizeInBytes(&value)); return value; } template hstring impl_IPhotoImportSidecar::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSidecar)->get_Name(put_abi(value))); return value; } template uint64_t impl_IPhotoImportSidecar::SizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSidecar)->get_SizeInBytes(&value)); return value; } template Windows::Foundation::DateTime impl_IPhotoImportSidecar::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportSidecar)->get_Date(put_abi(value))); return value; } template hstring impl_IPhotoImportVideoSegment::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportVideoSegment)->get_Name(put_abi(value))); return value; } template uint64_t impl_IPhotoImportVideoSegment::SizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SizeInBytes(&value)); + check_hresult(WINRT_SHIM(IPhotoImportVideoSegment)->get_SizeInBytes(&value)); return value; } template Windows::Foundation::DateTime impl_IPhotoImportVideoSegment::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportVideoSegment)->get_Date(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportSidecar impl_IPhotoImportVideoSegment::Sibling() const { Windows::Media::Import::PhotoImportSidecar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Sibling(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportVideoSegment)->get_Sibling(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhotoImportVideoSegment::Sidecars() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Sidecars(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportVideoSegment)->get_Sidecars(put_abi(value))); return value; } template Windows::Media::Import::PhotoImportItem impl_IPhotoImportItemImportedEventArgs::ImportedItem() const { Windows::Media::Import::PhotoImportItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImportedItem(put(value))); + check_hresult(WINRT_SHIM(IPhotoImportItemImportedEventArgs)->get_ImportedItem(put_abi(value))); return value; } template bool impl_IPhotoImportSelectionChangedEventArgs::IsSelectionEmpty() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelectionEmpty(&value)); + check_hresult(WINRT_SHIM(IPhotoImportSelectionChangedEventArgs)->get_IsSelectionEmpty(&value)); return value; } @@ -2810,7 +2947,7 @@ inline Windows::Foundation::Collections::IVectorView().GetPendingOperations(); } -inline Windows::Foundation::IAsyncOperation PhotoImportSource::FromIdAsync(hstring_ref sourceId) +inline Windows::Foundation::IAsyncOperation PhotoImportSource::FromIdAsync(hstring_view sourceId) { return get_activation_factory().FromIdAsync(sourceId); } @@ -2823,3 +2960,257 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportDeleteImportedItemsFromSourceResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportFindItemsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportFindItemsResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportImportItemsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportItemImportedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSelectionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSession2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSidecar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportStorageMedium & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::IPhotoImportVideoSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportFindItemsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportImportItemsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportItemImportedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportSelectionChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportSidecar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportStorageMedium & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Import::PhotoImportVideoSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.MediaProperties.h b/10.0.14393.0/winrt/Windows.Media.MediaProperties.h index e2e2b679a..e92804273 100644 --- a/10.0.14393.0/winrt/Windows.Media.MediaProperties.h +++ b/10.0.14393.0/winrt/Windows.Media.MediaProperties.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" @@ -22,6 +25,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Bitrate(value); return S_OK; } @@ -35,7 +39,8 @@ struct produce : p { try { - *value = detach(this->shim().Bitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bitrate()); return S_OK; } catch (...) @@ -48,6 +53,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ChannelCount(value); return S_OK; } @@ -61,7 +67,8 @@ struct produce : p { try { - *value = detach(this->shim().ChannelCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChannelCount()); return S_OK; } catch (...) @@ -74,6 +81,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SampleRate(value); return S_OK; } @@ -87,7 +95,8 @@ struct produce : p { try { - *value = detach(this->shim().SampleRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SampleRate()); return S_OK; } catch (...) @@ -100,6 +109,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().BitsPerSample(value); return S_OK; } @@ -113,7 +123,8 @@ struct produce : p { try { - *value = detach(this->shim().BitsPerSample()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitsPerSample()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateAac(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAac(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAac(sampleRate, channelCount, bitrate)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAac(sampleRate, channelCount, bitrate)); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateAacAdts(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAacAdts(sampleRate, channelCount, bitrate)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAacAdts(sampleRate, channelCount, bitrate)); return S_OK; } catch (...) @@ -154,11 +167,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateMp3(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMp3(sampleRate, channelCount, bitrate)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMp3(sampleRate, channelCount, bitrate)); return S_OK; } catch (...) @@ -168,11 +182,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreatePcm(uint32_t sampleRate, uint32_t channelCount, uint32_t bitsPerSample, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreatePcm(sampleRate, channelCount, bitsPerSample)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreatePcm(sampleRate, channelCount, bitsPerSample)); return S_OK; } catch (...) @@ -182,11 +197,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateWma(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWma(sampleRate, channelCount, bitrate)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWma(sampleRate, channelCount, bitrate)); return S_OK; } catch (...) @@ -200,11 +216,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetFormatUserData(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetFormatUserData(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetFormatUserData(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetFormatUserData(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -213,11 +230,12 @@ struct produce * value) noexcept override + HRESULT __stdcall abi_GetFormatUserData(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().GetFormatUserData(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().GetFormatUserData(detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -240,7 +258,8 @@ struct produce : pro { try { - *value = detach(this->shim().ConstrainedBaseline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConstrainedBaseline()); return S_OK; } catch (...) @@ -253,7 +272,8 @@ struct produce : pro { try { - *value = detach(this->shim().Baseline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Baseline()); return S_OK; } catch (...) @@ -266,7 +286,8 @@ struct produce : pro { try { - *value = detach(this->shim().Extended()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Extended()); return S_OK; } catch (...) @@ -279,7 +300,8 @@ struct produce : pro { try { - *value = detach(this->shim().Main()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Main()); return S_OK; } catch (...) @@ -292,7 +314,8 @@ struct produce : pro { try { - *value = detach(this->shim().High()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().High()); return S_OK; } catch (...) @@ -305,7 +328,8 @@ struct produce : pro { try { - *value = detach(this->shim().High10()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().High10()); return S_OK; } catch (...) @@ -318,7 +342,8 @@ struct produce : pro { try { - *value = detach(this->shim().High422()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().High422()); return S_OK; } catch (...) @@ -331,7 +356,8 @@ struct produce : pro { try { - *value = detach(this->shim().High444()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().High444()); return S_OK; } catch (...) @@ -344,7 +370,8 @@ struct produce : pro { try { - *value = detach(this->shim().StereoHigh()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoHigh()); return S_OK; } catch (...) @@ -357,7 +384,8 @@ struct produce : pro { try { - *value = detach(this->shim().MultiviewHigh()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MultiviewHigh()); return S_OK; } catch (...) @@ -374,6 +402,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Width(value); return S_OK; } @@ -387,7 +416,8 @@ struct produce : p { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -400,6 +430,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Height(value); return S_OK; } @@ -413,7 +444,8 @@ struct produce : p { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -426,11 +458,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateJpeg(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateJpeg(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateJpeg()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateJpeg()); return S_OK; } catch (...) @@ -440,11 +473,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreatePng(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreatePng()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreatePng()); return S_OK; } catch (...) @@ -454,11 +488,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateJpegXR(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateJpegXR()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateJpegXR()); return S_OK; } catch (...) @@ -472,11 +507,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateUncompressed(Windows::Media::MediaProperties::MediaPixelFormat format, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateUncompressed(Windows::Media::MediaProperties::MediaPixelFormat format, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateUncompressed(format)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateUncompressed(format)); return S_OK; } catch (...) @@ -486,11 +522,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateBmp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateBmp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateBmp()); return S_OK; } catch (...) @@ -504,10 +541,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall put_Audio(abi_arg_in value) noexcept override + HRESULT __stdcall put_Audio(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Audio(*reinterpret_cast(&value)); return S_OK; } @@ -517,11 +555,12 @@ struct produce : prod } } - HRESULT __stdcall get_Audio(abi_arg_out value) noexcept override + HRESULT __stdcall get_Audio(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Audio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Audio()); return S_OK; } catch (...) @@ -531,10 +570,11 @@ struct produce : prod } } - HRESULT __stdcall put_Video(abi_arg_in value) noexcept override + HRESULT __stdcall put_Video(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Video(*reinterpret_cast(&value)); return S_OK; } @@ -544,11 +584,12 @@ struct produce : prod } } - HRESULT __stdcall get_Video(abi_arg_out value) noexcept override + HRESULT __stdcall get_Video(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Video()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Video()); return S_OK; } catch (...) @@ -558,10 +599,11 @@ struct produce : prod } } - HRESULT __stdcall put_Container(abi_arg_in value) noexcept override + HRESULT __stdcall put_Container(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Container(*reinterpret_cast(&value)); return S_OK; } @@ -571,11 +613,12 @@ struct produce : prod } } - HRESULT __stdcall get_Container(abi_arg_out value) noexcept override + HRESULT __stdcall get_Container(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Container()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Container()); return S_OK; } catch (...) @@ -589,11 +632,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateM4a(Windows::Media::MediaProperties::AudioEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateM4a(Windows::Media::MediaProperties::AudioEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateM4a(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateM4a(quality)); return S_OK; } catch (...) @@ -603,11 +647,12 @@ struct produce } } - HRESULT __stdcall abi_CreateMp3(Windows::Media::MediaProperties::AudioEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMp3(Windows::Media::MediaProperties::AudioEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMp3(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMp3(quality)); return S_OK; } catch (...) @@ -617,11 +662,12 @@ struct produce } } - HRESULT __stdcall abi_CreateWma(Windows::Media::MediaProperties::AudioEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWma(Windows::Media::MediaProperties::AudioEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWma(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWma(quality)); return S_OK; } catch (...) @@ -631,11 +677,12 @@ struct produce } } - HRESULT __stdcall abi_CreateMp4(Windows::Media::MediaProperties::VideoEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMp4(Windows::Media::MediaProperties::VideoEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMp4(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMp4(quality)); return S_OK; } catch (...) @@ -645,11 +692,12 @@ struct produce } } - HRESULT __stdcall abi_CreateWmv(Windows::Media::MediaProperties::VideoEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWmv(Windows::Media::MediaProperties::VideoEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWmv(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWmv(quality)); return S_OK; } catch (...) @@ -659,11 +707,12 @@ struct produce } } - HRESULT __stdcall abi_CreateFromFileAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromFileAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -673,11 +722,12 @@ struct produce } } - HRESULT __stdcall abi_CreateFromStreamAsync(abi_arg_in stream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFromStreamAsync(impl::abi_arg_in stream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -691,11 +741,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateWav(Windows::Media::MediaProperties::AudioEncodingQuality quality, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWav(Windows::Media::MediaProperties::AudioEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWav(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWav(quality)); return S_OK; } catch (...) @@ -705,11 +756,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateAvi(Windows::Media::MediaProperties::VideoEncodingQuality quality, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAvi(quality)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAvi(quality)); return S_OK; } catch (...) @@ -723,11 +775,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -737,11 +790,12 @@ struct produce : p } } - HRESULT __stdcall get_Type(abi_arg_out value) noexcept override + HRESULT __stdcall get_Type(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -751,10 +805,11 @@ struct produce : p } } - HRESULT __stdcall put_Subtype(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subtype(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subtype(*reinterpret_cast(&value)); return S_OK; } @@ -764,11 +819,12 @@ struct produce : p } } - HRESULT __stdcall get_Subtype(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subtype(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtype()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtype()); return S_OK; } catch (...) @@ -782,11 +838,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Aac(abi_arg_out value) noexcept override + HRESULT __stdcall get_Aac(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Aac()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Aac()); return S_OK; } catch (...) @@ -796,11 +853,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AacAdts(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AacAdts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AacAdts()); return S_OK; } catch (...) @@ -810,11 +868,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ac3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ac3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ac3()); return S_OK; } catch (...) @@ -824,11 +883,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AmrNb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AmrNb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AmrNb()); return S_OK; } catch (...) @@ -838,11 +898,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AmrWb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AmrWb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AmrWb()); return S_OK; } catch (...) @@ -852,11 +913,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Argb32(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Argb32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Argb32()); return S_OK; } catch (...) @@ -866,11 +928,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Asf(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Asf()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Asf()); return S_OK; } catch (...) @@ -880,11 +943,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Avi(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Avi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Avi()); return S_OK; } catch (...) @@ -894,11 +958,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Bgra8(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bgra8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bgra8()); return S_OK; } catch (...) @@ -908,11 +973,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Bmp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bmp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bmp()); return S_OK; } catch (...) @@ -922,11 +988,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Eac3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Eac3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Eac3()); return S_OK; } catch (...) @@ -936,11 +1003,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Float(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Float()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Float()); return S_OK; } catch (...) @@ -950,11 +1018,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Gif(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Gif()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gif()); return S_OK; } catch (...) @@ -964,11 +1033,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_H263(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().H263()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().H263()); return S_OK; } catch (...) @@ -978,11 +1048,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_H264(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().H264()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().H264()); return S_OK; } catch (...) @@ -992,11 +1063,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_H264Es(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().H264Es()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().H264Es()); return S_OK; } catch (...) @@ -1006,11 +1078,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Hevc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hevc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hevc()); return S_OK; } catch (...) @@ -1020,11 +1093,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HevcEs(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HevcEs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HevcEs()); return S_OK; } catch (...) @@ -1034,11 +1108,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Iyuv(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Iyuv()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Iyuv()); return S_OK; } catch (...) @@ -1048,11 +1123,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Jpeg(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Jpeg()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Jpeg()); return S_OK; } catch (...) @@ -1062,11 +1138,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_JpegXr(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JpegXr()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JpegXr()); return S_OK; } catch (...) @@ -1076,11 +1153,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mjpg(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mjpg()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mjpg()); return S_OK; } catch (...) @@ -1090,11 +1168,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mpeg(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mpeg()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mpeg()); return S_OK; } catch (...) @@ -1104,11 +1183,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mpeg1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mpeg1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mpeg1()); return S_OK; } catch (...) @@ -1118,11 +1198,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mpeg2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mpeg2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mpeg2()); return S_OK; } catch (...) @@ -1132,11 +1213,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mp3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mp3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mp3()); return S_OK; } catch (...) @@ -1146,11 +1228,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Mpeg4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mpeg4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mpeg4()); return S_OK; } catch (...) @@ -1160,11 +1243,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Nv12(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Nv12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nv12()); return S_OK; } catch (...) @@ -1174,11 +1258,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pcm(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pcm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pcm()); return S_OK; } catch (...) @@ -1188,11 +1273,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Png(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Png()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Png()); return S_OK; } catch (...) @@ -1202,11 +1288,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rgb24(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rgb24()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rgb24()); return S_OK; } catch (...) @@ -1216,11 +1303,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rgb32(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rgb32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rgb32()); return S_OK; } catch (...) @@ -1230,11 +1318,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Tiff(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tiff()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tiff()); return S_OK; } catch (...) @@ -1244,11 +1333,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wave(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wave()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wave()); return S_OK; } catch (...) @@ -1258,11 +1348,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wma8(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wma8()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wma8()); return S_OK; } catch (...) @@ -1272,11 +1363,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wma9(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wma9()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wma9()); return S_OK; } catch (...) @@ -1286,11 +1378,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wmv3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wmv3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wmv3()); return S_OK; } catch (...) @@ -1300,11 +1393,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wvc1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wvc1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wvc1()); return S_OK; } catch (...) @@ -1314,11 +1408,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Yuy2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Yuy2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Yuy2()); return S_OK; } catch (...) @@ -1328,11 +1423,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Yv12(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Yv12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Yv12()); return S_OK; } catch (...) @@ -1350,6 +1446,7 @@ struct produce : produce_baseshim()); this->shim().Numerator(value); return S_OK; } @@ -1363,7 +1460,8 @@ struct produce : produce_baseshim().Numerator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Numerator()); return S_OK; } catch (...) @@ -1376,6 +1474,7 @@ struct produce : produce_baseshim()); this->shim().Denominator(value); return S_OK; } @@ -1389,7 +1488,8 @@ struct produce : produce_baseshim().Denominator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Denominator()); return S_OK; } catch (...) @@ -1406,7 +1506,8 @@ struct produce : pr { try { - *value = detach(this->shim().Simple()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Simple()); return S_OK; } catch (...) @@ -1419,7 +1520,8 @@ struct produce : pr { try { - *value = detach(this->shim().Main()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Main()); return S_OK; } catch (...) @@ -1432,7 +1534,8 @@ struct produce : pr { try { - *value = detach(this->shim().SignalNoiseRatioScalable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignalNoiseRatioScalable()); return S_OK; } catch (...) @@ -1445,7 +1548,8 @@ struct produce : pr { try { - *value = detach(this->shim().SpatiallyScalable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpatiallyScalable()); return S_OK; } catch (...) @@ -1458,7 +1562,8 @@ struct produce : pr { try { - *value = detach(this->shim().High()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().High()); return S_OK; } catch (...) @@ -1475,6 +1580,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Bitrate(value); return S_OK; } @@ -1488,7 +1594,8 @@ struct produce : p { try { - *value = detach(this->shim().Bitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bitrate()); return S_OK; } catch (...) @@ -1501,6 +1608,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Width(value); return S_OK; } @@ -1514,7 +1622,8 @@ struct produce : p { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -1527,6 +1636,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Height(value); return S_OK; } @@ -1540,7 +1650,8 @@ struct produce : p { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -1549,11 +1660,12 @@ struct produce : p } } - HRESULT __stdcall get_FrameRate(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameRate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameRate()); return S_OK; } catch (...) @@ -1563,11 +1675,12 @@ struct produce : p } } - HRESULT __stdcall get_PixelAspectRatio(abi_arg_out value) noexcept override + HRESULT __stdcall get_PixelAspectRatio(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PixelAspectRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelAspectRatio()); return S_OK; } catch (...) @@ -1581,11 +1694,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_SetFormatUserData(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetFormatUserData(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetFormatUserData(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetFormatUserData(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1594,11 +1708,12 @@ struct produce : } } - HRESULT __stdcall abi_GetFormatUserData(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetFormatUserData(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().GetFormatUserData(detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().GetFormatUserData(detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -1613,6 +1728,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ProfileId(value); return S_OK; } @@ -1626,7 +1742,8 @@ struct produce : { try { - *value = detach(this->shim().ProfileId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProfileId()); return S_OK; } catch (...) @@ -1643,7 +1760,8 @@ struct produce : { try { - *value = detach(this->shim().StereoscopicVideoPackingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoscopicVideoPackingMode()); return S_OK; } catch (...) @@ -1656,11 +1774,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateH264(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateH264(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateH264()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateH264()); return S_OK; } catch (...) @@ -1670,11 +1789,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CreateMpeg2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMpeg2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMpeg2()); return S_OK; } catch (...) @@ -1684,11 +1804,12 @@ struct produce subtype, uint32_t width, uint32_t height, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateUncompressed(impl::abi_arg_in subtype, uint32_t width, uint32_t height, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateUncompressed(*reinterpret_cast(&subtype), width, height)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateUncompressed(*reinterpret_cast(&subtype), width, height)); return S_OK; } catch (...) @@ -1705,787 +1826,787 @@ namespace Windows::Media::MediaProperties { template void impl_IMediaRatio::Numerator(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Numerator(value)); + check_hresult(WINRT_SHIM(IMediaRatio)->put_Numerator(value)); } template uint32_t impl_IMediaRatio::Numerator() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Numerator(&value)); + check_hresult(WINRT_SHIM(IMediaRatio)->get_Numerator(&value)); return value; } template void impl_IMediaRatio::Denominator(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Denominator(value)); + check_hresult(WINRT_SHIM(IMediaRatio)->put_Denominator(value)); } template uint32_t impl_IMediaRatio::Denominator() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Denominator(&value)); + check_hresult(WINRT_SHIM(IMediaRatio)->get_Denominator(&value)); return value; } template Windows::Media::MediaProperties::MediaPropertySet impl_IMediaEncodingProperties::Properties() const { Windows::Media::MediaProperties::MediaPropertySet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProperties)->get_Properties(put_abi(value))); return value; } template hstring impl_IMediaEncodingProperties::Type() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Type(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProperties)->get_Type(put_abi(value))); return value; } -template void impl_IMediaEncodingProperties::Subtype(hstring_ref value) const +template void impl_IMediaEncodingProperties::Subtype(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subtype(get(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProperties)->put_Subtype(get_abi(value))); } template hstring impl_IMediaEncodingProperties::Subtype() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtype(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProperties)->get_Subtype(put_abi(value))); return value; } template void impl_IAudioEncodingProperties::Bitrate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Bitrate(value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->put_Bitrate(value)); } template uint32_t impl_IAudioEncodingProperties::Bitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bitrate(&value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->get_Bitrate(&value)); return value; } template void impl_IAudioEncodingProperties::ChannelCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ChannelCount(value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->put_ChannelCount(value)); } template uint32_t impl_IAudioEncodingProperties::ChannelCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChannelCount(&value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->get_ChannelCount(&value)); return value; } template void impl_IAudioEncodingProperties::SampleRate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SampleRate(value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->put_SampleRate(value)); } template uint32_t impl_IAudioEncodingProperties::SampleRate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SampleRate(&value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->get_SampleRate(&value)); return value; } template void impl_IAudioEncodingProperties::BitsPerSample(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_BitsPerSample(value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->put_BitsPerSample(value)); } template uint32_t impl_IAudioEncodingProperties::BitsPerSample() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BitsPerSample(&value)); + check_hresult(WINRT_SHIM(IAudioEncodingProperties)->get_BitsPerSample(&value)); return value; } -template void impl_IAudioEncodingPropertiesWithFormatUserData::SetFormatUserData(array_ref value) const +template void impl_IAudioEncodingPropertiesWithFormatUserData::SetFormatUserData(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFormatUserData(value.size(), get(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesWithFormatUserData)->abi_SetFormatUserData(value.size(), get_abi(value))); } template void impl_IAudioEncodingPropertiesWithFormatUserData::GetFormatUserData(com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetFormatUserData(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesWithFormatUserData)->abi_GetFormatUserData(impl::put_size_abi(value), put_abi(value))); } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioEncodingPropertiesStatics::CreateAac(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate) const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAac(sampleRate, channelCount, bitrate, put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesStatics)->abi_CreateAac(sampleRate, channelCount, bitrate, put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioEncodingPropertiesStatics::CreateAacAdts(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate) const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAacAdts(sampleRate, channelCount, bitrate, put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesStatics)->abi_CreateAacAdts(sampleRate, channelCount, bitrate, put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioEncodingPropertiesStatics::CreateMp3(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate) const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMp3(sampleRate, channelCount, bitrate, put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesStatics)->abi_CreateMp3(sampleRate, channelCount, bitrate, put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioEncodingPropertiesStatics::CreatePcm(uint32_t sampleRate, uint32_t channelCount, uint32_t bitsPerSample) const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePcm(sampleRate, channelCount, bitsPerSample, put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesStatics)->abi_CreatePcm(sampleRate, channelCount, bitsPerSample, put_abi(value))); return value; } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IAudioEncodingPropertiesStatics::CreateWma(uint32_t sampleRate, uint32_t channelCount, uint32_t bitrate) const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWma(sampleRate, channelCount, bitrate, put(value))); + check_hresult(WINRT_SHIM(IAudioEncodingPropertiesStatics)->abi_CreateWma(sampleRate, channelCount, bitrate, put_abi(value))); return value; } template void impl_IVideoEncodingProperties::Bitrate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Bitrate(value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->put_Bitrate(value)); } template uint32_t impl_IVideoEncodingProperties::Bitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bitrate(&value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->get_Bitrate(&value)); return value; } template void impl_IVideoEncodingProperties::Width(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Width(value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->put_Width(value)); } template uint32_t impl_IVideoEncodingProperties::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->get_Width(&value)); return value; } template void impl_IVideoEncodingProperties::Height(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Height(value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->put_Height(value)); } template uint32_t impl_IVideoEncodingProperties::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->get_Height(&value)); return value; } template Windows::Media::MediaProperties::MediaRatio impl_IVideoEncodingProperties::FrameRate() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FrameRate(put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->get_FrameRate(put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaRatio impl_IVideoEncodingProperties::PixelAspectRatio() const { Windows::Media::MediaProperties::MediaRatio value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PixelAspectRatio(put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingProperties)->get_PixelAspectRatio(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Aac() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Aac(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Aac(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::AacAdts() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AacAdts(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_AacAdts(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Ac3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ac3(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Ac3(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::AmrNb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AmrNb(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_AmrNb(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::AmrWb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AmrWb(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_AmrWb(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Argb32() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Argb32(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Argb32(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Asf() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Asf(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Asf(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Avi() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Avi(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Avi(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Bgra8() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bgra8(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Bgra8(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Bmp() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bmp(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Bmp(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Eac3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Eac3(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Eac3(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Float() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Float(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Float(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Gif() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Gif(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Gif(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::H263() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_H263(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_H263(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::H264() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_H264(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_H264(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::H264Es() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_H264Es(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_H264Es(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Hevc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Hevc(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Hevc(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::HevcEs() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HevcEs(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_HevcEs(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Iyuv() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Iyuv(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Iyuv(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Jpeg() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Jpeg(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Jpeg(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::JpegXr() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JpegXr(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_JpegXr(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mjpg() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mjpg(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mjpg(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mpeg() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mpeg(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mpeg(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mpeg1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mpeg1(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mpeg1(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mpeg2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mpeg2(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mpeg2(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mp3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mp3(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mp3(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Mpeg4() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Mpeg4(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Mpeg4(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Nv12() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Nv12(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Nv12(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Pcm() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pcm(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Pcm(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Png() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Png(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Png(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Rgb24() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rgb24(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Rgb24(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Rgb32() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rgb32(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Rgb32(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Tiff() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tiff(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Tiff(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Wave() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wave(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Wave(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Wma8() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wma8(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Wma8(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Wma9() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wma9(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Wma9(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Wmv3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wmv3(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Wmv3(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Wvc1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wvc1(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Wvc1(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Yuy2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Yuy2(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Yuy2(put_abi(value))); return value; } template hstring impl_IMediaEncodingSubtypesStatics::Yv12() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Yv12(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingSubtypesStatics)->get_Yv12(put_abi(value))); return value; } template int32_t impl_IH264ProfileIdsStatics::ConstrainedBaseline() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ConstrainedBaseline(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_ConstrainedBaseline(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::Baseline() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Baseline(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_Baseline(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::Extended() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Extended(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_Extended(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::Main() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Main(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_Main(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::High() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_High(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_High(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::High10() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_High10(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_High10(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::High422() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_High422(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_High422(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::High444() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_High444(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_High444(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::StereoHigh() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoHigh(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_StereoHigh(&value)); return value; } template int32_t impl_IH264ProfileIdsStatics::MultiviewHigh() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MultiviewHigh(&value)); + check_hresult(WINRT_SHIM(IH264ProfileIdsStatics)->get_MultiviewHigh(&value)); return value; } template int32_t impl_IMpeg2ProfileIdsStatics::Simple() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Simple(&value)); + check_hresult(WINRT_SHIM(IMpeg2ProfileIdsStatics)->get_Simple(&value)); return value; } template int32_t impl_IMpeg2ProfileIdsStatics::Main() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Main(&value)); + check_hresult(WINRT_SHIM(IMpeg2ProfileIdsStatics)->get_Main(&value)); return value; } template int32_t impl_IMpeg2ProfileIdsStatics::SignalNoiseRatioScalable() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SignalNoiseRatioScalable(&value)); + check_hresult(WINRT_SHIM(IMpeg2ProfileIdsStatics)->get_SignalNoiseRatioScalable(&value)); return value; } template int32_t impl_IMpeg2ProfileIdsStatics::SpatiallyScalable() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SpatiallyScalable(&value)); + check_hresult(WINRT_SHIM(IMpeg2ProfileIdsStatics)->get_SpatiallyScalable(&value)); return value; } template int32_t impl_IMpeg2ProfileIdsStatics::High() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_High(&value)); + check_hresult(WINRT_SHIM(IMpeg2ProfileIdsStatics)->get_High(&value)); return value; } -template void impl_IVideoEncodingProperties2::SetFormatUserData(array_ref value) const +template void impl_IVideoEncodingProperties2::SetFormatUserData(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFormatUserData(value.size(), get(value))); + check_hresult(WINRT_SHIM(IVideoEncodingProperties2)->abi_SetFormatUserData(value.size(), get_abi(value))); } template void impl_IVideoEncodingProperties2::GetFormatUserData(com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetFormatUserData(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingProperties2)->abi_GetFormatUserData(impl::put_size_abi(value), put_abi(value))); } template void impl_IVideoEncodingProperties2::ProfileId(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ProfileId(value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties2)->put_ProfileId(value)); } template int32_t impl_IVideoEncodingProperties2::ProfileId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProfileId(&value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties2)->get_ProfileId(&value)); return value; } template Windows::Media::MediaProperties::StereoscopicVideoPackingMode impl_IVideoEncodingProperties3::StereoscopicVideoPackingMode() const { Windows::Media::MediaProperties::StereoscopicVideoPackingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoscopicVideoPackingMode(&value)); + check_hresult(WINRT_SHIM(IVideoEncodingProperties3)->get_StereoscopicVideoPackingMode(&value)); return value; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoEncodingPropertiesStatics::CreateH264() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateH264(put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingPropertiesStatics)->abi_CreateH264(put_abi(value))); return value; } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoEncodingPropertiesStatics::CreateMpeg2() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMpeg2(put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingPropertiesStatics)->abi_CreateMpeg2(put_abi(value))); return value; } -template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoEncodingPropertiesStatics::CreateUncompressed(hstring_ref subtype, uint32_t width, uint32_t height) const +template Windows::Media::MediaProperties::VideoEncodingProperties impl_IVideoEncodingPropertiesStatics::CreateUncompressed(hstring_view subtype, uint32_t width, uint32_t height) const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateUncompressed(get(subtype), width, height, put(value))); + check_hresult(WINRT_SHIM(IVideoEncodingPropertiesStatics)->abi_CreateUncompressed(get_abi(subtype), width, height, put_abi(value))); return value; } template void impl_IImageEncodingProperties::Width(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Width(value)); + check_hresult(WINRT_SHIM(IImageEncodingProperties)->put_Width(value)); } template uint32_t impl_IImageEncodingProperties::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IImageEncodingProperties)->get_Width(&value)); return value; } template void impl_IImageEncodingProperties::Height(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Height(value)); + check_hresult(WINRT_SHIM(IImageEncodingProperties)->put_Height(value)); } template uint32_t impl_IImageEncodingProperties::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IImageEncodingProperties)->get_Height(&value)); return value; } template Windows::Media::MediaProperties::ImageEncodingProperties impl_IImageEncodingPropertiesStatics::CreateJpeg() const { Windows::Media::MediaProperties::ImageEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateJpeg(put(value))); + check_hresult(WINRT_SHIM(IImageEncodingPropertiesStatics)->abi_CreateJpeg(put_abi(value))); return value; } template Windows::Media::MediaProperties::ImageEncodingProperties impl_IImageEncodingPropertiesStatics::CreatePng() const { Windows::Media::MediaProperties::ImageEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePng(put(value))); + check_hresult(WINRT_SHIM(IImageEncodingPropertiesStatics)->abi_CreatePng(put_abi(value))); return value; } template Windows::Media::MediaProperties::ImageEncodingProperties impl_IImageEncodingPropertiesStatics::CreateJpegXR() const { Windows::Media::MediaProperties::ImageEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateJpegXR(put(value))); + check_hresult(WINRT_SHIM(IImageEncodingPropertiesStatics)->abi_CreateJpegXR(put_abi(value))); return value; } template Windows::Media::MediaProperties::ImageEncodingProperties impl_IImageEncodingPropertiesStatics2::CreateUncompressed(Windows::Media::MediaProperties::MediaPixelFormat format) const { Windows::Media::MediaProperties::ImageEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateUncompressed(format, put(value))); + check_hresult(WINRT_SHIM(IImageEncodingPropertiesStatics2)->abi_CreateUncompressed(format, put_abi(value))); return value; } template Windows::Media::MediaProperties::ImageEncodingProperties impl_IImageEncodingPropertiesStatics2::CreateBmp() const { Windows::Media::MediaProperties::ImageEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBmp(put(value))); + check_hresult(WINRT_SHIM(IImageEncodingPropertiesStatics2)->abi_CreateBmp(put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics::CreateM4a(Windows::Media::MediaProperties::AudioEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateM4a(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateM4a(quality, put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics::CreateMp3(Windows::Media::MediaProperties::AudioEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMp3(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateMp3(quality, put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics::CreateWma(Windows::Media::MediaProperties::AudioEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWma(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateWma(quality, put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics::CreateMp4(Windows::Media::MediaProperties::VideoEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMp4(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateMp4(quality, put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics::CreateWmv(Windows::Media::MediaProperties::VideoEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWmv(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateWmv(quality, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMediaEncodingProfileStatics::CreateFromFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromFileAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateFromFileAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaEncodingProfileStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamAsync(get(stream), put(operation))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics)->abi_CreateFromStreamAsync(get_abi(stream), put_abi(operation))); return operation; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics2::CreateWav(Windows::Media::MediaProperties::AudioEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWav(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics2)->abi_CreateWav(quality, put_abi(value))); return value; } template Windows::Media::MediaProperties::MediaEncodingProfile impl_IMediaEncodingProfileStatics2::CreateAvi(Windows::Media::MediaProperties::VideoEncodingQuality quality) const { Windows::Media::MediaProperties::MediaEncodingProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAvi(quality, put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfileStatics2)->abi_CreateAvi(quality, put_abi(value))); return value; } template void impl_IMediaEncodingProfile::Audio(const Windows::Media::MediaProperties::AudioEncodingProperties & value) const { - check_hresult(static_cast(static_cast(*this))->put_Audio(get(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->put_Audio(get_abi(value))); } template Windows::Media::MediaProperties::AudioEncodingProperties impl_IMediaEncodingProfile::Audio() const { Windows::Media::MediaProperties::AudioEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Audio(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->get_Audio(put_abi(value))); return value; } template void impl_IMediaEncodingProfile::Video(const Windows::Media::MediaProperties::VideoEncodingProperties & value) const { - check_hresult(static_cast(static_cast(*this))->put_Video(get(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->put_Video(get_abi(value))); } template Windows::Media::MediaProperties::VideoEncodingProperties impl_IMediaEncodingProfile::Video() const { Windows::Media::MediaProperties::VideoEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Video(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->get_Video(put_abi(value))); return value; } template void impl_IMediaEncodingProfile::Container(const Windows::Media::MediaProperties::ContainerEncodingProperties & value) const { - check_hresult(static_cast(static_cast(*this))->put_Container(get(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->put_Container(get_abi(value))); } template Windows::Media::MediaProperties::ContainerEncodingProperties impl_IMediaEncodingProfile::Container() const { Windows::Media::MediaProperties::ContainerEncodingProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Container(put(value))); + check_hresult(WINRT_SHIM(IMediaEncodingProfile)->get_Container(put_abi(value))); return value; } @@ -2893,7 +3014,7 @@ inline Windows::Media::MediaProperties::VideoEncodingProperties VideoEncodingPro return get_activation_factory().CreateMpeg2(); } -inline Windows::Media::MediaProperties::VideoEncodingProperties VideoEncodingProperties::CreateUncompressed(hstring_ref subtype, uint32_t width, uint32_t height) +inline Windows::Media::MediaProperties::VideoEncodingProperties VideoEncodingProperties::CreateUncompressed(hstring_view subtype, uint32_t width, uint32_t height) { return get_activation_factory().CreateUncompressed(subtype, width, height); } @@ -2901,3 +3022,239 @@ inline Windows::Media::MediaProperties::VideoEncodingProperties VideoEncodingPro } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IAudioEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IAudioEncodingPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IAudioEncodingPropertiesWithFormatUserData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IContainerEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IH264ProfileIdsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IImageEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IImageEncodingPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IImageEncodingPropertiesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaEncodingProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaEncodingProfileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaEncodingProfileStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaEncodingSubtypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMediaRatio & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IMpeg2ProfileIdsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IVideoEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IVideoEncodingProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IVideoEncodingProperties3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::IVideoEncodingPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::AudioEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::ContainerEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::ImageEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::MediaEncodingProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::MediaPropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::MediaRatio & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProperties::VideoEncodingProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Ocr.h b/10.0.14393.0/winrt/Windows.Media.Ocr.h index 62d07d04f..026db45e1 100644 --- a/10.0.14393.0/winrt/Windows.Media.Ocr.h +++ b/10.0.14393.0/winrt/Windows.Media.Ocr.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Graphics.Imaging.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RecognizeAsync(abi_arg_in bitmap, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RecognizeAsync(impl::abi_arg_in bitmap, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RecognizeAsync(*reinterpret_cast(&bitmap))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RecognizeAsync(*reinterpret_cast(&bitmap))); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RecognizerLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RecognizerLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecognizerLanguage()); return S_OK; } catch (...) @@ -53,7 +58,8 @@ struct produce : produce_baseshim().MaxImageDimension()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxImageDimension()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AvailableRecognizerLanguages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableRecognizerLanguages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableRecognizerLanguages()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produce_base language, bool * result) noexcept override + HRESULT __stdcall abi_IsLanguageSupported(impl::abi_arg_in language, bool * result) noexcept override { try { - *result = detach(this->shim().IsLanguageSupported(*reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsLanguageSupported(*reinterpret_cast(&language))); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produce_base language, abi_arg_out result) noexcept override + HRESULT __stdcall abi_TryCreateFromLanguage(impl::abi_arg_in language, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryCreateFromLanguage(*reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCreateFromLanguage(*reinterpret_cast(&language))); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_TryCreateFromUserProfileLanguages(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryCreateFromUserProfileLanguages()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCreateFromUserProfileLanguages()); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Words(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Words(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Words()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Words()); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -153,11 +165,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Lines(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Lines(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Lines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Lines()); return S_OK; } catch (...) @@ -167,11 +180,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_TextAngle(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TextAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAngle()); return S_OK; } catch (...) @@ -181,11 +195,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -199,11 +214,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BoundingRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundingRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingRect()); return S_OK; } catch (...) @@ -212,11 +228,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -234,98 +251,98 @@ namespace Windows::Media::Ocr { template Windows::Foundation::Rect impl_IOcrWord::BoundingRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_BoundingRect(put(value))); + check_hresult(WINRT_SHIM(IOcrWord)->get_BoundingRect(put_abi(value))); return value; } template hstring impl_IOcrWord::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IOcrWord)->get_Text(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IOcrLine::Words() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Words(put(value))); + check_hresult(WINRT_SHIM(IOcrLine)->get_Words(put_abi(value))); return value; } template hstring impl_IOcrLine::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IOcrLine)->get_Text(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IOcrResult::Lines() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Lines(put(value))); + check_hresult(WINRT_SHIM(IOcrResult)->get_Lines(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IOcrResult::TextAngle() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_TextAngle(put(value))); + check_hresult(WINRT_SHIM(IOcrResult)->get_TextAngle(put_abi(value))); return value; } template hstring impl_IOcrResult::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IOcrResult)->get_Text(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IOcrEngine::RecognizeAsync(const Windows::Graphics::Imaging::SoftwareBitmap & bitmap) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RecognizeAsync(get(bitmap), put(result))); + check_hresult(WINRT_SHIM(IOcrEngine)->abi_RecognizeAsync(get_abi(bitmap), put_abi(result))); return result; } template Windows::Globalization::Language impl_IOcrEngine::RecognizerLanguage() const { Windows::Globalization::Language value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RecognizerLanguage(put(value))); + check_hresult(WINRT_SHIM(IOcrEngine)->get_RecognizerLanguage(put_abi(value))); return value; } template uint32_t impl_IOcrEngineStatics::MaxImageDimension() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxImageDimension(&value)); + check_hresult(WINRT_SHIM(IOcrEngineStatics)->get_MaxImageDimension(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IOcrEngineStatics::AvailableRecognizerLanguages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableRecognizerLanguages(put(value))); + check_hresult(WINRT_SHIM(IOcrEngineStatics)->get_AvailableRecognizerLanguages(put_abi(value))); return value; } template bool impl_IOcrEngineStatics::IsLanguageSupported(const Windows::Globalization::Language & language) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsLanguageSupported(get(language), &result)); + check_hresult(WINRT_SHIM(IOcrEngineStatics)->abi_IsLanguageSupported(get_abi(language), &result)); return result; } template Windows::Media::Ocr::OcrEngine impl_IOcrEngineStatics::TryCreateFromLanguage(const Windows::Globalization::Language & language) const { Windows::Media::Ocr::OcrEngine result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateFromLanguage(get(language), put(result))); + check_hresult(WINRT_SHIM(IOcrEngineStatics)->abi_TryCreateFromLanguage(get_abi(language), put_abi(result))); return result; } template Windows::Media::Ocr::OcrEngine impl_IOcrEngineStatics::TryCreateFromUserProfileLanguages() const { Windows::Media::Ocr::OcrEngine result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateFromUserProfileLanguages(put(result))); + check_hresult(WINRT_SHIM(IOcrEngineStatics)->abi_TryCreateFromUserProfileLanguages(put_abi(result))); return result; } @@ -357,3 +374,86 @@ inline Windows::Media::Ocr::OcrEngine OcrEngine::TryCreateFromUserProfileLanguag } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::IOcrEngine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::IOcrEngineStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::IOcrLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::IOcrResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::IOcrWord & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::OcrEngine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::OcrLine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::OcrResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Ocr::OcrWord & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.PlayTo.h b/10.0.14393.0/winrt/Windows.Media.PlayTo.h index 8b059f15e..b29e15e53 100644 --- a/10.0.14393.0/winrt/Windows.Media.PlayTo.h +++ b/10.0.14393.0/winrt/Windows.Media.PlayTo.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Time(abi_arg_out value) noexcept override + HRESULT __stdcall get_Time(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Time()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Time()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produce : produ { try { - *value = detach(this->shim().Mute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mute()); return S_OK; } catch (...) @@ -54,7 +59,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -80,6 +87,7 @@ struct produce : produce_baseshim()); this->shim().StateChanged(token); return S_OK; } @@ -89,11 +97,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Transferred(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Transferred(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Transferred(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -106,6 +115,7 @@ struct produce : produce_baseshim()); this->shim().Transferred(token); return S_OK; } @@ -115,11 +125,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Error(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Error(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Error(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -132,6 +143,7 @@ struct produce : produce_baseshim()); this->shim().Error(token); return S_OK; } @@ -149,7 +161,8 @@ struct produce : pro { try { - *value = detach(this->shim().Code()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code()); return S_OK; } catch (...) @@ -158,11 +171,12 @@ struct produce : pro } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -180,7 +194,8 @@ struct produceshim().PreviousState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousState()); return S_OK; } catch (...) @@ -193,7 +208,8 @@ struct produceshim().CurrentState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentState()); return S_OK; } catch (...) @@ -206,11 +222,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PreviousSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreviousSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviousSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousSource()); return S_OK; } catch (...) @@ -220,11 +237,12 @@ struct produce } } - HRESULT __stdcall get_CurrentSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentSource()); return S_OK; } catch (...) @@ -238,11 +256,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall add_SourceRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -255,6 +274,7 @@ struct produce : produce_baseshim()); this->shim().SourceRequested(token); return S_OK; } @@ -264,11 +284,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceSelected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceSelected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceSelected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -281,6 +302,7 @@ struct produce : produce_baseshim()); this->shim().SourceSelected(token); return S_OK; } @@ -294,6 +316,7 @@ struct produce : produce_baseshim()); this->shim().DefaultSourceSelection(value); return S_OK; } @@ -307,7 +330,8 @@ struct produce : produce_baseshim().DefaultSourceSelection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultSourceSelection()); return S_OK; } catch (...) @@ -320,11 +344,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out playToManager) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out playToManager) noexcept override { try { - *playToManager = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *playToManager = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -338,6 +363,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowPlayToUI(); return S_OK; } @@ -351,11 +377,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall add_PlayRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlayRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlayRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlayRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -368,6 +395,7 @@ struct produce : produce_baseshim()); this->shim().PlayRequested(token); return S_OK; } @@ -377,11 +405,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PauseRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PauseRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PauseRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -394,6 +423,7 @@ struct produce : produce_baseshim()); this->shim().PauseRequested(token); return S_OK; } @@ -403,11 +433,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -420,6 +451,7 @@ struct produce : produce_baseshim()); this->shim().SourceChangeRequested(token); return S_OK; } @@ -429,11 +461,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackRateChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackRateChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackRateChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -446,6 +479,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackRateChangeRequested(token); return S_OK; } @@ -455,11 +489,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_CurrentTimeChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CurrentTimeChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CurrentTimeChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -472,6 +507,7 @@ struct produce : produce_baseshim()); this->shim().CurrentTimeChangeRequested(token); return S_OK; } @@ -481,11 +517,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_MuteChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().MuteChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MuteChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -498,6 +535,7 @@ struct produce : produce_baseshim()); this->shim().MuteChangeRequested(token); return S_OK; } @@ -507,11 +545,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_VolumeChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VolumeChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VolumeChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -524,6 +563,7 @@ struct produce : produce_baseshim()); this->shim().VolumeChangeRequested(token); return S_OK; } @@ -533,11 +573,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_TimeUpdateRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TimeUpdateRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TimeUpdateRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -550,6 +591,7 @@ struct produce : produce_baseshim()); this->shim().TimeUpdateRequested(token); return S_OK; } @@ -559,11 +601,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_StopRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().StopRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().StopRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -576,6 +619,7 @@ struct produce : produce_baseshim()); this->shim().StopRequested(token); return S_OK; } @@ -589,6 +633,7 @@ struct produce : produce_baseshim()); this->shim().NotifyVolumeChange(volume, mute); return S_OK; } @@ -602,6 +647,7 @@ struct produce : produce_baseshim()); this->shim().NotifyRateChange(rate); return S_OK; } @@ -615,6 +661,7 @@ struct produce : produce_baseshim()); this->shim().NotifyLoadedMetadata(); return S_OK; } @@ -624,10 +671,11 @@ struct produce : produce_base currentTime) noexcept override + HRESULT __stdcall abi_NotifyTimeUpdate(impl::abi_arg_in currentTime) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyTimeUpdate(*reinterpret_cast(¤tTime)); return S_OK; } @@ -637,10 +685,11 @@ struct produce : produce_base duration) noexcept override + HRESULT __stdcall abi_NotifyDurationChange(impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyDurationChange(*reinterpret_cast(&duration)); return S_OK; } @@ -654,6 +703,7 @@ struct produce : produce_baseshim()); this->shim().NotifySeeking(); return S_OK; } @@ -667,6 +717,7 @@ struct produce : produce_baseshim()); this->shim().NotifySeeked(); return S_OK; } @@ -680,6 +731,7 @@ struct produce : produce_baseshim()); this->shim().NotifyPaused(); return S_OK; } @@ -693,6 +745,7 @@ struct produce : produce_baseshim()); this->shim().NotifyPlaying(); return S_OK; } @@ -706,6 +759,7 @@ struct produce : produce_baseshim()); this->shim().NotifyEnded(); return S_OK; } @@ -719,6 +773,7 @@ struct produce : produce_baseshim()); this->shim().NotifyError(); return S_OK; } @@ -732,6 +787,7 @@ struct produce : produce_baseshim()); this->shim().NotifyStopped(); return S_OK; } @@ -741,11 +797,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -755,10 +812,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -772,6 +830,7 @@ struct produce : produce_baseshim()); this->shim().SupportsImage(value); return S_OK; } @@ -785,7 +844,8 @@ struct produce : produce_baseshim().SupportsImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsImage()); return S_OK; } catch (...) @@ -798,6 +858,7 @@ struct produce : produce_baseshim()); this->shim().SupportsAudio(value); return S_OK; } @@ -811,7 +872,8 @@ struct produce : produce_baseshim().SupportsAudio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsAudio()); return S_OK; } catch (...) @@ -824,6 +886,7 @@ struct produce : produce_baseshim()); this->shim().SupportsVideo(value); return S_OK; } @@ -837,7 +900,8 @@ struct produce : produce_baseshim().SupportsVideo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsVideo()); return S_OK; } catch (...) @@ -846,11 +910,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -860,11 +925,12 @@ struct produce : produce_base action) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -874,11 +940,12 @@ struct produce : produce_base action) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -892,11 +959,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Connection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Connection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Connection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Connection()); return S_OK; } catch (...) @@ -906,11 +974,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Next(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Next()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Next()); return S_OK; } catch (...) @@ -920,10 +989,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Next(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Next(*reinterpret_cast(&value)); return S_OK; } @@ -937,6 +1007,7 @@ struct produce : produce_baseshim()); this->shim().PlayNext(); return S_OK; } @@ -954,6 +1025,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -967,11 +1039,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -980,10 +1053,11 @@ struct produce : produce_base errorString) noexcept override + HRESULT __stdcall abi_DisplayErrorString(impl::abi_arg_in errorString) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayErrorString(*reinterpret_cast(&errorString)); return S_OK; } @@ -993,11 +1067,12 @@ struct produce : produce_base deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1007,10 +1082,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&value)); return S_OK; } @@ -1024,11 +1100,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceRequest(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceRequest()); return S_OK; } catch (...) @@ -1042,11 +1119,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_FriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -1056,11 +1134,12 @@ struct produce : prod } } - HRESULT __stdcall get_Icon(abi_arg_out value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -1074,7 +1153,8 @@ struct produce : prod { try { - *value = detach(this->shim().SupportsImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsImage()); return S_OK; } catch (...) @@ -1087,7 +1167,8 @@ struct produce : prod { try { - *value = detach(this->shim().SupportsAudio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsAudio()); return S_OK; } catch (...) @@ -1100,7 +1181,8 @@ struct produce : prod { try { - *value = detach(this->shim().SupportsVideo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportsVideo()); return S_OK; } catch (...) @@ -1113,11 +1195,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_PreferredSourceUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreferredSourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreferredSourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredSourceUri()); return S_OK; } catch (...) @@ -1127,10 +1210,11 @@ struct produce : } } - HRESULT __stdcall put_PreferredSourceUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_PreferredSourceUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredSourceUri(*reinterpret_cast(&value)); return S_OK; } @@ -1148,7 +1232,8 @@ struct produce { try { - *value = detach(this->shim().Rate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rate()); return S_OK; } catch (...) @@ -1161,11 +1246,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Stream(abi_arg_out value) noexcept override + HRESULT __stdcall get_Stream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stream()); return S_OK; } catch (...) @@ -1175,11 +1261,12 @@ struct produce : pro } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1189,11 +1276,12 @@ struct produce : pro } } - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -1203,11 +1291,12 @@ struct produce : pro } } - HRESULT __stdcall get_Album(abi_arg_out value) noexcept override + HRESULT __stdcall get_Album(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Album()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Album()); return S_OK; } catch (...) @@ -1217,11 +1306,12 @@ struct produce : pro } } - HRESULT __stdcall get_Genre(abi_arg_out value) noexcept override + HRESULT __stdcall get_Genre(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Genre()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Genre()); return S_OK; } catch (...) @@ -1231,11 +1321,12 @@ struct produce : pro } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1245,11 +1336,12 @@ struct produce : pro } } - HRESULT __stdcall get_Date(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -1259,11 +1351,12 @@ struct produce : pro } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1273,11 +1366,12 @@ struct produce : pro } } - HRESULT __stdcall get_Rating(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Rating(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Rating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rating()); return S_OK; } catch (...) @@ -1287,11 +1381,12 @@ struct produce : pro } } - HRESULT __stdcall get_Properties(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -1309,7 +1404,8 @@ struct produce : pro { try { - *value = detach(this->shim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -1326,139 +1422,139 @@ namespace Windows::Media::PlayTo { template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_ISourceChangeRequestedEventArgs::Stream() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType value; - check_hresult(static_cast(static_cast(*this))->get_Stream(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Stream(put_abi(value))); return value; } template hstring impl_ISourceChangeRequestedEventArgs::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Title(put_abi(value))); return value; } template hstring impl_ISourceChangeRequestedEventArgs::Author() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Author(put_abi(value))); return value; } template hstring impl_ISourceChangeRequestedEventArgs::Album() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Album(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Album(put_abi(value))); return value; } template hstring impl_ISourceChangeRequestedEventArgs::Genre() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Genre(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Genre(put_abi(value))); return value; } template hstring impl_ISourceChangeRequestedEventArgs::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Description(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISourceChangeRequestedEventArgs::Date() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Date(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_ISourceChangeRequestedEventArgs::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Thumbnail(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISourceChangeRequestedEventArgs::Rating() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Rating(put(value))); + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Rating(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_ISourceChangeRequestedEventArgs::Properties() const +template Windows::Foundation::Collections::IMapView impl_ISourceChangeRequestedEventArgs::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(ISourceChangeRequestedEventArgs)->get_Properties(put_abi(value))); return value; } template double impl_IPlaybackRateChangeRequestedEventArgs::Rate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Rate(&value)); + check_hresult(WINRT_SHIM(IPlaybackRateChangeRequestedEventArgs)->get_Rate(&value)); return value; } template Windows::Foundation::TimeSpan impl_ICurrentTimeChangeRequestedEventArgs::Time() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Time(put(value))); + check_hresult(WINRT_SHIM(ICurrentTimeChangeRequestedEventArgs)->get_Time(put_abi(value))); return value; } template bool impl_IMuteChangeRequestedEventArgs::Mute() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Mute(&value)); + check_hresult(WINRT_SHIM(IMuteChangeRequestedEventArgs)->get_Mute(&value)); return value; } template double impl_IVolumeChangeRequestedEventArgs::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IVolumeChangeRequestedEventArgs)->get_Volume(&value)); return value; } -template event_token impl_IPlayToReceiver::PlayRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPlayToReceiver::PlayRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlayRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_PlayRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_IPlayToReceiver::PlayRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPlayToReceiver::PlayRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::PlayTo::IPlayToReceiver::remove_PlayRequested, PlayRequested(handler)); } template void impl_IPlayToReceiver::PlayRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlayRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_PlayRequested(token)); } -template event_token impl_IPlayToReceiver::PauseRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPlayToReceiver::PauseRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PauseRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_PauseRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_IPlayToReceiver::PauseRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPlayToReceiver::PauseRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::PlayTo::IPlayToReceiver::remove_PauseRequested, PauseRequested(handler)); } template void impl_IPlayToReceiver::PauseRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PauseRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_PauseRequested(token)); } template event_token impl_IPlayToReceiver::SourceChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_SourceChangeRequested(get_abi(handler), &token)); return token; } @@ -1469,13 +1565,13 @@ template event_revoker impl_IPlayToReceiver::So template void impl_IPlayToReceiver::SourceChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceChangeRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_SourceChangeRequested(token)); } template event_token impl_IPlayToReceiver::PlaybackRateChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackRateChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_PlaybackRateChangeRequested(get_abi(handler), &token)); return token; } @@ -1486,13 +1582,13 @@ template event_revoker impl_IPlayToReceiver::Pl template void impl_IPlayToReceiver::PlaybackRateChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackRateChangeRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_PlaybackRateChangeRequested(token)); } template event_token impl_IPlayToReceiver::CurrentTimeChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CurrentTimeChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_CurrentTimeChangeRequested(get_abi(handler), &token)); return token; } @@ -1503,13 +1599,13 @@ template event_revoker impl_IPlayToReceiver::Cu template void impl_IPlayToReceiver::CurrentTimeChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CurrentTimeChangeRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_CurrentTimeChangeRequested(token)); } template event_token impl_IPlayToReceiver::MuteChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MuteChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_MuteChangeRequested(get_abi(handler), &token)); return token; } @@ -1520,13 +1616,13 @@ template event_revoker impl_IPlayToReceiver::Mu template void impl_IPlayToReceiver::MuteChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MuteChangeRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_MuteChangeRequested(token)); } template event_token impl_IPlayToReceiver::VolumeChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VolumeChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_VolumeChangeRequested(get_abi(handler), &token)); return token; } @@ -1537,261 +1633,261 @@ template event_revoker impl_IPlayToReceiver::Vo template void impl_IPlayToReceiver::VolumeChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VolumeChangeRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_VolumeChangeRequested(token)); } -template event_token impl_IPlayToReceiver::TimeUpdateRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPlayToReceiver::TimeUpdateRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TimeUpdateRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_TimeUpdateRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_IPlayToReceiver::TimeUpdateRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPlayToReceiver::TimeUpdateRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::PlayTo::IPlayToReceiver::remove_TimeUpdateRequested, TimeUpdateRequested(handler)); } template void impl_IPlayToReceiver::TimeUpdateRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TimeUpdateRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_TimeUpdateRequested(token)); } -template event_token impl_IPlayToReceiver::StopRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPlayToReceiver::StopRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StopRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->add_StopRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_IPlayToReceiver::StopRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPlayToReceiver::StopRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::PlayTo::IPlayToReceiver::remove_StopRequested, StopRequested(handler)); } template void impl_IPlayToReceiver::StopRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StopRequested(token)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->remove_StopRequested(token)); } template void impl_IPlayToReceiver::NotifyVolumeChange(double volume, bool mute) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyVolumeChange(volume, mute)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyVolumeChange(volume, mute)); } template void impl_IPlayToReceiver::NotifyRateChange(double rate) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyRateChange(rate)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyRateChange(rate)); } template void impl_IPlayToReceiver::NotifyLoadedMetadata() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyLoadedMetadata()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyLoadedMetadata()); } template void impl_IPlayToReceiver::NotifyTimeUpdate(const Windows::Foundation::TimeSpan & currentTime) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyTimeUpdate(get(currentTime))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyTimeUpdate(get_abi(currentTime))); } template void impl_IPlayToReceiver::NotifyDurationChange(const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyDurationChange(get(duration))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyDurationChange(get_abi(duration))); } template void impl_IPlayToReceiver::NotifySeeking() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifySeeking()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifySeeking()); } template void impl_IPlayToReceiver::NotifySeeked() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifySeeked()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifySeeked()); } template void impl_IPlayToReceiver::NotifyPaused() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyPaused()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyPaused()); } template void impl_IPlayToReceiver::NotifyPlaying() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyPlaying()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyPlaying()); } template void impl_IPlayToReceiver::NotifyEnded() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyEnded()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyEnded()); } template void impl_IPlayToReceiver::NotifyError() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyError()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyError()); } template void impl_IPlayToReceiver::NotifyStopped() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyStopped()); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_NotifyStopped()); } template hstring impl_IPlayToReceiver::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->get_FriendlyName(put_abi(value))); return value; } -template void impl_IPlayToReceiver::FriendlyName(hstring_ref value) const +template void impl_IPlayToReceiver::FriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FriendlyName(get(value))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->put_FriendlyName(get_abi(value))); } template void impl_IPlayToReceiver::SupportsImage(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsImage(value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->put_SupportsImage(value)); } template bool impl_IPlayToReceiver::SupportsImage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsImage(&value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->get_SupportsImage(&value)); return value; } template void impl_IPlayToReceiver::SupportsAudio(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsAudio(value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->put_SupportsAudio(value)); } template bool impl_IPlayToReceiver::SupportsAudio() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsAudio(&value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->get_SupportsAudio(&value)); return value; } template void impl_IPlayToReceiver::SupportsVideo(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SupportsVideo(value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->put_SupportsVideo(value)); } template bool impl_IPlayToReceiver::SupportsVideo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsVideo(&value)); + check_hresult(WINRT_SHIM(IPlayToReceiver)->get_SupportsVideo(&value)); return value; } template Windows::Foundation::Collections::IPropertySet impl_IPlayToReceiver::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IPlayToReceiver::StartAsync() const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(action))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_StartAsync(put_abi(action))); return action; } template Windows::Foundation::IAsyncAction impl_IPlayToReceiver::StopAsync() const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(action))); + check_hresult(WINRT_SHIM(IPlayToReceiver)->abi_StopAsync(put_abi(action))); return action; } template Windows::Media::PlayTo::PlayToConnection impl_IPlayToSource::Connection() const { Windows::Media::PlayTo::PlayToConnection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Connection(put(value))); + check_hresult(WINRT_SHIM(IPlayToSource)->get_Connection(put_abi(value))); return value; } template Windows::Media::PlayTo::PlayToSource impl_IPlayToSource::Next() const { Windows::Media::PlayTo::PlayToSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Next(put(value))); + check_hresult(WINRT_SHIM(IPlayToSource)->get_Next(put_abi(value))); return value; } template void impl_IPlayToSource::Next(const Windows::Media::PlayTo::PlayToSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Next(get(value))); + check_hresult(WINRT_SHIM(IPlayToSource)->put_Next(get_abi(value))); } template void impl_IPlayToSource::PlayNext() const { - check_hresult(static_cast(static_cast(*this))->abi_PlayNext()); + check_hresult(WINRT_SHIM(IPlayToSource)->abi_PlayNext()); } template Windows::Foundation::Uri impl_IPlayToSourceWithPreferredSourceUri::PreferredSourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreferredSourceUri(put(value))); + check_hresult(WINRT_SHIM(IPlayToSourceWithPreferredSourceUri)->get_PreferredSourceUri(put_abi(value))); return value; } template void impl_IPlayToSourceWithPreferredSourceUri::PreferredSourceUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredSourceUri(get(value))); + check_hresult(WINRT_SHIM(IPlayToSourceWithPreferredSourceUri)->put_PreferredSourceUri(get_abi(value))); } template Windows::Media::PlayTo::PlayToConnectionState impl_IPlayToConnectionStateChangedEventArgs::PreviousState() const { Windows::Media::PlayTo::PlayToConnectionState value {}; - check_hresult(static_cast(static_cast(*this))->get_PreviousState(&value)); + check_hresult(WINRT_SHIM(IPlayToConnectionStateChangedEventArgs)->get_PreviousState(&value)); return value; } template Windows::Media::PlayTo::PlayToConnectionState impl_IPlayToConnectionStateChangedEventArgs::CurrentState() const { Windows::Media::PlayTo::PlayToConnectionState value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentState(&value)); + check_hresult(WINRT_SHIM(IPlayToConnectionStateChangedEventArgs)->get_CurrentState(&value)); return value; } template Windows::Media::PlayTo::PlayToSource impl_IPlayToConnectionTransferredEventArgs::PreviousSource() const { Windows::Media::PlayTo::PlayToSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreviousSource(put(value))); + check_hresult(WINRT_SHIM(IPlayToConnectionTransferredEventArgs)->get_PreviousSource(put_abi(value))); return value; } template Windows::Media::PlayTo::PlayToSource impl_IPlayToConnectionTransferredEventArgs::CurrentSource() const { Windows::Media::PlayTo::PlayToSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentSource(put(value))); + check_hresult(WINRT_SHIM(IPlayToConnectionTransferredEventArgs)->get_CurrentSource(put_abi(value))); return value; } template Windows::Media::PlayTo::PlayToConnectionError impl_IPlayToConnectionErrorEventArgs::Code() const { Windows::Media::PlayTo::PlayToConnectionError value {}; - check_hresult(static_cast(static_cast(*this))->get_Code(&value)); + check_hresult(WINRT_SHIM(IPlayToConnectionErrorEventArgs)->get_Code(&value)); return value; } template hstring impl_IPlayToConnectionErrorEventArgs::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IPlayToConnectionErrorEventArgs)->get_Message(put_abi(value))); return value; } template Windows::Media::PlayTo::PlayToConnectionState impl_IPlayToConnection::State() const { Windows::Media::PlayTo::PlayToConnectionState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IPlayToConnection)->get_State(&value)); return value; } template event_token impl_IPlayToConnection::StateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->add_StateChanged(get_abi(handler), &token)); return token; } @@ -1802,13 +1898,13 @@ template event_revoker impl_IPlayToConnection template void impl_IPlayToConnection::StateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->remove_StateChanged(token)); } template event_token impl_IPlayToConnection::Transferred(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Transferred(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->add_Transferred(get_abi(handler), &token)); return token; } @@ -1819,13 +1915,13 @@ template event_revoker impl_IPlayToConnection template void impl_IPlayToConnection::Transferred(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Transferred(token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->remove_Transferred(token)); } template event_token impl_IPlayToConnection::Error(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Error(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->add_Error(get_abi(handler), &token)); return token; } @@ -1836,84 +1932,84 @@ template event_revoker impl_IPlayToConnection template void impl_IPlayToConnection::Error(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Error(token)); + check_hresult(WINRT_SHIM(IPlayToConnection)->remove_Error(token)); } template hstring impl_IPlayToSourceSelectedEventArgs::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IPlayToSourceSelectedEventArgs)->get_FriendlyName(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamWithContentType impl_IPlayToSourceSelectedEventArgs::Icon() const { Windows::Storage::Streams::IRandomAccessStreamWithContentType value; - check_hresult(static_cast(static_cast(*this))->get_Icon(put(value))); + check_hresult(WINRT_SHIM(IPlayToSourceSelectedEventArgs)->get_Icon(put_abi(value))); return value; } template bool impl_IPlayToSourceSelectedEventArgs::SupportsImage() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsImage(&value)); + check_hresult(WINRT_SHIM(IPlayToSourceSelectedEventArgs)->get_SupportsImage(&value)); return value; } template bool impl_IPlayToSourceSelectedEventArgs::SupportsAudio() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsAudio(&value)); + check_hresult(WINRT_SHIM(IPlayToSourceSelectedEventArgs)->get_SupportsAudio(&value)); return value; } template bool impl_IPlayToSourceSelectedEventArgs::SupportsVideo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportsVideo(&value)); + check_hresult(WINRT_SHIM(IPlayToSourceSelectedEventArgs)->get_SupportsVideo(&value)); return value; } template void impl_IPlayToSourceDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IPlayToSourceDeferral)->abi_Complete()); } template Windows::Foundation::DateTime impl_IPlayToSourceRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IPlayToSourceRequest)->get_Deadline(put_abi(value))); return value; } -template void impl_IPlayToSourceRequest::DisplayErrorString(hstring_ref errorString) const +template void impl_IPlayToSourceRequest::DisplayErrorString(hstring_view errorString) const { - check_hresult(static_cast(static_cast(*this))->abi_DisplayErrorString(get(errorString))); + check_hresult(WINRT_SHIM(IPlayToSourceRequest)->abi_DisplayErrorString(get_abi(errorString))); } template Windows::Media::PlayTo::PlayToSourceDeferral impl_IPlayToSourceRequest::GetDeferral() const { Windows::Media::PlayTo::PlayToSourceDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IPlayToSourceRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IPlayToSourceRequest::SetSource(const Windows::Media::PlayTo::PlayToSource & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(value))); + check_hresult(WINRT_SHIM(IPlayToSourceRequest)->abi_SetSource(get_abi(value))); } template Windows::Media::PlayTo::PlayToSourceRequest impl_IPlayToSourceRequestedEventArgs::SourceRequest() const { Windows::Media::PlayTo::PlayToSourceRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceRequest(put(value))); + check_hresult(WINRT_SHIM(IPlayToSourceRequestedEventArgs)->get_SourceRequest(put_abi(value))); return value; } template event_token impl_IPlayToManager::SourceRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToManager)->add_SourceRequested(get_abi(handler), &token)); return token; } @@ -1924,13 +2020,13 @@ template event_revoker impl_IPlayToManager::Sour template void impl_IPlayToManager::SourceRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceRequested(token)); + check_hresult(WINRT_SHIM(IPlayToManager)->remove_SourceRequested(token)); } template event_token impl_IPlayToManager::SourceSelected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceSelected(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlayToManager)->add_SourceSelected(get_abi(handler), &token)); return token; } @@ -1941,31 +2037,31 @@ template event_revoker impl_IPlayToManager::Sour template void impl_IPlayToManager::SourceSelected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceSelected(token)); + check_hresult(WINRT_SHIM(IPlayToManager)->remove_SourceSelected(token)); } template void impl_IPlayToManager::DefaultSourceSelection(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultSourceSelection(value)); + check_hresult(WINRT_SHIM(IPlayToManager)->put_DefaultSourceSelection(value)); } template bool impl_IPlayToManager::DefaultSourceSelection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultSourceSelection(&value)); + check_hresult(WINRT_SHIM(IPlayToManager)->get_DefaultSourceSelection(&value)); return value; } template Windows::Media::PlayTo::PlayToManager impl_IPlayToManagerStatics::GetForCurrentView() const { Windows::Media::PlayTo::PlayToManager playToManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(playToManager))); + check_hresult(WINRT_SHIM(IPlayToManagerStatics)->abi_GetForCurrentView(put_abi(playToManager))); return playToManager; } template void impl_IPlayToManagerStatics::ShowPlayToUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowPlayToUI()); + check_hresult(WINRT_SHIM(IPlayToManagerStatics)->abi_ShowPlayToUI()); } inline Windows::Media::PlayTo::PlayToManager PlayToManager::GetForCurrentView() @@ -1985,3 +2081,311 @@ inline PlayToReceiver::PlayToReceiver() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::ICurrentTimeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IMuteChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToConnectionErrorEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToConnectionStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToConnectionTransferredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToReceiver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSourceDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSourceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSourceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSourceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlayToSourceWithPreferredSourceUri & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IPlaybackRateChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::ISourceChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::IVolumeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::CurrentTimeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::MuteChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToConnection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToConnectionErrorEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToConnectionStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToConnectionTransferredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToReceiver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToSourceDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToSourceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToSourceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlayToSourceSelectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::PlaybackRateChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::SourceChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlayTo::VolumeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Playback.h b/10.0.14393.0/winrt/Windows.Media.Playback.h index 26a9fb795..b8580c27e 100644 --- a/10.0.14393.0/winrt/Windows.Media.Playback.h +++ b/10.0.14393.0/winrt/Windows.Media.Playback.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.3.h" @@ -27,11 +30,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out player) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out player) noexcept override { try { - *player = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *player = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -41,11 +45,12 @@ struct produce : pro } } - HRESULT __stdcall add_MessageReceivedFromBackground(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MessageReceivedFromBackground(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MessageReceivedFromBackground(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MessageReceivedFromBackground(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -58,6 +63,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageReceivedFromBackground(token); return S_OK; } @@ -67,11 +73,12 @@ struct produce : pro } } - HRESULT __stdcall add_MessageReceivedFromForeground(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MessageReceivedFromForeground(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MessageReceivedFromForeground(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MessageReceivedFromForeground(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -84,6 +91,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageReceivedFromForeground(token); return S_OK; } @@ -93,10 +101,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SendMessageToBackground(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SendMessageToBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SendMessageToBackground(*reinterpret_cast(&value)); return S_OK; } @@ -106,10 +115,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SendMessageToForeground(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SendMessageToForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SendMessageToForeground(*reinterpret_cast(&value)); return S_OK; } @@ -123,7 +133,8 @@ struct produce : pro { try { - *isMediaPlaying = detach(this->shim().IsMediaPlaying()); + typename D::abi_guard guard(this->shim()); + *isMediaPlaying = detach_abi(this->shim().IsMediaPlaying()); return S_OK; } catch (...) @@ -136,6 +147,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Shutdown(); return S_OK; } @@ -149,11 +161,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_NewItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewItem()); return S_OK; } catch (...) @@ -163,11 +176,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OldItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldItem()); return S_OK; } catch (...) @@ -181,11 +195,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PlaybackList(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaybackList(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackList()); return S_OK; } catch (...) @@ -195,11 +210,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_PresentationPosition(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PresentationPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PresentationPosition()); return S_OK; } catch (...) @@ -213,7 +229,8 @@ struct produce : produce_baseshim().InsertionMethod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InsertionMethod()); return S_OK; } catch (...) @@ -222,11 +239,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomProperties()); return S_OK; } catch (...) @@ -240,7 +258,8 @@ struct produce : produce_baseshim().CanStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanStart()); return S_OK; } catch (...) @@ -253,6 +272,7 @@ struct produce : produce_baseshim()); this->shim().CanStart(value); return S_OK; } @@ -266,11 +286,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_MediaBreak(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaBreak()); return S_OK; } catch (...) @@ -284,11 +305,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Media::Playback::MediaBreakInsertionMethod insertionMethod, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::Media::Playback::MediaBreakInsertionMethod insertionMethod, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(insertionMethod)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(insertionMethod)); return S_OK; } catch (...) @@ -298,11 +320,12 @@ struct produce : produce_base presentationPosition, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithPresentationPosition(Windows::Media::Playback::MediaBreakInsertionMethod insertionMethod, impl::abi_arg_in presentationPosition, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithPresentationPosition(insertionMethod, *reinterpret_cast(&presentationPosition))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithPresentationPosition(insertionMethod, *reinterpret_cast(&presentationPosition))); return S_OK; } catch (...) @@ -316,11 +339,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_BreaksSeekedOver(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_BreaksSeekedOver(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BreaksSeekedOver(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BreaksSeekedOver(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -333,6 +357,7 @@ struct produce : produce_baseshim()); this->shim().BreaksSeekedOver(token); return S_OK; } @@ -342,11 +367,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_BreakStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BreakStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BreakStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -359,6 +385,7 @@ struct produce : produce_baseshim()); this->shim().BreakStarted(token); return S_OK; } @@ -368,11 +395,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_BreakEnded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BreakEnded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BreakEnded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -385,6 +413,7 @@ struct produce : produce_baseshim()); this->shim().BreakEnded(token); return S_OK; } @@ -394,11 +423,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_BreakSkipped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BreakSkipped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BreakSkipped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -411,6 +441,7 @@ struct produce : produce_baseshim()); this->shim().BreakSkipped(token); return S_OK; } @@ -420,11 +451,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrentBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentBreak()); return S_OK; } catch (...) @@ -434,11 +466,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaybackSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackSession()); return S_OK; } catch (...) @@ -448,10 +481,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_PlayBreak(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlayBreak(*reinterpret_cast(&value)); return S_OK; } @@ -465,6 +499,7 @@ struct produce : produce_baseshim()); this->shim().SkipCurrentBreak(); return S_OK; } @@ -478,11 +513,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_ScheduleChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ScheduleChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ScheduleChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ScheduleChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -495,6 +531,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ScheduleChanged(token); return S_OK; } @@ -504,10 +541,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_InsertMidrollBreak(abi_arg_in mediaBreak) noexcept override + HRESULT __stdcall abi_InsertMidrollBreak(impl::abi_arg_in mediaBreak) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertMidrollBreak(*reinterpret_cast(&mediaBreak)); return S_OK; } @@ -517,10 +555,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_RemoveMidrollBreak(abi_arg_in mediaBreak) noexcept override + HRESULT __stdcall abi_RemoveMidrollBreak(impl::abi_arg_in mediaBreak) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveMidrollBreak(*reinterpret_cast(&mediaBreak)); return S_OK; } @@ -530,11 +569,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_MidrollBreaks(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MidrollBreaks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MidrollBreaks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MidrollBreaks()); return S_OK; } catch (...) @@ -544,10 +584,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_PrerollBreak(abi_arg_in value) noexcept override + HRESULT __stdcall put_PrerollBreak(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrerollBreak(*reinterpret_cast(&value)); return S_OK; } @@ -557,11 +598,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_PrerollBreak(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrerollBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrerollBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrerollBreak()); return S_OK; } catch (...) @@ -571,10 +613,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_PostrollBreak(abi_arg_in value) noexcept override + HRESULT __stdcall put_PostrollBreak(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PostrollBreak(*reinterpret_cast(&value)); return S_OK; } @@ -584,11 +627,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_PostrollBreak(abi_arg_out value) noexcept override + HRESULT __stdcall get_PostrollBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostrollBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostrollBreak()); return S_OK; } catch (...) @@ -598,11 +642,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_PlaybackItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaybackItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackItem()); return S_OK; } catch (...) @@ -616,11 +661,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_SeekedOverBreaks(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SeekedOverBreaks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SeekedOverBreaks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SeekedOverBreaks()); return S_OK; } catch (...) @@ -630,11 +676,12 @@ struct produce : pr } } - HRESULT __stdcall get_OldPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldPosition()); return S_OK; } catch (...) @@ -643,11 +690,12 @@ struct produce : pr } } - HRESULT __stdcall get_NewPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewPosition()); return S_OK; } catch (...) @@ -660,11 +708,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_MediaBreak(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaBreak()); return S_OK; } catch (...) @@ -678,11 +727,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_MediaBreak(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaBreak(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaBreak()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaBreak()); return S_OK; } catch (...) @@ -696,11 +746,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_CurrentItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentItem()); return S_OK; } catch (...) @@ -710,10 +761,11 @@ struct produce : produc } } - HRESULT __stdcall abi_SetPlaybackSource(abi_arg_in source) noexcept override + HRESULT __stdcall abi_SetPlaybackSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPlaybackSource(*reinterpret_cast(&source)); return S_OK; } @@ -731,7 +783,8 @@ struct produce : produ { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -744,6 +797,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Type(value); return S_OK; } @@ -753,11 +807,12 @@ struct produce : produ } } - HRESULT __stdcall get_MusicProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_MusicProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MusicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MusicProperties()); return S_OK; } catch (...) @@ -767,11 +822,12 @@ struct produce : produ } } - HRESULT __stdcall get_VideoProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProperties()); return S_OK; } catch (...) @@ -781,11 +837,12 @@ struct produce : produ } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -795,10 +852,11 @@ struct produce : produ } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -812,6 +870,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearAll(); return S_OK; } @@ -829,7 +888,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -842,6 +902,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return S_OK; } @@ -851,11 +912,12 @@ struct produce : prod } } - HRESULT __stdcall get_MediaPlayer(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -865,11 +927,12 @@ struct produce : prod } } - HRESULT __stdcall get_PlayBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlayBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayBehavior()); return S_OK; } catch (...) @@ -879,11 +942,12 @@ struct produce : prod } } - HRESULT __stdcall get_PauseBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_PauseBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PauseBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PauseBehavior()); return S_OK; } catch (...) @@ -893,11 +957,12 @@ struct produce : prod } } - HRESULT __stdcall get_NextBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_NextBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextBehavior()); return S_OK; } catch (...) @@ -907,11 +972,12 @@ struct produce : prod } } - HRESULT __stdcall get_PreviousBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreviousBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviousBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousBehavior()); return S_OK; } catch (...) @@ -921,11 +987,12 @@ struct produce : prod } } - HRESULT __stdcall get_FastForwardBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_FastForwardBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FastForwardBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FastForwardBehavior()); return S_OK; } catch (...) @@ -935,11 +1002,12 @@ struct produce : prod } } - HRESULT __stdcall get_RewindBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_RewindBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RewindBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RewindBehavior()); return S_OK; } catch (...) @@ -949,11 +1017,12 @@ struct produce : prod } } - HRESULT __stdcall get_ShuffleBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShuffleBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShuffleBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShuffleBehavior()); return S_OK; } catch (...) @@ -963,11 +1032,12 @@ struct produce : prod } } - HRESULT __stdcall get_AutoRepeatModeBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoRepeatModeBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoRepeatModeBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRepeatModeBehavior()); return S_OK; } catch (...) @@ -977,11 +1047,12 @@ struct produce : prod } } - HRESULT __stdcall get_PositionBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_PositionBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionBehavior()); return S_OK; } catch (...) @@ -991,11 +1062,12 @@ struct produce : prod } } - HRESULT __stdcall get_RateBehavior(abi_arg_out value) noexcept override + HRESULT __stdcall get_RateBehavior(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RateBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RateBehavior()); return S_OK; } catch (...) @@ -1005,11 +1077,12 @@ struct produce : prod } } - HRESULT __stdcall add_PlayReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlayReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlayReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlayReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1022,6 +1095,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().PlayReceived(token); return S_OK; } @@ -1031,11 +1105,12 @@ struct produce : prod } } - HRESULT __stdcall add_PauseReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PauseReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PauseReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PauseReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1048,6 +1123,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().PauseReceived(token); return S_OK; } @@ -1057,11 +1133,12 @@ struct produce : prod } } - HRESULT __stdcall add_NextReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NextReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NextReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NextReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1074,6 +1151,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NextReceived(token); return S_OK; } @@ -1083,11 +1161,12 @@ struct produce : prod } } - HRESULT __stdcall add_PreviousReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PreviousReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PreviousReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PreviousReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1100,6 +1179,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().PreviousReceived(token); return S_OK; } @@ -1109,11 +1189,12 @@ struct produce : prod } } - HRESULT __stdcall add_FastForwardReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FastForwardReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FastForwardReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FastForwardReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1126,6 +1207,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().FastForwardReceived(token); return S_OK; } @@ -1135,11 +1217,12 @@ struct produce : prod } } - HRESULT __stdcall add_RewindReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RewindReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RewindReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RewindReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1152,6 +1235,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RewindReceived(token); return S_OK; } @@ -1161,11 +1245,12 @@ struct produce : prod } } - HRESULT __stdcall add_ShuffleReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ShuffleReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ShuffleReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ShuffleReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1178,6 +1263,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ShuffleReceived(token); return S_OK; } @@ -1187,11 +1273,12 @@ struct produce : prod } } - HRESULT __stdcall add_AutoRepeatModeReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AutoRepeatModeReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AutoRepeatModeReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AutoRepeatModeReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1204,6 +1291,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatModeReceived(token); return S_OK; } @@ -1213,11 +1301,12 @@ struct produce : prod } } - HRESULT __stdcall add_PositionReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PositionReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PositionReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PositionReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1230,6 +1319,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionReceived(token); return S_OK; } @@ -1239,11 +1329,12 @@ struct produce : prod } } - HRESULT __stdcall add_RateReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RateReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RateReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RateReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1256,6 +1347,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RateReceived(token); return S_OK; } @@ -1273,7 +1365,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1286,6 +1379,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1299,7 +1393,8 @@ struct produceshim().AutoRepeatMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRepeatMode()); return S_OK; } catch (...) @@ -1308,11 +1403,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1326,11 +1422,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CommandManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandManager()); return S_OK; } catch (...) @@ -1344,7 +1441,8 @@ struct produceshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -1357,7 +1455,8 @@ struct produceshim().EnablingRule()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnablingRule()); return S_OK; } catch (...) @@ -1370,6 +1469,7 @@ struct produceshim()); this->shim().EnablingRule(value); return S_OK; } @@ -1379,11 +1479,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_IsEnabledChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().IsEnabledChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsEnabledChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1396,6 +1497,7 @@ struct produceshim()); this->shim().IsEnabledChanged(token); return S_OK; } @@ -1413,7 +1515,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1426,6 +1529,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1435,11 +1539,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1457,7 +1562,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1470,6 +1576,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1479,11 +1586,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1501,7 +1609,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1514,6 +1623,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1523,11 +1633,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1545,7 +1656,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1558,6 +1670,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1567,11 +1680,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1589,7 +1703,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1602,6 +1717,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1611,11 +1727,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1624,11 +1741,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1646,7 +1764,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1659,6 +1778,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1668,11 +1788,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1690,7 +1811,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1703,6 +1825,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1716,7 +1839,8 @@ struct produceshim().PlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRate()); return S_OK; } catch (...) @@ -1725,11 +1849,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1747,7 +1872,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1760,6 +1886,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1769,11 +1896,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1791,7 +1919,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1804,6 +1933,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -1817,7 +1947,8 @@ struct produceshim().IsShuffleRequested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsShuffleRequested()); return S_OK; } catch (...) @@ -1826,11 +1957,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1844,11 +1976,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_AudioTracksChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AudioTracksChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioTracksChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioTracksChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1861,6 +1994,7 @@ struct produce : produce_baseshim()); this->shim().AudioTracksChanged(token); return S_OK; } @@ -1870,11 +2004,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_VideoTracksChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VideoTracksChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VideoTracksChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1887,6 +2022,7 @@ struct produce : produce_baseshim()); this->shim().VideoTracksChanged(token); return S_OK; } @@ -1896,11 +2032,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_TimedMetadataTracksChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TimedMetadataTracksChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TimedMetadataTracksChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1913,6 +2050,7 @@ struct produce : produce_baseshim()); this->shim().TimedMetadataTracksChanged(token); return S_OK; } @@ -1922,11 +2060,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1936,11 +2075,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AudioTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AudioTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioTracks()); return S_OK; } catch (...) @@ -1950,11 +2090,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_VideoTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().VideoTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoTracks()); return S_OK; } catch (...) @@ -1964,11 +2105,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_TimedMetadataTracks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TimedMetadataTracks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimedMetadataTracks()); return S_OK; } catch (...) @@ -1982,11 +2124,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BreakSchedule(abi_arg_out value) noexcept override + HRESULT __stdcall get_BreakSchedule(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BreakSchedule()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BreakSchedule()); return S_OK; } catch (...) @@ -1996,11 +2139,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -2009,11 +2153,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_DurationLimit(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DurationLimit(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DurationLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DurationLimit()); return S_OK; } catch (...) @@ -2027,7 +2172,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().CanSkip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSkip()); return S_OK; } catch (...) @@ -2040,6 +2186,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CanSkip(value); return S_OK; } @@ -2049,11 +2196,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetDisplayProperties(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDisplayProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDisplayProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDisplayProperties()); return S_OK; } catch (...) @@ -2063,10 +2211,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ApplyDisplayProperties(abi_arg_in value) noexcept override + HRESULT __stdcall abi_ApplyDisplayProperties(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplyDisplayProperties(*reinterpret_cast(&value)); return S_OK; } @@ -2084,7 +2233,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -2097,7 +2247,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -2110,11 +2261,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in source, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in source, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(*reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(*reinterpret_cast(&source))); return S_OK; } catch (...) @@ -2128,11 +2280,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithStartTime(abi_arg_in source, abi_arg_in startTime, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithStartTime(impl::abi_arg_in source, impl::abi_arg_in startTime, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithStartTime(*reinterpret_cast(&source), *reinterpret_cast(&startTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithStartTime(*reinterpret_cast(&source), *reinterpret_cast(&startTime))); return S_OK; } catch (...) @@ -2142,11 +2295,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateWithStartTimeAndDurationLimit(abi_arg_in source, abi_arg_in startTime, abi_arg_in durationLimit, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithStartTimeAndDurationLimit(impl::abi_arg_in source, impl::abi_arg_in startTime, impl::abi_arg_in durationLimit, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithStartTimeAndDurationLimit(*reinterpret_cast(&source), *reinterpret_cast(&startTime), *reinterpret_cast(&durationLimit))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithStartTimeAndDurationLimit(*reinterpret_cast(&source), *reinterpret_cast(&startTime), *reinterpret_cast(&durationLimit))); return S_OK; } catch (...) @@ -2160,11 +2314,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -2174,11 +2329,12 @@ struct produce : } } - HRESULT __stdcall get_Error(abi_arg_out value) noexcept override + HRESULT __stdcall get_Error(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -2192,11 +2348,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -2210,11 +2367,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_FindFromMediaSource(abi_arg_in source, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FindFromMediaSource(impl::abi_arg_in source, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FindFromMediaSource(*reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindFromMediaSource(*reinterpret_cast(&source))); return S_OK; } catch (...) @@ -2228,11 +2386,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall add_ItemFailed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2245,6 +2404,7 @@ struct produce : produce_baseshim()); this->shim().ItemFailed(token); return S_OK; } @@ -2254,11 +2414,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_CurrentItemChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CurrentItemChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CurrentItemChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2271,6 +2432,7 @@ struct produce : produce_baseshim()); this->shim().CurrentItemChanged(token); return S_OK; } @@ -2280,11 +2442,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemOpened(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemOpened(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemOpened(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2297,6 +2460,7 @@ struct produce : produce_baseshim()); this->shim().ItemOpened(token); return S_OK; } @@ -2306,11 +2470,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -2324,7 +2489,8 @@ struct produce : produce_baseshim().AutoRepeatEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRepeatEnabled()); return S_OK; } catch (...) @@ -2337,6 +2503,7 @@ struct produce : produce_baseshim()); this->shim().AutoRepeatEnabled(value); return S_OK; } @@ -2350,7 +2517,8 @@ struct produce : produce_baseshim().ShuffleEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShuffleEnabled()); return S_OK; } catch (...) @@ -2363,6 +2531,7 @@ struct produce : produce_baseshim()); this->shim().ShuffleEnabled(value); return S_OK; } @@ -2372,11 +2541,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrentItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentItem()); return S_OK; } catch (...) @@ -2390,7 +2560,8 @@ struct produce : produce_baseshim().CurrentItemIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentItemIndex()); return S_OK; } catch (...) @@ -2399,11 +2570,12 @@ struct produce : produce_base item) noexcept override + HRESULT __stdcall abi_MoveNext(impl::abi_arg_out item) noexcept override { try { - *item = detach(this->shim().MoveNext()); + typename D::abi_guard guard(this->shim()); + *item = detach_abi(this->shim().MoveNext()); return S_OK; } catch (...) @@ -2413,11 +2585,12 @@ struct produce : produce_base item) noexcept override + HRESULT __stdcall abi_MovePrevious(impl::abi_arg_out item) noexcept override { try { - *item = detach(this->shim().MovePrevious()); + typename D::abi_guard guard(this->shim()); + *item = detach_abi(this->shim().MovePrevious()); return S_OK; } catch (...) @@ -2427,11 +2600,12 @@ struct produce : produce_base item) noexcept override + HRESULT __stdcall abi_MoveTo(uint32_t itemIndex, impl::abi_arg_out item) noexcept override { try { - *item = detach(this->shim().MoveTo(itemIndex)); + typename D::abi_guard guard(this->shim()); + *item = detach_abi(this->shim().MoveTo(itemIndex)); return S_OK; } catch (...) @@ -2445,11 +2619,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_MaxPrefetchTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MaxPrefetchTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxPrefetchTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPrefetchTime()); return S_OK; } catch (...) @@ -2459,10 +2634,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_MaxPrefetchTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_MaxPrefetchTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxPrefetchTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2472,11 +2648,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_StartingItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartingItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartingItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartingItem()); return S_OK; } catch (...) @@ -2486,10 +2663,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_StartingItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_StartingItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartingItem(*reinterpret_cast(&value)); return S_OK; } @@ -2499,11 +2677,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ShuffledItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ShuffledItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ShuffledItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShuffledItems()); return S_OK; } catch (...) @@ -2513,10 +2692,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_SetShuffledItems(abi_arg_in> value) noexcept override + HRESULT __stdcall abi_SetShuffledItems(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetShuffledItems(*reinterpret_cast *>(&value)); return S_OK; } @@ -2530,11 +2710,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall add_PlaybackStateChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackStateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackStateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackStateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2547,6 +2728,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackStateChanged(token); return S_OK; } @@ -2556,11 +2738,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_PlaybackRateChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackRateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackRateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackRateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2573,6 +2756,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackRateChanged(token); return S_OK; } @@ -2582,11 +2766,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_SeekCompleted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_SeekCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SeekCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SeekCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2599,6 +2784,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().SeekCompleted(token); return S_OK; } @@ -2608,11 +2794,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_BufferingStarted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingStarted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingStarted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingStarted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2625,6 +2812,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().BufferingStarted(token); return S_OK; } @@ -2634,11 +2822,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_BufferingEnded(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingEnded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingEnded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingEnded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2651,6 +2840,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().BufferingEnded(token); return S_OK; } @@ -2660,11 +2850,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_BufferingProgressChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingProgressChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingProgressChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingProgressChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2677,6 +2868,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().BufferingProgressChanged(token); return S_OK; } @@ -2686,11 +2878,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DownloadProgressChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_DownloadProgressChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadProgressChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadProgressChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2703,6 +2896,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadProgressChanged(token); return S_OK; } @@ -2712,11 +2906,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_NaturalDurationChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_NaturalDurationChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().NaturalDurationChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NaturalDurationChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2729,6 +2924,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().NaturalDurationChanged(token); return S_OK; } @@ -2738,11 +2934,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_PositionChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_PositionChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PositionChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PositionChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2755,6 +2952,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionChanged(token); return S_OK; } @@ -2764,11 +2962,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_NaturalVideoSizeChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_NaturalVideoSizeChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().NaturalVideoSizeChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NaturalVideoSizeChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2781,6 +2980,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().NaturalVideoSizeChanged(token); return S_OK; } @@ -2790,11 +2990,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MediaPlayer(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -2804,11 +3005,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_NaturalDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalDuration()); return S_OK; } catch (...) @@ -2817,11 +3019,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2830,10 +3033,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Position(abi_arg_in value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -2847,7 +3051,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().PlaybackState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackState()); return S_OK; } catch (...) @@ -2860,7 +3065,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanSeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSeek()); return S_OK; } catch (...) @@ -2873,7 +3079,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().CanPause()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPause()); return S_OK; } catch (...) @@ -2886,7 +3093,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsProtected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProtected()); return S_OK; } catch (...) @@ -2899,7 +3107,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().PlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRate()); return S_OK; } catch (...) @@ -2912,6 +3121,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackRate(value); return S_OK; } @@ -2925,7 +3135,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().BufferingProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferingProgress()); return S_OK; } catch (...) @@ -2938,7 +3149,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().DownloadProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadProgress()); return S_OK; } catch (...) @@ -2951,7 +3163,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().NaturalVideoHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoHeight()); return S_OK; } catch (...) @@ -2964,7 +3177,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().NaturalVideoWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoWidth()); return S_OK; } catch (...) @@ -2973,11 +3187,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_NormalizedSourceRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalizedSourceRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedSourceRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedSourceRect()); return S_OK; } catch (...) @@ -2986,10 +3201,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_NormalizedSourceRect(abi_arg_in value) noexcept override + HRESULT __stdcall put_NormalizedSourceRect(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NormalizedSourceRect(*reinterpret_cast(&value)); return S_OK; } @@ -3003,7 +3219,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().StereoscopicVideoPackingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoscopicVideoPackingMode()); return S_OK; } catch (...) @@ -3016,6 +3233,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StereoscopicVideoPackingMode(value); return S_OK; } @@ -3033,11 +3251,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall add_PresentationModeChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PresentationModeChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PresentationModeChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PresentationModeChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -3050,6 +3269,7 @@ struct produceshim()); this->shim().PresentationModeChanged(token); return S_OK; } @@ -3063,7 +3283,8 @@ struct produceshim().GetPresentationMode(index)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPresentationMode(index)); return S_OK; } catch (...) @@ -3076,6 +3297,7 @@ struct produceshim()); this->shim().SetPresentationMode(index, value); return S_OK; } @@ -3093,7 +3315,8 @@ struct produce : produce_baseshim().AutoPlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoPlay()); return S_OK; } catch (...) @@ -3106,6 +3329,7 @@ struct produce : produce_baseshim()); this->shim().AutoPlay(value); return S_OK; } @@ -3115,11 +3339,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NaturalDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalDuration()); return S_OK; } catch (...) @@ -3128,11 +3353,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3141,10 +3367,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -3158,7 +3385,8 @@ struct produce : produce_baseshim().BufferingProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferingProgress()); return S_OK; } catch (...) @@ -3171,7 +3399,8 @@ struct produce : produce_baseshim().CurrentState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentState()); return S_OK; } catch (...) @@ -3184,7 +3413,8 @@ struct produce : produce_baseshim().CanSeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSeek()); return S_OK; } catch (...) @@ -3197,7 +3427,8 @@ struct produce : produce_baseshim().CanPause()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPause()); return S_OK; } catch (...) @@ -3210,7 +3441,8 @@ struct produce : produce_baseshim().IsLoopingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLoopingEnabled()); return S_OK; } catch (...) @@ -3223,6 +3455,7 @@ struct produce : produce_baseshim()); this->shim().IsLoopingEnabled(value); return S_OK; } @@ -3236,7 +3469,8 @@ struct produce : produce_baseshim().IsProtected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProtected()); return S_OK; } catch (...) @@ -3249,7 +3483,8 @@ struct produce : produce_baseshim().IsMuted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMuted()); return S_OK; } catch (...) @@ -3262,6 +3497,7 @@ struct produce : produce_baseshim()); this->shim().IsMuted(value); return S_OK; } @@ -3275,7 +3511,8 @@ struct produce : produce_baseshim().PlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRate()); return S_OK; } catch (...) @@ -3288,6 +3525,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackRate(value); return S_OK; } @@ -3301,7 +3539,8 @@ struct produce : produce_baseshim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -3314,6 +3553,7 @@ struct produce : produce_baseshim()); this->shim().Volume(value); return S_OK; } @@ -3323,11 +3563,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaybackMediaMarkers(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackMediaMarkers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackMediaMarkers()); return S_OK; } catch (...) @@ -3337,11 +3578,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_MediaOpened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaOpened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaOpened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3354,6 +3596,7 @@ struct produce : produce_baseshim()); this->shim().MediaOpened(token); return S_OK; } @@ -3363,11 +3606,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_MediaEnded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaEnded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaEnded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3380,6 +3624,7 @@ struct produce : produce_baseshim()); this->shim().MediaEnded(token); return S_OK; } @@ -3389,11 +3634,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_MediaFailed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaFailed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaFailed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3406,6 +3652,7 @@ struct produce : produce_baseshim()); this->shim().MediaFailed(token); return S_OK; } @@ -3415,11 +3662,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_CurrentStateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CurrentStateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CurrentStateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3432,6 +3680,7 @@ struct produce : produce_baseshim()); this->shim().CurrentStateChanged(token); return S_OK; } @@ -3441,11 +3690,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackMediaMarkerReached(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackMediaMarkerReached(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackMediaMarkerReached(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3458,6 +3708,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackMediaMarkerReached(token); return S_OK; } @@ -3467,11 +3718,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_MediaPlayerRateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaPlayerRateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaPlayerRateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3484,6 +3736,7 @@ struct produce : produce_baseshim()); this->shim().MediaPlayerRateChanged(token); return S_OK; } @@ -3493,11 +3746,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_VolumeChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().VolumeChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VolumeChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3510,6 +3764,7 @@ struct produce : produce_baseshim()); this->shim().VolumeChanged(token); return S_OK; } @@ -3519,11 +3774,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SeekCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SeekCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SeekCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3536,6 +3792,7 @@ struct produce : produce_baseshim()); this->shim().SeekCompleted(token); return S_OK; } @@ -3545,11 +3802,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingStarted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingStarted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingStarted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3562,6 +3820,7 @@ struct produce : produce_baseshim()); this->shim().BufferingStarted(token); return S_OK; } @@ -3571,11 +3830,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingEnded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingEnded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingEnded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3588,6 +3848,7 @@ struct produce : produce_baseshim()); this->shim().BufferingEnded(token); return S_OK; } @@ -3601,6 +3862,7 @@ struct produce : produce_baseshim()); this->shim().Play(); return S_OK; } @@ -3614,6 +3876,7 @@ struct produce : produce_baseshim()); this->shim().Pause(); return S_OK; } @@ -3623,10 +3886,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetUriSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetUriSource(*reinterpret_cast(&value)); return S_OK; } @@ -3640,11 +3904,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SystemMediaTransportControls(abi_arg_out value) noexcept override + HRESULT __stdcall get_SystemMediaTransportControls(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemMediaTransportControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemMediaTransportControls()); return S_OK; } catch (...) @@ -3658,7 +3923,8 @@ struct produce : produce_baseshim().AudioCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioCategory()); return S_OK; } catch (...) @@ -3671,6 +3937,7 @@ struct produce : produce_baseshim()); this->shim().AudioCategory(value); return S_OK; } @@ -3684,7 +3951,8 @@ struct produce : produce_baseshim().AudioDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceType()); return S_OK; } catch (...) @@ -3697,6 +3965,7 @@ struct produce : produce_baseshim()); this->shim().AudioDeviceType(value); return S_OK; } @@ -3710,11 +3979,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_IsMutedChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_IsMutedChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().IsMutedChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsMutedChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3727,6 +3997,7 @@ struct produce : produce_baseshim()); this->shim().IsMutedChanged(token); return S_OK; } @@ -3736,11 +4007,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SourceChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -3753,6 +4025,7 @@ struct produce : produce_baseshim()); this->shim().SourceChanged(token); return S_OK; } @@ -3766,7 +4039,8 @@ struct produce : produce_baseshim().AudioBalance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioBalance()); return S_OK; } catch (...) @@ -3779,6 +4053,7 @@ struct produce : produce_baseshim()); this->shim().AudioBalance(value); return S_OK; } @@ -3792,7 +4067,8 @@ struct produce : produce_baseshim().RealTimePlayback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RealTimePlayback()); return S_OK; } catch (...) @@ -3805,6 +4081,7 @@ struct produce : produce_baseshim()); this->shim().RealTimePlayback(value); return S_OK; } @@ -3818,7 +4095,8 @@ struct produce : produce_baseshim().StereoscopicVideoRenderMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StereoscopicVideoRenderMode()); return S_OK; } catch (...) @@ -3831,6 +4109,7 @@ struct produce : produce_baseshim()); this->shim().StereoscopicVideoRenderMode(value); return S_OK; } @@ -3840,11 +4119,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BreakManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BreakManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BreakManager()); return S_OK; } catch (...) @@ -3854,11 +4134,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommandManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandManager()); return S_OK; } catch (...) @@ -3868,11 +4149,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AudioDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDevice()); return S_OK; } catch (...) @@ -3882,10 +4164,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AudioDevice(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioDevice(*reinterpret_cast(&value)); return S_OK; } @@ -3895,11 +4178,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TimelineController(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimelineController()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimelineController()); return S_OK; } catch (...) @@ -3909,10 +4193,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TimelineController(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TimelineController(*reinterpret_cast(&value)); return S_OK; } @@ -3922,11 +4207,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TimelineControllerPositionOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimelineControllerPositionOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimelineControllerPositionOffset()); return S_OK; } catch (...) @@ -3935,10 +4221,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TimelineControllerPositionOffset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TimelineControllerPositionOffset(*reinterpret_cast(&value)); return S_OK; } @@ -3948,11 +4235,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaybackSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackSession()); return S_OK; } catch (...) @@ -3966,6 +4254,7 @@ struct produce : produce_baseshim()); this->shim().StepForwardOneFrame(); return S_OK; } @@ -3979,6 +4268,7 @@ struct produce : produce_baseshim()); this->shim().StepBackwardOneFrame(); return S_OK; } @@ -3988,11 +4278,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetAsCastingSource(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAsCastingSource()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAsCastingSource()); return S_OK; } catch (...) @@ -4006,10 +4297,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SetSurfaceSize(abi_arg_in size) noexcept override + HRESULT __stdcall abi_SetSurfaceSize(impl::abi_arg_in size) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSurfaceSize(*reinterpret_cast(&size)); return S_OK; } @@ -4019,11 +4311,12 @@ struct produce : produce_base compositor, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetSurface(impl::abi_arg_in compositor, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSurface(*reinterpret_cast(&compositor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSurface(*reinterpret_cast(&compositor))); return S_OK; } catch (...) @@ -4037,11 +4330,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -4055,10 +4349,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_AddAudioEffect(abi_arg_in activatableClassId, bool effectOptional, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_AddAudioEffect(impl::abi_arg_in activatableClassId, bool effectOptional, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddAudioEffect(*reinterpret_cast(&activatableClassId), effectOptional, *reinterpret_cast(&configuration)); return S_OK; } @@ -4072,6 +4367,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAllEffects(); return S_OK; } @@ -4085,10 +4381,11 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_AddVideoEffect(abi_arg_in activatableClassId, bool effectOptional, abi_arg_in effectConfiguration) noexcept override + HRESULT __stdcall abi_AddVideoEffect(impl::abi_arg_in activatableClassId, bool effectOptional, impl::abi_arg_in effectConfiguration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddVideoEffect(*reinterpret_cast(&activatableClassId), effectOptional, *reinterpret_cast(&effectConfiguration)); return S_OK; } @@ -4106,7 +4403,8 @@ struct produce : produ { try { - *value = detach(this->shim().Error()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Error()); return S_OK; } catch (...) @@ -4119,7 +4417,8 @@ struct produce : produ { try { - *value = detach(this->shim().ExtendedErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedErrorCode()); return S_OK; } catch (...) @@ -4128,11 +4427,12 @@ struct produce : produ } } - HRESULT __stdcall get_ErrorMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_ErrorMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorMessage()); return S_OK; } catch (...) @@ -4150,7 +4450,8 @@ struct produce : { try { - *value = detach(this->shim().NewRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewRate()); return S_OK; } catch (...) @@ -4163,11 +4464,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ProtectionManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProtectionManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectionManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionManager()); return S_OK; } catch (...) @@ -4177,10 +4479,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ProtectionManager(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProtectionManager(*reinterpret_cast(&value)); return S_OK; } @@ -4190,10 +4493,11 @@ struct produce : produce_base file) noexcept override + HRESULT __stdcall abi_SetFileSource(impl::abi_arg_in file) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFileSource(*reinterpret_cast(&file)); return S_OK; } @@ -4203,10 +4507,11 @@ struct produce : produce_base stream) noexcept override + HRESULT __stdcall abi_SetStreamSource(impl::abi_arg_in stream) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetStreamSource(*reinterpret_cast(&stream)); return S_OK; } @@ -4216,10 +4521,11 @@ struct produce : produce_base source) noexcept override + HRESULT __stdcall abi_SetMediaSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMediaSource(*reinterpret_cast(&source)); return S_OK; } @@ -4233,11 +4539,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -4247,10 +4554,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Source(abi_arg_in value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -4264,11 +4572,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_CompositionSurface(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompositionSurface(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompositionSurface()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionSurface()); return S_OK; } catch (...) @@ -4278,11 +4587,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Compositor(abi_arg_out value) noexcept override + HRESULT __stdcall get_Compositor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Compositor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Compositor()); return S_OK; } catch (...) @@ -4292,11 +4602,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_MediaPlayer(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -4310,11 +4621,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Time(abi_arg_out value) noexcept override + HRESULT __stdcall get_Time(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Time()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Time()); return S_OK; } catch (...) @@ -4323,11 +4635,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MediaMarkerType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaMarkerType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaMarkerType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaMarkerType()); return S_OK; } catch (...) @@ -4337,11 +4650,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -4355,11 +4669,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromTime(abi_arg_in value, abi_arg_out marker) noexcept override + HRESULT __stdcall abi_CreateFromTime(impl::abi_arg_in value, impl::abi_arg_out marker) noexcept override { try { - *marker = detach(this->shim().CreateFromTime(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *marker = detach_abi(this->shim().CreateFromTime(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -4369,11 +4684,12 @@ struct produce : produ } } - HRESULT __stdcall abi_Create(abi_arg_in value, abi_arg_in mediaMarketType, abi_arg_in text, abi_arg_out marker) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in value, impl::abi_arg_in mediaMarketType, impl::abi_arg_in text, impl::abi_arg_out marker) noexcept override { try { - *marker = detach(this->shim().Create(*reinterpret_cast(&value), *reinterpret_cast(&mediaMarketType), *reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *marker = detach_abi(this->shim().Create(*reinterpret_cast(&value), *reinterpret_cast(&mediaMarketType), *reinterpret_cast(&text))); return S_OK; } catch (...) @@ -4387,11 +4703,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_PlaybackMediaMarker(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaybackMediaMarker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackMediaMarker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackMediaMarker()); return S_OK; } catch (...) @@ -4409,7 +4726,8 @@ struct produce : prod { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -4418,10 +4736,11 @@ struct produce : prod } } - HRESULT __stdcall abi_Insert(abi_arg_in value) noexcept override + HRESULT __stdcall abi_Insert(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Insert(*reinterpret_cast(&value)); return S_OK; } @@ -4435,6 +4754,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -4448,11 +4768,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Track(abi_arg_out value) noexcept override + HRESULT __stdcall get_Track(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Track()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track()); return S_OK; } catch (...) @@ -4466,7 +4787,8 @@ struct produceshim().OldPresentationMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldPresentationMode()); return S_OK; } catch (...) @@ -4479,7 +4801,8 @@ struct produceshim().NewPresentationMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewPresentationMode()); return S_OK; } catch (...) @@ -4496,256 +4819,256 @@ namespace Windows::Media::Playback { template Windows::Foundation::TimeSpan impl_IPlaybackMediaMarker::Time() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Time(put(value))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarker)->get_Time(put_abi(value))); return value; } template hstring impl_IPlaybackMediaMarker::MediaMarkerType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MediaMarkerType(put(value))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarker)->get_MediaMarkerType(put_abi(value))); return value; } template hstring impl_IPlaybackMediaMarker::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarker)->get_Text(put_abi(value))); return value; } template Windows::Media::Playback::PlaybackMediaMarker impl_IPlaybackMediaMarkerFactory::CreateFromTime(const Windows::Foundation::TimeSpan & value) const { Windows::Media::Playback::PlaybackMediaMarker marker { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromTime(get(value), put(marker))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerFactory)->abi_CreateFromTime(get_abi(value), put_abi(marker))); return marker; } -template Windows::Media::Playback::PlaybackMediaMarker impl_IPlaybackMediaMarkerFactory::Create(const Windows::Foundation::TimeSpan & value, hstring_ref mediaMarketType, hstring_ref text) const +template Windows::Media::Playback::PlaybackMediaMarker impl_IPlaybackMediaMarkerFactory::Create(const Windows::Foundation::TimeSpan & value, hstring_view mediaMarketType, hstring_view text) const { Windows::Media::Playback::PlaybackMediaMarker marker { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(value), get(mediaMarketType), get(text), put(marker))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerFactory)->abi_Create(get_abi(value), get_abi(mediaMarketType), get_abi(text), put_abi(marker))); return marker; } template uint32_t impl_IPlaybackMediaMarkerSequence::Size() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerSequence)->get_Size(&value)); return value; } template void impl_IPlaybackMediaMarkerSequence::Insert(const Windows::Media::Playback::PlaybackMediaMarker & value) const { - check_hresult(static_cast(static_cast(*this))->abi_Insert(get(value))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerSequence)->abi_Insert(get_abi(value))); } template void impl_IPlaybackMediaMarkerSequence::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerSequence)->abi_Clear()); } template Windows::Media::Playback::MediaPlayerError impl_IMediaPlayerFailedEventArgs::Error() const { Windows::Media::Playback::MediaPlayerError value {}; - check_hresult(static_cast(static_cast(*this))->get_Error(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerFailedEventArgs)->get_Error(&value)); return value; } template HRESULT impl_IMediaPlayerFailedEventArgs::ExtendedErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedErrorCode(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerFailedEventArgs)->get_ExtendedErrorCode(&value)); return value; } template hstring impl_IMediaPlayerFailedEventArgs::ErrorMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ErrorMessage(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerFailedEventArgs)->get_ErrorMessage(put_abi(value))); return value; } template double impl_IMediaPlayerRateChangedEventArgs::NewRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NewRate(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerRateChangedEventArgs)->get_NewRate(&value)); return value; } template Windows::Media::Playback::PlaybackMediaMarker impl_IPlaybackMediaMarkerReachedEventArgs::PlaybackMediaMarker() const { Windows::Media::Playback::PlaybackMediaMarker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackMediaMarker(put(value))); + check_hresult(WINRT_SHIM(IPlaybackMediaMarkerReachedEventArgs)->get_PlaybackMediaMarker(put_abi(value))); return value; } template Windows::Foundation::Collections::ValueSet impl_IMediaPlayerDataReceivedEventArgs::Data() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerDataReceivedEventArgs)->get_Data(put_abi(value))); return value; } template bool impl_IMediaPlayer::AutoPlay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoPlay(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_AutoPlay(&value)); return value; } template void impl_IMediaPlayer::AutoPlay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoPlay(value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_AutoPlay(value)); } template Windows::Foundation::TimeSpan impl_IMediaPlayer::NaturalDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_NaturalDuration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaPlayer::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_Position(put_abi(value))); return value; } template void impl_IMediaPlayer::Position(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_Position(get_abi(value))); } template double impl_IMediaPlayer::BufferingProgress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BufferingProgress(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_BufferingProgress(&value)); return value; } template Windows::Media::Playback::MediaPlayerState impl_IMediaPlayer::CurrentState() const { Windows::Media::Playback::MediaPlayerState value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentState(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_CurrentState(&value)); return value; } template bool impl_IMediaPlayer::CanSeek() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSeek(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_CanSeek(&value)); return value; } template bool impl_IMediaPlayer::CanPause() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPause(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_CanPause(&value)); return value; } template bool impl_IMediaPlayer::IsLoopingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLoopingEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_IsLoopingEnabled(&value)); return value; } template void impl_IMediaPlayer::IsLoopingEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsLoopingEnabled(value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_IsLoopingEnabled(value)); } template bool impl_IMediaPlayer::IsProtected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsProtected(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_IsProtected(&value)); return value; } template bool impl_IMediaPlayer::IsMuted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMuted(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_IsMuted(&value)); return value; } template void impl_IMediaPlayer::IsMuted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMuted(value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_IsMuted(value)); } template double impl_IMediaPlayer::PlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRate(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_PlaybackRate(&value)); return value; } template void impl_IMediaPlayer::PlaybackRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackRate(value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_PlaybackRate(value)); } template double impl_IMediaPlayer::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_Volume(&value)); return value; } template void impl_IMediaPlayer::Volume(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Volume(value)); + check_hresult(WINRT_SHIM(IMediaPlayer)->put_Volume(value)); } template Windows::Media::Playback::PlaybackMediaMarkerSequence impl_IMediaPlayer::PlaybackMediaMarkers() const { Windows::Media::Playback::PlaybackMediaMarkerSequence value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackMediaMarkers(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer)->get_PlaybackMediaMarkers(put_abi(value))); return value; } -template event_token impl_IMediaPlayer::MediaOpened(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::MediaOpened(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaOpened(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_MediaOpened(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::MediaOpened(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::MediaOpened(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_MediaOpened, MediaOpened(value)); } template void impl_IMediaPlayer::MediaOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaOpened(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_MediaOpened(token)); } -template event_token impl_IMediaPlayer::MediaEnded(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::MediaEnded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaEnded(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_MediaEnded(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::MediaEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::MediaEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_MediaEnded, MediaEnded(value)); } template void impl_IMediaPlayer::MediaEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaEnded(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_MediaEnded(token)); } template event_token impl_IMediaPlayer::MediaFailed(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaFailed(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_MediaFailed(get_abi(value), &token)); return token; } @@ -4756,30 +5079,30 @@ template event_revoker impl_IMediaPlayer::MediaFai template void impl_IMediaPlayer::MediaFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaFailed(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_MediaFailed(token)); } -template event_token impl_IMediaPlayer::CurrentStateChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::CurrentStateChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CurrentStateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_CurrentStateChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::CurrentStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::CurrentStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_CurrentStateChanged, CurrentStateChanged(value)); } template void impl_IMediaPlayer::CurrentStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CurrentStateChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_CurrentStateChanged(token)); } template event_token impl_IMediaPlayer::PlaybackMediaMarkerReached(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackMediaMarkerReached(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_PlaybackMediaMarkerReached(get_abi(value), &token)); return token; } @@ -4790,13 +5113,13 @@ template event_revoker impl_IMediaPlayer::Playback template void impl_IMediaPlayer::PlaybackMediaMarkerReached(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackMediaMarkerReached(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_PlaybackMediaMarkerReached(token)); } template event_token impl_IMediaPlayer::MediaPlayerRateChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaPlayerRateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_MediaPlayerRateChanged(get_abi(value), &token)); return token; } @@ -4807,667 +5130,667 @@ template event_revoker impl_IMediaPlayer::MediaPla template void impl_IMediaPlayer::MediaPlayerRateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaPlayerRateChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_MediaPlayerRateChanged(token)); } -template event_token impl_IMediaPlayer::VolumeChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::VolumeChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VolumeChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_VolumeChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::VolumeChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::VolumeChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_VolumeChanged, VolumeChanged(value)); } template void impl_IMediaPlayer::VolumeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VolumeChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_VolumeChanged(token)); } -template event_token impl_IMediaPlayer::SeekCompleted(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::SeekCompleted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SeekCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_SeekCompleted(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::SeekCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::SeekCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_SeekCompleted, SeekCompleted(value)); } template void impl_IMediaPlayer::SeekCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SeekCompleted(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_SeekCompleted(token)); } -template event_token impl_IMediaPlayer::BufferingStarted(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::BufferingStarted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingStarted(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_BufferingStarted(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::BufferingStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::BufferingStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_BufferingStarted, BufferingStarted(value)); } template void impl_IMediaPlayer::BufferingStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingStarted(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_BufferingStarted(token)); } -template event_token impl_IMediaPlayer::BufferingEnded(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer::BufferingEnded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingEnded(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->add_BufferingEnded(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer::BufferingEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer::BufferingEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer::remove_BufferingEnded, BufferingEnded(value)); } template void impl_IMediaPlayer::BufferingEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingEnded(token)); + check_hresult(WINRT_SHIM(IMediaPlayer)->remove_BufferingEnded(token)); } template void impl_IMediaPlayer::Play() const { - check_hresult(static_cast(static_cast(*this))->abi_Play()); + check_hresult(WINRT_SHIM(IMediaPlayer)->abi_Play()); } template void impl_IMediaPlayer::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IMediaPlayer)->abi_Pause()); } template void impl_IMediaPlayer::SetUriSource(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetUriSource(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayer)->abi_SetUriSource(get_abi(value))); } template Windows::Media::SystemMediaTransportControls impl_IMediaPlayer2::SystemMediaTransportControls() const { Windows::Media::SystemMediaTransportControls value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SystemMediaTransportControls(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer2)->get_SystemMediaTransportControls(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlayerAudioCategory impl_IMediaPlayer2::AudioCategory() const { Windows::Media::Playback::MediaPlayerAudioCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioCategory(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer2)->get_AudioCategory(&value)); return value; } template void impl_IMediaPlayer2::AudioCategory(Windows::Media::Playback::MediaPlayerAudioCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioCategory(value)); + check_hresult(WINRT_SHIM(IMediaPlayer2)->put_AudioCategory(value)); } template Windows::Media::Playback::MediaPlayerAudioDeviceType impl_IMediaPlayer2::AudioDeviceType() const { Windows::Media::Playback::MediaPlayerAudioDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceType(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer2)->get_AudioDeviceType(&value)); return value; } template void impl_IMediaPlayer2::AudioDeviceType(Windows::Media::Playback::MediaPlayerAudioDeviceType value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioDeviceType(value)); + check_hresult(WINRT_SHIM(IMediaPlayer2)->put_AudioDeviceType(value)); } -template event_token impl_IMediaPlayer3::IsMutedChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer3::IsMutedChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_IsMutedChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->add_IsMutedChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer3::IsMutedChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer3::IsMutedChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer3::remove_IsMutedChanged, IsMutedChanged(value)); } template void impl_IMediaPlayer3::IsMutedChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_IsMutedChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->remove_IsMutedChanged(token)); } -template event_token impl_IMediaPlayer3::SourceChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlayer3::SourceChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->add_SourceChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlayer3::SourceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlayer3::SourceChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlayer3::remove_SourceChanged, SourceChanged(value)); } template void impl_IMediaPlayer3::SourceChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->remove_SourceChanged(token)); } template double impl_IMediaPlayer3::AudioBalance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioBalance(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_AudioBalance(&value)); return value; } template void impl_IMediaPlayer3::AudioBalance(double value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioBalance(value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_AudioBalance(value)); } template bool impl_IMediaPlayer3::RealTimePlayback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RealTimePlayback(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_RealTimePlayback(&value)); return value; } template void impl_IMediaPlayer3::RealTimePlayback(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RealTimePlayback(value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_RealTimePlayback(value)); } template Windows::Media::Playback::StereoscopicVideoRenderMode impl_IMediaPlayer3::StereoscopicVideoRenderMode() const { Windows::Media::Playback::StereoscopicVideoRenderMode value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoscopicVideoRenderMode(&value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_StereoscopicVideoRenderMode(&value)); return value; } template void impl_IMediaPlayer3::StereoscopicVideoRenderMode(Windows::Media::Playback::StereoscopicVideoRenderMode value) const { - check_hresult(static_cast(static_cast(*this))->put_StereoscopicVideoRenderMode(value)); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_StereoscopicVideoRenderMode(value)); } template Windows::Media::Playback::MediaBreakManager impl_IMediaPlayer3::BreakManager() const { Windows::Media::Playback::MediaBreakManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BreakManager(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_BreakManager(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManager impl_IMediaPlayer3::CommandManager() const { Windows::Media::Playback::MediaPlaybackCommandManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CommandManager(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_CommandManager(put_abi(value))); return value; } template Windows::Devices::Enumeration::DeviceInformation impl_IMediaPlayer3::AudioDevice() const { Windows::Devices::Enumeration::DeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioDevice(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_AudioDevice(put_abi(value))); return value; } template void impl_IMediaPlayer3::AudioDevice(const Windows::Devices::Enumeration::DeviceInformation & value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioDevice(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_AudioDevice(get_abi(value))); } template Windows::Media::MediaTimelineController impl_IMediaPlayer3::TimelineController() const { Windows::Media::MediaTimelineController value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TimelineController(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_TimelineController(put_abi(value))); return value; } template void impl_IMediaPlayer3::TimelineController(const Windows::Media::MediaTimelineController & value) const { - check_hresult(static_cast(static_cast(*this))->put_TimelineController(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_TimelineController(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaPlayer3::TimelineControllerPositionOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TimelineControllerPositionOffset(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_TimelineControllerPositionOffset(put_abi(value))); return value; } template void impl_IMediaPlayer3::TimelineControllerPositionOffset(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TimelineControllerPositionOffset(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->put_TimelineControllerPositionOffset(get_abi(value))); } template Windows::Media::Playback::MediaPlaybackSession impl_IMediaPlayer3::PlaybackSession() const { Windows::Media::Playback::MediaPlaybackSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackSession(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->get_PlaybackSession(put_abi(value))); return value; } template void impl_IMediaPlayer3::StepForwardOneFrame() const { - check_hresult(static_cast(static_cast(*this))->abi_StepForwardOneFrame()); + check_hresult(WINRT_SHIM(IMediaPlayer3)->abi_StepForwardOneFrame()); } template void impl_IMediaPlayer3::StepBackwardOneFrame() const { - check_hresult(static_cast(static_cast(*this))->abi_StepBackwardOneFrame()); + check_hresult(WINRT_SHIM(IMediaPlayer3)->abi_StepBackwardOneFrame()); } template Windows::Media::Casting::CastingSource impl_IMediaPlayer3::GetAsCastingSource() const { Windows::Media::Casting::CastingSource returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAsCastingSource(put(returnValue))); + check_hresult(WINRT_SHIM(IMediaPlayer3)->abi_GetAsCastingSource(put_abi(returnValue))); return returnValue; } template void impl_IMediaPlayer4::SetSurfaceSize(const Windows::Foundation::Size & size) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSurfaceSize(get(size))); + check_hresult(WINRT_SHIM(IMediaPlayer4)->abi_SetSurfaceSize(get_abi(size))); } template Windows::Media::Playback::MediaPlayerSurface impl_IMediaPlayer4::GetSurface(const Windows::UI::Composition::Compositor & compositor) const { Windows::Media::Playback::MediaPlayerSurface result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSurface(get(compositor), put(result))); + check_hresult(WINRT_SHIM(IMediaPlayer4)->abi_GetSurface(get_abi(compositor), put_abi(result))); return result; } -template event_token impl_IMediaPlaybackSession::PlaybackStateChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::PlaybackStateChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackStateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_PlaybackStateChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::PlaybackStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::PlaybackStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_PlaybackStateChanged, PlaybackStateChanged(value)); } template void impl_IMediaPlaybackSession::PlaybackStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackStateChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_PlaybackStateChanged(token)); } -template event_token impl_IMediaPlaybackSession::PlaybackRateChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::PlaybackRateChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackRateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_PlaybackRateChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::PlaybackRateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::PlaybackRateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_PlaybackRateChanged, PlaybackRateChanged(value)); } template void impl_IMediaPlaybackSession::PlaybackRateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackRateChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_PlaybackRateChanged(token)); } -template event_token impl_IMediaPlaybackSession::SeekCompleted(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::SeekCompleted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SeekCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_SeekCompleted(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::SeekCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::SeekCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_SeekCompleted, SeekCompleted(value)); } template void impl_IMediaPlaybackSession::SeekCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SeekCompleted(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_SeekCompleted(token)); } -template event_token impl_IMediaPlaybackSession::BufferingStarted(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::BufferingStarted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingStarted(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_BufferingStarted(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::BufferingStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::BufferingStarted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_BufferingStarted, BufferingStarted(value)); } template void impl_IMediaPlaybackSession::BufferingStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingStarted(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_BufferingStarted(token)); } -template event_token impl_IMediaPlaybackSession::BufferingEnded(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::BufferingEnded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingEnded(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_BufferingEnded(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::BufferingEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::BufferingEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_BufferingEnded, BufferingEnded(value)); } template void impl_IMediaPlaybackSession::BufferingEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingEnded(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_BufferingEnded(token)); } -template event_token impl_IMediaPlaybackSession::BufferingProgressChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::BufferingProgressChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingProgressChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_BufferingProgressChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::BufferingProgressChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::BufferingProgressChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_BufferingProgressChanged, BufferingProgressChanged(value)); } template void impl_IMediaPlaybackSession::BufferingProgressChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingProgressChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_BufferingProgressChanged(token)); } -template event_token impl_IMediaPlaybackSession::DownloadProgressChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::DownloadProgressChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadProgressChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_DownloadProgressChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::DownloadProgressChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::DownloadProgressChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_DownloadProgressChanged, DownloadProgressChanged(value)); } template void impl_IMediaPlaybackSession::DownloadProgressChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadProgressChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_DownloadProgressChanged(token)); } -template event_token impl_IMediaPlaybackSession::NaturalDurationChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::NaturalDurationChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NaturalDurationChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_NaturalDurationChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::NaturalDurationChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::NaturalDurationChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_NaturalDurationChanged, NaturalDurationChanged(value)); } template void impl_IMediaPlaybackSession::NaturalDurationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NaturalDurationChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_NaturalDurationChanged(token)); } -template event_token impl_IMediaPlaybackSession::PositionChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::PositionChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PositionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_PositionChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::PositionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::PositionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_PositionChanged, PositionChanged(value)); } template void impl_IMediaPlaybackSession::PositionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PositionChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_PositionChanged(token)); } -template event_token impl_IMediaPlaybackSession::NaturalVideoSizeChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMediaPlaybackSession::NaturalVideoSizeChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NaturalVideoSizeChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->add_NaturalVideoSizeChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMediaPlaybackSession::NaturalVideoSizeChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMediaPlaybackSession::NaturalVideoSizeChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackSession::remove_NaturalVideoSizeChanged, NaturalVideoSizeChanged(value)); } template void impl_IMediaPlaybackSession::NaturalVideoSizeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NaturalVideoSizeChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->remove_NaturalVideoSizeChanged(token)); } template Windows::Media::Playback::MediaPlayer impl_IMediaPlaybackSession::MediaPlayer() const { Windows::Media::Playback::MediaPlayer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_MediaPlayer(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaPlaybackSession::NaturalDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_NaturalDuration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaPlaybackSession::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_Position(put_abi(value))); return value; } template void impl_IMediaPlaybackSession::Position(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->put_Position(get_abi(value))); } template Windows::Media::Playback::MediaPlaybackState impl_IMediaPlaybackSession::PlaybackState() const { Windows::Media::Playback::MediaPlaybackState value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackState(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_PlaybackState(&value)); return value; } template bool impl_IMediaPlaybackSession::CanSeek() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSeek(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_CanSeek(&value)); return value; } template bool impl_IMediaPlaybackSession::CanPause() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPause(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_CanPause(&value)); return value; } template bool impl_IMediaPlaybackSession::IsProtected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsProtected(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_IsProtected(&value)); return value; } template double impl_IMediaPlaybackSession::PlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRate(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_PlaybackRate(&value)); return value; } template void impl_IMediaPlaybackSession::PlaybackRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackRate(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->put_PlaybackRate(value)); } template double impl_IMediaPlaybackSession::BufferingProgress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BufferingProgress(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_BufferingProgress(&value)); return value; } template double impl_IMediaPlaybackSession::DownloadProgress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadProgress(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_DownloadProgress(&value)); return value; } template uint32_t impl_IMediaPlaybackSession::NaturalVideoHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoHeight(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_NaturalVideoHeight(&value)); return value; } template uint32_t impl_IMediaPlaybackSession::NaturalVideoWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoWidth(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_NaturalVideoWidth(&value)); return value; } template Windows::Foundation::Rect impl_IMediaPlaybackSession::NormalizedSourceRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizedSourceRect(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_NormalizedSourceRect(put_abi(value))); return value; } template void impl_IMediaPlaybackSession::NormalizedSourceRect(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_NormalizedSourceRect(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->put_NormalizedSourceRect(get_abi(value))); } template Windows::Media::MediaProperties::StereoscopicVideoPackingMode impl_IMediaPlaybackSession::StereoscopicVideoPackingMode() const { Windows::Media::MediaProperties::StereoscopicVideoPackingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_StereoscopicVideoPackingMode(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->get_StereoscopicVideoPackingMode(&value)); return value; } template void impl_IMediaPlaybackSession::StereoscopicVideoPackingMode(Windows::Media::MediaProperties::StereoscopicVideoPackingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_StereoscopicVideoPackingMode(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackSession)->put_StereoscopicVideoPackingMode(value)); } template Windows::Media::Protection::MediaProtectionManager impl_IMediaPlayerSource::ProtectionManager() const { Windows::Media::Protection::MediaProtectionManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtectionManager(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSource)->get_ProtectionManager(put_abi(value))); return value; } template void impl_IMediaPlayerSource::ProtectionManager(const Windows::Media::Protection::MediaProtectionManager & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectionManager(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSource)->put_ProtectionManager(get_abi(value))); } template void impl_IMediaPlayerSource::SetFileSource(const Windows::Storage::IStorageFile & file) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFileSource(get(file))); + check_hresult(WINRT_SHIM(IMediaPlayerSource)->abi_SetFileSource(get_abi(file))); } template void impl_IMediaPlayerSource::SetStreamSource(const Windows::Storage::Streams::IRandomAccessStream & stream) const { - check_hresult(static_cast(static_cast(*this))->abi_SetStreamSource(get(stream))); + check_hresult(WINRT_SHIM(IMediaPlayerSource)->abi_SetStreamSource(get_abi(stream))); } template void impl_IMediaPlayerSource::SetMediaSource(const Windows::Media::Core::IMediaSource & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMediaSource(get(source))); + check_hresult(WINRT_SHIM(IMediaPlayerSource)->abi_SetMediaSource(get_abi(source))); } template Windows::Media::Playback::IMediaPlaybackSource impl_IMediaPlayerSource2::Source() const { Windows::Media::Playback::IMediaPlaybackSource value; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSource2)->get_Source(put_abi(value))); return value; } template void impl_IMediaPlayerSource2::Source(const Windows::Media::Playback::IMediaPlaybackSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSource2)->put_Source(get_abi(value))); } -template void impl_IMediaPlayerEffects::AddAudioEffect(hstring_ref activatableClassId, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaPlayerEffects::AddAudioEffect(hstring_view activatableClassId, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddAudioEffect(get(activatableClassId), effectOptional, get(configuration))); + check_hresult(WINRT_SHIM(IMediaPlayerEffects)->abi_AddAudioEffect(get_abi(activatableClassId), effectOptional, get_abi(configuration))); } template void impl_IMediaPlayerEffects::RemoveAllEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAllEffects()); + check_hresult(WINRT_SHIM(IMediaPlayerEffects)->abi_RemoveAllEffects()); } -template void impl_IMediaPlayerEffects2::AddVideoEffect(hstring_ref activatableClassId, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const +template void impl_IMediaPlayerEffects2::AddVideoEffect(hstring_view activatableClassId, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddVideoEffect(get(activatableClassId), effectOptional, get(effectConfiguration))); + check_hresult(WINRT_SHIM(IMediaPlayerEffects2)->abi_AddVideoEffect(get_abi(activatableClassId), effectOptional, get_abi(effectConfiguration))); } template Windows::Media::Playback::MediaBreak impl_IMediaBreakStartedEventArgs::MediaBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakStartedEventArgs)->get_MediaBreak(put_abi(value))); return value; } template Windows::Media::Playback::MediaBreak impl_IMediaBreakEndedEventArgs::MediaBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakEndedEventArgs)->get_MediaBreak(put_abi(value))); return value; } template Windows::Media::Playback::MediaBreak impl_IMediaBreakSkippedEventArgs::MediaBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSkippedEventArgs)->get_MediaBreak(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaBreakSeekedOverEventArgs::SeekedOverBreaks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SeekedOverBreaks(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSeekedOverEventArgs)->get_SeekedOverBreaks(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaBreakSeekedOverEventArgs::OldPosition() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_OldPosition(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSeekedOverEventArgs)->get_OldPosition(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaBreakSeekedOverEventArgs::NewPosition() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NewPosition(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSeekedOverEventArgs)->get_NewPosition(put_abi(value))); return value; } template event_token impl_IMediaBreakManager::BreaksSeekedOver(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BreaksSeekedOver(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->add_BreaksSeekedOver(get_abi(handler), &token)); return token; } @@ -5478,13 +5801,13 @@ template event_revoker impl_IMediaBreakManager< template void impl_IMediaBreakManager::BreaksSeekedOver(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BreaksSeekedOver(token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->remove_BreaksSeekedOver(token)); } template event_token impl_IMediaBreakManager::BreakStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BreakStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->add_BreakStarted(get_abi(handler), &token)); return token; } @@ -5495,13 +5818,13 @@ template event_revoker impl_IMediaBreakManager< template void impl_IMediaBreakManager::BreakStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BreakStarted(token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->remove_BreakStarted(token)); } template event_token impl_IMediaBreakManager::BreakEnded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BreakEnded(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->add_BreakEnded(get_abi(handler), &token)); return token; } @@ -5512,13 +5835,13 @@ template event_revoker impl_IMediaBreakManager< template void impl_IMediaBreakManager::BreakEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BreakEnded(token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->remove_BreakEnded(token)); } template event_token impl_IMediaBreakManager::BreakSkipped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BreakSkipped(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->add_BreakSkipped(get_abi(handler), &token)); return token; } @@ -5529,65 +5852,65 @@ template event_revoker impl_IMediaBreakManager< template void impl_IMediaBreakManager::BreakSkipped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BreakSkipped(token)); + check_hresult(WINRT_SHIM(IMediaBreakManager)->remove_BreakSkipped(token)); } template Windows::Media::Playback::MediaBreak impl_IMediaBreakManager::CurrentBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakManager)->get_CurrentBreak(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackSession impl_IMediaBreakManager::PlaybackSession() const { Windows::Media::Playback::MediaPlaybackSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackSession(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakManager)->get_PlaybackSession(put_abi(value))); return value; } template void impl_IMediaBreakManager::PlayBreak(const Windows::Media::Playback::MediaBreak & value) const { - check_hresult(static_cast(static_cast(*this))->abi_PlayBreak(get(value))); + check_hresult(WINRT_SHIM(IMediaBreakManager)->abi_PlayBreak(get_abi(value))); } template void impl_IMediaBreakManager::SkipCurrentBreak() const { - check_hresult(static_cast(static_cast(*this))->abi_SkipCurrentBreak()); + check_hresult(WINRT_SHIM(IMediaBreakManager)->abi_SkipCurrentBreak()); } template Windows::UI::Composition::ICompositionSurface impl_IMediaPlayerSurface::CompositionSurface() const { Windows::UI::Composition::ICompositionSurface value; - check_hresult(static_cast(static_cast(*this))->get_CompositionSurface(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSurface)->get_CompositionSurface(put_abi(value))); return value; } template Windows::UI::Composition::Compositor impl_IMediaPlayerSurface::Compositor() const { Windows::UI::Composition::Compositor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Compositor(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSurface)->get_Compositor(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlayer impl_IMediaPlayerSurface::MediaPlayer() const { Windows::Media::Playback::MediaPlayer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerSurface)->get_MediaPlayer(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlayer impl_IBackgroundMediaPlayerStatics::Current() const { Windows::Media::Playback::MediaPlayer player { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(player))); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->get_Current(put_abi(player))); return player; } template event_token impl_IBackgroundMediaPlayerStatics::MessageReceivedFromBackground(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceivedFromBackground(get(value), &token)); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->add_MessageReceivedFromBackground(get_abi(value), &token)); return token; } @@ -5598,13 +5921,13 @@ template event_revoker impl_IBackgro template void impl_IBackgroundMediaPlayerStatics::MessageReceivedFromBackground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceivedFromBackground(token)); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->remove_MessageReceivedFromBackground(token)); } template event_token impl_IBackgroundMediaPlayerStatics::MessageReceivedFromForeground(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceivedFromForeground(get(value), &token)); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->add_MessageReceivedFromForeground(get_abi(value), &token)); return token; } @@ -5615,385 +5938,385 @@ template event_revoker impl_IBackgro template void impl_IBackgroundMediaPlayerStatics::MessageReceivedFromForeground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceivedFromForeground(token)); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->remove_MessageReceivedFromForeground(token)); } template void impl_IBackgroundMediaPlayerStatics::SendMessageToBackground(const Windows::Foundation::Collections::ValueSet & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SendMessageToBackground(get(value))); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->abi_SendMessageToBackground(get_abi(value))); } template void impl_IBackgroundMediaPlayerStatics::SendMessageToForeground(const Windows::Foundation::Collections::ValueSet & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SendMessageToForeground(get(value))); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->abi_SendMessageToForeground(get_abi(value))); } template bool impl_IBackgroundMediaPlayerStatics::IsMediaPlaying() const { bool isMediaPlaying {}; - check_hresult(static_cast(static_cast(*this))->abi_IsMediaPlaying(&isMediaPlaying)); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->abi_IsMediaPlaying(&isMediaPlaying)); return isMediaPlaying; } template void impl_IBackgroundMediaPlayerStatics::Shutdown() const { - check_hresult(static_cast(static_cast(*this))->abi_Shutdown()); + check_hresult(WINRT_SHIM(IBackgroundMediaPlayerStatics)->abi_Shutdown()); } template bool impl_IMediaPlaybackCommandManagerPlayReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPlayReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerPlayReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPlayReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerPlayReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPlayReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerPauseReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPauseReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerPauseReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPauseReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerPauseReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPauseReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerNextReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerNextReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerNextReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerNextReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerNextReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerNextReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPreviousReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPreviousReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPreviousReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerFastForwardReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerFastForwardReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerFastForwardReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerRewindReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRewindReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerRewindReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRewindReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerRewindReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRewindReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerShuffleReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerShuffleReceivedEventArgs)->put_Handled(value)); } template bool impl_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::IsShuffleRequested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsShuffleRequested(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerShuffleReceivedEventArgs)->get_IsShuffleRequested(&value)); return value; } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerShuffleReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs)->put_Handled(value)); } template Windows::Media::MediaPlaybackAutoRepeatMode impl_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::AutoRepeatMode() const { Windows::Media::MediaPlaybackAutoRepeatMode value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoRepeatMode(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs)->get_AutoRepeatMode(&value)); return value; } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPositionReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPositionReceivedEventArgs)->put_Handled(value)); } template Windows::Foundation::TimeSpan impl_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPositionReceivedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerPositionReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerPositionReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerRateReceivedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRateReceivedEventArgs)->get_Handled(&value)); return value; } template void impl_IMediaPlaybackCommandManagerRateReceivedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRateReceivedEventArgs)->put_Handled(value)); } template double impl_IMediaPlaybackCommandManagerRateReceivedEventArgs::PlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRate(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRateReceivedEventArgs)->get_PlaybackRate(&value)); return value; } template Windows::Foundation::Deferral impl_IMediaPlaybackCommandManagerRateReceivedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerRateReceivedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManager impl_IMediaPlaybackCommandManagerCommandBehavior::CommandManager() const { Windows::Media::Playback::MediaPlaybackCommandManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CommandManager(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->get_CommandManager(put_abi(value))); return value; } template bool impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->get_IsEnabled(&value)); return value; } template Windows::Media::Playback::MediaCommandEnablingRule impl_IMediaPlaybackCommandManagerCommandBehavior::EnablingRule() const { Windows::Media::Playback::MediaCommandEnablingRule value {}; - check_hresult(static_cast(static_cast(*this))->get_EnablingRule(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->get_EnablingRule(&value)); return value; } template void impl_IMediaPlaybackCommandManagerCommandBehavior::EnablingRule(Windows::Media::Playback::MediaCommandEnablingRule value) const { - check_hresult(static_cast(static_cast(*this))->put_EnablingRule(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->put_EnablingRule(value)); } -template event_token impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_IsEnabledChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->add_IsEnabledChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaPlaybackCommandManagerCommandBehavior::remove_IsEnabledChanged, IsEnabledChanged(handler)); } template void impl_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_IsEnabledChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManagerCommandBehavior)->remove_IsEnabledChanged(token)); } template bool impl_IMediaPlaybackCommandManager::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_IsEnabled(&value)); return value; } template void impl_IMediaPlaybackCommandManager::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->put_IsEnabled(value)); } template Windows::Media::Playback::MediaPlayer impl_IMediaPlaybackCommandManager::MediaPlayer() const { Windows::Media::Playback::MediaPlayer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_MediaPlayer(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::PlayBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_PlayBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::PauseBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PauseBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_PauseBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::NextBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NextBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_NextBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::PreviousBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreviousBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_PreviousBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::FastForwardBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FastForwardBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_FastForwardBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::RewindBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RewindBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_RewindBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::ShuffleBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShuffleBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_ShuffleBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::AutoRepeatModeBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoRepeatModeBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_AutoRepeatModeBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::PositionBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PositionBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_PositionBehavior(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior impl_IMediaPlaybackCommandManager::RateBehavior() const { Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RateBehavior(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->get_RateBehavior(put_abi(value))); return value; } template event_token impl_IMediaPlaybackCommandManager::PlayReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlayReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_PlayReceived(get_abi(handler), &token)); return token; } @@ -6004,13 +6327,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::PlayReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlayReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_PlayReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::PauseReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PauseReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_PauseReceived(get_abi(handler), &token)); return token; } @@ -6021,13 +6344,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::PauseReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PauseReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_PauseReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::NextReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NextReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_NextReceived(get_abi(handler), &token)); return token; } @@ -6038,13 +6361,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::NextReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NextReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_NextReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::PreviousReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PreviousReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_PreviousReceived(get_abi(handler), &token)); return token; } @@ -6055,13 +6378,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::PreviousReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PreviousReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_PreviousReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::FastForwardReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FastForwardReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_FastForwardReceived(get_abi(handler), &token)); return token; } @@ -6072,13 +6395,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::FastForwardReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FastForwardReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_FastForwardReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::RewindReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RewindReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_RewindReceived(get_abi(handler), &token)); return token; } @@ -6089,13 +6412,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::RewindReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RewindReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_RewindReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::ShuffleReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ShuffleReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_ShuffleReceived(get_abi(handler), &token)); return token; } @@ -6106,13 +6429,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::ShuffleReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ShuffleReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_ShuffleReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::AutoRepeatModeReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AutoRepeatModeReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_AutoRepeatModeReceived(get_abi(handler), &token)); return token; } @@ -6123,13 +6446,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::AutoRepeatModeReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AutoRepeatModeReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_AutoRepeatModeReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::PositionReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PositionReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_PositionReceived(get_abi(handler), &token)); return token; } @@ -6140,13 +6463,13 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::PositionReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PositionReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_PositionReceived(token)); } template event_token impl_IMediaPlaybackCommandManager::RateReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RateReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->add_RateReceived(get_abi(handler), &token)); return token; } @@ -6157,41 +6480,41 @@ template event_revoker impl_IMediaPla template void impl_IMediaPlaybackCommandManager::RateReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RateReceived(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackCommandManager)->remove_RateReceived(token)); } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemFactory::Create(const Windows::Media::Core::MediaSource & source) const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(source), put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemFactory)->abi_Create(get_abi(source), put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemFactory2::CreateWithStartTime(const Windows::Media::Core::MediaSource & source, const Windows::Foundation::TimeSpan & startTime) const { Windows::Media::Playback::MediaPlaybackItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithStartTime(get(source), get(startTime), put(result))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemFactory2)->abi_CreateWithStartTime(get_abi(source), get_abi(startTime), put_abi(result))); return result; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemFactory2::CreateWithStartTimeAndDurationLimit(const Windows::Media::Core::MediaSource & source, const Windows::Foundation::TimeSpan & startTime, const Windows::Foundation::TimeSpan & durationLimit) const { Windows::Media::Playback::MediaPlaybackItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithStartTimeAndDurationLimit(get(source), get(startTime), get(durationLimit), put(result))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemFactory2)->abi_CreateWithStartTimeAndDurationLimit(get_abi(source), get_abi(startTime), get_abi(durationLimit), put_abi(result))); return result; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemStatics::FindFromMediaSource(const Windows::Media::Core::MediaSource & source) const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindFromMediaSource(get(source), put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemStatics)->abi_FindFromMediaSource(get_abi(source), put_abi(value))); return value; } template event_token impl_IMediaPlaybackItem::AudioTracksChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioTracksChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->add_AudioTracksChanged(get_abi(handler), &token)); return token; } @@ -6202,13 +6525,13 @@ template event_revoker impl_IMediaPlaybackItem< template void impl_IMediaPlaybackItem::AudioTracksChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioTracksChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->remove_AudioTracksChanged(token)); } template event_token impl_IMediaPlaybackItem::VideoTracksChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VideoTracksChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->add_VideoTracksChanged(get_abi(handler), &token)); return token; } @@ -6219,13 +6542,13 @@ template event_revoker impl_IMediaPlaybackItem< template void impl_IMediaPlaybackItem::VideoTracksChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VideoTracksChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->remove_VideoTracksChanged(token)); } template event_token impl_IMediaPlaybackItem::TimedMetadataTracksChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TimedMetadataTracksChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->add_TimedMetadataTracksChanged(get_abi(handler), &token)); return token; } @@ -6236,309 +6559,309 @@ template event_revoker impl_IMediaPlaybackItem< template void impl_IMediaPlaybackItem::TimedMetadataTracksChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TimedMetadataTracksChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->remove_TimedMetadataTracksChanged(token)); } template Windows::Media::Core::MediaSource impl_IMediaPlaybackItem::Source() const { Windows::Media::Core::MediaSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->get_Source(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackAudioTrackList impl_IMediaPlaybackItem::AudioTracks() const { Windows::Media::Playback::MediaPlaybackAudioTrackList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->get_AudioTracks(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackVideoTrackList impl_IMediaPlaybackItem::VideoTracks() const { Windows::Media::Playback::MediaPlaybackVideoTrackList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->get_VideoTracks(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackTimedMetadataTrackList impl_IMediaPlaybackItem::TimedMetadataTracks() const { Windows::Media::Playback::MediaPlaybackTimedMetadataTrackList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TimedMetadataTracks(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem)->get_TimedMetadataTracks(put_abi(value))); return value; } template Windows::Media::MediaPlaybackType impl_IMediaItemDisplayProperties::Type() const { Windows::Media::MediaPlaybackType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->get_Type(&value)); return value; } template void impl_IMediaItemDisplayProperties::Type(Windows::Media::MediaPlaybackType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->put_Type(value)); } template Windows::Media::MusicDisplayProperties impl_IMediaItemDisplayProperties::MusicProperties() const { Windows::Media::MusicDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MusicProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->get_MusicProperties(put_abi(value))); return value; } template Windows::Media::VideoDisplayProperties impl_IMediaItemDisplayProperties::VideoProperties() const { Windows::Media::VideoDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->get_VideoProperties(put_abi(value))); return value; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IMediaItemDisplayProperties::Thumbnail() const { Windows::Storage::Streams::RandomAccessStreamReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->get_Thumbnail(put_abi(value))); return value; } template void impl_IMediaItemDisplayProperties::Thumbnail(const Windows::Storage::Streams::RandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->put_Thumbnail(get_abi(value))); } template void impl_IMediaItemDisplayProperties::ClearAll() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearAll()); + check_hresult(WINRT_SHIM(IMediaItemDisplayProperties)->abi_ClearAll()); } template Windows::Media::Playback::MediaBreakSchedule impl_IMediaPlaybackItem2::BreakSchedule() const { Windows::Media::Playback::MediaBreakSchedule value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BreakSchedule(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->get_BreakSchedule(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaPlaybackItem2::StartTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->get_StartTime(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaPlaybackItem2::DurationLimit() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DurationLimit(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->get_DurationLimit(put_abi(value))); return value; } template bool impl_IMediaPlaybackItem2::CanSkip() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSkip(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->get_CanSkip(&value)); return value; } template void impl_IMediaPlaybackItem2::CanSkip(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanSkip(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->put_CanSkip(value)); } template Windows::Media::Playback::MediaItemDisplayProperties impl_IMediaPlaybackItem2::GetDisplayProperties() const { Windows::Media::Playback::MediaItemDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDisplayProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->abi_GetDisplayProperties(put_abi(value))); return value; } template void impl_IMediaPlaybackItem2::ApplyDisplayProperties(const Windows::Media::Playback::MediaItemDisplayProperties & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ApplyDisplayProperties(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItem2)->abi_ApplyDisplayProperties(get_abi(value))); } template Windows::Media::Playback::MediaBreak impl_IMediaBreakFactory::Create(Windows::Media::Playback::MediaBreakInsertionMethod insertionMethod) const { Windows::Media::Playback::MediaBreak result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(insertionMethod, put(result))); + check_hresult(WINRT_SHIM(IMediaBreakFactory)->abi_Create(insertionMethod, put_abi(result))); return result; } template Windows::Media::Playback::MediaBreak impl_IMediaBreakFactory::CreateWithPresentationPosition(Windows::Media::Playback::MediaBreakInsertionMethod insertionMethod, const Windows::Foundation::TimeSpan & presentationPosition) const { Windows::Media::Playback::MediaBreak result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithPresentationPosition(insertionMethod, get(presentationPosition), put(result))); + check_hresult(WINRT_SHIM(IMediaBreakFactory)->abi_CreateWithPresentationPosition(insertionMethod, get_abi(presentationPosition), put_abi(result))); return result; } template Windows::Media::Playback::MediaPlaybackList impl_IMediaBreak::PlaybackList() const { Windows::Media::Playback::MediaPlaybackList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackList(put(value))); + check_hresult(WINRT_SHIM(IMediaBreak)->get_PlaybackList(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaBreak::PresentationPosition() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PresentationPosition(put(value))); + check_hresult(WINRT_SHIM(IMediaBreak)->get_PresentationPosition(put_abi(value))); return value; } template Windows::Media::Playback::MediaBreakInsertionMethod impl_IMediaBreak::InsertionMethod() const { Windows::Media::Playback::MediaBreakInsertionMethod value {}; - check_hresult(static_cast(static_cast(*this))->get_InsertionMethod(&value)); + check_hresult(WINRT_SHIM(IMediaBreak)->get_InsertionMethod(&value)); return value; } template Windows::Foundation::Collections::ValueSet impl_IMediaBreak::CustomProperties() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CustomProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaBreak)->get_CustomProperties(put_abi(value))); return value; } template bool impl_IMediaBreak::CanStart() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanStart(&value)); + check_hresult(WINRT_SHIM(IMediaBreak)->get_CanStart(&value)); return value; } template void impl_IMediaBreak::CanStart(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanStart(value)); + check_hresult(WINRT_SHIM(IMediaBreak)->put_CanStart(value)); } -template event_token impl_IMediaBreakSchedule::ScheduleChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMediaBreakSchedule::ScheduleChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ScheduleChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->add_ScheduleChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IMediaBreakSchedule::ScheduleChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMediaBreakSchedule::ScheduleChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Playback::IMediaBreakSchedule::remove_ScheduleChanged, ScheduleChanged(handler)); } template void impl_IMediaBreakSchedule::ScheduleChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ScheduleChanged(token)); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->remove_ScheduleChanged(token)); } template void impl_IMediaBreakSchedule::InsertMidrollBreak(const Windows::Media::Playback::MediaBreak & mediaBreak) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertMidrollBreak(get(mediaBreak))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->abi_InsertMidrollBreak(get_abi(mediaBreak))); } template void impl_IMediaBreakSchedule::RemoveMidrollBreak(const Windows::Media::Playback::MediaBreak & mediaBreak) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveMidrollBreak(get(mediaBreak))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->abi_RemoveMidrollBreak(get_abi(mediaBreak))); } template Windows::Foundation::Collections::IVectorView impl_IMediaBreakSchedule::MidrollBreaks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_MidrollBreaks(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->get_MidrollBreaks(put_abi(value))); return value; } template void impl_IMediaBreakSchedule::PrerollBreak(const Windows::Media::Playback::MediaBreak & value) const { - check_hresult(static_cast(static_cast(*this))->put_PrerollBreak(get(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->put_PrerollBreak(get_abi(value))); } template Windows::Media::Playback::MediaBreak impl_IMediaBreakSchedule::PrerollBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrerollBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->get_PrerollBreak(put_abi(value))); return value; } template void impl_IMediaBreakSchedule::PostrollBreak(const Windows::Media::Playback::MediaBreak & value) const { - check_hresult(static_cast(static_cast(*this))->put_PostrollBreak(get(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->put_PostrollBreak(get_abi(value))); } template Windows::Media::Playback::MediaBreak impl_IMediaBreakSchedule::PostrollBreak() const { Windows::Media::Playback::MediaBreak value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PostrollBreak(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->get_PostrollBreak(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaBreakSchedule::PlaybackItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackItem(put(value))); + check_hresult(WINRT_SHIM(IMediaBreakSchedule)->get_PlaybackItem(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItemErrorCode impl_IMediaPlaybackItemError::ErrorCode() const { Windows::Media::Playback::MediaPlaybackItemErrorCode value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackItemError)->get_ErrorCode(&value)); return value; } template HRESULT impl_IMediaPlaybackItemError::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackItemError)->get_ExtendedError(&value)); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaEnginePlaybackSource::CurrentItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentItem(put(value))); + check_hresult(WINRT_SHIM(IMediaEnginePlaybackSource)->get_CurrentItem(put_abi(value))); return value; } template void impl_IMediaEnginePlaybackSource::SetPlaybackSource(const Windows::Media::Playback::IMediaPlaybackSource & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPlaybackSource(get(source))); + check_hresult(WINRT_SHIM(IMediaEnginePlaybackSource)->abi_SetPlaybackSource(get_abi(source))); } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemOpenedEventArgs::Item() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemOpenedEventArgs)->get_Item(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackItemFailedEventArgs::Item() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemFailedEventArgs)->get_Item(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItemError impl_IMediaPlaybackItemFailedEventArgs::Error() const { Windows::Media::Playback::MediaPlaybackItemError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Error(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackItemFailedEventArgs)->get_Error(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_ICurrentMediaPlaybackItemChangedEventArgs::NewItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NewItem(put(value))); + check_hresult(WINRT_SHIM(ICurrentMediaPlaybackItemChangedEventArgs)->get_NewItem(put_abi(value))); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_ICurrentMediaPlaybackItemChangedEventArgs::OldItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OldItem(put(value))); + check_hresult(WINRT_SHIM(ICurrentMediaPlaybackItemChangedEventArgs)->get_OldItem(put_abi(value))); return value; } template event_token impl_IMediaPlaybackList::ItemFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->add_ItemFailed(get_abi(handler), &token)); return token; } @@ -6549,13 +6872,13 @@ template event_revoker impl_IMediaPlaybackList< template void impl_IMediaPlaybackList::ItemFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemFailed(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->remove_ItemFailed(token)); } template event_token impl_IMediaPlaybackList::CurrentItemChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CurrentItemChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->add_CurrentItemChanged(get_abi(handler), &token)); return token; } @@ -6566,13 +6889,13 @@ template event_revoker impl_IMediaPlaybackList< template void impl_IMediaPlaybackList::CurrentItemChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CurrentItemChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->remove_CurrentItemChanged(token)); } template event_token impl_IMediaPlaybackList::ItemOpened(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemOpened(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->add_ItemOpened(get_abi(handler), &token)); return token; } @@ -6583,115 +6906,115 @@ template event_revoker impl_IMediaPlaybackList< template void impl_IMediaPlaybackList::ItemOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemOpened(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->remove_ItemOpened(token)); } template Windows::Foundation::Collections::IObservableVector impl_IMediaPlaybackList::Items() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->get_Items(put_abi(value))); return value; } template bool impl_IMediaPlaybackList::AutoRepeatEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoRepeatEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->get_AutoRepeatEnabled(&value)); return value; } template void impl_IMediaPlaybackList::AutoRepeatEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoRepeatEnabled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->put_AutoRepeatEnabled(value)); } template bool impl_IMediaPlaybackList::ShuffleEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShuffleEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->get_ShuffleEnabled(&value)); return value; } template void impl_IMediaPlaybackList::ShuffleEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShuffleEnabled(value)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->put_ShuffleEnabled(value)); } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackList::CurrentItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentItem(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->get_CurrentItem(put_abi(value))); return value; } template uint32_t impl_IMediaPlaybackList::CurrentItemIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentItemIndex(&value)); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->get_CurrentItemIndex(&value)); return value; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackList::MoveNext() const { Windows::Media::Playback::MediaPlaybackItem item { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_MoveNext(put(item))); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->abi_MoveNext(put_abi(item))); return item; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackList::MovePrevious() const { Windows::Media::Playback::MediaPlaybackItem item { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_MovePrevious(put(item))); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->abi_MovePrevious(put_abi(item))); return item; } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackList::MoveTo(uint32_t itemIndex) const { Windows::Media::Playback::MediaPlaybackItem item { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_MoveTo(itemIndex, put(item))); + check_hresult(WINRT_SHIM(IMediaPlaybackList)->abi_MoveTo(itemIndex, put_abi(item))); return item; } template Windows::Foundation::IReference impl_IMediaPlaybackList2::MaxPrefetchTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxPrefetchTime(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->get_MaxPrefetchTime(put_abi(value))); return value; } -template void impl_IMediaPlaybackList2::MaxPrefetchTime(const Windows::Foundation::IReference & value) const +template void impl_IMediaPlaybackList2::MaxPrefetchTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPrefetchTime(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->put_MaxPrefetchTime(get_abi(value))); } template Windows::Media::Playback::MediaPlaybackItem impl_IMediaPlaybackList2::StartingItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StartingItem(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->get_StartingItem(put_abi(value))); return value; } template void impl_IMediaPlaybackList2::StartingItem(const Windows::Media::Playback::MediaPlaybackItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartingItem(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->put_StartingItem(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IMediaPlaybackList2::ShuffledItems() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ShuffledItems(put(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->get_ShuffledItems(put_abi(value))); return value; } -template void impl_IMediaPlaybackList2::SetShuffledItems(const Windows::Foundation::Collections::IIterable & value) const +template void impl_IMediaPlaybackList2::SetShuffledItems(iterable value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetShuffledItems(get(value))); + check_hresult(WINRT_SHIM(IMediaPlaybackList2)->abi_SetShuffledItems(get_abi(value))); } template event_token impl_IMediaPlaybackTimedMetadataTrackList::PresentationModeChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PresentationModeChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IMediaPlaybackTimedMetadataTrackList)->add_PresentationModeChanged(get_abi(handler), &token)); return token; } @@ -6702,39 +7025,39 @@ template event_revoker impl_I template void impl_IMediaPlaybackTimedMetadataTrackList::PresentationModeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PresentationModeChanged(token)); + check_hresult(WINRT_SHIM(IMediaPlaybackTimedMetadataTrackList)->remove_PresentationModeChanged(token)); } template Windows::Media::Playback::TimedMetadataTrackPresentationMode impl_IMediaPlaybackTimedMetadataTrackList::GetPresentationMode(uint32_t index) const { Windows::Media::Playback::TimedMetadataTrackPresentationMode value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPresentationMode(index, &value)); + check_hresult(WINRT_SHIM(IMediaPlaybackTimedMetadataTrackList)->abi_GetPresentationMode(index, &value)); return value; } template void impl_IMediaPlaybackTimedMetadataTrackList::SetPresentationMode(uint32_t index, Windows::Media::Playback::TimedMetadataTrackPresentationMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPresentationMode(index, value)); + check_hresult(WINRT_SHIM(IMediaPlaybackTimedMetadataTrackList)->abi_SetPresentationMode(index, value)); } template Windows::Media::Core::TimedMetadataTrack impl_ITimedMetadataPresentationModeChangedEventArgs::Track() const { Windows::Media::Core::TimedMetadataTrack value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Track(put(value))); + check_hresult(WINRT_SHIM(ITimedMetadataPresentationModeChangedEventArgs)->get_Track(put_abi(value))); return value; } template Windows::Media::Playback::TimedMetadataTrackPresentationMode impl_ITimedMetadataPresentationModeChangedEventArgs::OldPresentationMode() const { Windows::Media::Playback::TimedMetadataTrackPresentationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_OldPresentationMode(&value)); + check_hresult(WINRT_SHIM(ITimedMetadataPresentationModeChangedEventArgs)->get_OldPresentationMode(&value)); return value; } template Windows::Media::Playback::TimedMetadataTrackPresentationMode impl_ITimedMetadataPresentationModeChangedEventArgs::NewPresentationMode() const { Windows::Media::Playback::TimedMetadataTrackPresentationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_NewPresentationMode(&value)); + check_hresult(WINRT_SHIM(ITimedMetadataPresentationModeChangedEventArgs)->get_NewPresentationMode(&value)); return value; } @@ -6832,10 +7155,849 @@ inline PlaybackMediaMarker::PlaybackMediaMarker(const Windows::Foundation::TimeS PlaybackMediaMarker(get_activation_factory().CreateFromTime(value)) {} -inline PlaybackMediaMarker::PlaybackMediaMarker(const Windows::Foundation::TimeSpan & value, hstring_ref mediaMarketType, hstring_ref text) : +inline PlaybackMediaMarker::PlaybackMediaMarker(const Windows::Foundation::TimeSpan & value, hstring_view mediaMarketType, hstring_view text) : PlaybackMediaMarker(get_activation_factory().Create(value, mediaMarketType, text)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IBackgroundMediaPlayerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::ICurrentMediaPlaybackItemChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreak & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakEndedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakSchedule & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakSeekedOverEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakSkippedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaBreakStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaEnginePlaybackSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaItemDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerCommandBehavior & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerFastForwardReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerNextReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerPauseReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerPlayReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerPositionReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerPreviousReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerRateReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerRewindReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackCommandManagerShuffleReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItem2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemOpenedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackItemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackList2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlaybackTimedMetadataTrackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayer3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayer4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerEffects & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerEffects2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerRateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IMediaPlayerSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IPlaybackMediaMarker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IPlaybackMediaMarkerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IPlaybackMediaMarkerReachedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::IPlaybackMediaMarkerSequence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::ITimedMetadataPresentationModeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::CurrentMediaPlaybackItemChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreak & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakEndedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakSchedule & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakSeekedOverEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakSkippedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaBreakStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaItemDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackAudioTrackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerFastForwardReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerNextReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerPauseReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerPlayReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerPositionReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerPreviousReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerRateReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerRewindReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackCommandManagerShuffleReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackItemError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackItemFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackItemOpenedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackTimedMetadataTrackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlaybackVideoTrackList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlayer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlayerDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlayerFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlayerRateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::MediaPlayerSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::PlaybackMediaMarker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::PlaybackMediaMarkerReachedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::PlaybackMediaMarkerSequence & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playback::TimedMetadataPresentationModeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Playlists.h b/10.0.14393.0/winrt/Windows.Media.Playlists.h index faff0a37e..37ad6867e 100644 --- a/10.0.14393.0/winrt/Windows.Media.Playlists.h +++ b/10.0.14393.0/winrt/Windows.Media.Playlists.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Files(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Files(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Files()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Files()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : produce_base saveLocation, abi_arg_in desiredName, Windows::Storage::NameCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SaveAsAsync(impl::abi_arg_in saveLocation, impl::abi_arg_in desiredName, Windows::Storage::NameCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SaveAsAsync(*reinterpret_cast(&saveLocation), *reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveAsAsync(*reinterpret_cast(&saveLocation), *reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce : produce_base saveLocation, abi_arg_in desiredName, Windows::Storage::NameCollisionOption option, Windows::Media::Playlists::PlaylistFormat playlistFormat, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SaveAsWithFormatAsync(impl::abi_arg_in saveLocation, impl::abi_arg_in desiredName, Windows::Storage::NameCollisionOption option, Windows::Media::Playlists::PlaylistFormat playlistFormat, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SaveAsAsync(*reinterpret_cast(&saveLocation), *reinterpret_cast(&desiredName), option, playlistFormat)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SaveAsAsync(*reinterpret_cast(&saveLocation), *reinterpret_cast(&desiredName), option, playlistFormat)); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LoadAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LoadAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LoadAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -98,35 +106,35 @@ namespace Windows::Media::Playlists { template Windows::Foundation::Collections::IVector impl_IPlaylist::Files() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Files(put(value))); + check_hresult(WINRT_SHIM(IPlaylist)->get_Files(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IPlaylist::SaveAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(operation))); + check_hresult(WINRT_SHIM(IPlaylist)->abi_SaveAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPlaylist::SaveAsAsync(const Windows::Storage::IStorageFolder & saveLocation, hstring_ref desiredName, Windows::Storage::NameCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IPlaylist::SaveAsAsync(const Windows::Storage::IStorageFolder & saveLocation, hstring_view desiredName, Windows::Storage::NameCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsAsync(get(saveLocation), get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IPlaylist)->abi_SaveAsAsync(get_abi(saveLocation), get_abi(desiredName), option, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPlaylist::SaveAsAsync(const Windows::Storage::IStorageFolder & saveLocation, hstring_ref desiredName, Windows::Storage::NameCollisionOption option, Windows::Media::Playlists::PlaylistFormat playlistFormat) const +template Windows::Foundation::IAsyncOperation impl_IPlaylist::SaveAsAsync(const Windows::Storage::IStorageFolder & saveLocation, hstring_view desiredName, Windows::Storage::NameCollisionOption option, Windows::Media::Playlists::PlaylistFormat playlistFormat) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsWithFormatAsync(get(saveLocation), get(desiredName), option, playlistFormat, put(operation))); + check_hresult(WINRT_SHIM(IPlaylist)->abi_SaveAsWithFormatAsync(get_abi(saveLocation), get_abi(desiredName), option, playlistFormat, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IPlaylistStatics::LoadAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LoadAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IPlaylistStatics)->abi_LoadAsync(get_abi(file), put_abi(operation))); return operation; } @@ -142,3 +150,32 @@ inline Windows::Foundation::IAsyncOperation } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playlists::IPlaylist & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playlists::IPlaylistStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Playlists::Playlist & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Protection.PlayReady.h b/10.0.14393.0/winrt/Windows.Media.Protection.PlayReady.h index ca42af6c1..81e587794 100644 --- a/10.0.14393.0/winrt/Windows.Media.Protection.PlayReady.h +++ b/10.0.14393.0/winrt/Windows.Media.Protection.PlayReady.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.Protection.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_RegistrationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RegistrationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RegistrationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RegistrationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -36,6 +40,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().RegistrationCompleted(token); return S_OK; } @@ -45,11 +50,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_ProximityDetectionCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProximityDetectionCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProximityDetectionCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProximityDetectionCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -62,6 +68,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ProximityDetectionCompleted(token); return S_OK; } @@ -71,11 +78,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_LicenseFetchCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LicenseFetchCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LicenseFetchCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LicenseFetchCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -88,6 +96,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().LicenseFetchCompleted(token); return S_OK; } @@ -97,11 +106,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_ReRegistrationNeeded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ReRegistrationNeeded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ReRegistrationNeeded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ReRegistrationNeeded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -114,6 +124,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ReRegistrationNeeded(token); return S_OK; } @@ -123,11 +134,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_ClosedCaptionDataReceived(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ClosedCaptionDataReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ClosedCaptionDataReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ClosedCaptionDataReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -140,6 +152,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ClosedCaptionDataReceived(token); return S_OK; } @@ -149,11 +162,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_StartAsync(abi_arg_in contentUrl, uint32_t startAsyncOptions, abi_arg_in registrationCustomData, abi_arg_in licenseFetchDescriptor, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_in contentUrl, uint32_t startAsyncOptions, impl::abi_arg_in registrationCustomData, impl::abi_arg_in licenseFetchDescriptor, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().StartAsync(*reinterpret_cast(&contentUrl), startAsyncOptions, *reinterpret_cast(®istrationCustomData), *reinterpret_cast(&licenseFetchDescriptor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().StartAsync(*reinterpret_cast(&contentUrl), startAsyncOptions, *reinterpret_cast(®istrationCustomData), *reinterpret_cast(&licenseFetchDescriptor))); return S_OK; } catch (...) @@ -163,11 +177,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_LicenseFetchAsync(abi_arg_in licenseFetchDescriptor, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_LicenseFetchAsync(impl::abi_arg_in licenseFetchDescriptor, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().LicenseFetchAsync(*reinterpret_cast(&licenseFetchDescriptor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LicenseFetchAsync(*reinterpret_cast(&licenseFetchDescriptor))); return S_OK; } catch (...) @@ -177,11 +192,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_ReRegistrationAsync(abi_arg_in registrationCustomData, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReRegistrationAsync(impl::abi_arg_in registrationCustomData, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReRegistrationAsync(*reinterpret_cast(®istrationCustomData))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReRegistrationAsync(*reinterpret_cast(®istrationCustomData))); return S_OK; } catch (...) @@ -195,6 +211,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Close(); return S_OK; } @@ -208,11 +225,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in downloadEngine, abi_arg_in streamParser, abi_arg_in pMessenger, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in downloadEngine, impl::abi_arg_in streamParser, impl::abi_arg_in pMessenger, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&downloadEngine), *reinterpret_cast(&streamParser), *reinterpret_cast(&pMessenger))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&downloadEngine), *reinterpret_cast(&streamParser), *reinterpret_cast(&pMessenger))); return S_OK; } catch (...) @@ -230,7 +248,8 @@ struct produceshim().ClosedCaptionDataFormat()); + typename D::abi_guard guard(this->shim()); + *ccForamt = detach_abi(this->shim().ClosedCaptionDataFormat()); return S_OK; } catch (...) @@ -243,7 +262,8 @@ struct produceshim().PresentationTimestamp()); + typename D::abi_guard guard(this->shim()); + *presentationTimestamp = detach_abi(this->shim().PresentationTimestamp()); return S_OK; } catch (...) @@ -252,11 +272,12 @@ struct produce * ccDataBytes) noexcept override + HRESULT __stdcall get_ClosedCaptionData(uint32_t * __ccDataBytesSize, impl::abi_arg_out * ccDataBytes) noexcept override { try { - std::tie(*__ccDataBytesSize, *ccDataBytes) = detach(this->shim().ClosedCaptionData()); + typename D::abi_guard guard(this->shim()); + std::tie(*__ccDataBytesSize, *ccDataBytes) = detach_abi(this->shim().ClosedCaptionData()); return S_OK; } catch (...) @@ -271,11 +292,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CustomDataTypeID(uint32_t * __customDataTypeIDBytesSize, abi_arg_out * customDataTypeIDBytes) noexcept override + HRESULT __stdcall get_CustomDataTypeID(uint32_t * __customDataTypeIDBytesSize, impl::abi_arg_out * customDataTypeIDBytes) noexcept override { try { - std::tie(*__customDataTypeIDBytesSize, *customDataTypeIDBytes) = detach(this->shim().CustomDataTypeID()); + typename D::abi_guard guard(this->shim()); + std::tie(*__customDataTypeIDBytesSize, *customDataTypeIDBytes) = detach_abi(this->shim().CustomDataTypeID()); return S_OK; } catch (...) @@ -286,11 +308,12 @@ struct produce : produc } } - HRESULT __stdcall get_CustomData(uint32_t * __customDataBytesSize, abi_arg_out * customDataBytes) noexcept override + HRESULT __stdcall get_CustomData(uint32_t * __customDataBytesSize, impl::abi_arg_out * customDataBytes) noexcept override { try { - std::tie(*__customDataBytesSize, *customDataBytes) = detach(this->shim().CustomData()); + typename D::abi_guard guard(this->shim()); + std::tie(*__customDataBytesSize, *customDataBytes) = detach_abi(this->shim().CustomData()); return S_OK; } catch (...) @@ -305,11 +328,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(uint32_t __customDataTypeIDBytesSize, abi_arg_in * customDataTypeIDBytes, uint32_t __customDataBytesSize, abi_arg_in * customDataBytes, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(uint32_t __customDataTypeIDBytesSize, impl::abi_arg_in * customDataTypeIDBytes, uint32_t __customDataBytesSize, impl::abi_arg_in * customDataBytes, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(array_ref(customDataTypeIDBytes, customDataTypeIDBytes + __customDataTypeIDBytesSize), array_ref(customDataBytes, customDataBytes + __customDataBytesSize))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(array_view(customDataTypeIDBytes, customDataTypeIDBytes + __customDataTypeIDBytesSize), array_view(customDataBytes, customDataBytes + __customDataBytesSize))); return S_OK; } catch (...) @@ -323,11 +347,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Open(abi_arg_in uri, uint32_t __sessionIDBytesSize, abi_arg_in * sessionIDBytes) noexcept override + HRESULT __stdcall abi_Open(impl::abi_arg_in uri, uint32_t __sessionIDBytesSize, impl::abi_arg_in * sessionIDBytes) noexcept override { try { - this->shim().Open(*reinterpret_cast(&uri), array_ref(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Open(*reinterpret_cast(&uri), array_view(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize)); return S_OK; } catch (...) @@ -340,6 +365,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(); return S_OK; } @@ -353,6 +379,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Resume(); return S_OK; } @@ -366,6 +393,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Close(); return S_OK; } @@ -375,10 +403,11 @@ struct produce : pr } } - HRESULT __stdcall abi_Seek(abi_arg_in startPosition) noexcept override + HRESULT __stdcall abi_Seek(impl::abi_arg_in startPosition) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Seek(*reinterpret_cast(&startPosition)); return S_OK; } @@ -392,7 +421,8 @@ struct produce : pr { try { - *canSeek = detach(this->shim().CanSeek()); + typename D::abi_guard guard(this->shim()); + *canSeek = detach_abi(this->shim().CanSeek()); return S_OK; } catch (...) @@ -405,7 +435,8 @@ struct produce : pr { try { - *bufferFullMinThreshold = detach(this->shim().BufferFullMinThresholdInSamples()); + typename D::abi_guard guard(this->shim()); + *bufferFullMinThreshold = detach_abi(this->shim().BufferFullMinThresholdInSamples()); return S_OK; } catch (...) @@ -418,7 +449,8 @@ struct produce : pr { try { - *bufferFullMaxThreshold = detach(this->shim().BufferFullMaxThresholdInSamples()); + typename D::abi_guard guard(this->shim()); + *bufferFullMaxThreshold = detach_abi(this->shim().BufferFullMaxThresholdInSamples()); return S_OK; } catch (...) @@ -427,11 +459,12 @@ struct produce : pr } } - HRESULT __stdcall get_Notifier(abi_arg_out instance) noexcept override + HRESULT __stdcall get_Notifier(impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Notifier()); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Notifier()); return S_OK; } catch (...) @@ -449,6 +482,7 @@ struct produceshim()); this->shim().OnStreamOpened(); return S_OK; } @@ -458,11 +492,12 @@ struct produce * dataBytes) noexcept override + HRESULT __stdcall abi_OnPlayReadyObjectReceived(uint32_t __dataBytesSize, impl::abi_arg_in * dataBytes) noexcept override { try { - this->shim().OnPlayReadyObjectReceived(array_ref(dataBytes, dataBytes + __dataBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().OnPlayReadyObjectReceived(array_view(dataBytes, dataBytes + __dataBytesSize)); return S_OK; } catch (...) @@ -471,10 +506,11 @@ struct produce licenseFetchDescriptor) noexcept override + HRESULT __stdcall abi_OnContentIDReceived(impl::abi_arg_in licenseFetchDescriptor) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentIDReceived(*reinterpret_cast(&licenseFetchDescriptor)); return S_OK; } @@ -484,11 +520,12 @@ struct produce * dataBytes, uint32_t bytesReceived) noexcept override + HRESULT __stdcall abi_OnDataReceived(uint32_t __dataBytesSize, impl::abi_arg_in * dataBytes, uint32_t bytesReceived) noexcept override { try { - this->shim().OnDataReceived(array_ref(dataBytes, dataBytes + __dataBytesSize), bytesReceived); + typename D::abi_guard guard(this->shim()); + this->shim().OnDataReceived(array_view(dataBytes, dataBytes + __dataBytesSize), bytesReceived); return S_OK; } catch (...) @@ -501,6 +538,7 @@ struct produceshim()); this->shim().OnEndOfStream(); return S_OK; } @@ -514,6 +552,7 @@ struct produceshim()); this->shim().OnNetworkError(); return S_OK; } @@ -527,11 +566,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResponseCustomData(abi_arg_out customData) noexcept override + HRESULT __stdcall get_ResponseCustomData(impl::abi_arg_out customData) noexcept override { try { - *customData = detach(this->shim().ResponseCustomData()); + typename D::abi_guard guard(this->shim()); + *customData = detach_abi(this->shim().ResponseCustomData()); return S_OK; } catch (...) @@ -549,7 +589,8 @@ struct produceshim().ContentIDType()); + typename D::abi_guard guard(this->shim()); + *contentIDType = detach_abi(this->shim().ContentIDType()); return S_OK; } catch (...) @@ -558,11 +599,12 @@ struct produce * contentIDBytes) noexcept override + HRESULT __stdcall get_ContentID(uint32_t * __contentIDBytesSize, impl::abi_arg_out * contentIDBytes) noexcept override { try { - std::tie(*__contentIDBytesSize, *contentIDBytes) = detach(this->shim().ContentID()); + typename D::abi_guard guard(this->shim()); + std::tie(*__contentIDBytesSize, *contentIDBytes) = detach_abi(this->shim().ContentID()); return S_OK; } catch (...) @@ -573,11 +615,12 @@ struct produce licenseFetchChallengeCustomData) noexcept override + HRESULT __stdcall get_LicenseFetchChallengeCustomData(impl::abi_arg_out licenseFetchChallengeCustomData) noexcept override { try { - *licenseFetchChallengeCustomData = detach(this->shim().LicenseFetchChallengeCustomData()); + typename D::abi_guard guard(this->shim()); + *licenseFetchChallengeCustomData = detach_abi(this->shim().LicenseFetchChallengeCustomData()); return S_OK; } catch (...) @@ -587,10 +630,11 @@ struct produce licenseFetchChallengeCustomData) noexcept override + HRESULT __stdcall put_LicenseFetchChallengeCustomData(impl::abi_arg_in licenseFetchChallengeCustomData) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LicenseFetchChallengeCustomData(*reinterpret_cast(&licenseFetchChallengeCustomData)); return S_OK; } @@ -604,11 +648,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, uint32_t __contentIDBytesSize, abi_arg_in * contentIDBytes, abi_arg_in licenseFetchChallengeCustomData, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, uint32_t __contentIDBytesSize, impl::abi_arg_in * contentIDBytes, impl::abi_arg_in licenseFetchChallengeCustomData, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(contentIDType, array_ref(contentIDBytes, contentIDBytes + __contentIDBytesSize), *reinterpret_cast(&licenseFetchChallengeCustomData))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(contentIDType, array_view(contentIDBytes, contentIDBytes + __contentIDBytesSize), *reinterpret_cast(&licenseFetchChallengeCustomData))); return S_OK; } catch (...) @@ -622,11 +667,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResponseCustomData(abi_arg_out customData) noexcept override + HRESULT __stdcall get_ResponseCustomData(impl::abi_arg_out customData) noexcept override { try { - *customData = detach(this->shim().ResponseCustomData()); + typename D::abi_guard guard(this->shim()); + *customData = detach_abi(this->shim().ResponseCustomData()); return S_OK; } catch (...) @@ -640,11 +686,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_SendRegistrationRequestAsync(uint32_t __sessionIDBytesSize, abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, abi_arg_in * challengeDataBytes, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SendRegistrationRequestAsync(uint32_t __sessionIDBytesSize, impl::abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, impl::abi_arg_in * challengeDataBytes, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SendRegistrationRequestAsync(array_ref(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_ref(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendRegistrationRequestAsync(array_view(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_view(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); return S_OK; } catch (...) @@ -654,11 +701,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SendProximityDetectionStartAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, uint32_t __transmitterChannelBytesSize, abi_arg_in * transmitterChannelBytes, uint32_t __sessionIDBytesSize, abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, abi_arg_in * challengeDataBytes, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SendProximityDetectionStartAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, uint32_t __transmitterChannelBytesSize, impl::abi_arg_in * transmitterChannelBytes, uint32_t __sessionIDBytesSize, impl::abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, impl::abi_arg_in * challengeDataBytes, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SendProximityDetectionStartAsync(pdType, array_ref(transmitterChannelBytes, transmitterChannelBytes + __transmitterChannelBytesSize), array_ref(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_ref(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendProximityDetectionStartAsync(pdType, array_view(transmitterChannelBytes, transmitterChannelBytes + __transmitterChannelBytesSize), array_view(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_view(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); return S_OK; } catch (...) @@ -668,11 +716,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SendProximityDetectionResponseAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, uint32_t __transmitterChannelBytesSize, abi_arg_in * transmitterChannelBytes, uint32_t __sessionIDBytesSize, abi_arg_in * sessionIDBytes, uint32_t __responseDataBytesSize, abi_arg_in * responseDataBytes, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SendProximityDetectionResponseAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, uint32_t __transmitterChannelBytesSize, impl::abi_arg_in * transmitterChannelBytes, uint32_t __sessionIDBytesSize, impl::abi_arg_in * sessionIDBytes, uint32_t __responseDataBytesSize, impl::abi_arg_in * responseDataBytes, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SendProximityDetectionResponseAsync(pdType, array_ref(transmitterChannelBytes, transmitterChannelBytes + __transmitterChannelBytesSize), array_ref(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_ref(responseDataBytes, responseDataBytes + __responseDataBytesSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendProximityDetectionResponseAsync(pdType, array_view(transmitterChannelBytes, transmitterChannelBytes + __transmitterChannelBytesSize), array_view(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_view(responseDataBytes, responseDataBytes + __responseDataBytesSize))); return S_OK; } catch (...) @@ -682,11 +731,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SendLicenseFetchRequestAsync(uint32_t __sessionIDBytesSize, abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, abi_arg_in * challengeDataBytes, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SendLicenseFetchRequestAsync(uint32_t __sessionIDBytesSize, impl::abi_arg_in * sessionIDBytes, uint32_t __challengeDataBytesSize, impl::abi_arg_in * challengeDataBytes, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SendLicenseFetchRequestAsync(array_ref(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_ref(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SendLicenseFetchRequestAsync(array_view(sessionIDBytes, sessionIDBytes + __sessionIDBytesSize), array_view(challengeDataBytes, challengeDataBytes + __challengeDataBytesSize))); return S_OK; } catch (...) @@ -704,7 +754,8 @@ struct produceshim().ProximityDetectionRetryCount()); + typename D::abi_guard guard(this->shim()); + *retryCount = detach_abi(this->shim().ProximityDetectionRetryCount()); return S_OK; } catch (...) @@ -717,11 +768,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResponseCustomData(abi_arg_out customData) noexcept override + HRESULT __stdcall get_ResponseCustomData(impl::abi_arg_out customData) noexcept override { try { - *customData = detach(this->shim().ResponseCustomData()); + typename D::abi_guard guard(this->shim()); + *customData = detach_abi(this->shim().ResponseCustomData()); return S_OK; } catch (...) @@ -731,11 +783,12 @@ struct produce transmitterProperties) noexcept override + HRESULT __stdcall get_TransmitterProperties(impl::abi_arg_out transmitterProperties) noexcept override { try { - *transmitterProperties = detach(this->shim().TransmitterProperties()); + typename D::abi_guard guard(this->shim()); + *transmitterProperties = detach_abi(this->shim().TransmitterProperties()); return S_OK; } catch (...) @@ -749,7 +802,8 @@ struct produceshim().TransmitterCertificateAccepted()); + typename D::abi_guard guard(this->shim()); + *acceptpt = detach_abi(this->shim().TransmitterCertificateAccepted()); return S_OK; } catch (...) @@ -762,6 +816,7 @@ struct produceshim()); this->shim().TransmitterCertificateAccepted(accept); return S_OK; } @@ -775,11 +830,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Response(uint32_t * __responseDataBytesSize, abi_arg_out * responseDataBytes) noexcept override + HRESULT __stdcall get_Response(uint32_t * __responseDataBytesSize, impl::abi_arg_out * responseDataBytes) noexcept override { try { - std::tie(*__responseDataBytesSize, *responseDataBytes) = detach(this->shim().Response()); + typename D::abi_guard guard(this->shim()); + std::tie(*__responseDataBytesSize, *responseDataBytes) = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -794,11 +850,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_MediaStreamSource(abi_arg_out mediaStreamSource) noexcept override + HRESULT __stdcall get_MediaStreamSource(impl::abi_arg_out mediaStreamSource) noexcept override { try { - *mediaStreamSource = detach(this->shim().MediaStreamSource()); + typename D::abi_guard guard(this->shim()); + *mediaStreamSource = detach_abi(this->shim().MediaStreamSource()); return S_OK; } catch (...) @@ -812,11 +869,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetFileURLs(abi_arg_in file, abi_arg_out> fileURLs) noexcept override + HRESULT __stdcall abi_GetFileURLs(impl::abi_arg_in file, impl::abi_arg_out> fileURLs) noexcept override { try { - *fileURLs = detach(this->shim().GetFileURLs(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *fileURLs = detach_abi(this->shim().GetFileURLs(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -830,11 +888,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ParseData(uint32_t __dataBytesSize, abi_arg_in * dataBytes) noexcept override + HRESULT __stdcall abi_ParseData(uint32_t __dataBytesSize, impl::abi_arg_in * dataBytes) noexcept override { try { - this->shim().ParseData(array_ref(dataBytes, dataBytes + __dataBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().ParseData(array_view(dataBytes, dataBytes + __dataBytesSize)); return S_OK; } catch (...) @@ -843,11 +902,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetStreamInformation(abi_arg_in descriptor, Windows::Media::Protection::PlayReady::NDMediaStreamType * streamType, uint32_t * streamID) noexcept override + HRESULT __stdcall abi_GetStreamInformation(impl::abi_arg_in descriptor, Windows::Media::Protection::PlayReady::NDMediaStreamType * streamType, uint32_t * streamID) noexcept override { try { - *streamID = detach(this->shim().GetStreamInformation(*reinterpret_cast(&descriptor), *streamType)); + typename D::abi_guard guard(this->shim()); + *streamID = detach_abi(this->shim().GetStreamInformation(*reinterpret_cast(&descriptor), *streamType)); return S_OK; } catch (...) @@ -860,6 +920,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().BeginOfStream(); return S_OK; } @@ -873,6 +934,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().EndOfStream(); return S_OK; } @@ -882,11 +944,12 @@ struct produce : prod } } - HRESULT __stdcall get_Notifier(abi_arg_out instance) noexcept override + HRESULT __stdcall get_Notifier(impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Notifier()); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Notifier()); return S_OK; } catch (...) @@ -900,10 +963,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_OnContentIDReceived(abi_arg_in licenseFetchDescriptor) noexcept override + HRESULT __stdcall abi_OnContentIDReceived(impl::abi_arg_in licenseFetchDescriptor) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentIDReceived(*reinterpret_cast(&licenseFetchDescriptor)); return S_OK; } @@ -913,10 +977,11 @@ struct produce> audioStreamDescriptors, abi_arg_in> videoStreamDescriptors) noexcept override + HRESULT __stdcall abi_OnMediaStreamDescriptorCreated(impl::abi_arg_in> audioStreamDescriptors, impl::abi_arg_in> videoStreamDescriptors) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnMediaStreamDescriptorCreated(*reinterpret_cast *>(&audioStreamDescriptors), *reinterpret_cast *>(&videoStreamDescriptors)); return S_OK; } @@ -926,11 +991,12 @@ struct produce streamSample, int64_t pts, Windows::Media::Protection::PlayReady::NDClosedCaptionFormat ccFormat, uint32_t __ccDataBytesSize, abi_arg_in * ccDataBytes) noexcept override + HRESULT __stdcall abi_OnSampleParsed(uint32_t streamID, Windows::Media::Protection::PlayReady::NDMediaStreamType streamType, impl::abi_arg_in streamSample, int64_t pts, Windows::Media::Protection::PlayReady::NDClosedCaptionFormat ccFormat, uint32_t __ccDataBytesSize, impl::abi_arg_in * ccDataBytes) noexcept override { try { - this->shim().OnSampleParsed(streamID, streamType, *reinterpret_cast(&streamSample), pts, ccFormat, array_ref(ccDataBytes, ccDataBytes + __ccDataBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().OnSampleParsed(streamID, streamType, *reinterpret_cast(&streamSample), pts, ccFormat, array_view(ccDataBytes, ccDataBytes + __ccDataBytesSize)); return S_OK; } catch (...) @@ -939,11 +1005,12 @@ struct produce descriptor, GUID keyID, uint32_t __proBytesSize, abi_arg_in * proBytes) noexcept override + HRESULT __stdcall abi_OnBeginSetupDecryptor(impl::abi_arg_in descriptor, GUID keyID, uint32_t __proBytesSize, impl::abi_arg_in * proBytes) noexcept override { try { - this->shim().OnBeginSetupDecryptor(*reinterpret_cast(&descriptor), keyID, array_ref(proBytes, proBytes + __proBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().OnBeginSetupDecryptor(*reinterpret_cast(&descriptor), keyID, array_view(proBytes, proBytes + __proBytesSize)); return S_OK; } catch (...) @@ -956,11 +1023,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in remoteHostName, uint32_t remoteHostPort, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in remoteHostName, uint32_t remoteHostPort, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&remoteHostName), remoteHostPort)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&remoteHostName), remoteHostPort)); return S_OK; } catch (...) @@ -978,7 +1046,8 @@ struct produceshim().CertificateType()); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().CertificateType()); return S_OK; } catch (...) @@ -991,7 +1060,8 @@ struct produceshim().PlatformIdentifier()); + typename D::abi_guard guard(this->shim()); + *identifier = detach_abi(this->shim().PlatformIdentifier()); return S_OK; } catch (...) @@ -1000,11 +1070,12 @@ struct produce * featureSets) noexcept override + HRESULT __stdcall get_SupportedFeatures(uint32_t * __featureSetsSize, impl::abi_arg_out * featureSets) noexcept override { try { - std::tie(*__featureSetsSize, *featureSets) = detach(this->shim().SupportedFeatures()); + typename D::abi_guard guard(this->shim()); + std::tie(*__featureSetsSize, *featureSets) = detach_abi(this->shim().SupportedFeatures()); return S_OK; } catch (...) @@ -1019,7 +1090,8 @@ struct produceshim().SecurityLevel()); + typename D::abi_guard guard(this->shim()); + *level = detach_abi(this->shim().SecurityLevel()); return S_OK; } catch (...) @@ -1032,7 +1104,8 @@ struct produceshim().SecurityVersion()); + typename D::abi_guard guard(this->shim()); + *securityVersion = detach_abi(this->shim().SecurityVersion()); return S_OK; } catch (...) @@ -1041,11 +1114,12 @@ struct produce expirationDate) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out expirationDate) noexcept override { try { - *expirationDate = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *expirationDate = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -1054,11 +1128,12 @@ struct produce * clientIDBytes) noexcept override + HRESULT __stdcall get_ClientID(uint32_t * __clientIDBytesSize, impl::abi_arg_out * clientIDBytes) noexcept override { try { - std::tie(*__clientIDBytesSize, *clientIDBytes) = detach(this->shim().ClientID()); + typename D::abi_guard guard(this->shim()); + std::tie(*__clientIDBytesSize, *clientIDBytes) = detach_abi(this->shim().ClientID()); return S_OK; } catch (...) @@ -1069,11 +1144,12 @@ struct produce * modelDigestBytes) noexcept override + HRESULT __stdcall get_ModelDigest(uint32_t * __modelDigestBytesSize, impl::abi_arg_out * modelDigestBytes) noexcept override { try { - std::tie(*__modelDigestBytesSize, *modelDigestBytes) = detach(this->shim().ModelDigest()); + typename D::abi_guard guard(this->shim()); + std::tie(*__modelDigestBytesSize, *modelDigestBytes) = detach_abi(this->shim().ModelDigest()); return S_OK; } catch (...) @@ -1084,11 +1160,12 @@ struct produce modelManufacturerName) noexcept override + HRESULT __stdcall get_ModelManufacturerName(impl::abi_arg_out modelManufacturerName) noexcept override { try { - *modelManufacturerName = detach(this->shim().ModelManufacturerName()); + typename D::abi_guard guard(this->shim()); + *modelManufacturerName = detach_abi(this->shim().ModelManufacturerName()); return S_OK; } catch (...) @@ -1098,11 +1175,12 @@ struct produce modelName) noexcept override + HRESULT __stdcall get_ModelName(impl::abi_arg_out modelName) noexcept override { try { - *modelName = detach(this->shim().ModelName()); + typename D::abi_guard guard(this->shim()); + *modelName = detach_abi(this->shim().ModelName()); return S_OK; } catch (...) @@ -1112,11 +1190,12 @@ struct produce modelNumber) noexcept override + HRESULT __stdcall get_ModelNumber(impl::abi_arg_out modelNumber) noexcept override { try { - *modelNumber = detach(this->shim().ModelNumber()); + typename D::abi_guard guard(this->shim()); + *modelNumber = detach_abi(this->shim().ModelNumber()); return S_OK; } catch (...) @@ -1134,7 +1213,8 @@ struct produceshim().KeyId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyId()); return S_OK; } catch (...) @@ -1143,11 +1223,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyIdString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyIdString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyIdString()); return S_OK; } catch (...) @@ -1157,11 +1238,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LicenseAcquisitionUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LicenseAcquisitionUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseAcquisitionUrl()); return S_OK; } catch (...) @@ -1171,11 +1253,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LicenseAcquisitionUserInterfaceUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LicenseAcquisitionUserInterfaceUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseAcquisitionUserInterfaceUrl()); return S_OK; } catch (...) @@ -1189,7 +1272,8 @@ struct produceshim().DomainServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainServiceId()); return S_OK; } catch (...) @@ -1202,7 +1286,8 @@ struct produceshim().EncryptionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncryptionType()); return S_OK; } catch (...) @@ -1211,11 +1296,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CustomAttributes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomAttributes()); return S_OK; } catch (...) @@ -1229,7 +1315,8 @@ struct produceshim().DecryptorSetup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecryptorSetup()); return S_OK; } catch (...) @@ -1238,11 +1325,12 @@ struct produce * headerBytes) noexcept override + HRESULT __stdcall abi_GetSerializedHeader(uint32_t * __headerBytesSize, impl::abi_arg_out * headerBytes) noexcept override { try { - std::tie(*__headerBytesSize, *headerBytes) = detach(this->shim().GetSerializedHeader()); + typename D::abi_guard guard(this->shim()); + std::tie(*__headerBytesSize, *headerBytes) = detach_abi(this->shim().GetSerializedHeader()); return S_OK; } catch (...) @@ -1253,11 +1341,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderWithEmbeddedUpdates(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderWithEmbeddedUpdates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderWithEmbeddedUpdates()); return S_OK; } catch (...) @@ -1271,11 +1360,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_KeyIds(uint32_t * __contentKeyIdsSize, abi_arg_out * contentKeyIds) noexcept override + HRESULT __stdcall get_KeyIds(uint32_t * __contentKeyIdsSize, impl::abi_arg_out * contentKeyIds) noexcept override { try { - std::tie(*__contentKeyIdsSize, *contentKeyIds) = detach(this->shim().KeyIds()); + typename D::abi_guard guard(this->shim()); + std::tie(*__contentKeyIdsSize, *contentKeyIds) = detach_abi(this->shim().KeyIds()); return S_OK; } catch (...) @@ -1286,11 +1376,12 @@ struct produce * contentKeyIdStrings) noexcept override + HRESULT __stdcall get_KeyIdStrings(uint32_t * __contentKeyIdStringsSize, impl::abi_arg_out * contentKeyIdStrings) noexcept override { try { - std::tie(*__contentKeyIdStringsSize, *contentKeyIdStrings) = detach(this->shim().KeyIdStrings()); + typename D::abi_guard guard(this->shim()); + std::tie(*__contentKeyIdStringsSize, *contentKeyIdStrings) = detach_abi(this->shim().KeyIdStrings()); return S_OK; } catch (...) @@ -1305,11 +1396,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceFromWindowsMediaDrmHeader(uint32_t __headerBytesSize, abi_arg_in * headerBytes, abi_arg_in licenseAcquisitionUrl, abi_arg_in licenseAcquisitionUserInterfaceUrl, abi_arg_in customAttributes, GUID domainServiceId, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceFromWindowsMediaDrmHeader(uint32_t __headerBytesSize, impl::abi_arg_in * headerBytes, impl::abi_arg_in licenseAcquisitionUrl, impl::abi_arg_in licenseAcquisitionUserInterfaceUrl, impl::abi_arg_in customAttributes, GUID domainServiceId, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceFromWindowsMediaDrmHeader(array_ref(headerBytes, headerBytes + __headerBytesSize), *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceFromWindowsMediaDrmHeader(array_view(headerBytes, headerBytes + __headerBytesSize), *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); return S_OK; } catch (...) @@ -1319,11 +1411,12 @@ struct produce contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, abi_arg_in licenseAcquisitionUrl, abi_arg_in licenseAcquisitionUserInterfaceUrl, abi_arg_in customAttributes, GUID domainServiceId, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceFromComponents(GUID contentKeyId, impl::abi_arg_in contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, impl::abi_arg_in licenseAcquisitionUrl, impl::abi_arg_in licenseAcquisitionUserInterfaceUrl, impl::abi_arg_in customAttributes, GUID domainServiceId, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceFromComponents(contentKeyId, *reinterpret_cast(&contentKeyIdString), contentEncryptionAlgorithm, *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceFromComponents(contentKeyId, *reinterpret_cast(&contentKeyIdString), contentEncryptionAlgorithm, *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); return S_OK; } catch (...) @@ -1333,11 +1426,12 @@ struct produce * headerBytes, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceFromPlayReadyHeader(uint32_t __headerBytesSize, impl::abi_arg_in * headerBytes, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceFromPlayReadyHeader(array_ref(headerBytes, headerBytes + __headerBytesSize))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceFromPlayReadyHeader(array_view(headerBytes, headerBytes + __headerBytesSize))); return S_OK; } catch (...) @@ -1351,11 +1445,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceFromComponents2(uint32_t dwFlags, uint32_t __contentKeyIdsSize, abi_arg_in * contentKeyIds, uint32_t __contentKeyIdStringsSize, abi_arg_in * contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, abi_arg_in licenseAcquisitionUrl, abi_arg_in licenseAcquisitionUserInterfaceUrl, abi_arg_in customAttributes, GUID domainServiceId, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceFromComponents2(uint32_t dwFlags, uint32_t __contentKeyIdsSize, impl::abi_arg_in * contentKeyIds, uint32_t __contentKeyIdStringsSize, impl::abi_arg_in * contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, impl::abi_arg_in licenseAcquisitionUrl, impl::abi_arg_in licenseAcquisitionUserInterfaceUrl, impl::abi_arg_in customAttributes, GUID domainServiceId, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceFromComponents2(dwFlags, array_ref(contentKeyIds, contentKeyIds + __contentKeyIdsSize), *reinterpret_cast(&contentKeyIdStrings), contentEncryptionAlgorithm, *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceFromComponents2(dwFlags, array_view(contentKeyIds, contentKeyIds + __contentKeyIdsSize), *reinterpret_cast(&contentKeyIdStrings), contentEncryptionAlgorithm, *reinterpret_cast(&licenseAcquisitionUrl), *reinterpret_cast(&licenseAcquisitionUserInterfaceUrl), *reinterpret_cast(&customAttributes), domainServiceId)); return S_OK; } catch (...) @@ -1370,11 +1465,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ServiceRequest(abi_arg_in contentHeader, abi_arg_out serviceRequest) noexcept override + HRESULT __stdcall abi_ServiceRequest(impl::abi_arg_in contentHeader, impl::abi_arg_out serviceRequest) noexcept override { try { - *serviceRequest = detach(this->shim().ServiceRequest(*reinterpret_cast(&contentHeader))); + typename D::abi_guard guard(this->shim()); + *serviceRequest = detach_abi(this->shim().ServiceRequest(*reinterpret_cast(&contentHeader))); return S_OK; } catch (...) @@ -1392,7 +1488,8 @@ struct produce : pro { try { - *value = detach(this->shim().AccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountId()); return S_OK; } catch (...) @@ -1405,7 +1502,8 @@ struct produce : pro { try { - *value = detach(this->shim().ServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceId()); return S_OK; } catch (...) @@ -1418,7 +1516,8 @@ struct produce : pro { try { - *value = detach(this->shim().Revision()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Revision()); return S_OK; } catch (...) @@ -1427,11 +1526,12 @@ struct produce : pro } } - HRESULT __stdcall get_FriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -1441,11 +1541,12 @@ struct produce : pro } } - HRESULT __stdcall get_DomainJoinUrl(abi_arg_out value) noexcept override + HRESULT __stdcall get_DomainJoinUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DomainJoinUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainJoinUrl()); return S_OK; } catch (...) @@ -1459,11 +1560,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(GUID domainAccountId, abi_arg_out> domainIterable) noexcept override + HRESULT __stdcall abi_CreateInstance(GUID domainAccountId, impl::abi_arg_out> domainIterable) noexcept override { try { - *domainIterable = detach(this->shim().CreateInstance(domainAccountId)); + typename D::abi_guard guard(this->shim()); + *domainIterable = detach_abi(this->shim().CreateInstance(domainAccountId)); return S_OK; } catch (...) @@ -1481,7 +1583,8 @@ struct produceshim().DomainAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainAccountId()); return S_OK; } catch (...) @@ -1494,6 +1597,7 @@ struct produceshim()); this->shim().DomainAccountId(value); return S_OK; } @@ -1503,11 +1607,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DomainFriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DomainFriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainFriendlyName()); return S_OK; } catch (...) @@ -1517,10 +1622,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DomainFriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DomainFriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -1534,7 +1640,8 @@ struct produceshim().DomainServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainServiceId()); return S_OK; } catch (...) @@ -1547,6 +1654,7 @@ struct produceshim()); this->shim().DomainServiceId(value); return S_OK; } @@ -1564,7 +1672,8 @@ struct produceshim().DomainAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainAccountId()); return S_OK; } catch (...) @@ -1577,6 +1686,7 @@ struct produceshim()); this->shim().DomainAccountId(value); return S_OK; } @@ -1590,7 +1700,8 @@ struct produceshim().DomainServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainServiceId()); return S_OK; } catch (...) @@ -1603,6 +1714,7 @@ struct produceshim()); this->shim().DomainServiceId(value); return S_OK; } @@ -1616,11 +1728,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GenerateData(GUID guidCPSystemId, uint32_t countOfStreams, abi_arg_in configuration, Windows::Media::Protection::PlayReady::PlayReadyITADataFormat format, uint32_t * __dataBytesSize, abi_arg_out * dataBytes) noexcept override + HRESULT __stdcall abi_GenerateData(GUID guidCPSystemId, uint32_t countOfStreams, impl::abi_arg_in configuration, Windows::Media::Protection::PlayReady::PlayReadyITADataFormat format, uint32_t * __dataBytesSize, impl::abi_arg_out * dataBytes) noexcept override { try { - std::tie(*__dataBytesSize, *dataBytes) = detach(this->shim().GenerateData(guidCPSystemId, countOfStreams, *reinterpret_cast(&configuration), format)); + typename D::abi_guard guard(this->shim()); + std::tie(*__dataBytesSize, *dataBytes) = detach_abi(this->shim().GenerateData(guidCPSystemId, countOfStreams, *reinterpret_cast(&configuration), format)); return S_OK; } catch (...) @@ -1643,7 +1756,8 @@ struct produce : pr { try { - *value = detach(this->shim().FullyEvaluated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullyEvaluated()); return S_OK; } catch (...) @@ -1656,7 +1770,8 @@ struct produce : pr { try { - *value = detach(this->shim().UsableForPlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UsableForPlay()); return S_OK; } catch (...) @@ -1665,11 +1780,12 @@ struct produce : pr } } - HRESULT __stdcall get_ExpirationDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -1683,7 +1799,8 @@ struct produce : pr { try { - *value = detach(this->shim().ExpireAfterFirstPlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpireAfterFirstPlay()); return S_OK; } catch (...) @@ -1696,7 +1813,8 @@ struct produce : pr { try { - *value = detach(this->shim().DomainAccountID()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainAccountID()); return S_OK; } catch (...) @@ -1709,7 +1827,8 @@ struct produce : pr { try { - *value = detach(this->shim().ChainDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChainDepth()); return S_OK; } catch (...) @@ -1722,7 +1841,8 @@ struct produce : pr { try { - *kid = detach(this->shim().GetKIDAtChainDepth(chainDepth)); + typename D::abi_guard guard(this->shim()); + *kid = detach_abi(this->shim().GetKIDAtChainDepth(chainDepth)); return S_OK; } catch (...) @@ -1735,11 +1855,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ContentHeader(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentHeader()); return S_OK; } catch (...) @@ -1749,10 +1870,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentHeader(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentHeader(*reinterpret_cast(&value)); return S_OK; } @@ -1766,7 +1888,8 @@ struct produceshim().DomainServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainServiceId()); return S_OK; } catch (...) @@ -1779,6 +1902,7 @@ struct produceshim()); this->shim().DomainServiceId(value); return S_OK; } @@ -1796,7 +1920,8 @@ struct produceshim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -1809,11 +1934,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in contentHeader, bool fullyEvaluated, abi_arg_out> instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in contentHeader, bool fullyEvaluated, impl::abi_arg_out> instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&contentHeader), fullyEvaluated)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&contentHeader), fullyEvaluated)); return S_OK; } catch (...) @@ -1827,11 +1953,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_DeleteLicenses(abi_arg_in contentHeader, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteLicenses(impl::abi_arg_in contentHeader, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteLicenses(*reinterpret_cast(&contentHeader))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteLicenses(*reinterpret_cast(&contentHeader))); return S_OK; } catch (...) @@ -1845,11 +1972,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateLAServiceRequest(abi_arg_out serviceRequest) noexcept override + HRESULT __stdcall abi_CreateLAServiceRequest(impl::abi_arg_out serviceRequest) noexcept override { try { - *serviceRequest = detach(this->shim().CreateLAServiceRequest()); + typename D::abi_guard guard(this->shim()); + *serviceRequest = detach_abi(this->shim().CreateLAServiceRequest()); return S_OK; } catch (...) @@ -1859,10 +1987,11 @@ struct produce mpm) noexcept override + HRESULT __stdcall abi_ConfigureMediaProtectionManager(impl::abi_arg_in mpm) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigureMediaProtectionManager(*reinterpret_cast(&mpm)); return S_OK; } @@ -1876,11 +2005,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in configuration, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in configuration, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&configuration))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&configuration))); return S_OK; } catch (...) @@ -1894,11 +2024,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MeteringCertificate(uint32_t * __meteringCertBytesSize, abi_arg_out * meteringCertBytes) noexcept override + HRESULT __stdcall get_MeteringCertificate(uint32_t * __meteringCertBytesSize, impl::abi_arg_out * meteringCertBytes) noexcept override { try { - std::tie(*__meteringCertBytesSize, *meteringCertBytes) = detach(this->shim().MeteringCertificate()); + typename D::abi_guard guard(this->shim()); + std::tie(*__meteringCertBytesSize, *meteringCertBytes) = detach_abi(this->shim().MeteringCertificate()); return S_OK; } catch (...) @@ -1909,11 +2040,12 @@ struct produce * meteringCertBytes) noexcept override + HRESULT __stdcall put_MeteringCertificate(uint32_t __meteringCertBytesSize, impl::abi_arg_in * meteringCertBytes) noexcept override { try { - this->shim().MeteringCertificate(array_ref(meteringCertBytes, meteringCertBytes + __meteringCertBytesSize)); + typename D::abi_guard guard(this->shim()); + this->shim().MeteringCertificate(array_view(meteringCertBytes, meteringCertBytes + __meteringCertBytesSize)); return S_OK; } catch (...) @@ -1930,11 +2062,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(uint32_t __publisherCertBytesSize, abi_arg_in * publisherCertBytes, abi_arg_out> instance) noexcept override + HRESULT __stdcall abi_CreateInstance(uint32_t __publisherCertBytesSize, impl::abi_arg_in * publisherCertBytes, impl::abi_arg_out> instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(array_ref(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(array_view(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); return S_OK; } catch (...) @@ -1952,7 +2085,8 @@ struct produceshim().SessionID()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionID()); return S_OK; } catch (...) @@ -1961,11 +2095,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -1974,11 +2109,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_UpdateTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpdateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTime()); return S_OK; } catch (...) @@ -1991,7 +2127,8 @@ struct produceshim().Stopped()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stopped()); return S_OK; } catch (...) @@ -2000,11 +2137,12 @@ struct produce * publisherCertBytes) noexcept override + HRESULT __stdcall get_PublisherCertificate(uint32_t * __publisherCertBytesSize, impl::abi_arg_out * publisherCertBytes) noexcept override { try { - std::tie(*__publisherCertBytesSize, *publisherCertBytes) = detach(this->shim().PublisherCertificate()); + typename D::abi_guard guard(this->shim()); + std::tie(*__publisherCertBytesSize, *publisherCertBytes) = detach_abi(this->shim().PublisherCertificate()); return S_OK; } catch (...) @@ -2019,11 +2157,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(uint32_t __publisherCertBytesSize, abi_arg_in * publisherCertBytes, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(uint32_t __publisherCertBytesSize, impl::abi_arg_in * publisherCertBytes, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(array_ref(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(array_view(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); return S_OK; } catch (...) @@ -2033,11 +2172,12 @@ struct produce * publisherCertBytes, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceFromSessionID(GUID sessionID, uint32_t __publisherCertBytesSize, impl::abi_arg_in * publisherCertBytes, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceFromSessionID(sessionID, array_ref(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceFromSessionID(sessionID, array_view(publisherCertBytes, publisherCertBytes + __publisherCertBytesSize))); return S_OK; } catch (...) @@ -2051,11 +2191,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -2065,10 +2206,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return S_OK; } @@ -2078,11 +2220,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResponseCustomData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResponseCustomData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseCustomData()); return S_OK; } catch (...) @@ -2092,11 +2235,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ChallengeCustomData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChallengeCustomData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChallengeCustomData()); return S_OK; } catch (...) @@ -2106,10 +2250,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ChallengeCustomData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChallengeCustomData(*reinterpret_cast(&value)); return S_OK; } @@ -2119,11 +2264,12 @@ struct produce action) noexcept override + HRESULT __stdcall abi_BeginServiceRequest(impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().BeginServiceRequest()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().BeginServiceRequest()); return S_OK; } catch (...) @@ -2133,11 +2279,12 @@ struct produce serviceRequest) noexcept override + HRESULT __stdcall abi_NextServiceRequest(impl::abi_arg_out serviceRequest) noexcept override { try { - *serviceRequest = detach(this->shim().NextServiceRequest()); + typename D::abi_guard guard(this->shim()); + *serviceRequest = detach_abi(this->shim().NextServiceRequest()); return S_OK; } catch (...) @@ -2147,11 +2294,12 @@ struct produce challengeMessage) noexcept override + HRESULT __stdcall abi_GenerateManualEnablingChallenge(impl::abi_arg_out challengeMessage) noexcept override { try { - *challengeMessage = detach(this->shim().GenerateManualEnablingChallenge()); + typename D::abi_guard guard(this->shim()); + *challengeMessage = detach_abi(this->shim().GenerateManualEnablingChallenge()); return S_OK; } catch (...) @@ -2161,11 +2309,12 @@ struct produce * responseBytes, HRESULT * result) noexcept override + HRESULT __stdcall abi_ProcessManualEnablingResponse(uint32_t __responseBytesSize, impl::abi_arg_in * responseBytes, HRESULT * result) noexcept override { try { - *result = detach(this->shim().ProcessManualEnablingResponse(array_ref(responseBytes, responseBytes + __responseBytesSize))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProcessManualEnablingResponse(array_view(responseBytes, responseBytes + __responseBytesSize))); return S_OK; } catch (...) @@ -2178,11 +2327,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetMessageBody(uint32_t * __messageBodyBytesSize, abi_arg_out * messageBodyBytes) noexcept override + HRESULT __stdcall abi_GetMessageBody(uint32_t * __messageBodyBytesSize, impl::abi_arg_out * messageBodyBytes) noexcept override { try { - std::tie(*__messageBodyBytesSize, *messageBodyBytes) = detach(this->shim().GetMessageBody()); + typename D::abi_guard guard(this->shim()); + std::tie(*__messageBodyBytesSize, *messageBodyBytes) = detach_abi(this->shim().GetMessageBody()); return S_OK; } catch (...) @@ -2193,11 +2343,12 @@ struct produce } } - HRESULT __stdcall get_MessageHeaders(abi_arg_out value) noexcept override + HRESULT __stdcall get_MessageHeaders(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageHeaders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageHeaders()); return S_OK; } catch (...) @@ -2207,11 +2358,12 @@ struct produce } } - HRESULT __stdcall get_Uri(abi_arg_out messageUri) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out messageUri) noexcept override { try { - *messageUri = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *messageUri = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -2229,7 +2381,8 @@ struct produce : pr { try { - *value = detach(this->shim().DomainJoinServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainJoinServiceRequestType()); return S_OK; } catch (...) @@ -2242,7 +2395,8 @@ struct produce : pr { try { - *value = detach(this->shim().DomainLeaveServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainLeaveServiceRequestType()); return S_OK; } catch (...) @@ -2255,7 +2409,8 @@ struct produce : pr { try { - *value = detach(this->shim().IndividualizationServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndividualizationServiceRequestType()); return S_OK; } catch (...) @@ -2268,7 +2423,8 @@ struct produce : pr { try { - *value = detach(this->shim().LicenseAcquirerServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LicenseAcquirerServiceRequestType()); return S_OK; } catch (...) @@ -2281,7 +2437,8 @@ struct produce : pr { try { - *value = detach(this->shim().MeteringReportServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MeteringReportServiceRequestType()); return S_OK; } catch (...) @@ -2294,7 +2451,8 @@ struct produce : pr { try { - *value = detach(this->shim().RevocationServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RevocationServiceRequestType()); return S_OK; } catch (...) @@ -2307,7 +2465,8 @@ struct produce : pr { try { - *value = detach(this->shim().MediaProtectionSystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaProtectionSystemId()); return S_OK; } catch (...) @@ -2320,7 +2479,8 @@ struct produce : pr { try { - *value = detach(this->shim().PlayReadySecurityVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayReadySecurityVersion()); return S_OK; } catch (...) @@ -2337,7 +2497,8 @@ struct produce : p { try { - *value = detach(this->shim().PlayReadyCertificateSecurityLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayReadyCertificateSecurityLevel()); return S_OK; } catch (...) @@ -2354,7 +2515,8 @@ struct produce : p { try { - *value = detach(this->shim().SecureStopServiceRequestType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecureStopServiceRequestType()); return S_OK; } catch (...) @@ -2367,7 +2529,8 @@ struct produce : p { try { - *value = detach(this->shim().CheckSupportedHardware(hwdrmFeature)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckSupportedHardware(hwdrmFeature)); return S_OK; } catch (...) @@ -2380,11 +2543,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_InputTrustAuthorityToCreate(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputTrustAuthorityToCreate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputTrustAuthorityToCreate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputTrustAuthorityToCreate()); return S_OK; } catch (...) @@ -2398,7 +2562,8 @@ struct produce : p { try { - *value = detach(this->shim().ProtectionSystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionSystemId()); return S_OK; } catch (...) @@ -2415,749 +2580,749 @@ namespace Windows::Media::Protection::PlayReady { template GUID impl_IPlayReadyContentHeader::KeyId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_KeyId(&value)); return value; } template hstring impl_IPlayReadyContentHeader::KeyIdString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyIdString(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_KeyIdString(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IPlayReadyContentHeader::LicenseAcquisitionUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LicenseAcquisitionUrl(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_LicenseAcquisitionUrl(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IPlayReadyContentHeader::LicenseAcquisitionUserInterfaceUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LicenseAcquisitionUserInterfaceUrl(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_LicenseAcquisitionUserInterfaceUrl(put_abi(value))); return value; } template GUID impl_IPlayReadyContentHeader::DomainServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainServiceId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_DomainServiceId(&value)); return value; } template Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm impl_IPlayReadyContentHeader::EncryptionType() const { Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_EncryptionType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_EncryptionType(&value)); return value; } template hstring impl_IPlayReadyContentHeader::CustomAttributes() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomAttributes(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_CustomAttributes(put_abi(value))); return value; } template Windows::Media::Protection::PlayReady::PlayReadyDecryptorSetup impl_IPlayReadyContentHeader::DecryptorSetup() const { Windows::Media::Protection::PlayReady::PlayReadyDecryptorSetup value {}; - check_hresult(static_cast(static_cast(*this))->get_DecryptorSetup(&value)); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_DecryptorSetup(&value)); return value; } template com_array impl_IPlayReadyContentHeader::GetSerializedHeader() const { com_array headerBytes {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSerializedHeader(put_size(headerBytes), put(headerBytes))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->abi_GetSerializedHeader(impl::put_size_abi(headerBytes), put_abi(headerBytes))); return headerBytes; } template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeader::HeaderWithEmbeddedUpdates() const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderWithEmbeddedUpdates(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader)->get_HeaderWithEmbeddedUpdates(put_abi(value))); return value; } -template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromWindowsMediaDrmHeader(array_ref headerBytes, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) const +template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromWindowsMediaDrmHeader(array_view headerBytes, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceFromWindowsMediaDrmHeader(headerBytes.size(), get(headerBytes), get(licenseAcquisitionUrl), get(licenseAcquisitionUserInterfaceUrl), get(customAttributes), domainServiceId, put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeaderFactory)->abi_CreateInstanceFromWindowsMediaDrmHeader(headerBytes.size(), get_abi(headerBytes), get_abi(licenseAcquisitionUrl), get_abi(licenseAcquisitionUserInterfaceUrl), get_abi(customAttributes), domainServiceId, put_abi(instance))); return instance; } -template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromComponents(GUID contentKeyId, hstring_ref contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) const +template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromComponents(GUID contentKeyId, hstring_view contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceFromComponents(contentKeyId, get(contentKeyIdString), contentEncryptionAlgorithm, get(licenseAcquisitionUrl), get(licenseAcquisitionUserInterfaceUrl), get(customAttributes), domainServiceId, put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeaderFactory)->abi_CreateInstanceFromComponents(contentKeyId, get_abi(contentKeyIdString), contentEncryptionAlgorithm, get_abi(licenseAcquisitionUrl), get_abi(licenseAcquisitionUserInterfaceUrl), get_abi(customAttributes), domainServiceId, put_abi(instance))); return instance; } -template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromPlayReadyHeader(array_ref headerBytes) const +template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory::CreateInstanceFromPlayReadyHeader(array_view headerBytes) const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceFromPlayReadyHeader(headerBytes.size(), get(headerBytes), put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeaderFactory)->abi_CreateInstanceFromPlayReadyHeader(headerBytes.size(), get_abi(headerBytes), put_abi(instance))); return instance; } template com_array impl_IPlayReadyContentHeader2::KeyIds() const { com_array contentKeyIds {}; - check_hresult(static_cast(static_cast(*this))->get_KeyIds(put_size(contentKeyIds), put(contentKeyIds))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader2)->get_KeyIds(impl::put_size_abi(contentKeyIds), put_abi(contentKeyIds))); return contentKeyIds; } template com_array impl_IPlayReadyContentHeader2::KeyIdStrings() const { com_array contentKeyIdStrings; - check_hresult(static_cast(static_cast(*this))->get_KeyIdStrings(put_size(contentKeyIdStrings), put(contentKeyIdStrings))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeader2)->get_KeyIdStrings(impl::put_size_abi(contentKeyIdStrings), put_abi(contentKeyIdStrings))); return contentKeyIdStrings; } -template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory2::CreateInstanceFromComponents2(uint32_t dwFlags, array_ref contentKeyIds, array_ref contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) const +template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyContentHeaderFactory2::CreateInstanceFromComponents2(uint32_t dwFlags, array_view contentKeyIds, array_view contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceFromComponents2(dwFlags, contentKeyIds.size(), get(contentKeyIds), contentKeyIdStrings.size(), get(contentKeyIdStrings), contentEncryptionAlgorithm, get(licenseAcquisitionUrl), get(licenseAcquisitionUserInterfaceUrl), get(customAttributes), domainServiceId, put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyContentHeaderFactory2)->abi_CreateInstanceFromComponents2(dwFlags, contentKeyIds.size(), get_abi(contentKeyIds), contentKeyIdStrings.size(), get_abi(contentKeyIdStrings), contentEncryptionAlgorithm, get_abi(licenseAcquisitionUrl), get_abi(licenseAcquisitionUserInterfaceUrl), get_abi(customAttributes), domainServiceId, put_abi(instance))); return instance; } template Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest impl_IPlayReadyContentResolver::ServiceRequest(const Windows::Media::Protection::PlayReady::PlayReadyContentHeader & contentHeader) const { Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest serviceRequest; - check_hresult(static_cast(static_cast(*this))->abi_ServiceRequest(get(contentHeader), put(serviceRequest))); + check_hresult(WINRT_SHIM(IPlayReadyContentResolver)->abi_ServiceRequest(get_abi(contentHeader), put_abi(serviceRequest))); return serviceRequest; } template Windows::Foundation::IAsyncAction impl_IPlayReadyLicenseManagement::DeleteLicenses(const Windows::Media::Protection::PlayReady::PlayReadyContentHeader & contentHeader) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteLicenses(get(contentHeader), put(operation))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseManagement)->abi_DeleteLicenses(get_abi(contentHeader), put_abi(operation))); return operation; } template bool impl_IPlayReadyLicense::FullyEvaluated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_FullyEvaluated(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_FullyEvaluated(&value)); return value; } template bool impl_IPlayReadyLicense::UsableForPlay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UsableForPlay(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_UsableForPlay(&value)); return value; } template Windows::Foundation::IReference impl_IPlayReadyLicense::ExpirationDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_ExpirationDate(put_abi(value))); return value; } template uint32_t impl_IPlayReadyLicense::ExpireAfterFirstPlay() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpireAfterFirstPlay(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_ExpireAfterFirstPlay(&value)); return value; } template GUID impl_IPlayReadyLicense::DomainAccountID() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainAccountID(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_DomainAccountID(&value)); return value; } template uint32_t impl_IPlayReadyLicense::ChainDepth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ChainDepth(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->get_ChainDepth(&value)); return value; } template GUID impl_IPlayReadyLicense::GetKIDAtChainDepth(uint32_t chainDepth) const { GUID kid {}; - check_hresult(static_cast(static_cast(*this))->abi_GetKIDAtChainDepth(chainDepth, &kid)); + check_hresult(WINRT_SHIM(IPlayReadyLicense)->abi_GetKIDAtChainDepth(chainDepth, &kid)); return kid; } template Windows::Media::Protection::PlayReady::PlayReadyLicenseIterable impl_IPlayReadyLicenseIterableFactory::CreateInstance(const Windows::Media::Protection::PlayReady::PlayReadyContentHeader & contentHeader, bool fullyEvaluated) const { Windows::Media::Protection::PlayReady::PlayReadyLicenseIterable instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(contentHeader), fullyEvaluated, put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseIterableFactory)->abi_CreateInstance(get_abi(contentHeader), fullyEvaluated, put_abi(instance))); return instance; } template GUID impl_IPlayReadyDomain::AccountId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AccountId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomain)->get_AccountId(&value)); return value; } template GUID impl_IPlayReadyDomain::ServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomain)->get_ServiceId(&value)); return value; } template uint32_t impl_IPlayReadyDomain::Revision() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Revision(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomain)->get_Revision(&value)); return value; } template hstring impl_IPlayReadyDomain::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyDomain)->get_FriendlyName(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IPlayReadyDomain::DomainJoinUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DomainJoinUrl(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyDomain)->get_DomainJoinUrl(put_abi(value))); return value; } template Windows::Media::Protection::PlayReady::PlayReadyDomainIterable impl_IPlayReadyDomainIterableFactory::CreateInstance(GUID domainAccountId) const { Windows::Media::Protection::PlayReady::PlayReadyDomainIterable domainIterable { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(domainAccountId, put(domainIterable))); + check_hresult(WINRT_SHIM(IPlayReadyDomainIterableFactory)->abi_CreateInstance(domainAccountId, put_abi(domainIterable))); return domainIterable; } template GUID impl_IPlayReadyStatics::DomainJoinServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainJoinServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_DomainJoinServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::DomainLeaveServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainLeaveServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_DomainLeaveServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::IndividualizationServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_IndividualizationServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_IndividualizationServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::LicenseAcquirerServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LicenseAcquirerServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_LicenseAcquirerServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::MeteringReportServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_MeteringReportServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_MeteringReportServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::RevocationServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_RevocationServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_RevocationServiceRequestType(&value)); return value; } template GUID impl_IPlayReadyStatics::MediaProtectionSystemId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaProtectionSystemId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_MediaProtectionSystemId(&value)); return value; } template uint32_t impl_IPlayReadyStatics::PlayReadySecurityVersion() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PlayReadySecurityVersion(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics)->get_PlayReadySecurityVersion(&value)); return value; } template uint32_t impl_IPlayReadyStatics2::PlayReadyCertificateSecurityLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PlayReadyCertificateSecurityLevel(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics2)->get_PlayReadyCertificateSecurityLevel(&value)); return value; } template GUID impl_IPlayReadyStatics3::SecureStopServiceRequestType() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SecureStopServiceRequestType(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics3)->get_SecureStopServiceRequestType(&value)); return value; } template bool impl_IPlayReadyStatics3::CheckSupportedHardware(Windows::Media::Protection::PlayReady::PlayReadyHardwareDRMFeatures hwdrmFeature) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckSupportedHardware(hwdrmFeature, &value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics3)->abi_CheckSupportedHardware(hwdrmFeature, &value)); return value; } template hstring impl_IPlayReadyStatics4::InputTrustAuthorityToCreate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InputTrustAuthorityToCreate(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyStatics4)->get_InputTrustAuthorityToCreate(put_abi(value))); return value; } template GUID impl_IPlayReadyStatics4::ProtectionSystemId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionSystemId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyStatics4)->get_ProtectionSystemId(&value)); return value; } -template Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest impl_IPlayReadySecureStopServiceRequestFactory::CreateInstance(array_ref publisherCertBytes) const +template Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest impl_IPlayReadySecureStopServiceRequestFactory::CreateInstance(array_view publisherCertBytes) const { Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(publisherCertBytes.size(), get(publisherCertBytes), put(instance))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequestFactory)->abi_CreateInstance(publisherCertBytes.size(), get_abi(publisherCertBytes), put_abi(instance))); return instance; } -template Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest impl_IPlayReadySecureStopServiceRequestFactory::CreateInstanceFromSessionID(GUID sessionID, array_ref publisherCertBytes) const +template Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest impl_IPlayReadySecureStopServiceRequestFactory::CreateInstanceFromSessionID(GUID sessionID, array_view publisherCertBytes) const { Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceFromSessionID(sessionID, publisherCertBytes.size(), get(publisherCertBytes), put(instance))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequestFactory)->abi_CreateInstanceFromSessionID(sessionID, publisherCertBytes.size(), get_abi(publisherCertBytes), put_abi(instance))); return instance; } -template Windows::Media::Protection::PlayReady::PlayReadySecureStopIterable impl_IPlayReadySecureStopIterableFactory::CreateInstance(array_ref publisherCertBytes) const +template Windows::Media::Protection::PlayReady::PlayReadySecureStopIterable impl_IPlayReadySecureStopIterableFactory::CreateInstance(array_view publisherCertBytes) const { Windows::Media::Protection::PlayReady::PlayReadySecureStopIterable instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(publisherCertBytes.size(), get(publisherCertBytes), put(instance))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopIterableFactory)->abi_CreateInstance(publisherCertBytes.size(), get_abi(publisherCertBytes), put_abi(instance))); return instance; } template com_array impl_IPlayReadySoapMessage::GetMessageBody() const { com_array messageBodyBytes {}; - check_hresult(static_cast(static_cast(*this))->abi_GetMessageBody(put_size(messageBodyBytes), put(messageBodyBytes))); + check_hresult(WINRT_SHIM(IPlayReadySoapMessage)->abi_GetMessageBody(impl::put_size_abi(messageBodyBytes), put_abi(messageBodyBytes))); return messageBodyBytes; } template Windows::Foundation::Collections::IPropertySet impl_IPlayReadySoapMessage::MessageHeaders() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_MessageHeaders(put(value))); + check_hresult(WINRT_SHIM(IPlayReadySoapMessage)->get_MessageHeaders(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IPlayReadySoapMessage::Uri() const { Windows::Foundation::Uri messageUri { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(messageUri))); + check_hresult(WINRT_SHIM(IPlayReadySoapMessage)->get_Uri(put_abi(messageUri))); return messageUri; } template com_array impl_IPlayReadyITADataGenerator::GenerateData(GUID guidCPSystemId, uint32_t countOfStreams, const Windows::Foundation::Collections::IPropertySet & configuration, Windows::Media::Protection::PlayReady::PlayReadyITADataFormat format) const { com_array dataBytes {}; - check_hresult(static_cast(static_cast(*this))->abi_GenerateData(guidCPSystemId, countOfStreams, get(configuration), format, put_size(dataBytes), put(dataBytes))); + check_hresult(WINRT_SHIM(IPlayReadyITADataGenerator)->abi_GenerateData(guidCPSystemId, countOfStreams, get_abi(configuration), format, impl::put_size_abi(dataBytes), put_abi(dataBytes))); return dataBytes; } template Windows::Media::Protection::PlayReady::IPlayReadyLicenseAcquisitionServiceRequest impl_IPlayReadyLicenseSession::CreateLAServiceRequest() const { Windows::Media::Protection::PlayReady::IPlayReadyLicenseAcquisitionServiceRequest serviceRequest; - check_hresult(static_cast(static_cast(*this))->abi_CreateLAServiceRequest(put(serviceRequest))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseSession)->abi_CreateLAServiceRequest(put_abi(serviceRequest))); return serviceRequest; } template void impl_IPlayReadyLicenseSession::ConfigureMediaProtectionManager(const Windows::Media::Protection::MediaProtectionManager & mpm) const { - check_hresult(static_cast(static_cast(*this))->abi_ConfigureMediaProtectionManager(get(mpm))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseSession)->abi_ConfigureMediaProtectionManager(get_abi(mpm))); } template Windows::Media::Protection::PlayReady::PlayReadyLicenseSession impl_IPlayReadyLicenseSessionFactory::CreateInstance(const Windows::Foundation::Collections::IPropertySet & configuration) const { Windows::Media::Protection::PlayReady::PlayReadyLicenseSession instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(configuration), put(instance))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseSessionFactory)->abi_CreateInstance(get_abi(configuration), put_abi(instance))); return instance; } -template void impl_INDDownloadEngine::Open(const Windows::Foundation::Uri & uri, array_ref sessionIDBytes) const +template void impl_INDDownloadEngine::Open(const Windows::Foundation::Uri & uri, array_view sessionIDBytes) const { - check_hresult(static_cast(static_cast(*this))->abi_Open(get(uri), sessionIDBytes.size(), get(sessionIDBytes))); + check_hresult(WINRT_SHIM(INDDownloadEngine)->abi_Open(get_abi(uri), sessionIDBytes.size(), get_abi(sessionIDBytes))); } template void impl_INDDownloadEngine::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(INDDownloadEngine)->abi_Pause()); } template void impl_INDDownloadEngine::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(INDDownloadEngine)->abi_Resume()); } template void impl_INDDownloadEngine::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(INDDownloadEngine)->abi_Close()); } template void impl_INDDownloadEngine::Seek(const Windows::Foundation::TimeSpan & startPosition) const { - check_hresult(static_cast(static_cast(*this))->abi_Seek(get(startPosition))); + check_hresult(WINRT_SHIM(INDDownloadEngine)->abi_Seek(get_abi(startPosition))); } template bool impl_INDDownloadEngine::CanSeek() const { bool canSeek {}; - check_hresult(static_cast(static_cast(*this))->get_CanSeek(&canSeek)); + check_hresult(WINRT_SHIM(INDDownloadEngine)->get_CanSeek(&canSeek)); return canSeek; } template uint32_t impl_INDDownloadEngine::BufferFullMinThresholdInSamples() const { uint32_t bufferFullMinThreshold {}; - check_hresult(static_cast(static_cast(*this))->get_BufferFullMinThresholdInSamples(&bufferFullMinThreshold)); + check_hresult(WINRT_SHIM(INDDownloadEngine)->get_BufferFullMinThresholdInSamples(&bufferFullMinThreshold)); return bufferFullMinThreshold; } template uint32_t impl_INDDownloadEngine::BufferFullMaxThresholdInSamples() const { uint32_t bufferFullMaxThreshold {}; - check_hresult(static_cast(static_cast(*this))->get_BufferFullMaxThresholdInSamples(&bufferFullMaxThreshold)); + check_hresult(WINRT_SHIM(INDDownloadEngine)->get_BufferFullMaxThresholdInSamples(&bufferFullMaxThreshold)); return bufferFullMaxThreshold; } template Windows::Media::Protection::PlayReady::NDDownloadEngineNotifier impl_INDDownloadEngine::Notifier() const { Windows::Media::Protection::PlayReady::NDDownloadEngineNotifier instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Notifier(put(instance))); + check_hresult(WINRT_SHIM(INDDownloadEngine)->get_Notifier(put_abi(instance))); return instance; } template void impl_INDDownloadEngineNotifier::OnStreamOpened() const { - check_hresult(static_cast(static_cast(*this))->abi_OnStreamOpened()); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnStreamOpened()); } -template void impl_INDDownloadEngineNotifier::OnPlayReadyObjectReceived(array_ref dataBytes) const +template void impl_INDDownloadEngineNotifier::OnPlayReadyObjectReceived(array_view dataBytes) const { - check_hresult(static_cast(static_cast(*this))->abi_OnPlayReadyObjectReceived(dataBytes.size(), get(dataBytes))); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnPlayReadyObjectReceived(dataBytes.size(), get_abi(dataBytes))); } template void impl_INDDownloadEngineNotifier::OnContentIDReceived(const Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptor & licenseFetchDescriptor) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentIDReceived(get(licenseFetchDescriptor))); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnContentIDReceived(get_abi(licenseFetchDescriptor))); } -template void impl_INDDownloadEngineNotifier::OnDataReceived(array_ref dataBytes, uint32_t bytesReceived) const +template void impl_INDDownloadEngineNotifier::OnDataReceived(array_view dataBytes, uint32_t bytesReceived) const { - check_hresult(static_cast(static_cast(*this))->abi_OnDataReceived(dataBytes.size(), get(dataBytes), bytesReceived)); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnDataReceived(dataBytes.size(), get_abi(dataBytes), bytesReceived)); } template void impl_INDDownloadEngineNotifier::OnEndOfStream() const { - check_hresult(static_cast(static_cast(*this))->abi_OnEndOfStream()); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnEndOfStream()); } template void impl_INDDownloadEngineNotifier::OnNetworkError() const { - check_hresult(static_cast(static_cast(*this))->abi_OnNetworkError()); + check_hresult(WINRT_SHIM(INDDownloadEngineNotifier)->abi_OnNetworkError()); } template Windows::Media::Protection::PlayReady::NDContentIDType impl_INDLicenseFetchDescriptor::ContentIDType() const { Windows::Media::Protection::PlayReady::NDContentIDType contentIDType {}; - check_hresult(static_cast(static_cast(*this))->get_ContentIDType(&contentIDType)); + check_hresult(WINRT_SHIM(INDLicenseFetchDescriptor)->get_ContentIDType(&contentIDType)); return contentIDType; } template com_array impl_INDLicenseFetchDescriptor::ContentID() const { com_array contentIDBytes {}; - check_hresult(static_cast(static_cast(*this))->get_ContentID(put_size(contentIDBytes), put(contentIDBytes))); + check_hresult(WINRT_SHIM(INDLicenseFetchDescriptor)->get_ContentID(impl::put_size_abi(contentIDBytes), put_abi(contentIDBytes))); return contentIDBytes; } template Windows::Media::Protection::PlayReady::INDCustomData impl_INDLicenseFetchDescriptor::LicenseFetchChallengeCustomData() const { Windows::Media::Protection::PlayReady::INDCustomData licenseFetchChallengeCustomData; - check_hresult(static_cast(static_cast(*this))->get_LicenseFetchChallengeCustomData(put(licenseFetchChallengeCustomData))); + check_hresult(WINRT_SHIM(INDLicenseFetchDescriptor)->get_LicenseFetchChallengeCustomData(put_abi(licenseFetchChallengeCustomData))); return licenseFetchChallengeCustomData; } template void impl_INDLicenseFetchDescriptor::LicenseFetchChallengeCustomData(const Windows::Media::Protection::PlayReady::INDCustomData & licenseFetchChallengeCustomData) const { - check_hresult(static_cast(static_cast(*this))->put_LicenseFetchChallengeCustomData(get(licenseFetchChallengeCustomData))); + check_hresult(WINRT_SHIM(INDLicenseFetchDescriptor)->put_LicenseFetchChallengeCustomData(get_abi(licenseFetchChallengeCustomData))); } template com_array impl_INDCustomData::CustomDataTypeID() const { com_array customDataTypeIDBytes {}; - check_hresult(static_cast(static_cast(*this))->get_CustomDataTypeID(put_size(customDataTypeIDBytes), put(customDataTypeIDBytes))); + check_hresult(WINRT_SHIM(INDCustomData)->get_CustomDataTypeID(impl::put_size_abi(customDataTypeIDBytes), put_abi(customDataTypeIDBytes))); return customDataTypeIDBytes; } template com_array impl_INDCustomData::CustomData() const { com_array customDataBytes {}; - check_hresult(static_cast(static_cast(*this))->get_CustomData(put_size(customDataBytes), put(customDataBytes))); + check_hresult(WINRT_SHIM(INDCustomData)->get_CustomData(impl::put_size_abi(customDataBytes), put_abi(customDataBytes))); return customDataBytes; } -template void impl_INDStreamParser::ParseData(array_ref dataBytes) const +template void impl_INDStreamParser::ParseData(array_view dataBytes) const { - check_hresult(static_cast(static_cast(*this))->abi_ParseData(dataBytes.size(), get(dataBytes))); + check_hresult(WINRT_SHIM(INDStreamParser)->abi_ParseData(dataBytes.size(), get_abi(dataBytes))); } template uint32_t impl_INDStreamParser::GetStreamInformation(const Windows::Media::Core::IMediaStreamDescriptor & descriptor, Windows::Media::Protection::PlayReady::NDMediaStreamType & streamType) const { uint32_t streamID {}; - check_hresult(static_cast(static_cast(*this))->abi_GetStreamInformation(get(descriptor), &streamType, &streamID)); + check_hresult(WINRT_SHIM(INDStreamParser)->abi_GetStreamInformation(get_abi(descriptor), &streamType, &streamID)); return streamID; } template void impl_INDStreamParser::BeginOfStream() const { - check_hresult(static_cast(static_cast(*this))->abi_BeginOfStream()); + check_hresult(WINRT_SHIM(INDStreamParser)->abi_BeginOfStream()); } template void impl_INDStreamParser::EndOfStream() const { - check_hresult(static_cast(static_cast(*this))->abi_EndOfStream()); + check_hresult(WINRT_SHIM(INDStreamParser)->abi_EndOfStream()); } template Windows::Media::Protection::PlayReady::NDStreamParserNotifier impl_INDStreamParser::Notifier() const { Windows::Media::Protection::PlayReady::NDStreamParserNotifier instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Notifier(put(instance))); + check_hresult(WINRT_SHIM(INDStreamParser)->get_Notifier(put_abi(instance))); return instance; } template void impl_INDStreamParserNotifier::OnContentIDReceived(const Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptor & licenseFetchDescriptor) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentIDReceived(get(licenseFetchDescriptor))); + check_hresult(WINRT_SHIM(INDStreamParserNotifier)->abi_OnContentIDReceived(get_abi(licenseFetchDescriptor))); } template void impl_INDStreamParserNotifier::OnMediaStreamDescriptorCreated(const Windows::Foundation::Collections::IVector & audioStreamDescriptors, const Windows::Foundation::Collections::IVector & videoStreamDescriptors) const { - check_hresult(static_cast(static_cast(*this))->abi_OnMediaStreamDescriptorCreated(get(audioStreamDescriptors), get(videoStreamDescriptors))); + check_hresult(WINRT_SHIM(INDStreamParserNotifier)->abi_OnMediaStreamDescriptorCreated(get_abi(audioStreamDescriptors), get_abi(videoStreamDescriptors))); } -template void impl_INDStreamParserNotifier::OnSampleParsed(uint32_t streamID, Windows::Media::Protection::PlayReady::NDMediaStreamType streamType, const Windows::Media::Core::MediaStreamSample & streamSample, int64_t pts, Windows::Media::Protection::PlayReady::NDClosedCaptionFormat ccFormat, array_ref ccDataBytes) const +template void impl_INDStreamParserNotifier::OnSampleParsed(uint32_t streamID, Windows::Media::Protection::PlayReady::NDMediaStreamType streamType, const Windows::Media::Core::MediaStreamSample & streamSample, int64_t pts, Windows::Media::Protection::PlayReady::NDClosedCaptionFormat ccFormat, array_view ccDataBytes) const { - check_hresult(static_cast(static_cast(*this))->abi_OnSampleParsed(streamID, streamType, get(streamSample), pts, ccFormat, ccDataBytes.size(), get(ccDataBytes))); + check_hresult(WINRT_SHIM(INDStreamParserNotifier)->abi_OnSampleParsed(streamID, streamType, get_abi(streamSample), pts, ccFormat, ccDataBytes.size(), get_abi(ccDataBytes))); } -template void impl_INDStreamParserNotifier::OnBeginSetupDecryptor(const Windows::Media::Core::IMediaStreamDescriptor & descriptor, GUID keyID, array_ref proBytes) const +template void impl_INDStreamParserNotifier::OnBeginSetupDecryptor(const Windows::Media::Core::IMediaStreamDescriptor & descriptor, GUID keyID, array_view proBytes) const { - check_hresult(static_cast(static_cast(*this))->abi_OnBeginSetupDecryptor(get(descriptor), keyID, proBytes.size(), get(proBytes))); + check_hresult(WINRT_SHIM(INDStreamParserNotifier)->abi_OnBeginSetupDecryptor(get_abi(descriptor), keyID, proBytes.size(), get_abi(proBytes))); } template com_array impl_INDSendResult::Response() const { com_array responseDataBytes {}; - check_hresult(static_cast(static_cast(*this))->get_Response(put_size(responseDataBytes), put(responseDataBytes))); + check_hresult(WINRT_SHIM(INDSendResult)->get_Response(impl::put_size_abi(responseDataBytes), put_abi(responseDataBytes))); return responseDataBytes; } -template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendRegistrationRequestAsync(array_ref sessionIDBytes, array_ref challengeDataBytes) const +template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendRegistrationRequestAsync(array_view sessionIDBytes, array_view challengeDataBytes) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SendRegistrationRequestAsync(sessionIDBytes.size(), get(sessionIDBytes), challengeDataBytes.size(), get(challengeDataBytes), put(result))); + check_hresult(WINRT_SHIM(INDMessenger)->abi_SendRegistrationRequestAsync(sessionIDBytes.size(), get_abi(sessionIDBytes), challengeDataBytes.size(), get_abi(challengeDataBytes), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendProximityDetectionStartAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, array_ref transmitterChannelBytes, array_ref sessionIDBytes, array_ref challengeDataBytes) const +template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendProximityDetectionStartAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, array_view transmitterChannelBytes, array_view sessionIDBytes, array_view challengeDataBytes) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SendProximityDetectionStartAsync(pdType, transmitterChannelBytes.size(), get(transmitterChannelBytes), sessionIDBytes.size(), get(sessionIDBytes), challengeDataBytes.size(), get(challengeDataBytes), put(result))); + check_hresult(WINRT_SHIM(INDMessenger)->abi_SendProximityDetectionStartAsync(pdType, transmitterChannelBytes.size(), get_abi(transmitterChannelBytes), sessionIDBytes.size(), get_abi(sessionIDBytes), challengeDataBytes.size(), get_abi(challengeDataBytes), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendProximityDetectionResponseAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, array_ref transmitterChannelBytes, array_ref sessionIDBytes, array_ref responseDataBytes) const +template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendProximityDetectionResponseAsync(Windows::Media::Protection::PlayReady::NDProximityDetectionType pdType, array_view transmitterChannelBytes, array_view sessionIDBytes, array_view responseDataBytes) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SendProximityDetectionResponseAsync(pdType, transmitterChannelBytes.size(), get(transmitterChannelBytes), sessionIDBytes.size(), get(sessionIDBytes), responseDataBytes.size(), get(responseDataBytes), put(result))); + check_hresult(WINRT_SHIM(INDMessenger)->abi_SendProximityDetectionResponseAsync(pdType, transmitterChannelBytes.size(), get_abi(transmitterChannelBytes), sessionIDBytes.size(), get_abi(sessionIDBytes), responseDataBytes.size(), get_abi(responseDataBytes), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendLicenseFetchRequestAsync(array_ref sessionIDBytes, array_ref challengeDataBytes) const +template Windows::Foundation::IAsyncOperation impl_INDMessenger::SendLicenseFetchRequestAsync(array_view sessionIDBytes, array_view challengeDataBytes) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SendLicenseFetchRequestAsync(sessionIDBytes.size(), get(sessionIDBytes), challengeDataBytes.size(), get(challengeDataBytes), put(result))); + check_hresult(WINRT_SHIM(INDMessenger)->abi_SendLicenseFetchRequestAsync(sessionIDBytes.size(), get_abi(sessionIDBytes), challengeDataBytes.size(), get_abi(challengeDataBytes), put_abi(result))); return result; } -template Windows::Media::Protection::PlayReady::NDTCPMessenger impl_INDTCPMessengerFactory::CreateInstance(hstring_ref remoteHostName, uint32_t remoteHostPort) const +template Windows::Media::Protection::PlayReady::NDTCPMessenger impl_INDTCPMessengerFactory::CreateInstance(hstring_view remoteHostName, uint32_t remoteHostPort) const { Windows::Media::Protection::PlayReady::NDTCPMessenger instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(remoteHostName), remoteHostPort, put(instance))); + check_hresult(WINRT_SHIM(INDTCPMessengerFactory)->abi_CreateInstance(get_abi(remoteHostName), remoteHostPort, put_abi(instance))); return instance; } template Windows::Media::Protection::PlayReady::NDCertificateType impl_INDTransmitterProperties::CertificateType() const { Windows::Media::Protection::PlayReady::NDCertificateType type {}; - check_hresult(static_cast(static_cast(*this))->get_CertificateType(&type)); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_CertificateType(&type)); return type; } template Windows::Media::Protection::PlayReady::NDCertificatePlatformID impl_INDTransmitterProperties::PlatformIdentifier() const { Windows::Media::Protection::PlayReady::NDCertificatePlatformID identifier {}; - check_hresult(static_cast(static_cast(*this))->get_PlatformIdentifier(&identifier)); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_PlatformIdentifier(&identifier)); return identifier; } template com_array impl_INDTransmitterProperties::SupportedFeatures() const { com_array featureSets {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedFeatures(put_size(featureSets), put(featureSets))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_SupportedFeatures(impl::put_size_abi(featureSets), put_abi(featureSets))); return featureSets; } template uint32_t impl_INDTransmitterProperties::SecurityLevel() const { uint32_t level {}; - check_hresult(static_cast(static_cast(*this))->get_SecurityLevel(&level)); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_SecurityLevel(&level)); return level; } template uint32_t impl_INDTransmitterProperties::SecurityVersion() const { uint32_t securityVersion {}; - check_hresult(static_cast(static_cast(*this))->get_SecurityVersion(&securityVersion)); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_SecurityVersion(&securityVersion)); return securityVersion; } template Windows::Foundation::DateTime impl_INDTransmitterProperties::ExpirationDate() const { Windows::Foundation::DateTime expirationDate {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(expirationDate))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ExpirationDate(put_abi(expirationDate))); return expirationDate; } template com_array impl_INDTransmitterProperties::ClientID() const { com_array clientIDBytes {}; - check_hresult(static_cast(static_cast(*this))->get_ClientID(put_size(clientIDBytes), put(clientIDBytes))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ClientID(impl::put_size_abi(clientIDBytes), put_abi(clientIDBytes))); return clientIDBytes; } template com_array impl_INDTransmitterProperties::ModelDigest() const { com_array modelDigestBytes {}; - check_hresult(static_cast(static_cast(*this))->get_ModelDigest(put_size(modelDigestBytes), put(modelDigestBytes))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ModelDigest(impl::put_size_abi(modelDigestBytes), put_abi(modelDigestBytes))); return modelDigestBytes; } template hstring impl_INDTransmitterProperties::ModelManufacturerName() const { hstring modelManufacturerName; - check_hresult(static_cast(static_cast(*this))->get_ModelManufacturerName(put(modelManufacturerName))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ModelManufacturerName(put_abi(modelManufacturerName))); return modelManufacturerName; } template hstring impl_INDTransmitterProperties::ModelName() const { hstring modelName; - check_hresult(static_cast(static_cast(*this))->get_ModelName(put(modelName))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ModelName(put_abi(modelName))); return modelName; } template hstring impl_INDTransmitterProperties::ModelNumber() const { hstring modelNumber; - check_hresult(static_cast(static_cast(*this))->get_ModelNumber(put(modelNumber))); + check_hresult(WINRT_SHIM(INDTransmitterProperties)->get_ModelNumber(put_abi(modelNumber))); return modelNumber; } template Windows::Media::Core::MediaStreamSource impl_INDStartResult::MediaStreamSource() const { Windows::Media::Core::MediaStreamSource mediaStreamSource { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaStreamSource(put(mediaStreamSource))); + check_hresult(WINRT_SHIM(INDStartResult)->get_MediaStreamSource(put_abi(mediaStreamSource))); return mediaStreamSource; } template Windows::Media::Protection::PlayReady::INDCustomData impl_INDLicenseFetchResult::ResponseCustomData() const { Windows::Media::Protection::PlayReady::INDCustomData customData; - check_hresult(static_cast(static_cast(*this))->get_ResponseCustomData(put(customData))); + check_hresult(WINRT_SHIM(INDLicenseFetchResult)->get_ResponseCustomData(put_abi(customData))); return customData; } -template Windows::Media::Protection::PlayReady::NDLicenseFetchDescriptor impl_INDLicenseFetchDescriptorFactory::CreateInstance(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, array_ref contentIDBytes, const Windows::Media::Protection::PlayReady::INDCustomData & licenseFetchChallengeCustomData) const +template Windows::Media::Protection::PlayReady::NDLicenseFetchDescriptor impl_INDLicenseFetchDescriptorFactory::CreateInstance(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, array_view contentIDBytes, const Windows::Media::Protection::PlayReady::INDCustomData & licenseFetchChallengeCustomData) const { Windows::Media::Protection::PlayReady::NDLicenseFetchDescriptor instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(contentIDType, contentIDBytes.size(), get(contentIDBytes), get(licenseFetchChallengeCustomData), put(instance))); + check_hresult(WINRT_SHIM(INDLicenseFetchDescriptorFactory)->abi_CreateInstance(contentIDType, contentIDBytes.size(), get_abi(contentIDBytes), get_abi(licenseFetchChallengeCustomData), put_abi(instance))); return instance; } template Windows::Media::Protection::PlayReady::INDCustomData impl_INDRegistrationCompletedEventArgs::ResponseCustomData() const { Windows::Media::Protection::PlayReady::INDCustomData customData; - check_hresult(static_cast(static_cast(*this))->get_ResponseCustomData(put(customData))); + check_hresult(WINRT_SHIM(INDRegistrationCompletedEventArgs)->get_ResponseCustomData(put_abi(customData))); return customData; } template Windows::Media::Protection::PlayReady::INDTransmitterProperties impl_INDRegistrationCompletedEventArgs::TransmitterProperties() const { Windows::Media::Protection::PlayReady::INDTransmitterProperties transmitterProperties; - check_hresult(static_cast(static_cast(*this))->get_TransmitterProperties(put(transmitterProperties))); + check_hresult(WINRT_SHIM(INDRegistrationCompletedEventArgs)->get_TransmitterProperties(put_abi(transmitterProperties))); return transmitterProperties; } template bool impl_INDRegistrationCompletedEventArgs::TransmitterCertificateAccepted() const { bool acceptpt {}; - check_hresult(static_cast(static_cast(*this))->get_TransmitterCertificateAccepted(&acceptpt)); + check_hresult(WINRT_SHIM(INDRegistrationCompletedEventArgs)->get_TransmitterCertificateAccepted(&acceptpt)); return acceptpt; } template void impl_INDRegistrationCompletedEventArgs::TransmitterCertificateAccepted(bool accept) const { - check_hresult(static_cast(static_cast(*this))->put_TransmitterCertificateAccepted(accept)); + check_hresult(WINRT_SHIM(INDRegistrationCompletedEventArgs)->put_TransmitterCertificateAccepted(accept)); } -template Windows::Media::Protection::PlayReady::NDCustomData impl_INDCustomDataFactory::CreateInstance(array_ref customDataTypeIDBytes, array_ref customDataBytes) const +template Windows::Media::Protection::PlayReady::NDCustomData impl_INDCustomDataFactory::CreateInstance(array_view customDataTypeIDBytes, array_view customDataBytes) const { Windows::Media::Protection::PlayReady::NDCustomData instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(customDataTypeIDBytes.size(), get(customDataTypeIDBytes), customDataBytes.size(), get(customDataBytes), put(instance))); + check_hresult(WINRT_SHIM(INDCustomDataFactory)->abi_CreateInstance(customDataTypeIDBytes.size(), get_abi(customDataTypeIDBytes), customDataBytes.size(), get_abi(customDataBytes), put_abi(instance))); return instance; } template uint32_t impl_INDProximityDetectionCompletedEventArgs::ProximityDetectionRetryCount() const { uint32_t retryCount {}; - check_hresult(static_cast(static_cast(*this))->get_ProximityDetectionRetryCount(&retryCount)); + check_hresult(WINRT_SHIM(INDProximityDetectionCompletedEventArgs)->get_ProximityDetectionRetryCount(&retryCount)); return retryCount; } template Windows::Media::Protection::PlayReady::INDCustomData impl_INDLicenseFetchCompletedEventArgs::ResponseCustomData() const { Windows::Media::Protection::PlayReady::INDCustomData customData; - check_hresult(static_cast(static_cast(*this))->get_ResponseCustomData(put(customData))); + check_hresult(WINRT_SHIM(INDLicenseFetchCompletedEventArgs)->get_ResponseCustomData(put_abi(customData))); return customData; } template event_token impl_INDClient::RegistrationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RegistrationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(INDClient)->add_RegistrationCompleted(get_abi(handler), &token)); return token; } @@ -3168,13 +3333,13 @@ template event_revoker impl_INDClient::RegistrationCo template void impl_INDClient::RegistrationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RegistrationCompleted(token)); + check_hresult(WINRT_SHIM(INDClient)->remove_RegistrationCompleted(token)); } template event_token impl_INDClient::ProximityDetectionCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProximityDetectionCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(INDClient)->add_ProximityDetectionCompleted(get_abi(handler), &token)); return token; } @@ -3185,13 +3350,13 @@ template event_revoker impl_INDClient::ProximityDetec template void impl_INDClient::ProximityDetectionCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProximityDetectionCompleted(token)); + check_hresult(WINRT_SHIM(INDClient)->remove_ProximityDetectionCompleted(token)); } template event_token impl_INDClient::LicenseFetchCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LicenseFetchCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(INDClient)->add_LicenseFetchCompleted(get_abi(handler), &token)); return token; } @@ -3202,30 +3367,30 @@ template event_revoker impl_INDClient::LicenseFetchCo template void impl_INDClient::LicenseFetchCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LicenseFetchCompleted(token)); + check_hresult(WINRT_SHIM(INDClient)->remove_LicenseFetchCompleted(token)); } -template event_token impl_INDClient::ReRegistrationNeeded(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_INDClient::ReRegistrationNeeded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ReRegistrationNeeded(get(handler), &token)); + check_hresult(WINRT_SHIM(INDClient)->add_ReRegistrationNeeded(get_abi(handler), &token)); return token; } -template event_revoker impl_INDClient::ReRegistrationNeeded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_INDClient::ReRegistrationNeeded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Protection::PlayReady::INDClient::remove_ReRegistrationNeeded, ReRegistrationNeeded(handler)); } template void impl_INDClient::ReRegistrationNeeded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ReRegistrationNeeded(token)); + check_hresult(WINRT_SHIM(INDClient)->remove_ReRegistrationNeeded(token)); } template event_token impl_INDClient::ClosedCaptionDataReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ClosedCaptionDataReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(INDClient)->add_ClosedCaptionDataReceived(get_abi(handler), &token)); return token; } @@ -3236,264 +3401,264 @@ template event_revoker impl_INDClient::ClosedCaptionD template void impl_INDClient::ClosedCaptionDataReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ClosedCaptionDataReceived(token)); + check_hresult(WINRT_SHIM(INDClient)->remove_ClosedCaptionDataReceived(token)); } template Windows::Foundation::IAsyncOperation impl_INDClient::StartAsync(const Windows::Foundation::Uri & contentUrl, uint32_t startAsyncOptions, const Windows::Media::Protection::PlayReady::INDCustomData & registrationCustomData, const Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptor & licenseFetchDescriptor) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(get(contentUrl), startAsyncOptions, get(registrationCustomData), get(licenseFetchDescriptor), put(result))); + check_hresult(WINRT_SHIM(INDClient)->abi_StartAsync(get_abi(contentUrl), startAsyncOptions, get_abi(registrationCustomData), get_abi(licenseFetchDescriptor), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_INDClient::LicenseFetchAsync(const Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptor & licenseFetchDescriptor) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_LicenseFetchAsync(get(licenseFetchDescriptor), put(result))); + check_hresult(WINRT_SHIM(INDClient)->abi_LicenseFetchAsync(get_abi(licenseFetchDescriptor), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_INDClient::ReRegistrationAsync(const Windows::Media::Protection::PlayReady::INDCustomData & registrationCustomData) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReRegistrationAsync(get(registrationCustomData), put(result))); + check_hresult(WINRT_SHIM(INDClient)->abi_ReRegistrationAsync(get_abi(registrationCustomData), put_abi(result))); return result; } template void impl_INDClient::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(INDClient)->abi_Close()); } template Windows::Media::Protection::PlayReady::NDClosedCaptionFormat impl_INDClosedCaptionDataReceivedEventArgs::ClosedCaptionDataFormat() const { Windows::Media::Protection::PlayReady::NDClosedCaptionFormat ccForamt {}; - check_hresult(static_cast(static_cast(*this))->get_ClosedCaptionDataFormat(&ccForamt)); + check_hresult(WINRT_SHIM(INDClosedCaptionDataReceivedEventArgs)->get_ClosedCaptionDataFormat(&ccForamt)); return ccForamt; } template int64_t impl_INDClosedCaptionDataReceivedEventArgs::PresentationTimestamp() const { int64_t presentationTimestamp {}; - check_hresult(static_cast(static_cast(*this))->get_PresentationTimestamp(&presentationTimestamp)); + check_hresult(WINRT_SHIM(INDClosedCaptionDataReceivedEventArgs)->get_PresentationTimestamp(&presentationTimestamp)); return presentationTimestamp; } template com_array impl_INDClosedCaptionDataReceivedEventArgs::ClosedCaptionData() const { com_array ccDataBytes {}; - check_hresult(static_cast(static_cast(*this))->get_ClosedCaptionData(put_size(ccDataBytes), put(ccDataBytes))); + check_hresult(WINRT_SHIM(INDClosedCaptionDataReceivedEventArgs)->get_ClosedCaptionData(impl::put_size_abi(ccDataBytes), put_abi(ccDataBytes))); return ccDataBytes; } template Windows::Media::Protection::PlayReady::NDClient impl_INDClientFactory::CreateInstance(const Windows::Media::Protection::PlayReady::INDDownloadEngine & downloadEngine, const Windows::Media::Protection::PlayReady::INDStreamParser & streamParser, const Windows::Media::Protection::PlayReady::INDMessenger & pMessenger) const { Windows::Media::Protection::PlayReady::NDClient instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(downloadEngine), get(streamParser), get(pMessenger), put(instance))); + check_hresult(WINRT_SHIM(INDClientFactory)->abi_CreateInstance(get_abi(downloadEngine), get_abi(streamParser), get_abi(pMessenger), put_abi(instance))); return instance; } template Windows::Foundation::Collections::IVector impl_INDStorageFileHelper::GetFileURLs(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::Collections::IVector fileURLs; - check_hresult(static_cast(static_cast(*this))->abi_GetFileURLs(get(file), put(fileURLs))); + check_hresult(WINRT_SHIM(INDStorageFileHelper)->abi_GetFileURLs(get_abi(file), put_abi(fileURLs))); return fileURLs; } template Windows::Foundation::Uri impl_IPlayReadyServiceRequest::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->get_Uri(put_abi(value))); return value; } template void impl_IPlayReadyServiceRequest::Uri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(value))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->put_Uri(get_abi(value))); } template hstring impl_IPlayReadyServiceRequest::ResponseCustomData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResponseCustomData(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->get_ResponseCustomData(put_abi(value))); return value; } template hstring impl_IPlayReadyServiceRequest::ChallengeCustomData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ChallengeCustomData(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->get_ChallengeCustomData(put_abi(value))); return value; } -template void impl_IPlayReadyServiceRequest::ChallengeCustomData(hstring_ref value) const +template void impl_IPlayReadyServiceRequest::ChallengeCustomData(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ChallengeCustomData(get(value))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->put_ChallengeCustomData(get_abi(value))); } template Windows::Foundation::IAsyncAction impl_IPlayReadyServiceRequest::BeginServiceRequest() const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_BeginServiceRequest(put(action))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->abi_BeginServiceRequest(put_abi(action))); return action; } template Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest impl_IPlayReadyServiceRequest::NextServiceRequest() const { Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest serviceRequest; - check_hresult(static_cast(static_cast(*this))->abi_NextServiceRequest(put(serviceRequest))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->abi_NextServiceRequest(put_abi(serviceRequest))); return serviceRequest; } template Windows::Media::Protection::PlayReady::PlayReadySoapMessage impl_IPlayReadyServiceRequest::GenerateManualEnablingChallenge() const { Windows::Media::Protection::PlayReady::PlayReadySoapMessage challengeMessage { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GenerateManualEnablingChallenge(put(challengeMessage))); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->abi_GenerateManualEnablingChallenge(put_abi(challengeMessage))); return challengeMessage; } -template HRESULT impl_IPlayReadyServiceRequest::ProcessManualEnablingResponse(array_ref responseBytes) const +template HRESULT impl_IPlayReadyServiceRequest::ProcessManualEnablingResponse(array_view responseBytes) const { HRESULT result {}; - check_hresult(static_cast(static_cast(*this))->abi_ProcessManualEnablingResponse(responseBytes.size(), get(responseBytes), &result)); + check_hresult(WINRT_SHIM(IPlayReadyServiceRequest)->abi_ProcessManualEnablingResponse(responseBytes.size(), get_abi(responseBytes), &result)); return result; } template GUID impl_IPlayReadyDomainJoinServiceRequest::DomainAccountId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainAccountId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->get_DomainAccountId(&value)); return value; } template void impl_IPlayReadyDomainJoinServiceRequest::DomainAccountId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainAccountId(value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->put_DomainAccountId(value)); } template hstring impl_IPlayReadyDomainJoinServiceRequest::DomainFriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DomainFriendlyName(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->get_DomainFriendlyName(put_abi(value))); return value; } -template void impl_IPlayReadyDomainJoinServiceRequest::DomainFriendlyName(hstring_ref value) const +template void impl_IPlayReadyDomainJoinServiceRequest::DomainFriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainFriendlyName(get(value))); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->put_DomainFriendlyName(get_abi(value))); } template GUID impl_IPlayReadyDomainJoinServiceRequest::DomainServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainServiceId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->get_DomainServiceId(&value)); return value; } template void impl_IPlayReadyDomainJoinServiceRequest::DomainServiceId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainServiceId(value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainJoinServiceRequest)->put_DomainServiceId(value)); } template GUID impl_IPlayReadyDomainLeaveServiceRequest::DomainAccountId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainAccountId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainLeaveServiceRequest)->get_DomainAccountId(&value)); return value; } template void impl_IPlayReadyDomainLeaveServiceRequest::DomainAccountId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainAccountId(value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainLeaveServiceRequest)->put_DomainAccountId(value)); } template GUID impl_IPlayReadyDomainLeaveServiceRequest::DomainServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainServiceId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainLeaveServiceRequest)->get_DomainServiceId(&value)); return value; } template void impl_IPlayReadyDomainLeaveServiceRequest::DomainServiceId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainServiceId(value)); + check_hresult(WINRT_SHIM(IPlayReadyDomainLeaveServiceRequest)->put_DomainServiceId(value)); } template Windows::Media::Protection::PlayReady::PlayReadyContentHeader impl_IPlayReadyLicenseAcquisitionServiceRequest::ContentHeader() const { Windows::Media::Protection::PlayReady::PlayReadyContentHeader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentHeader(put(value))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseAcquisitionServiceRequest)->get_ContentHeader(put_abi(value))); return value; } template void impl_IPlayReadyLicenseAcquisitionServiceRequest::ContentHeader(const Windows::Media::Protection::PlayReady::PlayReadyContentHeader & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentHeader(get(value))); + check_hresult(WINRT_SHIM(IPlayReadyLicenseAcquisitionServiceRequest)->put_ContentHeader(get_abi(value))); } template GUID impl_IPlayReadyLicenseAcquisitionServiceRequest::DomainServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainServiceId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicenseAcquisitionServiceRequest)->get_DomainServiceId(&value)); return value; } template void impl_IPlayReadyLicenseAcquisitionServiceRequest::DomainServiceId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainServiceId(value)); + check_hresult(WINRT_SHIM(IPlayReadyLicenseAcquisitionServiceRequest)->put_DomainServiceId(value)); } template GUID impl_IPlayReadyLicenseAcquisitionServiceRequest2::SessionId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionId(&value)); + check_hresult(WINRT_SHIM(IPlayReadyLicenseAcquisitionServiceRequest2)->get_SessionId(&value)); return value; } template com_array impl_IPlayReadyMeteringReportServiceRequest::MeteringCertificate() const { com_array meteringCertBytes {}; - check_hresult(static_cast(static_cast(*this))->get_MeteringCertificate(put_size(meteringCertBytes), put(meteringCertBytes))); + check_hresult(WINRT_SHIM(IPlayReadyMeteringReportServiceRequest)->get_MeteringCertificate(impl::put_size_abi(meteringCertBytes), put_abi(meteringCertBytes))); return meteringCertBytes; } -template void impl_IPlayReadyMeteringReportServiceRequest::MeteringCertificate(array_ref meteringCertBytes) const +template void impl_IPlayReadyMeteringReportServiceRequest::MeteringCertificate(array_view meteringCertBytes) const { - check_hresult(static_cast(static_cast(*this))->put_MeteringCertificate(meteringCertBytes.size(), get(meteringCertBytes))); + check_hresult(WINRT_SHIM(IPlayReadyMeteringReportServiceRequest)->put_MeteringCertificate(meteringCertBytes.size(), get_abi(meteringCertBytes))); } template GUID impl_IPlayReadySecureStopServiceRequest::SessionID() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_SessionID(&value)); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequest)->get_SessionID(&value)); return value; } template Windows::Foundation::DateTime impl_IPlayReadySecureStopServiceRequest::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequest)->get_StartTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPlayReadySecureStopServiceRequest::UpdateTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateTime(put(value))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequest)->get_UpdateTime(put_abi(value))); return value; } template bool impl_IPlayReadySecureStopServiceRequest::Stopped() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Stopped(&value)); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequest)->get_Stopped(&value)); return value; } template com_array impl_IPlayReadySecureStopServiceRequest::PublisherCertificate() const { com_array publisherCertBytes {}; - check_hresult(static_cast(static_cast(*this))->get_PublisherCertificate(put_size(publisherCertBytes), put(publisherCertBytes))); + check_hresult(WINRT_SHIM(IPlayReadySecureStopServiceRequest)->get_PublisherCertificate(impl::put_size_abi(publisherCertBytes), put_abi(publisherCertBytes))); return publisherCertBytes; } @@ -3501,7 +3666,7 @@ inline NDClient::NDClient(const Windows::Media::Protection::PlayReady::INDDownlo NDClient(get_activation_factory().CreateInstance(downloadEngine, streamParser, pMessenger)) {} -inline NDCustomData::NDCustomData(array_ref customDataTypeIDBytes, array_ref customDataBytes) : +inline NDCustomData::NDCustomData(array_view customDataTypeIDBytes, array_view customDataBytes) : NDCustomData(get_activation_factory().CreateInstance(customDataTypeIDBytes, customDataBytes)) {} @@ -3509,7 +3674,7 @@ inline NDDownloadEngineNotifier::NDDownloadEngineNotifier() : NDDownloadEngineNotifier(activate_instance()) {} -inline NDLicenseFetchDescriptor::NDLicenseFetchDescriptor(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, array_ref contentIDBytes, const Windows::Media::Protection::PlayReady::INDCustomData & licenseFetchChallengeCustomData) : +inline NDLicenseFetchDescriptor::NDLicenseFetchDescriptor(Windows::Media::Protection::PlayReady::NDContentIDType contentIDType, array_view contentIDBytes, const Windows::Media::Protection::PlayReady::INDCustomData & licenseFetchChallengeCustomData) : NDLicenseFetchDescriptor(get_activation_factory().CreateInstance(contentIDType, contentIDBytes, licenseFetchChallengeCustomData)) {} @@ -3521,23 +3686,23 @@ inline NDStreamParserNotifier::NDStreamParserNotifier() : NDStreamParserNotifier(activate_instance()) {} -inline NDTCPMessenger::NDTCPMessenger(hstring_ref remoteHostName, uint32_t remoteHostPort) : +inline NDTCPMessenger::NDTCPMessenger(hstring_view remoteHostName, uint32_t remoteHostPort) : NDTCPMessenger(get_activation_factory().CreateInstance(remoteHostName, remoteHostPort)) {} -inline PlayReadyContentHeader::PlayReadyContentHeader(array_ref headerBytes, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) : +inline PlayReadyContentHeader::PlayReadyContentHeader(array_view headerBytes, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) : PlayReadyContentHeader(get_activation_factory().CreateInstanceFromWindowsMediaDrmHeader(headerBytes, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId)) {} -inline PlayReadyContentHeader::PlayReadyContentHeader(GUID contentKeyId, hstring_ref contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) : +inline PlayReadyContentHeader::PlayReadyContentHeader(GUID contentKeyId, hstring_view contentKeyIdString, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) : PlayReadyContentHeader(get_activation_factory().CreateInstanceFromComponents(contentKeyId, contentKeyIdString, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId)) {} -inline PlayReadyContentHeader::PlayReadyContentHeader(array_ref headerBytes) : +inline PlayReadyContentHeader::PlayReadyContentHeader(array_view headerBytes) : PlayReadyContentHeader(get_activation_factory().CreateInstanceFromPlayReadyHeader(headerBytes)) {} -inline PlayReadyContentHeader::PlayReadyContentHeader(uint32_t dwFlags, array_ref contentKeyIds, array_ref contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_ref customAttributes, GUID domainServiceId) : +inline PlayReadyContentHeader::PlayReadyContentHeader(uint32_t dwFlags, array_view contentKeyIds, array_view contentKeyIdStrings, Windows::Media::Protection::PlayReady::PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, const Windows::Foundation::Uri & licenseAcquisitionUrl, const Windows::Foundation::Uri & licenseAcquisitionUserInterfaceUrl, hstring_view customAttributes, GUID domainServiceId) : PlayReadyContentHeader(get_activation_factory().CreateInstanceFromComponents2(dwFlags, contentKeyIds, contentKeyIdStrings, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId)) {} @@ -3595,15 +3760,15 @@ inline PlayReadyRevocationServiceRequest::PlayReadyRevocationServiceRequest() : PlayReadyRevocationServiceRequest(activate_instance()) {} -inline PlayReadySecureStopIterable::PlayReadySecureStopIterable(array_ref publisherCertBytes) : +inline PlayReadySecureStopIterable::PlayReadySecureStopIterable(array_view publisherCertBytes) : PlayReadySecureStopIterable(get_activation_factory().CreateInstance(publisherCertBytes)) {} -inline PlayReadySecureStopServiceRequest::PlayReadySecureStopServiceRequest(array_ref publisherCertBytes) : +inline PlayReadySecureStopServiceRequest::PlayReadySecureStopServiceRequest(array_view publisherCertBytes) : PlayReadySecureStopServiceRequest(get_activation_factory().CreateInstance(publisherCertBytes)) {} -inline PlayReadySecureStopServiceRequest::PlayReadySecureStopServiceRequest(GUID sessionID, array_ref publisherCertBytes) : +inline PlayReadySecureStopServiceRequest::PlayReadySecureStopServiceRequest(GUID sessionID, array_view publisherCertBytes) : PlayReadySecureStopServiceRequest(get_activation_factory().CreateInstanceFromSessionID(sessionID, publisherCertBytes)) {} @@ -3675,3 +3840,689 @@ inline GUID PlayReadyStatics::ProtectionSystemId() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDClient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDClientFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDClosedCaptionDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDCustomData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDCustomDataFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDDownloadEngine & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDDownloadEngineNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDLicenseFetchCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDLicenseFetchDescriptorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDLicenseFetchResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDMessenger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDProximityDetectionCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDRegistrationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDSendResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDStartResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDStorageFileHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDStreamParser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDStreamParserNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDTCPMessengerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::INDTransmitterProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyContentHeader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyContentHeader2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyContentHeaderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyContentHeaderFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyContentResolver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyDomain & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyDomainIterableFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyDomainJoinServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyDomainLeaveServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyITADataGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyIndividualizationServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseAcquisitionServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseAcquisitionServiceRequest2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseIterableFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseManagement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyLicenseSessionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyMeteringReportServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyRevocationServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadySecureStopIterableFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadySecureStopServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadySecureStopServiceRequestFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadySoapMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::IPlayReadyStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDClient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDCustomData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDDownloadEngineNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDLicenseFetchDescriptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDStorageFileHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDStreamParserNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::NDTCPMessenger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyContentHeader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyDomain & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyDomainIterable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyDomainIterator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyDomainJoinServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyDomainLeaveServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyITADataGenerator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyIndividualizationServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyLicenseAcquisitionServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyLicenseIterable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyLicenseIterator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyLicenseSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyMeteringReportServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadyRevocationServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadySecureStopIterable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadySecureStopIterator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadySecureStopServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::PlayReady::PlayReadySoapMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Protection.h b/10.0.14393.0/winrt/Windows.Media.Protection.h index d80a474e5..6bbdac8b9 100644 --- a/10.0.14393.0/winrt/Windows.Media.Protection.h +++ b/10.0.14393.0/winrt/Windows.Media.Protection.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Media.Playback.3.h" #include "internal/Windows.Foundation.3.h" @@ -28,7 +31,7 @@ template ComponentLoadFailedEventHandler::ComponentLoad inline void ComponentLoadFailedEventHandler::operator()(const Windows::Media::Protection::MediaProtectionManager & sender, const Windows::Media::Protection::ComponentLoadFailedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template RebootNeededEventHandler::RebootNeededEventHandler(L lambda) : @@ -45,7 +48,7 @@ template RebootNeededEventHandler::RebootNeededEventHan inline void RebootNeededEventHandler::operator()(const Windows::Media::Protection::MediaProtectionManager & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template ServiceRequestedEventHandler::ServiceRequestedEventHandler(L lambda) : @@ -62,7 +65,7 @@ template ServiceRequestedEventHandler::ServiceRequested inline void ServiceRequestedEventHandler::operator()(const Windows::Media::Protection::MediaProtectionManager & sender, const Windows::Media::Protection::ServiceRequestedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -72,11 +75,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Information(abi_arg_out value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -86,11 +90,12 @@ struct produce : p } } - HRESULT __stdcall get_Completion(abi_arg_out value) noexcept override + HRESULT __stdcall get_Completion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Completion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Completion()); return S_OK; } catch (...) @@ -104,11 +109,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_RenewSystemComponentsAsync(abi_arg_in information, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RenewSystemComponentsAsync(impl::abi_arg_in information, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RenewSystemComponentsAsync(*reinterpret_cast(&information))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenewSystemComponentsAsync(*reinterpret_cast(&information))); return S_OK; } catch (...) @@ -126,7 +132,8 @@ struct produce : produce_baseshim().IsEffectiveProtectionAtLeast(protection)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEffectiveProtectionAtLeast(protection)); return S_OK; } catch (...) @@ -135,11 +142,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_GetEffectiveProtection(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetEffectiveProtection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetEffectiveProtection()); return S_OK; } catch (...) @@ -149,11 +157,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_SetDesiredMinProtectionAsync(Windows::Media::Protection::HdcpProtection protection, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SetDesiredMinProtectionAsync(protection)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SetDesiredMinProtectionAsync(protection)); return S_OK; } catch (...) @@ -163,11 +172,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProtectionChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProtectionChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProtectionChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -180,6 +190,7 @@ struct produce : produce_baseshim()); this->shim().ProtectionChanged(token); return S_OK; } @@ -193,11 +204,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_ServiceRequested(abi_arg_in handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ServiceRequested(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ServiceRequested(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ServiceRequested(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -210,6 +222,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceRequested(cookie); return S_OK; } @@ -219,11 +232,12 @@ struct produce : produce } } - HRESULT __stdcall add_RebootNeeded(abi_arg_in handler, event_token * cookie) noexcept override + HRESULT __stdcall add_RebootNeeded(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().RebootNeeded(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().RebootNeeded(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -236,6 +250,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RebootNeeded(cookie); return S_OK; } @@ -245,11 +260,12 @@ struct produce : produce } } - HRESULT __stdcall add_ComponentLoadFailed(abi_arg_in handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ComponentLoadFailed(impl::abi_arg_in handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ComponentLoadFailed(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ComponentLoadFailed(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -262,6 +278,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ComponentLoadFailed(cookie); return S_OK; } @@ -271,11 +288,12 @@ struct produce : produce } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -289,11 +307,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Properties(abi_arg_out ppProperties) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out ppProperties) noexcept override { try { - *ppProperties = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *ppProperties = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -307,11 +326,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreatePMPServer(abi_arg_in pProperties, abi_arg_out ppObject) noexcept override + HRESULT __stdcall abi_CreatePMPServer(impl::abi_arg_in pProperties, impl::abi_arg_out ppObject) noexcept override { try { - *ppObject = detach(this->shim().CreatePMPServer(*reinterpret_cast(&pProperties))); + typename D::abi_guard guard(this->shim()); + *ppObject = detach_abi(this->shim().CreatePMPServer(*reinterpret_cast(&pProperties))); return S_OK; } catch (...) @@ -329,6 +349,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(success); return S_OK; } @@ -346,7 +367,8 @@ struct produce : { try { - *system = detach(this->shim().ProtectionSystem()); + typename D::abi_guard guard(this->shim()); + *system = detach_abi(this->shim().ProtectionSystem()); return S_OK; } catch (...) @@ -359,7 +381,8 @@ struct produce : { try { - *type = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *type = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -372,11 +395,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_IsTypeSupported(abi_arg_in type, abi_arg_in keySystem, Windows::Media::Protection::ProtectionCapabilityResult * value) noexcept override + HRESULT __stdcall abi_IsTypeSupported(impl::abi_arg_in type, impl::abi_arg_in keySystem, Windows::Media::Protection::ProtectionCapabilityResult * value) noexcept override { try { - *value = detach(this->shim().IsTypeSupported(*reinterpret_cast(&type), *reinterpret_cast(&keySystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTypeSupported(*reinterpret_cast(&type), *reinterpret_cast(&keySystem))); return S_OK; } catch (...) @@ -389,11 +413,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> items) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> items) noexcept override { try { - *items = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -411,7 +436,8 @@ struct produce : produ { try { - *reasons = detach(this->shim().Reasons()); + typename D::abi_guard guard(this->shim()); + *reasons = detach_abi(this->shim().Reasons()); return S_OK; } catch (...) @@ -420,11 +446,12 @@ struct produce : produ } } - HRESULT __stdcall get_HeaderHash(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderHash(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderHash()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderHash()); return S_OK; } catch (...) @@ -434,11 +461,12 @@ struct produce : produ } } - HRESULT __stdcall get_PublicKeyHash(abi_arg_out value) noexcept override + HRESULT __stdcall get_PublicKeyHash(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PublicKeyHash()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PublicKeyHash()); return S_OK; } catch (...) @@ -448,11 +476,12 @@ struct produce : produ } } - HRESULT __stdcall get_Name(abi_arg_out name) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out name) noexcept override { try { - *name = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *name = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -462,11 +491,12 @@ struct produce : produ } } - HRESULT __stdcall get_RenewalId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RenewalId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RenewalId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RenewalId()); return S_OK; } catch (...) @@ -480,11 +510,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -494,11 +525,12 @@ struct produce : prod } } - HRESULT __stdcall get_Completion(abi_arg_out value) noexcept override + HRESULT __stdcall get_Completion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Completion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Completion()); return S_OK; } catch (...) @@ -512,11 +544,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_MediaPlaybackItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlaybackItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlaybackItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlaybackItem()); return S_OK; } catch (...) @@ -534,7 +567,7 @@ namespace Windows::Media::Protection { template event_token impl_IMediaProtectionManager::ServiceRequested(const Windows::Media::Protection::ServiceRequestedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ServiceRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->add_ServiceRequested(get_abi(handler), &cookie)); return cookie; } @@ -545,13 +578,13 @@ template event_revoker impl_IMediaProtecti template void impl_IMediaProtectionManager::ServiceRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ServiceRequested(cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->remove_ServiceRequested(cookie)); } template event_token impl_IMediaProtectionManager::RebootNeeded(const Windows::Media::Protection::RebootNeededEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_RebootNeeded(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->add_RebootNeeded(get_abi(handler), &cookie)); return cookie; } @@ -562,13 +595,13 @@ template event_revoker impl_IMediaProtecti template void impl_IMediaProtectionManager::RebootNeeded(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RebootNeeded(cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->remove_RebootNeeded(cookie)); } template event_token impl_IMediaProtectionManager::ComponentLoadFailed(const Windows::Media::Protection::ComponentLoadFailedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ComponentLoadFailed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->add_ComponentLoadFailed(get_abi(handler), &cookie)); return cookie; } @@ -579,175 +612,175 @@ template event_revoker impl_IMediaProtecti template void impl_IMediaProtectionManager::ComponentLoadFailed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ComponentLoadFailed(cookie)); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->remove_ComponentLoadFailed(cookie)); } template Windows::Foundation::Collections::IPropertySet impl_IMediaProtectionManager::Properties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IMediaProtectionManager)->get_Properties(put_abi(value))); return value; } template void impl_IMediaProtectionServiceCompletion::Complete(bool success) const { - check_hresult(static_cast(static_cast(*this))->abi_Complete(success)); + check_hresult(WINRT_SHIM(IMediaProtectionServiceCompletion)->abi_Complete(success)); } template Windows::Media::Protection::IMediaProtectionServiceRequest impl_IServiceRequestedEventArgs::Request() const { Windows::Media::Protection::IMediaProtectionServiceRequest value; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IServiceRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Media::Protection::MediaProtectionServiceCompletion impl_IServiceRequestedEventArgs::Completion() const { Windows::Media::Protection::MediaProtectionServiceCompletion value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Completion(put(value))); + check_hresult(WINRT_SHIM(IServiceRequestedEventArgs)->get_Completion(put_abi(value))); return value; } template GUID impl_IMediaProtectionServiceRequest::ProtectionSystem() const { GUID system {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionSystem(&system)); + check_hresult(WINRT_SHIM(IMediaProtectionServiceRequest)->get_ProtectionSystem(&system)); return system; } template GUID impl_IMediaProtectionServiceRequest::Type() const { GUID type {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&type)); + check_hresult(WINRT_SHIM(IMediaProtectionServiceRequest)->get_Type(&type)); return type; } template Windows::Media::Playback::MediaPlaybackItem impl_IServiceRequestedEventArgs2::MediaPlaybackItem() const { Windows::Media::Playback::MediaPlaybackItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlaybackItem(put(value))); + check_hresult(WINRT_SHIM(IServiceRequestedEventArgs2)->get_MediaPlaybackItem(put_abi(value))); return value; } template Windows::Media::Protection::RevocationAndRenewalInformation impl_IComponentLoadFailedEventArgs::Information() const { Windows::Media::Protection::RevocationAndRenewalInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IComponentLoadFailedEventArgs)->get_Information(put_abi(value))); return value; } template Windows::Media::Protection::MediaProtectionServiceCompletion impl_IComponentLoadFailedEventArgs::Completion() const { Windows::Media::Protection::MediaProtectionServiceCompletion value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Completion(put(value))); + check_hresult(WINRT_SHIM(IComponentLoadFailedEventArgs)->get_Completion(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IRevocationAndRenewalInformation::Items() const { Windows::Foundation::Collections::IVector items; - check_hresult(static_cast(static_cast(*this))->get_Items(put(items))); + check_hresult(WINRT_SHIM(IRevocationAndRenewalInformation)->get_Items(put_abi(items))); return items; } template Windows::Media::Protection::RevocationAndRenewalReasons impl_IRevocationAndRenewalItem::Reasons() const { Windows::Media::Protection::RevocationAndRenewalReasons reasons {}; - check_hresult(static_cast(static_cast(*this))->get_Reasons(&reasons)); + check_hresult(WINRT_SHIM(IRevocationAndRenewalItem)->get_Reasons(&reasons)); return reasons; } template hstring impl_IRevocationAndRenewalItem::HeaderHash() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderHash(put(value))); + check_hresult(WINRT_SHIM(IRevocationAndRenewalItem)->get_HeaderHash(put_abi(value))); return value; } template hstring impl_IRevocationAndRenewalItem::PublicKeyHash() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PublicKeyHash(put(value))); + check_hresult(WINRT_SHIM(IRevocationAndRenewalItem)->get_PublicKeyHash(put_abi(value))); return value; } template hstring impl_IRevocationAndRenewalItem::Name() const { hstring name; - check_hresult(static_cast(static_cast(*this))->get_Name(put(name))); + check_hresult(WINRT_SHIM(IRevocationAndRenewalItem)->get_Name(put_abi(name))); return name; } template hstring impl_IRevocationAndRenewalItem::RenewalId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RenewalId(put(value))); + check_hresult(WINRT_SHIM(IRevocationAndRenewalItem)->get_RenewalId(put_abi(value))); return value; } template Windows::Media::Protection::MediaProtectionPMPServer impl_IMediaProtectionPMPServerFactory::CreatePMPServer(const Windows::Foundation::Collections::IPropertySet & pProperties) const { Windows::Media::Protection::MediaProtectionPMPServer ppObject { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePMPServer(get(pProperties), put(ppObject))); + check_hresult(WINRT_SHIM(IMediaProtectionPMPServerFactory)->abi_CreatePMPServer(get_abi(pProperties), put_abi(ppObject))); return ppObject; } template Windows::Foundation::Collections::IPropertySet impl_IMediaProtectionPMPServer::Properties() const { Windows::Foundation::Collections::IPropertySet ppProperties; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(ppProperties))); + check_hresult(WINRT_SHIM(IMediaProtectionPMPServer)->get_Properties(put_abi(ppProperties))); return ppProperties; } -template Windows::Media::Protection::ProtectionCapabilityResult impl_IProtectionCapabilities::IsTypeSupported(hstring_ref type, hstring_ref keySystem) const +template Windows::Media::Protection::ProtectionCapabilityResult impl_IProtectionCapabilities::IsTypeSupported(hstring_view type, hstring_view keySystem) const { Windows::Media::Protection::ProtectionCapabilityResult value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsTypeSupported(get(type), get(keySystem), &value)); + check_hresult(WINRT_SHIM(IProtectionCapabilities)->abi_IsTypeSupported(get_abi(type), get_abi(keySystem), &value)); return value; } template bool impl_IHdcpSession::IsEffectiveProtectionAtLeast(Windows::Media::Protection::HdcpProtection protection) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEffectiveProtectionAtLeast(protection, &value)); + check_hresult(WINRT_SHIM(IHdcpSession)->abi_IsEffectiveProtectionAtLeast(protection, &value)); return value; } template Windows::Foundation::IReference impl_IHdcpSession::GetEffectiveProtection() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_GetEffectiveProtection(put(value))); + check_hresult(WINRT_SHIM(IHdcpSession)->abi_GetEffectiveProtection(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IHdcpSession::SetDesiredMinProtectionAsync(Windows::Media::Protection::HdcpProtection protection) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredMinProtectionAsync(protection, put(value))); + check_hresult(WINRT_SHIM(IHdcpSession)->abi_SetDesiredMinProtectionAsync(protection, put_abi(value))); return value; } -template event_token impl_IHdcpSession::ProtectionChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IHdcpSession::ProtectionChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProtectionChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IHdcpSession)->add_ProtectionChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IHdcpSession::ProtectionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IHdcpSession::ProtectionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::Protection::IHdcpSession::remove_ProtectionChanged, ProtectionChanged(handler)); } template void impl_IHdcpSession::ProtectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProtectionChanged(token)); + check_hresult(WINRT_SHIM(IHdcpSession)->remove_ProtectionChanged(token)); } template Windows::Foundation::IAsyncOperationWithProgress impl_IComponentRenewalStatics::RenewSystemComponentsAsync(const Windows::Media::Protection::RevocationAndRenewalInformation & information) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RenewSystemComponentsAsync(get(information), put(operation))); + check_hresult(WINRT_SHIM(IComponentRenewalStatics)->abi_RenewSystemComponentsAsync(get_abi(information), put_abi(operation))); return operation; } @@ -775,3 +808,203 @@ inline ProtectionCapabilities::ProtectionCapabilities() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IComponentLoadFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IComponentRenewalStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IHdcpSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IMediaProtectionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IMediaProtectionPMPServer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IMediaProtectionPMPServerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IMediaProtectionServiceCompletion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IMediaProtectionServiceRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IProtectionCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IRevocationAndRenewalInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IRevocationAndRenewalItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IServiceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::IServiceRequestedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::ComponentLoadFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::HdcpSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::MediaProtectionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::MediaProtectionPMPServer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::MediaProtectionServiceCompletion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::ProtectionCapabilities & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::RevocationAndRenewalInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::RevocationAndRenewalItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Protection::ServiceRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Render.h b/10.0.14393.0/winrt/Windows.Media.Render.h index a6f4133d7..71f952156 100644 --- a/10.0.14393.0/winrt/Windows.Media.Render.h +++ b/10.0.14393.0/winrt/Windows.Media.Render.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Media.Render.3.h" #include "Windows.Media.h" @@ -13,3 +16,5 @@ namespace impl { } } + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.SpeechRecognition.h b/10.0.14393.0/winrt/Windows.Media.SpeechRecognition.h index 58810b84f..6e056897f 100644 --- a/10.0.14393.0/winrt/Windows.Media.SpeechRecognition.h +++ b/10.0.14393.0/winrt/Windows.Media.SpeechRecognition.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.3.h" @@ -22,7 +25,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -35,11 +39,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Result(abi_arg_out value) noexcept override + HRESULT __stdcall get_Result(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -53,11 +58,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AutoStopSilenceTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoStopSilenceTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoStopSilenceTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoStopSilenceTimeout()); return S_OK; } catch (...) @@ -66,10 +72,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AutoStopSilenceTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoStopSilenceTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -79,11 +86,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -93,11 +101,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_StartWithModeAsync(Windows::Media::SpeechRecognition::SpeechContinuousRecognitionMode mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartAsync(mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartAsync(mode)); return S_OK; } catch (...) @@ -107,11 +116,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_StopAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StopAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopAsync()); return S_OK; } catch (...) @@ -121,11 +131,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_CancelAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CancelAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CancelAsync()); return S_OK; } catch (...) @@ -135,11 +146,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_PauseAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PauseAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PauseAsync()); return S_OK; } catch (...) @@ -153,6 +165,7 @@ struct produceshim()); this->shim().Resume(); return S_OK; } @@ -162,11 +175,12 @@ struct produce> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().Completed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Completed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -179,6 +193,7 @@ struct produceshim()); this->shim().Completed(value); return S_OK; } @@ -188,11 +203,12 @@ struct produce> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_ResultGenerated(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().ResultGenerated(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ResultGenerated(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -205,6 +221,7 @@ struct produceshim()); this->shim().ResultGenerated(value); return S_OK; } @@ -222,7 +239,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -239,7 +257,8 @@ struct produceshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -252,6 +271,7 @@ struct produceshim()); this->shim().IsEnabled(value); return S_OK; } @@ -261,11 +281,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -275,10 +296,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } @@ -292,7 +314,8 @@ struct produceshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -305,7 +328,8 @@ struct produceshim().Probability()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Probability()); return S_OK; } catch (...) @@ -318,6 +342,7 @@ struct produceshim()); this->shim().Probability(value); return S_OK; } @@ -331,11 +356,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_GrammarFile(abi_arg_out value) noexcept override + HRESULT __stdcall get_GrammarFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GrammarFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GrammarFile()); return S_OK; } catch (...) @@ -349,11 +375,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in file, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in file, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().Create(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().Create(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -363,11 +390,12 @@ struct produce file, abi_arg_in tag, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_CreateWithTag(impl::abi_arg_in file, impl::abi_arg_in tag, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().CreateWithTag(*reinterpret_cast(&file), *reinterpret_cast(&tag))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().CreateWithTag(*reinterpret_cast(&file), *reinterpret_cast(&tag))); return S_OK; } catch (...) @@ -381,11 +409,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -399,11 +428,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Hypothesis(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hypothesis(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hypothesis()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hypothesis()); return S_OK; } catch (...) @@ -417,11 +447,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Commands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -435,11 +466,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> commands, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> commands, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().Create(*reinterpret_cast *>(&commands))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().Create(*reinterpret_cast *>(&commands))); return S_OK; } catch (...) @@ -449,11 +481,12 @@ struct produce> commands, abi_arg_in tag, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_CreateWithTag(impl::abi_arg_in> commands, impl::abi_arg_in tag, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().CreateWithTag(*reinterpret_cast *>(&commands), *reinterpret_cast(&tag))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().CreateWithTag(*reinterpret_cast *>(&commands), *reinterpret_cast(&tag))); return S_OK; } catch (...) @@ -471,7 +504,8 @@ struct produceshim().Problem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Problem()); return S_OK; } catch (...) @@ -488,7 +522,8 @@ struct produce : { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -497,11 +532,12 @@ struct produce : } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -515,7 +551,8 @@ struct produce : { try { - *value = detach(this->shim().Confidence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Confidence()); return S_OK; } catch (...) @@ -524,11 +561,12 @@ struct produce : } } - HRESULT __stdcall get_SemanticInterpretation(abi_arg_out value) noexcept override + HRESULT __stdcall get_SemanticInterpretation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemanticInterpretation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemanticInterpretation()); return S_OK; } catch (...) @@ -538,11 +576,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAlternates(uint32_t maxAlternates, abi_arg_out> alternates) noexcept override + HRESULT __stdcall abi_GetAlternates(uint32_t maxAlternates, impl::abi_arg_out> alternates) noexcept override { try { - *alternates = detach(this->shim().GetAlternates(maxAlternates)); + typename D::abi_guard guard(this->shim()); + *alternates = detach_abi(this->shim().GetAlternates(maxAlternates)); return S_OK; } catch (...) @@ -552,11 +591,12 @@ struct produce : } } - HRESULT __stdcall get_Constraint(abi_arg_out value) noexcept override + HRESULT __stdcall get_Constraint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Constraint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Constraint()); return S_OK; } catch (...) @@ -566,11 +606,12 @@ struct produce : } } - HRESULT __stdcall get_RulePath(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RulePath(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RulePath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RulePath()); return S_OK; } catch (...) @@ -584,7 +625,8 @@ struct produce : { try { - *value = detach(this->shim().RawConfidence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawConfidence()); return S_OK; } catch (...) @@ -597,11 +639,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_PhraseStartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhraseStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhraseStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhraseStartTime()); return S_OK; } catch (...) @@ -610,11 +653,12 @@ struct produce } } - HRESULT __stdcall get_PhraseDuration(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhraseDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhraseDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhraseDuration()); return S_OK; } catch (...) @@ -627,11 +671,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Properties(abi_arg_out>> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -649,7 +694,8 @@ struct produceshim().Scenario()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scenario()); return S_OK; } catch (...) @@ -658,11 +704,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TopicHint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopicHint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopicHint()); return S_OK; } catch (...) @@ -676,11 +723,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, abi_arg_in topicHint, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_Create(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, impl::abi_arg_in topicHint, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().Create(scenario, *reinterpret_cast(&topicHint))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().Create(scenario, *reinterpret_cast(&topicHint))); return S_OK; } catch (...) @@ -690,11 +738,12 @@ struct produce topicHint, abi_arg_in tag, abi_arg_out constraint) noexcept override + HRESULT __stdcall abi_CreateWithTag(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, impl::abi_arg_in topicHint, impl::abi_arg_in tag, impl::abi_arg_out constraint) noexcept override { try { - *constraint = detach(this->shim().CreateWithTag(scenario, *reinterpret_cast(&topicHint), *reinterpret_cast(&tag))); + typename D::abi_guard guard(this->shim()); + *constraint = detach_abi(this->shim().CreateWithTag(scenario, *reinterpret_cast(&topicHint), *reinterpret_cast(&tag))); return S_OK; } catch (...) @@ -712,11 +761,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CurrentLanguage(abi_arg_out language) noexcept override + HRESULT __stdcall get_CurrentLanguage(impl::abi_arg_out language) noexcept override { try { - *language = detach(this->shim().CurrentLanguage()); + typename D::abi_guard guard(this->shim()); + *language = detach_abi(this->shim().CurrentLanguage()); return S_OK; } catch (...) @@ -726,11 +776,12 @@ struct produce : produc } } - HRESULT __stdcall get_Constraints(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Constraints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Constraints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Constraints()); return S_OK; } catch (...) @@ -740,11 +791,12 @@ struct produce : produc } } - HRESULT __stdcall get_Timeouts(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timeouts(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timeouts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timeouts()); return S_OK; } catch (...) @@ -754,11 +806,12 @@ struct produce : produc } } - HRESULT __stdcall get_UIOptions(abi_arg_out value) noexcept override + HRESULT __stdcall get_UIOptions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UIOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UIOptions()); return S_OK; } catch (...) @@ -768,11 +821,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CompileConstraintsAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_CompileConstraintsAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().CompileConstraintsAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().CompileConstraintsAsync()); return S_OK; } catch (...) @@ -782,11 +836,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RecognizeAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_RecognizeAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().RecognizeAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().RecognizeAsync()); return S_OK; } catch (...) @@ -796,11 +851,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RecognizeWithUIAsync(abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_RecognizeWithUIAsync(impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().RecognizeWithUIAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().RecognizeWithUIAsync()); return S_OK; } catch (...) @@ -810,11 +866,12 @@ struct produce : produc } } - HRESULT __stdcall add_RecognitionQualityDegrading(abi_arg_in> speechRecognitionQualityDegradingHandler, event_token * cookie) noexcept override + HRESULT __stdcall add_RecognitionQualityDegrading(impl::abi_arg_in> speechRecognitionQualityDegradingHandler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().RecognitionQualityDegrading(*reinterpret_cast *>(&speechRecognitionQualityDegradingHandler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().RecognitionQualityDegrading(*reinterpret_cast *>(&speechRecognitionQualityDegradingHandler))); return S_OK; } catch (...) @@ -827,6 +884,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RecognitionQualityDegrading(cookie); return S_OK; } @@ -836,11 +894,12 @@ struct produce : produc } } - HRESULT __stdcall add_StateChanged(abi_arg_in> stateChangedHandler, event_token * cookie) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> stateChangedHandler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StateChanged(*reinterpret_cast *>(&stateChangedHandler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&stateChangedHandler))); return S_OK; } catch (...) @@ -853,6 +912,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().StateChanged(cookie); return S_OK; } @@ -866,11 +926,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ContinuousRecognitionSession(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContinuousRecognitionSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContinuousRecognitionSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContinuousRecognitionSession()); return S_OK; } catch (...) @@ -884,7 +945,8 @@ struct produce : produ { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -893,11 +955,12 @@ struct produce : produ } } - HRESULT __stdcall abi_StopRecognitionAsync(abi_arg_out value) noexcept override + HRESULT __stdcall abi_StopRecognitionAsync(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StopRecognitionAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopRecognitionAsync()); return S_OK; } catch (...) @@ -907,11 +970,12 @@ struct produce : produ } } - HRESULT __stdcall add_HypothesisGenerated(abi_arg_in> value, event_token * returnValue) noexcept override + HRESULT __stdcall add_HypothesisGenerated(impl::abi_arg_in> value, event_token * returnValue) noexcept override { try { - *returnValue = detach(this->shim().HypothesisGenerated(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().HypothesisGenerated(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -924,6 +988,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().HypothesisGenerated(value); return S_OK; } @@ -937,11 +1002,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in language, abi_arg_out recognizer) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in language, impl::abi_arg_out recognizer) noexcept override { try { - *recognizer = detach(this->shim().Create(*reinterpret_cast(&language))); + typename D::abi_guard guard(this->shim()); + *recognizer = detach_abi(this->shim().Create(*reinterpret_cast(&language))); return S_OK; } catch (...) @@ -959,7 +1025,8 @@ struct produceshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -972,11 +1039,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SystemSpeechLanguage(abi_arg_out language) noexcept override + HRESULT __stdcall get_SystemSpeechLanguage(impl::abi_arg_out language) noexcept override { try { - *language = detach(this->shim().SystemSpeechLanguage()); + typename D::abi_guard guard(this->shim()); + *language = detach_abi(this->shim().SystemSpeechLanguage()); return S_OK; } catch (...) @@ -986,11 +1054,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedTopicLanguages(abi_arg_out> languages) noexcept override + HRESULT __stdcall get_SupportedTopicLanguages(impl::abi_arg_out> languages) noexcept override { try { - *languages = detach(this->shim().SupportedTopicLanguages()); + typename D::abi_guard guard(this->shim()); + *languages = detach_abi(this->shim().SupportedTopicLanguages()); return S_OK; } catch (...) @@ -1000,11 +1069,12 @@ struct produce : } } - HRESULT __stdcall get_SupportedGrammarLanguages(abi_arg_out> languages) noexcept override + HRESULT __stdcall get_SupportedGrammarLanguages(impl::abi_arg_out> languages) noexcept override { try { - *languages = detach(this->shim().SupportedGrammarLanguages()); + typename D::abi_guard guard(this->shim()); + *languages = detach_abi(this->shim().SupportedGrammarLanguages()); return S_OK; } catch (...) @@ -1018,11 +1088,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_InitialSilenceTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_InitialSilenceTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InitialSilenceTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialSilenceTimeout()); return S_OK; } catch (...) @@ -1031,10 +1102,11 @@ struct produce } } - HRESULT __stdcall put_InitialSilenceTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_InitialSilenceTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialSilenceTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -1044,11 +1116,12 @@ struct produce } } - HRESULT __stdcall get_EndSilenceTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndSilenceTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndSilenceTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndSilenceTimeout()); return S_OK; } catch (...) @@ -1057,10 +1130,11 @@ struct produce } } - HRESULT __stdcall put_EndSilenceTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_EndSilenceTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EndSilenceTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -1070,11 +1144,12 @@ struct produce } } - HRESULT __stdcall get_BabbleTimeout(abi_arg_out value) noexcept override + HRESULT __stdcall get_BabbleTimeout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BabbleTimeout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BabbleTimeout()); return S_OK; } catch (...) @@ -1083,10 +1158,11 @@ struct produce } } - HRESULT __stdcall put_BabbleTimeout(abi_arg_in value) noexcept override + HRESULT __stdcall put_BabbleTimeout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BabbleTimeout(*reinterpret_cast(&value)); return S_OK; } @@ -1100,11 +1176,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ExampleText(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExampleText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExampleText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExampleText()); return S_OK; } catch (...) @@ -1114,10 +1191,11 @@ struct produce } } - HRESULT __stdcall put_ExampleText(abi_arg_in value) noexcept override + HRESULT __stdcall put_ExampleText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExampleText(*reinterpret_cast(&value)); return S_OK; } @@ -1127,11 +1205,12 @@ struct produce } } - HRESULT __stdcall get_AudiblePrompt(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudiblePrompt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudiblePrompt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudiblePrompt()); return S_OK; } catch (...) @@ -1141,10 +1220,11 @@ struct produce } } - HRESULT __stdcall put_AudiblePrompt(abi_arg_in value) noexcept override + HRESULT __stdcall put_AudiblePrompt(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AudiblePrompt(*reinterpret_cast(&value)); return S_OK; } @@ -1158,7 +1238,8 @@ struct produce { try { - *value = detach(this->shim().IsReadBackEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadBackEnabled()); return S_OK; } catch (...) @@ -1171,6 +1252,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsReadBackEnabled(value); return S_OK; } @@ -1184,7 +1266,8 @@ struct produce { try { - *value = detach(this->shim().ShowConfirmation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowConfirmation()); return S_OK; } catch (...) @@ -1197,6 +1280,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowConfirmation(value); return S_OK; } @@ -1210,11 +1294,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_InstallCommandSetsFromStorageFileAsync(abi_arg_in file, abi_arg_out installAction) noexcept override + HRESULT __stdcall abi_InstallCommandSetsFromStorageFileAsync(impl::abi_arg_in file, impl::abi_arg_out installAction) noexcept override { try { - *installAction = detach(this->shim().InstallCommandSetsFromStorageFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *installAction = detach_abi(this->shim().InstallCommandSetsFromStorageFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -1224,11 +1309,12 @@ struct produce : pro } } - HRESULT __stdcall get_InstalledCommandSets(abi_arg_out> voiceCommandSets) noexcept override + HRESULT __stdcall get_InstalledCommandSets(impl::abi_arg_out> voiceCommandSets) noexcept override { try { - *voiceCommandSets = detach(this->shim().InstalledCommandSets()); + typename D::abi_guard guard(this->shim()); + *voiceCommandSets = detach_abi(this->shim().InstalledCommandSets()); return S_OK; } catch (...) @@ -1242,11 +1328,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1256,11 +1343,12 @@ struct produce : produce } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1270,11 +1358,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SetPhraseListAsync(abi_arg_in phraseListName, abi_arg_in> phraseList, abi_arg_out updateAction) noexcept override + HRESULT __stdcall abi_SetPhraseListAsync(impl::abi_arg_in phraseListName, impl::abi_arg_in> phraseList, impl::abi_arg_out updateAction) noexcept override { try { - *updateAction = detach(this->shim().SetPhraseListAsync(*reinterpret_cast(&phraseListName), *reinterpret_cast *>(&phraseList))); + typename D::abi_guard guard(this->shim()); + *updateAction = detach_abi(this->shim().SetPhraseListAsync(*reinterpret_cast(&phraseListName), *reinterpret_cast *>(&phraseList))); return S_OK; } catch (...) @@ -1292,351 +1381,351 @@ namespace Windows::Media::SpeechRecognition { template Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus impl_ISpeechRecognitionCompilationResult::Status() const { Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionCompilationResult)->get_Status(&value)); return value; } template Windows::Foundation::TimeSpan impl_ISpeechRecognizerTimeouts::InitialSilenceTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialSilenceTimeout(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->get_InitialSilenceTimeout(put_abi(value))); return value; } template void impl_ISpeechRecognizerTimeouts::InitialSilenceTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialSilenceTimeout(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->put_InitialSilenceTimeout(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISpeechRecognizerTimeouts::EndSilenceTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_EndSilenceTimeout(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->get_EndSilenceTimeout(put_abi(value))); return value; } template void impl_ISpeechRecognizerTimeouts::EndSilenceTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_EndSilenceTimeout(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->put_EndSilenceTimeout(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISpeechRecognizerTimeouts::BabbleTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_BabbleTimeout(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->get_BabbleTimeout(put_abi(value))); return value; } template void impl_ISpeechRecognizerTimeouts::BabbleTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_BabbleTimeout(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerTimeouts)->put_BabbleTimeout(get_abi(value))); } template hstring impl_ISpeechRecognizerUIOptions::ExampleText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExampleText(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->get_ExampleText(put_abi(value))); return value; } -template void impl_ISpeechRecognizerUIOptions::ExampleText(hstring_ref value) const +template void impl_ISpeechRecognizerUIOptions::ExampleText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ExampleText(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->put_ExampleText(get_abi(value))); } template hstring impl_ISpeechRecognizerUIOptions::AudiblePrompt() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AudiblePrompt(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->get_AudiblePrompt(put_abi(value))); return value; } -template void impl_ISpeechRecognizerUIOptions::AudiblePrompt(hstring_ref value) const +template void impl_ISpeechRecognizerUIOptions::AudiblePrompt(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AudiblePrompt(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->put_AudiblePrompt(get_abi(value))); } template bool impl_ISpeechRecognizerUIOptions::IsReadBackEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadBackEnabled(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->get_IsReadBackEnabled(&value)); return value; } template void impl_ISpeechRecognizerUIOptions::IsReadBackEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsReadBackEnabled(value)); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->put_IsReadBackEnabled(value)); } template bool impl_ISpeechRecognizerUIOptions::ShowConfirmation() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowConfirmation(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->get_ShowConfirmation(&value)); return value; } template void impl_ISpeechRecognizerUIOptions::ShowConfirmation(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowConfirmation(value)); + check_hresult(WINRT_SHIM(ISpeechRecognizerUIOptions)->put_ShowConfirmation(value)); } template Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus impl_ISpeechRecognitionResult::Status() const { Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_Status(&value)); return value; } template hstring impl_ISpeechRecognitionResult::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_Text(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionConfidence impl_ISpeechRecognitionResult::Confidence() const { Windows::Media::SpeechRecognition::SpeechRecognitionConfidence value {}; - check_hresult(static_cast(static_cast(*this))->get_Confidence(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_Confidence(&value)); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionSemanticInterpretation impl_ISpeechRecognitionResult::SemanticInterpretation() const { Windows::Media::SpeechRecognition::SpeechRecognitionSemanticInterpretation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SemanticInterpretation(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_SemanticInterpretation(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpeechRecognitionResult::GetAlternates(uint32_t maxAlternates) const { Windows::Foundation::Collections::IVectorView alternates; - check_hresult(static_cast(static_cast(*this))->abi_GetAlternates(maxAlternates, put(alternates))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->abi_GetAlternates(maxAlternates, put_abi(alternates))); return alternates; } template Windows::Media::SpeechRecognition::ISpeechRecognitionConstraint impl_ISpeechRecognitionResult::Constraint() const { Windows::Media::SpeechRecognition::ISpeechRecognitionConstraint value; - check_hresult(static_cast(static_cast(*this))->get_Constraint(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_Constraint(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpeechRecognitionResult::RulePath() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RulePath(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_RulePath(put_abi(value))); return value; } template double impl_ISpeechRecognitionResult::RawConfidence() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RawConfidence(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult)->get_RawConfidence(&value)); return value; } template bool impl_ISpeechRecognitionConstraint::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->get_IsEnabled(&value)); return value; } template void impl_ISpeechRecognitionConstraint::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->put_IsEnabled(value)); } template hstring impl_ISpeechRecognitionConstraint::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->get_Tag(put_abi(value))); return value; } -template void impl_ISpeechRecognitionConstraint::Tag(hstring_ref value) const +template void impl_ISpeechRecognitionConstraint::Tag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->put_Tag(get_abi(value))); } template Windows::Media::SpeechRecognition::SpeechRecognitionConstraintType impl_ISpeechRecognitionConstraint::Type() const { Windows::Media::SpeechRecognition::SpeechRecognitionConstraintType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->get_Type(&value)); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionConstraintProbability impl_ISpeechRecognitionConstraint::Probability() const { Windows::Media::SpeechRecognition::SpeechRecognitionConstraintProbability value {}; - check_hresult(static_cast(static_cast(*this))->get_Probability(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->get_Probability(&value)); return value; } template void impl_ISpeechRecognitionConstraint::Probability(Windows::Media::SpeechRecognition::SpeechRecognitionConstraintProbability value) const { - check_hresult(static_cast(static_cast(*this))->put_Probability(value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionConstraint)->put_Probability(value)); } template Windows::Foundation::DateTime impl_ISpeechRecognitionResult2::PhraseStartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_PhraseStartTime(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult2)->get_PhraseStartTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ISpeechRecognitionResult2::PhraseDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_PhraseDuration(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionResult2)->get_PhraseDuration(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView> impl_ISpeechRecognitionSemanticInterpretation::Properties() const { Windows::Foundation::Collections::IMapView> value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionSemanticInterpretation)->get_Properties(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionScenario impl_ISpeechRecognitionTopicConstraint::Scenario() const { Windows::Media::SpeechRecognition::SpeechRecognitionScenario value {}; - check_hresult(static_cast(static_cast(*this))->get_Scenario(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionTopicConstraint)->get_Scenario(&value)); return value; } template hstring impl_ISpeechRecognitionTopicConstraint::TopicHint() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TopicHint(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionTopicConstraint)->get_TopicHint(put_abi(value))); return value; } -template Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint impl_ISpeechRecognitionTopicConstraintFactory::Create(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_ref topicHint) const +template Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint impl_ISpeechRecognitionTopicConstraintFactory::Create(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_view topicHint) const { Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(scenario, get(topicHint), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionTopicConstraintFactory)->abi_Create(scenario, get_abi(topicHint), put_abi(constraint))); return constraint; } -template Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint impl_ISpeechRecognitionTopicConstraintFactory::CreateWithTag(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_ref topicHint, hstring_ref tag) const +template Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint impl_ISpeechRecognitionTopicConstraintFactory::CreateWithTag(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_view topicHint, hstring_view tag) const { Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTag(scenario, get(topicHint), get(tag), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionTopicConstraintFactory)->abi_CreateWithTag(scenario, get_abi(topicHint), get_abi(tag), put_abi(constraint))); return constraint; } template Windows::Foundation::Collections::IVector impl_ISpeechRecognitionListConstraint::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionListConstraint)->get_Commands(put_abi(value))); return value; } -template Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint impl_ISpeechRecognitionListConstraintFactory::Create(const Windows::Foundation::Collections::IIterable & commands) const +template Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint impl_ISpeechRecognitionListConstraintFactory::Create(iterable commands) const { Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(commands), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionListConstraintFactory)->abi_Create(get_abi(commands), put_abi(constraint))); return constraint; } -template Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint impl_ISpeechRecognitionListConstraintFactory::CreateWithTag(const Windows::Foundation::Collections::IIterable & commands, hstring_ref tag) const +template Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint impl_ISpeechRecognitionListConstraintFactory::CreateWithTag(iterable commands, hstring_view tag) const { Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTag(get(commands), get(tag), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionListConstraintFactory)->abi_CreateWithTag(get_abi(commands), get_abi(tag), put_abi(constraint))); return constraint; } template Windows::Storage::StorageFile impl_ISpeechRecognitionGrammarFileConstraint::GrammarFile() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GrammarFile(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionGrammarFileConstraint)->get_GrammarFile(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint impl_ISpeechRecognitionGrammarFileConstraintFactory::Create(const Windows::Storage::StorageFile & file) const { Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(file), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionGrammarFileConstraintFactory)->abi_Create(get_abi(file), put_abi(constraint))); return constraint; } -template Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint impl_ISpeechRecognitionGrammarFileConstraintFactory::CreateWithTag(const Windows::Storage::StorageFile & file, hstring_ref tag) const +template Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint impl_ISpeechRecognitionGrammarFileConstraintFactory::CreateWithTag(const Windows::Storage::StorageFile & file, hstring_view tag) const { Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint constraint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTag(get(file), get(tag), put(constraint))); + check_hresult(WINRT_SHIM(ISpeechRecognitionGrammarFileConstraintFactory)->abi_CreateWithTag(get_abi(file), get_abi(tag), put_abi(constraint))); return constraint; } template Windows::Media::SpeechRecognition::SpeechRecognitionAudioProblem impl_ISpeechRecognitionQualityDegradingEventArgs::Problem() const { Windows::Media::SpeechRecognition::SpeechRecognitionAudioProblem value {}; - check_hresult(static_cast(static_cast(*this))->get_Problem(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognitionQualityDegradingEventArgs)->get_Problem(&value)); return value; } template Windows::Media::SpeechRecognition::SpeechRecognizerState impl_ISpeechRecognizerStateChangedEventArgs::State() const { Windows::Media::SpeechRecognition::SpeechRecognizerState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognizerStateChangedEventArgs)->get_State(&value)); return value; } template Windows::Globalization::Language impl_ISpeechRecognizer::CurrentLanguage() const { Windows::Globalization::Language language { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentLanguage(put(language))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->get_CurrentLanguage(put_abi(language))); return language; } template Windows::Foundation::Collections::IVector impl_ISpeechRecognizer::Constraints() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Constraints(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->get_Constraints(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognizerTimeouts impl_ISpeechRecognizer::Timeouts() const { Windows::Media::SpeechRecognition::SpeechRecognizerTimeouts value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Timeouts(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->get_Timeouts(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognizerUIOptions impl_ISpeechRecognizer::UIOptions() const { Windows::Media::SpeechRecognition::SpeechRecognizerUIOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UIOptions(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->get_UIOptions(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISpeechRecognizer::CompileConstraintsAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_CompileConstraintsAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->abi_CompileConstraintsAsync(put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_ISpeechRecognizer::RecognizeAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_RecognizeAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->abi_RecognizeAsync(put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_ISpeechRecognizer::RecognizeWithUIAsync() const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_RecognizeWithUIAsync(put(asyncOperation))); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->abi_RecognizeWithUIAsync(put_abi(asyncOperation))); return asyncOperation; } template event_token impl_ISpeechRecognizer::RecognitionQualityDegrading(const Windows::Foundation::TypedEventHandler & speechRecognitionQualityDegradingHandler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_RecognitionQualityDegrading(get(speechRecognitionQualityDegradingHandler), &cookie)); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->add_RecognitionQualityDegrading(get_abi(speechRecognitionQualityDegradingHandler), &cookie)); return cookie; } @@ -1647,13 +1736,13 @@ template event_revoker impl_ISpeechRecognizer template void impl_ISpeechRecognizer::RecognitionQualityDegrading(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RecognitionQualityDegrading(cookie)); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->remove_RecognitionQualityDegrading(cookie)); } template event_token impl_ISpeechRecognizer::StateChanged(const Windows::Foundation::TypedEventHandler & stateChangedHandler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(stateChangedHandler), &cookie)); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->add_StateChanged(get_abi(stateChangedHandler), &cookie)); return cookie; } @@ -1664,62 +1753,62 @@ template event_revoker impl_ISpeechRecognizer template void impl_ISpeechRecognizer::StateChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(cookie)); + check_hresult(WINRT_SHIM(ISpeechRecognizer)->remove_StateChanged(cookie)); } template Windows::Media::SpeechRecognition::SpeechRecognizer impl_ISpeechRecognizerFactory::Create(const Windows::Globalization::Language & language) const { Windows::Media::SpeechRecognition::SpeechRecognizer recognizer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(language), put(recognizer))); + check_hresult(WINRT_SHIM(ISpeechRecognizerFactory)->abi_Create(get_abi(language), put_abi(recognizer))); return recognizer; } template Windows::Globalization::Language impl_ISpeechRecognizerStatics::SystemSpeechLanguage() const { Windows::Globalization::Language language { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SystemSpeechLanguage(put(language))); + check_hresult(WINRT_SHIM(ISpeechRecognizerStatics)->get_SystemSpeechLanguage(put_abi(language))); return language; } template Windows::Foundation::Collections::IVectorView impl_ISpeechRecognizerStatics::SupportedTopicLanguages() const { Windows::Foundation::Collections::IVectorView languages; - check_hresult(static_cast(static_cast(*this))->get_SupportedTopicLanguages(put(languages))); + check_hresult(WINRT_SHIM(ISpeechRecognizerStatics)->get_SupportedTopicLanguages(put_abi(languages))); return languages; } template Windows::Foundation::Collections::IVectorView impl_ISpeechRecognizerStatics::SupportedGrammarLanguages() const { Windows::Foundation::Collections::IVectorView languages; - check_hresult(static_cast(static_cast(*this))->get_SupportedGrammarLanguages(put(languages))); + check_hresult(WINRT_SHIM(ISpeechRecognizerStatics)->get_SupportedGrammarLanguages(put_abi(languages))); return languages; } template Windows::Media::SpeechRecognition::SpeechContinuousRecognitionSession impl_ISpeechRecognizer2::ContinuousRecognitionSession() const { Windows::Media::SpeechRecognition::SpeechContinuousRecognitionSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContinuousRecognitionSession(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizer2)->get_ContinuousRecognitionSession(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognizerState impl_ISpeechRecognizer2::State() const { Windows::Media::SpeechRecognition::SpeechRecognizerState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ISpeechRecognizer2)->get_State(&value)); return value; } template Windows::Foundation::IAsyncAction impl_ISpeechRecognizer2::StopRecognitionAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_StopRecognitionAsync(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognizer2)->abi_StopRecognitionAsync(put_abi(value))); return value; } template event_token impl_ISpeechRecognizer2::HypothesisGenerated(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_HypothesisGenerated(get(value), &returnValue)); + check_hresult(WINRT_SHIM(ISpeechRecognizer2)->add_HypothesisGenerated(get_abi(value), &returnValue)); return returnValue; } @@ -1730,79 +1819,79 @@ template event_revoker impl_ISpeechRecognizer2< template void impl_ISpeechRecognizer2::HypothesisGenerated(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_HypothesisGenerated(value)); + check_hresult(WINRT_SHIM(ISpeechRecognizer2)->remove_HypothesisGenerated(value)); } template hstring impl_ISpeechRecognitionHypothesis::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionHypothesis)->get_Text(put_abi(value))); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionHypothesis impl_ISpeechRecognitionHypothesisGeneratedEventArgs::Hypothesis() const { Windows::Media::SpeechRecognition::SpeechRecognitionHypothesis value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Hypothesis(put(value))); + check_hresult(WINRT_SHIM(ISpeechRecognitionHypothesisGeneratedEventArgs)->get_Hypothesis(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ISpeechContinuousRecognitionSession::AutoStopSilenceTimeout() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoStopSilenceTimeout(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->get_AutoStopSilenceTimeout(put_abi(value))); return value; } template void impl_ISpeechContinuousRecognitionSession::AutoStopSilenceTimeout(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoStopSilenceTimeout(get(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->put_AutoStopSilenceTimeout(get_abi(value))); } template Windows::Foundation::IAsyncAction impl_ISpeechContinuousRecognitionSession::StartAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_StartAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISpeechContinuousRecognitionSession::StartAsync(Windows::Media::SpeechRecognition::SpeechContinuousRecognitionMode mode) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_StartWithModeAsync(mode, put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_StartWithModeAsync(mode, put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISpeechContinuousRecognitionSession::StopAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_StopAsync(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_StopAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISpeechContinuousRecognitionSession::CancelAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_CancelAsync(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_CancelAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ISpeechContinuousRecognitionSession::PauseAsync() const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_PauseAsync(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_PauseAsync(put_abi(value))); return value; } template void impl_ISpeechContinuousRecognitionSession::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->abi_Resume()); } template event_token impl_ISpeechContinuousRecognitionSession::Completed(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(value), &returnValue)); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->add_Completed(get_abi(value), &returnValue)); return returnValue; } @@ -1813,13 +1902,13 @@ template event_revoker impl_IS template void impl_ISpeechContinuousRecognitionSession::Completed(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(value)); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->remove_Completed(value)); } template event_token impl_ISpeechContinuousRecognitionSession::ResultGenerated(const Windows::Foundation::TypedEventHandler & value) const { event_token returnValue {}; - check_hresult(static_cast(static_cast(*this))->add_ResultGenerated(get(value), &returnValue)); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->add_ResultGenerated(get_abi(value), &returnValue)); return returnValue; } @@ -1830,55 +1919,55 @@ template event_revoker impl_IS template void impl_ISpeechContinuousRecognitionSession::ResultGenerated(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_ResultGenerated(value)); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionSession)->remove_ResultGenerated(value)); } template Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus impl_ISpeechContinuousRecognitionCompletedEventArgs::Status() const { Windows::Media::SpeechRecognition::SpeechRecognitionResultStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionCompletedEventArgs)->get_Status(&value)); return value; } template Windows::Media::SpeechRecognition::SpeechRecognitionResult impl_ISpeechContinuousRecognitionResultGeneratedEventArgs::Result() const { Windows::Media::SpeechRecognition::SpeechRecognitionResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Result(put(value))); + check_hresult(WINRT_SHIM(ISpeechContinuousRecognitionResultGeneratedEventArgs)->get_Result(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IVoiceCommandManager::InstallCommandSetsFromStorageFileAsync(const Windows::Storage::StorageFile & file) const { Windows::Foundation::IAsyncAction installAction; - check_hresult(static_cast(static_cast(*this))->abi_InstallCommandSetsFromStorageFileAsync(get(file), put(installAction))); + check_hresult(WINRT_SHIM(IVoiceCommandManager)->abi_InstallCommandSetsFromStorageFileAsync(get_abi(file), put_abi(installAction))); return installAction; } template Windows::Foundation::Collections::IMapView impl_IVoiceCommandManager::InstalledCommandSets() const { Windows::Foundation::Collections::IMapView voiceCommandSets; - check_hresult(static_cast(static_cast(*this))->get_InstalledCommandSets(put(voiceCommandSets))); + check_hresult(WINRT_SHIM(IVoiceCommandManager)->get_InstalledCommandSets(put_abi(voiceCommandSets))); return voiceCommandSets; } template hstring impl_IVoiceCommandSet::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandSet)->get_Language(put_abi(value))); return value; } template hstring impl_IVoiceCommandSet::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IVoiceCommandSet)->get_Name(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IVoiceCommandSet::SetPhraseListAsync(hstring_ref phraseListName, const Windows::Foundation::Collections::IIterable & phraseList) const +template Windows::Foundation::IAsyncAction impl_IVoiceCommandSet::SetPhraseListAsync(hstring_view phraseListName, iterable phraseList) const { Windows::Foundation::IAsyncAction updateAction; - check_hresult(static_cast(static_cast(*this))->abi_SetPhraseListAsync(get(phraseListName), get(phraseList), put(updateAction))); + check_hresult(WINRT_SHIM(IVoiceCommandSet)->abi_SetPhraseListAsync(get_abi(phraseListName), get_abi(phraseList), put_abi(updateAction))); return updateAction; } @@ -1886,23 +1975,23 @@ inline SpeechRecognitionGrammarFileConstraint::SpeechRecognitionGrammarFileConst SpeechRecognitionGrammarFileConstraint(get_activation_factory().Create(file)) {} -inline SpeechRecognitionGrammarFileConstraint::SpeechRecognitionGrammarFileConstraint(const Windows::Storage::StorageFile & file, hstring_ref tag) : +inline SpeechRecognitionGrammarFileConstraint::SpeechRecognitionGrammarFileConstraint(const Windows::Storage::StorageFile & file, hstring_view tag) : SpeechRecognitionGrammarFileConstraint(get_activation_factory().CreateWithTag(file, tag)) {} -inline SpeechRecognitionListConstraint::SpeechRecognitionListConstraint(const Windows::Foundation::Collections::IIterable & commands) : +inline SpeechRecognitionListConstraint::SpeechRecognitionListConstraint(iterable commands) : SpeechRecognitionListConstraint(get_activation_factory().Create(commands)) {} -inline SpeechRecognitionListConstraint::SpeechRecognitionListConstraint(const Windows::Foundation::Collections::IIterable & commands, hstring_ref tag) : +inline SpeechRecognitionListConstraint::SpeechRecognitionListConstraint(iterable commands, hstring_view tag) : SpeechRecognitionListConstraint(get_activation_factory().CreateWithTag(commands, tag)) {} -inline SpeechRecognitionTopicConstraint::SpeechRecognitionTopicConstraint(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_ref topicHint) : +inline SpeechRecognitionTopicConstraint::SpeechRecognitionTopicConstraint(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_view topicHint) : SpeechRecognitionTopicConstraint(get_activation_factory().Create(scenario, topicHint)) {} -inline SpeechRecognitionTopicConstraint::SpeechRecognitionTopicConstraint(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_ref topicHint, hstring_ref tag) : +inline SpeechRecognitionTopicConstraint::SpeechRecognitionTopicConstraint(Windows::Media::SpeechRecognition::SpeechRecognitionScenario scenario, hstring_view topicHint, hstring_view tag) : SpeechRecognitionTopicConstraint(get_activation_factory().CreateWithTag(scenario, topicHint, tag)) {} @@ -1942,3 +2031,410 @@ inline Windows::Foundation::Collections::IMapView +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechContinuousRecognitionCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechContinuousRecognitionResultGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechContinuousRecognitionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionCompilationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionGrammarFileConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionGrammarFileConstraintFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionHypothesis & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionHypothesisGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionListConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionListConstraintFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionQualityDegradingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionSemanticInterpretation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionTopicConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionTopicConstraintFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognitionVoiceCommandDefinitionConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizerStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizerTimeouts & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::ISpeechRecognizerUIOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::IVoiceCommandManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::IVoiceCommandSet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechContinuousRecognitionCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechContinuousRecognitionResultGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechContinuousRecognitionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionCompilationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionGrammarFileConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionHypothesis & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionHypothesisGeneratedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionListConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionQualityDegradingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionSemanticInterpretation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionTopicConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognitionVoiceCommandDefinitionConstraint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognizerStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognizerTimeouts & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::SpeechRecognizerUIOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechRecognition::VoiceCommandSet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.SpeechSynthesis.h b/10.0.14393.0/winrt/Windows.Media.SpeechSynthesis.h index 0bfb99266..9ba0b6824 100644 --- a/10.0.14393.0/winrt/Windows.Media.SpeechSynthesis.h +++ b/10.0.14393.0/winrt/Windows.Media.SpeechSynthesis.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Media.SpeechSynthesis.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AllVoices(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AllVoices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllVoices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllVoices()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : pro } } - HRESULT __stdcall get_DefaultVoice(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultVoice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultVoice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultVoice()); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Markers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Markers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Markers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Markers()); return S_OK; } catch (...) @@ -67,11 +73,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_SynthesizeTextToStreamAsync(abi_arg_in text, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SynthesizeTextToStreamAsync(impl::abi_arg_in text, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SynthesizeTextToStreamAsync(*reinterpret_cast(&text))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SynthesizeTextToStreamAsync(*reinterpret_cast(&text))); return S_OK; } catch (...) @@ -81,11 +88,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SynthesizeSsmlToStreamAsync(abi_arg_in Ssml, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SynthesizeSsmlToStreamAsync(impl::abi_arg_in Ssml, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SynthesizeSsmlToStreamAsync(*reinterpret_cast(&Ssml))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SynthesizeSsmlToStreamAsync(*reinterpret_cast(&Ssml))); return S_OK; } catch (...) @@ -95,10 +103,11 @@ struct produce : produce } } - HRESULT __stdcall put_Voice(abi_arg_in value) noexcept override + HRESULT __stdcall put_Voice(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Voice(*reinterpret_cast(&value)); return S_OK; } @@ -108,11 +117,12 @@ struct produce : produce } } - HRESULT __stdcall get_Voice(abi_arg_out value) noexcept override + HRESULT __stdcall get_Voice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Voice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Voice()); return S_OK; } catch (...) @@ -126,11 +136,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -140,11 +151,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -154,11 +166,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -168,11 +181,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -186,7 +200,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Gender()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gender()); return S_OK; } catch (...) @@ -203,82 +218,82 @@ namespace Windows::Media::SpeechSynthesis { template hstring impl_IVoiceInformation::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IVoiceInformation)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IVoiceInformation::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IVoiceInformation)->get_Id(put_abi(value))); return value; } template hstring impl_IVoiceInformation::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IVoiceInformation)->get_Language(put_abi(value))); return value; } template hstring impl_IVoiceInformation::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IVoiceInformation)->get_Description(put_abi(value))); return value; } template Windows::Media::SpeechSynthesis::VoiceGender impl_IVoiceInformation::Gender() const { Windows::Media::SpeechSynthesis::VoiceGender value {}; - check_hresult(static_cast(static_cast(*this))->get_Gender(&value)); + check_hresult(WINRT_SHIM(IVoiceInformation)->get_Gender(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IInstalledVoicesStatic::AllVoices() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AllVoices(put(value))); + check_hresult(WINRT_SHIM(IInstalledVoicesStatic)->get_AllVoices(put_abi(value))); return value; } template Windows::Media::SpeechSynthesis::VoiceInformation impl_IInstalledVoicesStatic::DefaultVoice() const { Windows::Media::SpeechSynthesis::VoiceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultVoice(put(value))); + check_hresult(WINRT_SHIM(IInstalledVoicesStatic)->get_DefaultVoice(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpeechSynthesisStream::Markers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Markers(put(value))); + check_hresult(WINRT_SHIM(ISpeechSynthesisStream)->get_Markers(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ISpeechSynthesizer::SynthesizeTextToStreamAsync(hstring_ref text) const +template Windows::Foundation::IAsyncOperation impl_ISpeechSynthesizer::SynthesizeTextToStreamAsync(hstring_view text) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SynthesizeTextToStreamAsync(get(text), put(operation))); + check_hresult(WINRT_SHIM(ISpeechSynthesizer)->abi_SynthesizeTextToStreamAsync(get_abi(text), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ISpeechSynthesizer::SynthesizeSsmlToStreamAsync(hstring_ref Ssml) const +template Windows::Foundation::IAsyncOperation impl_ISpeechSynthesizer::SynthesizeSsmlToStreamAsync(hstring_view Ssml) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SynthesizeSsmlToStreamAsync(get(Ssml), put(operation))); + check_hresult(WINRT_SHIM(ISpeechSynthesizer)->abi_SynthesizeSsmlToStreamAsync(get_abi(Ssml), put_abi(operation))); return operation; } template void impl_ISpeechSynthesizer::Voice(const Windows::Media::SpeechSynthesis::VoiceInformation & value) const { - check_hresult(static_cast(static_cast(*this))->put_Voice(get(value))); + check_hresult(WINRT_SHIM(ISpeechSynthesizer)->put_Voice(get_abi(value))); } template Windows::Media::SpeechSynthesis::VoiceInformation impl_ISpeechSynthesizer::Voice() const { Windows::Media::SpeechSynthesis::VoiceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Voice(put(value))); + check_hresult(WINRT_SHIM(ISpeechSynthesizer)->get_Voice(put_abi(value))); return value; } @@ -299,3 +314,68 @@ inline Windows::Media::SpeechSynthesis::VoiceInformation SpeechSynthesizer::Defa } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::IInstalledVoicesStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::ISpeechSynthesisStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::ISpeechSynthesizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::IVoiceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::SpeechSynthesisStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::SpeechSynthesizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SpeechSynthesis::VoiceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Streaming.Adaptive.h b/10.0.14393.0/winrt/Windows.Media.Streaming.Adaptive.h index c84d61a01..536f45c1f 100644 --- a/10.0.14393.0/winrt/Windows.Media.Streaming.Adaptive.h +++ b/10.0.14393.0/winrt/Windows.Media.Streaming.Adaptive.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Web.Http.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -22,7 +25,8 @@ struct produce : p { try { - *value = detach(this->shim().IsLive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLive()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : p } } - HRESULT __stdcall get_DesiredLiveOffset(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesiredLiveOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredLiveOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredLiveOffset()); return S_OK; } catch (...) @@ -44,10 +49,11 @@ struct produce : p } } - HRESULT __stdcall put_DesiredLiveOffset(abi_arg_in value) noexcept override + HRESULT __stdcall put_DesiredLiveOffset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredLiveOffset(*reinterpret_cast(&value)); return S_OK; } @@ -61,7 +67,8 @@ struct produce : p { try { - *value = detach(this->shim().InitialBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialBitrate()); return S_OK; } catch (...) @@ -74,6 +81,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialBitrate(value); return S_OK; } @@ -87,7 +95,8 @@ struct produce : p { try { - *value = detach(this->shim().CurrentDownloadBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentDownloadBitrate()); return S_OK; } catch (...) @@ -100,7 +109,8 @@ struct produce : p { try { - *value = detach(this->shim().CurrentPlaybackBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentPlaybackBitrate()); return S_OK; } catch (...) @@ -109,11 +119,12 @@ struct produce : p } } - HRESULT __stdcall get_AvailableBitrates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AvailableBitrates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AvailableBitrates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableBitrates()); return S_OK; } catch (...) @@ -123,11 +134,12 @@ struct produce : p } } - HRESULT __stdcall get_DesiredMinBitrate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredMinBitrate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredMinBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredMinBitrate()); return S_OK; } catch (...) @@ -137,10 +149,11 @@ struct produce : p } } - HRESULT __stdcall put_DesiredMinBitrate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_DesiredMinBitrate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredMinBitrate(*reinterpret_cast *>(&value)); return S_OK; } @@ -150,11 +163,12 @@ struct produce : p } } - HRESULT __stdcall get_DesiredMaxBitrate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredMaxBitrate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredMaxBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredMaxBitrate()); return S_OK; } catch (...) @@ -164,10 +178,11 @@ struct produce : p } } - HRESULT __stdcall put_DesiredMaxBitrate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_DesiredMaxBitrate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredMaxBitrate(*reinterpret_cast *>(&value)); return S_OK; } @@ -181,7 +196,8 @@ struct produce : p { try { - *value = detach(this->shim().AudioOnlyPlayback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioOnlyPlayback()); return S_OK; } catch (...) @@ -194,7 +210,8 @@ struct produce : p { try { - *value = detach(this->shim().InboundBitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundBitsPerSecond()); return S_OK; } catch (...) @@ -203,11 +220,12 @@ struct produce : p } } - HRESULT __stdcall get_InboundBitsPerSecondWindow(abi_arg_out value) noexcept override + HRESULT __stdcall get_InboundBitsPerSecondWindow(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InboundBitsPerSecondWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundBitsPerSecondWindow()); return S_OK; } catch (...) @@ -216,10 +234,11 @@ struct produce : p } } - HRESULT __stdcall put_InboundBitsPerSecondWindow(abi_arg_in value) noexcept override + HRESULT __stdcall put_InboundBitsPerSecondWindow(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InboundBitsPerSecondWindow(*reinterpret_cast(&value)); return S_OK; } @@ -229,11 +248,12 @@ struct produce : p } } - HRESULT __stdcall add_DownloadBitrateChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadBitrateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadBitrateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadBitrateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -246,6 +266,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadBitrateChanged(token); return S_OK; } @@ -255,11 +276,12 @@ struct produce : p } } - HRESULT __stdcall add_PlaybackBitrateChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackBitrateChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackBitrateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackBitrateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -272,6 +294,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackBitrateChanged(token); return S_OK; } @@ -281,11 +304,12 @@ struct produce : p } } - HRESULT __stdcall add_DownloadRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -298,6 +322,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadRequested(token); return S_OK; } @@ -307,11 +332,12 @@ struct produce : p } } - HRESULT __stdcall add_DownloadCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -324,6 +350,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadCompleted(token); return S_OK; } @@ -333,11 +360,12 @@ struct produce : p } } - HRESULT __stdcall add_DownloadFailed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DownloadFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -350,6 +378,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().DownloadFailed(token); return S_OK; } @@ -363,11 +392,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_AdvancedSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdvancedSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvancedSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvancedSettings()); return S_OK; } catch (...) @@ -385,7 +415,8 @@ struct produceshim().AllSegmentsIndependent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllSegmentsIndependent()); return S_OK; } catch (...) @@ -398,6 +429,7 @@ struct produceshim()); this->shim().AllSegmentsIndependent(value); return S_OK; } @@ -407,11 +439,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DesiredBitrateHeadroomRatio(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredBitrateHeadroomRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredBitrateHeadroomRatio()); return S_OK; } catch (...) @@ -421,10 +454,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_DesiredBitrateHeadroomRatio(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredBitrateHeadroomRatio(*reinterpret_cast *>(&value)); return S_OK; } @@ -434,11 +468,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_BitrateDowngradeTriggerRatio(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BitrateDowngradeTriggerRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitrateDowngradeTriggerRatio()); return S_OK; } catch (...) @@ -448,10 +483,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_BitrateDowngradeTriggerRatio(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BitrateDowngradeTriggerRatio(*reinterpret_cast *>(&value)); return S_OK; } @@ -469,7 +505,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -478,11 +515,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MediaSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaSource()); return S_OK; } catch (...) @@ -492,11 +530,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HttpResponseMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HttpResponseMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HttpResponseMessage()); return S_OK; } catch (...) @@ -514,7 +553,8 @@ struct produceshim().OldValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldValue()); return S_OK; } catch (...) @@ -527,7 +567,8 @@ struct produceshim().NewValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewValue()); return S_OK; } catch (...) @@ -544,7 +585,8 @@ struct produceshim().ResourceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceType()); return S_OK; } catch (...) @@ -553,11 +595,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceUri()); return S_OK; } catch (...) @@ -567,11 +610,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeOffset(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeOffset()); return S_OK; } catch (...) @@ -581,11 +625,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeLength()); return S_OK; } catch (...) @@ -595,11 +640,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HttpResponseMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HttpResponseMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HttpResponseMessage()); return S_OK; } catch (...) @@ -617,7 +663,8 @@ struct produceshim().ResourceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceType()); return S_OK; } catch (...) @@ -626,11 +673,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceUri()); return S_OK; } catch (...) @@ -640,11 +688,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeOffset(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeOffset()); return S_OK; } catch (...) @@ -654,11 +703,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeLength()); return S_OK; } catch (...) @@ -668,11 +718,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HttpResponseMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HttpResponseMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HttpResponseMessage()); return S_OK; } catch (...) @@ -690,6 +741,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -707,7 +759,8 @@ struct produceshim().ResourceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceType()); return S_OK; } catch (...) @@ -716,11 +769,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceUri()); return S_OK; } catch (...) @@ -730,11 +784,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeOffset(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeOffset()); return S_OK; } catch (...) @@ -744,11 +799,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeLength()); return S_OK; } catch (...) @@ -758,11 +814,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Result(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -772,11 +829,12 @@ struct produce deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -790,11 +848,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResourceUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceUri()); return S_OK; } catch (...) @@ -804,10 +863,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ResourceUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ResourceUri(*reinterpret_cast(&value)); return S_OK; } @@ -817,11 +877,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -831,10 +892,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_InputStream(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InputStream(*reinterpret_cast(&value)); return S_OK; } @@ -844,11 +906,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Buffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Buffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffer()); return S_OK; } catch (...) @@ -858,10 +921,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Buffer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Buffer(*reinterpret_cast(&value)); return S_OK; } @@ -871,11 +935,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -885,10 +950,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentType(*reinterpret_cast(&value)); return S_OK; } @@ -902,7 +968,8 @@ struct produceshim().ExtendedStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedStatus()); return S_OK; } catch (...) @@ -915,6 +982,7 @@ struct produceshim()); this->shim().ExtendedStatus(value); return S_OK; } @@ -928,11 +996,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResourceByteRangeOffset(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeOffset(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeOffset()); return S_OK; } catch (...) @@ -942,10 +1011,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_ResourceByteRangeOffset(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ResourceByteRangeOffset(*reinterpret_cast *>(&value)); return S_OK; } @@ -955,11 +1025,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ResourceByteRangeLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResourceByteRangeLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResourceByteRangeLength()); return S_OK; } catch (...) @@ -969,10 +1040,11 @@ struct produce> value) noexcept override + HRESULT __stdcall put_ResourceByteRangeLength(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ResourceByteRangeLength(*reinterpret_cast *>(&value)); return S_OK; } @@ -990,7 +1062,8 @@ struct produceshim().OldValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldValue()); return S_OK; } catch (...) @@ -1003,7 +1076,8 @@ struct produceshim().NewValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewValue()); return S_OK; } catch (...) @@ -1016,7 +1090,8 @@ struct produceshim().AudioOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioOnly()); return S_OK; } catch (...) @@ -1029,11 +1104,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_IsContentTypeSupported(abi_arg_in contentType, bool * result) noexcept override + HRESULT __stdcall abi_IsContentTypeSupported(impl::abi_arg_in contentType, bool * result) noexcept override { try { - *result = detach(this->shim().IsContentTypeSupported(*reinterpret_cast(&contentType))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsContentTypeSupported(*reinterpret_cast(&contentType))); return S_OK; } catch (...) @@ -1042,11 +1118,12 @@ struct produce uri, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromUriAsync(impl::abi_arg_in uri, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromUriAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromUriAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1056,11 +1133,12 @@ struct produce uri, abi_arg_in httpClient, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromUriWithDownloaderAsync(impl::abi_arg_in uri, impl::abi_arg_in httpClient, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&httpClient))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&httpClient))); return S_OK; } catch (...) @@ -1070,11 +1148,12 @@ struct produce stream, abi_arg_in uri, abi_arg_in contentType, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromStreamAsync(impl::abi_arg_in stream, impl::abi_arg_in uri, impl::abi_arg_in contentType, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), *reinterpret_cast(&uri), *reinterpret_cast(&contentType))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), *reinterpret_cast(&uri), *reinterpret_cast(&contentType))); return S_OK; } catch (...) @@ -1084,11 +1163,12 @@ struct produce stream, abi_arg_in uri, abi_arg_in contentType, abi_arg_in httpClient, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateFromStreamWithDownloaderAsync(impl::abi_arg_in stream, impl::abi_arg_in uri, impl::abi_arg_in contentType, impl::abi_arg_in httpClient, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), *reinterpret_cast(&uri), *reinterpret_cast(&contentType), *reinterpret_cast(&httpClient))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromStreamAsync(*reinterpret_cast(&stream), *reinterpret_cast(&uri), *reinterpret_cast(&contentType), *reinterpret_cast(&httpClient))); return S_OK; } catch (...) @@ -1106,165 +1186,165 @@ namespace Windows::Media::Streaming::Adaptive { template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceCreationStatus impl_IAdaptiveMediaSourceCreationResult::Status() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceCreationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceCreationResult)->get_Status(&value)); return value; } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSource impl_IAdaptiveMediaSourceCreationResult::MediaSource() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaSource(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceCreationResult)->get_MediaSource(put_abi(value))); return value; } template Windows::Web::Http::HttpResponseMessage impl_IAdaptiveMediaSourceCreationResult::HttpResponseMessage() const { Windows::Web::Http::HttpResponseMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HttpResponseMessage(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceCreationResult)->get_HttpResponseMessage(put_abi(value))); return value; } -template bool impl_IAdaptiveMediaSourceStatics::IsContentTypeSupported(hstring_ref contentType) const +template bool impl_IAdaptiveMediaSourceStatics::IsContentTypeSupported(hstring_view contentType) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsContentTypeSupported(get(contentType), &result)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceStatics)->abi_IsContentTypeSupported(get_abi(contentType), &result)); return result; } template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromUriAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUriAsync(get(uri), put(result))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceStatics)->abi_CreateFromUriAsync(get_abi(uri), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromUriAsync(const Windows::Foundation::Uri & uri, const Windows::Web::Http::HttpClient & httpClient) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUriWithDownloaderAsync(get(uri), get(httpClient), put(result))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceStatics)->abi_CreateFromUriWithDownloaderAsync(get_abi(uri), get_abi(httpClient), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_ref contentType) const +template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_view contentType) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamAsync(get(stream), get(uri), get(contentType), put(result))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceStatics)->abi_CreateFromStreamAsync(get_abi(stream), get_abi(uri), get_abi(contentType), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_ref contentType, const Windows::Web::Http::HttpClient & httpClient) const +template Windows::Foundation::IAsyncOperation impl_IAdaptiveMediaSourceStatics::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_view contentType, const Windows::Web::Http::HttpClient & httpClient) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStreamWithDownloaderAsync(get(stream), get(uri), get(contentType), get(httpClient), put(result))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceStatics)->abi_CreateFromStreamWithDownloaderAsync(get_abi(stream), get_abi(uri), get_abi(contentType), get_abi(httpClient), put_abi(result))); return result; } template bool impl_IAdaptiveMediaSource::IsLive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLive(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_IsLive(&value)); return value; } template Windows::Foundation::TimeSpan impl_IAdaptiveMediaSource::DesiredLiveOffset() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredLiveOffset(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_DesiredLiveOffset(put_abi(value))); return value; } template void impl_IAdaptiveMediaSource::DesiredLiveOffset(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredLiveOffset(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->put_DesiredLiveOffset(get_abi(value))); } template uint32_t impl_IAdaptiveMediaSource::InitialBitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialBitrate(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_InitialBitrate(&value)); return value; } template void impl_IAdaptiveMediaSource::InitialBitrate(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialBitrate(value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->put_InitialBitrate(value)); } template uint32_t impl_IAdaptiveMediaSource::CurrentDownloadBitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentDownloadBitrate(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_CurrentDownloadBitrate(&value)); return value; } template uint32_t impl_IAdaptiveMediaSource::CurrentPlaybackBitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentPlaybackBitrate(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_CurrentPlaybackBitrate(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IAdaptiveMediaSource::AvailableBitrates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AvailableBitrates(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_AvailableBitrates(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSource::DesiredMinBitrate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DesiredMinBitrate(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_DesiredMinBitrate(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSource::DesiredMinBitrate(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSource::DesiredMinBitrate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredMinBitrate(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->put_DesiredMinBitrate(get_abi(value))); } template Windows::Foundation::IReference impl_IAdaptiveMediaSource::DesiredMaxBitrate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DesiredMaxBitrate(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_DesiredMaxBitrate(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSource::DesiredMaxBitrate(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSource::DesiredMaxBitrate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredMaxBitrate(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->put_DesiredMaxBitrate(get_abi(value))); } template bool impl_IAdaptiveMediaSource::AudioOnlyPlayback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioOnlyPlayback(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_AudioOnlyPlayback(&value)); return value; } template uint64_t impl_IAdaptiveMediaSource::InboundBitsPerSecond() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InboundBitsPerSecond(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_InboundBitsPerSecond(&value)); return value; } template Windows::Foundation::TimeSpan impl_IAdaptiveMediaSource::InboundBitsPerSecondWindow() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_InboundBitsPerSecondWindow(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->get_InboundBitsPerSecondWindow(put_abi(value))); return value; } template void impl_IAdaptiveMediaSource::InboundBitsPerSecondWindow(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_InboundBitsPerSecondWindow(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->put_InboundBitsPerSecondWindow(get_abi(value))); } template event_token impl_IAdaptiveMediaSource::DownloadBitrateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadBitrateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->add_DownloadBitrateChanged(get_abi(handler), &token)); return token; } @@ -1275,13 +1355,13 @@ template event_revoker impl_IAdaptiveMediaSou template void impl_IAdaptiveMediaSource::DownloadBitrateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadBitrateChanged(token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->remove_DownloadBitrateChanged(token)); } template event_token impl_IAdaptiveMediaSource::PlaybackBitrateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackBitrateChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->add_PlaybackBitrateChanged(get_abi(handler), &token)); return token; } @@ -1292,13 +1372,13 @@ template event_revoker impl_IAdaptiveMediaSou template void impl_IAdaptiveMediaSource::PlaybackBitrateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackBitrateChanged(token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->remove_PlaybackBitrateChanged(token)); } template event_token impl_IAdaptiveMediaSource::DownloadRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->add_DownloadRequested(get_abi(handler), &token)); return token; } @@ -1309,13 +1389,13 @@ template event_revoker impl_IAdaptiveMediaSou template void impl_IAdaptiveMediaSource::DownloadRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadRequested(token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->remove_DownloadRequested(token)); } template event_token impl_IAdaptiveMediaSource::DownloadCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->add_DownloadCompleted(get_abi(handler), &token)); return token; } @@ -1326,13 +1406,13 @@ template event_revoker impl_IAdaptiveMediaSou template void impl_IAdaptiveMediaSource::DownloadCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadCompleted(token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->remove_DownloadCompleted(token)); } template event_token impl_IAdaptiveMediaSource::DownloadFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->add_DownloadFailed(get_abi(handler), &token)); return token; } @@ -1343,289 +1423,289 @@ template event_revoker impl_IAdaptiveMediaSou template void impl_IAdaptiveMediaSource::DownloadFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadFailed(token)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource)->remove_DownloadFailed(token)); } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceAdvancedSettings impl_IAdaptiveMediaSource2::AdvancedSettings() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceAdvancedSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AdvancedSettings(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSource2)->get_AdvancedSettings(put_abi(value))); return value; } template bool impl_IAdaptiveMediaSourceAdvancedSettings::AllSegmentsIndependent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllSegmentsIndependent(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->get_AllSegmentsIndependent(&value)); return value; } template void impl_IAdaptiveMediaSourceAdvancedSettings::AllSegmentsIndependent(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllSegmentsIndependent(value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->put_AllSegmentsIndependent(value)); } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceAdvancedSettings::DesiredBitrateHeadroomRatio() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DesiredBitrateHeadroomRatio(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->get_DesiredBitrateHeadroomRatio(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSourceAdvancedSettings::DesiredBitrateHeadroomRatio(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSourceAdvancedSettings::DesiredBitrateHeadroomRatio(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredBitrateHeadroomRatio(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->put_DesiredBitrateHeadroomRatio(get_abi(value))); } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceAdvancedSettings::BitrateDowngradeTriggerRatio() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_BitrateDowngradeTriggerRatio(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->get_BitrateDowngradeTriggerRatio(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSourceAdvancedSettings::BitrateDowngradeTriggerRatio(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSourceAdvancedSettings::BitrateDowngradeTriggerRatio(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_BitrateDowngradeTriggerRatio(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceAdvancedSettings)->put_BitrateDowngradeTriggerRatio(get_abi(value))); } template uint32_t impl_IAdaptiveMediaSourceDownloadBitrateChangedEventArgs::OldValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OldValue(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadBitrateChangedEventArgs)->get_OldValue(&value)); return value; } template uint32_t impl_IAdaptiveMediaSourceDownloadBitrateChangedEventArgs::NewValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NewValue(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadBitrateChangedEventArgs)->get_NewValue(&value)); return value; } template uint32_t impl_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs::OldValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OldValue(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs)->get_OldValue(&value)); return value; } template uint32_t impl_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs::NewValue() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NewValue(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs)->get_NewValue(&value)); return value; } template bool impl_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs::AudioOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioOnly(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs)->get_AudioOnly(&value)); return value; } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::ResourceType() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType value {}; - check_hresult(static_cast(static_cast(*this))->get_ResourceType(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->get_ResourceType(&value)); return value; } template Windows::Foundation::Uri impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::ResourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResourceUri(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->get_ResourceUri(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::ResourceByteRangeOffset() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeOffset(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->get_ResourceByteRangeOffset(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::ResourceByteRangeLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeLength(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->get_ResourceByteRangeLength(put_abi(value))); return value; } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadResult impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::Result() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Result(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->get_Result(put_abi(value))); return value; } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadRequestedDeferral impl_IAdaptiveMediaSourceDownloadRequestedEventArgs::GetDeferral() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadRequestedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedEventArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::Foundation::Uri impl_IAdaptiveMediaSourceDownloadResult::ResourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResourceUri(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->get_ResourceUri(put_abi(value))); return value; } template void impl_IAdaptiveMediaSourceDownloadResult::ResourceUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ResourceUri(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->put_ResourceUri(get_abi(value))); } template Windows::Storage::Streams::IInputStream impl_IAdaptiveMediaSourceDownloadResult::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->get_InputStream(put_abi(value))); return value; } template void impl_IAdaptiveMediaSourceDownloadResult::InputStream(const Windows::Storage::Streams::IInputStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_InputStream(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->put_InputStream(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_IAdaptiveMediaSourceDownloadResult::Buffer() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Buffer(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->get_Buffer(put_abi(value))); return value; } template void impl_IAdaptiveMediaSourceDownloadResult::Buffer(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Buffer(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->put_Buffer(get_abi(value))); } template hstring impl_IAdaptiveMediaSourceDownloadResult::ContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentType(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->get_ContentType(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSourceDownloadResult::ContentType(hstring_ref value) const +template void impl_IAdaptiveMediaSourceDownloadResult::ContentType(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentType(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->put_ContentType(get_abi(value))); } template uint32_t impl_IAdaptiveMediaSourceDownloadResult::ExtendedStatus() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedStatus(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->get_ExtendedStatus(&value)); return value; } template void impl_IAdaptiveMediaSourceDownloadResult::ExtendedStatus(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ExtendedStatus(value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult)->put_ExtendedStatus(value)); } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeOffset() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeOffset(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult2)->get_ResourceByteRangeOffset(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeOffset(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeOffset(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ResourceByteRangeOffset(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult2)->put_ResourceByteRangeOffset(get_abi(value))); } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeLength(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult2)->get_ResourceByteRangeLength(put_abi(value))); return value; } -template void impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeLength(const Windows::Foundation::IReference & value) const +template void impl_IAdaptiveMediaSourceDownloadResult2::ResourceByteRangeLength(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ResourceByteRangeLength(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadResult2)->put_ResourceByteRangeLength(get_abi(value))); } template void impl_IAdaptiveMediaSourceDownloadRequestedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadRequestedDeferral)->abi_Complete()); } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType impl_IAdaptiveMediaSourceDownloadCompletedEventArgs::ResourceType() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType value {}; - check_hresult(static_cast(static_cast(*this))->get_ResourceType(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadCompletedEventArgs)->get_ResourceType(&value)); return value; } template Windows::Foundation::Uri impl_IAdaptiveMediaSourceDownloadCompletedEventArgs::ResourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResourceUri(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadCompletedEventArgs)->get_ResourceUri(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadCompletedEventArgs::ResourceByteRangeOffset() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeOffset(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadCompletedEventArgs)->get_ResourceByteRangeOffset(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadCompletedEventArgs::ResourceByteRangeLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeLength(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadCompletedEventArgs)->get_ResourceByteRangeLength(put_abi(value))); return value; } template Windows::Web::Http::HttpResponseMessage impl_IAdaptiveMediaSourceDownloadCompletedEventArgs::HttpResponseMessage() const { Windows::Web::Http::HttpResponseMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HttpResponseMessage(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadCompletedEventArgs)->get_HttpResponseMessage(put_abi(value))); return value; } template Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType impl_IAdaptiveMediaSourceDownloadFailedEventArgs::ResourceType() const { Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceResourceType value {}; - check_hresult(static_cast(static_cast(*this))->get_ResourceType(&value)); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadFailedEventArgs)->get_ResourceType(&value)); return value; } template Windows::Foundation::Uri impl_IAdaptiveMediaSourceDownloadFailedEventArgs::ResourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResourceUri(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadFailedEventArgs)->get_ResourceUri(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadFailedEventArgs::ResourceByteRangeOffset() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeOffset(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadFailedEventArgs)->get_ResourceByteRangeOffset(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IAdaptiveMediaSourceDownloadFailedEventArgs::ResourceByteRangeLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ResourceByteRangeLength(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadFailedEventArgs)->get_ResourceByteRangeLength(put_abi(value))); return value; } template Windows::Web::Http::HttpResponseMessage impl_IAdaptiveMediaSourceDownloadFailedEventArgs::HttpResponseMessage() const { Windows::Web::Http::HttpResponseMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HttpResponseMessage(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveMediaSourceDownloadFailedEventArgs)->get_HttpResponseMessage(put_abi(value))); return value; } -inline bool AdaptiveMediaSource::IsContentTypeSupported(hstring_ref contentType) +inline bool AdaptiveMediaSource::IsContentTypeSupported(hstring_view contentType) { return get_activation_factory().IsContentTypeSupported(contentType); } @@ -1640,12 +1720,12 @@ inline Windows::Foundation::IAsyncOperation().CreateFromUriAsync(uri, httpClient); } -inline Windows::Foundation::IAsyncOperation AdaptiveMediaSource::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_ref contentType) +inline Windows::Foundation::IAsyncOperation AdaptiveMediaSource::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_view contentType) { return get_activation_factory().CreateFromStreamAsync(stream, uri, contentType); } -inline Windows::Foundation::IAsyncOperation AdaptiveMediaSource::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_ref contentType, const Windows::Web::Http::HttpClient & httpClient) +inline Windows::Foundation::IAsyncOperation AdaptiveMediaSource::CreateFromStreamAsync(const Windows::Storage::Streams::IInputStream & stream, const Windows::Foundation::Uri & uri, hstring_view contentType, const Windows::Web::Http::HttpClient & httpClient) { return get_activation_factory().CreateFromStreamAsync(stream, uri, contentType, httpClient); } @@ -1653,3 +1733,212 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceAdvancedSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceCreationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadBitrateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceDownloadResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::IAdaptiveMediaSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceAdvancedSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceCreationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadBitrateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadRequestedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourceDownloadResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Streaming::Adaptive::AdaptiveMediaSourcePlaybackBitrateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.Transcoding.h b/10.0.14393.0/winrt/Windows.Media.Transcoding.h index 6a93dcced..742915d97 100644 --- a/10.0.14393.0/winrt/Windows.Media.Transcoding.h +++ b/10.0.14393.0/winrt/Windows.Media.Transcoding.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Media.Core.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Media.MediaProperties.3.h" @@ -19,10 +22,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall put_TrimStartTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_TrimStartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimStartTime(*reinterpret_cast(&value)); return S_OK; } @@ -32,11 +36,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TrimStartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimStartTime()); return S_OK; } catch (...) @@ -45,10 +50,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_TrimStopTime(abi_arg_in value) noexcept override + HRESULT __stdcall put_TrimStopTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrimStopTime(*reinterpret_cast(&value)); return S_OK; } @@ -58,11 +64,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TrimStopTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrimStopTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrimStopTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrimStopTime()); return S_OK; } catch (...) @@ -75,6 +82,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().AlwaysReencode(value); return S_OK; } @@ -88,7 +96,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().AlwaysReencode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlwaysReencode()); return S_OK; } catch (...) @@ -101,6 +110,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().HardwareAccelerationEnabled(value); return S_OK; } @@ -114,7 +124,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().HardwareAccelerationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareAccelerationEnabled()); return S_OK; } catch (...) @@ -123,10 +134,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AddAudioEffect(abi_arg_in activatableClassId) noexcept override + HRESULT __stdcall abi_AddAudioEffect(impl::abi_arg_in activatableClassId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddAudioEffect(*reinterpret_cast(&activatableClassId)); return S_OK; } @@ -136,10 +148,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AddAudioEffectWithSettings(abi_arg_in activatableClassId, bool effectRequired, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_AddAudioEffectWithSettings(impl::abi_arg_in activatableClassId, bool effectRequired, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddAudioEffect(*reinterpret_cast(&activatableClassId), effectRequired, *reinterpret_cast(&configuration)); return S_OK; } @@ -149,10 +162,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AddVideoEffect(abi_arg_in activatableClassId) noexcept override + HRESULT __stdcall abi_AddVideoEffect(impl::abi_arg_in activatableClassId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddVideoEffect(*reinterpret_cast(&activatableClassId)); return S_OK; } @@ -162,10 +176,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AddVideoEffectWithSettings(abi_arg_in activatableClassId, bool effectRequired, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_AddVideoEffectWithSettings(impl::abi_arg_in activatableClassId, bool effectRequired, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddVideoEffect(*reinterpret_cast(&activatableClassId), effectRequired, *reinterpret_cast(&configuration)); return S_OK; } @@ -179,6 +194,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearEffects(); return S_OK; } @@ -188,11 +204,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_PrepareFileTranscodeAsync(abi_arg_in source, abi_arg_in destination, abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareFileTranscodeAsync(impl::abi_arg_in source, impl::abi_arg_in destination, impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareFileTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareFileTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -202,11 +219,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_PrepareStreamTranscodeAsync(abi_arg_in source, abi_arg_in destination, abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareStreamTranscodeAsync(impl::abi_arg_in source, impl::abi_arg_in destination, impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareStreamTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareStreamTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -220,11 +238,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_PrepareMediaStreamSourceTranscodeAsync(abi_arg_in source, abi_arg_in destination, abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareMediaStreamSourceTranscodeAsync(impl::abi_arg_in source, impl::abi_arg_in destination, impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareMediaStreamSourceTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareMediaStreamSourceTranscodeAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), *reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -238,6 +257,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().VideoProcessingAlgorithm(value); return S_OK; } @@ -251,7 +271,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().VideoProcessingAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProcessingAlgorithm()); return S_OK; } catch (...) @@ -268,7 +289,8 @@ struct produce : produc { try { - *value = detach(this->shim().CanTranscode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanTranscode()); return S_OK; } catch (...) @@ -281,7 +303,8 @@ struct produce : produc { try { - *value = detach(this->shim().FailureReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FailureReason()); return S_OK; } catch (...) @@ -290,11 +313,12 @@ struct produce : produc } } - HRESULT __stdcall abi_TranscodeAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TranscodeAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TranscodeAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TranscodeAsync()); return S_OK; } catch (...) @@ -312,127 +336,127 @@ namespace Windows::Media::Transcoding { template Windows::Foundation::IAsyncOperation impl_IMediaTranscoder2::PrepareMediaStreamSourceTranscodeAsync(const Windows::Media::Core::IMediaSource & source, const Windows::Storage::Streams::IRandomAccessStream & destination, const Windows::Media::MediaProperties::MediaEncodingProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareMediaStreamSourceTranscodeAsync(get(source), get(destination), get(profile), put(operation))); + check_hresult(WINRT_SHIM(IMediaTranscoder2)->abi_PrepareMediaStreamSourceTranscodeAsync(get_abi(source), get_abi(destination), get_abi(profile), put_abi(operation))); return operation; } template void impl_IMediaTranscoder2::VideoProcessingAlgorithm(Windows::Media::Transcoding::MediaVideoProcessingAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_VideoProcessingAlgorithm(value)); + check_hresult(WINRT_SHIM(IMediaTranscoder2)->put_VideoProcessingAlgorithm(value)); } template Windows::Media::Transcoding::MediaVideoProcessingAlgorithm impl_IMediaTranscoder2::VideoProcessingAlgorithm() const { Windows::Media::Transcoding::MediaVideoProcessingAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_VideoProcessingAlgorithm(&value)); + check_hresult(WINRT_SHIM(IMediaTranscoder2)->get_VideoProcessingAlgorithm(&value)); return value; } template void impl_IMediaTranscoder::TrimStartTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimStartTime(get(value))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->put_TrimStartTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaTranscoder::TrimStartTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimStartTime(put(value))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->get_TrimStartTime(put_abi(value))); return value; } template void impl_IMediaTranscoder::TrimStopTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_TrimStopTime(get(value))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->put_TrimStopTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IMediaTranscoder::TrimStopTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrimStopTime(put(value))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->get_TrimStopTime(put_abi(value))); return value; } template void impl_IMediaTranscoder::AlwaysReencode(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AlwaysReencode(value)); + check_hresult(WINRT_SHIM(IMediaTranscoder)->put_AlwaysReencode(value)); } template bool impl_IMediaTranscoder::AlwaysReencode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AlwaysReencode(&value)); + check_hresult(WINRT_SHIM(IMediaTranscoder)->get_AlwaysReencode(&value)); return value; } template void impl_IMediaTranscoder::HardwareAccelerationEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_HardwareAccelerationEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTranscoder)->put_HardwareAccelerationEnabled(value)); } template bool impl_IMediaTranscoder::HardwareAccelerationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareAccelerationEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTranscoder)->get_HardwareAccelerationEnabled(&value)); return value; } -template void impl_IMediaTranscoder::AddAudioEffect(hstring_ref activatableClassId) const +template void impl_IMediaTranscoder::AddAudioEffect(hstring_view activatableClassId) const { - check_hresult(static_cast(static_cast(*this))->abi_AddAudioEffect(get(activatableClassId))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_AddAudioEffect(get_abi(activatableClassId))); } -template void impl_IMediaTranscoder::AddAudioEffect(hstring_ref activatableClassId, bool effectRequired, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaTranscoder::AddAudioEffect(hstring_view activatableClassId, bool effectRequired, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddAudioEffectWithSettings(get(activatableClassId), effectRequired, get(configuration))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_AddAudioEffectWithSettings(get_abi(activatableClassId), effectRequired, get_abi(configuration))); } -template void impl_IMediaTranscoder::AddVideoEffect(hstring_ref activatableClassId) const +template void impl_IMediaTranscoder::AddVideoEffect(hstring_view activatableClassId) const { - check_hresult(static_cast(static_cast(*this))->abi_AddVideoEffect(get(activatableClassId))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_AddVideoEffect(get_abi(activatableClassId))); } -template void impl_IMediaTranscoder::AddVideoEffect(hstring_ref activatableClassId, bool effectRequired, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaTranscoder::AddVideoEffect(hstring_view activatableClassId, bool effectRequired, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddVideoEffectWithSettings(get(activatableClassId), effectRequired, get(configuration))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_AddVideoEffectWithSettings(get_abi(activatableClassId), effectRequired, get_abi(configuration))); } template void impl_IMediaTranscoder::ClearEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearEffects()); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_ClearEffects()); } template Windows::Foundation::IAsyncOperation impl_IMediaTranscoder::PrepareFileTranscodeAsync(const Windows::Storage::IStorageFile & source, const Windows::Storage::IStorageFile & destination, const Windows::Media::MediaProperties::MediaEncodingProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareFileTranscodeAsync(get(source), get(destination), get(profile), put(operation))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_PrepareFileTranscodeAsync(get_abi(source), get_abi(destination), get_abi(profile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IMediaTranscoder::PrepareStreamTranscodeAsync(const Windows::Storage::Streams::IRandomAccessStream & source, const Windows::Storage::Streams::IRandomAccessStream & destination, const Windows::Media::MediaProperties::MediaEncodingProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareStreamTranscodeAsync(get(source), get(destination), get(profile), put(operation))); + check_hresult(WINRT_SHIM(IMediaTranscoder)->abi_PrepareStreamTranscodeAsync(get_abi(source), get_abi(destination), get_abi(profile), put_abi(operation))); return operation; } template bool impl_IPrepareTranscodeResult::CanTranscode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanTranscode(&value)); + check_hresult(WINRT_SHIM(IPrepareTranscodeResult)->get_CanTranscode(&value)); return value; } template Windows::Media::Transcoding::TranscodeFailureReason impl_IPrepareTranscodeResult::FailureReason() const { Windows::Media::Transcoding::TranscodeFailureReason value {}; - check_hresult(static_cast(static_cast(*this))->get_FailureReason(&value)); + check_hresult(WINRT_SHIM(IPrepareTranscodeResult)->get_FailureReason(&value)); return value; } template Windows::Foundation::IAsyncActionWithProgress impl_IPrepareTranscodeResult::TranscodeAsync() const { Windows::Foundation::IAsyncActionWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_TranscodeAsync(put(operation))); + check_hresult(WINRT_SHIM(IPrepareTranscodeResult)->abi_TranscodeAsync(put_abi(operation))); return operation; } @@ -443,3 +467,50 @@ inline MediaTranscoder::MediaTranscoder() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Transcoding::IMediaTranscoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Transcoding::IMediaTranscoder2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Transcoding::IPrepareTranscodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Transcoding::MediaTranscoder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::Transcoding::PrepareTranscodeResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Media.h b/10.0.14393.0/winrt/Windows.Media.h index 77bbcb10d..c4f98e8d2 100644 --- a/10.0.14393.0/winrt/Windows.Media.h +++ b/10.0.14393.0/winrt/Windows.Media.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Graphics.Imaging.3.h" #include "internal/Windows.Foundation.3.h" @@ -23,7 +26,8 @@ struct produce : produce_baseshim().Capacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capacity()); return S_OK; } catch (...) @@ -36,7 +40,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -49,6 +54,7 @@ struct produce : produce_baseshim()); this->shim().Length(value); return S_OK; } @@ -62,11 +68,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LockBuffer(Windows::Media::AudioBufferAccessMode mode, abi_arg_out value) noexcept override + HRESULT __stdcall abi_LockBuffer(Windows::Media::AudioBufferAccessMode mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LockBuffer(mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockBuffer(mode)); return S_OK; } catch (...) @@ -80,11 +87,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t capacity, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint32_t capacity, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(capacity)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(capacity)); return S_OK; } catch (...) @@ -102,7 +110,8 @@ struct produce : pro { try { - *value = detach(this->shim().RequestedAutoRepeatMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedAutoRepeatMode()); return S_OK; } catch (...) @@ -115,11 +124,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -129,10 +139,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -142,11 +153,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -156,10 +168,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Subtitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return S_OK; } @@ -173,11 +186,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_SoundLevelChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_SoundLevelChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().SoundLevelChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().SoundLevelChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -190,6 +204,7 @@ struct produce : produce_baseshim()); this->shim().SoundLevelChanged(cookie); return S_OK; } @@ -199,11 +214,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PlayPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PlayPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PlayPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -216,6 +232,7 @@ struct produce : produce_baseshim()); this->shim().PlayPressed(cookie); return S_OK; } @@ -225,11 +242,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PausePressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PausePressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PausePressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -242,6 +260,7 @@ struct produce : produce_baseshim()); this->shim().PausePressed(cookie); return S_OK; } @@ -251,11 +270,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StopPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StopPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StopPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -268,6 +288,7 @@ struct produce : produce_baseshim()); this->shim().StopPressed(cookie); return S_OK; } @@ -277,11 +298,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PlayPauseTogglePressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PlayPauseTogglePressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PlayPauseTogglePressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -294,6 +316,7 @@ struct produce : produce_baseshim()); this->shim().PlayPauseTogglePressed(cookie); return S_OK; } @@ -303,11 +326,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_RecordPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().RecordPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().RecordPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -320,6 +344,7 @@ struct produce : produce_baseshim()); this->shim().RecordPressed(cookie); return S_OK; } @@ -329,11 +354,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_NextTrackPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().NextTrackPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().NextTrackPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -346,6 +372,7 @@ struct produce : produce_baseshim()); this->shim().NextTrackPressed(cookie); return S_OK; } @@ -355,11 +382,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PreviousTrackPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PreviousTrackPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PreviousTrackPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -372,6 +400,7 @@ struct produce : produce_baseshim()); this->shim().PreviousTrackPressed(cookie); return S_OK; } @@ -381,11 +410,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_FastForwardPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().FastForwardPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().FastForwardPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -398,6 +428,7 @@ struct produce : produce_baseshim()); this->shim().FastForwardPressed(cookie); return S_OK; } @@ -407,11 +438,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_RewindPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().RewindPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().RewindPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -424,6 +456,7 @@ struct produce : produce_baseshim()); this->shim().RewindPressed(cookie); return S_OK; } @@ -433,11 +466,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ChannelUpPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ChannelUpPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ChannelUpPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -450,6 +484,7 @@ struct produce : produce_baseshim()); this->shim().ChannelUpPressed(cookie); return S_OK; } @@ -459,11 +494,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ChannelDownPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ChannelDownPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ChannelDownPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -476,6 +512,7 @@ struct produce : produce_baseshim()); this->shim().ChannelDownPressed(cookie); return S_OK; } @@ -489,7 +526,8 @@ struct produce : produce_baseshim().SoundLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoundLevel()); return S_OK; } catch (...) @@ -498,10 +536,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TrackName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TrackName(*reinterpret_cast(&value)); return S_OK; } @@ -511,11 +550,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrackName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrackName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackName()); return S_OK; } catch (...) @@ -525,10 +565,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ArtistName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ArtistName(*reinterpret_cast(&value)); return S_OK; } @@ -538,11 +579,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ArtistName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ArtistName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ArtistName()); return S_OK; } catch (...) @@ -556,6 +598,7 @@ struct produce : produce_baseshim()); this->shim().IsPlaying(value); return S_OK; } @@ -569,7 +612,8 @@ struct produce : produce_baseshim().IsPlaying()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlaying()); return S_OK; } catch (...) @@ -578,10 +622,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AlbumArt(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AlbumArt(*reinterpret_cast(&value)); return S_OK; } @@ -591,11 +636,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AlbumArt(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumArt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumArt()); return S_OK; } catch (...) @@ -609,10 +655,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SetProperties(abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_SetProperties(impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetProperties(*reinterpret_cast(&configuration)); return S_OK; } @@ -626,10 +673,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RegisterSchemeHandler(abi_arg_in activatableClassId, abi_arg_in scheme) noexcept override + HRESULT __stdcall abi_RegisterSchemeHandler(impl::abi_arg_in activatableClassId, impl::abi_arg_in scheme) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterSchemeHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&scheme)); return S_OK; } @@ -639,10 +687,11 @@ struct produce : produce_base activatableClassId, abi_arg_in scheme, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterSchemeHandlerWithSettings(impl::abi_arg_in activatableClassId, impl::abi_arg_in scheme, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterSchemeHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&scheme), *reinterpret_cast(&configuration)); return S_OK; } @@ -652,10 +701,11 @@ struct produce : produce_base activatableClassId, abi_arg_in fileExtension, abi_arg_in mimeType) noexcept override + HRESULT __stdcall abi_RegisterByteStreamHandler(impl::abi_arg_in activatableClassId, impl::abi_arg_in fileExtension, impl::abi_arg_in mimeType) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterByteStreamHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&fileExtension), *reinterpret_cast(&mimeType)); return S_OK; } @@ -665,10 +715,11 @@ struct produce : produce_base activatableClassId, abi_arg_in fileExtension, abi_arg_in mimeType, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterByteStreamHandlerWithSettings(impl::abi_arg_in activatableClassId, impl::abi_arg_in fileExtension, impl::abi_arg_in mimeType, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterByteStreamHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&fileExtension), *reinterpret_cast(&mimeType), *reinterpret_cast(&configuration)); return S_OK; } @@ -678,10 +729,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override + HRESULT __stdcall abi_RegisterAudioDecoder(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioDecoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype); return S_OK; } @@ -691,10 +743,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterAudioDecoderWithSettings(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioDecoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype, *reinterpret_cast(&configuration)); return S_OK; } @@ -704,10 +757,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override + HRESULT __stdcall abi_RegisterAudioEncoder(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioEncoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype); return S_OK; } @@ -717,10 +771,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterAudioEncoderWithSettings(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioEncoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype, *reinterpret_cast(&configuration)); return S_OK; } @@ -730,10 +785,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override + HRESULT __stdcall abi_RegisterVideoDecoder(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoDecoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype); return S_OK; } @@ -743,10 +799,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterVideoDecoderWithSettings(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoDecoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype, *reinterpret_cast(&configuration)); return S_OK; } @@ -756,10 +813,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override + HRESULT __stdcall abi_RegisterVideoEncoder(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoEncoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype); return S_OK; } @@ -769,10 +827,11 @@ struct produce : produce_base activatableClassId, GUID inputSubtype, GUID outputSubtype, abi_arg_in configuration) noexcept override + HRESULT __stdcall abi_RegisterVideoEncoderWithSettings(impl::abi_arg_in activatableClassId, GUID inputSubtype, GUID outputSubtype, impl::abi_arg_in configuration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoEncoder(*reinterpret_cast(&activatableClassId), inputSubtype, outputSubtype, *reinterpret_cast(&configuration)); return S_OK; } @@ -786,11 +845,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Type(abi_arg_out value) noexcept override + HRESULT __stdcall get_Type(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -804,7 +864,8 @@ struct produce : produce_baseshim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -813,10 +874,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_RelativeTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelativeTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -826,11 +888,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RelativeTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeTime()); return S_OK; } catch (...) @@ -840,10 +903,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_SystemRelativeTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SystemRelativeTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -853,11 +917,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SystemRelativeTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SystemRelativeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemRelativeTime()); return S_OK; } catch (...) @@ -867,10 +932,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast *>(&value)); return S_OK; } @@ -880,11 +946,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -898,6 +965,7 @@ struct produce : produce_baseshim()); this->shim().IsDiscontinuous(value); return S_OK; } @@ -911,7 +979,8 @@ struct produce : produce_baseshim().IsDiscontinuous()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDiscontinuous()); return S_OK; } catch (...) @@ -920,11 +989,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -938,11 +1008,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Time(abi_arg_out value) noexcept override + HRESULT __stdcall get_Time(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Time()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Time()); return S_OK; } catch (...) @@ -951,11 +1022,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MediaMarkerType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaMarkerType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaMarkerType()); return S_OK; } catch (...) @@ -965,11 +1037,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -983,11 +1056,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Bookmark(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bookmark(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bookmark()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bookmark()); return S_OK; } catch (...) @@ -1001,11 +1075,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Markers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Markers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Markers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Markers()); return S_OK; } catch (...) @@ -1019,11 +1094,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -1041,6 +1117,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -1054,6 +1131,7 @@ struct produce : produce_baseshim()); this->shim().Resume(); return S_OK; } @@ -1067,6 +1145,7 @@ struct produce : produce_baseshim()); this->shim().Pause(); return S_OK; } @@ -1076,11 +1155,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1089,10 +1169,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -1106,7 +1187,8 @@ struct produce : produce_baseshim().ClockRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockRate()); return S_OK; } catch (...) @@ -1119,6 +1201,7 @@ struct produce : produce_baseshim()); this->shim().ClockRate(value); return S_OK; } @@ -1132,7 +1215,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1141,11 +1225,12 @@ struct produce : produce_base> positionChangedEventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_PositionChanged(impl::abi_arg_in> positionChangedEventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().PositionChanged(*reinterpret_cast *>(&positionChangedEventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().PositionChanged(*reinterpret_cast *>(&positionChangedEventHandler))); return S_OK; } catch (...) @@ -1158,6 +1243,7 @@ struct produce : produce_baseshim()); this->shim().PositionChanged(eventCookie); return S_OK; } @@ -1167,11 +1253,12 @@ struct produce : produce_base> stateChangedEventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_StateChanged(impl::abi_arg_in> stateChangedEventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().StateChanged(*reinterpret_cast *>(&stateChangedEventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().StateChanged(*reinterpret_cast *>(&stateChangedEventHandler))); return S_OK; } catch (...) @@ -1184,6 +1271,7 @@ struct produce : produce_baseshim()); this->shim().StateChanged(eventCookie); return S_OK; } @@ -1197,11 +1285,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1211,10 +1300,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -1224,11 +1314,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AlbumArtist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumArtist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumArtist()); return S_OK; } catch (...) @@ -1238,10 +1329,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AlbumArtist(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AlbumArtist(*reinterpret_cast(&value)); return S_OK; } @@ -1251,11 +1343,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Artist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Artist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Artist()); return S_OK; } catch (...) @@ -1265,10 +1358,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Artist(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Artist(*reinterpret_cast(&value)); return S_OK; } @@ -1282,11 +1376,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AlbumTitle(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlbumTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumTitle()); return S_OK; } catch (...) @@ -1296,10 +1391,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AlbumTitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AlbumTitle(*reinterpret_cast(&value)); return S_OK; } @@ -1313,7 +1409,8 @@ struct produce : produce_baseshim().TrackNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackNumber()); return S_OK; } catch (...) @@ -1326,6 +1423,7 @@ struct produce : produce_baseshim()); this->shim().TrackNumber(value); return S_OK; } @@ -1335,11 +1433,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Genres(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Genres()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Genres()); return S_OK; } catch (...) @@ -1357,7 +1456,8 @@ struct produce : produce_baseshim().AlbumTrackCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumTrackCount()); return S_OK; } catch (...) @@ -1370,6 +1470,7 @@ struct produce : produce_baseshim()); this->shim().AlbumTrackCount(value); return S_OK; } @@ -1383,11 +1484,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_RequestedPlaybackPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_RequestedPlaybackPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestedPlaybackPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedPlaybackPosition()); return S_OK; } catch (...) @@ -1404,7 +1506,8 @@ struct produce : produ { try { - *value = detach(this->shim().RequestedPlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedPlaybackRate()); return S_OK; } catch (...) @@ -1421,7 +1524,8 @@ struct produce : pro { try { - *value = detach(this->shim().RequestedShuffleEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedShuffleEnabled()); return S_OK; } catch (...) @@ -1438,7 +1542,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().PlaybackStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackStatus()); return S_OK; } catch (...) @@ -1451,6 +1556,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackStatus(value); return S_OK; } @@ -1460,11 +1566,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_DisplayUpdater(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayUpdater(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayUpdater()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayUpdater()); return S_OK; } catch (...) @@ -1478,7 +1585,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().SoundLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoundLevel()); return S_OK; } catch (...) @@ -1491,7 +1599,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -1504,6 +1613,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return S_OK; } @@ -1517,7 +1627,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsPlayEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlayEnabled()); return S_OK; } catch (...) @@ -1530,6 +1641,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPlayEnabled(value); return S_OK; } @@ -1543,7 +1655,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsStopEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStopEnabled()); return S_OK; } catch (...) @@ -1556,6 +1669,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsStopEnabled(value); return S_OK; } @@ -1569,7 +1683,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsPauseEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPauseEnabled()); return S_OK; } catch (...) @@ -1582,6 +1697,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPauseEnabled(value); return S_OK; } @@ -1595,7 +1711,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsRecordEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRecordEnabled()); return S_OK; } catch (...) @@ -1608,6 +1725,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRecordEnabled(value); return S_OK; } @@ -1621,7 +1739,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsFastForwardEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastForwardEnabled()); return S_OK; } catch (...) @@ -1634,6 +1753,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFastForwardEnabled(value); return S_OK; } @@ -1647,7 +1767,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsRewindEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRewindEnabled()); return S_OK; } catch (...) @@ -1660,6 +1781,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRewindEnabled(value); return S_OK; } @@ -1673,7 +1795,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsPreviousEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPreviousEnabled()); return S_OK; } catch (...) @@ -1686,6 +1809,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPreviousEnabled(value); return S_OK; } @@ -1699,7 +1823,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsNextEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNextEnabled()); return S_OK; } catch (...) @@ -1712,6 +1837,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsNextEnabled(value); return S_OK; } @@ -1725,7 +1851,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsChannelUpEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsChannelUpEnabled()); return S_OK; } catch (...) @@ -1738,6 +1865,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsChannelUpEnabled(value); return S_OK; } @@ -1751,7 +1879,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsChannelDownEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsChannelDownEnabled()); return S_OK; } catch (...) @@ -1764,6 +1893,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsChannelDownEnabled(value); return S_OK; } @@ -1773,11 +1903,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_ButtonPressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ButtonPressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ButtonPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ButtonPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1790,6 +1921,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonPressed(token); return S_OK; } @@ -1799,11 +1931,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_PropertyChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PropertyChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PropertyChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PropertyChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1816,6 +1949,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().PropertyChanged(token); return S_OK; } @@ -1833,7 +1967,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().AutoRepeatMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoRepeatMode()); return S_OK; } catch (...) @@ -1846,6 +1981,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatMode(value); return S_OK; } @@ -1859,7 +1995,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ShuffleEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShuffleEnabled()); return S_OK; } catch (...) @@ -1872,6 +2009,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ShuffleEnabled(value); return S_OK; } @@ -1885,7 +2023,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRate()); return S_OK; } catch (...) @@ -1898,6 +2037,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackRate(value); return S_OK; } @@ -1907,10 +2047,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_UpdateTimelineProperties(abi_arg_in timelineProperties) noexcept override + HRESULT __stdcall abi_UpdateTimelineProperties(impl::abi_arg_in timelineProperties) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateTimelineProperties(*reinterpret_cast(&timelineProperties)); return S_OK; } @@ -1920,11 +2061,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_PlaybackPositionChangeRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackPositionChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackPositionChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackPositionChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1937,6 +2079,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackPositionChangeRequested(token); return S_OK; } @@ -1946,11 +2089,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_PlaybackRateChangeRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_PlaybackRateChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PlaybackRateChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PlaybackRateChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1963,6 +2107,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaybackRateChangeRequested(token); return S_OK; } @@ -1972,11 +2117,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_ShuffleEnabledChangeRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ShuffleEnabledChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ShuffleEnabledChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ShuffleEnabledChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1989,6 +2135,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ShuffleEnabledChangeRequested(token); return S_OK; } @@ -1998,11 +2145,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_AutoRepeatModeChangeRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_AutoRepeatModeChangeRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AutoRepeatModeChangeRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AutoRepeatModeChangeRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2015,6 +2163,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatModeChangeRequested(token); return S_OK; } @@ -2032,7 +2181,8 @@ struct produceshim().Button()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Button()); return S_OK; } catch (...) @@ -2049,7 +2199,8 @@ struct produce : { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -2062,6 +2213,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Type(value); return S_OK; } @@ -2071,11 +2223,12 @@ struct produce : } } - HRESULT __stdcall get_AppMediaId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppMediaId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppMediaId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppMediaId()); return S_OK; } catch (...) @@ -2085,10 +2238,11 @@ struct produce : } } - HRESULT __stdcall put_AppMediaId(abi_arg_in value) noexcept override + HRESULT __stdcall put_AppMediaId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppMediaId(*reinterpret_cast(&value)); return S_OK; } @@ -2098,11 +2252,12 @@ struct produce : } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -2112,10 +2267,11 @@ struct produce : } } - HRESULT __stdcall put_Thumbnail(abi_arg_in value) noexcept override + HRESULT __stdcall put_Thumbnail(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return S_OK; } @@ -2125,11 +2281,12 @@ struct produce : } } - HRESULT __stdcall get_MusicProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_MusicProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MusicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MusicProperties()); return S_OK; } catch (...) @@ -2139,11 +2296,12 @@ struct produce : } } - HRESULT __stdcall get_VideoProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProperties()); return S_OK; } catch (...) @@ -2153,11 +2311,12 @@ struct produce : } } - HRESULT __stdcall get_ImageProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageProperties()); return S_OK; } catch (...) @@ -2167,11 +2326,12 @@ struct produce : } } - HRESULT __stdcall abi_CopyFromFileAsync(Windows::Media::MediaPlaybackType type, abi_arg_in source, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyFromFileAsync(Windows::Media::MediaPlaybackType type, impl::abi_arg_in source, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyFromFileAsync(type, *reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyFromFileAsync(type, *reinterpret_cast(&source))); return S_OK; } catch (...) @@ -2185,6 +2345,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearAll(); return S_OK; } @@ -2198,6 +2359,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(); return S_OK; } @@ -2215,7 +2377,8 @@ struct produceshim().Property()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Property()); return S_OK; } catch (...) @@ -2228,11 +2391,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out mediaControl) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out mediaControl) noexcept override { try { - *mediaControl = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *mediaControl = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2246,11 +2410,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -2259,10 +2424,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_StartTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return S_OK; } @@ -2272,11 +2438,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EndTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndTime()); return S_OK; } catch (...) @@ -2285,10 +2452,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_EndTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EndTime(*reinterpret_cast(&value)); return S_OK; } @@ -2298,11 +2466,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinSeekTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinSeekTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinSeekTime()); return S_OK; } catch (...) @@ -2311,10 +2480,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_MinSeekTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinSeekTime(*reinterpret_cast(&value)); return S_OK; } @@ -2324,11 +2494,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxSeekTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSeekTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSeekTime()); return S_OK; } catch (...) @@ -2337,10 +2508,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_MaxSeekTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxSeekTime(*reinterpret_cast(&value)); return S_OK; } @@ -2350,11 +2522,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2363,10 +2536,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -2380,11 +2554,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -2394,10 +2569,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -2407,11 +2583,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -2421,10 +2598,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Subtitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return S_OK; } @@ -2438,11 +2616,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Genres(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Genres(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Genres()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Genres()); return S_OK; } catch (...) @@ -2456,11 +2635,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_VideoStabilization(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoStabilization(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoStabilization()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoStabilization()); return S_OK; } catch (...) @@ -2474,11 +2654,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SoftwareBitmap(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoftwareBitmap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareBitmap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareBitmap()); return S_OK; } catch (...) @@ -2488,11 +2669,12 @@ struct produce : produce_base frame, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CopyToAsync(impl::abi_arg_in frame, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CopyToAsync(*reinterpret_cast(&frame))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CopyToAsync(*reinterpret_cast(&frame))); return S_OK; } catch (...) @@ -2502,11 +2684,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Direct3DSurface(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direct3DSurface()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direct3DSurface()); return S_OK; } catch (...) @@ -2520,11 +2703,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(format, width, height)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(format, width, height)); return S_OK; } catch (...) @@ -2534,11 +2718,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_CreateWithAlpha(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithAlpha(format, width, height, alpha)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithAlpha(format, width, height, alpha)); return S_OK; } catch (...) @@ -2556,654 +2741,654 @@ namespace Windows::Media { template Windows::Foundation::Collections::ValueSet impl_IMediaProcessingTriggerDetails::Arguments() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IMediaProcessingTriggerDetails)->get_Arguments(put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IVideoFrameFactory::Create(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height) const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(format, width, height, put(value))); + check_hresult(WINRT_SHIM(IVideoFrameFactory)->abi_Create(format, width, height, put_abi(value))); return value; } template Windows::Media::VideoFrame impl_IVideoFrameFactory::CreateWithAlpha(Windows::Graphics::Imaging::BitmapPixelFormat format, int32_t width, int32_t height, Windows::Graphics::Imaging::BitmapAlphaMode alpha) const { Windows::Media::VideoFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithAlpha(format, width, height, alpha, put(value))); + check_hresult(WINRT_SHIM(IVideoFrameFactory)->abi_CreateWithAlpha(format, width, height, alpha, put_abi(value))); return value; } template Windows::Media::AudioFrame impl_IAudioFrameFactory::Create(uint32_t capacity) const { Windows::Media::AudioFrame value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(capacity, put(value))); + check_hresult(WINRT_SHIM(IAudioFrameFactory)->abi_Create(capacity, put_abi(value))); return value; } template hstring impl_IMediaFrame::Type() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Type(put(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->get_Type(put_abi(value))); return value; } template bool impl_IMediaFrame::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(IMediaFrame)->get_IsReadOnly(&value)); return value; } -template void impl_IMediaFrame::RelativeTime(const Windows::Foundation::IReference & value) const +template void impl_IMediaFrame::RelativeTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_RelativeTime(get(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->put_RelativeTime(get_abi(value))); } template Windows::Foundation::IReference impl_IMediaFrame::RelativeTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RelativeTime(put(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->get_RelativeTime(put_abi(value))); return value; } -template void impl_IMediaFrame::SystemRelativeTime(const Windows::Foundation::IReference & value) const +template void impl_IMediaFrame::SystemRelativeTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemRelativeTime(get(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->put_SystemRelativeTime(get_abi(value))); } template Windows::Foundation::IReference impl_IMediaFrame::SystemRelativeTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SystemRelativeTime(put(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->get_SystemRelativeTime(put_abi(value))); return value; } -template void impl_IMediaFrame::Duration(const Windows::Foundation::IReference & value) const +template void impl_IMediaFrame::Duration(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->put_Duration(get_abi(value))); } template Windows::Foundation::IReference impl_IMediaFrame::Duration() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->get_Duration(put_abi(value))); return value; } template void impl_IMediaFrame::IsDiscontinuous(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDiscontinuous(value)); + check_hresult(WINRT_SHIM(IMediaFrame)->put_IsDiscontinuous(value)); } template bool impl_IMediaFrame::IsDiscontinuous() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDiscontinuous(&value)); + check_hresult(WINRT_SHIM(IMediaFrame)->get_IsDiscontinuous(&value)); return value; } template Windows::Foundation::Collections::IPropertySet impl_IMediaFrame::ExtendedProperties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(value))); + check_hresult(WINRT_SHIM(IMediaFrame)->get_ExtendedProperties(put_abi(value))); return value; } template Windows::Graphics::Imaging::SoftwareBitmap impl_IVideoFrame::SoftwareBitmap() const { Windows::Graphics::Imaging::SoftwareBitmap value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SoftwareBitmap(put(value))); + check_hresult(WINRT_SHIM(IVideoFrame)->get_SoftwareBitmap(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IVideoFrame::CopyToAsync(const Windows::Media::VideoFrame & frame) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_CopyToAsync(get(frame), put(value))); + check_hresult(WINRT_SHIM(IVideoFrame)->abi_CopyToAsync(get_abi(frame), put_abi(value))); return value; } template Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface impl_IVideoFrame::Direct3DSurface() const { Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface value; - check_hresult(static_cast(static_cast(*this))->get_Direct3DSurface(put(value))); + check_hresult(WINRT_SHIM(IVideoFrame)->get_Direct3DSurface(put_abi(value))); return value; } template Windows::Media::AudioBuffer impl_IAudioFrame::LockBuffer(Windows::Media::AudioBufferAccessMode mode) const { Windows::Media::AudioBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_LockBuffer(mode, put(value))); + check_hresult(WINRT_SHIM(IAudioFrame)->abi_LockBuffer(mode, put_abi(value))); return value; } template uint32_t impl_IAudioBuffer::Capacity() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Capacity(&value)); + check_hresult(WINRT_SHIM(IAudioBuffer)->get_Capacity(&value)); return value; } template uint32_t impl_IAudioBuffer::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IAudioBuffer)->get_Length(&value)); return value; } template void impl_IAudioBuffer::Length(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Length(value)); + check_hresult(WINRT_SHIM(IAudioBuffer)->put_Length(value)); } template Windows::Foundation::TimeSpan impl_IMediaMarker::Time() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Time(put(value))); + check_hresult(WINRT_SHIM(IMediaMarker)->get_Time(put_abi(value))); return value; } template hstring impl_IMediaMarker::MediaMarkerType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MediaMarkerType(put(value))); + check_hresult(WINRT_SHIM(IMediaMarker)->get_MediaMarkerType(put_abi(value))); return value; } template hstring impl_IMediaMarker::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IMediaMarker)->get_Text(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMediaMarkers::Markers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Markers(put(value))); + check_hresult(WINRT_SHIM(IMediaMarkers)->get_Markers(put_abi(value))); return value; } template hstring impl_IMediaMarkerTypesStatics::Bookmark() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Bookmark(put(value))); + check_hresult(WINRT_SHIM(IMediaMarkerTypesStatics)->get_Bookmark(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ISystemMediaTransportControlsTimelineProperties::StartTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->get_StartTime(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsTimelineProperties::StartTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_StartTime(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->put_StartTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISystemMediaTransportControlsTimelineProperties::EndTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_EndTime(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->get_EndTime(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsTimelineProperties::EndTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_EndTime(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->put_EndTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISystemMediaTransportControlsTimelineProperties::MinSeekTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MinSeekTime(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->get_MinSeekTime(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsTimelineProperties::MinSeekTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinSeekTime(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->put_MinSeekTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISystemMediaTransportControlsTimelineProperties::MaxSeekTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSeekTime(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->get_MaxSeekTime(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsTimelineProperties::MaxSeekTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxSeekTime(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->put_MaxSeekTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_ISystemMediaTransportControlsTimelineProperties::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->get_Position(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsTimelineProperties::Position(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsTimelineProperties)->put_Position(get_abi(value))); } template hstring impl_IMusicDisplayProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->get_Title(put_abi(value))); return value; } -template void impl_IMusicDisplayProperties::Title(hstring_ref value) const +template void impl_IMusicDisplayProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->put_Title(get_abi(value))); } template hstring impl_IMusicDisplayProperties::AlbumArtist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlbumArtist(put(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->get_AlbumArtist(put_abi(value))); return value; } -template void impl_IMusicDisplayProperties::AlbumArtist(hstring_ref value) const +template void impl_IMusicDisplayProperties::AlbumArtist(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AlbumArtist(get(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->put_AlbumArtist(get_abi(value))); } template hstring impl_IMusicDisplayProperties::Artist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Artist(put(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->get_Artist(put_abi(value))); return value; } -template void impl_IMusicDisplayProperties::Artist(hstring_ref value) const +template void impl_IMusicDisplayProperties::Artist(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Artist(get(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties)->put_Artist(get_abi(value))); } template hstring impl_IMusicDisplayProperties2::AlbumTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlbumTitle(put(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties2)->get_AlbumTitle(put_abi(value))); return value; } -template void impl_IMusicDisplayProperties2::AlbumTitle(hstring_ref value) const +template void impl_IMusicDisplayProperties2::AlbumTitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AlbumTitle(get(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties2)->put_AlbumTitle(get_abi(value))); } template uint32_t impl_IMusicDisplayProperties2::TrackNumber() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TrackNumber(&value)); + check_hresult(WINRT_SHIM(IMusicDisplayProperties2)->get_TrackNumber(&value)); return value; } template void impl_IMusicDisplayProperties2::TrackNumber(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TrackNumber(value)); + check_hresult(WINRT_SHIM(IMusicDisplayProperties2)->put_TrackNumber(value)); } template Windows::Foundation::Collections::IVector impl_IMusicDisplayProperties2::Genres() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Genres(put(value))); + check_hresult(WINRT_SHIM(IMusicDisplayProperties2)->get_Genres(put_abi(value))); return value; } template uint32_t impl_IMusicDisplayProperties3::AlbumTrackCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AlbumTrackCount(&value)); + check_hresult(WINRT_SHIM(IMusicDisplayProperties3)->get_AlbumTrackCount(&value)); return value; } template void impl_IMusicDisplayProperties3::AlbumTrackCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_AlbumTrackCount(value)); + check_hresult(WINRT_SHIM(IMusicDisplayProperties3)->put_AlbumTrackCount(value)); } template hstring impl_IVideoDisplayProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IVideoDisplayProperties)->get_Title(put_abi(value))); return value; } -template void impl_IVideoDisplayProperties::Title(hstring_ref value) const +template void impl_IVideoDisplayProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IVideoDisplayProperties)->put_Title(get_abi(value))); } template hstring impl_IVideoDisplayProperties::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IVideoDisplayProperties)->get_Subtitle(put_abi(value))); return value; } -template void impl_IVideoDisplayProperties::Subtitle(hstring_ref value) const +template void impl_IVideoDisplayProperties::Subtitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subtitle(get(value))); + check_hresult(WINRT_SHIM(IVideoDisplayProperties)->put_Subtitle(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVideoDisplayProperties2::Genres() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Genres(put(value))); + check_hresult(WINRT_SHIM(IVideoDisplayProperties2)->get_Genres(put_abi(value))); return value; } template hstring impl_IImageDisplayProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IImageDisplayProperties)->get_Title(put_abi(value))); return value; } -template void impl_IImageDisplayProperties::Title(hstring_ref value) const +template void impl_IImageDisplayProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IImageDisplayProperties)->put_Title(get_abi(value))); } template hstring impl_IImageDisplayProperties::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IImageDisplayProperties)->get_Subtitle(put_abi(value))); return value; } -template void impl_IImageDisplayProperties::Subtitle(hstring_ref value) const +template void impl_IImageDisplayProperties::Subtitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subtitle(get(value))); + check_hresult(WINRT_SHIM(IImageDisplayProperties)->put_Subtitle(get_abi(value))); } template Windows::Media::MediaPlaybackType impl_ISystemMediaTransportControlsDisplayUpdater::Type() const { Windows::Media::MediaPlaybackType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_Type(&value)); return value; } template void impl_ISystemMediaTransportControlsDisplayUpdater::Type(Windows::Media::MediaPlaybackType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->put_Type(value)); } template hstring impl_ISystemMediaTransportControlsDisplayUpdater::AppMediaId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppMediaId(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_AppMediaId(put_abi(value))); return value; } -template void impl_ISystemMediaTransportControlsDisplayUpdater::AppMediaId(hstring_ref value) const +template void impl_ISystemMediaTransportControlsDisplayUpdater::AppMediaId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AppMediaId(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->put_AppMediaId(get_abi(value))); } template Windows::Storage::Streams::RandomAccessStreamReference impl_ISystemMediaTransportControlsDisplayUpdater::Thumbnail() const { Windows::Storage::Streams::RandomAccessStreamReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_Thumbnail(put_abi(value))); return value; } template void impl_ISystemMediaTransportControlsDisplayUpdater::Thumbnail(const Windows::Storage::Streams::RandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbnail(get(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->put_Thumbnail(get_abi(value))); } template Windows::Media::MusicDisplayProperties impl_ISystemMediaTransportControlsDisplayUpdater::MusicProperties() const { Windows::Media::MusicDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MusicProperties(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_MusicProperties(put_abi(value))); return value; } template Windows::Media::VideoDisplayProperties impl_ISystemMediaTransportControlsDisplayUpdater::VideoProperties() const { Windows::Media::VideoDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProperties(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_VideoProperties(put_abi(value))); return value; } template Windows::Media::ImageDisplayProperties impl_ISystemMediaTransportControlsDisplayUpdater::ImageProperties() const { Windows::Media::ImageDisplayProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImageProperties(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->get_ImageProperties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISystemMediaTransportControlsDisplayUpdater::CopyFromFileAsync(Windows::Media::MediaPlaybackType type, const Windows::Storage::StorageFile & source) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyFromFileAsync(type, get(source), put(operation))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->abi_CopyFromFileAsync(type, get_abi(source), put_abi(operation))); return operation; } template void impl_ISystemMediaTransportControlsDisplayUpdater::ClearAll() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearAll()); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->abi_ClearAll()); } template void impl_ISystemMediaTransportControlsDisplayUpdater::Update() const { - check_hresult(static_cast(static_cast(*this))->abi_Update()); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsDisplayUpdater)->abi_Update()); } template Windows::Media::SystemMediaTransportControlsButton impl_ISystemMediaTransportControlsButtonPressedEventArgs::Button() const { Windows::Media::SystemMediaTransportControlsButton value {}; - check_hresult(static_cast(static_cast(*this))->get_Button(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsButtonPressedEventArgs)->get_Button(&value)); return value; } template Windows::Media::SystemMediaTransportControlsProperty impl_ISystemMediaTransportControlsPropertyChangedEventArgs::Property() const { Windows::Media::SystemMediaTransportControlsProperty value {}; - check_hresult(static_cast(static_cast(*this))->get_Property(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsPropertyChangedEventArgs)->get_Property(&value)); return value; } template Windows::Foundation::TimeSpan impl_IPlaybackPositionChangeRequestedEventArgs::RequestedPlaybackPosition() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedPlaybackPosition(put(value))); + check_hresult(WINRT_SHIM(IPlaybackPositionChangeRequestedEventArgs)->get_RequestedPlaybackPosition(put_abi(value))); return value; } template double impl_IPlaybackRateChangeRequestedEventArgs::RequestedPlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedPlaybackRate(&value)); + check_hresult(WINRT_SHIM(IPlaybackRateChangeRequestedEventArgs)->get_RequestedPlaybackRate(&value)); return value; } template bool impl_IShuffleEnabledChangeRequestedEventArgs::RequestedShuffleEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedShuffleEnabled(&value)); + check_hresult(WINRT_SHIM(IShuffleEnabledChangeRequestedEventArgs)->get_RequestedShuffleEnabled(&value)); return value; } template Windows::Media::MediaPlaybackAutoRepeatMode impl_IAutoRepeatModeChangeRequestedEventArgs::RequestedAutoRepeatMode() const { Windows::Media::MediaPlaybackAutoRepeatMode value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestedAutoRepeatMode(&value)); + check_hresult(WINRT_SHIM(IAutoRepeatModeChangeRequestedEventArgs)->get_RequestedAutoRepeatMode(&value)); return value; } template Windows::Media::MediaPlaybackStatus impl_ISystemMediaTransportControls::PlaybackStatus() const { Windows::Media::MediaPlaybackStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackStatus(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_PlaybackStatus(&value)); return value; } template void impl_ISystemMediaTransportControls::PlaybackStatus(Windows::Media::MediaPlaybackStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackStatus(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_PlaybackStatus(value)); } template Windows::Media::SystemMediaTransportControlsDisplayUpdater impl_ISystemMediaTransportControls::DisplayUpdater() const { Windows::Media::SystemMediaTransportControlsDisplayUpdater value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayUpdater(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_DisplayUpdater(put_abi(value))); return value; } template Windows::Media::SoundLevel impl_ISystemMediaTransportControls::SoundLevel() const { Windows::Media::SoundLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_SoundLevel(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_SoundLevel(&value)); return value; } template bool impl_ISystemMediaTransportControls::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsPlayEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPlayEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsPlayEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsPlayEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPlayEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsPlayEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsStopEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStopEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsStopEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsStopEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsStopEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsStopEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsPauseEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPauseEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsPauseEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsPauseEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPauseEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsPauseEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsRecordEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRecordEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsRecordEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsRecordEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRecordEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsRecordEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsFastForwardEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFastForwardEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsFastForwardEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsFastForwardEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFastForwardEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsFastForwardEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsRewindEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRewindEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsRewindEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsRewindEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRewindEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsRewindEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsPreviousEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPreviousEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsPreviousEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsPreviousEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPreviousEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsPreviousEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsNextEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNextEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsNextEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsNextEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsNextEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsNextEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsChannelUpEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsChannelUpEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsChannelUpEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsChannelUpEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsChannelUpEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsChannelUpEnabled(value)); } template bool impl_ISystemMediaTransportControls::IsChannelDownEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsChannelDownEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->get_IsChannelDownEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls::IsChannelDownEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsChannelDownEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->put_IsChannelDownEnabled(value)); } template event_token impl_ISystemMediaTransportControls::ButtonPressed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ButtonPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->add_ButtonPressed(get_abi(handler), &token)); return token; } @@ -3214,13 +3399,13 @@ template event_revoker impl_ISystemM template void impl_ISystemMediaTransportControls::ButtonPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ButtonPressed(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->remove_ButtonPressed(token)); } template event_token impl_ISystemMediaTransportControls::PropertyChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PropertyChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->add_PropertyChanged(get_abi(handler), &token)); return token; } @@ -3231,54 +3416,54 @@ template event_revoker impl_ISystemM template void impl_ISystemMediaTransportControls::PropertyChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PropertyChanged(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls)->remove_PropertyChanged(token)); } template Windows::Media::MediaPlaybackAutoRepeatMode impl_ISystemMediaTransportControls2::AutoRepeatMode() const { Windows::Media::MediaPlaybackAutoRepeatMode value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoRepeatMode(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->get_AutoRepeatMode(&value)); return value; } template void impl_ISystemMediaTransportControls2::AutoRepeatMode(Windows::Media::MediaPlaybackAutoRepeatMode value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoRepeatMode(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->put_AutoRepeatMode(value)); } template bool impl_ISystemMediaTransportControls2::ShuffleEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShuffleEnabled(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->get_ShuffleEnabled(&value)); return value; } template void impl_ISystemMediaTransportControls2::ShuffleEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShuffleEnabled(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->put_ShuffleEnabled(value)); } template double impl_ISystemMediaTransportControls2::PlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRate(&value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->get_PlaybackRate(&value)); return value; } template void impl_ISystemMediaTransportControls2::PlaybackRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackRate(value)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->put_PlaybackRate(value)); } template void impl_ISystemMediaTransportControls2::UpdateTimelineProperties(const Windows::Media::SystemMediaTransportControlsTimelineProperties & timelineProperties) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateTimelineProperties(get(timelineProperties))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->abi_UpdateTimelineProperties(get_abi(timelineProperties))); } template event_token impl_ISystemMediaTransportControls2::PlaybackPositionChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackPositionChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->add_PlaybackPositionChangeRequested(get_abi(handler), &token)); return token; } @@ -3289,13 +3474,13 @@ template event_revoker impl_ISystem template void impl_ISystemMediaTransportControls2::PlaybackPositionChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackPositionChangeRequested(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->remove_PlaybackPositionChangeRequested(token)); } template event_token impl_ISystemMediaTransportControls2::PlaybackRateChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PlaybackRateChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->add_PlaybackRateChangeRequested(get_abi(handler), &token)); return token; } @@ -3306,13 +3491,13 @@ template event_revoker impl_ISystem template void impl_ISystemMediaTransportControls2::PlaybackRateChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PlaybackRateChangeRequested(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->remove_PlaybackRateChangeRequested(token)); } template event_token impl_ISystemMediaTransportControls2::ShuffleEnabledChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ShuffleEnabledChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->add_ShuffleEnabledChangeRequested(get_abi(handler), &token)); return token; } @@ -3323,13 +3508,13 @@ template event_revoker impl_ISystem template void impl_ISystemMediaTransportControls2::ShuffleEnabledChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ShuffleEnabledChangeRequested(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->remove_ShuffleEnabledChangeRequested(token)); } template event_token impl_ISystemMediaTransportControls2::AutoRepeatModeChangeRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AutoRepeatModeChangeRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->add_AutoRepeatModeChangeRequested(get_abi(handler), &token)); return token; } @@ -3340,424 +3525,424 @@ template event_revoker impl_ISystem template void impl_ISystemMediaTransportControls2::AutoRepeatModeChangeRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AutoRepeatModeChangeRequested(token)); + check_hresult(WINRT_SHIM(ISystemMediaTransportControls2)->remove_AutoRepeatModeChangeRequested(token)); } template Windows::Media::SystemMediaTransportControls impl_ISystemMediaTransportControlsStatics::GetForCurrentView() const { Windows::Media::SystemMediaTransportControls mediaControl { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(mediaControl))); + check_hresult(WINRT_SHIM(ISystemMediaTransportControlsStatics)->abi_GetForCurrentView(put_abi(mediaControl))); return mediaControl; } template void impl_IMediaExtension::SetProperties(const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_SetProperties(get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtension)->abi_SetProperties(get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterSchemeHandler(hstring_ref activatableClassId, hstring_ref scheme) const +template void impl_IMediaExtensionManager::RegisterSchemeHandler(hstring_view activatableClassId, hstring_view scheme) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterSchemeHandler(get(activatableClassId), get(scheme))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterSchemeHandler(get_abi(activatableClassId), get_abi(scheme))); } -template void impl_IMediaExtensionManager::RegisterSchemeHandler(hstring_ref activatableClassId, hstring_ref scheme, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterSchemeHandler(hstring_view activatableClassId, hstring_view scheme, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterSchemeHandlerWithSettings(get(activatableClassId), get(scheme), get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterSchemeHandlerWithSettings(get_abi(activatableClassId), get_abi(scheme), get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterByteStreamHandler(hstring_ref activatableClassId, hstring_ref fileExtension, hstring_ref mimeType) const +template void impl_IMediaExtensionManager::RegisterByteStreamHandler(hstring_view activatableClassId, hstring_view fileExtension, hstring_view mimeType) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterByteStreamHandler(get(activatableClassId), get(fileExtension), get(mimeType))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterByteStreamHandler(get_abi(activatableClassId), get_abi(fileExtension), get_abi(mimeType))); } -template void impl_IMediaExtensionManager::RegisterByteStreamHandler(hstring_ref activatableClassId, hstring_ref fileExtension, hstring_ref mimeType, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterByteStreamHandler(hstring_view activatableClassId, hstring_view fileExtension, hstring_view mimeType, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterByteStreamHandlerWithSettings(get(activatableClassId), get(fileExtension), get(mimeType), get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterByteStreamHandlerWithSettings(get_abi(activatableClassId), get_abi(fileExtension), get_abi(mimeType), get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterAudioDecoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype) const +template void impl_IMediaExtensionManager::RegisterAudioDecoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterAudioDecoder(get(activatableClassId), inputSubtype, outputSubtype)); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterAudioDecoder(get_abi(activatableClassId), inputSubtype, outputSubtype)); } -template void impl_IMediaExtensionManager::RegisterAudioDecoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterAudioDecoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterAudioDecoderWithSettings(get(activatableClassId), inputSubtype, outputSubtype, get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterAudioDecoderWithSettings(get_abi(activatableClassId), inputSubtype, outputSubtype, get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterAudioEncoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype) const +template void impl_IMediaExtensionManager::RegisterAudioEncoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterAudioEncoder(get(activatableClassId), inputSubtype, outputSubtype)); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterAudioEncoder(get_abi(activatableClassId), inputSubtype, outputSubtype)); } -template void impl_IMediaExtensionManager::RegisterAudioEncoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterAudioEncoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterAudioEncoderWithSettings(get(activatableClassId), inputSubtype, outputSubtype, get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterAudioEncoderWithSettings(get_abi(activatableClassId), inputSubtype, outputSubtype, get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterVideoDecoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype) const +template void impl_IMediaExtensionManager::RegisterVideoDecoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterVideoDecoder(get(activatableClassId), inputSubtype, outputSubtype)); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterVideoDecoder(get_abi(activatableClassId), inputSubtype, outputSubtype)); } -template void impl_IMediaExtensionManager::RegisterVideoDecoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterVideoDecoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterVideoDecoderWithSettings(get(activatableClassId), inputSubtype, outputSubtype, get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterVideoDecoderWithSettings(get_abi(activatableClassId), inputSubtype, outputSubtype, get_abi(configuration))); } -template void impl_IMediaExtensionManager::RegisterVideoEncoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype) const +template void impl_IMediaExtensionManager::RegisterVideoEncoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterVideoEncoder(get(activatableClassId), inputSubtype, outputSubtype)); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterVideoEncoder(get_abi(activatableClassId), inputSubtype, outputSubtype)); } -template void impl_IMediaExtensionManager::RegisterVideoEncoder(hstring_ref activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const +template void impl_IMediaExtensionManager::RegisterVideoEncoder(hstring_view activatableClassId, GUID inputSubtype, GUID outputSubtype, const Windows::Foundation::Collections::IPropertySet & configuration) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterVideoEncoderWithSettings(get(activatableClassId), inputSubtype, outputSubtype, get(configuration))); + check_hresult(WINRT_SHIM(IMediaExtensionManager)->abi_RegisterVideoEncoderWithSettings(get_abi(activatableClassId), inputSubtype, outputSubtype, get_abi(configuration))); } template hstring impl_IVideoEffectsStatics::VideoStabilization() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoStabilization(put(value))); + check_hresult(WINRT_SHIM(IVideoEffectsStatics)->get_VideoStabilization(put_abi(value))); return value; } template void impl_IMediaTimelineController::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IMediaTimelineController)->abi_Start()); } template void impl_IMediaTimelineController::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(IMediaTimelineController)->abi_Resume()); } template void impl_IMediaTimelineController::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IMediaTimelineController)->abi_Pause()); } template Windows::Foundation::TimeSpan impl_IMediaTimelineController::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaTimelineController)->get_Position(put_abi(value))); return value; } template void impl_IMediaTimelineController::Position(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IMediaTimelineController)->put_Position(get_abi(value))); } template double impl_IMediaTimelineController::ClockRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ClockRate(&value)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->get_ClockRate(&value)); return value; } template void impl_IMediaTimelineController::ClockRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ClockRate(value)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->put_ClockRate(value)); } template Windows::Media::MediaTimelineControllerState impl_IMediaTimelineController::State() const { Windows::Media::MediaTimelineControllerState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->get_State(&value)); return value; } -template event_token impl_IMediaTimelineController::PositionChanged(const Windows::Foundation::TypedEventHandler & positionChangedEventHandler) const +template event_token impl_IMediaTimelineController::PositionChanged(const Windows::Foundation::TypedEventHandler & positionChangedEventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_PositionChanged(get(positionChangedEventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->add_PositionChanged(get_abi(positionChangedEventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IMediaTimelineController::PositionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & positionChangedEventHandler) const +template event_revoker impl_IMediaTimelineController::PositionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & positionChangedEventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaTimelineController::remove_PositionChanged, PositionChanged(positionChangedEventHandler)); } template void impl_IMediaTimelineController::PositionChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PositionChanged(eventCookie)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->remove_PositionChanged(eventCookie)); } -template event_token impl_IMediaTimelineController::StateChanged(const Windows::Foundation::TypedEventHandler & stateChangedEventHandler) const +template event_token impl_IMediaTimelineController::StateChanged(const Windows::Foundation::TypedEventHandler & stateChangedEventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_StateChanged(get(stateChangedEventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->add_StateChanged(get_abi(stateChangedEventHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IMediaTimelineController::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & stateChangedEventHandler) const +template event_revoker impl_IMediaTimelineController::StateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & stateChangedEventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaTimelineController::remove_StateChanged, StateChanged(stateChangedEventHandler)); } template void impl_IMediaTimelineController::StateChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StateChanged(eventCookie)); + check_hresult(WINRT_SHIM(IMediaTimelineController)->remove_StateChanged(eventCookie)); } -template event_token impl_IMediaControl::SoundLevelChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::SoundLevelChanged(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_SoundLevelChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_SoundLevelChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::SoundLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::SoundLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_SoundLevelChanged, SoundLevelChanged(handler)); } template void impl_IMediaControl::SoundLevelChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SoundLevelChanged(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_SoundLevelChanged(cookie)); } -template event_token impl_IMediaControl::PlayPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::PlayPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PlayPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_PlayPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::PlayPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::PlayPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_PlayPressed, PlayPressed(handler)); } template void impl_IMediaControl::PlayPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PlayPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_PlayPressed(cookie)); } -template event_token impl_IMediaControl::PausePressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::PausePressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PausePressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_PausePressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::PausePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::PausePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_PausePressed, PausePressed(handler)); } template void impl_IMediaControl::PausePressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PausePressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_PausePressed(cookie)); } -template event_token impl_IMediaControl::StopPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::StopPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StopPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_StopPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::StopPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::StopPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_StopPressed, StopPressed(handler)); } template void impl_IMediaControl::StopPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StopPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_StopPressed(cookie)); } -template event_token impl_IMediaControl::PlayPauseTogglePressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::PlayPauseTogglePressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PlayPauseTogglePressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_PlayPauseTogglePressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::PlayPauseTogglePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::PlayPauseTogglePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_PlayPauseTogglePressed, PlayPauseTogglePressed(handler)); } template void impl_IMediaControl::PlayPauseTogglePressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PlayPauseTogglePressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_PlayPauseTogglePressed(cookie)); } -template event_token impl_IMediaControl::RecordPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::RecordPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_RecordPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_RecordPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::RecordPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::RecordPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_RecordPressed, RecordPressed(handler)); } template void impl_IMediaControl::RecordPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RecordPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_RecordPressed(cookie)); } -template event_token impl_IMediaControl::NextTrackPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::NextTrackPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_NextTrackPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_NextTrackPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::NextTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::NextTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_NextTrackPressed, NextTrackPressed(handler)); } template void impl_IMediaControl::NextTrackPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_NextTrackPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_NextTrackPressed(cookie)); } -template event_token impl_IMediaControl::PreviousTrackPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::PreviousTrackPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PreviousTrackPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_PreviousTrackPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::PreviousTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::PreviousTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_PreviousTrackPressed, PreviousTrackPressed(handler)); } template void impl_IMediaControl::PreviousTrackPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PreviousTrackPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_PreviousTrackPressed(cookie)); } -template event_token impl_IMediaControl::FastForwardPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::FastForwardPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_FastForwardPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_FastForwardPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::FastForwardPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::FastForwardPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_FastForwardPressed, FastForwardPressed(handler)); } template void impl_IMediaControl::FastForwardPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_FastForwardPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_FastForwardPressed(cookie)); } -template event_token impl_IMediaControl::RewindPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::RewindPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_RewindPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_RewindPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::RewindPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::RewindPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_RewindPressed, RewindPressed(handler)); } template void impl_IMediaControl::RewindPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RewindPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_RewindPressed(cookie)); } -template event_token impl_IMediaControl::ChannelUpPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::ChannelUpPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ChannelUpPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_ChannelUpPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::ChannelUpPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::ChannelUpPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_ChannelUpPressed, ChannelUpPressed(handler)); } template void impl_IMediaControl::ChannelUpPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ChannelUpPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_ChannelUpPressed(cookie)); } -template event_token impl_IMediaControl::ChannelDownPressed(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMediaControl::ChannelDownPressed(const Windows::Foundation::EventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ChannelDownPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->add_ChannelDownPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMediaControl::ChannelDownPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMediaControl::ChannelDownPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Media::IMediaControl::remove_ChannelDownPressed, ChannelDownPressed(handler)); } template void impl_IMediaControl::ChannelDownPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ChannelDownPressed(cookie)); + check_hresult(WINRT_SHIM(IMediaControl)->remove_ChannelDownPressed(cookie)); } template Windows::Media::SoundLevel impl_IMediaControl::SoundLevel() const { Windows::Media::SoundLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_SoundLevel(&value)); + check_hresult(WINRT_SHIM(IMediaControl)->get_SoundLevel(&value)); return value; } -template void impl_IMediaControl::TrackName(hstring_ref value) const +template void impl_IMediaControl::TrackName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TrackName(get(value))); + check_hresult(WINRT_SHIM(IMediaControl)->put_TrackName(get_abi(value))); } template hstring impl_IMediaControl::TrackName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TrackName(put(value))); + check_hresult(WINRT_SHIM(IMediaControl)->get_TrackName(put_abi(value))); return value; } -template void impl_IMediaControl::ArtistName(hstring_ref value) const +template void impl_IMediaControl::ArtistName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ArtistName(get(value))); + check_hresult(WINRT_SHIM(IMediaControl)->put_ArtistName(get_abi(value))); } template hstring impl_IMediaControl::ArtistName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ArtistName(put(value))); + check_hresult(WINRT_SHIM(IMediaControl)->get_ArtistName(put_abi(value))); return value; } template void impl_IMediaControl::IsPlaying(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPlaying(value)); + check_hresult(WINRT_SHIM(IMediaControl)->put_IsPlaying(value)); } template bool impl_IMediaControl::IsPlaying() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPlaying(&value)); + check_hresult(WINRT_SHIM(IMediaControl)->get_IsPlaying(&value)); return value; } template void impl_IMediaControl::AlbumArt(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_AlbumArt(get(value))); + check_hresult(WINRT_SHIM(IMediaControl)->put_AlbumArt(get_abi(value))); } template Windows::Foundation::Uri impl_IMediaControl::AlbumArt() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlbumArt(put(value))); + check_hresult(WINRT_SHIM(IMediaControl)->get_AlbumArt(put_abi(value))); return value; } @@ -3765,12 +3950,12 @@ inline AudioFrame::AudioFrame(uint32_t capacity) : AudioFrame(get_activation_factory().Create(capacity)) {} -inline event_token MediaControl::SoundLevelChanged(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::SoundLevelChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().SoundLevelChanged(handler); } -inline factory_event_revoker MediaControl::SoundLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::SoundLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_SoundLevelChanged, factory.SoundLevelChanged(handler) }; @@ -3781,12 +3966,12 @@ inline void MediaControl::SoundLevelChanged(event_token cookie) get_activation_factory().SoundLevelChanged(cookie); } -inline event_token MediaControl::PlayPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::PlayPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PlayPressed(handler); } -inline factory_event_revoker MediaControl::PlayPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::PlayPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_PlayPressed, factory.PlayPressed(handler) }; @@ -3797,12 +3982,12 @@ inline void MediaControl::PlayPressed(event_token cookie) get_activation_factory().PlayPressed(cookie); } -inline event_token MediaControl::PausePressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::PausePressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PausePressed(handler); } -inline factory_event_revoker MediaControl::PausePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::PausePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_PausePressed, factory.PausePressed(handler) }; @@ -3813,12 +3998,12 @@ inline void MediaControl::PausePressed(event_token cookie) get_activation_factory().PausePressed(cookie); } -inline event_token MediaControl::StopPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::StopPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().StopPressed(handler); } -inline factory_event_revoker MediaControl::StopPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::StopPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_StopPressed, factory.StopPressed(handler) }; @@ -3829,12 +4014,12 @@ inline void MediaControl::StopPressed(event_token cookie) get_activation_factory().StopPressed(cookie); } -inline event_token MediaControl::PlayPauseTogglePressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::PlayPauseTogglePressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PlayPauseTogglePressed(handler); } -inline factory_event_revoker MediaControl::PlayPauseTogglePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::PlayPauseTogglePressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_PlayPauseTogglePressed, factory.PlayPauseTogglePressed(handler) }; @@ -3845,12 +4030,12 @@ inline void MediaControl::PlayPauseTogglePressed(event_token cookie) get_activation_factory().PlayPauseTogglePressed(cookie); } -inline event_token MediaControl::RecordPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::RecordPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RecordPressed(handler); } -inline factory_event_revoker MediaControl::RecordPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::RecordPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_RecordPressed, factory.RecordPressed(handler) }; @@ -3861,12 +4046,12 @@ inline void MediaControl::RecordPressed(event_token cookie) get_activation_factory().RecordPressed(cookie); } -inline event_token MediaControl::NextTrackPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::NextTrackPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().NextTrackPressed(handler); } -inline factory_event_revoker MediaControl::NextTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::NextTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_NextTrackPressed, factory.NextTrackPressed(handler) }; @@ -3877,12 +4062,12 @@ inline void MediaControl::NextTrackPressed(event_token cookie) get_activation_factory().NextTrackPressed(cookie); } -inline event_token MediaControl::PreviousTrackPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::PreviousTrackPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PreviousTrackPressed(handler); } -inline factory_event_revoker MediaControl::PreviousTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::PreviousTrackPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_PreviousTrackPressed, factory.PreviousTrackPressed(handler) }; @@ -3893,12 +4078,12 @@ inline void MediaControl::PreviousTrackPressed(event_token cookie) get_activation_factory().PreviousTrackPressed(cookie); } -inline event_token MediaControl::FastForwardPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::FastForwardPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().FastForwardPressed(handler); } -inline factory_event_revoker MediaControl::FastForwardPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::FastForwardPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_FastForwardPressed, factory.FastForwardPressed(handler) }; @@ -3909,12 +4094,12 @@ inline void MediaControl::FastForwardPressed(event_token cookie) get_activation_factory().FastForwardPressed(cookie); } -inline event_token MediaControl::RewindPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::RewindPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RewindPressed(handler); } -inline factory_event_revoker MediaControl::RewindPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::RewindPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_RewindPressed, factory.RewindPressed(handler) }; @@ -3925,12 +4110,12 @@ inline void MediaControl::RewindPressed(event_token cookie) get_activation_factory().RewindPressed(cookie); } -inline event_token MediaControl::ChannelUpPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::ChannelUpPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().ChannelUpPressed(handler); } -inline factory_event_revoker MediaControl::ChannelUpPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::ChannelUpPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_ChannelUpPressed, factory.ChannelUpPressed(handler) }; @@ -3941,12 +4126,12 @@ inline void MediaControl::ChannelUpPressed(event_token cookie) get_activation_factory().ChannelUpPressed(cookie); } -inline event_token MediaControl::ChannelDownPressed(const Windows::Foundation::EventHandler & handler) +inline event_token MediaControl::ChannelDownPressed(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().ChannelDownPressed(handler); } -inline factory_event_revoker MediaControl::ChannelDownPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MediaControl::ChannelDownPressed(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Media::IMediaControl::remove_ChannelDownPressed, factory.ChannelDownPressed(handler) }; @@ -3962,7 +4147,7 @@ inline Windows::Media::SoundLevel MediaControl::SoundLevel() return get_activation_factory().SoundLevel(); } -inline void MediaControl::TrackName(hstring_ref value) +inline void MediaControl::TrackName(hstring_view value) { get_activation_factory().TrackName(value); } @@ -3972,7 +4157,7 @@ inline hstring MediaControl::TrackName() return get_activation_factory().TrackName(); } -inline void MediaControl::ArtistName(hstring_ref value) +inline void MediaControl::ArtistName(hstring_view value) { get_activation_factory().ArtistName(value); } @@ -4040,3 +4225,455 @@ inline VideoFrame::VideoFrame(Windows::Graphics::Imaging::BitmapPixelFormat form } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IAudioBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IAudioFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IAudioFrameFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IAutoRepeatModeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IImageDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaExtension & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaExtensionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaMarker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaMarkerTypesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaMarkers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaProcessingTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMediaTimelineController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMusicDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMusicDisplayProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IMusicDisplayProperties3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IPlaybackPositionChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IPlaybackRateChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IShuffleEnabledChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControls & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControls2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControlsButtonPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControlsDisplayUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControlsPropertyChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControlsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ISystemMediaTransportControlsTimelineProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IVideoDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IVideoDisplayProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IVideoEffectsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IVideoFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::IVideoFrameFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::AudioBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::AudioFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::AutoRepeatModeChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ImageDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaExtensionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaProcessingTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MediaTimelineController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::MusicDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlaybackPositionChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::PlaybackRateChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::ShuffleEnabledChangeRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SystemMediaTransportControls & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SystemMediaTransportControlsButtonPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SystemMediaTransportControlsDisplayUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SystemMediaTransportControlsPropertyChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::SystemMediaTransportControlsTimelineProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::VideoDisplayProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Media::VideoFrame & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.BackgroundTransfer.h b/10.0.14393.0/winrt/Windows.Networking.BackgroundTransfer.h index 8266ab1ad..5f32d5a95 100644 --- a/10.0.14393.0/winrt/Windows.Networking.BackgroundTransfer.h +++ b/10.0.14393.0/winrt/Windows.Networking.BackgroundTransfer.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Security.Credentials.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -21,11 +24,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_CreateDownload(abi_arg_in uri, abi_arg_in resultFile, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CreateDownload(impl::abi_arg_in uri, impl::abi_arg_in resultFile, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile))); return S_OK; } catch (...) @@ -35,11 +39,12 @@ struct produce uri, abi_arg_in resultFile, abi_arg_in requestBodyFile, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CreateDownloadFromFile(impl::abi_arg_in uri, impl::abi_arg_in resultFile, impl::abi_arg_in requestBodyFile, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyFile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyFile))); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce uri, abi_arg_in resultFile, abi_arg_in requestBodyStream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateDownloadAsync(impl::abi_arg_in uri, impl::abi_arg_in resultFile, impl::abi_arg_in requestBodyStream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateDownloadAsync(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyStream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateDownloadAsync(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyStream))); return S_OK; } catch (...) @@ -67,11 +73,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TransferGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransferGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransferGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransferGroup()); return S_OK; } catch (...) @@ -81,10 +88,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_TransferGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferGroup(*reinterpret_cast(&value)); return S_OK; } @@ -94,11 +102,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SuccessToastNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuccessToastNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuccessToastNotification()); return S_OK; } catch (...) @@ -108,10 +117,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SuccessToastNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuccessToastNotification(*reinterpret_cast(&value)); return S_OK; } @@ -121,11 +131,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FailureToastNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FailureToastNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FailureToastNotification()); return S_OK; } catch (...) @@ -135,10 +146,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FailureToastNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FailureToastNotification(*reinterpret_cast(&value)); return S_OK; } @@ -148,11 +160,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SuccessTileNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuccessTileNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuccessTileNotification()); return S_OK; } catch (...) @@ -162,10 +175,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SuccessTileNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuccessTileNotification(*reinterpret_cast(&value)); return S_OK; } @@ -175,11 +189,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FailureTileNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FailureTileNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FailureTileNotification()); return S_OK; } catch (...) @@ -189,10 +204,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FailureTileNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FailureTileNotification(*reinterpret_cast(&value)); return S_OK; } @@ -206,11 +222,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CompletionGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompletionGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompletionGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompletionGroup()); return S_OK; } catch (...) @@ -224,11 +241,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWithCompletionGroup(abi_arg_in completionGroup, abi_arg_out backgroundDownloader) noexcept override + HRESULT __stdcall abi_CreateWithCompletionGroup(impl::abi_arg_in completionGroup, impl::abi_arg_out backgroundDownloader) noexcept override { try { - *backgroundDownloader = detach(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); + typename D::abi_guard guard(this->shim()); + *backgroundDownloader = detach_abi(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); return S_OK; } catch (...) @@ -242,11 +260,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentDownloadsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentDownloadsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentDownloadsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentDownloadsAsync()); return S_OK; } catch (...) @@ -256,11 +275,12 @@ struct produce group, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentDownloadsForGroupAsync(impl::abi_arg_in group, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentDownloadsAsync(*reinterpret_cast(&group))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentDownloadsAsync(*reinterpret_cast(&group))); return S_OK; } catch (...) @@ -274,11 +294,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentDownloadsForTransferGroupAsync(abi_arg_in group, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentDownloadsForTransferGroupAsync(impl::abi_arg_in group, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentDownloadsForTransferGroupAsync(*reinterpret_cast(&group))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentDownloadsForTransferGroupAsync(*reinterpret_cast(&group))); return S_OK; } catch (...) @@ -292,11 +313,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestUnconstrainedDownloadsAsync(abi_arg_in> operations, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestUnconstrainedDownloadsAsync(impl::abi_arg_in> operations, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestUnconstrainedDownloadsAsync(*reinterpret_cast *>(&operations))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestUnconstrainedDownloadsAsync(*reinterpret_cast *>(&operations))); return S_OK; } catch (...) @@ -310,10 +332,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetRequestHeader(abi_arg_in headerName, abi_arg_in headerValue) noexcept override + HRESULT __stdcall abi_SetRequestHeader(impl::abi_arg_in headerName, impl::abi_arg_in headerValue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return S_OK; } @@ -323,11 +346,12 @@ struct produce credential) noexcept override + HRESULT __stdcall get_ServerCredential(impl::abi_arg_out credential) noexcept override { try { - *credential = detach(this->shim().ServerCredential()); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().ServerCredential()); return S_OK; } catch (...) @@ -337,10 +361,11 @@ struct produce credential) noexcept override + HRESULT __stdcall put_ServerCredential(impl::abi_arg_in credential) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerCredential(*reinterpret_cast(&credential)); return S_OK; } @@ -350,11 +375,12 @@ struct produce credential) noexcept override + HRESULT __stdcall get_ProxyCredential(impl::abi_arg_out credential) noexcept override { try { - *credential = detach(this->shim().ProxyCredential()); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().ProxyCredential()); return S_OK; } catch (...) @@ -364,10 +390,11 @@ struct produce credential) noexcept override + HRESULT __stdcall put_ProxyCredential(impl::abi_arg_in credential) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProxyCredential(*reinterpret_cast(&credential)); return S_OK; } @@ -377,11 +404,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Method(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Method()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Method()); return S_OK; } catch (...) @@ -391,10 +419,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Method(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Method(*reinterpret_cast(&value)); return S_OK; } @@ -404,11 +433,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Group(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -418,10 +448,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Group(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Group(*reinterpret_cast(&value)); return S_OK; } @@ -435,7 +466,8 @@ struct produceshim().CostPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CostPolicy()); return S_OK; } catch (...) @@ -448,6 +480,7 @@ struct produceshim()); this->shim().CostPolicy(value); return S_OK; } @@ -461,11 +494,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Trigger(abi_arg_out value) noexcept override + HRESULT __stdcall get_Trigger(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Trigger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Trigger()); return S_OK; } catch (...) @@ -479,7 +513,8 @@ struct produceshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -492,6 +527,7 @@ struct produceshim()); this->shim().Enable(); return S_OK; } @@ -505,11 +541,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Downloads(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Downloads(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Downloads()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Downloads()); return S_OK; } catch (...) @@ -519,11 +556,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Uploads(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Uploads()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uploads()); return S_OK; } catch (...) @@ -537,10 +575,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SetHeader(abi_arg_in headerName, abi_arg_in headerValue) noexcept override + HRESULT __stdcall abi_SetHeader(impl::abi_arg_in headerName, impl::abi_arg_in headerValue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return S_OK; } @@ -550,10 +589,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_SetText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetText(*reinterpret_cast(&value)); return S_OK; } @@ -563,10 +603,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_SetFile(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFile(*reinterpret_cast(&value)); return S_OK; } @@ -580,11 +621,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWithName(abi_arg_in name, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithName(impl::abi_arg_in name, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithName(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithName(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -594,11 +636,12 @@ struct produce name, abi_arg_in fileName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithNameAndFileName(impl::abi_arg_in name, impl::abi_arg_in fileName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithNameAndFileName(*reinterpret_cast(&name), *reinterpret_cast(&fileName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithNameAndFileName(*reinterpret_cast(&name), *reinterpret_cast(&fileName))); return S_OK; } catch (...) @@ -616,7 +659,8 @@ struct produceshim().GetStatus(hresult)); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetStatus(hresult)); return S_OK; } catch (...) @@ -629,11 +673,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -647,7 +692,8 @@ struct produceshim().TransferBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransferBehavior()); return S_OK; } catch (...) @@ -660,6 +706,7 @@ struct produceshim()); this->shim().TransferBehavior(value); return S_OK; } @@ -673,11 +720,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateGroup(abi_arg_in name, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateGroup(impl::abi_arg_in name, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateGroup(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateGroup(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -695,7 +743,8 @@ struct produceshim().Guid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Guid()); return S_OK; } catch (...) @@ -704,11 +753,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RequestedUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestedUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestedUri()); return S_OK; } catch (...) @@ -718,11 +768,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Method(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Method()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Method()); return S_OK; } catch (...) @@ -732,11 +783,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Group(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -750,7 +802,8 @@ struct produceshim().CostPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CostPolicy()); return S_OK; } catch (...) @@ -763,6 +816,7 @@ struct produceshim()); this->shim().CostPolicy(value); return S_OK; } @@ -772,11 +826,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetResultStreamAt(uint64_t position, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetResultStreamAt(position)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetResultStreamAt(position)); return S_OK; } catch (...) @@ -786,11 +841,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetResponseInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetResponseInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetResponseInformation()); return S_OK; } catch (...) @@ -808,7 +864,8 @@ struct produceshim().Priority()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Priority()); return S_OK; } catch (...) @@ -821,6 +878,7 @@ struct produceshim()); this->shim().Priority(value); return S_OK; } @@ -834,11 +892,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateUpload(abi_arg_in uri, abi_arg_in sourceFile, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CreateUpload(impl::abi_arg_in uri, impl::abi_arg_in sourceFile, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CreateUpload(*reinterpret_cast(&uri), *reinterpret_cast(&sourceFile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateUpload(*reinterpret_cast(&uri), *reinterpret_cast(&sourceFile))); return S_OK; } catch (...) @@ -848,11 +907,12 @@ struct produce } } - HRESULT __stdcall abi_CreateUploadFromStreamAsync(abi_arg_in uri, abi_arg_in sourceStream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateUploadFromStreamAsync(impl::abi_arg_in uri, impl::abi_arg_in sourceStream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateUploadFromStreamAsync(*reinterpret_cast(&uri), *reinterpret_cast(&sourceStream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateUploadFromStreamAsync(*reinterpret_cast(&uri), *reinterpret_cast(&sourceStream))); return S_OK; } catch (...) @@ -862,11 +922,12 @@ struct produce } } - HRESULT __stdcall abi_CreateUploadWithFormDataAndAutoBoundaryAsync(abi_arg_in uri, abi_arg_in> parts, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateUploadWithFormDataAndAutoBoundaryAsync(impl::abi_arg_in uri, impl::abi_arg_in> parts, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts))); return S_OK; } catch (...) @@ -876,11 +937,12 @@ struct produce } } - HRESULT __stdcall abi_CreateUploadWithSubTypeAsync(abi_arg_in uri, abi_arg_in> parts, abi_arg_in subType, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateUploadWithSubTypeAsync(impl::abi_arg_in uri, impl::abi_arg_in> parts, impl::abi_arg_in subType, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts), *reinterpret_cast(&subType))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts), *reinterpret_cast(&subType))); return S_OK; } catch (...) @@ -890,11 +952,12 @@ struct produce } } - HRESULT __stdcall abi_CreateUploadWithSubTypeAndBoundaryAsync(abi_arg_in uri, abi_arg_in> parts, abi_arg_in subType, abi_arg_in boundary, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateUploadWithSubTypeAndBoundaryAsync(impl::abi_arg_in uri, impl::abi_arg_in> parts, impl::abi_arg_in subType, impl::abi_arg_in boundary, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts), *reinterpret_cast(&subType), *reinterpret_cast(&boundary))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&parts), *reinterpret_cast(&subType), *reinterpret_cast(&boundary))); return S_OK; } catch (...) @@ -908,11 +971,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_TransferGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransferGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransferGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransferGroup()); return S_OK; } catch (...) @@ -922,10 +986,11 @@ struct produce } } - HRESULT __stdcall put_TransferGroup(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransferGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferGroup(*reinterpret_cast(&value)); return S_OK; } @@ -935,11 +1000,12 @@ struct produce } } - HRESULT __stdcall get_SuccessToastNotification(abi_arg_out value) noexcept override + HRESULT __stdcall get_SuccessToastNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuccessToastNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuccessToastNotification()); return S_OK; } catch (...) @@ -949,10 +1015,11 @@ struct produce } } - HRESULT __stdcall put_SuccessToastNotification(abi_arg_in value) noexcept override + HRESULT __stdcall put_SuccessToastNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuccessToastNotification(*reinterpret_cast(&value)); return S_OK; } @@ -962,11 +1029,12 @@ struct produce } } - HRESULT __stdcall get_FailureToastNotification(abi_arg_out value) noexcept override + HRESULT __stdcall get_FailureToastNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FailureToastNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FailureToastNotification()); return S_OK; } catch (...) @@ -976,10 +1044,11 @@ struct produce } } - HRESULT __stdcall put_FailureToastNotification(abi_arg_in value) noexcept override + HRESULT __stdcall put_FailureToastNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FailureToastNotification(*reinterpret_cast(&value)); return S_OK; } @@ -989,11 +1058,12 @@ struct produce } } - HRESULT __stdcall get_SuccessTileNotification(abi_arg_out value) noexcept override + HRESULT __stdcall get_SuccessTileNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuccessTileNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuccessTileNotification()); return S_OK; } catch (...) @@ -1003,10 +1073,11 @@ struct produce } } - HRESULT __stdcall put_SuccessTileNotification(abi_arg_in value) noexcept override + HRESULT __stdcall put_SuccessTileNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuccessTileNotification(*reinterpret_cast(&value)); return S_OK; } @@ -1016,11 +1087,12 @@ struct produce } } - HRESULT __stdcall get_FailureTileNotification(abi_arg_out value) noexcept override + HRESULT __stdcall get_FailureTileNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FailureTileNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FailureTileNotification()); return S_OK; } catch (...) @@ -1030,10 +1102,11 @@ struct produce } } - HRESULT __stdcall put_FailureTileNotification(abi_arg_in value) noexcept override + HRESULT __stdcall put_FailureTileNotification(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FailureTileNotification(*reinterpret_cast(&value)); return S_OK; } @@ -1047,11 +1120,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_CompletionGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompletionGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompletionGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompletionGroup()); return S_OK; } catch (...) @@ -1065,11 +1139,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithCompletionGroup(abi_arg_in completionGroup, abi_arg_out backgroundUploader) noexcept override + HRESULT __stdcall abi_CreateWithCompletionGroup(impl::abi_arg_in completionGroup, impl::abi_arg_out backgroundUploader) noexcept override { try { - *backgroundUploader = detach(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); + typename D::abi_guard guard(this->shim()); + *backgroundUploader = detach_abi(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); return S_OK; } catch (...) @@ -1083,11 +1158,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentUploadsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentUploadsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentUploadsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentUploadsAsync()); return S_OK; } catch (...) @@ -1097,11 +1173,12 @@ struct produce group, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentUploadsForGroupAsync(impl::abi_arg_in group, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentUploadsAsync(*reinterpret_cast(&group))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentUploadsAsync(*reinterpret_cast(&group))); return S_OK; } catch (...) @@ -1115,11 +1192,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentUploadsForTransferGroupAsync(abi_arg_in group, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetCurrentUploadsForTransferGroupAsync(impl::abi_arg_in group, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetCurrentUploadsForTransferGroupAsync(*reinterpret_cast(&group))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCurrentUploadsForTransferGroupAsync(*reinterpret_cast(&group))); return S_OK; } catch (...) @@ -1133,11 +1211,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestUnconstrainedUploadsAsync(abi_arg_in> operations, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestUnconstrainedUploadsAsync(impl::abi_arg_in> operations, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestUnconstrainedUploadsAsync(*reinterpret_cast *>(&operations))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestUnconstrainedUploadsAsync(*reinterpret_cast *>(&operations))); return S_OK; } catch (...) @@ -1151,11 +1230,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ContentUris(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ContentUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ContentUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentUris()); return S_OK; } catch (...) @@ -1165,10 +1245,11 @@ struct produce : } } - HRESULT __stdcall put_IndirectContentUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_IndirectContentUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IndirectContentUri(*reinterpret_cast(&value)); return S_OK; } @@ -1178,11 +1259,12 @@ struct produce : } } - HRESULT __stdcall get_IndirectContentUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_IndirectContentUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IndirectContentUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndirectContentUri()); return S_OK; } catch (...) @@ -1196,11 +1278,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_LastSuccessfulPrefetchTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LastSuccessfulPrefetchTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LastSuccessfulPrefetchTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSuccessfulPrefetchTime()); return S_OK; } catch (...) @@ -1214,11 +1297,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResultFile(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResultFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResultFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResultFile()); return S_OK; } catch (...) @@ -1228,11 +1312,12 @@ struct produce : } } - HRESULT __stdcall get_Progress(abi_arg_out value) noexcept override + HRESULT __stdcall get_Progress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -1241,11 +1326,12 @@ struct produce : } } - HRESULT __stdcall abi_StartAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -1255,11 +1341,12 @@ struct produce : } } - HRESULT __stdcall abi_AttachAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AttachAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AttachAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AttachAsync()); return S_OK; } catch (...) @@ -1273,6 +1360,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(); return S_OK; } @@ -1286,6 +1374,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Resume(); return S_OK; } @@ -1299,11 +1388,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_TransferGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransferGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransferGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransferGroup()); return S_OK; } catch (...) @@ -1321,7 +1411,8 @@ struct produce { try { - *value = detach(this->shim().IsResumable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResumable()); return S_OK; } catch (...) @@ -1330,11 +1421,12 @@ struct produce } } - HRESULT __stdcall get_ActualUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActualUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActualUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualUri()); return S_OK; } catch (...) @@ -1348,7 +1440,8 @@ struct produce { try { - *value = detach(this->shim().StatusCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatusCode()); return S_OK; } catch (...) @@ -1357,11 +1450,12 @@ struct produce } } - HRESULT __stdcall get_Headers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Headers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Headers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Headers()); return S_OK; } catch (...) @@ -1379,7 +1473,8 @@ struct produceshim().IsUnconstrained()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUnconstrained()); return S_OK; } catch (...) @@ -1392,11 +1487,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SourceFile(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceFile()); return S_OK; } catch (...) @@ -1406,11 +1502,12 @@ struct produce : p } } - HRESULT __stdcall get_Progress(abi_arg_out value) noexcept override + HRESULT __stdcall get_Progress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Progress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Progress()); return S_OK; } catch (...) @@ -1419,11 +1516,12 @@ struct produce : p } } - HRESULT __stdcall abi_StartAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAsync()); return S_OK; } catch (...) @@ -1433,11 +1531,12 @@ struct produce : p } } - HRESULT __stdcall abi_AttachAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AttachAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AttachAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AttachAsync()); return S_OK; } catch (...) @@ -1451,11 +1550,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_TransferGroup(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransferGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransferGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransferGroup()); return S_OK; } catch (...) @@ -1470,630 +1570,630 @@ struct produce : namespace Windows::Networking::BackgroundTransfer { -template void impl_IBackgroundTransferBase::SetRequestHeader(hstring_ref headerName, hstring_ref headerValue) const +template void impl_IBackgroundTransferBase::SetRequestHeader(hstring_view headerName, hstring_view headerValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRequestHeader(get(headerName), get(headerValue))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->abi_SetRequestHeader(get_abi(headerName), get_abi(headerValue))); } template Windows::Security::Credentials::PasswordCredential impl_IBackgroundTransferBase::ServerCredential() const { Windows::Security::Credentials::PasswordCredential credential { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerCredential(put(credential))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->get_ServerCredential(put_abi(credential))); return credential; } template void impl_IBackgroundTransferBase::ServerCredential(const Windows::Security::Credentials::PasswordCredential & credential) const { - check_hresult(static_cast(static_cast(*this))->put_ServerCredential(get(credential))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->put_ServerCredential(get_abi(credential))); } template Windows::Security::Credentials::PasswordCredential impl_IBackgroundTransferBase::ProxyCredential() const { Windows::Security::Credentials::PasswordCredential credential { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProxyCredential(put(credential))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->get_ProxyCredential(put_abi(credential))); return credential; } template void impl_IBackgroundTransferBase::ProxyCredential(const Windows::Security::Credentials::PasswordCredential & credential) const { - check_hresult(static_cast(static_cast(*this))->put_ProxyCredential(get(credential))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->put_ProxyCredential(get_abi(credential))); } template hstring impl_IBackgroundTransferBase::Method() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Method(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->get_Method(put_abi(value))); return value; } -template void impl_IBackgroundTransferBase::Method(hstring_ref value) const +template void impl_IBackgroundTransferBase::Method(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Method(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->put_Method(get_abi(value))); } template hstring impl_IBackgroundTransferBase::Group() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Group(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->get_Group(put_abi(value))); return value; } -template void impl_IBackgroundTransferBase::Group(hstring_ref value) const +template void impl_IBackgroundTransferBase::Group(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Group(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->put_Group(get_abi(value))); } template Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy impl_IBackgroundTransferBase::CostPolicy() const { Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_CostPolicy(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->get_CostPolicy(&value)); return value; } template void impl_IBackgroundTransferBase::CostPolicy(Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy value) const { - check_hresult(static_cast(static_cast(*this))->put_CostPolicy(value)); + check_hresult(WINRT_SHIM(IBackgroundTransferBase)->put_CostPolicy(value)); } template bool impl_IUnconstrainedTransferRequestResult::IsUnconstrained() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUnconstrained(&value)); + check_hresult(WINRT_SHIM(IUnconstrainedTransferRequestResult)->get_IsUnconstrained(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundDownloaderUserConsent::RequestUnconstrainedDownloadsAsync(const Windows::Foundation::Collections::IIterable & operations) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundDownloaderUserConsent::RequestUnconstrainedDownloadsAsync(iterable operations) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestUnconstrainedDownloadsAsync(get(operations), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloaderUserConsent)->abi_RequestUnconstrainedDownloadsAsync(get_abi(operations), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundUploaderUserConsent::RequestUnconstrainedUploadsAsync(const Windows::Foundation::Collections::IIterable & operations) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundUploaderUserConsent::RequestUnconstrainedUploadsAsync(iterable operations) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestUnconstrainedUploadsAsync(get(operations), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploaderUserConsent)->abi_RequestUnconstrainedUploadsAsync(get_abi(operations), put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::DownloadOperation impl_IBackgroundDownloader::CreateDownload(const Windows::Foundation::Uri & uri, const Windows::Storage::IStorageFile & resultFile) const { Windows::Networking::BackgroundTransfer::DownloadOperation operation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDownload(get(uri), get(resultFile), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloader)->abi_CreateDownload(get_abi(uri), get_abi(resultFile), put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::DownloadOperation impl_IBackgroundDownloader::CreateDownload(const Windows::Foundation::Uri & uri, const Windows::Storage::IStorageFile & resultFile, const Windows::Storage::IStorageFile & requestBodyFile) const { Windows::Networking::BackgroundTransfer::DownloadOperation operation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDownloadFromFile(get(uri), get(resultFile), get(requestBodyFile), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloader)->abi_CreateDownloadFromFile(get_abi(uri), get_abi(resultFile), get_abi(requestBodyFile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBackgroundDownloader::CreateDownloadAsync(const Windows::Foundation::Uri & uri, const Windows::Storage::IStorageFile & resultFile, const Windows::Storage::Streams::IInputStream & requestBodyStream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateDownloadAsync(get(uri), get(resultFile), get(requestBodyStream), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloader)->abi_CreateDownloadAsync(get_abi(uri), get_abi(resultFile), get_abi(requestBodyStream), put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IBackgroundDownloader2::TransferGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransferGroup(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->get_TransferGroup(put_abi(value))); return value; } template void impl_IBackgroundDownloader2::TransferGroup(const Windows::Networking::BackgroundTransfer::BackgroundTransferGroup & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransferGroup(get(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->put_TransferGroup(get_abi(value))); } template Windows::UI::Notifications::ToastNotification impl_IBackgroundDownloader2::SuccessToastNotification() const { Windows::UI::Notifications::ToastNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuccessToastNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->get_SuccessToastNotification(put_abi(value))); return value; } template void impl_IBackgroundDownloader2::SuccessToastNotification(const Windows::UI::Notifications::ToastNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuccessToastNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->put_SuccessToastNotification(get_abi(value))); } template Windows::UI::Notifications::ToastNotification impl_IBackgroundDownloader2::FailureToastNotification() const { Windows::UI::Notifications::ToastNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FailureToastNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->get_FailureToastNotification(put_abi(value))); return value; } template void impl_IBackgroundDownloader2::FailureToastNotification(const Windows::UI::Notifications::ToastNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_FailureToastNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->put_FailureToastNotification(get_abi(value))); } template Windows::UI::Notifications::TileNotification impl_IBackgroundDownloader2::SuccessTileNotification() const { Windows::UI::Notifications::TileNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuccessTileNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->get_SuccessTileNotification(put_abi(value))); return value; } template void impl_IBackgroundDownloader2::SuccessTileNotification(const Windows::UI::Notifications::TileNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuccessTileNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->put_SuccessTileNotification(get_abi(value))); } template Windows::UI::Notifications::TileNotification impl_IBackgroundDownloader2::FailureTileNotification() const { Windows::UI::Notifications::TileNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FailureTileNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->get_FailureTileNotification(put_abi(value))); return value; } template void impl_IBackgroundDownloader2::FailureTileNotification(const Windows::UI::Notifications::TileNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_FailureTileNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader2)->put_FailureTileNotification(get_abi(value))); } template Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup impl_IBackgroundDownloader3::CompletionGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CompletionGroup(put(value))); + check_hresult(WINRT_SHIM(IBackgroundDownloader3)->get_CompletionGroup(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::UploadOperation impl_IBackgroundUploader::CreateUpload(const Windows::Foundation::Uri & uri, const Windows::Storage::IStorageFile & sourceFile) const { Windows::Networking::BackgroundTransfer::UploadOperation operation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateUpload(get(uri), get(sourceFile), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploader)->abi_CreateUpload(get_abi(uri), get_abi(sourceFile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadFromStreamAsync(const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IInputStream & sourceStream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateUploadFromStreamAsync(get(uri), get(sourceStream), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploader)->abi_CreateUploadFromStreamAsync(get_abi(uri), get_abi(sourceStream), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, const Windows::Foundation::Collections::IIterable & parts) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, iterable parts) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateUploadWithFormDataAndAutoBoundaryAsync(get(uri), get(parts), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploader)->abi_CreateUploadWithFormDataAndAutoBoundaryAsync(get_abi(uri), get_abi(parts), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, const Windows::Foundation::Collections::IIterable & parts, hstring_ref subType) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, iterable parts, hstring_view subType) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateUploadWithSubTypeAsync(get(uri), get(parts), get(subType), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploader)->abi_CreateUploadWithSubTypeAsync(get_abi(uri), get_abi(parts), get_abi(subType), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, const Windows::Foundation::Collections::IIterable & parts, hstring_ref subType, hstring_ref boundary) const +template Windows::Foundation::IAsyncOperation impl_IBackgroundUploader::CreateUploadAsync(const Windows::Foundation::Uri & uri, iterable parts, hstring_view subType, hstring_view boundary) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateUploadWithSubTypeAndBoundaryAsync(get(uri), get(parts), get(subType), get(boundary), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploader)->abi_CreateUploadWithSubTypeAndBoundaryAsync(get_abi(uri), get_abi(parts), get_abi(subType), get_abi(boundary), put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IBackgroundUploader2::TransferGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransferGroup(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->get_TransferGroup(put_abi(value))); return value; } template void impl_IBackgroundUploader2::TransferGroup(const Windows::Networking::BackgroundTransfer::BackgroundTransferGroup & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransferGroup(get(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->put_TransferGroup(get_abi(value))); } template Windows::UI::Notifications::ToastNotification impl_IBackgroundUploader2::SuccessToastNotification() const { Windows::UI::Notifications::ToastNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuccessToastNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->get_SuccessToastNotification(put_abi(value))); return value; } template void impl_IBackgroundUploader2::SuccessToastNotification(const Windows::UI::Notifications::ToastNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuccessToastNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->put_SuccessToastNotification(get_abi(value))); } template Windows::UI::Notifications::ToastNotification impl_IBackgroundUploader2::FailureToastNotification() const { Windows::UI::Notifications::ToastNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FailureToastNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->get_FailureToastNotification(put_abi(value))); return value; } template void impl_IBackgroundUploader2::FailureToastNotification(const Windows::UI::Notifications::ToastNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_FailureToastNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->put_FailureToastNotification(get_abi(value))); } template Windows::UI::Notifications::TileNotification impl_IBackgroundUploader2::SuccessTileNotification() const { Windows::UI::Notifications::TileNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuccessTileNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->get_SuccessTileNotification(put_abi(value))); return value; } template void impl_IBackgroundUploader2::SuccessTileNotification(const Windows::UI::Notifications::TileNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuccessTileNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->put_SuccessTileNotification(get_abi(value))); } template Windows::UI::Notifications::TileNotification impl_IBackgroundUploader2::FailureTileNotification() const { Windows::UI::Notifications::TileNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FailureTileNotification(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->get_FailureTileNotification(put_abi(value))); return value; } template void impl_IBackgroundUploader2::FailureTileNotification(const Windows::UI::Notifications::TileNotification & value) const { - check_hresult(static_cast(static_cast(*this))->put_FailureTileNotification(get(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader2)->put_FailureTileNotification(get_abi(value))); } template Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup impl_IBackgroundUploader3::CompletionGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CompletionGroup(put(value))); + check_hresult(WINRT_SHIM(IBackgroundUploader3)->get_CompletionGroup(put_abi(value))); return value; } template GUID impl_IBackgroundTransferOperation::Guid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Guid(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->get_Guid(&value)); return value; } template Windows::Foundation::Uri impl_IBackgroundTransferOperation::RequestedUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RequestedUri(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->get_RequestedUri(put_abi(value))); return value; } template hstring impl_IBackgroundTransferOperation::Method() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Method(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->get_Method(put_abi(value))); return value; } template hstring impl_IBackgroundTransferOperation::Group() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Group(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->get_Group(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy impl_IBackgroundTransferOperation::CostPolicy() const { Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_CostPolicy(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->get_CostPolicy(&value)); return value; } template void impl_IBackgroundTransferOperation::CostPolicy(Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy value) const { - check_hresult(static_cast(static_cast(*this))->put_CostPolicy(value)); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->put_CostPolicy(value)); } template Windows::Storage::Streams::IInputStream impl_IBackgroundTransferOperation::GetResultStreamAt(uint64_t position) const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->abi_GetResultStreamAt(position, put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->abi_GetResultStreamAt(position, put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::ResponseInformation impl_IBackgroundTransferOperation::GetResponseInformation() const { Windows::Networking::BackgroundTransfer::ResponseInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetResponseInformation(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferOperation)->abi_GetResponseInformation(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundTransferPriority impl_IBackgroundTransferOperationPriority::Priority() const { Windows::Networking::BackgroundTransfer::BackgroundTransferPriority value {}; - check_hresult(static_cast(static_cast(*this))->get_Priority(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferOperationPriority)->get_Priority(&value)); return value; } template void impl_IBackgroundTransferOperationPriority::Priority(Windows::Networking::BackgroundTransfer::BackgroundTransferPriority value) const { - check_hresult(static_cast(static_cast(*this))->put_Priority(value)); + check_hresult(WINRT_SHIM(IBackgroundTransferOperationPriority)->put_Priority(value)); } template Windows::Storage::IStorageFile impl_IDownloadOperation::ResultFile() const { Windows::Storage::IStorageFile value; - check_hresult(static_cast(static_cast(*this))->get_ResultFile(put(value))); + check_hresult(WINRT_SHIM(IDownloadOperation)->get_ResultFile(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundDownloadProgress impl_IDownloadOperation::Progress() const { Windows::Networking::BackgroundTransfer::BackgroundDownloadProgress value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(put(value))); + check_hresult(WINRT_SHIM(IDownloadOperation)->get_Progress(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperationWithProgress impl_IDownloadOperation::StartAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(IDownloadOperation)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IDownloadOperation::AttachAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_AttachAsync(put(operation))); + check_hresult(WINRT_SHIM(IDownloadOperation)->abi_AttachAsync(put_abi(operation))); return operation; } template void impl_IDownloadOperation::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IDownloadOperation)->abi_Pause()); } template void impl_IDownloadOperation::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(IDownloadOperation)->abi_Resume()); } template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IDownloadOperation2::TransferGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransferGroup(put(value))); + check_hresult(WINRT_SHIM(IDownloadOperation2)->get_TransferGroup(put_abi(value))); return value; } template Windows::Storage::IStorageFile impl_IUploadOperation::SourceFile() const { Windows::Storage::IStorageFile value; - check_hresult(static_cast(static_cast(*this))->get_SourceFile(put(value))); + check_hresult(WINRT_SHIM(IUploadOperation)->get_SourceFile(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundUploadProgress impl_IUploadOperation::Progress() const { Windows::Networking::BackgroundTransfer::BackgroundUploadProgress value {}; - check_hresult(static_cast(static_cast(*this))->get_Progress(put(value))); + check_hresult(WINRT_SHIM(IUploadOperation)->get_Progress(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperationWithProgress impl_IUploadOperation::StartAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAsync(put(operation))); + check_hresult(WINRT_SHIM(IUploadOperation)->abi_StartAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IUploadOperation::AttachAsync() const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_AttachAsync(put(operation))); + check_hresult(WINRT_SHIM(IUploadOperation)->abi_AttachAsync(put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IUploadOperation2::TransferGroup() const { Windows::Networking::BackgroundTransfer::BackgroundTransferGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransferGroup(put(value))); + check_hresult(WINRT_SHIM(IUploadOperation2)->get_TransferGroup(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundDownloader impl_IBackgroundDownloaderFactory::CreateWithCompletionGroup(const Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup & completionGroup) const { Windows::Networking::BackgroundTransfer::BackgroundDownloader backgroundDownloader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithCompletionGroup(get(completionGroup), put(backgroundDownloader))); + check_hresult(WINRT_SHIM(IBackgroundDownloaderFactory)->abi_CreateWithCompletionGroup(get_abi(completionGroup), put_abi(backgroundDownloader))); return backgroundDownloader; } template Windows::Foundation::IAsyncOperation> impl_IBackgroundDownloaderStaticMethods::GetCurrentDownloadsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentDownloadsAsync(put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloaderStaticMethods)->abi_GetCurrentDownloadsAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IBackgroundDownloaderStaticMethods::GetCurrentDownloadsAsync(hstring_ref group) const +template Windows::Foundation::IAsyncOperation> impl_IBackgroundDownloaderStaticMethods::GetCurrentDownloadsAsync(hstring_view group) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentDownloadsForGroupAsync(get(group), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloaderStaticMethods)->abi_GetCurrentDownloadsForGroupAsync(get_abi(group), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IBackgroundDownloaderStaticMethods2::GetCurrentDownloadsForTransferGroupAsync(const Windows::Networking::BackgroundTransfer::BackgroundTransferGroup & group) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentDownloadsForTransferGroupAsync(get(group), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundDownloaderStaticMethods2)->abi_GetCurrentDownloadsForTransferGroupAsync(get_abi(group), put_abi(operation))); return operation; } template Windows::Networking::BackgroundTransfer::BackgroundUploader impl_IBackgroundUploaderFactory::CreateWithCompletionGroup(const Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup & completionGroup) const { Windows::Networking::BackgroundTransfer::BackgroundUploader backgroundUploader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithCompletionGroup(get(completionGroup), put(backgroundUploader))); + check_hresult(WINRT_SHIM(IBackgroundUploaderFactory)->abi_CreateWithCompletionGroup(get_abi(completionGroup), put_abi(backgroundUploader))); return backgroundUploader; } template Windows::Foundation::IAsyncOperation> impl_IBackgroundUploaderStaticMethods::GetCurrentUploadsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentUploadsAsync(put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploaderStaticMethods)->abi_GetCurrentUploadsAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IBackgroundUploaderStaticMethods::GetCurrentUploadsAsync(hstring_ref group) const +template Windows::Foundation::IAsyncOperation> impl_IBackgroundUploaderStaticMethods::GetCurrentUploadsAsync(hstring_view group) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentUploadsForGroupAsync(get(group), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploaderStaticMethods)->abi_GetCurrentUploadsForGroupAsync(get_abi(group), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IBackgroundUploaderStaticMethods2::GetCurrentUploadsForTransferGroupAsync(const Windows::Networking::BackgroundTransfer::BackgroundTransferGroup & group) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentUploadsForTransferGroupAsync(get(group), put(operation))); + check_hresult(WINRT_SHIM(IBackgroundUploaderStaticMethods2)->abi_GetCurrentUploadsForTransferGroupAsync(get_abi(group), put_abi(operation))); return operation; } template bool impl_IResponseInformation::IsResumable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsResumable(&value)); + check_hresult(WINRT_SHIM(IResponseInformation)->get_IsResumable(&value)); return value; } template Windows::Foundation::Uri impl_IResponseInformation::ActualUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActualUri(put(value))); + check_hresult(WINRT_SHIM(IResponseInformation)->get_ActualUri(put_abi(value))); return value; } template uint32_t impl_IResponseInformation::StatusCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StatusCode(&value)); + check_hresult(WINRT_SHIM(IResponseInformation)->get_StatusCode(&value)); return value; } template Windows::Foundation::Collections::IMapView impl_IResponseInformation::Headers() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Headers(put(value))); + check_hresult(WINRT_SHIM(IResponseInformation)->get_Headers(put_abi(value))); return value; } template Windows::Web::WebErrorStatus impl_IBackgroundTransferErrorStaticMethods::GetStatus(int32_t hresult) const { Windows::Web::WebErrorStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetStatus(hresult, &status)); + check_hresult(WINRT_SHIM(IBackgroundTransferErrorStaticMethods)->abi_GetStatus(hresult, &status)); return status; } -template void impl_IBackgroundTransferContentPart::SetHeader(hstring_ref headerName, hstring_ref headerValue) const +template void impl_IBackgroundTransferContentPart::SetHeader(hstring_view headerName, hstring_view headerValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHeader(get(headerName), get(headerValue))); + check_hresult(WINRT_SHIM(IBackgroundTransferContentPart)->abi_SetHeader(get_abi(headerName), get_abi(headerValue))); } -template void impl_IBackgroundTransferContentPart::SetText(hstring_ref value) const +template void impl_IBackgroundTransferContentPart::SetText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetText(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferContentPart)->abi_SetText(get_abi(value))); } template void impl_IBackgroundTransferContentPart::SetFile(const Windows::Storage::IStorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFile(get(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferContentPart)->abi_SetFile(get_abi(value))); } -template Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart impl_IBackgroundTransferContentPartFactory::CreateWithName(hstring_ref name) const +template Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart impl_IBackgroundTransferContentPartFactory::CreateWithName(hstring_view name) const { Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithName(get(name), put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferContentPartFactory)->abi_CreateWithName(get_abi(name), put_abi(value))); return value; } -template Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart impl_IBackgroundTransferContentPartFactory::CreateWithNameAndFileName(hstring_ref name, hstring_ref fileName) const +template Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart impl_IBackgroundTransferContentPartFactory::CreateWithNameAndFileName(hstring_view name, hstring_view fileName) const { Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithNameAndFileName(get(name), get(fileName), put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferContentPartFactory)->abi_CreateWithNameAndFileName(get_abi(name), get_abi(fileName), put_abi(value))); return value; } template hstring impl_IBackgroundTransferGroup::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferGroup)->get_Name(put_abi(value))); return value; } template Windows::Networking::BackgroundTransfer::BackgroundTransferBehavior impl_IBackgroundTransferGroup::TransferBehavior() const { Windows::Networking::BackgroundTransfer::BackgroundTransferBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_TransferBehavior(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferGroup)->get_TransferBehavior(&value)); return value; } template void impl_IBackgroundTransferGroup::TransferBehavior(Windows::Networking::BackgroundTransfer::BackgroundTransferBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_TransferBehavior(value)); + check_hresult(WINRT_SHIM(IBackgroundTransferGroup)->put_TransferBehavior(value)); } -template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IBackgroundTransferGroupStatics::CreateGroup(hstring_ref name) const +template Windows::Networking::BackgroundTransfer::BackgroundTransferGroup impl_IBackgroundTransferGroupStatics::CreateGroup(hstring_view name) const { Windows::Networking::BackgroundTransfer::BackgroundTransferGroup value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateGroup(get(name), put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferGroupStatics)->abi_CreateGroup(get_abi(name), put_abi(value))); return value; } template Windows::Foundation::IReference impl_IContentPrefetcherTime::LastSuccessfulPrefetchTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_LastSuccessfulPrefetchTime(put(value))); + check_hresult(WINRT_SHIM(IContentPrefetcherTime)->get_LastSuccessfulPrefetchTime(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContentPrefetcher::ContentUris() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ContentUris(put(value))); + check_hresult(WINRT_SHIM(IContentPrefetcher)->get_ContentUris(put_abi(value))); return value; } template void impl_IContentPrefetcher::IndirectContentUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_IndirectContentUri(get(value))); + check_hresult(WINRT_SHIM(IContentPrefetcher)->put_IndirectContentUri(get_abi(value))); } template Windows::Foundation::Uri impl_IContentPrefetcher::IndirectContentUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IndirectContentUri(put(value))); + check_hresult(WINRT_SHIM(IContentPrefetcher)->get_IndirectContentUri(put_abi(value))); return value; } template Windows::ApplicationModel::Background::IBackgroundTrigger impl_IBackgroundTransferCompletionGroup::Trigger() const { Windows::ApplicationModel::Background::IBackgroundTrigger value; - check_hresult(static_cast(static_cast(*this))->get_Trigger(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferCompletionGroup)->get_Trigger(put_abi(value))); return value; } template bool impl_IBackgroundTransferCompletionGroup::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IBackgroundTransferCompletionGroup)->get_IsEnabled(&value)); return value; } template void impl_IBackgroundTransferCompletionGroup::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IBackgroundTransferCompletionGroup)->abi_Enable()); } template Windows::Foundation::Collections::IVectorView impl_IBackgroundTransferCompletionGroupTriggerDetails::Downloads() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Downloads(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferCompletionGroupTriggerDetails)->get_Downloads(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IBackgroundTransferCompletionGroupTriggerDetails::Uploads() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Uploads(put(value))); + check_hresult(WINRT_SHIM(IBackgroundTransferCompletionGroupTriggerDetails)->get_Uploads(put_abi(value))); return value; } @@ -2110,7 +2210,7 @@ inline Windows::Foundation::IAsyncOperation().GetCurrentDownloadsAsync(); } -inline Windows::Foundation::IAsyncOperation> BackgroundDownloader::GetCurrentDownloadsAsync(hstring_ref group) +inline Windows::Foundation::IAsyncOperation> BackgroundDownloader::GetCurrentDownloadsAsync(hstring_view group) { return get_activation_factory().GetCurrentDownloadsAsync(group); } @@ -2120,7 +2220,7 @@ inline Windows::Foundation::IAsyncOperation().GetCurrentDownloadsForTransferGroupAsync(group); } -inline Windows::Foundation::IAsyncOperation BackgroundDownloader::RequestUnconstrainedDownloadsAsync(const Windows::Foundation::Collections::IIterable & operations) +inline Windows::Foundation::IAsyncOperation BackgroundDownloader::RequestUnconstrainedDownloadsAsync(iterable operations) { return get_activation_factory().RequestUnconstrainedDownloadsAsync(operations); } @@ -2133,11 +2233,11 @@ inline BackgroundTransferContentPart::BackgroundTransferContentPart() : BackgroundTransferContentPart(activate_instance()) {} -inline BackgroundTransferContentPart::BackgroundTransferContentPart(hstring_ref name) : +inline BackgroundTransferContentPart::BackgroundTransferContentPart(hstring_view name) : BackgroundTransferContentPart(get_activation_factory().CreateWithName(name)) {} -inline BackgroundTransferContentPart::BackgroundTransferContentPart(hstring_ref name, hstring_ref fileName) : +inline BackgroundTransferContentPart::BackgroundTransferContentPart(hstring_view name, hstring_view fileName) : BackgroundTransferContentPart(get_activation_factory().CreateWithNameAndFileName(name, fileName)) {} @@ -2146,7 +2246,7 @@ inline Windows::Web::WebErrorStatus BackgroundTransferError::GetStatus(int32_t h return get_activation_factory().GetStatus(hresult); } -inline Windows::Networking::BackgroundTransfer::BackgroundTransferGroup BackgroundTransferGroup::CreateGroup(hstring_ref name) +inline Windows::Networking::BackgroundTransfer::BackgroundTransferGroup BackgroundTransferGroup::CreateGroup(hstring_view name) { return get_activation_factory().CreateGroup(name); } @@ -2164,7 +2264,7 @@ inline Windows::Foundation::IAsyncOperation().GetCurrentUploadsAsync(); } -inline Windows::Foundation::IAsyncOperation> BackgroundUploader::GetCurrentUploadsAsync(hstring_ref group) +inline Windows::Foundation::IAsyncOperation> BackgroundUploader::GetCurrentUploadsAsync(hstring_view group) { return get_activation_factory().GetCurrentUploadsAsync(group); } @@ -2174,7 +2274,7 @@ inline Windows::Foundation::IAsyncOperation().GetCurrentUploadsForTransferGroupAsync(group); } -inline Windows::Foundation::IAsyncOperation BackgroundUploader::RequestUnconstrainedUploadsAsync(const Windows::Foundation::Collections::IIterable & operations) +inline Windows::Foundation::IAsyncOperation BackgroundUploader::RequestUnconstrainedUploadsAsync(iterable operations) { return get_activation_factory().RequestUnconstrainedUploadsAsync(operations); } @@ -2202,3 +2302,383 @@ inline Windows::Foundation::IReference ContentPre } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloader2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloader3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloaderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloaderStaticMethods & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloaderStaticMethods2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundDownloaderUserConsent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferCompletionGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferCompletionGroupTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferContentPart & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferContentPartFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferErrorStaticMethods & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferGroupStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundTransferOperationPriority & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploader2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploader3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploaderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploaderStaticMethods & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploaderStaticMethods2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IBackgroundUploaderUserConsent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IContentPrefetcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IContentPrefetcherTime & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IDownloadOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IDownloadOperation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IResponseInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IUnconstrainedTransferRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IUploadOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::IUploadOperation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundDownloader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroupTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::BackgroundUploader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::DownloadOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::ResponseInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::UnconstrainedTransferRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::BackgroundTransfer::UploadOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.Connectivity.h b/10.0.14393.0/winrt/Windows.Networking.Connectivity.h index a356681a1..55c80341e 100644 --- a/10.0.14393.0/winrt/Windows.Networking.Connectivity.h +++ b/10.0.14393.0/winrt/Windows.Networking.Connectivity.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -27,9 +30,9 @@ template NetworkStatusChangedEventHandler::NetworkStatu NetworkStatusChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void NetworkStatusChangedEventHandler::operator()(const Windows::IInspectable & sender) const +inline void NetworkStatusChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } } @@ -43,7 +46,8 @@ struct produce : { try { - *value = detach(this->shim().BytesSent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesSent()); return S_OK; } catch (...) @@ -56,7 +60,8 @@ struct produce : { try { - *value = detach(this->shim().BytesReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesReceived()); return S_OK; } catch (...) @@ -65,11 +70,12 @@ struct produce : } } - HRESULT __stdcall get_AttributionId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AttributionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttributionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributionId()); return S_OK; } catch (...) @@ -79,11 +85,12 @@ struct produce : } } - HRESULT __stdcall get_AttributionName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AttributionName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttributionName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributionName()); return S_OK; } catch (...) @@ -93,11 +100,12 @@ struct produce : } } - HRESULT __stdcall get_AttributionThumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_AttributionThumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttributionThumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttributionThumbnail()); return S_OK; } catch (...) @@ -111,11 +119,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ProviderId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProviderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderId()); return S_OK; } catch (...) @@ -125,10 +134,11 @@ struct produce : prod } } - HRESULT __stdcall put_ProviderId(abi_arg_in value) noexcept override + HRESULT __stdcall put_ProviderId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProviderId(*reinterpret_cast(&value)); return S_OK; } @@ -138,11 +148,12 @@ struct produce : prod } } - HRESULT __stdcall get_AccessPointName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccessPointName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccessPointName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessPointName()); return S_OK; } catch (...) @@ -152,10 +163,11 @@ struct produce : prod } } - HRESULT __stdcall put_AccessPointName(abi_arg_in value) noexcept override + HRESULT __stdcall put_AccessPointName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AccessPointName(*reinterpret_cast(&value)); return S_OK; } @@ -165,11 +177,12 @@ struct produce : prod } } - HRESULT __stdcall get_UserName(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserName()); return S_OK; } catch (...) @@ -179,10 +192,11 @@ struct produce : prod } } - HRESULT __stdcall put_UserName(abi_arg_in value) noexcept override + HRESULT __stdcall put_UserName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserName(*reinterpret_cast(&value)); return S_OK; } @@ -192,11 +206,12 @@ struct produce : prod } } - HRESULT __stdcall get_Password(abi_arg_out value) noexcept override + HRESULT __stdcall get_Password(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Password()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Password()); return S_OK; } catch (...) @@ -206,10 +221,11 @@ struct produce : prod } } - HRESULT __stdcall put_Password(abi_arg_in value) noexcept override + HRESULT __stdcall put_Password(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&value)); return S_OK; } @@ -223,7 +239,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsCompressionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompressionEnabled()); return S_OK; } catch (...) @@ -236,6 +253,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCompressionEnabled(value); return S_OK; } @@ -249,7 +267,8 @@ struct produce : prod { try { - *value = detach(this->shim().AuthenticationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationType()); return S_OK; } catch (...) @@ -262,6 +281,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticationType(value); return S_OK; } @@ -279,7 +299,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().NetworkCostType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkCostType()); return S_OK; } catch (...) @@ -292,7 +313,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Roaming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Roaming()); return S_OK; } catch (...) @@ -305,7 +327,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().OverDataLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverDataLimit()); return S_OK; } catch (...) @@ -318,7 +341,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ApproachingDataLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApproachingDataLimit()); return S_OK; } catch (...) @@ -335,7 +359,8 @@ struct produce : produce { try { - *value = detach(this->shim().BackgroundDataUsageRestricted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundDataUsageRestricted()); return S_OK; } catch (...) @@ -348,11 +373,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ProfileName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProfileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProfileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProfileName()); return S_OK; } catch (...) @@ -366,7 +392,8 @@ struct produce : produ { try { - *value = detach(this->shim().GetNetworkConnectivityLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkConnectivityLevel()); return S_OK; } catch (...) @@ -375,11 +402,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetNetworkNames(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetNetworkNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetNetworkNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkNames()); return S_OK; } catch (...) @@ -389,11 +417,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetConnectionCost(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetConnectionCost(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetConnectionCost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectionCost()); return S_OK; } catch (...) @@ -403,11 +432,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDataPlanStatus(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDataPlanStatus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDataPlanStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDataPlanStatus()); return S_OK; } catch (...) @@ -417,11 +447,12 @@ struct produce : produ } } - HRESULT __stdcall get_NetworkAdapter(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAdapter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAdapter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapter()); return S_OK; } catch (...) @@ -431,11 +462,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLocalUsage(abi_arg_in StartTime, abi_arg_in EndTime, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLocalUsage(impl::abi_arg_in StartTime, impl::abi_arg_in EndTime, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLocalUsage(*reinterpret_cast(&StartTime), *reinterpret_cast(&EndTime))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLocalUsage(*reinterpret_cast(&StartTime), *reinterpret_cast(&EndTime))); return S_OK; } catch (...) @@ -445,11 +477,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLocalUsagePerRoamingStates(abi_arg_in StartTime, abi_arg_in EndTime, Windows::Networking::Connectivity::RoamingStates States, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLocalUsagePerRoamingStates(impl::abi_arg_in StartTime, impl::abi_arg_in EndTime, Windows::Networking::Connectivity::RoamingStates States, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLocalUsage(*reinterpret_cast(&StartTime), *reinterpret_cast(&EndTime), States)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLocalUsage(*reinterpret_cast(&StartTime), *reinterpret_cast(&EndTime), States)); return S_OK; } catch (...) @@ -459,11 +492,12 @@ struct produce : produ } } - HRESULT __stdcall get_NetworkSecuritySettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkSecuritySettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkSecuritySettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkSecuritySettings()); return S_OK; } catch (...) @@ -481,7 +515,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsWwanConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWwanConnectionProfile()); return S_OK; } catch (...) @@ -494,7 +529,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsWlanConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWlanConnectionProfile()); return S_OK; } catch (...) @@ -503,11 +539,12 @@ struct produce : prod } } - HRESULT __stdcall get_WwanConnectionProfileDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_WwanConnectionProfileDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WwanConnectionProfileDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WwanConnectionProfileDetails()); return S_OK; } catch (...) @@ -517,11 +554,12 @@ struct produce : prod } } - HRESULT __stdcall get_WlanConnectionProfileDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_WlanConnectionProfileDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WlanConnectionProfileDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WlanConnectionProfileDetails()); return S_OK; } catch (...) @@ -531,11 +569,12 @@ struct produce : prod } } - HRESULT __stdcall get_ServiceProviderGuid(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServiceProviderGuid(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServiceProviderGuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceProviderGuid()); return S_OK; } catch (...) @@ -545,11 +584,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetSignalBars(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSignalBars(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSignalBars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSignalBars()); return S_OK; } catch (...) @@ -563,7 +603,8 @@ struct produce : prod { try { - *value = detach(this->shim().GetDomainConnectivityLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDomainConnectivityLevel()); return S_OK; } catch (...) @@ -572,11 +613,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetNetworkUsageAsync(abi_arg_in startTime, abi_arg_in endTime, Windows::Networking::Connectivity::DataUsageGranularity granularity, abi_arg_in states, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetNetworkUsageAsync(impl::abi_arg_in startTime, impl::abi_arg_in endTime, Windows::Networking::Connectivity::DataUsageGranularity granularity, impl::abi_arg_in states, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetNetworkUsageAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), granularity, *reinterpret_cast(&states))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkUsageAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), granularity, *reinterpret_cast(&states))); return S_OK; } catch (...) @@ -586,11 +628,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetConnectivityIntervalsAsync(abi_arg_in startTime, abi_arg_in endTime, abi_arg_in states, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetConnectivityIntervalsAsync(impl::abi_arg_in startTime, impl::abi_arg_in endTime, impl::abi_arg_in states, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetConnectivityIntervalsAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), *reinterpret_cast(&states))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectivityIntervalsAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), *reinterpret_cast(&states))); return S_OK; } catch (...) @@ -604,11 +647,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetAttributedNetworkUsageAsync(abi_arg_in startTime, abi_arg_in endTime, abi_arg_in states, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetAttributedNetworkUsageAsync(impl::abi_arg_in startTime, impl::abi_arg_in endTime, impl::abi_arg_in states, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetAttributedNetworkUsageAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), *reinterpret_cast(&states))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAttributedNetworkUsageAsync(*reinterpret_cast(&startTime), *reinterpret_cast(&endTime), *reinterpret_cast(&states))); return S_OK; } catch (...) @@ -626,6 +670,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsConnected(value); return S_OK; } @@ -639,7 +684,8 @@ struct produce : { try { - *value = detach(this->shim().IsConnected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsConnected()); return S_OK; } catch (...) @@ -652,6 +698,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsWwanConnectionProfile(value); return S_OK; } @@ -665,7 +712,8 @@ struct produce : { try { - *value = detach(this->shim().IsWwanConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWwanConnectionProfile()); return S_OK; } catch (...) @@ -678,6 +726,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().IsWlanConnectionProfile(value); return S_OK; } @@ -691,7 +740,8 @@ struct produce : { try { - *value = detach(this->shim().IsWlanConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWlanConnectionProfile()); return S_OK; } catch (...) @@ -704,6 +754,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().NetworkCostType(value); return S_OK; } @@ -717,7 +768,8 @@ struct produce : { try { - *value = detach(this->shim().NetworkCostType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkCostType()); return S_OK; } catch (...) @@ -726,10 +778,11 @@ struct produce : } } - HRESULT __stdcall put_ServiceProviderGuid(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ServiceProviderGuid(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceProviderGuid(*reinterpret_cast *>(&value)); return S_OK; } @@ -739,11 +792,12 @@ struct produce : } } - HRESULT __stdcall get_ServiceProviderGuid(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServiceProviderGuid(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServiceProviderGuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceProviderGuid()); return S_OK; } catch (...) @@ -757,10 +811,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall put_IsRoaming(abi_arg_in> value) noexcept override + HRESULT __stdcall put_IsRoaming(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRoaming(*reinterpret_cast *>(&value)); return S_OK; } @@ -770,11 +825,12 @@ struct produce } } - HRESULT __stdcall get_IsRoaming(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsRoaming(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsRoaming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRoaming()); return S_OK; } catch (...) @@ -784,10 +840,11 @@ struct produce } } - HRESULT __stdcall put_IsOverDataLimit(abi_arg_in> value) noexcept override + HRESULT __stdcall put_IsOverDataLimit(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsOverDataLimit(*reinterpret_cast *>(&value)); return S_OK; } @@ -797,11 +854,12 @@ struct produce } } - HRESULT __stdcall get_IsOverDataLimit(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsOverDataLimit(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsOverDataLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOverDataLimit()); return S_OK; } catch (...) @@ -811,10 +869,11 @@ struct produce } } - HRESULT __stdcall put_IsBackgroundDataUsageRestricted(abi_arg_in> value) noexcept override + HRESULT __stdcall put_IsBackgroundDataUsageRestricted(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsBackgroundDataUsageRestricted(*reinterpret_cast *>(&value)); return S_OK; } @@ -824,11 +883,12 @@ struct produce } } - HRESULT __stdcall get_IsBackgroundDataUsageRestricted(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsBackgroundDataUsageRestricted(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsBackgroundDataUsageRestricted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBackgroundDataUsageRestricted()); return S_OK; } catch (...) @@ -838,11 +898,12 @@ struct produce } } - HRESULT __stdcall get_RawData(abi_arg_out value) noexcept override + HRESULT __stdcall get_RawData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawData()); return S_OK; } catch (...) @@ -856,11 +917,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ConnectionProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionProfile()); return S_OK; } catch (...) @@ -874,11 +936,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_StartTime(abi_arg_out startTime) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out startTime) noexcept override { try { - *startTime = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *startTime = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -887,11 +950,12 @@ struct produce : pr } } - HRESULT __stdcall get_ConnectionDuration(abi_arg_out duration) noexcept override + HRESULT __stdcall get_ConnectionDuration(impl::abi_arg_out duration) noexcept override { try { - *duration = detach(this->shim().ConnectionDuration()); + typename D::abi_guard guard(this->shim()); + *duration = detach_abi(this->shim().ConnectionDuration()); return S_OK; } catch (...) @@ -904,11 +968,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_AcquireConnectionAsync(abi_arg_in cellularApnContext, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AcquireConnectionAsync(impl::abi_arg_in cellularApnContext, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AcquireConnectionAsync(*reinterpret_cast(&cellularApnContext))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AcquireConnectionAsync(*reinterpret_cast(&cellularApnContext))); return S_OK; } catch (...) @@ -918,10 +983,11 @@ struct produce routePolicy) noexcept override + HRESULT __stdcall abi_AddHttpRoutePolicy(impl::abi_arg_in routePolicy) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddHttpRoutePolicy(*reinterpret_cast(&routePolicy)); return S_OK; } @@ -931,10 +997,11 @@ struct produce routePolicy) noexcept override + HRESULT __stdcall abi_RemoveHttpRoutePolicy(impl::abi_arg_in routePolicy) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveHttpRoutePolicy(*reinterpret_cast(&routePolicy)); return S_OK; } @@ -948,11 +1015,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DataPlanUsage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataPlanUsage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataPlanUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataPlanUsage()); return S_OK; } catch (...) @@ -962,11 +1030,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DataLimitInMegabytes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DataLimitInMegabytes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DataLimitInMegabytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataLimitInMegabytes()); return S_OK; } catch (...) @@ -976,11 +1045,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_InboundBitsPerSecond(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InboundBitsPerSecond(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InboundBitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundBitsPerSecond()); return S_OK; } catch (...) @@ -990,11 +1060,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OutboundBitsPerSecond(abi_arg_out> value) noexcept override + HRESULT __stdcall get_OutboundBitsPerSecond(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OutboundBitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundBitsPerSecond()); return S_OK; } catch (...) @@ -1004,11 +1075,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_NextBillingCycle(abi_arg_out> value) noexcept override + HRESULT __stdcall get_NextBillingCycle(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NextBillingCycle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextBillingCycle()); return S_OK; } catch (...) @@ -1018,11 +1090,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MaxTransferSizeInMegabytes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MaxTransferSizeInMegabytes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MaxTransferSizeInMegabytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxTransferSizeInMegabytes()); return S_OK; } catch (...) @@ -1040,7 +1113,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MegabytesUsed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MegabytesUsed()); return S_OK; } catch (...) @@ -1049,11 +1123,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_LastSyncTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastSyncTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastSyncTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastSyncTime()); return S_OK; } catch (...) @@ -1070,7 +1145,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().BytesSent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesSent()); return S_OK; } catch (...) @@ -1083,7 +1159,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().BytesReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesReceived()); return S_OK; } catch (...) @@ -1096,11 +1173,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_NetworkAdapter(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAdapter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAdapter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapter()); return S_OK; } catch (...) @@ -1110,11 +1188,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PrefixLength(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PrefixLength(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PrefixLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrefixLength()); return S_OK; } catch (...) @@ -1128,11 +1207,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_InfrastructureId(abi_arg_out value) noexcept override + HRESULT __stdcall get_InfrastructureId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InfrastructureId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InfrastructureId()); return S_OK; } catch (...) @@ -1142,11 +1222,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PortId(abi_arg_out value) noexcept override + HRESULT __stdcall get_PortId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PortId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PortId()); return S_OK; } catch (...) @@ -1160,7 +1241,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().NetworkAdapterId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapterId()); return S_OK; } catch (...) @@ -1177,7 +1259,8 @@ struct produce : produ { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1186,11 +1269,12 @@ struct produce : produ } } - HRESULT __stdcall get_Value(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1208,7 +1292,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().OutboundMaxBitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundMaxBitsPerSecond()); return S_OK; } catch (...) @@ -1221,7 +1306,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().InboundMaxBitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundMaxBitsPerSecond()); return S_OK; } catch (...) @@ -1234,7 +1320,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IanaInterfaceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IanaInterfaceType()); return S_OK; } catch (...) @@ -1243,11 +1330,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_NetworkItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkItem()); return S_OK; } catch (...) @@ -1261,7 +1349,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().NetworkAdapterId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapterId()); return S_OK; } catch (...) @@ -1270,11 +1359,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetConnectedProfileAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetConnectedProfileAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConnectedProfileAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectedProfileAsync()); return S_OK; } catch (...) @@ -1288,11 +1378,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetConnectionProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetConnectionProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConnectionProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectionProfiles()); return S_OK; } catch (...) @@ -1302,11 +1393,12 @@ struct produce } } - HRESULT __stdcall abi_GetInternetConnectionProfile(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetInternetConnectionProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetInternetConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetInternetConnectionProfile()); return S_OK; } catch (...) @@ -1316,11 +1408,12 @@ struct produce } } - HRESULT __stdcall abi_GetLanIdentifiers(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetLanIdentifiers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetLanIdentifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLanIdentifiers()); return S_OK; } catch (...) @@ -1330,11 +1423,12 @@ struct produce } } - HRESULT __stdcall abi_GetHostNames(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetHostNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetHostNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetHostNames()); return S_OK; } catch (...) @@ -1344,11 +1438,12 @@ struct produce } } - HRESULT __stdcall abi_GetProxyConfigurationAsync(abi_arg_in uri, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetProxyConfigurationAsync(impl::abi_arg_in uri, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetProxyConfigurationAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetProxyConfigurationAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1358,11 +1453,12 @@ struct produce } } - HRESULT __stdcall abi_GetSortedEndpointPairs(abi_arg_in> destinationList, Windows::Networking::HostNameSortOptions sortOptions, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetSortedEndpointPairs(impl::abi_arg_in> destinationList, Windows::Networking::HostNameSortOptions sortOptions, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetSortedEndpointPairs(*reinterpret_cast *>(&destinationList), sortOptions)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSortedEndpointPairs(*reinterpret_cast *>(&destinationList), sortOptions)); return S_OK; } catch (...) @@ -1372,11 +1468,12 @@ struct produce } } - HRESULT __stdcall add_NetworkStatusChanged(abi_arg_in networkStatusHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_NetworkStatusChanged(impl::abi_arg_in networkStatusHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().NetworkStatusChanged(*reinterpret_cast(&networkStatusHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().NetworkStatusChanged(*reinterpret_cast(&networkStatusHandler))); return S_OK; } catch (...) @@ -1389,6 +1486,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().NetworkStatusChanged(eventCookie); return S_OK; } @@ -1402,11 +1500,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_FindConnectionProfilesAsync(abi_arg_in pProfileFilter, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindConnectionProfilesAsync(impl::abi_arg_in pProfileFilter, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindConnectionProfilesAsync(*reinterpret_cast(&pProfileFilter))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindConnectionProfilesAsync(*reinterpret_cast(&pProfileFilter))); return S_OK; } catch (...) @@ -1424,7 +1523,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().NetworkId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkId()); return S_OK; } catch (...) @@ -1437,7 +1537,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().GetNetworkTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkTypes()); return S_OK; } catch (...) @@ -1454,7 +1555,8 @@ struct produce : { try { - *value = detach(this->shim().NetworkAuthenticationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAuthenticationType()); return S_OK; } catch (...) @@ -1467,7 +1569,8 @@ struct produce : { try { - *value = detach(this->shim().NetworkEncryptionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkEncryptionType()); return S_OK; } catch (...) @@ -1484,7 +1587,8 @@ struct produceshim().HasNewInternetConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewInternetConnectionProfile()); return S_OK; } catch (...) @@ -1497,7 +1601,8 @@ struct produceshim().HasNewConnectionCost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewConnectionCost()); return S_OK; } catch (...) @@ -1510,7 +1615,8 @@ struct produceshim().HasNewNetworkConnectivityLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewNetworkConnectivityLevel()); return S_OK; } catch (...) @@ -1523,7 +1629,8 @@ struct produceshim().HasNewDomainConnectivityLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewDomainConnectivityLevel()); return S_OK; } catch (...) @@ -1536,7 +1643,8 @@ struct produceshim().HasNewHostNameList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewHostNameList()); return S_OK; } catch (...) @@ -1549,7 +1657,8 @@ struct produceshim().HasNewWwanRegistrationState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewWwanRegistrationState()); return S_OK; } catch (...) @@ -1566,7 +1675,8 @@ struct produceshim().HasNewTetheringOperationalState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewTetheringOperationalState()); return S_OK; } catch (...) @@ -1579,7 +1689,8 @@ struct produceshim().HasNewTetheringClientCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNewTetheringClientCount()); return S_OK; } catch (...) @@ -1596,7 +1707,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BytesSent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesSent()); return S_OK; } catch (...) @@ -1609,7 +1721,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BytesReceived()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesReceived()); return S_OK; } catch (...) @@ -1618,11 +1731,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ConnectionDuration(abi_arg_out duration) noexcept override + HRESULT __stdcall get_ConnectionDuration(impl::abi_arg_out duration) noexcept override { try { - *duration = detach(this->shim().ConnectionDuration()); + typename D::abi_guard guard(this->shim()); + *duration = detach_abi(this->shim().ConnectionDuration()); return S_OK; } catch (...) @@ -1635,11 +1749,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_ProxyUris(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ProxyUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProxyUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProxyUris()); return S_OK; } catch (...) @@ -1653,7 +1768,8 @@ struct produce : prod { try { - *value = detach(this->shim().CanConnectDirectly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanConnectDirectly()); return S_OK; } catch (...) @@ -1666,11 +1782,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_ConnectionProfile(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConnectionProfile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConnectionProfile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionProfile()); return S_OK; } catch (...) @@ -1680,11 +1797,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_HostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostName()); return S_OK; } catch (...) @@ -1698,7 +1816,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().HostNameType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostNameType()); return S_OK; } catch (...) @@ -1711,11 +1830,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateRoutePolicy(abi_arg_in connectionProfile, abi_arg_in hostName, Windows::Networking::DomainNameType type, abi_arg_out routePolicy) noexcept override + HRESULT __stdcall abi_CreateRoutePolicy(impl::abi_arg_in connectionProfile, impl::abi_arg_in hostName, Windows::Networking::DomainNameType type, impl::abi_arg_out routePolicy) noexcept override { try { - *routePolicy = detach(this->shim().CreateRoutePolicy(*reinterpret_cast(&connectionProfile), *reinterpret_cast(&hostName), type)); + typename D::abi_guard guard(this->shim()); + *routePolicy = detach_abi(this->shim().CreateRoutePolicy(*reinterpret_cast(&connectionProfile), *reinterpret_cast(&hostName), type)); return S_OK; } catch (...) @@ -1729,11 +1849,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetConnectedSsid(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetConnectedSsid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetConnectedSsid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectedSsid()); return S_OK; } catch (...) @@ -1747,11 +1868,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_HomeProviderId(abi_arg_out value) noexcept override + HRESULT __stdcall get_HomeProviderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeProviderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeProviderId()); return S_OK; } catch (...) @@ -1761,11 +1883,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AccessPointName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccessPointName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessPointName()); return S_OK; } catch (...) @@ -1779,7 +1902,8 @@ struct produceshim().GetNetworkRegistrationState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNetworkRegistrationState()); return S_OK; } catch (...) @@ -1792,7 +1916,8 @@ struct produceshim().GetCurrentDataClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentDataClass()); return S_OK; } catch (...) @@ -1809,413 +1934,413 @@ namespace Windows::Networking::Connectivity { template uint64_t impl_IDataUsage::BytesSent() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesSent(&value)); + check_hresult(WINRT_SHIM(IDataUsage)->get_BytesSent(&value)); return value; } template uint64_t impl_IDataUsage::BytesReceived() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesReceived(&value)); + check_hresult(WINRT_SHIM(IDataUsage)->get_BytesReceived(&value)); return value; } template uint32_t impl_IDataPlanUsage::MegabytesUsed() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MegabytesUsed(&value)); + check_hresult(WINRT_SHIM(IDataPlanUsage)->get_MegabytesUsed(&value)); return value; } template Windows::Foundation::DateTime impl_IDataPlanUsage::LastSyncTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_LastSyncTime(put(value))); + check_hresult(WINRT_SHIM(IDataPlanUsage)->get_LastSyncTime(put_abi(value))); return value; } template Windows::Networking::Connectivity::DataPlanUsage impl_IDataPlanStatus::DataPlanUsage() const { Windows::Networking::Connectivity::DataPlanUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataPlanUsage(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_DataPlanUsage(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IDataPlanStatus::DataLimitInMegabytes() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_DataLimitInMegabytes(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_DataLimitInMegabytes(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IDataPlanStatus::InboundBitsPerSecond() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InboundBitsPerSecond(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_InboundBitsPerSecond(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IDataPlanStatus::OutboundBitsPerSecond() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OutboundBitsPerSecond(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_OutboundBitsPerSecond(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IDataPlanStatus::NextBillingCycle() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_NextBillingCycle(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_NextBillingCycle(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IDataPlanStatus::MaxTransferSizeInMegabytes() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_MaxTransferSizeInMegabytes(put(value))); + check_hresult(WINRT_SHIM(IDataPlanStatus)->get_MaxTransferSizeInMegabytes(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkCostType impl_IConnectionCost::NetworkCostType() const { Windows::Networking::Connectivity::NetworkCostType value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkCostType(&value)); + check_hresult(WINRT_SHIM(IConnectionCost)->get_NetworkCostType(&value)); return value; } template bool impl_IConnectionCost::Roaming() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Roaming(&value)); + check_hresult(WINRT_SHIM(IConnectionCost)->get_Roaming(&value)); return value; } template bool impl_IConnectionCost::OverDataLimit() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_OverDataLimit(&value)); + check_hresult(WINRT_SHIM(IConnectionCost)->get_OverDataLimit(&value)); return value; } template bool impl_IConnectionCost::ApproachingDataLimit() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ApproachingDataLimit(&value)); + check_hresult(WINRT_SHIM(IConnectionCost)->get_ApproachingDataLimit(&value)); return value; } template bool impl_IConnectionCost2::BackgroundDataUsageRestricted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundDataUsageRestricted(&value)); + check_hresult(WINRT_SHIM(IConnectionCost2)->get_BackgroundDataUsageRestricted(&value)); return value; } template Windows::Networking::Connectivity::NetworkAuthenticationType impl_INetworkSecuritySettings::NetworkAuthenticationType() const { Windows::Networking::Connectivity::NetworkAuthenticationType value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkAuthenticationType(&value)); + check_hresult(WINRT_SHIM(INetworkSecuritySettings)->get_NetworkAuthenticationType(&value)); return value; } template Windows::Networking::Connectivity::NetworkEncryptionType impl_INetworkSecuritySettings::NetworkEncryptionType() const { Windows::Networking::Connectivity::NetworkEncryptionType value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkEncryptionType(&value)); + check_hresult(WINRT_SHIM(INetworkSecuritySettings)->get_NetworkEncryptionType(&value)); return value; } template hstring impl_IConnectionProfile::ProfileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProfileName(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->get_ProfileName(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkConnectivityLevel impl_IConnectionProfile::GetNetworkConnectivityLevel() const { Windows::Networking::Connectivity::NetworkConnectivityLevel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkConnectivityLevel(&value)); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetNetworkConnectivityLevel(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IConnectionProfile::GetNetworkNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkNames(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetNetworkNames(put_abi(value))); return value; } template Windows::Networking::Connectivity::ConnectionCost impl_IConnectionProfile::GetConnectionCost() const { Windows::Networking::Connectivity::ConnectionCost value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionCost(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetConnectionCost(put_abi(value))); return value; } template Windows::Networking::Connectivity::DataPlanStatus impl_IConnectionProfile::GetDataPlanStatus() const { Windows::Networking::Connectivity::DataPlanStatus value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDataPlanStatus(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetDataPlanStatus(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkAdapter impl_IConnectionProfile::NetworkAdapter() const { Windows::Networking::Connectivity::NetworkAdapter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapter(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->get_NetworkAdapter(put_abi(value))); return value; } template Windows::Networking::Connectivity::DataUsage impl_IConnectionProfile::GetLocalUsage(const Windows::Foundation::DateTime & StartTime, const Windows::Foundation::DateTime & EndTime) const { Windows::Networking::Connectivity::DataUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalUsage(get(StartTime), get(EndTime), put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetLocalUsage(get_abi(StartTime), get_abi(EndTime), put_abi(value))); return value; } template Windows::Networking::Connectivity::DataUsage impl_IConnectionProfile::GetLocalUsage(const Windows::Foundation::DateTime & StartTime, const Windows::Foundation::DateTime & EndTime, Windows::Networking::Connectivity::RoamingStates States) const { Windows::Networking::Connectivity::DataUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalUsagePerRoamingStates(get(StartTime), get(EndTime), States, put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->abi_GetLocalUsagePerRoamingStates(get_abi(StartTime), get_abi(EndTime), States, put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkSecuritySettings impl_IConnectionProfile::NetworkSecuritySettings() const { Windows::Networking::Connectivity::NetworkSecuritySettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkSecuritySettings(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile)->get_NetworkSecuritySettings(put_abi(value))); return value; } template hstring impl_IWlanConnectionProfileDetails::GetConnectedSsid() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectedSsid(put(value))); + check_hresult(WINRT_SHIM(IWlanConnectionProfileDetails)->abi_GetConnectedSsid(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IConnectivityInterval::StartTime() const { Windows::Foundation::DateTime startTime {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(startTime))); + check_hresult(WINRT_SHIM(IConnectivityInterval)->get_StartTime(put_abi(startTime))); return startTime; } template Windows::Foundation::TimeSpan impl_IConnectivityInterval::ConnectionDuration() const { Windows::Foundation::TimeSpan duration {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionDuration(put(duration))); + check_hresult(WINRT_SHIM(IConnectivityInterval)->get_ConnectionDuration(put_abi(duration))); return duration; } template uint64_t impl_INetworkUsage::BytesSent() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesSent(&value)); + check_hresult(WINRT_SHIM(INetworkUsage)->get_BytesSent(&value)); return value; } template uint64_t impl_INetworkUsage::BytesReceived() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesReceived(&value)); + check_hresult(WINRT_SHIM(INetworkUsage)->get_BytesReceived(&value)); return value; } template Windows::Foundation::TimeSpan impl_INetworkUsage::ConnectionDuration() const { Windows::Foundation::TimeSpan duration {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionDuration(put(duration))); + check_hresult(WINRT_SHIM(INetworkUsage)->get_ConnectionDuration(put_abi(duration))); return duration; } template uint64_t impl_IAttributedNetworkUsage::BytesSent() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesSent(&value)); + check_hresult(WINRT_SHIM(IAttributedNetworkUsage)->get_BytesSent(&value)); return value; } template uint64_t impl_IAttributedNetworkUsage::BytesReceived() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesReceived(&value)); + check_hresult(WINRT_SHIM(IAttributedNetworkUsage)->get_BytesReceived(&value)); return value; } template hstring impl_IAttributedNetworkUsage::AttributionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AttributionId(put(value))); + check_hresult(WINRT_SHIM(IAttributedNetworkUsage)->get_AttributionId(put_abi(value))); return value; } template hstring impl_IAttributedNetworkUsage::AttributionName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AttributionName(put(value))); + check_hresult(WINRT_SHIM(IAttributedNetworkUsage)->get_AttributionName(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IAttributedNetworkUsage::AttributionThumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_AttributionThumbnail(put(value))); + check_hresult(WINRT_SHIM(IAttributedNetworkUsage)->get_AttributionThumbnail(put_abi(value))); return value; } template bool impl_IConnectionProfile2::IsWwanConnectionProfile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWwanConnectionProfile(&value)); + check_hresult(WINRT_SHIM(IConnectionProfile2)->get_IsWwanConnectionProfile(&value)); return value; } template bool impl_IConnectionProfile2::IsWlanConnectionProfile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWlanConnectionProfile(&value)); + check_hresult(WINRT_SHIM(IConnectionProfile2)->get_IsWlanConnectionProfile(&value)); return value; } template Windows::Networking::Connectivity::WwanConnectionProfileDetails impl_IConnectionProfile2::WwanConnectionProfileDetails() const { Windows::Networking::Connectivity::WwanConnectionProfileDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WwanConnectionProfileDetails(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->get_WwanConnectionProfileDetails(put_abi(value))); return value; } template Windows::Networking::Connectivity::WlanConnectionProfileDetails impl_IConnectionProfile2::WlanConnectionProfileDetails() const { Windows::Networking::Connectivity::WlanConnectionProfileDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WlanConnectionProfileDetails(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->get_WlanConnectionProfileDetails(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IConnectionProfile2::ServiceProviderGuid() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ServiceProviderGuid(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->get_ServiceProviderGuid(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IConnectionProfile2::GetSignalBars() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_GetSignalBars(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->abi_GetSignalBars(put_abi(value))); return value; } template Windows::Networking::Connectivity::DomainConnectivityLevel impl_IConnectionProfile2::GetDomainConnectivityLevel() const { Windows::Networking::Connectivity::DomainConnectivityLevel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetDomainConnectivityLevel(&value)); + check_hresult(WINRT_SHIM(IConnectionProfile2)->abi_GetDomainConnectivityLevel(&value)); return value; } template Windows::Foundation::IAsyncOperation> impl_IConnectionProfile2::GetNetworkUsageAsync(const Windows::Foundation::DateTime & startTime, const Windows::Foundation::DateTime & endTime, Windows::Networking::Connectivity::DataUsageGranularity granularity, const Windows::Networking::Connectivity::NetworkUsageStates & states) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkUsageAsync(get(startTime), get(endTime), granularity, get(states), put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->abi_GetNetworkUsageAsync(get_abi(startTime), get_abi(endTime), granularity, get_abi(states), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IConnectionProfile2::GetConnectivityIntervalsAsync(const Windows::Foundation::DateTime & startTime, const Windows::Foundation::DateTime & endTime, const Windows::Networking::Connectivity::NetworkUsageStates & states) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectivityIntervalsAsync(get(startTime), get(endTime), get(states), put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile2)->abi_GetConnectivityIntervalsAsync(get_abi(startTime), get_abi(endTime), get_abi(states), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IConnectionProfile3::GetAttributedNetworkUsageAsync(const Windows::Foundation::DateTime & startTime, const Windows::Foundation::DateTime & endTime, const Windows::Networking::Connectivity::NetworkUsageStates & states) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetAttributedNetworkUsageAsync(get(startTime), get(endTime), get(states), put(value))); + check_hresult(WINRT_SHIM(IConnectionProfile3)->abi_GetAttributedNetworkUsageAsync(get_abi(startTime), get_abi(endTime), get_abi(states), put_abi(value))); return value; } template uint32_t impl_ILanIdentifierData::Type() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(ILanIdentifierData)->get_Type(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ILanIdentifierData::Value() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(ILanIdentifierData)->get_Value(put_abi(value))); return value; } template Windows::Networking::Connectivity::LanIdentifierData impl_ILanIdentifier::InfrastructureId() const { Windows::Networking::Connectivity::LanIdentifierData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InfrastructureId(put(value))); + check_hresult(WINRT_SHIM(ILanIdentifier)->get_InfrastructureId(put_abi(value))); return value; } template Windows::Networking::Connectivity::LanIdentifierData impl_ILanIdentifier::PortId() const { Windows::Networking::Connectivity::LanIdentifierData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PortId(put(value))); + check_hresult(WINRT_SHIM(ILanIdentifier)->get_PortId(put_abi(value))); return value; } template GUID impl_ILanIdentifier::NetworkAdapterId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapterId(&value)); + check_hresult(WINRT_SHIM(ILanIdentifier)->get_NetworkAdapterId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_INetworkInformationStatics::GetConnectionProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionProfiles(put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetConnectionProfiles(put_abi(value))); return value; } template Windows::Networking::Connectivity::ConnectionProfile impl_INetworkInformationStatics::GetInternetConnectionProfile() const { Windows::Networking::Connectivity::ConnectionProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetInternetConnectionProfile(put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetInternetConnectionProfile(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_INetworkInformationStatics::GetLanIdentifiers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetLanIdentifiers(put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetLanIdentifiers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_INetworkInformationStatics::GetHostNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetHostNames(put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetHostNames(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_INetworkInformationStatics::GetProxyConfigurationAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetProxyConfigurationAsync(get(uri), put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetProxyConfigurationAsync(get_abi(uri), put_abi(value))); return value; } -template Windows::Foundation::Collections::IVectorView impl_INetworkInformationStatics::GetSortedEndpointPairs(const Windows::Foundation::Collections::IIterable & destinationList, Windows::Networking::HostNameSortOptions sortOptions) const +template Windows::Foundation::Collections::IVectorView impl_INetworkInformationStatics::GetSortedEndpointPairs(iterable destinationList, Windows::Networking::HostNameSortOptions sortOptions) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetSortedEndpointPairs(get(destinationList), sortOptions, put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->abi_GetSortedEndpointPairs(get_abi(destinationList), sortOptions, put_abi(value))); return value; } template event_token impl_INetworkInformationStatics::NetworkStatusChanged(const Windows::Networking::Connectivity::NetworkStatusChangedEventHandler & networkStatusHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_NetworkStatusChanged(get(networkStatusHandler), &eventCookie)); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->add_NetworkStatusChanged(get_abi(networkStatusHandler), &eventCookie)); return eventCookie; } @@ -2226,408 +2351,408 @@ template event_revoker impl_INetworkInf template void impl_INetworkInformationStatics::NetworkStatusChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_NetworkStatusChanged(eventCookie)); + check_hresult(WINRT_SHIM(INetworkInformationStatics)->remove_NetworkStatusChanged(eventCookie)); } template void impl_IConnectionProfileFilter::IsConnected(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsConnected(value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->put_IsConnected(value)); } template bool impl_IConnectionProfileFilter::IsConnected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsConnected(&value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->get_IsConnected(&value)); return value; } template void impl_IConnectionProfileFilter::IsWwanConnectionProfile(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsWwanConnectionProfile(value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->put_IsWwanConnectionProfile(value)); } template bool impl_IConnectionProfileFilter::IsWwanConnectionProfile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWwanConnectionProfile(&value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->get_IsWwanConnectionProfile(&value)); return value; } template void impl_IConnectionProfileFilter::IsWlanConnectionProfile(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsWlanConnectionProfile(value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->put_IsWlanConnectionProfile(value)); } template bool impl_IConnectionProfileFilter::IsWlanConnectionProfile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWlanConnectionProfile(&value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->get_IsWlanConnectionProfile(&value)); return value; } template void impl_IConnectionProfileFilter::NetworkCostType(Windows::Networking::Connectivity::NetworkCostType value) const { - check_hresult(static_cast(static_cast(*this))->put_NetworkCostType(value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->put_NetworkCostType(value)); } template Windows::Networking::Connectivity::NetworkCostType impl_IConnectionProfileFilter::NetworkCostType() const { Windows::Networking::Connectivity::NetworkCostType value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkCostType(&value)); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->get_NetworkCostType(&value)); return value; } -template void impl_IConnectionProfileFilter::ServiceProviderGuid(const Windows::Foundation::IReference & value) const +template void impl_IConnectionProfileFilter::ServiceProviderGuid(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceProviderGuid(get(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->put_ServiceProviderGuid(get_abi(value))); } template Windows::Foundation::IReference impl_IConnectionProfileFilter::ServiceProviderGuid() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ServiceProviderGuid(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter)->get_ServiceProviderGuid(put_abi(value))); return value; } -template void impl_IConnectionProfileFilter2::IsRoaming(const Windows::Foundation::IReference & value) const +template void impl_IConnectionProfileFilter2::IsRoaming(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRoaming(get(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->put_IsRoaming(get_abi(value))); } template Windows::Foundation::IReference impl_IConnectionProfileFilter2::IsRoaming() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsRoaming(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->get_IsRoaming(put_abi(value))); return value; } -template void impl_IConnectionProfileFilter2::IsOverDataLimit(const Windows::Foundation::IReference & value) const +template void impl_IConnectionProfileFilter2::IsOverDataLimit(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOverDataLimit(get(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->put_IsOverDataLimit(get_abi(value))); } template Windows::Foundation::IReference impl_IConnectionProfileFilter2::IsOverDataLimit() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsOverDataLimit(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->get_IsOverDataLimit(put_abi(value))); return value; } -template void impl_IConnectionProfileFilter2::IsBackgroundDataUsageRestricted(const Windows::Foundation::IReference & value) const +template void impl_IConnectionProfileFilter2::IsBackgroundDataUsageRestricted(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_IsBackgroundDataUsageRestricted(get(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->put_IsBackgroundDataUsageRestricted(get_abi(value))); } template Windows::Foundation::IReference impl_IConnectionProfileFilter2::IsBackgroundDataUsageRestricted() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsBackgroundDataUsageRestricted(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->get_IsBackgroundDataUsageRestricted(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IConnectionProfileFilter2::RawData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_RawData(put(value))); + check_hresult(WINRT_SHIM(IConnectionProfileFilter2)->get_RawData(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_INetworkInformationStatics2::FindConnectionProfilesAsync(const Windows::Networking::Connectivity::ConnectionProfileFilter & pProfileFilter) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindConnectionProfilesAsync(get(pProfileFilter), put(value))); + check_hresult(WINRT_SHIM(INetworkInformationStatics2)->abi_FindConnectionProfilesAsync(get_abi(pProfileFilter), put_abi(value))); return value; } template GUID impl_INetworkItem::NetworkId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkId(&value)); + check_hresult(WINRT_SHIM(INetworkItem)->get_NetworkId(&value)); return value; } template Windows::Networking::Connectivity::NetworkTypes impl_INetworkItem::GetNetworkTypes() const { Windows::Networking::Connectivity::NetworkTypes value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkTypes(&value)); + check_hresult(WINRT_SHIM(INetworkItem)->abi_GetNetworkTypes(&value)); return value; } template uint64_t impl_INetworkAdapter::OutboundMaxBitsPerSecond() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundMaxBitsPerSecond(&value)); + check_hresult(WINRT_SHIM(INetworkAdapter)->get_OutboundMaxBitsPerSecond(&value)); return value; } template uint64_t impl_INetworkAdapter::InboundMaxBitsPerSecond() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InboundMaxBitsPerSecond(&value)); + check_hresult(WINRT_SHIM(INetworkAdapter)->get_InboundMaxBitsPerSecond(&value)); return value; } template uint32_t impl_INetworkAdapter::IanaInterfaceType() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IanaInterfaceType(&value)); + check_hresult(WINRT_SHIM(INetworkAdapter)->get_IanaInterfaceType(&value)); return value; } template Windows::Networking::Connectivity::NetworkItem impl_INetworkAdapter::NetworkItem() const { Windows::Networking::Connectivity::NetworkItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkItem(put(value))); + check_hresult(WINRT_SHIM(INetworkAdapter)->get_NetworkItem(put_abi(value))); return value; } template GUID impl_INetworkAdapter::NetworkAdapterId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapterId(&value)); + check_hresult(WINRT_SHIM(INetworkAdapter)->get_NetworkAdapterId(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_INetworkAdapter::GetConnectedProfileAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectedProfileAsync(put(value))); + check_hresult(WINRT_SHIM(INetworkAdapter)->abi_GetConnectedProfileAsync(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkAdapter impl_IIPInformation::NetworkAdapter() const { Windows::Networking::Connectivity::NetworkAdapter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapter(put(value))); + check_hresult(WINRT_SHIM(IIPInformation)->get_NetworkAdapter(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IIPInformation::PrefixLength() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PrefixLength(put(value))); + check_hresult(WINRT_SHIM(IIPInformation)->get_PrefixLength(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IProxyConfiguration::ProxyUris() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ProxyUris(put(value))); + check_hresult(WINRT_SHIM(IProxyConfiguration)->get_ProxyUris(put_abi(value))); return value; } template bool impl_IProxyConfiguration::CanConnectDirectly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanConnectDirectly(&value)); + check_hresult(WINRT_SHIM(IProxyConfiguration)->get_CanConnectDirectly(&value)); return value; } template Windows::Networking::Connectivity::ConnectionProfile impl_IConnectionSession::ConnectionProfile() const { Windows::Networking::Connectivity::ConnectionProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionProfile(put(value))); + check_hresult(WINRT_SHIM(IConnectionSession)->get_ConnectionProfile(put_abi(value))); return value; } template Windows::Networking::Connectivity::ConnectionProfile impl_IRoutePolicy::ConnectionProfile() const { Windows::Networking::Connectivity::ConnectionProfile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ConnectionProfile(put(value))); + check_hresult(WINRT_SHIM(IRoutePolicy)->get_ConnectionProfile(put_abi(value))); return value; } template Windows::Networking::HostName impl_IRoutePolicy::HostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HostName(put(value))); + check_hresult(WINRT_SHIM(IRoutePolicy)->get_HostName(put_abi(value))); return value; } template Windows::Networking::DomainNameType impl_IRoutePolicy::HostNameType() const { Windows::Networking::DomainNameType value {}; - check_hresult(static_cast(static_cast(*this))->get_HostNameType(&value)); + check_hresult(WINRT_SHIM(IRoutePolicy)->get_HostNameType(&value)); return value; } template Windows::Networking::Connectivity::RoutePolicy impl_IRoutePolicyFactory::CreateRoutePolicy(const Windows::Networking::Connectivity::ConnectionProfile & connectionProfile, const Windows::Networking::HostName & hostName, Windows::Networking::DomainNameType type) const { Windows::Networking::Connectivity::RoutePolicy routePolicy { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateRoutePolicy(get(connectionProfile), get(hostName), type, put(routePolicy))); + check_hresult(WINRT_SHIM(IRoutePolicyFactory)->abi_CreateRoutePolicy(get_abi(connectionProfile), get_abi(hostName), type, put_abi(routePolicy))); return routePolicy; } template hstring impl_ICellularApnContext::ProviderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProviderId(put(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_ProviderId(put_abi(value))); return value; } -template void impl_ICellularApnContext::ProviderId(hstring_ref value) const +template void impl_ICellularApnContext::ProviderId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ProviderId(get(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_ProviderId(get_abi(value))); } template hstring impl_ICellularApnContext::AccessPointName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccessPointName(put(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_AccessPointName(put_abi(value))); return value; } -template void impl_ICellularApnContext::AccessPointName(hstring_ref value) const +template void impl_ICellularApnContext::AccessPointName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AccessPointName(get(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_AccessPointName(get_abi(value))); } template hstring impl_ICellularApnContext::UserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_UserName(put_abi(value))); return value; } -template void impl_ICellularApnContext::UserName(hstring_ref value) const +template void impl_ICellularApnContext::UserName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UserName(get(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_UserName(get_abi(value))); } template hstring impl_ICellularApnContext::Password() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Password(put(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_Password(put_abi(value))); return value; } -template void impl_ICellularApnContext::Password(hstring_ref value) const +template void impl_ICellularApnContext::Password(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Password(get(value))); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_Password(get_abi(value))); } template bool impl_ICellularApnContext::IsCompressionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCompressionEnabled(&value)); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_IsCompressionEnabled(&value)); return value; } template void impl_ICellularApnContext::IsCompressionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCompressionEnabled(value)); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_IsCompressionEnabled(value)); } template Windows::Networking::Connectivity::CellularApnAuthenticationType impl_ICellularApnContext::AuthenticationType() const { Windows::Networking::Connectivity::CellularApnAuthenticationType value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationType(&value)); + check_hresult(WINRT_SHIM(ICellularApnContext)->get_AuthenticationType(&value)); return value; } template void impl_ICellularApnContext::AuthenticationType(Windows::Networking::Connectivity::CellularApnAuthenticationType value) const { - check_hresult(static_cast(static_cast(*this))->put_AuthenticationType(value)); + check_hresult(WINRT_SHIM(ICellularApnContext)->put_AuthenticationType(value)); } template Windows::Foundation::IAsyncOperation impl_IConnectivityManagerStatics::AcquireConnectionAsync(const Windows::Networking::Connectivity::CellularApnContext & cellularApnContext) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_AcquireConnectionAsync(get(cellularApnContext), put(operation))); + check_hresult(WINRT_SHIM(IConnectivityManagerStatics)->abi_AcquireConnectionAsync(get_abi(cellularApnContext), put_abi(operation))); return operation; } template void impl_IConnectivityManagerStatics::AddHttpRoutePolicy(const Windows::Networking::Connectivity::RoutePolicy & routePolicy) const { - check_hresult(static_cast(static_cast(*this))->abi_AddHttpRoutePolicy(get(routePolicy))); + check_hresult(WINRT_SHIM(IConnectivityManagerStatics)->abi_AddHttpRoutePolicy(get_abi(routePolicy))); } template void impl_IConnectivityManagerStatics::RemoveHttpRoutePolicy(const Windows::Networking::Connectivity::RoutePolicy & routePolicy) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveHttpRoutePolicy(get(routePolicy))); + check_hresult(WINRT_SHIM(IConnectivityManagerStatics)->abi_RemoveHttpRoutePolicy(get_abi(routePolicy))); } template bool impl_INetworkStateChangeEventDetails::HasNewInternetConnectionProfile() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewInternetConnectionProfile(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewInternetConnectionProfile(&value)); return value; } template bool impl_INetworkStateChangeEventDetails::HasNewConnectionCost() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewConnectionCost(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewConnectionCost(&value)); return value; } template bool impl_INetworkStateChangeEventDetails::HasNewNetworkConnectivityLevel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewNetworkConnectivityLevel(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewNetworkConnectivityLevel(&value)); return value; } template bool impl_INetworkStateChangeEventDetails::HasNewDomainConnectivityLevel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewDomainConnectivityLevel(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewDomainConnectivityLevel(&value)); return value; } template bool impl_INetworkStateChangeEventDetails::HasNewHostNameList() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewHostNameList(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewHostNameList(&value)); return value; } template bool impl_INetworkStateChangeEventDetails::HasNewWwanRegistrationState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewWwanRegistrationState(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails)->get_HasNewWwanRegistrationState(&value)); return value; } template bool impl_INetworkStateChangeEventDetails2::HasNewTetheringOperationalState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewTetheringOperationalState(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails2)->get_HasNewTetheringOperationalState(&value)); return value; } template bool impl_INetworkStateChangeEventDetails2::HasNewTetheringClientCount() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNewTetheringClientCount(&value)); + check_hresult(WINRT_SHIM(INetworkStateChangeEventDetails2)->get_HasNewTetheringClientCount(&value)); return value; } template hstring impl_IWwanConnectionProfileDetails::HomeProviderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HomeProviderId(put(value))); + check_hresult(WINRT_SHIM(IWwanConnectionProfileDetails)->get_HomeProviderId(put_abi(value))); return value; } template hstring impl_IWwanConnectionProfileDetails::AccessPointName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccessPointName(put(value))); + check_hresult(WINRT_SHIM(IWwanConnectionProfileDetails)->get_AccessPointName(put_abi(value))); return value; } template Windows::Networking::Connectivity::WwanNetworkRegistrationState impl_IWwanConnectionProfileDetails::GetNetworkRegistrationState() const { Windows::Networking::Connectivity::WwanNetworkRegistrationState value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNetworkRegistrationState(&value)); + check_hresult(WINRT_SHIM(IWwanConnectionProfileDetails)->abi_GetNetworkRegistrationState(&value)); return value; } template Windows::Networking::Connectivity::WwanDataClass impl_IWwanConnectionProfileDetails::GetCurrentDataClass() const { Windows::Networking::Connectivity::WwanDataClass value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentDataClass(&value)); + check_hresult(WINRT_SHIM(IWwanConnectionProfileDetails)->abi_GetCurrentDataClass(&value)); return value; } @@ -2679,7 +2804,7 @@ inline Windows::Foundation::IAsyncOperation().GetProxyConfigurationAsync(uri); } -inline Windows::Foundation::Collections::IVectorView NetworkInformation::GetSortedEndpointPairs(const Windows::Foundation::Collections::IIterable & destinationList, Windows::Networking::HostNameSortOptions sortOptions) +inline Windows::Foundation::Collections::IVectorView NetworkInformation::GetSortedEndpointPairs(iterable destinationList, Windows::Networking::HostNameSortOptions sortOptions) { return get_activation_factory().GetSortedEndpointPairs(destinationList, sortOptions); } @@ -2712,3 +2837,482 @@ inline RoutePolicy::RoutePolicy(const Windows::Networking::Connectivity::Connect } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IAttributedNetworkUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ICellularApnContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionCost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionCost2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionProfile2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionProfile3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionProfileFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionProfileFilter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectivityInterval & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IConnectivityManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IDataPlanStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IDataPlanUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IDataUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IIPInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ILanIdentifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ILanIdentifierData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkAdapter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkInformationStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkSecuritySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkStateChangeEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkStateChangeEventDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::INetworkUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IProxyConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IRoutePolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IRoutePolicyFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IWlanConnectionProfileDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IWwanConnectionProfileDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::AttributedNetworkUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::CellularApnContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ConnectionCost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ConnectionProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ConnectionProfileFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ConnectionSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ConnectivityInterval & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::DataPlanStatus & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::DataPlanUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::DataUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::IPInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::LanIdentifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::LanIdentifierData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::NetworkAdapter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::NetworkItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::NetworkSecuritySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::NetworkStateChangeEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::NetworkUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::ProxyConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::RoutePolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::WlanConnectionProfileDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Connectivity::WwanConnectionProfileDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.NetworkOperators.h b/10.0.14393.0/winrt/Windows.Networking.NetworkOperators.h index c84d5809c..e28cbae17 100644 --- a/10.0.14393.0/winrt/Windows.Networking.NetworkOperators.h +++ b/10.0.14393.0/winrt/Windows.Networking.NetworkOperators.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Sms.3.h" #include "internal/Windows.Networking.Connectivity.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RequestUnlockAsync(abi_arg_in contactListId, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_RequestUnlockAsync(impl::abi_arg_in contactListId, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().RequestUnlockAsync(*reinterpret_cast(&contactListId))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().RequestUnlockAsync(*reinterpret_cast(&contactListId))); return S_OK; } catch (...) @@ -37,11 +41,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WirelessNetworkId(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_WirelessNetworkId(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().WirelessNetworkId()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().WirelessNetworkId()); return S_OK; } catch (...) @@ -52,11 +57,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NetworkAdapter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAdapter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapter()); return S_OK; } catch (...) @@ -66,11 +72,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RedirectMessageUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RedirectMessageUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedirectMessageUrl()); return S_OK; } catch (...) @@ -80,11 +87,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RedirectMessageXml(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RedirectMessageXml()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RedirectMessageXml()); return S_OK; } catch (...) @@ -94,11 +102,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthenticationUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthenticationUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationUrl()); return S_OK; } catch (...) @@ -108,10 +117,11 @@ struct produce userName, abi_arg_in password, abi_arg_in extraParameters, bool markAsManualConnectOnFailure) noexcept override + HRESULT __stdcall abi_IssueCredentials(impl::abi_arg_in userName, impl::abi_arg_in password, impl::abi_arg_in extraParameters, bool markAsManualConnectOnFailure) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IssueCredentials(*reinterpret_cast(&userName), *reinterpret_cast(&password), *reinterpret_cast(&extraParameters), markAsManualConnectOnFailure); return S_OK; } @@ -125,6 +135,7 @@ struct produceshim()); this->shim().AbortAuthentication(markAsManual); return S_OK; } @@ -138,6 +149,7 @@ struct produceshim()); this->shim().SkipAuthentication(); return S_OK; } @@ -147,10 +159,11 @@ struct produce packageRelativeApplicationId, abi_arg_in applicationParameters) noexcept override + HRESULT __stdcall abi_TriggerAttentionRequired(impl::abi_arg_in packageRelativeApplicationId, impl::abi_arg_in applicationParameters) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TriggerAttentionRequired(*reinterpret_cast(&packageRelativeApplicationId), *reinterpret_cast(&applicationParameters)); return S_OK; } @@ -164,11 +177,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_IssueCredentialsAsync(abi_arg_in userName, abi_arg_in password, abi_arg_in extraParameters, bool markAsManualConnectOnFailure, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_IssueCredentialsAsync(impl::abi_arg_in userName, impl::abi_arg_in password, impl::abi_arg_in extraParameters, bool markAsManualConnectOnFailure, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().IssueCredentialsAsync(*reinterpret_cast(&userName), *reinterpret_cast(&password), *reinterpret_cast(&extraParameters), markAsManualConnectOnFailure)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().IssueCredentialsAsync(*reinterpret_cast(&userName), *reinterpret_cast(&password), *reinterpret_cast(&extraParameters), markAsManualConnectOnFailure)); return S_OK; } catch (...) @@ -182,11 +196,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryGetAuthenticationContext(abi_arg_in evenToken, abi_arg_out context, bool * isValid) noexcept override + HRESULT __stdcall abi_TryGetAuthenticationContext(impl::abi_arg_in evenToken, impl::abi_arg_out context, bool * isValid) noexcept override { try { - *isValid = detach(this->shim().TryGetAuthenticationContext(*reinterpret_cast(&evenToken), *context)); + typename D::abi_guard guard(this->shim()); + *isValid = detach_abi(this->shim().TryGetAuthenticationContext(*reinterpret_cast(&evenToken), *context)); return S_OK; } catch (...) @@ -200,11 +215,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EventToken(abi_arg_out value) noexcept override + HRESULT __stdcall get_EventToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EventToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EventToken()); return S_OK; } catch (...) @@ -222,7 +238,8 @@ struct produceshim().HasNetworkErrorOccurred()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNetworkErrorOccurred()); return S_OK; } catch (...) @@ -235,7 +252,8 @@ struct produceshim().ResponseCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseCode()); return S_OK; } catch (...) @@ -244,11 +262,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LogoffUrl(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LogoffUrl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LogoffUrl()); return S_OK; } catch (...) @@ -258,11 +277,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthenticationReplyXml(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthenticationReplyXml()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationReplyXml()); return S_OK; } catch (...) @@ -276,11 +296,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EFSpn(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EFSpn(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFSpn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFSpn()); return S_OK; } catch (...) @@ -290,11 +311,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid1(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid1()); return S_OK; } catch (...) @@ -304,11 +326,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid2(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid2()); return S_OK; } catch (...) @@ -322,11 +345,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EFSpn(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EFSpn(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFSpn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFSpn()); return S_OK; } catch (...) @@ -336,11 +360,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid1(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid1()); return S_OK; } catch (...) @@ -350,11 +375,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid2(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid2()); return S_OK; } catch (...) @@ -368,11 +394,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EFOns(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EFOns(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFOns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFOns()); return S_OK; } catch (...) @@ -382,11 +409,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_EFSpn(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFSpn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFSpn()); return S_OK; } catch (...) @@ -396,11 +424,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid1(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid1()); return S_OK; } catch (...) @@ -410,11 +439,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid2(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid2()); return S_OK; } catch (...) @@ -428,11 +458,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EFSpn(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EFSpn(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFSpn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFSpn()); return S_OK; } catch (...) @@ -442,11 +473,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_EFOpl(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFOpl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFOpl()); return S_OK; } catch (...) @@ -456,11 +488,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_EFPnn(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EFPnn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EFPnn()); return S_OK; } catch (...) @@ -470,11 +503,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid1(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid1()); return S_OK; } catch (...) @@ -484,11 +518,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Gid2(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Gid2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gid2()); return S_OK; } catch (...) @@ -502,11 +537,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -520,7 +556,8 @@ struct produceshim().ServiceProviderGuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceProviderGuid()); return S_OK; } catch (...) @@ -529,11 +566,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceProviderName()); return S_OK; } catch (...) @@ -543,11 +581,12 @@ struct produce network) noexcept override + HRESULT __stdcall get_CurrentNetwork(impl::abi_arg_out network) noexcept override { try { - *network = detach(this->shim().CurrentNetwork()); + typename D::abi_guard guard(this->shim()); + *network = detach_abi(this->shim().CurrentNetwork()); return S_OK; } catch (...) @@ -557,11 +596,12 @@ struct produce deviceInformation) noexcept override + HRESULT __stdcall get_CurrentDeviceInformation(impl::abi_arg_out deviceInformation) noexcept override { try { - *deviceInformation = detach(this->shim().CurrentDeviceInformation()); + typename D::abi_guard guard(this->shim()); + *deviceInformation = detach_abi(this->shim().CurrentDeviceInformation()); return S_OK; } catch (...) @@ -575,11 +615,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetConnectionProfiles(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetConnectionProfiles(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetConnectionProfiles()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetConnectionProfiles()); return S_OK; } catch (...) @@ -593,11 +634,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -611,11 +653,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AvailableNetworkAccountIds(abi_arg_out> ppAccountIds) noexcept override + HRESULT __stdcall get_AvailableNetworkAccountIds(impl::abi_arg_out> ppAccountIds) noexcept override { try { - *ppAccountIds = detach(this->shim().AvailableNetworkAccountIds()); + typename D::abi_guard guard(this->shim()); + *ppAccountIds = detach_abi(this->shim().AvailableNetworkAccountIds()); return S_OK; } catch (...) @@ -625,11 +668,12 @@ struct produce networkAccountId, abi_arg_out ppAccount) noexcept override + HRESULT __stdcall abi_CreateFromNetworkAccountId(impl::abi_arg_in networkAccountId, impl::abi_arg_out ppAccount) noexcept override { try { - *ppAccount = detach(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *ppAccount = detach_abi(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -643,11 +687,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -661,7 +706,8 @@ struct produceshim().HasDeviceInformationChanged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasDeviceInformationChanged()); return S_OK; } catch (...) @@ -674,7 +720,8 @@ struct produceshim().HasNetworkChanged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNetworkChanged()); return S_OK; } catch (...) @@ -687,11 +734,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_AccountAdded(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AccountAdded(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AccountAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AccountAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -704,6 +752,7 @@ struct produceshim()); this->shim().AccountAdded(cookie); return S_OK; } @@ -713,11 +762,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AccountUpdated(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AccountUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AccountUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -730,6 +780,7 @@ struct produceshim()); this->shim().AccountUpdated(cookie); return S_OK; } @@ -739,11 +790,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AccountRemoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AccountRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AccountRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -756,6 +808,7 @@ struct produceshim()); this->shim().AccountRemoved(cookie); return S_OK; } @@ -765,11 +818,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -782,6 +836,7 @@ struct produceshim()); this->shim().EnumerationCompleted(cookie); return S_OK; } @@ -791,11 +846,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -808,6 +864,7 @@ struct produceshim()); this->shim().Stopped(cookie); return S_OK; } @@ -821,7 +878,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -834,6 +892,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -847,6 +906,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -864,7 +924,8 @@ struct produceshim().NetworkDeviceStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkDeviceStatus()); return S_OK; } catch (...) @@ -873,11 +934,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Manufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Manufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manufacturer()); return S_OK; } catch (...) @@ -887,11 +949,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Model(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Model()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Model()); return S_OK; } catch (...) @@ -901,11 +964,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FirmwareInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirmwareInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirmwareInformation()); return S_OK; } catch (...) @@ -919,7 +983,8 @@ struct produceshim().CellularClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CellularClass()); return S_OK; } catch (...) @@ -932,7 +997,8 @@ struct produceshim().DataClasses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataClasses()); return S_OK; } catch (...) @@ -941,11 +1007,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CustomDataClass(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomDataClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomDataClass()); return S_OK; } catch (...) @@ -955,11 +1022,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MobileEquipmentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MobileEquipmentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MobileEquipmentId()); return S_OK; } catch (...) @@ -969,11 +1037,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TelephoneNumbers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TelephoneNumbers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TelephoneNumbers()); return S_OK; } catch (...) @@ -983,11 +1052,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SubscriberId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubscriberId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubscriberId()); return S_OK; } catch (...) @@ -997,11 +1067,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SimIccId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SimIccId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SimIccId()); return S_OK; } catch (...) @@ -1015,7 +1086,8 @@ struct produceshim().DeviceType()); + typename D::abi_guard guard(this->shim()); + *pDeviceType = detach_abi(this->shim().DeviceType()); return S_OK; } catch (...) @@ -1024,11 +1096,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1042,7 +1115,8 @@ struct produceshim().CurrentRadioState()); + typename D::abi_guard guard(this->shim()); + *pCurrentState = detach_abi(this->shim().CurrentRadioState()); return S_OK; } catch (...) @@ -1055,11 +1129,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PinManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_PinManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PinManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinManager()); return S_OK; } catch (...) @@ -1069,11 +1144,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Revision(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Revision()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Revision()); return S_OK; } catch (...) @@ -1083,11 +1159,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SerialNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SerialNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerialNumber()); return S_OK; } catch (...) @@ -1105,7 +1182,8 @@ struct produceshim().DeviceServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceServiceId()); return S_OK; } catch (...) @@ -1114,11 +1192,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedCommands()); return S_OK; } catch (...) @@ -1128,11 +1207,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_OpenDataSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenDataSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenDataSession()); return S_OK; } catch (...) @@ -1142,11 +1222,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_OpenCommandSession(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenCommandSession()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenCommandSession()); return S_OK; } catch (...) @@ -1164,7 +1245,8 @@ struct produceshim().StatusCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatusCode()); return S_OK; } catch (...) @@ -1173,11 +1255,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResponseData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResponseData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseData()); return S_OK; } catch (...) @@ -1191,11 +1274,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SendQueryCommandAsync(uint32_t commandId, abi_arg_in data, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_SendQueryCommandAsync(uint32_t commandId, impl::abi_arg_in data, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SendQueryCommandAsync(commandId, *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SendQueryCommandAsync(commandId, *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1205,11 +1289,12 @@ struct produce data, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_SendSetCommandAsync(uint32_t commandId, impl::abi_arg_in data, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SendSetCommandAsync(commandId, *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SendSetCommandAsync(commandId, *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1223,6 +1308,7 @@ struct produceshim()); this->shim().CloseSession(); return S_OK; } @@ -1236,11 +1322,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ReceivedData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReceivedData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReceivedData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReceivedData()); return S_OK; } catch (...) @@ -1254,11 +1341,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_WriteDataAsync(abi_arg_in value, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_WriteDataAsync(impl::abi_arg_in value, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().WriteDataAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().WriteDataAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -1272,6 +1360,7 @@ struct produceshim()); this->shim().CloseSession(); return S_OK; } @@ -1281,11 +1370,12 @@ struct produce> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_DataReceived(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().DataReceived(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().DataReceived(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1298,6 +1388,7 @@ struct produceshim()); this->shim().DataReceived(eventCookie); return S_OK; } @@ -1315,7 +1406,8 @@ struct produceshim().DeviceServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceServiceId()); return S_OK; } catch (...) @@ -1328,7 +1420,8 @@ struct produceshim().IsDataReadSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataReadSupported()); return S_OK; } catch (...) @@ -1341,7 +1434,8 @@ struct produceshim().IsDataWriteSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataWriteSupported()); return S_OK; } catch (...) @@ -1354,11 +1448,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1372,7 +1467,8 @@ struct produceshim().DeviceServiceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceServiceId()); return S_OK; } catch (...) @@ -1381,11 +1477,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReceivedData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReceivedData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReceivedData()); return S_OK; } catch (...) @@ -1399,11 +1496,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CurrentAccount(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentAccount()); return S_OK; } catch (...) @@ -1413,11 +1511,12 @@ struct produce } } - HRESULT __stdcall get_DeviceInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceInformation()); return S_OK; } catch (...) @@ -1431,7 +1530,8 @@ struct produce { try { - *value = detach(this->shim().MaxDeviceServiceCommandSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDeviceServiceCommandSizeInBytes()); return S_OK; } catch (...) @@ -1444,7 +1544,8 @@ struct produce { try { - *value = detach(this->shim().MaxDeviceServiceDataSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDeviceServiceDataSizeInBytes()); return S_OK; } catch (...) @@ -1453,11 +1554,12 @@ struct produce } } - HRESULT __stdcall get_DeviceServices(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DeviceServices(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeviceServices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceServices()); return S_OK; } catch (...) @@ -1467,11 +1569,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeviceService(GUID deviceServiceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceService(GUID deviceServiceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceService(deviceServiceId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceService(deviceServiceId)); return S_OK; } catch (...) @@ -1485,7 +1588,8 @@ struct produce { try { - *value = detach(this->shim().IsResetSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsResetSupported()); return S_OK; } catch (...) @@ -1494,11 +1598,12 @@ struct produce } } - HRESULT __stdcall abi_ResetAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ResetAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ResetAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ResetAsync()); return S_OK; } catch (...) @@ -1508,11 +1613,12 @@ struct produce } } - HRESULT __stdcall abi_GetCurrentConfigurationAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetCurrentConfigurationAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetCurrentConfigurationAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetCurrentConfigurationAsync()); return S_OK; } catch (...) @@ -1522,11 +1628,12 @@ struct produce } } - HRESULT __stdcall get_CurrentNetwork(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentNetwork(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentNetwork()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentNetwork()); return S_OK; } catch (...) @@ -1540,11 +1647,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Uicc(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uicc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uicc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uicc()); return S_OK; } catch (...) @@ -1554,11 +1662,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HomeProviderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeProviderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeProviderId()); return S_OK; } catch (...) @@ -1568,11 +1677,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HomeProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeProviderName()); return S_OK; } catch (...) @@ -1586,11 +1696,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -1600,11 +1711,12 @@ struct produce deviceId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in deviceId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1614,11 +1726,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -1632,11 +1745,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkAdapter(abi_arg_out value) noexcept override + HRESULT __stdcall get_NetworkAdapter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAdapter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAdapter()); return S_OK; } catch (...) @@ -1650,7 +1764,8 @@ struct produceshim().NetworkRegistrationState()); + typename D::abi_guard guard(this->shim()); + *registrationState = detach_abi(this->shim().NetworkRegistrationState()); return S_OK; } catch (...) @@ -1663,7 +1778,8 @@ struct produceshim().RegistrationNetworkError()); + typename D::abi_guard guard(this->shim()); + *networkError = detach_abi(this->shim().RegistrationNetworkError()); return S_OK; } catch (...) @@ -1676,7 +1792,8 @@ struct produceshim().PacketAttachNetworkError()); + typename D::abi_guard guard(this->shim()); + *networkError = detach_abi(this->shim().PacketAttachNetworkError()); return S_OK; } catch (...) @@ -1689,7 +1806,8 @@ struct produceshim().ActivationNetworkError()); + typename D::abi_guard guard(this->shim()); + *networkError = detach_abi(this->shim().ActivationNetworkError()); return S_OK; } catch (...) @@ -1698,11 +1816,12 @@ struct produce apn) noexcept override + HRESULT __stdcall get_AccessPointName(impl::abi_arg_out apn) noexcept override { try { - *apn = detach(this->shim().AccessPointName()); + typename D::abi_guard guard(this->shim()); + *apn = detach_abi(this->shim().AccessPointName()); return S_OK; } catch (...) @@ -1716,7 +1835,8 @@ struct produceshim().RegisteredDataClass()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegisteredDataClass()); return S_OK; } catch (...) @@ -1725,11 +1845,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RegisteredProviderId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RegisteredProviderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegisteredProviderId()); return S_OK; } catch (...) @@ -1739,11 +1860,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RegisteredProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RegisteredProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegisteredProviderName()); return S_OK; } catch (...) @@ -1757,6 +1879,7 @@ struct produceshim()); this->shim().ShowConnectionUI(); return S_OK; } @@ -1770,11 +1893,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetVoiceCallSupportAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetVoiceCallSupportAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetVoiceCallSupportAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetVoiceCallSupportAsync()); return S_OK; } catch (...) @@ -1784,11 +1908,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_RegistrationUiccApps(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RegistrationUiccApps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegistrationUiccApps()); return S_OK; } catch (...) @@ -1802,11 +1927,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1816,11 +1942,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Network(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Network()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Network()); return S_OK; } catch (...) @@ -1834,11 +1961,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NetworkRegistrationStateChanges(abi_arg_out> value) noexcept override + HRESULT __stdcall get_NetworkRegistrationStateChanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NetworkRegistrationStateChanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkRegistrationStateChanges()); return S_OK; } catch (...) @@ -1856,7 +1984,8 @@ struct produce : { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1869,7 +1998,8 @@ struct produce : { try { - *value = detach(this->shim().LockState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockState()); return S_OK; } catch (...) @@ -1882,7 +2012,8 @@ struct produce : { try { - *value = detach(this->shim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -1895,7 +2026,8 @@ struct produce : { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -1908,7 +2040,8 @@ struct produce : { try { - *value = detach(this->shim().MaxLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLength()); return S_OK; } catch (...) @@ -1921,7 +2054,8 @@ struct produce : { try { - *value = detach(this->shim().MinLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinLength()); return S_OK; } catch (...) @@ -1934,7 +2068,8 @@ struct produce : { try { - *value = detach(this->shim().AttemptsRemaining()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttemptsRemaining()); return S_OK; } catch (...) @@ -1943,11 +2078,12 @@ struct produce : } } - HRESULT __stdcall abi_EnableAsync(abi_arg_in currentPin, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_EnableAsync(impl::abi_arg_in currentPin, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().EnableAsync(*reinterpret_cast(¤tPin))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().EnableAsync(*reinterpret_cast(¤tPin))); return S_OK; } catch (...) @@ -1957,11 +2093,12 @@ struct produce : } } - HRESULT __stdcall abi_DisableAsync(abi_arg_in currentPin, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_DisableAsync(impl::abi_arg_in currentPin, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().DisableAsync(*reinterpret_cast(¤tPin))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().DisableAsync(*reinterpret_cast(¤tPin))); return S_OK; } catch (...) @@ -1971,11 +2108,12 @@ struct produce : } } - HRESULT __stdcall abi_EnterAsync(abi_arg_in currentPin, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_EnterAsync(impl::abi_arg_in currentPin, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().EnterAsync(*reinterpret_cast(¤tPin))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().EnterAsync(*reinterpret_cast(¤tPin))); return S_OK; } catch (...) @@ -1985,11 +2123,12 @@ struct produce : } } - HRESULT __stdcall abi_ChangeAsync(abi_arg_in currentPin, abi_arg_in newPin, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_ChangeAsync(impl::abi_arg_in currentPin, impl::abi_arg_in newPin, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ChangeAsync(*reinterpret_cast(¤tPin), *reinterpret_cast(&newPin))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ChangeAsync(*reinterpret_cast(¤tPin), *reinterpret_cast(&newPin))); return S_OK; } catch (...) @@ -1999,11 +2138,12 @@ struct produce : } } - HRESULT __stdcall abi_UnblockAsync(abi_arg_in pinUnblockKey, abi_arg_in newPin, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_UnblockAsync(impl::abi_arg_in pinUnblockKey, impl::abi_arg_in newPin, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().UnblockAsync(*reinterpret_cast(&pinUnblockKey), *reinterpret_cast(&newPin))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().UnblockAsync(*reinterpret_cast(&pinUnblockKey), *reinterpret_cast(&newPin))); return S_OK; } catch (...) @@ -2017,11 +2157,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2035,7 +2176,8 @@ struct produceshim().PinType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinType()); return S_OK; } catch (...) @@ -2048,7 +2190,8 @@ struct produceshim().PinLockState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinLockState()); return S_OK; } catch (...) @@ -2061,11 +2204,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PinLockStateChanges(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PinLockStateChanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PinLockStateChanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PinLockStateChanges()); return S_OK; } catch (...) @@ -2079,11 +2223,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SupportedPins(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedPins(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedPins()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedPins()); return S_OK; } catch (...) @@ -2093,11 +2238,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetPin(Windows::Networking::NetworkOperators::MobileBroadbandPinType pinType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetPin(pinType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPin(pinType)); return S_OK; } catch (...) @@ -2115,7 +2261,8 @@ struct produceshim().IsSuccessful()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuccessful()); return S_OK; } catch (...) @@ -2128,7 +2275,8 @@ struct produceshim().AttemptsRemaining()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttemptsRemaining()); return S_OK; } catch (...) @@ -2141,11 +2289,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2159,7 +2308,8 @@ struct produceshim().RadioState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RadioState()); return S_OK; } catch (...) @@ -2172,11 +2322,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RadioStateChanges(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RadioStateChanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RadioStateChanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RadioStateChanges()); return S_OK; } catch (...) @@ -2190,11 +2341,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SimIccId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SimIccId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SimIccId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SimIccId()); return S_OK; } catch (...) @@ -2204,11 +2356,12 @@ struct produce : } } - HRESULT __stdcall abi_GetUiccAppsAsync(abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetUiccAppsAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetUiccAppsAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetUiccAppsAsync()); return S_OK; } catch (...) @@ -2222,11 +2375,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2240,7 +2394,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -2249,11 +2404,12 @@ struct produce> uiccFilePath, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetRecordDetailsAsync(impl::abi_arg_in> uiccFilePath, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetRecordDetailsAsync(*reinterpret_cast *>(&uiccFilePath))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetRecordDetailsAsync(*reinterpret_cast *>(&uiccFilePath))); return S_OK; } catch (...) @@ -2263,11 +2419,12 @@ struct produce> uiccFilePath, int32_t recordIndex, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_ReadRecordAsync(impl::abi_arg_in> uiccFilePath, int32_t recordIndex, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ReadRecordAsync(*reinterpret_cast *>(&uiccFilePath), recordIndex)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ReadRecordAsync(*reinterpret_cast *>(&uiccFilePath), recordIndex)); return S_OK; } catch (...) @@ -2285,7 +2442,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2294,11 +2452,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -2316,7 +2475,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2329,7 +2489,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -2342,7 +2503,8 @@ struct produceshim().RecordCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordCount()); return S_OK; } catch (...) @@ -2355,7 +2517,8 @@ struct produceshim().RecordSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordSize()); return S_OK; } catch (...) @@ -2368,7 +2531,8 @@ struct produceshim().ReadAccessCondition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadAccessCondition()); return S_OK; } catch (...) @@ -2381,7 +2545,8 @@ struct produceshim().WriteAccessCondition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WriteAccessCondition()); return S_OK; } catch (...) @@ -2398,7 +2563,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2407,11 +2573,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_UiccApps(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UiccApps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UiccApps()); return S_OK; } catch (...) @@ -2429,7 +2596,8 @@ struct produceshim().NotificationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotificationType()); return S_OK; } catch (...) @@ -2438,11 +2606,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NetworkAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NetworkAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkAccountId()); return S_OK; } catch (...) @@ -2456,7 +2625,8 @@ struct produceshim().EncodingType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodingType()); return S_OK; } catch (...) @@ -2465,11 +2635,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -2479,11 +2650,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RuleId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RuleId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RuleId()); return S_OK; } catch (...) @@ -2493,11 +2665,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SmsMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmsMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmsMessage()); return S_OK; } catch (...) @@ -2511,11 +2684,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Ssid(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ssid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ssid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ssid()); return S_OK; } catch (...) @@ -2525,10 +2699,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Ssid(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ssid(*reinterpret_cast(&value)); return S_OK; } @@ -2538,11 +2713,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Passphrase(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Passphrase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Passphrase()); return S_OK; } catch (...) @@ -2552,10 +2728,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Passphrase(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Passphrase(*reinterpret_cast(&value)); return S_OK; } @@ -2569,11 +2746,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MacAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_MacAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MacAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MacAddress()); return S_OK; } catch (...) @@ -2583,11 +2761,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_HostNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().HostNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostNames()); return S_OK; } catch (...) @@ -2601,11 +2780,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetTetheringClients(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetTetheringClients(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetTetheringClients()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTetheringClients()); return S_OK; } catch (...) @@ -2619,10 +2799,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AuthorizeTethering(bool allow, abi_arg_in entitlementFailureReason) noexcept override + HRESULT __stdcall abi_AuthorizeTethering(bool allow, impl::abi_arg_in entitlementFailureReason) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthorizeTethering(allow, *reinterpret_cast(&entitlementFailureReason)); return S_OK; } @@ -2640,7 +2821,8 @@ struct produceshim().MaxClientCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxClientCount()); return S_OK; } catch (...) @@ -2653,7 +2835,8 @@ struct produceshim().ClientCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientCount()); return S_OK; } catch (...) @@ -2666,7 +2849,8 @@ struct produceshim().TetheringOperationalState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TetheringOperationalState()); return S_OK; } catch (...) @@ -2675,11 +2859,12 @@ struct produce configuration) noexcept override + HRESULT __stdcall abi_GetCurrentAccessPointConfiguration(impl::abi_arg_out configuration) noexcept override { try { - *configuration = detach(this->shim().GetCurrentAccessPointConfiguration()); + typename D::abi_guard guard(this->shim()); + *configuration = detach_abi(this->shim().GetCurrentAccessPointConfiguration()); return S_OK; } catch (...) @@ -2689,11 +2874,12 @@ struct produce configuration, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ConfigureAccessPointAsync(impl::abi_arg_in configuration, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ConfigureAccessPointAsync(*reinterpret_cast(&configuration))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ConfigureAccessPointAsync(*reinterpret_cast(&configuration))); return S_OK; } catch (...) @@ -2703,11 +2889,12 @@ struct produce> asyncInfo) noexcept override + HRESULT __stdcall abi_StartTetheringAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StartTetheringAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StartTetheringAsync()); return S_OK; } catch (...) @@ -2717,11 +2904,12 @@ struct produce> asyncInfo) noexcept override + HRESULT __stdcall abi_StopTetheringAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().StopTetheringAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().StopTetheringAsync()); return S_OK; } catch (...) @@ -2735,11 +2923,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetTetheringCapability(abi_arg_in networkAccountId, Windows::Networking::NetworkOperators::TetheringCapability * value) noexcept override + HRESULT __stdcall abi_GetTetheringCapability(impl::abi_arg_in networkAccountId, Windows::Networking::NetworkOperators::TetheringCapability * value) noexcept override { try { - *value = detach(this->shim().GetTetheringCapability(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTetheringCapability(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -2748,11 +2937,12 @@ struct produce networkAccountId, abi_arg_out ppManager) noexcept override + HRESULT __stdcall abi_CreateFromNetworkAccountId(impl::abi_arg_in networkAccountId, impl::abi_arg_out ppManager) noexcept override { try { - *ppManager = detach(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *ppManager = detach_abi(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -2766,11 +2956,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetTetheringCapabilityFromConnectionProfile(abi_arg_in profile, Windows::Networking::NetworkOperators::TetheringCapability * result) noexcept override + HRESULT __stdcall abi_GetTetheringCapabilityFromConnectionProfile(impl::abi_arg_in profile, Windows::Networking::NetworkOperators::TetheringCapability * result) noexcept override { try { - *result = detach(this->shim().GetTetheringCapabilityFromConnectionProfile(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTetheringCapabilityFromConnectionProfile(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -2779,11 +2970,12 @@ struct produce profile, abi_arg_out ppManager) noexcept override + HRESULT __stdcall abi_CreateFromConnectionProfile(impl::abi_arg_in profile, impl::abi_arg_out ppManager) noexcept override { try { - *ppManager = detach(this->shim().CreateFromConnectionProfile(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *ppManager = detach_abi(this->shim().CreateFromConnectionProfile(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -2797,11 +2989,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateFromConnectionProfileWithTargetAdapter(abi_arg_in profile, abi_arg_in adapter, abi_arg_out ppManager) noexcept override + HRESULT __stdcall abi_CreateFromConnectionProfileWithTargetAdapter(impl::abi_arg_in profile, impl::abi_arg_in adapter, impl::abi_arg_out ppManager) noexcept override { try { - *ppManager = detach(this->shim().CreateFromConnectionProfile(*reinterpret_cast(&profile), *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *ppManager = detach_abi(this->shim().CreateFromConnectionProfile(*reinterpret_cast(&profile), *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -2819,7 +3012,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2828,11 +3022,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AdditionalErrorMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdditionalErrorMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalErrorMessage()); return S_OK; } catch (...) @@ -2850,7 +3045,8 @@ struct produceshim().AllElementsProvisioned()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllElementsProvisioned()); return S_OK; } catch (...) @@ -2859,11 +3055,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProvisionResultsXml(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProvisionResultsXml()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProvisionResultsXml()); return S_OK; } catch (...) @@ -2881,6 +3078,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateCost(value); return S_OK; } @@ -2890,10 +3088,11 @@ struct produce : } } - HRESULT __stdcall abi_UpdateUsage(abi_arg_in value) noexcept override + HRESULT __stdcall abi_UpdateUsage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateUsage(*reinterpret_cast(&value)); return S_OK; } @@ -2907,11 +3106,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_ProvisionFromXmlDocumentAsync(abi_arg_in provisioningXmlDocument, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_ProvisionFromXmlDocumentAsync(impl::abi_arg_in provisioningXmlDocument, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ProvisionFromXmlDocumentAsync(*reinterpret_cast(&provisioningXmlDocument))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ProvisionFromXmlDocumentAsync(*reinterpret_cast(&provisioningXmlDocument))); return S_OK; } catch (...) @@ -2921,11 +3121,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetProvisionedProfile(Windows::Networking::NetworkOperators::ProfileMediaType mediaType, abi_arg_in profileName, abi_arg_out provisionedProfile) noexcept override + HRESULT __stdcall abi_GetProvisionedProfile(Windows::Networking::NetworkOperators::ProfileMediaType mediaType, impl::abi_arg_in profileName, impl::abi_arg_out provisionedProfile) noexcept override { try { - *provisionedProfile = detach(this->shim().GetProvisionedProfile(mediaType, *reinterpret_cast(&profileName))); + typename D::abi_guard guard(this->shim()); + *provisionedProfile = detach_abi(this->shim().GetProvisionedProfile(mediaType, *reinterpret_cast(&profileName))); return S_OK; } catch (...) @@ -2939,11 +3140,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromNetworkAccountId(abi_arg_in networkAccountId, abi_arg_out provisioningAgent) noexcept override + HRESULT __stdcall abi_CreateFromNetworkAccountId(impl::abi_arg_in networkAccountId, impl::abi_arg_out provisioningAgent) noexcept override { try { - *provisioningAgent = detach(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *provisioningAgent = detach_abi(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -2961,7 +3163,8 @@ struct produce : produce { try { - *value = detach(this->shim().DataCodingScheme()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataCodingScheme()); return S_OK; } catch (...) @@ -2974,6 +3177,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DataCodingScheme(value); return S_OK; } @@ -2983,11 +3187,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetPayload(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetPayload(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().GetPayload()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().GetPayload()); return S_OK; } catch (...) @@ -2998,11 +3203,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SetPayload(uint32_t __valueSize, abi_arg_in * value) noexcept override + HRESULT __stdcall abi_SetPayload(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().SetPayload(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().SetPayload(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -3011,11 +3217,12 @@ struct produce : produce } } - HRESULT __stdcall get_PayloadAsText(abi_arg_out value) noexcept override + HRESULT __stdcall get_PayloadAsText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PayloadAsText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PayloadAsText()); return S_OK; } catch (...) @@ -3025,10 +3232,11 @@ struct produce : produce } } - HRESULT __stdcall put_PayloadAsText(abi_arg_in value) noexcept override + HRESULT __stdcall put_PayloadAsText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PayloadAsText(*reinterpret_cast(&value)); return S_OK; } @@ -3042,11 +3250,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateMessage(abi_arg_in messageText, abi_arg_out ussdMessage) noexcept override + HRESULT __stdcall abi_CreateMessage(impl::abi_arg_in messageText, impl::abi_arg_out ussdMessage) noexcept override { try { - *ussdMessage = detach(this->shim().CreateMessage(*reinterpret_cast(&messageText))); + typename D::abi_guard guard(this->shim()); + *ussdMessage = detach_abi(this->shim().CreateMessage(*reinterpret_cast(&messageText))); return S_OK; } catch (...) @@ -3064,7 +3273,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ResultCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResultCode()); return S_OK; } catch (...) @@ -3073,11 +3283,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -3091,11 +3302,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_SendMessageAndGetReplyAsync(abi_arg_in message, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_SendMessageAndGetReplyAsync(impl::abi_arg_in message, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SendMessageAndGetReplyAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SendMessageAndGetReplyAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -3109,6 +3321,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Close(); return S_OK; } @@ -3122,11 +3335,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromNetworkAccountId(abi_arg_in networkAccountId, abi_arg_out ussdSession) noexcept override + HRESULT __stdcall abi_CreateFromNetworkAccountId(impl::abi_arg_in networkAccountId, impl::abi_arg_out ussdSession) noexcept override { try { - *ussdSession = detach(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *ussdSession = detach_abi(this->shim().CreateFromNetworkAccountId(*reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -3136,11 +3350,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateFromNetworkInterfaceId(abi_arg_in networkInterfaceId, abi_arg_out ussdSession) noexcept override + HRESULT __stdcall abi_CreateFromNetworkInterfaceId(impl::abi_arg_in networkInterfaceId, impl::abi_arg_out ussdSession) noexcept override { try { - *ussdSession = detach(this->shim().CreateFromNetworkInterfaceId(*reinterpret_cast(&networkInterfaceId))); + typename D::abi_guard guard(this->shim()); + *ussdSession = detach_abi(this->shim().CreateFromNetworkInterfaceId(*reinterpret_cast(&networkInterfaceId))); return S_OK; } catch (...) @@ -3158,435 +3373,435 @@ namespace Windows::Networking::NetworkOperators { template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandAccountStatics::AvailableNetworkAccountIds() const { Windows::Foundation::Collections::IVectorView ppAccountIds; - check_hresult(static_cast(static_cast(*this))->get_AvailableNetworkAccountIds(put(ppAccountIds))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountStatics)->get_AvailableNetworkAccountIds(put_abi(ppAccountIds))); return ppAccountIds; } -template Windows::Networking::NetworkOperators::MobileBroadbandAccount impl_IMobileBroadbandAccountStatics::CreateFromNetworkAccountId(hstring_ref networkAccountId) const +template Windows::Networking::NetworkOperators::MobileBroadbandAccount impl_IMobileBroadbandAccountStatics::CreateFromNetworkAccountId(hstring_view networkAccountId) const { Windows::Networking::NetworkOperators::MobileBroadbandAccount ppAccount { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromNetworkAccountId(get(networkAccountId), put(ppAccount))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountStatics)->abi_CreateFromNetworkAccountId(get_abi(networkAccountId), put_abi(ppAccount))); return ppAccount; } template hstring impl_IMobileBroadbandAccount::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount)->get_NetworkAccountId(put_abi(value))); return value; } template GUID impl_IMobileBroadbandAccount::ServiceProviderGuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceProviderGuid(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount)->get_ServiceProviderGuid(&value)); return value; } template hstring impl_IMobileBroadbandAccount::ServiceProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceProviderName(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount)->get_ServiceProviderName(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandNetwork impl_IMobileBroadbandAccount::CurrentNetwork() const { Windows::Networking::NetworkOperators::MobileBroadbandNetwork network { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentNetwork(put(network))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount)->get_CurrentNetwork(put_abi(network))); return network; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceInformation impl_IMobileBroadbandAccount::CurrentDeviceInformation() const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceInformation deviceInformation { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentDeviceInformation(put(deviceInformation))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount)->get_CurrentDeviceInformation(put_abi(deviceInformation))); return deviceInformation; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandAccount2::GetConnectionProfiles() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetConnectionProfiles(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccount2)->abi_GetConnectionProfiles(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::NetworkDeviceStatus impl_IMobileBroadbandDeviceInformation::NetworkDeviceStatus() const { Windows::Networking::NetworkOperators::NetworkDeviceStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkDeviceStatus(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_NetworkDeviceStatus(&value)); return value; } template hstring impl_IMobileBroadbandDeviceInformation::Manufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Manufacturer(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_Manufacturer(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation::Model() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Model(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_Model(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation::FirmwareInformation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirmwareInformation(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_FirmwareInformation(put_abi(value))); return value; } template Windows::Devices::Sms::CellularClass impl_IMobileBroadbandDeviceInformation::CellularClass() const { Windows::Devices::Sms::CellularClass value {}; - check_hresult(static_cast(static_cast(*this))->get_CellularClass(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_CellularClass(&value)); return value; } template Windows::Networking::NetworkOperators::DataClasses impl_IMobileBroadbandDeviceInformation::DataClasses() const { Windows::Networking::NetworkOperators::DataClasses value {}; - check_hresult(static_cast(static_cast(*this))->get_DataClasses(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_DataClasses(&value)); return value; } template hstring impl_IMobileBroadbandDeviceInformation::CustomDataClass() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomDataClass(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_CustomDataClass(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation::MobileEquipmentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MobileEquipmentId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_MobileEquipmentId(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandDeviceInformation::TelephoneNumbers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_TelephoneNumbers(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_TelephoneNumbers(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation::SubscriberId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubscriberId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_SubscriberId(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation::SimIccId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SimIccId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_SimIccId(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceType impl_IMobileBroadbandDeviceInformation::DeviceType() const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceType pDeviceType {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceType(&pDeviceType)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_DeviceType(&pDeviceType)); return pDeviceType; } template hstring impl_IMobileBroadbandDeviceInformation::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_DeviceId(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandRadioState impl_IMobileBroadbandDeviceInformation::CurrentRadioState() const { Windows::Networking::NetworkOperators::MobileBroadbandRadioState pCurrentState {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentRadioState(&pCurrentState)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation)->get_CurrentRadioState(&pCurrentState)); return pCurrentState; } template Windows::Networking::NetworkOperators::MobileBroadbandPinManager impl_IMobileBroadbandDeviceInformation2::PinManager() const { Windows::Networking::NetworkOperators::MobileBroadbandPinManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PinManager(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation2)->get_PinManager(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation2::Revision() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Revision(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation2)->get_Revision(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceInformation2::SerialNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SerialNumber(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceInformation2)->get_SerialNumber(put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkAdapter impl_IMobileBroadbandNetwork::NetworkAdapter() const { Windows::Networking::Connectivity::NetworkAdapter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapter(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_NetworkAdapter(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::NetworkRegistrationState impl_IMobileBroadbandNetwork::NetworkRegistrationState() const { Windows::Networking::NetworkOperators::NetworkRegistrationState registrationState {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkRegistrationState(®istrationState)); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_NetworkRegistrationState(®istrationState)); return registrationState; } template uint32_t impl_IMobileBroadbandNetwork::RegistrationNetworkError() const { uint32_t networkError {}; - check_hresult(static_cast(static_cast(*this))->get_RegistrationNetworkError(&networkError)); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_RegistrationNetworkError(&networkError)); return networkError; } template uint32_t impl_IMobileBroadbandNetwork::PacketAttachNetworkError() const { uint32_t networkError {}; - check_hresult(static_cast(static_cast(*this))->get_PacketAttachNetworkError(&networkError)); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_PacketAttachNetworkError(&networkError)); return networkError; } template uint32_t impl_IMobileBroadbandNetwork::ActivationNetworkError() const { uint32_t networkError {}; - check_hresult(static_cast(static_cast(*this))->get_ActivationNetworkError(&networkError)); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_ActivationNetworkError(&networkError)); return networkError; } template hstring impl_IMobileBroadbandNetwork::AccessPointName() const { hstring apn; - check_hresult(static_cast(static_cast(*this))->get_AccessPointName(put(apn))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_AccessPointName(put_abi(apn))); return apn; } template Windows::Networking::NetworkOperators::DataClasses impl_IMobileBroadbandNetwork::RegisteredDataClass() const { Windows::Networking::NetworkOperators::DataClasses value {}; - check_hresult(static_cast(static_cast(*this))->get_RegisteredDataClass(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_RegisteredDataClass(&value)); return value; } template hstring impl_IMobileBroadbandNetwork::RegisteredProviderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RegisteredProviderId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_RegisteredProviderId(put_abi(value))); return value; } template hstring impl_IMobileBroadbandNetwork::RegisteredProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RegisteredProviderName(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->get_RegisteredProviderName(put_abi(value))); return value; } template void impl_IMobileBroadbandNetwork::ShowConnectionUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowConnectionUI()); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork)->abi_ShowConnectionUI()); } template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandNetwork2::GetVoiceCallSupportAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetVoiceCallSupportAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork2)->abi_GetVoiceCallSupportAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandNetwork2::RegistrationUiccApps() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RegistrationUiccApps(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetwork2)->get_RegistrationUiccApps(put_abi(value))); return value; } template hstring impl_INetworkOperatorTetheringAccessPointConfiguration::Ssid() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ssid(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringAccessPointConfiguration)->get_Ssid(put_abi(value))); return value; } -template void impl_INetworkOperatorTetheringAccessPointConfiguration::Ssid(hstring_ref value) const +template void impl_INetworkOperatorTetheringAccessPointConfiguration::Ssid(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Ssid(get(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringAccessPointConfiguration)->put_Ssid(get_abi(value))); } template hstring impl_INetworkOperatorTetheringAccessPointConfiguration::Passphrase() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Passphrase(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringAccessPointConfiguration)->get_Passphrase(put_abi(value))); return value; } -template void impl_INetworkOperatorTetheringAccessPointConfiguration::Passphrase(hstring_ref value) const +template void impl_INetworkOperatorTetheringAccessPointConfiguration::Passphrase(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Passphrase(get(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringAccessPointConfiguration)->put_Passphrase(get_abi(value))); } template Windows::Networking::NetworkOperators::TetheringOperationStatus impl_INetworkOperatorTetheringOperationResult::Status() const { Windows::Networking::NetworkOperators::TetheringOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringOperationResult)->get_Status(&value)); return value; } template hstring impl_INetworkOperatorTetheringOperationResult::AdditionalErrorMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalErrorMessage(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringOperationResult)->get_AdditionalErrorMessage(put_abi(value))); return value; } -template Windows::Networking::NetworkOperators::TetheringCapability impl_INetworkOperatorTetheringManagerStatics::GetTetheringCapability(hstring_ref networkAccountId) const +template Windows::Networking::NetworkOperators::TetheringCapability impl_INetworkOperatorTetheringManagerStatics::GetTetheringCapability(hstring_view networkAccountId) const { Windows::Networking::NetworkOperators::TetheringCapability value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetTetheringCapability(get(networkAccountId), &value)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManagerStatics)->abi_GetTetheringCapability(get_abi(networkAccountId), &value)); return value; } -template Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager impl_INetworkOperatorTetheringManagerStatics::CreateFromNetworkAccountId(hstring_ref networkAccountId) const +template Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager impl_INetworkOperatorTetheringManagerStatics::CreateFromNetworkAccountId(hstring_view networkAccountId) const { Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager ppManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromNetworkAccountId(get(networkAccountId), put(ppManager))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManagerStatics)->abi_CreateFromNetworkAccountId(get_abi(networkAccountId), put_abi(ppManager))); return ppManager; } template Windows::Networking::NetworkOperators::TetheringCapability impl_INetworkOperatorTetheringManagerStatics2::GetTetheringCapabilityFromConnectionProfile(const Windows::Networking::Connectivity::ConnectionProfile & profile) const { Windows::Networking::NetworkOperators::TetheringCapability result {}; - check_hresult(static_cast(static_cast(*this))->abi_GetTetheringCapabilityFromConnectionProfile(get(profile), &result)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManagerStatics2)->abi_GetTetheringCapabilityFromConnectionProfile(get_abi(profile), &result)); return result; } template Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager impl_INetworkOperatorTetheringManagerStatics2::CreateFromConnectionProfile(const Windows::Networking::Connectivity::ConnectionProfile & profile) const { Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager ppManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromConnectionProfile(get(profile), put(ppManager))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManagerStatics2)->abi_CreateFromConnectionProfile(get_abi(profile), put_abi(ppManager))); return ppManager; } template Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager impl_INetworkOperatorTetheringManagerStatics3::CreateFromConnectionProfile(const Windows::Networking::Connectivity::ConnectionProfile & profile, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager ppManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromConnectionProfileWithTargetAdapter(get(profile), get(adapter), put(ppManager))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManagerStatics3)->abi_CreateFromConnectionProfileWithTargetAdapter(get_abi(profile), get_abi(adapter), put_abi(ppManager))); return ppManager; } template uint32_t impl_INetworkOperatorTetheringManager::MaxClientCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxClientCount(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->get_MaxClientCount(&value)); return value; } template uint32_t impl_INetworkOperatorTetheringManager::ClientCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ClientCount(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->get_ClientCount(&value)); return value; } template Windows::Networking::NetworkOperators::TetheringOperationalState impl_INetworkOperatorTetheringManager::TetheringOperationalState() const { Windows::Networking::NetworkOperators::TetheringOperationalState value {}; - check_hresult(static_cast(static_cast(*this))->get_TetheringOperationalState(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->get_TetheringOperationalState(&value)); return value; } template Windows::Networking::NetworkOperators::NetworkOperatorTetheringAccessPointConfiguration impl_INetworkOperatorTetheringManager::GetCurrentAccessPointConfiguration() const { Windows::Networking::NetworkOperators::NetworkOperatorTetheringAccessPointConfiguration configuration { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentAccessPointConfiguration(put(configuration))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->abi_GetCurrentAccessPointConfiguration(put_abi(configuration))); return configuration; } template Windows::Foundation::IAsyncAction impl_INetworkOperatorTetheringManager::ConfigureAccessPointAsync(const Windows::Networking::NetworkOperators::NetworkOperatorTetheringAccessPointConfiguration & configuration) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ConfigureAccessPointAsync(get(configuration), put(asyncInfo))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->abi_ConfigureAccessPointAsync(get_abi(configuration), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_INetworkOperatorTetheringManager::StartTetheringAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StartTetheringAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->abi_StartTetheringAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_INetworkOperatorTetheringManager::StopTetheringAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_StopTetheringAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringManager)->abi_StopTetheringAsync(put_abi(asyncInfo))); return asyncInfo; } template hstring impl_INetworkOperatorTetheringClient::MacAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MacAddress(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringClient)->get_MacAddress(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_INetworkOperatorTetheringClient::HostNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_HostNames(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringClient)->get_HostNames(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_INetworkOperatorTetheringClientManager::GetTetheringClients() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetTetheringClients(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringClientManager)->abi_GetTetheringClients(put_abi(value))); return value; } template hstring impl_IMobileBroadbandAccountEventArgs::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountEventArgs)->get_NetworkAccountId(put_abi(value))); return value; } template hstring impl_IMobileBroadbandAccountUpdatedEventArgs::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountUpdatedEventArgs)->get_NetworkAccountId(put_abi(value))); return value; } template bool impl_IMobileBroadbandAccountUpdatedEventArgs::HasDeviceInformationChanged() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasDeviceInformationChanged(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountUpdatedEventArgs)->get_HasDeviceInformationChanged(&value)); return value; } template bool impl_IMobileBroadbandAccountUpdatedEventArgs::HasNetworkChanged() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNetworkChanged(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountUpdatedEventArgs)->get_HasNetworkChanged(&value)); return value; } template event_token impl_IMobileBroadbandAccountWatcher::AccountAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AccountAdded(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->add_AccountAdded(get_abi(handler), &cookie)); return cookie; } @@ -3597,13 +3812,13 @@ template event_revoker impl_IMobile template void impl_IMobileBroadbandAccountWatcher::AccountAdded(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AccountAdded(cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->remove_AccountAdded(cookie)); } template event_token impl_IMobileBroadbandAccountWatcher::AccountUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AccountUpdated(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->add_AccountUpdated(get_abi(handler), &cookie)); return cookie; } @@ -3614,13 +3829,13 @@ template event_revoker impl_IMobile template void impl_IMobileBroadbandAccountWatcher::AccountUpdated(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AccountUpdated(cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->remove_AccountUpdated(cookie)); } template event_token impl_IMobileBroadbandAccountWatcher::AccountRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AccountRemoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->add_AccountRemoved(get_abi(handler), &cookie)); return cookie; } @@ -3631,356 +3846,356 @@ template event_revoker impl_IMobile template void impl_IMobileBroadbandAccountWatcher::AccountRemoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AccountRemoved(cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->remove_AccountRemoved(cookie)); } -template event_token impl_IMobileBroadbandAccountWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMobileBroadbandAccountWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->add_EnumerationCompleted(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMobileBroadbandAccountWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMobileBroadbandAccountWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::NetworkOperators::IMobileBroadbandAccountWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IMobileBroadbandAccountWatcher::EnumerationCompleted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->remove_EnumerationCompleted(cookie)); } -template event_token impl_IMobileBroadbandAccountWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IMobileBroadbandAccountWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->add_Stopped(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IMobileBroadbandAccountWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IMobileBroadbandAccountWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::NetworkOperators::IMobileBroadbandAccountWatcher::remove_Stopped, Stopped(handler)); } template void impl_IMobileBroadbandAccountWatcher::Stopped(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(cookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->remove_Stopped(cookie)); } template Windows::Networking::NetworkOperators::MobileBroadbandAccountWatcherStatus impl_IMobileBroadbandAccountWatcher::Status() const { Windows::Networking::NetworkOperators::MobileBroadbandAccountWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->get_Status(&status)); return status; } template void impl_IMobileBroadbandAccountWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->abi_Start()); } template void impl_IMobileBroadbandAccountWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IMobileBroadbandAccountWatcher)->abi_Stop()); } template hstring impl_IMobileBroadbandModemStatics::GetDeviceSelector() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemStatics)->abi_GetDeviceSelector(put_abi(value))); return value; } -template Windows::Networking::NetworkOperators::MobileBroadbandModem impl_IMobileBroadbandModemStatics::FromId(hstring_ref deviceId) const +template Windows::Networking::NetworkOperators::MobileBroadbandModem impl_IMobileBroadbandModemStatics::FromId(hstring_view deviceId) const { Windows::Networking::NetworkOperators::MobileBroadbandModem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(deviceId), put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemStatics)->abi_FromId(get_abi(deviceId), put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandModem impl_IMobileBroadbandModemStatics::GetDefault() const { Windows::Networking::NetworkOperators::MobileBroadbandModem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemStatics)->abi_GetDefault(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandUicc impl_IMobileBroadbandModemConfiguration::Uicc() const { Windows::Networking::NetworkOperators::MobileBroadbandUicc value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uicc(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemConfiguration)->get_Uicc(put_abi(value))); return value; } template hstring impl_IMobileBroadbandModemConfiguration::HomeProviderId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HomeProviderId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemConfiguration)->get_HomeProviderId(put_abi(value))); return value; } template hstring impl_IMobileBroadbandModemConfiguration::HomeProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HomeProviderName(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModemConfiguration)->get_HomeProviderName(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandAccount impl_IMobileBroadbandModem::CurrentAccount() const { Windows::Networking::NetworkOperators::MobileBroadbandAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentAccount(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_CurrentAccount(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceInformation impl_IMobileBroadbandModem::DeviceInformation() const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DeviceInformation(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_DeviceInformation(put_abi(value))); return value; } template uint32_t impl_IMobileBroadbandModem::MaxDeviceServiceCommandSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDeviceServiceCommandSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_MaxDeviceServiceCommandSizeInBytes(&value)); return value; } template uint32_t impl_IMobileBroadbandModem::MaxDeviceServiceDataSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDeviceServiceDataSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_MaxDeviceServiceDataSizeInBytes(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandModem::DeviceServices() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DeviceServices(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_DeviceServices(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceService impl_IMobileBroadbandModem::GetDeviceService(GUID deviceServiceId) const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceService value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceService(deviceServiceId, put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->abi_GetDeviceService(deviceServiceId, put_abi(value))); return value; } template bool impl_IMobileBroadbandModem::IsResetSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsResetSupported(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_IsResetSupported(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IMobileBroadbandModem::ResetAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ResetAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->abi_ResetAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandModem::GetCurrentConfigurationAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentConfigurationAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->abi_GetCurrentConfigurationAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Networking::NetworkOperators::MobileBroadbandNetwork impl_IMobileBroadbandModem::CurrentNetwork() const { Windows::Networking::NetworkOperators::MobileBroadbandNetwork value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentNetwork(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandModem)->get_CurrentNetwork(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandPinManager::SupportedPins() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedPins(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandPinManager)->get_SupportedPins(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPin impl_IMobileBroadbandPinManager::GetPin(Windows::Networking::NetworkOperators::MobileBroadbandPinType pinType) const { Windows::Networking::NetworkOperators::MobileBroadbandPin value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPin(pinType, put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandPinManager)->abi_GetPin(pinType, put_abi(value))); return value; } template bool impl_IMobileBroadbandPinOperationResult::IsSuccessful() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSuccessful(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPinOperationResult)->get_IsSuccessful(&value)); return value; } template uint32_t impl_IMobileBroadbandPinOperationResult::AttemptsRemaining() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttemptsRemaining(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPinOperationResult)->get_AttemptsRemaining(&value)); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPinType impl_IMobileBroadbandPin::Type() const { Windows::Networking::NetworkOperators::MobileBroadbandPinType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_Type(&value)); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPinLockState impl_IMobileBroadbandPin::LockState() const { Windows::Networking::NetworkOperators::MobileBroadbandPinLockState value {}; - check_hresult(static_cast(static_cast(*this))->get_LockState(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_LockState(&value)); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPinFormat impl_IMobileBroadbandPin::Format() const { Windows::Networking::NetworkOperators::MobileBroadbandPinFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_Format(&value)); return value; } template bool impl_IMobileBroadbandPin::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_Enabled(&value)); return value; } template uint32_t impl_IMobileBroadbandPin::MaxLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLength(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_MaxLength(&value)); return value; } template uint32_t impl_IMobileBroadbandPin::MinLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinLength(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_MinLength(&value)); return value; } template uint32_t impl_IMobileBroadbandPin::AttemptsRemaining() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AttemptsRemaining(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->get_AttemptsRemaining(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::EnableAsync(hstring_ref currentPin) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::EnableAsync(hstring_view currentPin) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_EnableAsync(get(currentPin), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->abi_EnableAsync(get_abi(currentPin), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::DisableAsync(hstring_ref currentPin) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::DisableAsync(hstring_view currentPin) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_DisableAsync(get(currentPin), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->abi_DisableAsync(get_abi(currentPin), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::EnterAsync(hstring_ref currentPin) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::EnterAsync(hstring_view currentPin) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_EnterAsync(get(currentPin), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->abi_EnterAsync(get_abi(currentPin), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::ChangeAsync(hstring_ref currentPin, hstring_ref newPin) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::ChangeAsync(hstring_view currentPin, hstring_view newPin) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ChangeAsync(get(currentPin), get(newPin), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->abi_ChangeAsync(get_abi(currentPin), get_abi(newPin), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::UnblockAsync(hstring_ref pinUnblockKey, hstring_ref newPin) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandPin::UnblockAsync(hstring_view pinUnblockKey, hstring_view newPin) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_UnblockAsync(get(pinUnblockKey), get(newPin), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandPin)->abi_UnblockAsync(get_abi(pinUnblockKey), get_abi(newPin), put_abi(asyncInfo))); return asyncInfo; } template GUID impl_IMobileBroadbandDeviceServiceInformation::DeviceServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceServiceId(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceInformation)->get_DeviceServiceId(&value)); return value; } template bool impl_IMobileBroadbandDeviceServiceInformation::IsDataReadSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDataReadSupported(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceInformation)->get_IsDataReadSupported(&value)); return value; } template bool impl_IMobileBroadbandDeviceServiceInformation::IsDataWriteSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDataWriteSupported(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceInformation)->get_IsDataWriteSupported(&value)); return value; } template GUID impl_IMobileBroadbandDeviceService::DeviceServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceServiceId(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceService)->get_DeviceServiceId(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandDeviceService::SupportedCommands() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedCommands(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceService)->get_SupportedCommands(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceDataSession impl_IMobileBroadbandDeviceService::OpenDataSession() const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceDataSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenDataSession(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceService)->abi_OpenDataSession(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceCommandSession impl_IMobileBroadbandDeviceService::OpenCommandSession() const { Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceCommandSession value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenCommandSession(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceService)->abi_OpenCommandSession(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMobileBroadbandDeviceServiceDataReceivedEventArgs::ReceivedData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ReceivedData(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceDataReceivedEventArgs)->get_ReceivedData(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IMobileBroadbandDeviceServiceDataSession::WriteDataAsync(const Windows::Storage::Streams::IBuffer & value) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_WriteDataAsync(get(value), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceDataSession)->abi_WriteDataAsync(get_abi(value), put_abi(asyncInfo))); return asyncInfo; } template void impl_IMobileBroadbandDeviceServiceDataSession::CloseSession() const { - check_hresult(static_cast(static_cast(*this))->abi_CloseSession()); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceDataSession)->abi_CloseSession()); } template event_token impl_IMobileBroadbandDeviceServiceDataSession::DataReceived(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_DataReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceDataSession)->add_DataReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3991,642 +4206,642 @@ template event_revoker im template void impl_IMobileBroadbandDeviceServiceDataSession::DataReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DataReceived(eventCookie)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceDataSession)->remove_DataReceived(eventCookie)); } template uint32_t impl_IMobileBroadbandDeviceServiceCommandResult::StatusCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StatusCode(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceCommandResult)->get_StatusCode(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IMobileBroadbandDeviceServiceCommandResult::ResponseData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ResponseData(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceCommandResult)->get_ResponseData(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandDeviceServiceCommandSession::SendQueryCommandAsync(uint32_t commandId, const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SendQueryCommandAsync(commandId, get(data), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceCommandSession)->abi_SendQueryCommandAsync(commandId, get_abi(data), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandDeviceServiceCommandSession::SendSetCommandAsync(uint32_t commandId, const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SendSetCommandAsync(commandId, get(data), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceCommandSession)->abi_SendSetCommandAsync(commandId, get_abi(data), put_abi(asyncInfo))); return asyncInfo; } template void impl_IMobileBroadbandDeviceServiceCommandSession::CloseSession() const { - check_hresult(static_cast(static_cast(*this))->abi_CloseSession()); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceCommandSession)->abi_CloseSession()); } template Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus impl_IMobileBroadbandUiccAppsResult::Status() const { Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppsResult)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandUiccAppsResult::UiccApps() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_UiccApps(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppsResult)->get_UiccApps(put_abi(value))); return value; } template hstring impl_IMobileBroadbandUicc::SimIccId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SimIccId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandUicc)->get_SimIccId(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandUicc::GetUiccAppsAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetUiccAppsAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandUicc)->abi_GetUiccAppsAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus impl_IMobileBroadbandUiccAppRecordDetailsResult::Status() const { Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_Status(&value)); return value; } template Windows::Networking::NetworkOperators::UiccAppRecordKind impl_IMobileBroadbandUiccAppRecordDetailsResult::Kind() const { Windows::Networking::NetworkOperators::UiccAppRecordKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_Kind(&value)); return value; } template int32_t impl_IMobileBroadbandUiccAppRecordDetailsResult::RecordCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecordCount(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_RecordCount(&value)); return value; } template int32_t impl_IMobileBroadbandUiccAppRecordDetailsResult::RecordSize() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecordSize(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_RecordSize(&value)); return value; } template Windows::Networking::NetworkOperators::UiccAccessCondition impl_IMobileBroadbandUiccAppRecordDetailsResult::ReadAccessCondition() const { Windows::Networking::NetworkOperators::UiccAccessCondition value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadAccessCondition(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_ReadAccessCondition(&value)); return value; } template Windows::Networking::NetworkOperators::UiccAccessCondition impl_IMobileBroadbandUiccAppRecordDetailsResult::WriteAccessCondition() const { Windows::Networking::NetworkOperators::UiccAccessCondition value {}; - check_hresult(static_cast(static_cast(*this))->get_WriteAccessCondition(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppRecordDetailsResult)->get_WriteAccessCondition(&value)); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus impl_IMobileBroadbandUiccAppReadRecordResult::Status() const { Windows::Networking::NetworkOperators::MobileBroadbandUiccAppOperationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppReadRecordResult)->get_Status(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IMobileBroadbandUiccAppReadRecordResult::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccAppReadRecordResult)->get_Data(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IMobileBroadbandUiccApp::Id() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccApp)->get_Id(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::UiccAppKind impl_IMobileBroadbandUiccApp::Kind() const { Windows::Networking::NetworkOperators::UiccAppKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccApp)->get_Kind(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandUiccApp::GetRecordDetailsAsync(const Windows::Foundation::Collections::IIterable & uiccFilePath) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandUiccApp::GetRecordDetailsAsync(iterable uiccFilePath) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetRecordDetailsAsync(get(uiccFilePath), put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccApp)->abi_GetRecordDetailsAsync(get_abi(uiccFilePath), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandUiccApp::ReadRecordAsync(const Windows::Foundation::Collections::IIterable & uiccFilePath, int32_t recordIndex) const +template Windows::Foundation::IAsyncOperation impl_IMobileBroadbandUiccApp::ReadRecordAsync(iterable uiccFilePath, int32_t recordIndex) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ReadRecordAsync(get(uiccFilePath), recordIndex, put(asyncInfo))); + check_hresult(WINRT_SHIM(IMobileBroadbandUiccApp)->abi_ReadRecordAsync(get_abi(uiccFilePath), recordIndex, put_abi(asyncInfo))); return asyncInfo; } template hstring impl_IMobileBroadbandNetworkRegistrationStateChange::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetworkRegistrationStateChange)->get_DeviceId(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandNetwork impl_IMobileBroadbandNetworkRegistrationStateChange::Network() const { Windows::Networking::NetworkOperators::MobileBroadbandNetwork value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Network(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetworkRegistrationStateChange)->get_Network(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails::NetworkRegistrationStateChanges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_NetworkRegistrationStateChanges(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails)->get_NetworkRegistrationStateChanges(put_abi(value))); return value; } template hstring impl_IMobileBroadbandRadioStateChange::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandRadioStateChange)->get_DeviceId(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandRadioState impl_IMobileBroadbandRadioStateChange::RadioState() const { Windows::Networking::NetworkOperators::MobileBroadbandRadioState value {}; - check_hresult(static_cast(static_cast(*this))->get_RadioState(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandRadioStateChange)->get_RadioState(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandRadioStateChangeTriggerDetails::RadioStateChanges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RadioStateChanges(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandRadioStateChangeTriggerDetails)->get_RadioStateChanges(put_abi(value))); return value; } template hstring impl_IMobileBroadbandPinLockStateChange::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandPinLockStateChange)->get_DeviceId(put_abi(value))); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPinType impl_IMobileBroadbandPinLockStateChange::PinType() const { Windows::Networking::NetworkOperators::MobileBroadbandPinType value {}; - check_hresult(static_cast(static_cast(*this))->get_PinType(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPinLockStateChange)->get_PinType(&value)); return value; } template Windows::Networking::NetworkOperators::MobileBroadbandPinLockState impl_IMobileBroadbandPinLockStateChange::PinLockState() const { Windows::Networking::NetworkOperators::MobileBroadbandPinLockState value {}; - check_hresult(static_cast(static_cast(*this))->get_PinLockState(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandPinLockStateChange)->get_PinLockState(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMobileBroadbandPinLockStateChangeTriggerDetails::PinLockStateChanges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PinLockStateChanges(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandPinLockStateChangeTriggerDetails)->get_PinLockStateChanges(put_abi(value))); return value; } template hstring impl_IMobileBroadbandDeviceServiceTriggerDetails::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceTriggerDetails)->get_DeviceId(put_abi(value))); return value; } template GUID impl_IMobileBroadbandDeviceServiceTriggerDetails::DeviceServiceId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceServiceId(&value)); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceTriggerDetails)->get_DeviceServiceId(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IMobileBroadbandDeviceServiceTriggerDetails::ReceivedData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ReceivedData(put(value))); + check_hresult(WINRT_SHIM(IMobileBroadbandDeviceServiceTriggerDetails)->get_ReceivedData(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownCSimFilePathsStatics::EFSpn() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFSpn(put(value))); + check_hresult(WINRT_SHIM(IKnownCSimFilePathsStatics)->get_EFSpn(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownCSimFilePathsStatics::Gid1() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid1(put(value))); + check_hresult(WINRT_SHIM(IKnownCSimFilePathsStatics)->get_Gid1(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownCSimFilePathsStatics::Gid2() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid2(put(value))); + check_hresult(WINRT_SHIM(IKnownCSimFilePathsStatics)->get_Gid2(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownRuimFilePathsStatics::EFSpn() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFSpn(put(value))); + check_hresult(WINRT_SHIM(IKnownRuimFilePathsStatics)->get_EFSpn(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownRuimFilePathsStatics::Gid1() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid1(put(value))); + check_hresult(WINRT_SHIM(IKnownRuimFilePathsStatics)->get_Gid1(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownRuimFilePathsStatics::Gid2() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid2(put(value))); + check_hresult(WINRT_SHIM(IKnownRuimFilePathsStatics)->get_Gid2(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownSimFilePathsStatics::EFOns() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFOns(put(value))); + check_hresult(WINRT_SHIM(IKnownSimFilePathsStatics)->get_EFOns(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownSimFilePathsStatics::EFSpn() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFSpn(put(value))); + check_hresult(WINRT_SHIM(IKnownSimFilePathsStatics)->get_EFSpn(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownSimFilePathsStatics::Gid1() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid1(put(value))); + check_hresult(WINRT_SHIM(IKnownSimFilePathsStatics)->get_Gid1(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownSimFilePathsStatics::Gid2() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid2(put(value))); + check_hresult(WINRT_SHIM(IKnownSimFilePathsStatics)->get_Gid2(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownUSimFilePathsStatics::EFSpn() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFSpn(put(value))); + check_hresult(WINRT_SHIM(IKnownUSimFilePathsStatics)->get_EFSpn(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownUSimFilePathsStatics::EFOpl() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFOpl(put(value))); + check_hresult(WINRT_SHIM(IKnownUSimFilePathsStatics)->get_EFOpl(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownUSimFilePathsStatics::EFPnn() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EFPnn(put(value))); + check_hresult(WINRT_SHIM(IKnownUSimFilePathsStatics)->get_EFPnn(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownUSimFilePathsStatics::Gid1() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid1(put(value))); + check_hresult(WINRT_SHIM(IKnownUSimFilePathsStatics)->get_Gid1(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IKnownUSimFilePathsStatics::Gid2() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Gid2(put(value))); + check_hresult(WINRT_SHIM(IKnownUSimFilePathsStatics)->get_Gid2(put_abi(value))); return value; } template hstring impl_IHotspotAuthenticationEventDetails::EventToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EventToken(put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationEventDetails)->get_EventToken(put_abi(value))); return value; } -template bool impl_IHotspotAuthenticationContextStatics::TryGetAuthenticationContext(hstring_ref evenToken, Windows::Networking::NetworkOperators::HotspotAuthenticationContext & context) const +template bool impl_IHotspotAuthenticationContextStatics::TryGetAuthenticationContext(hstring_view evenToken, Windows::Networking::NetworkOperators::HotspotAuthenticationContext & context) const { bool isValid {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetAuthenticationContext(get(evenToken), put(context), &isValid)); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContextStatics)->abi_TryGetAuthenticationContext(get_abi(evenToken), put_abi(context), &isValid)); return isValid; } template com_array impl_IHotspotAuthenticationContext::WirelessNetworkId() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_WirelessNetworkId(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->get_WirelessNetworkId(impl::put_size_abi(value), put_abi(value))); return value; } template Windows::Networking::Connectivity::NetworkAdapter impl_IHotspotAuthenticationContext::NetworkAdapter() const { Windows::Networking::Connectivity::NetworkAdapter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NetworkAdapter(put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->get_NetworkAdapter(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IHotspotAuthenticationContext::RedirectMessageUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RedirectMessageUrl(put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->get_RedirectMessageUrl(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlDocument impl_IHotspotAuthenticationContext::RedirectMessageXml() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RedirectMessageXml(put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->get_RedirectMessageXml(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IHotspotAuthenticationContext::AuthenticationUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationUrl(put(value))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->get_AuthenticationUrl(put_abi(value))); return value; } -template void impl_IHotspotAuthenticationContext::IssueCredentials(hstring_ref userName, hstring_ref password, hstring_ref extraParameters, bool markAsManualConnectOnFailure) const +template void impl_IHotspotAuthenticationContext::IssueCredentials(hstring_view userName, hstring_view password, hstring_view extraParameters, bool markAsManualConnectOnFailure) const { - check_hresult(static_cast(static_cast(*this))->abi_IssueCredentials(get(userName), get(password), get(extraParameters), markAsManualConnectOnFailure)); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->abi_IssueCredentials(get_abi(userName), get_abi(password), get_abi(extraParameters), markAsManualConnectOnFailure)); } template void impl_IHotspotAuthenticationContext::AbortAuthentication(bool markAsManual) const { - check_hresult(static_cast(static_cast(*this))->abi_AbortAuthentication(markAsManual)); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->abi_AbortAuthentication(markAsManual)); } template void impl_IHotspotAuthenticationContext::SkipAuthentication() const { - check_hresult(static_cast(static_cast(*this))->abi_SkipAuthentication()); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->abi_SkipAuthentication()); } -template void impl_IHotspotAuthenticationContext::TriggerAttentionRequired(hstring_ref packageRelativeApplicationId, hstring_ref applicationParameters) const +template void impl_IHotspotAuthenticationContext::TriggerAttentionRequired(hstring_view packageRelativeApplicationId, hstring_view applicationParameters) const { - check_hresult(static_cast(static_cast(*this))->abi_TriggerAttentionRequired(get(packageRelativeApplicationId), get(applicationParameters))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext)->abi_TriggerAttentionRequired(get_abi(packageRelativeApplicationId), get_abi(applicationParameters))); } template bool impl_IHotspotCredentialsAuthenticationResult::HasNetworkErrorOccurred() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasNetworkErrorOccurred(&value)); + check_hresult(WINRT_SHIM(IHotspotCredentialsAuthenticationResult)->get_HasNetworkErrorOccurred(&value)); return value; } template Windows::Networking::NetworkOperators::HotspotAuthenticationResponseCode impl_IHotspotCredentialsAuthenticationResult::ResponseCode() const { Windows::Networking::NetworkOperators::HotspotAuthenticationResponseCode value {}; - check_hresult(static_cast(static_cast(*this))->get_ResponseCode(&value)); + check_hresult(WINRT_SHIM(IHotspotCredentialsAuthenticationResult)->get_ResponseCode(&value)); return value; } template Windows::Foundation::Uri impl_IHotspotCredentialsAuthenticationResult::LogoffUrl() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LogoffUrl(put(value))); + check_hresult(WINRT_SHIM(IHotspotCredentialsAuthenticationResult)->get_LogoffUrl(put_abi(value))); return value; } template Windows::Data::Xml::Dom::XmlDocument impl_IHotspotCredentialsAuthenticationResult::AuthenticationReplyXml() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationReplyXml(put(value))); + check_hresult(WINRT_SHIM(IHotspotCredentialsAuthenticationResult)->get_AuthenticationReplyXml(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IHotspotAuthenticationContext2::IssueCredentialsAsync(hstring_ref userName, hstring_ref password, hstring_ref extraParameters, bool markAsManualConnectOnFailure) const +template Windows::Foundation::IAsyncOperation impl_IHotspotAuthenticationContext2::IssueCredentialsAsync(hstring_view userName, hstring_view password, hstring_view extraParameters, bool markAsManualConnectOnFailure) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_IssueCredentialsAsync(get(userName), get(password), get(extraParameters), markAsManualConnectOnFailure, put(asyncInfo))); + check_hresult(WINRT_SHIM(IHotspotAuthenticationContext2)->abi_IssueCredentialsAsync(get_abi(userName), get_abi(password), get_abi(extraParameters), markAsManualConnectOnFailure, put_abi(asyncInfo))); return asyncInfo; } template bool impl_IProvisionFromXmlDocumentResults::AllElementsProvisioned() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllElementsProvisioned(&value)); + check_hresult(WINRT_SHIM(IProvisionFromXmlDocumentResults)->get_AllElementsProvisioned(&value)); return value; } template hstring impl_IProvisionFromXmlDocumentResults::ProvisionResultsXml() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProvisionResultsXml(put(value))); + check_hresult(WINRT_SHIM(IProvisionFromXmlDocumentResults)->get_ProvisionResultsXml(put_abi(value))); return value; } template void impl_IProvisionedProfile::UpdateCost(Windows::Networking::Connectivity::NetworkCostType value) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateCost(value)); + check_hresult(WINRT_SHIM(IProvisionedProfile)->abi_UpdateCost(value)); } template void impl_IProvisionedProfile::UpdateUsage(const Windows::Networking::NetworkOperators::ProfileUsage & value) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateUsage(get(value))); + check_hresult(WINRT_SHIM(IProvisionedProfile)->abi_UpdateUsage(get_abi(value))); } -template Windows::Foundation::IAsyncOperation impl_IProvisioningAgent::ProvisionFromXmlDocumentAsync(hstring_ref provisioningXmlDocument) const +template Windows::Foundation::IAsyncOperation impl_IProvisioningAgent::ProvisionFromXmlDocumentAsync(hstring_view provisioningXmlDocument) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ProvisionFromXmlDocumentAsync(get(provisioningXmlDocument), put(asyncInfo))); + check_hresult(WINRT_SHIM(IProvisioningAgent)->abi_ProvisionFromXmlDocumentAsync(get_abi(provisioningXmlDocument), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Networking::NetworkOperators::ProvisionedProfile impl_IProvisioningAgent::GetProvisionedProfile(Windows::Networking::NetworkOperators::ProfileMediaType mediaType, hstring_ref profileName) const +template Windows::Networking::NetworkOperators::ProvisionedProfile impl_IProvisioningAgent::GetProvisionedProfile(Windows::Networking::NetworkOperators::ProfileMediaType mediaType, hstring_view profileName) const { Windows::Networking::NetworkOperators::ProvisionedProfile provisionedProfile { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetProvisionedProfile(mediaType, get(profileName), put(provisionedProfile))); + check_hresult(WINRT_SHIM(IProvisioningAgent)->abi_GetProvisionedProfile(mediaType, get_abi(profileName), put_abi(provisionedProfile))); return provisionedProfile; } -template Windows::Networking::NetworkOperators::ProvisioningAgent impl_IProvisioningAgentStaticMethods::CreateFromNetworkAccountId(hstring_ref networkAccountId) const +template Windows::Networking::NetworkOperators::ProvisioningAgent impl_IProvisioningAgentStaticMethods::CreateFromNetworkAccountId(hstring_view networkAccountId) const { Windows::Networking::NetworkOperators::ProvisioningAgent provisioningAgent { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromNetworkAccountId(get(networkAccountId), put(provisioningAgent))); + check_hresult(WINRT_SHIM(IProvisioningAgentStaticMethods)->abi_CreateFromNetworkAccountId(get_abi(networkAccountId), put_abi(provisioningAgent))); return provisioningAgent; } template uint8_t impl_IUssdMessage::DataCodingScheme() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DataCodingScheme(&value)); + check_hresult(WINRT_SHIM(IUssdMessage)->get_DataCodingScheme(&value)); return value; } template void impl_IUssdMessage::DataCodingScheme(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DataCodingScheme(value)); + check_hresult(WINRT_SHIM(IUssdMessage)->put_DataCodingScheme(value)); } template com_array impl_IUssdMessage::GetPayload() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPayload(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IUssdMessage)->abi_GetPayload(impl::put_size_abi(value), put_abi(value))); return value; } -template void impl_IUssdMessage::SetPayload(array_ref value) const +template void impl_IUssdMessage::SetPayload(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPayload(value.size(), get(value))); + check_hresult(WINRT_SHIM(IUssdMessage)->abi_SetPayload(value.size(), get_abi(value))); } template hstring impl_IUssdMessage::PayloadAsText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PayloadAsText(put(value))); + check_hresult(WINRT_SHIM(IUssdMessage)->get_PayloadAsText(put_abi(value))); return value; } -template void impl_IUssdMessage::PayloadAsText(hstring_ref value) const +template void impl_IUssdMessage::PayloadAsText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PayloadAsText(get(value))); + check_hresult(WINRT_SHIM(IUssdMessage)->put_PayloadAsText(get_abi(value))); } -template Windows::Networking::NetworkOperators::UssdMessage impl_IUssdMessageFactory::CreateMessage(hstring_ref messageText) const +template Windows::Networking::NetworkOperators::UssdMessage impl_IUssdMessageFactory::CreateMessage(hstring_view messageText) const { Windows::Networking::NetworkOperators::UssdMessage ussdMessage { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMessage(get(messageText), put(ussdMessage))); + check_hresult(WINRT_SHIM(IUssdMessageFactory)->abi_CreateMessage(get_abi(messageText), put_abi(ussdMessage))); return ussdMessage; } template Windows::Networking::NetworkOperators::UssdResultCode impl_IUssdReply::ResultCode() const { Windows::Networking::NetworkOperators::UssdResultCode value {}; - check_hresult(static_cast(static_cast(*this))->get_ResultCode(&value)); + check_hresult(WINRT_SHIM(IUssdReply)->get_ResultCode(&value)); return value; } template Windows::Networking::NetworkOperators::UssdMessage impl_IUssdReply::Message() const { Windows::Networking::NetworkOperators::UssdMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(IUssdReply)->get_Message(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IUssdSession::SendMessageAndGetReplyAsync(const Windows::Networking::NetworkOperators::UssdMessage & message) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SendMessageAndGetReplyAsync(get(message), put(asyncInfo))); + check_hresult(WINRT_SHIM(IUssdSession)->abi_SendMessageAndGetReplyAsync(get_abi(message), put_abi(asyncInfo))); return asyncInfo; } template void impl_IUssdSession::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(IUssdSession)->abi_Close()); } -template Windows::Networking::NetworkOperators::UssdSession impl_IUssdSessionStatics::CreateFromNetworkAccountId(hstring_ref networkAccountId) const +template Windows::Networking::NetworkOperators::UssdSession impl_IUssdSessionStatics::CreateFromNetworkAccountId(hstring_view networkAccountId) const { Windows::Networking::NetworkOperators::UssdSession ussdSession { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromNetworkAccountId(get(networkAccountId), put(ussdSession))); + check_hresult(WINRT_SHIM(IUssdSessionStatics)->abi_CreateFromNetworkAccountId(get_abi(networkAccountId), put_abi(ussdSession))); return ussdSession; } -template Windows::Networking::NetworkOperators::UssdSession impl_IUssdSessionStatics::CreateFromNetworkInterfaceId(hstring_ref networkInterfaceId) const +template Windows::Networking::NetworkOperators::UssdSession impl_IUssdSessionStatics::CreateFromNetworkInterfaceId(hstring_view networkInterfaceId) const { Windows::Networking::NetworkOperators::UssdSession ussdSession { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromNetworkInterfaceId(get(networkInterfaceId), put(ussdSession))); + check_hresult(WINRT_SHIM(IUssdSessionStatics)->abi_CreateFromNetworkInterfaceId(get_abi(networkInterfaceId), put_abi(ussdSession))); return ussdSession; } template Windows::Networking::NetworkOperators::NetworkOperatorEventMessageType impl_INetworkOperatorNotificationEventDetails::NotificationType() const { Windows::Networking::NetworkOperators::NetworkOperatorEventMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_NotificationType(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_NotificationType(&value)); return value; } template hstring impl_INetworkOperatorNotificationEventDetails::NetworkAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NetworkAccountId(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_NetworkAccountId(put_abi(value))); return value; } template uint8_t impl_INetworkOperatorNotificationEventDetails::EncodingType() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EncodingType(&value)); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_EncodingType(&value)); return value; } template hstring impl_INetworkOperatorNotificationEventDetails::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_Message(put_abi(value))); return value; } template hstring impl_INetworkOperatorNotificationEventDetails::RuleId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RuleId(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_RuleId(put_abi(value))); return value; } template Windows::Devices::Sms::ISmsMessage impl_INetworkOperatorNotificationEventDetails::SmsMessage() const { Windows::Devices::Sms::ISmsMessage value; - check_hresult(static_cast(static_cast(*this))->get_SmsMessage(put(value))); + check_hresult(WINRT_SHIM(INetworkOperatorNotificationEventDetails)->get_SmsMessage(put_abi(value))); return value; } -template void impl_INetworkOperatorTetheringEntitlementCheck::AuthorizeTethering(bool allow, hstring_ref entitlementFailureReason) const +template void impl_INetworkOperatorTetheringEntitlementCheck::AuthorizeTethering(bool allow, hstring_view entitlementFailureReason) const { - check_hresult(static_cast(static_cast(*this))->abi_AuthorizeTethering(allow, get(entitlementFailureReason))); + check_hresult(WINRT_SHIM(INetworkOperatorTetheringEntitlementCheck)->abi_AuthorizeTethering(allow, get_abi(entitlementFailureReason))); } -template Windows::Foundation::IAsyncOperation impl_IFdnAccessManagerStatics::RequestUnlockAsync(hstring_ref contactListId) const +template Windows::Foundation::IAsyncOperation impl_IFdnAccessManagerStatics::RequestUnlockAsync(hstring_view contactListId) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_RequestUnlockAsync(get(contactListId), put(returnValue))); + check_hresult(WINRT_SHIM(IFdnAccessManagerStatics)->abi_RequestUnlockAsync(get_abi(contactListId), put_abi(returnValue))); return returnValue; } -inline Windows::Foundation::IAsyncOperation FdnAccessManager::RequestUnlockAsync(hstring_ref contactListId) +inline Windows::Foundation::IAsyncOperation FdnAccessManager::RequestUnlockAsync(hstring_view contactListId) { return get_activation_factory().RequestUnlockAsync(contactListId); } -inline bool HotspotAuthenticationContext::TryGetAuthenticationContext(hstring_ref evenToken, Windows::Networking::NetworkOperators::HotspotAuthenticationContext & context) +inline bool HotspotAuthenticationContext::TryGetAuthenticationContext(hstring_view evenToken, Windows::Networking::NetworkOperators::HotspotAuthenticationContext & context) { return get_activation_factory().TryGetAuthenticationContext(evenToken, context); } @@ -4711,7 +4926,7 @@ inline Windows::Foundation::Collections::IVectorView MobileBroadbandAcc return get_activation_factory().AvailableNetworkAccountIds(); } -inline Windows::Networking::NetworkOperators::MobileBroadbandAccount MobileBroadbandAccount::CreateFromNetworkAccountId(hstring_ref networkAccountId) +inline Windows::Networking::NetworkOperators::MobileBroadbandAccount MobileBroadbandAccount::CreateFromNetworkAccountId(hstring_view networkAccountId) { return get_activation_factory().CreateFromNetworkAccountId(networkAccountId); } @@ -4725,7 +4940,7 @@ inline hstring MobileBroadbandModem::GetDeviceSelector() return get_activation_factory().GetDeviceSelector(); } -inline Windows::Networking::NetworkOperators::MobileBroadbandModem MobileBroadbandModem::FromId(hstring_ref deviceId) +inline Windows::Networking::NetworkOperators::MobileBroadbandModem MobileBroadbandModem::FromId(hstring_view deviceId) { return get_activation_factory().FromId(deviceId); } @@ -4739,12 +4954,12 @@ inline NetworkOperatorTetheringAccessPointConfiguration::NetworkOperatorTetherin NetworkOperatorTetheringAccessPointConfiguration(activate_instance()) {} -inline Windows::Networking::NetworkOperators::TetheringCapability NetworkOperatorTetheringManager::GetTetheringCapability(hstring_ref networkAccountId) +inline Windows::Networking::NetworkOperators::TetheringCapability NetworkOperatorTetheringManager::GetTetheringCapability(hstring_view networkAccountId) { return get_activation_factory().GetTetheringCapability(networkAccountId); } -inline Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager NetworkOperatorTetheringManager::CreateFromNetworkAccountId(hstring_ref networkAccountId) +inline Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager NetworkOperatorTetheringManager::CreateFromNetworkAccountId(hstring_view networkAccountId) { return get_activation_factory().CreateFromNetworkAccountId(networkAccountId); } @@ -4768,21 +4983,21 @@ inline ProvisioningAgent::ProvisioningAgent() : ProvisioningAgent(activate_instance()) {} -inline Windows::Networking::NetworkOperators::ProvisioningAgent ProvisioningAgent::CreateFromNetworkAccountId(hstring_ref networkAccountId) +inline Windows::Networking::NetworkOperators::ProvisioningAgent ProvisioningAgent::CreateFromNetworkAccountId(hstring_view networkAccountId) { return get_activation_factory().CreateFromNetworkAccountId(networkAccountId); } -inline UssdMessage::UssdMessage(hstring_ref messageText) : +inline UssdMessage::UssdMessage(hstring_view messageText) : UssdMessage(get_activation_factory().CreateMessage(messageText)) {} -inline Windows::Networking::NetworkOperators::UssdSession UssdSession::CreateFromNetworkAccountId(hstring_ref networkAccountId) +inline Windows::Networking::NetworkOperators::UssdSession UssdSession::CreateFromNetworkAccountId(hstring_view networkAccountId) { return get_activation_factory().CreateFromNetworkAccountId(networkAccountId); } -inline Windows::Networking::NetworkOperators::UssdSession UssdSession::CreateFromNetworkInterfaceId(hstring_ref networkInterfaceId) +inline Windows::Networking::NetworkOperators::UssdSession UssdSession::CreateFromNetworkInterfaceId(hstring_view networkInterfaceId) { return get_activation_factory().CreateFromNetworkInterfaceId(networkInterfaceId); } @@ -4790,3 +5005,959 @@ inline Windows::Networking::NetworkOperators::UssdSession UssdSession::CreateFro } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IFdnAccessManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IHotspotAuthenticationContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IHotspotAuthenticationContext2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IHotspotAuthenticationContextStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IHotspotAuthenticationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IHotspotCredentialsAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IKnownCSimFilePathsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IKnownRuimFilePathsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IKnownSimFilePathsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IKnownUSimFilePathsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccount2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccountEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccountStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccountUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandAccountWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceCommandResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceCommandSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceDataSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandDeviceServiceTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandModem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandModemConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandModemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandNetwork & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandNetwork2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandNetworkRegistrationStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandPinLockStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandPinLockStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandPinManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandPinOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandRadioStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandRadioStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandUicc & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandUiccApp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandUiccAppReadRecordResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandUiccAppRecordDetailsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IMobileBroadbandUiccAppsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorNotificationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringAccessPointConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringClient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringClientManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringEntitlementCheck & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::INetworkOperatorTetheringOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IProvisionFromXmlDocumentResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IProvisionedProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IProvisioningAgent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IProvisioningAgentStaticMethods & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IUssdMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IUssdMessageFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IUssdReply & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IUssdSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::IUssdSessionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::HotspotAuthenticationContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::HotspotAuthenticationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::HotspotCredentialsAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandAccountEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandAccountUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandAccountWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceCommandResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceCommandSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceDataReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceDataSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandDeviceServiceTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandModem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandModemConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandNetwork & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandNetworkRegistrationStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandNetworkRegistrationStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandPin & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandPinLockStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandPinLockStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandPinManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandPinOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandRadioStateChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandRadioStateChangeTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandUicc & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandUiccApp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandUiccAppReadRecordResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandUiccAppRecordDetailsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::MobileBroadbandUiccAppsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::NetworkOperatorNotificationEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::NetworkOperatorTetheringAccessPointConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::NetworkOperatorTetheringClient & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::NetworkOperatorTetheringManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::NetworkOperatorTetheringOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::ProvisionFromXmlDocumentResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::ProvisionedProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::ProvisioningAgent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::UssdMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::UssdReply & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::NetworkOperators::UssdSession & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.Proximity.h b/10.0.14393.0/winrt/Windows.Networking.Proximity.h index 91dc4532a..5c27420d7 100644 --- a/10.0.14393.0/winrt/Windows.Networking.Proximity.h +++ b/10.0.14393.0/winrt/Windows.Networking.Proximity.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Networking.Sockets.3.h" @@ -29,7 +32,7 @@ template DeviceArrivedEventHandler::DeviceArrivedEventH inline void DeviceArrivedEventHandler::operator()(const Windows::Networking::Proximity::ProximityDevice & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template DeviceDepartedEventHandler::DeviceDepartedEventHandler(L lambda) : @@ -46,7 +49,7 @@ template DeviceDepartedEventHandler::DeviceDepartedEven inline void DeviceDepartedEventHandler::operator()(const Windows::Networking::Proximity::ProximityDevice & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template MessageReceivedHandler::MessageReceivedHandler(L lambda) : @@ -63,7 +66,7 @@ template MessageReceivedHandler::MessageReceivedHandler inline void MessageReceivedHandler::operator()(const Windows::Networking::Proximity::ProximityDevice & sender, const Windows::Networking::Proximity::ProximityMessage & message) const { - check_hresult((*this)->abi_Invoke(get(sender), get(message))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(message))); } template MessageTransmittedHandler::MessageTransmittedHandler(L lambda) : @@ -80,7 +83,7 @@ template MessageTransmittedHandler::MessageTransmittedH inline void MessageTransmittedHandler::operator()(const Windows::Networking::Proximity::ProximityDevice & sender, int64_t messageId) const { - check_hresult((*this)->abi_Invoke(get(sender), messageId)); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), messageId)); } } @@ -90,11 +93,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_PeerInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_PeerInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerInformation()); return S_OK; } catch (...) @@ -112,7 +116,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AllowBluetooth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowBluetooth()); return S_OK; } catch (...) @@ -125,6 +130,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowBluetooth(value); return S_OK; } @@ -138,7 +144,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AllowInfrastructure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowInfrastructure()); return S_OK; } catch (...) @@ -151,6 +158,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowInfrastructure(value); return S_OK; } @@ -164,7 +172,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().AllowWiFiDirect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowWiFiDirect()); return S_OK; } catch (...) @@ -177,6 +186,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowWiFiDirect(value); return S_OK; } @@ -186,11 +196,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -200,10 +211,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -217,7 +229,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().SupportedDiscoveryTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedDiscoveryTypes()); return S_OK; } catch (...) @@ -226,11 +239,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlternateIdentities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AlternateIdentities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AlternateIdentities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateIdentities()); return S_OK; } catch (...) @@ -244,6 +258,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -253,10 +268,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_StartWithMessage(abi_arg_in peerMessage) noexcept override + HRESULT __stdcall abi_StartWithMessage(impl::abi_arg_in peerMessage) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(*reinterpret_cast(&peerMessage)); return S_OK; } @@ -270,6 +286,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -279,11 +296,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_TriggeredConnectionStateChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_TriggeredConnectionStateChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().TriggeredConnectionStateChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().TriggeredConnectionStateChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -296,6 +314,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().TriggeredConnectionStateChanged(cookie); return S_OK; } @@ -305,11 +324,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_ConnectionRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ConnectionRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ConnectionRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ConnectionRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -322,6 +342,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionRequested(cookie); return S_OK; } @@ -331,11 +352,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindAllPeersAsync(abi_arg_out>> asyncOp) noexcept override + HRESULT __stdcall abi_FindAllPeersAsync(impl::abi_arg_out>> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().FindAllPeersAsync()); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().FindAllPeersAsync()); return S_OK; } catch (...) @@ -345,11 +367,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ConnectAsync(abi_arg_in peerInformation, abi_arg_out> asyncOp) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in peerInformation, impl::abi_arg_out> asyncOp) noexcept override { try { - *asyncOp = detach(this->shim().ConnectAsync(*reinterpret_cast(&peerInformation))); + typename D::abi_guard guard(this->shim()); + *asyncOp = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&peerInformation))); return S_OK; } catch (...) @@ -367,7 +390,8 @@ struct produce : produce { try { - *value = detach(this->shim().Role()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Role()); return S_OK; } catch (...) @@ -380,6 +404,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Role(value); return S_OK; } @@ -389,11 +414,12 @@ struct produce : produce } } - HRESULT __stdcall get_DiscoveryData(abi_arg_out value) noexcept override + HRESULT __stdcall get_DiscoveryData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DiscoveryData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiscoveryData()); return S_OK; } catch (...) @@ -403,10 +429,11 @@ struct produce : produce } } - HRESULT __stdcall put_DiscoveryData(abi_arg_in value) noexcept override + HRESULT __stdcall put_DiscoveryData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DiscoveryData(*reinterpret_cast(&value)); return S_OK; } @@ -416,11 +443,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -434,11 +462,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -452,11 +481,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -466,11 +496,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DiscoveryData(abi_arg_out value) noexcept override + HRESULT __stdcall get_DiscoveryData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DiscoveryData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiscoveryData()); return S_OK; } catch (...) @@ -484,11 +515,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_HostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_HostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostName()); return S_OK; } catch (...) @@ -498,11 +530,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceName()); return S_OK; } catch (...) @@ -516,11 +549,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_Added(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Added(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Added(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Added(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -533,6 +567,7 @@ struct produce : produce_baseshim()); this->shim().Added(token); return S_OK; } @@ -542,11 +577,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Removed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Removed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Removed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -559,6 +595,7 @@ struct produce : produce_baseshim()); this->shim().Removed(token); return S_OK; } @@ -568,11 +605,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -585,6 +623,7 @@ struct produce : produce_baseshim()); this->shim().Updated(token); return S_OK; } @@ -594,11 +633,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -611,6 +651,7 @@ struct produce : produce_baseshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -620,11 +661,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -637,6 +679,7 @@ struct produce : produce_baseshim()); this->shim().Stopped(token); return S_OK; } @@ -650,7 +693,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -663,6 +707,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -676,6 +721,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -689,11 +735,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SubscribeForMessage(abi_arg_in messageType, abi_arg_in messageReceivedHandler, int64_t * subscriptionId) noexcept override + HRESULT __stdcall abi_SubscribeForMessage(impl::abi_arg_in messageType, impl::abi_arg_in messageReceivedHandler, int64_t * subscriptionId) noexcept override { try { - *subscriptionId = detach(this->shim().SubscribeForMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&messageReceivedHandler))); + typename D::abi_guard guard(this->shim()); + *subscriptionId = detach_abi(this->shim().SubscribeForMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&messageReceivedHandler))); return S_OK; } catch (...) @@ -702,11 +749,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishMessage(abi_arg_in messageType, abi_arg_in message, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishMessage(impl::abi_arg_in messageType, impl::abi_arg_in message, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message))); return S_OK; } catch (...) @@ -715,11 +763,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishMessageWithCallback(abi_arg_in messageType, abi_arg_in message, abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishMessageWithCallback(impl::abi_arg_in messageType, impl::abi_arg_in message, impl::abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); return S_OK; } catch (...) @@ -728,11 +777,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishBinaryMessage(abi_arg_in messageType, abi_arg_in message, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishBinaryMessage(impl::abi_arg_in messageType, impl::abi_arg_in message, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishBinaryMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishBinaryMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message))); return S_OK; } catch (...) @@ -741,11 +791,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishBinaryMessageWithCallback(abi_arg_in messageType, abi_arg_in message, abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishBinaryMessageWithCallback(impl::abi_arg_in messageType, impl::abi_arg_in message, impl::abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishBinaryMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishBinaryMessage(*reinterpret_cast(&messageType), *reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); return S_OK; } catch (...) @@ -754,11 +805,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishUriMessage(abi_arg_in message, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishUriMessage(impl::abi_arg_in message, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishUriMessage(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishUriMessage(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -767,11 +819,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_PublishUriMessageWithCallback(abi_arg_in message, abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override + HRESULT __stdcall abi_PublishUriMessageWithCallback(impl::abi_arg_in message, impl::abi_arg_in messageTransmittedHandler, int64_t * messageId) noexcept override { try { - *messageId = detach(this->shim().PublishUriMessage(*reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); + typename D::abi_guard guard(this->shim()); + *messageId = detach_abi(this->shim().PublishUriMessage(*reinterpret_cast(&message), *reinterpret_cast(&messageTransmittedHandler))); return S_OK; } catch (...) @@ -784,6 +837,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().StopSubscribingForMessage(subscriptionId); return S_OK; } @@ -797,6 +851,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().StopPublishingMessage(messageId); return S_OK; } @@ -806,11 +861,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_DeviceArrived(abi_arg_in arrivedHandler, event_token * cookie) noexcept override + HRESULT __stdcall add_DeviceArrived(impl::abi_arg_in arrivedHandler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().DeviceArrived(*reinterpret_cast(&arrivedHandler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().DeviceArrived(*reinterpret_cast(&arrivedHandler))); return S_OK; } catch (...) @@ -823,6 +879,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DeviceArrived(cookie); return S_OK; } @@ -832,11 +889,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_DeviceDeparted(abi_arg_in departedHandler, event_token * cookie) noexcept override + HRESULT __stdcall add_DeviceDeparted(impl::abi_arg_in departedHandler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().DeviceDeparted(*reinterpret_cast(&departedHandler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().DeviceDeparted(*reinterpret_cast(&departedHandler))); return S_OK; } catch (...) @@ -849,6 +907,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DeviceDeparted(cookie); return S_OK; } @@ -862,7 +921,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().MaxMessageBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxMessageBytes()); return S_OK; } catch (...) @@ -875,7 +935,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BitsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitsPerSecond()); return S_OK; } catch (...) @@ -884,11 +945,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -902,11 +964,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -916,11 +979,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDefault(abi_arg_out proximityDevice) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out proximityDevice) noexcept override { try { - *proximityDevice = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *proximityDevice = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -930,11 +994,12 @@ struct produce : pro } } - HRESULT __stdcall abi_FromId(abi_arg_in deviceId, abi_arg_out proximityDevice) noexcept override + HRESULT __stdcall abi_FromId(impl::abi_arg_in deviceId, impl::abi_arg_out proximityDevice) noexcept override { try { - *proximityDevice = detach(this->shim().FromId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *proximityDevice = detach_abi(this->shim().FromId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -948,11 +1013,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_MessageType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MessageType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -966,7 +1032,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SubscriptionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubscriptionId()); return S_OK; } catch (...) @@ -975,11 +1042,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -989,11 +1057,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DataAsString(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataAsString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataAsString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataAsString()); return S_OK; } catch (...) @@ -1011,7 +1080,8 @@ struct produceshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1024,7 +1094,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1033,11 +1104,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Socket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Socket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Socket()); return S_OK; } catch (...) @@ -1055,94 +1127,94 @@ namespace Windows::Networking::Proximity { template hstring impl_IProximityMessage::MessageType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MessageType(put(value))); + check_hresult(WINRT_SHIM(IProximityMessage)->get_MessageType(put_abi(value))); return value; } template int64_t impl_IProximityMessage::SubscriptionId() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SubscriptionId(&value)); + check_hresult(WINRT_SHIM(IProximityMessage)->get_SubscriptionId(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IProximityMessage::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IProximityMessage)->get_Data(put_abi(value))); return value; } template hstring impl_IProximityMessage::DataAsString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DataAsString(put(value))); + check_hresult(WINRT_SHIM(IProximityMessage)->get_DataAsString(put_abi(value))); return value; } -template int64_t impl_IProximityDevice::SubscribeForMessage(hstring_ref messageType, const Windows::Networking::Proximity::MessageReceivedHandler & messageReceivedHandler) const +template int64_t impl_IProximityDevice::SubscribeForMessage(hstring_view messageType, const Windows::Networking::Proximity::MessageReceivedHandler & messageReceivedHandler) const { int64_t subscriptionId {}; - check_hresult(static_cast(static_cast(*this))->abi_SubscribeForMessage(get(messageType), get(messageReceivedHandler), &subscriptionId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_SubscribeForMessage(get_abi(messageType), get_abi(messageReceivedHandler), &subscriptionId)); return subscriptionId; } -template int64_t impl_IProximityDevice::PublishMessage(hstring_ref messageType, hstring_ref message) const +template int64_t impl_IProximityDevice::PublishMessage(hstring_view messageType, hstring_view message) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishMessage(get(messageType), get(message), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishMessage(get_abi(messageType), get_abi(message), &messageId)); return messageId; } -template int64_t impl_IProximityDevice::PublishMessage(hstring_ref messageType, hstring_ref message, const Windows::Networking::Proximity::MessageTransmittedHandler & messageTransmittedHandler) const +template int64_t impl_IProximityDevice::PublishMessage(hstring_view messageType, hstring_view message, const Windows::Networking::Proximity::MessageTransmittedHandler & messageTransmittedHandler) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishMessageWithCallback(get(messageType), get(message), get(messageTransmittedHandler), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishMessageWithCallback(get_abi(messageType), get_abi(message), get_abi(messageTransmittedHandler), &messageId)); return messageId; } -template int64_t impl_IProximityDevice::PublishBinaryMessage(hstring_ref messageType, const Windows::Storage::Streams::IBuffer & message) const +template int64_t impl_IProximityDevice::PublishBinaryMessage(hstring_view messageType, const Windows::Storage::Streams::IBuffer & message) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishBinaryMessage(get(messageType), get(message), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishBinaryMessage(get_abi(messageType), get_abi(message), &messageId)); return messageId; } -template int64_t impl_IProximityDevice::PublishBinaryMessage(hstring_ref messageType, const Windows::Storage::Streams::IBuffer & message, const Windows::Networking::Proximity::MessageTransmittedHandler & messageTransmittedHandler) const +template int64_t impl_IProximityDevice::PublishBinaryMessage(hstring_view messageType, const Windows::Storage::Streams::IBuffer & message, const Windows::Networking::Proximity::MessageTransmittedHandler & messageTransmittedHandler) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishBinaryMessageWithCallback(get(messageType), get(message), get(messageTransmittedHandler), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishBinaryMessageWithCallback(get_abi(messageType), get_abi(message), get_abi(messageTransmittedHandler), &messageId)); return messageId; } template int64_t impl_IProximityDevice::PublishUriMessage(const Windows::Foundation::Uri & message) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishUriMessage(get(message), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishUriMessage(get_abi(message), &messageId)); return messageId; } template int64_t impl_IProximityDevice::PublishUriMessage(const Windows::Foundation::Uri & message, const Windows::Networking::Proximity::MessageTransmittedHandler & messageTransmittedHandler) const { int64_t messageId {}; - check_hresult(static_cast(static_cast(*this))->abi_PublishUriMessageWithCallback(get(message), get(messageTransmittedHandler), &messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_PublishUriMessageWithCallback(get_abi(message), get_abi(messageTransmittedHandler), &messageId)); return messageId; } template void impl_IProximityDevice::StopSubscribingForMessage(int64_t subscriptionId) const { - check_hresult(static_cast(static_cast(*this))->abi_StopSubscribingForMessage(subscriptionId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_StopSubscribingForMessage(subscriptionId)); } template void impl_IProximityDevice::StopPublishingMessage(int64_t messageId) const { - check_hresult(static_cast(static_cast(*this))->abi_StopPublishingMessage(messageId)); + check_hresult(WINRT_SHIM(IProximityDevice)->abi_StopPublishingMessage(messageId)); } template event_token impl_IProximityDevice::DeviceArrived(const Windows::Networking::Proximity::DeviceArrivedEventHandler & arrivedHandler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_DeviceArrived(get(arrivedHandler), &cookie)); + check_hresult(WINRT_SHIM(IProximityDevice)->add_DeviceArrived(get_abi(arrivedHandler), &cookie)); return cookie; } @@ -1153,13 +1225,13 @@ template event_revoker impl_IProximityDevice:: template void impl_IProximityDevice::DeviceArrived(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DeviceArrived(cookie)); + check_hresult(WINRT_SHIM(IProximityDevice)->remove_DeviceArrived(cookie)); } template event_token impl_IProximityDevice::DeviceDeparted(const Windows::Networking::Proximity::DeviceDepartedEventHandler & departedHandler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_DeviceDeparted(get(departedHandler), &cookie)); + check_hresult(WINRT_SHIM(IProximityDevice)->add_DeviceDeparted(get_abi(departedHandler), &cookie)); return cookie; } @@ -1170,118 +1242,118 @@ template event_revoker impl_IProximityDevice:: template void impl_IProximityDevice::DeviceDeparted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DeviceDeparted(cookie)); + check_hresult(WINRT_SHIM(IProximityDevice)->remove_DeviceDeparted(cookie)); } template uint32_t impl_IProximityDevice::MaxMessageBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxMessageBytes(&value)); + check_hresult(WINRT_SHIM(IProximityDevice)->get_MaxMessageBytes(&value)); return value; } template uint64_t impl_IProximityDevice::BitsPerSecond() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BitsPerSecond(&value)); + check_hresult(WINRT_SHIM(IProximityDevice)->get_BitsPerSecond(&value)); return value; } template hstring impl_IProximityDevice::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IProximityDevice)->get_DeviceId(put_abi(value))); return value; } template hstring impl_IProximityDeviceStatics::GetDeviceSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(selector))); + check_hresult(WINRT_SHIM(IProximityDeviceStatics)->abi_GetDeviceSelector(put_abi(selector))); return selector; } template Windows::Networking::Proximity::ProximityDevice impl_IProximityDeviceStatics::GetDefault() const { Windows::Networking::Proximity::ProximityDevice proximityDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(proximityDevice))); + check_hresult(WINRT_SHIM(IProximityDeviceStatics)->abi_GetDefault(put_abi(proximityDevice))); return proximityDevice; } -template Windows::Networking::Proximity::ProximityDevice impl_IProximityDeviceStatics::FromId(hstring_ref deviceId) const +template Windows::Networking::Proximity::ProximityDevice impl_IProximityDeviceStatics::FromId(hstring_view deviceId) const { Windows::Networking::Proximity::ProximityDevice proximityDevice { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromId(get(deviceId), put(proximityDevice))); + check_hresult(WINRT_SHIM(IProximityDeviceStatics)->abi_FromId(get_abi(deviceId), put_abi(proximityDevice))); return proximityDevice; } template Windows::Networking::Proximity::TriggeredConnectState impl_ITriggeredConnectionStateChangedEventArgs::State() const { Windows::Networking::Proximity::TriggeredConnectState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(ITriggeredConnectionStateChangedEventArgs)->get_State(&value)); return value; } template uint32_t impl_ITriggeredConnectionStateChangedEventArgs::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ITriggeredConnectionStateChangedEventArgs)->get_Id(&value)); return value; } template Windows::Networking::Sockets::StreamSocket impl_ITriggeredConnectionStateChangedEventArgs::Socket() const { Windows::Networking::Sockets::StreamSocket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Socket(put(value))); + check_hresult(WINRT_SHIM(ITriggeredConnectionStateChangedEventArgs)->get_Socket(put_abi(value))); return value; } template hstring impl_IPeerInformation::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPeerInformation)->get_DisplayName(put_abi(value))); return value; } template Windows::Networking::HostName impl_IPeerInformationWithHostAndService::HostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HostName(put(value))); + check_hresult(WINRT_SHIM(IPeerInformationWithHostAndService)->get_HostName(put_abi(value))); return value; } template hstring impl_IPeerInformationWithHostAndService::ServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceName(put(value))); + check_hresult(WINRT_SHIM(IPeerInformationWithHostAndService)->get_ServiceName(put_abi(value))); return value; } template hstring impl_IPeerInformation3::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IPeerInformation3)->get_Id(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IPeerInformation3::DiscoveryData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DiscoveryData(put(value))); + check_hresult(WINRT_SHIM(IPeerInformation3)->get_DiscoveryData(put_abi(value))); return value; } template Windows::Networking::Proximity::PeerInformation impl_IConnectionRequestedEventArgs::PeerInformation() const { Windows::Networking::Proximity::PeerInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PeerInformation(put(value))); + check_hresult(WINRT_SHIM(IConnectionRequestedEventArgs)->get_PeerInformation(put_abi(value))); return value; } template event_token impl_IPeerWatcher::Added(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Added(get(handler), &token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->add_Added(get_abi(handler), &token)); return token; } @@ -1292,13 +1364,13 @@ template event_revoker impl_IPeerWatcher::Added(au template void impl_IPeerWatcher::Added(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Added(token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->remove_Added(token)); } template event_token impl_IPeerWatcher::Removed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Removed(get(handler), &token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->add_Removed(get_abi(handler), &token)); return token; } @@ -1309,13 +1381,13 @@ template event_revoker impl_IPeerWatcher::Removed( template void impl_IPeerWatcher::Removed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Removed(token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->remove_Removed(token)); } template event_token impl_IPeerWatcher::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->add_Updated(get_abi(handler), &token)); return token; } @@ -1326,213 +1398,213 @@ template event_revoker impl_IPeerWatcher::Updated( template void impl_IPeerWatcher::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->remove_Updated(token)); } -template event_token impl_IPeerWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPeerWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IPeerWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPeerWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::Proximity::IPeerWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IPeerWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IPeerWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPeerWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IPeerWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPeerWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::Proximity::IPeerWatcher::remove_Stopped, Stopped(handler)); } template void impl_IPeerWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IPeerWatcher)->remove_Stopped(token)); } template Windows::Networking::Proximity::PeerWatcherStatus impl_IPeerWatcher::Status() const { Windows::Networking::Proximity::PeerWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IPeerWatcher)->get_Status(&status)); return status; } template void impl_IPeerWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPeerWatcher)->abi_Start()); } template void impl_IPeerWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPeerWatcher)->abi_Stop()); } template bool impl_IPeerFinderStatics::AllowBluetooth() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowBluetooth(&value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_AllowBluetooth(&value)); return value; } template void impl_IPeerFinderStatics::AllowBluetooth(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowBluetooth(value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->put_AllowBluetooth(value)); } template bool impl_IPeerFinderStatics::AllowInfrastructure() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowInfrastructure(&value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_AllowInfrastructure(&value)); return value; } template void impl_IPeerFinderStatics::AllowInfrastructure(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowInfrastructure(value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->put_AllowInfrastructure(value)); } template bool impl_IPeerFinderStatics::AllowWiFiDirect() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowWiFiDirect(&value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_AllowWiFiDirect(&value)); return value; } template void impl_IPeerFinderStatics::AllowWiFiDirect(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowWiFiDirect(value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->put_AllowWiFiDirect(value)); } template hstring impl_IPeerFinderStatics::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_DisplayName(put_abi(value))); return value; } -template void impl_IPeerFinderStatics::DisplayName(hstring_ref value) const +template void impl_IPeerFinderStatics::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->put_DisplayName(get_abi(value))); } template Windows::Networking::Proximity::PeerDiscoveryTypes impl_IPeerFinderStatics::SupportedDiscoveryTypes() const { Windows::Networking::Proximity::PeerDiscoveryTypes value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedDiscoveryTypes(&value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_SupportedDiscoveryTypes(&value)); return value; } template Windows::Foundation::Collections::IMap impl_IPeerFinderStatics::AlternateIdentities() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_AlternateIdentities(put(value))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->get_AlternateIdentities(put_abi(value))); return value; } template void impl_IPeerFinderStatics::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->abi_Start()); } -template void impl_IPeerFinderStatics::Start(hstring_ref peerMessage) const +template void impl_IPeerFinderStatics::Start(hstring_view peerMessage) const { - check_hresult(static_cast(static_cast(*this))->abi_StartWithMessage(get(peerMessage))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->abi_StartWithMessage(get_abi(peerMessage))); } template void impl_IPeerFinderStatics::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->abi_Stop()); } -template event_token impl_IPeerFinderStatics::TriggeredConnectionStateChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPeerFinderStatics::TriggeredConnectionStateChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_TriggeredConnectionStateChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->add_TriggeredConnectionStateChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IPeerFinderStatics::TriggeredConnectionStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPeerFinderStatics::TriggeredConnectionStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::Proximity::IPeerFinderStatics::remove_TriggeredConnectionStateChanged, TriggeredConnectionStateChanged(handler)); } template void impl_IPeerFinderStatics::TriggeredConnectionStateChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TriggeredConnectionStateChanged(cookie)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->remove_TriggeredConnectionStateChanged(cookie)); } -template event_token impl_IPeerFinderStatics::ConnectionRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IPeerFinderStatics::ConnectionRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->add_ConnectionRequested(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IPeerFinderStatics::ConnectionRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IPeerFinderStatics::ConnectionRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::Proximity::IPeerFinderStatics::remove_ConnectionRequested, ConnectionRequested(handler)); } template void impl_IPeerFinderStatics::ConnectionRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionRequested(cookie)); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->remove_ConnectionRequested(cookie)); } template Windows::Foundation::IAsyncOperation> impl_IPeerFinderStatics::FindAllPeersAsync() const { Windows::Foundation::IAsyncOperation> asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_FindAllPeersAsync(put(asyncOp))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->abi_FindAllPeersAsync(put_abi(asyncOp))); return asyncOp; } template Windows::Foundation::IAsyncOperation impl_IPeerFinderStatics::ConnectAsync(const Windows::Networking::Proximity::PeerInformation & peerInformation) const { Windows::Foundation::IAsyncOperation asyncOp; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(peerInformation), put(asyncOp))); + check_hresult(WINRT_SHIM(IPeerFinderStatics)->abi_ConnectAsync(get_abi(peerInformation), put_abi(asyncOp))); return asyncOp; } template Windows::Networking::Proximity::PeerRole impl_IPeerFinderStatics2::Role() const { Windows::Networking::Proximity::PeerRole value {}; - check_hresult(static_cast(static_cast(*this))->get_Role(&value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics2)->get_Role(&value)); return value; } template void impl_IPeerFinderStatics2::Role(Windows::Networking::Proximity::PeerRole value) const { - check_hresult(static_cast(static_cast(*this))->put_Role(value)); + check_hresult(WINRT_SHIM(IPeerFinderStatics2)->put_Role(value)); } template Windows::Storage::Streams::IBuffer impl_IPeerFinderStatics2::DiscoveryData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DiscoveryData(put(value))); + check_hresult(WINRT_SHIM(IPeerFinderStatics2)->get_DiscoveryData(put_abi(value))); return value; } template void impl_IPeerFinderStatics2::DiscoveryData(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_DiscoveryData(get(value))); + check_hresult(WINRT_SHIM(IPeerFinderStatics2)->put_DiscoveryData(get_abi(value))); } template Windows::Networking::Proximity::PeerWatcher impl_IPeerFinderStatics2::CreateWatcher() const { Windows::Networking::Proximity::PeerWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IPeerFinderStatics2)->abi_CreateWatcher(put_abi(watcher))); return watcher; } @@ -1571,7 +1643,7 @@ inline hstring PeerFinder::DisplayName() return get_activation_factory().DisplayName(); } -inline void PeerFinder::DisplayName(hstring_ref value) +inline void PeerFinder::DisplayName(hstring_view value) { get_activation_factory().DisplayName(value); } @@ -1591,7 +1663,7 @@ inline void PeerFinder::Start() get_activation_factory().Start(); } -inline void PeerFinder::Start(hstring_ref peerMessage) +inline void PeerFinder::Start(hstring_view peerMessage) { get_activation_factory().Start(peerMessage); } @@ -1601,12 +1673,12 @@ inline void PeerFinder::Stop() get_activation_factory().Stop(); } -inline event_token PeerFinder::TriggeredConnectionStateChanged(const Windows::Foundation::TypedEventHandler & handler) +inline event_token PeerFinder::TriggeredConnectionStateChanged(const Windows::Foundation::TypedEventHandler & handler) { return get_activation_factory().TriggeredConnectionStateChanged(handler); } -inline factory_event_revoker PeerFinder::TriggeredConnectionStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) +inline factory_event_revoker PeerFinder::TriggeredConnectionStateChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Networking::Proximity::IPeerFinderStatics::remove_TriggeredConnectionStateChanged, factory.TriggeredConnectionStateChanged(handler) }; @@ -1617,12 +1689,12 @@ inline void PeerFinder::TriggeredConnectionStateChanged(event_token cookie) get_activation_factory().TriggeredConnectionStateChanged(cookie); } -inline event_token PeerFinder::ConnectionRequested(const Windows::Foundation::TypedEventHandler & handler) +inline event_token PeerFinder::ConnectionRequested(const Windows::Foundation::TypedEventHandler & handler) { return get_activation_factory().ConnectionRequested(handler); } -inline factory_event_revoker PeerFinder::ConnectionRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) +inline factory_event_revoker PeerFinder::ConnectionRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Networking::Proximity::IPeerFinderStatics::remove_ConnectionRequested, factory.ConnectionRequested(handler) }; @@ -1678,7 +1750,7 @@ inline Windows::Networking::Proximity::ProximityDevice ProximityDevice::GetDefau return get_activation_factory().GetDefault(); } -inline Windows::Networking::Proximity::ProximityDevice ProximityDevice::FromId(hstring_ref deviceId) +inline Windows::Networking::Proximity::ProximityDevice ProximityDevice::FromId(hstring_view deviceId) { return get_activation_factory().FromId(deviceId); } @@ -1686,3 +1758,158 @@ inline Windows::Networking::Proximity::ProximityDevice ProximityDevice::FromId(h } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IConnectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerFinderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerFinderStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerInformation3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerInformationWithHostAndService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IPeerWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IProximityDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IProximityDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::IProximityMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::ITriggeredConnectionStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::ConnectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::PeerInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::PeerWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::ProximityDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::ProximityMessage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Proximity::TriggeredConnectionStateChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.PushNotifications.h b/10.0.14393.0/winrt/Windows.Networking.PushNotifications.h index d78f3b917..d77585eab 100644 --- a/10.0.14393.0/winrt/Windows.Networking.PushNotifications.h +++ b/10.0.14393.0/winrt/Windows.Networking.PushNotifications.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.UI.Notifications.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -47,6 +52,7 @@ struct produceshim()); this->shim().Close(); return S_OK; } @@ -56,11 +62,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PushNotificationReceived(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PushNotificationReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PushNotificationReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -73,6 +80,7 @@ struct produceshim()); this->shim().PushNotificationReceived(token); return S_OK; } @@ -86,11 +94,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForApplicationAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForApplicationAsync()); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce applicationId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsyncWithId(impl::abi_arg_in applicationId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForApplicationAsync(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForApplicationAsync(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -114,11 +124,12 @@ struct produce tileId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForSecondaryTileAsync(impl::abi_arg_in tileId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForSecondaryTileAsync(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForSecondaryTileAsync(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -128,11 +139,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -146,11 +158,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForApplicationAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForApplicationAsync()); return S_OK; } catch (...) @@ -160,11 +173,12 @@ struct produce applicationId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForApplicationAsyncWithId(impl::abi_arg_in applicationId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForApplicationAsync(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForApplicationAsync(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -174,11 +188,12 @@ struct produce tileId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreatePushNotificationChannelForSecondaryTileAsync(impl::abi_arg_in tileId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreatePushNotificationChannelForSecondaryTileAsync(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreatePushNotificationChannelForSecondaryTileAsync(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -192,11 +207,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -214,6 +230,7 @@ struct produceshim()); this->shim().Cancel(value); return S_OK; } @@ -227,7 +244,8 @@ struct produceshim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -240,7 +258,8 @@ struct produceshim().NotificationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotificationType()); return S_OK; } catch (...) @@ -249,11 +268,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ToastNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ToastNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToastNotification()); return S_OK; } catch (...) @@ -263,11 +283,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TileNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileNotification()); return S_OK; } catch (...) @@ -277,11 +298,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BadgeNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BadgeNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BadgeNotification()); return S_OK; } catch (...) @@ -291,11 +313,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RawNotification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawNotification()); return S_OK; } catch (...) @@ -309,11 +332,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -331,82 +355,82 @@ namespace Windows::Networking::PushNotifications { template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerStatics::CreatePushNotificationChannelForApplicationAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForApplicationAsync(put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerStatics)->abi_CreatePushNotificationChannelForApplicationAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerStatics::CreatePushNotificationChannelForApplicationAsync(hstring_ref applicationId) const +template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerStatics::CreatePushNotificationChannelForApplicationAsync(hstring_view applicationId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForApplicationAsyncWithId(get(applicationId), put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerStatics)->abi_CreatePushNotificationChannelForApplicationAsyncWithId(get_abi(applicationId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerStatics::CreatePushNotificationChannelForSecondaryTileAsync(hstring_ref tileId) const +template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerStatics::CreatePushNotificationChannelForSecondaryTileAsync(hstring_view tileId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForSecondaryTileAsync(get(tileId), put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerStatics)->abi_CreatePushNotificationChannelForSecondaryTileAsync(get_abi(tileId), put_abi(operation))); return operation; } template Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser impl_IPushNotificationChannelManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerForUser::CreatePushNotificationChannelForApplicationAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForApplicationAsync(put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerForUser)->abi_CreatePushNotificationChannelForApplicationAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerForUser::CreatePushNotificationChannelForApplicationAsync(hstring_ref applicationId) const +template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerForUser::CreatePushNotificationChannelForApplicationAsync(hstring_view applicationId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForApplicationAsyncWithId(get(applicationId), put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerForUser)->abi_CreatePushNotificationChannelForApplicationAsyncWithId(get_abi(applicationId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerForUser::CreatePushNotificationChannelForSecondaryTileAsync(hstring_ref tileId) const +template Windows::Foundation::IAsyncOperation impl_IPushNotificationChannelManagerForUser::CreatePushNotificationChannelForSecondaryTileAsync(hstring_view tileId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreatePushNotificationChannelForSecondaryTileAsync(get(tileId), put(operation))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerForUser)->abi_CreatePushNotificationChannelForSecondaryTileAsync(get_abi(tileId), put_abi(operation))); return operation; } template Windows::System::User impl_IPushNotificationChannelManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationChannelManagerForUser)->get_User(put_abi(value))); return value; } template hstring impl_IPushNotificationChannel::Uri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationChannel)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPushNotificationChannel::ExpirationTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationChannel)->get_ExpirationTime(put_abi(value))); return value; } template void impl_IPushNotificationChannel::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(IPushNotificationChannel)->abi_Close()); } template event_token impl_IPushNotificationChannel::PushNotificationReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PushNotificationReceived(get(handler), &token)); + check_hresult(WINRT_SHIM(IPushNotificationChannel)->add_PushNotificationReceived(get_abi(handler), &token)); return token; } @@ -417,60 +441,60 @@ template event_revoker impl_IPushNotifica template void impl_IPushNotificationChannel::PushNotificationReceived(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PushNotificationReceived(token)); + check_hresult(WINRT_SHIM(IPushNotificationChannel)->remove_PushNotificationReceived(token)); } template void impl_IPushNotificationReceivedEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->put_Cancel(value)); } template bool impl_IPushNotificationReceivedEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_Cancel(&value)); return value; } template Windows::Networking::PushNotifications::PushNotificationType impl_IPushNotificationReceivedEventArgs::NotificationType() const { Windows::Networking::PushNotifications::PushNotificationType value {}; - check_hresult(static_cast(static_cast(*this))->get_NotificationType(&value)); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_NotificationType(&value)); return value; } template Windows::UI::Notifications::ToastNotification impl_IPushNotificationReceivedEventArgs::ToastNotification() const { Windows::UI::Notifications::ToastNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ToastNotification(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_ToastNotification(put_abi(value))); return value; } template Windows::UI::Notifications::TileNotification impl_IPushNotificationReceivedEventArgs::TileNotification() const { Windows::UI::Notifications::TileNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TileNotification(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_TileNotification(put_abi(value))); return value; } template Windows::UI::Notifications::BadgeNotification impl_IPushNotificationReceivedEventArgs::BadgeNotification() const { Windows::UI::Notifications::BadgeNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BadgeNotification(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_BadgeNotification(put_abi(value))); return value; } template Windows::Networking::PushNotifications::RawNotification impl_IPushNotificationReceivedEventArgs::RawNotification() const { Windows::Networking::PushNotifications::RawNotification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RawNotification(put(value))); + check_hresult(WINRT_SHIM(IPushNotificationReceivedEventArgs)->get_RawNotification(put_abi(value))); return value; } template hstring impl_IRawNotification::Content() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IRawNotification)->get_Content(put_abi(value))); return value; } @@ -479,12 +503,12 @@ inline Windows::Foundation::IAsyncOperation().CreatePushNotificationChannelForApplicationAsync(); } -inline Windows::Foundation::IAsyncOperation PushNotificationChannelManager::CreatePushNotificationChannelForApplicationAsync(hstring_ref applicationId) +inline Windows::Foundation::IAsyncOperation PushNotificationChannelManager::CreatePushNotificationChannelForApplicationAsync(hstring_view applicationId) { return get_activation_factory().CreatePushNotificationChannelForApplicationAsync(applicationId); } -inline Windows::Foundation::IAsyncOperation PushNotificationChannelManager::CreatePushNotificationChannelForSecondaryTileAsync(hstring_ref tileId) +inline Windows::Foundation::IAsyncOperation PushNotificationChannelManager::CreatePushNotificationChannelForSecondaryTileAsync(hstring_view tileId) { return get_activation_factory().CreatePushNotificationChannelForSecondaryTileAsync(tileId); } @@ -497,3 +521,95 @@ inline Windows::Networking::PushNotifications::PushNotificationChannelManagerFor } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IPushNotificationChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::IRawNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::PushNotificationChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::PushNotificationReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::PushNotifications::RawNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.ServiceDiscovery.Dnssd.h b/10.0.14393.0/winrt/Windows.Networking.ServiceDiscovery.Dnssd.h index e00109d43..fd1d7ad8a 100644 --- a/10.0.14393.0/winrt/Windows.Networking.ServiceDiscovery.Dnssd.h +++ b/10.0.14393.0/winrt/Windows.Networking.ServiceDiscovery.Dnssd.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Networking.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -24,7 +27,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IPAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IPAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IPAddress()); return S_OK; } catch (...) @@ -51,7 +56,8 @@ struct produceshim().HasInstanceNameChanged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasInstanceNameChanged()); return S_OK; } catch (...) @@ -64,11 +70,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DnssdServiceInstanceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DnssdServiceInstanceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DnssdServiceInstanceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DnssdServiceInstanceName()); return S_OK; } catch (...) @@ -78,10 +85,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DnssdServiceInstanceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DnssdServiceInstanceName(*reinterpret_cast(&value)); return S_OK; } @@ -91,11 +99,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HostName()); return S_OK; } catch (...) @@ -105,10 +114,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_HostName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HostName(*reinterpret_cast(&value)); return S_OK; } @@ -122,7 +132,8 @@ struct produceshim().Port()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Port()); return S_OK; } catch (...) @@ -135,6 +146,7 @@ struct produceshim()); this->shim().Port(value); return S_OK; } @@ -148,7 +160,8 @@ struct produceshim().Priority()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Priority()); return S_OK; } catch (...) @@ -161,6 +174,7 @@ struct produceshim()); this->shim().Priority(value); return S_OK; } @@ -174,7 +188,8 @@ struct produceshim().Weight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Weight()); return S_OK; } catch (...) @@ -187,6 +202,7 @@ struct produceshim()); this->shim().Weight(value); return S_OK; } @@ -196,11 +212,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TextAttributes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TextAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAttributes()); return S_OK; } catch (...) @@ -210,11 +227,12 @@ struct produce socket, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterStreamSocketListenerAsync1(impl::abi_arg_in socket, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterStreamSocketListenerAsync(*reinterpret_cast(&socket))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterStreamSocketListenerAsync(*reinterpret_cast(&socket))); return S_OK; } catch (...) @@ -224,11 +242,12 @@ struct produce socket, abi_arg_in adapter, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterStreamSocketListenerAsync2(impl::abi_arg_in socket, impl::abi_arg_in adapter, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterStreamSocketListenerAsync(*reinterpret_cast(&socket), *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterStreamSocketListenerAsync(*reinterpret_cast(&socket), *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -238,11 +257,12 @@ struct produce socket, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterDatagramSocketAsync1(impl::abi_arg_in socket, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterDatagramSocketAsync(*reinterpret_cast(&socket))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterDatagramSocketAsync(*reinterpret_cast(&socket))); return S_OK; } catch (...) @@ -252,11 +272,12 @@ struct produce socket, abi_arg_in adapter, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RegisterDatagramSocketAsync2(impl::abi_arg_in socket, impl::abi_arg_in adapter, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RegisterDatagramSocketAsync(*reinterpret_cast(&socket), *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RegisterDatagramSocketAsync(*reinterpret_cast(&socket), *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -270,11 +291,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in dnssdServiceInstanceName, abi_arg_in hostName, uint16_t port, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in dnssdServiceInstanceName, impl::abi_arg_in hostName, uint16_t port, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&dnssdServiceInstanceName), *reinterpret_cast(&hostName), port)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&dnssdServiceInstanceName), *reinterpret_cast(&hostName), port)); return S_OK; } catch (...) @@ -288,11 +310,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_Added(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Added(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Added(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Added(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -305,6 +328,7 @@ struct produceshim()); this->shim().Added(token); return S_OK; } @@ -314,11 +338,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -331,6 +356,7 @@ struct produceshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -340,11 +366,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -357,6 +384,7 @@ struct produceshim()); this->shim().Stopped(token); return S_OK; } @@ -370,7 +398,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -383,6 +412,7 @@ struct produceshim()); this->shim().Start(); return S_OK; } @@ -396,6 +426,7 @@ struct produceshim()); this->shim().Stop(); return S_OK; } @@ -413,7 +444,7 @@ namespace Windows::Networking::ServiceDiscovery::Dnssd { template event_token impl_IDnssdServiceWatcher::Added(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Added(get(handler), &token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->add_Added(get_abi(handler), &token)); return token; } @@ -424,180 +455,180 @@ template event_revoker impl_IDnssdServiceWatc template void impl_IDnssdServiceWatcher::Added(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Added(token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->remove_Added(token)); } -template event_token impl_IDnssdServiceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDnssdServiceWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IDnssdServiceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDnssdServiceWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdServiceWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IDnssdServiceWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IDnssdServiceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IDnssdServiceWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IDnssdServiceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IDnssdServiceWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdServiceWatcher::remove_Stopped, Stopped(handler)); } template void impl_IDnssdServiceWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->remove_Stopped(token)); } template Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceWatcherStatus impl_IDnssdServiceWatcher::Status() const { Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceWatcherStatus status {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&status)); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->get_Status(&status)); return status; } template void impl_IDnssdServiceWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->abi_Start()); } template void impl_IDnssdServiceWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IDnssdServiceWatcher)->abi_Stop()); } template Windows::Networking::ServiceDiscovery::Dnssd::DnssdRegistrationStatus impl_IDnssdRegistrationResult::Status() const { Windows::Networking::ServiceDiscovery::Dnssd::DnssdRegistrationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IDnssdRegistrationResult)->get_Status(&value)); return value; } template Windows::Networking::HostName impl_IDnssdRegistrationResult::IPAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IPAddress(put(value))); + check_hresult(WINRT_SHIM(IDnssdRegistrationResult)->get_IPAddress(put_abi(value))); return value; } template bool impl_IDnssdRegistrationResult::HasInstanceNameChanged() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasInstanceNameChanged(&value)); + check_hresult(WINRT_SHIM(IDnssdRegistrationResult)->get_HasInstanceNameChanged(&value)); return value; } -template Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceInstance impl_IDnssdServiceInstanceFactory::Create(hstring_ref dnssdServiceInstanceName, const Windows::Networking::HostName & hostName, uint16_t port) const +template Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceInstance impl_IDnssdServiceInstanceFactory::Create(hstring_view dnssdServiceInstanceName, const Windows::Networking::HostName & hostName, uint16_t port) const { Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceInstance result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(dnssdServiceInstanceName), get(hostName), port, put(result))); + check_hresult(WINRT_SHIM(IDnssdServiceInstanceFactory)->abi_Create(get_abi(dnssdServiceInstanceName), get_abi(hostName), port, put_abi(result))); return result; } template hstring impl_IDnssdServiceInstance::DnssdServiceInstanceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DnssdServiceInstanceName(put(value))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_DnssdServiceInstanceName(put_abi(value))); return value; } -template void impl_IDnssdServiceInstance::DnssdServiceInstanceName(hstring_ref value) const +template void impl_IDnssdServiceInstance::DnssdServiceInstanceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DnssdServiceInstanceName(get(value))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->put_DnssdServiceInstanceName(get_abi(value))); } template Windows::Networking::HostName impl_IDnssdServiceInstance::HostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HostName(put(value))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_HostName(put_abi(value))); return value; } template void impl_IDnssdServiceInstance::HostName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_HostName(get(value))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->put_HostName(get_abi(value))); } template uint16_t impl_IDnssdServiceInstance::Port() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Port(&value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_Port(&value)); return value; } template void impl_IDnssdServiceInstance::Port(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Port(value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->put_Port(value)); } template uint16_t impl_IDnssdServiceInstance::Priority() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Priority(&value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_Priority(&value)); return value; } template void impl_IDnssdServiceInstance::Priority(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Priority(value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->put_Priority(value)); } template uint16_t impl_IDnssdServiceInstance::Weight() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Weight(&value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_Weight(&value)); return value; } template void impl_IDnssdServiceInstance::Weight(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Weight(value)); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->put_Weight(value)); } template Windows::Foundation::Collections::IMap impl_IDnssdServiceInstance::TextAttributes() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_TextAttributes(put(value))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->get_TextAttributes(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDnssdServiceInstance::RegisterStreamSocketListenerAsync(const Windows::Networking::Sockets::StreamSocketListener & socket) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterStreamSocketListenerAsync1(get(socket), put(result))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->abi_RegisterStreamSocketListenerAsync1(get_abi(socket), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDnssdServiceInstance::RegisterStreamSocketListenerAsync(const Windows::Networking::Sockets::StreamSocketListener & socket, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterStreamSocketListenerAsync2(get(socket), get(adapter), put(result))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->abi_RegisterStreamSocketListenerAsync2(get_abi(socket), get_abi(adapter), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDnssdServiceInstance::RegisterDatagramSocketAsync(const Windows::Networking::Sockets::DatagramSocket & socket) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterDatagramSocketAsync1(get(socket), put(result))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->abi_RegisterDatagramSocketAsync1(get_abi(socket), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDnssdServiceInstance::RegisterDatagramSocketAsync(const Windows::Networking::Sockets::DatagramSocket & socket, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RegisterDatagramSocketAsync2(get(socket), get(adapter), put(result))); + check_hresult(WINRT_SHIM(IDnssdServiceInstance)->abi_RegisterDatagramSocketAsync2(get_abi(socket), get_abi(adapter), put_abi(result))); return result; } @@ -605,10 +636,84 @@ inline DnssdRegistrationResult::DnssdRegistrationResult() : DnssdRegistrationResult(activate_instance()) {} -inline DnssdServiceInstance::DnssdServiceInstance(hstring_ref dnssdServiceInstanceName, const Windows::Networking::HostName & hostName, uint16_t port) : +inline DnssdServiceInstance::DnssdServiceInstance(hstring_view dnssdServiceInstanceName, const Windows::Networking::HostName & hostName, uint16_t port) : DnssdServiceInstance(get_activation_factory().Create(dnssdServiceInstanceName, hostName, port)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdRegistrationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdServiceInstance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdServiceInstanceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::IDnssdServiceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::DnssdRegistrationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceInstance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceInstanceCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::ServiceDiscovery::Dnssd::DnssdServiceWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.Sockets.h b/10.0.14393.0/winrt/Windows.Networking.Sockets.h index 5b7fe6717..09c579c4e 100644 --- a/10.0.14393.0/winrt/Windows.Networking.Sockets.h +++ b/10.0.14393.0/winrt/Windows.Networking.Sockets.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Networking.3.h" @@ -24,11 +27,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ControlChannelTriggerId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlChannelTriggerId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlChannelTriggerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlChannelTriggerId()); return S_OK; } catch (...) @@ -42,7 +46,8 @@ struct produce : produc { try { - *value = detach(this->shim().ServerKeepAliveIntervalInMinutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerKeepAliveIntervalInMinutes()); return S_OK; } catch (...) @@ -55,6 +60,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerKeepAliveIntervalInMinutes(value); return S_OK; } @@ -68,7 +74,8 @@ struct produce : produc { try { - *value = detach(this->shim().CurrentKeepAliveIntervalInMinutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentKeepAliveIntervalInMinutes()); return S_OK; } catch (...) @@ -77,11 +84,12 @@ struct produce : produc } } - HRESULT __stdcall get_TransportObject(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportObject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportObject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportObject()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce : produc } } - HRESULT __stdcall get_KeepAliveTrigger(abi_arg_out trigger) noexcept override + HRESULT __stdcall get_KeepAliveTrigger(impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().KeepAliveTrigger()); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().KeepAliveTrigger()); return S_OK; } catch (...) @@ -105,11 +114,12 @@ struct produce : produc } } - HRESULT __stdcall get_PushNotificationTrigger(abi_arg_out trigger) noexcept override + HRESULT __stdcall get_PushNotificationTrigger(impl::abi_arg_out trigger) noexcept override { try { - *trigger = detach(this->shim().PushNotificationTrigger()); + typename D::abi_guard guard(this->shim()); + *trigger = detach_abi(this->shim().PushNotificationTrigger()); return S_OK; } catch (...) @@ -119,11 +129,12 @@ struct produce : produc } } - HRESULT __stdcall abi_UsingTransport(abi_arg_in transport) noexcept override + HRESULT __stdcall abi_UsingTransport(impl::abi_arg_in transport) noexcept override { try { - this->shim().UsingTransport(*reinterpret_cast(&transport)); + typename D::abi_guard guard(this->shim()); + this->shim().UsingTransport(*reinterpret_cast(&transport)); return S_OK; } catch (...) @@ -136,7 +147,8 @@ struct produce : produc { try { - *channelTriggerStatus = detach(this->shim().WaitForPushEnabled()); + typename D::abi_guard guard(this->shim()); + *channelTriggerStatus = detach_abi(this->shim().WaitForPushEnabled()); return S_OK; } catch (...) @@ -149,6 +161,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().DecreaseNetworkKeepAliveInterval(); return S_OK; } @@ -162,6 +175,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().FlushTransport(); return S_OK; } @@ -179,7 +193,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsWakeFromLowPowerSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsWakeFromLowPowerSupported()); return S_OK; } catch (...) @@ -192,11 +207,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_ControlChannelTrigger(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlChannelTrigger(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlChannelTrigger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlChannelTrigger()); return S_OK; } catch (...) @@ -210,11 +226,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateControlChannelTrigger(abi_arg_in channelId, uint32_t serverKeepAliveIntervalInMinutes, abi_arg_out notificationChannel) noexcept override + HRESULT __stdcall abi_CreateControlChannelTrigger(impl::abi_arg_in channelId, uint32_t serverKeepAliveIntervalInMinutes, impl::abi_arg_out notificationChannel) noexcept override { try { - *notificationChannel = detach(this->shim().CreateControlChannelTrigger(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes)); + typename D::abi_guard guard(this->shim()); + *notificationChannel = detach_abi(this->shim().CreateControlChannelTrigger(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes)); return S_OK; } catch (...) @@ -224,11 +241,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateControlChannelTriggerEx(abi_arg_in channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType, abi_arg_out notificationChannel) noexcept override + HRESULT __stdcall abi_CreateControlChannelTriggerEx(impl::abi_arg_in channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType, impl::abi_arg_out notificationChannel) noexcept override { try { - *notificationChannel = detach(this->shim().CreateControlChannelTriggerEx(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes, resourceRequestType)); + typename D::abi_guard guard(this->shim()); + *notificationChannel = detach_abi(this->shim().CreateControlChannelTriggerEx(*reinterpret_cast(&channelId), serverKeepAliveIntervalInMinutes, resourceRequestType)); return S_OK; } catch (...) @@ -246,7 +264,8 @@ struct produceshim().ResetReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResetReason()); return S_OK; } catch (...) @@ -259,7 +278,8 @@ struct produceshim().HardwareSlotReset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareSlotReset()); return S_OK; } catch (...) @@ -272,7 +292,8 @@ struct produceshim().SoftwareSlotReset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareSlotReset()); return S_OK; } catch (...) @@ -285,11 +306,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Control(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control()); return S_OK; } catch (...) @@ -299,11 +321,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Information(abi_arg_out value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -313,11 +336,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_OutputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -327,11 +351,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ConnectAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -341,11 +366,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ConnectWithEndpointPairAsync(abi_arg_in endpointPair, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectWithEndpointPairAsync(impl::abi_arg_in endpointPair, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); return S_OK; } catch (...) @@ -355,11 +381,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_BindServiceNameAsync(abi_arg_in localServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindServiceNameAsync(impl::abi_arg_in localServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); return S_OK; } catch (...) @@ -369,11 +396,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_BindEndpointAsync(abi_arg_in localHostName, abi_arg_in localServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindEndpointAsync(impl::abi_arg_in localHostName, impl::abi_arg_in localServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); return S_OK; } catch (...) @@ -383,10 +411,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_JoinMulticastGroup(abi_arg_in host) noexcept override + HRESULT __stdcall abi_JoinMulticastGroup(impl::abi_arg_in host) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().JoinMulticastGroup(*reinterpret_cast(&host)); return S_OK; } @@ -396,11 +425,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetOutputStreamAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetOutputStreamAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetOutputStreamAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetOutputStreamAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -410,11 +440,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetOutputStreamWithEndpointPairAsync(abi_arg_in endpointPair, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetOutputStreamWithEndpointPairAsync(impl::abi_arg_in endpointPair, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetOutputStreamAsync(*reinterpret_cast(&endpointPair))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetOutputStreamAsync(*reinterpret_cast(&endpointPair))); return S_OK; } catch (...) @@ -424,11 +455,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_MessageReceived(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_MessageReceived(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -441,6 +473,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(eventCookie); return S_OK; } @@ -454,11 +487,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_BindServiceNameAndAdapterAsync(abi_arg_in localServiceName, abi_arg_in adapter, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindServiceNameAndAdapterAsync(impl::abi_arg_in localServiceName, impl::abi_arg_in adapter, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -472,11 +506,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CancelIOAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CancelIOAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CancelIOAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CancelIOAsync()); return S_OK; } catch (...) @@ -490,6 +525,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(taskId); return S_OK; } @@ -503,6 +539,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(taskId, connectedStandbyAction); return S_OK; } @@ -512,10 +549,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TransferOwnership(abi_arg_in socketId) noexcept override + HRESULT __stdcall abi_TransferOwnership(impl::abi_arg_in socketId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return S_OK; } @@ -525,10 +563,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TransferOwnershipWithContext(abi_arg_in socketId, abi_arg_in data) noexcept override + HRESULT __stdcall abi_TransferOwnershipWithContext(impl::abi_arg_in socketId, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return S_OK; } @@ -538,10 +577,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TransferOwnershipWithContextAndKeepAliveTime(abi_arg_in socketId, abi_arg_in data, abi_arg_in keepAliveTime) noexcept override + HRESULT __stdcall abi_TransferOwnershipWithContextAndKeepAliveTime(impl::abi_arg_in socketId, impl::abi_arg_in data, impl::abi_arg_in keepAliveTime) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data), *reinterpret_cast(&keepAliveTime)); return S_OK; } @@ -559,7 +599,8 @@ struct produce : produc { try { - *value = detach(this->shim().QualityOfService()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualityOfService()); return S_OK; } catch (...) @@ -572,6 +613,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(value); return S_OK; } @@ -585,7 +627,8 @@ struct produce : produc { try { - *value = detach(this->shim().OutboundUnicastHopLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundUnicastHopLimit()); return S_OK; } catch (...) @@ -598,6 +641,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return S_OK; } @@ -615,7 +659,8 @@ struct produce : produ { try { - *value = detach(this->shim().InboundBufferSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InboundBufferSizeInBytes()); return S_OK; } catch (...) @@ -628,6 +673,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().InboundBufferSizeInBytes(value); return S_OK; } @@ -641,7 +687,8 @@ struct produce : produ { try { - *value = detach(this->shim().DontFragment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DontFragment()); return S_OK; } catch (...) @@ -654,6 +701,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().DontFragment(value); return S_OK; } @@ -671,7 +719,8 @@ struct produce : produ { try { - *value = detach(this->shim().MulticastOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MulticastOnly()); return S_OK; } catch (...) @@ -684,6 +733,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().MulticastOnly(value); return S_OK; } @@ -697,11 +747,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_LocalAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalAddress()); return S_OK; } catch (...) @@ -711,11 +762,12 @@ struct produce : pr } } - HRESULT __stdcall get_LocalPort(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalPort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalPort()); return S_OK; } catch (...) @@ -725,11 +777,12 @@ struct produce : pr } } - HRESULT __stdcall get_RemoteAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteAddress()); return S_OK; } catch (...) @@ -739,11 +792,12 @@ struct produce : pr } } - HRESULT __stdcall get_RemotePort(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemotePort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemotePort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemotePort()); return S_OK; } catch (...) @@ -757,11 +811,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_RemoteAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteAddress()); return S_OK; } catch (...) @@ -771,11 +826,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RemotePort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemotePort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemotePort()); return S_OK; } catch (...) @@ -785,11 +841,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalAddress()); return S_OK; } catch (...) @@ -799,11 +856,12 @@ struct produce dataReader) noexcept override + HRESULT __stdcall abi_GetDataReader(impl::abi_arg_out dataReader) noexcept override { try { - *dataReader = detach(this->shim().GetDataReader()); + typename D::abi_guard guard(this->shim()); + *dataReader = detach_abi(this->shim().GetDataReader()); return S_OK; } catch (...) @@ -813,11 +871,12 @@ struct produce inputStream) noexcept override + HRESULT __stdcall abi_GetDataStream(impl::abi_arg_out inputStream) noexcept override { try { - *inputStream = detach(this->shim().GetDataStream()); + typename D::abi_guard guard(this->shim()); + *inputStream = detach_abi(this->shim().GetDataStream()); return S_OK; } catch (...) @@ -831,11 +890,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetEndpointPairsAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetEndpointPairsAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -845,11 +905,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetEndpointPairsWithSortOptionsAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetEndpointPairsWithSortOptionsAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), sortOptions)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), sortOptions)); return S_OK; } catch (...) @@ -863,11 +924,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Control(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control()); return S_OK; } catch (...) @@ -877,11 +939,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Information(abi_arg_out value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -891,11 +954,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_MessageReceived(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_MessageReceived(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().MessageReceived(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -908,6 +972,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageReceived(eventCookie); return S_OK; } @@ -921,11 +986,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall add_ServerCustomValidationRequested(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ServerCustomValidationRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ServerCustomValidationRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ServerCustomValidationRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -938,6 +1004,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerCustomValidationRequested(eventCookie); return S_OK; } @@ -955,7 +1022,8 @@ struct produce : prod { try { - *value = detach(this->shim().MaxMessageSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxMessageSize()); return S_OK; } catch (...) @@ -968,6 +1036,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxMessageSize(value); return S_OK; } @@ -981,7 +1050,8 @@ struct produce : prod { try { - *value = detach(this->shim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -994,6 +1064,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().MessageType(value); return S_OK; } @@ -1011,7 +1082,8 @@ struct produceshim().MessageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageType()); return S_OK; } catch (...) @@ -1020,11 +1092,12 @@ struct produce dataReader) noexcept override + HRESULT __stdcall abi_GetDataReader(impl::abi_arg_out dataReader) noexcept override { try { - *dataReader = detach(this->shim().GetDataReader()); + typename D::abi_guard guard(this->shim()); + *dataReader = detach_abi(this->shim().GetDataReader()); return S_OK; } catch (...) @@ -1034,11 +1107,12 @@ struct produce inputStream) noexcept override + HRESULT __stdcall abi_GetDataStream(impl::abi_arg_out inputStream) noexcept override { try { - *inputStream = detach(this->shim().GetDataStream()); + typename D::abi_guard guard(this->shim()); + *inputStream = detach_abi(this->shim().GetDataStream()); return S_OK; } catch (...) @@ -1052,11 +1126,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -1070,11 +1145,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in data, abi_arg_out context) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in data, impl::abi_arg_out context) noexcept override { try { - *context = detach(this->shim().Create(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *context = detach_abi(this->shim().Create(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1092,7 +1168,8 @@ struct produce : pr { try { - *value = detach(this->shim().TaskId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TaskId()); return S_OK; } catch (...) @@ -1101,11 +1178,12 @@ struct produce : pr } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1119,7 +1197,8 @@ struct produce : pr { try { - *value = detach(this->shim().SocketKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SocketKind()); return S_OK; } catch (...) @@ -1128,11 +1207,12 @@ struct produce : pr } } - HRESULT __stdcall get_Context(abi_arg_out value) noexcept override + HRESULT __stdcall get_Context(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Context()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Context()); return S_OK; } catch (...) @@ -1142,11 +1222,12 @@ struct produce : pr } } - HRESULT __stdcall get_DatagramSocket(abi_arg_out value) noexcept override + HRESULT __stdcall get_DatagramSocket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DatagramSocket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DatagramSocket()); return S_OK; } catch (...) @@ -1156,11 +1237,12 @@ struct produce : pr } } - HRESULT __stdcall get_StreamSocket(abi_arg_out value) noexcept override + HRESULT __stdcall get_StreamSocket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreamSocket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamSocket()); return S_OK; } catch (...) @@ -1170,11 +1252,12 @@ struct produce : pr } } - HRESULT __stdcall get_StreamSocketListener(abi_arg_out value) noexcept override + HRESULT __stdcall get_StreamSocketListener(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreamSocketListener()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamSocketListener()); return S_OK; } catch (...) @@ -1188,11 +1271,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_AllSockets(abi_arg_out> sockets) noexcept override + HRESULT __stdcall get_AllSockets(impl::abi_arg_out> sockets) noexcept override { try { - *sockets = detach(this->shim().AllSockets()); + typename D::abi_guard guard(this->shim()); + *sockets = detach_abi(this->shim().AllSockets()); return S_OK; } catch (...) @@ -1210,7 +1294,8 @@ struct produce : { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -1219,11 +1304,12 @@ struct produce : } } - HRESULT __stdcall get_SocketInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_SocketInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SocketInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SocketInformation()); return S_OK; } catch (...) @@ -1241,7 +1327,8 @@ struct produce : produce_b { try { - *status = detach(this->shim().GetStatus(hresult)); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetStatus(hresult)); return S_OK; } catch (...) @@ -1254,11 +1341,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Control(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control()); return S_OK; } catch (...) @@ -1268,11 +1356,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -1282,11 +1371,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -1296,11 +1386,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -1310,11 +1401,12 @@ struct produce : produce_base endpointPair, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectWithEndpointPairAsync(impl::abi_arg_in endpointPair, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair))); return S_OK; } catch (...) @@ -1324,11 +1416,12 @@ struct produce : produce_base remoteHostName, abi_arg_in remoteServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -1338,11 +1431,12 @@ struct produce : produce_base endpointPair, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectWithEndpointPairAndProtectionLevelAsync(impl::abi_arg_in endpointPair, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair), protectionLevel)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&endpointPair), protectionLevel)); return S_OK; } catch (...) @@ -1352,11 +1446,12 @@ struct produce : produce_base remoteHostName, abi_arg_in remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectWithProtectionLevelAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), protectionLevel)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), protectionLevel)); return S_OK; } catch (...) @@ -1366,11 +1461,12 @@ struct produce : produce_base validationHostName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_UpgradeToSslAsync(Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_in validationHostName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().UpgradeToSslAsync(protectionLevel, *reinterpret_cast(&validationHostName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpgradeToSslAsync(protectionLevel, *reinterpret_cast(&validationHostName))); return S_OK; } catch (...) @@ -1384,11 +1480,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ConnectWithProtectionLevelAndAdapterAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, abi_arg_in adapter, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectWithProtectionLevelAndAdapterAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_in adapter, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), protectionLevel, *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), protectionLevel, *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -1402,11 +1499,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CancelIOAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CancelIOAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CancelIOAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CancelIOAsync()); return S_OK; } catch (...) @@ -1420,6 +1518,7 @@ struct produce : produce_baseshim()); this->shim().EnableTransferOwnership(taskId); return S_OK; } @@ -1433,6 +1532,7 @@ struct produce : produce_baseshim()); this->shim().EnableTransferOwnership(taskId, connectedStandbyAction); return S_OK; } @@ -1442,10 +1542,11 @@ struct produce : produce_base socketId) noexcept override + HRESULT __stdcall abi_TransferOwnership(impl::abi_arg_in socketId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return S_OK; } @@ -1455,10 +1556,11 @@ struct produce : produce_base socketId, abi_arg_in data) noexcept override + HRESULT __stdcall abi_TransferOwnershipWithContext(impl::abi_arg_in socketId, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return S_OK; } @@ -1468,10 +1570,11 @@ struct produce : produce_base socketId, abi_arg_in data, abi_arg_in keepAliveTime) noexcept override + HRESULT __stdcall abi_TransferOwnershipWithContextAndKeepAliveTime(impl::abi_arg_in socketId, impl::abi_arg_in data, impl::abi_arg_in keepAliveTime) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data), *reinterpret_cast(&keepAliveTime)); return S_OK; } @@ -1489,7 +1592,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().NoDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoDelay()); return S_OK; } catch (...) @@ -1502,6 +1606,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return S_OK; } @@ -1515,7 +1620,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().KeepAlive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeepAlive()); return S_OK; } catch (...) @@ -1528,6 +1634,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().KeepAlive(value); return S_OK; } @@ -1541,7 +1648,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().OutboundBufferSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundBufferSizeInBytes()); return S_OK; } catch (...) @@ -1554,6 +1662,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return S_OK; } @@ -1567,7 +1676,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().QualityOfService()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualityOfService()); return S_OK; } catch (...) @@ -1580,6 +1690,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(value); return S_OK; } @@ -1593,7 +1704,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().OutboundUnicastHopLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundUnicastHopLimit()); return S_OK; } catch (...) @@ -1606,6 +1718,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return S_OK; } @@ -1619,11 +1732,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_IgnorableServerCertificateErrors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IgnorableServerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IgnorableServerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IgnorableServerCertificateErrors()); return S_OK; } catch (...) @@ -1641,7 +1755,8 @@ struct produce : produce { try { - *value = detach(this->shim().SerializeConnectionAttempts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerializeConnectionAttempts()); return S_OK; } catch (...) @@ -1654,6 +1769,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SerializeConnectionAttempts(value); return S_OK; } @@ -1663,11 +1779,12 @@ struct produce : produce } } - HRESULT __stdcall get_ClientCertificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClientCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClientCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientCertificate()); return S_OK; } catch (...) @@ -1677,10 +1794,11 @@ struct produce : produce } } - HRESULT __stdcall put_ClientCertificate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ClientCertificate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClientCertificate(*reinterpret_cast(&value)); return S_OK; } @@ -1694,11 +1812,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_LocalAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalAddress()); return S_OK; } catch (...) @@ -1708,11 +1827,12 @@ struct produce : prod } } - HRESULT __stdcall get_LocalPort(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalPort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalPort()); return S_OK; } catch (...) @@ -1722,11 +1842,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemoteHostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteHostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteHostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteHostName()); return S_OK; } catch (...) @@ -1736,11 +1857,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemoteAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteAddress()); return S_OK; } catch (...) @@ -1750,11 +1872,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemoteServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteServiceName()); return S_OK; } catch (...) @@ -1764,11 +1887,12 @@ struct produce : prod } } - HRESULT __stdcall get_RemotePort(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemotePort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemotePort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemotePort()); return S_OK; } catch (...) @@ -1778,11 +1902,12 @@ struct produce : prod } } - HRESULT __stdcall get_RoundTripTimeStatistics(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoundTripTimeStatistics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoundTripTimeStatistics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoundTripTimeStatistics()); return S_OK; } catch (...) @@ -1791,11 +1916,12 @@ struct produce : prod } } - HRESULT __stdcall get_BandwidthStatistics(abi_arg_out value) noexcept override + HRESULT __stdcall get_BandwidthStatistics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BandwidthStatistics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BandwidthStatistics()); return S_OK; } catch (...) @@ -1808,7 +1934,8 @@ struct produce : prod { try { - *value = detach(this->shim().ProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionLevel()); return S_OK; } catch (...) @@ -1817,11 +1944,12 @@ struct produce : prod } } - HRESULT __stdcall get_SessionKey(abi_arg_out value) noexcept override + HRESULT __stdcall get_SessionKey(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionKey()); return S_OK; } catch (...) @@ -1839,7 +1967,8 @@ struct produce : pro { try { - *value = detach(this->shim().ServerCertificateErrorSeverity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrorSeverity()); return S_OK; } catch (...) @@ -1848,11 +1977,12 @@ struct produce : pro } } - HRESULT __stdcall get_ServerCertificateErrors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrors()); return S_OK; } catch (...) @@ -1862,11 +1992,12 @@ struct produce : pro } } - HRESULT __stdcall get_ServerCertificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServerCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificate()); return S_OK; } catch (...) @@ -1876,11 +2007,12 @@ struct produce : pro } } - HRESULT __stdcall get_ServerIntermediateCertificates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerIntermediateCertificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerIntermediateCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerIntermediateCertificates()); return S_OK; } catch (...) @@ -1894,11 +2026,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Control(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control()); return S_OK; } catch (...) @@ -1908,11 +2041,12 @@ struct produce : produce } } - HRESULT __stdcall get_Information(abi_arg_out value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -1922,11 +2056,12 @@ struct produce : produce } } - HRESULT __stdcall abi_BindServiceNameAsync(abi_arg_in localServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindServiceNameAsync(impl::abi_arg_in localServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName))); return S_OK; } catch (...) @@ -1936,11 +2071,12 @@ struct produce : produce } } - HRESULT __stdcall abi_BindEndpointAsync(abi_arg_in localHostName, abi_arg_in localServiceName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindEndpointAsync(impl::abi_arg_in localHostName, impl::abi_arg_in localServiceName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindEndpointAsync(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName))); return S_OK; } catch (...) @@ -1950,11 +2086,12 @@ struct produce : produce } } - HRESULT __stdcall add_ConnectionReceived(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ConnectionReceived(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ConnectionReceived(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ConnectionReceived(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1967,6 +2104,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ConnectionReceived(eventCookie); return S_OK; } @@ -1980,11 +2118,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_BindServiceNameWithProtectionLevelAsync(abi_arg_in localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindServiceNameWithProtectionLevelAsync(impl::abi_arg_in localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), protectionLevel)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), protectionLevel)); return S_OK; } catch (...) @@ -1994,11 +2133,12 @@ struct produce : produc } } - HRESULT __stdcall abi_BindServiceNameWithProtectionLevelAndAdapterAsync(abi_arg_in localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, abi_arg_in adapter, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_BindServiceNameWithProtectionLevelAndAdapterAsync(impl::abi_arg_in localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, impl::abi_arg_in adapter, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), protectionLevel, *reinterpret_cast(&adapter))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().BindServiceNameAsync(*reinterpret_cast(&localServiceName), protectionLevel, *reinterpret_cast(&adapter))); return S_OK; } catch (...) @@ -2012,11 +2152,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CancelIOAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CancelIOAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CancelIOAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CancelIOAsync()); return S_OK; } catch (...) @@ -2030,6 +2171,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(taskId); return S_OK; } @@ -2043,6 +2185,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableTransferOwnership(taskId, connectedStandbyAction); return S_OK; } @@ -2052,10 +2195,11 @@ struct produce : produc } } - HRESULT __stdcall abi_TransferOwnership(abi_arg_in socketId) noexcept override + HRESULT __stdcall abi_TransferOwnership(impl::abi_arg_in socketId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId)); return S_OK; } @@ -2065,10 +2209,11 @@ struct produce : produc } } - HRESULT __stdcall abi_TransferOwnershipWithContext(abi_arg_in socketId, abi_arg_in data) noexcept override + HRESULT __stdcall abi_TransferOwnershipWithContext(impl::abi_arg_in socketId, impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransferOwnership(*reinterpret_cast(&socketId), *reinterpret_cast(&data)); return S_OK; } @@ -2082,11 +2227,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Socket(abi_arg_out value) noexcept override + HRESULT __stdcall get_Socket(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Socket()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Socket()); return S_OK; } catch (...) @@ -2104,7 +2250,8 @@ struct produce : { try { - *value = detach(this->shim().QualityOfService()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QualityOfService()); return S_OK; } catch (...) @@ -2117,6 +2264,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().QualityOfService(value); return S_OK; } @@ -2134,7 +2282,8 @@ struct produce : { try { - *value = detach(this->shim().NoDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoDelay()); return S_OK; } catch (...) @@ -2147,6 +2296,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return S_OK; } @@ -2160,7 +2310,8 @@ struct produce : { try { - *value = detach(this->shim().KeepAlive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeepAlive()); return S_OK; } catch (...) @@ -2173,6 +2324,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().KeepAlive(value); return S_OK; } @@ -2186,7 +2338,8 @@ struct produce : { try { - *value = detach(this->shim().OutboundBufferSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundBufferSizeInBytes()); return S_OK; } catch (...) @@ -2199,6 +2352,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return S_OK; } @@ -2212,7 +2366,8 @@ struct produce : { try { - *value = detach(this->shim().OutboundUnicastHopLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundUnicastHopLimit()); return S_OK; } catch (...) @@ -2225,6 +2380,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundUnicastHopLimit(value); return S_OK; } @@ -2238,11 +2394,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_LocalPort(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalPort(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalPort()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalPort()); return S_OK; } catch (...) @@ -2256,11 +2413,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetEndpointPairsAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetEndpointPairsAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -2270,11 +2428,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetEndpointPairsWithSortOptionsAsync(abi_arg_in remoteHostName, abi_arg_in remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetEndpointPairsWithSortOptionsAsync(impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), sortOptions)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetEndpointPairsAsync(*reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName), sortOptions)); return S_OK; } catch (...) @@ -2288,11 +2447,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Control(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control()); return S_OK; } catch (...) @@ -2302,11 +2462,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Information(abi_arg_out value) noexcept override + HRESULT __stdcall get_Information(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Information()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Information()); return S_OK; } catch (...) @@ -2316,11 +2477,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_InputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStream()); return S_OK; } catch (...) @@ -2334,11 +2496,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall add_ServerCustomValidationRequested(abi_arg_in> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ServerCustomValidationRequested(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ServerCustomValidationRequested(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ServerCustomValidationRequested(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -2351,6 +2514,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerCustomValidationRequested(eventCookie); return S_OK; } @@ -2368,7 +2532,8 @@ struct produce : produ { try { - *value = detach(this->shim().NoDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoDelay()); return S_OK; } catch (...) @@ -2381,6 +2546,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().NoDelay(value); return S_OK; } @@ -2394,11 +2560,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_OutputStream(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutputStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutputStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutputStream()); return S_OK; } catch (...) @@ -2408,11 +2575,12 @@ struct produce : produce_base uri, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ConnectAsync(impl::abi_arg_in uri, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ConnectAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -2422,10 +2590,11 @@ struct produce : produce_base headerName, abi_arg_in headerValue) noexcept override + HRESULT __stdcall abi_SetRequestHeader(impl::abi_arg_in headerName, impl::abi_arg_in headerValue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return S_OK; } @@ -2435,11 +2604,12 @@ struct produce : produce_base> eventHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> eventHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().Closed(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().Closed(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -2452,6 +2622,7 @@ struct produce : produce_baseshim()); this->shim().Closed(eventCookie); return S_OK; } @@ -2461,10 +2632,11 @@ struct produce : produce_base reason) noexcept override + HRESULT __stdcall abi_CloseWithStatus(uint16_t code, impl::abi_arg_in reason) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Close(code, *reinterpret_cast(&reason)); return S_OK; } @@ -2482,7 +2654,8 @@ struct produce : pro { try { - *value = detach(this->shim().Code()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code()); return S_OK; } catch (...) @@ -2491,11 +2664,12 @@ struct produce : pro } } - HRESULT __stdcall get_Reason(abi_arg_out value) noexcept override + HRESULT __stdcall get_Reason(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -2513,7 +2687,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().OutboundBufferSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutboundBufferSizeInBytes()); return S_OK; } catch (...) @@ -2526,6 +2701,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().OutboundBufferSizeInBytes(value); return S_OK; } @@ -2535,11 +2711,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ServerCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServerCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCredential()); return S_OK; } catch (...) @@ -2549,10 +2726,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_ServerCredential(abi_arg_in value) noexcept override + HRESULT __stdcall put_ServerCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerCredential(*reinterpret_cast(&value)); return S_OK; } @@ -2562,11 +2740,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ProxyCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProxyCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProxyCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProxyCredential()); return S_OK; } catch (...) @@ -2576,10 +2755,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_ProxyCredential(abi_arg_in value) noexcept override + HRESULT __stdcall put_ProxyCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProxyCredential(*reinterpret_cast(&value)); return S_OK; } @@ -2589,11 +2769,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_SupportedProtocols(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedProtocols(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedProtocols()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedProtocols()); return S_OK; } catch (...) @@ -2607,11 +2788,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_IgnorableServerCertificateErrors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IgnorableServerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IgnorableServerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IgnorableServerCertificateErrors()); return S_OK; } catch (...) @@ -2629,7 +2811,8 @@ struct produce : produc { try { - *status = detach(this->shim().GetStatus(hresult)); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetStatus(hresult)); return S_OK; } catch (...) @@ -2642,11 +2825,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_LocalAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalAddress()); return S_OK; } catch (...) @@ -2656,11 +2840,12 @@ struct produce : produce } } - HRESULT __stdcall get_BandwidthStatistics(abi_arg_out value) noexcept override + HRESULT __stdcall get_BandwidthStatistics(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BandwidthStatistics()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BandwidthStatistics()); return S_OK; } catch (...) @@ -2669,11 +2854,12 @@ struct produce : produce } } - HRESULT __stdcall get_Protocol(abi_arg_out value) noexcept override + HRESULT __stdcall get_Protocol(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Protocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Protocol()); return S_OK; } catch (...) @@ -2687,11 +2873,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ServerCertificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServerCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificate()); return S_OK; } catch (...) @@ -2705,7 +2892,8 @@ struct produce : produc { try { - *value = detach(this->shim().ServerCertificateErrorSeverity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrorSeverity()); return S_OK; } catch (...) @@ -2714,11 +2902,12 @@ struct produce : produc } } - HRESULT __stdcall get_ServerCertificateErrors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrors()); return S_OK; } catch (...) @@ -2728,11 +2917,12 @@ struct produce : produc } } - HRESULT __stdcall get_ServerIntermediateCertificates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerIntermediateCertificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerIntermediateCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerIntermediateCertificates()); return S_OK; } catch (...) @@ -2746,11 +2936,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ServerCertificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServerCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificate()); return S_OK; } catch (...) @@ -2764,7 +2955,8 @@ struct produceshim().ServerCertificateErrorSeverity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrorSeverity()); return S_OK; } catch (...) @@ -2773,11 +2965,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ServerCertificateErrors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerCertificateErrors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerCertificateErrors()); return S_OK; } catch (...) @@ -2787,11 +2980,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ServerIntermediateCertificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerIntermediateCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerIntermediateCertificates()); return S_OK; } catch (...) @@ -2805,6 +2999,7 @@ struct produceshim()); this->shim().Reject(); return S_OK; } @@ -2814,11 +3009,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -2836,331 +3032,331 @@ namespace Windows::Networking::Sockets { template GUID impl_ISocketActivityInformation::TaskId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TaskId(&value)); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_TaskId(&value)); return value; } template hstring impl_ISocketActivityInformation::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_Id(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketActivityKind impl_ISocketActivityInformation::SocketKind() const { Windows::Networking::Sockets::SocketActivityKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SocketKind(&value)); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_SocketKind(&value)); return value; } template Windows::Networking::Sockets::SocketActivityContext impl_ISocketActivityInformation::Context() const { Windows::Networking::Sockets::SocketActivityContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Context(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_Context(put_abi(value))); return value; } template Windows::Networking::Sockets::DatagramSocket impl_ISocketActivityInformation::DatagramSocket() const { Windows::Networking::Sockets::DatagramSocket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DatagramSocket(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_DatagramSocket(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocket impl_ISocketActivityInformation::StreamSocket() const { Windows::Networking::Sockets::StreamSocket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StreamSocket(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_StreamSocket(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocketListener impl_ISocketActivityInformation::StreamSocketListener() const { Windows::Networking::Sockets::StreamSocketListener value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StreamSocketListener(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityInformation)->get_StreamSocketListener(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketActivityTriggerReason impl_ISocketActivityTriggerDetails::Reason() const { Windows::Networking::Sockets::SocketActivityTriggerReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(ISocketActivityTriggerDetails)->get_Reason(&value)); return value; } template Windows::Networking::Sockets::SocketActivityInformation impl_ISocketActivityTriggerDetails::SocketInformation() const { Windows::Networking::Sockets::SocketActivityInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SocketInformation(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityTriggerDetails)->get_SocketInformation(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_ISocketActivityInformationStatics::AllSockets() const { Windows::Foundation::Collections::IMapView sockets; - check_hresult(static_cast(static_cast(*this))->get_AllSockets(put(sockets))); + check_hresult(WINRT_SHIM(ISocketActivityInformationStatics)->get_AllSockets(put_abi(sockets))); return sockets; } template Windows::Storage::Streams::IBuffer impl_ISocketActivityContext::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(ISocketActivityContext)->get_Data(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketActivityContext impl_ISocketActivityContextFactory::Create(const Windows::Storage::Streams::IBuffer & data) const { Windows::Networking::Sockets::SocketActivityContext context { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(data), put(context))); + check_hresult(WINRT_SHIM(ISocketActivityContextFactory)->abi_Create(get_abi(data), put_abi(context))); return context; } template Windows::Networking::HostName impl_IDatagramSocketMessageReceivedEventArgs::RemoteAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteAddress(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketMessageReceivedEventArgs)->get_RemoteAddress(put_abi(value))); return value; } template hstring impl_IDatagramSocketMessageReceivedEventArgs::RemotePort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemotePort(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketMessageReceivedEventArgs)->get_RemotePort(put_abi(value))); return value; } template Windows::Networking::HostName impl_IDatagramSocketMessageReceivedEventArgs::LocalAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalAddress(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketMessageReceivedEventArgs)->get_LocalAddress(put_abi(value))); return value; } template Windows::Storage::Streams::DataReader impl_IDatagramSocketMessageReceivedEventArgs::GetDataReader() const { Windows::Storage::Streams::DataReader dataReader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDataReader(put(dataReader))); + check_hresult(WINRT_SHIM(IDatagramSocketMessageReceivedEventArgs)->abi_GetDataReader(put_abi(dataReader))); return dataReader; } template Windows::Storage::Streams::IInputStream impl_IDatagramSocketMessageReceivedEventArgs::GetDataStream() const { Windows::Storage::Streams::IInputStream inputStream; - check_hresult(static_cast(static_cast(*this))->abi_GetDataStream(put(inputStream))); + check_hresult(WINRT_SHIM(IDatagramSocketMessageReceivedEventArgs)->abi_GetDataStream(put_abi(inputStream))); return inputStream; } template Windows::Networking::Sockets::SocketMessageType impl_IMessageWebSocketMessageReceivedEventArgs::MessageType() const { Windows::Networking::Sockets::SocketMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageType(&value)); + check_hresult(WINRT_SHIM(IMessageWebSocketMessageReceivedEventArgs)->get_MessageType(&value)); return value; } template Windows::Storage::Streams::DataReader impl_IMessageWebSocketMessageReceivedEventArgs::GetDataReader() const { Windows::Storage::Streams::DataReader dataReader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDataReader(put(dataReader))); + check_hresult(WINRT_SHIM(IMessageWebSocketMessageReceivedEventArgs)->abi_GetDataReader(put_abi(dataReader))); return dataReader; } template Windows::Storage::Streams::IInputStream impl_IMessageWebSocketMessageReceivedEventArgs::GetDataStream() const { Windows::Storage::Streams::IInputStream inputStream; - check_hresult(static_cast(static_cast(*this))->abi_GetDataStream(put(inputStream))); + check_hresult(WINRT_SHIM(IMessageWebSocketMessageReceivedEventArgs)->abi_GetDataStream(put_abi(inputStream))); return inputStream; } template uint16_t impl_IWebSocketClosedEventArgs::Code() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Code(&value)); + check_hresult(WINRT_SHIM(IWebSocketClosedEventArgs)->get_Code(&value)); return value; } template hstring impl_IWebSocketClosedEventArgs::Reason() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Reason(put(value))); + check_hresult(WINRT_SHIM(IWebSocketClosedEventArgs)->get_Reason(put_abi(value))); return value; } template Windows::Networking::HostName impl_IDatagramSocketInformation::LocalAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalAddress(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketInformation)->get_LocalAddress(put_abi(value))); return value; } template hstring impl_IDatagramSocketInformation::LocalPort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalPort(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketInformation)->get_LocalPort(put_abi(value))); return value; } template Windows::Networking::HostName impl_IDatagramSocketInformation::RemoteAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteAddress(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketInformation)->get_RemoteAddress(put_abi(value))); return value; } template hstring impl_IDatagramSocketInformation::RemotePort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemotePort(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocketInformation)->get_RemotePort(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketQualityOfService impl_IDatagramSocketControl::QualityOfService() const { Windows::Networking::Sockets::SocketQualityOfService value {}; - check_hresult(static_cast(static_cast(*this))->get_QualityOfService(&value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl)->get_QualityOfService(&value)); return value; } template void impl_IDatagramSocketControl::QualityOfService(Windows::Networking::Sockets::SocketQualityOfService value) const { - check_hresult(static_cast(static_cast(*this))->put_QualityOfService(value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl)->put_QualityOfService(value)); } template uint8_t impl_IDatagramSocketControl::OutboundUnicastHopLimit() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundUnicastHopLimit(&value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl)->get_OutboundUnicastHopLimit(&value)); return value; } template void impl_IDatagramSocketControl::OutboundUnicastHopLimit(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundUnicastHopLimit(value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl)->put_OutboundUnicastHopLimit(value)); } template uint32_t impl_IDatagramSocketControl2::InboundBufferSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InboundBufferSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl2)->get_InboundBufferSizeInBytes(&value)); return value; } template void impl_IDatagramSocketControl2::InboundBufferSizeInBytes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_InboundBufferSizeInBytes(value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl2)->put_InboundBufferSizeInBytes(value)); } template bool impl_IDatagramSocketControl2::DontFragment() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DontFragment(&value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl2)->get_DontFragment(&value)); return value; } template void impl_IDatagramSocketControl2::DontFragment(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DontFragment(value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl2)->put_DontFragment(value)); } template bool impl_IDatagramSocketControl3::MulticastOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MulticastOnly(&value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl3)->get_MulticastOnly(&value)); return value; } template void impl_IDatagramSocketControl3::MulticastOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MulticastOnly(value)); + check_hresult(WINRT_SHIM(IDatagramSocketControl3)->put_MulticastOnly(value)); } -template Windows::Foundation::IAsyncOperation> impl_IDatagramSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Foundation::IAsyncOperation> impl_IDatagramSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetEndpointPairsAsync(get(remoteHostName), get(remoteServiceName), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocketStatics)->abi_GetEndpointPairsAsync(get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IDatagramSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) const +template Windows::Foundation::IAsyncOperation> impl_IDatagramSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetEndpointPairsWithSortOptionsAsync(get(remoteHostName), get(remoteServiceName), sortOptions, put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocketStatics)->abi_GetEndpointPairsWithSortOptionsAsync(get_abi(remoteHostName), get_abi(remoteServiceName), sortOptions, put_abi(operation))); return operation; } template Windows::Networking::Sockets::DatagramSocketControl impl_IDatagramSocket::Control() const { Windows::Networking::Sockets::DatagramSocketControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Control(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocket)->get_Control(put_abi(value))); return value; } template Windows::Networking::Sockets::DatagramSocketInformation impl_IDatagramSocket::Information() const { Windows::Networking::Sockets::DatagramSocketInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocket)->get_Information(put_abi(value))); return value; } template Windows::Storage::Streams::IOutputStream impl_IDatagramSocket::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(IDatagramSocket)->get_OutputStream(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IDatagramSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Foundation::IAsyncAction impl_IDatagramSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(remoteHostName), get(remoteServiceName), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_ConnectAsync(get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IDatagramSocket::ConnectAsync(const Windows::Networking::EndpointPair & endpointPair) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithEndpointPairAsync(get(endpointPair), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_ConnectWithEndpointPairAsync(get_abi(endpointPair), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IDatagramSocket::BindServiceNameAsync(hstring_ref localServiceName) const +template Windows::Foundation::IAsyncAction impl_IDatagramSocket::BindServiceNameAsync(hstring_view localServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindServiceNameAsync(get(localServiceName), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_BindServiceNameAsync(get_abi(localServiceName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IDatagramSocket::BindEndpointAsync(const Windows::Networking::HostName & localHostName, hstring_ref localServiceName) const +template Windows::Foundation::IAsyncAction impl_IDatagramSocket::BindEndpointAsync(const Windows::Networking::HostName & localHostName, hstring_view localServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindEndpointAsync(get(localHostName), get(localServiceName), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_BindEndpointAsync(get_abi(localHostName), get_abi(localServiceName), put_abi(operation))); return operation; } template void impl_IDatagramSocket::JoinMulticastGroup(const Windows::Networking::HostName & host) const { - check_hresult(static_cast(static_cast(*this))->abi_JoinMulticastGroup(get(host))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_JoinMulticastGroup(get_abi(host))); } -template Windows::Foundation::IAsyncOperation impl_IDatagramSocket::GetOutputStreamAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Foundation::IAsyncOperation impl_IDatagramSocket::GetOutputStreamAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetOutputStreamAsync(get(remoteHostName), get(remoteServiceName), put(value))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_GetOutputStreamAsync(get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDatagramSocket::GetOutputStreamAsync(const Windows::Networking::EndpointPair & endpointPair) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetOutputStreamWithEndpointPairAsync(get(endpointPair), put(value))); + check_hresult(WINRT_SHIM(IDatagramSocket)->abi_GetOutputStreamWithEndpointPairAsync(get_abi(endpointPair), put_abi(value))); return value; } template event_token impl_IDatagramSocket::MessageReceived(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IDatagramSocket)->add_MessageReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3171,459 +3367,459 @@ template event_revoker impl_IDatagramSocket::Me template void impl_IDatagramSocket::MessageReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceived(eventCookie)); + check_hresult(WINRT_SHIM(IDatagramSocket)->remove_MessageReceived(eventCookie)); } -template Windows::Foundation::IAsyncAction impl_IDatagramSocket2::BindServiceNameAsync(hstring_ref localServiceName, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const +template Windows::Foundation::IAsyncAction impl_IDatagramSocket2::BindServiceNameAsync(hstring_view localServiceName, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindServiceNameAndAdapterAsync(get(localServiceName), get(adapter), put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket2)->abi_BindServiceNameAndAdapterAsync(get_abi(localServiceName), get_abi(adapter), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IDatagramSocket3::CancelIOAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CancelIOAsync(put(operation))); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_CancelIOAsync(put_abi(operation))); return operation; } template void impl_IDatagramSocket3::EnableTransferOwnership(GUID taskId) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnership(taskId)); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_EnableTransferOwnership(taskId)); } template void impl_IDatagramSocket3::EnableTransferOwnership(GUID taskId, Windows::Networking::Sockets::SocketActivityConnectedStandbyAction connectedStandbyAction) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); } -template void impl_IDatagramSocket3::TransferOwnership(hstring_ref socketId) const +template void impl_IDatagramSocket3::TransferOwnership(hstring_view socketId) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnership(get(socketId))); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_TransferOwnership(get_abi(socketId))); } -template void impl_IDatagramSocket3::TransferOwnership(hstring_ref socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const +template void impl_IDatagramSocket3::TransferOwnership(hstring_view socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnershipWithContext(get(socketId), get(data))); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_TransferOwnershipWithContext(get_abi(socketId), get_abi(data))); } -template void impl_IDatagramSocket3::TransferOwnership(hstring_ref socketId, const Windows::Networking::Sockets::SocketActivityContext & data, const Windows::Foundation::TimeSpan & keepAliveTime) const +template void impl_IDatagramSocket3::TransferOwnership(hstring_view socketId, const Windows::Networking::Sockets::SocketActivityContext & data, const Windows::Foundation::TimeSpan & keepAliveTime) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnershipWithContextAndKeepAliveTime(get(socketId), get(data), get(keepAliveTime))); + check_hresult(WINRT_SHIM(IDatagramSocket3)->abi_TransferOwnershipWithContextAndKeepAliveTime(get_abi(socketId), get_abi(data), get_abi(keepAliveTime))); } template Windows::Networking::HostName impl_IStreamSocketInformation::LocalAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalAddress(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_LocalAddress(put_abi(value))); return value; } template hstring impl_IStreamSocketInformation::LocalPort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalPort(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_LocalPort(put_abi(value))); return value; } template Windows::Networking::HostName impl_IStreamSocketInformation::RemoteHostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteHostName(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_RemoteHostName(put_abi(value))); return value; } template Windows::Networking::HostName impl_IStreamSocketInformation::RemoteAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteAddress(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_RemoteAddress(put_abi(value))); return value; } template hstring impl_IStreamSocketInformation::RemoteServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteServiceName(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_RemoteServiceName(put_abi(value))); return value; } template hstring impl_IStreamSocketInformation::RemotePort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemotePort(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_RemotePort(put_abi(value))); return value; } template Windows::Networking::Sockets::RoundTripTimeStatistics impl_IStreamSocketInformation::RoundTripTimeStatistics() const { Windows::Networking::Sockets::RoundTripTimeStatistics value {}; - check_hresult(static_cast(static_cast(*this))->get_RoundTripTimeStatistics(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_RoundTripTimeStatistics(put_abi(value))); return value; } template Windows::Networking::Sockets::BandwidthStatistics impl_IStreamSocketInformation::BandwidthStatistics() const { Windows::Networking::Sockets::BandwidthStatistics value {}; - check_hresult(static_cast(static_cast(*this))->get_BandwidthStatistics(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketProtectionLevel impl_IStreamSocketInformation::ProtectionLevel() const { Windows::Networking::Sockets::SocketProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_ProtectionLevel(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IStreamSocketInformation::SessionKey() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SessionKey(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation)->get_SessionKey(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketSslErrorSeverity impl_IStreamSocketInformation2::ServerCertificateErrorSeverity() const { Windows::Networking::Sockets::SocketSslErrorSeverity value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrorSeverity(&value)); + check_hresult(WINRT_SHIM(IStreamSocketInformation2)->get_ServerCertificateErrorSeverity(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IStreamSocketInformation2::ServerCertificateErrors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation2)->get_ServerCertificateErrors(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_IStreamSocketInformation2::ServerCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificate(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation2)->get_ServerCertificate(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStreamSocketInformation2::ServerIntermediateCertificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerIntermediateCertificates(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketInformation2)->get_ServerIntermediateCertificates(put_abi(value))); return value; } template bool impl_IStreamSocketControl::NoDelay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NoDelay(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->get_NoDelay(&value)); return value; } template void impl_IStreamSocketControl::NoDelay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NoDelay(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->put_NoDelay(value)); } template bool impl_IStreamSocketControl::KeepAlive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeepAlive(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->get_KeepAlive(&value)); return value; } template void impl_IStreamSocketControl::KeepAlive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeepAlive(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->put_KeepAlive(value)); } template uint32_t impl_IStreamSocketControl::OutboundBufferSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundBufferSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->get_OutboundBufferSizeInBytes(&value)); return value; } template void impl_IStreamSocketControl::OutboundBufferSizeInBytes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundBufferSizeInBytes(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->put_OutboundBufferSizeInBytes(value)); } template Windows::Networking::Sockets::SocketQualityOfService impl_IStreamSocketControl::QualityOfService() const { Windows::Networking::Sockets::SocketQualityOfService value {}; - check_hresult(static_cast(static_cast(*this))->get_QualityOfService(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->get_QualityOfService(&value)); return value; } template void impl_IStreamSocketControl::QualityOfService(Windows::Networking::Sockets::SocketQualityOfService value) const { - check_hresult(static_cast(static_cast(*this))->put_QualityOfService(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->put_QualityOfService(value)); } template uint8_t impl_IStreamSocketControl::OutboundUnicastHopLimit() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundUnicastHopLimit(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->get_OutboundUnicastHopLimit(&value)); return value; } template void impl_IStreamSocketControl::OutboundUnicastHopLimit(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundUnicastHopLimit(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl)->put_OutboundUnicastHopLimit(value)); } template Windows::Foundation::Collections::IVector impl_IStreamSocketControl2::IgnorableServerCertificateErrors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_IgnorableServerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketControl2)->get_IgnorableServerCertificateErrors(put_abi(value))); return value; } template bool impl_IStreamSocketControl3::SerializeConnectionAttempts() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SerializeConnectionAttempts(&value)); + check_hresult(WINRT_SHIM(IStreamSocketControl3)->get_SerializeConnectionAttempts(&value)); return value; } template void impl_IStreamSocketControl3::SerializeConnectionAttempts(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SerializeConnectionAttempts(value)); + check_hresult(WINRT_SHIM(IStreamSocketControl3)->put_SerializeConnectionAttempts(value)); } template Windows::Security::Cryptography::Certificates::Certificate impl_IStreamSocketControl3::ClientCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClientCertificate(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketControl3)->get_ClientCertificate(put_abi(value))); return value; } template void impl_IStreamSocketControl3::ClientCertificate(const Windows::Security::Cryptography::Certificates::Certificate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ClientCertificate(get(value))); + check_hresult(WINRT_SHIM(IStreamSocketControl3)->put_ClientCertificate(get_abi(value))); } template Windows::Networking::Sockets::StreamSocketControl impl_IStreamSocket::Control() const { Windows::Networking::Sockets::StreamSocketControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Control(put(value))); + check_hresult(WINRT_SHIM(IStreamSocket)->get_Control(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocketInformation impl_IStreamSocket::Information() const { Windows::Networking::Sockets::StreamSocketInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IStreamSocket)->get_Information(put_abi(value))); return value; } template Windows::Storage::Streams::IInputStream impl_IStreamSocket::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(IStreamSocket)->get_InputStream(put_abi(value))); return value; } template Windows::Storage::Streams::IOutputStream impl_IStreamSocket::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(IStreamSocket)->get_OutputStream(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::EndpointPair & endpointPair) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithEndpointPairAsync(get(endpointPair), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket)->abi_ConnectWithEndpointPairAsync(get_abi(endpointPair), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(remoteHostName), get(remoteServiceName), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket)->abi_ConnectAsync(get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::EndpointPair & endpointPair, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithEndpointPairAndProtectionLevelAsync(get(endpointPair), protectionLevel, put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket)->abi_ConnectWithEndpointPairAndProtectionLevelAsync(get_abi(endpointPair), protectionLevel, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel) const +template Windows::Foundation::IAsyncAction impl_IStreamSocket::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithProtectionLevelAsync(get(remoteHostName), get(remoteServiceName), protectionLevel, put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket)->abi_ConnectWithProtectionLevelAsync(get_abi(remoteHostName), get_abi(remoteServiceName), protectionLevel, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStreamSocket::UpgradeToSslAsync(Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, const Windows::Networking::HostName & validationHostName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_UpgradeToSslAsync(protectionLevel, get(validationHostName), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket)->abi_UpgradeToSslAsync(protectionLevel, get_abi(validationHostName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStreamSocket2::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const +template Windows::Foundation::IAsyncAction impl_IStreamSocket2::ConnectAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectWithProtectionLevelAndAdapterAsync(get(remoteHostName), get(remoteServiceName), protectionLevel, get(adapter), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket2)->abi_ConnectWithProtectionLevelAndAdapterAsync(get_abi(remoteHostName), get_abi(remoteServiceName), protectionLevel, get_abi(adapter), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStreamSocket3::CancelIOAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CancelIOAsync(put(operation))); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_CancelIOAsync(put_abi(operation))); return operation; } template void impl_IStreamSocket3::EnableTransferOwnership(GUID taskId) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnership(taskId)); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_EnableTransferOwnership(taskId)); } template void impl_IStreamSocket3::EnableTransferOwnership(GUID taskId, Windows::Networking::Sockets::SocketActivityConnectedStandbyAction connectedStandbyAction) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); } -template void impl_IStreamSocket3::TransferOwnership(hstring_ref socketId) const +template void impl_IStreamSocket3::TransferOwnership(hstring_view socketId) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnership(get(socketId))); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_TransferOwnership(get_abi(socketId))); } -template void impl_IStreamSocket3::TransferOwnership(hstring_ref socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const +template void impl_IStreamSocket3::TransferOwnership(hstring_view socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnershipWithContext(get(socketId), get(data))); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_TransferOwnershipWithContext(get_abi(socketId), get_abi(data))); } -template void impl_IStreamSocket3::TransferOwnership(hstring_ref socketId, const Windows::Networking::Sockets::SocketActivityContext & data, const Windows::Foundation::TimeSpan & keepAliveTime) const +template void impl_IStreamSocket3::TransferOwnership(hstring_view socketId, const Windows::Networking::Sockets::SocketActivityContext & data, const Windows::Foundation::TimeSpan & keepAliveTime) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnershipWithContextAndKeepAliveTime(get(socketId), get(data), get(keepAliveTime))); + check_hresult(WINRT_SHIM(IStreamSocket3)->abi_TransferOwnershipWithContextAndKeepAliveTime(get_abi(socketId), get_abi(data), get_abi(keepAliveTime))); } -template Windows::Foundation::IAsyncOperation> impl_IStreamSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Foundation::IAsyncOperation> impl_IStreamSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetEndpointPairsAsync(get(remoteHostName), get(remoteServiceName), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketStatics)->abi_GetEndpointPairsAsync(get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IStreamSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) const +template Windows::Foundation::IAsyncOperation> impl_IStreamSocketStatics::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetEndpointPairsWithSortOptionsAsync(get(remoteHostName), get(remoteServiceName), sortOptions, put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketStatics)->abi_GetEndpointPairsWithSortOptionsAsync(get_abi(remoteHostName), get_abi(remoteServiceName), sortOptions, put_abi(operation))); return operation; } template Windows::Networking::Sockets::SocketQualityOfService impl_IStreamSocketListenerControl::QualityOfService() const { Windows::Networking::Sockets::SocketQualityOfService value {}; - check_hresult(static_cast(static_cast(*this))->get_QualityOfService(&value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl)->get_QualityOfService(&value)); return value; } template void impl_IStreamSocketListenerControl::QualityOfService(Windows::Networking::Sockets::SocketQualityOfService value) const { - check_hresult(static_cast(static_cast(*this))->put_QualityOfService(value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl)->put_QualityOfService(value)); } template bool impl_IStreamSocketListenerControl2::NoDelay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NoDelay(&value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->get_NoDelay(&value)); return value; } template void impl_IStreamSocketListenerControl2::NoDelay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NoDelay(value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->put_NoDelay(value)); } template bool impl_IStreamSocketListenerControl2::KeepAlive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeepAlive(&value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->get_KeepAlive(&value)); return value; } template void impl_IStreamSocketListenerControl2::KeepAlive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeepAlive(value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->put_KeepAlive(value)); } template uint32_t impl_IStreamSocketListenerControl2::OutboundBufferSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundBufferSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->get_OutboundBufferSizeInBytes(&value)); return value; } template void impl_IStreamSocketListenerControl2::OutboundBufferSizeInBytes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundBufferSizeInBytes(value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->put_OutboundBufferSizeInBytes(value)); } template uint8_t impl_IStreamSocketListenerControl2::OutboundUnicastHopLimit() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundUnicastHopLimit(&value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->get_OutboundUnicastHopLimit(&value)); return value; } template void impl_IStreamSocketListenerControl2::OutboundUnicastHopLimit(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundUnicastHopLimit(value)); + check_hresult(WINRT_SHIM(IStreamSocketListenerControl2)->put_OutboundUnicastHopLimit(value)); } template hstring impl_IStreamSocketListenerInformation::LocalPort() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalPort(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketListenerInformation)->get_LocalPort(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocket impl_IStreamSocketListenerConnectionReceivedEventArgs::Socket() const { Windows::Networking::Sockets::StreamSocket value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Socket(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketListenerConnectionReceivedEventArgs)->get_Socket(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocketListenerControl impl_IStreamSocketListener::Control() const { Windows::Networking::Sockets::StreamSocketListenerControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Control(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketListener)->get_Control(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamSocketListenerInformation impl_IStreamSocketListener::Information() const { Windows::Networking::Sockets::StreamSocketListenerInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IStreamSocketListener)->get_Information(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IStreamSocketListener::BindServiceNameAsync(hstring_ref localServiceName) const +template Windows::Foundation::IAsyncAction impl_IStreamSocketListener::BindServiceNameAsync(hstring_view localServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindServiceNameAsync(get(localServiceName), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketListener)->abi_BindServiceNameAsync(get_abi(localServiceName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStreamSocketListener::BindEndpointAsync(const Windows::Networking::HostName & localHostName, hstring_ref localServiceName) const +template Windows::Foundation::IAsyncAction impl_IStreamSocketListener::BindEndpointAsync(const Windows::Networking::HostName & localHostName, hstring_view localServiceName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindEndpointAsync(get(localHostName), get(localServiceName), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketListener)->abi_BindEndpointAsync(get_abi(localHostName), get_abi(localServiceName), put_abi(operation))); return operation; } template event_token impl_IStreamSocketListener::ConnectionReceived(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ConnectionReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IStreamSocketListener)->add_ConnectionReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3634,212 +3830,212 @@ template event_revoker impl_IStreamSocketLis template void impl_IStreamSocketListener::ConnectionReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ConnectionReceived(eventCookie)); + check_hresult(WINRT_SHIM(IStreamSocketListener)->remove_ConnectionReceived(eventCookie)); } -template Windows::Foundation::IAsyncAction impl_IStreamSocketListener2::BindServiceNameAsync(hstring_ref localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel) const +template Windows::Foundation::IAsyncAction impl_IStreamSocketListener2::BindServiceNameAsync(hstring_view localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindServiceNameWithProtectionLevelAsync(get(localServiceName), protectionLevel, put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketListener2)->abi_BindServiceNameWithProtectionLevelAsync(get_abi(localServiceName), protectionLevel, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStreamSocketListener2::BindServiceNameAsync(hstring_ref localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const +template Windows::Foundation::IAsyncAction impl_IStreamSocketListener2::BindServiceNameAsync(hstring_view localServiceName, Windows::Networking::Sockets::SocketProtectionLevel protectionLevel, const Windows::Networking::Connectivity::NetworkAdapter & adapter) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_BindServiceNameWithProtectionLevelAndAdapterAsync(get(localServiceName), protectionLevel, get(adapter), put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketListener2)->abi_BindServiceNameWithProtectionLevelAndAdapterAsync(get_abi(localServiceName), protectionLevel, get_abi(adapter), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStreamSocketListener3::CancelIOAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CancelIOAsync(put(operation))); + check_hresult(WINRT_SHIM(IStreamSocketListener3)->abi_CancelIOAsync(put_abi(operation))); return operation; } template void impl_IStreamSocketListener3::EnableTransferOwnership(GUID taskId) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnership(taskId)); + check_hresult(WINRT_SHIM(IStreamSocketListener3)->abi_EnableTransferOwnership(taskId)); } template void impl_IStreamSocketListener3::EnableTransferOwnership(GUID taskId, Windows::Networking::Sockets::SocketActivityConnectedStandbyAction connectedStandbyAction) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); + check_hresult(WINRT_SHIM(IStreamSocketListener3)->abi_EnableTransferOwnershipWithConnectedStandbyAction(taskId, connectedStandbyAction)); } -template void impl_IStreamSocketListener3::TransferOwnership(hstring_ref socketId) const +template void impl_IStreamSocketListener3::TransferOwnership(hstring_view socketId) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnership(get(socketId))); + check_hresult(WINRT_SHIM(IStreamSocketListener3)->abi_TransferOwnership(get_abi(socketId))); } -template void impl_IStreamSocketListener3::TransferOwnership(hstring_ref socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const +template void impl_IStreamSocketListener3::TransferOwnership(hstring_view socketId, const Windows::Networking::Sockets::SocketActivityContext & data) const { - check_hresult(static_cast(static_cast(*this))->abi_TransferOwnershipWithContext(get(socketId), get(data))); + check_hresult(WINRT_SHIM(IStreamSocketListener3)->abi_TransferOwnershipWithContext(get_abi(socketId), get_abi(data))); } template Windows::Security::Cryptography::Certificates::Certificate impl_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificate(put(value))); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificate(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketSslErrorSeverity impl_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificateErrorSeverity() const { Windows::Networking::Sockets::SocketSslErrorSeverity value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrorSeverity(&value)); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrorSeverity(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IWebSocketServerCustomValidationRequestedEventArgs::ServerCertificateErrors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerCertificateErrors(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWebSocketServerCustomValidationRequestedEventArgs::ServerIntermediateCertificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerIntermediateCertificates(put(value))); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->get_ServerIntermediateCertificates(put_abi(value))); return value; } template void impl_IWebSocketServerCustomValidationRequestedEventArgs::Reject() const { - check_hresult(static_cast(static_cast(*this))->abi_Reject()); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->abi_Reject()); } template Windows::Foundation::Deferral impl_IWebSocketServerCustomValidationRequestedEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IWebSocketServerCustomValidationRequestedEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template uint32_t impl_IWebSocketControl::OutboundBufferSizeInBytes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OutboundBufferSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IWebSocketControl)->get_OutboundBufferSizeInBytes(&value)); return value; } template void impl_IWebSocketControl::OutboundBufferSizeInBytes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_OutboundBufferSizeInBytes(value)); + check_hresult(WINRT_SHIM(IWebSocketControl)->put_OutboundBufferSizeInBytes(value)); } template Windows::Security::Credentials::PasswordCredential impl_IWebSocketControl::ServerCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerCredential(put(value))); + check_hresult(WINRT_SHIM(IWebSocketControl)->get_ServerCredential(put_abi(value))); return value; } template void impl_IWebSocketControl::ServerCredential(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_ServerCredential(get(value))); + check_hresult(WINRT_SHIM(IWebSocketControl)->put_ServerCredential(get_abi(value))); } template Windows::Security::Credentials::PasswordCredential impl_IWebSocketControl::ProxyCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProxyCredential(put(value))); + check_hresult(WINRT_SHIM(IWebSocketControl)->get_ProxyCredential(put_abi(value))); return value; } template void impl_IWebSocketControl::ProxyCredential(const Windows::Security::Credentials::PasswordCredential & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProxyCredential(get(value))); + check_hresult(WINRT_SHIM(IWebSocketControl)->put_ProxyCredential(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IWebSocketControl::SupportedProtocols() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SupportedProtocols(put(value))); + check_hresult(WINRT_SHIM(IWebSocketControl)->get_SupportedProtocols(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IWebSocketControl2::IgnorableServerCertificateErrors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_IgnorableServerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IWebSocketControl2)->get_IgnorableServerCertificateErrors(put_abi(value))); return value; } template Windows::Networking::HostName impl_IWebSocketInformation::LocalAddress() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalAddress(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation)->get_LocalAddress(put_abi(value))); return value; } template Windows::Networking::Sockets::BandwidthStatistics impl_IWebSocketInformation::BandwidthStatistics() const { Windows::Networking::Sockets::BandwidthStatistics value {}; - check_hresult(static_cast(static_cast(*this))->get_BandwidthStatistics(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation)->get_BandwidthStatistics(put_abi(value))); return value; } template hstring impl_IWebSocketInformation::Protocol() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Protocol(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation)->get_Protocol(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_IWebSocketInformation2::ServerCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificate(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation2)->get_ServerCertificate(put_abi(value))); return value; } template Windows::Networking::Sockets::SocketSslErrorSeverity impl_IWebSocketInformation2::ServerCertificateErrorSeverity() const { Windows::Networking::Sockets::SocketSslErrorSeverity value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrorSeverity(&value)); + check_hresult(WINRT_SHIM(IWebSocketInformation2)->get_ServerCertificateErrorSeverity(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IWebSocketInformation2::ServerCertificateErrors() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerCertificateErrors(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation2)->get_ServerCertificateErrors(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWebSocketInformation2::ServerIntermediateCertificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerIntermediateCertificates(put(value))); + check_hresult(WINRT_SHIM(IWebSocketInformation2)->get_ServerIntermediateCertificates(put_abi(value))); return value; } template Windows::Storage::Streams::IOutputStream impl_IWebSocket::OutputStream() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_OutputStream(put(value))); + check_hresult(WINRT_SHIM(IWebSocket)->get_OutputStream(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IWebSocket::ConnectAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectAsync(get(uri), put(operation))); + check_hresult(WINRT_SHIM(IWebSocket)->abi_ConnectAsync(get_abi(uri), put_abi(operation))); return operation; } -template void impl_IWebSocket::SetRequestHeader(hstring_ref headerName, hstring_ref headerValue) const +template void impl_IWebSocket::SetRequestHeader(hstring_view headerName, hstring_view headerValue) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRequestHeader(get(headerName), get(headerValue))); + check_hresult(WINRT_SHIM(IWebSocket)->abi_SetRequestHeader(get_abi(headerName), get_abi(headerValue))); } template event_token impl_IWebSocket::Closed(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IWebSocket)->add_Closed(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3850,56 +4046,56 @@ template event_revoker impl_IWebSocket::Closed(auto_ template void impl_IWebSocket::Closed(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(eventCookie)); + check_hresult(WINRT_SHIM(IWebSocket)->remove_Closed(eventCookie)); } -template void impl_IWebSocket::Close(uint16_t code, hstring_ref reason) const +template void impl_IWebSocket::Close(uint16_t code, hstring_view reason) const { - check_hresult(static_cast(static_cast(*this))->abi_CloseWithStatus(code, get(reason))); + check_hresult(WINRT_SHIM(IWebSocket)->abi_CloseWithStatus(code, get_abi(reason))); } template uint32_t impl_IMessageWebSocketControl::MaxMessageSize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxMessageSize(&value)); + check_hresult(WINRT_SHIM(IMessageWebSocketControl)->get_MaxMessageSize(&value)); return value; } template void impl_IMessageWebSocketControl::MaxMessageSize(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxMessageSize(value)); + check_hresult(WINRT_SHIM(IMessageWebSocketControl)->put_MaxMessageSize(value)); } template Windows::Networking::Sockets::SocketMessageType impl_IMessageWebSocketControl::MessageType() const { Windows::Networking::Sockets::SocketMessageType value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageType(&value)); + check_hresult(WINRT_SHIM(IMessageWebSocketControl)->get_MessageType(&value)); return value; } template void impl_IMessageWebSocketControl::MessageType(Windows::Networking::Sockets::SocketMessageType value) const { - check_hresult(static_cast(static_cast(*this))->put_MessageType(value)); + check_hresult(WINRT_SHIM(IMessageWebSocketControl)->put_MessageType(value)); } template Windows::Networking::Sockets::MessageWebSocketControl impl_IMessageWebSocket::Control() const { Windows::Networking::Sockets::MessageWebSocketControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Control(put(value))); + check_hresult(WINRT_SHIM(IMessageWebSocket)->get_Control(put_abi(value))); return value; } template Windows::Networking::Sockets::MessageWebSocketInformation impl_IMessageWebSocket::Information() const { Windows::Networking::Sockets::MessageWebSocketInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IMessageWebSocket)->get_Information(put_abi(value))); return value; } template event_token impl_IMessageWebSocket::MessageReceived(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_MessageReceived(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMessageWebSocket)->add_MessageReceived(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3910,13 +4106,13 @@ template event_revoker impl_IMessageWebSocket template void impl_IMessageWebSocket::MessageReceived(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_MessageReceived(eventCookie)); + check_hresult(WINRT_SHIM(IMessageWebSocket)->remove_MessageReceived(eventCookie)); } template event_token impl_IMessageWebSocket2::ServerCustomValidationRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ServerCustomValidationRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IMessageWebSocket2)->add_ServerCustomValidationRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3927,46 +4123,46 @@ template event_revoker impl_IMessageWebSocket2< template void impl_IMessageWebSocket2::ServerCustomValidationRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ServerCustomValidationRequested(eventCookie)); + check_hresult(WINRT_SHIM(IMessageWebSocket2)->remove_ServerCustomValidationRequested(eventCookie)); } template bool impl_IStreamWebSocketControl::NoDelay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NoDelay(&value)); + check_hresult(WINRT_SHIM(IStreamWebSocketControl)->get_NoDelay(&value)); return value; } template void impl_IStreamWebSocketControl::NoDelay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NoDelay(value)); + check_hresult(WINRT_SHIM(IStreamWebSocketControl)->put_NoDelay(value)); } template Windows::Networking::Sockets::StreamWebSocketControl impl_IStreamWebSocket::Control() const { Windows::Networking::Sockets::StreamWebSocketControl value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Control(put(value))); + check_hresult(WINRT_SHIM(IStreamWebSocket)->get_Control(put_abi(value))); return value; } template Windows::Networking::Sockets::StreamWebSocketInformation impl_IStreamWebSocket::Information() const { Windows::Networking::Sockets::StreamWebSocketInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Information(put(value))); + check_hresult(WINRT_SHIM(IStreamWebSocket)->get_Information(put_abi(value))); return value; } template Windows::Storage::Streams::IInputStream impl_IStreamWebSocket::InputStream() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_InputStream(put(value))); + check_hresult(WINRT_SHIM(IStreamWebSocket)->get_InputStream(put_abi(value))); return value; } template event_token impl_IStreamWebSocket2::ServerCustomValidationRequested(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ServerCustomValidationRequested(get(eventHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IStreamWebSocket2)->add_ServerCustomValidationRequested(get_abi(eventHandler), &eventCookie)); return eventCookie; } @@ -3977,146 +4173,146 @@ template event_revoker impl_IStreamWebSocket2 template void impl_IStreamWebSocket2::ServerCustomValidationRequested(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ServerCustomValidationRequested(eventCookie)); + check_hresult(WINRT_SHIM(IStreamWebSocket2)->remove_ServerCustomValidationRequested(eventCookie)); } template Windows::Networking::Sockets::SocketErrorStatus impl_ISocketErrorStatics::GetStatus(int32_t hresult) const { Windows::Networking::Sockets::SocketErrorStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetStatus(hresult, &status)); + check_hresult(WINRT_SHIM(ISocketErrorStatics)->abi_GetStatus(hresult, &status)); return status; } template Windows::Web::WebErrorStatus impl_IWebSocketErrorStatics::GetStatus(int32_t hresult) const { Windows::Web::WebErrorStatus status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetStatus(hresult, &status)); + check_hresult(WINRT_SHIM(IWebSocketErrorStatics)->abi_GetStatus(hresult, &status)); return status; } template hstring impl_IControlChannelTrigger::ControlChannelTriggerId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ControlChannelTriggerId(put(value))); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_ControlChannelTriggerId(put_abi(value))); return value; } template uint32_t impl_IControlChannelTrigger::ServerKeepAliveIntervalInMinutes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ServerKeepAliveIntervalInMinutes(&value)); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_ServerKeepAliveIntervalInMinutes(&value)); return value; } template void impl_IControlChannelTrigger::ServerKeepAliveIntervalInMinutes(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ServerKeepAliveIntervalInMinutes(value)); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->put_ServerKeepAliveIntervalInMinutes(value)); } template uint32_t impl_IControlChannelTrigger::CurrentKeepAliveIntervalInMinutes() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentKeepAliveIntervalInMinutes(&value)); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_CurrentKeepAliveIntervalInMinutes(&value)); return value; } -template Windows::IInspectable impl_IControlChannelTrigger::TransportObject() const +template Windows::Foundation::IInspectable impl_IControlChannelTrigger::TransportObject() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_TransportObject(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_TransportObject(put_abi(value))); return value; } template Windows::ApplicationModel::Background::IBackgroundTrigger impl_IControlChannelTrigger::KeepAliveTrigger() const { Windows::ApplicationModel::Background::IBackgroundTrigger trigger; - check_hresult(static_cast(static_cast(*this))->get_KeepAliveTrigger(put(trigger))); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_KeepAliveTrigger(put_abi(trigger))); return trigger; } template Windows::ApplicationModel::Background::IBackgroundTrigger impl_IControlChannelTrigger::PushNotificationTrigger() const { Windows::ApplicationModel::Background::IBackgroundTrigger trigger; - check_hresult(static_cast(static_cast(*this))->get_PushNotificationTrigger(put(trigger))); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->get_PushNotificationTrigger(put_abi(trigger))); return trigger; } -template void impl_IControlChannelTrigger::UsingTransport(const Windows::IInspectable & transport) const +template void impl_IControlChannelTrigger::UsingTransport(const Windows::Foundation::IInspectable & transport) const { - check_hresult(static_cast(static_cast(*this))->abi_UsingTransport(get(transport))); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->abi_UsingTransport(get_abi(transport))); } template Windows::Networking::Sockets::ControlChannelTriggerStatus impl_IControlChannelTrigger::WaitForPushEnabled() const { Windows::Networking::Sockets::ControlChannelTriggerStatus channelTriggerStatus {}; - check_hresult(static_cast(static_cast(*this))->abi_WaitForPushEnabled(&channelTriggerStatus)); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->abi_WaitForPushEnabled(&channelTriggerStatus)); return channelTriggerStatus; } template void impl_IControlChannelTrigger::DecreaseNetworkKeepAliveInterval() const { - check_hresult(static_cast(static_cast(*this))->abi_DecreaseNetworkKeepAliveInterval()); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->abi_DecreaseNetworkKeepAliveInterval()); } template void impl_IControlChannelTrigger::FlushTransport() const { - check_hresult(static_cast(static_cast(*this))->abi_FlushTransport()); + check_hresult(WINRT_SHIM(IControlChannelTrigger)->abi_FlushTransport()); } -template Windows::Networking::Sockets::ControlChannelTrigger impl_IControlChannelTriggerFactory::CreateControlChannelTrigger(hstring_ref channelId, uint32_t serverKeepAliveIntervalInMinutes) const +template Windows::Networking::Sockets::ControlChannelTrigger impl_IControlChannelTriggerFactory::CreateControlChannelTrigger(hstring_view channelId, uint32_t serverKeepAliveIntervalInMinutes) const { Windows::Networking::Sockets::ControlChannelTrigger notificationChannel { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateControlChannelTrigger(get(channelId), serverKeepAliveIntervalInMinutes, put(notificationChannel))); + check_hresult(WINRT_SHIM(IControlChannelTriggerFactory)->abi_CreateControlChannelTrigger(get_abi(channelId), serverKeepAliveIntervalInMinutes, put_abi(notificationChannel))); return notificationChannel; } -template Windows::Networking::Sockets::ControlChannelTrigger impl_IControlChannelTriggerFactory::CreateControlChannelTriggerEx(hstring_ref channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType) const +template Windows::Networking::Sockets::ControlChannelTrigger impl_IControlChannelTriggerFactory::CreateControlChannelTriggerEx(hstring_view channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType) const { Windows::Networking::Sockets::ControlChannelTrigger notificationChannel { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateControlChannelTriggerEx(get(channelId), serverKeepAliveIntervalInMinutes, resourceRequestType, put(notificationChannel))); + check_hresult(WINRT_SHIM(IControlChannelTriggerFactory)->abi_CreateControlChannelTriggerEx(get_abi(channelId), serverKeepAliveIntervalInMinutes, resourceRequestType, put_abi(notificationChannel))); return notificationChannel; } template Windows::Networking::Sockets::ControlChannelTrigger impl_IControlChannelTriggerEventDetails::ControlChannelTrigger() const { Windows::Networking::Sockets::ControlChannelTrigger value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlChannelTrigger(put(value))); + check_hresult(WINRT_SHIM(IControlChannelTriggerEventDetails)->get_ControlChannelTrigger(put_abi(value))); return value; } template Windows::Networking::Sockets::ControlChannelTriggerResetReason impl_IControlChannelTriggerResetEventDetails::ResetReason() const { Windows::Networking::Sockets::ControlChannelTriggerResetReason value {}; - check_hresult(static_cast(static_cast(*this))->get_ResetReason(&value)); + check_hresult(WINRT_SHIM(IControlChannelTriggerResetEventDetails)->get_ResetReason(&value)); return value; } template bool impl_IControlChannelTriggerResetEventDetails::HardwareSlotReset() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareSlotReset(&value)); + check_hresult(WINRT_SHIM(IControlChannelTriggerResetEventDetails)->get_HardwareSlotReset(&value)); return value; } template bool impl_IControlChannelTriggerResetEventDetails::SoftwareSlotReset() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SoftwareSlotReset(&value)); + check_hresult(WINRT_SHIM(IControlChannelTriggerResetEventDetails)->get_SoftwareSlotReset(&value)); return value; } template bool impl_IControlChannelTrigger2::IsWakeFromLowPowerSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsWakeFromLowPowerSupported(&value)); + check_hresult(WINRT_SHIM(IControlChannelTrigger2)->get_IsWakeFromLowPowerSupported(&value)); return value; } -inline ControlChannelTrigger::ControlChannelTrigger(hstring_ref channelId, uint32_t serverKeepAliveIntervalInMinutes) : +inline ControlChannelTrigger::ControlChannelTrigger(hstring_view channelId, uint32_t serverKeepAliveIntervalInMinutes) : ControlChannelTrigger(get_activation_factory().CreateControlChannelTrigger(channelId, serverKeepAliveIntervalInMinutes)) {} -inline ControlChannelTrigger::ControlChannelTrigger(hstring_ref channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType) : +inline ControlChannelTrigger::ControlChannelTrigger(hstring_view channelId, uint32_t serverKeepAliveIntervalInMinutes, Windows::Networking::Sockets::ControlChannelTriggerResourceType resourceRequestType) : ControlChannelTrigger(get_activation_factory().CreateControlChannelTriggerEx(channelId, serverKeepAliveIntervalInMinutes, resourceRequestType)) {} @@ -4124,12 +4320,12 @@ inline DatagramSocket::DatagramSocket() : DatagramSocket(activate_instance()) {} -inline Windows::Foundation::IAsyncOperation> DatagramSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) +inline Windows::Foundation::IAsyncOperation> DatagramSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) { return get_activation_factory().GetEndpointPairsAsync(remoteHostName, remoteServiceName); } -inline Windows::Foundation::IAsyncOperation> DatagramSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) +inline Windows::Foundation::IAsyncOperation> DatagramSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) { return get_activation_factory().GetEndpointPairsAsync(remoteHostName, remoteServiceName, sortOptions); } @@ -4156,12 +4352,12 @@ inline StreamSocket::StreamSocket() : StreamSocket(activate_instance()) {} -inline Windows::Foundation::IAsyncOperation> StreamSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) +inline Windows::Foundation::IAsyncOperation> StreamSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) { return get_activation_factory().GetEndpointPairsAsync(remoteHostName, remoteServiceName); } -inline Windows::Foundation::IAsyncOperation> StreamSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) +inline Windows::Foundation::IAsyncOperation> StreamSocket::GetEndpointPairsAsync(const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName, Windows::Networking::HostNameSortOptions sortOptions) { return get_activation_factory().GetEndpointPairsAsync(remoteHostName, remoteServiceName, sortOptions); } @@ -4186,3 +4382,689 @@ inline WebSocketKeepAlive::WebSocketKeepAlive() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IControlChannelTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IControlChannelTrigger2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IControlChannelTriggerEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IControlChannelTriggerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IControlChannelTriggerResetEventDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocket2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocket3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketControl3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IDatagramSocketStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IMessageWebSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IMessageWebSocket2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IMessageWebSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IMessageWebSocketMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketActivityContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketActivityContextFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketActivityInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketActivityInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketActivityTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ISocketErrorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocket2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocket3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketControl3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListener2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListener3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListenerConnectionReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListenerControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListenerControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketListenerInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamSocketStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamWebSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamWebSocket2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IStreamWebSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketErrorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::IWebSocketServerCustomValidationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::ControlChannelTrigger & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::DatagramSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::DatagramSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::DatagramSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::DatagramSocketMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::MessageWebSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::MessageWebSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::MessageWebSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::MessageWebSocketMessageReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::SocketActivityContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::SocketActivityInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::SocketActivityTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketListenerControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamSocketListenerInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamWebSocket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamWebSocketControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::StreamWebSocketInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::WebSocketClosedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::WebSocketKeepAlive & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Sockets::WebSocketServerCustomValidationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.Vpn.h b/10.0.14393.0/winrt/Windows.Networking.Vpn.h index 7f60ccbd5..01f05299d 100644 --- a/10.0.14393.0/winrt/Windows.Networking.Vpn.h +++ b/10.0.14393.0/winrt/Windows.Networking.Vpn.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Networking.3.h" #include "internal/Windows.Foundation.3.h" @@ -24,7 +27,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -37,6 +41,7 @@ struct produce : produce_baseshim()); this->shim().Type(value); return S_OK; } @@ -46,11 +51,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -60,10 +66,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return S_OK; } @@ -77,11 +84,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Networking::Vpn::VpnAppIdType type, abi_arg_in value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::Networking::Vpn::VpnAppIdType type, impl::abi_arg_in value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(type, *reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(type, *reinterpret_cast(&value))); return S_OK; } catch (...) @@ -95,11 +103,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_AssociateTransport(abi_arg_in mainOuterTunnelTransport, abi_arg_in optionalOuterTunnelTransport) noexcept override + HRESULT __stdcall abi_AssociateTransport(impl::abi_arg_in mainOuterTunnelTransport, impl::abi_arg_in optionalOuterTunnelTransport) noexcept override { try { - this->shim().AssociateTransport(*reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport)); + typename D::abi_guard guard(this->shim()); + this->shim().AssociateTransport(*reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport)); return S_OK; } catch (...) @@ -108,11 +117,12 @@ struct produce : produce_base> assignedClientIPv4list, abi_arg_in> assignedClientIPv6list, abi_arg_in vpnInterfaceId, abi_arg_in routeScope, abi_arg_in namespaceScope, uint32_t mtuSize, uint32_t maxFrameSize, bool optimizeForLowCostNetwork, abi_arg_in mainOuterTunnelTransport, abi_arg_in optionalOuterTunnelTransport) noexcept override + HRESULT __stdcall abi_Start(impl::abi_arg_in> assignedClientIPv4list, impl::abi_arg_in> assignedClientIPv6list, impl::abi_arg_in vpnInterfaceId, impl::abi_arg_in routeScope, impl::abi_arg_in namespaceScope, uint32_t mtuSize, uint32_t maxFrameSize, bool optimizeForLowCostNetwork, impl::abi_arg_in mainOuterTunnelTransport, impl::abi_arg_in optionalOuterTunnelTransport) noexcept override { try { - this->shim().Start(*reinterpret_cast *>(&assignedClientIPv4list), *reinterpret_cast *>(&assignedClientIPv6list), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&routeScope), *reinterpret_cast(&namespaceScope), mtuSize, maxFrameSize, optimizeForLowCostNetwork, *reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport)); + typename D::abi_guard guard(this->shim()); + this->shim().Start(*reinterpret_cast *>(&assignedClientIPv4list), *reinterpret_cast *>(&assignedClientIPv6list), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&routeScope), *reinterpret_cast(&namespaceScope), mtuSize, maxFrameSize, optimizeForLowCostNetwork, *reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport)); return S_OK; } catch (...) @@ -125,6 +135,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -134,11 +145,12 @@ struct produce : produce_base certificate, abi_arg_out credential) noexcept override + HRESULT __stdcall abi_RequestCredentials(Windows::Networking::Vpn::VpnCredentialType credType, bool isRetry, bool isSingleSignOnCredential, impl::abi_arg_in certificate, impl::abi_arg_out credential) noexcept override { try { - *credential = detach(this->shim().RequestCredentials(credType, isRetry, isSingleSignOnCredential, *reinterpret_cast(&certificate))); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().RequestCredentials(credType, isRetry, isSingleSignOnCredential, *reinterpret_cast(&certificate))); return S_OK; } catch (...) @@ -148,10 +160,11 @@ struct produce : produce_base vpnPacketBuffer) noexcept override + HRESULT __stdcall abi_RequestVpnPacketBuffer(Windows::Networking::Vpn::VpnDataPathType type, impl::abi_arg_out vpnPacketBuffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestVpnPacketBuffer(type, *vpnPacketBuffer); return S_OK; } @@ -162,10 +175,11 @@ struct produce : produce_base message) noexcept override + HRESULT __stdcall abi_LogDiagnosticMessage(impl::abi_arg_in message) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogDiagnosticMessage(*reinterpret_cast(&message)); return S_OK; } @@ -179,7 +193,8 @@ struct produce : produce_baseshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -188,11 +203,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Configuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Configuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Configuration()); return S_OK; } catch (...) @@ -202,11 +218,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ActivityChange(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ActivityChange(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActivityChange(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -219,6 +236,7 @@ struct produce : produce_baseshim()); this->shim().ActivityChange(token); return S_OK; } @@ -228,11 +246,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlugInContext(impl::abi_arg_in value) noexcept override { try { - this->shim().PlugInContext(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().PlugInContext(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -241,11 +260,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlugInContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlugInContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlugInContext()); return S_OK; } catch (...) @@ -255,11 +275,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SystemHealth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemHealth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemHealth()); return S_OK; } catch (...) @@ -269,10 +290,11 @@ struct produce : produce_base> customPrompt) noexcept override + HRESULT __stdcall abi_RequestCustomPrompt(impl::abi_arg_in> customPrompt) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestCustomPrompt(*reinterpret_cast *>(&customPrompt)); return S_OK; } @@ -282,10 +304,11 @@ struct produce : produce_base message) noexcept override + HRESULT __stdcall abi_SetErrorMessage(impl::abi_arg_in message) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetErrorMessage(*reinterpret_cast(&message)); return S_OK; } @@ -295,11 +318,12 @@ struct produce : produce_base tunnelTransport, bool useTls12) noexcept override + HRESULT __stdcall abi_SetAllowedSslTlsVersions(impl::abi_arg_in tunnelTransport, bool useTls12) noexcept override { try { - this->shim().SetAllowedSslTlsVersions(*reinterpret_cast(&tunnelTransport), useTls12); + typename D::abi_guard guard(this->shim()); + this->shim().SetAllowedSslTlsVersions(*reinterpret_cast(&tunnelTransport), useTls12); return S_OK; } catch (...) @@ -312,11 +336,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_StartWithMainTransport(abi_arg_in> assignedClientIPv4list, abi_arg_in> assignedClientIPv6list, abi_arg_in vpnInterfaceId, abi_arg_in assignedRoutes, abi_arg_in assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved, abi_arg_in mainOuterTunnelTransport) noexcept override + HRESULT __stdcall abi_StartWithMainTransport(impl::abi_arg_in> assignedClientIPv4list, impl::abi_arg_in> assignedClientIPv6list, impl::abi_arg_in vpnInterfaceId, impl::abi_arg_in assignedRoutes, impl::abi_arg_in assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved, impl::abi_arg_in mainOuterTunnelTransport) noexcept override { try { - this->shim().StartWithMainTransport(*reinterpret_cast *>(&assignedClientIPv4list), *reinterpret_cast *>(&assignedClientIPv6list), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&assignedRoutes), *reinterpret_cast(&assignedDomainName), mtuSize, maxFrameSize, Reserved, *reinterpret_cast(&mainOuterTunnelTransport)); + typename D::abi_guard guard(this->shim()); + this->shim().StartWithMainTransport(*reinterpret_cast *>(&assignedClientIPv4list), *reinterpret_cast *>(&assignedClientIPv6list), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&assignedRoutes), *reinterpret_cast(&assignedDomainName), mtuSize, maxFrameSize, Reserved, *reinterpret_cast(&mainOuterTunnelTransport)); return S_OK; } catch (...) @@ -325,10 +350,11 @@ struct produce : produce_base> assignedClientIPv4list, abi_arg_in> assignedClientIPv6list, abi_arg_in vpnInterfaceId, abi_arg_in assignedRoutes, abi_arg_in assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved) noexcept override + HRESULT __stdcall abi_StartExistingTransports(impl::abi_arg_in> assignedClientIPv4list, impl::abi_arg_in> assignedClientIPv6list, impl::abi_arg_in vpnInterfaceId, impl::abi_arg_in assignedRoutes, impl::abi_arg_in assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartExistingTransports(*reinterpret_cast *>(&assignedClientIPv4list), *reinterpret_cast *>(&assignedClientIPv6list), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&assignedRoutes), *reinterpret_cast(&assignedDomainName), mtuSize, maxFrameSize, Reserved); return S_OK; } @@ -338,11 +364,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ActivityStateChange(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ActivityStateChange(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActivityStateChange(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -355,6 +382,7 @@ struct produce : produce_baseshim()); this->shim().ActivityStateChange(token); return S_OK; } @@ -364,11 +392,12 @@ struct produce : produce_base vpnSendPacketBuffer) noexcept override + HRESULT __stdcall abi_GetVpnSendPacketBuffer(impl::abi_arg_out vpnSendPacketBuffer) noexcept override { try { - *vpnSendPacketBuffer = detach(this->shim().GetVpnSendPacketBuffer()); + typename D::abi_guard guard(this->shim()); + *vpnSendPacketBuffer = detach_abi(this->shim().GetVpnSendPacketBuffer()); return S_OK; } catch (...) @@ -378,11 +407,12 @@ struct produce : produce_base vpnReceivePacketBuffer) noexcept override + HRESULT __stdcall abi_GetVpnReceivePacketBuffer(impl::abi_arg_out vpnReceivePacketBuffer) noexcept override { try { - *vpnReceivePacketBuffer = detach(this->shim().GetVpnReceivePacketBuffer()); + typename D::abi_guard guard(this->shim()); + *vpnReceivePacketBuffer = detach_abi(this->shim().GetVpnReceivePacketBuffer()); return S_OK; } catch (...) @@ -392,11 +422,12 @@ struct produce : produce_base> customPromptElement, abi_arg_out action) noexcept override + HRESULT __stdcall abi_RequestCustomPromptAsync(impl::abi_arg_in> customPromptElement, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().RequestCustomPromptAsync(*reinterpret_cast *>(&customPromptElement))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().RequestCustomPromptAsync(*reinterpret_cast *>(&customPromptElement))); return S_OK; } catch (...) @@ -406,11 +437,12 @@ struct produce : produce_base certificate, abi_arg_out> credential) noexcept override + HRESULT __stdcall abi_RequestCredentialsWithCertificateAsync(Windows::Networking::Vpn::VpnCredentialType credType, uint32_t credOptions, impl::abi_arg_in certificate, impl::abi_arg_out> credential) noexcept override { try { - *credential = detach(this->shim().RequestCredentialsAsync(credType, credOptions, *reinterpret_cast(&certificate))); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().RequestCredentialsAsync(credType, credOptions, *reinterpret_cast(&certificate))); return S_OK; } catch (...) @@ -420,11 +452,12 @@ struct produce : produce_base> credential) noexcept override + HRESULT __stdcall abi_RequestCredentialsWithOptionsAsync(Windows::Networking::Vpn::VpnCredentialType credType, uint32_t credOptions, impl::abi_arg_out> credential) noexcept override { try { - *credential = detach(this->shim().RequestCredentialsAsync(credType, credOptions)); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().RequestCredentialsAsync(credType, credOptions)); return S_OK; } catch (...) @@ -434,11 +467,12 @@ struct produce : produce_base> credential) noexcept override + HRESULT __stdcall abi_RequestCredentialsSimpleAsync(Windows::Networking::Vpn::VpnCredentialType credType, impl::abi_arg_out> credential) noexcept override { try { - *credential = detach(this->shim().RequestCredentialsAsync(credType)); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().RequestCredentialsAsync(credType)); return S_OK; } catch (...) @@ -448,10 +482,11 @@ struct produce : produce_base message) noexcept override + HRESULT __stdcall abi_TerminateConnection(impl::abi_arg_in message) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TerminateConnection(*reinterpret_cast(&message)); return S_OK; } @@ -461,11 +496,12 @@ struct produce : produce_base> assignedClientIpv4List, abi_arg_in> assignedClientIpv6List, abi_arg_in vpnInterfaceId, abi_arg_in assignedRoutes, abi_arg_in assignedNamespace, uint32_t mtuSize, uint32_t maxFrameSize, bool reserved, abi_arg_in mainOuterTunnelTransport, abi_arg_in optionalOuterTunnelTransport, abi_arg_in assignedTrafficFilters) noexcept override + HRESULT __stdcall abi_StartWithTrafficFilter(impl::abi_arg_in> assignedClientIpv4List, impl::abi_arg_in> assignedClientIpv6List, impl::abi_arg_in vpnInterfaceId, impl::abi_arg_in assignedRoutes, impl::abi_arg_in assignedNamespace, uint32_t mtuSize, uint32_t maxFrameSize, bool reserved, impl::abi_arg_in mainOuterTunnelTransport, impl::abi_arg_in optionalOuterTunnelTransport, impl::abi_arg_in assignedTrafficFilters) noexcept override { try { - this->shim().StartWithTrafficFilter(*reinterpret_cast *>(&assignedClientIpv4List), *reinterpret_cast *>(&assignedClientIpv6List), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&assignedRoutes), *reinterpret_cast(&assignedNamespace), mtuSize, maxFrameSize, reserved, *reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport), *reinterpret_cast(&assignedTrafficFilters)); + typename D::abi_guard guard(this->shim()); + this->shim().StartWithTrafficFilter(*reinterpret_cast *>(&assignedClientIpv4List), *reinterpret_cast *>(&assignedClientIpv6List), *reinterpret_cast(&vpnInterfaceId), *reinterpret_cast(&assignedRoutes), *reinterpret_cast(&assignedNamespace), mtuSize, maxFrameSize, reserved, *reinterpret_cast(&mainOuterTunnelTransport), *reinterpret_cast(&optionalOuterTunnelTransport), *reinterpret_cast(&assignedTrafficFilters)); return S_OK; } catch (...) @@ -482,7 +518,8 @@ struct produce : prod { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -499,7 +536,8 @@ struct produce { try { - *value = detach(this->shim().ActivityState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivityState()); return S_OK; } catch (...) @@ -512,11 +550,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ServerServiceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServerServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerServiceName()); return S_OK; } catch (...) @@ -526,11 +565,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ServerHostNameList(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerHostNameList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerHostNameList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerHostNameList()); return S_OK; } catch (...) @@ -540,11 +580,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CustomField(abi_arg_out value) noexcept override + HRESULT __stdcall get_CustomField(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomField()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomField()); return S_OK; } catch (...) @@ -558,11 +599,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ServerUris(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerUris()); return S_OK; } catch (...) @@ -576,11 +618,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_ProcessEventAsync(abi_arg_in thirdPartyPlugIn, abi_arg_in event) noexcept override + HRESULT __stdcall abi_ProcessEventAsync(impl::abi_arg_in thirdPartyPlugIn, impl::abi_arg_in event) noexcept override { try { - this->shim().ProcessEventAsync(*reinterpret_cast(&thirdPartyPlugIn), *reinterpret_cast(&event)); + typename D::abi_guard guard(this->shim()); + this->shim().ProcessEventAsync(*reinterpret_cast(&thirdPartyPlugIn), *reinterpret_cast(&event)); return S_OK; } catch (...) @@ -593,11 +636,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PasskeyCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasskeyCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasskeyCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasskeyCredential()); return S_OK; } catch (...) @@ -607,11 +651,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CertificateCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CertificateCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CertificateCredential()); return S_OK; } catch (...) @@ -621,11 +666,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AdditionalPin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdditionalPin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalPin()); return S_OK; } catch (...) @@ -635,11 +681,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OldPasswordCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldPasswordCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldPasswordCredential()); return S_OK; } catch (...) @@ -657,6 +704,7 @@ struct produce : produce_baseshim()); this->shim().InitialCheckState(value); return S_OK; } @@ -670,7 +718,8 @@ struct produce : produce_baseshim().InitialCheckState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialCheckState()); return S_OK; } catch (...) @@ -683,7 +732,8 @@ struct produce : produce_baseshim().Checked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Checked()); return S_OK; } catch (...) @@ -696,10 +746,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_OptionsText(abi_arg_in> value) noexcept override + HRESULT __stdcall put_OptionsText(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OptionsText(*reinterpret_cast *>(&value)); return S_OK; } @@ -709,11 +760,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_OptionsText(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OptionsText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OptionsText()); return S_OK; } catch (...) @@ -727,7 +779,8 @@ struct produce : produce_baseshim().Selected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selected()); return S_OK; } catch (...) @@ -740,10 +793,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_DefaultText(abi_arg_in value) noexcept override + HRESULT __stdcall put_DefaultText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultText(*reinterpret_cast(&value)); return S_OK; } @@ -753,11 +807,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultText()); return S_OK; } catch (...) @@ -771,6 +826,7 @@ struct produce : produce_baseshim()); this->shim().NoEcho(value); return S_OK; } @@ -784,7 +840,8 @@ struct produce : produce_baseshim().NoEcho()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoEcho()); return S_OK; } catch (...) @@ -793,11 +850,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -815,10 +873,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_Label(abi_arg_in value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -828,11 +887,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -846,6 +906,7 @@ struct produce : produce_baseshim()); this->shim().Compulsory(value); return S_OK; } @@ -859,7 +920,8 @@ struct produce : produce_baseshim().Compulsory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Compulsory()); return S_OK; } catch (...) @@ -872,6 +934,7 @@ struct produce : produce_baseshim()); this->shim().Bordered(value); return S_OK; } @@ -885,7 +948,8 @@ struct produce : produce_baseshim().Bordered()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bordered()); return S_OK; } catch (...) @@ -902,6 +966,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialValue(value); return S_OK; } @@ -915,7 +980,8 @@ struct produce : prod { try { - *value = detach(this->shim().InitialValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialValue()); return S_OK; } catch (...) @@ -928,7 +994,8 @@ struct produce : prod { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -941,10 +1008,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -954,11 +1022,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -972,6 +1041,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Compulsory(value); return S_OK; } @@ -985,7 +1055,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Compulsory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Compulsory()); return S_OK; } catch (...) @@ -998,6 +1069,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Emphasized(value); return S_OK; } @@ -1011,7 +1083,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Emphasized()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Emphasized()); return S_OK; } catch (...) @@ -1024,11 +1097,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Options(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Options(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -1042,7 +1116,8 @@ struct produce : pr { try { - *value = detach(this->shim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -1055,10 +1130,11 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -1068,11 +1144,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1086,10 +1163,11 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall put_PlaceholderText(abi_arg_in value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -1099,11 +1177,12 @@ struct produce : produce } } - HRESULT __stdcall get_PlaceholderText(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -1117,6 +1196,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsTextHidden(value); return S_OK; } @@ -1130,7 +1210,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsTextHidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextHidden()); return S_OK; } catch (...) @@ -1139,11 +1220,12 @@ struct produce : produce } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1157,10 +1239,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall put_DisplayText(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayText(*reinterpret_cast(&value)); return S_OK; } @@ -1170,11 +1253,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayText()); return S_OK; } catch (...) @@ -1188,11 +1272,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DomainNameList(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DomainNameList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DomainNameList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainNameList()); return S_OK; } catch (...) @@ -1202,10 +1287,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_ProxyAutoConfigurationUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_ProxyAutoConfigurationUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProxyAutoConfigurationUri(*reinterpret_cast(&value)); return S_OK; } @@ -1215,11 +1301,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ProxyAutoConfigurationUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProxyAutoConfigurationUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProxyAutoConfigurationUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProxyAutoConfigurationUri()); return S_OK; } catch (...) @@ -1233,10 +1320,11 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall put_DomainName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DomainName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DomainName(*reinterpret_cast(&value)); return S_OK; } @@ -1246,11 +1334,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DomainName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DomainName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainName()); return S_OK; } catch (...) @@ -1264,6 +1353,7 @@ struct produce : produce_baseshim()); this->shim().DomainNameType(value); return S_OK; } @@ -1277,7 +1367,8 @@ struct produce : produce_baseshim().DomainNameType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainNameType()); return S_OK; } catch (...) @@ -1286,11 +1377,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DnsServers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DnsServers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DnsServers()); return S_OK; } catch (...) @@ -1300,11 +1392,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_WebProxyServers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebProxyServers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebProxyServers()); return S_OK; } catch (...) @@ -1318,11 +1411,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_WebProxyUris(abi_arg_out> value) noexcept override + HRESULT __stdcall get_WebProxyUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebProxyUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebProxyUris()); return S_OK; } catch (...) @@ -1336,11 +1430,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateVpnDomainNameInfo(abi_arg_in name, Windows::Networking::Vpn::VpnDomainNameType nameType, abi_arg_in> dnsServerList, abi_arg_in> proxyServerList, abi_arg_out domainNameInfo) noexcept override + HRESULT __stdcall abi_CreateVpnDomainNameInfo(impl::abi_arg_in name, Windows::Networking::Vpn::VpnDomainNameType nameType, impl::abi_arg_in> dnsServerList, impl::abi_arg_in> proxyServerList, impl::abi_arg_out domainNameInfo) noexcept override { try { - *domainNameInfo = detach(this->shim().CreateVpnDomainNameInfo(*reinterpret_cast(&name), nameType, *reinterpret_cast *>(&dnsServerList), *reinterpret_cast *>(&proxyServerList))); + typename D::abi_guard guard(this->shim()); + *domainNameInfo = detach_abi(this->shim().CreateVpnDomainNameInfo(*reinterpret_cast(&name), nameType, *reinterpret_cast *>(&dnsServerList), *reinterpret_cast *>(&proxyServerList))); return S_OK; } catch (...) @@ -1354,11 +1449,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetAddressInfo(uint32_t * __idSize, abi_arg_out * id) noexcept override + HRESULT __stdcall abi_GetAddressInfo(uint32_t * __idSize, impl::abi_arg_out * id) noexcept override { try { - this->shim().GetAddressInfo(detach(__idSize, id)); + typename D::abi_guard guard(this->shim()); + this->shim().GetAddressInfo(detach_abi(__idSize, id)); return S_OK; } catch (...) @@ -1373,11 +1469,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateVpnInterfaceId(uint32_t __addressSize, abi_arg_in * address, abi_arg_out vpnInterfaceId) noexcept override + HRESULT __stdcall abi_CreateVpnInterfaceId(uint32_t __addressSize, impl::abi_arg_in * address, impl::abi_arg_out vpnInterfaceId) noexcept override { try { - *vpnInterfaceId = detach(this->shim().CreateVpnInterfaceId(array_ref(address, address + __addressSize))); + typename D::abi_guard guard(this->shim()); + *vpnInterfaceId = detach_abi(this->shim().CreateVpnInterfaceId(array_view(address, address + __addressSize))); return S_OK; } catch (...) @@ -1391,11 +1488,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_AddProfileFromXmlAsync(abi_arg_in xml, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AddProfileFromXmlAsync(impl::abi_arg_in xml, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AddProfileFromXmlAsync(*reinterpret_cast(&xml))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AddProfileFromXmlAsync(*reinterpret_cast(&xml))); return S_OK; } catch (...) @@ -1405,11 +1503,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AddProfileFromObjectAsync(abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AddProfileFromObjectAsync(impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AddProfileFromObjectAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AddProfileFromObjectAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1419,11 +1518,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_UpdateProfileFromXmlAsync(abi_arg_in xml, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateProfileFromXmlAsync(impl::abi_arg_in xml, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateProfileFromXmlAsync(*reinterpret_cast(&xml))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateProfileFromXmlAsync(*reinterpret_cast(&xml))); return S_OK; } catch (...) @@ -1433,11 +1533,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_UpdateProfileFromObjectAsync(abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateProfileFromObjectAsync(impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateProfileFromObjectAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateProfileFromObjectAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1447,11 +1548,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetProfilesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetProfilesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetProfilesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetProfilesAsync()); return S_OK; } catch (...) @@ -1461,11 +1563,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_DeleteProfileAsync(abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_DeleteProfileAsync(impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DeleteProfileAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteProfileAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1475,11 +1578,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ConnectProfileAsync(abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ConnectProfileAsync(impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ConnectProfileAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectProfileAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1489,11 +1593,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ConnectProfileWithPasswordCredentialAsync(abi_arg_in profile, abi_arg_in passwordCredential, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ConnectProfileWithPasswordCredentialAsync(impl::abi_arg_in profile, impl::abi_arg_in passwordCredential, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ConnectProfileWithPasswordCredentialAsync(*reinterpret_cast(&profile), *reinterpret_cast(&passwordCredential))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ConnectProfileWithPasswordCredentialAsync(*reinterpret_cast(&profile), *reinterpret_cast(&passwordCredential))); return S_OK; } catch (...) @@ -1503,11 +1608,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_DisconnectProfileAsync(abi_arg_in profile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_DisconnectProfileAsync(impl::abi_arg_in profile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DisconnectProfileAsync(*reinterpret_cast(&profile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DisconnectProfileAsync(*reinterpret_cast(&profile))); return S_OK; } catch (...) @@ -1521,10 +1627,11 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall put_NamespaceList(abi_arg_in> value) noexcept override + HRESULT __stdcall put_NamespaceList(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NamespaceList(*reinterpret_cast *>(&value)); return S_OK; } @@ -1534,11 +1641,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NamespaceList(abi_arg_out> value) noexcept override + HRESULT __stdcall get_NamespaceList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NamespaceList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NamespaceList()); return S_OK; } catch (...) @@ -1548,10 +1656,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_ProxyAutoConfigUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_ProxyAutoConfigUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProxyAutoConfigUri(*reinterpret_cast(&value)); return S_OK; } @@ -1561,11 +1670,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ProxyAutoConfigUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProxyAutoConfigUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProxyAutoConfigUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProxyAutoConfigUri()); return S_OK; } catch (...) @@ -1579,10 +1689,11 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall put_Namespace(abi_arg_in value) noexcept override + HRESULT __stdcall put_Namespace(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Namespace(*reinterpret_cast(&value)); return S_OK; } @@ -1592,11 +1703,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Namespace(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Namespace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Namespace()); return S_OK; } catch (...) @@ -1606,10 +1718,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_DnsServers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DnsServers(*reinterpret_cast *>(&value)); return S_OK; } @@ -1619,11 +1732,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DnsServers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DnsServers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DnsServers()); return S_OK; } catch (...) @@ -1633,10 +1747,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_WebProxyServers(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WebProxyServers(*reinterpret_cast *>(&value)); return S_OK; } @@ -1646,11 +1761,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_WebProxyServers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebProxyServers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebProxyServers()); return S_OK; } catch (...) @@ -1664,11 +1780,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateVpnNamespaceInfo(abi_arg_in name, abi_arg_in> dnsServerList, abi_arg_in> proxyServerList, abi_arg_out namespaceInfo) noexcept override + HRESULT __stdcall abi_CreateVpnNamespaceInfo(impl::abi_arg_in name, impl::abi_arg_in> dnsServerList, impl::abi_arg_in> proxyServerList, impl::abi_arg_out namespaceInfo) noexcept override { try { - *namespaceInfo = detach(this->shim().CreateVpnNamespaceInfo(*reinterpret_cast(&name), *reinterpret_cast *>(&dnsServerList), *reinterpret_cast *>(&proxyServerList))); + typename D::abi_guard guard(this->shim()); + *namespaceInfo = detach_abi(this->shim().CreateVpnNamespaceInfo(*reinterpret_cast(&name), *reinterpret_cast *>(&dnsServerList), *reinterpret_cast *>(&proxyServerList))); return S_OK; } catch (...) @@ -1682,11 +1799,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Servers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Servers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Servers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Servers()); return S_OK; } catch (...) @@ -1700,7 +1818,8 @@ struct produce : produce_baseshim().RoutingPolicyType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoutingPolicyType()); return S_OK; } catch (...) @@ -1713,6 +1832,7 @@ struct produce : produce_baseshim()); this->shim().RoutingPolicyType(value); return S_OK; } @@ -1726,7 +1846,8 @@ struct produce : produce_baseshim().NativeProtocolType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NativeProtocolType()); return S_OK; } catch (...) @@ -1739,6 +1860,7 @@ struct produce : produce_baseshim()); this->shim().NativeProtocolType(value); return S_OK; } @@ -1752,7 +1874,8 @@ struct produce : produce_baseshim().UserAuthenticationMethod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserAuthenticationMethod()); return S_OK; } catch (...) @@ -1765,6 +1888,7 @@ struct produce : produce_baseshim()); this->shim().UserAuthenticationMethod(value); return S_OK; } @@ -1778,7 +1902,8 @@ struct produce : produce_baseshim().TunnelAuthenticationMethod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TunnelAuthenticationMethod()); return S_OK; } catch (...) @@ -1791,6 +1916,7 @@ struct produce : produce_baseshim()); this->shim().TunnelAuthenticationMethod(value); return S_OK; } @@ -1800,11 +1926,12 @@ struct produce : produce_base Value) noexcept override + HRESULT __stdcall get_EapConfiguration(impl::abi_arg_out Value) noexcept override { try { - *Value = detach(this->shim().EapConfiguration()); + typename D::abi_guard guard(this->shim()); + *Value = detach_abi(this->shim().EapConfiguration()); return S_OK; } catch (...) @@ -1814,10 +1941,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_EapConfiguration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EapConfiguration(*reinterpret_cast(&value)); return S_OK; } @@ -1835,7 +1963,8 @@ struct produce : produce_baseshim().RequireVpnClientAppUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequireVpnClientAppUI()); return S_OK; } catch (...) @@ -1848,6 +1977,7 @@ struct produce : produce_baseshim()); this->shim().RequireVpnClientAppUI(value); return S_OK; } @@ -1861,7 +1991,8 @@ struct produce : produce_baseshim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -1874,11 +2005,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Buffer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Buffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Buffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffer()); return S_OK; } catch (...) @@ -1892,6 +2024,7 @@ struct produce : produce_baseshim()); this->shim().Status(value); return S_OK; } @@ -1905,7 +2038,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1918,6 +2052,7 @@ struct produce : produce_baseshim()); this->shim().TransportAffinity(value); return S_OK; } @@ -1931,7 +2066,8 @@ struct produce : produce_baseshim().TransportAffinity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportAffinity()); return S_OK; } catch (...) @@ -1944,11 +2080,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AppId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -1962,11 +2099,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateVpnPacketBuffer(abi_arg_in parentBuffer, uint32_t offset, uint32_t length, abi_arg_out vpnPacketBuffer) noexcept override + HRESULT __stdcall abi_CreateVpnPacketBuffer(impl::abi_arg_in parentBuffer, uint32_t offset, uint32_t length, impl::abi_arg_out vpnPacketBuffer) noexcept override { try { - *vpnPacketBuffer = detach(this->shim().CreateVpnPacketBuffer(*reinterpret_cast(&parentBuffer), offset, length)); + typename D::abi_guard guard(this->shim()); + *vpnPacketBuffer = detach_abi(this->shim().CreateVpnPacketBuffer(*reinterpret_cast(&parentBuffer), offset, length)); return S_OK; } catch (...) @@ -1980,10 +2118,11 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_Append(abi_arg_in nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_Append(impl::abi_arg_in nextVpnPacketBuffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Append(*reinterpret_cast(&nextVpnPacketBuffer)); return S_OK; } @@ -1993,10 +2132,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_AddAtBegin(abi_arg_in nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_AddAtBegin(impl::abi_arg_in nextVpnPacketBuffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddAtBegin(*reinterpret_cast(&nextVpnPacketBuffer)); return S_OK; } @@ -2006,11 +2146,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RemoveAtEnd(abi_arg_out nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_RemoveAtEnd(impl::abi_arg_out nextVpnPacketBuffer) noexcept override { try { - *nextVpnPacketBuffer = detach(this->shim().RemoveAtEnd()); + typename D::abi_guard guard(this->shim()); + *nextVpnPacketBuffer = detach_abi(this->shim().RemoveAtEnd()); return S_OK; } catch (...) @@ -2020,11 +2161,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RemoveAtBegin(abi_arg_out nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_RemoveAtBegin(impl::abi_arg_out nextVpnPacketBuffer) noexcept override { try { - *nextVpnPacketBuffer = detach(this->shim().RemoveAtBegin()); + typename D::abi_guard guard(this->shim()); + *nextVpnPacketBuffer = detach_abi(this->shim().RemoveAtBegin()); return S_OK; } catch (...) @@ -2038,6 +2180,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -2051,6 +2194,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Status(value); return S_OK; } @@ -2064,7 +2208,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2077,7 +2222,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -2090,10 +2236,11 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_AddLeadingPacket(abi_arg_in nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_AddLeadingPacket(impl::abi_arg_in nextVpnPacketBuffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddLeadingPacket(*reinterpret_cast(&nextVpnPacketBuffer)); return S_OK; } @@ -2103,11 +2250,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_RemoveLeadingPacket(abi_arg_out nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_RemoveLeadingPacket(impl::abi_arg_out nextVpnPacketBuffer) noexcept override { try { - *nextVpnPacketBuffer = detach(this->shim().RemoveLeadingPacket()); + typename D::abi_guard guard(this->shim()); + *nextVpnPacketBuffer = detach_abi(this->shim().RemoveLeadingPacket()); return S_OK; } catch (...) @@ -2117,10 +2265,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_AddTrailingPacket(abi_arg_in nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_AddTrailingPacket(impl::abi_arg_in nextVpnPacketBuffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddTrailingPacket(*reinterpret_cast(&nextVpnPacketBuffer)); return S_OK; } @@ -2130,11 +2279,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_RemoveTrailingPacket(abi_arg_out nextVpnPacketBuffer) noexcept override + HRESULT __stdcall abi_RemoveTrailingPacket(impl::abi_arg_out nextVpnPacketBuffer) noexcept override { try { - *nextVpnPacketBuffer = detach(this->shim().RemoveTrailingPacket()); + typename D::abi_guard guard(this->shim()); + *nextVpnPacketBuffer = detach_abi(this->shim().RemoveTrailingPacket()); return S_OK; } catch (...) @@ -2148,11 +2298,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_PasskeyCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasskeyCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasskeyCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasskeyCredential()); return S_OK; } catch (...) @@ -2162,11 +2313,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AdditionalPin(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdditionalPin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdditionalPin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalPin()); return S_OK; } catch (...) @@ -2176,11 +2328,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_OldPasswordCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldPasswordCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldPasswordCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldPasswordCredential()); return S_OK; } catch (...) @@ -2194,10 +2347,11 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Connect(abi_arg_in channel) noexcept override + HRESULT __stdcall abi_Connect(impl::abi_arg_in channel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Connect(*reinterpret_cast(&channel)); return S_OK; } @@ -2207,10 +2361,11 @@ struct produce : produce_base channel) noexcept override + HRESULT __stdcall abi_Disconnect(impl::abi_arg_in channel) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Disconnect(*reinterpret_cast(&channel)); return S_OK; } @@ -2220,10 +2375,11 @@ struct produce : produce_base channel, abi_arg_out keepAlivePacket) noexcept override + HRESULT __stdcall abi_GetKeepAlivePayload(impl::abi_arg_in channel, impl::abi_arg_out keepAlivePacket) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetKeepAlivePayload(*reinterpret_cast(&channel), *keepAlivePacket); return S_OK; } @@ -2234,10 +2390,11 @@ struct produce : produce_base channel, abi_arg_in packets, abi_arg_in encapulatedPackets) noexcept override + HRESULT __stdcall abi_Encapsulate(impl::abi_arg_in channel, impl::abi_arg_in packets, impl::abi_arg_in encapulatedPackets) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Encapsulate(*reinterpret_cast(&channel), *reinterpret_cast(&packets), *reinterpret_cast(&encapulatedPackets)); return S_OK; } @@ -2247,10 +2404,11 @@ struct produce : produce_base channel, abi_arg_in encapBuffer, abi_arg_in decapsulatedPackets, abi_arg_in controlPacketsToSend) noexcept override + HRESULT __stdcall abi_Decapsulate(impl::abi_arg_in channel, impl::abi_arg_in encapBuffer, impl::abi_arg_in decapsulatedPackets, impl::abi_arg_in controlPacketsToSend) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Decapsulate(*reinterpret_cast(&channel), *reinterpret_cast(&encapBuffer), *reinterpret_cast(&decapsulatedPackets), *reinterpret_cast(&controlPacketsToSend)); return S_OK; } @@ -2264,11 +2422,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ServerUris(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ServerUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ServerUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerUris()); return S_OK; } catch (...) @@ -2278,11 +2437,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomConfiguration()); return S_OK; } catch (...) @@ -2292,10 +2452,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CustomConfiguration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomConfiguration(*reinterpret_cast(&value)); return S_OK; } @@ -2305,11 +2466,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VpnPluginPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VpnPluginPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VpnPluginPackageFamilyName()); return S_OK; } catch (...) @@ -2319,10 +2481,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_VpnPluginPackageFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().VpnPluginPackageFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -2340,7 +2503,8 @@ struct produce : produce_baseshim().RequireVpnClientAppUI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequireVpnClientAppUI()); return S_OK; } catch (...) @@ -2353,6 +2517,7 @@ struct produce : produce_baseshim()); this->shim().RequireVpnClientAppUI(value); return S_OK; } @@ -2366,7 +2531,8 @@ struct produce : produce_baseshim().ConnectionStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConnectionStatus()); return S_OK; } catch (...) @@ -2379,11 +2545,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ProfileName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProfileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProfileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProfileName()); return S_OK; } catch (...) @@ -2393,10 +2560,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ProfileName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProfileName(*reinterpret_cast(&value)); return S_OK; } @@ -2406,11 +2574,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AppTriggers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppTriggers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppTriggers()); return S_OK; } catch (...) @@ -2420,11 +2589,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Routes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Routes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Routes()); return S_OK; } catch (...) @@ -2434,11 +2604,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DomainNameInfoList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DomainNameInfoList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainNameInfoList()); return S_OK; } catch (...) @@ -2448,11 +2619,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_TrafficFilters(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TrafficFilters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrafficFilters()); return S_OK; } catch (...) @@ -2466,7 +2638,8 @@ struct produce : produce_baseshim().RememberCredentials()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RememberCredentials()); return S_OK; } catch (...) @@ -2479,6 +2652,7 @@ struct produce : produce_baseshim()); this->shim().RememberCredentials(value); return S_OK; } @@ -2492,7 +2666,8 @@ struct produce : produce_baseshim().AlwaysOn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlwaysOn()); return S_OK; } catch (...) @@ -2505,6 +2680,7 @@ struct produce : produce_baseshim()); this->shim().AlwaysOn(value); return S_OK; } @@ -2518,10 +2694,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_Address(abi_arg_in value) noexcept override + HRESULT __stdcall put_Address(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Address(*reinterpret_cast(&value)); return S_OK; } @@ -2531,11 +2708,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -2549,6 +2727,7 @@ struct produce : produce_baseshim()); this->shim().PrefixSize(value); return S_OK; } @@ -2562,7 +2741,8 @@ struct produce : produce_baseshim().PrefixSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrefixSize()); return S_OK; } catch (...) @@ -2575,10 +2755,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_Ipv4InclusionRoutes(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Ipv4InclusionRoutes(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ipv4InclusionRoutes(*reinterpret_cast *>(&value)); return S_OK; } @@ -2588,10 +2769,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Ipv6InclusionRoutes(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Ipv6InclusionRoutes(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ipv6InclusionRoutes(*reinterpret_cast *>(&value)); return S_OK; } @@ -2601,11 +2783,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Ipv4InclusionRoutes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Ipv4InclusionRoutes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Ipv4InclusionRoutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ipv4InclusionRoutes()); return S_OK; } catch (...) @@ -2615,11 +2798,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Ipv6InclusionRoutes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Ipv6InclusionRoutes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Ipv6InclusionRoutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ipv6InclusionRoutes()); return S_OK; } catch (...) @@ -2629,10 +2813,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Ipv4ExclusionRoutes(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Ipv4ExclusionRoutes(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ipv4ExclusionRoutes(*reinterpret_cast *>(&value)); return S_OK; } @@ -2642,10 +2827,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Ipv6ExclusionRoutes(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Ipv6ExclusionRoutes(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Ipv6ExclusionRoutes(*reinterpret_cast *>(&value)); return S_OK; } @@ -2655,11 +2841,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Ipv4ExclusionRoutes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Ipv4ExclusionRoutes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Ipv4ExclusionRoutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ipv4ExclusionRoutes()); return S_OK; } catch (...) @@ -2669,11 +2856,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Ipv6ExclusionRoutes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Ipv6ExclusionRoutes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Ipv6ExclusionRoutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ipv6ExclusionRoutes()); return S_OK; } catch (...) @@ -2687,6 +2875,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ExcludeLocalSubnets(value); return S_OK; } @@ -2700,7 +2889,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ExcludeLocalSubnets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExcludeLocalSubnets()); return S_OK; } catch (...) @@ -2713,11 +2903,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateVpnRoute(abi_arg_in address, uint8_t prefixSize, abi_arg_out route) noexcept override + HRESULT __stdcall abi_CreateVpnRoute(impl::abi_arg_in address, uint8_t prefixSize, impl::abi_arg_out route) noexcept override { try { - *route = detach(this->shim().CreateVpnRoute(*reinterpret_cast(&address), prefixSize)); + typename D::abi_guard guard(this->shim()); + *route = detach_abi(this->shim().CreateVpnRoute(*reinterpret_cast(&address), prefixSize)); return S_OK; } catch (...) @@ -2731,11 +2922,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StatementOfHealth(abi_arg_out value) noexcept override + HRESULT __stdcall get_StatementOfHealth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StatementOfHealth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StatementOfHealth()); return S_OK; } catch (...) @@ -2749,11 +2941,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AppId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -2763,10 +2956,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AppId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AppId(*reinterpret_cast(&value)); return S_OK; } @@ -2776,11 +2970,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AppClaims(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AppClaims()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppClaims()); return S_OK; } catch (...) @@ -2794,7 +2989,8 @@ struct produce : produce_baseshim().Protocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Protocol()); return S_OK; } catch (...) @@ -2807,6 +3003,7 @@ struct produce : produce_baseshim()); this->shim().Protocol(value); return S_OK; } @@ -2816,11 +3013,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_LocalPortRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalPortRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalPortRanges()); return S_OK; } catch (...) @@ -2830,11 +3028,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RemotePortRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemotePortRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemotePortRanges()); return S_OK; } catch (...) @@ -2844,11 +3043,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_LocalAddressRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalAddressRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalAddressRanges()); return S_OK; } catch (...) @@ -2858,11 +3058,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_RemoteAddressRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemoteAddressRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteAddressRanges()); return S_OK; } catch (...) @@ -2876,7 +3077,8 @@ struct produce : produce_baseshim().RoutingPolicyType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoutingPolicyType()); return S_OK; } catch (...) @@ -2889,6 +3091,7 @@ struct produce : produce_baseshim()); this->shim().RoutingPolicyType(value); return S_OK; } @@ -2902,11 +3105,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TrafficFilterList(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TrafficFilterList(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TrafficFilterList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrafficFilterList()); return S_OK; } catch (...) @@ -2920,7 +3124,8 @@ struct produce : produ { try { - *value = detach(this->shim().AllowOutbound()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowOutbound()); return S_OK; } catch (...) @@ -2933,6 +3138,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowOutbound(value); return S_OK; } @@ -2946,7 +3152,8 @@ struct produce : produ { try { - *value = detach(this->shim().AllowInbound()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowInbound()); return S_OK; } catch (...) @@ -2959,6 +3166,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowInbound(value); return S_OK; } @@ -2972,11 +3180,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in appId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in appId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&appId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&appId))); return S_OK; } catch (...) @@ -2993,457 +3202,457 @@ namespace Windows::Networking::Vpn { template void impl_IVpnPlugIn::Connect(const Windows::Networking::Vpn::VpnChannel & channel) const { - check_hresult(static_cast(static_cast(*this))->abi_Connect(get(channel))); + check_hresult(WINRT_SHIM(IVpnPlugIn)->abi_Connect(get_abi(channel))); } template void impl_IVpnPlugIn::Disconnect(const Windows::Networking::Vpn::VpnChannel & channel) const { - check_hresult(static_cast(static_cast(*this))->abi_Disconnect(get(channel))); + check_hresult(WINRT_SHIM(IVpnPlugIn)->abi_Disconnect(get_abi(channel))); } template void impl_IVpnPlugIn::GetKeepAlivePayload(const Windows::Networking::Vpn::VpnChannel & channel, Windows::Networking::Vpn::VpnPacketBuffer & keepAlivePacket) const { - check_hresult(static_cast(static_cast(*this))->abi_GetKeepAlivePayload(get(channel), put(keepAlivePacket))); + check_hresult(WINRT_SHIM(IVpnPlugIn)->abi_GetKeepAlivePayload(get_abi(channel), put_abi(keepAlivePacket))); } template void impl_IVpnPlugIn::Encapsulate(const Windows::Networking::Vpn::VpnChannel & channel, const Windows::Networking::Vpn::VpnPacketBufferList & packets, const Windows::Networking::Vpn::VpnPacketBufferList & encapulatedPackets) const { - check_hresult(static_cast(static_cast(*this))->abi_Encapsulate(get(channel), get(packets), get(encapulatedPackets))); + check_hresult(WINRT_SHIM(IVpnPlugIn)->abi_Encapsulate(get_abi(channel), get_abi(packets), get_abi(encapulatedPackets))); } template void impl_IVpnPlugIn::Decapsulate(const Windows::Networking::Vpn::VpnChannel & channel, const Windows::Networking::Vpn::VpnPacketBuffer & encapBuffer, const Windows::Networking::Vpn::VpnPacketBufferList & decapsulatedPackets, const Windows::Networking::Vpn::VpnPacketBufferList & controlPacketsToSend) const { - check_hresult(static_cast(static_cast(*this))->abi_Decapsulate(get(channel), get(encapBuffer), get(decapsulatedPackets), get(controlPacketsToSend))); + check_hresult(WINRT_SHIM(IVpnPlugIn)->abi_Decapsulate(get_abi(channel), get_abi(encapBuffer), get_abi(decapsulatedPackets), get_abi(controlPacketsToSend))); } -template void impl_IVpnCustomPrompt::Label(hstring_ref value) const +template void impl_IVpnCustomPrompt::Label(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Label(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->put_Label(get_abi(value))); } template hstring impl_IVpnCustomPrompt::Label() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Label(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->get_Label(put_abi(value))); return value; } template void impl_IVpnCustomPrompt::Compulsory(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Compulsory(value)); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->put_Compulsory(value)); } template bool impl_IVpnCustomPrompt::Compulsory() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Compulsory(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->get_Compulsory(&value)); return value; } template void impl_IVpnCustomPrompt::Bordered(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Bordered(value)); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->put_Bordered(value)); } template bool impl_IVpnCustomPrompt::Bordered() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Bordered(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPrompt)->get_Bordered(&value)); return value; } -template void impl_IVpnCustomEditBox::DefaultText(hstring_ref value) const +template void impl_IVpnCustomEditBox::DefaultText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultText(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomEditBox)->put_DefaultText(get_abi(value))); } template hstring impl_IVpnCustomEditBox::DefaultText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DefaultText(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomEditBox)->get_DefaultText(put_abi(value))); return value; } template void impl_IVpnCustomEditBox::NoEcho(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NoEcho(value)); + check_hresult(WINRT_SHIM(IVpnCustomEditBox)->put_NoEcho(value)); } template bool impl_IVpnCustomEditBox::NoEcho() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NoEcho(&value)); + check_hresult(WINRT_SHIM(IVpnCustomEditBox)->get_NoEcho(&value)); return value; } template hstring impl_IVpnCustomEditBox::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomEditBox)->get_Text(put_abi(value))); return value; } template void impl_IVpnCustomComboBox::OptionsText(const Windows::Foundation::Collections::IVectorView & value) const { - check_hresult(static_cast(static_cast(*this))->put_OptionsText(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomComboBox)->put_OptionsText(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IVpnCustomComboBox::OptionsText() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_OptionsText(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomComboBox)->get_OptionsText(put_abi(value))); return value; } template uint32_t impl_IVpnCustomComboBox::Selected() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Selected(&value)); + check_hresult(WINRT_SHIM(IVpnCustomComboBox)->get_Selected(&value)); return value; } -template void impl_IVpnCustomTextBox::DisplayText(hstring_ref value) const +template void impl_IVpnCustomTextBox::DisplayText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayText(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomTextBox)->put_DisplayText(get_abi(value))); } template hstring impl_IVpnCustomTextBox::DisplayText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayText(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomTextBox)->get_DisplayText(put_abi(value))); return value; } template void impl_IVpnCustomCheckBox::InitialCheckState(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialCheckState(value)); + check_hresult(WINRT_SHIM(IVpnCustomCheckBox)->put_InitialCheckState(value)); } template bool impl_IVpnCustomCheckBox::InitialCheckState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialCheckState(&value)); + check_hresult(WINRT_SHIM(IVpnCustomCheckBox)->get_InitialCheckState(&value)); return value; } template bool impl_IVpnCustomCheckBox::Checked() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Checked(&value)); + check_hresult(WINRT_SHIM(IVpnCustomCheckBox)->get_Checked(&value)); return value; } template Windows::Networking::Vpn::VpnRoute impl_IVpnRouteFactory::CreateVpnRoute(const Windows::Networking::HostName & address, uint8_t prefixSize) const { Windows::Networking::Vpn::VpnRoute route { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVpnRoute(get(address), prefixSize, put(route))); + check_hresult(WINRT_SHIM(IVpnRouteFactory)->abi_CreateVpnRoute(get_abi(address), prefixSize, put_abi(route))); return route; } template void impl_IVpnRoute::Address(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_Address(get(value))); + check_hresult(WINRT_SHIM(IVpnRoute)->put_Address(get_abi(value))); } template Windows::Networking::HostName impl_IVpnRoute::Address() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IVpnRoute)->get_Address(put_abi(value))); return value; } template void impl_IVpnRoute::PrefixSize(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PrefixSize(value)); + check_hresult(WINRT_SHIM(IVpnRoute)->put_PrefixSize(value)); } template uint8_t impl_IVpnRoute::PrefixSize() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PrefixSize(&value)); + check_hresult(WINRT_SHIM(IVpnRoute)->get_PrefixSize(&value)); return value; } template void impl_IVpnRouteAssignment::Ipv4InclusionRoutes(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Ipv4InclusionRoutes(get(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->put_Ipv4InclusionRoutes(get_abi(value))); } template void impl_IVpnRouteAssignment::Ipv6InclusionRoutes(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Ipv6InclusionRoutes(get(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->put_Ipv6InclusionRoutes(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnRouteAssignment::Ipv4InclusionRoutes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Ipv4InclusionRoutes(put(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->get_Ipv4InclusionRoutes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnRouteAssignment::Ipv6InclusionRoutes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Ipv6InclusionRoutes(put(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->get_Ipv6InclusionRoutes(put_abi(value))); return value; } template void impl_IVpnRouteAssignment::Ipv4ExclusionRoutes(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Ipv4ExclusionRoutes(get(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->put_Ipv4ExclusionRoutes(get_abi(value))); } template void impl_IVpnRouteAssignment::Ipv6ExclusionRoutes(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Ipv6ExclusionRoutes(get(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->put_Ipv6ExclusionRoutes(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnRouteAssignment::Ipv4ExclusionRoutes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Ipv4ExclusionRoutes(put(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->get_Ipv4ExclusionRoutes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnRouteAssignment::Ipv6ExclusionRoutes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Ipv6ExclusionRoutes(put(value))); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->get_Ipv6ExclusionRoutes(put_abi(value))); return value; } template void impl_IVpnRouteAssignment::ExcludeLocalSubnets(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ExcludeLocalSubnets(value)); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->put_ExcludeLocalSubnets(value)); } template bool impl_IVpnRouteAssignment::ExcludeLocalSubnets() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ExcludeLocalSubnets(&value)); + check_hresult(WINRT_SHIM(IVpnRouteAssignment)->get_ExcludeLocalSubnets(&value)); return value; } -template Windows::Networking::Vpn::VpnNamespaceInfo impl_IVpnNamespaceInfoFactory::CreateVpnNamespaceInfo(hstring_ref name, const Windows::Foundation::Collections::IVector & dnsServerList, const Windows::Foundation::Collections::IVector & proxyServerList) const +template Windows::Networking::Vpn::VpnNamespaceInfo impl_IVpnNamespaceInfoFactory::CreateVpnNamespaceInfo(hstring_view name, const Windows::Foundation::Collections::IVector & dnsServerList, const Windows::Foundation::Collections::IVector & proxyServerList) const { Windows::Networking::Vpn::VpnNamespaceInfo namespaceInfo { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVpnNamespaceInfo(get(name), get(dnsServerList), get(proxyServerList), put(namespaceInfo))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfoFactory)->abi_CreateVpnNamespaceInfo(get_abi(name), get_abi(dnsServerList), get_abi(proxyServerList), put_abi(namespaceInfo))); return namespaceInfo; } -template void impl_IVpnNamespaceInfo::Namespace(hstring_ref value) const +template void impl_IVpnNamespaceInfo::Namespace(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Namespace(get(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->put_Namespace(get_abi(value))); } template hstring impl_IVpnNamespaceInfo::Namespace() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Namespace(put(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->get_Namespace(put_abi(value))); return value; } template void impl_IVpnNamespaceInfo::DnsServers(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_DnsServers(get(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->put_DnsServers(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnNamespaceInfo::DnsServers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DnsServers(put(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->get_DnsServers(put_abi(value))); return value; } template void impl_IVpnNamespaceInfo::WebProxyServers(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_WebProxyServers(get(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->put_WebProxyServers(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnNamespaceInfo::WebProxyServers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WebProxyServers(put(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceInfo)->get_WebProxyServers(put_abi(value))); return value; } template void impl_IVpnNamespaceAssignment::NamespaceList(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_NamespaceList(get(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceAssignment)->put_NamespaceList(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnNamespaceAssignment::NamespaceList() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_NamespaceList(put(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceAssignment)->get_NamespaceList(put_abi(value))); return value; } template void impl_IVpnNamespaceAssignment::ProxyAutoConfigUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProxyAutoConfigUri(get(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceAssignment)->put_ProxyAutoConfigUri(get_abi(value))); } template Windows::Foundation::Uri impl_IVpnNamespaceAssignment::ProxyAutoConfigUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProxyAutoConfigUri(put(value))); + check_hresult(WINRT_SHIM(IVpnNamespaceAssignment)->get_ProxyAutoConfigUri(put_abi(value))); return value; } -template Windows::Networking::Vpn::VpnInterfaceId impl_IVpnInterfaceIdFactory::CreateVpnInterfaceId(array_ref address) const +template Windows::Networking::Vpn::VpnInterfaceId impl_IVpnInterfaceIdFactory::CreateVpnInterfaceId(array_view address) const { Windows::Networking::Vpn::VpnInterfaceId vpnInterfaceId { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVpnInterfaceId(address.size(), get(address), put(vpnInterfaceId))); + check_hresult(WINRT_SHIM(IVpnInterfaceIdFactory)->abi_CreateVpnInterfaceId(address.size(), get_abi(address), put_abi(vpnInterfaceId))); return vpnInterfaceId; } template void impl_IVpnInterfaceId::GetAddressInfo(com_array & id) const { - check_hresult(static_cast(static_cast(*this))->abi_GetAddressInfo(put_size(id), put(id))); + check_hresult(WINRT_SHIM(IVpnInterfaceId)->abi_GetAddressInfo(impl::put_size_abi(id), put_abi(id))); } template Windows::Security::Credentials::PasswordCredential impl_IVpnPickedCredential::PasskeyCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasskeyCredential(put(value))); + check_hresult(WINRT_SHIM(IVpnPickedCredential)->get_PasskeyCredential(put_abi(value))); return value; } template hstring impl_IVpnPickedCredential::AdditionalPin() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalPin(put(value))); + check_hresult(WINRT_SHIM(IVpnPickedCredential)->get_AdditionalPin(put_abi(value))); return value; } template Windows::Security::Credentials::PasswordCredential impl_IVpnPickedCredential::OldPasswordCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OldPasswordCredential(put(value))); + check_hresult(WINRT_SHIM(IVpnPickedCredential)->get_OldPasswordCredential(put_abi(value))); return value; } template Windows::Security::Credentials::PasswordCredential impl_IVpnCredential::PasskeyCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasskeyCredential(put(value))); + check_hresult(WINRT_SHIM(IVpnCredential)->get_PasskeyCredential(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_IVpnCredential::CertificateCredential() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CertificateCredential(put(value))); + check_hresult(WINRT_SHIM(IVpnCredential)->get_CertificateCredential(put_abi(value))); return value; } template hstring impl_IVpnCredential::AdditionalPin() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalPin(put(value))); + check_hresult(WINRT_SHIM(IVpnCredential)->get_AdditionalPin(put_abi(value))); return value; } template Windows::Security::Credentials::PasswordCredential impl_IVpnCredential::OldPasswordCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OldPasswordCredential(put(value))); + check_hresult(WINRT_SHIM(IVpnCredential)->get_OldPasswordCredential(put_abi(value))); return value; } template Windows::Storage::Streams::Buffer impl_IVpnSystemHealth::StatementOfHealth() const { Windows::Storage::Streams::Buffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StatementOfHealth(put(value))); + check_hresult(WINRT_SHIM(IVpnSystemHealth)->get_StatementOfHealth(put_abi(value))); return value; } template hstring impl_IVpnChannelConfiguration::ServerServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServerServiceName(put(value))); + check_hresult(WINRT_SHIM(IVpnChannelConfiguration)->get_ServerServiceName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IVpnChannelConfiguration::ServerHostNameList() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerHostNameList(put(value))); + check_hresult(WINRT_SHIM(IVpnChannelConfiguration)->get_ServerHostNameList(put_abi(value))); return value; } template hstring impl_IVpnChannelConfiguration::CustomField() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomField(put(value))); + check_hresult(WINRT_SHIM(IVpnChannelConfiguration)->get_CustomField(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IVpnChannelConfiguration2::ServerUris() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ServerUris(put(value))); + check_hresult(WINRT_SHIM(IVpnChannelConfiguration2)->get_ServerUris(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnChannelActivityEventType impl_IVpnChannelActivityEventArgs::Type() const { Windows::Networking::Vpn::VpnChannelActivityEventType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IVpnChannelActivityEventArgs)->get_Type(&value)); return value; } -template void impl_IVpnChannel::AssociateTransport(const Windows::IInspectable & mainOuterTunnelTransport, const Windows::IInspectable & optionalOuterTunnelTransport) const +template void impl_IVpnChannel::AssociateTransport(const Windows::Foundation::IInspectable & mainOuterTunnelTransport, const Windows::Foundation::IInspectable & optionalOuterTunnelTransport) const { - check_hresult(static_cast(static_cast(*this))->abi_AssociateTransport(get(mainOuterTunnelTransport), get(optionalOuterTunnelTransport))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_AssociateTransport(get_abi(mainOuterTunnelTransport), get_abi(optionalOuterTunnelTransport))); } -template void impl_IVpnChannel::Start(const Windows::Foundation::Collections::IVectorView & assignedClientIPv4list, const Windows::Foundation::Collections::IVectorView & assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & routeScope, const Windows::Networking::Vpn::VpnNamespaceAssignment & namespaceScope, uint32_t mtuSize, uint32_t maxFrameSize, bool optimizeForLowCostNetwork, const Windows::IInspectable & mainOuterTunnelTransport, const Windows::IInspectable & optionalOuterTunnelTransport) const +template void impl_IVpnChannel::Start(vector_view assignedClientIPv4list, vector_view assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & routeScope, const Windows::Networking::Vpn::VpnNamespaceAssignment & namespaceScope, uint32_t mtuSize, uint32_t maxFrameSize, bool optimizeForLowCostNetwork, const Windows::Foundation::IInspectable & mainOuterTunnelTransport, const Windows::Foundation::IInspectable & optionalOuterTunnelTransport) const { - check_hresult(static_cast(static_cast(*this))->abi_Start(get(assignedClientIPv4list), get(assignedClientIPv6list), get(vpnInterfaceId), get(routeScope), get(namespaceScope), mtuSize, maxFrameSize, optimizeForLowCostNetwork, get(mainOuterTunnelTransport), get(optionalOuterTunnelTransport))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_Start(get_abi(assignedClientIPv4list), get_abi(assignedClientIPv6list), get_abi(vpnInterfaceId), get_abi(routeScope), get_abi(namespaceScope), mtuSize, maxFrameSize, optimizeForLowCostNetwork, get_abi(mainOuterTunnelTransport), get_abi(optionalOuterTunnelTransport))); } template void impl_IVpnChannel::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_Stop()); } template Windows::Networking::Vpn::VpnPickedCredential impl_IVpnChannel::RequestCredentials(Windows::Networking::Vpn::VpnCredentialType credType, bool isRetry, bool isSingleSignOnCredential, const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { Windows::Networking::Vpn::VpnPickedCredential credential { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RequestCredentials(credType, isRetry, isSingleSignOnCredential, get(certificate), put(credential))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_RequestCredentials(credType, isRetry, isSingleSignOnCredential, get_abi(certificate), put_abi(credential))); return credential; } template void impl_IVpnChannel::RequestVpnPacketBuffer(Windows::Networking::Vpn::VpnDataPathType type, Windows::Networking::Vpn::VpnPacketBuffer & vpnPacketBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_RequestVpnPacketBuffer(type, put(vpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_RequestVpnPacketBuffer(type, put_abi(vpnPacketBuffer))); } -template void impl_IVpnChannel::LogDiagnosticMessage(hstring_ref message) const +template void impl_IVpnChannel::LogDiagnosticMessage(hstring_view message) const { - check_hresult(static_cast(static_cast(*this))->abi_LogDiagnosticMessage(get(message))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_LogDiagnosticMessage(get_abi(message))); } template uint32_t impl_IVpnChannel::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IVpnChannel)->get_Id(&value)); return value; } template Windows::Networking::Vpn::VpnChannelConfiguration impl_IVpnChannel::Configuration() const { Windows::Networking::Vpn::VpnChannelConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Configuration(put(value))); + check_hresult(WINRT_SHIM(IVpnChannel)->get_Configuration(put_abi(value))); return value; } template event_token impl_IVpnChannel::ActivityChange(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActivityChange(get(handler), &token)); + check_hresult(WINRT_SHIM(IVpnChannel)->add_ActivityChange(get_abi(handler), &token)); return token; } @@ -3454,57 +3663,57 @@ template event_revoker impl_IVpnChannel::ActivityCh template void impl_IVpnChannel::ActivityChange(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActivityChange(token)); + check_hresult(WINRT_SHIM(IVpnChannel)->remove_ActivityChange(token)); } -template void impl_IVpnChannel::PlugInContext(const Windows::IInspectable & value) const +template void impl_IVpnChannel::PlugInContext(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_PlugInContext(get(value))); + check_hresult(WINRT_SHIM(IVpnChannel)->put_PlugInContext(get_abi(value))); } -template Windows::IInspectable impl_IVpnChannel::PlugInContext() const +template Windows::Foundation::IInspectable impl_IVpnChannel::PlugInContext() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_PlugInContext(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IVpnChannel)->get_PlugInContext(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnSystemHealth impl_IVpnChannel::SystemHealth() const { Windows::Networking::Vpn::VpnSystemHealth value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SystemHealth(put(value))); + check_hresult(WINRT_SHIM(IVpnChannel)->get_SystemHealth(put_abi(value))); return value; } -template void impl_IVpnChannel::RequestCustomPrompt(const Windows::Foundation::Collections::IVectorView & customPrompt) const +template void impl_IVpnChannel::RequestCustomPrompt(vector_view customPrompt) const { - check_hresult(static_cast(static_cast(*this))->abi_RequestCustomPrompt(get(customPrompt))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_RequestCustomPrompt(get_abi(customPrompt))); } -template void impl_IVpnChannel::SetErrorMessage(hstring_ref message) const +template void impl_IVpnChannel::SetErrorMessage(hstring_view message) const { - check_hresult(static_cast(static_cast(*this))->abi_SetErrorMessage(get(message))); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_SetErrorMessage(get_abi(message))); } -template void impl_IVpnChannel::SetAllowedSslTlsVersions(const Windows::IInspectable & tunnelTransport, bool useTls12) const +template void impl_IVpnChannel::SetAllowedSslTlsVersions(const Windows::Foundation::IInspectable & tunnelTransport, bool useTls12) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAllowedSslTlsVersions(get(tunnelTransport), useTls12)); + check_hresult(WINRT_SHIM(IVpnChannel)->abi_SetAllowedSslTlsVersions(get_abi(tunnelTransport), useTls12)); } -template void impl_IVpnChannel2::StartWithMainTransport(const Windows::Foundation::Collections::IVectorView & assignedClientIPv4list, const Windows::Foundation::Collections::IVectorView & assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved, const Windows::IInspectable & mainOuterTunnelTransport) const +template void impl_IVpnChannel2::StartWithMainTransport(vector_view assignedClientIPv4list, vector_view assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved, const Windows::Foundation::IInspectable & mainOuterTunnelTransport) const { - check_hresult(static_cast(static_cast(*this))->abi_StartWithMainTransport(get(assignedClientIPv4list), get(assignedClientIPv6list), get(vpnInterfaceId), get(assignedRoutes), get(assignedDomainName), mtuSize, maxFrameSize, Reserved, get(mainOuterTunnelTransport))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_StartWithMainTransport(get_abi(assignedClientIPv4list), get_abi(assignedClientIPv6list), get_abi(vpnInterfaceId), get_abi(assignedRoutes), get_abi(assignedDomainName), mtuSize, maxFrameSize, Reserved, get_abi(mainOuterTunnelTransport))); } -template void impl_IVpnChannel2::StartExistingTransports(const Windows::Foundation::Collections::IVectorView & assignedClientIPv4list, const Windows::Foundation::Collections::IVectorView & assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved) const +template void impl_IVpnChannel2::StartExistingTransports(vector_view assignedClientIPv4list, vector_view assignedClientIPv6list, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedDomainName, uint32_t mtuSize, uint32_t maxFrameSize, bool Reserved) const { - check_hresult(static_cast(static_cast(*this))->abi_StartExistingTransports(get(assignedClientIPv4list), get(assignedClientIPv6list), get(vpnInterfaceId), get(assignedRoutes), get(assignedDomainName), mtuSize, maxFrameSize, Reserved)); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_StartExistingTransports(get_abi(assignedClientIPv4list), get_abi(assignedClientIPv6list), get_abi(vpnInterfaceId), get_abi(assignedRoutes), get_abi(assignedDomainName), mtuSize, maxFrameSize, Reserved)); } template event_token impl_IVpnChannel2::ActivityStateChange(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActivityStateChange(get(handler), &token)); + check_hresult(WINRT_SHIM(IVpnChannel2)->add_ActivityStateChange(get_abi(handler), &token)); return token; } @@ -3515,781 +3724,781 @@ template event_revoker impl_IVpnChannel2::Activity template void impl_IVpnChannel2::ActivityStateChange(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActivityStateChange(token)); + check_hresult(WINRT_SHIM(IVpnChannel2)->remove_ActivityStateChange(token)); } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnChannel2::GetVpnSendPacketBuffer() const { Windows::Networking::Vpn::VpnPacketBuffer vpnSendPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetVpnSendPacketBuffer(put(vpnSendPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_GetVpnSendPacketBuffer(put_abi(vpnSendPacketBuffer))); return vpnSendPacketBuffer; } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnChannel2::GetVpnReceivePacketBuffer() const { Windows::Networking::Vpn::VpnPacketBuffer vpnReceivePacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetVpnReceivePacketBuffer(put(vpnReceivePacketBuffer))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_GetVpnReceivePacketBuffer(put_abi(vpnReceivePacketBuffer))); return vpnReceivePacketBuffer; } -template Windows::Foundation::IAsyncAction impl_IVpnChannel2::RequestCustomPromptAsync(const Windows::Foundation::Collections::IVectorView & customPromptElement) const +template Windows::Foundation::IAsyncAction impl_IVpnChannel2::RequestCustomPromptAsync(vector_view customPromptElement) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_RequestCustomPromptAsync(get(customPromptElement), put(action))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_RequestCustomPromptAsync(get_abi(customPromptElement), put_abi(action))); return action; } template Windows::Foundation::IAsyncOperation impl_IVpnChannel2::RequestCredentialsAsync(Windows::Networking::Vpn::VpnCredentialType credType, uint32_t credOptions, const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { Windows::Foundation::IAsyncOperation credential; - check_hresult(static_cast(static_cast(*this))->abi_RequestCredentialsWithCertificateAsync(credType, credOptions, get(certificate), put(credential))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_RequestCredentialsWithCertificateAsync(credType, credOptions, get_abi(certificate), put_abi(credential))); return credential; } template Windows::Foundation::IAsyncOperation impl_IVpnChannel2::RequestCredentialsAsync(Windows::Networking::Vpn::VpnCredentialType credType, uint32_t credOptions) const { Windows::Foundation::IAsyncOperation credential; - check_hresult(static_cast(static_cast(*this))->abi_RequestCredentialsWithOptionsAsync(credType, credOptions, put(credential))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_RequestCredentialsWithOptionsAsync(credType, credOptions, put_abi(credential))); return credential; } template Windows::Foundation::IAsyncOperation impl_IVpnChannel2::RequestCredentialsAsync(Windows::Networking::Vpn::VpnCredentialType credType) const { Windows::Foundation::IAsyncOperation credential; - check_hresult(static_cast(static_cast(*this))->abi_RequestCredentialsSimpleAsync(credType, put(credential))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_RequestCredentialsSimpleAsync(credType, put_abi(credential))); return credential; } -template void impl_IVpnChannel2::TerminateConnection(hstring_ref message) const +template void impl_IVpnChannel2::TerminateConnection(hstring_view message) const { - check_hresult(static_cast(static_cast(*this))->abi_TerminateConnection(get(message))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_TerminateConnection(get_abi(message))); } -template void impl_IVpnChannel2::StartWithTrafficFilter(const Windows::Foundation::Collections::IVectorView & assignedClientIpv4List, const Windows::Foundation::Collections::IVectorView & assignedClientIpv6List, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedNamespace, uint32_t mtuSize, uint32_t maxFrameSize, bool reserved, const Windows::IInspectable & mainOuterTunnelTransport, const Windows::IInspectable & optionalOuterTunnelTransport, const Windows::Networking::Vpn::VpnTrafficFilterAssignment & assignedTrafficFilters) const +template void impl_IVpnChannel2::StartWithTrafficFilter(vector_view assignedClientIpv4List, vector_view assignedClientIpv6List, const Windows::Networking::Vpn::VpnInterfaceId & vpnInterfaceId, const Windows::Networking::Vpn::VpnRouteAssignment & assignedRoutes, const Windows::Networking::Vpn::VpnDomainNameAssignment & assignedNamespace, uint32_t mtuSize, uint32_t maxFrameSize, bool reserved, const Windows::Foundation::IInspectable & mainOuterTunnelTransport, const Windows::Foundation::IInspectable & optionalOuterTunnelTransport, const Windows::Networking::Vpn::VpnTrafficFilterAssignment & assignedTrafficFilters) const { - check_hresult(static_cast(static_cast(*this))->abi_StartWithTrafficFilter(get(assignedClientIpv4List), get(assignedClientIpv6List), get(vpnInterfaceId), get(assignedRoutes), get(assignedNamespace), mtuSize, maxFrameSize, reserved, get(mainOuterTunnelTransport), get(optionalOuterTunnelTransport), get(assignedTrafficFilters))); + check_hresult(WINRT_SHIM(IVpnChannel2)->abi_StartWithTrafficFilter(get_abi(assignedClientIpv4List), get_abi(assignedClientIpv6List), get_abi(vpnInterfaceId), get_abi(assignedRoutes), get_abi(assignedNamespace), mtuSize, maxFrameSize, reserved, get_abi(mainOuterTunnelTransport), get_abi(optionalOuterTunnelTransport), get_abi(assignedTrafficFilters))); } -template void impl_IVpnCustomPromptElement::DisplayName(hstring_ref value) const +template void impl_IVpnCustomPromptElement::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->put_DisplayName(get_abi(value))); } template hstring impl_IVpnCustomPromptElement::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->get_DisplayName(put_abi(value))); return value; } template void impl_IVpnCustomPromptElement::Compulsory(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Compulsory(value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->put_Compulsory(value)); } template bool impl_IVpnCustomPromptElement::Compulsory() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Compulsory(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->get_Compulsory(&value)); return value; } template void impl_IVpnCustomPromptElement::Emphasized(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Emphasized(value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->put_Emphasized(value)); } template bool impl_IVpnCustomPromptElement::Emphasized() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Emphasized(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptElement)->get_Emphasized(&value)); return value; } -template void impl_IVpnChannelStatics::ProcessEventAsync(const Windows::IInspectable & thirdPartyPlugIn, const Windows::IInspectable & event) const +template void impl_IVpnChannelStatics::ProcessEventAsync(const Windows::Foundation::IInspectable & thirdPartyPlugIn, const Windows::Foundation::IInspectable & event) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessEventAsync(get(thirdPartyPlugIn), get(event))); + check_hresult(WINRT_SHIM(IVpnChannelStatics)->abi_ProcessEventAsync(get_abi(thirdPartyPlugIn), get_abi(event))); } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnPacketBufferFactory::CreateVpnPacketBuffer(const Windows::Networking::Vpn::VpnPacketBuffer & parentBuffer, uint32_t offset, uint32_t length) const { Windows::Networking::Vpn::VpnPacketBuffer vpnPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVpnPacketBuffer(get(parentBuffer), offset, length, put(vpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferFactory)->abi_CreateVpnPacketBuffer(get_abi(parentBuffer), offset, length, put_abi(vpnPacketBuffer))); return vpnPacketBuffer; } template Windows::Storage::Streams::Buffer impl_IVpnPacketBuffer::Buffer() const { Windows::Storage::Streams::Buffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Buffer(put(value))); + check_hresult(WINRT_SHIM(IVpnPacketBuffer)->get_Buffer(put_abi(value))); return value; } template void impl_IVpnPacketBuffer::Status(Windows::Networking::Vpn::VpnPacketBufferStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IVpnPacketBuffer)->put_Status(value)); } template Windows::Networking::Vpn::VpnPacketBufferStatus impl_IVpnPacketBuffer::Status() const { Windows::Networking::Vpn::VpnPacketBufferStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IVpnPacketBuffer)->get_Status(&value)); return value; } template void impl_IVpnPacketBuffer::TransportAffinity(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TransportAffinity(value)); + check_hresult(WINRT_SHIM(IVpnPacketBuffer)->put_TransportAffinity(value)); } template uint32_t impl_IVpnPacketBuffer::TransportAffinity() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TransportAffinity(&value)); + check_hresult(WINRT_SHIM(IVpnPacketBuffer)->get_TransportAffinity(&value)); return value; } template Windows::Networking::Vpn::VpnAppId impl_IVpnPacketBuffer2::AppId() const { Windows::Networking::Vpn::VpnAppId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppId(put(value))); + check_hresult(WINRT_SHIM(IVpnPacketBuffer2)->get_AppId(put_abi(value))); return value; } template void impl_IVpnPacketBufferList::Append(const Windows::Networking::Vpn::VpnPacketBuffer & nextVpnPacketBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_Append(get(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->abi_Append(get_abi(nextVpnPacketBuffer))); } template void impl_IVpnPacketBufferList::AddAtBegin(const Windows::Networking::Vpn::VpnPacketBuffer & nextVpnPacketBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_AddAtBegin(get(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->abi_AddAtBegin(get_abi(nextVpnPacketBuffer))); } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnPacketBufferList::RemoveAtEnd() const { Windows::Networking::Vpn::VpnPacketBuffer nextVpnPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RemoveAtEnd(put(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->abi_RemoveAtEnd(put_abi(nextVpnPacketBuffer))); return nextVpnPacketBuffer; } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnPacketBufferList::RemoveAtBegin() const { Windows::Networking::Vpn::VpnPacketBuffer nextVpnPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RemoveAtBegin(put(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->abi_RemoveAtBegin(put_abi(nextVpnPacketBuffer))); return nextVpnPacketBuffer; } template void impl_IVpnPacketBufferList::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->abi_Clear()); } template void impl_IVpnPacketBufferList::Status(Windows::Networking::Vpn::VpnPacketBufferStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->put_Status(value)); } template Windows::Networking::Vpn::VpnPacketBufferStatus impl_IVpnPacketBufferList::Status() const { Windows::Networking::Vpn::VpnPacketBufferStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->get_Status(&value)); return value; } template uint32_t impl_IVpnPacketBufferList::Size() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(IVpnPacketBufferList)->get_Size(&value)); return value; } template void impl_IVpnPacketBufferList2::AddLeadingPacket(const Windows::Networking::Vpn::VpnPacketBuffer & nextVpnPacketBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_AddLeadingPacket(get(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList2)->abi_AddLeadingPacket(get_abi(nextVpnPacketBuffer))); } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnPacketBufferList2::RemoveLeadingPacket() const { Windows::Networking::Vpn::VpnPacketBuffer nextVpnPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RemoveLeadingPacket(put(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList2)->abi_RemoveLeadingPacket(put_abi(nextVpnPacketBuffer))); return nextVpnPacketBuffer; } template void impl_IVpnPacketBufferList2::AddTrailingPacket(const Windows::Networking::Vpn::VpnPacketBuffer & nextVpnPacketBuffer) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTrailingPacket(get(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList2)->abi_AddTrailingPacket(get_abi(nextVpnPacketBuffer))); } template Windows::Networking::Vpn::VpnPacketBuffer impl_IVpnPacketBufferList2::RemoveTrailingPacket() const { Windows::Networking::Vpn::VpnPacketBuffer nextVpnPacketBuffer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_RemoveTrailingPacket(put(nextVpnPacketBuffer))); + check_hresult(WINRT_SHIM(IVpnPacketBufferList2)->abi_RemoveTrailingPacket(put_abi(nextVpnPacketBuffer))); return nextVpnPacketBuffer; } -template void impl_IVpnCustomPromptTextInput::PlaceholderText(hstring_ref value) const +template void impl_IVpnCustomPromptTextInput::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptTextInput)->put_PlaceholderText(get_abi(value))); } template hstring impl_IVpnCustomPromptTextInput::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptTextInput)->get_PlaceholderText(put_abi(value))); return value; } template void impl_IVpnCustomPromptTextInput::IsTextHidden(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextHidden(value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptTextInput)->put_IsTextHidden(value)); } template bool impl_IVpnCustomPromptTextInput::IsTextHidden() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextHidden(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptTextInput)->get_IsTextHidden(&value)); return value; } template hstring impl_IVpnCustomPromptTextInput::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptTextInput)->get_Text(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnCustomPromptOptionSelector::Options() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Options(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptOptionSelector)->get_Options(put_abi(value))); return value; } template uint32_t impl_IVpnCustomPromptOptionSelector::SelectedIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndex(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptOptionSelector)->get_SelectedIndex(&value)); return value; } template void impl_IVpnCustomPromptBooleanInput::InitialValue(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialValue(value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptBooleanInput)->put_InitialValue(value)); } template bool impl_IVpnCustomPromptBooleanInput::InitialValue() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialValue(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptBooleanInput)->get_InitialValue(&value)); return value; } template bool impl_IVpnCustomPromptBooleanInput::Value() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IVpnCustomPromptBooleanInput)->get_Value(&value)); return value; } -template void impl_IVpnCustomPromptText::Text(hstring_ref value) const +template void impl_IVpnCustomPromptText::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptText)->put_Text(get_abi(value))); } template hstring impl_IVpnCustomPromptText::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IVpnCustomPromptText)->get_Text(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnChannelActivityEventType impl_IVpnChannelActivityStateChangedArgs::ActivityState() const { Windows::Networking::Vpn::VpnChannelActivityEventType value {}; - check_hresult(static_cast(static_cast(*this))->get_ActivityState(&value)); + check_hresult(WINRT_SHIM(IVpnChannelActivityStateChangedArgs)->get_ActivityState(&value)); return value; } -template Windows::Networking::Vpn::VpnDomainNameInfo impl_IVpnDomainNameInfoFactory::CreateVpnDomainNameInfo(hstring_ref name, Windows::Networking::Vpn::VpnDomainNameType nameType, const Windows::Foundation::Collections::IIterable & dnsServerList, const Windows::Foundation::Collections::IIterable & proxyServerList) const +template Windows::Networking::Vpn::VpnDomainNameInfo impl_IVpnDomainNameInfoFactory::CreateVpnDomainNameInfo(hstring_view name, Windows::Networking::Vpn::VpnDomainNameType nameType, iterable dnsServerList, iterable proxyServerList) const { Windows::Networking::Vpn::VpnDomainNameInfo domainNameInfo { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVpnDomainNameInfo(get(name), nameType, get(dnsServerList), get(proxyServerList), put(domainNameInfo))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfoFactory)->abi_CreateVpnDomainNameInfo(get_abi(name), nameType, get_abi(dnsServerList), get_abi(proxyServerList), put_abi(domainNameInfo))); return domainNameInfo; } template void impl_IVpnDomainNameInfo::DomainName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainName(get(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->put_DomainName(get_abi(value))); } template Windows::Networking::HostName impl_IVpnDomainNameInfo::DomainName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DomainName(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->get_DomainName(put_abi(value))); return value; } template void impl_IVpnDomainNameInfo::DomainNameType(Windows::Networking::Vpn::VpnDomainNameType value) const { - check_hresult(static_cast(static_cast(*this))->put_DomainNameType(value)); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->put_DomainNameType(value)); } template Windows::Networking::Vpn::VpnDomainNameType impl_IVpnDomainNameInfo::DomainNameType() const { Windows::Networking::Vpn::VpnDomainNameType value {}; - check_hresult(static_cast(static_cast(*this))->get_DomainNameType(&value)); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->get_DomainNameType(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IVpnDomainNameInfo::DnsServers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DnsServers(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->get_DnsServers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnDomainNameInfo::WebProxyServers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WebProxyServers(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo)->get_WebProxyServers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnDomainNameInfo2::WebProxyUris() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WebProxyUris(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameInfo2)->get_WebProxyUris(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnDomainNameAssignment::DomainNameList() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DomainNameList(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameAssignment)->get_DomainNameList(put_abi(value))); return value; } template void impl_IVpnDomainNameAssignment::ProxyAutoConfigurationUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProxyAutoConfigurationUri(get(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameAssignment)->put_ProxyAutoConfigurationUri(get_abi(value))); } template Windows::Foundation::Uri impl_IVpnDomainNameAssignment::ProxyAutoConfigurationUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProxyAutoConfigurationUri(put(value))); + check_hresult(WINRT_SHIM(IVpnDomainNameAssignment)->get_ProxyAutoConfigurationUri(put_abi(value))); return value; } -template Windows::Networking::Vpn::VpnAppId impl_IVpnAppIdFactory::Create(Windows::Networking::Vpn::VpnAppIdType type, hstring_ref value) const +template Windows::Networking::Vpn::VpnAppId impl_IVpnAppIdFactory::Create(Windows::Networking::Vpn::VpnAppIdType type, hstring_view value) const { Windows::Networking::Vpn::VpnAppId result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(type, get(value), put(result))); + check_hresult(WINRT_SHIM(IVpnAppIdFactory)->abi_Create(type, get_abi(value), put_abi(result))); return result; } template Windows::Networking::Vpn::VpnAppIdType impl_IVpnAppId::Type() const { Windows::Networking::Vpn::VpnAppIdType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IVpnAppId)->get_Type(&value)); return value; } template void impl_IVpnAppId::Type(Windows::Networking::Vpn::VpnAppIdType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IVpnAppId)->put_Type(value)); } template hstring impl_IVpnAppId::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IVpnAppId)->get_Value(put_abi(value))); return value; } -template void impl_IVpnAppId::Value(hstring_ref value) const +template void impl_IVpnAppId::Value(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IVpnAppId)->put_Value(get_abi(value))); } template Windows::Networking::Vpn::VpnTrafficFilter impl_IVpnTrafficFilterFactory::Create(const Windows::Networking::Vpn::VpnAppId & appId) const { Windows::Networking::Vpn::VpnTrafficFilter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(appId), put(result))); + check_hresult(WINRT_SHIM(IVpnTrafficFilterFactory)->abi_Create(get_abi(appId), put_abi(result))); return result; } template Windows::Networking::Vpn::VpnAppId impl_IVpnTrafficFilter::AppId() const { Windows::Networking::Vpn::VpnAppId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppId(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_AppId(put_abi(value))); return value; } template void impl_IVpnTrafficFilter::AppId(const Windows::Networking::Vpn::VpnAppId & value) const { - check_hresult(static_cast(static_cast(*this))->put_AppId(get(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->put_AppId(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilter::AppClaims() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AppClaims(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_AppClaims(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnIPProtocol impl_IVpnTrafficFilter::Protocol() const { Windows::Networking::Vpn::VpnIPProtocol value {}; - check_hresult(static_cast(static_cast(*this))->get_Protocol(&value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_Protocol(&value)); return value; } template void impl_IVpnTrafficFilter::Protocol(Windows::Networking::Vpn::VpnIPProtocol value) const { - check_hresult(static_cast(static_cast(*this))->put_Protocol(value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->put_Protocol(value)); } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilter::LocalPortRanges() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_LocalPortRanges(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_LocalPortRanges(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilter::RemotePortRanges() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RemotePortRanges(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_RemotePortRanges(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilter::LocalAddressRanges() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_LocalAddressRanges(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_LocalAddressRanges(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilter::RemoteAddressRanges() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RemoteAddressRanges(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_RemoteAddressRanges(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnRoutingPolicyType impl_IVpnTrafficFilter::RoutingPolicyType() const { Windows::Networking::Vpn::VpnRoutingPolicyType value {}; - check_hresult(static_cast(static_cast(*this))->get_RoutingPolicyType(&value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->get_RoutingPolicyType(&value)); return value; } template void impl_IVpnTrafficFilter::RoutingPolicyType(Windows::Networking::Vpn::VpnRoutingPolicyType value) const { - check_hresult(static_cast(static_cast(*this))->put_RoutingPolicyType(value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilter)->put_RoutingPolicyType(value)); } template Windows::Foundation::Collections::IVector impl_IVpnTrafficFilterAssignment::TrafficFilterList() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_TrafficFilterList(put(value))); + check_hresult(WINRT_SHIM(IVpnTrafficFilterAssignment)->get_TrafficFilterList(put_abi(value))); return value; } template bool impl_IVpnTrafficFilterAssignment::AllowOutbound() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowOutbound(&value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilterAssignment)->get_AllowOutbound(&value)); return value; } template void impl_IVpnTrafficFilterAssignment::AllowOutbound(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowOutbound(value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilterAssignment)->put_AllowOutbound(value)); } template bool impl_IVpnTrafficFilterAssignment::AllowInbound() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowInbound(&value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilterAssignment)->get_AllowInbound(&value)); return value; } template void impl_IVpnTrafficFilterAssignment::AllowInbound(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowInbound(value)); + check_hresult(WINRT_SHIM(IVpnTrafficFilterAssignment)->put_AllowInbound(value)); } template hstring impl_IVpnProfile::ProfileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProfileName(put(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->get_ProfileName(put_abi(value))); return value; } -template void impl_IVpnProfile::ProfileName(hstring_ref value) const +template void impl_IVpnProfile::ProfileName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ProfileName(get(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->put_ProfileName(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVpnProfile::AppTriggers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AppTriggers(put(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->get_AppTriggers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnProfile::Routes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Routes(put(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->get_Routes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnProfile::DomainNameInfoList() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DomainNameInfoList(put(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->get_DomainNameInfoList(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IVpnProfile::TrafficFilters() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_TrafficFilters(put(value))); + check_hresult(WINRT_SHIM(IVpnProfile)->get_TrafficFilters(put_abi(value))); return value; } template bool impl_IVpnProfile::RememberCredentials() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RememberCredentials(&value)); + check_hresult(WINRT_SHIM(IVpnProfile)->get_RememberCredentials(&value)); return value; } template void impl_IVpnProfile::RememberCredentials(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RememberCredentials(value)); + check_hresult(WINRT_SHIM(IVpnProfile)->put_RememberCredentials(value)); } template bool impl_IVpnProfile::AlwaysOn() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AlwaysOn(&value)); + check_hresult(WINRT_SHIM(IVpnProfile)->get_AlwaysOn(&value)); return value; } template void impl_IVpnProfile::AlwaysOn(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AlwaysOn(value)); + check_hresult(WINRT_SHIM(IVpnProfile)->put_AlwaysOn(value)); } template Windows::Foundation::Collections::IVector impl_IVpnPlugInProfile::ServerUris() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ServerUris(put(value))); + check_hresult(WINRT_SHIM(IVpnPlugInProfile)->get_ServerUris(put_abi(value))); return value; } template hstring impl_IVpnPlugInProfile::CustomConfiguration() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomConfiguration(put(value))); + check_hresult(WINRT_SHIM(IVpnPlugInProfile)->get_CustomConfiguration(put_abi(value))); return value; } -template void impl_IVpnPlugInProfile::CustomConfiguration(hstring_ref value) const +template void impl_IVpnPlugInProfile::CustomConfiguration(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomConfiguration(get(value))); + check_hresult(WINRT_SHIM(IVpnPlugInProfile)->put_CustomConfiguration(get_abi(value))); } template hstring impl_IVpnPlugInProfile::VpnPluginPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VpnPluginPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(IVpnPlugInProfile)->get_VpnPluginPackageFamilyName(put_abi(value))); return value; } -template void impl_IVpnPlugInProfile::VpnPluginPackageFamilyName(hstring_ref value) const +template void impl_IVpnPlugInProfile::VpnPluginPackageFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_VpnPluginPackageFamilyName(get(value))); + check_hresult(WINRT_SHIM(IVpnPlugInProfile)->put_VpnPluginPackageFamilyName(get_abi(value))); } template bool impl_IVpnPlugInProfile2::RequireVpnClientAppUI() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RequireVpnClientAppUI(&value)); + check_hresult(WINRT_SHIM(IVpnPlugInProfile2)->get_RequireVpnClientAppUI(&value)); return value; } template void impl_IVpnPlugInProfile2::RequireVpnClientAppUI(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RequireVpnClientAppUI(value)); + check_hresult(WINRT_SHIM(IVpnPlugInProfile2)->put_RequireVpnClientAppUI(value)); } template Windows::Networking::Vpn::VpnManagementConnectionStatus impl_IVpnPlugInProfile2::ConnectionStatus() const { Windows::Networking::Vpn::VpnManagementConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IVpnPlugInProfile2)->get_ConnectionStatus(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IVpnNativeProfile::Servers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Servers(put(value))); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_Servers(put_abi(value))); return value; } template Windows::Networking::Vpn::VpnRoutingPolicyType impl_IVpnNativeProfile::RoutingPolicyType() const { Windows::Networking::Vpn::VpnRoutingPolicyType value {}; - check_hresult(static_cast(static_cast(*this))->get_RoutingPolicyType(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_RoutingPolicyType(&value)); return value; } template void impl_IVpnNativeProfile::RoutingPolicyType(Windows::Networking::Vpn::VpnRoutingPolicyType value) const { - check_hresult(static_cast(static_cast(*this))->put_RoutingPolicyType(value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->put_RoutingPolicyType(value)); } template Windows::Networking::Vpn::VpnNativeProtocolType impl_IVpnNativeProfile::NativeProtocolType() const { Windows::Networking::Vpn::VpnNativeProtocolType value {}; - check_hresult(static_cast(static_cast(*this))->get_NativeProtocolType(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_NativeProtocolType(&value)); return value; } template void impl_IVpnNativeProfile::NativeProtocolType(Windows::Networking::Vpn::VpnNativeProtocolType value) const { - check_hresult(static_cast(static_cast(*this))->put_NativeProtocolType(value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->put_NativeProtocolType(value)); } template Windows::Networking::Vpn::VpnAuthenticationMethod impl_IVpnNativeProfile::UserAuthenticationMethod() const { Windows::Networking::Vpn::VpnAuthenticationMethod value {}; - check_hresult(static_cast(static_cast(*this))->get_UserAuthenticationMethod(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_UserAuthenticationMethod(&value)); return value; } template void impl_IVpnNativeProfile::UserAuthenticationMethod(Windows::Networking::Vpn::VpnAuthenticationMethod value) const { - check_hresult(static_cast(static_cast(*this))->put_UserAuthenticationMethod(value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->put_UserAuthenticationMethod(value)); } template Windows::Networking::Vpn::VpnAuthenticationMethod impl_IVpnNativeProfile::TunnelAuthenticationMethod() const { Windows::Networking::Vpn::VpnAuthenticationMethod value {}; - check_hresult(static_cast(static_cast(*this))->get_TunnelAuthenticationMethod(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_TunnelAuthenticationMethod(&value)); return value; } template void impl_IVpnNativeProfile::TunnelAuthenticationMethod(Windows::Networking::Vpn::VpnAuthenticationMethod value) const { - check_hresult(static_cast(static_cast(*this))->put_TunnelAuthenticationMethod(value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->put_TunnelAuthenticationMethod(value)); } template hstring impl_IVpnNativeProfile::EapConfiguration() const { hstring Value; - check_hresult(static_cast(static_cast(*this))->get_EapConfiguration(put(Value))); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->get_EapConfiguration(put_abi(Value))); return Value; } -template void impl_IVpnNativeProfile::EapConfiguration(hstring_ref value) const +template void impl_IVpnNativeProfile::EapConfiguration(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_EapConfiguration(get(value))); + check_hresult(WINRT_SHIM(IVpnNativeProfile)->put_EapConfiguration(get_abi(value))); } template bool impl_IVpnNativeProfile2::RequireVpnClientAppUI() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RequireVpnClientAppUI(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile2)->get_RequireVpnClientAppUI(&value)); return value; } template void impl_IVpnNativeProfile2::RequireVpnClientAppUI(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RequireVpnClientAppUI(value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile2)->put_RequireVpnClientAppUI(value)); } template Windows::Networking::Vpn::VpnManagementConnectionStatus impl_IVpnNativeProfile2::ConnectionStatus() const { Windows::Networking::Vpn::VpnManagementConnectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ConnectionStatus(&value)); + check_hresult(WINRT_SHIM(IVpnNativeProfile2)->get_ConnectionStatus(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::AddProfileFromXmlAsync(hstring_ref xml) const +template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::AddProfileFromXmlAsync(hstring_view xml) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_AddProfileFromXmlAsync(get(xml), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_AddProfileFromXmlAsync(get_abi(xml), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::AddProfileFromObjectAsync(const Windows::Networking::Vpn::IVpnProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_AddProfileFromObjectAsync(get(profile), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_AddProfileFromObjectAsync(get_abi(profile), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::UpdateProfileFromXmlAsync(hstring_ref xml) const +template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::UpdateProfileFromXmlAsync(hstring_view xml) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateProfileFromXmlAsync(get(xml), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_UpdateProfileFromXmlAsync(get_abi(xml), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::UpdateProfileFromObjectAsync(const Windows::Networking::Vpn::IVpnProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateProfileFromObjectAsync(get(profile), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_UpdateProfileFromObjectAsync(get_abi(profile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IVpnManagementAgent::GetProfilesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetProfilesAsync(put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_GetProfilesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::DeleteProfileAsync(const Windows::Networking::Vpn::IVpnProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteProfileAsync(get(profile), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_DeleteProfileAsync(get_abi(profile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::ConnectProfileAsync(const Windows::Networking::Vpn::IVpnProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectProfileAsync(get(profile), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_ConnectProfileAsync(get_abi(profile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::ConnectProfileWithPasswordCredentialAsync(const Windows::Networking::Vpn::IVpnProfile & profile, const Windows::Security::Credentials::PasswordCredential & passwordCredential) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ConnectProfileWithPasswordCredentialAsync(get(profile), get(passwordCredential), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_ConnectProfileWithPasswordCredentialAsync(get_abi(profile), get_abi(passwordCredential), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IVpnManagementAgent::DisconnectProfileAsync(const Windows::Networking::Vpn::IVpnProfile & profile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DisconnectProfileAsync(get(profile), put(operation))); + check_hresult(WINRT_SHIM(IVpnManagementAgent)->abi_DisconnectProfileAsync(get_abi(profile), put_abi(operation))); return operation; } -inline VpnAppId::VpnAppId(Windows::Networking::Vpn::VpnAppIdType type, hstring_ref value) : +inline VpnAppId::VpnAppId(Windows::Networking::Vpn::VpnAppIdType type, hstring_view value) : VpnAppId(get_activation_factory().Create(type, value)) {} -inline void VpnChannel::ProcessEventAsync(const Windows::IInspectable & thirdPartyPlugIn, const Windows::IInspectable & event) +inline void VpnChannel::ProcessEventAsync(const Windows::Foundation::IInspectable & thirdPartyPlugIn, const Windows::Foundation::IInspectable & event) { get_activation_factory().ProcessEventAsync(thirdPartyPlugIn, event); } @@ -4334,11 +4543,11 @@ inline VpnDomainNameAssignment::VpnDomainNameAssignment() : VpnDomainNameAssignment(activate_instance()) {} -inline VpnDomainNameInfo::VpnDomainNameInfo(hstring_ref name, Windows::Networking::Vpn::VpnDomainNameType nameType, const Windows::Foundation::Collections::IIterable & dnsServerList, const Windows::Foundation::Collections::IIterable & proxyServerList) : +inline VpnDomainNameInfo::VpnDomainNameInfo(hstring_view name, Windows::Networking::Vpn::VpnDomainNameType nameType, iterable dnsServerList, iterable proxyServerList) : VpnDomainNameInfo(get_activation_factory().CreateVpnDomainNameInfo(name, nameType, dnsServerList, proxyServerList)) {} -inline VpnInterfaceId::VpnInterfaceId(array_ref address) : +inline VpnInterfaceId::VpnInterfaceId(array_view address) : VpnInterfaceId(get_activation_factory().CreateVpnInterfaceId(address)) {} @@ -4350,7 +4559,7 @@ inline VpnNamespaceAssignment::VpnNamespaceAssignment() : VpnNamespaceAssignment(activate_instance()) {} -inline VpnNamespaceInfo::VpnNamespaceInfo(hstring_ref name, const Windows::Foundation::Collections::IVector & dnsServerList, const Windows::Foundation::Collections::IVector & proxyServerList) : +inline VpnNamespaceInfo::VpnNamespaceInfo(hstring_view name, const Windows::Foundation::Collections::IVector & dnsServerList, const Windows::Foundation::Collections::IVector & proxyServerList) : VpnNamespaceInfo(get_activation_factory().CreateVpnNamespaceInfo(name, dnsServerList, proxyServerList)) {} @@ -4385,3 +4594,734 @@ inline VpnTrafficFilterAssignment::VpnTrafficFilterAssignment() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnAppId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnAppIdFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannel2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannelActivityEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannelActivityStateChangedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannelConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannelConfiguration2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnChannelStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomCheckBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomComboBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomEditBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomErrorBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPrompt & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPromptBooleanInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPromptElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPromptOptionSelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPromptText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomPromptTextInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnCustomTextBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnDomainNameAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnDomainNameInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnDomainNameInfo2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnDomainNameInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnInterfaceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnInterfaceIdFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnManagementAgent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnNamespaceAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnNamespaceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnNamespaceInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnNativeProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnNativeProfile2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPacketBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPacketBuffer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPacketBufferFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPacketBufferList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPacketBufferList2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPickedCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPlugIn & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPlugInProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnPlugInProfile2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnRouteAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnRouteFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnSystemHealth & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnTrafficFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnTrafficFilterAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::IVpnTrafficFilterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnAppId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnChannel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnChannelActivityEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnChannelActivityStateChangedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnChannelConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomCheckBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomComboBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomEditBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomErrorBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomPromptBooleanInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomPromptOptionSelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomPromptText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomPromptTextInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnCustomTextBox & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnDomainNameAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnDomainNameInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnInterfaceId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnManagementAgent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnNamespaceAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnNamespaceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnNativeProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnPacketBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnPacketBufferList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnPickedCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnPlugInProfile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnRouteAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnSystemHealth & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnTrafficFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::Vpn::VpnTrafficFilterAssignment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Networking.h b/10.0.14393.0/winrt/Windows.Networking.h index c3ad54eaa..ffaefed83 100644 --- a/10.0.14393.0/winrt/Windows.Networking.h +++ b/10.0.14393.0/winrt/Windows.Networking.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Networking.Connectivity.3.h" #include "internal/Windows.Networking.3.h" #include "Windows.Foundation.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_LocalHostName(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalHostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalHostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalHostName()); return S_OK; } catch (...) @@ -28,10 +32,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LocalHostName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LocalHostName(*reinterpret_cast(&value)); return S_OK; } @@ -41,11 +46,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LocalServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalServiceName()); return S_OK; } catch (...) @@ -55,10 +61,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LocalServiceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LocalServiceName(*reinterpret_cast(&value)); return S_OK; } @@ -68,11 +75,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RemoteHostName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteHostName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteHostName()); return S_OK; } catch (...) @@ -82,10 +90,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RemoteHostName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteHostName(*reinterpret_cast(&value)); return S_OK; } @@ -95,11 +104,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RemoteServiceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteServiceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteServiceName()); return S_OK; } catch (...) @@ -109,10 +119,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RemoteServiceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteServiceName(*reinterpret_cast(&value)); return S_OK; } @@ -126,11 +137,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateEndpointPair(abi_arg_in localHostName, abi_arg_in localServiceName, abi_arg_in remoteHostName, abi_arg_in remoteServiceName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateEndpointPair(impl::abi_arg_in localHostName, impl::abi_arg_in localServiceName, impl::abi_arg_in remoteHostName, impl::abi_arg_in remoteServiceName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateEndpointPair(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName), *reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateEndpointPair(*reinterpret_cast(&localHostName), *reinterpret_cast(&localServiceName), *reinterpret_cast(&remoteHostName), *reinterpret_cast(&remoteServiceName))); return S_OK; } catch (...) @@ -144,11 +156,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_IPInformation(abi_arg_out value) noexcept override + HRESULT __stdcall get_IPInformation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IPInformation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IPInformation()); return S_OK; } catch (...) @@ -158,11 +171,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RawName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawName()); return S_OK; } catch (...) @@ -172,11 +186,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -186,11 +201,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CanonicalName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanonicalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanonicalName()); return S_OK; } catch (...) @@ -204,7 +220,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -213,11 +230,12 @@ struct produce : produce_base hostName, bool * isEqual) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in hostName, bool * isEqual) noexcept override { try { - *isEqual = detach(this->shim().IsEqual(*reinterpret_cast(&hostName))); + typename D::abi_guard guard(this->shim()); + *isEqual = detach_abi(this->shim().IsEqual(*reinterpret_cast(&hostName))); return S_OK; } catch (...) @@ -230,11 +248,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateHostName(abi_arg_in hostName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateHostName(impl::abi_arg_in hostName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateHostName(*reinterpret_cast(&hostName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateHostName(*reinterpret_cast(&hostName))); return S_OK; } catch (...) @@ -248,11 +267,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Compare(abi_arg_in value1, abi_arg_in value2, int32_t * result) noexcept override + HRESULT __stdcall abi_Compare(impl::abi_arg_in value1, impl::abi_arg_in value2, int32_t * result) noexcept override { try { - *result = detach(this->shim().Compare(*reinterpret_cast(&value1), *reinterpret_cast(&value2))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Compare(*reinterpret_cast(&value1), *reinterpret_cast(&value2))); return S_OK; } catch (...) @@ -266,126 +286,126 @@ struct produce : produce_base int32_t impl_IHostNameStatics::Compare(hstring_ref value1, hstring_ref value2) const +template int32_t impl_IHostNameStatics::Compare(hstring_view value1, hstring_view value2) const { int32_t result {}; - check_hresult(static_cast(static_cast(*this))->abi_Compare(get(value1), get(value2), &result)); + check_hresult(WINRT_SHIM(IHostNameStatics)->abi_Compare(get_abi(value1), get_abi(value2), &result)); return result; } template Windows::Networking::Connectivity::IPInformation impl_IHostName::IPInformation() const { Windows::Networking::Connectivity::IPInformation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IPInformation(put(value))); + check_hresult(WINRT_SHIM(IHostName)->get_IPInformation(put_abi(value))); return value; } template hstring impl_IHostName::RawName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RawName(put(value))); + check_hresult(WINRT_SHIM(IHostName)->get_RawName(put_abi(value))); return value; } template hstring impl_IHostName::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IHostName)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IHostName::CanonicalName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CanonicalName(put(value))); + check_hresult(WINRT_SHIM(IHostName)->get_CanonicalName(put_abi(value))); return value; } template Windows::Networking::HostNameType impl_IHostName::Type() const { Windows::Networking::HostNameType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IHostName)->get_Type(&value)); return value; } template bool impl_IHostName::IsEqual(const Windows::Networking::HostName & hostName) const { bool isEqual {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(hostName), &isEqual)); + check_hresult(WINRT_SHIM(IHostName)->abi_IsEqual(get_abi(hostName), &isEqual)); return isEqual; } -template Windows::Networking::HostName impl_IHostNameFactory::CreateHostName(hstring_ref hostName) const +template Windows::Networking::HostName impl_IHostNameFactory::CreateHostName(hstring_view hostName) const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateHostName(get(hostName), put(value))); + check_hresult(WINRT_SHIM(IHostNameFactory)->abi_CreateHostName(get_abi(hostName), put_abi(value))); return value; } template Windows::Networking::HostName impl_IEndpointPair::LocalHostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalHostName(put(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->get_LocalHostName(put_abi(value))); return value; } template void impl_IEndpointPair::LocalHostName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_LocalHostName(get(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->put_LocalHostName(get_abi(value))); } template hstring impl_IEndpointPair::LocalServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LocalServiceName(put(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->get_LocalServiceName(put_abi(value))); return value; } -template void impl_IEndpointPair::LocalServiceName(hstring_ref value) const +template void impl_IEndpointPair::LocalServiceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_LocalServiceName(get(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->put_LocalServiceName(get_abi(value))); } template Windows::Networking::HostName impl_IEndpointPair::RemoteHostName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteHostName(put(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->get_RemoteHostName(put_abi(value))); return value; } template void impl_IEndpointPair::RemoteHostName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteHostName(get(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->put_RemoteHostName(get_abi(value))); } template hstring impl_IEndpointPair::RemoteServiceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteServiceName(put(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->get_RemoteServiceName(put_abi(value))); return value; } -template void impl_IEndpointPair::RemoteServiceName(hstring_ref value) const +template void impl_IEndpointPair::RemoteServiceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteServiceName(get(value))); + check_hresult(WINRT_SHIM(IEndpointPair)->put_RemoteServiceName(get_abi(value))); } -template Windows::Networking::EndpointPair impl_IEndpointPairFactory::CreateEndpointPair(const Windows::Networking::HostName & localHostName, hstring_ref localServiceName, const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) const +template Windows::Networking::EndpointPair impl_IEndpointPairFactory::CreateEndpointPair(const Windows::Networking::HostName & localHostName, hstring_view localServiceName, const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) const { Windows::Networking::EndpointPair value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateEndpointPair(get(localHostName), get(localServiceName), get(remoteHostName), get(remoteServiceName), put(value))); + check_hresult(WINRT_SHIM(IEndpointPairFactory)->abi_CreateEndpointPair(get_abi(localHostName), get_abi(localServiceName), get_abi(remoteHostName), get_abi(remoteServiceName), put_abi(value))); return value; } -inline EndpointPair::EndpointPair(const Windows::Networking::HostName & localHostName, hstring_ref localServiceName, const Windows::Networking::HostName & remoteHostName, hstring_ref remoteServiceName) : +inline EndpointPair::EndpointPair(const Windows::Networking::HostName & localHostName, hstring_view localServiceName, const Windows::Networking::HostName & remoteHostName, hstring_view remoteServiceName) : EndpointPair(get_activation_factory().CreateEndpointPair(localHostName, localServiceName, remoteHostName, remoteServiceName)) {} -inline HostName::HostName(hstring_ref hostName) : +inline HostName::HostName(hstring_view hostName) : HostName(get_activation_factory().CreateHostName(hostName)) {} -inline int32_t HostName::Compare(hstring_ref value1, hstring_ref value2) +inline int32_t HostName::Compare(hstring_view value1, hstring_view value2) { return get_activation_factory().Compare(value1, value2); } @@ -393,3 +413,68 @@ inline int32_t HostName::Compare(hstring_ref value1, hstring_ref value2) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::IEndpointPair & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::IEndpointPairFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::IHostName & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::IHostNameFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::IHostNameStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::EndpointPair & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Networking::HostName & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Perception.Automation.Core.h b/10.0.14393.0/winrt/Windows.Perception.Automation.Core.h index 287504d56..68ecb1592 100644 --- a/10.0.14393.0/winrt/Windows.Perception.Automation.Core.h +++ b/10.0.14393.0/winrt/Windows.Perception.Automation.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Perception.Automation.Core.3.h" #include "Windows.Perception.h" @@ -14,10 +17,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_SetActivationFactoryProvider(abi_arg_in provider) noexcept override + HRESULT __stdcall abi_SetActivationFactoryProvider(impl::abi_arg_in provider) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetActivationFactoryProvider(*reinterpret_cast(&provider)); return S_OK; } @@ -34,7 +38,7 @@ namespace Windows::Perception::Automation::Core { template void impl_ICorePerceptionAutomationStatics::SetActivationFactoryProvider(const Windows::Foundation::IGetActivationFactory & provider) const { - check_hresult(static_cast(static_cast(*this))->abi_SetActivationFactoryProvider(get(provider))); + check_hresult(WINRT_SHIM(ICorePerceptionAutomationStatics)->abi_SetActivationFactoryProvider(get_abi(provider))); } inline void CorePerceptionAutomation::SetActivationFactoryProvider(const Windows::Foundation::IGetActivationFactory & provider) @@ -45,3 +49,14 @@ inline void CorePerceptionAutomation::SetActivationFactoryProvider(const Windows } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Automation::Core::ICorePerceptionAutomationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Perception.People.h b/10.0.14393.0/winrt/Windows.Perception.People.h index b7b0ff14b..78d8aa6fb 100644 --- a/10.0.14393.0/winrt/Windows.Perception.People.h +++ b/10.0.14393.0/winrt/Windows.Perception.People.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Perception.People.3.h" #include "Windows.Perception.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ForwardDirection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForwardDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardDirection()); return S_OK; } catch (...) @@ -39,11 +44,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UpDirection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpDirection()); return S_OK; } catch (...) @@ -60,24 +66,44 @@ namespace Windows::Perception::People { template Windows::Foundation::Numerics::float3 impl_IHeadPose::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IHeadPose)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_IHeadPose::ForwardDirection() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_ForwardDirection(put(value))); + check_hresult(WINRT_SHIM(IHeadPose)->get_ForwardDirection(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_IHeadPose::UpDirection() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_UpDirection(put(value))); + check_hresult(WINRT_SHIM(IHeadPose)->get_UpDirection(put_abi(value))); return value; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::People::IHeadPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::People::HeadPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Perception.Spatial.Surfaces.h b/10.0.14393.0/winrt/Windows.Perception.Spatial.Surfaces.h index 83c0e69c7..5d9712ec6 100644 --- a/10.0.14393.0/winrt/Windows.Perception.Spatial.Surfaces.h +++ b/10.0.14393.0/winrt/Windows.Perception.Spatial.Surfaces.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.DirectX.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Perception.Spatial.3.h" @@ -22,7 +25,8 @@ struct produce : { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : } } - HRESULT __stdcall get_UpdateTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_UpdateTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpdateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTime()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : } } - HRESULT __stdcall abi_TryGetBounds(abi_arg_in coordinateSystem, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetBounds(impl::abi_arg_in coordinateSystem, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetBounds(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetBounds(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -58,11 +64,12 @@ struct produce : } } - HRESULT __stdcall abi_TryComputeLatestMeshAsync(double maxTrianglesPerCubicMeter, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryComputeLatestMeshAsync(double maxTrianglesPerCubicMeter, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter)); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : } } - HRESULT __stdcall abi_TryComputeLatestMeshWithOptionsAsync(double maxTrianglesPerCubicMeter, abi_arg_in options, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryComputeLatestMeshWithOptionsAsync(double maxTrianglesPerCubicMeter, impl::abi_arg_in options, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter, *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter, *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_SurfaceInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_SurfaceInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SurfaceInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SurfaceInfo()); return S_OK; } catch (...) @@ -104,11 +113,12 @@ struct produce : } } - HRESULT __stdcall get_CoordinateSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSystem()); return S_OK; } catch (...) @@ -118,11 +128,12 @@ struct produce : } } - HRESULT __stdcall get_TriangleIndices(abi_arg_out value) noexcept override + HRESULT __stdcall get_TriangleIndices(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TriangleIndices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriangleIndices()); return S_OK; } catch (...) @@ -132,11 +143,12 @@ struct produce : } } - HRESULT __stdcall get_VertexPositions(abi_arg_out value) noexcept override + HRESULT __stdcall get_VertexPositions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VertexPositions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexPositions()); return S_OK; } catch (...) @@ -146,11 +158,12 @@ struct produce : } } - HRESULT __stdcall get_VertexPositionScale(abi_arg_out value) noexcept override + HRESULT __stdcall get_VertexPositionScale(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VertexPositionScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexPositionScale()); return S_OK; } catch (...) @@ -159,11 +172,12 @@ struct produce : } } - HRESULT __stdcall get_VertexNormals(abi_arg_out value) noexcept override + HRESULT __stdcall get_VertexNormals(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VertexNormals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexNormals()); return S_OK; } catch (...) @@ -181,7 +195,8 @@ struct produceshim().Format()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Format()); return S_OK; } catch (...) @@ -194,7 +209,8 @@ struct produceshim().Stride()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stride()); return S_OK; } catch (...) @@ -207,7 +223,8 @@ struct produceshim().ElementCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementCount()); return S_OK; } catch (...) @@ -216,11 +233,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -238,7 +256,8 @@ struct produceshim().VertexPositionFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexPositionFormat()); return S_OK; } catch (...) @@ -251,6 +270,7 @@ struct produceshim()); this->shim().VertexPositionFormat(value); return S_OK; } @@ -264,7 +284,8 @@ struct produceshim().TriangleIndexFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TriangleIndexFormat()); return S_OK; } catch (...) @@ -277,6 +298,7 @@ struct produceshim()); this->shim().TriangleIndexFormat(value); return S_OK; } @@ -290,7 +312,8 @@ struct produceshim().VertexNormalFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VertexNormalFormat()); return S_OK; } catch (...) @@ -303,6 +326,7 @@ struct produceshim()); this->shim().VertexNormalFormat(value); return S_OK; } @@ -316,7 +340,8 @@ struct produceshim().IncludeVertexNormals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeVertexNormals()); return S_OK; } catch (...) @@ -329,6 +354,7 @@ struct produceshim()); this->shim().IncludeVertexNormals(value); return S_OK; } @@ -342,11 +368,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SupportedVertexPositionFormats(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SupportedVertexPositionFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedVertexPositionFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVertexPositionFormats()); return S_OK; } catch (...) @@ -356,11 +383,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedTriangleIndexFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedTriangleIndexFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedTriangleIndexFormats()); return S_OK; } catch (...) @@ -370,11 +398,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_SupportedVertexNormalFormats(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedVertexNormalFormats()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedVertexNormalFormats()); return S_OK; } catch (...) @@ -388,11 +417,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetObservedSurfaces(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetObservedSurfaces(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetObservedSurfaces()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetObservedSurfaces()); return S_OK; } catch (...) @@ -402,10 +432,11 @@ struct produce bounds) noexcept override + HRESULT __stdcall abi_SetBoundingVolume(impl::abi_arg_in bounds) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBoundingVolume(*reinterpret_cast(&bounds)); return S_OK; } @@ -415,10 +446,11 @@ struct produce> bounds) noexcept override + HRESULT __stdcall abi_SetBoundingVolumes(impl::abi_arg_in> bounds) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBoundingVolumes(*reinterpret_cast *>(&bounds)); return S_OK; } @@ -428,11 +460,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ObservedSurfacesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ObservedSurfacesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ObservedSurfacesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -445,6 +478,7 @@ struct produceshim()); this->shim().ObservedSurfacesChanged(token); return S_OK; } @@ -458,11 +492,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -480,216 +515,216 @@ namespace Windows::Perception::Spatial::Surfaces { template Windows::Graphics::DirectX::DirectXPixelFormat impl_ISpatialSurfaceMeshBuffer::Format() const { Windows::Graphics::DirectX::DirectXPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_Format(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshBuffer)->get_Format(&value)); return value; } template uint32_t impl_ISpatialSurfaceMeshBuffer::Stride() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Stride(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshBuffer)->get_Stride(&value)); return value; } template uint32_t impl_ISpatialSurfaceMeshBuffer::ElementCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ElementCount(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshBuffer)->get_ElementCount(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ISpatialSurfaceMeshBuffer::Data() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshBuffer)->get_Data(put_abi(value))); return value; } template Windows::Perception::Spatial::Surfaces::SpatialSurfaceInfo impl_ISpatialSurfaceMesh::SurfaceInfo() const { Windows::Perception::Spatial::Surfaces::SpatialSurfaceInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SurfaceInfo(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_SurfaceInfo(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_ISpatialSurfaceMesh::CoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_CoordinateSystem(put_abi(value))); return value; } template Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer impl_ISpatialSurfaceMesh::TriangleIndices() const { Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TriangleIndices(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_TriangleIndices(put_abi(value))); return value; } template Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer impl_ISpatialSurfaceMesh::VertexPositions() const { Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VertexPositions(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_VertexPositions(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialSurfaceMesh::VertexPositionScale() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexPositionScale(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_VertexPositionScale(put_abi(value))); return value; } template Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer impl_ISpatialSurfaceMesh::VertexNormals() const { Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VertexNormals(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMesh)->get_VertexNormals(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpatialSurfaceMeshOptionsStatics::SupportedVertexPositionFormats() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVertexPositionFormats(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptionsStatics)->get_SupportedVertexPositionFormats(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpatialSurfaceMeshOptionsStatics::SupportedTriangleIndexFormats() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedTriangleIndexFormats(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptionsStatics)->get_SupportedTriangleIndexFormats(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISpatialSurfaceMeshOptionsStatics::SupportedVertexNormalFormats() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedVertexNormalFormats(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptionsStatics)->get_SupportedVertexNormalFormats(put_abi(value))); return value; } template Windows::Graphics::DirectX::DirectXPixelFormat impl_ISpatialSurfaceMeshOptions::VertexPositionFormat() const { Windows::Graphics::DirectX::DirectXPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexPositionFormat(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->get_VertexPositionFormat(&value)); return value; } template void impl_ISpatialSurfaceMeshOptions::VertexPositionFormat(Windows::Graphics::DirectX::DirectXPixelFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_VertexPositionFormat(value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->put_VertexPositionFormat(value)); } template Windows::Graphics::DirectX::DirectXPixelFormat impl_ISpatialSurfaceMeshOptions::TriangleIndexFormat() const { Windows::Graphics::DirectX::DirectXPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_TriangleIndexFormat(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->get_TriangleIndexFormat(&value)); return value; } template void impl_ISpatialSurfaceMeshOptions::TriangleIndexFormat(Windows::Graphics::DirectX::DirectXPixelFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_TriangleIndexFormat(value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->put_TriangleIndexFormat(value)); } template Windows::Graphics::DirectX::DirectXPixelFormat impl_ISpatialSurfaceMeshOptions::VertexNormalFormat() const { Windows::Graphics::DirectX::DirectXPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_VertexNormalFormat(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->get_VertexNormalFormat(&value)); return value; } template void impl_ISpatialSurfaceMeshOptions::VertexNormalFormat(Windows::Graphics::DirectX::DirectXPixelFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_VertexNormalFormat(value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->put_VertexNormalFormat(value)); } template bool impl_ISpatialSurfaceMeshOptions::IncludeVertexNormals() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeVertexNormals(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->get_IncludeVertexNormals(&value)); return value; } template void impl_ISpatialSurfaceMeshOptions::IncludeVertexNormals(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncludeVertexNormals(value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceMeshOptions)->put_IncludeVertexNormals(value)); } template GUID impl_ISpatialSurfaceInfo::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ISpatialSurfaceInfo)->get_Id(&value)); return value; } template Windows::Foundation::DateTime impl_ISpatialSurfaceInfo::UpdateTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateTime(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceInfo)->get_UpdateTime(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISpatialSurfaceInfo::TryGetBounds(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetBounds(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceInfo)->abi_TryGetBounds(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISpatialSurfaceInfo::TryComputeLatestMeshAsync(double maxTrianglesPerCubicMeter) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter, put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceInfo)->abi_TryComputeLatestMeshAsync(maxTrianglesPerCubicMeter, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISpatialSurfaceInfo::TryComputeLatestMeshAsync(double maxTrianglesPerCubicMeter, const Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshOptions & options) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_TryComputeLatestMeshWithOptionsAsync(maxTrianglesPerCubicMeter, get(options), put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceInfo)->abi_TryComputeLatestMeshWithOptionsAsync(maxTrianglesPerCubicMeter, get_abi(options), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISpatialSurfaceObserverStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserverStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } template Windows::Foundation::Collections::IMapView impl_ISpatialSurfaceObserver::GetObservedSurfaces() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->abi_GetObservedSurfaces(put(value))); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserver)->abi_GetObservedSurfaces(put_abi(value))); return value; } template void impl_ISpatialSurfaceObserver::SetBoundingVolume(const Windows::Perception::Spatial::SpatialBoundingVolume & bounds) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBoundingVolume(get(bounds))); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserver)->abi_SetBoundingVolume(get_abi(bounds))); } -template void impl_ISpatialSurfaceObserver::SetBoundingVolumes(const Windows::Foundation::Collections::IIterable & bounds) const +template void impl_ISpatialSurfaceObserver::SetBoundingVolumes(iterable bounds) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBoundingVolumes(get(bounds))); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserver)->abi_SetBoundingVolumes(get_abi(bounds))); } -template event_token impl_ISpatialSurfaceObserver::ObservedSurfacesChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ISpatialSurfaceObserver::ObservedSurfacesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ObservedSurfacesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserver)->add_ObservedSurfacesChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_ISpatialSurfaceObserver::ObservedSurfacesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ISpatialSurfaceObserver::ObservedSurfacesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceObserver::remove_ObservedSurfacesChanged, ObservedSurfacesChanged(handler)); } template void impl_ISpatialSurfaceObserver::ObservedSurfacesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ObservedSurfacesChanged(token)); + check_hresult(WINRT_SHIM(ISpatialSurfaceObserver)->remove_ObservedSurfacesChanged(token)); } inline SpatialSurfaceMeshOptions::SpatialSurfaceMeshOptions() : @@ -723,3 +758,113 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceMesh & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceMeshBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceMeshOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceMeshOptionsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceObserver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::ISpatialSurfaceObserverStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceMesh & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceMeshOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceObserver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Perception.Spatial.h b/10.0.14393.0/winrt/Windows.Perception.Spatial.h index 1fd4c84f9..a1244b2ba 100644 --- a/10.0.14393.0/winrt/Windows.Perception.Spatial.h +++ b/10.0.14393.0/winrt/Windows.Perception.Spatial.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_CoordinateSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSystem()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RawCoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawCoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawCoordinateSystem()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_RawCoordinateSystemAdjusted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().RawCoordinateSystemAdjusted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().RawCoordinateSystemAdjusted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -62,6 +68,7 @@ struct produce : produce_baseshim()); this->shim().RawCoordinateSystemAdjusted(cookie); return S_OK; } @@ -79,7 +86,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().RemovedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedByUser()); return S_OK; } catch (...) @@ -92,11 +100,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_RequestStoreAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestStoreAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestStoreAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestStoreAsync()); return S_OK; } catch (...) @@ -110,11 +119,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldRawCoordinateSystemToNewRawCoordinateSystemTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldRawCoordinateSystemToNewRawCoordinateSystemTransform()); return S_OK; } catch (...) @@ -127,11 +137,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryCreateRelativeTo(abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryCreateRelativeTo(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -141,11 +152,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TryCreateWithPositionRelativeTo(abi_arg_in coordinateSystem, abi_arg_in position, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryCreateWithPositionRelativeTo(impl::abi_arg_in coordinateSystem, impl::abi_arg_in position, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position))); return S_OK; } catch (...) @@ -155,11 +167,12 @@ struct produce : produce } } - HRESULT __stdcall abi_TryCreateWithPositionAndOrientationRelativeTo(abi_arg_in coordinateSystem, abi_arg_in position, abi_arg_in orientation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryCreateWithPositionAndOrientationRelativeTo(impl::abi_arg_in coordinateSystem, impl::abi_arg_in position, impl::abi_arg_in orientation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position), *reinterpret_cast(&orientation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position), *reinterpret_cast(&orientation))); return S_OK; } catch (...) @@ -173,11 +186,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetAllSavedAnchors(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetAllSavedAnchors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAllSavedAnchors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAllSavedAnchors()); return S_OK; } catch (...) @@ -187,11 +201,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TrySave(abi_arg_in id, abi_arg_in anchor, bool * succeeded) noexcept override + HRESULT __stdcall abi_TrySave(impl::abi_arg_in id, impl::abi_arg_in anchor, bool * succeeded) noexcept override { try { - *succeeded = detach(this->shim().TrySave(*reinterpret_cast(&id), *reinterpret_cast(&anchor))); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySave(*reinterpret_cast(&id), *reinterpret_cast(&anchor))); return S_OK; } catch (...) @@ -200,10 +215,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_Remove(abi_arg_in id) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in id) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&id)); return S_OK; } @@ -217,6 +233,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -230,11 +247,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_TryImportAnchorsAsync(abi_arg_in stream, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_TryImportAnchorsAsync(impl::abi_arg_in stream, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().TryImportAnchorsAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryImportAnchorsAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -244,11 +262,12 @@ struct produce>> anchors, abi_arg_in stream, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryExportAnchorsAsync(impl::abi_arg_in>> anchors, impl::abi_arg_in stream, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryExportAnchorsAsync(*reinterpret_cast> *>(&anchors), *reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryExportAnchorsAsync(*reinterpret_cast> *>(&anchors), *reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -258,11 +277,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -280,11 +300,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_FromBox(abi_arg_in coordinateSystem, abi_arg_in box, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromBox(impl::abi_arg_in coordinateSystem, impl::abi_arg_in box, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); return S_OK; } catch (...) @@ -294,11 +315,12 @@ struct produce : } } - HRESULT __stdcall abi_FromOrientedBox(abi_arg_in coordinateSystem, abi_arg_in box, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromOrientedBox(impl::abi_arg_in coordinateSystem, impl::abi_arg_in box, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromOrientedBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromOrientedBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); return S_OK; } catch (...) @@ -308,11 +330,12 @@ struct produce : } } - HRESULT __stdcall abi_FromSphere(abi_arg_in coordinateSystem, abi_arg_in sphere, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromSphere(impl::abi_arg_in coordinateSystem, impl::abi_arg_in sphere, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromSphere(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&sphere))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromSphere(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&sphere))); return S_OK; } catch (...) @@ -322,11 +345,12 @@ struct produce : } } - HRESULT __stdcall abi_FromFrustum(abi_arg_in coordinateSystem, abi_arg_in frustum, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromFrustum(impl::abi_arg_in coordinateSystem, impl::abi_arg_in frustum, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromFrustum(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&frustum))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromFrustum(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&frustum))); return S_OK; } catch (...) @@ -340,11 +364,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_TryGetTransformTo(abi_arg_in target, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetTransformTo(impl::abi_arg_in target, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetTransformTo(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetTransformTo(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -358,11 +383,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -371,11 +397,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Orientation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -384,11 +411,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AbsoluteLinearVelocity(abi_arg_out value) noexcept override + HRESULT __stdcall get_AbsoluteLinearVelocity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AbsoluteLinearVelocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteLinearVelocity()); return S_OK; } catch (...) @@ -397,11 +425,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AbsoluteLinearAcceleration(abi_arg_out value) noexcept override + HRESULT __stdcall get_AbsoluteLinearAcceleration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AbsoluteLinearAcceleration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteLinearAcceleration()); return S_OK; } catch (...) @@ -410,11 +439,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AbsoluteAngularVelocity(abi_arg_out value) noexcept override + HRESULT __stdcall get_AbsoluteAngularVelocity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AbsoluteAngularVelocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteAngularVelocity()); return S_OK; } catch (...) @@ -423,11 +453,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AbsoluteAngularAcceleration(abi_arg_out value) noexcept override + HRESULT __stdcall get_AbsoluteAngularAcceleration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AbsoluteAngularAcceleration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AbsoluteAngularAcceleration()); return S_OK; } catch (...) @@ -444,7 +475,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Locatability()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locatability()); return S_OK; } catch (...) @@ -453,11 +485,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_LocatabilityChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_LocatabilityChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().LocatabilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().LocatabilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -470,6 +503,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().LocatabilityChanged(cookie); return S_OK; } @@ -479,11 +513,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_PositionalTrackingDeactivating(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PositionalTrackingDeactivating(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PositionalTrackingDeactivating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PositionalTrackingDeactivating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -496,6 +531,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionalTrackingDeactivating(cookie); return S_OK; } @@ -505,11 +541,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_TryLocateAtTimestamp(abi_arg_in timestamp, abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryLocateAtTimestamp(impl::abi_arg_in timestamp, impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryLocateAtTimestamp(*reinterpret_cast(×tamp), *reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryLocateAtTimestamp(*reinterpret_cast(×tamp), *reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -519,11 +556,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeading(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeading(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading()); return S_OK; } catch (...) @@ -533,11 +571,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(abi_arg_in relativePosition, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(impl::abi_arg_in relativePosition, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition))); return S_OK; } catch (...) @@ -547,11 +586,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(abi_arg_in relativePosition, abi_arg_in relativeOrientation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(impl::abi_arg_in relativePosition, impl::abi_arg_in relativeOrientation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); return S_OK; } catch (...) @@ -561,11 +601,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(abi_arg_in relativePosition, abi_arg_in relativeOrientation, double relativeHeadingInRadians, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(impl::abi_arg_in relativePosition, impl::abi_arg_in relativeOrientation, double relativeHeadingInRadians, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); return S_OK; } catch (...) @@ -575,11 +616,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocation(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation()); return S_OK; } catch (...) @@ -589,11 +631,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(abi_arg_in relativePosition, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(impl::abi_arg_in relativePosition, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition))); return S_OK; } catch (...) @@ -603,11 +646,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(abi_arg_in relativePosition, abi_arg_in relativeOrientation, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(impl::abi_arg_in relativePosition, impl::abi_arg_in relativeOrientation, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); return S_OK; } catch (...) @@ -617,11 +661,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(abi_arg_in relativePosition, abi_arg_in relativeOrientation, double relativeHeadingInRadians, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(impl::abi_arg_in relativePosition, impl::abi_arg_in relativeOrientation, double relativeHeadingInRadians, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); return S_OK; } catch (...) @@ -635,11 +680,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_RelativePosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_RelativePosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativePosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativePosition()); return S_OK; } catch (...) @@ -648,10 +694,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RelativePosition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelativePosition(*reinterpret_cast(&value)); return S_OK; } @@ -661,11 +708,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RelativeOrientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RelativeOrientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RelativeOrientation()); return S_OK; } catch (...) @@ -674,10 +722,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RelativeOrientation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RelativeOrientation(*reinterpret_cast(&value)); return S_OK; } @@ -691,6 +740,7 @@ struct produceshim()); this->shim().AdjustHeading(headingOffsetInRadians); return S_OK; } @@ -700,11 +750,12 @@ struct produce timestamp, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetStationaryCoordinateSystemAtTimestamp(impl::abi_arg_in timestamp, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetStationaryCoordinateSystemAtTimestamp(*reinterpret_cast(×tamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetStationaryCoordinateSystemAtTimestamp(*reinterpret_cast(×tamp))); return S_OK; } catch (...) @@ -714,11 +765,12 @@ struct produce timestamp, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetRelativeHeadingAtTimestamp(impl::abi_arg_in timestamp, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetRelativeHeadingAtTimestamp(*reinterpret_cast(×tamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetRelativeHeadingAtTimestamp(*reinterpret_cast(×tamp))); return S_OK; } catch (...) @@ -736,7 +788,8 @@ struct produceshim().Canceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Canceled()); return S_OK; } catch (...) @@ -749,6 +802,7 @@ struct produceshim()); this->shim().Canceled(value); return S_OK; } @@ -762,11 +816,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -780,11 +835,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_CoordinateSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_CoordinateSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSystem()); return S_OK; } catch (...) @@ -802,35 +858,35 @@ namespace Windows::Perception::Spatial { template Windows::Foundation::IReference impl_ISpatialCoordinateSystem::TryGetTransformTo(const Windows::Perception::Spatial::SpatialCoordinateSystem & target) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetTransformTo(get(target), put(value))); + check_hresult(WINRT_SHIM(ISpatialCoordinateSystem)->abi_TryGetTransformTo(get_abi(target), put_abi(value))); return value; } template Windows::Foundation::Numerics::float4x4 impl_ISpatialAnchorRawCoordinateSystemAdjustedEventArgs::OldRawCoordinateSystemToNewRawCoordinateSystemTransform() const { Windows::Foundation::Numerics::float4x4 value {}; - check_hresult(static_cast(static_cast(*this))->get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorRawCoordinateSystemAdjustedEventArgs)->get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_ISpatialAnchor::CoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchor)->get_CoordinateSystem(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_ISpatialAnchor::RawCoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RawCoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchor)->get_RawCoordinateSystem(put_abi(value))); return value; } template event_token impl_ISpatialAnchor::RawCoordinateSystemAdjusted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_RawCoordinateSystemAdjusted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISpatialAnchor)->add_RawCoordinateSystemAdjusted(get_abi(handler), &cookie)); return cookie; } @@ -841,221 +897,221 @@ template event_revoker impl_ISpatialAnchor::RawC template void impl_ISpatialAnchor::RawCoordinateSystemAdjusted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RawCoordinateSystemAdjusted(cookie)); + check_hresult(WINRT_SHIM(ISpatialAnchor)->remove_RawCoordinateSystemAdjusted(cookie)); } template bool impl_ISpatialAnchor2::RemovedByUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RemovedByUser(&value)); + check_hresult(WINRT_SHIM(ISpatialAnchor2)->get_RemovedByUser(&value)); return value; } template Windows::Perception::Spatial::SpatialAnchor impl_ISpatialAnchorStatics::TryCreateRelativeTo(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Perception::Spatial::SpatialAnchor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateRelativeTo(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorStatics)->abi_TryCreateRelativeTo(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialAnchor impl_ISpatialAnchorStatics::TryCreateRelativeTo(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Foundation::Numerics::float3 & position) const { Windows::Perception::Spatial::SpatialAnchor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateWithPositionRelativeTo(get(coordinateSystem), get(position), put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorStatics)->abi_TryCreateWithPositionRelativeTo(get_abi(coordinateSystem), get_abi(position), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialAnchor impl_ISpatialAnchorStatics::TryCreateRelativeTo(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Foundation::Numerics::float3 & position, const Windows::Foundation::Numerics::quaternion & orientation) const { Windows::Perception::Spatial::SpatialAnchor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateWithPositionAndOrientationRelativeTo(get(coordinateSystem), get(position), get(orientation), put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorStatics)->abi_TryCreateWithPositionAndOrientationRelativeTo(get_abi(coordinateSystem), get_abi(position), get_abi(orientation), put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_ISpatialAnchorStore::GetAllSavedAnchors() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->abi_GetAllSavedAnchors(put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorStore)->abi_GetAllSavedAnchors(put_abi(value))); return value; } -template bool impl_ISpatialAnchorStore::TrySave(hstring_ref id, const Windows::Perception::Spatial::SpatialAnchor & anchor) const +template bool impl_ISpatialAnchorStore::TrySave(hstring_view id, const Windows::Perception::Spatial::SpatialAnchor & anchor) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySave(get(id), get(anchor), &succeeded)); + check_hresult(WINRT_SHIM(ISpatialAnchorStore)->abi_TrySave(get_abi(id), get_abi(anchor), &succeeded)); return succeeded; } -template void impl_ISpatialAnchorStore::Remove(hstring_ref id) const +template void impl_ISpatialAnchorStore::Remove(hstring_view id) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(id))); + check_hresult(WINRT_SHIM(ISpatialAnchorStore)->abi_Remove(get_abi(id))); } template void impl_ISpatialAnchorStore::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(ISpatialAnchorStore)->abi_Clear()); } template Windows::Foundation::IAsyncOperation impl_ISpatialAnchorManagerStatics::RequestStoreAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestStoreAsync(put(value))); + check_hresult(WINRT_SHIM(ISpatialAnchorManagerStatics)->abi_RequestStoreAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_ISpatialAnchorTransferManagerStatics::TryImportAnchorsAsync(const Windows::Storage::Streams::IInputStream & stream) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_TryImportAnchorsAsync(get(stream), put(operation))); + check_hresult(WINRT_SHIM(ISpatialAnchorTransferManagerStatics)->abi_TryImportAnchorsAsync(get_abi(stream), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ISpatialAnchorTransferManagerStatics::TryExportAnchorsAsync(const Windows::Foundation::Collections::IIterable> & anchors, const Windows::Storage::Streams::IOutputStream & stream) const +template Windows::Foundation::IAsyncOperation impl_ISpatialAnchorTransferManagerStatics::TryExportAnchorsAsync(iterable> anchors, const Windows::Storage::Streams::IOutputStream & stream) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryExportAnchorsAsync(get(anchors), get(stream), put(operation))); + check_hresult(WINRT_SHIM(ISpatialAnchorTransferManagerStatics)->abi_TryExportAnchorsAsync(get_abi(anchors), get_abi(stream), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISpatialAnchorTransferManagerStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(ISpatialAnchorTransferManagerStatics)->abi_RequestAccessAsync(put_abi(result))); return result; } template bool impl_ISpatialLocatorPositionalTrackingDeactivatingEventArgs::Canceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Canceled(&value)); + check_hresult(WINRT_SHIM(ISpatialLocatorPositionalTrackingDeactivatingEventArgs)->get_Canceled(&value)); return value; } template void impl_ISpatialLocatorPositionalTrackingDeactivatingEventArgs::Canceled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Canceled(value)); + check_hresult(WINRT_SHIM(ISpatialLocatorPositionalTrackingDeactivatingEventArgs)->put_Canceled(value)); } template Windows::Foundation::Numerics::float3 impl_ISpatialLocatorAttachedFrameOfReference::RelativePosition() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativePosition(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->get_RelativePosition(put_abi(value))); return value; } template void impl_ISpatialLocatorAttachedFrameOfReference::RelativePosition(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_RelativePosition(get(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->put_RelativePosition(get_abi(value))); } template Windows::Foundation::Numerics::quaternion impl_ISpatialLocatorAttachedFrameOfReference::RelativeOrientation() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_RelativeOrientation(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->get_RelativeOrientation(put_abi(value))); return value; } template void impl_ISpatialLocatorAttachedFrameOfReference::RelativeOrientation(const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->put_RelativeOrientation(get(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->put_RelativeOrientation(get_abi(value))); } template void impl_ISpatialLocatorAttachedFrameOfReference::AdjustHeading(double headingOffsetInRadians) const { - check_hresult(static_cast(static_cast(*this))->abi_AdjustHeading(headingOffsetInRadians)); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->abi_AdjustHeading(headingOffsetInRadians)); } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_ISpatialLocatorAttachedFrameOfReference::GetStationaryCoordinateSystemAtTimestamp(const Windows::Perception::PerceptionTimestamp & timestamp) const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetStationaryCoordinateSystemAtTimestamp(get(timestamp), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->abi_GetStationaryCoordinateSystemAtTimestamp(get_abi(timestamp), put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISpatialLocatorAttachedFrameOfReference::TryGetRelativeHeadingAtTimestamp(const Windows::Perception::PerceptionTimestamp & timestamp) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetRelativeHeadingAtTimestamp(get(timestamp), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorAttachedFrameOfReference)->abi_TryGetRelativeHeadingAtTimestamp(get_abi(timestamp), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialCoordinateSystem impl_ISpatialStationaryFrameOfReference::CoordinateSystem() const { Windows::Perception::Spatial::SpatialCoordinateSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSystem(put(value))); + check_hresult(WINRT_SHIM(ISpatialStationaryFrameOfReference)->get_CoordinateSystem(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialLocation::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Numerics::quaternion impl_ISpatialLocation::Orientation() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_Orientation(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialLocation::AbsoluteLinearVelocity() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteLinearVelocity(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_AbsoluteLinearVelocity(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialLocation::AbsoluteLinearAcceleration() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteLinearAcceleration(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_AbsoluteLinearAcceleration(put_abi(value))); return value; } template Windows::Foundation::Numerics::quaternion impl_ISpatialLocation::AbsoluteAngularVelocity() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteAngularVelocity(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_AbsoluteAngularVelocity(put_abi(value))); return value; } template Windows::Foundation::Numerics::quaternion impl_ISpatialLocation::AbsoluteAngularAcceleration() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_AbsoluteAngularAcceleration(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocation)->get_AbsoluteAngularAcceleration(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocatability impl_ISpatialLocator::Locatability() const { Windows::Perception::Spatial::SpatialLocatability value {}; - check_hresult(static_cast(static_cast(*this))->get_Locatability(&value)); + check_hresult(WINRT_SHIM(ISpatialLocator)->get_Locatability(&value)); return value; } -template event_token impl_ISpatialLocator::LocatabilityChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ISpatialLocator::LocatabilityChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_LocatabilityChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISpatialLocator)->add_LocatabilityChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ISpatialLocator::LocatabilityChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ISpatialLocator::LocatabilityChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Perception::Spatial::ISpatialLocator::remove_LocatabilityChanged, LocatabilityChanged(handler)); } template void impl_ISpatialLocator::LocatabilityChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_LocatabilityChanged(cookie)); + check_hresult(WINRT_SHIM(ISpatialLocator)->remove_LocatabilityChanged(cookie)); } template event_token impl_ISpatialLocator::PositionalTrackingDeactivating(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PositionalTrackingDeactivating(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISpatialLocator)->add_PositionalTrackingDeactivating(get_abi(handler), &cookie)); return cookie; } @@ -1066,104 +1122,104 @@ template event_revoker impl_ISpatialLocator::Po template void impl_ISpatialLocator::PositionalTrackingDeactivating(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PositionalTrackingDeactivating(cookie)); + check_hresult(WINRT_SHIM(ISpatialLocator)->remove_PositionalTrackingDeactivating(cookie)); } template Windows::Perception::Spatial::SpatialLocation impl_ISpatialLocator::TryLocateAtTimestamp(const Windows::Perception::PerceptionTimestamp & timestamp, const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Perception::Spatial::SpatialLocation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryLocateAtTimestamp(get(timestamp), get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_TryLocateAtTimestamp(get_abi(timestamp), get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference impl_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading() const { Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttachedFrameOfReferenceAtCurrentHeading(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateAttachedFrameOfReferenceAtCurrentHeading(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference impl_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(const Windows::Foundation::Numerics::float3 & relativePosition) const { Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(get(relativePosition), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(get_abi(relativePosition), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference impl_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(const Windows::Foundation::Numerics::float3 & relativePosition, const Windows::Foundation::Numerics::quaternion & relativeOrientation) const { Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(get(relativePosition), get(relativeOrientation), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(get_abi(relativePosition), get_abi(relativeOrientation), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference impl_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(const Windows::Foundation::Numerics::float3 & relativePosition, const Windows::Foundation::Numerics::quaternion & relativeOrientation, double relativeHeadingInRadians) const { Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(get(relativePosition), get(relativeOrientation), relativeHeadingInRadians, put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(get_abi(relativePosition), get_abi(relativeOrientation), relativeHeadingInRadians, put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialStationaryFrameOfReference impl_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation() const { Windows::Perception::Spatial::SpatialStationaryFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStationaryFrameOfReferenceAtCurrentLocation(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateStationaryFrameOfReferenceAtCurrentLocation(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialStationaryFrameOfReference impl_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(const Windows::Foundation::Numerics::float3 & relativePosition) const { Windows::Perception::Spatial::SpatialStationaryFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(get(relativePosition), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(get_abi(relativePosition), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialStationaryFrameOfReference impl_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(const Windows::Foundation::Numerics::float3 & relativePosition, const Windows::Foundation::Numerics::quaternion & relativeOrientation) const { Windows::Perception::Spatial::SpatialStationaryFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(get(relativePosition), get(relativeOrientation), put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(get_abi(relativePosition), get_abi(relativeOrientation), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialStationaryFrameOfReference impl_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(const Windows::Foundation::Numerics::float3 & relativePosition, const Windows::Foundation::Numerics::quaternion & relativeOrientation, double relativeHeadingInRadians) const { Windows::Perception::Spatial::SpatialStationaryFrameOfReference value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(get(relativePosition), get(relativeOrientation), relativeHeadingInRadians, put(value))); + check_hresult(WINRT_SHIM(ISpatialLocator)->abi_CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(get_abi(relativePosition), get_abi(relativeOrientation), relativeHeadingInRadians, put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialLocator impl_ISpatialLocatorStatics::GetDefault() const { Windows::Perception::Spatial::SpatialLocator value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(value))); + check_hresult(WINRT_SHIM(ISpatialLocatorStatics)->abi_GetDefault(put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialBoundingVolume impl_ISpatialBoundingVolumeStatics::FromBox(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Perception::Spatial::SpatialBoundingBox & box) const { Windows::Perception::Spatial::SpatialBoundingVolume value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromBox(get(coordinateSystem), get(box), put(value))); + check_hresult(WINRT_SHIM(ISpatialBoundingVolumeStatics)->abi_FromBox(get_abi(coordinateSystem), get_abi(box), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialBoundingVolume impl_ISpatialBoundingVolumeStatics::FromOrientedBox(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Perception::Spatial::SpatialBoundingOrientedBox & box) const { Windows::Perception::Spatial::SpatialBoundingVolume value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromOrientedBox(get(coordinateSystem), get(box), put(value))); + check_hresult(WINRT_SHIM(ISpatialBoundingVolumeStatics)->abi_FromOrientedBox(get_abi(coordinateSystem), get_abi(box), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialBoundingVolume impl_ISpatialBoundingVolumeStatics::FromSphere(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Perception::Spatial::SpatialBoundingSphere & sphere) const { Windows::Perception::Spatial::SpatialBoundingVolume value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromSphere(get(coordinateSystem), get(sphere), put(value))); + check_hresult(WINRT_SHIM(ISpatialBoundingVolumeStatics)->abi_FromSphere(get_abi(coordinateSystem), get_abi(sphere), put_abi(value))); return value; } template Windows::Perception::Spatial::SpatialBoundingVolume impl_ISpatialBoundingVolumeStatics::FromFrustum(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Perception::Spatial::SpatialBoundingFrustum & frustum) const { Windows::Perception::Spatial::SpatialBoundingVolume value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromFrustum(get(coordinateSystem), get(frustum), put(value))); + check_hresult(WINRT_SHIM(ISpatialBoundingVolumeStatics)->abi_FromFrustum(get_abi(coordinateSystem), get_abi(frustum), put_abi(value))); return value; } @@ -1192,7 +1248,7 @@ inline Windows::Foundation::IAsyncOperation().TryImportAnchorsAsync(stream); } -inline Windows::Foundation::IAsyncOperation SpatialAnchorTransferManager::TryExportAnchorsAsync(const Windows::Foundation::Collections::IIterable> & anchors, const Windows::Storage::Streams::IOutputStream & stream) +inline Windows::Foundation::IAsyncOperation SpatialAnchorTransferManager::TryExportAnchorsAsync(iterable> anchors, const Windows::Storage::Streams::IOutputStream & stream) { return get_activation_factory().TryExportAnchorsAsync(anchors, stream); } @@ -1230,3 +1286,239 @@ inline Windows::Perception::Spatial::SpatialLocator SpatialLocator::GetDefault() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchorManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchorRawCoordinateSystemAdjustedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchorStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialAnchorTransferManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialBoundingVolume & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialBoundingVolumeStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialCoordinateSystem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialLocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialLocatorAttachedFrameOfReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialLocatorPositionalTrackingDeactivatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialLocatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::ISpatialStationaryFrameOfReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialAnchor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialAnchorRawCoordinateSystemAdjustedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialAnchorStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialBoundingVolume & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialCoordinateSystem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialLocator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialLocatorPositionalTrackingDeactivatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::Spatial::SpatialStationaryFrameOfReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Perception.h b/10.0.14393.0/winrt/Windows.Perception.h index 9e4d9d170..c52226633 100644 --- a/10.0.14393.0/winrt/Windows.Perception.h +++ b/10.0.14393.0/winrt/Windows.Perception.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Perception.3.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_TargetTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetTime()); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PredictionAmount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PredictionAmount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PredictionAmount()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_FromHistoricalTargetTime(abi_arg_in targetTime, abi_arg_out value) noexcept override + HRESULT __stdcall abi_FromHistoricalTargetTime(impl::abi_arg_in targetTime, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FromHistoricalTargetTime(*reinterpret_cast(&targetTime))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromHistoricalTargetTime(*reinterpret_cast(&targetTime))); return S_OK; } catch (...) @@ -65,21 +71,21 @@ namespace Windows::Perception { template Windows::Foundation::DateTime impl_IPerceptionTimestamp::TargetTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_TargetTime(put(value))); + check_hresult(WINRT_SHIM(IPerceptionTimestamp)->get_TargetTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPerceptionTimestamp::PredictionAmount() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_PredictionAmount(put(value))); + check_hresult(WINRT_SHIM(IPerceptionTimestamp)->get_PredictionAmount(put_abi(value))); return value; } template Windows::Perception::PerceptionTimestamp impl_IPerceptionTimestampHelperStatics::FromHistoricalTargetTime(const Windows::Foundation::DateTime & targetTime) const { Windows::Perception::PerceptionTimestamp value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromHistoricalTargetTime(get(targetTime), put(value))); + check_hresult(WINRT_SHIM(IPerceptionTimestampHelperStatics)->abi_FromHistoricalTargetTime(get_abi(targetTime), put_abi(value))); return value; } @@ -91,3 +97,32 @@ inline Windows::Perception::PerceptionTimestamp PerceptionTimestampHelper::FromH } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::IPerceptionTimestamp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::IPerceptionTimestampHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Perception::PerceptionTimestamp & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.ApplicationModel.h b/10.0.14393.0/winrt/Windows.Phone.ApplicationModel.h index 5ab6ea9b1..d3abc5255 100644 --- a/10.0.14393.0/winrt/Windows.Phone.ApplicationModel.h +++ b/10.0.14393.0/winrt/Windows.Phone.ApplicationModel.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Phone.ApplicationModel.3.h" WINRT_EXPORT namespace winrt { @@ -16,7 +19,8 @@ struct produce { try { - *value = detach(this->shim().Modes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Modes()); return S_OK; } catch (...) @@ -33,7 +37,7 @@ namespace Windows::Phone::ApplicationModel { template Windows::Phone::ApplicationModel::ApplicationProfileModes impl_IApplicationProfileStatics::Modes() const { Windows::Phone::ApplicationModel::ApplicationProfileModes value {}; - check_hresult(static_cast(static_cast(*this))->get_Modes(&value)); + check_hresult(WINRT_SHIM(IApplicationProfileStatics)->get_Modes(&value)); return value; } @@ -45,3 +49,14 @@ inline Windows::Phone::ApplicationModel::ApplicationProfileModes ApplicationProf } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::ApplicationModel::IApplicationProfileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Devices.Notification.h b/10.0.14393.0/winrt/Windows.Phone.Devices.Notification.h index 48e391f56..b9e18ff91 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Devices.Notification.h +++ b/10.0.14393.0/winrt/Windows.Phone.Devices.Notification.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.Devices.Notification.3.h" @@ -13,10 +16,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_Vibrate(abi_arg_in duration) noexcept override + HRESULT __stdcall abi_Vibrate(impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Vibrate(*reinterpret_cast(&duration)); return S_OK; } @@ -30,6 +34,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(); return S_OK; } @@ -43,11 +48,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -65,18 +71,18 @@ namespace Windows::Phone::Devices::Notification { template Windows::Phone::Devices::Notification::VibrationDevice impl_IVibrationDeviceStatics::GetDefault() const { Windows::Phone::Devices::Notification::VibrationDevice result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IVibrationDeviceStatics)->abi_GetDefault(put_abi(result))); return result; } template void impl_IVibrationDevice::Vibrate(const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_Vibrate(get(duration))); + check_hresult(WINRT_SHIM(IVibrationDevice)->abi_Vibrate(get_abi(duration))); } template void impl_IVibrationDevice::Cancel() const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel()); + check_hresult(WINRT_SHIM(IVibrationDevice)->abi_Cancel()); } inline Windows::Phone::Devices::Notification::VibrationDevice VibrationDevice::GetDefault() @@ -87,3 +93,32 @@ inline Windows::Phone::Devices::Notification::VibrationDevice VibrationDevice::G } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Notification::IVibrationDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Notification::IVibrationDeviceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Notification::VibrationDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Devices.Power.h b/10.0.14393.0/winrt/Windows.Phone.Devices.Power.h index c8fde84c5..0e2fc796b 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Devices.Power.h +++ b/10.0.14393.0/winrt/Windows.Phone.Devices.Power.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.Devices.Power.3.h" @@ -17,7 +20,8 @@ struct produce : produce_baseshim().RemainingChargePercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingChargePercent()); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RemainingDischargeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemainingDischargeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingDischargeTime()); return S_OK; } catch (...) @@ -39,11 +44,12 @@ struct produce : produce_base> changeHandler, event_token * token) noexcept override + HRESULT __stdcall add_RemainingChargePercentChanged(impl::abi_arg_in> changeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemainingChargePercentChanged(*reinterpret_cast *>(&changeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemainingChargePercentChanged(*reinterpret_cast *>(&changeHandler))); return S_OK; } catch (...) @@ -56,6 +62,7 @@ struct produce : produce_baseshim()); this->shim().RemainingChargePercentChanged(token); return S_OK; } @@ -69,11 +76,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -91,39 +99,39 @@ namespace Windows::Phone::Devices::Power { template Windows::Phone::Devices::Power::Battery impl_IBatteryStatics::GetDefault() const { Windows::Phone::Devices::Power::Battery result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IBatteryStatics)->abi_GetDefault(put_abi(result))); return result; } template int32_t impl_IBattery::RemainingChargePercent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RemainingChargePercent(&value)); + check_hresult(WINRT_SHIM(IBattery)->get_RemainingChargePercent(&value)); return value; } template Windows::Foundation::TimeSpan impl_IBattery::RemainingDischargeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RemainingDischargeTime(put(value))); + check_hresult(WINRT_SHIM(IBattery)->get_RemainingDischargeTime(put_abi(value))); return value; } -template event_token impl_IBattery::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & changeHandler) const +template event_token impl_IBattery::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & changeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemainingChargePercentChanged(get(changeHandler), &token)); + check_hresult(WINRT_SHIM(IBattery)->add_RemainingChargePercentChanged(get_abi(changeHandler), &token)); return token; } -template event_revoker impl_IBattery::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const +template event_revoker impl_IBattery::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Phone::Devices::Power::IBattery::remove_RemainingChargePercentChanged, RemainingChargePercentChanged(changeHandler)); } template void impl_IBattery::RemainingChargePercentChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemainingChargePercentChanged(token)); + check_hresult(WINRT_SHIM(IBattery)->remove_RemainingChargePercentChanged(token)); } inline Windows::Phone::Devices::Power::Battery Battery::GetDefault() @@ -134,3 +142,32 @@ inline Windows::Phone::Devices::Power::Battery Battery::GetDefault() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Power::IBattery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Power::IBatteryStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Devices::Power::Battery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Management.Deployment.h b/10.0.14393.0/winrt/Windows.Phone.Management.Deployment.h index ad6ce3e90..43bb734ec 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Management.Deployment.h +++ b/10.0.14393.0/winrt/Windows.Phone.Management.Deployment.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Management.Deployment.3.h" @@ -19,7 +22,8 @@ struct produce : produce { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce : produce } } - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produce : produce { try { - *value = detach(this->shim().WorkplaceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkplaceId()); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce : produce } } - HRESULT __stdcall get_EnrollmentValidFrom(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnrollmentValidFrom(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnrollmentValidFrom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnrollmentValidFrom()); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce : produce } } - HRESULT __stdcall get_EnrollmentValidTo(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnrollmentValidTo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnrollmentValidTo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnrollmentValidTo()); return S_OK; } catch (...) @@ -85,7 +93,8 @@ struct produce : produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_EnrolledEnterprises(abi_arg_out> result) noexcept override + HRESULT __stdcall get_EnrolledEnterprises(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().EnrolledEnterprises()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnrolledEnterprises()); return S_OK; } catch (...) @@ -112,11 +122,12 @@ struct produce result) noexcept override + HRESULT __stdcall get_CurrentEnterprise(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CurrentEnterprise()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CurrentEnterprise()); return S_OK; } catch (...) @@ -126,11 +137,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_ValidateEnterprisesAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ValidateEnterprisesAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ValidateEnterprisesAsync()); return S_OK; } catch (...) @@ -140,11 +152,12 @@ struct produce enrollmentToken, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestEnrollmentAsync(impl::abi_arg_in enrollmentToken, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestEnrollmentAsync(*reinterpret_cast(&enrollmentToken))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestEnrollmentAsync(*reinterpret_cast(&enrollmentToken))); return S_OK; } catch (...) @@ -154,11 +167,12 @@ struct produce enterprise, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestUnenrollmentAsync(impl::abi_arg_in enterprise, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestUnenrollmentAsync(*reinterpret_cast(&enterprise))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestUnenrollmentAsync(*reinterpret_cast(&enterprise))); return S_OK; } catch (...) @@ -172,11 +186,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnrolledEnterprise(abi_arg_out result) noexcept override + HRESULT __stdcall get_EnrolledEnterprise(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().EnrolledEnterprise()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().EnrolledEnterprise()); return S_OK; } catch (...) @@ -190,7 +205,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddPackageAsync(abi_arg_in title, abi_arg_in sourceLocation, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AddPackageAsync(impl::abi_arg_in title, impl::abi_arg_in sourceLocation, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddPackageAsync(*reinterpret_cast(&title), *reinterpret_cast(&sourceLocation))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddPackageAsync(*reinterpret_cast(&title), *reinterpret_cast(&sourceLocation))); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce title, abi_arg_in sourceLocation, abi_arg_in instanceId, abi_arg_in offerId, abi_arg_in license, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AddPackagePreloadedAsync(impl::abi_arg_in title, impl::abi_arg_in sourceLocation, impl::abi_arg_in instanceId, impl::abi_arg_in offerId, impl::abi_arg_in license, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddPackageAsync(*reinterpret_cast(&title), *reinterpret_cast(&sourceLocation), *reinterpret_cast(&instanceId), *reinterpret_cast(&offerId), *reinterpret_cast(&license))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddPackageAsync(*reinterpret_cast(&title), *reinterpret_cast(&sourceLocation), *reinterpret_cast(&instanceId), *reinterpret_cast(&offerId), *reinterpret_cast(&license))); return S_OK; } catch (...) @@ -231,11 +249,12 @@ struct produce>> items) noexcept override + HRESULT __stdcall abi_GetPendingPackageInstalls(impl::abi_arg_out>> items) noexcept override { try { - *items = detach(this->shim().GetPendingPackageInstalls()); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().GetPendingPackageInstalls()); return S_OK; } catch (...) @@ -245,11 +264,12 @@ struct produce> items) noexcept override + HRESULT __stdcall abi_FindPackagesForCurrentPublisher(impl::abi_arg_out> items) noexcept override { try { - *items = detach(this->shim().FindPackagesForCurrentPublisher()); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().FindPackagesForCurrentPublisher()); return S_OK; } catch (...) @@ -259,11 +279,12 @@ struct produce> items) noexcept override + HRESULT __stdcall abi_FindPackages(impl::abi_arg_out> items) noexcept override { try { - *items = detach(this->shim().FindPackages()); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().FindPackages()); return S_OK; } catch (...) @@ -277,11 +298,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RemovePackageAsync(abi_arg_in packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_RemovePackageAsync(impl::abi_arg_in packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName), removalOptions)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RemovePackageAsync(*reinterpret_cast(&packageFullName), removalOptions)); return S_OK; } catch (...) @@ -291,11 +313,12 @@ struct produce manifestUri, abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_RegisterPackageAsync(impl::abi_arg_in manifestUri, impl::abi_arg_in> dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RegisterPackageAsync(*reinterpret_cast(&manifestUri), *reinterpret_cast *>(&dependencyPackageUris), deploymentOptions)); return S_OK; } catch (...) @@ -305,11 +328,12 @@ struct produce packageName, abi_arg_in packagePublisher, abi_arg_out> items) noexcept override + HRESULT __stdcall abi_FindPackagesByNamePublisher(impl::abi_arg_in packageName, impl::abi_arg_in packagePublisher, impl::abi_arg_out> items) noexcept override { try { - *items = detach(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); + typename D::abi_guard guard(this->shim()); + *items = detach_abi(this->shim().FindPackages(*reinterpret_cast(&packageName), *reinterpret_cast(&packagePublisher))); return S_OK; } catch (...) @@ -323,11 +347,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ProductId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProductId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductId()); return S_OK; } catch (...) @@ -341,7 +366,8 @@ struct produce { try { - *value = detach(this->shim().InstallState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallState()); return S_OK; } catch (...) @@ -354,11 +380,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ErrorText(abi_arg_out value) noexcept override + HRESULT __stdcall get_ErrorText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorText()); return S_OK; } catch (...) @@ -376,168 +403,168 @@ namespace Windows::Phone::Management::Deployment { template GUID impl_IEnterprise::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IEnterprise)->get_Id(&value)); return value; } template hstring impl_IEnterprise::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IEnterprise)->get_Name(put_abi(value))); return value; } template int32_t impl_IEnterprise::WorkplaceId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_WorkplaceId(&value)); + check_hresult(WINRT_SHIM(IEnterprise)->get_WorkplaceId(&value)); return value; } template Windows::Foundation::DateTime impl_IEnterprise::EnrollmentValidFrom() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_EnrollmentValidFrom(put(value))); + check_hresult(WINRT_SHIM(IEnterprise)->get_EnrollmentValidFrom(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IEnterprise::EnrollmentValidTo() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_EnrollmentValidTo(put(value))); + check_hresult(WINRT_SHIM(IEnterprise)->get_EnrollmentValidTo(put_abi(value))); return value; } template Windows::Phone::Management::Deployment::EnterpriseStatus impl_IEnterprise::Status() const { Windows::Phone::Management::Deployment::EnterpriseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEnterprise)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IEnterpriseEnrollmentManager::EnrolledEnterprises() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->get_EnrolledEnterprises(put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentManager)->get_EnrolledEnterprises(put_abi(result))); return result; } template Windows::Phone::Management::Deployment::Enterprise impl_IEnterpriseEnrollmentManager::CurrentEnterprise() const { Windows::Phone::Management::Deployment::Enterprise result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentEnterprise(put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentManager)->get_CurrentEnterprise(put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IEnterpriseEnrollmentManager::ValidateEnterprisesAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ValidateEnterprisesAsync(put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentManager)->abi_ValidateEnterprisesAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IEnterpriseEnrollmentManager::RequestEnrollmentAsync(hstring_ref enrollmentToken) const +template Windows::Foundation::IAsyncOperation impl_IEnterpriseEnrollmentManager::RequestEnrollmentAsync(hstring_view enrollmentToken) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestEnrollmentAsync(get(enrollmentToken), put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentManager)->abi_RequestEnrollmentAsync(get_abi(enrollmentToken), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEnterpriseEnrollmentManager::RequestUnenrollmentAsync(const Windows::Phone::Management::Deployment::Enterprise & enterprise) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestUnenrollmentAsync(get(enterprise), put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentManager)->abi_RequestUnenrollmentAsync(get_abi(enterprise), put_abi(result))); return result; } template hstring impl_IPackageInstallResult::ProductId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductId(put(value))); + check_hresult(WINRT_SHIM(IPackageInstallResult)->get_ProductId(put_abi(value))); return value; } template Windows::Management::Deployment::PackageInstallState impl_IPackageInstallResult::InstallState() const { Windows::Management::Deployment::PackageInstallState value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallState(&value)); + check_hresult(WINRT_SHIM(IPackageInstallResult)->get_InstallState(&value)); return value; } template hstring impl_IPackageInstallResult2::ErrorText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ErrorText(put(value))); + check_hresult(WINRT_SHIM(IPackageInstallResult2)->get_ErrorText(put_abi(value))); return value; } template Windows::Phone::Management::Deployment::Enterprise impl_IEnterpriseEnrollmentResult::EnrolledEnterprise() const { Windows::Phone::Management::Deployment::Enterprise result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EnrolledEnterprise(put(result))); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentResult)->get_EnrolledEnterprise(put_abi(result))); return result; } template Windows::Phone::Management::Deployment::EnterpriseEnrollmentStatus impl_IEnterpriseEnrollmentResult::Status() const { Windows::Phone::Management::Deployment::EnterpriseEnrollmentStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IEnterpriseEnrollmentResult)->get_Status(&value)); return value; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics::AddPackageAsync(hstring_ref title, const Windows::Foundation::Uri & sourceLocation) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics::AddPackageAsync(hstring_view title, const Windows::Foundation::Uri & sourceLocation) const { Windows::Foundation::IAsyncOperationWithProgress asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddPackageAsync(get(title), get(sourceLocation), put(asyncInfo))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics)->abi_AddPackageAsync(get_abi(title), get_abi(sourceLocation), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics::AddPackageAsync(hstring_ref title, const Windows::Foundation::Uri & sourceLocation, hstring_ref instanceId, hstring_ref offerId, const Windows::Foundation::Uri & license) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics::AddPackageAsync(hstring_view title, const Windows::Foundation::Uri & sourceLocation, hstring_view instanceId, hstring_view offerId, const Windows::Foundation::Uri & license) const { Windows::Foundation::IAsyncOperationWithProgress asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddPackagePreloadedAsync(get(title), get(sourceLocation), get(instanceId), get(offerId), get(license), put(asyncInfo))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics)->abi_AddPackagePreloadedAsync(get_abi(title), get_abi(sourceLocation), get_abi(instanceId), get_abi(offerId), get_abi(license), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::Collections::IIterable> impl_IInstallationManagerStatics::GetPendingPackageInstalls() const { Windows::Foundation::Collections::IIterable> items; - check_hresult(static_cast(static_cast(*this))->abi_GetPendingPackageInstalls(put(items))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics)->abi_GetPendingPackageInstalls(put_abi(items))); return items; } template Windows::Foundation::Collections::IIterable impl_IInstallationManagerStatics::FindPackagesForCurrentPublisher() const { Windows::Foundation::Collections::IIterable items; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesForCurrentPublisher(put(items))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics)->abi_FindPackagesForCurrentPublisher(put_abi(items))); return items; } template Windows::Foundation::Collections::IIterable impl_IInstallationManagerStatics::FindPackages() const { Windows::Foundation::Collections::IIterable items; - check_hresult(static_cast(static_cast(*this))->abi_FindPackages(put(items))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics)->abi_FindPackages(put_abi(items))); return items; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics2::RemovePackageAsync(hstring_ref packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics2::RemovePackageAsync(hstring_view packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) const { Windows::Foundation::IAsyncOperationWithProgress asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RemovePackageAsync(get(packageFullName), removalOptions, put(asyncInfo))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics2)->abi_RemovePackageAsync(get_abi(packageFullName), removalOptions, put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics2::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IInstallationManagerStatics2::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) const { Windows::Foundation::IAsyncOperationWithProgress asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RegisterPackageAsync(get(manifestUri), get(dependencyPackageUris), deploymentOptions, put(asyncInfo))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics2)->abi_RegisterPackageAsync(get_abi(manifestUri), get_abi(dependencyPackageUris), deploymentOptions, put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::Collections::IIterable impl_IInstallationManagerStatics2::FindPackages(hstring_ref packageName, hstring_ref packagePublisher) const +template Windows::Foundation::Collections::IIterable impl_IInstallationManagerStatics2::FindPackages(hstring_view packageName, hstring_view packagePublisher) const { Windows::Foundation::Collections::IIterable items; - check_hresult(static_cast(static_cast(*this))->abi_FindPackagesByNamePublisher(get(packageName), get(packagePublisher), put(items))); + check_hresult(WINRT_SHIM(IInstallationManagerStatics2)->abi_FindPackagesByNamePublisher(get_abi(packageName), get_abi(packagePublisher), put_abi(items))); return items; } @@ -556,7 +583,7 @@ inline Windows::Foundation::IAsyncAction EnterpriseEnrollmentManager::ValidateEn return get_activation_factory().ValidateEnterprisesAsync(); } -inline Windows::Foundation::IAsyncOperation EnterpriseEnrollmentManager::RequestEnrollmentAsync(hstring_ref enrollmentToken) +inline Windows::Foundation::IAsyncOperation EnterpriseEnrollmentManager::RequestEnrollmentAsync(hstring_view enrollmentToken) { return get_activation_factory().RequestEnrollmentAsync(enrollmentToken); } @@ -566,12 +593,12 @@ inline Windows::Foundation::IAsyncOperation EnterpriseEnrollmentManager::R return get_activation_factory().RequestUnenrollmentAsync(enterprise); } -inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::AddPackageAsync(hstring_ref title, const Windows::Foundation::Uri & sourceLocation) +inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::AddPackageAsync(hstring_view title, const Windows::Foundation::Uri & sourceLocation) { return get_activation_factory().AddPackageAsync(title, sourceLocation); } -inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::AddPackageAsync(hstring_ref title, const Windows::Foundation::Uri & sourceLocation, hstring_ref instanceId, hstring_ref offerId, const Windows::Foundation::Uri & license) +inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::AddPackageAsync(hstring_view title, const Windows::Foundation::Uri & sourceLocation, hstring_view instanceId, hstring_view offerId, const Windows::Foundation::Uri & license) { return get_activation_factory().AddPackageAsync(title, sourceLocation, instanceId, offerId, license); } @@ -591,17 +618,17 @@ inline Windows::Foundation::Collections::IIterable().FindPackages(); } -inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::RemovePackageAsync(hstring_ref packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) +inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::RemovePackageAsync(hstring_view packageFullName, Windows::Management::Deployment::RemovalOptions removalOptions) { return get_activation_factory().RemovePackageAsync(packageFullName, removalOptions); } -inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, const Windows::Foundation::Collections::IIterable & dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) +inline Windows::Foundation::IAsyncOperationWithProgress InstallationManager::RegisterPackageAsync(const Windows::Foundation::Uri & manifestUri, iterable dependencyPackageUris, Windows::Management::Deployment::DeploymentOptions deploymentOptions) { return get_activation_factory().RegisterPackageAsync(manifestUri, dependencyPackageUris, deploymentOptions); } -inline Windows::Foundation::Collections::IIterable InstallationManager::FindPackages(hstring_ref packageName, hstring_ref packagePublisher) +inline Windows::Foundation::Collections::IIterable InstallationManager::FindPackages(hstring_view packageName, hstring_view packagePublisher) { return get_activation_factory().FindPackages(packageName, packagePublisher); } @@ -609,3 +636,95 @@ inline Windows::Foundation::Collections::IIterable +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IEnterprise & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IEnterpriseEnrollmentManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IEnterpriseEnrollmentResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IInstallationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IInstallationManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IPackageInstallResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::IPackageInstallResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::Enterprise & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::EnterpriseEnrollmentResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Management::Deployment::PackageInstallResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Media.Devices.h b/10.0.14393.0/winrt/Windows.Phone.Media.Devices.h index 41eb4240d..13260fcd9 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Media.Devices.h +++ b/10.0.14393.0/winrt/Windows.Phone.Media.Devices.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.Media.Devices.3.h" @@ -17,7 +20,8 @@ struct produce : produc { try { - *endpoint = detach(this->shim().GetAudioEndpoint()); + typename D::abi_guard guard(this->shim()); + *endpoint = detach_abi(this->shim().GetAudioEndpoint()); return S_OK; } catch (...) @@ -30,6 +34,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAudioEndpoint(endpoint); return S_OK; } @@ -39,11 +44,12 @@ struct produce : produc } } - HRESULT __stdcall add_AudioEndpointChanged(abi_arg_in> endpointChangeHandler, event_token * token) noexcept override + HRESULT __stdcall add_AudioEndpointChanged(impl::abi_arg_in> endpointChangeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioEndpointChanged(*reinterpret_cast *>(&endpointChangeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioEndpointChanged(*reinterpret_cast *>(&endpointChangeHandler))); return S_OK; } catch (...) @@ -56,6 +62,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioEndpointChanged(token); return S_OK; } @@ -69,7 +76,8 @@ struct produce : produc { try { - *value = detach(this->shim().AvailableAudioEndpoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AvailableAudioEndpoints()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out audioRoutingManager) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out audioRoutingManager) noexcept override { try { - *audioRoutingManager = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *audioRoutingManager = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -104,43 +113,43 @@ namespace Windows::Phone::Media::Devices { template Windows::Phone::Media::Devices::AudioRoutingEndpoint impl_IAudioRoutingManager::GetAudioEndpoint() const { Windows::Phone::Media::Devices::AudioRoutingEndpoint endpoint {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioEndpoint(&endpoint)); + check_hresult(WINRT_SHIM(IAudioRoutingManager)->abi_GetAudioEndpoint(&endpoint)); return endpoint; } template void impl_IAudioRoutingManager::SetAudioEndpoint(Windows::Phone::Media::Devices::AudioRoutingEndpoint endpoint) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAudioEndpoint(endpoint)); + check_hresult(WINRT_SHIM(IAudioRoutingManager)->abi_SetAudioEndpoint(endpoint)); } -template event_token impl_IAudioRoutingManager::AudioEndpointChanged(const Windows::Foundation::TypedEventHandler & endpointChangeHandler) const +template event_token impl_IAudioRoutingManager::AudioEndpointChanged(const Windows::Foundation::TypedEventHandler & endpointChangeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioEndpointChanged(get(endpointChangeHandler), &token)); + check_hresult(WINRT_SHIM(IAudioRoutingManager)->add_AudioEndpointChanged(get_abi(endpointChangeHandler), &token)); return token; } -template event_revoker impl_IAudioRoutingManager::AudioEndpointChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & endpointChangeHandler) const +template event_revoker impl_IAudioRoutingManager::AudioEndpointChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & endpointChangeHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Phone::Media::Devices::IAudioRoutingManager::remove_AudioEndpointChanged, AudioEndpointChanged(endpointChangeHandler)); } template void impl_IAudioRoutingManager::AudioEndpointChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioEndpointChanged(token)); + check_hresult(WINRT_SHIM(IAudioRoutingManager)->remove_AudioEndpointChanged(token)); } template Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints impl_IAudioRoutingManager::AvailableAudioEndpoints() const { Windows::Phone::Media::Devices::AvailableAudioRoutingEndpoints value {}; - check_hresult(static_cast(static_cast(*this))->get_AvailableAudioEndpoints(&value)); + check_hresult(WINRT_SHIM(IAudioRoutingManager)->get_AvailableAudioEndpoints(&value)); return value; } template Windows::Phone::Media::Devices::AudioRoutingManager impl_IAudioRoutingManagerStatics::GetDefault() const { Windows::Phone::Media::Devices::AudioRoutingManager audioRoutingManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(audioRoutingManager))); + check_hresult(WINRT_SHIM(IAudioRoutingManagerStatics)->abi_GetDefault(put_abi(audioRoutingManager))); return audioRoutingManager; } @@ -152,3 +161,32 @@ inline Windows::Phone::Media::Devices::AudioRoutingManager AudioRoutingManager:: } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Media::Devices::IAudioRoutingManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Media::Devices::IAudioRoutingManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Media::Devices::AudioRoutingManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Notification.Management.h b/10.0.14393.0/winrt/Windows.Phone.Notification.Management.h index 991cc0319..85336f0b5 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Notification.Management.h +++ b/10.0.14393.0/winrt/Windows.Phone.Notification.Management.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Email.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RegisterAccessoryApp(abi_arg_out triggerId) noexcept override + HRESULT __stdcall abi_RegisterAccessoryApp(impl::abi_arg_out triggerId) noexcept override { try { - *triggerId = detach(this->shim().RegisterAccessoryApp()); + typename D::abi_guard guard(this->shim()); + *triggerId = detach_abi(this->shim().RegisterAccessoryApp()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : } } - HRESULT __stdcall abi_GetNextTriggerDetails(abi_arg_out pDetails) noexcept override + HRESULT __stdcall abi_GetNextTriggerDetails(impl::abi_arg_out pDetails) noexcept override { try { - *pDetails = detach(this->shim().GetNextTriggerDetails()); + typename D::abi_guard guard(this->shim()); + *pDetails = detach_abi(this->shim().GetNextTriggerDetails()); return S_OK; } catch (...) @@ -45,10 +50,11 @@ struct produce : } } - HRESULT __stdcall abi_ProcessTriggerDetails(abi_arg_in pDetails) noexcept override + HRESULT __stdcall abi_ProcessTriggerDetails(impl::abi_arg_in pDetails) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessTriggerDetails(*reinterpret_cast(&pDetails)); return S_OK; } @@ -58,11 +64,12 @@ struct produce : } } - HRESULT __stdcall get_PhoneLineDetails(abi_arg_out> ppvalue) noexcept override + HRESULT __stdcall get_PhoneLineDetails(impl::abi_arg_out> ppvalue) noexcept override { try { - *ppvalue = detach(this->shim().PhoneLineDetails()); + typename D::abi_guard guard(this->shim()); + *ppvalue = detach_abi(this->shim().PhoneLineDetails()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : } } - HRESULT __stdcall abi_GetPhoneLineDetails(GUID phoneLine, abi_arg_out ppdetails) noexcept override + HRESULT __stdcall abi_GetPhoneLineDetails(GUID phoneLine, impl::abi_arg_out ppdetails) noexcept override { try { - *ppdetails = detach(this->shim().GetPhoneLineDetails(phoneLine)); + typename D::abi_guard guard(this->shim()); + *ppdetails = detach_abi(this->shim().GetPhoneLineDetails(phoneLine)); return S_OK; } catch (...) @@ -90,6 +98,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptPhoneCall(phoneCallId); return S_OK; } @@ -103,6 +112,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptPhoneCall(phoneCallId, endPoint); return S_OK; } @@ -116,6 +126,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptPhoneCallWithVideo(phoneCallId); return S_OK; } @@ -129,6 +140,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AcceptPhoneCallWithVideo(phoneCallId, endPoint); return S_OK; } @@ -142,6 +154,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().RejectPhoneCall(phoneCallId); return S_OK; } @@ -155,6 +168,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().RejectPhoneCall(phoneCallId, textResponseID); return S_OK; } @@ -164,10 +178,11 @@ struct produce : } } - HRESULT __stdcall abi_MakePhoneCall(GUID phoneLine, abi_arg_in phoneNumber) noexcept override + HRESULT __stdcall abi_MakePhoneCall(GUID phoneLine, impl::abi_arg_in phoneNumber) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MakePhoneCall(phoneLine, *reinterpret_cast(&phoneNumber)); return S_OK; } @@ -177,10 +192,11 @@ struct produce : } } - HRESULT __stdcall abi_MakePhoneCallOnAudioEndpoint(GUID phoneLine, abi_arg_in phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) noexcept override + HRESULT __stdcall abi_MakePhoneCallOnAudioEndpoint(GUID phoneLine, impl::abi_arg_in phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MakePhoneCall(phoneLine, *reinterpret_cast(&phoneNumber), endPoint); return S_OK; } @@ -190,10 +206,11 @@ struct produce : } } - HRESULT __stdcall abi_MakePhoneCallWithVideo(GUID phoneLine, abi_arg_in phoneNumber) noexcept override + HRESULT __stdcall abi_MakePhoneCallWithVideo(GUID phoneLine, impl::abi_arg_in phoneNumber) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MakePhoneCallWithVideo(phoneLine, *reinterpret_cast(&phoneNumber)); return S_OK; } @@ -203,10 +220,11 @@ struct produce : } } - HRESULT __stdcall abi_MakePhoneCallWithVideoOnAudioEndpoint(GUID phoneLine, abi_arg_in phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) noexcept override + HRESULT __stdcall abi_MakePhoneCallWithVideoOnAudioEndpoint(GUID phoneLine, impl::abi_arg_in phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MakePhoneCallWithVideo(phoneLine, *reinterpret_cast(&phoneNumber), endPoint); return S_OK; } @@ -220,6 +238,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SwapPhoneCalls(phoneCallIdToHold, phoneCallIdOnHold); return S_OK; } @@ -233,6 +252,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().HoldPhoneCall(phoneCallId, holdCall); return S_OK; } @@ -246,6 +266,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().EndPhoneCall(phoneCallId); return S_OK; } @@ -259,6 +280,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().PhoneMute(value); return S_OK; } @@ -272,7 +294,8 @@ struct produce : { try { - *value = detach(this->shim().PhoneMute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneMute()); return S_OK; } catch (...) @@ -285,6 +308,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().PhoneCallAudioEndpoint(value); return S_OK; } @@ -298,7 +322,8 @@ struct produce : { try { - *value = detach(this->shim().PhoneCallAudioEndpoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneCallAudioEndpoint()); return S_OK; } catch (...) @@ -311,6 +336,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeAlarm(alarmId); return S_OK; } @@ -320,10 +346,11 @@ struct produce : } } - HRESULT __stdcall abi_SnoozeAlarmForSpecifiedTime(GUID alarmId, abi_arg_in timeSpan) noexcept override + HRESULT __stdcall abi_SnoozeAlarmForSpecifiedTime(GUID alarmId, impl::abi_arg_in timeSpan) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeAlarm(alarmId, *reinterpret_cast(&timeSpan)); return S_OK; } @@ -337,6 +364,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().DismissAlarm(alarmId); return S_OK; } @@ -350,6 +378,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeReminder(reminderId); return S_OK; } @@ -359,10 +388,11 @@ struct produce : } } - HRESULT __stdcall abi_SnoozeReminderForSpecifiedTime(GUID reminderId, abi_arg_in timeSpan) noexcept override + HRESULT __stdcall abi_SnoozeReminderForSpecifiedTime(GUID reminderId, impl::abi_arg_in timeSpan) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeReminder(reminderId, *reinterpret_cast(&timeSpan)); return S_OK; } @@ -376,6 +406,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().DismissReminder(reminderId); return S_OK; } @@ -385,11 +416,12 @@ struct produce : } } - HRESULT __stdcall abi_GetMediaMetadata(abi_arg_out ppMetadata) noexcept override + HRESULT __stdcall abi_GetMediaMetadata(impl::abi_arg_out ppMetadata) noexcept override { try { - *ppMetadata = detach(this->shim().GetMediaMetadata()); + typename D::abi_guard guard(this->shim()); + *ppMetadata = detach_abi(this->shim().GetMediaMetadata()); return S_OK; } catch (...) @@ -403,7 +435,8 @@ struct produce : { try { - *value = detach(this->shim().MediaPlaybackCapabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlaybackCapabilities()); return S_OK; } catch (...) @@ -416,7 +449,8 @@ struct produce : { try { - *value = detach(this->shim().MediaPlaybackStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlaybackStatus()); return S_OK; } catch (...) @@ -429,6 +463,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().PerformMediaPlaybackCommand(command); return S_OK; } @@ -442,7 +477,8 @@ struct produce : { try { - *value = detach(this->shim().DoNotDisturbEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DoNotDisturbEnabled()); return S_OK; } catch (...) @@ -455,7 +491,8 @@ struct produce : { try { - *value = detach(this->shim().DrivingModeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DrivingModeEnabled()); return S_OK; } catch (...) @@ -468,7 +505,8 @@ struct produce : { try { - *value = detach(this->shim().BatterySaverState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BatterySaverState()); return S_OK; } catch (...) @@ -477,11 +515,12 @@ struct produce : } } - HRESULT __stdcall abi_GetApps(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_GetApps(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetApps()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetApps()); return S_OK; } catch (...) @@ -491,10 +530,11 @@ struct produce : } } - HRESULT __stdcall abi_EnableNotificationsForApplication(abi_arg_in appId) noexcept override + HRESULT __stdcall abi_EnableNotificationsForApplication(impl::abi_arg_in appId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableNotificationsForApplication(*reinterpret_cast(&appId)); return S_OK; } @@ -504,10 +544,11 @@ struct produce : } } - HRESULT __stdcall abi_DisableNotificationsForApplication(abi_arg_in appId) noexcept override + HRESULT __stdcall abi_DisableNotificationsForApplication(impl::abi_arg_in appId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableNotificationsForApplication(*reinterpret_cast(&appId)); return S_OK; } @@ -517,11 +558,12 @@ struct produce : } } - HRESULT __stdcall abi_IsNotificationEnabledForApplication(abi_arg_in appId, bool * enabled) noexcept override + HRESULT __stdcall abi_IsNotificationEnabledForApplication(impl::abi_arg_in appId, bool * enabled) noexcept override { try { - *enabled = detach(this->shim().IsNotificationEnabledForApplication(*reinterpret_cast(&appId))); + typename D::abi_guard guard(this->shim()); + *enabled = detach_abi(this->shim().IsNotificationEnabledForApplication(*reinterpret_cast(&appId))); return S_OK; } catch (...) @@ -534,7 +576,8 @@ struct produce : { try { - *enabledAccessoryNotificationTypes = detach(this->shim().GetEnabledAccessoryNotificationTypes()); + typename D::abi_guard guard(this->shim()); + *enabledAccessoryNotificationTypes = detach_abi(this->shim().GetEnabledAccessoryNotificationTypes()); return S_OK; } catch (...) @@ -547,6 +590,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableAccessoryNotificationTypes(accessoryNotificationTypes); return S_OK; } @@ -560,6 +604,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableAllAccessoryNotificationTypes(); return S_OK; } @@ -573,7 +618,8 @@ struct produce : { try { - *enabled = detach(this->shim().GetUserConsent()); + typename D::abi_guard guard(this->shim()); + *enabled = detach_abi(this->shim().GetUserConsent()); return S_OK; } catch (...) @@ -582,11 +628,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAppIcon(abi_arg_in appId, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAppIcon(impl::abi_arg_in appId, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAppIcon(*reinterpret_cast(&appId))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAppIcon(*reinterpret_cast(&appId))); return S_OK; } catch (...) @@ -604,6 +651,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RingDevice(); return S_OK; } @@ -613,11 +661,12 @@ struct produce } } - HRESULT __stdcall get_SpeedDialList(abi_arg_out> ppvalue) noexcept override + HRESULT __stdcall get_SpeedDialList(impl::abi_arg_out> ppvalue) noexcept override { try { - *ppvalue = detach(this->shim().SpeedDialList()); + typename D::abi_guard guard(this->shim()); + *ppvalue = detach_abi(this->shim().SpeedDialList()); return S_OK; } catch (...) @@ -627,10 +676,11 @@ struct produce } } - HRESULT __stdcall abi_ClearToast(abi_arg_in instanceId) noexcept override + HRESULT __stdcall abi_ClearToast(impl::abi_arg_in instanceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearToast(*reinterpret_cast(&instanceId)); return S_OK; } @@ -644,7 +694,8 @@ struct produce { try { - *pinLocked = detach(this->shim().IsPhonePinLocked()); + typename D::abi_guard guard(this->shim()); + *pinLocked = detach_abi(this->shim().IsPhonePinLocked()); return S_OK; } catch (...) @@ -657,6 +708,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IncreaseVolume(step); return S_OK; } @@ -670,6 +722,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DecreaseVolume(step); return S_OK; } @@ -683,6 +736,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMute(mute); return S_OK; } @@ -696,6 +750,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRingerVibrate(ringer, vibrate); return S_OK; } @@ -705,11 +760,12 @@ struct produce } } - HRESULT __stdcall get_VolumeInfo(abi_arg_out ppVolume) noexcept override + HRESULT __stdcall get_VolumeInfo(impl::abi_arg_out ppVolume) noexcept override { try { - *ppVolume = detach(this->shim().VolumeInfo()); + typename D::abi_guard guard(this->shim()); + *ppVolume = detach_abi(this->shim().VolumeInfo()); return S_OK; } catch (...) @@ -719,11 +775,12 @@ struct produce } } - HRESULT __stdcall abi_GetAllEmailAccounts(abi_arg_out> emailAccounts) noexcept override + HRESULT __stdcall abi_GetAllEmailAccounts(impl::abi_arg_out> emailAccounts) noexcept override { try { - *emailAccounts = detach(this->shim().GetAllEmailAccounts()); + typename D::abi_guard guard(this->shim()); + *emailAccounts = detach_abi(this->shim().GetAllEmailAccounts()); return S_OK; } catch (...) @@ -733,11 +790,12 @@ struct produce } } - HRESULT __stdcall abi_GetFolders(abi_arg_in emailAccount, abi_arg_out> folders) noexcept override + HRESULT __stdcall abi_GetFolders(impl::abi_arg_in emailAccount, impl::abi_arg_out> folders) noexcept override { try { - *folders = detach(this->shim().GetFolders(*reinterpret_cast(&emailAccount))); + typename D::abi_guard guard(this->shim()); + *folders = detach_abi(this->shim().GetFolders(*reinterpret_cast(&emailAccount))); return S_OK; } catch (...) @@ -747,10 +805,11 @@ struct produce } } - HRESULT __stdcall abi_EnableEmailNotificationEmailAccount(abi_arg_in emailAccount) noexcept override + HRESULT __stdcall abi_EnableEmailNotificationEmailAccount(impl::abi_arg_in emailAccount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableEmailNotificationEmailAccount(*reinterpret_cast(&emailAccount)); return S_OK; } @@ -760,10 +819,11 @@ struct produce } } - HRESULT __stdcall abi_DisableEmailNotificationEmailAccount(abi_arg_in emailAccount) noexcept override + HRESULT __stdcall abi_DisableEmailNotificationEmailAccount(impl::abi_arg_in emailAccount) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableEmailNotificationEmailAccount(*reinterpret_cast(&emailAccount)); return S_OK; } @@ -773,10 +833,11 @@ struct produce } } - HRESULT __stdcall abi_EnableEmailNotificationFolderFilter(abi_arg_in emailAccount, abi_arg_in> folders) noexcept override + HRESULT __stdcall abi_EnableEmailNotificationFolderFilter(impl::abi_arg_in emailAccount, impl::abi_arg_in> folders) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnableEmailNotificationFolderFilter(*reinterpret_cast(&emailAccount), *reinterpret_cast *>(&folders)); return S_OK; } @@ -786,10 +847,11 @@ struct produce } } - HRESULT __stdcall abi_UpdateEmailReadStatus(abi_arg_in messageEntryId, bool isRead) noexcept override + HRESULT __stdcall abi_UpdateEmailReadStatus(impl::abi_arg_in messageEntryId, bool isRead) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateEmailReadStatus(*reinterpret_cast(&messageEntryId), isRead); return S_OK; } @@ -803,10 +865,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_SnoozeAlarmByInstanceId(abi_arg_in instanceId) noexcept override + HRESULT __stdcall abi_SnoozeAlarmByInstanceId(impl::abi_arg_in instanceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeAlarmByInstanceId(*reinterpret_cast(&instanceId)); return S_OK; } @@ -816,10 +879,11 @@ struct produce } } - HRESULT __stdcall abi_DismissAlarmByInstanceId(abi_arg_in instanceId) noexcept override + HRESULT __stdcall abi_DismissAlarmByInstanceId(impl::abi_arg_in instanceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DismissAlarmByInstanceId(*reinterpret_cast(&instanceId)); return S_OK; } @@ -829,10 +893,11 @@ struct produce } } - HRESULT __stdcall abi_SnoozeReminderByInstanceId(abi_arg_in instanceId) noexcept override + HRESULT __stdcall abi_SnoozeReminderByInstanceId(impl::abi_arg_in instanceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SnoozeReminderByInstanceId(*reinterpret_cast(&instanceId)); return S_OK; } @@ -842,10 +907,11 @@ struct produce } } - HRESULT __stdcall abi_DismissReminderByInstanceId(abi_arg_in instanceId) noexcept override + HRESULT __stdcall abi_DismissReminderByInstanceId(impl::abi_arg_in instanceId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DismissReminderByInstanceId(*reinterpret_cast(&instanceId)); return S_OK; } @@ -859,11 +925,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_TimeCreated(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimeCreated(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeCreated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeCreated()); return S_OK; } catch (...) @@ -872,11 +939,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppDisplayName()); return S_OK; } catch (...) @@ -886,11 +954,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AppId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppId()); return S_OK; } catch (...) @@ -904,7 +973,8 @@ struct produceshim().AccessoryNotificationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessoryNotificationType()); return S_OK; } catch (...) @@ -917,7 +987,8 @@ struct produceshim().StartedProcessing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartedProcessing()); return S_OK; } catch (...) @@ -930,6 +1001,7 @@ struct produceshim()); this->shim().StartedProcessing(value); return S_OK; } @@ -947,7 +1019,8 @@ struct produceshim().AlarmId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlarmId()); return S_OK; } catch (...) @@ -956,11 +1029,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -970,11 +1044,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -987,7 +1062,8 @@ struct produceshim().ReminderState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReminderState()); return S_OK; } catch (...) @@ -1000,11 +1076,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InstanceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_InstanceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -1018,11 +1095,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1032,11 +1110,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1054,7 +1133,8 @@ struct produce : produce { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1067,7 +1147,8 @@ struct produce : produce { try { - *value = detach(this->shim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -1084,7 +1165,8 @@ struct produceshim().EventType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EventType()); return S_OK; } catch (...) @@ -1093,11 +1175,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemId()); return S_OK; } catch (...) @@ -1111,11 +1194,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TileId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TileId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileId()); return S_OK; } catch (...) @@ -1125,11 +1209,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -1139,11 +1224,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LargeContent1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LargeContent1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeContent1()); return S_OK; } catch (...) @@ -1153,11 +1239,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LargeContent2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LargeContent2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeContent2()); return S_OK; } catch (...) @@ -1167,11 +1254,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmphasizedText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmphasizedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmphasizedText()); return S_OK; } catch (...) @@ -1181,11 +1269,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NonWrappedSmallContent1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NonWrappedSmallContent1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonWrappedSmallContent1()); return S_OK; } catch (...) @@ -1195,11 +1284,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NonWrappedSmallContent2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NonWrappedSmallContent2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonWrappedSmallContent2()); return S_OK; } catch (...) @@ -1209,11 +1299,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NonWrappedSmallContent3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NonWrappedSmallContent3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonWrappedSmallContent3()); return S_OK; } catch (...) @@ -1223,11 +1314,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NonWrappedSmallContent4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NonWrappedSmallContent4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonWrappedSmallContent4()); return S_OK; } catch (...) @@ -1237,11 +1329,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1255,11 +1348,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1273,7 +1367,8 @@ struct produce : { try { - *value = detach(this->shim().IsNotificationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNotificationEnabled()); return S_OK; } catch (...) @@ -1286,11 +1381,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1304,7 +1400,8 @@ struct produce : { try { - *value = detach(this->shim().IsNotificationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNotificationEnabled()); return S_OK; } catch (...) @@ -1317,11 +1414,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_AccountName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccountName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountName()); return S_OK; } catch (...) @@ -1331,11 +1429,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ParentFolderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentFolderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentFolderName()); return S_OK; } catch (...) @@ -1345,11 +1444,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SenderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SenderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SenderName()); return S_OK; } catch (...) @@ -1359,11 +1459,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SenderAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SenderAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SenderAddress()); return S_OK; } catch (...) @@ -1373,11 +1474,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EmailMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EmailMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailMessage()); return S_OK; } catch (...) @@ -1387,11 +1489,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1404,11 +1507,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MessageEntryId(abi_arg_out value) noexcept override + HRESULT __stdcall get_MessageEntryId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageEntryId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageEntryId()); return S_OK; } catch (...) @@ -1422,11 +1526,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AccountName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccountName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountName()); return S_OK; } catch (...) @@ -1436,11 +1541,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ParentFolderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParentFolderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParentFolderName()); return S_OK; } catch (...) @@ -1450,11 +1556,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MessageEntryId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MessageEntryId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageEntryId()); return S_OK; } catch (...) @@ -1468,7 +1575,8 @@ struct produceshim().IsRead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRead()); return S_OK; } catch (...) @@ -1485,7 +1593,8 @@ struct produceshim().PlaybackStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackStatus()); return S_OK; } catch (...) @@ -1494,11 +1603,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MediaMetadata(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaMetadata()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaMetadata()); return S_OK; } catch (...) @@ -1512,11 +1622,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1526,11 +1637,12 @@ struct produce : pr } } - HRESULT __stdcall get_Subtitle(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -1540,11 +1652,12 @@ struct produce : pr } } - HRESULT __stdcall get_Artist(abi_arg_out value) noexcept override + HRESULT __stdcall get_Artist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Artist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Artist()); return S_OK; } catch (...) @@ -1554,11 +1667,12 @@ struct produce : pr } } - HRESULT __stdcall get_Album(abi_arg_out value) noexcept override + HRESULT __stdcall get_Album(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Album()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Album()); return S_OK; } catch (...) @@ -1572,7 +1686,8 @@ struct produce : pr { try { - *value = detach(this->shim().Track()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Track()); return S_OK; } catch (...) @@ -1581,11 +1696,12 @@ struct produce : pr } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -1594,11 +1710,12 @@ struct produce : pr } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -1616,7 +1733,8 @@ struct produce : { try { - *value = detach(this->shim().PhoneLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneLine()); return S_OK; } catch (...) @@ -1629,7 +1747,8 @@ struct produce : { try { - *value = detach(this->shim().CallId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallId()); return S_OK; } catch (...) @@ -1642,7 +1761,8 @@ struct produce : { try { - *value = detach(this->shim().CallTransport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallTransport()); return S_OK; } catch (...) @@ -1655,7 +1775,8 @@ struct produce : { try { - *value = detach(this->shim().CallMediaType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallMediaType()); return S_OK; } catch (...) @@ -1668,7 +1789,8 @@ struct produce : { try { - *value = detach(this->shim().CallDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallDirection()); return S_OK; } catch (...) @@ -1681,7 +1803,8 @@ struct produce : { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -1694,7 +1817,8 @@ struct produce : { try { - *value = detach(this->shim().ConferenceCallId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConferenceCallId()); return S_OK; } catch (...) @@ -1703,11 +1827,12 @@ struct produce : } } - HRESULT __stdcall get_StartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartTime()); return S_OK; } catch (...) @@ -1716,11 +1841,12 @@ struct produce : } } - HRESULT __stdcall get_EndTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndTime()); return S_OK; } catch (...) @@ -1729,11 +1855,12 @@ struct produce : } } - HRESULT __stdcall get_PhoneNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -1743,11 +1870,12 @@ struct produce : } } - HRESULT __stdcall get_ContactName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactName()); return S_OK; } catch (...) @@ -1757,11 +1885,12 @@ struct produce : } } - HRESULT __stdcall get_PresetTextResponses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PresetTextResponses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PresetTextResponses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PresetTextResponses()); return S_OK; } catch (...) @@ -1779,7 +1908,8 @@ struct produce : { try { - *value = detach(this->shim().LineId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineId()); return S_OK; } catch (...) @@ -1788,11 +1918,12 @@ struct produce : } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -1802,11 +1933,12 @@ struct produce : } } - HRESULT __stdcall get_LineNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineNumber()); return S_OK; } catch (...) @@ -1820,7 +1952,8 @@ struct produce : { try { - *value = detach(this->shim().DefaultOutgoingLine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultOutgoingLine()); return S_OK; } catch (...) @@ -1833,7 +1966,8 @@ struct produce : { try { - *value = detach(this->shim().VoicemailCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VoicemailCount()); return S_OK; } catch (...) @@ -1846,7 +1980,8 @@ struct produce : { try { - *value = detach(this->shim().RegistrationState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegistrationState()); return S_OK; } catch (...) @@ -1863,7 +1998,8 @@ struct produce { try { - *value = detach(this->shim().MissedCallCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MissedCallCount()); return S_OK; } catch (...) @@ -1880,7 +2016,8 @@ struct produceshim().PhoneNotificationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNotificationType()); return S_OK; } catch (...) @@ -1889,11 +2026,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CallDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallDetails()); return S_OK; } catch (...) @@ -1907,7 +2045,8 @@ struct produceshim().PhoneLineChangedId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneLineChangedId()); return S_OK; } catch (...) @@ -1924,7 +2063,8 @@ struct produceshim().ReminderId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReminderId()); return S_OK; } catch (...) @@ -1933,11 +2073,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1947,11 +2088,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1961,11 +2103,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Details(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Details()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Details()); return S_OK; } catch (...) @@ -1975,11 +2118,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1988,11 +2132,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Appointment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Appointment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Appointment()); return S_OK; } catch (...) @@ -2006,7 +2151,8 @@ struct produceshim().ReminderState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReminderState()); return S_OK; } catch (...) @@ -2019,11 +2165,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InstanceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_InstanceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -2037,11 +2184,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PhoneNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -2051,11 +2199,12 @@ struct produce : p } } - HRESULT __stdcall get_NumberType(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumberType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumberType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberType()); return S_OK; } catch (...) @@ -2065,11 +2214,12 @@ struct produce : p } } - HRESULT __stdcall get_ContactName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContactName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactName()); return S_OK; } catch (...) @@ -2087,7 +2237,8 @@ struct produce : pro { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2096,11 +2247,12 @@ struct produce : pro } } - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -2114,11 +2266,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Text1(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text1()); return S_OK; } catch (...) @@ -2128,11 +2281,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Text2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text2()); return S_OK; } catch (...) @@ -2142,11 +2296,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Text3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text3()); return S_OK; } catch (...) @@ -2156,11 +2311,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Text4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text4()); return S_OK; } catch (...) @@ -2174,7 +2330,8 @@ struct produceshim().SuppressPopup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuppressPopup()); return S_OK; } catch (...) @@ -2187,11 +2344,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InstanceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_InstanceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstanceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstanceId()); return S_OK; } catch (...) @@ -2209,7 +2367,8 @@ struct produce : produ { try { - *value = detach(this->shim().SystemVolume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemVolume()); return S_OK; } catch (...) @@ -2222,7 +2381,8 @@ struct produce : produ { try { - *value = detach(this->shim().CallVolume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallVolume()); return S_OK; } catch (...) @@ -2235,7 +2395,8 @@ struct produce : produ { try { - *value = detach(this->shim().MediaVolume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaVolume()); return S_OK; } catch (...) @@ -2248,7 +2409,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsMuted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMuted()); return S_OK; } catch (...) @@ -2261,7 +2423,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsVibrateEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVibrateEnabled()); return S_OK; } catch (...) @@ -2278,1037 +2441,1037 @@ namespace Windows::Phone::Notification::Management { template uint32_t impl_ITextResponse::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ITextResponse)->get_Id(&value)); return value; } template hstring impl_ITextResponse::Content() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ITextResponse)->get_Content(put_abi(value))); return value; } template hstring impl_IAppNotificationInfo::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IAppNotificationInfo)->get_Id(put_abi(value))); return value; } template hstring impl_IAppNotificationInfo::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IAppNotificationInfo)->get_Name(put_abi(value))); return value; } template hstring impl_IEmailAccountInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IEmailAccountInfo)->get_DisplayName(put_abi(value))); return value; } template bool impl_IEmailAccountInfo::IsNotificationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNotificationEnabled(&value)); + check_hresult(WINRT_SHIM(IEmailAccountInfo)->get_IsNotificationEnabled(&value)); return value; } template hstring impl_IEmailFolderInfo::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IEmailFolderInfo)->get_DisplayName(put_abi(value))); return value; } template bool impl_IEmailFolderInfo::IsNotificationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNotificationEnabled(&value)); + check_hresult(WINRT_SHIM(IEmailFolderInfo)->get_IsNotificationEnabled(&value)); return value; } template uint8_t impl_IBinaryId::Id() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IBinaryId)->get_Id(&value)); return value; } template uint32_t impl_IBinaryId::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IBinaryId)->get_Length(&value)); return value; } template Windows::Foundation::DateTime impl_IAccessoryNotificationTriggerDetails::TimeCreated() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeCreated(put(value))); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->get_TimeCreated(put_abi(value))); return value; } template hstring impl_IAccessoryNotificationTriggerDetails::AppDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppDisplayName(put(value))); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->get_AppDisplayName(put_abi(value))); return value; } template hstring impl_IAccessoryNotificationTriggerDetails::AppId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AppId(put(value))); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->get_AppId(put_abi(value))); return value; } template Windows::Phone::Notification::Management::AccessoryNotificationType impl_IAccessoryNotificationTriggerDetails::AccessoryNotificationType() const { Windows::Phone::Notification::Management::AccessoryNotificationType value {}; - check_hresult(static_cast(static_cast(*this))->get_AccessoryNotificationType(&value)); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->get_AccessoryNotificationType(&value)); return value; } template bool impl_IAccessoryNotificationTriggerDetails::StartedProcessing() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StartedProcessing(&value)); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->get_StartedProcessing(&value)); return value; } template void impl_IAccessoryNotificationTriggerDetails::StartedProcessing(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_StartedProcessing(value)); + check_hresult(WINRT_SHIM(IAccessoryNotificationTriggerDetails)->put_StartedProcessing(value)); } template GUID impl_IAlarmNotificationTriggerDetails::AlarmId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_AlarmId(&value)); + check_hresult(WINRT_SHIM(IAlarmNotificationTriggerDetails)->get_AlarmId(&value)); return value; } template hstring impl_IAlarmNotificationTriggerDetails::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IAlarmNotificationTriggerDetails)->get_Title(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IAlarmNotificationTriggerDetails::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IAlarmNotificationTriggerDetails)->get_Timestamp(put_abi(value))); return value; } template Windows::Phone::Notification::Management::ReminderState impl_IAlarmNotificationTriggerDetails::ReminderState() const { Windows::Phone::Notification::Management::ReminderState value {}; - check_hresult(static_cast(static_cast(*this))->get_ReminderState(&value)); + check_hresult(WINRT_SHIM(IAlarmNotificationTriggerDetails)->get_ReminderState(&value)); return value; } template hstring impl_IAlarmNotificationTriggerDetails2::InstanceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(put(value))); + check_hresult(WINRT_SHIM(IAlarmNotificationTriggerDetails2)->get_InstanceId(put_abi(value))); return value; } template hstring impl_IEmailNotificationTriggerDetails::AccountName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountName(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_AccountName(put_abi(value))); return value; } template hstring impl_IEmailNotificationTriggerDetails::ParentFolderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ParentFolderName(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_ParentFolderName(put_abi(value))); return value; } template hstring impl_IEmailNotificationTriggerDetails::SenderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SenderName(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_SenderName(put_abi(value))); return value; } template hstring impl_IEmailNotificationTriggerDetails::SenderAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SenderAddress(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_SenderAddress(put_abi(value))); return value; } template Windows::ApplicationModel::Email::EmailMessage impl_IEmailNotificationTriggerDetails::EmailMessage() const { Windows::ApplicationModel::Email::EmailMessage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EmailMessage(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_EmailMessage(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IEmailNotificationTriggerDetails::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails)->get_Timestamp(put_abi(value))); return value; } template Windows::Phone::Notification::Management::BinaryId impl_IEmailNotificationTriggerDetails2::MessageEntryId() const { Windows::Phone::Notification::Management::BinaryId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MessageEntryId(put(value))); + check_hresult(WINRT_SHIM(IEmailNotificationTriggerDetails2)->get_MessageEntryId(put_abi(value))); return value; } template hstring impl_IEmailReadNotificationTriggerDetails::AccountName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountName(put(value))); + check_hresult(WINRT_SHIM(IEmailReadNotificationTriggerDetails)->get_AccountName(put_abi(value))); return value; } template hstring impl_IEmailReadNotificationTriggerDetails::ParentFolderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ParentFolderName(put(value))); + check_hresult(WINRT_SHIM(IEmailReadNotificationTriggerDetails)->get_ParentFolderName(put_abi(value))); return value; } template Windows::Phone::Notification::Management::BinaryId impl_IEmailReadNotificationTriggerDetails::MessageEntryId() const { Windows::Phone::Notification::Management::BinaryId value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MessageEntryId(put(value))); + check_hresult(WINRT_SHIM(IEmailReadNotificationTriggerDetails)->get_MessageEntryId(put_abi(value))); return value; } template bool impl_IEmailReadNotificationTriggerDetails::IsRead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRead(&value)); + check_hresult(WINRT_SHIM(IEmailReadNotificationTriggerDetails)->get_IsRead(&value)); return value; } template GUID impl_IPhoneLineDetails::LineId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_LineId(&value)); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_LineId(&value)); return value; } template hstring impl_IPhoneLineDetails::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IPhoneLineDetails::LineNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LineNumber(put(value))); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_LineNumber(put_abi(value))); return value; } template bool impl_IPhoneLineDetails::DefaultOutgoingLine() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultOutgoingLine(&value)); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_DefaultOutgoingLine(&value)); return value; } template uint32_t impl_IPhoneLineDetails::VoicemailCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VoicemailCount(&value)); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_VoicemailCount(&value)); return value; } template Windows::Phone::Notification::Management::PhoneLineRegistrationState impl_IPhoneLineDetails::RegistrationState() const { Windows::Phone::Notification::Management::PhoneLineRegistrationState value {}; - check_hresult(static_cast(static_cast(*this))->get_RegistrationState(&value)); + check_hresult(WINRT_SHIM(IPhoneLineDetails)->get_RegistrationState(&value)); return value; } template uint32_t impl_IPhoneLineDetails2::MissedCallCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MissedCallCount(&value)); + check_hresult(WINRT_SHIM(IPhoneLineDetails2)->get_MissedCallCount(&value)); return value; } template GUID impl_IPhoneCallDetails::PhoneLine() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneLine(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_PhoneLine(&value)); return value; } template uint32_t impl_IPhoneCallDetails::CallId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CallId(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_CallId(&value)); return value; } template Windows::Phone::Notification::Management::PhoneCallTransport impl_IPhoneCallDetails::CallTransport() const { Windows::Phone::Notification::Management::PhoneCallTransport value {}; - check_hresult(static_cast(static_cast(*this))->get_CallTransport(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_CallTransport(&value)); return value; } template Windows::Phone::Notification::Management::PhoneMediaType impl_IPhoneCallDetails::CallMediaType() const { Windows::Phone::Notification::Management::PhoneMediaType value {}; - check_hresult(static_cast(static_cast(*this))->get_CallMediaType(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_CallMediaType(&value)); return value; } template Windows::Phone::Notification::Management::PhoneCallDirection impl_IPhoneCallDetails::CallDirection() const { Windows::Phone::Notification::Management::PhoneCallDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_CallDirection(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_CallDirection(&value)); return value; } template Windows::Phone::Notification::Management::PhoneCallState impl_IPhoneCallDetails::State() const { Windows::Phone::Notification::Management::PhoneCallState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_State(&value)); return value; } template uint32_t impl_IPhoneCallDetails::ConferenceCallId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ConferenceCallId(&value)); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_ConferenceCallId(&value)); return value; } template Windows::Foundation::DateTime impl_IPhoneCallDetails::StartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartTime(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_StartTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPhoneCallDetails::EndTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_EndTime(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_EndTime(put_abi(value))); return value; } template hstring impl_IPhoneCallDetails::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_PhoneNumber(put_abi(value))); return value; } template hstring impl_IPhoneCallDetails::ContactName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactName(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_ContactName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IPhoneCallDetails::PresetTextResponses() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PresetTextResponses(put(value))); + check_hresult(WINRT_SHIM(IPhoneCallDetails)->get_PresetTextResponses(put_abi(value))); return value; } template Windows::Phone::Notification::Management::PhoneNotificationType impl_IPhoneNotificationTriggerDetails::PhoneNotificationType() const { Windows::Phone::Notification::Management::PhoneNotificationType value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneNotificationType(&value)); + check_hresult(WINRT_SHIM(IPhoneNotificationTriggerDetails)->get_PhoneNotificationType(&value)); return value; } template Windows::Phone::Notification::Management::PhoneCallDetails impl_IPhoneNotificationTriggerDetails::CallDetails() const { Windows::Phone::Notification::Management::PhoneCallDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CallDetails(put(value))); + check_hresult(WINRT_SHIM(IPhoneNotificationTriggerDetails)->get_CallDetails(put_abi(value))); return value; } template GUID impl_IPhoneNotificationTriggerDetails::PhoneLineChangedId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneLineChangedId(&value)); + check_hresult(WINRT_SHIM(IPhoneNotificationTriggerDetails)->get_PhoneLineChangedId(&value)); return value; } template hstring impl_ISpeedDialEntry::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(ISpeedDialEntry)->get_PhoneNumber(put_abi(value))); return value; } template hstring impl_ISpeedDialEntry::NumberType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumberType(put(value))); + check_hresult(WINRT_SHIM(ISpeedDialEntry)->get_NumberType(put_abi(value))); return value; } template hstring impl_ISpeedDialEntry::ContactName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContactName(put(value))); + check_hresult(WINRT_SHIM(ISpeedDialEntry)->get_ContactName(put_abi(value))); return value; } template GUID impl_IReminderNotificationTriggerDetails::ReminderId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ReminderId(&value)); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_ReminderId(&value)); return value; } template hstring impl_IReminderNotificationTriggerDetails::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_Title(put_abi(value))); return value; } template hstring impl_IReminderNotificationTriggerDetails::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_Description(put_abi(value))); return value; } template hstring impl_IReminderNotificationTriggerDetails::Details() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Details(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_Details(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IReminderNotificationTriggerDetails::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_Timestamp(put_abi(value))); return value; } template Windows::ApplicationModel::Appointments::Appointment impl_IReminderNotificationTriggerDetails::Appointment() const { Windows::ApplicationModel::Appointments::Appointment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Appointment(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_Appointment(put_abi(value))); return value; } template Windows::Phone::Notification::Management::ReminderState impl_IReminderNotificationTriggerDetails::ReminderState() const { Windows::Phone::Notification::Management::ReminderState value {}; - check_hresult(static_cast(static_cast(*this))->get_ReminderState(&value)); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails)->get_ReminderState(&value)); return value; } template hstring impl_IReminderNotificationTriggerDetails2::InstanceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(put(value))); + check_hresult(WINRT_SHIM(IReminderNotificationTriggerDetails2)->get_InstanceId(put_abi(value))); return value; } template Windows::Phone::Notification::Management::CalendarChangedEvent impl_ICalendarChangedNotificationTriggerDetails::EventType() const { Windows::Phone::Notification::Management::CalendarChangedEvent value {}; - check_hresult(static_cast(static_cast(*this))->get_EventType(&value)); + check_hresult(WINRT_SHIM(ICalendarChangedNotificationTriggerDetails)->get_EventType(&value)); return value; } template hstring impl_ICalendarChangedNotificationTriggerDetails::ItemId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ItemId(put(value))); + check_hresult(WINRT_SHIM(ICalendarChangedNotificationTriggerDetails)->get_ItemId(put_abi(value))); return value; } template hstring impl_IToastNotificationTriggerDetails::Text1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text1(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails)->get_Text1(put_abi(value))); return value; } template hstring impl_IToastNotificationTriggerDetails::Text2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text2(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails)->get_Text2(put_abi(value))); return value; } template hstring impl_IToastNotificationTriggerDetails::Text3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text3(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails)->get_Text3(put_abi(value))); return value; } template hstring impl_IToastNotificationTriggerDetails::Text4() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text4(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails)->get_Text4(put_abi(value))); return value; } template bool impl_IToastNotificationTriggerDetails::SuppressPopup() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SuppressPopup(&value)); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails)->get_SuppressPopup(&value)); return value; } template hstring impl_IToastNotificationTriggerDetails2::InstanceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstanceId(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationTriggerDetails2)->get_InstanceId(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::TileId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TileId(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_TileId(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::Content() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_Content(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::LargeContent1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LargeContent1(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_LargeContent1(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::LargeContent2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LargeContent2(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_LargeContent2(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::EmphasizedText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EmphasizedText(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_EmphasizedText(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::NonWrappedSmallContent1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NonWrappedSmallContent1(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_NonWrappedSmallContent1(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::NonWrappedSmallContent2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NonWrappedSmallContent2(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_NonWrappedSmallContent2(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::NonWrappedSmallContent3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NonWrappedSmallContent3(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_NonWrappedSmallContent3(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::NonWrappedSmallContent4() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NonWrappedSmallContent4(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_NonWrappedSmallContent4(put_abi(value))); return value; } template hstring impl_ICortanaTileNotificationTriggerDetails::Source() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ICortanaTileNotificationTriggerDetails)->get_Source(put_abi(value))); return value; } template hstring impl_IMediaMetadata::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Title(put_abi(value))); return value; } template hstring impl_IMediaMetadata::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Subtitle(put_abi(value))); return value; } template hstring impl_IMediaMetadata::Artist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Artist(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Artist(put_abi(value))); return value; } template hstring impl_IMediaMetadata::Album() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Album(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Album(put_abi(value))); return value; } template uint32_t impl_IMediaMetadata::Track() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Track(&value)); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Track(&value)); return value; } template Windows::Foundation::TimeSpan impl_IMediaMetadata::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Duration(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IMediaMetadata::Thumbnail() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IMediaMetadata)->get_Thumbnail(put_abi(value))); return value; } template Windows::Phone::Notification::Management::PlaybackStatus impl_IMediaControlsTriggerDetails::PlaybackStatus() const { Windows::Phone::Notification::Management::PlaybackStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackStatus(&value)); + check_hresult(WINRT_SHIM(IMediaControlsTriggerDetails)->get_PlaybackStatus(&value)); return value; } template Windows::Phone::Notification::Management::MediaMetadata impl_IMediaControlsTriggerDetails::MediaMetadata() const { Windows::Phone::Notification::Management::MediaMetadata value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaMetadata(put(value))); + check_hresult(WINRT_SHIM(IMediaControlsTriggerDetails)->get_MediaMetadata(put_abi(value))); return value; } template uint32_t impl_IVolumeInfo::SystemVolume() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemVolume(&value)); + check_hresult(WINRT_SHIM(IVolumeInfo)->get_SystemVolume(&value)); return value; } template uint32_t impl_IVolumeInfo::CallVolume() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CallVolume(&value)); + check_hresult(WINRT_SHIM(IVolumeInfo)->get_CallVolume(&value)); return value; } template uint32_t impl_IVolumeInfo::MediaVolume() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaVolume(&value)); + check_hresult(WINRT_SHIM(IVolumeInfo)->get_MediaVolume(&value)); return value; } template bool impl_IVolumeInfo::IsMuted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMuted(&value)); + check_hresult(WINRT_SHIM(IVolumeInfo)->get_IsMuted(&value)); return value; } template Windows::Phone::Notification::Management::VibrateState impl_IVolumeInfo::IsVibrateEnabled() const { Windows::Phone::Notification::Management::VibrateState value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVibrateEnabled(&value)); + check_hresult(WINRT_SHIM(IVolumeInfo)->get_IsVibrateEnabled(&value)); return value; } template hstring impl_IAccessoryManager::RegisterAccessoryApp() const { hstring triggerId; - check_hresult(static_cast(static_cast(*this))->abi_RegisterAccessoryApp(put(triggerId))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_RegisterAccessoryApp(put_abi(triggerId))); return triggerId; } template Windows::Phone::Notification::Management::IAccessoryNotificationTriggerDetails impl_IAccessoryManager::GetNextTriggerDetails() const { Windows::Phone::Notification::Management::IAccessoryNotificationTriggerDetails pDetails; - check_hresult(static_cast(static_cast(*this))->abi_GetNextTriggerDetails(put(pDetails))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetNextTriggerDetails(put_abi(pDetails))); return pDetails; } template void impl_IAccessoryManager::ProcessTriggerDetails(const Windows::Phone::Notification::Management::IAccessoryNotificationTriggerDetails & pDetails) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessTriggerDetails(get(pDetails))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_ProcessTriggerDetails(get_abi(pDetails))); } template Windows::Foundation::Collections::IVectorView impl_IAccessoryManager::PhoneLineDetails() const { Windows::Foundation::Collections::IVectorView ppvalue; - check_hresult(static_cast(static_cast(*this))->get_PhoneLineDetails(put(ppvalue))); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_PhoneLineDetails(put_abi(ppvalue))); return ppvalue; } template Windows::Phone::Notification::Management::PhoneLineDetails impl_IAccessoryManager::GetPhoneLineDetails(GUID phoneLine) const { Windows::Phone::Notification::Management::PhoneLineDetails ppdetails { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPhoneLineDetails(phoneLine, put(ppdetails))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetPhoneLineDetails(phoneLine, put_abi(ppdetails))); return ppdetails; } template void impl_IAccessoryManager::AcceptPhoneCall(uint32_t phoneCallId) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptPhoneCall(phoneCallId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_AcceptPhoneCall(phoneCallId)); } template void impl_IAccessoryManager::AcceptPhoneCall(uint32_t phoneCallId, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptPhoneCallOnEndpoint(phoneCallId, endPoint)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_AcceptPhoneCallOnEndpoint(phoneCallId, endPoint)); } template void impl_IAccessoryManager::AcceptPhoneCallWithVideo(uint32_t phoneCallId) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptPhoneCallWithVideo(phoneCallId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_AcceptPhoneCallWithVideo(phoneCallId)); } template void impl_IAccessoryManager::AcceptPhoneCallWithVideo(uint32_t phoneCallId, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_AcceptPhoneCallWithVideoOnAudioEndpoint(phoneCallId, endPoint)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_AcceptPhoneCallWithVideoOnAudioEndpoint(phoneCallId, endPoint)); } template void impl_IAccessoryManager::RejectPhoneCall(uint32_t phoneCallId) const { - check_hresult(static_cast(static_cast(*this))->abi_RejectPhoneCall(phoneCallId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_RejectPhoneCall(phoneCallId)); } template void impl_IAccessoryManager::RejectPhoneCall(uint32_t phoneCallId, uint32_t textResponseID) const { - check_hresult(static_cast(static_cast(*this))->abi_RejectPhoneCallWithText(phoneCallId, textResponseID)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_RejectPhoneCallWithText(phoneCallId, textResponseID)); } -template void impl_IAccessoryManager::MakePhoneCall(GUID phoneLine, hstring_ref phoneNumber) const +template void impl_IAccessoryManager::MakePhoneCall(GUID phoneLine, hstring_view phoneNumber) const { - check_hresult(static_cast(static_cast(*this))->abi_MakePhoneCall(phoneLine, get(phoneNumber))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_MakePhoneCall(phoneLine, get_abi(phoneNumber))); } -template void impl_IAccessoryManager::MakePhoneCall(GUID phoneLine, hstring_ref phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const +template void impl_IAccessoryManager::MakePhoneCall(GUID phoneLine, hstring_view phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_MakePhoneCallOnAudioEndpoint(phoneLine, get(phoneNumber), endPoint)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_MakePhoneCallOnAudioEndpoint(phoneLine, get_abi(phoneNumber), endPoint)); } -template void impl_IAccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_ref phoneNumber) const +template void impl_IAccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_view phoneNumber) const { - check_hresult(static_cast(static_cast(*this))->abi_MakePhoneCallWithVideo(phoneLine, get(phoneNumber))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_MakePhoneCallWithVideo(phoneLine, get_abi(phoneNumber))); } -template void impl_IAccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_ref phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const +template void impl_IAccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_view phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_MakePhoneCallWithVideoOnAudioEndpoint(phoneLine, get(phoneNumber), endPoint)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_MakePhoneCallWithVideoOnAudioEndpoint(phoneLine, get_abi(phoneNumber), endPoint)); } template void impl_IAccessoryManager::SwapPhoneCalls(uint32_t phoneCallIdToHold, uint32_t phoneCallIdOnHold) const { - check_hresult(static_cast(static_cast(*this))->abi_SwapPhoneCalls(phoneCallIdToHold, phoneCallIdOnHold)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_SwapPhoneCalls(phoneCallIdToHold, phoneCallIdOnHold)); } template void impl_IAccessoryManager::HoldPhoneCall(uint32_t phoneCallId, bool holdCall) const { - check_hresult(static_cast(static_cast(*this))->abi_HoldPhoneCall(phoneCallId, holdCall)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_HoldPhoneCall(phoneCallId, holdCall)); } template void impl_IAccessoryManager::EndPhoneCall(uint32_t phoneCallId) const { - check_hresult(static_cast(static_cast(*this))->abi_EndPhoneCall(phoneCallId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_EndPhoneCall(phoneCallId)); } template void impl_IAccessoryManager::PhoneMute(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PhoneMute(value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->put_PhoneMute(value)); } template bool impl_IAccessoryManager::PhoneMute() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneMute(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_PhoneMute(&value)); return value; } template void impl_IAccessoryManager::PhoneCallAudioEndpoint(Windows::Phone::Notification::Management::PhoneCallAudioEndpoint value) const { - check_hresult(static_cast(static_cast(*this))->put_PhoneCallAudioEndpoint(value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->put_PhoneCallAudioEndpoint(value)); } template Windows::Phone::Notification::Management::PhoneCallAudioEndpoint impl_IAccessoryManager::PhoneCallAudioEndpoint() const { Windows::Phone::Notification::Management::PhoneCallAudioEndpoint value {}; - check_hresult(static_cast(static_cast(*this))->get_PhoneCallAudioEndpoint(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_PhoneCallAudioEndpoint(&value)); return value; } template void impl_IAccessoryManager::SnoozeAlarm(GUID alarmId) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeAlarm(alarmId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_SnoozeAlarm(alarmId)); } template void impl_IAccessoryManager::SnoozeAlarm(GUID alarmId, const Windows::Foundation::TimeSpan & timeSpan) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeAlarmForSpecifiedTime(alarmId, get(timeSpan))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_SnoozeAlarmForSpecifiedTime(alarmId, get_abi(timeSpan))); } template void impl_IAccessoryManager::DismissAlarm(GUID alarmId) const { - check_hresult(static_cast(static_cast(*this))->abi_DismissAlarm(alarmId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_DismissAlarm(alarmId)); } template void impl_IAccessoryManager::SnoozeReminder(GUID reminderId) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeReminder(reminderId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_SnoozeReminder(reminderId)); } template void impl_IAccessoryManager::SnoozeReminder(GUID reminderId, const Windows::Foundation::TimeSpan & timeSpan) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeReminderForSpecifiedTime(reminderId, get(timeSpan))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_SnoozeReminderForSpecifiedTime(reminderId, get_abi(timeSpan))); } template void impl_IAccessoryManager::DismissReminder(GUID reminderId) const { - check_hresult(static_cast(static_cast(*this))->abi_DismissReminder(reminderId)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_DismissReminder(reminderId)); } template Windows::Phone::Notification::Management::MediaMetadata impl_IAccessoryManager::GetMediaMetadata() const { Windows::Phone::Notification::Management::MediaMetadata ppMetadata { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetMediaMetadata(put(ppMetadata))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetMediaMetadata(put_abi(ppMetadata))); return ppMetadata; } template Windows::Phone::Notification::Management::PlaybackCapability impl_IAccessoryManager::MediaPlaybackCapabilities() const { Windows::Phone::Notification::Management::PlaybackCapability value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaPlaybackCapabilities(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_MediaPlaybackCapabilities(&value)); return value; } template Windows::Phone::Notification::Management::PlaybackStatus impl_IAccessoryManager::MediaPlaybackStatus() const { Windows::Phone::Notification::Management::PlaybackStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_MediaPlaybackStatus(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_MediaPlaybackStatus(&value)); return value; } template void impl_IAccessoryManager::PerformMediaPlaybackCommand(Windows::Phone::Notification::Management::PlaybackCommand command) const { - check_hresult(static_cast(static_cast(*this))->abi_PerformMediaPlaybackCommand(command)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_PerformMediaPlaybackCommand(command)); } template bool impl_IAccessoryManager::DoNotDisturbEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DoNotDisturbEnabled(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_DoNotDisturbEnabled(&value)); return value; } template bool impl_IAccessoryManager::DrivingModeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DrivingModeEnabled(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_DrivingModeEnabled(&value)); return value; } template bool impl_IAccessoryManager::BatterySaverState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BatterySaverState(&value)); + check_hresult(WINRT_SHIM(IAccessoryManager)->get_BatterySaverState(&value)); return value; } template Windows::Foundation::Collections::IMapView impl_IAccessoryManager::GetApps() const { Windows::Foundation::Collections::IMapView returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetApps(put(returnValue))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetApps(put_abi(returnValue))); return returnValue; } -template void impl_IAccessoryManager::EnableNotificationsForApplication(hstring_ref appId) const +template void impl_IAccessoryManager::EnableNotificationsForApplication(hstring_view appId) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableNotificationsForApplication(get(appId))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_EnableNotificationsForApplication(get_abi(appId))); } -template void impl_IAccessoryManager::DisableNotificationsForApplication(hstring_ref appId) const +template void impl_IAccessoryManager::DisableNotificationsForApplication(hstring_view appId) const { - check_hresult(static_cast(static_cast(*this))->abi_DisableNotificationsForApplication(get(appId))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_DisableNotificationsForApplication(get_abi(appId))); } -template bool impl_IAccessoryManager::IsNotificationEnabledForApplication(hstring_ref appId) const +template bool impl_IAccessoryManager::IsNotificationEnabledForApplication(hstring_view appId) const { bool enabled {}; - check_hresult(static_cast(static_cast(*this))->abi_IsNotificationEnabledForApplication(get(appId), &enabled)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_IsNotificationEnabledForApplication(get_abi(appId), &enabled)); return enabled; } template int32_t impl_IAccessoryManager::GetEnabledAccessoryNotificationTypes() const { int32_t enabledAccessoryNotificationTypes {}; - check_hresult(static_cast(static_cast(*this))->abi_GetEnabledAccessoryNotificationTypes(&enabledAccessoryNotificationTypes)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetEnabledAccessoryNotificationTypes(&enabledAccessoryNotificationTypes)); return enabledAccessoryNotificationTypes; } template void impl_IAccessoryManager::EnableAccessoryNotificationTypes(int32_t accessoryNotificationTypes) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableAccessoryNotificationTypes(accessoryNotificationTypes)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_EnableAccessoryNotificationTypes(accessoryNotificationTypes)); } template void impl_IAccessoryManager::DisableAllAccessoryNotificationTypes() const { - check_hresult(static_cast(static_cast(*this))->abi_DisableAllAccessoryNotificationTypes()); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_DisableAllAccessoryNotificationTypes()); } template bool impl_IAccessoryManager::GetUserConsent() const { bool enabled {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUserConsent(&enabled)); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetUserConsent(&enabled)); return enabled; } -template Windows::Storage::Streams::IRandomAccessStreamReference impl_IAccessoryManager::GetAppIcon(hstring_ref appId) const +template Windows::Storage::Streams::IRandomAccessStreamReference impl_IAccessoryManager::GetAppIcon(hstring_view appId) const { Windows::Storage::Streams::IRandomAccessStreamReference returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAppIcon(get(appId), put(returnValue))); + check_hresult(WINRT_SHIM(IAccessoryManager)->abi_GetAppIcon(get_abi(appId), put_abi(returnValue))); return returnValue; } template void impl_IAccessoryManager2::RingDevice() const { - check_hresult(static_cast(static_cast(*this))->abi_RingDevice()); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_RingDevice()); } template Windows::Foundation::Collections::IVectorView impl_IAccessoryManager2::SpeedDialList() const { Windows::Foundation::Collections::IVectorView ppvalue; - check_hresult(static_cast(static_cast(*this))->get_SpeedDialList(put(ppvalue))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->get_SpeedDialList(put_abi(ppvalue))); return ppvalue; } -template void impl_IAccessoryManager2::ClearToast(hstring_ref instanceId) const +template void impl_IAccessoryManager2::ClearToast(hstring_view instanceId) const { - check_hresult(static_cast(static_cast(*this))->abi_ClearToast(get(instanceId))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_ClearToast(get_abi(instanceId))); } template bool impl_IAccessoryManager2::IsPhonePinLocked() const { bool pinLocked {}; - check_hresult(static_cast(static_cast(*this))->get_IsPhonePinLocked(&pinLocked)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->get_IsPhonePinLocked(&pinLocked)); return pinLocked; } template void impl_IAccessoryManager2::IncreaseVolume(int32_t step) const { - check_hresult(static_cast(static_cast(*this))->abi_IncreaseVolume(step)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_IncreaseVolume(step)); } template void impl_IAccessoryManager2::DecreaseVolume(int32_t step) const { - check_hresult(static_cast(static_cast(*this))->abi_DecreaseVolume(step)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_DecreaseVolume(step)); } template void impl_IAccessoryManager2::SetMute(bool mute) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMute(mute)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_SetMute(mute)); } template void impl_IAccessoryManager2::SetRingerVibrate(bool ringer, bool vibrate) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRingerVibrate(ringer, vibrate)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_SetRingerVibrate(ringer, vibrate)); } template Windows::Phone::Notification::Management::VolumeInfo impl_IAccessoryManager2::VolumeInfo() const { Windows::Phone::Notification::Management::VolumeInfo ppVolume { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VolumeInfo(put(ppVolume))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->get_VolumeInfo(put_abi(ppVolume))); return ppVolume; } template Windows::Foundation::Collections::IVectorView impl_IAccessoryManager2::GetAllEmailAccounts() const { Windows::Foundation::Collections::IVectorView emailAccounts; - check_hresult(static_cast(static_cast(*this))->abi_GetAllEmailAccounts(put(emailAccounts))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_GetAllEmailAccounts(put_abi(emailAccounts))); return emailAccounts; } -template Windows::Foundation::Collections::IVectorView impl_IAccessoryManager2::GetFolders(hstring_ref emailAccount) const +template Windows::Foundation::Collections::IVectorView impl_IAccessoryManager2::GetFolders(hstring_view emailAccount) const { Windows::Foundation::Collections::IVectorView folders; - check_hresult(static_cast(static_cast(*this))->abi_GetFolders(get(emailAccount), put(folders))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_GetFolders(get_abi(emailAccount), put_abi(folders))); return folders; } -template void impl_IAccessoryManager2::EnableEmailNotificationEmailAccount(hstring_ref emailAccount) const +template void impl_IAccessoryManager2::EnableEmailNotificationEmailAccount(hstring_view emailAccount) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableEmailNotificationEmailAccount(get(emailAccount))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_EnableEmailNotificationEmailAccount(get_abi(emailAccount))); } -template void impl_IAccessoryManager2::DisableEmailNotificationEmailAccount(hstring_ref emailAccount) const +template void impl_IAccessoryManager2::DisableEmailNotificationEmailAccount(hstring_view emailAccount) const { - check_hresult(static_cast(static_cast(*this))->abi_DisableEmailNotificationEmailAccount(get(emailAccount))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_DisableEmailNotificationEmailAccount(get_abi(emailAccount))); } -template void impl_IAccessoryManager2::EnableEmailNotificationFolderFilter(hstring_ref emailAccount, const Windows::Foundation::Collections::IVectorView & folders) const +template void impl_IAccessoryManager2::EnableEmailNotificationFolderFilter(hstring_view emailAccount, vector_view folders) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableEmailNotificationFolderFilter(get(emailAccount), get(folders))); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_EnableEmailNotificationFolderFilter(get_abi(emailAccount), get_abi(folders))); } template void impl_IAccessoryManager2::UpdateEmailReadStatus(const Windows::Phone::Notification::Management::BinaryId & messageEntryId, bool isRead) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateEmailReadStatus(get(messageEntryId), isRead)); + check_hresult(WINRT_SHIM(IAccessoryManager2)->abi_UpdateEmailReadStatus(get_abi(messageEntryId), isRead)); } -template void impl_IAccessoryManager3::SnoozeAlarmByInstanceId(hstring_ref instanceId) const +template void impl_IAccessoryManager3::SnoozeAlarmByInstanceId(hstring_view instanceId) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeAlarmByInstanceId(get(instanceId))); + check_hresult(WINRT_SHIM(IAccessoryManager3)->abi_SnoozeAlarmByInstanceId(get_abi(instanceId))); } -template void impl_IAccessoryManager3::DismissAlarmByInstanceId(hstring_ref instanceId) const +template void impl_IAccessoryManager3::DismissAlarmByInstanceId(hstring_view instanceId) const { - check_hresult(static_cast(static_cast(*this))->abi_DismissAlarmByInstanceId(get(instanceId))); + check_hresult(WINRT_SHIM(IAccessoryManager3)->abi_DismissAlarmByInstanceId(get_abi(instanceId))); } -template void impl_IAccessoryManager3::SnoozeReminderByInstanceId(hstring_ref instanceId) const +template void impl_IAccessoryManager3::SnoozeReminderByInstanceId(hstring_view instanceId) const { - check_hresult(static_cast(static_cast(*this))->abi_SnoozeReminderByInstanceId(get(instanceId))); + check_hresult(WINRT_SHIM(IAccessoryManager3)->abi_SnoozeReminderByInstanceId(get_abi(instanceId))); } -template void impl_IAccessoryManager3::DismissReminderByInstanceId(hstring_ref instanceId) const +template void impl_IAccessoryManager3::DismissReminderByInstanceId(hstring_view instanceId) const { - check_hresult(static_cast(static_cast(*this))->abi_DismissReminderByInstanceId(get(instanceId))); + check_hresult(WINRT_SHIM(IAccessoryManager3)->abi_DismissReminderByInstanceId(get_abi(instanceId))); } inline hstring AccessoryManager::RegisterAccessoryApp() @@ -3366,22 +3529,22 @@ inline void AccessoryManager::RejectPhoneCall(uint32_t phoneCallId, uint32_t tex get_activation_factory().RejectPhoneCall(phoneCallId, textResponseID); } -inline void AccessoryManager::MakePhoneCall(GUID phoneLine, hstring_ref phoneNumber) +inline void AccessoryManager::MakePhoneCall(GUID phoneLine, hstring_view phoneNumber) { get_activation_factory().MakePhoneCall(phoneLine, phoneNumber); } -inline void AccessoryManager::MakePhoneCall(GUID phoneLine, hstring_ref phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) +inline void AccessoryManager::MakePhoneCall(GUID phoneLine, hstring_view phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) { get_activation_factory().MakePhoneCall(phoneLine, phoneNumber, endPoint); } -inline void AccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_ref phoneNumber) +inline void AccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_view phoneNumber) { get_activation_factory().MakePhoneCallWithVideo(phoneLine, phoneNumber); } -inline void AccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_ref phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) +inline void AccessoryManager::MakePhoneCallWithVideo(GUID phoneLine, hstring_view phoneNumber, Windows::Phone::Notification::Management::PhoneCallAudioEndpoint endPoint) { get_activation_factory().MakePhoneCallWithVideo(phoneLine, phoneNumber, endPoint); } @@ -3491,17 +3654,17 @@ inline Windows::Foundation::Collections::IMapView().GetApps(); } -inline void AccessoryManager::EnableNotificationsForApplication(hstring_ref appId) +inline void AccessoryManager::EnableNotificationsForApplication(hstring_view appId) { get_activation_factory().EnableNotificationsForApplication(appId); } -inline void AccessoryManager::DisableNotificationsForApplication(hstring_ref appId) +inline void AccessoryManager::DisableNotificationsForApplication(hstring_view appId) { get_activation_factory().DisableNotificationsForApplication(appId); } -inline bool AccessoryManager::IsNotificationEnabledForApplication(hstring_ref appId) +inline bool AccessoryManager::IsNotificationEnabledForApplication(hstring_view appId) { return get_activation_factory().IsNotificationEnabledForApplication(appId); } @@ -3526,7 +3689,7 @@ inline bool AccessoryManager::GetUserConsent() return get_activation_factory().GetUserConsent(); } -inline Windows::Storage::Streams::IRandomAccessStreamReference AccessoryManager::GetAppIcon(hstring_ref appId) +inline Windows::Storage::Streams::IRandomAccessStreamReference AccessoryManager::GetAppIcon(hstring_view appId) { return get_activation_factory().GetAppIcon(appId); } @@ -3541,7 +3704,7 @@ inline Windows::Foundation::Collections::IVectorView().SpeedDialList(); } -inline void AccessoryManager::ClearToast(hstring_ref instanceId) +inline void AccessoryManager::ClearToast(hstring_view instanceId) { get_activation_factory().ClearToast(instanceId); } @@ -3581,22 +3744,22 @@ inline Windows::Foundation::Collections::IVectorView().GetAllEmailAccounts(); } -inline Windows::Foundation::Collections::IVectorView AccessoryManager::GetFolders(hstring_ref emailAccount) +inline Windows::Foundation::Collections::IVectorView AccessoryManager::GetFolders(hstring_view emailAccount) { return get_activation_factory().GetFolders(emailAccount); } -inline void AccessoryManager::EnableEmailNotificationEmailAccount(hstring_ref emailAccount) +inline void AccessoryManager::EnableEmailNotificationEmailAccount(hstring_view emailAccount) { get_activation_factory().EnableEmailNotificationEmailAccount(emailAccount); } -inline void AccessoryManager::DisableEmailNotificationEmailAccount(hstring_ref emailAccount) +inline void AccessoryManager::DisableEmailNotificationEmailAccount(hstring_view emailAccount) { get_activation_factory().DisableEmailNotificationEmailAccount(emailAccount); } -inline void AccessoryManager::EnableEmailNotificationFolderFilter(hstring_ref emailAccount, const Windows::Foundation::Collections::IVectorView & folders) +inline void AccessoryManager::EnableEmailNotificationFolderFilter(hstring_view emailAccount, vector_view folders) { get_activation_factory().EnableEmailNotificationFolderFilter(emailAccount, folders); } @@ -3606,22 +3769,22 @@ inline void AccessoryManager::UpdateEmailReadStatus(const Windows::Phone::Notifi get_activation_factory().UpdateEmailReadStatus(messageEntryId, isRead); } -inline void AccessoryManager::SnoozeAlarmByInstanceId(hstring_ref instanceId) +inline void AccessoryManager::SnoozeAlarmByInstanceId(hstring_view instanceId) { get_activation_factory().SnoozeAlarmByInstanceId(instanceId); } -inline void AccessoryManager::DismissAlarmByInstanceId(hstring_ref instanceId) +inline void AccessoryManager::DismissAlarmByInstanceId(hstring_view instanceId) { get_activation_factory().DismissAlarmByInstanceId(instanceId); } -inline void AccessoryManager::SnoozeReminderByInstanceId(hstring_ref instanceId) +inline void AccessoryManager::SnoozeReminderByInstanceId(hstring_view instanceId) { get_activation_factory().SnoozeReminderByInstanceId(instanceId); } -inline void AccessoryManager::DismissReminderByInstanceId(hstring_ref instanceId) +inline void AccessoryManager::DismissReminderByInstanceId(hstring_view instanceId) { get_activation_factory().DismissReminderByInstanceId(instanceId); } @@ -3629,3 +3792,428 @@ inline void AccessoryManager::DismissReminderByInstanceId(hstring_ref instanceId } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAccessoryManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAccessoryManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAccessoryManager3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAccessoryNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAlarmNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAlarmNotificationTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IAppNotificationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IBinaryId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ICalendarChangedNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ICortanaTileNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IEmailAccountInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IEmailFolderInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IEmailNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IEmailNotificationTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IEmailReadNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IMediaControlsTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IMediaMetadata & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IPhoneCallDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IPhoneLineDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IPhoneLineDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IPhoneNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IReminderNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IReminderNotificationTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ISpeedDialEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ITextResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IToastNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IToastNotificationTriggerDetails2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::IVolumeInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::AlarmNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::AppNotificationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::BinaryId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::CalendarChangedNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::CortanaTileNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::EmailAccountInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::EmailFolderInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::EmailNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::EmailReadNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::MediaControlsTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::MediaMetadata & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::PhoneCallDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::PhoneLineDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::PhoneNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ReminderNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::SpeedDialEntry & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::TextResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::ToastNotificationTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::Notification::Management::VolumeInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.Provisioning.h b/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.Provisioning.h index ccdbcbbed..ba9e400dc 100644 --- a/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.Provisioning.h +++ b/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.Provisioning.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Phone.PersonalInformation.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AssociateNetworkAccountAsync(abi_arg_in store, abi_arg_in networkName, abi_arg_in networkAccountId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AssociateNetworkAccountAsync(impl::abi_arg_in store, impl::abi_arg_in networkName, impl::abi_arg_in networkAccountId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AssociateNetworkAccountAsync(*reinterpret_cast(&store), *reinterpret_cast(&networkName), *reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AssociateNetworkAccountAsync(*reinterpret_cast(&store), *reinterpret_cast(&networkName), *reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce stream, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ImportVcardToSystemAsync(impl::abi_arg_in stream, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ImportVcardToSystemAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ImportVcardToSystemAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AssociateSocialNetworkAccountAsync(abi_arg_in store, abi_arg_in networkName, abi_arg_in networkAccountId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AssociateSocialNetworkAccountAsync(impl::abi_arg_in store, impl::abi_arg_in networkName, impl::abi_arg_in networkAccountId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AssociateSocialNetworkAccountAsync(*reinterpret_cast(&store), *reinterpret_cast(&networkName), *reinterpret_cast(&networkAccountId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AssociateSocialNetworkAccountAsync(*reinterpret_cast(&store), *reinterpret_cast(&networkName), *reinterpret_cast(&networkAccountId))); return S_OK; } catch (...) @@ -67,11 +73,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ImportSmsToSystemAsync(bool incoming, bool read, abi_arg_in body, abi_arg_in sender, abi_arg_in> recipients, abi_arg_in deliveryTime, abi_arg_out action) noexcept override + HRESULT __stdcall abi_ImportSmsToSystemAsync(bool incoming, bool read, impl::abi_arg_in body, impl::abi_arg_in sender, impl::abi_arg_in> recipients, impl::abi_arg_in deliveryTime, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().ImportSmsToSystemAsync(incoming, read, *reinterpret_cast(&body), *reinterpret_cast(&sender), *reinterpret_cast *>(&recipients), *reinterpret_cast(&deliveryTime))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().ImportSmsToSystemAsync(incoming, read, *reinterpret_cast(&body), *reinterpret_cast(&sender), *reinterpret_cast *>(&recipients), *reinterpret_cast(&deliveryTime))); return S_OK; } catch (...) @@ -81,11 +88,12 @@ struct produce subject, abi_arg_in sender, abi_arg_in> recipients, abi_arg_in deliveryTime, abi_arg_in>> attachments, abi_arg_out action) noexcept override + HRESULT __stdcall abi_ImportMmsToSystemAsync(bool incoming, bool read, impl::abi_arg_in subject, impl::abi_arg_in sender, impl::abi_arg_in> recipients, impl::abi_arg_in deliveryTime, impl::abi_arg_in>> attachments, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().ImportMmsToSystemAsync(incoming, read, *reinterpret_cast(&subject), *reinterpret_cast(&sender), *reinterpret_cast *>(&recipients), *reinterpret_cast(&deliveryTime), *reinterpret_cast> *>(&attachments))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().ImportMmsToSystemAsync(incoming, read, *reinterpret_cast(&subject), *reinterpret_cast(&sender), *reinterpret_cast *>(&recipients), *reinterpret_cast(&deliveryTime), *reinterpret_cast> *>(&attachments))); return S_OK; } catch (...) @@ -100,42 +108,42 @@ struct produce Windows::Foundation::IAsyncAction impl_IContactPartnerProvisioningManagerStatics::AssociateNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_ref networkName, hstring_ref networkAccountId) const +template Windows::Foundation::IAsyncAction impl_IContactPartnerProvisioningManagerStatics::AssociateNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_view networkName, hstring_view networkAccountId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AssociateNetworkAccountAsync(get(store), get(networkName), get(networkAccountId), put(result))); + check_hresult(WINRT_SHIM(IContactPartnerProvisioningManagerStatics)->abi_AssociateNetworkAccountAsync(get_abi(store), get_abi(networkName), get_abi(networkAccountId), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IContactPartnerProvisioningManagerStatics::ImportVcardToSystemAsync(const Windows::Storage::Streams::IInputStream & stream) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ImportVcardToSystemAsync(get(stream), put(result))); + check_hresult(WINRT_SHIM(IContactPartnerProvisioningManagerStatics)->abi_ImportVcardToSystemAsync(get_abi(stream), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IContactPartnerProvisioningManagerStatics2::AssociateSocialNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_ref networkName, hstring_ref networkAccountId) const +template Windows::Foundation::IAsyncAction impl_IContactPartnerProvisioningManagerStatics2::AssociateSocialNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_view networkName, hstring_view networkAccountId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AssociateSocialNetworkAccountAsync(get(store), get(networkName), get(networkAccountId), put(result))); + check_hresult(WINRT_SHIM(IContactPartnerProvisioningManagerStatics2)->abi_AssociateSocialNetworkAccountAsync(get_abi(store), get_abi(networkName), get_abi(networkAccountId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IMessagePartnerProvisioningManagerStatics::ImportSmsToSystemAsync(bool incoming, bool read, hstring_ref body, hstring_ref sender, const Windows::Foundation::Collections::IVectorView & recipients, const Windows::Foundation::DateTime & deliveryTime) const +template Windows::Foundation::IAsyncAction impl_IMessagePartnerProvisioningManagerStatics::ImportSmsToSystemAsync(bool incoming, bool read, hstring_view body, hstring_view sender, vector_view recipients, const Windows::Foundation::DateTime & deliveryTime) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_ImportSmsToSystemAsync(incoming, read, get(body), get(sender), get(recipients), get(deliveryTime), put(action))); + check_hresult(WINRT_SHIM(IMessagePartnerProvisioningManagerStatics)->abi_ImportSmsToSystemAsync(incoming, read, get_abi(body), get_abi(sender), get_abi(recipients), get_abi(deliveryTime), put_abi(action))); return action; } -template Windows::Foundation::IAsyncAction impl_IMessagePartnerProvisioningManagerStatics::ImportMmsToSystemAsync(bool incoming, bool read, hstring_ref subject, hstring_ref sender, const Windows::Foundation::Collections::IVectorView & recipients, const Windows::Foundation::DateTime & deliveryTime, const Windows::Foundation::Collections::IVectorView> & attachments) const +template Windows::Foundation::IAsyncAction impl_IMessagePartnerProvisioningManagerStatics::ImportMmsToSystemAsync(bool incoming, bool read, hstring_view subject, hstring_view sender, vector_view recipients, const Windows::Foundation::DateTime & deliveryTime, vector_view> attachments) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_ImportMmsToSystemAsync(incoming, read, get(subject), get(sender), get(recipients), get(deliveryTime), get(attachments), put(action))); + check_hresult(WINRT_SHIM(IMessagePartnerProvisioningManagerStatics)->abi_ImportMmsToSystemAsync(incoming, read, get_abi(subject), get_abi(sender), get_abi(recipients), get_abi(deliveryTime), get_abi(attachments), put_abi(action))); return action; } -inline Windows::Foundation::IAsyncAction ContactPartnerProvisioningManager::AssociateNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_ref networkName, hstring_ref networkAccountId) +inline Windows::Foundation::IAsyncAction ContactPartnerProvisioningManager::AssociateNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_view networkName, hstring_view networkAccountId) { return get_activation_factory().AssociateNetworkAccountAsync(store, networkName, networkAccountId); } @@ -145,17 +153,17 @@ inline Windows::Foundation::IAsyncAction ContactPartnerProvisioningManager::Impo return get_activation_factory().ImportVcardToSystemAsync(stream); } -inline Windows::Foundation::IAsyncAction ContactPartnerProvisioningManager::AssociateSocialNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_ref networkName, hstring_ref networkAccountId) +inline Windows::Foundation::IAsyncAction ContactPartnerProvisioningManager::AssociateSocialNetworkAccountAsync(const Windows::Phone::PersonalInformation::ContactStore & store, hstring_view networkName, hstring_view networkAccountId) { return get_activation_factory().AssociateSocialNetworkAccountAsync(store, networkName, networkAccountId); } -inline Windows::Foundation::IAsyncAction MessagePartnerProvisioningManager::ImportSmsToSystemAsync(bool incoming, bool read, hstring_ref body, hstring_ref sender, const Windows::Foundation::Collections::IVectorView & recipients, const Windows::Foundation::DateTime & deliveryTime) +inline Windows::Foundation::IAsyncAction MessagePartnerProvisioningManager::ImportSmsToSystemAsync(bool incoming, bool read, hstring_view body, hstring_view sender, vector_view recipients, const Windows::Foundation::DateTime & deliveryTime) { return get_activation_factory().ImportSmsToSystemAsync(incoming, read, body, sender, recipients, deliveryTime); } -inline Windows::Foundation::IAsyncAction MessagePartnerProvisioningManager::ImportMmsToSystemAsync(bool incoming, bool read, hstring_ref subject, hstring_ref sender, const Windows::Foundation::Collections::IVectorView & recipients, const Windows::Foundation::DateTime & deliveryTime, const Windows::Foundation::Collections::IVectorView> & attachments) +inline Windows::Foundation::IAsyncAction MessagePartnerProvisioningManager::ImportMmsToSystemAsync(bool incoming, bool read, hstring_view subject, hstring_view sender, vector_view recipients, const Windows::Foundation::DateTime & deliveryTime, vector_view> attachments) { return get_activation_factory().ImportMmsToSystemAsync(incoming, read, subject, sender, recipients, deliveryTime, attachments); } @@ -163,3 +171,32 @@ inline Windows::Foundation::IAsyncAction MessagePartnerProvisioningManager::Impo } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::Provisioning::IContactPartnerProvisioningManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::Provisioning::IContactPartnerProvisioningManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::Provisioning::IMessagePartnerProvisioningManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.h b/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.h index b5104675c..f392c87f0 100644 --- a/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.h +++ b/10.0.14393.0/winrt/Windows.Phone.PersonalInformation.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Country(abi_arg_out value) noexcept override + HRESULT __stdcall get_Country(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Country()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Country()); return S_OK; } catch (...) @@ -29,10 +33,11 @@ struct produce : produc } } - HRESULT __stdcall put_Country(abi_arg_in value) noexcept override + HRESULT __stdcall put_Country(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Country(*reinterpret_cast(&value)); return S_OK; } @@ -42,11 +47,12 @@ struct produce : produc } } - HRESULT __stdcall get_Locality(abi_arg_out value) noexcept override + HRESULT __stdcall get_Locality(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Locality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locality()); return S_OK; } catch (...) @@ -56,10 +62,11 @@ struct produce : produc } } - HRESULT __stdcall put_Locality(abi_arg_in value) noexcept override + HRESULT __stdcall put_Locality(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Locality(*reinterpret_cast(&value)); return S_OK; } @@ -69,11 +76,12 @@ struct produce : produc } } - HRESULT __stdcall get_Region(abi_arg_out value) noexcept override + HRESULT __stdcall get_Region(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Region()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Region()); return S_OK; } catch (...) @@ -83,10 +91,11 @@ struct produce : produc } } - HRESULT __stdcall put_Region(abi_arg_in value) noexcept override + HRESULT __stdcall put_Region(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Region(*reinterpret_cast(&value)); return S_OK; } @@ -96,11 +105,12 @@ struct produce : produc } } - HRESULT __stdcall get_PostalCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_PostalCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostalCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostalCode()); return S_OK; } catch (...) @@ -110,10 +120,11 @@ struct produce : produc } } - HRESULT __stdcall put_PostalCode(abi_arg_in value) noexcept override + HRESULT __stdcall put_PostalCode(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PostalCode(*reinterpret_cast(&value)); return S_OK; } @@ -123,11 +134,12 @@ struct produce : produc } } - HRESULT __stdcall get_StreetAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_StreetAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreetAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreetAddress()); return S_OK; } catch (...) @@ -137,10 +149,11 @@ struct produce : produc } } - HRESULT __stdcall put_StreetAddress(abi_arg_in value) noexcept override + HRESULT __stdcall put_StreetAddress(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StreetAddress(*reinterpret_cast(&value)); return S_OK; } @@ -158,7 +171,8 @@ struct produce : p { try { - *value = detach(this->shim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -171,7 +185,8 @@ struct produce : p { try { - *value = detach(this->shim().RevisionNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RevisionNumber()); return S_OK; } catch (...) @@ -180,11 +195,12 @@ struct produce : p } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -194,11 +210,12 @@ struct produce : p } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -212,11 +229,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -226,10 +244,11 @@ struct produce : pr } } - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -239,11 +258,12 @@ struct produce : pr } } - HRESULT __stdcall get_FamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FamilyName()); return S_OK; } catch (...) @@ -253,10 +273,11 @@ struct produce : pr } } - HRESULT __stdcall put_FamilyName(abi_arg_in value) noexcept override + HRESULT __stdcall put_FamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -266,11 +287,12 @@ struct produce : pr } } - HRESULT __stdcall get_GivenName(abi_arg_out value) noexcept override + HRESULT __stdcall get_GivenName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GivenName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GivenName()); return S_OK; } catch (...) @@ -280,10 +302,11 @@ struct produce : pr } } - HRESULT __stdcall put_GivenName(abi_arg_in value) noexcept override + HRESULT __stdcall put_GivenName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GivenName(*reinterpret_cast(&value)); return S_OK; } @@ -293,11 +316,12 @@ struct produce : pr } } - HRESULT __stdcall get_HonorificPrefix(abi_arg_out value) noexcept override + HRESULT __stdcall get_HonorificPrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificPrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificPrefix()); return S_OK; } catch (...) @@ -307,10 +331,11 @@ struct produce : pr } } - HRESULT __stdcall put_HonorificPrefix(abi_arg_in value) noexcept override + HRESULT __stdcall put_HonorificPrefix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HonorificPrefix(*reinterpret_cast(&value)); return S_OK; } @@ -320,11 +345,12 @@ struct produce : pr } } - HRESULT __stdcall get_HonorificSuffix(abi_arg_out value) noexcept override + HRESULT __stdcall get_HonorificSuffix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificSuffix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificSuffix()); return S_OK; } catch (...) @@ -334,10 +360,11 @@ struct produce : pr } } - HRESULT __stdcall put_HonorificSuffix(abi_arg_in value) noexcept override + HRESULT __stdcall put_HonorificSuffix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HonorificSuffix(*reinterpret_cast(&value)); return S_OK; } @@ -347,11 +374,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetDisplayPictureAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDisplayPictureAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDisplayPictureAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDisplayPictureAsync()); return S_OK; } catch (...) @@ -361,11 +389,12 @@ struct produce : pr } } - HRESULT __stdcall abi_SetDisplayPictureAsync(abi_arg_in stream, abi_arg_out action) noexcept override + HRESULT __stdcall abi_SetDisplayPictureAsync(impl::abi_arg_in stream, impl::abi_arg_out action) noexcept override { try { - *action = detach(this->shim().SetDisplayPictureAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().SetDisplayPictureAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -375,11 +404,12 @@ struct produce : pr } } - HRESULT __stdcall get_DisplayPicture(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayPicture(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayPicture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayPicture()); return S_OK; } catch (...) @@ -389,11 +419,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetPropertiesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetPropertiesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertiesAsync()); return S_OK; } catch (...) @@ -403,11 +434,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ToVcardAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ToVcardAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ToVcardAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ToVcardAsync()); return S_OK; } catch (...) @@ -417,11 +449,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ToVcardWithOptionsAsync(Windows::Phone::PersonalInformation::VCardFormat format, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ToVcardWithOptionsAsync(Windows::Phone::PersonalInformation::VCardFormat format, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ToVcardAsync(format)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ToVcardAsync(format)); return S_OK; } catch (...) @@ -435,11 +468,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_DisplayPictureDate(abi_arg_out returnValue) noexcept override + HRESULT __stdcall get_DisplayPictureDate(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().DisplayPictureDate()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DisplayPictureDate()); return S_OK; } catch (...) @@ -448,10 +482,11 @@ struct produce : p } } - HRESULT __stdcall put_DisplayPictureDate(abi_arg_in returnValue) noexcept override + HRESULT __stdcall put_DisplayPictureDate(impl::abi_arg_in returnValue) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayPictureDate(*reinterpret_cast(&returnValue)); return S_OK; } @@ -465,11 +500,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_ParseVcardAsync(abi_arg_in vcard, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ParseVcardAsync(impl::abi_arg_in vcard, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ParseVcardAsync(*reinterpret_cast(&vcard))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ParseVcardAsync(*reinterpret_cast(&vcard))); return S_OK; } catch (...) @@ -483,11 +519,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DesiredFields(abi_arg_out> value) noexcept override + HRESULT __stdcall get_DesiredFields(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DesiredFields()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredFields()); return S_OK; } catch (...) @@ -501,7 +538,8 @@ struct produce : p { try { - *value = detach(this->shim().OrderBy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrderBy()); return S_OK; } catch (...) @@ -514,6 +552,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().OrderBy(value); return S_OK; } @@ -527,11 +566,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetContactCountAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetContactCountAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetContactCountAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetContactCountAsync()); return S_OK; } catch (...) @@ -541,11 +581,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetContactsAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetContactsAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetContactsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetContactsAsync()); return S_OK; } catch (...) @@ -555,11 +596,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetContactsAsyncInRange(uint32_t startIndex, uint32_t maxNumberOfItems, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetContactsAsyncInRange(uint32_t startIndex, uint32_t maxNumberOfItems, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetContactsAsync(startIndex, maxNumberOfItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetContactsAsync(startIndex, maxNumberOfItems)); return S_OK; } catch (...) @@ -569,11 +611,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetCurrentQueryOptions(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentQueryOptions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentQueryOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentQueryOptions()); return S_OK; } catch (...) @@ -587,11 +630,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_FindContactByRemoteIdAsync(abi_arg_in id, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FindContactByRemoteIdAsync(impl::abi_arg_in id, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FindContactByRemoteIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindContactByRemoteIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -601,11 +645,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindContactByIdAsync(abi_arg_in id, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FindContactByIdAsync(impl::abi_arg_in id, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FindContactByIdAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindContactByIdAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -615,11 +660,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_DeleteContactAsync(abi_arg_in id, abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteContactAsync(impl::abi_arg_in id, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteContactAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteContactAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -629,11 +675,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateContactQueryDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateContactQueryDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateContactQuery()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateContactQuery()); return S_OK; } catch (...) @@ -643,11 +690,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_CreateContactQueryWithOptions(abi_arg_in options, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateContactQueryWithOptions(impl::abi_arg_in options, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateContactQuery(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateContactQuery(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -657,11 +705,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -675,7 +724,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().RevisionNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RevisionNumber()); return S_OK; } catch (...) @@ -684,11 +734,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetChangesAsync(uint64_t baseRevisionNumber, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetChangesAsync(uint64_t baseRevisionNumber, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetChangesAsync(baseRevisionNumber)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetChangesAsync(baseRevisionNumber)); return S_OK; } catch (...) @@ -698,11 +749,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_LoadExtendedPropertiesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_LoadExtendedPropertiesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().LoadExtendedPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadExtendedPropertiesAsync()); return S_OK; } catch (...) @@ -712,11 +764,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SaveExtendedPropertiesAsync(abi_arg_in> data, abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveExtendedPropertiesAsync(impl::abi_arg_in> data, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveExtendedPropertiesAsync(*reinterpret_cast *>(&data))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveExtendedPropertiesAsync(*reinterpret_cast *>(&data))); return S_OK; } catch (...) @@ -730,11 +783,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateMeContactAsync(abi_arg_in id, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateMeContactAsync(impl::abi_arg_in id, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateMeContactAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateMeContactAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -748,11 +802,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateOrOpenAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateOrOpenAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateOrOpenAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateOrOpenAsync()); return S_OK; } catch (...) @@ -762,11 +817,12 @@ struct produce : p } } - HRESULT __stdcall abi_CreateOrOpenWithOptionsAsync(Windows::Phone::PersonalInformation::ContactStoreSystemAccessMode access, Windows::Phone::PersonalInformation::ContactStoreApplicationAccessMode sharing, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateOrOpenWithOptionsAsync(Windows::Phone::PersonalInformation::ContactStoreSystemAccessMode access, Windows::Phone::PersonalInformation::ContactStoreApplicationAccessMode sharing, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateOrOpenAsync(access, sharing)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateOrOpenAsync(access, sharing)); return S_OK; } catch (...) @@ -780,11 +836,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -794,11 +851,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FamilyName()); return S_OK; } catch (...) @@ -808,11 +866,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GivenName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GivenName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GivenName()); return S_OK; } catch (...) @@ -822,11 +881,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HonorificPrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificPrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificPrefix()); return S_OK; } catch (...) @@ -836,11 +896,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HonorificSuffix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HonorificSuffix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HonorificSuffix()); return S_OK; } catch (...) @@ -850,11 +911,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AdditionalName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdditionalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalName()); return S_OK; } catch (...) @@ -864,11 +926,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -878,11 +941,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OtherAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OtherAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherAddress()); return S_OK; } catch (...) @@ -892,11 +956,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Email(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Email()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Email()); return S_OK; } catch (...) @@ -906,11 +971,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WorkAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorkAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkAddress()); return S_OK; } catch (...) @@ -920,11 +986,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WorkTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorkTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkTelephone()); return S_OK; } catch (...) @@ -934,11 +1001,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_JobTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().JobTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().JobTitle()); return S_OK; } catch (...) @@ -948,11 +1016,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Birthdate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Birthdate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Birthdate()); return S_OK; } catch (...) @@ -962,11 +1031,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Anniversary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Anniversary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Anniversary()); return S_OK; } catch (...) @@ -976,11 +1046,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Telephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Telephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Telephone()); return S_OK; } catch (...) @@ -990,11 +1061,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MobileTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MobileTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MobileTelephone()); return S_OK; } catch (...) @@ -1004,11 +1076,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Url(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Url()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Url()); return S_OK; } catch (...) @@ -1018,11 +1091,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Notes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Notes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Notes()); return S_OK; } catch (...) @@ -1032,11 +1106,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WorkFax(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorkFax()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkFax()); return S_OK; } catch (...) @@ -1046,11 +1121,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Children(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Children()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Children()); return S_OK; } catch (...) @@ -1060,11 +1136,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SignificantOther(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignificantOther()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignificantOther()); return S_OK; } catch (...) @@ -1074,11 +1151,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CompanyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompanyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyName()); return S_OK; } catch (...) @@ -1088,11 +1166,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CompanyTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompanyTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompanyTelephone()); return S_OK; } catch (...) @@ -1102,11 +1181,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HomeFax(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeFax()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeFax()); return S_OK; } catch (...) @@ -1116,11 +1196,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AlternateTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlternateTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateTelephone()); return S_OK; } catch (...) @@ -1130,11 +1211,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Manager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Manager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Manager()); return S_OK; } catch (...) @@ -1144,11 +1226,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Nickname(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Nickname()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Nickname()); return S_OK; } catch (...) @@ -1158,11 +1241,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OfficeLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OfficeLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OfficeLocation()); return S_OK; } catch (...) @@ -1172,11 +1256,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WorkEmail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorkEmail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkEmail()); return S_OK; } catch (...) @@ -1186,11 +1271,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_YomiGivenName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiGivenName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiGivenName()); return S_OK; } catch (...) @@ -1200,11 +1286,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_YomiFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiFamilyName()); return S_OK; } catch (...) @@ -1214,11 +1301,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_YomiCompanyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YomiCompanyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YomiCompanyName()); return S_OK; } catch (...) @@ -1228,11 +1316,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OtherEmail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OtherEmail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherEmail()); return S_OK; } catch (...) @@ -1242,11 +1331,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AlternateMobileTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlternateMobileTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateMobileTelephone()); return S_OK; } catch (...) @@ -1256,11 +1346,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AlternateWorkTelephone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlternateWorkTelephone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateWorkTelephone()); return S_OK; } catch (...) @@ -1274,11 +1365,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Store(abi_arg_out value) noexcept override + HRESULT __stdcall get_Store(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Store()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Store()); return S_OK; } catch (...) @@ -1288,11 +1380,12 @@ struct produce : produce } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1302,11 +1395,12 @@ struct produce : produce } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -1316,10 +1410,11 @@ struct produce : produce } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -1329,11 +1424,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetExtendedPropertiesAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetExtendedPropertiesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetExtendedPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetExtendedPropertiesAsync()); return S_OK; } catch (...) @@ -1343,11 +1439,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SaveAsync(abi_arg_out result) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -1357,11 +1454,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ReplaceExistingContactAsync(abi_arg_in id, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ReplaceExistingContactAsync(impl::abi_arg_in id, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ReplaceExistingContactAsync(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ReplaceExistingContactAsync(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -1375,11 +1473,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateStoredContact(abi_arg_in store, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateStoredContact(impl::abi_arg_in store, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateStoredContact(*reinterpret_cast(&store))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateStoredContact(*reinterpret_cast(&store))); return S_OK; } catch (...) @@ -1389,11 +1488,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateStoredContactFromInformation(abi_arg_in store, abi_arg_in contact, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateStoredContactFromInformation(impl::abi_arg_in store, impl::abi_arg_in contact, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateStoredContactFromInformation(*reinterpret_cast(&store), *reinterpret_cast(&contact))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateStoredContactFromInformation(*reinterpret_cast(&store), *reinterpret_cast(&contact))); return S_OK; } catch (...) @@ -1411,653 +1511,653 @@ namespace Windows::Phone::PersonalInformation { template hstring impl_IContactAddress::Country() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Country(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Country(put_abi(value))); return value; } -template void impl_IContactAddress::Country(hstring_ref value) const +template void impl_IContactAddress::Country(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Country(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Country(get_abi(value))); } template hstring impl_IContactAddress::Locality() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Locality(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Locality(put_abi(value))); return value; } -template void impl_IContactAddress::Locality(hstring_ref value) const +template void impl_IContactAddress::Locality(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Locality(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Locality(get_abi(value))); } template hstring impl_IContactAddress::Region() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Region(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_Region(put_abi(value))); return value; } -template void impl_IContactAddress::Region(hstring_ref value) const +template void impl_IContactAddress::Region(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Region(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_Region(get_abi(value))); } template hstring impl_IContactAddress::PostalCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostalCode(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_PostalCode(put_abi(value))); return value; } -template void impl_IContactAddress::PostalCode(hstring_ref value) const +template void impl_IContactAddress::PostalCode(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PostalCode(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_PostalCode(get_abi(value))); } template hstring impl_IContactAddress::StreetAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StreetAddress(put(value))); + check_hresult(WINRT_SHIM(IContactAddress)->get_StreetAddress(put_abi(value))); return value; } -template void impl_IContactAddress::StreetAddress(hstring_ref value) const +template void impl_IContactAddress::StreetAddress(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_StreetAddress(get(value))); + check_hresult(WINRT_SHIM(IContactAddress)->put_StreetAddress(get_abi(value))); } template hstring impl_IContactInformation::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_DisplayName(put_abi(value))); return value; } -template void impl_IContactInformation::DisplayName(hstring_ref value) const +template void impl_IContactInformation::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IContactInformation)->put_DisplayName(get_abi(value))); } template hstring impl_IContactInformation::FamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FamilyName(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_FamilyName(put_abi(value))); return value; } -template void impl_IContactInformation::FamilyName(hstring_ref value) const +template void impl_IContactInformation::FamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FamilyName(get(value))); + check_hresult(WINRT_SHIM(IContactInformation)->put_FamilyName(get_abi(value))); } template hstring impl_IContactInformation::GivenName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GivenName(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_GivenName(put_abi(value))); return value; } -template void impl_IContactInformation::GivenName(hstring_ref value) const +template void impl_IContactInformation::GivenName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_GivenName(get(value))); + check_hresult(WINRT_SHIM(IContactInformation)->put_GivenName(get_abi(value))); } template hstring impl_IContactInformation::HonorificPrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificPrefix(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_HonorificPrefix(put_abi(value))); return value; } -template void impl_IContactInformation::HonorificPrefix(hstring_ref value) const +template void impl_IContactInformation::HonorificPrefix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HonorificPrefix(get(value))); + check_hresult(WINRT_SHIM(IContactInformation)->put_HonorificPrefix(get_abi(value))); } template hstring impl_IContactInformation::HonorificSuffix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificSuffix(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_HonorificSuffix(put_abi(value))); return value; } -template void impl_IContactInformation::HonorificSuffix(hstring_ref value) const +template void impl_IContactInformation::HonorificSuffix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HonorificSuffix(get(value))); + check_hresult(WINRT_SHIM(IContactInformation)->put_HonorificSuffix(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IContactInformation::GetDisplayPictureAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDisplayPictureAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_GetDisplayPictureAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IContactInformation::SetDisplayPictureAsync(const Windows::Storage::Streams::IInputStream & stream) const { Windows::Foundation::IAsyncAction action; - check_hresult(static_cast(static_cast(*this))->abi_SetDisplayPictureAsync(get(stream), put(action))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_SetDisplayPictureAsync(get_abi(stream), put_abi(action))); return action; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IContactInformation::DisplayPicture() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_DisplayPicture(put(value))); + check_hresult(WINRT_SHIM(IContactInformation)->get_DisplayPicture(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation> impl_IContactInformation::GetPropertiesAsync() const +template Windows::Foundation::IAsyncOperation> impl_IContactInformation::GetPropertiesAsync() const { - Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertiesAsync(put(operation))); + Windows::Foundation::IAsyncOperation> operation; + check_hresult(WINRT_SHIM(IContactInformation)->abi_GetPropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IContactInformation::ToVcardAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ToVcardAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_ToVcardAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IContactInformation::ToVcardAsync(Windows::Phone::PersonalInformation::VCardFormat format) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ToVcardWithOptionsAsync(format, put(operation))); + check_hresult(WINRT_SHIM(IContactInformation)->abi_ToVcardWithOptionsAsync(format, put_abi(operation))); return operation; } template Windows::Foundation::DateTime impl_IContactInformation2::DisplayPictureDate() const { Windows::Foundation::DateTime returnValue {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayPictureDate(put(returnValue))); + check_hresult(WINRT_SHIM(IContactInformation2)->get_DisplayPictureDate(put_abi(returnValue))); return returnValue; } template void impl_IContactInformation2::DisplayPictureDate(const Windows::Foundation::DateTime & returnValue) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayPictureDate(get(returnValue))); + check_hresult(WINRT_SHIM(IContactInformation2)->put_DisplayPictureDate(get_abi(returnValue))); } template Windows::Foundation::IAsyncOperation impl_IContactInformationStatics::ParseVcardAsync(const Windows::Storage::Streams::IInputStream & vcard) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ParseVcardAsync(get(vcard), put(operation))); + check_hresult(WINRT_SHIM(IContactInformationStatics)->abi_ParseVcardAsync(get_abi(vcard), put_abi(operation))); return operation; } template Windows::Phone::PersonalInformation::ContactStore impl_IStoredContact::Store() const { Windows::Phone::PersonalInformation::ContactStore value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Store(put(value))); + check_hresult(WINRT_SHIM(IStoredContact)->get_Store(put_abi(value))); return value; } template hstring impl_IStoredContact::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IStoredContact)->get_Id(put_abi(value))); return value; } template hstring impl_IStoredContact::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IStoredContact)->get_RemoteId(put_abi(value))); return value; } -template void impl_IStoredContact::RemoteId(hstring_ref value) const +template void impl_IStoredContact::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IStoredContact)->put_RemoteId(get_abi(value))); } -template Windows::Foundation::IAsyncOperation> impl_IStoredContact::GetExtendedPropertiesAsync() const +template Windows::Foundation::IAsyncOperation> impl_IStoredContact::GetExtendedPropertiesAsync() const { - Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetExtendedPropertiesAsync(put(operation))); + Windows::Foundation::IAsyncOperation> operation; + check_hresult(WINRT_SHIM(IStoredContact)->abi_GetExtendedPropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStoredContact::SaveAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(result))); + check_hresult(WINRT_SHIM(IStoredContact)->abi_SaveAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_IStoredContact::ReplaceExistingContactAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IStoredContact::ReplaceExistingContactAsync(hstring_view id) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ReplaceExistingContactAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IStoredContact)->abi_ReplaceExistingContactAsync(get_abi(id), put_abi(result))); return result; } template Windows::Phone::PersonalInformation::StoredContact impl_IStoredContactFactory::CreateStoredContact(const Windows::Phone::PersonalInformation::ContactStore & store) const { Windows::Phone::PersonalInformation::StoredContact result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStoredContact(get(store), put(result))); + check_hresult(WINRT_SHIM(IStoredContactFactory)->abi_CreateStoredContact(get_abi(store), put_abi(result))); return result; } template Windows::Phone::PersonalInformation::StoredContact impl_IStoredContactFactory::CreateStoredContactFromInformation(const Windows::Phone::PersonalInformation::ContactStore & store, const Windows::Phone::PersonalInformation::ContactInformation & contact) const { Windows::Phone::PersonalInformation::StoredContact result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStoredContactFromInformation(get(store), get(contact), put(result))); + check_hresult(WINRT_SHIM(IStoredContactFactory)->abi_CreateStoredContactFromInformation(get_abi(store), get_abi(contact), put_abi(result))); return result; } template hstring impl_IKnownContactPropertiesStatics::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::FamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FamilyName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_FamilyName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::GivenName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GivenName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_GivenName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::HonorificPrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificPrefix(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_HonorificPrefix(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::HonorificSuffix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HonorificSuffix(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_HonorificSuffix(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::AdditionalName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_AdditionalName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Address() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Address(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::OtherAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OtherAddress(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_OtherAddress(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Email() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Email(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Email(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::WorkAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorkAddress(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_WorkAddress(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::WorkTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorkTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_WorkTelephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::JobTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_JobTitle(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_JobTitle(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Birthdate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Birthdate(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Birthdate(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Anniversary() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Anniversary(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Anniversary(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Telephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Telephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Telephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::MobileTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MobileTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_MobileTelephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Url() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Url(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Url(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Notes() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Notes(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Notes(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::WorkFax() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorkFax(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_WorkFax(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Children() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Children(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Children(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::SignificantOther() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SignificantOther(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_SignificantOther(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::CompanyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CompanyName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_CompanyName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::CompanyTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CompanyTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_CompanyTelephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::HomeFax() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HomeFax(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_HomeFax(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::AlternateTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlternateTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_AlternateTelephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Manager() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Manager(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Manager(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::Nickname() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Nickname(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_Nickname(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::OfficeLocation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OfficeLocation(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_OfficeLocation(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::WorkEmail() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorkEmail(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_WorkEmail(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::YomiGivenName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiGivenName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_YomiGivenName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::YomiFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiFamilyName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_YomiFamilyName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::YomiCompanyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YomiCompanyName(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_YomiCompanyName(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::OtherEmail() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OtherEmail(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_OtherEmail(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::AlternateMobileTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlternateMobileTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_AlternateMobileTelephone(put_abi(value))); return value; } template hstring impl_IKnownContactPropertiesStatics::AlternateWorkTelephone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlternateWorkTelephone(put(value))); + check_hresult(WINRT_SHIM(IKnownContactPropertiesStatics)->get_AlternateWorkTelephone(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IContactQueryResult::GetContactCountAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetContactCountAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactQueryResult)->abi_GetContactCountAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IContactQueryResult::GetContactsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetContactsAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactQueryResult)->abi_GetContactsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IContactQueryResult::GetContactsAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetContactsAsyncInRange(startIndex, maxNumberOfItems, put(operation))); + check_hresult(WINRT_SHIM(IContactQueryResult)->abi_GetContactsAsyncInRange(startIndex, maxNumberOfItems, put_abi(operation))); return operation; } template Windows::Phone::PersonalInformation::ContactQueryOptions impl_IContactQueryResult::GetCurrentQueryOptions() const { Windows::Phone::PersonalInformation::ContactQueryOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentQueryOptions(put(value))); + check_hresult(WINRT_SHIM(IContactQueryResult)->abi_GetCurrentQueryOptions(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IContactQueryOptions::DesiredFields() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DesiredFields(put(value))); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_DesiredFields(put_abi(value))); return value; } template Windows::Phone::PersonalInformation::ContactQueryResultOrdering impl_IContactQueryOptions::OrderBy() const { Windows::Phone::PersonalInformation::ContactQueryResultOrdering value {}; - check_hresult(static_cast(static_cast(*this))->get_OrderBy(&value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->get_OrderBy(&value)); return value; } template void impl_IContactQueryOptions::OrderBy(Windows::Phone::PersonalInformation::ContactQueryResultOrdering value) const { - check_hresult(static_cast(static_cast(*this))->put_OrderBy(value)); + check_hresult(WINRT_SHIM(IContactQueryOptions)->put_OrderBy(value)); } -template Windows::Foundation::IAsyncOperation impl_IContactStore::FindContactByRemoteIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IContactStore::FindContactByRemoteIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FindContactByRemoteIdAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IContactStore)->abi_FindContactByRemoteIdAsync(get_abi(id), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IContactStore::FindContactByIdAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IContactStore::FindContactByIdAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FindContactByIdAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IContactStore)->abi_FindContactByIdAsync(get_abi(id), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IContactStore::DeleteContactAsync(hstring_ref id) const +template Windows::Foundation::IAsyncAction impl_IContactStore::DeleteContactAsync(hstring_view id) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteContactAsync(get(id), put(result))); + check_hresult(WINRT_SHIM(IContactStore)->abi_DeleteContactAsync(get_abi(id), put_abi(result))); return result; } template Windows::Phone::PersonalInformation::ContactQueryResult impl_IContactStore::CreateContactQuery() const { Windows::Phone::PersonalInformation::ContactQueryResult result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateContactQueryDefault(put(result))); + check_hresult(WINRT_SHIM(IContactStore)->abi_CreateContactQueryDefault(put_abi(result))); return result; } template Windows::Phone::PersonalInformation::ContactQueryResult impl_IContactStore::CreateContactQuery(const Windows::Phone::PersonalInformation::ContactQueryOptions & options) const { Windows::Phone::PersonalInformation::ContactQueryResult result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateContactQueryWithOptions(get(options), put(result))); + check_hresult(WINRT_SHIM(IContactStore)->abi_CreateContactQueryWithOptions(get_abi(options), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_IContactStore::DeleteAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(result))); + check_hresult(WINRT_SHIM(IContactStore)->abi_DeleteAsync(put_abi(result))); return result; } template uint64_t impl_IContactStore::RevisionNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RevisionNumber(&value)); + check_hresult(WINRT_SHIM(IContactStore)->get_RevisionNumber(&value)); return value; } template Windows::Foundation::IAsyncOperation> impl_IContactStore::GetChangesAsync(uint64_t baseRevisionNumber) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetChangesAsync(baseRevisionNumber, put(operation))); + check_hresult(WINRT_SHIM(IContactStore)->abi_GetChangesAsync(baseRevisionNumber, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IContactStore::LoadExtendedPropertiesAsync() const +template Windows::Foundation::IAsyncOperation> impl_IContactStore::LoadExtendedPropertiesAsync() const { - Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_LoadExtendedPropertiesAsync(put(operation))); + Windows::Foundation::IAsyncOperation> operation; + check_hresult(WINRT_SHIM(IContactStore)->abi_LoadExtendedPropertiesAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IContactStore::SaveExtendedPropertiesAsync(const Windows::Foundation::Collections::IMapView & data) const +template Windows::Foundation::IAsyncAction impl_IContactStore::SaveExtendedPropertiesAsync(map_view data) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveExtendedPropertiesAsync(get(data), put(result))); + check_hresult(WINRT_SHIM(IContactStore)->abi_SaveExtendedPropertiesAsync(get_abi(data), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateMeContactAsync(hstring_ref id) const +template Windows::Foundation::IAsyncOperation impl_IContactStore2::CreateMeContactAsync(hstring_view id) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateMeContactAsync(get(id), put(operation))); + check_hresult(WINRT_SHIM(IContactStore2)->abi_CreateMeContactAsync(get_abi(id), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IContactStoreStatics::CreateOrOpenAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateOrOpenAsync(put(operation))); + check_hresult(WINRT_SHIM(IContactStoreStatics)->abi_CreateOrOpenAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IContactStoreStatics::CreateOrOpenAsync(Windows::Phone::PersonalInformation::ContactStoreSystemAccessMode access, Windows::Phone::PersonalInformation::ContactStoreApplicationAccessMode sharing) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateOrOpenWithOptionsAsync(access, sharing, put(operation))); + check_hresult(WINRT_SHIM(IContactStoreStatics)->abi_CreateOrOpenWithOptionsAsync(access, sharing, put_abi(operation))); return operation; } template Windows::Phone::PersonalInformation::ContactChangeType impl_IContactChangeRecord::ChangeType() const { Windows::Phone::PersonalInformation::ContactChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IContactChangeRecord)->get_ChangeType(&value)); return value; } template uint64_t impl_IContactChangeRecord::RevisionNumber() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RevisionNumber(&value)); + check_hresult(WINRT_SHIM(IContactChangeRecord)->get_RevisionNumber(&value)); return value; } template hstring impl_IContactChangeRecord::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IContactChangeRecord)->get_Id(put_abi(value))); return value; } template hstring impl_IContactChangeRecord::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IContactChangeRecord)->get_RemoteId(put_abi(value))); return value; } @@ -2274,3 +2374,185 @@ inline StoredContact::StoredContact(const Windows::Phone::PersonalInformation::C } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactChangeRecord & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IContactStoreStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IKnownContactPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IStoredContact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::IStoredContactFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactChangeRecord & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::ContactStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::PersonalInformation::StoredContact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.Speech.Recognition.h b/10.0.14393.0/winrt/Windows.Phone.Speech.Recognition.h index f097380b5..eaa0e6773 100644 --- a/10.0.14393.0/winrt/Windows.Phone.Speech.Recognition.h +++ b/10.0.14393.0/winrt/Windows.Phone.Speech.Recognition.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Phone.Speech.Recognition.3.h" WINRT_EXPORT namespace winrt { @@ -12,3 +15,5 @@ namespace impl { } } + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.StartScreen.h b/10.0.14393.0/winrt/Windows.Phone.StartScreen.h index 55ce7183d..40169fbbe 100644 --- a/10.0.14393.0/winrt/Windows.Phone.StartScreen.h +++ b/10.0.14393.0/winrt/Windows.Phone.StartScreen.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Notifications.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.StartScreen.3.h" @@ -14,10 +17,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall put_DisplayName(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -27,11 +31,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -45,7 +50,8 @@ struct produce : produce_baseshim().IsPinnedToStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPinnedToStart()); return S_OK; } catch (...) @@ -54,11 +60,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_CreateAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateAsync()); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_UpdateAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAsync()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetTileForSim2(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetTileForSim2(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetTileForSim2()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTileForSim2()); return S_OK; } catch (...) @@ -114,11 +124,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_UpdateDisplayNameForSim1Async(abi_arg_in name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_UpdateDisplayNameForSim1Async(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateDisplayNameForSim1Async(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateDisplayNameForSim1Async(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -128,11 +139,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateTileUpdaterForSim1(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForSim1(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForSim1()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForSim1()); return S_OK; } catch (...) @@ -142,11 +154,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateTileUpdaterForSim2(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForSim2(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForSim2()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForSim2()); return S_OK; } catch (...) @@ -156,11 +169,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateBadgeUpdaterForSim1(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForSim1(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBadgeUpdaterForSim1()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBadgeUpdaterForSim1()); return S_OK; } catch (...) @@ -170,11 +184,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateBadgeUpdaterForSim2(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForSim2(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBadgeUpdaterForSim2()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBadgeUpdaterForSim2()); return S_OK; } catch (...) @@ -184,11 +199,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateToastNotifierForSim1(abi_arg_out notifier) noexcept override + HRESULT __stdcall abi_CreateToastNotifierForSim1(impl::abi_arg_out notifier) noexcept override { try { - *notifier = detach(this->shim().CreateToastNotifierForSim1()); + typename D::abi_guard guard(this->shim()); + *notifier = detach_abi(this->shim().CreateToastNotifierForSim1()); return S_OK; } catch (...) @@ -198,11 +214,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_CreateToastNotifierForSim2(abi_arg_out notifier) noexcept override + HRESULT __stdcall abi_CreateToastNotifierForSim2(impl::abi_arg_out notifier) noexcept override { try { - *notifier = detach(this->shim().CreateToastNotifierForSim2()); + typename D::abi_guard guard(this->shim()); + *notifier = detach_abi(this->shim().CreateToastNotifierForSim2()); return S_OK; } catch (...) @@ -216,11 +233,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateToastNotifierForSecondaryTile(abi_arg_in tileId, abi_arg_out notifier) noexcept override + HRESULT __stdcall abi_CreateToastNotifierForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out notifier) noexcept override { try { - *notifier = detach(this->shim().CreateToastNotifierForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *notifier = detach_abi(this->shim().CreateToastNotifierForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -235,106 +253,106 @@ struct produce Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerStatics3::CreateToastNotifierForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerStatics3::CreateToastNotifierForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::ToastNotifier notifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifierForSecondaryTile(get(tileId), put(notifier))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics3)->abi_CreateToastNotifierForSecondaryTile(get_abi(tileId), put_abi(notifier))); return notifier; } -template void impl_IDualSimTile::DisplayName(hstring_ref value) const +template void impl_IDualSimTile::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IDualSimTile)->put_DisplayName(get_abi(value))); } template hstring impl_IDualSimTile::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IDualSimTile)->get_DisplayName(put_abi(value))); return value; } template bool impl_IDualSimTile::IsPinnedToStart() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPinnedToStart(&value)); + check_hresult(WINRT_SHIM(IDualSimTile)->get_IsPinnedToStart(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IDualSimTile::CreateAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateAsync(put(operation))); + check_hresult(WINRT_SHIM(IDualSimTile)->abi_CreateAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDualSimTile::UpdateAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAsync(put(operation))); + check_hresult(WINRT_SHIM(IDualSimTile)->abi_UpdateAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDualSimTile::DeleteAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(put(operation))); + check_hresult(WINRT_SHIM(IDualSimTile)->abi_DeleteAsync(put_abi(operation))); return operation; } template Windows::Phone::StartScreen::DualSimTile impl_IDualSimTileStatics::GetTileForSim2() const { Windows::Phone::StartScreen::DualSimTile result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTileForSim2(put(result))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_GetTileForSim2(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IDualSimTileStatics::UpdateDisplayNameForSim1Async(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IDualSimTileStatics::UpdateDisplayNameForSim1Async(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateDisplayNameForSim1Async(get(name), put(operation))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_UpdateDisplayNameForSim1Async(get_abi(name), put_abi(operation))); return operation; } template Windows::UI::Notifications::TileUpdater impl_IDualSimTileStatics::CreateTileUpdaterForSim1() const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForSim1(put(updater))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateTileUpdaterForSim1(put_abi(updater))); return updater; } template Windows::UI::Notifications::TileUpdater impl_IDualSimTileStatics::CreateTileUpdaterForSim2() const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForSim2(put(updater))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateTileUpdaterForSim2(put_abi(updater))); return updater; } template Windows::UI::Notifications::BadgeUpdater impl_IDualSimTileStatics::CreateBadgeUpdaterForSim1() const { Windows::UI::Notifications::BadgeUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForSim1(put(updater))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateBadgeUpdaterForSim1(put_abi(updater))); return updater; } template Windows::UI::Notifications::BadgeUpdater impl_IDualSimTileStatics::CreateBadgeUpdaterForSim2() const { Windows::UI::Notifications::BadgeUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForSim2(put(updater))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateBadgeUpdaterForSim2(put_abi(updater))); return updater; } template Windows::UI::Notifications::ToastNotifier impl_IDualSimTileStatics::CreateToastNotifierForSim1() const { Windows::UI::Notifications::ToastNotifier notifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifierForSim1(put(notifier))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateToastNotifierForSim1(put_abi(notifier))); return notifier; } template Windows::UI::Notifications::ToastNotifier impl_IDualSimTileStatics::CreateToastNotifierForSim2() const { Windows::UI::Notifications::ToastNotifier notifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifierForSim2(put(notifier))); + check_hresult(WINRT_SHIM(IDualSimTileStatics)->abi_CreateToastNotifierForSim2(put_abi(notifier))); return notifier; } @@ -347,7 +365,7 @@ inline Windows::Phone::StartScreen::DualSimTile DualSimTile::GetTileForSim2() return get_activation_factory().GetTileForSim2(); } -inline Windows::Foundation::IAsyncOperation DualSimTile::UpdateDisplayNameForSim1Async(hstring_ref name) +inline Windows::Foundation::IAsyncOperation DualSimTile::UpdateDisplayNameForSim1Async(hstring_view name) { return get_activation_factory().UpdateDisplayNameForSim1Async(name); } @@ -385,3 +403,41 @@ inline Windows::UI::Notifications::ToastNotifier DualSimTile::CreateToastNotifie } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::StartScreen::IDualSimTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::StartScreen::IDualSimTileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::StartScreen::IToastNotificationManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::StartScreen::DualSimTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.System.Power.h b/10.0.14393.0/winrt/Windows.Phone.System.Power.h index bb7e7bb29..f9efe3921 100644 --- a/10.0.14393.0/winrt/Windows.Phone.System.Power.h +++ b/10.0.14393.0/winrt/Windows.Phone.System.Power.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.System.Power.3.h" #include "Windows.Phone.System.h" @@ -18,7 +21,8 @@ struct produce : produce { try { - *value = detach(this->shim().PowerSavingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSavingMode()); return S_OK; } catch (...) @@ -27,11 +31,12 @@ struct produce : produce } } - HRESULT __stdcall add_PowerSavingModeChanged(abi_arg_in> changeHandler, event_token * token) noexcept override + HRESULT __stdcall add_PowerSavingModeChanged(impl::abi_arg_in> changeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().PowerSavingModeChanged(*reinterpret_cast *>(&changeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PowerSavingModeChanged(*reinterpret_cast *>(&changeHandler))); return S_OK; } catch (...) @@ -44,6 +49,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PowerSavingModeChanged(token); return S_OK; } @@ -61,7 +67,8 @@ struct produce : produc { try { - *value = detach(this->shim().PowerSavingModeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSavingModeEnabled()); return S_OK; } catch (...) @@ -78,31 +85,31 @@ namespace Windows::Phone::System::Power { template Windows::Phone::System::Power::PowerSavingMode impl_IPowerManagerStatics::PowerSavingMode() const { Windows::Phone::System::Power::PowerSavingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSavingMode(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_PowerSavingMode(&value)); return value; } -template event_token impl_IPowerManagerStatics::PowerSavingModeChanged(const Windows::Foundation::EventHandler & changeHandler) const +template event_token impl_IPowerManagerStatics::PowerSavingModeChanged(const Windows::Foundation::EventHandler & changeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PowerSavingModeChanged(get(changeHandler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_PowerSavingModeChanged(get_abi(changeHandler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::PowerSavingModeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const +template event_revoker impl_IPowerManagerStatics::PowerSavingModeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Phone::System::Power::IPowerManagerStatics::remove_PowerSavingModeChanged, PowerSavingModeChanged(changeHandler)); } template void impl_IPowerManagerStatics::PowerSavingModeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PowerSavingModeChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_PowerSavingModeChanged(token)); } template bool impl_IPowerManagerStatics2::PowerSavingModeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSavingModeEnabled(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics2)->get_PowerSavingModeEnabled(&value)); return value; } @@ -111,12 +118,12 @@ inline Windows::Phone::System::Power::PowerSavingMode PowerManager::PowerSavingM return get_activation_factory().PowerSavingMode(); } -inline event_token PowerManager::PowerSavingModeChanged(const Windows::Foundation::EventHandler & changeHandler) +inline event_token PowerManager::PowerSavingModeChanged(const Windows::Foundation::EventHandler & changeHandler) { return get_activation_factory().PowerSavingModeChanged(changeHandler); } -inline factory_event_revoker PowerManager::PowerSavingModeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) +inline factory_event_revoker PowerManager::PowerSavingModeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Phone::System::Power::IPowerManagerStatics::remove_PowerSavingModeChanged, factory.PowerSavingModeChanged(changeHandler) }; @@ -135,3 +142,23 @@ inline bool PowerManager::PowerSavingModeEnabled() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::Power::IPowerManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::Power::IPowerManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.System.Profile.h b/10.0.14393.0/winrt/Windows.Phone.System.Profile.h index c0b970287..59336c749 100644 --- a/10.0.14393.0/winrt/Windows.Phone.System.Profile.h +++ b/10.0.14393.0/winrt/Windows.Phone.System.Profile.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Phone.System.Profile.3.h" #include "Windows.Phone.System.h" @@ -17,7 +20,8 @@ struct produce : produce { try { - *value = detach(this->shim().RetailModeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetailModeEnabled()); return S_OK; } catch (...) @@ -34,7 +38,7 @@ namespace Windows::Phone::System::Profile { template bool impl_IRetailModeStatics::RetailModeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RetailModeEnabled(&value)); + check_hresult(WINRT_SHIM(IRetailModeStatics)->get_RetailModeEnabled(&value)); return value; } @@ -46,3 +50,14 @@ inline bool RetailMode::RetailModeEnabled() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::Profile::IRetailModeStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.System.UserProfile.GameServices.Core.h b/10.0.14393.0/winrt/Windows.Phone.System.UserProfile.GameServices.Core.h index 93545323b..41d900c5c 100644 --- a/10.0.14393.0/winrt/Windows.Phone.System.UserProfile.GameServices.Core.h +++ b/10.0.14393.0/winrt/Windows.Phone.System.UserProfile.GameServices.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Phone.System.UserProfile.GameServices.Core.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ServiceUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceUri()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetGamerProfileAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetGamerProfileAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetGamerProfileAsync()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetInstalledGameItemsAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetInstalledGameItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetInstalledGameItemsAsync()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce audienceUri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPartnerTokenAsync(impl::abi_arg_in audienceUri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPartnerTokenAsync(*reinterpret_cast(&audienceUri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPartnerTokenAsync(*reinterpret_cast(&audienceUri))); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetPrivilegesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPrivilegesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPrivilegesAsync()); return S_OK; } catch (...) @@ -89,6 +97,7 @@ struct produceshim()); this->shim().GrantAchievement(achievementId); return S_OK; } @@ -102,6 +111,7 @@ struct produceshim()); this->shim().GrantAvatarAward(avatarAwardId); return S_OK; } @@ -111,10 +121,11 @@ struct produce buffer) noexcept override + HRESULT __stdcall abi_PostResult(uint32_t gameVariant, Windows::Phone::System::UserProfile::GameServices::Core::GameServiceScoreKind scoreKind, int64_t scoreValue, Windows::Phone::System::UserProfile::GameServices::Core::GameServiceGameOutcome gameOutcome, impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PostResult(gameVariant, scoreKind, scoreValue, gameOutcome, *reinterpret_cast(&buffer)); return S_OK; } @@ -128,10 +139,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_NotifyPartnerTokenExpired(abi_arg_in audienceUri) noexcept override + HRESULT __stdcall abi_NotifyPartnerTokenExpired(impl::abi_arg_in audienceUri) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyPartnerTokenExpired(*reinterpret_cast(&audienceUri)); return S_OK; } @@ -145,7 +157,8 @@ struct produceshim().GetAuthenticationStatus()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().GetAuthenticationStatus()); return S_OK; } catch (...) @@ -158,11 +171,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetPropertyAsync(abi_arg_in propertyName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPropertyAsync(impl::abi_arg_in propertyName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertyAsync(*reinterpret_cast(&propertyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertyAsync(*reinterpret_cast(&propertyName))); return S_OK; } catch (...) @@ -177,72 +191,72 @@ struct produce Windows::Foundation::IAsyncOperation impl_IGameServicePropertyCollection::GetPropertyAsync(hstring_ref propertyName) const +template Windows::Foundation::IAsyncOperation impl_IGameServicePropertyCollection::GetPropertyAsync(hstring_view propertyName) const { - Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertyAsync(get(propertyName), put(operation))); + Windows::Foundation::IAsyncOperation operation; + check_hresult(WINRT_SHIM(IGameServicePropertyCollection)->abi_GetPropertyAsync(get_abi(propertyName), put_abi(operation))); return operation; } template Windows::Foundation::Uri impl_IGameService::ServiceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServiceUri(put(value))); + check_hresult(WINRT_SHIM(IGameService)->get_ServiceUri(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IGameService::GetGamerProfileAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetGamerProfileAsync(put(operation))); + check_hresult(WINRT_SHIM(IGameService)->abi_GetGamerProfileAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IGameService::GetInstalledGameItemsAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetInstalledGameItemsAsync(put(operation))); + check_hresult(WINRT_SHIM(IGameService)->abi_GetInstalledGameItemsAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IGameService::GetPartnerTokenAsync(const Windows::Foundation::Uri & audienceUri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPartnerTokenAsync(get(audienceUri), put(operation))); + check_hresult(WINRT_SHIM(IGameService)->abi_GetPartnerTokenAsync(get_abi(audienceUri), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IGameService::GetPrivilegesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPrivilegesAsync(put(operation))); + check_hresult(WINRT_SHIM(IGameService)->abi_GetPrivilegesAsync(put_abi(operation))); return operation; } template void impl_IGameService::GrantAchievement(uint32_t achievementId) const { - check_hresult(static_cast(static_cast(*this))->abi_GrantAchievement(achievementId)); + check_hresult(WINRT_SHIM(IGameService)->abi_GrantAchievement(achievementId)); } template void impl_IGameService::GrantAvatarAward(uint32_t avatarAwardId) const { - check_hresult(static_cast(static_cast(*this))->abi_GrantAvatarAward(avatarAwardId)); + check_hresult(WINRT_SHIM(IGameService)->abi_GrantAvatarAward(avatarAwardId)); } template void impl_IGameService::PostResult(uint32_t gameVariant, Windows::Phone::System::UserProfile::GameServices::Core::GameServiceScoreKind scoreKind, int64_t scoreValue, Windows::Phone::System::UserProfile::GameServices::Core::GameServiceGameOutcome gameOutcome, const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_PostResult(gameVariant, scoreKind, scoreValue, gameOutcome, get(buffer))); + check_hresult(WINRT_SHIM(IGameService)->abi_PostResult(gameVariant, scoreKind, scoreValue, gameOutcome, get_abi(buffer))); } template void impl_IGameService2::NotifyPartnerTokenExpired(const Windows::Foundation::Uri & audienceUri) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyPartnerTokenExpired(get(audienceUri))); + check_hresult(WINRT_SHIM(IGameService2)->abi_NotifyPartnerTokenExpired(get_abi(audienceUri))); } template uint32_t impl_IGameService2::GetAuthenticationStatus() const { uint32_t status {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAuthenticationStatus(&status)); + check_hresult(WINRT_SHIM(IGameService2)->abi_GetAuthenticationStatus(&status)); return status; } @@ -299,3 +313,41 @@ inline uint32_t GameService::GetAuthenticationStatus() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::UserProfile::GameServices::Core::IGameService & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::UserProfile::GameServices::Core::IGameService2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::UserProfile::GameServices::Core::IGameServicePropertyCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::UserProfile::GameServices::Core::GameServicePropertyCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.System.h b/10.0.14393.0/winrt/Windows.Phone.System.h index f8cb36a3a..21181d125 100644 --- a/10.0.14393.0/winrt/Windows.Phone.System.h +++ b/10.0.14393.0/winrt/Windows.Phone.System.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Phone.System.3.h" WINRT_EXPORT namespace winrt { @@ -16,7 +19,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ScreenLocked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenLocked()); return S_OK; } catch (...) @@ -33,6 +37,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestScreenUnlock(); return S_OK; } @@ -50,13 +55,13 @@ namespace Windows::Phone::System { template bool impl_ISystemProtectionStatics::ScreenLocked() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ScreenLocked(&value)); + check_hresult(WINRT_SHIM(ISystemProtectionStatics)->get_ScreenLocked(&value)); return value; } template void impl_ISystemProtectionUnlockStatics::RequestScreenUnlock() const { - check_hresult(static_cast(static_cast(*this))->abi_RequestScreenUnlock()); + check_hresult(WINRT_SHIM(ISystemProtectionUnlockStatics)->abi_RequestScreenUnlock()); } inline bool SystemProtection::ScreenLocked() @@ -72,3 +77,23 @@ inline void SystemProtection::RequestScreenUnlock() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::ISystemProtectionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::System::ISystemProtectionUnlockStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Phone.UI.Input.h b/10.0.14393.0/winrt/Windows.Phone.UI.Input.h index 567191007..baa6b2bfe 100644 --- a/10.0.14393.0/winrt/Windows.Phone.UI.Input.h +++ b/10.0.14393.0/winrt/Windows.Phone.UI.Input.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Phone.UI.Input.3.h" @@ -17,7 +20,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -30,6 +34,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return S_OK; } @@ -47,11 +52,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_BackPressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_BackPressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BackPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BackPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -64,6 +70,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().BackPressed(token); return S_OK; } @@ -77,11 +84,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall add_CameraHalfPressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraHalfPressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraHalfPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraHalfPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -94,6 +102,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraHalfPressed(token); return S_OK; } @@ -103,11 +112,12 @@ struct produce : produce } } - HRESULT __stdcall add_CameraPressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraPressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -120,6 +130,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraPressed(token); return S_OK; } @@ -129,11 +140,12 @@ struct produce : produce } } - HRESULT __stdcall add_CameraReleased(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_CameraReleased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CameraReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CameraReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -146,6 +158,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraReleased(token); return S_OK; } @@ -163,7 +176,7 @@ namespace Windows::Phone::UI::Input { template event_token impl_IHardwareButtonsStatics::BackPressed(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BackPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics)->add_BackPressed(get_abi(handler), &token)); return token; } @@ -174,13 +187,13 @@ template event_revoker impl_IHardwareButto template void impl_IHardwareButtonsStatics::BackPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BackPressed(token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics)->remove_BackPressed(token)); } template event_token impl_IHardwareButtonsStatics2::CameraHalfPressed(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraHalfPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->add_CameraHalfPressed(get_abi(handler), &token)); return token; } @@ -191,13 +204,13 @@ template event_revoker impl_IHardwareButt template void impl_IHardwareButtonsStatics2::CameraHalfPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraHalfPressed(token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->remove_CameraHalfPressed(token)); } template event_token impl_IHardwareButtonsStatics2::CameraPressed(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraPressed(get(handler), &token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->add_CameraPressed(get_abi(handler), &token)); return token; } @@ -208,13 +221,13 @@ template event_revoker impl_IHardwareButt template void impl_IHardwareButtonsStatics2::CameraPressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraPressed(token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->remove_CameraPressed(token)); } template event_token impl_IHardwareButtonsStatics2::CameraReleased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CameraReleased(get(handler), &token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->add_CameraReleased(get_abi(handler), &token)); return token; } @@ -225,19 +238,19 @@ template event_revoker impl_IHardwareButt template void impl_IHardwareButtonsStatics2::CameraReleased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CameraReleased(token)); + check_hresult(WINRT_SHIM(IHardwareButtonsStatics2)->remove_CameraReleased(token)); } template bool impl_IBackPressedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IBackPressedEventArgs)->get_Handled(&value)); return value; } template void impl_IBackPressedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IBackPressedEventArgs)->put_Handled(value)); } inline event_token HardwareButtons::BackPressed(const Windows::Foundation::EventHandler & handler) @@ -307,3 +320,59 @@ inline void HardwareButtons::CameraReleased(event_token token) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::IBackPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::ICameraEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::IHardwareButtonsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::IHardwareButtonsStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::BackPressedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Phone::UI::Input::CameraEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Core.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Core.h index 000808718..e6f44c852 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Core.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Security.Authentication.Identity.Core.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetOneTimePassCodeAsync(abi_arg_in userAccountId, uint32_t codeLength, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_GetOneTimePassCodeAsync(impl::abi_arg_in userAccountId, uint32_t codeLength, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().GetOneTimePassCodeAsync(*reinterpret_cast(&userAccountId), codeLength)); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().GetOneTimePassCodeAsync(*reinterpret_cast(&userAccountId), codeLength)); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce userAccountId, abi_arg_in authenticationToken, abi_arg_in wnsChannelId, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_AddDeviceAsync(impl::abi_arg_in userAccountId, impl::abi_arg_in authenticationToken, impl::abi_arg_in wnsChannelId, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().AddDeviceAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&authenticationToken), *reinterpret_cast(&wnsChannelId))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().AddDeviceAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&authenticationToken), *reinterpret_cast(&wnsChannelId))); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce userAccountId, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_RemoveDeviceAsync(impl::abi_arg_in userAccountId, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().RemoveDeviceAsync(*reinterpret_cast(&userAccountId))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().RemoveDeviceAsync(*reinterpret_cast(&userAccountId))); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce userAccountId, abi_arg_in channelUri, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_UpdateWnsChannelAsync(impl::abi_arg_in userAccountId, impl::abi_arg_in channelUri, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().UpdateWnsChannelAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&channelUri))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().UpdateWnsChannelAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&channelUri))); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce> userAccountIdList, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_GetSessionsAsync(impl::abi_arg_in> userAccountIdList, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().GetSessionsAsync(*reinterpret_cast *>(&userAccountIdList))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().GetSessionsAsync(*reinterpret_cast *>(&userAccountIdList))); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce> userAccountIdList, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_GetSessionsAndUnregisteredAccountsAsync(impl::abi_arg_in> userAccountIdList, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().GetSessionsAndUnregisteredAccountsAsync(*reinterpret_cast *>(&userAccountIdList))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().GetSessionsAndUnregisteredAccountsAsync(*reinterpret_cast *>(&userAccountIdList))); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce authenticationSessionInfo, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_ApproveSessionUsingAuthSessionInfoAsync(Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus sessionAuthentictionStatus, impl::abi_arg_in authenticationSessionInfo, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().ApproveSessionAsync(sessionAuthentictionStatus, *reinterpret_cast(&authenticationSessionInfo))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().ApproveSessionAsync(sessionAuthentictionStatus, *reinterpret_cast(&authenticationSessionInfo))); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce userAccountId, abi_arg_in sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_ApproveSessionAsync(Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus sessionAuthentictionStatus, impl::abi_arg_in userAccountId, impl::abi_arg_in sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().ApproveSessionAsync(sessionAuthentictionStatus, *reinterpret_cast(&userAccountId), *reinterpret_cast(&sessionId), sessionAuthenticationType)); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().ApproveSessionAsync(sessionAuthentictionStatus, *reinterpret_cast(&userAccountId), *reinterpret_cast(&sessionId), sessionAuthenticationType)); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce authenticationSessionInfo, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_DenySessionUsingAuthSessionInfoAsync(impl::abi_arg_in authenticationSessionInfo, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().DenySessionAsync(*reinterpret_cast(&authenticationSessionInfo))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().DenySessionAsync(*reinterpret_cast(&authenticationSessionInfo))); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce userAccountId, abi_arg_in sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_DenySessionAsync(impl::abi_arg_in userAccountId, impl::abi_arg_in sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().DenySessionAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&sessionId), sessionAuthenticationType)); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().DenySessionAsync(*reinterpret_cast(&userAccountId), *reinterpret_cast(&sessionId), sessionAuthenticationType)); return S_OK; } catch (...) @@ -159,11 +172,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Sessions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Sessions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Sessions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sessions()); return S_OK; } catch (...) @@ -195,7 +210,8 @@ struct produceshim().ServiceResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceResponse()); return S_OK; } catch (...) @@ -208,11 +224,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Code(abi_arg_out value) noexcept override + HRESULT __stdcall get_Code(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Code()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Code()); return S_OK; } catch (...) @@ -222,11 +239,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TimeInterval(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeInterval()); return S_OK; } catch (...) @@ -235,11 +253,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TimeToLive(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeToLive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeToLive()); return S_OK; } catch (...) @@ -252,7 +271,8 @@ struct produceshim().ServiceResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceResponse()); return S_OK; } catch (...) @@ -265,11 +285,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UserAccountId(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserAccountId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserAccountId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserAccountId()); return S_OK; } catch (...) @@ -279,11 +300,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SessionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionId()); return S_OK; } catch (...) @@ -293,11 +315,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisplaySessionId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplaySessionId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplaySessionId()); return S_OK; } catch (...) @@ -311,7 +334,8 @@ struct produceshim().ApprovalStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApprovalStatus()); return S_OK; } catch (...) @@ -324,7 +348,8 @@ struct produceshim().AuthenticationType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationType()); return S_OK; } catch (...) @@ -333,11 +358,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RequestTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequestTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestTime()); return S_OK; } catch (...) @@ -346,11 +372,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -363,11 +390,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Sessions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Sessions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Sessions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sessions()); return S_OK; } catch (...) @@ -377,11 +405,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_UnregisteredAccounts(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UnregisteredAccounts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnregisteredAccounts()); return S_OK; } catch (...) @@ -395,7 +424,8 @@ struct produceshim().ServiceResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceResponse()); return S_OK; } catch (...) @@ -412,189 +442,189 @@ namespace Windows::Security::Authentication::Identity::Core { template hstring impl_IMicrosoftAccountMultiFactorSessionInfo::UserAccountId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserAccountId(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_UserAccountId(put_abi(value))); return value; } template hstring impl_IMicrosoftAccountMultiFactorSessionInfo::SessionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SessionId(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_SessionId(put_abi(value))); return value; } template hstring impl_IMicrosoftAccountMultiFactorSessionInfo::DisplaySessionId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplaySessionId(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_DisplaySessionId(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionApprovalStatus impl_IMicrosoftAccountMultiFactorSessionInfo::ApprovalStatus() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionApprovalStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ApprovalStatus(&value)); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_ApprovalStatus(&value)); return value; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType impl_IMicrosoftAccountMultiFactorSessionInfo::AuthenticationType() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationType(&value)); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_AuthenticationType(&value)); return value; } template Windows::Foundation::DateTime impl_IMicrosoftAccountMultiFactorSessionInfo::RequestTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestTime(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_RequestTime(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IMicrosoftAccountMultiFactorSessionInfo::ExpirationTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorSessionInfo)->get_ExpirationTime(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMicrosoftAccountMultiFactorGetSessionsResult::Sessions() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Sessions(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorGetSessionsResult)->get_Sessions(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse impl_IMicrosoftAccountMultiFactorGetSessionsResult::ServiceResponse() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceResponse(&value)); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorGetSessionsResult)->get_ServiceResponse(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo::Sessions() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Sessions(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo)->get_Sessions(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo::UnregisteredAccounts() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_UnregisteredAccounts(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo)->get_UnregisteredAccounts(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse impl_IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo::ServiceResponse() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceResponse(&value)); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo)->get_ServiceResponse(&value)); return value; } template hstring impl_IMicrosoftAccountMultiFactorOneTimeCodedInfo::Code() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Code(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorOneTimeCodedInfo)->get_Code(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMicrosoftAccountMultiFactorOneTimeCodedInfo::TimeInterval() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeInterval(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorOneTimeCodedInfo)->get_TimeInterval(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMicrosoftAccountMultiFactorOneTimeCodedInfo::TimeToLive() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeToLive(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorOneTimeCodedInfo)->get_TimeToLive(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse impl_IMicrosoftAccountMultiFactorOneTimeCodedInfo::ServiceResponse() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorServiceResponse value {}; - check_hresult(static_cast(static_cast(*this))->get_ServiceResponse(&value)); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorOneTimeCodedInfo)->get_ServiceResponse(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetOneTimePassCodeAsync(hstring_ref userAccountId, uint32_t codeLength) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetOneTimePassCodeAsync(hstring_view userAccountId, uint32_t codeLength) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetOneTimePassCodeAsync(get(userAccountId), codeLength, put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_GetOneTimePassCodeAsync(get_abi(userAccountId), codeLength, put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::AddDeviceAsync(hstring_ref userAccountId, hstring_ref authenticationToken, hstring_ref wnsChannelId) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::AddDeviceAsync(hstring_view userAccountId, hstring_view authenticationToken, hstring_view wnsChannelId) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_AddDeviceAsync(get(userAccountId), get(authenticationToken), get(wnsChannelId), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_AddDeviceAsync(get_abi(userAccountId), get_abi(authenticationToken), get_abi(wnsChannelId), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::RemoveDeviceAsync(hstring_ref userAccountId) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::RemoveDeviceAsync(hstring_view userAccountId) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_RemoveDeviceAsync(get(userAccountId), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_RemoveDeviceAsync(get_abi(userAccountId), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::UpdateWnsChannelAsync(hstring_ref userAccountId, hstring_ref channelUri) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::UpdateWnsChannelAsync(hstring_view userAccountId, hstring_view channelUri) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateWnsChannelAsync(get(userAccountId), get(channelUri), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_UpdateWnsChannelAsync(get_abi(userAccountId), get_abi(channelUri), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetSessionsAsync(const Windows::Foundation::Collections::IIterable & userAccountIdList) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetSessionsAsync(iterable userAccountIdList) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetSessionsAsync(get(userAccountIdList), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_GetSessionsAsync(get_abi(userAccountIdList), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetSessionsAndUnregisteredAccountsAsync(const Windows::Foundation::Collections::IIterable & userAccountIdList) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::GetSessionsAndUnregisteredAccountsAsync(iterable userAccountIdList) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetSessionsAndUnregisteredAccountsAsync(get(userAccountIdList), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_GetSessionsAndUnregisteredAccountsAsync(get_abi(userAccountIdList), put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::ApproveSessionAsync(Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus sessionAuthentictionStatus, const Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo & authenticationSessionInfo) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ApproveSessionUsingAuthSessionInfoAsync(sessionAuthentictionStatus, get(authenticationSessionInfo), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_ApproveSessionUsingAuthSessionInfoAsync(sessionAuthentictionStatus, get_abi(authenticationSessionInfo), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::ApproveSessionAsync(Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus sessionAuthentictionStatus, hstring_ref userAccountId, hstring_ref sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::ApproveSessionAsync(Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus sessionAuthentictionStatus, hstring_view userAccountId, hstring_view sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ApproveSessionAsync(sessionAuthentictionStatus, get(userAccountId), get(sessionId), sessionAuthenticationType, put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_ApproveSessionAsync(sessionAuthentictionStatus, get_abi(userAccountId), get_abi(sessionId), sessionAuthenticationType, put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::DenySessionAsync(const Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo & authenticationSessionInfo) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_DenySessionUsingAuthSessionInfoAsync(get(authenticationSessionInfo), put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_DenySessionUsingAuthSessionInfoAsync(get_abi(authenticationSessionInfo), put_abi(asyncOperation))); return asyncOperation; } -template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::DenySessionAsync(hstring_ref userAccountId, hstring_ref sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType) const +template Windows::Foundation::IAsyncOperation impl_IMicrosoftAccountMultiFactorAuthenticationManager::DenySessionAsync(hstring_view userAccountId, hstring_view sessionId, Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType sessionAuthenticationType) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_DenySessionAsync(get(userAccountId), get(sessionId), sessionAuthenticationType, put(asyncOperation))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticationManager)->abi_DenySessionAsync(get_abi(userAccountId), get_abi(sessionId), sessionAuthenticationType, put_abi(asyncOperation))); return asyncOperation; } template Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager impl_IMicrosoftAccountMultiFactorAuthenticatorStatics::Current() const { Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IMicrosoftAccountMultiFactorAuthenticatorStatics)->get_Current(put_abi(value))); return value; } @@ -606,3 +636,104 @@ inline Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiF } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorAuthenticationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorAuthenticatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorGetSessionsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorOneTimeCodedInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorSessionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Provider.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Provider.h index 444cf0347..f7fe18360 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Provider.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.Authentication.Identity.Provider.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ServiceAuthenticationHmac(abi_arg_out value) noexcept override + HRESULT __stdcall get_ServiceAuthenticationHmac(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceAuthenticationHmac()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceAuthenticationHmac()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SessionNonce(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionNonce()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionNonce()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceNonce(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceNonce()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceNonce()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceConfigurationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceConfigurationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceConfigurationData()); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce deviceHmac, abi_arg_in sessionHmac, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FinishAuthenticationAsync(impl::abi_arg_in deviceHmac, impl::abi_arg_in sessionHmac, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FinishAuthenticationAsync(*reinterpret_cast(&deviceHmac), *reinterpret_cast(&sessionHmac))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FinishAuthenticationAsync(*reinterpret_cast(&deviceHmac), *reinterpret_cast(&sessionHmac))); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce errorLogMessage, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AbortAuthenticationAsync(impl::abi_arg_in errorLogMessage, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AbortAuthenticationAsync(*reinterpret_cast(&errorLogMessage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AbortAuthenticationAsync(*reinterpret_cast(&errorLogMessage))); return S_OK; } catch (...) @@ -107,7 +116,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Authentication(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Authentication()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Authentication()); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_StageInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_StageInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StageInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StageInfo()); return S_OK; } catch (...) @@ -156,7 +168,8 @@ struct produceshim().Stage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stage()); return S_OK; } catch (...) @@ -169,7 +182,8 @@ struct produceshim().Scenario()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scenario()); return S_OK; } catch (...) @@ -178,11 +192,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -196,11 +211,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ShowNotificationMessageAsync(abi_arg_in deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message, abi_arg_out result) noexcept override + HRESULT __stdcall abi_ShowNotificationMessageAsync(impl::abi_arg_in deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ShowNotificationMessageAsync(*reinterpret_cast(&deviceName), message)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ShowNotificationMessageAsync(*reinterpret_cast(&deviceName), message)); return S_OK; } catch (...) @@ -210,11 +226,12 @@ struct produce deviceId, abi_arg_in serviceAuthenticationNonce, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_StartAuthenticationAsync(impl::abi_arg_in deviceId, impl::abi_arg_in serviceAuthenticationNonce, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StartAuthenticationAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&serviceAuthenticationNonce))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartAuthenticationAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&serviceAuthenticationNonce))); return S_OK; } catch (...) @@ -224,11 +241,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_AuthenticationStageChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AuthenticationStageChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AuthenticationStageChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -241,6 +259,7 @@ struct produceshim()); this->shim().AuthenticationStageChanged(token); return S_OK; } @@ -250,11 +269,12 @@ struct produce> result) noexcept override + HRESULT __stdcall abi_GetAuthenticationStageInfoAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetAuthenticationStageInfoAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetAuthenticationStageInfoAsync()); return S_OK; } catch (...) @@ -268,11 +288,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out deviceId) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out deviceId) noexcept override { try { - *deviceId = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *deviceId = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -282,11 +303,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceFriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceFriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceFriendlyName()); return S_OK; } catch (...) @@ -296,11 +318,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceModelNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceModelNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceModelNumber()); return S_OK; } catch (...) @@ -310,11 +333,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DeviceConfigurationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceConfigurationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceConfigurationData()); return S_OK; } catch (...) @@ -328,11 +352,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FinishRegisteringDeviceAsync(abi_arg_in deviceConfigurationData, abi_arg_out result) noexcept override + HRESULT __stdcall abi_FinishRegisteringDeviceAsync(impl::abi_arg_in deviceConfigurationData, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().FinishRegisteringDeviceAsync(*reinterpret_cast(&deviceConfigurationData))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FinishRegisteringDeviceAsync(*reinterpret_cast(&deviceConfigurationData))); return S_OK; } catch (...) @@ -342,11 +367,12 @@ struct produce errorLogMessage, abi_arg_out result) noexcept override + HRESULT __stdcall abi_AbortRegisteringDeviceAsync(impl::abi_arg_in errorLogMessage, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().AbortRegisteringDeviceAsync(*reinterpret_cast(&errorLogMessage))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().AbortRegisteringDeviceAsync(*reinterpret_cast(&errorLogMessage))); return S_OK; } catch (...) @@ -364,7 +390,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -373,11 +400,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Registration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Registration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Registration()); return S_OK; } catch (...) @@ -391,11 +419,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestStartRegisteringDeviceAsync(abi_arg_in deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, abi_arg_in deviceFriendlyName, abi_arg_in deviceModelNumber, abi_arg_in deviceKey, abi_arg_in mutualAuthenticationKey, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStartRegisteringDeviceAsync(impl::abi_arg_in deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, impl::abi_arg_in deviceFriendlyName, impl::abi_arg_in deviceModelNumber, impl::abi_arg_in deviceKey, impl::abi_arg_in mutualAuthenticationKey, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStartRegisteringDeviceAsync(*reinterpret_cast(&deviceId), capabilities, *reinterpret_cast(&deviceFriendlyName), *reinterpret_cast(&deviceModelNumber), *reinterpret_cast(&deviceKey), *reinterpret_cast(&mutualAuthenticationKey))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStartRegisteringDeviceAsync(*reinterpret_cast(&deviceId), capabilities, *reinterpret_cast(&deviceFriendlyName), *reinterpret_cast(&deviceModelNumber), *reinterpret_cast(&deviceKey), *reinterpret_cast(&mutualAuthenticationKey))); return S_OK; } catch (...) @@ -405,11 +434,12 @@ struct produce>> deviceInfoList) noexcept override + HRESULT __stdcall abi_FindAllRegisteredDeviceInfoAsync(Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceFindScope queryType, impl::abi_arg_out>> deviceInfoList) noexcept override { try { - *deviceInfoList = detach(this->shim().FindAllRegisteredDeviceInfoAsync(queryType)); + typename D::abi_guard guard(this->shim()); + *deviceInfoList = detach_abi(this->shim().FindAllRegisteredDeviceInfoAsync(queryType)); return S_OK; } catch (...) @@ -419,11 +449,12 @@ struct produce deviceId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UnregisterDeviceAsync(impl::abi_arg_in deviceId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UnregisterDeviceAsync(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnregisterDeviceAsync(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -433,11 +464,12 @@ struct produce deviceId, abi_arg_in deviceConfigurationData, abi_arg_out result) noexcept override + HRESULT __stdcall abi_UpdateDeviceConfigurationDataAsync(impl::abi_arg_in deviceId, impl::abi_arg_in deviceConfigurationData, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().UpdateDeviceConfigurationDataAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&deviceConfigurationData))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UpdateDeviceConfigurationDataAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&deviceConfigurationData))); return S_OK; } catch (...) @@ -455,91 +487,91 @@ namespace Windows::Security::Authentication::Identity::Provider { template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistrationStatus impl_ISecondaryAuthenticationFactorRegistrationResult::Status() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistrationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationResult)->get_Status(&value)); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistration impl_ISecondaryAuthenticationFactorRegistrationResult::Registration() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Registration(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationResult)->get_Registration(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStatus impl_ISecondaryAuthenticationFactorAuthenticationResult::Status() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationResult)->get_Status(&value)); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthentication impl_ISecondaryAuthenticationFactorAuthenticationResult::Authentication() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthentication value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Authentication(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationResult)->get_Authentication(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorRegistrationStatics::RequestStartRegisteringDeviceAsync(hstring_ref deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, hstring_ref deviceFriendlyName, hstring_ref deviceModelNumber, const Windows::Storage::Streams::IBuffer & deviceKey, const Windows::Storage::Streams::IBuffer & mutualAuthenticationKey) const +template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorRegistrationStatics::RequestStartRegisteringDeviceAsync(hstring_view deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, hstring_view deviceFriendlyName, hstring_view deviceModelNumber, const Windows::Storage::Streams::IBuffer & deviceKey, const Windows::Storage::Streams::IBuffer & mutualAuthenticationKey) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStartRegisteringDeviceAsync(get(deviceId), capabilities, get(deviceFriendlyName), get(deviceModelNumber), get(deviceKey), get(mutualAuthenticationKey), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationStatics)->abi_RequestStartRegisteringDeviceAsync(get_abi(deviceId), capabilities, get_abi(deviceFriendlyName), get_abi(deviceModelNumber), get_abi(deviceKey), get_abi(mutualAuthenticationKey), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_ISecondaryAuthenticationFactorRegistrationStatics::FindAllRegisteredDeviceInfoAsync(Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceFindScope queryType) const { Windows::Foundation::IAsyncOperation> deviceInfoList; - check_hresult(static_cast(static_cast(*this))->abi_FindAllRegisteredDeviceInfoAsync(queryType, put(deviceInfoList))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationStatics)->abi_FindAllRegisteredDeviceInfoAsync(queryType, put_abi(deviceInfoList))); return deviceInfoList; } -template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistrationStatics::UnregisterDeviceAsync(hstring_ref deviceId) const +template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistrationStatics::UnregisterDeviceAsync(hstring_view deviceId) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UnregisterDeviceAsync(get(deviceId), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationStatics)->abi_UnregisterDeviceAsync(get_abi(deviceId), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistrationStatics::UpdateDeviceConfigurationDataAsync(hstring_ref deviceId, const Windows::Storage::Streams::IBuffer & deviceConfigurationData) const +template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistrationStatics::UpdateDeviceConfigurationDataAsync(hstring_view deviceId, const Windows::Storage::Streams::IBuffer & deviceConfigurationData) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_UpdateDeviceConfigurationDataAsync(get(deviceId), get(deviceConfigurationData), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistrationStatics)->abi_UpdateDeviceConfigurationDataAsync(get_abi(deviceId), get_abi(deviceConfigurationData), put_abi(result))); return result; } template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistration::FinishRegisteringDeviceAsync(const Windows::Storage::Streams::IBuffer & deviceConfigurationData) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_FinishRegisteringDeviceAsync(get(deviceConfigurationData), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistration)->abi_FinishRegisteringDeviceAsync(get_abi(deviceConfigurationData), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistration::AbortRegisteringDeviceAsync(hstring_ref errorLogMessage) const +template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorRegistration::AbortRegisteringDeviceAsync(hstring_view errorLogMessage) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AbortRegisteringDeviceAsync(get(errorLogMessage), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorRegistration)->abi_AbortRegisteringDeviceAsync(get_abi(errorLogMessage), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorAuthenticationStatics::ShowNotificationMessageAsync(hstring_ref deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message) const +template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorAuthenticationStatics::ShowNotificationMessageAsync(hstring_view deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_ShowNotificationMessageAsync(get(deviceName), message, put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStatics)->abi_ShowNotificationMessageAsync(get_abi(deviceName), message, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorAuthenticationStatics::StartAuthenticationAsync(hstring_ref deviceId, const Windows::Storage::Streams::IBuffer & serviceAuthenticationNonce) const +template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorAuthenticationStatics::StartAuthenticationAsync(hstring_view deviceId, const Windows::Storage::Streams::IBuffer & serviceAuthenticationNonce) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_StartAuthenticationAsync(get(deviceId), get(serviceAuthenticationNonce), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStatics)->abi_StartAuthenticationAsync(get_abi(deviceId), get_abi(serviceAuthenticationNonce), put_abi(operation))); return operation; } template event_token impl_ISecondaryAuthenticationFactorAuthenticationStatics::AuthenticationStageChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AuthenticationStageChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStatics)->add_AuthenticationStageChanged(get_abi(handler), &token)); return token; } @@ -550,120 +582,120 @@ template event_revoker void impl_ISecondaryAuthenticationFactorAuthenticationStatics::AuthenticationStageChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AuthenticationStageChanged(token)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStatics)->remove_AuthenticationStageChanged(token)); } template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorAuthenticationStatics::GetAuthenticationStageInfoAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetAuthenticationStageInfoAsync(put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStatics)->abi_GetAuthenticationStageInfoAsync(put_abi(result))); return result; } template Windows::Storage::Streams::IBuffer impl_ISecondaryAuthenticationFactorAuthentication::ServiceAuthenticationHmac() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_ServiceAuthenticationHmac(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->get_ServiceAuthenticationHmac(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISecondaryAuthenticationFactorAuthentication::SessionNonce() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_SessionNonce(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->get_SessionNonce(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISecondaryAuthenticationFactorAuthentication::DeviceNonce() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DeviceNonce(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->get_DeviceNonce(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISecondaryAuthenticationFactorAuthentication::DeviceConfigurationData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DeviceConfigurationData(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->get_DeviceConfigurationData(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISecondaryAuthenticationFactorAuthentication::FinishAuthenticationAsync(const Windows::Storage::Streams::IBuffer & deviceHmac, const Windows::Storage::Streams::IBuffer & sessionHmac) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FinishAuthenticationAsync(get(deviceHmac), get(sessionHmac), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->abi_FinishAuthenticationAsync(get_abi(deviceHmac), get_abi(sessionHmac), put_abi(result))); return result; } -template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorAuthentication::AbortAuthenticationAsync(hstring_ref errorLogMessage) const +template Windows::Foundation::IAsyncAction impl_ISecondaryAuthenticationFactorAuthentication::AbortAuthenticationAsync(hstring_view errorLogMessage) const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_AbortAuthenticationAsync(get(errorLogMessage), put(result))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthentication)->abi_AbortAuthenticationAsync(get_abi(errorLogMessage), put_abi(result))); return result; } template hstring impl_ISecondaryAuthenticationFactorInfo::DeviceId() const { hstring deviceId; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(deviceId))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorInfo)->get_DeviceId(put_abi(deviceId))); return deviceId; } template hstring impl_ISecondaryAuthenticationFactorInfo::DeviceFriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceFriendlyName(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorInfo)->get_DeviceFriendlyName(put_abi(value))); return value; } template hstring impl_ISecondaryAuthenticationFactorInfo::DeviceModelNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceModelNumber(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorInfo)->get_DeviceModelNumber(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISecondaryAuthenticationFactorInfo::DeviceConfigurationData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_DeviceConfigurationData(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorInfo)->get_DeviceConfigurationData(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStage impl_ISecondaryAuthenticationFactorAuthenticationStageInfo::Stage() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStage value {}; - check_hresult(static_cast(static_cast(*this))->get_Stage(&value)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStageInfo)->get_Stage(&value)); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationScenario impl_ISecondaryAuthenticationFactorAuthenticationStageInfo::Scenario() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationScenario value {}; - check_hresult(static_cast(static_cast(*this))->get_Scenario(&value)); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStageInfo)->get_Scenario(&value)); return value; } template hstring impl_ISecondaryAuthenticationFactorAuthenticationStageInfo::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStageInfo)->get_DeviceId(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStageInfo impl_ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs::StageInfo() const { Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStageInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StageInfo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs)->get_StageInfo(put_abi(value))); return value; } -inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorAuthentication::ShowNotificationMessageAsync(hstring_ref deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message) +inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorAuthentication::ShowNotificationMessageAsync(hstring_view deviceName, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationMessage message) { return get_activation_factory().ShowNotificationMessageAsync(deviceName, message); } -inline Windows::Foundation::IAsyncOperation SecondaryAuthenticationFactorAuthentication::StartAuthenticationAsync(hstring_ref deviceId, const Windows::Storage::Streams::IBuffer & serviceAuthenticationNonce) +inline Windows::Foundation::IAsyncOperation SecondaryAuthenticationFactorAuthentication::StartAuthenticationAsync(hstring_view deviceId, const Windows::Storage::Streams::IBuffer & serviceAuthenticationNonce) { return get_activation_factory().StartAuthenticationAsync(deviceId, serviceAuthenticationNonce); } @@ -689,7 +721,7 @@ inline Windows::Foundation::IAsyncOperation().GetAuthenticationStageInfoAsync(); } -inline Windows::Foundation::IAsyncOperation SecondaryAuthenticationFactorRegistration::RequestStartRegisteringDeviceAsync(hstring_ref deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, hstring_ref deviceFriendlyName, hstring_ref deviceModelNumber, const Windows::Storage::Streams::IBuffer & deviceKey, const Windows::Storage::Streams::IBuffer & mutualAuthenticationKey) +inline Windows::Foundation::IAsyncOperation SecondaryAuthenticationFactorRegistration::RequestStartRegisteringDeviceAsync(hstring_view deviceId, Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorDeviceCapabilities capabilities, hstring_view deviceFriendlyName, hstring_view deviceModelNumber, const Windows::Storage::Streams::IBuffer & deviceKey, const Windows::Storage::Streams::IBuffer & mutualAuthenticationKey) { return get_activation_factory().RequestStartRegisteringDeviceAsync(deviceId, capabilities, deviceFriendlyName, deviceModelNumber, deviceKey, mutualAuthenticationKey); } @@ -699,12 +731,12 @@ inline Windows::Foundation::IAsyncOperation().FindAllRegisteredDeviceInfoAsync(queryType); } -inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorRegistration::UnregisterDeviceAsync(hstring_ref deviceId) +inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorRegistration::UnregisterDeviceAsync(hstring_view deviceId) { return get_activation_factory().UnregisterDeviceAsync(deviceId); } -inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorRegistration::UpdateDeviceConfigurationDataAsync(hstring_ref deviceId, const Windows::Storage::Streams::IBuffer & deviceConfigurationData) +inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorRegistration::UpdateDeviceConfigurationDataAsync(hstring_view deviceId, const Windows::Storage::Streams::IBuffer & deviceConfigurationData) { return get_activation_factory().UpdateDeviceConfigurationDataAsync(deviceId, deviceConfigurationData); } @@ -712,3 +744,149 @@ inline Windows::Foundation::IAsyncAction SecondaryAuthenticationFactorRegistrati } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorAuthentication & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorAuthenticationStageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorAuthenticationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorRegistrationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::ISecondaryAuthenticationFactorRegistrationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthentication & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStageChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorAuthenticationStageInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::Provider::SecondaryAuthenticationFactorRegistrationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.h index ee00cf633..a8fdeb05f 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Identity.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.Authentication.Identity.3.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_TenantId(abi_arg_out value) noexcept override + HRESULT __stdcall get_TenantId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TenantId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TenantId()); return S_OK; } catch (...) @@ -27,11 +31,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TenantName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TenantName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TenantName()); return S_OK; } catch (...) @@ -41,11 +46,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyId()); return S_OK; } catch (...) @@ -69,11 +76,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyName()); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetRegistrationsAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_GetRegistrationsAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().GetRegistrationsAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRegistrationsAsync()); return S_OK; } catch (...) @@ -105,11 +114,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -127,49 +137,49 @@ namespace Windows::Security::Authentication::Identity { template hstring impl_IEnterpriseKeyCredentialRegistrationInfo::TenantId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TenantId(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationInfo)->get_TenantId(put_abi(value))); return value; } template hstring impl_IEnterpriseKeyCredentialRegistrationInfo::TenantName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TenantName(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationInfo)->get_TenantName(put_abi(value))); return value; } template hstring impl_IEnterpriseKeyCredentialRegistrationInfo::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationInfo)->get_Subject(put_abi(value))); return value; } template hstring impl_IEnterpriseKeyCredentialRegistrationInfo::KeyId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyId(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationInfo)->get_KeyId(put_abi(value))); return value; } template hstring impl_IEnterpriseKeyCredentialRegistrationInfo::KeyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyName(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationInfo)->get_KeyName(put_abi(value))); return value; } template Windows::Security::Authentication::Identity::EnterpriseKeyCredentialRegistrationManager impl_IEnterpriseKeyCredentialRegistrationManagerStatics::Current() const { Windows::Security::Authentication::Identity::EnterpriseKeyCredentialRegistrationManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationManagerStatics)->get_Current(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IEnterpriseKeyCredentialRegistrationManager::GetRegistrationsAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_GetRegistrationsAsync(put(value))); + check_hresult(WINRT_SHIM(IEnterpriseKeyCredentialRegistrationManager)->abi_GetRegistrationsAsync(put_abi(value))); return value; } @@ -181,3 +191,50 @@ inline Windows::Security::Authentication::Identity::EnterpriseKeyCredentialRegis } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::IEnterpriseKeyCredentialRegistrationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::IEnterpriseKeyCredentialRegistrationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::IEnterpriseKeyCredentialRegistrationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::EnterpriseKeyCredentialRegistrationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Identity::EnterpriseKeyCredentialRegistrationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.OnlineId.h b/10.0.14393.0/winrt/Windows.Security.Authentication.OnlineId.h index 78dac269e..ab539de75 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.OnlineId.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.OnlineId.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.Authentication.OnlineId.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AuthenticateUserAsync(abi_arg_in request, abi_arg_out> authenticationOperation) noexcept override + HRESULT __stdcall abi_AuthenticateUserAsync(impl::abi_arg_in request, impl::abi_arg_out> authenticationOperation) noexcept override { try { - *authenticationOperation = detach(this->shim().AuthenticateUserAsync(*reinterpret_cast(&request))); + typename D::abi_guard guard(this->shim()); + *authenticationOperation = detach_abi(this->shim().AuthenticateUserAsync(*reinterpret_cast(&request))); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce> requests, Windows::Security::Authentication::OnlineId::CredentialPromptType credentialPromptType, abi_arg_out> authenticationOperation) noexcept override + HRESULT __stdcall abi_AuthenticateUserAsyncAdvanced(impl::abi_arg_in> requests, Windows::Security::Authentication::OnlineId::CredentialPromptType credentialPromptType, impl::abi_arg_out> authenticationOperation) noexcept override { try { - *authenticationOperation = detach(this->shim().AuthenticateUserAsync(*reinterpret_cast *>(&requests), credentialPromptType)); + typename D::abi_guard guard(this->shim()); + *authenticationOperation = detach_abi(this->shim().AuthenticateUserAsync(*reinterpret_cast *>(&requests), credentialPromptType)); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce signOutUserOperation) noexcept override + HRESULT __stdcall abi_SignOutUserAsync(impl::abi_arg_out signOutUserOperation) noexcept override { try { - *signOutUserOperation = detach(this->shim().SignOutUserAsync()); + typename D::abi_guard guard(this->shim()); + *signOutUserOperation = detach_abi(this->shim().SignOutUserAsync()); return S_OK; } catch (...) @@ -61,6 +67,7 @@ struct produceshim()); this->shim().ApplicationId(value); return S_OK; } @@ -74,7 +81,8 @@ struct produceshim().ApplicationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationId()); return S_OK; } catch (...) @@ -87,7 +95,8 @@ struct produceshim().CanSignOut()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSignOut()); return S_OK; } catch (...) @@ -96,11 +105,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthenticatedSafeCustomerId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthenticatedSafeCustomerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticatedSafeCustomerId()); return S_OK; } catch (...) @@ -114,11 +124,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -128,11 +139,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -146,7 +158,8 @@ struct produceshim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -159,11 +172,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Service(abi_arg_out value) noexcept override + HRESULT __stdcall get_Service(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Service()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Service()); return S_OK; } catch (...) @@ -173,11 +187,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Policy(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Policy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Policy()); return S_OK; } catch (...) @@ -191,11 +206,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateOnlineIdServiceTicketRequest(abi_arg_in service, abi_arg_in policy, abi_arg_out onlineIdServiceTicketRequest) noexcept override + HRESULT __stdcall abi_CreateOnlineIdServiceTicketRequest(impl::abi_arg_in service, impl::abi_arg_in policy, impl::abi_arg_out onlineIdServiceTicketRequest) noexcept override { try { - *onlineIdServiceTicketRequest = detach(this->shim().CreateOnlineIdServiceTicketRequest(*reinterpret_cast(&service), *reinterpret_cast(&policy))); + typename D::abi_guard guard(this->shim()); + *onlineIdServiceTicketRequest = detach_abi(this->shim().CreateOnlineIdServiceTicketRequest(*reinterpret_cast(&service), *reinterpret_cast(&policy))); return S_OK; } catch (...) @@ -205,11 +221,12 @@ struct produce service, abi_arg_out onlineIdServiceTicketRequest) noexcept override + HRESULT __stdcall abi_CreateOnlineIdServiceTicketRequestAdvanced(impl::abi_arg_in service, impl::abi_arg_out onlineIdServiceTicketRequest) noexcept override { try { - *onlineIdServiceTicketRequest = detach(this->shim().CreateOnlineIdServiceTicketRequestAdvanced(*reinterpret_cast(&service))); + typename D::abi_guard guard(this->shim()); + *onlineIdServiceTicketRequest = detach_abi(this->shim().CreateOnlineIdServiceTicketRequestAdvanced(*reinterpret_cast(&service))); return S_OK; } catch (...) @@ -223,11 +240,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Tickets(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Tickets(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Tickets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tickets()); return S_OK; } catch (...) @@ -237,11 +255,12 @@ struct produce : } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -251,11 +270,12 @@ struct produce : } } - HRESULT __stdcall get_SafeCustomerId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SafeCustomerId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SafeCustomerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SafeCustomerId()); return S_OK; } catch (...) @@ -265,11 +285,12 @@ struct produce : } } - HRESULT __stdcall get_SignInName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SignInName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignInName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignInName()); return S_OK; } catch (...) @@ -279,11 +300,12 @@ struct produce : } } - HRESULT __stdcall get_FirstName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstName()); return S_OK; } catch (...) @@ -293,11 +315,12 @@ struct produce : } } - HRESULT __stdcall get_LastName(abi_arg_out value) noexcept override + HRESULT __stdcall get_LastName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastName()); return S_OK; } catch (...) @@ -311,7 +334,8 @@ struct produce : { try { - *value = detach(this->shim().IsBetaAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBetaAccount()); return S_OK; } catch (...) @@ -324,7 +348,8 @@ struct produce : { try { - *value = detach(this->shim().IsConfirmedPC()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsConfirmedPC()); return S_OK; } catch (...) @@ -341,152 +366,152 @@ namespace Windows::Security::Authentication::OnlineId { template hstring impl_IOnlineIdServiceTicketRequest::Service() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Service(put(value))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicketRequest)->get_Service(put_abi(value))); return value; } template hstring impl_IOnlineIdServiceTicketRequest::Policy() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Policy(put(value))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicketRequest)->get_Policy(put_abi(value))); return value; } -template Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest impl_IOnlineIdServiceTicketRequestFactory::CreateOnlineIdServiceTicketRequest(hstring_ref service, hstring_ref policy) const +template Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest impl_IOnlineIdServiceTicketRequestFactory::CreateOnlineIdServiceTicketRequest(hstring_view service, hstring_view policy) const { Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest onlineIdServiceTicketRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOnlineIdServiceTicketRequest(get(service), get(policy), put(onlineIdServiceTicketRequest))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicketRequestFactory)->abi_CreateOnlineIdServiceTicketRequest(get_abi(service), get_abi(policy), put_abi(onlineIdServiceTicketRequest))); return onlineIdServiceTicketRequest; } -template Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest impl_IOnlineIdServiceTicketRequestFactory::CreateOnlineIdServiceTicketRequestAdvanced(hstring_ref service) const +template Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest impl_IOnlineIdServiceTicketRequestFactory::CreateOnlineIdServiceTicketRequestAdvanced(hstring_view service) const { Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest onlineIdServiceTicketRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOnlineIdServiceTicketRequestAdvanced(get(service), put(onlineIdServiceTicketRequest))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicketRequestFactory)->abi_CreateOnlineIdServiceTicketRequestAdvanced(get_abi(service), put_abi(onlineIdServiceTicketRequest))); return onlineIdServiceTicketRequest; } template hstring impl_IOnlineIdServiceTicket::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicket)->get_Value(put_abi(value))); return value; } template Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest impl_IOnlineIdServiceTicket::Request() const { Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicket)->get_Request(put_abi(value))); return value; } template int32_t impl_IOnlineIdServiceTicket::ErrorCode() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IOnlineIdServiceTicket)->get_ErrorCode(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IUserIdentity::Tickets() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Tickets(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_Tickets(put_abi(value))); return value; } template hstring impl_IUserIdentity::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_Id(put_abi(value))); return value; } template hstring impl_IUserIdentity::SafeCustomerId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SafeCustomerId(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_SafeCustomerId(put_abi(value))); return value; } template hstring impl_IUserIdentity::SignInName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SignInName(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_SignInName(put_abi(value))); return value; } template hstring impl_IUserIdentity::FirstName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirstName(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_FirstName(put_abi(value))); return value; } template hstring impl_IUserIdentity::LastName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LastName(put(value))); + check_hresult(WINRT_SHIM(IUserIdentity)->get_LastName(put_abi(value))); return value; } template bool impl_IUserIdentity::IsBetaAccount() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBetaAccount(&value)); + check_hresult(WINRT_SHIM(IUserIdentity)->get_IsBetaAccount(&value)); return value; } template bool impl_IUserIdentity::IsConfirmedPC() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsConfirmedPC(&value)); + check_hresult(WINRT_SHIM(IUserIdentity)->get_IsConfirmedPC(&value)); return value; } template Windows::Security::Authentication::OnlineId::UserAuthenticationOperation impl_IOnlineIdAuthenticator::AuthenticateUserAsync(const Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest & request) const { Windows::Security::Authentication::OnlineId::UserAuthenticationOperation authenticationOperation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateUserAsync(get(request), put(authenticationOperation))); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->abi_AuthenticateUserAsync(get_abi(request), put_abi(authenticationOperation))); return authenticationOperation; } -template Windows::Security::Authentication::OnlineId::UserAuthenticationOperation impl_IOnlineIdAuthenticator::AuthenticateUserAsync(const Windows::Foundation::Collections::IIterable & requests, Windows::Security::Authentication::OnlineId::CredentialPromptType credentialPromptType) const +template Windows::Security::Authentication::OnlineId::UserAuthenticationOperation impl_IOnlineIdAuthenticator::AuthenticateUserAsync(iterable requests, Windows::Security::Authentication::OnlineId::CredentialPromptType credentialPromptType) const { Windows::Security::Authentication::OnlineId::UserAuthenticationOperation authenticationOperation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateUserAsyncAdvanced(get(requests), credentialPromptType, put(authenticationOperation))); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->abi_AuthenticateUserAsyncAdvanced(get_abi(requests), credentialPromptType, put_abi(authenticationOperation))); return authenticationOperation; } template Windows::Security::Authentication::OnlineId::SignOutUserOperation impl_IOnlineIdAuthenticator::SignOutUserAsync() const { Windows::Security::Authentication::OnlineId::SignOutUserOperation signOutUserOperation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SignOutUserAsync(put(signOutUserOperation))); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->abi_SignOutUserAsync(put_abi(signOutUserOperation))); return signOutUserOperation; } template void impl_IOnlineIdAuthenticator::ApplicationId(GUID value) const { - check_hresult(static_cast(static_cast(*this))->put_ApplicationId(value)); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->put_ApplicationId(value)); } template GUID impl_IOnlineIdAuthenticator::ApplicationId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_ApplicationId(&value)); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->get_ApplicationId(&value)); return value; } template bool impl_IOnlineIdAuthenticator::CanSignOut() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSignOut(&value)); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->get_CanSignOut(&value)); return value; } template hstring impl_IOnlineIdAuthenticator::AuthenticatedSafeCustomerId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AuthenticatedSafeCustomerId(put(value))); + check_hresult(WINRT_SHIM(IOnlineIdAuthenticator)->get_AuthenticatedSafeCustomerId(put_abi(value))); return value; } @@ -494,14 +519,115 @@ inline OnlineIdAuthenticator::OnlineIdAuthenticator() : OnlineIdAuthenticator(activate_instance()) {} -inline OnlineIdServiceTicketRequest::OnlineIdServiceTicketRequest(hstring_ref service, hstring_ref policy) : +inline OnlineIdServiceTicketRequest::OnlineIdServiceTicketRequest(hstring_view service, hstring_view policy) : OnlineIdServiceTicketRequest(get_activation_factory().CreateOnlineIdServiceTicketRequest(service, policy)) {} -inline OnlineIdServiceTicketRequest::OnlineIdServiceTicketRequest(hstring_ref service) : +inline OnlineIdServiceTicketRequest::OnlineIdServiceTicketRequest(hstring_view service) : OnlineIdServiceTicketRequest(get_activation_factory().CreateOnlineIdServiceTicketRequestAdvanced(service)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::IOnlineIdAuthenticator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::IOnlineIdServiceTicket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::IOnlineIdServiceTicketRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::IOnlineIdServiceTicketRequestFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::IUserIdentity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::SignOutUserOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::OnlineId::UserIdentity & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Core.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Core.h index 21f3a2d86..fb3c21f26 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Core.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Security.Credentials.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Account(abi_arg_out value) noexcept override + HRESULT __stdcall get_Account(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Account()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Account()); return S_OK; } catch (...) @@ -35,11 +39,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_Updated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -52,6 +57,7 @@ struct produceshim()); this->shim().Updated(token); return S_OK; } @@ -61,11 +67,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_Removed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Removed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Removed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -78,6 +85,7 @@ struct produceshim()); this->shim().Removed(token); return S_OK; } @@ -87,11 +95,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_DefaultSignInAccountChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DefaultSignInAccountChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DefaultSignInAccountChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -104,6 +113,7 @@ struct produceshim()); this->shim().DefaultSignInAccountChanged(token); return S_OK; } @@ -117,11 +127,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetTokenSilentlyAsync(abi_arg_in request, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetTokenSilentlyAsync(impl::abi_arg_in request, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetTokenSilentlyAsync(*reinterpret_cast(&request))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetTokenSilentlyAsync(*reinterpret_cast(&request))); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce request, abi_arg_in webAccount, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetTokenSilentlyWithWebAccountAsync(impl::abi_arg_in request, impl::abi_arg_in webAccount, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetTokenSilentlyAsync(*reinterpret_cast(&request), *reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetTokenSilentlyAsync(*reinterpret_cast(&request), *reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -145,11 +157,12 @@ struct produce request, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_RequestTokenAsync(impl::abi_arg_in request, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RequestTokenAsync(*reinterpret_cast(&request))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RequestTokenAsync(*reinterpret_cast(&request))); return S_OK; } catch (...) @@ -159,11 +172,12 @@ struct produce request, abi_arg_in webAccount, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_RequestTokenWithWebAccountAsync(impl::abi_arg_in request, impl::abi_arg_in webAccount, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().RequestTokenAsync(*reinterpret_cast(&request), *reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().RequestTokenAsync(*reinterpret_cast(&request), *reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -173,11 +187,12 @@ struct produce provider, abi_arg_in webAccountId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FindAccountAsync(impl::abi_arg_in provider, impl::abi_arg_in webAccountId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FindAccountAsync(*reinterpret_cast(&provider), *reinterpret_cast(&webAccountId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FindAccountAsync(*reinterpret_cast(&provider), *reinterpret_cast(&webAccountId))); return S_OK; } catch (...) @@ -187,11 +202,12 @@ struct produce webAccountProviderId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FindAccountProviderAsync(impl::abi_arg_in webAccountProviderId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId))); return S_OK; } catch (...) @@ -201,11 +217,12 @@ struct produce webAccountProviderId, abi_arg_in authority, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FindAccountProviderWithAuthorityAsync(impl::abi_arg_in webAccountProviderId, impl::abi_arg_in authority, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId), *reinterpret_cast(&authority))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId), *reinterpret_cast(&authority))); return S_OK; } catch (...) @@ -219,11 +236,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindAccountProviderWithAuthorityForUserAsync(abi_arg_in webAccountProviderId, abi_arg_in authority, abi_arg_in user, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_FindAccountProviderWithAuthorityForUserAsync(impl::abi_arg_in webAccountProviderId, impl::abi_arg_in authority, impl::abi_arg_in user, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId), *reinterpret_cast(&authority), *reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FindAccountProviderAsync(*reinterpret_cast(&webAccountProviderId), *reinterpret_cast(&authority), *reinterpret_cast(&user))); return S_OK; } catch (...) @@ -237,11 +255,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWebAccountMonitor(abi_arg_in> webAccounts, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWebAccountMonitor(impl::abi_arg_in> webAccounts, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWebAccountMonitor(*reinterpret_cast *>(&webAccounts))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWebAccountMonitor(*reinterpret_cast *>(&webAccounts))); return S_OK; } catch (...) @@ -259,7 +278,8 @@ struct produceshim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -268,11 +288,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ErrorMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ErrorMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorMessage()); return S_OK; } catch (...) @@ -282,11 +303,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -300,11 +322,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t errorCode, abi_arg_in errorMessage, abi_arg_out webProviderError) noexcept override + HRESULT __stdcall abi_Create(uint32_t errorCode, impl::abi_arg_in errorMessage, impl::abi_arg_out webProviderError) noexcept override { try { - *webProviderError = detach(this->shim().Create(errorCode, *reinterpret_cast(&errorMessage))); + typename D::abi_guard guard(this->shim()); + *webProviderError = detach_abi(this->shim().Create(errorCode, *reinterpret_cast(&errorMessage))); return S_OK; } catch (...) @@ -318,11 +341,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebAccountProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccountProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccountProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountProvider()); return S_OK; } catch (...) @@ -332,11 +356,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Scope(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Scope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scope()); return S_OK; } catch (...) @@ -346,11 +371,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClientId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClientId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientId()); return S_OK; } catch (...) @@ -364,7 +390,8 @@ struct produceshim().PromptType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PromptType()); return S_OK; } catch (...) @@ -373,11 +400,12 @@ struct produce> requestProperties) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> requestProperties) noexcept override { try { - *requestProperties = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *requestProperties = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -391,11 +419,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AppProperties(abi_arg_out> requestProperties) noexcept override + HRESULT __stdcall get_AppProperties(impl::abi_arg_out> requestProperties) noexcept override { try { - *requestProperties = detach(this->shim().AppProperties()); + typename D::abi_guard guard(this->shim()); + *requestProperties = detach_abi(this->shim().AppProperties()); return S_OK; } catch (...) @@ -409,11 +438,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in provider, abi_arg_in scope, abi_arg_in clientId, abi_arg_out webTokenRequest) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in provider, impl::abi_arg_in scope, impl::abi_arg_in clientId, impl::abi_arg_out webTokenRequest) noexcept override { try { - *webTokenRequest = detach(this->shim().Create(*reinterpret_cast(&provider), *reinterpret_cast(&scope), *reinterpret_cast(&clientId))); + typename D::abi_guard guard(this->shim()); + *webTokenRequest = detach_abi(this->shim().Create(*reinterpret_cast(&provider), *reinterpret_cast(&scope), *reinterpret_cast(&clientId))); return S_OK; } catch (...) @@ -423,11 +453,12 @@ struct produce provider, abi_arg_in scope, abi_arg_in clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType, abi_arg_out webTokenRequest) noexcept override + HRESULT __stdcall abi_CreateWithPromptType(impl::abi_arg_in provider, impl::abi_arg_in scope, impl::abi_arg_in clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType, impl::abi_arg_out webTokenRequest) noexcept override { try { - *webTokenRequest = detach(this->shim().CreateWithPromptType(*reinterpret_cast(&provider), *reinterpret_cast(&scope), *reinterpret_cast(&clientId), promptType)); + typename D::abi_guard guard(this->shim()); + *webTokenRequest = detach_abi(this->shim().CreateWithPromptType(*reinterpret_cast(&provider), *reinterpret_cast(&scope), *reinterpret_cast(&clientId), promptType)); return S_OK; } catch (...) @@ -437,11 +468,12 @@ struct produce provider, abi_arg_out webTokenRequest) noexcept override + HRESULT __stdcall abi_CreateWithProvider(impl::abi_arg_in provider, impl::abi_arg_out webTokenRequest) noexcept override { try { - *webTokenRequest = detach(this->shim().CreateWithProvider(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *webTokenRequest = detach_abi(this->shim().CreateWithProvider(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -451,11 +483,12 @@ struct produce provider, abi_arg_in scope, abi_arg_out webTokenRequest) noexcept override + HRESULT __stdcall abi_CreateWithScope(impl::abi_arg_in provider, impl::abi_arg_in scope, impl::abi_arg_out webTokenRequest) noexcept override { try { - *webTokenRequest = detach(this->shim().CreateWithScope(*reinterpret_cast(&provider), *reinterpret_cast(&scope))); + typename D::abi_guard guard(this->shim()); + *webTokenRequest = detach_abi(this->shim().CreateWithScope(*reinterpret_cast(&provider), *reinterpret_cast(&scope))); return S_OK; } catch (...) @@ -469,11 +502,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResponseData(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ResponseData(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ResponseData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseData()); return S_OK; } catch (...) @@ -487,7 +521,8 @@ struct produceshim().ResponseStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseStatus()); return S_OK; } catch (...) @@ -496,11 +531,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ResponseError(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResponseError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseError()); return S_OK; } catch (...) @@ -510,11 +546,12 @@ struct produce asyncInfo) noexcept override + HRESULT __stdcall abi_InvalidateCacheAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().InvalidateCacheAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().InvalidateCacheAsync()); return S_OK; } catch (...) @@ -528,11 +565,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Token(abi_arg_out value) noexcept override + HRESULT __stdcall get_Token(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Token()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Token()); return S_OK; } catch (...) @@ -542,11 +580,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProviderError(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderError()); return S_OK; } catch (...) @@ -556,11 +595,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WebAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccount()); return S_OK; } catch (...) @@ -570,11 +610,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -588,11 +629,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateWithToken(abi_arg_in token, abi_arg_out webTokenResponse) noexcept override + HRESULT __stdcall abi_CreateWithToken(impl::abi_arg_in token, impl::abi_arg_out webTokenResponse) noexcept override { try { - *webTokenResponse = detach(this->shim().CreateWithToken(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *webTokenResponse = detach_abi(this->shim().CreateWithToken(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -602,11 +644,12 @@ struct produce token, abi_arg_in webAccount, abi_arg_out webTokenResponse) noexcept override + HRESULT __stdcall abi_CreateWithTokenAndAccount(impl::abi_arg_in token, impl::abi_arg_in webAccount, impl::abi_arg_out webTokenResponse) noexcept override { try { - *webTokenResponse = detach(this->shim().CreateWithTokenAndAccount(*reinterpret_cast(&token), *reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *webTokenResponse = detach_abi(this->shim().CreateWithTokenAndAccount(*reinterpret_cast(&token), *reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -616,11 +659,12 @@ struct produce token, abi_arg_in webAccount, abi_arg_in error, abi_arg_out webTokenResponse) noexcept override + HRESULT __stdcall abi_CreateWithTokenAccountAndError(impl::abi_arg_in token, impl::abi_arg_in webAccount, impl::abi_arg_in error, impl::abi_arg_out webTokenResponse) noexcept override { try { - *webTokenResponse = detach(this->shim().CreateWithTokenAccountAndError(*reinterpret_cast(&token), *reinterpret_cast(&webAccount), *reinterpret_cast(&error))); + typename D::abi_guard guard(this->shim()); + *webTokenResponse = detach_abi(this->shim().CreateWithTokenAccountAndError(*reinterpret_cast(&token), *reinterpret_cast(&webAccount), *reinterpret_cast(&error))); return S_OK; } catch (...) @@ -638,147 +682,147 @@ namespace Windows::Security::Authentication::Web::Core { template Windows::Security::Credentials::WebAccountProvider impl_IWebTokenRequest::WebAccountProvider() const { Windows::Security::Credentials::WebAccountProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccountProvider(put(value))); + check_hresult(WINRT_SHIM(IWebTokenRequest)->get_WebAccountProvider(put_abi(value))); return value; } template hstring impl_IWebTokenRequest::Scope() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Scope(put(value))); + check_hresult(WINRT_SHIM(IWebTokenRequest)->get_Scope(put_abi(value))); return value; } template hstring impl_IWebTokenRequest::ClientId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ClientId(put(value))); + check_hresult(WINRT_SHIM(IWebTokenRequest)->get_ClientId(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType impl_IWebTokenRequest::PromptType() const { Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType value {}; - check_hresult(static_cast(static_cast(*this))->get_PromptType(&value)); + check_hresult(WINRT_SHIM(IWebTokenRequest)->get_PromptType(&value)); return value; } template Windows::Foundation::Collections::IMap impl_IWebTokenRequest::Properties() const { Windows::Foundation::Collections::IMap requestProperties; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(requestProperties))); + check_hresult(WINRT_SHIM(IWebTokenRequest)->get_Properties(put_abi(requestProperties))); return requestProperties; } template Windows::Foundation::Collections::IMap impl_IWebTokenRequest2::AppProperties() const { Windows::Foundation::Collections::IMap requestProperties; - check_hresult(static_cast(static_cast(*this))->get_AppProperties(put(requestProperties))); + check_hresult(WINRT_SHIM(IWebTokenRequest2)->get_AppProperties(put_abi(requestProperties))); return requestProperties; } template Windows::Security::Credentials::WebAccount impl_IWebAccountEventArgs::Account() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Account(put(value))); + check_hresult(WINRT_SHIM(IWebAccountEventArgs)->get_Account(put_abi(value))); return value; } -template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::Create(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope, hstring_ref clientId) const +template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::Create(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope, hstring_view clientId) const { Windows::Security::Authentication::Web::Core::WebTokenRequest webTokenRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(provider), get(scope), get(clientId), put(webTokenRequest))); + check_hresult(WINRT_SHIM(IWebTokenRequestFactory)->abi_Create(get_abi(provider), get_abi(scope), get_abi(clientId), put_abi(webTokenRequest))); return webTokenRequest; } -template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::CreateWithPromptType(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope, hstring_ref clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType) const +template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::CreateWithPromptType(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope, hstring_view clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType) const { Windows::Security::Authentication::Web::Core::WebTokenRequest webTokenRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithPromptType(get(provider), get(scope), get(clientId), promptType, put(webTokenRequest))); + check_hresult(WINRT_SHIM(IWebTokenRequestFactory)->abi_CreateWithPromptType(get_abi(provider), get_abi(scope), get_abi(clientId), promptType, put_abi(webTokenRequest))); return webTokenRequest; } template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::CreateWithProvider(const Windows::Security::Credentials::WebAccountProvider & provider) const { Windows::Security::Authentication::Web::Core::WebTokenRequest webTokenRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithProvider(get(provider), put(webTokenRequest))); + check_hresult(WINRT_SHIM(IWebTokenRequestFactory)->abi_CreateWithProvider(get_abi(provider), put_abi(webTokenRequest))); return webTokenRequest; } -template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::CreateWithScope(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope) const +template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebTokenRequestFactory::CreateWithScope(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope) const { Windows::Security::Authentication::Web::Core::WebTokenRequest webTokenRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithScope(get(provider), get(scope), put(webTokenRequest))); + check_hresult(WINRT_SHIM(IWebTokenRequestFactory)->abi_CreateWithScope(get_abi(provider), get_abi(scope), put_abi(webTokenRequest))); return webTokenRequest; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::GetTokenSilentlyAsync(const Windows::Security::Authentication::Web::Core::WebTokenRequest & request) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetTokenSilentlyAsync(get(request), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_GetTokenSilentlyAsync(get_abi(request), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::GetTokenSilentlyAsync(const Windows::Security::Authentication::Web::Core::WebTokenRequest & request, const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetTokenSilentlyWithWebAccountAsync(get(request), get(webAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_GetTokenSilentlyWithWebAccountAsync(get_abi(request), get_abi(webAccount), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::RequestTokenAsync(const Windows::Security::Authentication::Web::Core::WebTokenRequest & request) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RequestTokenAsync(get(request), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_RequestTokenAsync(get_abi(request), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::RequestTokenAsync(const Windows::Security::Authentication::Web::Core::WebTokenRequest & request, const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_RequestTokenWithWebAccountAsync(get(request), get(webAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_RequestTokenWithWebAccountAsync(get_abi(request), get_abi(webAccount), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountAsync(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref webAccountId) const +template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountAsync(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view webAccountId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FindAccountAsync(get(provider), get(webAccountId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_FindAccountAsync(get_abi(provider), get_abi(webAccountId), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountProviderAsync(hstring_ref webAccountProviderId) const +template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountProviderAsync(hstring_view webAccountProviderId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FindAccountProviderAsync(get(webAccountProviderId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_FindAccountProviderAsync(get_abi(webAccountProviderId), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountProviderAsync(hstring_ref webAccountProviderId, hstring_ref authority) const +template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics::FindAccountProviderAsync(hstring_view webAccountProviderId, hstring_view authority) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FindAccountProviderWithAuthorityAsync(get(webAccountProviderId), get(authority), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics)->abi_FindAccountProviderWithAuthorityAsync(get_abi(webAccountProviderId), get_abi(authority), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics2::FindAccountProviderAsync(hstring_ref webAccountProviderId, hstring_ref authority, const Windows::System::User & user) const +template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationCoreManagerStatics2::FindAccountProviderAsync(hstring_view webAccountProviderId, hstring_view authority, const Windows::System::User & user) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FindAccountProviderWithAuthorityForUserAsync(get(webAccountProviderId), get(authority), get(user), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics2)->abi_FindAccountProviderWithAuthorityForUserAsync(get_abi(webAccountProviderId), get_abi(authority), get_abi(user), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Security::Authentication::Web::Core::WebAccountMonitor impl_IWebAuthenticationCoreManagerStatics3::CreateWebAccountMonitor(const Windows::Foundation::Collections::IIterable & webAccounts) const +template Windows::Security::Authentication::Web::Core::WebAccountMonitor impl_IWebAuthenticationCoreManagerStatics3::CreateWebAccountMonitor(iterable webAccounts) const { Windows::Security::Authentication::Web::Core::WebAccountMonitor result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWebAccountMonitor(get(webAccounts), put(result))); + check_hresult(WINRT_SHIM(IWebAuthenticationCoreManagerStatics3)->abi_CreateWebAccountMonitor(get_abi(webAccounts), put_abi(result))); return result; } template event_token impl_IWebAccountMonitor::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->add_Updated(get_abi(handler), &token)); return token; } @@ -789,13 +833,13 @@ template event_revoker impl_IWebAccountMonitor< template void impl_IWebAccountMonitor::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->remove_Updated(token)); } template event_token impl_IWebAccountMonitor::Removed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Removed(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->add_Removed(get_abi(handler), &token)); return token; } @@ -806,128 +850,128 @@ template event_revoker impl_IWebAccountMonitor< template void impl_IWebAccountMonitor::Removed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Removed(token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->remove_Removed(token)); } -template event_token impl_IWebAccountMonitor::DefaultSignInAccountChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IWebAccountMonitor::DefaultSignInAccountChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DefaultSignInAccountChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->add_DefaultSignInAccountChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IWebAccountMonitor::DefaultSignInAccountChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IWebAccountMonitor::DefaultSignInAccountChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Security::Authentication::Web::Core::IWebAccountMonitor::remove_DefaultSignInAccountChanged, DefaultSignInAccountChanged(handler)); } template void impl_IWebAccountMonitor::DefaultSignInAccountChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DefaultSignInAccountChanged(token)); + check_hresult(WINRT_SHIM(IWebAccountMonitor)->remove_DefaultSignInAccountChanged(token)); } template uint32_t impl_IWebProviderError::ErrorCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IWebProviderError)->get_ErrorCode(&value)); return value; } template hstring impl_IWebProviderError::ErrorMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ErrorMessage(put(value))); + check_hresult(WINRT_SHIM(IWebProviderError)->get_ErrorMessage(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IWebProviderError::Properties() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IWebProviderError)->get_Properties(put_abi(value))); return value; } -template Windows::Security::Authentication::Web::Core::WebProviderError impl_IWebProviderErrorFactory::Create(uint32_t errorCode, hstring_ref errorMessage) const +template Windows::Security::Authentication::Web::Core::WebProviderError impl_IWebProviderErrorFactory::Create(uint32_t errorCode, hstring_view errorMessage) const { Windows::Security::Authentication::Web::Core::WebProviderError webProviderError { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(errorCode, get(errorMessage), put(webProviderError))); + check_hresult(WINRT_SHIM(IWebProviderErrorFactory)->abi_Create(errorCode, get_abi(errorMessage), put_abi(webProviderError))); return webProviderError; } template Windows::Foundation::Collections::IVectorView impl_IWebTokenRequestResult::ResponseData() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ResponseData(put(value))); + check_hresult(WINRT_SHIM(IWebTokenRequestResult)->get_ResponseData(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Core::WebTokenRequestStatus impl_IWebTokenRequestResult::ResponseStatus() const { Windows::Security::Authentication::Web::Core::WebTokenRequestStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ResponseStatus(&value)); + check_hresult(WINRT_SHIM(IWebTokenRequestResult)->get_ResponseStatus(&value)); return value; } template Windows::Security::Authentication::Web::Core::WebProviderError impl_IWebTokenRequestResult::ResponseError() const { Windows::Security::Authentication::Web::Core::WebProviderError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ResponseError(put(value))); + check_hresult(WINRT_SHIM(IWebTokenRequestResult)->get_ResponseError(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IWebTokenRequestResult::InvalidateCacheAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_InvalidateCacheAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebTokenRequestResult)->abi_InvalidateCacheAsync(put_abi(asyncInfo))); return asyncInfo; } template hstring impl_IWebTokenResponse::Token() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Token(put(value))); + check_hresult(WINRT_SHIM(IWebTokenResponse)->get_Token(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Core::WebProviderError impl_IWebTokenResponse::ProviderError() const { Windows::Security::Authentication::Web::Core::WebProviderError value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProviderError(put(value))); + check_hresult(WINRT_SHIM(IWebTokenResponse)->get_ProviderError(put_abi(value))); return value; } template Windows::Security::Credentials::WebAccount impl_IWebTokenResponse::WebAccount() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccount(put(value))); + check_hresult(WINRT_SHIM(IWebTokenResponse)->get_WebAccount(put_abi(value))); return value; } template Windows::Foundation::Collections::IMap impl_IWebTokenResponse::Properties() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IWebTokenResponse)->get_Properties(put_abi(value))); return value; } -template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithToken(hstring_ref token) const +template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithToken(hstring_view token) const { Windows::Security::Authentication::Web::Core::WebTokenResponse webTokenResponse { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithToken(get(token), put(webTokenResponse))); + check_hresult(WINRT_SHIM(IWebTokenResponseFactory)->abi_CreateWithToken(get_abi(token), put_abi(webTokenResponse))); return webTokenResponse; } -template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithTokenAndAccount(hstring_ref token, const Windows::Security::Credentials::WebAccount & webAccount) const +template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithTokenAndAccount(hstring_view token, const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Security::Authentication::Web::Core::WebTokenResponse webTokenResponse { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTokenAndAccount(get(token), get(webAccount), put(webTokenResponse))); + check_hresult(WINRT_SHIM(IWebTokenResponseFactory)->abi_CreateWithTokenAndAccount(get_abi(token), get_abi(webAccount), put_abi(webTokenResponse))); return webTokenResponse; } -template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithTokenAccountAndError(hstring_ref token, const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Security::Authentication::Web::Core::WebProviderError & error) const +template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebTokenResponseFactory::CreateWithTokenAccountAndError(hstring_view token, const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Security::Authentication::Web::Core::WebProviderError & error) const { Windows::Security::Authentication::Web::Core::WebTokenResponse webTokenResponse { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTokenAccountAndError(get(token), get(webAccount), get(error), put(webTokenResponse))); + check_hresult(WINRT_SHIM(IWebTokenResponseFactory)->abi_CreateWithTokenAccountAndError(get_abi(token), get_abi(webAccount), get_abi(error), put_abi(webTokenResponse))); return webTokenResponse; } @@ -951,40 +995,40 @@ inline Windows::Foundation::IAsyncOperation().RequestTokenAsync(request, webAccount); } -inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountAsync(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref webAccountId) +inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountAsync(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view webAccountId) { return get_activation_factory().FindAccountAsync(provider, webAccountId); } -inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_ref webAccountProviderId) +inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_view webAccountProviderId) { return get_activation_factory().FindAccountProviderAsync(webAccountProviderId); } -inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_ref webAccountProviderId, hstring_ref authority) +inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_view webAccountProviderId, hstring_view authority) { return get_activation_factory().FindAccountProviderAsync(webAccountProviderId, authority); } -inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_ref webAccountProviderId, hstring_ref authority, const Windows::System::User & user) +inline Windows::Foundation::IAsyncOperation WebAuthenticationCoreManager::FindAccountProviderAsync(hstring_view webAccountProviderId, hstring_view authority, const Windows::System::User & user) { return get_activation_factory().FindAccountProviderAsync(webAccountProviderId, authority, user); } -inline Windows::Security::Authentication::Web::Core::WebAccountMonitor WebAuthenticationCoreManager::CreateWebAccountMonitor(const Windows::Foundation::Collections::IIterable & webAccounts) +inline Windows::Security::Authentication::Web::Core::WebAccountMonitor WebAuthenticationCoreManager::CreateWebAccountMonitor(iterable webAccounts) { return get_activation_factory().CreateWebAccountMonitor(webAccounts); } -inline WebProviderError::WebProviderError(uint32_t errorCode, hstring_ref errorMessage) : +inline WebProviderError::WebProviderError(uint32_t errorCode, hstring_view errorMessage) : WebProviderError(get_activation_factory().Create(errorCode, errorMessage)) {} -inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope, hstring_ref clientId) : +inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope, hstring_view clientId) : WebTokenRequest(get_activation_factory().Create(provider, scope, clientId)) {} -inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope, hstring_ref clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType) : +inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope, hstring_view clientId, Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType promptType) : WebTokenRequest(get_activation_factory().CreateWithPromptType(provider, scope, clientId, promptType)) {} @@ -992,7 +1036,7 @@ inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::We WebTokenRequest(get_activation_factory().CreateWithProvider(provider)) {} -inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_ref scope) : +inline WebTokenRequest::WebTokenRequest(const Windows::Security::Credentials::WebAccountProvider & provider, hstring_view scope) : WebTokenRequest(get_activation_factory().CreateWithScope(provider, scope)) {} @@ -1000,18 +1044,191 @@ inline WebTokenResponse::WebTokenResponse() : WebTokenResponse(activate_instance()) {} -inline WebTokenResponse::WebTokenResponse(hstring_ref token) : +inline WebTokenResponse::WebTokenResponse(hstring_view token) : WebTokenResponse(get_activation_factory().CreateWithToken(token)) {} -inline WebTokenResponse::WebTokenResponse(hstring_ref token, const Windows::Security::Credentials::WebAccount & webAccount) : +inline WebTokenResponse::WebTokenResponse(hstring_view token, const Windows::Security::Credentials::WebAccount & webAccount) : WebTokenResponse(get_activation_factory().CreateWithTokenAndAccount(token, webAccount)) {} -inline WebTokenResponse::WebTokenResponse(hstring_ref token, const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Security::Authentication::Web::Core::WebProviderError & error) : +inline WebTokenResponse::WebTokenResponse(hstring_view token, const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Security::Authentication::Web::Core::WebProviderError & error) : WebTokenResponse(get_activation_factory().CreateWithTokenAccountAndError(token, webAccount, error)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebAccountEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebAccountMonitor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebAuthenticationCoreManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebAuthenticationCoreManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebAuthenticationCoreManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebProviderError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebProviderErrorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenRequest2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenRequestFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::IWebTokenResponseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebProviderError & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Provider.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Provider.h index 93f9baef8..dc9b09130 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Provider.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Security.Authentication.Web.Core.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ApplicationCallbackUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_ApplicationCallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationCallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationCallbackUri()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produceshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AccountPairwiseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountPairwiseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountPairwiseId()); return S_OK; } catch (...) @@ -64,11 +70,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, abi_arg_in applicationCallbackUri, abi_arg_out view) noexcept override + HRESULT __stdcall abi_Create(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, impl::abi_arg_in applicationCallbackUri, impl::abi_arg_out view) noexcept override { try { - *view = detach(this->shim().Create(viewType, *reinterpret_cast(&applicationCallbackUri))); + typename D::abi_guard guard(this->shim()); + *view = detach_abi(this->shim().Create(viewType, *reinterpret_cast(&applicationCallbackUri))); return S_OK; } catch (...) @@ -78,11 +85,12 @@ struct produce applicationCallbackUri, abi_arg_in accountPairwiseId, abi_arg_out view) noexcept override + HRESULT __stdcall abi_CreateWithPairwiseId(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, impl::abi_arg_in applicationCallbackUri, impl::abi_arg_in accountPairwiseId, impl::abi_arg_out view) noexcept override { try { - *view = detach(this->shim().CreateWithPairwiseId(viewType, *reinterpret_cast(&applicationCallbackUri), *reinterpret_cast(&accountPairwiseId))); + typename D::abi_guard guard(this->shim()); + *view = detach_abi(this->shim().CreateWithPairwiseId(viewType, *reinterpret_cast(&applicationCallbackUri), *reinterpret_cast(&accountPairwiseId))); return S_OK; } catch (...) @@ -96,11 +104,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_UpdateWebAccountPropertiesAsync(abi_arg_in webAccount, abi_arg_in webAccountUserName, abi_arg_in> additionalProperties, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_UpdateWebAccountPropertiesAsync(impl::abi_arg_in webAccount, impl::abi_arg_in webAccountUserName, impl::abi_arg_in> additionalProperties, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().UpdateWebAccountPropertiesAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&additionalProperties))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().UpdateWebAccountPropertiesAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&additionalProperties))); return S_OK; } catch (...) @@ -110,11 +119,12 @@ struct produce webAccountId, abi_arg_in webAccountUserName, abi_arg_in> props, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AddWebAccountAsync(impl::abi_arg_in webAccountId, impl::abi_arg_in webAccountUserName, impl::abi_arg_in> props, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props))); return S_OK; } catch (...) @@ -124,11 +134,12 @@ struct produce webAccount, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_DeleteWebAccountAsync(impl::abi_arg_in webAccount, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().DeleteWebAccountAsync(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().DeleteWebAccountAsync(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -138,11 +149,12 @@ struct produce>> asyncInfo) noexcept override + HRESULT __stdcall abi_FindAllProviderWebAccountsAsync(impl::abi_arg_out>> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().FindAllProviderWebAccountsAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().FindAllProviderWebAccountsAsync()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce uri, abi_arg_in> cookies, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_PushCookiesAsync(impl::abi_arg_in uri, impl::abi_arg_in> cookies, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().PushCookiesAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&cookies))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().PushCookiesAsync(*reinterpret_cast(&uri), *reinterpret_cast *>(&cookies))); return S_OK; } catch (...) @@ -166,11 +179,12 @@ struct produce webAccount, abi_arg_in view, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetViewAsync(impl::abi_arg_in webAccount, impl::abi_arg_in view, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetViewAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&view))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetViewAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&view))); return S_OK; } catch (...) @@ -180,11 +194,12 @@ struct produce webAccount, abi_arg_in applicationCallbackUri, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ClearViewAsync(impl::abi_arg_in webAccount, impl::abi_arg_in applicationCallbackUri, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ClearViewAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&applicationCallbackUri))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ClearViewAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&applicationCallbackUri))); return S_OK; } catch (...) @@ -194,11 +209,12 @@ struct produce webAccount, abi_arg_out>> asyncInfo) noexcept override + HRESULT __stdcall abi_GetViewsAsync(impl::abi_arg_in webAccount, impl::abi_arg_out>> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetViewsAsync(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetViewsAsync(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -208,11 +224,12 @@ struct produce webAccount, abi_arg_in webAccountPicture, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetWebAccountPictureAsync(impl::abi_arg_in webAccount, impl::abi_arg_in webAccountPicture, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetWebAccountPictureAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&webAccountPicture))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetWebAccountPictureAsync(*reinterpret_cast(&webAccount), *reinterpret_cast(&webAccountPicture))); return S_OK; } catch (...) @@ -222,11 +239,12 @@ struct produce webAccount, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ClearWebAccountPictureAsync(impl::abi_arg_in webAccount, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ClearWebAccountPictureAsync(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ClearWebAccountPictureAsync(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -240,11 +258,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_PullCookiesAsync(abi_arg_in uriString, abi_arg_in callerPFN, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_PullCookiesAsync(impl::abi_arg_in uriString, impl::abi_arg_in callerPFN, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().PullCookiesAsync(*reinterpret_cast(&uriString), *reinterpret_cast(&callerPFN))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().PullCookiesAsync(*reinterpret_cast(&uriString), *reinterpret_cast(&callerPFN))); return S_OK; } catch (...) @@ -258,11 +277,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddWebAccountWithScopeAndMapAsync(abi_arg_in webAccountId, abi_arg_in webAccountUserName, abi_arg_in> props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, abi_arg_in perUserWebAccountId, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AddWebAccountWithScopeAndMapAsync(impl::abi_arg_in webAccountId, impl::abi_arg_in webAccountUserName, impl::abi_arg_in> props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, impl::abi_arg_in perUserWebAccountId, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props), scope, *reinterpret_cast(&perUserWebAccountId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props), scope, *reinterpret_cast(&perUserWebAccountId))); return S_OK; } catch (...) @@ -272,11 +292,12 @@ struct produce perAppAccount, abi_arg_in perUserWebAccountId, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetPerAppToPerUserAccountAsync(impl::abi_arg_in perAppAccount, impl::abi_arg_in perUserWebAccountId, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetPerAppToPerUserAccountAsync(*reinterpret_cast(&perAppAccount), *reinterpret_cast(&perUserWebAccountId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetPerAppToPerUserAccountAsync(*reinterpret_cast(&perAppAccount), *reinterpret_cast(&perUserWebAccountId))); return S_OK; } catch (...) @@ -286,11 +307,12 @@ struct produce perAppAccount, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPerUserFromPerAppAccountAsync(impl::abi_arg_in perAppAccount, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPerUserFromPerAppAccountAsync(*reinterpret_cast(&perAppAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPerUserFromPerAppAccountAsync(*reinterpret_cast(&perAppAccount))); return S_OK; } catch (...) @@ -300,11 +322,12 @@ struct produce perAppAccount, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ClearPerUserFromPerAppAccountAsync(impl::abi_arg_in perAppAccount, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ClearPerUserFromPerAppAccountAsync(*reinterpret_cast(&perAppAccount))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ClearPerUserFromPerAppAccountAsync(*reinterpret_cast(&perAppAccount))); return S_OK; } catch (...) @@ -322,6 +345,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -339,6 +363,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -348,10 +373,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&value)); return S_OK; } @@ -365,11 +391,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebAccount(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccount()); return S_OK; } catch (...) @@ -383,11 +410,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebAccount(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccount()); return S_OK; } catch (...) @@ -401,6 +429,7 @@ struct produceshim()); this->shim().ReportCompleted(); return S_OK; } @@ -418,7 +447,8 @@ struct produceshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -431,11 +461,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Context(abi_arg_out webCookieRequestContext) noexcept override + HRESULT __stdcall get_Context(impl::abi_arg_out webCookieRequestContext) noexcept override { try { - *webCookieRequestContext = detach(this->shim().Context()); + typename D::abi_guard guard(this->shim()); + *webCookieRequestContext = detach_abi(this->shim().Context()); return S_OK; } catch (...) @@ -445,11 +476,12 @@ struct produce> cookies) noexcept override + HRESULT __stdcall get_Cookies(impl::abi_arg_out> cookies) noexcept override { try { - *cookies = detach(this->shim().Cookies()); + typename D::abi_guard guard(this->shim()); + *cookies = detach_abi(this->shim().Cookies()); return S_OK; } catch (...) @@ -459,10 +491,11 @@ struct produce uri) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in uri) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&uri)); return S_OK; } @@ -472,11 +505,12 @@ struct produce uri) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out uri) noexcept override { try { - *uri = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *uri = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -486,11 +520,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationCallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationCallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationCallbackUri()); return S_OK; } catch (...) @@ -504,11 +539,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_WebAccount(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccount()); return S_OK; } catch (...) @@ -518,11 +554,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationCallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationCallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationCallbackUri()); return S_OK; } catch (...) @@ -532,11 +569,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClientId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClientId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientId()); return S_OK; } catch (...) @@ -554,6 +592,7 @@ struct produceshim()); this->shim().ReportUserInteractionRequired(); return S_OK; } @@ -563,10 +602,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_ReportUserInteractionRequiredWithError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportUserInteractionRequired(*reinterpret_cast(&value)); return S_OK; } @@ -580,11 +620,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Operation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Operation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Operation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Operation()); return S_OK; } catch (...) @@ -598,11 +639,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ProviderRequest(abi_arg_out webTokenRequest) noexcept override + HRESULT __stdcall get_ProviderRequest(impl::abi_arg_out webTokenRequest) noexcept override { try { - *webTokenRequest = detach(this->shim().ProviderRequest()); + typename D::abi_guard guard(this->shim()); + *webTokenRequest = detach_abi(this->shim().ProviderRequest()); return S_OK; } catch (...) @@ -612,11 +654,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ProviderResponses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProviderResponses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderResponses()); return S_OK; } catch (...) @@ -626,10 +669,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CacheExpirationTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CacheExpirationTime(*reinterpret_cast(&value)); return S_OK; } @@ -639,11 +683,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CacheExpirationTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CacheExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheExpirationTime()); return S_OK; } catch (...) @@ -660,6 +705,7 @@ struct produceshim()); this->shim().ReportUserCanceled(); return S_OK; } @@ -673,11 +719,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddWebAccountWithScopeAsync(abi_arg_in webAccountId, abi_arg_in webAccountUserName, abi_arg_in> props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AddWebAccountWithScopeAsync(impl::abi_arg_in webAccountId, impl::abi_arg_in webAccountUserName, impl::abi_arg_in> props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props), scope)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AddWebAccountAsync(*reinterpret_cast(&webAccountId), *reinterpret_cast(&webAccountUserName), *reinterpret_cast *>(&props), scope)); return S_OK; } catch (...) @@ -687,11 +734,12 @@ struct produce webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SetScopeAsync(impl::abi_arg_in webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SetScopeAsync(*reinterpret_cast(&webAccount), scope)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SetScopeAsync(*reinterpret_cast(&webAccount), scope)); return S_OK; } catch (...) @@ -701,11 +749,12 @@ struct produce webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope * scope) noexcept override + HRESULT __stdcall abi_GetScope(impl::abi_arg_in webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope * scope) noexcept override { try { - *scope = detach(this->shim().GetScope(*reinterpret_cast(&webAccount))); + typename D::abi_guard guard(this->shim()); + *scope = detach_abi(this->shim().GetScope(*reinterpret_cast(&webAccount))); return S_OK; } catch (...) @@ -718,11 +767,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ClientRequest(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClientRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClientRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientRequest()); return S_OK; } catch (...) @@ -732,11 +782,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_WebAccounts(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebAccounts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccounts()); return S_OK; } catch (...) @@ -750,7 +801,8 @@ struct produceshim().WebAccountSelectionOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountSelectionOptions()); return S_OK; } catch (...) @@ -759,11 +811,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ApplicationCallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationCallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationCallbackUri()); return S_OK; } catch (...) @@ -773,11 +826,12 @@ struct produce target, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetApplicationTokenBindingKeyAsync(Windows::Security::Authentication::Web::TokenBindingKeyType keyType, impl::abi_arg_in target, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetApplicationTokenBindingKeyAsync(keyType, *reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetApplicationTokenBindingKeyAsync(keyType, *reinterpret_cast(&target))); return S_OK; } catch (...) @@ -791,11 +845,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetApplicationTokenBindingKeyIdAsync(Windows::Security::Authentication::Web::TokenBindingKeyType keyType, abi_arg_in target, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_GetApplicationTokenBindingKeyIdAsync(Windows::Security::Authentication::Web::TokenBindingKeyType keyType, impl::abi_arg_in target, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetApplicationTokenBindingKeyIdAsync(keyType, *reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetApplicationTokenBindingKeyIdAsync(keyType, *reinterpret_cast(&target))); return S_OK; } catch (...) @@ -809,11 +864,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ClientResponse(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClientResponse(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClientResponse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClientResponse()); return S_OK; } catch (...) @@ -827,11 +883,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in webTokenResponse, abi_arg_out webProviderTokenResponse) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in webTokenResponse, impl::abi_arg_out webProviderTokenResponse) noexcept override { try { - *webProviderTokenResponse = detach(this->shim().Create(*reinterpret_cast(&webTokenResponse))); + typename D::abi_guard guard(this->shim()); + *webProviderTokenResponse = detach_abi(this->shim().Create(*reinterpret_cast(&webTokenResponse))); return S_OK; } catch (...) @@ -849,360 +906,360 @@ namespace Windows::Security::Authentication::Web::Provider { template Windows::Security::Authentication::Web::Provider::WebAccountProviderOperationKind impl_IWebAccountProviderOperation::Kind() const { Windows::Security::Authentication::Web::Provider::WebAccountProviderOperationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IWebAccountProviderOperation)->get_Kind(&value)); return value; } template Windows::Security::Authentication::Web::Core::WebTokenRequest impl_IWebProviderTokenRequest::ClientRequest() const { Windows::Security::Authentication::Web::Core::WebTokenRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClientRequest(put(value))); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest)->get_ClientRequest(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IWebProviderTokenRequest::WebAccounts() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_WebAccounts(put(value))); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest)->get_WebAccounts(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Provider::WebAccountSelectionOptions impl_IWebProviderTokenRequest::WebAccountSelectionOptions() const { Windows::Security::Authentication::Web::Provider::WebAccountSelectionOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_WebAccountSelectionOptions(&value)); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest)->get_WebAccountSelectionOptions(&value)); return value; } template Windows::Foundation::Uri impl_IWebProviderTokenRequest::ApplicationCallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationCallbackUri(put(value))); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest)->get_ApplicationCallbackUri(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IWebProviderTokenRequest::GetApplicationTokenBindingKeyAsync(Windows::Security::Authentication::Web::TokenBindingKeyType keyType, const Windows::Foundation::Uri & target) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetApplicationTokenBindingKeyAsync(keyType, get(target), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest)->abi_GetApplicationTokenBindingKeyAsync(keyType, get_abi(target), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebProviderTokenRequest2::GetApplicationTokenBindingKeyIdAsync(Windows::Security::Authentication::Web::TokenBindingKeyType keyType, const Windows::Foundation::Uri & target) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetApplicationTokenBindingKeyIdAsync(keyType, get(target), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebProviderTokenRequest2)->abi_GetApplicationTokenBindingKeyIdAsync(keyType, get_abi(target), put_abi(asyncInfo))); return asyncInfo; } template Windows::Security::Authentication::Web::Core::WebTokenResponse impl_IWebProviderTokenResponse::ClientResponse() const { Windows::Security::Authentication::Web::Core::WebTokenResponse value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClientResponse(put(value))); + check_hresult(WINRT_SHIM(IWebProviderTokenResponse)->get_ClientResponse(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse impl_IWebProviderTokenResponseFactory::Create(const Windows::Security::Authentication::Web::Core::WebTokenResponse & webTokenResponse) const { Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse webProviderTokenResponse { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(webTokenResponse), put(webProviderTokenResponse))); + check_hresult(WINRT_SHIM(IWebProviderTokenResponseFactory)->abi_Create(get_abi(webTokenResponse), put_abi(webProviderTokenResponse))); return webProviderTokenResponse; } template Windows::Foundation::Uri impl_IWebAccountClientView::ApplicationCallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationCallbackUri(put(value))); + check_hresult(WINRT_SHIM(IWebAccountClientView)->get_ApplicationCallbackUri(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Provider::WebAccountClientViewType impl_IWebAccountClientView::Type() const { Windows::Security::Authentication::Web::Provider::WebAccountClientViewType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IWebAccountClientView)->get_Type(&value)); return value; } template hstring impl_IWebAccountClientView::AccountPairwiseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountPairwiseId(put(value))); + check_hresult(WINRT_SHIM(IWebAccountClientView)->get_AccountPairwiseId(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Provider::WebAccountClientView impl_IWebAccountClientViewFactory::Create(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, const Windows::Foundation::Uri & applicationCallbackUri) const { Windows::Security::Authentication::Web::Provider::WebAccountClientView view { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(viewType, get(applicationCallbackUri), put(view))); + check_hresult(WINRT_SHIM(IWebAccountClientViewFactory)->abi_Create(viewType, get_abi(applicationCallbackUri), put_abi(view))); return view; } -template Windows::Security::Authentication::Web::Provider::WebAccountClientView impl_IWebAccountClientViewFactory::CreateWithPairwiseId(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, const Windows::Foundation::Uri & applicationCallbackUri, hstring_ref accountPairwiseId) const +template Windows::Security::Authentication::Web::Provider::WebAccountClientView impl_IWebAccountClientViewFactory::CreateWithPairwiseId(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, const Windows::Foundation::Uri & applicationCallbackUri, hstring_view accountPairwiseId) const { Windows::Security::Authentication::Web::Provider::WebAccountClientView view { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithPairwiseId(viewType, get(applicationCallbackUri), get(accountPairwiseId), put(view))); + check_hresult(WINRT_SHIM(IWebAccountClientViewFactory)->abi_CreateWithPairwiseId(viewType, get_abi(applicationCallbackUri), get_abi(accountPairwiseId), put_abi(view))); return view; } -template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::UpdateWebAccountPropertiesAsync(const Windows::Security::Credentials::WebAccount & webAccount, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & additionalProperties) const +template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::UpdateWebAccountPropertiesAsync(const Windows::Security::Credentials::WebAccount & webAccount, hstring_view webAccountUserName, map_view additionalProperties) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_UpdateWebAccountPropertiesAsync(get(webAccount), get(webAccountUserName), get(additionalProperties), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_UpdateWebAccountPropertiesAsync(get_abi(webAccount), get_abi(webAccountUserName), get_abi(additionalProperties), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAccountManagerStatics::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props) const +template Windows::Foundation::IAsyncOperation impl_IWebAccountManagerStatics::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddWebAccountAsync(get(webAccountId), get(webAccountUserName), get(props), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_AddWebAccountAsync(get_abi(webAccountId), get_abi(webAccountUserName), get_abi(props), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::DeleteWebAccountAsync(const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_DeleteWebAccountAsync(get(webAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_DeleteWebAccountAsync(get_abi(webAccount), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation> impl_IWebAccountManagerStatics::FindAllProviderWebAccountsAsync() const { Windows::Foundation::IAsyncOperation> asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_FindAllProviderWebAccountsAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_FindAllProviderWebAccountsAsync(put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::PushCookiesAsync(const Windows::Foundation::Uri & uri, const Windows::Foundation::Collections::IVectorView & cookies) const +template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::PushCookiesAsync(const Windows::Foundation::Uri & uri, vector_view cookies) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_PushCookiesAsync(get(uri), get(cookies), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_PushCookiesAsync(get_abi(uri), get_abi(cookies), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::SetViewAsync(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Security::Authentication::Web::Provider::WebAccountClientView & view) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetViewAsync(get(webAccount), get(view), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_SetViewAsync(get_abi(webAccount), get_abi(view), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::ClearViewAsync(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Foundation::Uri & applicationCallbackUri) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ClearViewAsync(get(webAccount), get(applicationCallbackUri), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_ClearViewAsync(get_abi(webAccount), get_abi(applicationCallbackUri), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation> impl_IWebAccountManagerStatics::GetViewsAsync(const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncOperation> asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetViewsAsync(get(webAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_GetViewsAsync(get_abi(webAccount), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::SetWebAccountPictureAsync(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::Storage::Streams::IRandomAccessStream & webAccountPicture) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetWebAccountPictureAsync(get(webAccount), get(webAccountPicture), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_SetWebAccountPictureAsync(get_abi(webAccount), get_abi(webAccountPicture), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics::ClearWebAccountPictureAsync(const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ClearWebAccountPictureAsync(get(webAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics)->abi_ClearWebAccountPictureAsync(get_abi(webAccount), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics2::PullCookiesAsync(hstring_ref uriString, hstring_ref callerPFN) const +template Windows::Foundation::IAsyncAction impl_IWebAccountManagerStatics2::PullCookiesAsync(hstring_view uriString, hstring_view callerPFN) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_PullCookiesAsync(get(uriString), get(callerPFN), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountManagerStatics2)->abi_PullCookiesAsync(get_abi(uriString), get_abi(callerPFN), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncOperation impl_IWebAccountScopeManagerStatics::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope) const +template Windows::Foundation::IAsyncOperation impl_IWebAccountScopeManagerStatics::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddWebAccountWithScopeAsync(get(webAccountId), get(webAccountUserName), get(props), scope, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountScopeManagerStatics)->abi_AddWebAccountWithScopeAsync(get_abi(webAccountId), get_abi(webAccountUserName), get_abi(props), scope, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountScopeManagerStatics::SetScopeAsync(const Windows::Security::Credentials::WebAccount & webAccount, Windows::Security::Authentication::Web::Provider::WebAccountScope scope) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetScopeAsync(get(webAccount), scope, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountScopeManagerStatics)->abi_SetScopeAsync(get_abi(webAccount), scope, put_abi(asyncInfo))); return asyncInfo; } template Windows::Security::Authentication::Web::Provider::WebAccountScope impl_IWebAccountScopeManagerStatics::GetScope(const Windows::Security::Credentials::WebAccount & webAccount) const { Windows::Security::Authentication::Web::Provider::WebAccountScope scope {}; - check_hresult(static_cast(static_cast(*this))->abi_GetScope(get(webAccount), &scope)); + check_hresult(WINRT_SHIM(IWebAccountScopeManagerStatics)->abi_GetScope(get_abi(webAccount), &scope)); return scope; } -template Windows::Foundation::IAsyncOperation impl_IWebAccountMapManagerStatics::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, hstring_ref perUserWebAccountId) const +template Windows::Foundation::IAsyncOperation impl_IWebAccountMapManagerStatics::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, hstring_view perUserWebAccountId) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AddWebAccountWithScopeAndMapAsync(get(webAccountId), get(webAccountUserName), get(props), scope, get(perUserWebAccountId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountMapManagerStatics)->abi_AddWebAccountWithScopeAndMapAsync(get_abi(webAccountId), get_abi(webAccountUserName), get_abi(props), scope, get_abi(perUserWebAccountId), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IWebAccountMapManagerStatics::SetPerAppToPerUserAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount, hstring_ref perUserWebAccountId) const +template Windows::Foundation::IAsyncAction impl_IWebAccountMapManagerStatics::SetPerAppToPerUserAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount, hstring_view perUserWebAccountId) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SetPerAppToPerUserAccountAsync(get(perAppAccount), get(perUserWebAccountId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountMapManagerStatics)->abi_SetPerAppToPerUserAccountAsync(get_abi(perAppAccount), get_abi(perUserWebAccountId), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAccountMapManagerStatics::GetPerUserFromPerAppAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPerUserFromPerAppAccountAsync(get(perAppAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountMapManagerStatics)->abi_GetPerUserFromPerAppAccountAsync(get_abi(perAppAccount), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccountMapManagerStatics::ClearPerUserFromPerAppAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ClearPerUserFromPerAppAccountAsync(get(perAppAccount), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccountMapManagerStatics)->abi_ClearPerUserFromPerAppAccountAsync(get_abi(perAppAccount), put_abi(asyncInfo))); return asyncInfo; } template void impl_IWebAccountProviderBaseReportOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IWebAccountProviderBaseReportOperation)->abi_ReportCompleted()); } template void impl_IWebAccountProviderBaseReportOperation::ReportError(const Windows::Security::Authentication::Web::Core::WebProviderError & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportError(get(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderBaseReportOperation)->abi_ReportError(get_abi(value))); } template void impl_IWebAccountProviderUIReportOperation::ReportUserCanceled() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportUserCanceled()); + check_hresult(WINRT_SHIM(IWebAccountProviderUIReportOperation)->abi_ReportUserCanceled()); } template void impl_IWebAccountProviderSilentReportOperation::ReportUserInteractionRequired() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportUserInteractionRequired()); + check_hresult(WINRT_SHIM(IWebAccountProviderSilentReportOperation)->abi_ReportUserInteractionRequired()); } template void impl_IWebAccountProviderSilentReportOperation::ReportUserInteractionRequired(const Windows::Security::Authentication::Web::Core::WebProviderError & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportUserInteractionRequiredWithError(get(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderSilentReportOperation)->abi_ReportUserInteractionRequiredWithError(get_abi(value))); } template Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest impl_IWebAccountProviderTokenOperation::ProviderRequest() const { Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest webTokenRequest { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProviderRequest(put(webTokenRequest))); + check_hresult(WINRT_SHIM(IWebAccountProviderTokenOperation)->get_ProviderRequest(put_abi(webTokenRequest))); return webTokenRequest; } template Windows::Foundation::Collections::IVector impl_IWebAccountProviderTokenOperation::ProviderResponses() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ProviderResponses(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderTokenOperation)->get_ProviderResponses(put_abi(value))); return value; } template void impl_IWebAccountProviderTokenOperation::CacheExpirationTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_CacheExpirationTime(get(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderTokenOperation)->put_CacheExpirationTime(get_abi(value))); } template Windows::Foundation::DateTime impl_IWebAccountProviderTokenOperation::CacheExpirationTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_CacheExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderTokenOperation)->get_CacheExpirationTime(put_abi(value))); return value; } template void impl_IWebAccountProviderAddAccountOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IWebAccountProviderAddAccountOperation)->abi_ReportCompleted()); } template Windows::Security::Credentials::WebAccount impl_IWebAccountProviderManageAccountOperation::WebAccount() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccount(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderManageAccountOperation)->get_WebAccount(put_abi(value))); return value; } template void impl_IWebAccountProviderManageAccountOperation::ReportCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted()); + check_hresult(WINRT_SHIM(IWebAccountProviderManageAccountOperation)->abi_ReportCompleted()); } template Windows::Security::Credentials::WebAccount impl_IWebAccountProviderDeleteAccountOperation::WebAccount() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccount(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderDeleteAccountOperation)->get_WebAccount(put_abi(value))); return value; } template Windows::Security::Credentials::WebAccount impl_IWebAccountProviderSignOutAccountOperation::WebAccount() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccount(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderSignOutAccountOperation)->get_WebAccount(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebAccountProviderSignOutAccountOperation::ApplicationCallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationCallbackUri(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderSignOutAccountOperation)->get_ApplicationCallbackUri(put_abi(value))); return value; } template hstring impl_IWebAccountProviderSignOutAccountOperation::ClientId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ClientId(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderSignOutAccountOperation)->get_ClientId(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebAccountProviderRetrieveCookiesOperation::Context() const { Windows::Foundation::Uri webCookieRequestContext { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Context(put(webCookieRequestContext))); + check_hresult(WINRT_SHIM(IWebAccountProviderRetrieveCookiesOperation)->get_Context(put_abi(webCookieRequestContext))); return webCookieRequestContext; } template Windows::Foundation::Collections::IVector impl_IWebAccountProviderRetrieveCookiesOperation::Cookies() const { Windows::Foundation::Collections::IVector cookies; - check_hresult(static_cast(static_cast(*this))->get_Cookies(put(cookies))); + check_hresult(WINRT_SHIM(IWebAccountProviderRetrieveCookiesOperation)->get_Cookies(put_abi(cookies))); return cookies; } template void impl_IWebAccountProviderRetrieveCookiesOperation::Uri(const Windows::Foundation::Uri & uri) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(uri))); + check_hresult(WINRT_SHIM(IWebAccountProviderRetrieveCookiesOperation)->put_Uri(get_abi(uri))); } template Windows::Foundation::Uri impl_IWebAccountProviderRetrieveCookiesOperation::Uri() const { Windows::Foundation::Uri uri { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(uri))); + check_hresult(WINRT_SHIM(IWebAccountProviderRetrieveCookiesOperation)->get_Uri(put_abi(uri))); return uri; } template Windows::Foundation::Uri impl_IWebAccountProviderRetrieveCookiesOperation::ApplicationCallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ApplicationCallbackUri(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderRetrieveCookiesOperation)->get_ApplicationCallbackUri(put_abi(value))); return value; } template Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation impl_IWebAccountProviderTokenObjects::Operation() const { Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation value; - check_hresult(static_cast(static_cast(*this))->get_Operation(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderTokenObjects)->get_Operation(put_abi(value))); return value; } @@ -1210,16 +1267,16 @@ inline WebAccountClientView::WebAccountClientView(Windows::Security::Authenticat WebAccountClientView(get_activation_factory().Create(viewType, applicationCallbackUri)) {} -inline WebAccountClientView::WebAccountClientView(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, const Windows::Foundation::Uri & applicationCallbackUri, hstring_ref accountPairwiseId) : +inline WebAccountClientView::WebAccountClientView(Windows::Security::Authentication::Web::Provider::WebAccountClientViewType viewType, const Windows::Foundation::Uri & applicationCallbackUri, hstring_view accountPairwiseId) : WebAccountClientView(get_activation_factory().CreateWithPairwiseId(viewType, applicationCallbackUri, accountPairwiseId)) {} -inline Windows::Foundation::IAsyncAction WebAccountManager::UpdateWebAccountPropertiesAsync(const Windows::Security::Credentials::WebAccount & webAccount, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & additionalProperties) +inline Windows::Foundation::IAsyncAction WebAccountManager::UpdateWebAccountPropertiesAsync(const Windows::Security::Credentials::WebAccount & webAccount, hstring_view webAccountUserName, map_view additionalProperties) { return get_activation_factory().UpdateWebAccountPropertiesAsync(webAccount, webAccountUserName, additionalProperties); } -inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props) +inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props) { return get_activation_factory().AddWebAccountAsync(webAccountId, webAccountUserName, props); } @@ -1234,7 +1291,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllProviderWebAccountsAsync(); } -inline Windows::Foundation::IAsyncAction WebAccountManager::PushCookiesAsync(const Windows::Foundation::Uri & uri, const Windows::Foundation::Collections::IVectorView & cookies) +inline Windows::Foundation::IAsyncAction WebAccountManager::PushCookiesAsync(const Windows::Foundation::Uri & uri, vector_view cookies) { return get_activation_factory().PushCookiesAsync(uri, cookies); } @@ -1264,17 +1321,17 @@ inline Windows::Foundation::IAsyncAction WebAccountManager::ClearWebAccountPictu return get_activation_factory().ClearWebAccountPictureAsync(webAccount); } -inline Windows::Foundation::IAsyncAction WebAccountManager::PullCookiesAsync(hstring_ref uriString, hstring_ref callerPFN) +inline Windows::Foundation::IAsyncAction WebAccountManager::PullCookiesAsync(hstring_view uriString, hstring_view callerPFN) { return get_activation_factory().PullCookiesAsync(uriString, callerPFN); } -inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, hstring_ref perUserWebAccountId) +inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope, hstring_view perUserWebAccountId) { return get_activation_factory().AddWebAccountAsync(webAccountId, webAccountUserName, props, scope, perUserWebAccountId); } -inline Windows::Foundation::IAsyncAction WebAccountManager::SetPerAppToPerUserAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount, hstring_ref perUserWebAccountId) +inline Windows::Foundation::IAsyncAction WebAccountManager::SetPerAppToPerUserAccountAsync(const Windows::Security::Credentials::WebAccount & perAppAccount, hstring_view perUserWebAccountId) { return get_activation_factory().SetPerAppToPerUserAccountAsync(perAppAccount, perUserWebAccountId); } @@ -1289,7 +1346,7 @@ inline Windows::Foundation::IAsyncAction WebAccountManager::ClearPerUserFromPerA return get_activation_factory().ClearPerUserFromPerAppAccountAsync(perAppAccount); } -inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_ref webAccountId, hstring_ref webAccountUserName, const Windows::Foundation::Collections::IMapView & props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope) +inline Windows::Foundation::IAsyncOperation WebAccountManager::AddWebAccountAsync(hstring_view webAccountId, hstring_view webAccountUserName, map_view props, Windows::Security::Authentication::Web::Provider::WebAccountScope scope) { return get_activation_factory().AddWebAccountAsync(webAccountId, webAccountUserName, props, scope); } @@ -1311,3 +1368,293 @@ inline WebProviderTokenResponse::WebProviderTokenResponse(const Windows::Securit } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountClientView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountClientViewFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountMapManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderAddAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderBaseReportOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderDeleteAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderManageAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderRetrieveCookiesOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderSignOutAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderSilentReportOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenObjects & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderTokenOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountProviderUIReportOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebAccountScopeManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebProviderTokenRequest2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::IWebProviderTokenResponseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountClientView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderAddAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderDeleteAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderGetTokenSilentOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderManageAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderRequestTokenOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderRetrieveCookiesOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderSignOutAccountOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebAccountProviderTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebProviderTokenRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::Provider::WebProviderTokenResponse & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.h b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.h index 98510860d..89dcf26a2 100644 --- a/10.0.14393.0/winrt/Windows.Security.Authentication.Web.h +++ b/10.0.14393.0/winrt/Windows.Security.Authentication.Web.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Security.Authentication.Web.3.h" @@ -14,11 +17,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AuthenticateWithCallbackUriAsync(Windows::Security::Authentication::Web::WebAuthenticationOptions options, abi_arg_in requestUri, abi_arg_in callbackUri, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AuthenticateWithCallbackUriAsync(Windows::Security::Authentication::Web::WebAuthenticationOptions options, impl::abi_arg_in requestUri, impl::abi_arg_in callbackUri, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AuthenticateAsync(options, *reinterpret_cast(&requestUri), *reinterpret_cast(&callbackUri))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AuthenticateAsync(options, *reinterpret_cast(&requestUri), *reinterpret_cast(&callbackUri))); return S_OK; } catch (...) @@ -28,11 +32,12 @@ struct produce requestUri, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AuthenticateWithoutCallbackUriAsync(Windows::Security::Authentication::Web::WebAuthenticationOptions options, impl::abi_arg_in requestUri, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AuthenticateAsync(options, *reinterpret_cast(&requestUri))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AuthenticateAsync(options, *reinterpret_cast(&requestUri))); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce callbackUri) noexcept override + HRESULT __stdcall abi_GetCurrentApplicationCallbackUri(impl::abi_arg_out callbackUri) noexcept override { try { - *callbackUri = detach(this->shim().GetCurrentApplicationCallbackUri()); + typename D::abi_guard guard(this->shim()); + *callbackUri = detach_abi(this->shim().GetCurrentApplicationCallbackUri()); return S_OK; } catch (...) @@ -60,10 +66,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AuthenticateAndContinue(abi_arg_in requestUri) noexcept override + HRESULT __stdcall abi_AuthenticateAndContinue(impl::abi_arg_in requestUri) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticateAndContinue(*reinterpret_cast(&requestUri)); return S_OK; } @@ -73,10 +80,11 @@ struct produce requestUri, abi_arg_in callbackUri) noexcept override + HRESULT __stdcall abi_AuthenticateWithCallbackUriAndContinue(impl::abi_arg_in requestUri, impl::abi_arg_in callbackUri) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticateAndContinue(*reinterpret_cast(&requestUri), *reinterpret_cast(&callbackUri)); return S_OK; } @@ -86,10 +94,11 @@ struct produce requestUri, abi_arg_in callbackUri, abi_arg_in continuationData, Windows::Security::Authentication::Web::WebAuthenticationOptions options) noexcept override + HRESULT __stdcall abi_AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(impl::abi_arg_in requestUri, impl::abi_arg_in callbackUri, impl::abi_arg_in continuationData, Windows::Security::Authentication::Web::WebAuthenticationOptions options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticateAndContinue(*reinterpret_cast(&requestUri), *reinterpret_cast(&callbackUri), *reinterpret_cast(&continuationData), options); return S_OK; } @@ -99,11 +108,12 @@ struct produce requestUri, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AuthenticateSilentlyAsync(impl::abi_arg_in requestUri, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AuthenticateSilentlyAsync(*reinterpret_cast(&requestUri))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AuthenticateSilentlyAsync(*reinterpret_cast(&requestUri))); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce requestUri, Windows::Security::Authentication::Web::WebAuthenticationOptions options, abi_arg_out> asyncInfo) noexcept override + HRESULT __stdcall abi_AuthenticateSilentlyWithOptionsAsync(impl::abi_arg_in requestUri, Windows::Security::Authentication::Web::WebAuthenticationOptions options, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().AuthenticateSilentlyAsync(*reinterpret_cast(&requestUri), options)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().AuthenticateSilentlyAsync(*reinterpret_cast(&requestUri), options)); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ResponseData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ResponseData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ResponseData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseData()); return S_OK; } catch (...) @@ -149,7 +161,8 @@ struct produceshim().ResponseStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseStatus()); return S_OK; } catch (...) @@ -162,7 +175,8 @@ struct produceshim().ResponseErrorDetail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ResponseErrorDetail()); return S_OK; } catch (...) @@ -179,71 +193,71 @@ namespace Windows::Security::Authentication::Web { template hstring impl_IWebAuthenticationResult::ResponseData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ResponseData(put(value))); + check_hresult(WINRT_SHIM(IWebAuthenticationResult)->get_ResponseData(put_abi(value))); return value; } template Windows::Security::Authentication::Web::WebAuthenticationStatus impl_IWebAuthenticationResult::ResponseStatus() const { Windows::Security::Authentication::Web::WebAuthenticationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_ResponseStatus(&value)); + check_hresult(WINRT_SHIM(IWebAuthenticationResult)->get_ResponseStatus(&value)); return value; } template uint32_t impl_IWebAuthenticationResult::ResponseErrorDetail() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ResponseErrorDetail(&value)); + check_hresult(WINRT_SHIM(IWebAuthenticationResult)->get_ResponseErrorDetail(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationBrokerStatics::AuthenticateAsync(Windows::Security::Authentication::Web::WebAuthenticationOptions options, const Windows::Foundation::Uri & requestUri, const Windows::Foundation::Uri & callbackUri) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateWithCallbackUriAsync(options, get(requestUri), get(callbackUri), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics)->abi_AuthenticateWithCallbackUriAsync(options, get_abi(requestUri), get_abi(callbackUri), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationBrokerStatics::AuthenticateAsync(Windows::Security::Authentication::Web::WebAuthenticationOptions options, const Windows::Foundation::Uri & requestUri) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateWithoutCallbackUriAsync(options, get(requestUri), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics)->abi_AuthenticateWithoutCallbackUriAsync(options, get_abi(requestUri), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::Uri impl_IWebAuthenticationBrokerStatics::GetCurrentApplicationCallbackUri() const { Windows::Foundation::Uri callbackUri { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentApplicationCallbackUri(put(callbackUri))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics)->abi_GetCurrentApplicationCallbackUri(put_abi(callbackUri))); return callbackUri; } template void impl_IWebAuthenticationBrokerStatics2::AuthenticateAndContinue(const Windows::Foundation::Uri & requestUri) const { - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateAndContinue(get(requestUri))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics2)->abi_AuthenticateAndContinue(get_abi(requestUri))); } template void impl_IWebAuthenticationBrokerStatics2::AuthenticateAndContinue(const Windows::Foundation::Uri & requestUri, const Windows::Foundation::Uri & callbackUri) const { - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateWithCallbackUriAndContinue(get(requestUri), get(callbackUri))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics2)->abi_AuthenticateWithCallbackUriAndContinue(get_abi(requestUri), get_abi(callbackUri))); } template void impl_IWebAuthenticationBrokerStatics2::AuthenticateAndContinue(const Windows::Foundation::Uri & requestUri, const Windows::Foundation::Uri & callbackUri, const Windows::Foundation::Collections::ValueSet & continuationData, Windows::Security::Authentication::Web::WebAuthenticationOptions options) const { - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(get(requestUri), get(callbackUri), get(continuationData), options)); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics2)->abi_AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(get_abi(requestUri), get_abi(callbackUri), get_abi(continuationData), options)); } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationBrokerStatics2::AuthenticateSilentlyAsync(const Windows::Foundation::Uri & requestUri) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateSilentlyAsync(get(requestUri), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics2)->abi_AuthenticateSilentlyAsync(get_abi(requestUri), put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncOperation impl_IWebAuthenticationBrokerStatics2::AuthenticateSilentlyAsync(const Windows::Foundation::Uri & requestUri, Windows::Security::Authentication::Web::WebAuthenticationOptions options) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_AuthenticateSilentlyWithOptionsAsync(get(requestUri), options, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAuthenticationBrokerStatics2)->abi_AuthenticateSilentlyWithOptionsAsync(get_abi(requestUri), options, put_abi(asyncInfo))); return asyncInfo; } @@ -290,3 +304,41 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::IWebAuthenticationBrokerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::IWebAuthenticationBrokerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::IWebAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Authentication::Web::WebAuthenticationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Credentials.UI.h b/10.0.14393.0/winrt/Windows.Security.Credentials.UI.h index 68652bcd9..1a927e2ea 100644 --- a/10.0.14393.0/winrt/Windows.Security.Credentials.UI.h +++ b/10.0.14393.0/winrt/Windows.Security.Credentials.UI.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.Credentials.UI.3.h" @@ -15,10 +18,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall put_Caption(abi_arg_in value) noexcept override + HRESULT __stdcall put_Caption(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Caption(*reinterpret_cast(&value)); return S_OK; } @@ -28,11 +32,12 @@ struct produce } } - HRESULT __stdcall get_Caption(abi_arg_out value) noexcept override + HRESULT __stdcall get_Caption(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Caption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Caption()); return S_OK; } catch (...) @@ -42,10 +47,11 @@ struct produce } } - HRESULT __stdcall put_Message(abi_arg_in value) noexcept override + HRESULT __stdcall put_Message(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Message(*reinterpret_cast(&value)); return S_OK; } @@ -55,11 +61,12 @@ struct produce } } - HRESULT __stdcall get_Message(abi_arg_out value) noexcept override + HRESULT __stdcall get_Message(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Message()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Message()); return S_OK; } catch (...) @@ -73,6 +80,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ErrorCode(value); return S_OK; } @@ -86,7 +94,8 @@ struct produce { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -95,10 +104,11 @@ struct produce } } - HRESULT __stdcall put_TargetName(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetName(*reinterpret_cast(&value)); return S_OK; } @@ -108,11 +118,12 @@ struct produce } } - HRESULT __stdcall get_TargetName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetName()); return S_OK; } catch (...) @@ -126,6 +137,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AuthenticationProtocol(value); return S_OK; } @@ -139,7 +151,8 @@ struct produce { try { - *value = detach(this->shim().AuthenticationProtocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationProtocol()); return S_OK; } catch (...) @@ -148,10 +161,11 @@ struct produce } } - HRESULT __stdcall put_CustomAuthenticationProtocol(abi_arg_in value) noexcept override + HRESULT __stdcall put_CustomAuthenticationProtocol(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomAuthenticationProtocol(*reinterpret_cast(&value)); return S_OK; } @@ -161,11 +175,12 @@ struct produce } } - HRESULT __stdcall get_CustomAuthenticationProtocol(abi_arg_out value) noexcept override + HRESULT __stdcall get_CustomAuthenticationProtocol(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomAuthenticationProtocol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomAuthenticationProtocol()); return S_OK; } catch (...) @@ -175,10 +190,11 @@ struct produce } } - HRESULT __stdcall put_PreviousCredential(abi_arg_in value) noexcept override + HRESULT __stdcall put_PreviousCredential(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreviousCredential(*reinterpret_cast(&value)); return S_OK; } @@ -188,11 +204,12 @@ struct produce } } - HRESULT __stdcall get_PreviousCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreviousCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviousCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousCredential()); return S_OK; } catch (...) @@ -206,6 +223,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().AlwaysDisplayDialog(value); return S_OK; } @@ -219,7 +237,8 @@ struct produce { try { - *value = detach(this->shim().AlwaysDisplayDialog()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlwaysDisplayDialog()); return S_OK; } catch (...) @@ -232,6 +251,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CallerSavesCredential(value); return S_OK; } @@ -245,7 +265,8 @@ struct produce { try { - *value = detach(this->shim().CallerSavesCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallerSavesCredential()); return S_OK; } catch (...) @@ -258,6 +279,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().CredentialSaveOption(value); return S_OK; } @@ -271,7 +293,8 @@ struct produce { try { - *value = detach(this->shim().CredentialSaveOption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialSaveOption()); return S_OK; } catch (...) @@ -288,7 +311,8 @@ struct produce { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -301,7 +325,8 @@ struct produce { try { - *value = detach(this->shim().CredentialSaveOption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialSaveOption()); return S_OK; } catch (...) @@ -314,7 +339,8 @@ struct produce { try { - *value = detach(this->shim().CredentialSaved()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialSaved()); return S_OK; } catch (...) @@ -323,11 +349,12 @@ struct produce } } - HRESULT __stdcall get_Credential(abi_arg_out value) noexcept override + HRESULT __stdcall get_Credential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Credential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Credential()); return S_OK; } catch (...) @@ -337,11 +364,12 @@ struct produce } } - HRESULT __stdcall get_CredentialDomainName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CredentialDomainName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CredentialDomainName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialDomainName()); return S_OK; } catch (...) @@ -351,11 +379,12 @@ struct produce } } - HRESULT __stdcall get_CredentialUserName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CredentialUserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CredentialUserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialUserName()); return S_OK; } catch (...) @@ -365,11 +394,12 @@ struct produce } } - HRESULT __stdcall get_CredentialPassword(abi_arg_out value) noexcept override + HRESULT __stdcall get_CredentialPassword(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CredentialPassword()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialPassword()); return S_OK; } catch (...) @@ -383,11 +413,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_PickWithOptionsAsync(abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickWithOptionsAsync(impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickAsync(*reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickAsync(*reinterpret_cast(&options))); return S_OK; } catch (...) @@ -397,11 +428,12 @@ struct produce } } - HRESULT __stdcall abi_PickWithMessageAsync(abi_arg_in targetName, abi_arg_in message, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickWithMessageAsync(impl::abi_arg_in targetName, impl::abi_arg_in message, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message))); return S_OK; } catch (...) @@ -411,11 +443,12 @@ struct produce } } - HRESULT __stdcall abi_PickWithCaptionAsync(abi_arg_in targetName, abi_arg_in message, abi_arg_in caption, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PickWithCaptionAsync(impl::abi_arg_in targetName, impl::abi_arg_in message, impl::abi_arg_in caption, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message), *reinterpret_cast(&caption))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message), *reinterpret_cast(&caption))); return S_OK; } catch (...) @@ -429,11 +462,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CheckAvailabilityAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CheckAvailabilityAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CheckAvailabilityAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CheckAvailabilityAsync()); return S_OK; } catch (...) @@ -443,11 +477,12 @@ struct produce message, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestVerificationAsync(impl::abi_arg_in message, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestVerificationAsync(*reinterpret_cast(&message))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestVerificationAsync(*reinterpret_cast(&message))); return S_OK; } catch (...) @@ -462,207 +497,207 @@ struct produce void impl_ICredentialPickerOptions::Caption(hstring_ref value) const +template void impl_ICredentialPickerOptions::Caption(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Caption(get(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_Caption(get_abi(value))); } template hstring impl_ICredentialPickerOptions::Caption() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Caption(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_Caption(put_abi(value))); return value; } -template void impl_ICredentialPickerOptions::Message(hstring_ref value) const +template void impl_ICredentialPickerOptions::Message(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Message(get(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_Message(get_abi(value))); } template hstring impl_ICredentialPickerOptions::Message() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Message(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_Message(put_abi(value))); return value; } template void impl_ICredentialPickerOptions::ErrorCode(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ErrorCode(value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_ErrorCode(value)); } template uint32_t impl_ICredentialPickerOptions::ErrorCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_ErrorCode(&value)); return value; } -template void impl_ICredentialPickerOptions::TargetName(hstring_ref value) const +template void impl_ICredentialPickerOptions::TargetName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetName(get(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_TargetName(get_abi(value))); } template hstring impl_ICredentialPickerOptions::TargetName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TargetName(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_TargetName(put_abi(value))); return value; } template void impl_ICredentialPickerOptions::AuthenticationProtocol(Windows::Security::Credentials::UI::AuthenticationProtocol value) const { - check_hresult(static_cast(static_cast(*this))->put_AuthenticationProtocol(value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_AuthenticationProtocol(value)); } template Windows::Security::Credentials::UI::AuthenticationProtocol impl_ICredentialPickerOptions::AuthenticationProtocol() const { Windows::Security::Credentials::UI::AuthenticationProtocol value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationProtocol(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_AuthenticationProtocol(&value)); return value; } -template void impl_ICredentialPickerOptions::CustomAuthenticationProtocol(hstring_ref value) const +template void impl_ICredentialPickerOptions::CustomAuthenticationProtocol(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomAuthenticationProtocol(get(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_CustomAuthenticationProtocol(get_abi(value))); } template hstring impl_ICredentialPickerOptions::CustomAuthenticationProtocol() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomAuthenticationProtocol(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_CustomAuthenticationProtocol(put_abi(value))); return value; } template void impl_ICredentialPickerOptions::PreviousCredential(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_PreviousCredential(get(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_PreviousCredential(get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_ICredentialPickerOptions::PreviousCredential() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_PreviousCredential(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_PreviousCredential(put_abi(value))); return value; } template void impl_ICredentialPickerOptions::AlwaysDisplayDialog(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AlwaysDisplayDialog(value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_AlwaysDisplayDialog(value)); } template bool impl_ICredentialPickerOptions::AlwaysDisplayDialog() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AlwaysDisplayDialog(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_AlwaysDisplayDialog(&value)); return value; } template void impl_ICredentialPickerOptions::CallerSavesCredential(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CallerSavesCredential(value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_CallerSavesCredential(value)); } template bool impl_ICredentialPickerOptions::CallerSavesCredential() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CallerSavesCredential(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_CallerSavesCredential(&value)); return value; } template void impl_ICredentialPickerOptions::CredentialSaveOption(Windows::Security::Credentials::UI::CredentialSaveOption value) const { - check_hresult(static_cast(static_cast(*this))->put_CredentialSaveOption(value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->put_CredentialSaveOption(value)); } template Windows::Security::Credentials::UI::CredentialSaveOption impl_ICredentialPickerOptions::CredentialSaveOption() const { Windows::Security::Credentials::UI::CredentialSaveOption value {}; - check_hresult(static_cast(static_cast(*this))->get_CredentialSaveOption(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerOptions)->get_CredentialSaveOption(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_ICredentialPickerStatics::PickAsync(const Windows::Security::Credentials::UI::CredentialPickerOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickWithOptionsAsync(get(options), put(operation))); + check_hresult(WINRT_SHIM(ICredentialPickerStatics)->abi_PickWithOptionsAsync(get_abi(options), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICredentialPickerStatics::PickAsync(hstring_ref targetName, hstring_ref message) const +template Windows::Foundation::IAsyncOperation impl_ICredentialPickerStatics::PickAsync(hstring_view targetName, hstring_view message) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickWithMessageAsync(get(targetName), get(message), put(operation))); + check_hresult(WINRT_SHIM(ICredentialPickerStatics)->abi_PickWithMessageAsync(get_abi(targetName), get_abi(message), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ICredentialPickerStatics::PickAsync(hstring_ref targetName, hstring_ref message, hstring_ref caption) const +template Windows::Foundation::IAsyncOperation impl_ICredentialPickerStatics::PickAsync(hstring_view targetName, hstring_view message, hstring_view caption) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PickWithCaptionAsync(get(targetName), get(message), get(caption), put(operation))); + check_hresult(WINRT_SHIM(ICredentialPickerStatics)->abi_PickWithCaptionAsync(get_abi(targetName), get_abi(message), get_abi(caption), put_abi(operation))); return operation; } template uint32_t impl_ICredentialPickerResults::ErrorCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_ErrorCode(&value)); return value; } template Windows::Security::Credentials::UI::CredentialSaveOption impl_ICredentialPickerResults::CredentialSaveOption() const { Windows::Security::Credentials::UI::CredentialSaveOption value {}; - check_hresult(static_cast(static_cast(*this))->get_CredentialSaveOption(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_CredentialSaveOption(&value)); return value; } template bool impl_ICredentialPickerResults::CredentialSaved() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CredentialSaved(&value)); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_CredentialSaved(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ICredentialPickerResults::Credential() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Credential(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_Credential(put_abi(value))); return value; } template hstring impl_ICredentialPickerResults::CredentialDomainName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CredentialDomainName(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_CredentialDomainName(put_abi(value))); return value; } template hstring impl_ICredentialPickerResults::CredentialUserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CredentialUserName(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_CredentialUserName(put_abi(value))); return value; } template hstring impl_ICredentialPickerResults::CredentialPassword() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CredentialPassword(put(value))); + check_hresult(WINRT_SHIM(ICredentialPickerResults)->get_CredentialPassword(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IUserConsentVerifierStatics::CheckAvailabilityAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CheckAvailabilityAsync(put(result))); + check_hresult(WINRT_SHIM(IUserConsentVerifierStatics)->abi_CheckAvailabilityAsync(put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IUserConsentVerifierStatics::RequestVerificationAsync(hstring_ref message) const +template Windows::Foundation::IAsyncOperation impl_IUserConsentVerifierStatics::RequestVerificationAsync(hstring_view message) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestVerificationAsync(get(message), put(result))); + check_hresult(WINRT_SHIM(IUserConsentVerifierStatics)->abi_RequestVerificationAsync(get_abi(message), put_abi(result))); return result; } @@ -671,12 +706,12 @@ inline Windows::Foundation::IAsyncOperation().PickAsync(options); } -inline Windows::Foundation::IAsyncOperation CredentialPicker::PickAsync(hstring_ref targetName, hstring_ref message) +inline Windows::Foundation::IAsyncOperation CredentialPicker::PickAsync(hstring_view targetName, hstring_view message) { return get_activation_factory().PickAsync(targetName, message); } -inline Windows::Foundation::IAsyncOperation CredentialPicker::PickAsync(hstring_ref targetName, hstring_ref message, hstring_ref caption) +inline Windows::Foundation::IAsyncOperation CredentialPicker::PickAsync(hstring_view targetName, hstring_view message, hstring_view caption) { return get_activation_factory().PickAsync(targetName, message, caption); } @@ -690,7 +725,7 @@ inline Windows::Foundation::IAsyncOperation().CheckAvailabilityAsync(); } -inline Windows::Foundation::IAsyncOperation UserConsentVerifier::RequestVerificationAsync(hstring_ref message) +inline Windows::Foundation::IAsyncOperation UserConsentVerifier::RequestVerificationAsync(hstring_view message) { return get_activation_factory().RequestVerificationAsync(message); } @@ -698,3 +733,59 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::ICredentialPickerResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::ICredentialPickerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::IUserConsentVerifierStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::CredentialPickerOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::UI::CredentialPickerResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Credentials.h b/10.0.14393.0/winrt/Windows.Security.Credentials.h index 60f3d856e..4fdfc7884 100644 --- a/10.0.14393.0/winrt/Windows.Security.Credentials.h +++ b/10.0.14393.0/winrt/Windows.Security.Credentials.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_CreatePasswordCredential(abi_arg_in resource, abi_arg_in userName, abi_arg_in password, abi_arg_out credential) noexcept override + HRESULT __stdcall abi_CreatePasswordCredential(impl::abi_arg_in resource, impl::abi_arg_in userName, impl::abi_arg_in password, impl::abi_arg_out credential) noexcept override { try { - *credential = detach(this->shim().CreatePasswordCredential(*reinterpret_cast(&resource), *reinterpret_cast(&userName), *reinterpret_cast(&password))); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().CreatePasswordCredential(*reinterpret_cast(&resource), *reinterpret_cast(&userName), *reinterpret_cast(&password))); return S_OK; } catch (...) @@ -36,11 +40,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -50,11 +55,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RetrievePublicKeyWithDefaultBlobType(abi_arg_out value) noexcept override + HRESULT __stdcall abi_RetrievePublicKeyWithDefaultBlobType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RetrievePublicKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetrievePublicKey()); return S_OK; } catch (...) @@ -64,11 +70,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RetrievePublicKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType blobType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_RetrievePublicKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType blobType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RetrievePublicKey(blobType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetrievePublicKey(blobType)); return S_OK; } catch (...) @@ -78,11 +85,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RequestSignAsync(abi_arg_in data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestSignAsync(impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestSignAsync(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestSignAsync(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -92,11 +100,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetAttestationAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetAttestationAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAttestationAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAttestationAsync()); return S_OK; } catch (...) @@ -110,11 +119,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_CertificateChainBuffer(abi_arg_out value) noexcept override + HRESULT __stdcall get_CertificateChainBuffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CertificateChainBuffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CertificateChainBuffer()); return S_OK; } catch (...) @@ -124,11 +134,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AttestationBuffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttestationBuffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttestationBuffer()); return S_OK; } catch (...) @@ -142,7 +153,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -155,11 +167,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_IsSupportedAsync(abi_arg_out> value) noexcept override + HRESULT __stdcall abi_IsSupportedAsync(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsSupportedAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSupportedAsync()); return S_OK; } catch (...) @@ -169,11 +182,12 @@ struct produce } } - HRESULT __stdcall abi_RenewAttestationAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RenewAttestationAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RenewAttestationAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenewAttestationAsync()); return S_OK; } catch (...) @@ -183,11 +197,12 @@ struct produce } } - HRESULT __stdcall abi_RequestCreateAsync(abi_arg_in name, Windows::Security::Credentials::KeyCredentialCreationOption option, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestCreateAsync(impl::abi_arg_in name, Windows::Security::Credentials::KeyCredentialCreationOption option, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestCreateAsync(*reinterpret_cast(&name), option)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestCreateAsync(*reinterpret_cast(&name), option)); return S_OK; } catch (...) @@ -197,11 +212,12 @@ struct produce } } - HRESULT __stdcall abi_OpenAsync(abi_arg_in name, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_OpenAsync(impl::abi_arg_in name, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OpenAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -211,11 +227,12 @@ struct produce } } - HRESULT __stdcall abi_DeleteAsync(abi_arg_in name, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_in name, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -229,11 +246,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Result(abi_arg_out value) noexcept override + HRESULT __stdcall get_Result(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -247,7 +265,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -260,11 +279,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Credential(abi_arg_out value) noexcept override + HRESULT __stdcall get_Credential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Credential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Credential()); return S_OK; } catch (...) @@ -278,7 +298,8 @@ struct produce { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -291,11 +312,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Resource(abi_arg_out resource) noexcept override + HRESULT __stdcall get_Resource(impl::abi_arg_out resource) noexcept override { try { - *resource = detach(this->shim().Resource()); + typename D::abi_guard guard(this->shim()); + *resource = detach_abi(this->shim().Resource()); return S_OK; } catch (...) @@ -305,10 +327,11 @@ struct produce : produce } } - HRESULT __stdcall put_Resource(abi_arg_in resource) noexcept override + HRESULT __stdcall put_Resource(impl::abi_arg_in resource) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Resource(*reinterpret_cast(&resource)); return S_OK; } @@ -318,11 +341,12 @@ struct produce : produce } } - HRESULT __stdcall get_UserName(abi_arg_out userName) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out userName) noexcept override { try { - *userName = detach(this->shim().UserName()); + typename D::abi_guard guard(this->shim()); + *userName = detach_abi(this->shim().UserName()); return S_OK; } catch (...) @@ -332,10 +356,11 @@ struct produce : produce } } - HRESULT __stdcall put_UserName(abi_arg_in userName) noexcept override + HRESULT __stdcall put_UserName(impl::abi_arg_in userName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserName(*reinterpret_cast(&userName)); return S_OK; } @@ -345,11 +370,12 @@ struct produce : produce } } - HRESULT __stdcall get_Password(abi_arg_out password) noexcept override + HRESULT __stdcall get_Password(impl::abi_arg_out password) noexcept override { try { - *password = detach(this->shim().Password()); + typename D::abi_guard guard(this->shim()); + *password = detach_abi(this->shim().Password()); return S_OK; } catch (...) @@ -359,10 +385,11 @@ struct produce : produce } } - HRESULT __stdcall put_Password(abi_arg_in password) noexcept override + HRESULT __stdcall put_Password(impl::abi_arg_in password) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&password)); return S_OK; } @@ -376,6 +403,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RetrievePassword(); return S_OK; } @@ -385,11 +413,12 @@ struct produce : produce } } - HRESULT __stdcall get_Properties(abi_arg_out props) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out props) noexcept override { try { - *props = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *props = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -403,10 +432,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_Add(abi_arg_in credential) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in credential) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&credential)); return S_OK; } @@ -416,10 +446,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Remove(abi_arg_in credential) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in credential) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&credential)); return S_OK; } @@ -429,11 +460,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_Retrieve(abi_arg_in resource, abi_arg_in userName, abi_arg_out credential) noexcept override + HRESULT __stdcall abi_Retrieve(impl::abi_arg_in resource, impl::abi_arg_in userName, impl::abi_arg_out credential) noexcept override { try { - *credential = detach(this->shim().Retrieve(*reinterpret_cast(&resource), *reinterpret_cast(&userName))); + typename D::abi_guard guard(this->shim()); + *credential = detach_abi(this->shim().Retrieve(*reinterpret_cast(&resource), *reinterpret_cast(&userName))); return S_OK; } catch (...) @@ -443,11 +475,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FindAllByResource(abi_arg_in resource, abi_arg_out> credentials) noexcept override + HRESULT __stdcall abi_FindAllByResource(impl::abi_arg_in resource, impl::abi_arg_out> credentials) noexcept override { try { - *credentials = detach(this->shim().FindAllByResource(*reinterpret_cast(&resource))); + typename D::abi_guard guard(this->shim()); + *credentials = detach_abi(this->shim().FindAllByResource(*reinterpret_cast(&resource))); return S_OK; } catch (...) @@ -457,11 +490,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FindAllByUserName(abi_arg_in userName, abi_arg_out> credentials) noexcept override + HRESULT __stdcall abi_FindAllByUserName(impl::abi_arg_in userName, impl::abi_arg_out> credentials) noexcept override { try { - *credentials = detach(this->shim().FindAllByUserName(*reinterpret_cast(&userName))); + typename D::abi_guard guard(this->shim()); + *credentials = detach_abi(this->shim().FindAllByUserName(*reinterpret_cast(&userName))); return S_OK; } catch (...) @@ -471,11 +505,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RetrieveAll(abi_arg_out> credentials) noexcept override + HRESULT __stdcall abi_RetrieveAll(impl::abi_arg_out> credentials) noexcept override { try { - *credentials = detach(this->shim().RetrieveAll()); + typename D::abi_guard guard(this->shim()); + *credentials = detach_abi(this->shim().RetrieveAll()); return S_OK; } catch (...) @@ -489,11 +524,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_WebAccountProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccountProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccountProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountProvider()); return S_OK; } catch (...) @@ -503,11 +539,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UserName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserName()); return S_OK; } catch (...) @@ -521,7 +558,8 @@ struct produce : produce_baseshim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -534,11 +572,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -548,11 +587,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -562,11 +602,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_GetPictureAsync(Windows::Security::Credentials::WebAccountPictureSize desizedSize, impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().GetPictureAsync(desizedSize)); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().GetPictureAsync(desizedSize)); return S_OK; } catch (...) @@ -576,11 +617,12 @@ struct produce : produce_base asyncInfo) noexcept override + HRESULT __stdcall abi_SignOutAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SignOutAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SignOutAsync()); return S_OK; } catch (...) @@ -590,11 +632,12 @@ struct produce : produce_base clientId, abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_SignOutWithClientIdAsync(impl::abi_arg_in clientId, impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().SignOutAsync(*reinterpret_cast(&clientId))); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().SignOutAsync(*reinterpret_cast(&clientId))); return S_OK; } catch (...) @@ -608,11 +651,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWebAccount(abi_arg_in webAccountProvider, abi_arg_in userName, Windows::Security::Credentials::WebAccountState state, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWebAccount(impl::abi_arg_in webAccountProvider, impl::abi_arg_in userName, Windows::Security::Credentials::WebAccountState state, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWebAccount(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&userName), state)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWebAccount(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&userName), state)); return S_OK; } catch (...) @@ -626,11 +670,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -640,11 +685,12 @@ struct produce : produce } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -654,11 +700,12 @@ struct produce : produce } } - HRESULT __stdcall get_IconUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_IconUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconUri()); return S_OK; } catch (...) @@ -672,11 +719,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_DisplayPurpose(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayPurpose(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayPurpose()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayPurpose()); return S_OK; } catch (...) @@ -686,11 +734,12 @@ struct produce : produc } } - HRESULT __stdcall get_Authority(abi_arg_out value) noexcept override + HRESULT __stdcall get_Authority(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Authority()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Authority()); return S_OK; } catch (...) @@ -704,11 +753,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out user) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out user) noexcept override { try { - *user = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *user = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -722,11 +772,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateWebAccountProvider(abi_arg_in id, abi_arg_in displayName, abi_arg_in iconUri, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWebAccountProvider(impl::abi_arg_in id, impl::abi_arg_in displayName, impl::abi_arg_in iconUri, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWebAccountProvider(*reinterpret_cast(&id), *reinterpret_cast(&displayName), *reinterpret_cast(&iconUri))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWebAccountProvider(*reinterpret_cast(&id), *reinterpret_cast(&displayName), *reinterpret_cast(&iconUri))); return S_OK; } catch (...) @@ -741,327 +792,327 @@ struct produce : namespace Windows::Security::Credentials { -template Windows::Security::Credentials::WebAccount impl_IWebAccountFactory::CreateWebAccount(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, hstring_ref userName, Windows::Security::Credentials::WebAccountState state) const +template Windows::Security::Credentials::WebAccount impl_IWebAccountFactory::CreateWebAccount(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, hstring_view userName, Windows::Security::Credentials::WebAccountState state) const { Windows::Security::Credentials::WebAccount instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWebAccount(get(webAccountProvider), get(userName), state, put(instance))); + check_hresult(WINRT_SHIM(IWebAccountFactory)->abi_CreateWebAccount(get_abi(webAccountProvider), get_abi(userName), state, put_abi(instance))); return instance; } template Windows::Security::Credentials::WebAccountProvider impl_IWebAccount::WebAccountProvider() const { Windows::Security::Credentials::WebAccountProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccountProvider(put(value))); + check_hresult(WINRT_SHIM(IWebAccount)->get_WebAccountProvider(put_abi(value))); return value; } template hstring impl_IWebAccount::UserName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(value))); + check_hresult(WINRT_SHIM(IWebAccount)->get_UserName(put_abi(value))); return value; } template Windows::Security::Credentials::WebAccountState impl_IWebAccount::State() const { Windows::Security::Credentials::WebAccountState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IWebAccount)->get_State(&value)); return value; } template hstring impl_IWebAccount2::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IWebAccount2)->get_Id(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IWebAccount2::Properties() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IWebAccount2)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IWebAccount2::GetPictureAsync(Windows::Security::Credentials::WebAccountPictureSize desizedSize) const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_GetPictureAsync(desizedSize, put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccount2)->abi_GetPictureAsync(desizedSize, put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IWebAccount2::SignOutAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SignOutAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccount2)->abi_SignOutAsync(put_abi(asyncInfo))); return asyncInfo; } -template Windows::Foundation::IAsyncAction impl_IWebAccount2::SignOutAsync(hstring_ref clientId) const +template Windows::Foundation::IAsyncAction impl_IWebAccount2::SignOutAsync(hstring_view clientId) const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_SignOutWithClientIdAsync(get(clientId), put(asyncInfo))); + check_hresult(WINRT_SHIM(IWebAccount2)->abi_SignOutWithClientIdAsync(get_abi(clientId), put_abi(asyncInfo))); return asyncInfo; } -template Windows::Security::Credentials::WebAccountProvider impl_IWebAccountProviderFactory::CreateWebAccountProvider(hstring_ref id, hstring_ref displayName, const Windows::Foundation::Uri & iconUri) const +template Windows::Security::Credentials::WebAccountProvider impl_IWebAccountProviderFactory::CreateWebAccountProvider(hstring_view id, hstring_view displayName, const Windows::Foundation::Uri & iconUri) const { Windows::Security::Credentials::WebAccountProvider instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWebAccountProvider(get(id), get(displayName), get(iconUri), put(instance))); + check_hresult(WINRT_SHIM(IWebAccountProviderFactory)->abi_CreateWebAccountProvider(get_abi(id), get_abi(displayName), get_abi(iconUri), put_abi(instance))); return instance; } template hstring impl_IWebAccountProvider::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProvider)->get_Id(put_abi(value))); return value; } template hstring impl_IWebAccountProvider::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProvider)->get_DisplayName(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebAccountProvider::IconUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IconUri(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProvider)->get_IconUri(put_abi(value))); return value; } template hstring impl_IWebAccountProvider2::DisplayPurpose() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayPurpose(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProvider2)->get_DisplayPurpose(put_abi(value))); return value; } template hstring impl_IWebAccountProvider2::Authority() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Authority(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProvider2)->get_Authority(put_abi(value))); return value; } template Windows::System::User impl_IWebAccountProvider3::User() const { Windows::System::User user { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(user))); + check_hresult(WINRT_SHIM(IWebAccountProvider3)->get_User(put_abi(user))); return user; } template Windows::Foundation::IAsyncOperation impl_IKeyCredentialManagerStatics::IsSupportedAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_IsSupportedAsync(put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialManagerStatics)->abi_IsSupportedAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IKeyCredentialManagerStatics::RenewAttestationAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RenewAttestationAsync(put(operation))); + check_hresult(WINRT_SHIM(IKeyCredentialManagerStatics)->abi_RenewAttestationAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IKeyCredentialManagerStatics::RequestCreateAsync(hstring_ref name, Windows::Security::Credentials::KeyCredentialCreationOption option) const +template Windows::Foundation::IAsyncOperation impl_IKeyCredentialManagerStatics::RequestCreateAsync(hstring_view name, Windows::Security::Credentials::KeyCredentialCreationOption option) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestCreateAsync(get(name), option, put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialManagerStatics)->abi_RequestCreateAsync(get_abi(name), option, put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IKeyCredentialManagerStatics::OpenAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IKeyCredentialManagerStatics::OpenAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_OpenAsync(get(name), put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialManagerStatics)->abi_OpenAsync(get_abi(name), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IKeyCredentialManagerStatics::DeleteAsync(hstring_ref name) const +template Windows::Foundation::IAsyncAction impl_IKeyCredentialManagerStatics::DeleteAsync(hstring_view name) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IKeyCredentialManagerStatics)->abi_DeleteAsync(get_abi(name), put_abi(operation))); return operation; } template hstring impl_IKeyCredential::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IKeyCredential)->get_Name(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IKeyCredential::RetrievePublicKey() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_RetrievePublicKeyWithDefaultBlobType(put(value))); + check_hresult(WINRT_SHIM(IKeyCredential)->abi_RetrievePublicKeyWithDefaultBlobType(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IKeyCredential::RetrievePublicKey(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType blobType) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_RetrievePublicKeyWithBlobType(blobType, put(value))); + check_hresult(WINRT_SHIM(IKeyCredential)->abi_RetrievePublicKeyWithBlobType(blobType, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IKeyCredential::RequestSignAsync(const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestSignAsync(get(data), put(value))); + check_hresult(WINRT_SHIM(IKeyCredential)->abi_RequestSignAsync(get_abi(data), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IKeyCredential::GetAttestationAsync() const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_GetAttestationAsync(put(value))); + check_hresult(WINRT_SHIM(IKeyCredential)->abi_GetAttestationAsync(put_abi(value))); return value; } template Windows::Security::Credentials::KeyCredential impl_IKeyCredentialRetrievalResult::Credential() const { Windows::Security::Credentials::KeyCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Credential(put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialRetrievalResult)->get_Credential(put_abi(value))); return value; } template Windows::Security::Credentials::KeyCredentialStatus impl_IKeyCredentialRetrievalResult::Status() const { Windows::Security::Credentials::KeyCredentialStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IKeyCredentialRetrievalResult)->get_Status(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IKeyCredentialOperationResult::Result() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Result(put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialOperationResult)->get_Result(put_abi(value))); return value; } template Windows::Security::Credentials::KeyCredentialStatus impl_IKeyCredentialOperationResult::Status() const { Windows::Security::Credentials::KeyCredentialStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IKeyCredentialOperationResult)->get_Status(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IKeyCredentialAttestationResult::CertificateChainBuffer() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_CertificateChainBuffer(put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialAttestationResult)->get_CertificateChainBuffer(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IKeyCredentialAttestationResult::AttestationBuffer() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_AttestationBuffer(put(value))); + check_hresult(WINRT_SHIM(IKeyCredentialAttestationResult)->get_AttestationBuffer(put_abi(value))); return value; } template Windows::Security::Credentials::KeyCredentialAttestationStatus impl_IKeyCredentialAttestationResult::Status() const { Windows::Security::Credentials::KeyCredentialAttestationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IKeyCredentialAttestationResult)->get_Status(&value)); return value; } template hstring impl_IPasswordCredential::Resource() const { hstring resource; - check_hresult(static_cast(static_cast(*this))->get_Resource(put(resource))); + check_hresult(WINRT_SHIM(IPasswordCredential)->get_Resource(put_abi(resource))); return resource; } -template void impl_IPasswordCredential::Resource(hstring_ref resource) const +template void impl_IPasswordCredential::Resource(hstring_view resource) const { - check_hresult(static_cast(static_cast(*this))->put_Resource(get(resource))); + check_hresult(WINRT_SHIM(IPasswordCredential)->put_Resource(get_abi(resource))); } template hstring impl_IPasswordCredential::UserName() const { hstring userName; - check_hresult(static_cast(static_cast(*this))->get_UserName(put(userName))); + check_hresult(WINRT_SHIM(IPasswordCredential)->get_UserName(put_abi(userName))); return userName; } -template void impl_IPasswordCredential::UserName(hstring_ref userName) const +template void impl_IPasswordCredential::UserName(hstring_view userName) const { - check_hresult(static_cast(static_cast(*this))->put_UserName(get(userName))); + check_hresult(WINRT_SHIM(IPasswordCredential)->put_UserName(get_abi(userName))); } template hstring impl_IPasswordCredential::Password() const { hstring password; - check_hresult(static_cast(static_cast(*this))->get_Password(put(password))); + check_hresult(WINRT_SHIM(IPasswordCredential)->get_Password(put_abi(password))); return password; } -template void impl_IPasswordCredential::Password(hstring_ref password) const +template void impl_IPasswordCredential::Password(hstring_view password) const { - check_hresult(static_cast(static_cast(*this))->put_Password(get(password))); + check_hresult(WINRT_SHIM(IPasswordCredential)->put_Password(get_abi(password))); } template void impl_IPasswordCredential::RetrievePassword() const { - check_hresult(static_cast(static_cast(*this))->abi_RetrievePassword()); + check_hresult(WINRT_SHIM(IPasswordCredential)->abi_RetrievePassword()); } template Windows::Foundation::Collections::IPropertySet impl_IPasswordCredential::Properties() const { Windows::Foundation::Collections::IPropertySet props; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(props))); + check_hresult(WINRT_SHIM(IPasswordCredential)->get_Properties(put_abi(props))); return props; } -template Windows::Security::Credentials::PasswordCredential impl_ICredentialFactory::CreatePasswordCredential(hstring_ref resource, hstring_ref userName, hstring_ref password) const +template Windows::Security::Credentials::PasswordCredential impl_ICredentialFactory::CreatePasswordCredential(hstring_view resource, hstring_view userName, hstring_view password) const { Windows::Security::Credentials::PasswordCredential credential { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePasswordCredential(get(resource), get(userName), get(password), put(credential))); + check_hresult(WINRT_SHIM(ICredentialFactory)->abi_CreatePasswordCredential(get_abi(resource), get_abi(userName), get_abi(password), put_abi(credential))); return credential; } template void impl_IPasswordVault::Add(const Windows::Security::Credentials::PasswordCredential & credential) const { - check_hresult(static_cast(static_cast(*this))->abi_Add(get(credential))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_Add(get_abi(credential))); } template void impl_IPasswordVault::Remove(const Windows::Security::Credentials::PasswordCredential & credential) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(credential))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_Remove(get_abi(credential))); } -template Windows::Security::Credentials::PasswordCredential impl_IPasswordVault::Retrieve(hstring_ref resource, hstring_ref userName) const +template Windows::Security::Credentials::PasswordCredential impl_IPasswordVault::Retrieve(hstring_view resource, hstring_view userName) const { Windows::Security::Credentials::PasswordCredential credential { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Retrieve(get(resource), get(userName), put(credential))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_Retrieve(get_abi(resource), get_abi(userName), put_abi(credential))); return credential; } -template Windows::Foundation::Collections::IVectorView impl_IPasswordVault::FindAllByResource(hstring_ref resource) const +template Windows::Foundation::Collections::IVectorView impl_IPasswordVault::FindAllByResource(hstring_view resource) const { Windows::Foundation::Collections::IVectorView credentials; - check_hresult(static_cast(static_cast(*this))->abi_FindAllByResource(get(resource), put(credentials))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_FindAllByResource(get_abi(resource), put_abi(credentials))); return credentials; } -template Windows::Foundation::Collections::IVectorView impl_IPasswordVault::FindAllByUserName(hstring_ref userName) const +template Windows::Foundation::Collections::IVectorView impl_IPasswordVault::FindAllByUserName(hstring_view userName) const { Windows::Foundation::Collections::IVectorView credentials; - check_hresult(static_cast(static_cast(*this))->abi_FindAllByUserName(get(userName), put(credentials))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_FindAllByUserName(get_abi(userName), put_abi(credentials))); return credentials; } template Windows::Foundation::Collections::IVectorView impl_IPasswordVault::RetrieveAll() const { Windows::Foundation::Collections::IVectorView credentials; - check_hresult(static_cast(static_cast(*this))->abi_RetrieveAll(put(credentials))); + check_hresult(WINRT_SHIM(IPasswordVault)->abi_RetrieveAll(put_abi(credentials))); return credentials; } @@ -1075,17 +1126,17 @@ inline Windows::Foundation::IAsyncAction KeyCredentialManager::RenewAttestationA return get_activation_factory().RenewAttestationAsync(); } -inline Windows::Foundation::IAsyncOperation KeyCredentialManager::RequestCreateAsync(hstring_ref name, Windows::Security::Credentials::KeyCredentialCreationOption option) +inline Windows::Foundation::IAsyncOperation KeyCredentialManager::RequestCreateAsync(hstring_view name, Windows::Security::Credentials::KeyCredentialCreationOption option) { return get_activation_factory().RequestCreateAsync(name, option); } -inline Windows::Foundation::IAsyncOperation KeyCredentialManager::OpenAsync(hstring_ref name) +inline Windows::Foundation::IAsyncOperation KeyCredentialManager::OpenAsync(hstring_view name) { return get_activation_factory().OpenAsync(name); } -inline Windows::Foundation::IAsyncAction KeyCredentialManager::DeleteAsync(hstring_ref name) +inline Windows::Foundation::IAsyncAction KeyCredentialManager::DeleteAsync(hstring_view name) { return get_activation_factory().DeleteAsync(name); } @@ -1094,7 +1145,7 @@ inline PasswordCredential::PasswordCredential() : PasswordCredential(activate_instance()) {} -inline PasswordCredential::PasswordCredential(hstring_ref resource, hstring_ref userName, hstring_ref password) : +inline PasswordCredential::PasswordCredential(hstring_view resource, hstring_view userName, hstring_view password) : PasswordCredential(get_activation_factory().CreatePasswordCredential(resource, userName, password)) {} @@ -1106,14 +1157,232 @@ inline PasswordVault::PasswordVault() : PasswordVault(activate_instance()) {} -inline WebAccount::WebAccount(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, hstring_ref userName, Windows::Security::Credentials::WebAccountState state) : +inline WebAccount::WebAccount(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, hstring_view userName, Windows::Security::Credentials::WebAccountState state) : WebAccount(get_activation_factory().CreateWebAccount(webAccountProvider, userName, state)) {} -inline WebAccountProvider::WebAccountProvider(hstring_ref id, hstring_ref displayName, const Windows::Foundation::Uri & iconUri) : +inline WebAccountProvider::WebAccountProvider(hstring_view id, hstring_view displayName, const Windows::Foundation::Uri & iconUri) : WebAccountProvider(get_activation_factory().CreateWebAccountProvider(id, displayName, iconUri)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::ICredentialFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IKeyCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IKeyCredentialOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IPasswordCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IPasswordVault & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccount2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccountFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccountProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccountProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccountProvider3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::IWebAccountProviderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::KeyCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::KeyCredentialAttestationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::KeyCredentialOperationResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::KeyCredentialRetrievalResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::PasswordCredential & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::PasswordCredentialPropertyStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::PasswordVault & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::WebAccount & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Credentials::WebAccountProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Cryptography.Certificates.h b/10.0.14393.0/winrt/Windows.Security.Cryptography.Certificates.h index bedcab010..4b8c2c671 100644 --- a/10.0.14393.0/winrt/Windows.Security.Cryptography.Certificates.h +++ b/10.0.14393.0/winrt/Windows.Security.Cryptography.Certificates.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Networking.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_BuildChainAsync(abi_arg_in> certificates, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_BuildChainAsync(impl::abi_arg_in> certificates, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BuildChainAsync(*reinterpret_cast *>(&certificates))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildChainAsync(*reinterpret_cast *>(&certificates))); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : } } - HRESULT __stdcall abi_BuildChainWithParametersAsync(abi_arg_in> certificates, abi_arg_in parameters, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_BuildChainWithParametersAsync(impl::abi_arg_in> certificates, impl::abi_arg_in parameters, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BuildChainAsync(*reinterpret_cast *>(&certificates), *reinterpret_cast(¶meters))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildChainAsync(*reinterpret_cast *>(&certificates), *reinterpret_cast(¶meters))); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : } } - HRESULT __stdcall get_SerialNumber(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_SerialNumber(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().SerialNumber()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().SerialNumber()); return S_OK; } catch (...) @@ -60,11 +66,12 @@ struct produce : } } - HRESULT __stdcall abi_GetHashValue(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetHashValue(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().GetHashValue()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().GetHashValue()); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : } } - HRESULT __stdcall abi_GetHashValueWithAlgorithm(abi_arg_in hashAlgorithmName, uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_GetHashValueWithAlgorithm(impl::abi_arg_in hashAlgorithmName, uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().GetHashValue(*reinterpret_cast(&hashAlgorithmName))); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().GetHashValue(*reinterpret_cast(&hashAlgorithmName))); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : } } - HRESULT __stdcall abi_GetCertificateBlob(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCertificateBlob(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCertificateBlob()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCertificateBlob()); return S_OK; } catch (...) @@ -104,11 +113,12 @@ struct produce : } } - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -118,11 +128,12 @@ struct produce : } } - HRESULT __stdcall get_Issuer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Issuer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Issuer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Issuer()); return S_OK; } catch (...) @@ -136,7 +147,8 @@ struct produce : { try { - *value = detach(this->shim().HasPrivateKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasPrivateKey()); return S_OK; } catch (...) @@ -149,7 +161,8 @@ struct produce : { try { - *value = detach(this->shim().IsStronglyProtected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStronglyProtected()); return S_OK; } catch (...) @@ -158,11 +171,12 @@ struct produce : } } - HRESULT __stdcall get_ValidFrom(abi_arg_out value) noexcept override + HRESULT __stdcall get_ValidFrom(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValidFrom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValidFrom()); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce : } } - HRESULT __stdcall get_ValidTo(abi_arg_out value) noexcept override + HRESULT __stdcall get_ValidTo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValidTo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValidTo()); return S_OK; } catch (...) @@ -184,11 +199,12 @@ struct produce : } } - HRESULT __stdcall get_EnhancedKeyUsages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EnhancedKeyUsages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EnhancedKeyUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnhancedKeyUsages()); return S_OK; } catch (...) @@ -198,10 +214,11 @@ struct produce : } } - HRESULT __stdcall put_FriendlyName(abi_arg_in value) noexcept override + HRESULT __stdcall put_FriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -211,11 +228,12 @@ struct produce : } } - HRESULT __stdcall get_FriendlyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -233,7 +251,8 @@ struct produce { try { - *value = detach(this->shim().IsSecurityDeviceBound()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSecurityDeviceBound()); return S_OK; } catch (...) @@ -242,11 +261,12 @@ struct produce } } - HRESULT __stdcall get_KeyUsages(abi_arg_out value) noexcept override + HRESULT __stdcall get_KeyUsages(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyUsages()); return S_OK; } catch (...) @@ -256,11 +276,12 @@ struct produce } } - HRESULT __stdcall get_KeyAlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_KeyAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyAlgorithmName()); return S_OK; } catch (...) @@ -270,11 +291,12 @@ struct produce } } - HRESULT __stdcall get_SignatureAlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SignatureAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignatureAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignatureAlgorithmName()); return S_OK; } catch (...) @@ -284,11 +306,12 @@ struct produce } } - HRESULT __stdcall get_SignatureHashAlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SignatureHashAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignatureHashAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignatureHashAlgorithmName()); return S_OK; } catch (...) @@ -298,11 +321,12 @@ struct produce } } - HRESULT __stdcall get_SubjectAlternativeName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SubjectAlternativeName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubjectAlternativeName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubjectAlternativeName()); return S_OK; } catch (...) @@ -320,7 +344,8 @@ struct produce { try { - *value = detach(this->shim().IsPerUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPerUser()); return S_OK; } catch (...) @@ -329,11 +354,12 @@ struct produce } } - HRESULT __stdcall get_StoreName(abi_arg_out value) noexcept override + HRESULT __stdcall get_StoreName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreName()); return S_OK; } catch (...) @@ -343,11 +369,12 @@ struct produce } } - HRESULT __stdcall get_KeyStorageProviderName(abi_arg_out value) noexcept override + HRESULT __stdcall get_KeyStorageProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStorageProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStorageProviderName()); return S_OK; } catch (...) @@ -365,7 +392,8 @@ struct produceshim().Validate()); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Validate()); return S_OK; } catch (...) @@ -374,11 +402,12 @@ struct produce parameter, Windows::Security::Cryptography::Certificates::ChainValidationResult * status) noexcept override + HRESULT __stdcall abi_ValidateWithParameters(impl::abi_arg_in parameter, Windows::Security::Cryptography::Certificates::ChainValidationResult * status) noexcept override { try { - *status = detach(this->shim().Validate(*reinterpret_cast(¶meter))); + typename D::abi_guard guard(this->shim()); + *status = detach_abi(this->shim().Validate(*reinterpret_cast(¶meter))); return S_OK; } catch (...) @@ -387,11 +416,12 @@ struct produce> certificates) noexcept override + HRESULT __stdcall abi_GetCertificates(bool includeRoot, impl::abi_arg_out> certificates) noexcept override { try { - *certificates = detach(this->shim().GetCertificates(includeRoot)); + typename D::abi_guard guard(this->shim()); + *certificates = detach_abi(this->shim().GetCertificates(includeRoot)); return S_OK; } catch (...) @@ -405,11 +435,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateRequestAsync(abi_arg_in request, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateRequestAsync(impl::abi_arg_in request, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateRequestAsync(*reinterpret_cast(&request))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateRequestAsync(*reinterpret_cast(&request))); return S_OK; } catch (...) @@ -419,11 +450,12 @@ struct produce certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_out value) noexcept override + HRESULT __stdcall abi_InstallCertificateAsync(impl::abi_arg_in certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstallCertificateAsync(*reinterpret_cast(&certificate), installOption)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallCertificateAsync(*reinterpret_cast(&certificate), installOption)); return S_OK; } catch (...) @@ -433,11 +465,12 @@ struct produce pfxData, abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_in friendlyName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_in friendlyName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName))); return S_OK; } catch (...) @@ -451,11 +484,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UserCertificateEnrollmentManager(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserCertificateEnrollmentManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserCertificateEnrollmentManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserCertificateEnrollmentManager()); return S_OK; } catch (...) @@ -465,11 +499,12 @@ struct produce pfxData, abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_in friendlyName, abi_arg_in keyStorageProvider, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataToKspAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_in friendlyName, impl::abi_arg_in keyStorageProvider, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName), *reinterpret_cast(&keyStorageProvider))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName), *reinterpret_cast(&keyStorageProvider))); return S_OK; } catch (...) @@ -483,11 +518,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ImportPfxDataToKspWithParametersAsync(abi_arg_in pfxData, abi_arg_in password, abi_arg_in pfxImportParameters, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataToKspWithParametersAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, impl::abi_arg_in pfxImportParameters, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), *reinterpret_cast(&pfxImportParameters))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), *reinterpret_cast(&pfxImportParameters))); return S_OK; } catch (...) @@ -501,11 +537,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateCertificate(abi_arg_in certBlob, abi_arg_out certificate) noexcept override + HRESULT __stdcall abi_CreateCertificate(impl::abi_arg_in certBlob, impl::abi_arg_out certificate) noexcept override { try { - *certificate = detach(this->shim().CreateCertificate(*reinterpret_cast(&certBlob))); + typename D::abi_guard guard(this->shim()); + *certificate = detach_abi(this->shim().CreateCertificate(*reinterpret_cast(&certBlob))); return S_OK; } catch (...) @@ -523,7 +560,8 @@ struct produceshim().EncipherOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncipherOnly()); return S_OK; } catch (...) @@ -536,6 +574,7 @@ struct produceshim()); this->shim().EncipherOnly(value); return S_OK; } @@ -549,7 +588,8 @@ struct produceshim().CrlSign()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CrlSign()); return S_OK; } catch (...) @@ -562,6 +602,7 @@ struct produceshim()); this->shim().CrlSign(value); return S_OK; } @@ -575,7 +616,8 @@ struct produceshim().KeyCertificateSign()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyCertificateSign()); return S_OK; } catch (...) @@ -588,6 +630,7 @@ struct produceshim()); this->shim().KeyCertificateSign(value); return S_OK; } @@ -601,7 +644,8 @@ struct produceshim().KeyAgreement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyAgreement()); return S_OK; } catch (...) @@ -614,6 +658,7 @@ struct produceshim()); this->shim().KeyAgreement(value); return S_OK; } @@ -627,7 +672,8 @@ struct produceshim().DataEncipherment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataEncipherment()); return S_OK; } catch (...) @@ -640,6 +686,7 @@ struct produceshim()); this->shim().DataEncipherment(value); return S_OK; } @@ -653,7 +700,8 @@ struct produceshim().KeyEncipherment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyEncipherment()); return S_OK; } catch (...) @@ -666,6 +714,7 @@ struct produceshim()); this->shim().KeyEncipherment(value); return S_OK; } @@ -679,7 +728,8 @@ struct produceshim().NonRepudiation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonRepudiation()); return S_OK; } catch (...) @@ -692,6 +742,7 @@ struct produceshim()); this->shim().NonRepudiation(value); return S_OK; } @@ -705,7 +756,8 @@ struct produceshim().DigitalSignature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DigitalSignature()); return S_OK; } catch (...) @@ -718,6 +770,7 @@ struct produceshim()); this->shim().DigitalSignature(value); return S_OK; } @@ -731,11 +784,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnhancedKeyUsages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EnhancedKeyUsages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EnhancedKeyUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnhancedKeyUsages()); return S_OK; } catch (...) @@ -745,11 +799,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IssuerName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IssuerName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IssuerName()); return S_OK; } catch (...) @@ -759,10 +814,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_IssuerName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IssuerName(*reinterpret_cast(&value)); return S_OK; } @@ -772,11 +828,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -786,10 +843,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -799,11 +857,12 @@ struct produce * value) noexcept override + HRESULT __stdcall get_Thumbprint(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().Thumbprint()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().Thumbprint()); return S_OK; } catch (...) @@ -814,11 +873,12 @@ struct produce * value) noexcept override + HRESULT __stdcall put_Thumbprint(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().Thumbprint(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().Thumbprint(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -831,7 +891,8 @@ struct produceshim().HardwareOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HardwareOnly()); return S_OK; } catch (...) @@ -844,6 +905,7 @@ struct produceshim()); this->shim().HardwareOnly(value); return S_OK; } @@ -861,7 +923,8 @@ struct produceshim().IncludeDuplicates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeDuplicates()); return S_OK; } catch (...) @@ -874,6 +937,7 @@ struct produceshim()); this->shim().IncludeDuplicates(value); return S_OK; } @@ -887,7 +951,8 @@ struct produceshim().IncludeExpiredCertificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncludeExpiredCertificates()); return S_OK; } catch (...) @@ -900,6 +965,7 @@ struct produceshim()); this->shim().IncludeExpiredCertificates(value); return S_OK; } @@ -909,11 +975,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StoreName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreName()); return S_OK; } catch (...) @@ -923,10 +990,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_StoreName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StoreName(*reinterpret_cast(&value)); return S_OK; } @@ -940,11 +1008,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Subject(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subject(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subject()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subject()); return S_OK; } catch (...) @@ -954,10 +1023,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Subject(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subject(*reinterpret_cast(&value)); return S_OK; } @@ -967,11 +1037,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyAlgorithmName()); return S_OK; } catch (...) @@ -981,10 +1052,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_KeyAlgorithmName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().KeyAlgorithmName(*reinterpret_cast(&value)); return S_OK; } @@ -998,7 +1070,8 @@ struct produceshim().KeySize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeySize()); return S_OK; } catch (...) @@ -1011,6 +1084,7 @@ struct produceshim()); this->shim().KeySize(value); return S_OK; } @@ -1020,11 +1094,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -1034,10 +1109,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -1047,11 +1123,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HashAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HashAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HashAlgorithmName()); return S_OK; } catch (...) @@ -1061,10 +1138,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_HashAlgorithmName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HashAlgorithmName(*reinterpret_cast(&value)); return S_OK; } @@ -1078,7 +1156,8 @@ struct produceshim().Exportable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exportable()); return S_OK; } catch (...) @@ -1091,6 +1170,7 @@ struct produceshim()); this->shim().Exportable(value); return S_OK; } @@ -1104,7 +1184,8 @@ struct produceshim().KeyUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyUsages()); return S_OK; } catch (...) @@ -1117,6 +1198,7 @@ struct produceshim()); this->shim().KeyUsages(value); return S_OK; } @@ -1130,7 +1212,8 @@ struct produceshim().KeyProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyProtectionLevel()); return S_OK; } catch (...) @@ -1143,6 +1226,7 @@ struct produceshim()); this->shim().KeyProtectionLevel(value); return S_OK; } @@ -1152,11 +1236,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyStorageProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStorageProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStorageProviderName()); return S_OK; } catch (...) @@ -1166,10 +1251,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_KeyStorageProviderName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().KeyStorageProviderName(*reinterpret_cast(&value)); return S_OK; } @@ -1183,11 +1269,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SmartcardReaderName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmartcardReaderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmartcardReaderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartcardReaderName()); return S_OK; } catch (...) @@ -1197,10 +1284,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SmartcardReaderName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SmartcardReaderName(*reinterpret_cast(&value)); return S_OK; } @@ -1210,11 +1298,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SigningCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SigningCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SigningCertificate()); return S_OK; } catch (...) @@ -1224,10 +1313,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SigningCertificate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SigningCertificate(*reinterpret_cast(&value)); return S_OK; } @@ -1237,11 +1327,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AttestationCredentialCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttestationCredentialCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttestationCredentialCertificate()); return S_OK; } catch (...) @@ -1251,10 +1342,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_AttestationCredentialCertificate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AttestationCredentialCertificate(*reinterpret_cast(&value)); return S_OK; } @@ -1268,11 +1360,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CurveName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurveName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurveName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurveName()); return S_OK; } catch (...) @@ -1282,10 +1375,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CurveName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CurveName(*reinterpret_cast(&value)); return S_OK; } @@ -1295,11 +1389,12 @@ struct produce * value) noexcept override + HRESULT __stdcall get_CurveParameters(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().CurveParameters()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().CurveParameters()); return S_OK; } catch (...) @@ -1310,11 +1405,12 @@ struct produce * value) noexcept override + HRESULT __stdcall put_CurveParameters(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().CurveParameters(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().CurveParameters(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -1323,11 +1419,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContainerNamePrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainerNamePrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerNamePrefix()); return S_OK; } catch (...) @@ -1337,10 +1434,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContainerNamePrefix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContainerNamePrefix(*reinterpret_cast(&value)); return S_OK; } @@ -1350,11 +1448,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContainerName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainerName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerName()); return S_OK; } catch (...) @@ -1364,10 +1463,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContainerName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContainerName(*reinterpret_cast(&value)); return S_OK; } @@ -1381,7 +1481,8 @@ struct produceshim().UseExistingKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseExistingKey()); return S_OK; } catch (...) @@ -1394,6 +1495,7 @@ struct produceshim()); this->shim().UseExistingKey(value); return S_OK; } @@ -1407,10 +1509,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Add(abi_arg_in certificate) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in certificate) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&certificate)); return S_OK; } @@ -1420,10 +1523,11 @@ struct produce certificate) noexcept override + HRESULT __stdcall abi_Delete(impl::abi_arg_in certificate) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Delete(*reinterpret_cast(&certificate)); return S_OK; } @@ -1437,11 +1541,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1455,11 +1560,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindAllAsync(abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -1469,11 +1575,12 @@ struct produce query, abi_arg_out>> value) noexcept override + HRESULT __stdcall abi_FindAllWithQueryAsync(impl::abi_arg_in query, impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FindAllAsync(*reinterpret_cast(&query))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&query))); return S_OK; } catch (...) @@ -1483,11 +1590,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TrustedRootCertificationAuthorities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrustedRootCertificationAuthorities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrustedRootCertificationAuthorities()); return S_OK; } catch (...) @@ -1497,11 +1605,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IntermediateCertificationAuthorities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IntermediateCertificationAuthorities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateCertificationAuthorities()); return S_OK; } catch (...) @@ -1511,11 +1620,12 @@ struct produce storeName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetStoreByName(impl::abi_arg_in storeName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetStoreByName(*reinterpret_cast(&storeName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetStoreByName(*reinterpret_cast(&storeName))); return S_OK; } catch (...) @@ -1529,11 +1639,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetUserStoreByName(abi_arg_in storeName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetUserStoreByName(impl::abi_arg_in storeName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetUserStoreByName(*reinterpret_cast(&storeName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetUserStoreByName(*reinterpret_cast(&storeName))); return S_OK; } catch (...) @@ -1547,11 +1658,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnhancedKeyUsages(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EnhancedKeyUsages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EnhancedKeyUsages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnhancedKeyUsages()); return S_OK; } catch (...) @@ -1561,11 +1673,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ValidationTimestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValidationTimestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValidationTimestamp()); return S_OK; } catch (...) @@ -1574,10 +1687,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ValidationTimestamp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ValidationTimestamp(*reinterpret_cast(&value)); return S_OK; } @@ -1591,7 +1705,8 @@ struct produceshim().RevocationCheckEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RevocationCheckEnabled()); return S_OK; } catch (...) @@ -1604,6 +1719,7 @@ struct produceshim()); this->shim().RevocationCheckEnabled(value); return S_OK; } @@ -1617,7 +1733,8 @@ struct produceshim().NetworkRetrievalEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NetworkRetrievalEnabled()); return S_OK; } catch (...) @@ -1630,6 +1747,7 @@ struct produceshim()); this->shim().NetworkRetrievalEnabled(value); return S_OK; } @@ -1643,7 +1761,8 @@ struct produceshim().AuthorityInformationAccessEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthorityInformationAccessEnabled()); return S_OK; } catch (...) @@ -1656,6 +1775,7 @@ struct produceshim()); this->shim().AuthorityInformationAccessEnabled(value); return S_OK; } @@ -1669,7 +1789,8 @@ struct produceshim().CurrentTimeValidationEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentTimeValidationEnabled()); return S_OK; } catch (...) @@ -1682,6 +1803,7 @@ struct produceshim()); this->shim().CurrentTimeValidationEnabled(value); return S_OK; } @@ -1691,11 +1813,12 @@ struct produce> certificates) noexcept override + HRESULT __stdcall get_ExclusiveTrustRoots(impl::abi_arg_out> certificates) noexcept override { try { - *certificates = detach(this->shim().ExclusiveTrustRoots()); + typename D::abi_guard guard(this->shim()); + *certificates = detach_abi(this->shim().ExclusiveTrustRoots()); return S_OK; } catch (...) @@ -1713,7 +1836,8 @@ struct produceshim().CertificateChainPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CertificateChainPolicy()); return S_OK; } catch (...) @@ -1726,6 +1850,7 @@ struct produceshim()); this->shim().CertificateChainPolicy(value); return S_OK; } @@ -1735,11 +1860,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ServerDnsName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServerDnsName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServerDnsName()); return S_OK; } catch (...) @@ -1749,10 +1875,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ServerDnsName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServerDnsName(*reinterpret_cast(&value)); return S_OK; } @@ -1766,11 +1893,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Certificates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Certificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Certificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificates()); return S_OK; } catch (...) @@ -1780,11 +1908,12 @@ struct produce * value) noexcept override + HRESULT __stdcall get_Content(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -1795,11 +1924,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Signers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Signers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Signers()); return S_OK; } catch (...) @@ -1813,7 +1943,8 @@ struct produceshim().VerifySignature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerifySignature()); return S_OK; } catch (...) @@ -1826,11 +1957,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateCmsAttachedSignature(abi_arg_in inputBlob, abi_arg_out cmsSignedData) noexcept override + HRESULT __stdcall abi_CreateCmsAttachedSignature(impl::abi_arg_in inputBlob, impl::abi_arg_out cmsSignedData) noexcept override { try { - *cmsSignedData = detach(this->shim().CreateCmsAttachedSignature(*reinterpret_cast(&inputBlob))); + typename D::abi_guard guard(this->shim()); + *cmsSignedData = detach_abi(this->shim().CreateCmsAttachedSignature(*reinterpret_cast(&inputBlob))); return S_OK; } catch (...) @@ -1844,11 +1976,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GenerateSignatureAsync(abi_arg_in data, abi_arg_in> signers, abi_arg_in> certificates, abi_arg_out> outputBlob) noexcept override + HRESULT __stdcall abi_GenerateSignatureAsync(impl::abi_arg_in data, impl::abi_arg_in> signers, impl::abi_arg_in> certificates, impl::abi_arg_out> outputBlob) noexcept override { try { - *outputBlob = detach(this->shim().GenerateSignatureAsync(*reinterpret_cast(&data), *reinterpret_cast *>(&signers), *reinterpret_cast *>(&certificates))); + typename D::abi_guard guard(this->shim()); + *outputBlob = detach_abi(this->shim().GenerateSignatureAsync(*reinterpret_cast(&data), *reinterpret_cast *>(&signers), *reinterpret_cast *>(&certificates))); return S_OK; } catch (...) @@ -1862,11 +1995,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Certificates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Certificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Certificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificates()); return S_OK; } catch (...) @@ -1876,11 +2010,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Signers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Signers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Signers()); return S_OK; } catch (...) @@ -1890,11 +2025,12 @@ struct produce data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_VerifySignatureAsync(impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().VerifySignatureAsync(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerifySignatureAsync(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1908,11 +2044,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateCmsDetachedSignature(abi_arg_in inputBlob, abi_arg_out cmsSignedData) noexcept override + HRESULT __stdcall abi_CreateCmsDetachedSignature(impl::abi_arg_in inputBlob, impl::abi_arg_out cmsSignedData) noexcept override { try { - *cmsSignedData = detach(this->shim().CreateCmsDetachedSignature(*reinterpret_cast(&inputBlob))); + typename D::abi_guard guard(this->shim()); + *cmsSignedData = detach_abi(this->shim().CreateCmsDetachedSignature(*reinterpret_cast(&inputBlob))); return S_OK; } catch (...) @@ -1926,11 +2063,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GenerateSignatureAsync(abi_arg_in data, abi_arg_in> signers, abi_arg_in> certificates, abi_arg_out> outputBlob) noexcept override + HRESULT __stdcall abi_GenerateSignatureAsync(impl::abi_arg_in data, impl::abi_arg_in> signers, impl::abi_arg_in> certificates, impl::abi_arg_out> outputBlob) noexcept override { try { - *outputBlob = detach(this->shim().GenerateSignatureAsync(*reinterpret_cast(&data), *reinterpret_cast *>(&signers), *reinterpret_cast *>(&certificates))); + typename D::abi_guard guard(this->shim()); + *outputBlob = detach_abi(this->shim().GenerateSignatureAsync(*reinterpret_cast(&data), *reinterpret_cast *>(&signers), *reinterpret_cast *>(&certificates))); return S_OK; } catch (...) @@ -1944,11 +2082,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Certificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_Certificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Certificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificate()); return S_OK; } catch (...) @@ -1958,10 +2097,11 @@ struct produce } } - HRESULT __stdcall put_Certificate(abi_arg_in value) noexcept override + HRESULT __stdcall put_Certificate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Certificate(*reinterpret_cast(&value)); return S_OK; } @@ -1971,11 +2111,12 @@ struct produce } } - HRESULT __stdcall get_HashAlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_HashAlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HashAlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HashAlgorithmName()); return S_OK; } catch (...) @@ -1985,10 +2126,11 @@ struct produce } } - HRESULT __stdcall put_HashAlgorithmName(abi_arg_in value) noexcept override + HRESULT __stdcall put_HashAlgorithmName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HashAlgorithmName(*reinterpret_cast(&value)); return S_OK; } @@ -1998,11 +2140,12 @@ struct produce } } - HRESULT __stdcall get_TimestampInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimestampInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimestampInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimestampInfo()); return S_OK; } catch (...) @@ -2016,11 +2159,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_SigningCertificate(abi_arg_out value) noexcept override + HRESULT __stdcall get_SigningCertificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SigningCertificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SigningCertificate()); return S_OK; } catch (...) @@ -2030,11 +2174,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Certificates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Certificates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificates()); return S_OK; } catch (...) @@ -2044,11 +2189,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -2061,11 +2207,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Rsa(abi_arg_out value) noexcept override + HRESULT __stdcall get_Rsa(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rsa()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rsa()); return S_OK; } catch (...) @@ -2075,11 +2222,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Dsa(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dsa()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dsa()); return S_OK; } catch (...) @@ -2089,11 +2237,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdh256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdh256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdh256()); return S_OK; } catch (...) @@ -2103,11 +2252,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdh384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdh384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdh384()); return S_OK; } catch (...) @@ -2117,11 +2267,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdh521(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdh521()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdh521()); return S_OK; } catch (...) @@ -2131,11 +2282,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdsa256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdsa256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdsa256()); return S_OK; } catch (...) @@ -2145,11 +2297,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdsa384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdsa384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdsa384()); return S_OK; } catch (...) @@ -2159,11 +2312,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdsa521(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdsa521()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdsa521()); return S_OK; } catch (...) @@ -2177,11 +2331,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Ecdsa(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ecdsa(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdsa()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdsa()); return S_OK; } catch (...) @@ -2191,11 +2346,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Ecdh(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ecdh()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ecdh()); return S_OK; } catch (...) @@ -2209,11 +2365,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_DecryptTpmAttestationCredentialAsync(abi_arg_in credential, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_DecryptTpmAttestationCredentialAsync(impl::abi_arg_in credential, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DecryptTpmAttestationCredentialAsync(*reinterpret_cast(&credential))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecryptTpmAttestationCredentialAsync(*reinterpret_cast(&credential))); return S_OK; } catch (...) @@ -2223,11 +2380,12 @@ struct produce credential, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetTpmAttestationCredentialId(impl::abi_arg_in credential, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetTpmAttestationCredentialId(*reinterpret_cast(&credential))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTpmAttestationCredentialId(*reinterpret_cast(&credential))); return S_OK; } catch (...) @@ -2241,11 +2399,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_DecryptTpmAttestationCredentialWithContainerNameAsync(abi_arg_in credential, abi_arg_in containerName, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_DecryptTpmAttestationCredentialWithContainerNameAsync(impl::abi_arg_in credential, impl::abi_arg_in containerName, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DecryptTpmAttestationCredentialAsync(*reinterpret_cast(&credential), *reinterpret_cast(&containerName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecryptTpmAttestationCredentialAsync(*reinterpret_cast(&credential), *reinterpret_cast(&containerName))); return S_OK; } catch (...) @@ -2259,11 +2418,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SoftwareKeyStorageProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_SoftwareKeyStorageProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SoftwareKeyStorageProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SoftwareKeyStorageProvider()); return S_OK; } catch (...) @@ -2273,11 +2433,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SmartcardKeyStorageProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmartcardKeyStorageProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmartcardKeyStorageProvider()); return S_OK; } catch (...) @@ -2287,11 +2448,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PlatformKeyStorageProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlatformKeyStorageProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlatformKeyStorageProvider()); return S_OK; } catch (...) @@ -2305,11 +2467,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PassportKeyStorageProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_PassportKeyStorageProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PassportKeyStorageProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PassportKeyStorageProvider()); return S_OK; } catch (...) @@ -2327,7 +2490,8 @@ struct produceshim().Exportable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exportable()); return S_OK; } catch (...) @@ -2340,6 +2504,7 @@ struct produceshim()); this->shim().Exportable(value); return S_OK; } @@ -2353,7 +2518,8 @@ struct produceshim().KeyProtectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyProtectionLevel()); return S_OK; } catch (...) @@ -2366,6 +2532,7 @@ struct produceshim()); this->shim().KeyProtectionLevel(value); return S_OK; } @@ -2379,7 +2546,8 @@ struct produceshim().InstallOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallOptions()); return S_OK; } catch (...) @@ -2392,6 +2560,7 @@ struct produceshim()); this->shim().InstallOptions(value); return S_OK; } @@ -2401,11 +2570,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -2415,10 +2585,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FriendlyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FriendlyName(*reinterpret_cast(&value)); return S_OK; } @@ -2428,11 +2599,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_KeyStorageProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStorageProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStorageProviderName()); return S_OK; } catch (...) @@ -2442,10 +2614,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_KeyStorageProviderName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().KeyStorageProviderName(*reinterpret_cast(&value)); return S_OK; } @@ -2455,11 +2628,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContainerNamePrefix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainerNamePrefix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerNamePrefix()); return S_OK; } catch (...) @@ -2469,10 +2643,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContainerNamePrefix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContainerNamePrefix(*reinterpret_cast(&value)); return S_OK; } @@ -2482,11 +2657,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReaderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReaderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReaderName()); return S_OK; } catch (...) @@ -2496,10 +2672,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ReaderName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReaderName(*reinterpret_cast(&value)); return S_OK; } @@ -2513,11 +2690,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Personal(abi_arg_out value) noexcept override + HRESULT __stdcall get_Personal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Personal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Personal()); return S_OK; } catch (...) @@ -2527,11 +2705,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TrustedRootCertificationAuthorities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrustedRootCertificationAuthorities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrustedRootCertificationAuthorities()); return S_OK; } catch (...) @@ -2541,11 +2720,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IntermediateCertificationAuthorities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IntermediateCertificationAuthorities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateCertificationAuthorities()); return S_OK; } catch (...) @@ -2559,11 +2739,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EmailName(abi_arg_out> value) noexcept override + HRESULT __stdcall get_EmailName(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().EmailName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EmailName()); return S_OK; } catch (...) @@ -2573,11 +2754,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_IPAddress(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IPAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IPAddress()); return S_OK; } catch (...) @@ -2587,11 +2769,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Url(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Url()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Url()); return S_OK; } catch (...) @@ -2601,11 +2784,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DnsName(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DnsName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DnsName()); return S_OK; } catch (...) @@ -2615,11 +2799,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_DistinguishedName(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DistinguishedName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistinguishedName()); return S_OK; } catch (...) @@ -2629,11 +2814,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_PrincipalName(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PrincipalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrincipalName()); return S_OK; } catch (...) @@ -2647,11 +2833,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateRequestAsync(abi_arg_in request, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_CreateRequestAsync(impl::abi_arg_in request, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CreateRequestAsync(*reinterpret_cast(&request))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateRequestAsync(*reinterpret_cast(&request))); return S_OK; } catch (...) @@ -2661,11 +2848,12 @@ struct produce certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_out value) noexcept override + HRESULT __stdcall abi_InstallCertificateAsync(impl::abi_arg_in certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstallCertificateAsync(*reinterpret_cast(&certificate), installOption)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstallCertificateAsync(*reinterpret_cast(&certificate), installOption)); return S_OK; } catch (...) @@ -2675,11 +2863,12 @@ struct produce pfxData, abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_in friendlyName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_in friendlyName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName))); return S_OK; } catch (...) @@ -2689,11 +2878,12 @@ struct produce pfxData, abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, abi_arg_in friendlyName, abi_arg_in keyStorageProvider, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataToKspAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, impl::abi_arg_in friendlyName, impl::abi_arg_in keyStorageProvider, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName), *reinterpret_cast(&keyStorageProvider))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), exportable, keyProtectionLevel, installOption, *reinterpret_cast(&friendlyName), *reinterpret_cast(&keyStorageProvider))); return S_OK; } catch (...) @@ -2707,11 +2897,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ImportPfxDataToKspWithParametersAsync(abi_arg_in pfxData, abi_arg_in password, abi_arg_in pfxImportParameters, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ImportPfxDataToKspWithParametersAsync(impl::abi_arg_in pfxData, impl::abi_arg_in password, impl::abi_arg_in pfxImportParameters, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), *reinterpret_cast(&pfxImportParameters))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImportPfxDataAsync(*reinterpret_cast(&pfxData), *reinterpret_cast(&password), *reinterpret_cast(&pfxImportParameters))); return S_OK; } catch (...) @@ -2725,11 +2916,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAddAsync(abi_arg_in certificate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAddAsync(impl::abi_arg_in certificate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAddAsync(*reinterpret_cast(&certificate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAddAsync(*reinterpret_cast(&certificate))); return S_OK; } catch (...) @@ -2739,11 +2931,12 @@ struct produce certificate, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestDeleteAsync(impl::abi_arg_in certificate, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestDeleteAsync(*reinterpret_cast(&certificate))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestDeleteAsync(*reinterpret_cast(&certificate))); return S_OK; } catch (...) @@ -2753,11 +2946,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -2775,1235 +2969,1235 @@ namespace Windows::Security::Cryptography::Certificates { template hstring impl_ICertificateRequestProperties::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_Subject(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties::Subject(hstring_ref value) const +template void impl_ICertificateRequestProperties::Subject(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subject(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_Subject(get_abi(value))); } template hstring impl_ICertificateRequestProperties::KeyAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_KeyAlgorithmName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties::KeyAlgorithmName(hstring_ref value) const +template void impl_ICertificateRequestProperties::KeyAlgorithmName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyAlgorithmName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_KeyAlgorithmName(get_abi(value))); } template uint32_t impl_ICertificateRequestProperties::KeySize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KeySize(&value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_KeySize(&value)); return value; } template void impl_ICertificateRequestProperties::KeySize(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_KeySize(value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_KeySize(value)); } template hstring impl_ICertificateRequestProperties::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_FriendlyName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties::FriendlyName(hstring_ref value) const +template void impl_ICertificateRequestProperties::FriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FriendlyName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_FriendlyName(get_abi(value))); } template hstring impl_ICertificateRequestProperties::HashAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HashAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_HashAlgorithmName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties::HashAlgorithmName(hstring_ref value) const +template void impl_ICertificateRequestProperties::HashAlgorithmName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HashAlgorithmName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_HashAlgorithmName(get_abi(value))); } template Windows::Security::Cryptography::Certificates::ExportOption impl_ICertificateRequestProperties::Exportable() const { Windows::Security::Cryptography::Certificates::ExportOption value {}; - check_hresult(static_cast(static_cast(*this))->get_Exportable(&value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_Exportable(&value)); return value; } template void impl_ICertificateRequestProperties::Exportable(Windows::Security::Cryptography::Certificates::ExportOption value) const { - check_hresult(static_cast(static_cast(*this))->put_Exportable(value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_Exportable(value)); } template Windows::Security::Cryptography::Certificates::EnrollKeyUsages impl_ICertificateRequestProperties::KeyUsages() const { Windows::Security::Cryptography::Certificates::EnrollKeyUsages value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyUsages(&value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_KeyUsages(&value)); return value; } template void impl_ICertificateRequestProperties::KeyUsages(Windows::Security::Cryptography::Certificates::EnrollKeyUsages value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyUsages(value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_KeyUsages(value)); } template Windows::Security::Cryptography::Certificates::KeyProtectionLevel impl_ICertificateRequestProperties::KeyProtectionLevel() const { Windows::Security::Cryptography::Certificates::KeyProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyProtectionLevel(&value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_KeyProtectionLevel(&value)); return value; } template void impl_ICertificateRequestProperties::KeyProtectionLevel(Windows::Security::Cryptography::Certificates::KeyProtectionLevel value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyProtectionLevel(value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_KeyProtectionLevel(value)); } template hstring impl_ICertificateRequestProperties::KeyStorageProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyStorageProviderName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->get_KeyStorageProviderName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties::KeyStorageProviderName(hstring_ref value) const +template void impl_ICertificateRequestProperties::KeyStorageProviderName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyStorageProviderName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties)->put_KeyStorageProviderName(get_abi(value))); } template hstring impl_ICertificateRequestProperties2::SmartcardReaderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SmartcardReaderName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->get_SmartcardReaderName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties2::SmartcardReaderName(hstring_ref value) const +template void impl_ICertificateRequestProperties2::SmartcardReaderName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SmartcardReaderName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->put_SmartcardReaderName(get_abi(value))); } template Windows::Security::Cryptography::Certificates::Certificate impl_ICertificateRequestProperties2::SigningCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SigningCertificate(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->get_SigningCertificate(put_abi(value))); return value; } template void impl_ICertificateRequestProperties2::SigningCertificate(const Windows::Security::Cryptography::Certificates::Certificate & value) const { - check_hresult(static_cast(static_cast(*this))->put_SigningCertificate(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->put_SigningCertificate(get_abi(value))); } template Windows::Security::Cryptography::Certificates::Certificate impl_ICertificateRequestProperties2::AttestationCredentialCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AttestationCredentialCertificate(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->get_AttestationCredentialCertificate(put_abi(value))); return value; } template void impl_ICertificateRequestProperties2::AttestationCredentialCertificate(const Windows::Security::Cryptography::Certificates::Certificate & value) const { - check_hresult(static_cast(static_cast(*this))->put_AttestationCredentialCertificate(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties2)->put_AttestationCredentialCertificate(get_abi(value))); } template hstring impl_ICertificateRequestProperties3::CurveName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurveName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->get_CurveName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties3::CurveName(hstring_ref value) const +template void impl_ICertificateRequestProperties3::CurveName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CurveName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->put_CurveName(get_abi(value))); } template com_array impl_ICertificateRequestProperties3::CurveParameters() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_CurveParameters(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->get_CurveParameters(impl::put_size_abi(value), put_abi(value))); return value; } -template void impl_ICertificateRequestProperties3::CurveParameters(array_ref value) const +template void impl_ICertificateRequestProperties3::CurveParameters(array_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CurveParameters(value.size(), get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->put_CurveParameters(value.size(), get_abi(value))); } template hstring impl_ICertificateRequestProperties3::ContainerNamePrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContainerNamePrefix(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->get_ContainerNamePrefix(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties3::ContainerNamePrefix(hstring_ref value) const +template void impl_ICertificateRequestProperties3::ContainerNamePrefix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContainerNamePrefix(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->put_ContainerNamePrefix(get_abi(value))); } template hstring impl_ICertificateRequestProperties3::ContainerName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContainerName(put(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->get_ContainerName(put_abi(value))); return value; } -template void impl_ICertificateRequestProperties3::ContainerName(hstring_ref value) const +template void impl_ICertificateRequestProperties3::ContainerName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContainerName(get(value))); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->put_ContainerName(get_abi(value))); } template bool impl_ICertificateRequestProperties3::UseExistingKey() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UseExistingKey(&value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->get_UseExistingKey(&value)); return value; } template void impl_ICertificateRequestProperties3::UseExistingKey(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_UseExistingKey(value)); + check_hresult(WINRT_SHIM(ICertificateRequestProperties3)->put_UseExistingKey(value)); } template Windows::Foundation::IAsyncOperation impl_ICertificateEnrollmentManagerStatics::CreateRequestAsync(const Windows::Security::Cryptography::Certificates::CertificateRequestProperties & request) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateRequestAsync(get(request), put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics)->abi_CreateRequestAsync(get_abi(request), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics::InstallCertificateAsync(hstring_ref certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) const +template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics::InstallCertificateAsync(hstring_view certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_InstallCertificateAsync(get(certificate), installOption, put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics)->abi_InstallCertificateAsync(get_abi(certificate), installOption, put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName) const +template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataAsync(get(pfxData), get(password), exportable, keyProtectionLevel, installOption, get(friendlyName), put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics)->abi_ImportPfxDataAsync(get_abi(pfxData), get_abi(password), exportable, keyProtectionLevel, installOption, get_abi(friendlyName), put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::UserCertificateEnrollmentManager impl_ICertificateEnrollmentManagerStatics2::UserCertificateEnrollmentManager() const { Windows::Security::Cryptography::Certificates::UserCertificateEnrollmentManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UserCertificateEnrollmentManager(put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics2)->get_UserCertificateEnrollmentManager(put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics2::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName, hstring_ref keyStorageProvider) const +template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics2::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName, hstring_view keyStorageProvider) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataToKspAsync(get(pfxData), get(password), exportable, keyProtectionLevel, installOption, get(friendlyName), get(keyStorageProvider), put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics2)->abi_ImportPfxDataToKspAsync(get_abi(pfxData), get_abi(password), exportable, keyProtectionLevel, installOption, get_abi(friendlyName), get_abi(keyStorageProvider), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics3::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) const +template Windows::Foundation::IAsyncAction impl_ICertificateEnrollmentManagerStatics3::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataToKspWithParametersAsync(get(pfxData), get(password), get(pfxImportParameters), put(value))); + check_hresult(WINRT_SHIM(ICertificateEnrollmentManagerStatics3)->abi_ImportPfxDataToKspWithParametersAsync(get_abi(pfxData), get_abi(password), get_abi(pfxImportParameters), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IKeyAttestationHelperStatics::DecryptTpmAttestationCredentialAsync(hstring_ref credential) const +template Windows::Foundation::IAsyncOperation impl_IKeyAttestationHelperStatics::DecryptTpmAttestationCredentialAsync(hstring_view credential) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_DecryptTpmAttestationCredentialAsync(get(credential), put(value))); + check_hresult(WINRT_SHIM(IKeyAttestationHelperStatics)->abi_DecryptTpmAttestationCredentialAsync(get_abi(credential), put_abi(value))); return value; } -template hstring impl_IKeyAttestationHelperStatics::GetTpmAttestationCredentialId(hstring_ref credential) const +template hstring impl_IKeyAttestationHelperStatics::GetTpmAttestationCredentialId(hstring_view credential) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetTpmAttestationCredentialId(get(credential), put(value))); + check_hresult(WINRT_SHIM(IKeyAttestationHelperStatics)->abi_GetTpmAttestationCredentialId(get_abi(credential), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IKeyAttestationHelperStatics2::DecryptTpmAttestationCredentialAsync(hstring_ref credential, hstring_ref containerName) const +template Windows::Foundation::IAsyncOperation impl_IKeyAttestationHelperStatics2::DecryptTpmAttestationCredentialAsync(hstring_view credential, hstring_view containerName) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_DecryptTpmAttestationCredentialWithContainerNameAsync(get(credential), get(containerName), put(value))); + check_hresult(WINRT_SHIM(IKeyAttestationHelperStatics2)->abi_DecryptTpmAttestationCredentialWithContainerNameAsync(get_abi(credential), get_abi(containerName), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_ICertificateStoresStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(value))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics)->abi_FindAllAsync(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_ICertificateStoresStatics::FindAllAsync(const Windows::Security::Cryptography::Certificates::CertificateQuery & query) const { Windows::Foundation::IAsyncOperation> value; - check_hresult(static_cast(static_cast(*this))->abi_FindAllWithQueryAsync(get(query), put(value))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics)->abi_FindAllWithQueryAsync(get_abi(query), put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::CertificateStore impl_ICertificateStoresStatics::TrustedRootCertificationAuthorities() const { Windows::Security::Cryptography::Certificates::CertificateStore value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TrustedRootCertificationAuthorities(put(value))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics)->get_TrustedRootCertificationAuthorities(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::CertificateStore impl_ICertificateStoresStatics::IntermediateCertificationAuthorities() const { Windows::Security::Cryptography::Certificates::CertificateStore value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IntermediateCertificationAuthorities(put(value))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics)->get_IntermediateCertificationAuthorities(put_abi(value))); return value; } -template Windows::Security::Cryptography::Certificates::CertificateStore impl_ICertificateStoresStatics::GetStoreByName(hstring_ref storeName) const +template Windows::Security::Cryptography::Certificates::CertificateStore impl_ICertificateStoresStatics::GetStoreByName(hstring_view storeName) const { Windows::Security::Cryptography::Certificates::CertificateStore value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetStoreByName(get(storeName), put(value))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics)->abi_GetStoreByName(get_abi(storeName), put_abi(value))); return value; } -template Windows::Security::Cryptography::Certificates::UserCertificateStore impl_ICertificateStoresStatics2::GetUserStoreByName(hstring_ref storeName) const +template Windows::Security::Cryptography::Certificates::UserCertificateStore impl_ICertificateStoresStatics2::GetUserStoreByName(hstring_view storeName) const { Windows::Security::Cryptography::Certificates::UserCertificateStore result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetUserStoreByName(get(storeName), put(result))); + check_hresult(WINRT_SHIM(ICertificateStoresStatics2)->abi_GetUserStoreByName(get_abi(storeName), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserCertificateEnrollmentManager::CreateRequestAsync(const Windows::Security::Cryptography::Certificates::CertificateRequestProperties & request) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_CreateRequestAsync(get(request), put(value))); + check_hresult(WINRT_SHIM(IUserCertificateEnrollmentManager)->abi_CreateRequestAsync(get_abi(request), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::InstallCertificateAsync(hstring_ref certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) const +template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::InstallCertificateAsync(hstring_view certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_InstallCertificateAsync(get(certificate), installOption, put(value))); + check_hresult(WINRT_SHIM(IUserCertificateEnrollmentManager)->abi_InstallCertificateAsync(get_abi(certificate), installOption, put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName) const +template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataAsync(get(pfxData), get(password), exportable, keyProtectionLevel, installOption, get(friendlyName), put(value))); + check_hresult(WINRT_SHIM(IUserCertificateEnrollmentManager)->abi_ImportPfxDataAsync(get_abi(pfxData), get_abi(password), exportable, keyProtectionLevel, installOption, get_abi(friendlyName), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName, hstring_ref keyStorageProvider) const +template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName, hstring_view keyStorageProvider) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataToKspAsync(get(pfxData), get(password), exportable, keyProtectionLevel, installOption, get(friendlyName), get(keyStorageProvider), put(value))); + check_hresult(WINRT_SHIM(IUserCertificateEnrollmentManager)->abi_ImportPfxDataToKspAsync(get_abi(pfxData), get_abi(password), exportable, keyProtectionLevel, installOption, get_abi(friendlyName), get_abi(keyStorageProvider), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager2::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) const +template Windows::Foundation::IAsyncAction impl_IUserCertificateEnrollmentManager2::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ImportPfxDataToKspWithParametersAsync(get(pfxData), get(password), get(pfxImportParameters), put(value))); + check_hresult(WINRT_SHIM(IUserCertificateEnrollmentManager2)->abi_ImportPfxDataToKspWithParametersAsync(get_abi(pfxData), get_abi(password), get_abi(pfxImportParameters), put_abi(value))); return value; } template void impl_ICertificateStore::Add(const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { - check_hresult(static_cast(static_cast(*this))->abi_Add(get(certificate))); + check_hresult(WINRT_SHIM(ICertificateStore)->abi_Add(get_abi(certificate))); } template void impl_ICertificateStore::Delete(const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { - check_hresult(static_cast(static_cast(*this))->abi_Delete(get(certificate))); + check_hresult(WINRT_SHIM(ICertificateStore)->abi_Delete(get_abi(certificate))); } template hstring impl_ICertificateStore2::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ICertificateStore2)->get_Name(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IUserCertificateStore::RequestAddAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAddAsync(get(certificate), put(result))); + check_hresult(WINRT_SHIM(IUserCertificateStore)->abi_RequestAddAsync(get_abi(certificate), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserCertificateStore::RequestDeleteAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestDeleteAsync(get(certificate), put(result))); + check_hresult(WINRT_SHIM(IUserCertificateStore)->abi_RequestDeleteAsync(get_abi(certificate), put_abi(result))); return result; } template hstring impl_IUserCertificateStore::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IUserCertificateStore)->get_Name(put_abi(value))); return value; } template hstring impl_IStandardCertificateStoreNamesStatics::Personal() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Personal(put(value))); + check_hresult(WINRT_SHIM(IStandardCertificateStoreNamesStatics)->get_Personal(put_abi(value))); return value; } template hstring impl_IStandardCertificateStoreNamesStatics::TrustedRootCertificationAuthorities() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TrustedRootCertificationAuthorities(put(value))); + check_hresult(WINRT_SHIM(IStandardCertificateStoreNamesStatics)->get_TrustedRootCertificationAuthorities(put_abi(value))); return value; } template hstring impl_IStandardCertificateStoreNamesStatics::IntermediateCertificationAuthorities() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IntermediateCertificationAuthorities(put(value))); + check_hresult(WINRT_SHIM(IStandardCertificateStoreNamesStatics)->get_IntermediateCertificationAuthorities(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Rsa() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rsa(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Rsa(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Dsa() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Dsa(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Dsa(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdh256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdh256(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdh256(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdh384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdh384(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdh384(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdh521() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdh521(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdh521(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdsa256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdsa256(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdsa256(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdsa384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdsa384(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdsa384(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics::Ecdsa521() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdsa521(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics)->get_Ecdsa521(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics2::Ecdsa() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdsa(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics2)->get_Ecdsa(put_abi(value))); return value; } template hstring impl_IKeyAlgorithmNamesStatics2::Ecdh() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ecdh(put(value))); + check_hresult(WINRT_SHIM(IKeyAlgorithmNamesStatics2)->get_Ecdh(put_abi(value))); return value; } template hstring impl_IKeyStorageProviderNamesStatics::SoftwareKeyStorageProvider() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SoftwareKeyStorageProvider(put(value))); + check_hresult(WINRT_SHIM(IKeyStorageProviderNamesStatics)->get_SoftwareKeyStorageProvider(put_abi(value))); return value; } template hstring impl_IKeyStorageProviderNamesStatics::SmartcardKeyStorageProvider() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SmartcardKeyStorageProvider(put(value))); + check_hresult(WINRT_SHIM(IKeyStorageProviderNamesStatics)->get_SmartcardKeyStorageProvider(put_abi(value))); return value; } template hstring impl_IKeyStorageProviderNamesStatics::PlatformKeyStorageProvider() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlatformKeyStorageProvider(put(value))); + check_hresult(WINRT_SHIM(IKeyStorageProviderNamesStatics)->get_PlatformKeyStorageProvider(put_abi(value))); return value; } template hstring impl_IKeyStorageProviderNamesStatics2::PassportKeyStorageProvider() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PassportKeyStorageProvider(put(value))); + check_hresult(WINRT_SHIM(IKeyStorageProviderNamesStatics2)->get_PassportKeyStorageProvider(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IChainBuildingParameters::EnhancedKeyUsages() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_EnhancedKeyUsages(put(value))); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_EnhancedKeyUsages(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IChainBuildingParameters::ValidationTimestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ValidationTimestamp(put(value))); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_ValidationTimestamp(put_abi(value))); return value; } template void impl_IChainBuildingParameters::ValidationTimestamp(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_ValidationTimestamp(get(value))); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->put_ValidationTimestamp(get_abi(value))); } template bool impl_IChainBuildingParameters::RevocationCheckEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RevocationCheckEnabled(&value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_RevocationCheckEnabled(&value)); return value; } template void impl_IChainBuildingParameters::RevocationCheckEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RevocationCheckEnabled(value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->put_RevocationCheckEnabled(value)); } template bool impl_IChainBuildingParameters::NetworkRetrievalEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NetworkRetrievalEnabled(&value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_NetworkRetrievalEnabled(&value)); return value; } template void impl_IChainBuildingParameters::NetworkRetrievalEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NetworkRetrievalEnabled(value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->put_NetworkRetrievalEnabled(value)); } template bool impl_IChainBuildingParameters::AuthorityInformationAccessEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthorityInformationAccessEnabled(&value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_AuthorityInformationAccessEnabled(&value)); return value; } template void impl_IChainBuildingParameters::AuthorityInformationAccessEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AuthorityInformationAccessEnabled(value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->put_AuthorityInformationAccessEnabled(value)); } template bool impl_IChainBuildingParameters::CurrentTimeValidationEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentTimeValidationEnabled(&value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_CurrentTimeValidationEnabled(&value)); return value; } template void impl_IChainBuildingParameters::CurrentTimeValidationEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CurrentTimeValidationEnabled(value)); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->put_CurrentTimeValidationEnabled(value)); } template Windows::Foundation::Collections::IVector impl_IChainBuildingParameters::ExclusiveTrustRoots() const { Windows::Foundation::Collections::IVector certificates; - check_hresult(static_cast(static_cast(*this))->get_ExclusiveTrustRoots(put(certificates))); + check_hresult(WINRT_SHIM(IChainBuildingParameters)->get_ExclusiveTrustRoots(put_abi(certificates))); return certificates; } template Windows::Security::Cryptography::Certificates::CertificateChainPolicy impl_IChainValidationParameters::CertificateChainPolicy() const { Windows::Security::Cryptography::Certificates::CertificateChainPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_CertificateChainPolicy(&value)); + check_hresult(WINRT_SHIM(IChainValidationParameters)->get_CertificateChainPolicy(&value)); return value; } template void impl_IChainValidationParameters::CertificateChainPolicy(Windows::Security::Cryptography::Certificates::CertificateChainPolicy value) const { - check_hresult(static_cast(static_cast(*this))->put_CertificateChainPolicy(value)); + check_hresult(WINRT_SHIM(IChainValidationParameters)->put_CertificateChainPolicy(value)); } template Windows::Networking::HostName impl_IChainValidationParameters::ServerDnsName() const { Windows::Networking::HostName value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ServerDnsName(put(value))); + check_hresult(WINRT_SHIM(IChainValidationParameters)->get_ServerDnsName(put_abi(value))); return value; } template void impl_IChainValidationParameters::ServerDnsName(const Windows::Networking::HostName & value) const { - check_hresult(static_cast(static_cast(*this))->put_ServerDnsName(get(value))); + check_hresult(WINRT_SHIM(IChainValidationParameters)->put_ServerDnsName(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_ICertificateQuery::EnhancedKeyUsages() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_EnhancedKeyUsages(put(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->get_EnhancedKeyUsages(put_abi(value))); return value; } template hstring impl_ICertificateQuery::IssuerName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IssuerName(put(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->get_IssuerName(put_abi(value))); return value; } -template void impl_ICertificateQuery::IssuerName(hstring_ref value) const +template void impl_ICertificateQuery::IssuerName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_IssuerName(get(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->put_IssuerName(get_abi(value))); } template hstring impl_ICertificateQuery::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->get_FriendlyName(put_abi(value))); return value; } -template void impl_ICertificateQuery::FriendlyName(hstring_ref value) const +template void impl_ICertificateQuery::FriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FriendlyName(get(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->put_FriendlyName(get_abi(value))); } template com_array impl_ICertificateQuery::Thumbprint() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_Thumbprint(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->get_Thumbprint(impl::put_size_abi(value), put_abi(value))); return value; } -template void impl_ICertificateQuery::Thumbprint(array_ref value) const +template void impl_ICertificateQuery::Thumbprint(array_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Thumbprint(value.size(), get(value))); + check_hresult(WINRT_SHIM(ICertificateQuery)->put_Thumbprint(value.size(), get_abi(value))); } template bool impl_ICertificateQuery::HardwareOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HardwareOnly(&value)); + check_hresult(WINRT_SHIM(ICertificateQuery)->get_HardwareOnly(&value)); return value; } template void impl_ICertificateQuery::HardwareOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_HardwareOnly(value)); + check_hresult(WINRT_SHIM(ICertificateQuery)->put_HardwareOnly(value)); } template bool impl_ICertificateQuery2::IncludeDuplicates() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeDuplicates(&value)); + check_hresult(WINRT_SHIM(ICertificateQuery2)->get_IncludeDuplicates(&value)); return value; } template void impl_ICertificateQuery2::IncludeDuplicates(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncludeDuplicates(value)); + check_hresult(WINRT_SHIM(ICertificateQuery2)->put_IncludeDuplicates(value)); } template bool impl_ICertificateQuery2::IncludeExpiredCertificates() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IncludeExpiredCertificates(&value)); + check_hresult(WINRT_SHIM(ICertificateQuery2)->get_IncludeExpiredCertificates(&value)); return value; } template void impl_ICertificateQuery2::IncludeExpiredCertificates(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IncludeExpiredCertificates(value)); + check_hresult(WINRT_SHIM(ICertificateQuery2)->put_IncludeExpiredCertificates(value)); } template hstring impl_ICertificateQuery2::StoreName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreName(put(value))); + check_hresult(WINRT_SHIM(ICertificateQuery2)->get_StoreName(put_abi(value))); return value; } -template void impl_ICertificateQuery2::StoreName(hstring_ref value) const +template void impl_ICertificateQuery2::StoreName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_StoreName(get(value))); + check_hresult(WINRT_SHIM(ICertificateQuery2)->put_StoreName(get_abi(value))); } template Windows::Security::Cryptography::Certificates::ChainValidationResult impl_ICertificateChain::Validate() const { Windows::Security::Cryptography::Certificates::ChainValidationResult status {}; - check_hresult(static_cast(static_cast(*this))->abi_Validate(&status)); + check_hresult(WINRT_SHIM(ICertificateChain)->abi_Validate(&status)); return status; } template Windows::Security::Cryptography::Certificates::ChainValidationResult impl_ICertificateChain::Validate(const Windows::Security::Cryptography::Certificates::ChainValidationParameters & parameter) const { Windows::Security::Cryptography::Certificates::ChainValidationResult status {}; - check_hresult(static_cast(static_cast(*this))->abi_ValidateWithParameters(get(parameter), &status)); + check_hresult(WINRT_SHIM(ICertificateChain)->abi_ValidateWithParameters(get_abi(parameter), &status)); return status; } template Windows::Foundation::Collections::IVectorView impl_ICertificateChain::GetCertificates(bool includeRoot) const { Windows::Foundation::Collections::IVectorView certificates; - check_hresult(static_cast(static_cast(*this))->abi_GetCertificates(includeRoot, put(certificates))); + check_hresult(WINRT_SHIM(ICertificateChain)->abi_GetCertificates(includeRoot, put_abi(certificates))); return certificates; } -template Windows::Foundation::IAsyncOperation impl_ICertificate::BuildChainAsync(const Windows::Foundation::Collections::IIterable & certificates) const +template Windows::Foundation::IAsyncOperation impl_ICertificate::BuildChainAsync(iterable certificates) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_BuildChainAsync(get(certificates), put(value))); + check_hresult(WINRT_SHIM(ICertificate)->abi_BuildChainAsync(get_abi(certificates), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_ICertificate::BuildChainAsync(const Windows::Foundation::Collections::IIterable & certificates, const Windows::Security::Cryptography::Certificates::ChainBuildingParameters & parameters) const +template Windows::Foundation::IAsyncOperation impl_ICertificate::BuildChainAsync(iterable certificates, const Windows::Security::Cryptography::Certificates::ChainBuildingParameters & parameters) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_BuildChainWithParametersAsync(get(certificates), get(parameters), put(value))); + check_hresult(WINRT_SHIM(ICertificate)->abi_BuildChainWithParametersAsync(get_abi(certificates), get_abi(parameters), put_abi(value))); return value; } template com_array impl_ICertificate::SerialNumber() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_SerialNumber(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_SerialNumber(impl::put_size_abi(value), put_abi(value))); return value; } template com_array impl_ICertificate::GetHashValue() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetHashValue(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICertificate)->abi_GetHashValue(impl::put_size_abi(value), put_abi(value))); return value; } -template com_array impl_ICertificate::GetHashValue(hstring_ref hashAlgorithmName) const +template com_array impl_ICertificate::GetHashValue(hstring_view hashAlgorithmName) const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetHashValueWithAlgorithm(get(hashAlgorithmName), put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICertificate)->abi_GetHashValueWithAlgorithm(get_abi(hashAlgorithmName), impl::put_size_abi(value), put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICertificate::GetCertificateBlob() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_GetCertificateBlob(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->abi_GetCertificateBlob(put_abi(value))); return value; } template hstring impl_ICertificate::Subject() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subject(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_Subject(put_abi(value))); return value; } template hstring impl_ICertificate::Issuer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Issuer(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_Issuer(put_abi(value))); return value; } template bool impl_ICertificate::HasPrivateKey() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasPrivateKey(&value)); + check_hresult(WINRT_SHIM(ICertificate)->get_HasPrivateKey(&value)); return value; } template bool impl_ICertificate::IsStronglyProtected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStronglyProtected(&value)); + check_hresult(WINRT_SHIM(ICertificate)->get_IsStronglyProtected(&value)); return value; } template Windows::Foundation::DateTime impl_ICertificate::ValidFrom() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ValidFrom(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_ValidFrom(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ICertificate::ValidTo() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ValidTo(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_ValidTo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICertificate::EnhancedKeyUsages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EnhancedKeyUsages(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_EnhancedKeyUsages(put_abi(value))); return value; } -template void impl_ICertificate::FriendlyName(hstring_ref value) const +template void impl_ICertificate::FriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FriendlyName(get(value))); + check_hresult(WINRT_SHIM(ICertificate)->put_FriendlyName(get_abi(value))); } template hstring impl_ICertificate::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(ICertificate)->get_FriendlyName(put_abi(value))); return value; } template bool impl_ICertificate2::IsSecurityDeviceBound() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSecurityDeviceBound(&value)); + check_hresult(WINRT_SHIM(ICertificate2)->get_IsSecurityDeviceBound(&value)); return value; } template Windows::Security::Cryptography::Certificates::CertificateKeyUsages impl_ICertificate2::KeyUsages() const { Windows::Security::Cryptography::Certificates::CertificateKeyUsages value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_KeyUsages(put(value))); + check_hresult(WINRT_SHIM(ICertificate2)->get_KeyUsages(put_abi(value))); return value; } template hstring impl_ICertificate2::KeyAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICertificate2)->get_KeyAlgorithmName(put_abi(value))); return value; } template hstring impl_ICertificate2::SignatureAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SignatureAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICertificate2)->get_SignatureAlgorithmName(put_abi(value))); return value; } template hstring impl_ICertificate2::SignatureHashAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SignatureHashAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICertificate2)->get_SignatureHashAlgorithmName(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::SubjectAlternativeNameInfo impl_ICertificate2::SubjectAlternativeName() const { Windows::Security::Cryptography::Certificates::SubjectAlternativeNameInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SubjectAlternativeName(put(value))); + check_hresult(WINRT_SHIM(ICertificate2)->get_SubjectAlternativeName(put_abi(value))); return value; } template bool impl_ICertificate3::IsPerUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPerUser(&value)); + check_hresult(WINRT_SHIM(ICertificate3)->get_IsPerUser(&value)); return value; } template hstring impl_ICertificate3::StoreName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreName(put(value))); + check_hresult(WINRT_SHIM(ICertificate3)->get_StoreName(put_abi(value))); return value; } template hstring impl_ICertificate3::KeyStorageProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyStorageProviderName(put(value))); + check_hresult(WINRT_SHIM(ICertificate3)->get_KeyStorageProviderName(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_ICertificateFactory::CreateCertificate(const Windows::Storage::Streams::IBuffer & certBlob) const { Windows::Security::Cryptography::Certificates::Certificate certificate { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCertificate(get(certBlob), put(certificate))); + check_hresult(WINRT_SHIM(ICertificateFactory)->abi_CreateCertificate(get_abi(certBlob), put_abi(certificate))); return certificate; } template Windows::Security::Cryptography::Certificates::Certificate impl_ICmsTimestampInfo::SigningCertificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SigningCertificate(put(value))); + check_hresult(WINRT_SHIM(ICmsTimestampInfo)->get_SigningCertificate(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICmsTimestampInfo::Certificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Certificates(put(value))); + check_hresult(WINRT_SHIM(ICmsTimestampInfo)->get_Certificates(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_ICmsTimestampInfo::Timestamp() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ICmsTimestampInfo)->get_Timestamp(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::Certificate impl_ICmsSignerInfo::Certificate() const { Windows::Security::Cryptography::Certificates::Certificate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Certificate(put(value))); + check_hresult(WINRT_SHIM(ICmsSignerInfo)->get_Certificate(put_abi(value))); return value; } template void impl_ICmsSignerInfo::Certificate(const Windows::Security::Cryptography::Certificates::Certificate & value) const { - check_hresult(static_cast(static_cast(*this))->put_Certificate(get(value))); + check_hresult(WINRT_SHIM(ICmsSignerInfo)->put_Certificate(get_abi(value))); } template hstring impl_ICmsSignerInfo::HashAlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HashAlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ICmsSignerInfo)->get_HashAlgorithmName(put_abi(value))); return value; } -template void impl_ICmsSignerInfo::HashAlgorithmName(hstring_ref value) const +template void impl_ICmsSignerInfo::HashAlgorithmName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HashAlgorithmName(get(value))); + check_hresult(WINRT_SHIM(ICmsSignerInfo)->put_HashAlgorithmName(get_abi(value))); } template Windows::Security::Cryptography::Certificates::CmsTimestampInfo impl_ICmsSignerInfo::TimestampInfo() const { Windows::Security::Cryptography::Certificates::CmsTimestampInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TimestampInfo(put(value))); + check_hresult(WINRT_SHIM(ICmsSignerInfo)->get_TimestampInfo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::EmailName() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_EmailName(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_EmailName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::IPAddress() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_IPAddress(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_IPAddress(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::Url() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Url(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_Url(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::DnsName() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DnsName(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_DnsName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::DistinguishedName() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_DistinguishedName(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_DistinguishedName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ISubjectAlternativeNameInfo::PrincipalName() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PrincipalName(put(value))); + check_hresult(WINRT_SHIM(ISubjectAlternativeNameInfo)->get_PrincipalName(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::ExportOption impl_IPfxImportParameters::Exportable() const { Windows::Security::Cryptography::Certificates::ExportOption value {}; - check_hresult(static_cast(static_cast(*this))->get_Exportable(&value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_Exportable(&value)); return value; } template void impl_IPfxImportParameters::Exportable(Windows::Security::Cryptography::Certificates::ExportOption value) const { - check_hresult(static_cast(static_cast(*this))->put_Exportable(value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_Exportable(value)); } template Windows::Security::Cryptography::Certificates::KeyProtectionLevel impl_IPfxImportParameters::KeyProtectionLevel() const { Windows::Security::Cryptography::Certificates::KeyProtectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyProtectionLevel(&value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_KeyProtectionLevel(&value)); return value; } template void impl_IPfxImportParameters::KeyProtectionLevel(Windows::Security::Cryptography::Certificates::KeyProtectionLevel value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyProtectionLevel(value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_KeyProtectionLevel(value)); } template Windows::Security::Cryptography::Certificates::InstallOptions impl_IPfxImportParameters::InstallOptions() const { Windows::Security::Cryptography::Certificates::InstallOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_InstallOptions(&value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_InstallOptions(&value)); return value; } template void impl_IPfxImportParameters::InstallOptions(Windows::Security::Cryptography::Certificates::InstallOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_InstallOptions(value)); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_InstallOptions(value)); } template hstring impl_IPfxImportParameters::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_FriendlyName(put_abi(value))); return value; } -template void impl_IPfxImportParameters::FriendlyName(hstring_ref value) const +template void impl_IPfxImportParameters::FriendlyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_FriendlyName(get(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_FriendlyName(get_abi(value))); } template hstring impl_IPfxImportParameters::KeyStorageProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_KeyStorageProviderName(put(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_KeyStorageProviderName(put_abi(value))); return value; } -template void impl_IPfxImportParameters::KeyStorageProviderName(hstring_ref value) const +template void impl_IPfxImportParameters::KeyStorageProviderName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyStorageProviderName(get(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_KeyStorageProviderName(get_abi(value))); } template hstring impl_IPfxImportParameters::ContainerNamePrefix() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContainerNamePrefix(put(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_ContainerNamePrefix(put_abi(value))); return value; } -template void impl_IPfxImportParameters::ContainerNamePrefix(hstring_ref value) const +template void impl_IPfxImportParameters::ContainerNamePrefix(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContainerNamePrefix(get(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_ContainerNamePrefix(get_abi(value))); } template hstring impl_IPfxImportParameters::ReaderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ReaderName(put(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->get_ReaderName(put_abi(value))); return value; } -template void impl_IPfxImportParameters::ReaderName(hstring_ref value) const +template void impl_IPfxImportParameters::ReaderName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ReaderName(get(value))); + check_hresult(WINRT_SHIM(IPfxImportParameters)->put_ReaderName(get_abi(value))); } template bool impl_ICertificateKeyUsages::EncipherOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_EncipherOnly(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_EncipherOnly(&value)); return value; } template void impl_ICertificateKeyUsages::EncipherOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_EncipherOnly(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_EncipherOnly(value)); } template bool impl_ICertificateKeyUsages::CrlSign() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CrlSign(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_CrlSign(&value)); return value; } template void impl_ICertificateKeyUsages::CrlSign(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CrlSign(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_CrlSign(value)); } template bool impl_ICertificateKeyUsages::KeyCertificateSign() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyCertificateSign(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_KeyCertificateSign(&value)); return value; } template void impl_ICertificateKeyUsages::KeyCertificateSign(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyCertificateSign(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_KeyCertificateSign(value)); } template bool impl_ICertificateKeyUsages::KeyAgreement() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyAgreement(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_KeyAgreement(&value)); return value; } template void impl_ICertificateKeyUsages::KeyAgreement(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyAgreement(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_KeyAgreement(value)); } template bool impl_ICertificateKeyUsages::DataEncipherment() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DataEncipherment(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_DataEncipherment(&value)); return value; } template void impl_ICertificateKeyUsages::DataEncipherment(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DataEncipherment(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_DataEncipherment(value)); } template bool impl_ICertificateKeyUsages::KeyEncipherment() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyEncipherment(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_KeyEncipherment(&value)); return value; } template void impl_ICertificateKeyUsages::KeyEncipherment(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyEncipherment(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_KeyEncipherment(value)); } template bool impl_ICertificateKeyUsages::NonRepudiation() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NonRepudiation(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_NonRepudiation(&value)); return value; } template void impl_ICertificateKeyUsages::NonRepudiation(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_NonRepudiation(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_NonRepudiation(value)); } template bool impl_ICertificateKeyUsages::DigitalSignature() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DigitalSignature(&value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->get_DigitalSignature(&value)); return value; } template void impl_ICertificateKeyUsages::DigitalSignature(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DigitalSignature(value)); + check_hresult(WINRT_SHIM(ICertificateKeyUsages)->put_DigitalSignature(value)); } template Windows::Foundation::Collections::IVectorView impl_ICmsAttachedSignature::Certificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Certificates(put(value))); + check_hresult(WINRT_SHIM(ICmsAttachedSignature)->get_Certificates(put_abi(value))); return value; } template com_array impl_ICmsAttachedSignature::Content() const { com_array value {}; - check_hresult(static_cast(static_cast(*this))->get_Content(put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICmsAttachedSignature)->get_Content(impl::put_size_abi(value), put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICmsAttachedSignature::Signers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Signers(put(value))); + check_hresult(WINRT_SHIM(ICmsAttachedSignature)->get_Signers(put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::SignatureValidationResult impl_ICmsAttachedSignature::VerifySignature() const { Windows::Security::Cryptography::Certificates::SignatureValidationResult value {}; - check_hresult(static_cast(static_cast(*this))->abi_VerifySignature(&value)); + check_hresult(WINRT_SHIM(ICmsAttachedSignature)->abi_VerifySignature(&value)); return value; } template Windows::Security::Cryptography::Certificates::CmsAttachedSignature impl_ICmsAttachedSignatureFactory::CreateCmsAttachedSignature(const Windows::Storage::Streams::IBuffer & inputBlob) const { Windows::Security::Cryptography::Certificates::CmsAttachedSignature cmsSignedData { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCmsAttachedSignature(get(inputBlob), put(cmsSignedData))); + check_hresult(WINRT_SHIM(ICmsAttachedSignatureFactory)->abi_CreateCmsAttachedSignature(get_abi(inputBlob), put_abi(cmsSignedData))); return cmsSignedData; } -template Windows::Foundation::IAsyncOperation impl_ICmsAttachedSignatureStatics::GenerateSignatureAsync(const Windows::Storage::Streams::IBuffer & data, const Windows::Foundation::Collections::IIterable & signers, const Windows::Foundation::Collections::IIterable & certificates) const +template Windows::Foundation::IAsyncOperation impl_ICmsAttachedSignatureStatics::GenerateSignatureAsync(const Windows::Storage::Streams::IBuffer & data, iterable signers, iterable certificates) const { Windows::Foundation::IAsyncOperation outputBlob; - check_hresult(static_cast(static_cast(*this))->abi_GenerateSignatureAsync(get(data), get(signers), get(certificates), put(outputBlob))); + check_hresult(WINRT_SHIM(ICmsAttachedSignatureStatics)->abi_GenerateSignatureAsync(get_abi(data), get_abi(signers), get_abi(certificates), put_abi(outputBlob))); return outputBlob; } template Windows::Foundation::Collections::IVectorView impl_ICmsDetachedSignature::Certificates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Certificates(put(value))); + check_hresult(WINRT_SHIM(ICmsDetachedSignature)->get_Certificates(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICmsDetachedSignature::Signers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Signers(put(value))); + check_hresult(WINRT_SHIM(ICmsDetachedSignature)->get_Signers(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICmsDetachedSignature::VerifySignatureAsync(const Windows::Storage::Streams::IInputStream & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_VerifySignatureAsync(get(data), put(value))); + check_hresult(WINRT_SHIM(ICmsDetachedSignature)->abi_VerifySignatureAsync(get_abi(data), put_abi(value))); return value; } template Windows::Security::Cryptography::Certificates::CmsDetachedSignature impl_ICmsDetachedSignatureFactory::CreateCmsDetachedSignature(const Windows::Storage::Streams::IBuffer & inputBlob) const { Windows::Security::Cryptography::Certificates::CmsDetachedSignature cmsSignedData { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCmsDetachedSignature(get(inputBlob), put(cmsSignedData))); + check_hresult(WINRT_SHIM(ICmsDetachedSignatureFactory)->abi_CreateCmsDetachedSignature(get_abi(inputBlob), put_abi(cmsSignedData))); return cmsSignedData; } -template Windows::Foundation::IAsyncOperation impl_ICmsDetachedSignatureStatics::GenerateSignatureAsync(const Windows::Storage::Streams::IInputStream & data, const Windows::Foundation::Collections::IIterable & signers, const Windows::Foundation::Collections::IIterable & certificates) const +template Windows::Foundation::IAsyncOperation impl_ICmsDetachedSignatureStatics::GenerateSignatureAsync(const Windows::Storage::Streams::IInputStream & data, iterable signers, iterable certificates) const { Windows::Foundation::IAsyncOperation outputBlob; - check_hresult(static_cast(static_cast(*this))->abi_GenerateSignatureAsync(get(data), get(signers), get(certificates), put(outputBlob))); + check_hresult(WINRT_SHIM(ICmsDetachedSignatureStatics)->abi_GenerateSignatureAsync(get_abi(data), get_abi(signers), get_abi(certificates), put_abi(outputBlob))); return outputBlob; } @@ -4016,12 +4210,12 @@ inline Windows::Foundation::IAsyncOperation CertificateEnrollmentManage return get_activation_factory().CreateRequestAsync(request); } -inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::InstallCertificateAsync(hstring_ref certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) +inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::InstallCertificateAsync(hstring_view certificate, Windows::Security::Cryptography::Certificates::InstallOptions installOption) { return get_activation_factory().InstallCertificateAsync(certificate, installOption); } -inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName) +inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName) { return get_activation_factory().ImportPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName); } @@ -4031,12 +4225,12 @@ inline Windows::Security::Cryptography::Certificates::UserCertificateEnrollmentM return get_activation_factory().UserCertificateEnrollmentManager(); } -inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_ref friendlyName, hstring_ref keyStorageProvider) +inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, Windows::Security::Cryptography::Certificates::ExportOption exportable, Windows::Security::Cryptography::Certificates::KeyProtectionLevel keyProtectionLevel, Windows::Security::Cryptography::Certificates::InstallOptions installOption, hstring_view friendlyName, hstring_view keyStorageProvider) { return get_activation_factory().ImportPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName, keyStorageProvider); } -inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_ref pfxData, hstring_ref password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) +inline Windows::Foundation::IAsyncAction CertificateEnrollmentManager::ImportPfxDataAsync(hstring_view pfxData, hstring_view password, const Windows::Security::Cryptography::Certificates::PfxImportParameters & pfxImportParameters) { return get_activation_factory().ImportPfxDataAsync(pfxData, password, pfxImportParameters); } @@ -4073,12 +4267,12 @@ inline Windows::Security::Cryptography::Certificates::CertificateStore Certifica return get_activation_factory().IntermediateCertificationAuthorities(); } -inline Windows::Security::Cryptography::Certificates::CertificateStore CertificateStores::GetStoreByName(hstring_ref storeName) +inline Windows::Security::Cryptography::Certificates::CertificateStore CertificateStores::GetStoreByName(hstring_view storeName) { return get_activation_factory().GetStoreByName(storeName); } -inline Windows::Security::Cryptography::Certificates::UserCertificateStore CertificateStores::GetUserStoreByName(hstring_ref storeName) +inline Windows::Security::Cryptography::Certificates::UserCertificateStore CertificateStores::GetUserStoreByName(hstring_view storeName) { return get_activation_factory().GetUserStoreByName(storeName); } @@ -4095,7 +4289,7 @@ inline CmsAttachedSignature::CmsAttachedSignature(const Windows::Storage::Stream CmsAttachedSignature(get_activation_factory().CreateCmsAttachedSignature(inputBlob)) {} -inline Windows::Foundation::IAsyncOperation CmsAttachedSignature::GenerateSignatureAsync(const Windows::Storage::Streams::IBuffer & data, const Windows::Foundation::Collections::IIterable & signers, const Windows::Foundation::Collections::IIterable & certificates) +inline Windows::Foundation::IAsyncOperation CmsAttachedSignature::GenerateSignatureAsync(const Windows::Storage::Streams::IBuffer & data, iterable signers, iterable certificates) { return get_activation_factory().GenerateSignatureAsync(data, signers, certificates); } @@ -4104,7 +4298,7 @@ inline CmsDetachedSignature::CmsDetachedSignature(const Windows::Storage::Stream CmsDetachedSignature(get_activation_factory().CreateCmsDetachedSignature(inputBlob)) {} -inline Windows::Foundation::IAsyncOperation CmsDetachedSignature::GenerateSignatureAsync(const Windows::Storage::Streams::IInputStream & data, const Windows::Foundation::Collections::IIterable & signers, const Windows::Foundation::Collections::IIterable & certificates) +inline Windows::Foundation::IAsyncOperation CmsDetachedSignature::GenerateSignatureAsync(const Windows::Storage::Streams::IInputStream & data, iterable signers, iterable certificates) { return get_activation_factory().GenerateSignatureAsync(data, signers, certificates); } @@ -4163,17 +4357,17 @@ inline hstring KeyAlgorithmNames::Ecdh() return get_activation_factory().Ecdh(); } -inline Windows::Foundation::IAsyncOperation KeyAttestationHelper::DecryptTpmAttestationCredentialAsync(hstring_ref credential) +inline Windows::Foundation::IAsyncOperation KeyAttestationHelper::DecryptTpmAttestationCredentialAsync(hstring_view credential) { return get_activation_factory().DecryptTpmAttestationCredentialAsync(credential); } -inline hstring KeyAttestationHelper::GetTpmAttestationCredentialId(hstring_ref credential) +inline hstring KeyAttestationHelper::GetTpmAttestationCredentialId(hstring_view credential) { return get_activation_factory().GetTpmAttestationCredentialId(credential); } -inline Windows::Foundation::IAsyncOperation KeyAttestationHelper::DecryptTpmAttestationCredentialAsync(hstring_ref credential, hstring_ref containerName) +inline Windows::Foundation::IAsyncOperation KeyAttestationHelper::DecryptTpmAttestationCredentialAsync(hstring_view credential, hstring_view containerName) { return get_activation_factory().DecryptTpmAttestationCredentialAsync(credential, containerName); } @@ -4224,3 +4418,509 @@ inline SubjectAlternativeNameInfo::SubjectAlternativeNameInfo() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificate2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificate3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateChain & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateEnrollmentManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateEnrollmentManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateEnrollmentManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateKeyUsages & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateQuery2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateRequestProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateRequestProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateRequestProperties3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateStore2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateStoresStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICertificateStoresStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IChainBuildingParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IChainValidationParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsAttachedSignature & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsAttachedSignatureFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsAttachedSignatureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsDetachedSignature & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsDetachedSignatureFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsDetachedSignatureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsSignerInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ICmsTimestampInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyAlgorithmNamesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyAttestationHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyAttestationHelperStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyStorageProviderNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IKeyStorageProviderNamesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IPfxImportParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IStandardCertificateStoreNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ISubjectAlternativeNameInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IUserCertificateEnrollmentManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IUserCertificateEnrollmentManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::IUserCertificateStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::Certificate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CertificateChain & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CertificateKeyUsages & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CertificateQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CertificateRequestProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CertificateStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ChainBuildingParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::ChainValidationParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CmsAttachedSignature & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CmsDetachedSignature & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CmsSignerInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::CmsTimestampInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::PfxImportParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::SubjectAlternativeNameInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::UserCertificateEnrollmentManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Certificates::UserCertificateStore & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Cryptography.Core.h b/10.0.14393.0/winrt/Windows.Security.Cryptography.Core.h index 78bffac4a..cc3a26842 100644 --- a/10.0.14393.0/winrt/Windows.Security.Cryptography.Core.h +++ b/10.0.14393.0/winrt/Windows.Security.Cryptography.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Security.Cryptography.Certificates.3.h" #include "internal/Windows.Foundation.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_RsaPkcs1(abi_arg_out value) noexcept override + HRESULT __stdcall get_RsaPkcs1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaPkcs1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaPkcs1()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaOaepSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaOaepSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaOaepSha1()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaOaepSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaOaepSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaOaepSha256()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaOaepSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaOaepSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaOaepSha384()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaOaepSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaOaepSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaOaepSha512()); return S_OK; } catch (...) @@ -87,11 +95,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EcdsaP256Sha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaP256Sha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaP256Sha256()); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EcdsaP384Sha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaP384Sha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaP384Sha384()); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EcdsaP521Sha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaP521Sha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaP521Sha512()); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DsaSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DsaSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DsaSha1()); return S_OK; } catch (...) @@ -143,11 +155,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DsaSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DsaSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DsaSha256()); return S_OK; } catch (...) @@ -157,11 +170,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPkcs1Sha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPkcs1Sha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPkcs1Sha1()); return S_OK; } catch (...) @@ -171,11 +185,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPkcs1Sha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPkcs1Sha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPkcs1Sha256()); return S_OK; } catch (...) @@ -185,11 +200,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPkcs1Sha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPkcs1Sha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPkcs1Sha384()); return S_OK; } catch (...) @@ -199,11 +215,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPkcs1Sha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPkcs1Sha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPkcs1Sha512()); return S_OK; } catch (...) @@ -213,11 +230,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPssSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPssSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPssSha1()); return S_OK; } catch (...) @@ -227,11 +245,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPssSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPssSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPssSha256()); return S_OK; } catch (...) @@ -241,11 +260,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPssSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPssSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPssSha384()); return S_OK; } catch (...) @@ -255,11 +275,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RsaSignPssSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RsaSignPssSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RsaSignPssSha512()); return S_OK; } catch (...) @@ -273,11 +294,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EcdsaSha256(abi_arg_out value) noexcept override + HRESULT __stdcall get_EcdsaSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaSha256()); return S_OK; } catch (...) @@ -287,11 +309,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EcdsaSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaSha384()); return S_OK; } catch (...) @@ -301,11 +324,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EcdsaSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EcdsaSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EcdsaSha512()); return S_OK; } catch (...) @@ -319,11 +343,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlgorithmName()); return S_OK; } catch (...) @@ -333,11 +358,12 @@ struct produce key) noexcept override + HRESULT __stdcall abi_CreateKeyPair(uint32_t keySize, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().CreateKeyPair(keySize)); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().CreateKeyPair(keySize)); return S_OK; } catch (...) @@ -347,11 +373,12 @@ struct produce keyBlob, abi_arg_out key) noexcept override + HRESULT __stdcall abi_ImportDefaultPrivateKeyBlob(impl::abi_arg_in keyBlob, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().ImportKeyPair(*reinterpret_cast(&keyBlob))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().ImportKeyPair(*reinterpret_cast(&keyBlob))); return S_OK; } catch (...) @@ -361,11 +388,12 @@ struct produce keyBlob, Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType, abi_arg_out key) noexcept override + HRESULT __stdcall abi_ImportKeyPairWithBlobType(impl::abi_arg_in keyBlob, Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().ImportKeyPair(*reinterpret_cast(&keyBlob), BlobType)); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().ImportKeyPair(*reinterpret_cast(&keyBlob), BlobType)); return S_OK; } catch (...) @@ -375,11 +403,12 @@ struct produce keyBlob, abi_arg_out key) noexcept override + HRESULT __stdcall abi_ImportDefaultPublicKeyBlob(impl::abi_arg_in keyBlob, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().ImportPublicKey(*reinterpret_cast(&keyBlob))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().ImportPublicKey(*reinterpret_cast(&keyBlob))); return S_OK; } catch (...) @@ -389,11 +418,12 @@ struct produce keyBlob, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType, abi_arg_out key) noexcept override + HRESULT __stdcall abi_ImportPublicKeyWithBlobType(impl::abi_arg_in keyBlob, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().ImportPublicKey(*reinterpret_cast(&keyBlob), BlobType)); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().ImportPublicKey(*reinterpret_cast(&keyBlob), BlobType)); return S_OK; } catch (...) @@ -407,11 +437,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateKeyPairWithCurveName(abi_arg_in curveName, abi_arg_out key) noexcept override + HRESULT __stdcall abi_CreateKeyPairWithCurveName(impl::abi_arg_in curveName, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().CreateKeyPairWithCurveName(*reinterpret_cast(&curveName))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().CreateKeyPairWithCurveName(*reinterpret_cast(&curveName))); return S_OK; } catch (...) @@ -421,11 +452,12 @@ struct produce * parameters, abi_arg_out key) noexcept override + HRESULT __stdcall abi_CreateKeyPairWithCurveParameters(uint32_t __parametersSize, impl::abi_arg_in * parameters, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().CreateKeyPairWithCurveParameters(array_ref(parameters, parameters + __parametersSize))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().CreateKeyPairWithCurveParameters(array_view(parameters, parameters + __parametersSize))); return S_OK; } catch (...) @@ -439,11 +471,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_OpenAlgorithm(abi_arg_in algorithm, abi_arg_out provider) noexcept override + HRESULT __stdcall abi_OpenAlgorithm(impl::abi_arg_in algorithm, impl::abi_arg_out provider) noexcept override { try { - *provider = detach(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); + typename D::abi_guard guard(this->shim()); + *provider = detach_abi(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); return S_OK; } catch (...) @@ -457,11 +490,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Encrypt(abi_arg_in key, abi_arg_in data, abi_arg_in iv, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Encrypt(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in iv, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Encrypt(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Encrypt(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); return S_OK; } catch (...) @@ -471,11 +505,12 @@ struct produce key, abi_arg_in data, abi_arg_in iv, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Decrypt(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in iv, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Decrypt(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Decrypt(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); return S_OK; } catch (...) @@ -485,11 +520,12 @@ struct produce key, abi_arg_in data, abi_arg_in nonce, abi_arg_in authenticatedData, abi_arg_out value) noexcept override + HRESULT __stdcall abi_EncryptAndAuthenticate(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in nonce, impl::abi_arg_in authenticatedData, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncryptAndAuthenticate(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&nonce), *reinterpret_cast(&authenticatedData))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncryptAndAuthenticate(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&nonce), *reinterpret_cast(&authenticatedData))); return S_OK; } catch (...) @@ -499,11 +535,12 @@ struct produce key, abi_arg_in data, abi_arg_in nonce, abi_arg_in authenticationTag, abi_arg_in authenticatedData, abi_arg_out value) noexcept override + HRESULT __stdcall abi_DecryptAndAuthenticate(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in nonce, impl::abi_arg_in authenticationTag, impl::abi_arg_in authenticatedData, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DecryptAndAuthenticate(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&nonce), *reinterpret_cast(&authenticationTag), *reinterpret_cast(&authenticatedData))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecryptAndAuthenticate(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&nonce), *reinterpret_cast(&authenticationTag), *reinterpret_cast(&authenticatedData))); return S_OK; } catch (...) @@ -513,11 +550,12 @@ struct produce key, abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Sign(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sign(*reinterpret_cast(&key), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sign(*reinterpret_cast(&key), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -527,11 +565,12 @@ struct produce key, abi_arg_in data, abi_arg_in signature, bool * isAuthenticated) noexcept override + HRESULT __stdcall abi_VerifySignature(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in signature, bool * isAuthenticated) noexcept override { try { - *isAuthenticated = detach(this->shim().VerifySignature(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&signature))); + typename D::abi_guard guard(this->shim()); + *isAuthenticated = detach_abi(this->shim().VerifySignature(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&signature))); return S_OK; } catch (...) @@ -540,11 +579,12 @@ struct produce key, abi_arg_in parameters, uint32_t desiredKeySize, abi_arg_out keyMaterial) noexcept override + HRESULT __stdcall abi_DeriveKeyMaterial(impl::abi_arg_in key, impl::abi_arg_in parameters, uint32_t desiredKeySize, impl::abi_arg_out keyMaterial) noexcept override { try { - *keyMaterial = detach(this->shim().DeriveKeyMaterial(*reinterpret_cast(&key), *reinterpret_cast(¶meters), desiredKeySize)); + typename D::abi_guard guard(this->shim()); + *keyMaterial = detach_abi(this->shim().DeriveKeyMaterial(*reinterpret_cast(&key), *reinterpret_cast(¶meters), desiredKeySize)); return S_OK; } catch (...) @@ -558,11 +598,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_SignHashedData(abi_arg_in key, abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_SignHashedData(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SignHashedData(*reinterpret_cast(&key), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignHashedData(*reinterpret_cast(&key), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -572,11 +613,12 @@ struct produce key, abi_arg_in data, abi_arg_in signature, bool * isAuthenticated) noexcept override + HRESULT __stdcall abi_VerifySignatureWithHashInput(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in signature, bool * isAuthenticated) noexcept override { try { - *isAuthenticated = detach(this->shim().VerifySignatureWithHashInput(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&signature))); + typename D::abi_guard guard(this->shim()); + *isAuthenticated = detach_abi(this->shim().VerifySignatureWithHashInput(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&signature))); return S_OK; } catch (...) @@ -585,11 +627,12 @@ struct produce key, abi_arg_in data, abi_arg_in iv, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_DecryptAsync(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_in iv, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DecryptAsync(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DecryptAsync(*reinterpret_cast(&key), *reinterpret_cast(&data), *reinterpret_cast(&iv))); return S_OK; } catch (...) @@ -599,11 +642,12 @@ struct produce key, abi_arg_in data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_SignAsync(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SignAsync(*reinterpret_cast(&key), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignAsync(*reinterpret_cast(&key), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -613,11 +657,12 @@ struct produce key, abi_arg_in data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_SignHashedDataAsync(impl::abi_arg_in key, impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SignHashedDataAsync(*reinterpret_cast(&key), *reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SignHashedDataAsync(*reinterpret_cast(&key), *reinterpret_cast(&data))); return S_OK; } catch (...) @@ -635,7 +680,8 @@ struct produce : pr { try { - *value = detach(this->shim().KeySize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeySize()); return S_OK; } catch (...) @@ -644,11 +690,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ExportDefaultPrivateKeyBlobType(abi_arg_out value) noexcept override + HRESULT __stdcall abi_ExportDefaultPrivateKeyBlobType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Export()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Export()); return S_OK; } catch (...) @@ -658,11 +705,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ExportPrivateKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ExportPrivateKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Export(BlobType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Export(BlobType)); return S_OK; } catch (...) @@ -672,11 +720,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ExportDefaultPublicKeyBlobType(abi_arg_out value) noexcept override + HRESULT __stdcall abi_ExportDefaultPublicKeyBlobType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExportPublicKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExportPublicKey()); return S_OK; } catch (...) @@ -686,11 +735,12 @@ struct produce : pr } } - HRESULT __stdcall abi_ExportPublicKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ExportPublicKeyWithBlobType(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExportPublicKey(BlobType)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExportPublicKey(BlobType)); return S_OK; } catch (...) @@ -704,11 +754,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_BrainpoolP160r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP160r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP160r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP160r1()); return S_OK; } catch (...) @@ -718,11 +769,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP160t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP160t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP160t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP160t1()); return S_OK; } catch (...) @@ -732,11 +784,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP192r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP192r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP192r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP192r1()); return S_OK; } catch (...) @@ -746,11 +799,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP192t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP192t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP192t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP192t1()); return S_OK; } catch (...) @@ -760,11 +814,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP224r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP224r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP224r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP224r1()); return S_OK; } catch (...) @@ -774,11 +829,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP224t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP224t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP224t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP224t1()); return S_OK; } catch (...) @@ -788,11 +844,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP256r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP256r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP256r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP256r1()); return S_OK; } catch (...) @@ -802,11 +859,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP256t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP256t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP256t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP256t1()); return S_OK; } catch (...) @@ -816,11 +874,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP320r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP320r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP320r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP320r1()); return S_OK; } catch (...) @@ -830,11 +889,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP320t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP320t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP320t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP320t1()); return S_OK; } catch (...) @@ -844,11 +904,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP384r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP384r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP384r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP384r1()); return S_OK; } catch (...) @@ -858,11 +919,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP384t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP384t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP384t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP384t1()); return S_OK; } catch (...) @@ -872,11 +934,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP512r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP512r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP512r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP512r1()); return S_OK; } catch (...) @@ -886,11 +949,12 @@ struct produce } } - HRESULT __stdcall get_BrainpoolP512t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BrainpoolP512t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BrainpoolP512t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BrainpoolP512t1()); return S_OK; } catch (...) @@ -900,11 +964,12 @@ struct produce } } - HRESULT __stdcall get_Curve25519(abi_arg_out value) noexcept override + HRESULT __stdcall get_Curve25519(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Curve25519()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Curve25519()); return S_OK; } catch (...) @@ -914,11 +979,12 @@ struct produce } } - HRESULT __stdcall get_Ec192wapi(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ec192wapi(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ec192wapi()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ec192wapi()); return S_OK; } catch (...) @@ -928,11 +994,12 @@ struct produce } } - HRESULT __stdcall get_NistP192(abi_arg_out value) noexcept override + HRESULT __stdcall get_NistP192(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NistP192()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NistP192()); return S_OK; } catch (...) @@ -942,11 +1009,12 @@ struct produce } } - HRESULT __stdcall get_NistP224(abi_arg_out value) noexcept override + HRESULT __stdcall get_NistP224(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NistP224()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NistP224()); return S_OK; } catch (...) @@ -956,11 +1024,12 @@ struct produce } } - HRESULT __stdcall get_NistP256(abi_arg_out value) noexcept override + HRESULT __stdcall get_NistP256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NistP256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NistP256()); return S_OK; } catch (...) @@ -970,11 +1039,12 @@ struct produce } } - HRESULT __stdcall get_NistP384(abi_arg_out value) noexcept override + HRESULT __stdcall get_NistP384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NistP384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NistP384()); return S_OK; } catch (...) @@ -984,11 +1054,12 @@ struct produce } } - HRESULT __stdcall get_NistP521(abi_arg_out value) noexcept override + HRESULT __stdcall get_NistP521(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NistP521()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NistP521()); return S_OK; } catch (...) @@ -998,11 +1069,12 @@ struct produce } } - HRESULT __stdcall get_NumsP256t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumsP256t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumsP256t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumsP256t1()); return S_OK; } catch (...) @@ -1012,11 +1084,12 @@ struct produce } } - HRESULT __stdcall get_NumsP384t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumsP384t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumsP384t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumsP384t1()); return S_OK; } catch (...) @@ -1026,11 +1099,12 @@ struct produce } } - HRESULT __stdcall get_NumsP512t1(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumsP512t1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumsP512t1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumsP512t1()); return S_OK; } catch (...) @@ -1040,11 +1114,12 @@ struct produce } } - HRESULT __stdcall get_SecP160k1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP160k1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP160k1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP160k1()); return S_OK; } catch (...) @@ -1054,11 +1129,12 @@ struct produce } } - HRESULT __stdcall get_SecP160r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP160r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP160r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP160r1()); return S_OK; } catch (...) @@ -1068,11 +1144,12 @@ struct produce } } - HRESULT __stdcall get_SecP160r2(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP160r2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP160r2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP160r2()); return S_OK; } catch (...) @@ -1082,11 +1159,12 @@ struct produce } } - HRESULT __stdcall get_SecP192k1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP192k1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP192k1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP192k1()); return S_OK; } catch (...) @@ -1096,11 +1174,12 @@ struct produce } } - HRESULT __stdcall get_SecP192r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP192r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP192r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP192r1()); return S_OK; } catch (...) @@ -1110,11 +1189,12 @@ struct produce } } - HRESULT __stdcall get_SecP224k1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP224k1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP224k1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP224k1()); return S_OK; } catch (...) @@ -1124,11 +1204,12 @@ struct produce } } - HRESULT __stdcall get_SecP224r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP224r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP224r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP224r1()); return S_OK; } catch (...) @@ -1138,11 +1219,12 @@ struct produce } } - HRESULT __stdcall get_SecP256k1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP256k1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP256k1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP256k1()); return S_OK; } catch (...) @@ -1152,11 +1234,12 @@ struct produce } } - HRESULT __stdcall get_SecP256r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP256r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP256r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP256r1()); return S_OK; } catch (...) @@ -1166,11 +1249,12 @@ struct produce } } - HRESULT __stdcall get_SecP384r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP384r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP384r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP384r1()); return S_OK; } catch (...) @@ -1180,11 +1264,12 @@ struct produce } } - HRESULT __stdcall get_SecP521r1(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecP521r1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecP521r1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecP521r1()); return S_OK; } catch (...) @@ -1194,11 +1279,12 @@ struct produce } } - HRESULT __stdcall get_Wtls7(abi_arg_out value) noexcept override + HRESULT __stdcall get_Wtls7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wtls7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wtls7()); return S_OK; } catch (...) @@ -1208,11 +1294,12 @@ struct produce } } - HRESULT __stdcall get_Wtls9(abi_arg_out value) noexcept override + HRESULT __stdcall get_Wtls9(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wtls9()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wtls9()); return S_OK; } catch (...) @@ -1222,11 +1309,12 @@ struct produce } } - HRESULT __stdcall get_Wtls12(abi_arg_out value) noexcept override + HRESULT __stdcall get_Wtls12(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wtls12()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wtls12()); return S_OK; } catch (...) @@ -1236,11 +1324,12 @@ struct produce } } - HRESULT __stdcall get_X962P192v1(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P192v1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P192v1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P192v1()); return S_OK; } catch (...) @@ -1250,11 +1339,12 @@ struct produce } } - HRESULT __stdcall get_X962P192v2(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P192v2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P192v2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P192v2()); return S_OK; } catch (...) @@ -1264,11 +1354,12 @@ struct produce } } - HRESULT __stdcall get_X962P192v3(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P192v3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P192v3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P192v3()); return S_OK; } catch (...) @@ -1278,11 +1369,12 @@ struct produce } } - HRESULT __stdcall get_X962P239v1(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P239v1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P239v1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P239v1()); return S_OK; } catch (...) @@ -1292,11 +1384,12 @@ struct produce } } - HRESULT __stdcall get_X962P239v2(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P239v2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P239v2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P239v2()); return S_OK; } catch (...) @@ -1306,11 +1399,12 @@ struct produce } } - HRESULT __stdcall get_X962P239v3(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P239v3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P239v3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P239v3()); return S_OK; } catch (...) @@ -1320,11 +1414,12 @@ struct produce } } - HRESULT __stdcall get_X962P256v1(abi_arg_out value) noexcept override + HRESULT __stdcall get_X962P256v1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().X962P256v1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X962P256v1()); return S_OK; } catch (...) @@ -1334,11 +1429,12 @@ struct produce } } - HRESULT __stdcall get_AllEccCurveNames(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AllEccCurveNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllEccCurveNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllEccCurveNames()); return S_OK; } catch (...) @@ -1352,11 +1448,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_EncryptedData(abi_arg_out value) noexcept override + HRESULT __stdcall get_EncryptedData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncryptedData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncryptedData()); return S_OK; } catch (...) @@ -1366,11 +1463,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthenticationTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthenticationTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationTag()); return S_OK; } catch (...) @@ -1384,11 +1482,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Md5(abi_arg_out value) noexcept override + HRESULT __stdcall get_Md5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Md5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Md5()); return S_OK; } catch (...) @@ -1398,11 +1497,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sha1()); return S_OK; } catch (...) @@ -1412,11 +1512,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sha256()); return S_OK; } catch (...) @@ -1426,11 +1527,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sha384()); return S_OK; } catch (...) @@ -1440,11 +1542,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sha512()); return S_OK; } catch (...) @@ -1458,11 +1561,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlgorithmName()); return S_OK; } catch (...) @@ -1476,7 +1580,8 @@ struct produce { try { - *value = detach(this->shim().HashLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HashLength()); return S_OK; } catch (...) @@ -1485,11 +1590,12 @@ struct produce } } - HRESULT __stdcall abi_HashData(abi_arg_in data, abi_arg_out value) noexcept override + HRESULT __stdcall abi_HashData(impl::abi_arg_in data, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HashData(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HashData(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -1499,11 +1605,12 @@ struct produce } } - HRESULT __stdcall abi_CreateHash(abi_arg_out Value) noexcept override + HRESULT __stdcall abi_CreateHash(impl::abi_arg_out Value) noexcept override { try { - *Value = detach(this->shim().CreateHash()); + typename D::abi_guard guard(this->shim()); + *Value = detach_abi(this->shim().CreateHash()); return S_OK; } catch (...) @@ -1517,11 +1624,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_OpenAlgorithm(abi_arg_in algorithm, abi_arg_out provider) noexcept override + HRESULT __stdcall abi_OpenAlgorithm(impl::abi_arg_in algorithm, impl::abi_arg_out provider) noexcept override { try { - *provider = detach(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); + typename D::abi_guard guard(this->shim()); + *provider = detach_abi(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); return S_OK; } catch (...) @@ -1535,10 +1643,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Append(abi_arg_in data) noexcept override + HRESULT __stdcall abi_Append(impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Append(*reinterpret_cast(&data)); return S_OK; } @@ -1548,11 +1657,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetValueAndReset(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetValueAndReset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetValueAndReset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetValueAndReset()); return S_OK; } catch (...) @@ -1566,11 +1676,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Pbkdf2Md5(abi_arg_out value) noexcept override + HRESULT __stdcall get_Pbkdf2Md5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pbkdf2Md5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pbkdf2Md5()); return S_OK; } catch (...) @@ -1580,11 +1691,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pbkdf2Sha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pbkdf2Sha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pbkdf2Sha1()); return S_OK; } catch (...) @@ -1594,11 +1706,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pbkdf2Sha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pbkdf2Sha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pbkdf2Sha256()); return S_OK; } catch (...) @@ -1608,11 +1721,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pbkdf2Sha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pbkdf2Sha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pbkdf2Sha384()); return S_OK; } catch (...) @@ -1622,11 +1736,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Pbkdf2Sha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pbkdf2Sha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pbkdf2Sha512()); return S_OK; } catch (...) @@ -1636,11 +1751,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp800108CtrHmacMd5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp800108CtrHmacMd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp800108CtrHmacMd5()); return S_OK; } catch (...) @@ -1650,11 +1766,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp800108CtrHmacSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp800108CtrHmacSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp800108CtrHmacSha1()); return S_OK; } catch (...) @@ -1664,11 +1781,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp800108CtrHmacSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp800108CtrHmacSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp800108CtrHmacSha256()); return S_OK; } catch (...) @@ -1678,11 +1796,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp800108CtrHmacSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp800108CtrHmacSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp800108CtrHmacSha384()); return S_OK; } catch (...) @@ -1692,11 +1811,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp800108CtrHmacSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp800108CtrHmacSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp800108CtrHmacSha512()); return S_OK; } catch (...) @@ -1706,11 +1826,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp80056aConcatMd5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp80056aConcatMd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp80056aConcatMd5()); return S_OK; } catch (...) @@ -1720,11 +1841,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp80056aConcatSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp80056aConcatSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp80056aConcatSha1()); return S_OK; } catch (...) @@ -1734,11 +1856,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp80056aConcatSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp80056aConcatSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp80056aConcatSha256()); return S_OK; } catch (...) @@ -1748,11 +1871,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp80056aConcatSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp80056aConcatSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp80056aConcatSha384()); return S_OK; } catch (...) @@ -1762,11 +1886,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Sp80056aConcatSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Sp80056aConcatSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sp80056aConcatSha512()); return S_OK; } catch (...) @@ -1780,11 +1905,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CapiKdfMd5(abi_arg_out value) noexcept override + HRESULT __stdcall get_CapiKdfMd5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapiKdfMd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapiKdfMd5()); return S_OK; } catch (...) @@ -1794,11 +1920,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CapiKdfSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapiKdfSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapiKdfSha1()); return S_OK; } catch (...) @@ -1808,11 +1935,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CapiKdfSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapiKdfSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapiKdfSha256()); return S_OK; } catch (...) @@ -1822,11 +1950,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CapiKdfSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapiKdfSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapiKdfSha384()); return S_OK; } catch (...) @@ -1836,11 +1965,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CapiKdfSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CapiKdfSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CapiKdfSha512()); return S_OK; } catch (...) @@ -1854,11 +1984,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlgorithmName()); return S_OK; } catch (...) @@ -1868,11 +1999,12 @@ struct produce keyMaterial, abi_arg_out key) noexcept override + HRESULT __stdcall abi_CreateKey(impl::abi_arg_in keyMaterial, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().CreateKey(*reinterpret_cast(&keyMaterial))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().CreateKey(*reinterpret_cast(&keyMaterial))); return S_OK; } catch (...) @@ -1886,11 +2018,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_OpenAlgorithm(abi_arg_in algorithm, abi_arg_out provider) noexcept override + HRESULT __stdcall abi_OpenAlgorithm(impl::abi_arg_in algorithm, impl::abi_arg_out provider) noexcept override { try { - *provider = detach(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); + typename D::abi_guard guard(this->shim()); + *provider = detach_abi(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); return S_OK; } catch (...) @@ -1904,11 +2037,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_KdfGenericBinary(abi_arg_out value) noexcept override + HRESULT __stdcall get_KdfGenericBinary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KdfGenericBinary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KdfGenericBinary()); return S_OK; } catch (...) @@ -1918,10 +2052,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_KdfGenericBinary(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().KdfGenericBinary(*reinterpret_cast(&value)); return S_OK; } @@ -1935,7 +2070,8 @@ struct produceshim().IterationCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IterationCount()); return S_OK; } catch (...) @@ -1952,7 +2088,8 @@ struct produceshim().Capi1KdfTargetAlgorithm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capi1KdfTargetAlgorithm()); return S_OK; } catch (...) @@ -1965,6 +2102,7 @@ struct produceshim()); this->shim().Capi1KdfTargetAlgorithm(value); return S_OK; } @@ -1978,11 +2116,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_BuildForPbkdf2(abi_arg_in pbkdf2Salt, uint32_t iterationCount, abi_arg_out value) noexcept override + HRESULT __stdcall abi_BuildForPbkdf2(impl::abi_arg_in pbkdf2Salt, uint32_t iterationCount, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildForPbkdf2(*reinterpret_cast(&pbkdf2Salt), iterationCount)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildForPbkdf2(*reinterpret_cast(&pbkdf2Salt), iterationCount)); return S_OK; } catch (...) @@ -1992,11 +2131,12 @@ struct produce label, abi_arg_in context, abi_arg_out value) noexcept override + HRESULT __stdcall abi_BuildForSP800108(impl::abi_arg_in label, impl::abi_arg_in context, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildForSP800108(*reinterpret_cast(&label), *reinterpret_cast(&context))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildForSP800108(*reinterpret_cast(&label), *reinterpret_cast(&context))); return S_OK; } catch (...) @@ -2006,11 +2146,12 @@ struct produce algorithmId, abi_arg_in partyUInfo, abi_arg_in partyVInfo, abi_arg_in suppPubInfo, abi_arg_in suppPrivInfo, abi_arg_out value) noexcept override + HRESULT __stdcall abi_BuildForSP80056a(impl::abi_arg_in algorithmId, impl::abi_arg_in partyUInfo, impl::abi_arg_in partyVInfo, impl::abi_arg_in suppPubInfo, impl::abi_arg_in suppPrivInfo, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildForSP80056a(*reinterpret_cast(&algorithmId), *reinterpret_cast(&partyUInfo), *reinterpret_cast(&partyVInfo), *reinterpret_cast(&suppPubInfo), *reinterpret_cast(&suppPrivInfo))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildForSP80056a(*reinterpret_cast(&algorithmId), *reinterpret_cast(&partyUInfo), *reinterpret_cast(&partyVInfo), *reinterpret_cast(&suppPubInfo), *reinterpret_cast(&suppPrivInfo))); return S_OK; } catch (...) @@ -2024,11 +2165,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_BuildForCapi1Kdf(Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm capi1KdfTargetAlgorithm, abi_arg_out value) noexcept override + HRESULT __stdcall abi_BuildForCapi1Kdf(Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm capi1KdfTargetAlgorithm, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildForCapi1Kdf(capi1KdfTargetAlgorithm)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildForCapi1Kdf(capi1KdfTargetAlgorithm)); return S_OK; } catch (...) @@ -2042,11 +2184,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_HmacMd5(abi_arg_out value) noexcept override + HRESULT __stdcall get_HmacMd5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HmacMd5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HmacMd5()); return S_OK; } catch (...) @@ -2056,11 +2199,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HmacSha1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HmacSha1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HmacSha1()); return S_OK; } catch (...) @@ -2070,11 +2214,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HmacSha256(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HmacSha256()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HmacSha256()); return S_OK; } catch (...) @@ -2084,11 +2229,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HmacSha384(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HmacSha384()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HmacSha384()); return S_OK; } catch (...) @@ -2098,11 +2244,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HmacSha512(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HmacSha512()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HmacSha512()); return S_OK; } catch (...) @@ -2112,11 +2259,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesCmac(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesCmac()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesCmac()); return S_OK; } catch (...) @@ -2130,11 +2278,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlgorithmName()); return S_OK; } catch (...) @@ -2148,7 +2297,8 @@ struct produce { try { - *value = detach(this->shim().MacLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MacLength()); return S_OK; } catch (...) @@ -2157,11 +2307,12 @@ struct produce } } - HRESULT __stdcall abi_CreateKey(abi_arg_in keyMaterial, abi_arg_out macKey) noexcept override + HRESULT __stdcall abi_CreateKey(impl::abi_arg_in keyMaterial, impl::abi_arg_out macKey) noexcept override { try { - *macKey = detach(this->shim().CreateKey(*reinterpret_cast(&keyMaterial))); + typename D::abi_guard guard(this->shim()); + *macKey = detach_abi(this->shim().CreateKey(*reinterpret_cast(&keyMaterial))); return S_OK; } catch (...) @@ -2175,11 +2326,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateHash(abi_arg_in keyMaterial, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateHash(impl::abi_arg_in keyMaterial, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateHash(*reinterpret_cast(&keyMaterial))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateHash(*reinterpret_cast(&keyMaterial))); return S_OK; } catch (...) @@ -2193,11 +2345,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_OpenAlgorithm(abi_arg_in algorithm, abi_arg_out provider) noexcept override + HRESULT __stdcall abi_OpenAlgorithm(impl::abi_arg_in algorithm, impl::abi_arg_out provider) noexcept override { try { - *provider = detach(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); + typename D::abi_guard guard(this->shim()); + *provider = detach_abi(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); return S_OK; } catch (...) @@ -2211,11 +2364,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_OpenKeyPairFromCertificateAsync(abi_arg_in certificate, abi_arg_in hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenKeyPairFromCertificateAsync(impl::abi_arg_in certificate, impl::abi_arg_in hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenKeyPairFromCertificateAsync(*reinterpret_cast(&certificate), *reinterpret_cast(&hashAlgorithmName), padding)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenKeyPairFromCertificateAsync(*reinterpret_cast(&certificate), *reinterpret_cast(&hashAlgorithmName), padding)); return S_OK; } catch (...) @@ -2225,11 +2379,12 @@ struct produce certificate, abi_arg_in hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding, abi_arg_out key) noexcept override + HRESULT __stdcall abi_OpenPublicKeyFromCertificate(impl::abi_arg_in certificate, impl::abi_arg_in hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().OpenPublicKeyFromCertificate(*reinterpret_cast(&certificate), *reinterpret_cast(&hashAlgorithmName), padding)); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().OpenPublicKeyFromCertificate(*reinterpret_cast(&certificate), *reinterpret_cast(&hashAlgorithmName), padding)); return S_OK; } catch (...) @@ -2243,11 +2398,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DesCbc(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesCbc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesCbc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesCbc()); return S_OK; } catch (...) @@ -2257,11 +2413,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DesEcb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesEcb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesEcb()); return S_OK; } catch (...) @@ -2271,11 +2428,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TripleDesCbc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TripleDesCbc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TripleDesCbc()); return S_OK; } catch (...) @@ -2285,11 +2443,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TripleDesEcb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TripleDesEcb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TripleDesEcb()); return S_OK; } catch (...) @@ -2299,11 +2458,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rc2Cbc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rc2Cbc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rc2Cbc()); return S_OK; } catch (...) @@ -2313,11 +2473,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rc2Ecb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rc2Ecb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rc2Ecb()); return S_OK; } catch (...) @@ -2327,11 +2488,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesCbc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesCbc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesCbc()); return S_OK; } catch (...) @@ -2341,11 +2503,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesEcb(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesEcb()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesEcb()); return S_OK; } catch (...) @@ -2355,11 +2518,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesGcm(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesGcm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesGcm()); return S_OK; } catch (...) @@ -2369,11 +2533,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesCcm(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesCcm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesCcm()); return S_OK; } catch (...) @@ -2383,11 +2548,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesCbcPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesCbcPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesCbcPkcs7()); return S_OK; } catch (...) @@ -2397,11 +2563,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AesEcbPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AesEcbPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AesEcbPkcs7()); return S_OK; } catch (...) @@ -2411,11 +2578,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DesCbcPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesCbcPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesCbcPkcs7()); return S_OK; } catch (...) @@ -2425,11 +2593,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DesEcbPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesEcbPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesEcbPkcs7()); return S_OK; } catch (...) @@ -2439,11 +2608,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TripleDesCbcPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TripleDesCbcPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TripleDesCbcPkcs7()); return S_OK; } catch (...) @@ -2453,11 +2623,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TripleDesEcbPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TripleDesEcbPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TripleDesEcbPkcs7()); return S_OK; } catch (...) @@ -2467,11 +2638,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rc2CbcPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rc2CbcPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rc2CbcPkcs7()); return S_OK; } catch (...) @@ -2481,11 +2653,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rc2EcbPkcs7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rc2EcbPkcs7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rc2EcbPkcs7()); return S_OK; } catch (...) @@ -2495,11 +2668,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Rc4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rc4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rc4()); return S_OK; } catch (...) @@ -2513,11 +2687,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AlgorithmName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlgorithmName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlgorithmName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlgorithmName()); return S_OK; } catch (...) @@ -2531,7 +2706,8 @@ struct produceshim().BlockLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlockLength()); return S_OK; } catch (...) @@ -2540,11 +2716,12 @@ struct produce keyMaterial, abi_arg_out key) noexcept override + HRESULT __stdcall abi_CreateSymmetricKey(impl::abi_arg_in keyMaterial, impl::abi_arg_out key) noexcept override { try { - *key = detach(this->shim().CreateSymmetricKey(*reinterpret_cast(&keyMaterial))); + typename D::abi_guard guard(this->shim()); + *key = detach_abi(this->shim().CreateSymmetricKey(*reinterpret_cast(&keyMaterial))); return S_OK; } catch (...) @@ -2558,11 +2735,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_OpenAlgorithm(abi_arg_in algorithm, abi_arg_out provider) noexcept override + HRESULT __stdcall abi_OpenAlgorithm(impl::abi_arg_in algorithm, impl::abi_arg_out provider) noexcept override { try { - *provider = detach(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); + typename D::abi_guard guard(this->shim()); + *provider = detach_abi(this->shim().OpenAlgorithm(*reinterpret_cast(&algorithm))); return S_OK; } catch (...) @@ -2580,1219 +2758,1219 @@ namespace Windows::Security::Cryptography::Core { template Windows::Storage::Streams::IBuffer impl_IKeyDerivationParameters::KdfGenericBinary() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_KdfGenericBinary(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParameters)->get_KdfGenericBinary(put_abi(value))); return value; } template void impl_IKeyDerivationParameters::KdfGenericBinary(const Windows::Storage::Streams::IBuffer & value) const { - check_hresult(static_cast(static_cast(*this))->put_KdfGenericBinary(get(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParameters)->put_KdfGenericBinary(get_abi(value))); } template uint32_t impl_IKeyDerivationParameters::IterationCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IterationCount(&value)); + check_hresult(WINRT_SHIM(IKeyDerivationParameters)->get_IterationCount(&value)); return value; } template Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm impl_IKeyDerivationParameters2::Capi1KdfTargetAlgorithm() const { Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm value {}; - check_hresult(static_cast(static_cast(*this))->get_Capi1KdfTargetAlgorithm(&value)); + check_hresult(WINRT_SHIM(IKeyDerivationParameters2)->get_Capi1KdfTargetAlgorithm(&value)); return value; } template void impl_IKeyDerivationParameters2::Capi1KdfTargetAlgorithm(Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm value) const { - check_hresult(static_cast(static_cast(*this))->put_Capi1KdfTargetAlgorithm(value)); + check_hresult(WINRT_SHIM(IKeyDerivationParameters2)->put_Capi1KdfTargetAlgorithm(value)); } template Windows::Security::Cryptography::Core::KeyDerivationParameters impl_IKeyDerivationParametersStatics::BuildForPbkdf2(const Windows::Storage::Streams::IBuffer & pbkdf2Salt, uint32_t iterationCount) const { Windows::Security::Cryptography::Core::KeyDerivationParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_BuildForPbkdf2(get(pbkdf2Salt), iterationCount, put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParametersStatics)->abi_BuildForPbkdf2(get_abi(pbkdf2Salt), iterationCount, put_abi(value))); return value; } template Windows::Security::Cryptography::Core::KeyDerivationParameters impl_IKeyDerivationParametersStatics::BuildForSP800108(const Windows::Storage::Streams::IBuffer & label, const Windows::Storage::Streams::IBuffer & context) const { Windows::Security::Cryptography::Core::KeyDerivationParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_BuildForSP800108(get(label), get(context), put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParametersStatics)->abi_BuildForSP800108(get_abi(label), get_abi(context), put_abi(value))); return value; } template Windows::Security::Cryptography::Core::KeyDerivationParameters impl_IKeyDerivationParametersStatics::BuildForSP80056a(const Windows::Storage::Streams::IBuffer & algorithmId, const Windows::Storage::Streams::IBuffer & partyUInfo, const Windows::Storage::Streams::IBuffer & partyVInfo, const Windows::Storage::Streams::IBuffer & suppPubInfo, const Windows::Storage::Streams::IBuffer & suppPrivInfo) const { Windows::Security::Cryptography::Core::KeyDerivationParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_BuildForSP80056a(get(algorithmId), get(partyUInfo), get(partyVInfo), get(suppPubInfo), get(suppPrivInfo), put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParametersStatics)->abi_BuildForSP80056a(get_abi(algorithmId), get_abi(partyUInfo), get_abi(partyVInfo), get_abi(suppPubInfo), get_abi(suppPrivInfo), put_abi(value))); return value; } template Windows::Security::Cryptography::Core::KeyDerivationParameters impl_IKeyDerivationParametersStatics2::BuildForCapi1Kdf(Windows::Security::Cryptography::Core::Capi1KdfTargetAlgorithm capi1KdfTargetAlgorithm) const { Windows::Security::Cryptography::Core::KeyDerivationParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_BuildForCapi1Kdf(capi1KdfTargetAlgorithm, put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationParametersStatics2)->abi_BuildForCapi1Kdf(capi1KdfTargetAlgorithm, put_abi(value))); return value; } template uint32_t impl_ICryptographicKey::KeySize() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KeySize(&value)); + check_hresult(WINRT_SHIM(ICryptographicKey)->get_KeySize(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicKey::Export() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_ExportDefaultPrivateKeyBlobType(put(value))); + check_hresult(WINRT_SHIM(ICryptographicKey)->abi_ExportDefaultPrivateKeyBlobType(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicKey::Export(Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_ExportPrivateKeyWithBlobType(BlobType, put(value))); + check_hresult(WINRT_SHIM(ICryptographicKey)->abi_ExportPrivateKeyWithBlobType(BlobType, put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicKey::ExportPublicKey() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_ExportDefaultPublicKeyBlobType(put(value))); + check_hresult(WINRT_SHIM(ICryptographicKey)->abi_ExportDefaultPublicKeyBlobType(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicKey::ExportPublicKey(Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_ExportPublicKeyWithBlobType(BlobType, put(value))); + check_hresult(WINRT_SHIM(ICryptographicKey)->abi_ExportPublicKeyWithBlobType(BlobType, put_abi(value))); return value; } template void impl_IHashComputation::Append(const Windows::Storage::Streams::IBuffer & data) const { - check_hresult(static_cast(static_cast(*this))->abi_Append(get(data))); + check_hresult(WINRT_SHIM(IHashComputation)->abi_Append(get_abi(data))); } template Windows::Storage::Streams::IBuffer impl_IHashComputation::GetValueAndReset() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_GetValueAndReset(put(value))); + check_hresult(WINRT_SHIM(IHashComputation)->abi_GetValueAndReset(put_abi(value))); return value; } template hstring impl_IHashAlgorithmProvider::AlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlgorithmName(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmProvider)->get_AlgorithmName(put_abi(value))); return value; } template uint32_t impl_IHashAlgorithmProvider::HashLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HashLength(&value)); + check_hresult(WINRT_SHIM(IHashAlgorithmProvider)->get_HashLength(&value)); return value; } template Windows::Storage::Streams::IBuffer impl_IHashAlgorithmProvider::HashData(const Windows::Storage::Streams::IBuffer & data) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_HashData(get(data), put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmProvider)->abi_HashData(get_abi(data), put_abi(value))); return value; } template Windows::Security::Cryptography::Core::CryptographicHash impl_IHashAlgorithmProvider::CreateHash() const { Windows::Security::Cryptography::Core::CryptographicHash Value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateHash(put(Value))); + check_hresult(WINRT_SHIM(IHashAlgorithmProvider)->abi_CreateHash(put_abi(Value))); return Value; } template hstring impl_IMacAlgorithmProvider::AlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlgorithmName(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmProvider)->get_AlgorithmName(put_abi(value))); return value; } template uint32_t impl_IMacAlgorithmProvider::MacLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MacLength(&value)); + check_hresult(WINRT_SHIM(IMacAlgorithmProvider)->get_MacLength(&value)); return value; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IMacAlgorithmProvider::CreateKey(const Windows::Storage::Streams::IBuffer & keyMaterial) const { Windows::Security::Cryptography::Core::CryptographicKey macKey { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateKey(get(keyMaterial), put(macKey))); + check_hresult(WINRT_SHIM(IMacAlgorithmProvider)->abi_CreateKey(get_abi(keyMaterial), put_abi(macKey))); return macKey; } template Windows::Security::Cryptography::Core::CryptographicHash impl_IMacAlgorithmProvider2::CreateHash(const Windows::Storage::Streams::IBuffer & keyMaterial) const { Windows::Security::Cryptography::Core::CryptographicHash value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateHash(get(keyMaterial), put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmProvider2)->abi_CreateHash(get_abi(keyMaterial), put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmProvider::AlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlgorithmName(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmProvider)->get_AlgorithmName(put_abi(value))); return value; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IKeyDerivationAlgorithmProvider::CreateKey(const Windows::Storage::Streams::IBuffer & keyMaterial) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateKey(get(keyMaterial), put(key))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmProvider)->abi_CreateKey(get_abi(keyMaterial), put_abi(key))); return key; } template hstring impl_ISymmetricKeyAlgorithmProvider::AlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlgorithmName(put(value))); + check_hresult(WINRT_SHIM(ISymmetricKeyAlgorithmProvider)->get_AlgorithmName(put_abi(value))); return value; } template uint32_t impl_ISymmetricKeyAlgorithmProvider::BlockLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BlockLength(&value)); + check_hresult(WINRT_SHIM(ISymmetricKeyAlgorithmProvider)->get_BlockLength(&value)); return value; } template Windows::Security::Cryptography::Core::CryptographicKey impl_ISymmetricKeyAlgorithmProvider::CreateSymmetricKey(const Windows::Storage::Streams::IBuffer & keyMaterial) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSymmetricKey(get(keyMaterial), put(key))); + check_hresult(WINRT_SHIM(ISymmetricKeyAlgorithmProvider)->abi_CreateSymmetricKey(get_abi(keyMaterial), put_abi(key))); return key; } template hstring impl_IAsymmetricKeyAlgorithmProvider::AlgorithmName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlgorithmName(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->get_AlgorithmName(put_abi(value))); return value; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider::CreateKeyPair(uint32_t keySize) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateKeyPair(keySize, put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->abi_CreateKeyPair(keySize, put_abi(key))); return key; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider::ImportKeyPair(const Windows::Storage::Streams::IBuffer & keyBlob) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ImportDefaultPrivateKeyBlob(get(keyBlob), put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->abi_ImportDefaultPrivateKeyBlob(get_abi(keyBlob), put_abi(key))); return key; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider::ImportKeyPair(const Windows::Storage::Streams::IBuffer & keyBlob, Windows::Security::Cryptography::Core::CryptographicPrivateKeyBlobType BlobType) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ImportKeyPairWithBlobType(get(keyBlob), BlobType, put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->abi_ImportKeyPairWithBlobType(get_abi(keyBlob), BlobType, put_abi(key))); return key; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider::ImportPublicKey(const Windows::Storage::Streams::IBuffer & keyBlob) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ImportDefaultPublicKeyBlob(get(keyBlob), put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->abi_ImportDefaultPublicKeyBlob(get_abi(keyBlob), put_abi(key))); return key; } template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider::ImportPublicKey(const Windows::Storage::Streams::IBuffer & keyBlob, Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType BlobType) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ImportPublicKeyWithBlobType(get(keyBlob), BlobType, put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider)->abi_ImportPublicKeyWithBlobType(get_abi(keyBlob), BlobType, put_abi(key))); return key; } -template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider2::CreateKeyPairWithCurveName(hstring_ref curveName) const +template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider2::CreateKeyPairWithCurveName(hstring_view curveName) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateKeyPairWithCurveName(get(curveName), put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider2)->abi_CreateKeyPairWithCurveName(get_abi(curveName), put_abi(key))); return key; } -template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider2::CreateKeyPairWithCurveParameters(array_ref parameters) const +template Windows::Security::Cryptography::Core::CryptographicKey impl_IAsymmetricKeyAlgorithmProvider2::CreateKeyPairWithCurveParameters(array_view parameters) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateKeyPairWithCurveParameters(parameters.size(), get(parameters), put(key))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProvider2)->abi_CreateKeyPairWithCurveParameters(parameters.size(), get_abi(parameters), put_abi(key))); return key; } -template Windows::Foundation::IAsyncOperation impl_IPersistedKeyProviderStatics::OpenKeyPairFromCertificateAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_ref hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) const +template Windows::Foundation::IAsyncOperation impl_IPersistedKeyProviderStatics::OpenKeyPairFromCertificateAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_view hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenKeyPairFromCertificateAsync(get(certificate), get(hashAlgorithmName), padding, put(operation))); + check_hresult(WINRT_SHIM(IPersistedKeyProviderStatics)->abi_OpenKeyPairFromCertificateAsync(get_abi(certificate), get_abi(hashAlgorithmName), padding, put_abi(operation))); return operation; } -template Windows::Security::Cryptography::Core::CryptographicKey impl_IPersistedKeyProviderStatics::OpenPublicKeyFromCertificate(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_ref hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) const +template Windows::Security::Cryptography::Core::CryptographicKey impl_IPersistedKeyProviderStatics::OpenPublicKeyFromCertificate(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_view hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) const { Windows::Security::Cryptography::Core::CryptographicKey key { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenPublicKeyFromCertificate(get(certificate), get(hashAlgorithmName), padding, put(key))); + check_hresult(WINRT_SHIM(IPersistedKeyProviderStatics)->abi_OpenPublicKeyFromCertificate(get_abi(certificate), get_abi(hashAlgorithmName), padding, put_abi(key))); return key; } template Windows::Storage::Streams::IBuffer impl_IEncryptedAndAuthenticatedData::EncryptedData() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_EncryptedData(put(value))); + check_hresult(WINRT_SHIM(IEncryptedAndAuthenticatedData)->get_EncryptedData(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IEncryptedAndAuthenticatedData::AuthenticationTag() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationTag(put(value))); + check_hresult(WINRT_SHIM(IEncryptedAndAuthenticatedData)->get_AuthenticationTag(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics::Encrypt(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & iv) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_Encrypt(get(key), get(data), get(iv), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_Encrypt(get_abi(key), get_abi(data), get_abi(iv), put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics::Decrypt(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & iv) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_Decrypt(get(key), get(data), get(iv), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_Decrypt(get_abi(key), get_abi(data), get_abi(iv), put_abi(value))); return value; } template Windows::Security::Cryptography::Core::EncryptedAndAuthenticatedData impl_ICryptographicEngineStatics::EncryptAndAuthenticate(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & nonce, const Windows::Storage::Streams::IBuffer & authenticatedData) const { Windows::Security::Cryptography::Core::EncryptedAndAuthenticatedData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_EncryptAndAuthenticate(get(key), get(data), get(nonce), get(authenticatedData), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_EncryptAndAuthenticate(get_abi(key), get_abi(data), get_abi(nonce), get_abi(authenticatedData), put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics::DecryptAndAuthenticate(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & nonce, const Windows::Storage::Streams::IBuffer & authenticationTag, const Windows::Storage::Streams::IBuffer & authenticatedData) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_DecryptAndAuthenticate(get(key), get(data), get(nonce), get(authenticationTag), get(authenticatedData), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_DecryptAndAuthenticate(get_abi(key), get_abi(data), get_abi(nonce), get_abi(authenticationTag), get_abi(authenticatedData), put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics::Sign(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_Sign(get(key), get(data), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_Sign(get_abi(key), get_abi(data), put_abi(value))); return value; } template bool impl_ICryptographicEngineStatics::VerifySignature(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & signature) const { bool isAuthenticated {}; - check_hresult(static_cast(static_cast(*this))->abi_VerifySignature(get(key), get(data), get(signature), &isAuthenticated)); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_VerifySignature(get_abi(key), get_abi(data), get_abi(signature), &isAuthenticated)); return isAuthenticated; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics::DeriveKeyMaterial(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Security::Cryptography::Core::KeyDerivationParameters & parameters, uint32_t desiredKeySize) const { Windows::Storage::Streams::IBuffer keyMaterial; - check_hresult(static_cast(static_cast(*this))->abi_DeriveKeyMaterial(get(key), get(parameters), desiredKeySize, put(keyMaterial))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics)->abi_DeriveKeyMaterial(get_abi(key), get_abi(parameters), desiredKeySize, put_abi(keyMaterial))); return keyMaterial; } template Windows::Storage::Streams::IBuffer impl_ICryptographicEngineStatics2::SignHashedData(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data) const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->abi_SignHashedData(get(key), get(data), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics2)->abi_SignHashedData(get_abi(key), get_abi(data), put_abi(value))); return value; } template bool impl_ICryptographicEngineStatics2::VerifySignatureWithHashInput(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & signature) const { bool isAuthenticated {}; - check_hresult(static_cast(static_cast(*this))->abi_VerifySignatureWithHashInput(get(key), get(data), get(signature), &isAuthenticated)); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics2)->abi_VerifySignatureWithHashInput(get_abi(key), get_abi(data), get_abi(signature), &isAuthenticated)); return isAuthenticated; } template Windows::Foundation::IAsyncOperation impl_ICryptographicEngineStatics2::DecryptAsync(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data, const Windows::Storage::Streams::IBuffer & iv) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_DecryptAsync(get(key), get(data), get(iv), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics2)->abi_DecryptAsync(get_abi(key), get_abi(data), get_abi(iv), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICryptographicEngineStatics2::SignAsync(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_SignAsync(get(key), get(data), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics2)->abi_SignAsync(get_abi(key), get_abi(data), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ICryptographicEngineStatics2::SignHashedDataAsync(const Windows::Security::Cryptography::Core::CryptographicKey & key, const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_SignHashedDataAsync(get(key), get(data), put(value))); + check_hresult(WINRT_SHIM(ICryptographicEngineStatics2)->abi_SignHashedDataAsync(get_abi(key), get_abi(data), put_abi(value))); return value; } -template Windows::Security::Cryptography::Core::HashAlgorithmProvider impl_IHashAlgorithmProviderStatics::OpenAlgorithm(hstring_ref algorithm) const +template Windows::Security::Cryptography::Core::HashAlgorithmProvider impl_IHashAlgorithmProviderStatics::OpenAlgorithm(hstring_view algorithm) const { Windows::Security::Cryptography::Core::HashAlgorithmProvider provider { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenAlgorithm(get(algorithm), put(provider))); + check_hresult(WINRT_SHIM(IHashAlgorithmProviderStatics)->abi_OpenAlgorithm(get_abi(algorithm), put_abi(provider))); return provider; } -template Windows::Security::Cryptography::Core::MacAlgorithmProvider impl_IMacAlgorithmProviderStatics::OpenAlgorithm(hstring_ref algorithm) const +template Windows::Security::Cryptography::Core::MacAlgorithmProvider impl_IMacAlgorithmProviderStatics::OpenAlgorithm(hstring_view algorithm) const { Windows::Security::Cryptography::Core::MacAlgorithmProvider provider { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenAlgorithm(get(algorithm), put(provider))); + check_hresult(WINRT_SHIM(IMacAlgorithmProviderStatics)->abi_OpenAlgorithm(get_abi(algorithm), put_abi(provider))); return provider; } -template Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider impl_IKeyDerivationAlgorithmProviderStatics::OpenAlgorithm(hstring_ref algorithm) const +template Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider impl_IKeyDerivationAlgorithmProviderStatics::OpenAlgorithm(hstring_view algorithm) const { Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider provider { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenAlgorithm(get(algorithm), put(provider))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmProviderStatics)->abi_OpenAlgorithm(get_abi(algorithm), put_abi(provider))); return provider; } -template Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider impl_ISymmetricKeyAlgorithmProviderStatics::OpenAlgorithm(hstring_ref algorithm) const +template Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider impl_ISymmetricKeyAlgorithmProviderStatics::OpenAlgorithm(hstring_view algorithm) const { Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider provider { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenAlgorithm(get(algorithm), put(provider))); + check_hresult(WINRT_SHIM(ISymmetricKeyAlgorithmProviderStatics)->abi_OpenAlgorithm(get_abi(algorithm), put_abi(provider))); return provider; } -template Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider impl_IAsymmetricKeyAlgorithmProviderStatics::OpenAlgorithm(hstring_ref algorithm) const +template Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider impl_IAsymmetricKeyAlgorithmProviderStatics::OpenAlgorithm(hstring_view algorithm) const { Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider provider { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OpenAlgorithm(get(algorithm), put(provider))); + check_hresult(WINRT_SHIM(IAsymmetricKeyAlgorithmProviderStatics)->abi_OpenAlgorithm(get_abi(algorithm), put_abi(provider))); return provider; } template hstring impl_IHashAlgorithmNamesStatics::Md5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Md5(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmNamesStatics)->get_Md5(put_abi(value))); return value; } template hstring impl_IHashAlgorithmNamesStatics::Sha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sha1(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmNamesStatics)->get_Sha1(put_abi(value))); return value; } template hstring impl_IHashAlgorithmNamesStatics::Sha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sha256(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmNamesStatics)->get_Sha256(put_abi(value))); return value; } template hstring impl_IHashAlgorithmNamesStatics::Sha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sha384(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmNamesStatics)->get_Sha384(put_abi(value))); return value; } template hstring impl_IHashAlgorithmNamesStatics::Sha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sha512(put(value))); + check_hresult(WINRT_SHIM(IHashAlgorithmNamesStatics)->get_Sha512(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::HmacMd5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HmacMd5(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_HmacMd5(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::HmacSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HmacSha1(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_HmacSha1(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::HmacSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HmacSha256(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_HmacSha256(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::HmacSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HmacSha384(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_HmacSha384(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::HmacSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HmacSha512(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_HmacSha512(put_abi(value))); return value; } template hstring impl_IMacAlgorithmNamesStatics::AesCmac() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesCmac(put(value))); + check_hresult(WINRT_SHIM(IMacAlgorithmNamesStatics)->get_AesCmac(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::DesCbc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DesCbc(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_DesCbc(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::DesEcb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DesEcb(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_DesEcb(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::TripleDesCbc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TripleDesCbc(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_TripleDesCbc(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::TripleDesEcb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TripleDesEcb(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_TripleDesEcb(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::Rc2Cbc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rc2Cbc(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_Rc2Cbc(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::Rc2Ecb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rc2Ecb(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_Rc2Ecb(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesCbc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesCbc(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesCbc(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesEcb() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesEcb(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesEcb(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesGcm() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesGcm(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesGcm(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesCcm() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesCcm(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesCcm(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesCbcPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesCbcPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesCbcPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::AesEcbPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AesEcbPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_AesEcbPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::DesCbcPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DesCbcPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_DesCbcPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::DesEcbPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DesEcbPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_DesEcbPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::TripleDesCbcPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TripleDesCbcPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_TripleDesCbcPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::TripleDesEcbPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TripleDesEcbPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_TripleDesEcbPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::Rc2CbcPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rc2CbcPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_Rc2CbcPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::Rc2EcbPkcs7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rc2EcbPkcs7(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_Rc2EcbPkcs7(put_abi(value))); return value; } template hstring impl_ISymmetricAlgorithmNamesStatics::Rc4() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rc4(put(value))); + check_hresult(WINRT_SHIM(ISymmetricAlgorithmNamesStatics)->get_Rc4(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaPkcs1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaPkcs1(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaPkcs1(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaOaepSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaOaepSha1(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaOaepSha1(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaOaepSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaOaepSha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaOaepSha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaOaepSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaOaepSha384(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaOaepSha384(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaOaepSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaOaepSha512(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaOaepSha512(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::EcdsaP256Sha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaP256Sha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_EcdsaP256Sha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::EcdsaP384Sha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaP384Sha384(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_EcdsaP384Sha384(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::EcdsaP521Sha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaP521Sha512(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_EcdsaP521Sha512(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::DsaSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DsaSha1(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_DsaSha1(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::DsaSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DsaSha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_DsaSha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPkcs1Sha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPkcs1Sha1(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPkcs1Sha1(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPkcs1Sha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPkcs1Sha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPkcs1Sha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPkcs1Sha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPkcs1Sha384(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPkcs1Sha384(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPkcs1Sha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPkcs1Sha512(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPkcs1Sha512(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPssSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPssSha1(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPssSha1(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPssSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPssSha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPssSha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPssSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPssSha384(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPssSha384(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics::RsaSignPssSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RsaSignPssSha512(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics)->get_RsaSignPssSha512(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics2::EcdsaSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaSha256(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics2)->get_EcdsaSha256(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics2::EcdsaSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaSha384(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics2)->get_EcdsaSha384(put_abi(value))); return value; } template hstring impl_IAsymmetricAlgorithmNamesStatics2::EcdsaSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EcdsaSha512(put(value))); + check_hresult(WINRT_SHIM(IAsymmetricAlgorithmNamesStatics2)->get_EcdsaSha512(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP160r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP160r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP160r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP160t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP160t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP160t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP192r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP192r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP192r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP192t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP192t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP192t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP224r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP224r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP224r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP224t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP224t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP224t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP256r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP256r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP256r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP256t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP256t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP256t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP320r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP320r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP320r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP320t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP320t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP320t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP384r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP384r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP384r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP384t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP384t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP384t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP512r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP512r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP512r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::BrainpoolP512t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BrainpoolP512t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_BrainpoolP512t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::Curve25519() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Curve25519(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_Curve25519(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::Ec192wapi() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Ec192wapi(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_Ec192wapi(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NistP192() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NistP192(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NistP192(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NistP224() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NistP224(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NistP224(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NistP256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NistP256(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NistP256(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NistP384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NistP384(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NistP384(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NistP521() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NistP521(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NistP521(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NumsP256t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumsP256t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NumsP256t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NumsP384t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumsP384t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NumsP384t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::NumsP512t1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NumsP512t1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_NumsP512t1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP160k1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP160k1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP160k1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP160r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP160r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP160r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP160r2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP160r2(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP160r2(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP192k1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP192k1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP192k1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP192r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP192r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP192r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP224k1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP224k1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP224k1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP224r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP224r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP224r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP256k1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP256k1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP256k1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP256r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP256r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP256r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP384r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP384r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP384r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::SecP521r1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecP521r1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_SecP521r1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::Wtls7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wtls7(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_Wtls7(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::Wtls9() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wtls9(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_Wtls9(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::Wtls12() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wtls12(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_Wtls12(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P192v1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P192v1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P192v1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P192v2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P192v2(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P192v2(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P192v3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P192v3(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P192v3(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P239v1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P239v1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P239v1(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P239v2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P239v2(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P239v2(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P239v3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P239v3(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P239v3(put_abi(value))); return value; } template hstring impl_IEccCurveNamesStatics::X962P256v1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_X962P256v1(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_X962P256v1(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IEccCurveNamesStatics::AllEccCurveNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AllEccCurveNames(put(value))); + check_hresult(WINRT_SHIM(IEccCurveNamesStatics)->get_AllEccCurveNames(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Pbkdf2Md5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pbkdf2Md5(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Pbkdf2Md5(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Pbkdf2Sha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pbkdf2Sha1(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Pbkdf2Sha1(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Pbkdf2Sha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pbkdf2Sha256(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Pbkdf2Sha256(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Pbkdf2Sha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pbkdf2Sha384(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Pbkdf2Sha384(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Pbkdf2Sha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Pbkdf2Sha512(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Pbkdf2Sha512(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp800108CtrHmacMd5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp800108CtrHmacMd5(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp800108CtrHmacMd5(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp800108CtrHmacSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp800108CtrHmacSha1(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp800108CtrHmacSha1(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp800108CtrHmacSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp800108CtrHmacSha256(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp800108CtrHmacSha256(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp800108CtrHmacSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp800108CtrHmacSha384(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp800108CtrHmacSha384(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp800108CtrHmacSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp800108CtrHmacSha512(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp800108CtrHmacSha512(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp80056aConcatMd5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp80056aConcatMd5(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp80056aConcatMd5(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp80056aConcatSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp80056aConcatSha1(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp80056aConcatSha1(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp80056aConcatSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp80056aConcatSha256(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp80056aConcatSha256(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp80056aConcatSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp80056aConcatSha384(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp80056aConcatSha384(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics::Sp80056aConcatSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Sp80056aConcatSha512(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics)->get_Sp80056aConcatSha512(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics2::CapiKdfMd5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CapiKdfMd5(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics2)->get_CapiKdfMd5(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics2::CapiKdfSha1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CapiKdfSha1(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics2)->get_CapiKdfSha1(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics2::CapiKdfSha256() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CapiKdfSha256(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics2)->get_CapiKdfSha256(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics2::CapiKdfSha384() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CapiKdfSha384(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics2)->get_CapiKdfSha384(put_abi(value))); return value; } template hstring impl_IKeyDerivationAlgorithmNamesStatics2::CapiKdfSha512() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CapiKdfSha512(put(value))); + check_hresult(WINRT_SHIM(IKeyDerivationAlgorithmNamesStatics2)->get_CapiKdfSha512(put_abi(value))); return value; } @@ -3901,7 +4079,7 @@ inline hstring AsymmetricAlgorithmNames::EcdsaSha512() return get_activation_factory().EcdsaSha512(); } -inline Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider AsymmetricKeyAlgorithmProvider::OpenAlgorithm(hstring_ref algorithm) +inline Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider AsymmetricKeyAlgorithmProvider::OpenAlgorithm(hstring_view algorithm) { return get_activation_factory().OpenAlgorithm(algorithm); } @@ -4221,7 +4399,7 @@ inline hstring HashAlgorithmNames::Sha512() return get_activation_factory().Sha512(); } -inline Windows::Security::Cryptography::Core::HashAlgorithmProvider HashAlgorithmProvider::OpenAlgorithm(hstring_ref algorithm) +inline Windows::Security::Cryptography::Core::HashAlgorithmProvider HashAlgorithmProvider::OpenAlgorithm(hstring_view algorithm) { return get_activation_factory().OpenAlgorithm(algorithm); } @@ -4326,7 +4504,7 @@ inline hstring KeyDerivationAlgorithmNames::CapiKdfSha512() return get_activation_factory().CapiKdfSha512(); } -inline Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider KeyDerivationAlgorithmProvider::OpenAlgorithm(hstring_ref algorithm) +inline Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider KeyDerivationAlgorithmProvider::OpenAlgorithm(hstring_view algorithm) { return get_activation_factory().OpenAlgorithm(algorithm); } @@ -4381,17 +4559,17 @@ inline hstring MacAlgorithmNames::AesCmac() return get_activation_factory().AesCmac(); } -inline Windows::Security::Cryptography::Core::MacAlgorithmProvider MacAlgorithmProvider::OpenAlgorithm(hstring_ref algorithm) +inline Windows::Security::Cryptography::Core::MacAlgorithmProvider MacAlgorithmProvider::OpenAlgorithm(hstring_view algorithm) { return get_activation_factory().OpenAlgorithm(algorithm); } -inline Windows::Foundation::IAsyncOperation PersistedKeyProvider::OpenKeyPairFromCertificateAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_ref hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) +inline Windows::Foundation::IAsyncOperation PersistedKeyProvider::OpenKeyPairFromCertificateAsync(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_view hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) { return get_activation_factory().OpenKeyPairFromCertificateAsync(certificate, hashAlgorithmName, padding); } -inline Windows::Security::Cryptography::Core::CryptographicKey PersistedKeyProvider::OpenPublicKeyFromCertificate(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_ref hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) +inline Windows::Security::Cryptography::Core::CryptographicKey PersistedKeyProvider::OpenPublicKeyFromCertificate(const Windows::Security::Cryptography::Certificates::Certificate & certificate, hstring_view hashAlgorithmName, Windows::Security::Cryptography::Core::CryptographicPadding padding) { return get_activation_factory().OpenPublicKeyFromCertificate(certificate, hashAlgorithmName, padding); } @@ -4491,7 +4669,7 @@ inline hstring SymmetricAlgorithmNames::Rc4() return get_activation_factory().Rc4(); } -inline Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider SymmetricKeyAlgorithmProvider::OpenAlgorithm(hstring_ref algorithm) +inline Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider SymmetricKeyAlgorithmProvider::OpenAlgorithm(hstring_view algorithm) { return get_activation_factory().OpenAlgorithm(algorithm); } @@ -4499,3 +4677,356 @@ inline Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider Symm } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IAsymmetricAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IAsymmetricAlgorithmNamesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IAsymmetricKeyAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IAsymmetricKeyAlgorithmProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IAsymmetricKeyAlgorithmProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ICryptographicEngineStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ICryptographicEngineStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ICryptographicKey & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IEccCurveNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IEncryptedAndAuthenticatedData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IHashAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IHashAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IHashAlgorithmProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IHashComputation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationAlgorithmNamesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationAlgorithmProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationParameters2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationParametersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IKeyDerivationParametersStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IMacAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IMacAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IMacAlgorithmProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IMacAlgorithmProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::IPersistedKeyProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ISymmetricAlgorithmNamesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ISymmetricKeyAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::ISymmetricKeyAlgorithmProviderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::AsymmetricKeyAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::CryptographicHash & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::CryptographicKey & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::EncryptedAndAuthenticatedData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::HashAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::KeyDerivationAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::KeyDerivationParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::MacAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::Core::SymmetricKeyAlgorithmProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Cryptography.DataProtection.h b/10.0.14393.0/winrt/Windows.Security.Cryptography.DataProtection.h index 96cdd1260..a1c13611a 100644 --- a/10.0.14393.0/winrt/Windows.Security.Cryptography.DataProtection.h +++ b/10.0.14393.0/winrt/Windows.Security.Cryptography.DataProtection.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.Cryptography.DataProtection.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_ProtectAsync(abi_arg_in data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_ProtectAsync(impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProtectAsync(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectAsync(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce data, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_UnprotectAsync(impl::abi_arg_in data, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UnprotectAsync(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnprotectAsync(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce src, abi_arg_in dest, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ProtectStreamAsync(impl::abi_arg_in src, impl::abi_arg_in dest, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectStreamAsync(*reinterpret_cast(&src), *reinterpret_cast(&dest))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectStreamAsync(*reinterpret_cast(&src), *reinterpret_cast(&dest))); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce src, abi_arg_in dest, abi_arg_out value) noexcept override + HRESULT __stdcall abi_UnprotectStreamAsync(impl::abi_arg_in src, impl::abi_arg_in dest, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnprotectStreamAsync(*reinterpret_cast(&src), *reinterpret_cast(&dest))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnprotectStreamAsync(*reinterpret_cast(&src), *reinterpret_cast(&dest))); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateOverloadExplicit(abi_arg_in protectionDescriptor, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateOverloadExplicit(impl::abi_arg_in protectionDescriptor, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateOverloadExplicit(*reinterpret_cast(&protectionDescriptor))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateOverloadExplicit(*reinterpret_cast(&protectionDescriptor))); return S_OK; } catch (...) @@ -97,35 +105,35 @@ namespace Windows::Security::Cryptography::DataProtection { template Windows::Foundation::IAsyncOperation impl_IDataProtectionProvider::ProtectAsync(const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_ProtectAsync(get(data), put(value))); + check_hresult(WINRT_SHIM(IDataProtectionProvider)->abi_ProtectAsync(get_abi(data), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IDataProtectionProvider::UnprotectAsync(const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_UnprotectAsync(get(data), put(value))); + check_hresult(WINRT_SHIM(IDataProtectionProvider)->abi_UnprotectAsync(get_abi(data), put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IDataProtectionProvider::ProtectStreamAsync(const Windows::Storage::Streams::IInputStream & src, const Windows::Storage::Streams::IOutputStream & dest) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_ProtectStreamAsync(get(src), get(dest), put(value))); + check_hresult(WINRT_SHIM(IDataProtectionProvider)->abi_ProtectStreamAsync(get_abi(src), get_abi(dest), put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IDataProtectionProvider::UnprotectStreamAsync(const Windows::Storage::Streams::IInputStream & src, const Windows::Storage::Streams::IOutputStream & dest) const { Windows::Foundation::IAsyncAction value; - check_hresult(static_cast(static_cast(*this))->abi_UnprotectStreamAsync(get(src), get(dest), put(value))); + check_hresult(WINRT_SHIM(IDataProtectionProvider)->abi_UnprotectStreamAsync(get_abi(src), get_abi(dest), put_abi(value))); return value; } -template Windows::Security::Cryptography::DataProtection::DataProtectionProvider impl_IDataProtectionProviderFactory::CreateOverloadExplicit(hstring_ref protectionDescriptor) const +template Windows::Security::Cryptography::DataProtection::DataProtectionProvider impl_IDataProtectionProviderFactory::CreateOverloadExplicit(hstring_view protectionDescriptor) const { Windows::Security::Cryptography::DataProtection::DataProtectionProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateOverloadExplicit(get(protectionDescriptor), put(value))); + check_hresult(WINRT_SHIM(IDataProtectionProviderFactory)->abi_CreateOverloadExplicit(get_abi(protectionDescriptor), put_abi(value))); return value; } @@ -133,10 +141,39 @@ inline DataProtectionProvider::DataProtectionProvider() : DataProtectionProvider(activate_instance()) {} -inline DataProtectionProvider::DataProtectionProvider(hstring_ref protectionDescriptor) : +inline DataProtectionProvider::DataProtectionProvider(hstring_view protectionDescriptor) : DataProtectionProvider(get_activation_factory().CreateOverloadExplicit(protectionDescriptor)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::DataProtection::IDataProtectionProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::DataProtection::IDataProtectionProviderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::DataProtection::DataProtectionProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.Cryptography.h b/10.0.14393.0/winrt/Windows.Security.Cryptography.h index 2b02da256..c7ae22dac 100644 --- a/10.0.14393.0/winrt/Windows.Security.Cryptography.h +++ b/10.0.14393.0/winrt/Windows.Security.Cryptography.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Security.Cryptography.3.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_Compare(abi_arg_in object1, abi_arg_in object2, bool * isEqual) noexcept override + HRESULT __stdcall abi_Compare(impl::abi_arg_in object1, impl::abi_arg_in object2, bool * isEqual) noexcept override { try { - *isEqual = detach(this->shim().Compare(*reinterpret_cast(&object1), *reinterpret_cast(&object2))); + typename D::abi_guard guard(this->shim()); + *isEqual = detach_abi(this->shim().Compare(*reinterpret_cast(&object1), *reinterpret_cast(&object2))); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce } } - HRESULT __stdcall abi_GenerateRandom(uint32_t length, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_GenerateRandom(uint32_t length, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().GenerateRandom(length)); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().GenerateRandom(length)); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produce { try { - *value = detach(this->shim().GenerateRandomNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GenerateRandomNumber()); return S_OK; } catch (...) @@ -53,11 +59,12 @@ struct produce } } - HRESULT __stdcall abi_CreateFromByteArray(uint32_t __valueSize, abi_arg_in * value, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_CreateFromByteArray(uint32_t __valueSize, impl::abi_arg_in * value, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().CreateFromByteArray(array_ref(value, value + __valueSize))); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().CreateFromByteArray(array_view(value, value + __valueSize))); return S_OK; } catch (...) @@ -67,11 +74,12 @@ struct produce } } - HRESULT __stdcall abi_CopyToByteArray(abi_arg_in buffer, uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall abi_CopyToByteArray(impl::abi_arg_in buffer, uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - this->shim().CopyToByteArray(*reinterpret_cast(&buffer), detach(__valueSize, value)); + typename D::abi_guard guard(this->shim()); + this->shim().CopyToByteArray(*reinterpret_cast(&buffer), detach_abi(__valueSize, value)); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce } } - HRESULT __stdcall abi_DecodeFromHexString(abi_arg_in value, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_DecodeFromHexString(impl::abi_arg_in value, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().DecodeFromHexString(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().DecodeFromHexString(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -96,11 +105,12 @@ struct produce } } - HRESULT __stdcall abi_EncodeToHexString(abi_arg_in buffer, abi_arg_out value) noexcept override + HRESULT __stdcall abi_EncodeToHexString(impl::abi_arg_in buffer, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodeToHexString(*reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodeToHexString(*reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -110,11 +120,12 @@ struct produce } } - HRESULT __stdcall abi_DecodeFromBase64String(abi_arg_in value, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_DecodeFromBase64String(impl::abi_arg_in value, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().DecodeFromBase64String(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().DecodeFromBase64String(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -124,11 +135,12 @@ struct produce } } - HRESULT __stdcall abi_EncodeToBase64String(abi_arg_in buffer, abi_arg_out value) noexcept override + HRESULT __stdcall abi_EncodeToBase64String(impl::abi_arg_in buffer, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodeToBase64String(*reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodeToBase64String(*reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -138,11 +150,12 @@ struct produce } } - HRESULT __stdcall abi_ConvertStringToBinary(abi_arg_in value, Windows::Security::Cryptography::BinaryStringEncoding encoding, abi_arg_out buffer) noexcept override + HRESULT __stdcall abi_ConvertStringToBinary(impl::abi_arg_in value, Windows::Security::Cryptography::BinaryStringEncoding encoding, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().ConvertStringToBinary(*reinterpret_cast(&value), encoding)); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().ConvertStringToBinary(*reinterpret_cast(&value), encoding)); return S_OK; } catch (...) @@ -152,11 +165,12 @@ struct produce } } - HRESULT __stdcall abi_ConvertBinaryToString(Windows::Security::Cryptography::BinaryStringEncoding encoding, abi_arg_in buffer, abi_arg_out value) noexcept override + HRESULT __stdcall abi_ConvertBinaryToString(Windows::Security::Cryptography::BinaryStringEncoding encoding, impl::abi_arg_in buffer, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConvertBinaryToString(encoding, *reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConvertBinaryToString(encoding, *reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -174,75 +188,75 @@ namespace Windows::Security::Cryptography { template bool impl_ICryptographicBufferStatics::Compare(const Windows::Storage::Streams::IBuffer & object1, const Windows::Storage::Streams::IBuffer & object2) const { bool isEqual {}; - check_hresult(static_cast(static_cast(*this))->abi_Compare(get(object1), get(object2), &isEqual)); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_Compare(get_abi(object1), get_abi(object2), &isEqual)); return isEqual; } template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::GenerateRandom(uint32_t length) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_GenerateRandom(length, put(buffer))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_GenerateRandom(length, put_abi(buffer))); return buffer; } template uint32_t impl_ICryptographicBufferStatics::GenerateRandomNumber() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GenerateRandomNumber(&value)); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_GenerateRandomNumber(&value)); return value; } -template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::CreateFromByteArray(array_ref value) const +template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::CreateFromByteArray(array_view value) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromByteArray(value.size(), get(value), put(buffer))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_CreateFromByteArray(value.size(), get_abi(value), put_abi(buffer))); return buffer; } template void impl_ICryptographicBufferStatics::CopyToByteArray(const Windows::Storage::Streams::IBuffer & buffer, com_array & value) const { - check_hresult(static_cast(static_cast(*this))->abi_CopyToByteArray(get(buffer), put_size(value), put(value))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_CopyToByteArray(get_abi(buffer), impl::put_size_abi(value), put_abi(value))); } -template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::DecodeFromHexString(hstring_ref value) const +template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::DecodeFromHexString(hstring_view value) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_DecodeFromHexString(get(value), put(buffer))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_DecodeFromHexString(get_abi(value), put_abi(buffer))); return buffer; } template hstring impl_ICryptographicBufferStatics::EncodeToHexString(const Windows::Storage::Streams::IBuffer & buffer) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_EncodeToHexString(get(buffer), put(value))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_EncodeToHexString(get_abi(buffer), put_abi(value))); return value; } -template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::DecodeFromBase64String(hstring_ref value) const +template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::DecodeFromBase64String(hstring_view value) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_DecodeFromBase64String(get(value), put(buffer))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_DecodeFromBase64String(get_abi(value), put_abi(buffer))); return buffer; } template hstring impl_ICryptographicBufferStatics::EncodeToBase64String(const Windows::Storage::Streams::IBuffer & buffer) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_EncodeToBase64String(get(buffer), put(value))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_EncodeToBase64String(get_abi(buffer), put_abi(value))); return value; } -template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::ConvertStringToBinary(hstring_ref value, Windows::Security::Cryptography::BinaryStringEncoding encoding) const +template Windows::Storage::Streams::IBuffer impl_ICryptographicBufferStatics::ConvertStringToBinary(hstring_view value, Windows::Security::Cryptography::BinaryStringEncoding encoding) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_ConvertStringToBinary(get(value), encoding, put(buffer))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_ConvertStringToBinary(get_abi(value), encoding, put_abi(buffer))); return buffer; } template hstring impl_ICryptographicBufferStatics::ConvertBinaryToString(Windows::Security::Cryptography::BinaryStringEncoding encoding, const Windows::Storage::Streams::IBuffer & buffer) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_ConvertBinaryToString(encoding, get(buffer), put(value))); + check_hresult(WINRT_SHIM(ICryptographicBufferStatics)->abi_ConvertBinaryToString(encoding, get_abi(buffer), put_abi(value))); return value; } @@ -261,7 +275,7 @@ inline uint32_t CryptographicBuffer::GenerateRandomNumber() return get_activation_factory().GenerateRandomNumber(); } -inline Windows::Storage::Streams::IBuffer CryptographicBuffer::CreateFromByteArray(array_ref value) +inline Windows::Storage::Streams::IBuffer CryptographicBuffer::CreateFromByteArray(array_view value) { return get_activation_factory().CreateFromByteArray(value); } @@ -271,7 +285,7 @@ inline void CryptographicBuffer::CopyToByteArray(const Windows::Storage::Streams get_activation_factory().CopyToByteArray(buffer, value); } -inline Windows::Storage::Streams::IBuffer CryptographicBuffer::DecodeFromHexString(hstring_ref value) +inline Windows::Storage::Streams::IBuffer CryptographicBuffer::DecodeFromHexString(hstring_view value) { return get_activation_factory().DecodeFromHexString(value); } @@ -281,7 +295,7 @@ inline hstring CryptographicBuffer::EncodeToHexString(const Windows::Storage::St return get_activation_factory().EncodeToHexString(buffer); } -inline Windows::Storage::Streams::IBuffer CryptographicBuffer::DecodeFromBase64String(hstring_ref value) +inline Windows::Storage::Streams::IBuffer CryptographicBuffer::DecodeFromBase64String(hstring_view value) { return get_activation_factory().DecodeFromBase64String(value); } @@ -291,7 +305,7 @@ inline hstring CryptographicBuffer::EncodeToBase64String(const Windows::Storage: return get_activation_factory().EncodeToBase64String(buffer); } -inline Windows::Storage::Streams::IBuffer CryptographicBuffer::ConvertStringToBinary(hstring_ref value, Windows::Security::Cryptography::BinaryStringEncoding encoding) +inline Windows::Storage::Streams::IBuffer CryptographicBuffer::ConvertStringToBinary(hstring_view value, Windows::Security::Cryptography::BinaryStringEncoding encoding) { return get_activation_factory().ConvertStringToBinary(value, encoding); } @@ -304,3 +318,14 @@ inline hstring CryptographicBuffer::ConvertBinaryToString(Windows::Security::Cry } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::Cryptography::ICryptographicBufferStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.EnterpriseData.h b/10.0.14393.0/winrt/Windows.Security.EnterpriseData.h index f6c1377ee..30b7e04ce 100644 --- a/10.0.14393.0/winrt/Windows.Security.EnterpriseData.h +++ b/10.0.14393.0/winrt/Windows.Security.EnterpriseData.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Buffer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Buffer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Buffer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Buffer()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProtectionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionInfo()); return S_OK; } catch (...) @@ -54,7 +59,8 @@ struct produce : prod { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : prod } } - HRESULT __stdcall get_Identity(abi_arg_out value) noexcept override + HRESULT __stdcall get_Identity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Identity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identity()); return S_OK; } catch (...) @@ -81,11 +88,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_ProtectAsync(abi_arg_in data, abi_arg_in identity, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ProtectAsync(impl::abi_arg_in data, impl::abi_arg_in identity, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ProtectAsync(*reinterpret_cast(&data), *reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProtectAsync(*reinterpret_cast(&data), *reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -95,11 +103,12 @@ struct produce data, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UnprotectAsync(impl::abi_arg_in data, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UnprotectAsync(*reinterpret_cast(&data))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprotectAsync(*reinterpret_cast(&data))); return S_OK; } catch (...) @@ -109,11 +118,12 @@ struct produce unprotectedStream, abi_arg_in identity, abi_arg_in protectedStream, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ProtectStreamAsync(impl::abi_arg_in unprotectedStream, impl::abi_arg_in identity, impl::abi_arg_in protectedStream, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ProtectStreamAsync(*reinterpret_cast(&unprotectedStream), *reinterpret_cast(&identity), *reinterpret_cast(&protectedStream))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProtectStreamAsync(*reinterpret_cast(&unprotectedStream), *reinterpret_cast(&identity), *reinterpret_cast(&protectedStream))); return S_OK; } catch (...) @@ -123,11 +133,12 @@ struct produce protectedStream, abi_arg_in unprotectedStream, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_UnprotectStreamAsync(impl::abi_arg_in protectedStream, impl::abi_arg_in unprotectedStream, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().UnprotectStreamAsync(*reinterpret_cast(&protectedStream), *reinterpret_cast(&unprotectedStream))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().UnprotectStreamAsync(*reinterpret_cast(&protectedStream), *reinterpret_cast(&unprotectedStream))); return S_OK; } catch (...) @@ -137,11 +148,12 @@ struct produce protectedData, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetProtectionInfoAsync(impl::abi_arg_in protectedData, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&protectedData))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&protectedData))); return S_OK; } catch (...) @@ -151,11 +163,12 @@ struct produce protectedStream, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetStreamProtectionInfoAsync(impl::abi_arg_in protectedStream, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetStreamProtectionInfoAsync(*reinterpret_cast(&protectedStream))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetStreamProtectionInfoAsync(*reinterpret_cast(&protectedStream))); return S_OK; } catch (...) @@ -173,7 +186,8 @@ struct produce : prod { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -186,7 +200,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsRoamable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRoamable()); return S_OK; } catch (...) @@ -195,11 +210,12 @@ struct produce : prod } } - HRESULT __stdcall get_Identity(abi_arg_out value) noexcept override + HRESULT __stdcall get_Identity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Identity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identity()); return S_OK; } catch (...) @@ -213,11 +229,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_ProtectAsync(abi_arg_in target, abi_arg_in identity, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ProtectAsync(impl::abi_arg_in target, impl::abi_arg_in identity, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ProtectAsync(*reinterpret_cast(&target), *reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProtectAsync(*reinterpret_cast(&target), *reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -227,11 +244,12 @@ struct produce source, abi_arg_in target, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CopyProtectionAsync(impl::abi_arg_in source, impl::abi_arg_in target, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CopyProtectionAsync(*reinterpret_cast(&source), *reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CopyProtectionAsync(*reinterpret_cast(&source), *reinterpret_cast(&target))); return S_OK; } catch (...) @@ -241,11 +259,12 @@ struct produce source, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetProtectionInfoAsync(impl::abi_arg_in source, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&source))); return S_OK; } catch (...) @@ -255,11 +274,12 @@ struct produce protectedFile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SaveFileAsContainerAsync(impl::abi_arg_in protectedFile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile))); return S_OK; } catch (...) @@ -269,11 +289,12 @@ struct produce containerFile, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_LoadFileFromContainerAsync(impl::abi_arg_in containerFile, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile))); return S_OK; } catch (...) @@ -283,11 +304,12 @@ struct produce containerFile, abi_arg_in target, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_LoadFileFromContainerWithTargetAsync(impl::abi_arg_in containerFile, impl::abi_arg_in target, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target))); return S_OK; } catch (...) @@ -297,11 +319,12 @@ struct produce parentFolder, abi_arg_in desiredName, abi_arg_in identity, Windows::Storage::CreationCollisionOption collisionOption, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CreateProtectedAndOpenAsync(impl::abi_arg_in parentFolder, impl::abi_arg_in desiredName, impl::abi_arg_in identity, Windows::Storage::CreationCollisionOption collisionOption, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CreateProtectedAndOpenAsync(*reinterpret_cast(&parentFolder), *reinterpret_cast(&desiredName), *reinterpret_cast(&identity), collisionOption)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateProtectedAndOpenAsync(*reinterpret_cast(&parentFolder), *reinterpret_cast(&desiredName), *reinterpret_cast(&identity), collisionOption)); return S_OK; } catch (...) @@ -315,11 +338,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_IsContainerAsync(abi_arg_in file, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_IsContainerAsync(impl::abi_arg_in file, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().IsContainerAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsContainerAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -329,11 +353,12 @@ struct produce containerFile, abi_arg_in target, Windows::Storage::NameCollisionOption collisionOption, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(impl::abi_arg_in containerFile, impl::abi_arg_in target, Windows::Storage::NameCollisionOption collisionOption, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target), collisionOption)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target), collisionOption)); return S_OK; } catch (...) @@ -343,11 +368,12 @@ struct produce protectedFile, abi_arg_in> sharedWithIdentities, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_SaveFileAsContainerWithSharingAsync(impl::abi_arg_in protectedFile, impl::abi_arg_in> sharedWithIdentities, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile), *reinterpret_cast *>(&sharedWithIdentities))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile), *reinterpret_cast *>(&sharedWithIdentities))); return S_OK; } catch (...) @@ -361,11 +387,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ProtectAsync(abi_arg_in storageItem, abi_arg_in enterpriseIdentity, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_ProtectAsync(impl::abi_arg_in storageItem, impl::abi_arg_in enterpriseIdentity, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().ProtectAsync(*reinterpret_cast(&storageItem), *reinterpret_cast(&enterpriseIdentity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ProtectAsync(*reinterpret_cast(&storageItem), *reinterpret_cast(&enterpriseIdentity))); return S_OK; } catch (...) @@ -375,11 +402,12 @@ struct produce sourceStorageItem, abi_arg_in targetStorageItem, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_CopyProtectionAsync(impl::abi_arg_in sourceStorageItem, impl::abi_arg_in targetStorageItem, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().CopyProtectionAsync(*reinterpret_cast(&sourceStorageItem), *reinterpret_cast(&targetStorageItem))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CopyProtectionAsync(*reinterpret_cast(&sourceStorageItem), *reinterpret_cast(&targetStorageItem))); return S_OK; } catch (...) @@ -389,10 +417,11 @@ struct produce enterpriseIdentity) noexcept override + HRESULT __stdcall abi_Revoke(impl::abi_arg_in enterpriseIdentity) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Revoke(*reinterpret_cast(&enterpriseIdentity)); return S_OK; } @@ -402,11 +431,12 @@ struct produce storageItem, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetStatusAsync(impl::abi_arg_in storageItem, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetStatusAsync(*reinterpret_cast(&storageItem))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetStatusAsync(*reinterpret_cast(&storageItem))); return S_OK; } catch (...) @@ -420,11 +450,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Identities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Identities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Identities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identities()); return S_OK; } catch (...) @@ -438,11 +469,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Identities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Identities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Identities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identities()); return S_OK; } catch (...) @@ -452,11 +484,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -465,11 +498,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -487,7 +521,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -496,11 +531,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -518,7 +554,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -527,11 +564,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -545,11 +583,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Identities(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Identities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Identities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identities()); return S_OK; } catch (...) @@ -563,11 +602,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_File(abi_arg_out value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -577,11 +617,12 @@ struct produce } } - HRESULT __stdcall get_Stream(abi_arg_out value) noexcept override + HRESULT __stdcall get_Stream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stream()); return S_OK; } catch (...) @@ -591,11 +632,12 @@ struct produce } } - HRESULT __stdcall get_ProtectionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProtectionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionInfo()); return S_OK; } catch (...) @@ -613,6 +655,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Action(value); return S_OK; } @@ -626,7 +669,8 @@ struct produce { try { - *value = detach(this->shim().Action()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Action()); return S_OK; } catch (...) @@ -635,10 +679,11 @@ struct produce } } - HRESULT __stdcall put_DataDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_DataDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DataDescription(*reinterpret_cast(&value)); return S_OK; } @@ -648,11 +693,12 @@ struct produce } } - HRESULT __stdcall get_DataDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataDescription()); return S_OK; } catch (...) @@ -662,10 +708,11 @@ struct produce } } - HRESULT __stdcall put_SourceDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_SourceDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceDescription(*reinterpret_cast(&value)); return S_OK; } @@ -675,11 +722,12 @@ struct produce } } - HRESULT __stdcall get_SourceDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceDescription()); return S_OK; } catch (...) @@ -689,10 +737,11 @@ struct produce } } - HRESULT __stdcall put_TargetDescription(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetDescription(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetDescription(*reinterpret_cast(&value)); return S_OK; } @@ -702,11 +751,12 @@ struct produce } } - HRESULT __stdcall get_TargetDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetDescription()); return S_OK; } catch (...) @@ -720,11 +770,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, abi_arg_in dataDescription, abi_arg_in sourceDescription, abi_arg_in targetDescription, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, impl::abi_arg_in dataDescription, impl::abi_arg_in sourceDescription, impl::abi_arg_in targetDescription, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(action, *reinterpret_cast(&dataDescription), *reinterpret_cast(&sourceDescription), *reinterpret_cast(&targetDescription))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(action, *reinterpret_cast(&dataDescription), *reinterpret_cast(&sourceDescription), *reinterpret_cast(&targetDescription))); return S_OK; } catch (...) @@ -734,11 +785,12 @@ struct produce dataDescription, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithActionAndDataDescription(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, impl::abi_arg_in dataDescription, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithActionAndDataDescription(action, *reinterpret_cast(&dataDescription))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithActionAndDataDescription(action, *reinterpret_cast(&dataDescription))); return S_OK; } catch (...) @@ -752,10 +804,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall put_Identity(abi_arg_in value) noexcept override + HRESULT __stdcall put_Identity(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Identity(*reinterpret_cast(&value)); return S_OK; } @@ -765,11 +818,12 @@ struct produce : } } - HRESULT __stdcall get_Identity(abi_arg_out value) noexcept override + HRESULT __stdcall get_Identity(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Identity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identity()); return S_OK; } catch (...) @@ -787,6 +841,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowEnterpriseIndicator(value); return S_OK; } @@ -800,7 +855,8 @@ struct produce { try { - *value = detach(this->shim().ShowEnterpriseIndicator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowEnterpriseIndicator()); return S_OK; } catch (...) @@ -813,11 +869,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_IsIdentityManaged(abi_arg_in identity, bool * result) noexcept override + HRESULT __stdcall abi_IsIdentityManaged(impl::abi_arg_in identity, bool * result) noexcept override { try { - *result = detach(this->shim().IsIdentityManaged(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsIdentityManaged(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -826,11 +883,12 @@ struct produce identity, bool * result) noexcept override + HRESULT __stdcall abi_TryApplyProcessUIPolicy(impl::abi_arg_in identity, bool * result) noexcept override { try { - *result = detach(this->shim().TryApplyProcessUIPolicy(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryApplyProcessUIPolicy(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -843,6 +901,7 @@ struct produceshim()); this->shim().ClearProcessUIPolicy(); return S_OK; } @@ -852,11 +911,12 @@ struct produce identity, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCurrentThreadNetworkContext(impl::abi_arg_in identity, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCurrentThreadNetworkContext(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCurrentThreadNetworkContext(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -866,11 +926,12 @@ struct produce endpointHost, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetPrimaryManagedIdentityForNetworkEndpointAsync(impl::abi_arg_in endpointHost, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetPrimaryManagedIdentityForNetworkEndpointAsync(*reinterpret_cast(&endpointHost))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetPrimaryManagedIdentityForNetworkEndpointAsync(*reinterpret_cast(&endpointHost))); return S_OK; } catch (...) @@ -880,10 +941,11 @@ struct produce identity) noexcept override + HRESULT __stdcall abi_RevokeContent(impl::abi_arg_in identity) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RevokeContent(*reinterpret_cast(&identity)); return S_OK; } @@ -893,11 +955,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -907,11 +970,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProtectedAccessSuspending(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProtectedAccessSuspending(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProtectedAccessSuspending(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -924,6 +988,7 @@ struct produceshim()); this->shim().ProtectedAccessSuspending(token); return S_OK; } @@ -933,11 +998,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProtectedAccessResumed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProtectedAccessResumed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProtectedAccessResumed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -950,6 +1016,7 @@ struct produceshim()); this->shim().ProtectedAccessResumed(token); return S_OK; } @@ -959,11 +1026,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProtectedContentRevoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProtectedContentRevoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProtectedContentRevoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -976,6 +1044,7 @@ struct produceshim()); this->shim().ProtectedContentRevoked(token); return S_OK; } @@ -985,11 +1054,12 @@ struct produce sourceIdentity, abi_arg_in targetIdentity, Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult * result) noexcept override + HRESULT __stdcall abi_CheckAccess(impl::abi_arg_in sourceIdentity, impl::abi_arg_in targetIdentity, Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult * result) noexcept override { try { - *result = detach(this->shim().CheckAccess(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CheckAccess(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); return S_OK; } catch (...) @@ -998,11 +1068,12 @@ struct produce sourceIdentity, abi_arg_in targetIdentity, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in targetIdentity, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); return S_OK; } catch (...) @@ -1016,11 +1087,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_HasContentBeenRevokedSince(abi_arg_in identity, abi_arg_in since, bool * result) noexcept override + HRESULT __stdcall abi_HasContentBeenRevokedSince(impl::abi_arg_in identity, impl::abi_arg_in since, bool * result) noexcept override { try { - *result = detach(this->shim().HasContentBeenRevokedSince(*reinterpret_cast(&identity), *reinterpret_cast(&since))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().HasContentBeenRevokedSince(*reinterpret_cast(&identity), *reinterpret_cast(&since))); return S_OK; } catch (...) @@ -1029,11 +1101,12 @@ struct produce sourceIdentity, abi_arg_in appPackageFamilyName, Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult * result) noexcept override + HRESULT __stdcall abi_CheckAccessForApp(impl::abi_arg_in sourceIdentity, impl::abi_arg_in appPackageFamilyName, Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult * result) noexcept override { try { - *result = detach(this->shim().CheckAccessForApp(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CheckAccessForApp(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); return S_OK; } catch (...) @@ -1042,11 +1115,12 @@ struct produce sourceIdentity, abi_arg_in appPackageFamilyName, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessForAppAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in appPackageFamilyName, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); return S_OK; } catch (...) @@ -1056,11 +1130,12 @@ struct produce identity, Windows::Security::EnterpriseData::EnforcementLevel * value) noexcept override + HRESULT __stdcall abi_GetEnforcementLevel(impl::abi_arg_in identity, Windows::Security::EnterpriseData::EnforcementLevel * value) noexcept override { try { - *value = detach(this->shim().GetEnforcementLevel(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetEnforcementLevel(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -1069,11 +1144,12 @@ struct produce identity, bool * value) noexcept override + HRESULT __stdcall abi_IsUserDecryptionAllowed(impl::abi_arg_in identity, bool * value) noexcept override { try { - *value = detach(this->shim().IsUserDecryptionAllowed(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUserDecryptionAllowed(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -1082,11 +1158,12 @@ struct produce identity, bool * value) noexcept override + HRESULT __stdcall abi_IsProtectionUnderLockRequired(impl::abi_arg_in identity, bool * value) noexcept override { try { - *value = detach(this->shim().IsProtectionUnderLockRequired(*reinterpret_cast(&identity))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProtectionUnderLockRequired(*reinterpret_cast(&identity))); return S_OK; } catch (...) @@ -1095,11 +1172,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_PolicyChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PolicyChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PolicyChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1112,6 +1190,7 @@ struct produceshim()); this->shim().PolicyChanged(token); return S_OK; } @@ -1125,7 +1204,8 @@ struct produceshim().IsProtectionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsProtectionEnabled()); return S_OK; } catch (...) @@ -1138,11 +1218,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessWithAuditingInfoAsync(abi_arg_in sourceIdentity, abi_arg_in targetIdentity, abi_arg_in auditInfo, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessWithAuditingInfoAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in targetIdentity, impl::abi_arg_in auditInfo, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo))); return S_OK; } catch (...) @@ -1152,11 +1233,12 @@ struct produce sourceIdentity, abi_arg_in targetIdentity, abi_arg_in auditInfo, abi_arg_in messageFromApp, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessWithMessageAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in targetIdentity, impl::abi_arg_in auditInfo, impl::abi_arg_in messageFromApp, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); return S_OK; } catch (...) @@ -1166,11 +1248,12 @@ struct produce sourceIdentity, abi_arg_in appPackageFamilyName, abi_arg_in auditInfo, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessForAppWithAuditingInfoAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in appPackageFamilyName, impl::abi_arg_in auditInfo, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo))); return S_OK; } catch (...) @@ -1180,11 +1263,12 @@ struct produce sourceIdentity, abi_arg_in appPackageFamilyName, abi_arg_in auditInfo, abi_arg_in messageFromApp, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessForAppWithMessageAsync(impl::abi_arg_in sourceIdentity, impl::abi_arg_in appPackageFamilyName, impl::abi_arg_in auditInfo, impl::abi_arg_in messageFromApp, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); return S_OK; } catch (...) @@ -1194,10 +1278,11 @@ struct produce sourceIdentity, abi_arg_in targetIdentity, abi_arg_in auditInfo) noexcept override + HRESULT __stdcall abi_LogAuditEvent(impl::abi_arg_in sourceIdentity, impl::abi_arg_in targetIdentity, impl::abi_arg_in auditInfo) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LogAuditEvent(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo)); return S_OK; } @@ -1216,377 +1301,377 @@ struct produce : pr namespace Windows::Security::EnterpriseData { -template Windows::Foundation::IAsyncOperation impl_IFileRevocationManagerStatics::ProtectAsync(const Windows::Storage::IStorageItem & storageItem, hstring_ref enterpriseIdentity) const +template Windows::Foundation::IAsyncOperation impl_IFileRevocationManagerStatics::ProtectAsync(const Windows::Storage::IStorageItem & storageItem, hstring_view enterpriseIdentity) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ProtectAsync(get(storageItem), get(enterpriseIdentity), put(result))); + check_hresult(WINRT_SHIM(IFileRevocationManagerStatics)->abi_ProtectAsync(get_abi(storageItem), get_abi(enterpriseIdentity), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileRevocationManagerStatics::CopyProtectionAsync(const Windows::Storage::IStorageItem & sourceStorageItem, const Windows::Storage::IStorageItem & targetStorageItem) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CopyProtectionAsync(get(sourceStorageItem), get(targetStorageItem), put(result))); + check_hresult(WINRT_SHIM(IFileRevocationManagerStatics)->abi_CopyProtectionAsync(get_abi(sourceStorageItem), get_abi(targetStorageItem), put_abi(result))); return result; } -template void impl_IFileRevocationManagerStatics::Revoke(hstring_ref enterpriseIdentity) const +template void impl_IFileRevocationManagerStatics::Revoke(hstring_view enterpriseIdentity) const { - check_hresult(static_cast(static_cast(*this))->abi_Revoke(get(enterpriseIdentity))); + check_hresult(WINRT_SHIM(IFileRevocationManagerStatics)->abi_Revoke(get_abi(enterpriseIdentity))); } template Windows::Foundation::IAsyncOperation impl_IFileRevocationManagerStatics::GetStatusAsync(const Windows::Storage::IStorageItem & storageItem) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetStatusAsync(get(storageItem), put(result))); + check_hresult(WINRT_SHIM(IFileRevocationManagerStatics)->abi_GetStatusAsync(get_abi(storageItem), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::ProtectAsync(const Windows::Storage::IStorageItem & target, hstring_ref identity) const +template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::ProtectAsync(const Windows::Storage::IStorageItem & target, hstring_view identity) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ProtectAsync(get(target), get(identity), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_ProtectAsync(get_abi(target), get_abi(identity), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::CopyProtectionAsync(const Windows::Storage::IStorageItem & source, const Windows::Storage::IStorageItem & target) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CopyProtectionAsync(get(source), get(target), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_CopyProtectionAsync(get_abi(source), get_abi(target), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::GetProtectionInfoAsync(const Windows::Storage::IStorageItem & source) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetProtectionInfoAsync(get(source), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_GetProtectionInfoAsync(get_abi(source), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::SaveFileAsContainerAsync(const Windows::Storage::IStorageFile & protectedFile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SaveFileAsContainerAsync(get(protectedFile), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_SaveFileAsContainerAsync(get_abi(protectedFile), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::LoadFileFromContainerAsync(const Windows::Storage::IStorageFile & containerFile) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_LoadFileFromContainerAsync(get(containerFile), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_LoadFileFromContainerAsync(get_abi(containerFile), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::LoadFileFromContainerAsync(const Windows::Storage::IStorageFile & containerFile, const Windows::Storage::IStorageItem & target) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_LoadFileFromContainerWithTargetAsync(get(containerFile), get(target), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_LoadFileFromContainerWithTargetAsync(get_abi(containerFile), get_abi(target), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::CreateProtectedAndOpenAsync(const Windows::Storage::IStorageFolder & parentFolder, hstring_ref desiredName, hstring_ref identity, Windows::Storage::CreationCollisionOption collisionOption) const +template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics::CreateProtectedAndOpenAsync(const Windows::Storage::IStorageFolder & parentFolder, hstring_view desiredName, hstring_view identity, Windows::Storage::CreationCollisionOption collisionOption) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_CreateProtectedAndOpenAsync(get(parentFolder), get(desiredName), get(identity), collisionOption, put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics)->abi_CreateProtectedAndOpenAsync(get_abi(parentFolder), get_abi(desiredName), get_abi(identity), collisionOption, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics2::IsContainerAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_IsContainerAsync(get(file), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics2)->abi_IsContainerAsync(get_abi(file), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics2::LoadFileFromContainerAsync(const Windows::Storage::IStorageFile & containerFile, const Windows::Storage::IStorageItem & target, Windows::Storage::NameCollisionOption collisionOption) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(get(containerFile), get(target), collisionOption, put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics2)->abi_LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(get_abi(containerFile), get_abi(target), collisionOption, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics2::SaveFileAsContainerAsync(const Windows::Storage::IStorageFile & protectedFile, const Windows::Foundation::Collections::IIterable & sharedWithIdentities) const +template Windows::Foundation::IAsyncOperation impl_IFileProtectionManagerStatics2::SaveFileAsContainerAsync(const Windows::Storage::IStorageFile & protectedFile, iterable sharedWithIdentities) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_SaveFileAsContainerWithSharingAsync(get(protectedFile), get(sharedWithIdentities), put(result))); + check_hresult(WINRT_SHIM(IFileProtectionManagerStatics2)->abi_SaveFileAsContainerWithSharingAsync(get_abi(protectedFile), get_abi(sharedWithIdentities), put_abi(result))); return result; } template Windows::Storage::StorageFile impl_IProtectedFileCreateResult::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IProtectedFileCreateResult)->get_File(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_IProtectedFileCreateResult::Stream() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_Stream(put(value))); + check_hresult(WINRT_SHIM(IProtectedFileCreateResult)->get_Stream(put_abi(value))); return value; } template Windows::Security::EnterpriseData::FileProtectionInfo impl_IProtectedFileCreateResult::ProtectionInfo() const { Windows::Security::EnterpriseData::FileProtectionInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtectionInfo(put(value))); + check_hresult(WINRT_SHIM(IProtectedFileCreateResult)->get_ProtectionInfo(put_abi(value))); return value; } template Windows::Security::EnterpriseData::FileProtectionStatus impl_IFileProtectionInfo::Status() const { Windows::Security::EnterpriseData::FileProtectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IFileProtectionInfo)->get_Status(&value)); return value; } template bool impl_IFileProtectionInfo::IsRoamable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRoamable(&value)); + check_hresult(WINRT_SHIM(IFileProtectionInfo)->get_IsRoamable(&value)); return value; } template hstring impl_IFileProtectionInfo::Identity() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Identity(put(value))); + check_hresult(WINRT_SHIM(IFileProtectionInfo)->get_Identity(put_abi(value))); return value; } template Windows::Security::EnterpriseData::ProtectedImportExportStatus impl_IProtectedContainerExportResult::Status() const { Windows::Security::EnterpriseData::ProtectedImportExportStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IProtectedContainerExportResult)->get_Status(&value)); return value; } template Windows::Storage::StorageFile impl_IProtectedContainerExportResult::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IProtectedContainerExportResult)->get_File(put_abi(value))); return value; } template Windows::Security::EnterpriseData::ProtectedImportExportStatus impl_IProtectedContainerImportResult::Status() const { Windows::Security::EnterpriseData::ProtectedImportExportStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IProtectedContainerImportResult)->get_Status(&value)); return value; } template Windows::Storage::StorageFile impl_IProtectedContainerImportResult::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IProtectedContainerImportResult)->get_File(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::ProtectAsync(const Windows::Storage::Streams::IBuffer & data, hstring_ref identity) const +template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::ProtectAsync(const Windows::Storage::Streams::IBuffer & data, hstring_view identity) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ProtectAsync(get(data), get(identity), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_ProtectAsync(get_abi(data), get_abi(identity), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::UnprotectAsync(const Windows::Storage::Streams::IBuffer & data) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_UnprotectAsync(get(data), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_UnprotectAsync(get_abi(data), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::ProtectStreamAsync(const Windows::Storage::Streams::IInputStream & unprotectedStream, hstring_ref identity, const Windows::Storage::Streams::IOutputStream & protectedStream) const +template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::ProtectStreamAsync(const Windows::Storage::Streams::IInputStream & unprotectedStream, hstring_view identity, const Windows::Storage::Streams::IOutputStream & protectedStream) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_ProtectStreamAsync(get(unprotectedStream), get(identity), get(protectedStream), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_ProtectStreamAsync(get_abi(unprotectedStream), get_abi(identity), get_abi(protectedStream), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::UnprotectStreamAsync(const Windows::Storage::Streams::IInputStream & protectedStream, const Windows::Storage::Streams::IOutputStream & unprotectedStream) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_UnprotectStreamAsync(get(protectedStream), get(unprotectedStream), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_UnprotectStreamAsync(get_abi(protectedStream), get_abi(unprotectedStream), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::GetProtectionInfoAsync(const Windows::Storage::Streams::IBuffer & protectedData) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetProtectionInfoAsync(get(protectedData), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_GetProtectionInfoAsync(get_abi(protectedData), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IDataProtectionManagerStatics::GetStreamProtectionInfoAsync(const Windows::Storage::Streams::IInputStream & protectedStream) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetStreamProtectionInfoAsync(get(protectedStream), put(result))); + check_hresult(WINRT_SHIM(IDataProtectionManagerStatics)->abi_GetStreamProtectionInfoAsync(get_abi(protectedStream), put_abi(result))); return result; } template Windows::Security::EnterpriseData::DataProtectionStatus impl_IDataProtectionInfo::Status() const { Windows::Security::EnterpriseData::DataProtectionStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IDataProtectionInfo)->get_Status(&value)); return value; } template hstring impl_IDataProtectionInfo::Identity() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Identity(put(value))); + check_hresult(WINRT_SHIM(IDataProtectionInfo)->get_Identity(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IBufferProtectUnprotectResult::Buffer() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Buffer(put(value))); + check_hresult(WINRT_SHIM(IBufferProtectUnprotectResult)->get_Buffer(put_abi(value))); return value; } template Windows::Security::EnterpriseData::DataProtectionInfo impl_IBufferProtectUnprotectResult::ProtectionInfo() const { Windows::Security::EnterpriseData::DataProtectionInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtectionInfo(put(value))); + check_hresult(WINRT_SHIM(IBufferProtectUnprotectResult)->get_ProtectionInfo(put_abi(value))); return value; } -template Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo impl_IProtectionPolicyAuditInfoFactory::Create(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_ref dataDescription, hstring_ref sourceDescription, hstring_ref targetDescription) const +template Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo impl_IProtectionPolicyAuditInfoFactory::Create(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_view dataDescription, hstring_view sourceDescription, hstring_view targetDescription) const { Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(action, get(dataDescription), get(sourceDescription), get(targetDescription), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfoFactory)->abi_Create(action, get_abi(dataDescription), get_abi(sourceDescription), get_abi(targetDescription), put_abi(result))); return result; } -template Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo impl_IProtectionPolicyAuditInfoFactory::CreateWithActionAndDataDescription(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_ref dataDescription) const +template Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo impl_IProtectionPolicyAuditInfoFactory::CreateWithActionAndDataDescription(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_view dataDescription) const { Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithActionAndDataDescription(action, get(dataDescription), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfoFactory)->abi_CreateWithActionAndDataDescription(action, get_abi(dataDescription), put_abi(result))); return result; } template void impl_IProtectionPolicyAuditInfo::Action(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction value) const { - check_hresult(static_cast(static_cast(*this))->put_Action(value)); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->put_Action(value)); } template Windows::Security::EnterpriseData::ProtectionPolicyAuditAction impl_IProtectionPolicyAuditInfo::Action() const { Windows::Security::EnterpriseData::ProtectionPolicyAuditAction value {}; - check_hresult(static_cast(static_cast(*this))->get_Action(&value)); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->get_Action(&value)); return value; } -template void impl_IProtectionPolicyAuditInfo::DataDescription(hstring_ref value) const +template void impl_IProtectionPolicyAuditInfo::DataDescription(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DataDescription(get(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->put_DataDescription(get_abi(value))); } template hstring impl_IProtectionPolicyAuditInfo::DataDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DataDescription(put(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->get_DataDescription(put_abi(value))); return value; } -template void impl_IProtectionPolicyAuditInfo::SourceDescription(hstring_ref value) const +template void impl_IProtectionPolicyAuditInfo::SourceDescription(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceDescription(get(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->put_SourceDescription(get_abi(value))); } template hstring impl_IProtectionPolicyAuditInfo::SourceDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceDescription(put(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->get_SourceDescription(put_abi(value))); return value; } -template void impl_IProtectionPolicyAuditInfo::TargetDescription(hstring_ref value) const +template void impl_IProtectionPolicyAuditInfo::TargetDescription(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetDescription(get(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->put_TargetDescription(get_abi(value))); } template hstring impl_IProtectionPolicyAuditInfo::TargetDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TargetDescription(put(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyAuditInfo)->get_TargetDescription(put_abi(value))); return value; } -template void impl_IProtectionPolicyManager::Identity(hstring_ref value) const +template void impl_IProtectionPolicyManager::Identity(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Identity(get(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyManager)->put_Identity(get_abi(value))); } template hstring impl_IProtectionPolicyManager::Identity() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Identity(put(value))); + check_hresult(WINRT_SHIM(IProtectionPolicyManager)->get_Identity(put_abi(value))); return value; } template void impl_IProtectionPolicyManager2::ShowEnterpriseIndicator(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowEnterpriseIndicator(value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManager2)->put_ShowEnterpriseIndicator(value)); } template bool impl_IProtectionPolicyManager2::ShowEnterpriseIndicator() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowEnterpriseIndicator(&value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManager2)->get_ShowEnterpriseIndicator(&value)); return value; } -template bool impl_IProtectionPolicyManagerStatics::IsIdentityManaged(hstring_ref identity) const +template bool impl_IProtectionPolicyManagerStatics::IsIdentityManaged(hstring_view identity) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsIdentityManaged(get(identity), &result)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_IsIdentityManaged(get_abi(identity), &result)); return result; } -template bool impl_IProtectionPolicyManagerStatics::TryApplyProcessUIPolicy(hstring_ref identity) const +template bool impl_IProtectionPolicyManagerStatics::TryApplyProcessUIPolicy(hstring_view identity) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryApplyProcessUIPolicy(get(identity), &result)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_TryApplyProcessUIPolicy(get_abi(identity), &result)); return result; } template void impl_IProtectionPolicyManagerStatics::ClearProcessUIPolicy() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearProcessUIPolicy()); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_ClearProcessUIPolicy()); } -template Windows::Security::EnterpriseData::ThreadNetworkContext impl_IProtectionPolicyManagerStatics::CreateCurrentThreadNetworkContext(hstring_ref identity) const +template Windows::Security::EnterpriseData::ThreadNetworkContext impl_IProtectionPolicyManagerStatics::CreateCurrentThreadNetworkContext(hstring_view identity) const { Windows::Security::EnterpriseData::ThreadNetworkContext result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCurrentThreadNetworkContext(get(identity), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_CreateCurrentThreadNetworkContext(get_abi(identity), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics::GetPrimaryManagedIdentityForNetworkEndpointAsync(const Windows::Networking::HostName & endpointHost) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetPrimaryManagedIdentityForNetworkEndpointAsync(get(endpointHost), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_GetPrimaryManagedIdentityForNetworkEndpointAsync(get_abi(endpointHost), put_abi(result))); return result; } -template void impl_IProtectionPolicyManagerStatics::RevokeContent(hstring_ref identity) const +template void impl_IProtectionPolicyManagerStatics::RevokeContent(hstring_view identity) const { - check_hresult(static_cast(static_cast(*this))->abi_RevokeContent(get(identity))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_RevokeContent(get_abi(identity))); } template Windows::Security::EnterpriseData::ProtectionPolicyManager impl_IProtectionPolicyManagerStatics::GetForCurrentView() const { Windows::Security::EnterpriseData::ProtectionPolicyManager result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_GetForCurrentView(put_abi(result))); return result; } template event_token impl_IProtectionPolicyManagerStatics::ProtectedAccessSuspending(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProtectedAccessSuspending(get(handler), &token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->add_ProtectedAccessSuspending(get_abi(handler), &token)); return token; } @@ -1597,13 +1682,13 @@ template event_revoker impl_IProte template void impl_IProtectionPolicyManagerStatics::ProtectedAccessSuspending(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProtectedAccessSuspending(token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->remove_ProtectedAccessSuspending(token)); } template event_token impl_IProtectionPolicyManagerStatics::ProtectedAccessResumed(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProtectedAccessResumed(get(handler), &token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->add_ProtectedAccessResumed(get_abi(handler), &token)); return token; } @@ -1614,13 +1699,13 @@ template event_revoker impl_IProte template void impl_IProtectionPolicyManagerStatics::ProtectedAccessResumed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProtectedAccessResumed(token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->remove_ProtectedAccessResumed(token)); } template event_token impl_IProtectionPolicyManagerStatics::ProtectedContentRevoked(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProtectedContentRevoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->add_ProtectedContentRevoked(get_abi(handler), &token)); return token; } @@ -1631,158 +1716,158 @@ template event_revoker impl_IProte template void impl_IProtectionPolicyManagerStatics::ProtectedContentRevoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProtectedContentRevoked(token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->remove_ProtectedContentRevoked(token)); } -template Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult impl_IProtectionPolicyManagerStatics::CheckAccess(hstring_ref sourceIdentity, hstring_ref targetIdentity) const +template Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult impl_IProtectionPolicyManagerStatics::CheckAccess(hstring_view sourceIdentity, hstring_view targetIdentity) const { Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckAccess(get(sourceIdentity), get(targetIdentity), &result)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_CheckAccess(get_abi(sourceIdentity), get_abi(targetIdentity), &result)); return result; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(get(sourceIdentity), get(targetIdentity), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics)->abi_RequestAccessAsync(get_abi(sourceIdentity), get_abi(targetIdentity), put_abi(result))); return result; } -template bool impl_IProtectionPolicyManagerStatics2::HasContentBeenRevokedSince(hstring_ref identity, const Windows::Foundation::DateTime & since) const +template bool impl_IProtectionPolicyManagerStatics2::HasContentBeenRevokedSince(hstring_view identity, const Windows::Foundation::DateTime & since) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_HasContentBeenRevokedSince(get(identity), get(since), &result)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_HasContentBeenRevokedSince(get_abi(identity), get_abi(since), &result)); return result; } -template Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult impl_IProtectionPolicyManagerStatics2::CheckAccessForApp(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName) const +template Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult impl_IProtectionPolicyManagerStatics2::CheckAccessForApp(hstring_view sourceIdentity, hstring_view appPackageFamilyName) const { Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckAccessForApp(get(sourceIdentity), get(appPackageFamilyName), &result)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_CheckAccessForApp(get_abi(sourceIdentity), get_abi(appPackageFamilyName), &result)); return result; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics2::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics2::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessForAppAsync(get(sourceIdentity), get(appPackageFamilyName), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_RequestAccessForAppAsync(get_abi(sourceIdentity), get_abi(appPackageFamilyName), put_abi(result))); return result; } -template Windows::Security::EnterpriseData::EnforcementLevel impl_IProtectionPolicyManagerStatics2::GetEnforcementLevel(hstring_ref identity) const +template Windows::Security::EnterpriseData::EnforcementLevel impl_IProtectionPolicyManagerStatics2::GetEnforcementLevel(hstring_view identity) const { Windows::Security::EnterpriseData::EnforcementLevel value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetEnforcementLevel(get(identity), &value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_GetEnforcementLevel(get_abi(identity), &value)); return value; } -template bool impl_IProtectionPolicyManagerStatics2::IsUserDecryptionAllowed(hstring_ref identity) const +template bool impl_IProtectionPolicyManagerStatics2::IsUserDecryptionAllowed(hstring_view identity) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsUserDecryptionAllowed(get(identity), &value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_IsUserDecryptionAllowed(get_abi(identity), &value)); return value; } -template bool impl_IProtectionPolicyManagerStatics2::IsProtectionUnderLockRequired(hstring_ref identity) const +template bool impl_IProtectionPolicyManagerStatics2::IsProtectionUnderLockRequired(hstring_view identity) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsProtectionUnderLockRequired(get(identity), &value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->abi_IsProtectionUnderLockRequired(get_abi(identity), &value)); return value; } -template event_token impl_IProtectionPolicyManagerStatics2::PolicyChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IProtectionPolicyManagerStatics2::PolicyChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PolicyChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->add_PolicyChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IProtectionPolicyManagerStatics2::PolicyChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IProtectionPolicyManagerStatics2::PolicyChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Security::EnterpriseData::IProtectionPolicyManagerStatics2::remove_PolicyChanged, PolicyChanged(handler)); } template void impl_IProtectionPolicyManagerStatics2::PolicyChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PolicyChanged(token)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->remove_PolicyChanged(token)); } template bool impl_IProtectionPolicyManagerStatics2::IsProtectionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsProtectionEnabled(&value)); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics2)->get_IsProtectionEnabled(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessWithAuditingInfoAsync(get(sourceIdentity), get(targetIdentity), get(auditInfo), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics3)->abi_RequestAccessWithAuditingInfoAsync(get_abi(sourceIdentity), get_abi(targetIdentity), get_abi(auditInfo), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_ref messageFromApp) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_view messageFromApp) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessWithMessageAsync(get(sourceIdentity), get(targetIdentity), get(auditInfo), get(messageFromApp), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics3)->abi_RequestAccessWithMessageAsync(get_abi(sourceIdentity), get_abi(targetIdentity), get_abi(auditInfo), get_abi(messageFromApp), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessForAppWithAuditingInfoAsync(get(sourceIdentity), get(appPackageFamilyName), get(auditInfo), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics3)->abi_RequestAccessForAppWithAuditingInfoAsync(get_abi(sourceIdentity), get_abi(appPackageFamilyName), get_abi(auditInfo), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_ref messageFromApp) const +template Windows::Foundation::IAsyncOperation impl_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_view messageFromApp) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessForAppWithMessageAsync(get(sourceIdentity), get(appPackageFamilyName), get(auditInfo), get(messageFromApp), put(result))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics3)->abi_RequestAccessForAppWithMessageAsync(get_abi(sourceIdentity), get_abi(appPackageFamilyName), get_abi(auditInfo), get_abi(messageFromApp), put_abi(result))); return result; } -template void impl_IProtectionPolicyManagerStatics3::LogAuditEvent(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const +template void impl_IProtectionPolicyManagerStatics3::LogAuditEvent(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) const { - check_hresult(static_cast(static_cast(*this))->abi_LogAuditEvent(get(sourceIdentity), get(targetIdentity), get(auditInfo))); + check_hresult(WINRT_SHIM(IProtectionPolicyManagerStatics3)->abi_LogAuditEvent(get_abi(sourceIdentity), get_abi(targetIdentity), get_abi(auditInfo))); } template Windows::Foundation::Collections::IVectorView impl_IProtectedAccessSuspendingEventArgs::Identities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Identities(put(value))); + check_hresult(WINRT_SHIM(IProtectedAccessSuspendingEventArgs)->get_Identities(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IProtectedAccessSuspendingEventArgs::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IProtectedAccessSuspendingEventArgs)->get_Deadline(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_IProtectedAccessSuspendingEventArgs::GetDeferral() const { Windows::Foundation::Deferral result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(result))); + check_hresult(WINRT_SHIM(IProtectedAccessSuspendingEventArgs)->abi_GetDeferral(put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IProtectedAccessResumedEventArgs::Identities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Identities(put(value))); + check_hresult(WINRT_SHIM(IProtectedAccessResumedEventArgs)->get_Identities(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IProtectedContentRevokedEventArgs::Identities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Identities(put(value))); + check_hresult(WINRT_SHIM(IProtectedContentRevokedEventArgs)->get_Identities(put_abi(value))); return value; } -inline Windows::Foundation::IAsyncOperation DataProtectionManager::ProtectAsync(const Windows::Storage::Streams::IBuffer & data, hstring_ref identity) +inline Windows::Foundation::IAsyncOperation DataProtectionManager::ProtectAsync(const Windows::Storage::Streams::IBuffer & data, hstring_view identity) { return get_activation_factory().ProtectAsync(data, identity); } @@ -1792,7 +1877,7 @@ inline Windows::Foundation::IAsyncOperation().UnprotectAsync(data); } -inline Windows::Foundation::IAsyncOperation DataProtectionManager::ProtectStreamAsync(const Windows::Storage::Streams::IInputStream & unprotectedStream, hstring_ref identity, const Windows::Storage::Streams::IOutputStream & protectedStream) +inline Windows::Foundation::IAsyncOperation DataProtectionManager::ProtectStreamAsync(const Windows::Storage::Streams::IInputStream & unprotectedStream, hstring_view identity, const Windows::Storage::Streams::IOutputStream & protectedStream) { return get_activation_factory().ProtectStreamAsync(unprotectedStream, identity, protectedStream); } @@ -1812,7 +1897,7 @@ inline Windows::Foundation::IAsyncOperation().GetStreamProtectionInfoAsync(protectedStream); } -inline Windows::Foundation::IAsyncOperation FileProtectionManager::ProtectAsync(const Windows::Storage::IStorageItem & target, hstring_ref identity) +inline Windows::Foundation::IAsyncOperation FileProtectionManager::ProtectAsync(const Windows::Storage::IStorageItem & target, hstring_view identity) { return get_activation_factory().ProtectAsync(target, identity); } @@ -1842,7 +1927,7 @@ inline Windows::Foundation::IAsyncOperation().LoadFileFromContainerAsync(containerFile, target); } -inline Windows::Foundation::IAsyncOperation FileProtectionManager::CreateProtectedAndOpenAsync(const Windows::Storage::IStorageFolder & parentFolder, hstring_ref desiredName, hstring_ref identity, Windows::Storage::CreationCollisionOption collisionOption) +inline Windows::Foundation::IAsyncOperation FileProtectionManager::CreateProtectedAndOpenAsync(const Windows::Storage::IStorageFolder & parentFolder, hstring_view desiredName, hstring_view identity, Windows::Storage::CreationCollisionOption collisionOption) { return get_activation_factory().CreateProtectedAndOpenAsync(parentFolder, desiredName, identity, collisionOption); } @@ -1857,12 +1942,12 @@ inline Windows::Foundation::IAsyncOperation().LoadFileFromContainerAsync(containerFile, target, collisionOption); } -inline Windows::Foundation::IAsyncOperation FileProtectionManager::SaveFileAsContainerAsync(const Windows::Storage::IStorageFile & protectedFile, const Windows::Foundation::Collections::IIterable & sharedWithIdentities) +inline Windows::Foundation::IAsyncOperation FileProtectionManager::SaveFileAsContainerAsync(const Windows::Storage::IStorageFile & protectedFile, iterable sharedWithIdentities) { return get_activation_factory().SaveFileAsContainerAsync(protectedFile, sharedWithIdentities); } -inline Windows::Foundation::IAsyncOperation FileRevocationManager::ProtectAsync(const Windows::Storage::IStorageItem & storageItem, hstring_ref enterpriseIdentity) +inline Windows::Foundation::IAsyncOperation FileRevocationManager::ProtectAsync(const Windows::Storage::IStorageItem & storageItem, hstring_view enterpriseIdentity) { return get_activation_factory().ProtectAsync(storageItem, enterpriseIdentity); } @@ -1872,7 +1957,7 @@ inline Windows::Foundation::IAsyncOperation FileRevocationManager::CopyPro return get_activation_factory().CopyProtectionAsync(sourceStorageItem, targetStorageItem); } -inline void FileRevocationManager::Revoke(hstring_ref enterpriseIdentity) +inline void FileRevocationManager::Revoke(hstring_view enterpriseIdentity) { get_activation_factory().Revoke(enterpriseIdentity); } @@ -1882,20 +1967,20 @@ inline Windows::Foundation::IAsyncOperation().GetStatusAsync(storageItem); } -inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_ref dataDescription, hstring_ref sourceDescription, hstring_ref targetDescription) : +inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_view dataDescription, hstring_view sourceDescription, hstring_view targetDescription) : ProtectionPolicyAuditInfo(get_activation_factory().Create(action, dataDescription, sourceDescription, targetDescription)) {} -inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_ref dataDescription) : +inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(Windows::Security::EnterpriseData::ProtectionPolicyAuditAction action, hstring_view dataDescription) : ProtectionPolicyAuditInfo(get_activation_factory().CreateWithActionAndDataDescription(action, dataDescription)) {} -inline bool ProtectionPolicyManager::IsIdentityManaged(hstring_ref identity) +inline bool ProtectionPolicyManager::IsIdentityManaged(hstring_view identity) { return get_activation_factory().IsIdentityManaged(identity); } -inline bool ProtectionPolicyManager::TryApplyProcessUIPolicy(hstring_ref identity) +inline bool ProtectionPolicyManager::TryApplyProcessUIPolicy(hstring_view identity) { return get_activation_factory().TryApplyProcessUIPolicy(identity); } @@ -1905,7 +1990,7 @@ inline void ProtectionPolicyManager::ClearProcessUIPolicy() get_activation_factory().ClearProcessUIPolicy(); } -inline Windows::Security::EnterpriseData::ThreadNetworkContext ProtectionPolicyManager::CreateCurrentThreadNetworkContext(hstring_ref identity) +inline Windows::Security::EnterpriseData::ThreadNetworkContext ProtectionPolicyManager::CreateCurrentThreadNetworkContext(hstring_view identity) { return get_activation_factory().CreateCurrentThreadNetworkContext(identity); } @@ -1915,7 +2000,7 @@ inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::Ge return get_activation_factory().GetPrimaryManagedIdentityForNetworkEndpointAsync(endpointHost); } -inline void ProtectionPolicyManager::RevokeContent(hstring_ref identity) +inline void ProtectionPolicyManager::RevokeContent(hstring_view identity) { get_activation_factory().RevokeContent(identity); } @@ -1973,52 +2058,52 @@ inline void ProtectionPolicyManager::ProtectedContentRevoked(event_token token) get_activation_factory().ProtectedContentRevoked(token); } -inline Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult ProtectionPolicyManager::CheckAccess(hstring_ref sourceIdentity, hstring_ref targetIdentity) +inline Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult ProtectionPolicyManager::CheckAccess(hstring_view sourceIdentity, hstring_view targetIdentity) { return get_activation_factory().CheckAccess(sourceIdentity, targetIdentity); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity) { return get_activation_factory().RequestAccessAsync(sourceIdentity, targetIdentity); } -inline bool ProtectionPolicyManager::HasContentBeenRevokedSince(hstring_ref identity, const Windows::Foundation::DateTime & since) +inline bool ProtectionPolicyManager::HasContentBeenRevokedSince(hstring_view identity, const Windows::Foundation::DateTime & since) { return get_activation_factory().HasContentBeenRevokedSince(identity, since); } -inline Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult ProtectionPolicyManager::CheckAccessForApp(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName) +inline Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult ProtectionPolicyManager::CheckAccessForApp(hstring_view sourceIdentity, hstring_view appPackageFamilyName) { return get_activation_factory().CheckAccessForApp(sourceIdentity, appPackageFamilyName); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName) { return get_activation_factory().RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName); } -inline Windows::Security::EnterpriseData::EnforcementLevel ProtectionPolicyManager::GetEnforcementLevel(hstring_ref identity) +inline Windows::Security::EnterpriseData::EnforcementLevel ProtectionPolicyManager::GetEnforcementLevel(hstring_view identity) { return get_activation_factory().GetEnforcementLevel(identity); } -inline bool ProtectionPolicyManager::IsUserDecryptionAllowed(hstring_ref identity) +inline bool ProtectionPolicyManager::IsUserDecryptionAllowed(hstring_view identity) { return get_activation_factory().IsUserDecryptionAllowed(identity); } -inline bool ProtectionPolicyManager::IsProtectionUnderLockRequired(hstring_ref identity) +inline bool ProtectionPolicyManager::IsProtectionUnderLockRequired(hstring_view identity) { return get_activation_factory().IsProtectionUnderLockRequired(identity); } -inline event_token ProtectionPolicyManager::PolicyChanged(const Windows::Foundation::EventHandler & handler) +inline event_token ProtectionPolicyManager::PolicyChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PolicyChanged(handler); } -inline factory_event_revoker ProtectionPolicyManager::PolicyChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker ProtectionPolicyManager::PolicyChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::Security::EnterpriseData::IProtectionPolicyManagerStatics2::remove_PolicyChanged, factory.PolicyChanged(handler) }; @@ -2034,27 +2119,27 @@ inline bool ProtectionPolicyManager::IsProtectionEnabled() return get_activation_factory().IsProtectionEnabled(); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) { return get_activation_factory().RequestAccessAsync(sourceIdentity, targetIdentity, auditInfo); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_ref messageFromApp) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessAsync(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_view messageFromApp) { return get_activation_factory().RequestAccessAsync(sourceIdentity, targetIdentity, auditInfo, messageFromApp); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) { return get_activation_factory().RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo); } -inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_ref sourceIdentity, hstring_ref appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_ref messageFromApp) +inline Windows::Foundation::IAsyncOperation ProtectionPolicyManager::RequestAccessForAppAsync(hstring_view sourceIdentity, hstring_view appPackageFamilyName, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo, hstring_view messageFromApp) { return get_activation_factory().RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp); } -inline void ProtectionPolicyManager::LogAuditEvent(hstring_ref sourceIdentity, hstring_ref targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) +inline void ProtectionPolicyManager::LogAuditEvent(hstring_view sourceIdentity, hstring_view targetIdentity, const Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & auditInfo) { get_activation_factory().LogAuditEvent(sourceIdentity, targetIdentity, auditInfo); } @@ -2062,3 +2147,302 @@ inline void ProtectionPolicyManager::LogAuditEvent(hstring_ref sourceIdentity, h } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IBufferProtectUnprotectResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IDataProtectionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IDataProtectionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IFileProtectionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IFileProtectionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IFileProtectionManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IFileRevocationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedAccessResumedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedAccessSuspendingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedContainerExportResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedContainerImportResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedContentRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectedFileCreateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyAuditInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyAuditInfoFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IProtectionPolicyManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::IThreadNetworkContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::BufferProtectUnprotectResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::DataProtectionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::FileProtectionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedAccessResumedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedAccessSuspendingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedContainerExportResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedContainerImportResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedContentRevokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectedFileCreateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ProtectionPolicyManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::EnterpriseData::ThreadNetworkContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Security.ExchangeActiveSyncProvisioning.h b/10.0.14393.0/winrt/Windows.Security.ExchangeActiveSyncProvisioning.h index ef8cdd5c3..51b517ac9 100644 --- a/10.0.14393.0/winrt/Windows.Security.ExchangeActiveSyncProvisioning.h +++ b/10.0.14393.0/winrt/Windows.Security.ExchangeActiveSyncProvisioning.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Security.ExchangeActiveSyncProvisioning.3.h" @@ -17,7 +20,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -26,11 +30,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OperatingSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OperatingSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OperatingSystem()); return S_OK; } catch (...) @@ -40,11 +45,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FriendlyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FriendlyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FriendlyName()); return S_OK; } catch (...) @@ -54,11 +60,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SystemManufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemManufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemManufacturer()); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SystemProductName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemProductName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemProductName()); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SystemSku(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemSku()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemSku()); return S_OK; } catch (...) @@ -100,11 +109,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SystemHardwareVersion(abi_arg_out value) noexcept override + HRESULT __stdcall get_SystemHardwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemHardwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemHardwareVersion()); return S_OK; } catch (...) @@ -114,11 +124,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SystemFirmwareVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SystemFirmwareVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemFirmwareVersion()); return S_OK; } catch (...) @@ -136,7 +147,8 @@ struct produceshim().RequireEncryption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequireEncryption()); return S_OK; } catch (...) @@ -149,6 +161,7 @@ struct produceshim()); this->shim().RequireEncryption(value); return S_OK; } @@ -162,7 +175,8 @@ struct produceshim().MinPasswordLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinPasswordLength()); return S_OK; } catch (...) @@ -175,6 +189,7 @@ struct produceshim()); this->shim().MinPasswordLength(value); return S_OK; } @@ -188,7 +203,8 @@ struct produceshim().DisallowConvenienceLogon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisallowConvenienceLogon()); return S_OK; } catch (...) @@ -201,6 +217,7 @@ struct produceshim()); this->shim().DisallowConvenienceLogon(value); return S_OK; } @@ -214,7 +231,8 @@ struct produceshim().MinPasswordComplexCharacters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinPasswordComplexCharacters()); return S_OK; } catch (...) @@ -227,6 +245,7 @@ struct produceshim()); this->shim().MinPasswordComplexCharacters(value); return S_OK; } @@ -236,11 +255,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PasswordExpiration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordExpiration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordExpiration()); return S_OK; } catch (...) @@ -249,10 +269,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PasswordExpiration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PasswordExpiration(*reinterpret_cast(&value)); return S_OK; } @@ -266,7 +287,8 @@ struct produceshim().PasswordHistory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordHistory()); return S_OK; } catch (...) @@ -279,6 +301,7 @@ struct produceshim()); this->shim().PasswordHistory(value); return S_OK; } @@ -292,7 +315,8 @@ struct produceshim().MaxPasswordFailedAttempts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPasswordFailedAttempts()); return S_OK; } catch (...) @@ -305,6 +329,7 @@ struct produceshim()); this->shim().MaxPasswordFailedAttempts(value); return S_OK; } @@ -314,11 +339,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxInactivityTimeLock(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxInactivityTimeLock()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxInactivityTimeLock()); return S_OK; } catch (...) @@ -327,10 +353,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_MaxInactivityTimeLock(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxInactivityTimeLock(*reinterpret_cast(&value)); return S_OK; } @@ -340,11 +367,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_CheckCompliance(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CheckCompliance()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CheckCompliance()); return S_OK; } catch (...) @@ -354,11 +382,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_ApplyAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ApplyAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ApplyAsync()); return S_OK; } catch (...) @@ -376,7 +405,8 @@ struct produceshim().Compliant()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Compliant()); return S_OK; } catch (...) @@ -389,7 +419,8 @@ struct produceshim().RequireEncryptionResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequireEncryptionResult()); return S_OK; } catch (...) @@ -402,7 +433,8 @@ struct produceshim().MinPasswordLengthResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinPasswordLengthResult()); return S_OK; } catch (...) @@ -415,7 +447,8 @@ struct produceshim().DisallowConvenienceLogonResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisallowConvenienceLogonResult()); return S_OK; } catch (...) @@ -428,7 +461,8 @@ struct produceshim().MinPasswordComplexCharactersResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinPasswordComplexCharactersResult()); return S_OK; } catch (...) @@ -441,7 +475,8 @@ struct produceshim().PasswordExpirationResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordExpirationResult()); return S_OK; } catch (...) @@ -454,7 +489,8 @@ struct produceshim().PasswordHistoryResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordHistoryResult()); return S_OK; } catch (...) @@ -467,7 +503,8 @@ struct produceshim().MaxPasswordFailedAttemptsResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPasswordFailedAttemptsResult()); return S_OK; } catch (...) @@ -480,7 +517,8 @@ struct produceshim().MaxInactivityTimeLockResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxInactivityTimeLockResult()); return S_OK; } catch (...) @@ -497,7 +535,8 @@ struct produceshim().EncryptionProviderType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncryptionProviderType()); return S_OK; } catch (...) @@ -514,236 +553,236 @@ namespace Windows::Security::ExchangeActiveSyncProvisioning { template GUID impl_IEasClientDeviceInformation::Id() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_Id(&value)); return value; } template hstring impl_IEasClientDeviceInformation::OperatingSystem() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_OperatingSystem(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_OperatingSystem(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation::FriendlyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FriendlyName(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_FriendlyName(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation::SystemManufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SystemManufacturer(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_SystemManufacturer(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation::SystemProductName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SystemProductName(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_SystemProductName(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation::SystemSku() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SystemSku(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation)->get_SystemSku(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation2::SystemHardwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SystemHardwareVersion(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation2)->get_SystemHardwareVersion(put_abi(value))); return value; } template hstring impl_IEasClientDeviceInformation2::SystemFirmwareVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SystemFirmwareVersion(put(value))); + check_hresult(WINRT_SHIM(IEasClientDeviceInformation2)->get_SystemFirmwareVersion(put_abi(value))); return value; } template bool impl_IEasClientSecurityPolicy::RequireEncryption() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RequireEncryption(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_RequireEncryption(&value)); return value; } template void impl_IEasClientSecurityPolicy::RequireEncryption(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RequireEncryption(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_RequireEncryption(value)); } template uint8_t impl_IEasClientSecurityPolicy::MinPasswordLength() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinPasswordLength(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_MinPasswordLength(&value)); return value; } template void impl_IEasClientSecurityPolicy::MinPasswordLength(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MinPasswordLength(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_MinPasswordLength(value)); } template bool impl_IEasClientSecurityPolicy::DisallowConvenienceLogon() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DisallowConvenienceLogon(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_DisallowConvenienceLogon(&value)); return value; } template void impl_IEasClientSecurityPolicy::DisallowConvenienceLogon(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DisallowConvenienceLogon(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_DisallowConvenienceLogon(value)); } template uint8_t impl_IEasClientSecurityPolicy::MinPasswordComplexCharacters() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinPasswordComplexCharacters(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_MinPasswordComplexCharacters(&value)); return value; } template void impl_IEasClientSecurityPolicy::MinPasswordComplexCharacters(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MinPasswordComplexCharacters(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_MinPasswordComplexCharacters(value)); } template Windows::Foundation::TimeSpan impl_IEasClientSecurityPolicy::PasswordExpiration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_PasswordExpiration(put(value))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_PasswordExpiration(put_abi(value))); return value; } template void impl_IEasClientSecurityPolicy::PasswordExpiration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_PasswordExpiration(get(value))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_PasswordExpiration(get_abi(value))); } template uint32_t impl_IEasClientSecurityPolicy::PasswordHistory() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PasswordHistory(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_PasswordHistory(&value)); return value; } template void impl_IEasClientSecurityPolicy::PasswordHistory(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_PasswordHistory(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_PasswordHistory(value)); } template uint8_t impl_IEasClientSecurityPolicy::MaxPasswordFailedAttempts() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPasswordFailedAttempts(&value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_MaxPasswordFailedAttempts(&value)); return value; } template void impl_IEasClientSecurityPolicy::MaxPasswordFailedAttempts(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPasswordFailedAttempts(value)); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_MaxPasswordFailedAttempts(value)); } template Windows::Foundation::TimeSpan impl_IEasClientSecurityPolicy::MaxInactivityTimeLock() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxInactivityTimeLock(put(value))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->get_MaxInactivityTimeLock(put_abi(value))); return value; } template void impl_IEasClientSecurityPolicy::MaxInactivityTimeLock(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxInactivityTimeLock(get(value))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->put_MaxInactivityTimeLock(get_abi(value))); } template Windows::Security::ExchangeActiveSyncProvisioning::EasComplianceResults impl_IEasClientSecurityPolicy::CheckCompliance() const { Windows::Security::ExchangeActiveSyncProvisioning::EasComplianceResults result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CheckCompliance(put(result))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->abi_CheckCompliance(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IEasClientSecurityPolicy::ApplyAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ApplyAsync(put(operation))); + check_hresult(WINRT_SHIM(IEasClientSecurityPolicy)->abi_ApplyAsync(put_abi(operation))); return operation; } template bool impl_IEasComplianceResults::Compliant() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Compliant(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_Compliant(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasRequireEncryptionResult impl_IEasComplianceResults::RequireEncryptionResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasRequireEncryptionResult value {}; - check_hresult(static_cast(static_cast(*this))->get_RequireEncryptionResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_RequireEncryptionResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasMinPasswordLengthResult impl_IEasComplianceResults::MinPasswordLengthResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasMinPasswordLengthResult value {}; - check_hresult(static_cast(static_cast(*this))->get_MinPasswordLengthResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_MinPasswordLengthResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasDisallowConvenienceLogonResult impl_IEasComplianceResults::DisallowConvenienceLogonResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasDisallowConvenienceLogonResult value {}; - check_hresult(static_cast(static_cast(*this))->get_DisallowConvenienceLogonResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_DisallowConvenienceLogonResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasMinPasswordComplexCharactersResult impl_IEasComplianceResults::MinPasswordComplexCharactersResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasMinPasswordComplexCharactersResult value {}; - check_hresult(static_cast(static_cast(*this))->get_MinPasswordComplexCharactersResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_MinPasswordComplexCharactersResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasPasswordExpirationResult impl_IEasComplianceResults::PasswordExpirationResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasPasswordExpirationResult value {}; - check_hresult(static_cast(static_cast(*this))->get_PasswordExpirationResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_PasswordExpirationResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasPasswordHistoryResult impl_IEasComplianceResults::PasswordHistoryResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasPasswordHistoryResult value {}; - check_hresult(static_cast(static_cast(*this))->get_PasswordHistoryResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_PasswordHistoryResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasMaxPasswordFailedAttemptsResult impl_IEasComplianceResults::MaxPasswordFailedAttemptsResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasMaxPasswordFailedAttemptsResult value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPasswordFailedAttemptsResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_MaxPasswordFailedAttemptsResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasMaxInactivityTimeLockResult impl_IEasComplianceResults::MaxInactivityTimeLockResult() const { Windows::Security::ExchangeActiveSyncProvisioning::EasMaxInactivityTimeLockResult value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxInactivityTimeLockResult(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults)->get_MaxInactivityTimeLockResult(&value)); return value; } template Windows::Security::ExchangeActiveSyncProvisioning::EasEncryptionProviderType impl_IEasComplianceResults2::EncryptionProviderType() const { Windows::Security::ExchangeActiveSyncProvisioning::EasEncryptionProviderType value {}; - check_hresult(static_cast(static_cast(*this))->get_EncryptionProviderType(&value)); + check_hresult(WINRT_SHIM(IEasComplianceResults2)->get_EncryptionProviderType(&value)); return value; } @@ -758,3 +797,77 @@ inline EasClientSecurityPolicy::EasClientSecurityPolicy() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::IEasClientDeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::IEasClientDeviceInformation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::IEasClientSecurityPolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::IEasComplianceResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::IEasComplianceResults2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::EasClientDeviceInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::EasClientSecurityPolicy & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Security::ExchangeActiveSyncProvisioning::EasComplianceResults & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Services.Maps.Guidance.h b/10.0.14393.0/winrt/Windows.Services.Maps.Guidance.h index bbcae2fc1..3ee763029 100644 --- a/10.0.14393.0/winrt/Windows.Services.Maps.Guidance.h +++ b/10.0.14393.0/winrt/Windows.Services.Maps.Guidance.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Devices.Geolocation.3.h" @@ -22,7 +25,8 @@ struct produceshim().AudioNotification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioNotification()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_AudioFilePaths(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AudioFilePaths()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioFilePaths()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AudioText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioText()); return S_OK; } catch (...) @@ -67,7 +73,8 @@ struct produce : produc { try { - *value = detach(this->shim().LaneMarkers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LaneMarkers()); return S_OK; } catch (...) @@ -80,7 +87,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsOnRoute()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnRoute()); return S_OK; } catch (...) @@ -93,11 +101,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_StartLocation(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartLocation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartLocation()); return S_OK; } catch (...) @@ -111,7 +120,8 @@ struct produce : produc { try { - *value = detach(this->shim().DistanceFromRouteStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistanceFromRouteStart()); return S_OK; } catch (...) @@ -124,7 +134,8 @@ struct produce : produc { try { - *value = detach(this->shim().DistanceFromPreviousManeuver()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistanceFromPreviousManeuver()); return S_OK; } catch (...) @@ -133,11 +144,12 @@ struct produce : produc } } - HRESULT __stdcall get_DepartureRoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DepartureRoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DepartureRoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepartureRoadName()); return S_OK; } catch (...) @@ -147,11 +159,12 @@ struct produce : produc } } - HRESULT __stdcall get_NextRoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_NextRoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextRoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextRoadName()); return S_OK; } catch (...) @@ -161,11 +174,12 @@ struct produce : produc } } - HRESULT __stdcall get_DepartureShortRoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DepartureShortRoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DepartureShortRoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DepartureShortRoadName()); return S_OK; } catch (...) @@ -175,11 +189,12 @@ struct produce : produc } } - HRESULT __stdcall get_NextShortRoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_NextShortRoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextShortRoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextShortRoadName()); return S_OK; } catch (...) @@ -193,7 +208,8 @@ struct produce : produc { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -206,7 +222,8 @@ struct produce : produc { try { - *value = detach(this->shim().StartAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartAngle()); return S_OK; } catch (...) @@ -219,7 +236,8 @@ struct produce : produc { try { - *value = detach(this->shim().EndAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndAngle()); return S_OK; } catch (...) @@ -228,11 +246,12 @@ struct produce : produc } } - HRESULT __stdcall get_RoadSignpost(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoadSignpost(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoadSignpost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoadSignpost()); return S_OK; } catch (...) @@ -242,11 +261,12 @@ struct produce : produc } } - HRESULT __stdcall get_InstructionText(abi_arg_out value) noexcept override + HRESULT __stdcall get_InstructionText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstructionText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstructionText()); return S_OK; } catch (...) @@ -260,11 +280,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -278,7 +299,8 @@ struct produceshim().CurrentHeading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentHeading()); return S_OK; } catch (...) @@ -291,7 +313,8 @@ struct produceshim().CurrentSpeed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentSpeed()); return S_OK; } catch (...) @@ -304,7 +327,8 @@ struct produceshim().IsOnStreet()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnStreet()); return S_OK; } catch (...) @@ -313,11 +337,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Road(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Road()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Road()); return S_OK; } catch (...) @@ -331,10 +356,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_StartNavigating(abi_arg_in route) noexcept override + HRESULT __stdcall abi_StartNavigating(impl::abi_arg_in route) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartNavigating(*reinterpret_cast(&route)); return S_OK; } @@ -344,10 +370,11 @@ struct produce : produ } } - HRESULT __stdcall abi_StartSimulating(abi_arg_in route, int32_t speedInMetersPerSecond) noexcept override + HRESULT __stdcall abi_StartSimulating(impl::abi_arg_in route, int32_t speedInMetersPerSecond) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartSimulating(*reinterpret_cast(&route), speedInMetersPerSecond); return S_OK; } @@ -361,6 +388,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().StartTracking(); return S_OK; } @@ -374,6 +402,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Pause(); return S_OK; } @@ -387,6 +416,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Resume(); return S_OK; } @@ -400,6 +430,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -413,6 +444,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().RepeatLastAudioNotification(); return S_OK; } @@ -426,7 +458,8 @@ struct produce : produ { try { - *value = detach(this->shim().AudioMeasurementSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioMeasurementSystem()); return S_OK; } catch (...) @@ -439,6 +472,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioMeasurementSystem(value); return S_OK; } @@ -452,7 +486,8 @@ struct produce : produ { try { - *value = detach(this->shim().AudioNotifications()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioNotifications()); return S_OK; } catch (...) @@ -465,6 +500,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioNotifications(value); return S_OK; } @@ -474,11 +510,12 @@ struct produce : produ } } - HRESULT __stdcall add_GuidanceUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_GuidanceUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().GuidanceUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().GuidanceUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -491,6 +528,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().GuidanceUpdated(token); return S_OK; } @@ -500,11 +538,12 @@ struct produce : produ } } - HRESULT __stdcall add_DestinationReached(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_DestinationReached(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DestinationReached(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DestinationReached(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -517,6 +556,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().DestinationReached(token); return S_OK; } @@ -526,11 +566,12 @@ struct produce : produ } } - HRESULT __stdcall add_Rerouting(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Rerouting(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Rerouting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Rerouting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -543,6 +584,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Rerouting(token); return S_OK; } @@ -552,11 +594,12 @@ struct produce : produ } } - HRESULT __stdcall add_Rerouted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Rerouted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Rerouted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Rerouted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -569,6 +612,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Rerouted(token); return S_OK; } @@ -578,11 +622,12 @@ struct produce : produ } } - HRESULT __stdcall add_RerouteFailed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RerouteFailed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RerouteFailed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RerouteFailed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -595,6 +640,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().RerouteFailed(token); return S_OK; } @@ -604,11 +650,12 @@ struct produce : produ } } - HRESULT __stdcall add_UserLocationLost(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UserLocationLost(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UserLocationLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UserLocationLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -621,6 +668,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().UserLocationLost(token); return S_OK; } @@ -630,11 +678,12 @@ struct produce : produ } } - HRESULT __stdcall add_UserLocationRestored(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UserLocationRestored(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UserLocationRestored(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UserLocationRestored(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -647,6 +696,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().UserLocationRestored(token); return S_OK; } @@ -656,10 +706,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetGuidanceVoice(int32_t voiceId, abi_arg_in voiceFolder) noexcept override + HRESULT __stdcall abi_SetGuidanceVoice(int32_t voiceId, impl::abi_arg_in voiceFolder) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetGuidanceVoice(voiceId, *reinterpret_cast(&voiceFolder)); return S_OK; } @@ -669,10 +720,11 @@ struct produce : produ } } - HRESULT __stdcall abi_UpdateUserLocation(abi_arg_in userLocation) noexcept override + HRESULT __stdcall abi_UpdateUserLocation(impl::abi_arg_in userLocation) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateUserLocation(*reinterpret_cast(&userLocation)); return S_OK; } @@ -682,10 +734,11 @@ struct produce : produ } } - HRESULT __stdcall abi_UpdateUserLocationWithPositionOverride(abi_arg_in userLocation, abi_arg_in positionOverride) noexcept override + HRESULT __stdcall abi_UpdateUserLocationWithPositionOverride(impl::abi_arg_in userLocation, impl::abi_arg_in positionOverride) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateUserLocation(*reinterpret_cast(&userLocation), *reinterpret_cast(&positionOverride)); return S_OK; } @@ -699,11 +752,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall add_AudioNotificationRequested(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_AudioNotificationRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().AudioNotificationRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AudioNotificationRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -716,6 +770,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioNotificationRequested(token); return S_OK; } @@ -729,7 +784,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsGuidanceAudioMuted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGuidanceAudioMuted()); return S_OK; } catch (...) @@ -742,6 +798,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsGuidanceAudioMuted(value); return S_OK; } @@ -755,11 +812,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetCurrent(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetCurrent(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetCurrent()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCurrent()); return S_OK; } catch (...) @@ -777,7 +835,8 @@ struct produce { try { - *value = detach(this->shim().UseAppProvidedVoice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseAppProvidedVoice()); return S_OK; } catch (...) @@ -790,11 +849,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Route(abi_arg_out result) noexcept override + HRESULT __stdcall get_Route(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Route()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Route()); return S_OK; } catch (...) @@ -808,11 +868,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_RoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoadName()); return S_OK; } catch (...) @@ -822,11 +883,12 @@ struct produce : pro } } - HRESULT __stdcall get_ShortRoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShortRoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShortRoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShortRoadName()); return S_OK; } catch (...) @@ -840,7 +902,8 @@ struct produce : pro { try { - *value = detach(this->shim().SpeedLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpeedLimit()); return S_OK; } catch (...) @@ -849,11 +912,12 @@ struct produce : pro } } - HRESULT __stdcall get_TravelTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_TravelTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TravelTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TravelTime()); return S_OK; } catch (...) @@ -862,11 +926,12 @@ struct produce : pro } } - HRESULT __stdcall get_Path(abi_arg_out value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -876,11 +941,12 @@ struct produce : pro } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -894,7 +960,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsHighway()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHighway()); return S_OK; } catch (...) @@ -907,7 +974,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsTunnel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTunnel()); return S_OK; } catch (...) @@ -920,7 +988,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsTollRoad()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTollRoad()); return S_OK; } catch (...) @@ -933,11 +1002,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_ExitNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExitNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExitNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExitNumber()); return S_OK; } catch (...) @@ -947,11 +1017,12 @@ struct produce : pr } } - HRESULT __stdcall get_Exit(abi_arg_out value) noexcept override + HRESULT __stdcall get_Exit(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Exit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Exit()); return S_OK; } catch (...) @@ -961,11 +1032,12 @@ struct produce : pr } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -974,11 +1046,12 @@ struct produce : pr } } - HRESULT __stdcall get_ForegroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -987,11 +1060,12 @@ struct produce : pr } } - HRESULT __stdcall get_ExitDirections(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExitDirections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExitDirections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExitDirections()); return S_OK; } catch (...) @@ -1005,11 +1079,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -1022,7 +1097,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Distance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Distance()); return S_OK; } catch (...) @@ -1031,11 +1107,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Maneuvers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Maneuvers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Maneuvers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maneuvers()); return S_OK; } catch (...) @@ -1045,11 +1122,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_BoundingBox(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundingBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingBox()); return S_OK; } catch (...) @@ -1059,11 +1137,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Path(abi_arg_out value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -1073,11 +1152,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_RoadSegments(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RoadSegments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RoadSegments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoadSegments()); return S_OK; } catch (...) @@ -1087,11 +1167,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_ConvertToMapRoute(abi_arg_out result) noexcept override + HRESULT __stdcall abi_ConvertToMapRoute(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().ConvertToMapRoute()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().ConvertToMapRoute()); return S_OK; } catch (...) @@ -1105,11 +1186,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CanCreateFromMapRoute(abi_arg_in mapRoute, bool * result) noexcept override + HRESULT __stdcall abi_CanCreateFromMapRoute(impl::abi_arg_in mapRoute, bool * result) noexcept override { try { - *result = detach(this->shim().CanCreateFromMapRoute(*reinterpret_cast(&mapRoute))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanCreateFromMapRoute(*reinterpret_cast(&mapRoute))); return S_OK; } catch (...) @@ -1118,11 +1200,12 @@ struct produce : pr } } - HRESULT __stdcall abi_TryCreateFromMapRoute(abi_arg_in mapRoute, abi_arg_out result) noexcept override + HRESULT __stdcall abi_TryCreateFromMapRoute(impl::abi_arg_in mapRoute, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().TryCreateFromMapRoute(*reinterpret_cast(&mapRoute))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryCreateFromMapRoute(*reinterpret_cast(&mapRoute))); return S_OK; } catch (...) @@ -1140,7 +1223,8 @@ struct produceshim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -1153,6 +1237,7 @@ struct produceshim()); this->shim().Enabled(value); return S_OK; } @@ -1166,6 +1251,7 @@ struct produceshim()); this->shim().ClearLocalData(); return S_OK; } @@ -1179,7 +1265,8 @@ struct produceshim().SpeedTrigger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpeedTrigger()); return S_OK; } catch (...) @@ -1192,6 +1279,7 @@ struct produceshim()); this->shim().SpeedTrigger(value); return S_OK; } @@ -1205,7 +1293,8 @@ struct produceshim().UploadFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UploadFrequency()); return S_OK; } catch (...) @@ -1218,6 +1307,7 @@ struct produceshim()); this->shim().UploadFrequency(value); return S_OK; } @@ -1231,11 +1321,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetCurrent(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetCurrent(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetCurrent()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCurrent()); return S_OK; } catch (...) @@ -1253,7 +1344,8 @@ struct produce { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -1262,11 +1354,12 @@ struct produce } } - HRESULT __stdcall get_NextManeuver(abi_arg_out value) noexcept override + HRESULT __stdcall get_NextManeuver(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextManeuver()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextManeuver()); return S_OK; } catch (...) @@ -1280,7 +1373,8 @@ struct produce { try { - *value = detach(this->shim().NextManeuverDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextManeuverDistance()); return S_OK; } catch (...) @@ -1289,11 +1383,12 @@ struct produce } } - HRESULT __stdcall get_AfterNextManeuver(abi_arg_out value) noexcept override + HRESULT __stdcall get_AfterNextManeuver(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AfterNextManeuver()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AfterNextManeuver()); return S_OK; } catch (...) @@ -1307,7 +1402,8 @@ struct produce { try { - *value = detach(this->shim().AfterNextManeuverDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AfterNextManeuverDistance()); return S_OK; } catch (...) @@ -1320,7 +1416,8 @@ struct produce { try { - *value = detach(this->shim().DistanceToDestination()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DistanceToDestination()); return S_OK; } catch (...) @@ -1333,7 +1430,8 @@ struct produce { try { - *value = detach(this->shim().ElapsedDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElapsedDistance()); return S_OK; } catch (...) @@ -1342,11 +1440,12 @@ struct produce } } - HRESULT __stdcall get_ElapsedTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_ElapsedTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ElapsedTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElapsedTime()); return S_OK; } catch (...) @@ -1355,11 +1454,12 @@ struct produce } } - HRESULT __stdcall get_TimeToDestination(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimeToDestination(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeToDestination()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeToDestination()); return S_OK; } catch (...) @@ -1368,11 +1468,12 @@ struct produce } } - HRESULT __stdcall get_RoadName(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoadName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoadName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoadName()); return S_OK; } catch (...) @@ -1382,11 +1483,12 @@ struct produce } } - HRESULT __stdcall get_Route(abi_arg_out result) noexcept override + HRESULT __stdcall get_Route(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Route()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Route()); return S_OK; } catch (...) @@ -1396,11 +1498,12 @@ struct produce } } - HRESULT __stdcall get_CurrentLocation(abi_arg_out result) noexcept override + HRESULT __stdcall get_CurrentLocation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CurrentLocation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CurrentLocation()); return S_OK; } catch (...) @@ -1414,7 +1517,8 @@ struct produce { try { - *value = detach(this->shim().IsNewManeuver()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNewManeuver()); return S_OK; } catch (...) @@ -1423,11 +1527,12 @@ struct produce } } - HRESULT __stdcall get_LaneInfo(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LaneInfo(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LaneInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LaneInfo()); return S_OK; } catch (...) @@ -1445,311 +1550,311 @@ namespace Windows::Services::Maps::Guidance { template hstring impl_IGuidanceRoadSignpost::ExitNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExitNumber(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSignpost)->get_ExitNumber(put_abi(value))); return value; } template hstring impl_IGuidanceRoadSignpost::Exit() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Exit(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSignpost)->get_Exit(put_abi(value))); return value; } template Windows::UI::Color impl_IGuidanceRoadSignpost::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSignpost)->get_BackgroundColor(put_abi(value))); return value; } template Windows::UI::Color impl_IGuidanceRoadSignpost::ForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSignpost)->get_ForegroundColor(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGuidanceRoadSignpost::ExitDirections() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_ExitDirections(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSignpost)->get_ExitDirections(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IGuidanceManeuver::StartLocation() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StartLocation(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_StartLocation(put_abi(value))); return value; } template int32_t impl_IGuidanceManeuver::DistanceFromRouteStart() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DistanceFromRouteStart(&value)); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_DistanceFromRouteStart(&value)); return value; } template int32_t impl_IGuidanceManeuver::DistanceFromPreviousManeuver() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DistanceFromPreviousManeuver(&value)); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_DistanceFromPreviousManeuver(&value)); return value; } template hstring impl_IGuidanceManeuver::DepartureRoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DepartureRoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_DepartureRoadName(put_abi(value))); return value; } template hstring impl_IGuidanceManeuver::NextRoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NextRoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_NextRoadName(put_abi(value))); return value; } template hstring impl_IGuidanceManeuver::DepartureShortRoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DepartureShortRoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_DepartureShortRoadName(put_abi(value))); return value; } template hstring impl_IGuidanceManeuver::NextShortRoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NextShortRoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_NextShortRoadName(put_abi(value))); return value; } template Windows::Services::Maps::Guidance::GuidanceManeuverKind impl_IGuidanceManeuver::Kind() const { Windows::Services::Maps::Guidance::GuidanceManeuverKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_Kind(&value)); return value; } template int32_t impl_IGuidanceManeuver::StartAngle() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartAngle(&value)); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_StartAngle(&value)); return value; } template int32_t impl_IGuidanceManeuver::EndAngle() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndAngle(&value)); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_EndAngle(&value)); return value; } template Windows::Services::Maps::Guidance::GuidanceRoadSignpost impl_IGuidanceManeuver::RoadSignpost() const { Windows::Services::Maps::Guidance::GuidanceRoadSignpost value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RoadSignpost(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_RoadSignpost(put_abi(value))); return value; } template hstring impl_IGuidanceManeuver::InstructionText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstructionText(put(value))); + check_hresult(WINRT_SHIM(IGuidanceManeuver)->get_InstructionText(put_abi(value))); return value; } template Windows::Services::Maps::Guidance::GuidanceMode impl_IGuidanceUpdatedEventArgs::Mode() const { Windows::Services::Maps::Guidance::GuidanceMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_Mode(&value)); return value; } template Windows::Services::Maps::Guidance::GuidanceManeuver impl_IGuidanceUpdatedEventArgs::NextManeuver() const { Windows::Services::Maps::Guidance::GuidanceManeuver value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NextManeuver(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_NextManeuver(put_abi(value))); return value; } template int32_t impl_IGuidanceUpdatedEventArgs::NextManeuverDistance() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NextManeuverDistance(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_NextManeuverDistance(&value)); return value; } template Windows::Services::Maps::Guidance::GuidanceManeuver impl_IGuidanceUpdatedEventArgs::AfterNextManeuver() const { Windows::Services::Maps::Guidance::GuidanceManeuver value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AfterNextManeuver(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_AfterNextManeuver(put_abi(value))); return value; } template int32_t impl_IGuidanceUpdatedEventArgs::AfterNextManeuverDistance() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AfterNextManeuverDistance(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_AfterNextManeuverDistance(&value)); return value; } template int32_t impl_IGuidanceUpdatedEventArgs::DistanceToDestination() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DistanceToDestination(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_DistanceToDestination(&value)); return value; } template int32_t impl_IGuidanceUpdatedEventArgs::ElapsedDistance() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ElapsedDistance(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_ElapsedDistance(&value)); return value; } template Windows::Foundation::TimeSpan impl_IGuidanceUpdatedEventArgs::ElapsedTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_ElapsedTime(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_ElapsedTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IGuidanceUpdatedEventArgs::TimeToDestination() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeToDestination(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_TimeToDestination(put_abi(value))); return value; } template hstring impl_IGuidanceUpdatedEventArgs::RoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_RoadName(put_abi(value))); return value; } template Windows::Services::Maps::Guidance::GuidanceRoute impl_IGuidanceUpdatedEventArgs::Route() const { Windows::Services::Maps::Guidance::GuidanceRoute result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Route(put(result))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_Route(put_abi(result))); return result; } template Windows::Services::Maps::Guidance::GuidanceMapMatchedCoordinate impl_IGuidanceUpdatedEventArgs::CurrentLocation() const { Windows::Services::Maps::Guidance::GuidanceMapMatchedCoordinate result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentLocation(put(result))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_CurrentLocation(put_abi(result))); return result; } template bool impl_IGuidanceUpdatedEventArgs::IsNewManeuver() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNewManeuver(&value)); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_IsNewManeuver(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IGuidanceUpdatedEventArgs::LaneInfo() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LaneInfo(put(value))); + check_hresult(WINRT_SHIM(IGuidanceUpdatedEventArgs)->get_LaneInfo(put_abi(value))); return value; } template Windows::Services::Maps::Guidance::GuidanceRoute impl_IGuidanceReroutedEventArgs::Route() const { Windows::Services::Maps::Guidance::GuidanceRoute result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Route(put(result))); + check_hresult(WINRT_SHIM(IGuidanceReroutedEventArgs)->get_Route(put_abi(result))); return result; } template Windows::Services::Maps::Guidance::GuidanceAudioNotificationKind impl_IGuidanceAudioNotificationRequestedEventArgs::AudioNotification() const { Windows::Services::Maps::Guidance::GuidanceAudioNotificationKind value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioNotification(&value)); + check_hresult(WINRT_SHIM(IGuidanceAudioNotificationRequestedEventArgs)->get_AudioNotification(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IGuidanceAudioNotificationRequestedEventArgs::AudioFilePaths() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AudioFilePaths(put(value))); + check_hresult(WINRT_SHIM(IGuidanceAudioNotificationRequestedEventArgs)->get_AudioFilePaths(put_abi(value))); return value; } template hstring impl_IGuidanceAudioNotificationRequestedEventArgs::AudioText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AudioText(put(value))); + check_hresult(WINRT_SHIM(IGuidanceAudioNotificationRequestedEventArgs)->get_AudioText(put_abi(value))); return value; } template void impl_IGuidanceNavigator::StartNavigating(const Windows::Services::Maps::Guidance::GuidanceRoute & route) const { - check_hresult(static_cast(static_cast(*this))->abi_StartNavigating(get(route))); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_StartNavigating(get_abi(route))); } template void impl_IGuidanceNavigator::StartSimulating(const Windows::Services::Maps::Guidance::GuidanceRoute & route, int32_t speedInMetersPerSecond) const { - check_hresult(static_cast(static_cast(*this))->abi_StartSimulating(get(route), speedInMetersPerSecond)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_StartSimulating(get_abi(route), speedInMetersPerSecond)); } template void impl_IGuidanceNavigator::StartTracking() const { - check_hresult(static_cast(static_cast(*this))->abi_StartTracking()); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_StartTracking()); } template void impl_IGuidanceNavigator::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_Pause()); } template void impl_IGuidanceNavigator::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_Resume()); } template void impl_IGuidanceNavigator::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_Stop()); } template void impl_IGuidanceNavigator::RepeatLastAudioNotification() const { - check_hresult(static_cast(static_cast(*this))->abi_RepeatLastAudioNotification()); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_RepeatLastAudioNotification()); } template Windows::Services::Maps::Guidance::GuidanceAudioMeasurementSystem impl_IGuidanceNavigator::AudioMeasurementSystem() const { Windows::Services::Maps::Guidance::GuidanceAudioMeasurementSystem value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioMeasurementSystem(&value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->get_AudioMeasurementSystem(&value)); return value; } template void impl_IGuidanceNavigator::AudioMeasurementSystem(Windows::Services::Maps::Guidance::GuidanceAudioMeasurementSystem value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioMeasurementSystem(value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->put_AudioMeasurementSystem(value)); } template Windows::Services::Maps::Guidance::GuidanceAudioNotifications impl_IGuidanceNavigator::AudioNotifications() const { Windows::Services::Maps::Guidance::GuidanceAudioNotifications value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioNotifications(&value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->get_AudioNotifications(&value)); return value; } template void impl_IGuidanceNavigator::AudioNotifications(Windows::Services::Maps::Guidance::GuidanceAudioNotifications value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioNotifications(value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->put_AudioNotifications(value)); } template event_token impl_IGuidanceNavigator::GuidanceUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_GuidanceUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_GuidanceUpdated(get_abi(handler), &token)); return token; } @@ -1760,47 +1865,47 @@ template event_revoker impl_IGuidanceNavigator< template void impl_IGuidanceNavigator::GuidanceUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_GuidanceUpdated(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_GuidanceUpdated(token)); } -template event_token impl_IGuidanceNavigator::DestinationReached(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IGuidanceNavigator::DestinationReached(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DestinationReached(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_DestinationReached(get_abi(handler), &token)); return token; } -template event_revoker impl_IGuidanceNavigator::DestinationReached(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IGuidanceNavigator::DestinationReached(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Maps::Guidance::IGuidanceNavigator::remove_DestinationReached, DestinationReached(handler)); } template void impl_IGuidanceNavigator::DestinationReached(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DestinationReached(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_DestinationReached(token)); } -template event_token impl_IGuidanceNavigator::Rerouting(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IGuidanceNavigator::Rerouting(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Rerouting(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_Rerouting(get_abi(handler), &token)); return token; } -template event_revoker impl_IGuidanceNavigator::Rerouting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IGuidanceNavigator::Rerouting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Maps::Guidance::IGuidanceNavigator::remove_Rerouting, Rerouting(handler)); } template void impl_IGuidanceNavigator::Rerouting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Rerouting(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_Rerouting(token)); } template event_token impl_IGuidanceNavigator::Rerouted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Rerouted(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_Rerouted(get_abi(handler), &token)); return token; } @@ -1811,79 +1916,79 @@ template event_revoker impl_IGuidanceNavigator< template void impl_IGuidanceNavigator::Rerouted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Rerouted(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_Rerouted(token)); } -template event_token impl_IGuidanceNavigator::RerouteFailed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IGuidanceNavigator::RerouteFailed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RerouteFailed(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_RerouteFailed(get_abi(handler), &token)); return token; } -template event_revoker impl_IGuidanceNavigator::RerouteFailed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IGuidanceNavigator::RerouteFailed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Maps::Guidance::IGuidanceNavigator::remove_RerouteFailed, RerouteFailed(handler)); } template void impl_IGuidanceNavigator::RerouteFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RerouteFailed(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_RerouteFailed(token)); } -template event_token impl_IGuidanceNavigator::UserLocationLost(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IGuidanceNavigator::UserLocationLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UserLocationLost(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_UserLocationLost(get_abi(handler), &token)); return token; } -template event_revoker impl_IGuidanceNavigator::UserLocationLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IGuidanceNavigator::UserLocationLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Maps::Guidance::IGuidanceNavigator::remove_UserLocationLost, UserLocationLost(handler)); } template void impl_IGuidanceNavigator::UserLocationLost(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UserLocationLost(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_UserLocationLost(token)); } -template event_token impl_IGuidanceNavigator::UserLocationRestored(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IGuidanceNavigator::UserLocationRestored(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UserLocationRestored(get(handler), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->add_UserLocationRestored(get_abi(handler), &token)); return token; } -template event_revoker impl_IGuidanceNavigator::UserLocationRestored(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IGuidanceNavigator::UserLocationRestored(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Maps::Guidance::IGuidanceNavigator::remove_UserLocationRestored, UserLocationRestored(handler)); } template void impl_IGuidanceNavigator::UserLocationRestored(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UserLocationRestored(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->remove_UserLocationRestored(token)); } -template void impl_IGuidanceNavigator::SetGuidanceVoice(int32_t voiceId, hstring_ref voiceFolder) const +template void impl_IGuidanceNavigator::SetGuidanceVoice(int32_t voiceId, hstring_view voiceFolder) const { - check_hresult(static_cast(static_cast(*this))->abi_SetGuidanceVoice(voiceId, get(voiceFolder))); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_SetGuidanceVoice(voiceId, get_abi(voiceFolder))); } template void impl_IGuidanceNavigator::UpdateUserLocation(const Windows::Devices::Geolocation::Geocoordinate & userLocation) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateUserLocation(get(userLocation))); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_UpdateUserLocation(get_abi(userLocation))); } template void impl_IGuidanceNavigator::UpdateUserLocation(const Windows::Devices::Geolocation::Geocoordinate & userLocation, const Windows::Devices::Geolocation::BasicGeoposition & positionOverride) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateUserLocationWithPositionOverride(get(userLocation), get(positionOverride))); + check_hresult(WINRT_SHIM(IGuidanceNavigator)->abi_UpdateUserLocationWithPositionOverride(get_abi(userLocation), get_abi(positionOverride))); } template event_token impl_IGuidanceNavigator2::AudioNotificationRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AudioNotificationRequested(get(value), &token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator2)->add_AudioNotificationRequested(get_abi(value), &token)); return token; } @@ -1894,255 +1999,255 @@ template event_revoker impl_IGuidanceNavigator template void impl_IGuidanceNavigator2::AudioNotificationRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AudioNotificationRequested(token)); + check_hresult(WINRT_SHIM(IGuidanceNavigator2)->remove_AudioNotificationRequested(token)); } template bool impl_IGuidanceNavigator2::IsGuidanceAudioMuted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGuidanceAudioMuted(&value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator2)->get_IsGuidanceAudioMuted(&value)); return value; } template void impl_IGuidanceNavigator2::IsGuidanceAudioMuted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsGuidanceAudioMuted(value)); + check_hresult(WINRT_SHIM(IGuidanceNavigator2)->put_IsGuidanceAudioMuted(value)); } template Windows::Services::Maps::Guidance::GuidanceNavigator impl_IGuidanceNavigatorStatics::GetCurrent() const { Windows::Services::Maps::Guidance::GuidanceNavigator result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrent(put(result))); + check_hresult(WINRT_SHIM(IGuidanceNavigatorStatics)->abi_GetCurrent(put_abi(result))); return result; } template bool impl_IGuidanceNavigatorStatics2::UseAppProvidedVoice() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UseAppProvidedVoice(&value)); + check_hresult(WINRT_SHIM(IGuidanceNavigatorStatics2)->get_UseAppProvidedVoice(&value)); return value; } template hstring impl_IGuidanceRoadSegment::RoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_RoadName(put_abi(value))); return value; } template hstring impl_IGuidanceRoadSegment::ShortRoadName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ShortRoadName(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_ShortRoadName(put_abi(value))); return value; } template double impl_IGuidanceRoadSegment::SpeedLimit() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SpeedLimit(&value)); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_SpeedLimit(&value)); return value; } template Windows::Foundation::TimeSpan impl_IGuidanceRoadSegment::TravelTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TravelTime(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_TravelTime(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IGuidanceRoadSegment::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_Path(put_abi(value))); return value; } template hstring impl_IGuidanceRoadSegment::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_Id(put_abi(value))); return value; } template bool impl_IGuidanceRoadSegment::IsHighway() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHighway(&value)); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_IsHighway(&value)); return value; } template bool impl_IGuidanceRoadSegment::IsTunnel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTunnel(&value)); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_IsTunnel(&value)); return value; } template bool impl_IGuidanceRoadSegment::IsTollRoad() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTollRoad(&value)); + check_hresult(WINRT_SHIM(IGuidanceRoadSegment)->get_IsTollRoad(&value)); return value; } template Windows::Devices::Geolocation::Geopoint impl_IGuidanceMapMatchedCoordinate::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IGuidanceMapMatchedCoordinate)->get_Location(put_abi(value))); return value; } template double impl_IGuidanceMapMatchedCoordinate::CurrentHeading() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentHeading(&value)); + check_hresult(WINRT_SHIM(IGuidanceMapMatchedCoordinate)->get_CurrentHeading(&value)); return value; } template double impl_IGuidanceMapMatchedCoordinate::CurrentSpeed() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentSpeed(&value)); + check_hresult(WINRT_SHIM(IGuidanceMapMatchedCoordinate)->get_CurrentSpeed(&value)); return value; } template bool impl_IGuidanceMapMatchedCoordinate::IsOnStreet() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnStreet(&value)); + check_hresult(WINRT_SHIM(IGuidanceMapMatchedCoordinate)->get_IsOnStreet(&value)); return value; } template Windows::Services::Maps::Guidance::GuidanceRoadSegment impl_IGuidanceMapMatchedCoordinate::Road() const { Windows::Services::Maps::Guidance::GuidanceRoadSegment value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Road(put(value))); + check_hresult(WINRT_SHIM(IGuidanceMapMatchedCoordinate)->get_Road(put_abi(value))); return value; } template Windows::Services::Maps::Guidance::GuidanceTelemetryCollector impl_IGuidanceTelemetryCollectorStatics::GetCurrent() const { Windows::Services::Maps::Guidance::GuidanceTelemetryCollector result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrent(put(result))); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollectorStatics)->abi_GetCurrent(put_abi(result))); return result; } template bool impl_IGuidanceTelemetryCollector::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->get_Enabled(&value)); return value; } template void impl_IGuidanceTelemetryCollector::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->put_Enabled(value)); } template void impl_IGuidanceTelemetryCollector::ClearLocalData() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearLocalData()); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->abi_ClearLocalData()); } template double impl_IGuidanceTelemetryCollector::SpeedTrigger() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SpeedTrigger(&value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->get_SpeedTrigger(&value)); return value; } template void impl_IGuidanceTelemetryCollector::SpeedTrigger(double value) const { - check_hresult(static_cast(static_cast(*this))->put_SpeedTrigger(value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->put_SpeedTrigger(value)); } template int32_t impl_IGuidanceTelemetryCollector::UploadFrequency() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UploadFrequency(&value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->get_UploadFrequency(&value)); return value; } template void impl_IGuidanceTelemetryCollector::UploadFrequency(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_UploadFrequency(value)); + check_hresult(WINRT_SHIM(IGuidanceTelemetryCollector)->put_UploadFrequency(value)); } template bool impl_IGuidanceRouteStatics::CanCreateFromMapRoute(const Windows::Services::Maps::MapRoute & mapRoute) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_CanCreateFromMapRoute(get(mapRoute), &result)); + check_hresult(WINRT_SHIM(IGuidanceRouteStatics)->abi_CanCreateFromMapRoute(get_abi(mapRoute), &result)); return result; } template Windows::Services::Maps::Guidance::GuidanceRoute impl_IGuidanceRouteStatics::TryCreateFromMapRoute(const Windows::Services::Maps::MapRoute & mapRoute) const { Windows::Services::Maps::Guidance::GuidanceRoute result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreateFromMapRoute(get(mapRoute), put(result))); + check_hresult(WINRT_SHIM(IGuidanceRouteStatics)->abi_TryCreateFromMapRoute(get_abi(mapRoute), put_abi(result))); return result; } template Windows::Foundation::TimeSpan impl_IGuidanceRoute::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_Duration(put_abi(value))); return value; } template int32_t impl_IGuidanceRoute::Distance() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Distance(&value)); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_Distance(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IGuidanceRoute::Maneuvers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Maneuvers(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_Maneuvers(put_abi(value))); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IGuidanceRoute::BoundingBox() const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BoundingBox(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_BoundingBox(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IGuidanceRoute::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_Path(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGuidanceRoute::RoadSegments() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RoadSegments(put(value))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->get_RoadSegments(put_abi(value))); return value; } template Windows::Services::Maps::MapRoute impl_IGuidanceRoute::ConvertToMapRoute() const { Windows::Services::Maps::MapRoute result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ConvertToMapRoute(put(result))); + check_hresult(WINRT_SHIM(IGuidanceRoute)->abi_ConvertToMapRoute(put_abi(result))); return result; } template Windows::Services::Maps::Guidance::GuidanceLaneMarkers impl_IGuidanceLaneInfo::LaneMarkers() const { Windows::Services::Maps::Guidance::GuidanceLaneMarkers value {}; - check_hresult(static_cast(static_cast(*this))->get_LaneMarkers(&value)); + check_hresult(WINRT_SHIM(IGuidanceLaneInfo)->get_LaneMarkers(&value)); return value; } template bool impl_IGuidanceLaneInfo::IsOnRoute() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnRoute(&value)); + check_hresult(WINRT_SHIM(IGuidanceLaneInfo)->get_IsOnRoute(&value)); return value; } @@ -2174,3 +2279,248 @@ inline Windows::Services::Maps::Guidance::GuidanceTelemetryCollector GuidanceTel } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceAudioNotificationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceLaneInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceManeuver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceMapMatchedCoordinate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceNavigator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceNavigator2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceNavigatorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceNavigatorStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceReroutedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceRoadSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceRoadSignpost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceRouteStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceTelemetryCollector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceTelemetryCollectorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::IGuidanceUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceAudioNotificationRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceLaneInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceManeuver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceMapMatchedCoordinate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceNavigator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceReroutedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceRoadSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceRoadSignpost & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceTelemetryCollector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::Guidance::GuidanceUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Services.Maps.LocalSearch.h b/10.0.14393.0/winrt/Windows.Services.Maps.LocalSearch.h index 2ccd7b6b3..e93f8b7e9 100644 --- a/10.0.14393.0/winrt/Windows.Services.Maps.LocalSearch.h +++ b/10.0.14393.0/winrt/Windows.Services.Maps.LocalSearch.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Services.Maps.3.h" #include "internal/Windows.Devices.Geolocation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_BankAndCreditUnions(abi_arg_out value) noexcept override + HRESULT __stdcall get_BankAndCreditUnions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BankAndCreditUnions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BankAndCreditUnions()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce } } - HRESULT __stdcall get_EatDrink(abi_arg_out value) noexcept override + HRESULT __stdcall get_EatDrink(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EatDrink()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EatDrink()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce } } - HRESULT __stdcall get_Hospitals(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hospitals(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hospitals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hospitals()); return S_OK; } catch (...) @@ -60,11 +66,12 @@ struct produce } } - HRESULT __stdcall get_HotelsAndMotels(abi_arg_out value) noexcept override + HRESULT __stdcall get_HotelsAndMotels(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HotelsAndMotels()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HotelsAndMotels()); return S_OK; } catch (...) @@ -74,11 +81,12 @@ struct produce } } - HRESULT __stdcall get_All(abi_arg_out value) noexcept override + HRESULT __stdcall get_All(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().All()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().All()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce } } - HRESULT __stdcall get_Parking(abi_arg_out value) noexcept override + HRESULT __stdcall get_Parking(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Parking()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Parking()); return S_OK; } catch (...) @@ -102,11 +111,12 @@ struct produce } } - HRESULT __stdcall get_SeeDo(abi_arg_out value) noexcept override + HRESULT __stdcall get_SeeDo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SeeDo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SeeDo()); return S_OK; } catch (...) @@ -116,11 +126,12 @@ struct produce } } - HRESULT __stdcall get_Shop(abi_arg_out value) noexcept override + HRESULT __stdcall get_Shop(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Shop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Shop()); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Address(abi_arg_out value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -148,11 +160,12 @@ struct produce : produc } } - HRESULT __stdcall get_Identifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_Identifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Identifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Identifier()); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce : produc } } - HRESULT __stdcall get_Description(abi_arg_out value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produc } } - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : produc } } - HRESULT __stdcall get_Point(abi_arg_out value) noexcept override + HRESULT __stdcall get_Point(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Point()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Point()); return S_OK; } catch (...) @@ -204,11 +220,12 @@ struct produce : produc } } - HRESULT __stdcall get_PhoneNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_PhoneNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneNumber()); return S_OK; } catch (...) @@ -218,11 +235,12 @@ struct produce : produc } } - HRESULT __stdcall get_DataAttribution(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataAttribution(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataAttribution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataAttribution()); return S_OK; } catch (...) @@ -236,11 +254,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Category(abi_arg_out value) noexcept override + HRESULT __stdcall get_Category(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Category()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Category()); return S_OK; } catch (...) @@ -250,11 +269,12 @@ struct produce : produ } } - HRESULT __stdcall get_RatingInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_RatingInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RatingInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RatingInfo()); return S_OK; } catch (...) @@ -264,11 +284,12 @@ struct produce : produ } } - HRESULT __stdcall get_HoursOfOperation(abi_arg_out> value) noexcept override + HRESULT __stdcall get_HoursOfOperation(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().HoursOfOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HoursOfOperation()); return S_OK; } catch (...) @@ -282,11 +303,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_LocalLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LocalLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalLocations()); return S_OK; } catch (...) @@ -300,7 +322,8 @@ struct produceshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -313,11 +336,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FindLocalLocationsAsync(abi_arg_in searchTerm, abi_arg_in searchArea, abi_arg_in localCategory, uint32_t maxResults, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindLocalLocationsAsync(impl::abi_arg_in searchTerm, impl::abi_arg_in searchArea, impl::abi_arg_in localCategory, uint32_t maxResults, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindLocalLocationsAsync(*reinterpret_cast(&searchTerm), *reinterpret_cast(&searchArea), *reinterpret_cast(&localCategory), maxResults)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindLocalLocationsAsync(*reinterpret_cast(&searchTerm), *reinterpret_cast(&searchArea), *reinterpret_cast(&localCategory), maxResults)); return S_OK; } catch (...) @@ -335,7 +359,8 @@ struct produceshim().Day()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Day()); return S_OK; } catch (...) @@ -344,11 +369,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Start(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Start()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Start()); return S_OK; } catch (...) @@ -357,11 +383,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Span(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Span()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Span()); return S_OK; } catch (...) @@ -374,11 +401,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AggregateRating(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AggregateRating(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AggregateRating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AggregateRating()); return S_OK; } catch (...) @@ -388,11 +416,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_RatingCount(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RatingCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RatingCount()); return S_OK; } catch (...) @@ -402,11 +431,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ProviderIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderIdentifier()); return S_OK; } catch (...) @@ -424,189 +454,189 @@ namespace Windows::Services::Maps::LocalSearch { template Windows::Services::Maps::MapAddress impl_ILocalLocation::Address() const { Windows::Services::Maps::MapAddress value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_Address(put_abi(value))); return value; } template hstring impl_ILocalLocation::Identifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Identifier(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_Identifier(put_abi(value))); return value; } template hstring impl_ILocalLocation::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_Description(put_abi(value))); return value; } template hstring impl_ILocalLocation::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_DisplayName(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_ILocalLocation::Point() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Point(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_Point(put_abi(value))); return value; } template hstring impl_ILocalLocation::PhoneNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneNumber(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_PhoneNumber(put_abi(value))); return value; } template hstring impl_ILocalLocation::DataAttribution() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DataAttribution(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation)->get_DataAttribution(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ILocalLocationFinderResult::LocalLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LocalLocations(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationFinderResult)->get_LocalLocations(put_abi(value))); return value; } template Windows::Services::Maps::LocalSearch::LocalLocationFinderStatus impl_ILocalLocationFinderResult::Status() const { Windows::Services::Maps::LocalSearch::LocalLocationFinderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ILocalLocationFinderResult)->get_Status(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_ILocalLocationFinderStatics::FindLocalLocationsAsync(hstring_ref searchTerm, const Windows::Devices::Geolocation::Geocircle & searchArea, hstring_ref localCategory, uint32_t maxResults) const +template Windows::Foundation::IAsyncOperation impl_ILocalLocationFinderStatics::FindLocalLocationsAsync(hstring_view searchTerm, const Windows::Devices::Geolocation::Geocircle & searchArea, hstring_view localCategory, uint32_t maxResults) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindLocalLocationsAsync(get(searchTerm), get(searchArea), get(localCategory), maxResults, put(result))); + check_hresult(WINRT_SHIM(ILocalLocationFinderStatics)->abi_FindLocalLocationsAsync(get_abi(searchTerm), get_abi(searchArea), get_abi(localCategory), maxResults, put_abi(result))); return result; } template hstring impl_ILocalCategoriesStatics::BankAndCreditUnions() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BankAndCreditUnions(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_BankAndCreditUnions(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::EatDrink() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EatDrink(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_EatDrink(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::Hospitals() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Hospitals(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_Hospitals(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::HotelsAndMotels() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HotelsAndMotels(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_HotelsAndMotels(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::All() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_All(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_All(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::Parking() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Parking(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_Parking(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::SeeDo() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SeeDo(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_SeeDo(put_abi(value))); return value; } template hstring impl_ILocalCategoriesStatics::Shop() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Shop(put(value))); + check_hresult(WINRT_SHIM(ILocalCategoriesStatics)->get_Shop(put_abi(value))); return value; } template Windows::Globalization::DayOfWeek impl_ILocalLocationHoursOfOperationItem::Day() const { Windows::Globalization::DayOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_Day(&value)); + check_hresult(WINRT_SHIM(ILocalLocationHoursOfOperationItem)->get_Day(&value)); return value; } template Windows::Foundation::TimeSpan impl_ILocalLocationHoursOfOperationItem::Start() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Start(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationHoursOfOperationItem)->get_Start(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ILocalLocationHoursOfOperationItem::Span() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Span(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationHoursOfOperationItem)->get_Span(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ILocalLocationRatingInfo::AggregateRating() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AggregateRating(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationRatingInfo)->get_AggregateRating(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ILocalLocationRatingInfo::RatingCount() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_RatingCount(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationRatingInfo)->get_RatingCount(put_abi(value))); return value; } template hstring impl_ILocalLocationRatingInfo::ProviderIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProviderIdentifier(put(value))); + check_hresult(WINRT_SHIM(ILocalLocationRatingInfo)->get_ProviderIdentifier(put_abi(value))); return value; } template hstring impl_ILocalLocation2::Category() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Category(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation2)->get_Category(put_abi(value))); return value; } template Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo impl_ILocalLocation2::RatingInfo() const { Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RatingInfo(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation2)->get_RatingInfo(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ILocalLocation2::HoursOfOperation() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_HoursOfOperation(put(value))); + check_hresult(WINRT_SHIM(ILocalLocation2)->get_HoursOfOperation(put_abi(value))); return value; } @@ -650,7 +680,7 @@ inline hstring LocalCategories::Shop() return get_activation_factory().Shop(); } -inline Windows::Foundation::IAsyncOperation LocalLocationFinder::FindLocalLocationsAsync(hstring_ref searchTerm, const Windows::Devices::Geolocation::Geocircle & searchArea, hstring_ref localCategory, uint32_t maxResults) +inline Windows::Foundation::IAsyncOperation LocalLocationFinder::FindLocalLocationsAsync(hstring_view searchTerm, const Windows::Devices::Geolocation::Geocircle & searchArea, hstring_view localCategory, uint32_t maxResults) { return get_activation_factory().FindLocalLocationsAsync(searchTerm, searchArea, localCategory, maxResults); } @@ -658,3 +688,104 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalCategoriesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocationFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocationFinderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocationHoursOfOperationItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::ILocalLocationRatingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::LocalLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Services.Maps.h b/10.0.14393.0/winrt/Windows.Services.Maps.h index d797da5cb..c0a8c34b6 100644 --- a/10.0.14393.0/winrt/Windows.Services.Maps.h +++ b/10.0.14393.0/winrt/Windows.Services.Maps.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Geolocation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_BuildingName(abi_arg_out value) noexcept override + HRESULT __stdcall get_BuildingName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildingName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildingName()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BuildingFloor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildingFloor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildingFloor()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BuildingRoom(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildingRoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildingRoom()); return S_OK; } catch (...) @@ -57,11 +63,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BuildingWing(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BuildingWing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BuildingWing()); return S_OK; } catch (...) @@ -71,11 +78,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StreetNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreetNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreetNumber()); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Street(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Street()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Street()); return S_OK; } catch (...) @@ -99,11 +108,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Neighborhood(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Neighborhood()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Neighborhood()); return S_OK; } catch (...) @@ -113,11 +123,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_District(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().District()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().District()); return S_OK; } catch (...) @@ -127,11 +138,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Town(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Town()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Town()); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Region(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Region()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Region()); return S_OK; } catch (...) @@ -155,11 +168,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RegionCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RegionCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RegionCode()); return S_OK; } catch (...) @@ -169,11 +183,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Country(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Country()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Country()); return S_OK; } catch (...) @@ -183,11 +198,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CountryCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CountryCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CountryCode()); return S_OK; } catch (...) @@ -197,11 +213,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PostCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PostCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PostCode()); return S_OK; } catch (...) @@ -211,11 +228,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Continent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Continent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Continent()); return S_OK; } catch (...) @@ -229,11 +247,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FormattedAddress(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedAddress(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedAddress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedAddress()); return S_OK; } catch (...) @@ -247,11 +266,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Point(abi_arg_out value) noexcept override + HRESULT __stdcall get_Point(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Point()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Point()); return S_OK; } catch (...) @@ -261,11 +281,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -275,11 +296,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -289,11 +311,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Address(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Address()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Address()); return S_OK; } catch (...) @@ -307,11 +330,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Locations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Locations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Locations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locations()); return S_OK; } catch (...) @@ -325,7 +349,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -338,11 +363,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_FindLocationsAtAsync(abi_arg_in queryPoint, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindLocationsAtAsync(impl::abi_arg_in queryPoint, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindLocationsAtAsync(*reinterpret_cast(&queryPoint))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindLocationsAtAsync(*reinterpret_cast(&queryPoint))); return S_OK; } catch (...) @@ -352,11 +378,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindLocationsAsync(abi_arg_in searchText, abi_arg_in referencePoint, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindLocationsAsync(impl::abi_arg_in searchText, impl::abi_arg_in referencePoint, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindLocationsAsync(*reinterpret_cast(&searchText), *reinterpret_cast(&referencePoint))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindLocationsAsync(*reinterpret_cast(&searchText), *reinterpret_cast(&referencePoint))); return S_OK; } catch (...) @@ -366,11 +393,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_FindLocationsWithMaxCountAsync(abi_arg_in searchText, abi_arg_in referencePoint, uint32_t maxCount, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindLocationsWithMaxCountAsync(impl::abi_arg_in searchText, impl::abi_arg_in referencePoint, uint32_t maxCount, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindLocationsAsync(*reinterpret_cast(&searchText), *reinterpret_cast(&referencePoint), maxCount)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindLocationsAsync(*reinterpret_cast(&searchText), *reinterpret_cast(&referencePoint), maxCount)); return S_OK; } catch (...) @@ -384,11 +412,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_FindLocationsAtWithAccuracyAsync(abi_arg_in queryPoint, Windows::Services::Maps::MapLocationDesiredAccuracy accuracy, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_FindLocationsAtWithAccuracyAsync(impl::abi_arg_in queryPoint, Windows::Services::Maps::MapLocationDesiredAccuracy accuracy, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().FindLocationsAtAsync(*reinterpret_cast(&queryPoint), accuracy)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().FindLocationsAtAsync(*reinterpret_cast(&queryPoint), accuracy)); return S_OK; } catch (...) @@ -406,6 +435,7 @@ struct produce : produce_baseshim()); this->shim().ShowDownloadedMapsUI(); return S_OK; } @@ -419,6 +449,7 @@ struct produce : produce_baseshim()); this->shim().ShowMapsUpdateUI(); return S_OK; } @@ -432,11 +463,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BoundingBox(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundingBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingBox()); return S_OK; } catch (...) @@ -450,7 +482,8 @@ struct produce : produce_baseshim().LengthInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LengthInMeters()); return S_OK; } catch (...) @@ -459,11 +492,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EstimatedDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EstimatedDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EstimatedDuration()); return S_OK; } catch (...) @@ -472,11 +506,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -486,11 +521,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Legs(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Legs()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Legs()); return S_OK; } catch (...) @@ -504,7 +540,8 @@ struct produce : produce_baseshim().IsTrafficBased()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrafficBased()); return S_OK; } catch (...) @@ -521,7 +558,8 @@ struct produce : produce_baseshim().ViolatedRestrictions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViolatedRestrictions()); return S_OK; } catch (...) @@ -534,7 +572,8 @@ struct produce : produce_baseshim().HasBlockedRoads()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasBlockedRoads()); return S_OK; } catch (...) @@ -551,7 +590,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().MaxAlternateRouteCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAlternateRouteCount()); return S_OK; } catch (...) @@ -564,6 +604,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxAlternateRouteCount(value); return S_OK; } @@ -573,11 +614,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_InitialHeading(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InitialHeading(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InitialHeading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialHeading()); return S_OK; } catch (...) @@ -587,10 +629,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_InitialHeading(abi_arg_in> value) noexcept override + HRESULT __stdcall put_InitialHeading(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialHeading(*reinterpret_cast *>(&value)); return S_OK; } @@ -604,7 +647,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().RouteOptimization()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RouteOptimization()); return S_OK; } catch (...) @@ -617,6 +661,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().RouteOptimization(value); return S_OK; } @@ -630,7 +675,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().RouteRestrictions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RouteRestrictions()); return S_OK; } catch (...) @@ -643,6 +689,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().RouteRestrictions(value); return S_OK; } @@ -656,11 +703,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Route(abi_arg_out value) noexcept override + HRESULT __stdcall get_Route(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Route()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Route()); return S_OK; } catch (...) @@ -674,7 +722,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -687,11 +736,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_AlternateRoutes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AlternateRoutes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AlternateRoutes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateRoutes()); return S_OK; } catch (...) @@ -705,11 +755,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDrivingRouteAsync(abi_arg_in startPoint, abi_arg_in endPoint, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint))); return S_OK; } catch (...) @@ -719,11 +770,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteWithOptimizationAsync(abi_arg_in startPoint, abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteWithOptimizationAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization)); return S_OK; } catch (...) @@ -733,11 +785,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteWithOptimizationAndRestrictionsAsync(abi_arg_in startPoint, abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteWithOptimizationAndRestrictionsAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization, restrictions)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization, restrictions)); return S_OK; } catch (...) @@ -747,11 +800,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(abi_arg_in startPoint, abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization, restrictions, headingInDegrees)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), optimization, restrictions, headingInDegrees)); return S_OK; } catch (...) @@ -761,11 +815,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteFromWaypointsAsync(abi_arg_in> wayPoints, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteFromWaypointsAsync(impl::abi_arg_in> wayPoints, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints))); return S_OK; } catch (...) @@ -775,11 +830,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteFromWaypointsAndOptimizationAsync(abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteFromWaypointsAndOptimizationAsync(impl::abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization)); return S_OK; } catch (...) @@ -789,11 +845,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(impl::abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization, restrictions)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization, restrictions)); return S_OK; } catch (...) @@ -803,11 +860,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(impl::abi_arg_in> wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization, restrictions, headingInDegrees)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints), optimization, restrictions, headingInDegrees)); return S_OK; } catch (...) @@ -817,11 +875,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetWalkingRouteAsync(abi_arg_in startPoint, abi_arg_in endPoint, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetWalkingRouteAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetWalkingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetWalkingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint))); return S_OK; } catch (...) @@ -831,11 +890,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetWalkingRouteFromWaypointsAsync(abi_arg_in> wayPoints, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetWalkingRouteFromWaypointsAsync(impl::abi_arg_in> wayPoints, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetWalkingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetWalkingRouteFromWaypointsAsync(*reinterpret_cast *>(&wayPoints))); return S_OK; } catch (...) @@ -849,11 +909,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDrivingRouteWithOptionsAsync(abi_arg_in startPoint, abi_arg_in endPoint, abi_arg_in options, abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetDrivingRouteWithOptionsAsync(impl::abi_arg_in startPoint, impl::abi_arg_in endPoint, impl::abi_arg_in options, impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDrivingRouteAsync(*reinterpret_cast(&startPoint), *reinterpret_cast(&endPoint), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -867,11 +928,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_BoundingBox(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundingBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingBox()); return S_OK; } catch (...) @@ -881,11 +943,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -899,7 +962,8 @@ struct produce : produce_baseshim().LengthInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LengthInMeters()); return S_OK; } catch (...) @@ -908,11 +972,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EstimatedDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EstimatedDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EstimatedDuration()); return S_OK; } catch (...) @@ -921,11 +986,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Maneuvers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Maneuvers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maneuvers()); return S_OK; } catch (...) @@ -939,11 +1005,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StartingPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartingPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartingPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartingPoint()); return S_OK; } catch (...) @@ -957,7 +1024,8 @@ struct produce : produce_baseshim().LengthInMeters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LengthInMeters()); return S_OK; } catch (...) @@ -966,11 +1034,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InstructionText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InstructionText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InstructionText()); return S_OK; } catch (...) @@ -984,7 +1053,8 @@ struct produce : produce_baseshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -993,11 +1063,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExitNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExitNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExitNumber()); return S_OK; } catch (...) @@ -1011,7 +1082,8 @@ struct produce : produce_baseshim().ManeuverNotices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManeuverNotices()); return S_OK; } catch (...) @@ -1028,7 +1100,8 @@ struct produce : produce_baseshim().StartHeading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartHeading()); return S_OK; } catch (...) @@ -1041,7 +1114,8 @@ struct produce : produce_baseshim().EndHeading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndHeading()); return S_OK; } catch (...) @@ -1050,11 +1124,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StreetName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreetName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreetName()); return S_OK; } catch (...) @@ -1068,10 +1143,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_ServiceToken(abi_arg_in value) noexcept override + HRESULT __stdcall put_ServiceToken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ServiceToken(*reinterpret_cast(&value)); return S_OK; } @@ -1081,11 +1157,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ServiceToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ServiceToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ServiceToken()); return S_OK; } catch (...) @@ -1099,11 +1176,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_WorldViewRegionCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_WorldViewRegionCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorldViewRegionCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorldViewRegionCode()); return S_OK; } catch (...) @@ -1117,11 +1195,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DataAttributions(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataAttributions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataAttributions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataAttributions()); return S_OK; } catch (...) @@ -1139,518 +1218,518 @@ namespace Windows::Services::Maps { template uint32_t impl_IMapRouteDrivingOptions::MaxAlternateRouteCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAlternateRouteCount(&value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->get_MaxAlternateRouteCount(&value)); return value; } template void impl_IMapRouteDrivingOptions::MaxAlternateRouteCount(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxAlternateRouteCount(value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->put_MaxAlternateRouteCount(value)); } template Windows::Foundation::IReference impl_IMapRouteDrivingOptions::InitialHeading() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InitialHeading(put(value))); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->get_InitialHeading(put_abi(value))); return value; } -template void impl_IMapRouteDrivingOptions::InitialHeading(const Windows::Foundation::IReference & value) const +template void impl_IMapRouteDrivingOptions::InitialHeading(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialHeading(get(value))); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->put_InitialHeading(get_abi(value))); } template Windows::Services::Maps::MapRouteOptimization impl_IMapRouteDrivingOptions::RouteOptimization() const { Windows::Services::Maps::MapRouteOptimization value {}; - check_hresult(static_cast(static_cast(*this))->get_RouteOptimization(&value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->get_RouteOptimization(&value)); return value; } template void impl_IMapRouteDrivingOptions::RouteOptimization(Windows::Services::Maps::MapRouteOptimization value) const { - check_hresult(static_cast(static_cast(*this))->put_RouteOptimization(value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->put_RouteOptimization(value)); } template Windows::Services::Maps::MapRouteRestrictions impl_IMapRouteDrivingOptions::RouteRestrictions() const { Windows::Services::Maps::MapRouteRestrictions value {}; - check_hresult(static_cast(static_cast(*this))->get_RouteRestrictions(&value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->get_RouteRestrictions(&value)); return value; } template void impl_IMapRouteDrivingOptions::RouteRestrictions(Windows::Services::Maps::MapRouteRestrictions value) const { - check_hresult(static_cast(static_cast(*this))->put_RouteRestrictions(value)); + check_hresult(WINRT_SHIM(IMapRouteDrivingOptions)->put_RouteRestrictions(value)); } template hstring impl_IMapAddress::BuildingName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BuildingName(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_BuildingName(put_abi(value))); return value; } template hstring impl_IMapAddress::BuildingFloor() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BuildingFloor(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_BuildingFloor(put_abi(value))); return value; } template hstring impl_IMapAddress::BuildingRoom() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BuildingRoom(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_BuildingRoom(put_abi(value))); return value; } template hstring impl_IMapAddress::BuildingWing() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BuildingWing(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_BuildingWing(put_abi(value))); return value; } template hstring impl_IMapAddress::StreetNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StreetNumber(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_StreetNumber(put_abi(value))); return value; } template hstring impl_IMapAddress::Street() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Street(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Street(put_abi(value))); return value; } template hstring impl_IMapAddress::Neighborhood() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Neighborhood(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Neighborhood(put_abi(value))); return value; } template hstring impl_IMapAddress::District() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_District(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_District(put_abi(value))); return value; } template hstring impl_IMapAddress::Town() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Town(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Town(put_abi(value))); return value; } template hstring impl_IMapAddress::Region() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Region(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Region(put_abi(value))); return value; } template hstring impl_IMapAddress::RegionCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RegionCode(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_RegionCode(put_abi(value))); return value; } template hstring impl_IMapAddress::Country() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Country(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Country(put_abi(value))); return value; } template hstring impl_IMapAddress::CountryCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CountryCode(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_CountryCode(put_abi(value))); return value; } template hstring impl_IMapAddress::PostCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PostCode(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_PostCode(put_abi(value))); return value; } template hstring impl_IMapAddress::Continent() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Continent(put(value))); + check_hresult(WINRT_SHIM(IMapAddress)->get_Continent(put_abi(value))); return value; } template hstring impl_IMapAddress2::FormattedAddress() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedAddress(put(value))); + check_hresult(WINRT_SHIM(IMapAddress2)->get_FormattedAddress(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapLocation::Point() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Point(put(value))); + check_hresult(WINRT_SHIM(IMapLocation)->get_Point(put_abi(value))); return value; } template hstring impl_IMapLocation::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMapLocation)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IMapLocation::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IMapLocation)->get_Description(put_abi(value))); return value; } template Windows::Services::Maps::MapAddress impl_IMapLocation::Address() const { Windows::Services::Maps::MapAddress value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Address(put(value))); + check_hresult(WINRT_SHIM(IMapLocation)->get_Address(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapLocationFinderResult::Locations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Locations(put(value))); + check_hresult(WINRT_SHIM(IMapLocationFinderResult)->get_Locations(put_abi(value))); return value; } template Windows::Services::Maps::MapLocationFinderStatus impl_IMapLocationFinderResult::Status() const { Windows::Services::Maps::MapLocationFinderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMapLocationFinderResult)->get_Status(&value)); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapRouteManeuver::StartingPoint() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StartingPoint(put(value))); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_StartingPoint(put_abi(value))); return value; } template double impl_IMapRouteManeuver::LengthInMeters() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LengthInMeters(&value)); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_LengthInMeters(&value)); return value; } template hstring impl_IMapRouteManeuver::InstructionText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InstructionText(put(value))); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_InstructionText(put_abi(value))); return value; } template Windows::Services::Maps::MapRouteManeuverKind impl_IMapRouteManeuver::Kind() const { Windows::Services::Maps::MapRouteManeuverKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_Kind(&value)); return value; } template hstring impl_IMapRouteManeuver::ExitNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExitNumber(put(value))); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_ExitNumber(put_abi(value))); return value; } template Windows::Services::Maps::MapManeuverNotices impl_IMapRouteManeuver::ManeuverNotices() const { Windows::Services::Maps::MapManeuverNotices value {}; - check_hresult(static_cast(static_cast(*this))->get_ManeuverNotices(&value)); + check_hresult(WINRT_SHIM(IMapRouteManeuver)->get_ManeuverNotices(&value)); return value; } template double impl_IMapRouteManeuver2::StartHeading() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_StartHeading(&value)); + check_hresult(WINRT_SHIM(IMapRouteManeuver2)->get_StartHeading(&value)); return value; } template double impl_IMapRouteManeuver2::EndHeading() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EndHeading(&value)); + check_hresult(WINRT_SHIM(IMapRouteManeuver2)->get_EndHeading(&value)); return value; } template hstring impl_IMapRouteManeuver2::StreetName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StreetName(put(value))); + check_hresult(WINRT_SHIM(IMapRouteManeuver2)->get_StreetName(put_abi(value))); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IMapRouteLeg::BoundingBox() const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BoundingBox(put(value))); + check_hresult(WINRT_SHIM(IMapRouteLeg)->get_BoundingBox(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IMapRouteLeg::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IMapRouteLeg)->get_Path(put_abi(value))); return value; } template double impl_IMapRouteLeg::LengthInMeters() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LengthInMeters(&value)); + check_hresult(WINRT_SHIM(IMapRouteLeg)->get_LengthInMeters(&value)); return value; } template Windows::Foundation::TimeSpan impl_IMapRouteLeg::EstimatedDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_EstimatedDuration(put(value))); + check_hresult(WINRT_SHIM(IMapRouteLeg)->get_EstimatedDuration(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapRouteLeg::Maneuvers() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Maneuvers(put(value))); + check_hresult(WINRT_SHIM(IMapRouteLeg)->get_Maneuvers(put_abi(value))); return value; } template Windows::Devices::Geolocation::GeoboundingBox impl_IMapRoute::BoundingBox() const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BoundingBox(put(value))); + check_hresult(WINRT_SHIM(IMapRoute)->get_BoundingBox(put_abi(value))); return value; } template double impl_IMapRoute::LengthInMeters() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LengthInMeters(&value)); + check_hresult(WINRT_SHIM(IMapRoute)->get_LengthInMeters(&value)); return value; } template Windows::Foundation::TimeSpan impl_IMapRoute::EstimatedDuration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_EstimatedDuration(put(value))); + check_hresult(WINRT_SHIM(IMapRoute)->get_EstimatedDuration(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IMapRoute::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IMapRoute)->get_Path(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapRoute::Legs() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Legs(put(value))); + check_hresult(WINRT_SHIM(IMapRoute)->get_Legs(put_abi(value))); return value; } template bool impl_IMapRoute::IsTrafficBased() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrafficBased(&value)); + check_hresult(WINRT_SHIM(IMapRoute)->get_IsTrafficBased(&value)); return value; } template Windows::Services::Maps::MapRouteRestrictions impl_IMapRoute2::ViolatedRestrictions() const { Windows::Services::Maps::MapRouteRestrictions value {}; - check_hresult(static_cast(static_cast(*this))->get_ViolatedRestrictions(&value)); + check_hresult(WINRT_SHIM(IMapRoute2)->get_ViolatedRestrictions(&value)); return value; } template bool impl_IMapRoute2::HasBlockedRoads() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasBlockedRoads(&value)); + check_hresult(WINRT_SHIM(IMapRoute2)->get_HasBlockedRoads(&value)); return value; } template Windows::Services::Maps::MapRoute impl_IMapRouteFinderResult::Route() const { Windows::Services::Maps::MapRoute value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Route(put(value))); + check_hresult(WINRT_SHIM(IMapRouteFinderResult)->get_Route(put_abi(value))); return value; } template Windows::Services::Maps::MapRouteFinderStatus impl_IMapRouteFinderResult::Status() const { Windows::Services::Maps::MapRouteFinderStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IMapRouteFinderResult)->get_Status(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapRouteFinderResult2::AlternateRoutes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AlternateRoutes(put(value))); + check_hresult(WINRT_SHIM(IMapRouteFinderResult2)->get_AlternateRoutes(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics::FindLocationsAtAsync(const Windows::Devices::Geolocation::Geopoint & queryPoint) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindLocationsAtAsync(get(queryPoint), put(result))); + check_hresult(WINRT_SHIM(IMapLocationFinderStatics)->abi_FindLocationsAtAsync(get_abi(queryPoint), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics::FindLocationsAsync(hstring_ref searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint) const +template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics::FindLocationsAsync(hstring_view searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindLocationsAsync(get(searchText), get(referencePoint), put(result))); + check_hresult(WINRT_SHIM(IMapLocationFinderStatics)->abi_FindLocationsAsync(get_abi(searchText), get_abi(referencePoint), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics::FindLocationsAsync(hstring_ref searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint, uint32_t maxCount) const +template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics::FindLocationsAsync(hstring_view searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint, uint32_t maxCount) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindLocationsWithMaxCountAsync(get(searchText), get(referencePoint), maxCount, put(result))); + check_hresult(WINRT_SHIM(IMapLocationFinderStatics)->abi_FindLocationsWithMaxCountAsync(get_abi(searchText), get_abi(referencePoint), maxCount, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapLocationFinderStatics2::FindLocationsAtAsync(const Windows::Devices::Geolocation::Geopoint & queryPoint, Windows::Services::Maps::MapLocationDesiredAccuracy accuracy) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_FindLocationsAtWithAccuracyAsync(get(queryPoint), accuracy, put(result))); + check_hresult(WINRT_SHIM(IMapLocationFinderStatics2)->abi_FindLocationsAtWithAccuracyAsync(get_abi(queryPoint), accuracy, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteAsync(get(startPoint), get(endPoint), put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteAsync(get_abi(startPoint), get_abi(endPoint), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint, Windows::Services::Maps::MapRouteOptimization optimization) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteWithOptimizationAsync(get(startPoint), get(endPoint), optimization, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteWithOptimizationAsync(get_abi(startPoint), get_abi(endPoint), optimization, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteWithOptimizationAndRestrictionsAsync(get(startPoint), get(endPoint), optimization, restrictions, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteWithOptimizationAndRestrictionsAsync(get_abi(startPoint), get_abi(endPoint), optimization, restrictions, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(get(startPoint), get(endPoint), optimization, restrictions, headingInDegrees, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(get_abi(startPoint), get_abi(endPoint), optimization, restrictions, headingInDegrees, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints) const +template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(iterable wayPoints) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteFromWaypointsAsync(get(wayPoints), put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteFromWaypointsAsync(get_abi(wayPoints), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization) const +template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteFromWaypointsAndOptimizationAsync(get(wayPoints), optimization, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteFromWaypointsAndOptimizationAsync(get_abi(wayPoints), optimization, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions) const +template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(get(wayPoints), optimization, restrictions, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(get_abi(wayPoints), optimization, restrictions, put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees) const +template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(get(wayPoints), optimization, restrictions, headingInDegrees, put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(get_abi(wayPoints), optimization, restrictions, headingInDegrees, put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetWalkingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetWalkingRouteAsync(get(startPoint), get(endPoint), put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetWalkingRouteAsync(get_abi(startPoint), get_abi(endPoint), put_abi(result))); return result; } -template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetWalkingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints) const +template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics::GetWalkingRouteFromWaypointsAsync(iterable wayPoints) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetWalkingRouteFromWaypointsAsync(get(wayPoints), put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics)->abi_GetWalkingRouteFromWaypointsAsync(get_abi(wayPoints), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IMapRouteFinderStatics2::GetDrivingRouteAsync(const Windows::Devices::Geolocation::Geopoint & startPoint, const Windows::Devices::Geolocation::Geopoint & endPoint, const Windows::Services::Maps::MapRouteDrivingOptions & options) const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_GetDrivingRouteWithOptionsAsync(get(startPoint), get(endPoint), get(options), put(result))); + check_hresult(WINRT_SHIM(IMapRouteFinderStatics2)->abi_GetDrivingRouteWithOptionsAsync(get_abi(startPoint), get_abi(endPoint), get_abi(options), put_abi(result))); return result; } -template void impl_IMapServiceStatics::ServiceToken(hstring_ref value) const +template void impl_IMapServiceStatics::ServiceToken(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ServiceToken(get(value))); + check_hresult(WINRT_SHIM(IMapServiceStatics)->put_ServiceToken(get_abi(value))); } template hstring impl_IMapServiceStatics::ServiceToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ServiceToken(put(value))); + check_hresult(WINRT_SHIM(IMapServiceStatics)->get_ServiceToken(put_abi(value))); return value; } template void impl_IMapManagerStatics::ShowDownloadedMapsUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowDownloadedMapsUI()); + check_hresult(WINRT_SHIM(IMapManagerStatics)->abi_ShowDownloadedMapsUI()); } template void impl_IMapManagerStatics::ShowMapsUpdateUI() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowMapsUpdateUI()); + check_hresult(WINRT_SHIM(IMapManagerStatics)->abi_ShowMapsUpdateUI()); } template hstring impl_IMapServiceStatics2::WorldViewRegionCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorldViewRegionCode(put(value))); + check_hresult(WINRT_SHIM(IMapServiceStatics2)->get_WorldViewRegionCode(put_abi(value))); return value; } template hstring impl_IMapServiceStatics3::DataAttributions() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DataAttributions(put(value))); + check_hresult(WINRT_SHIM(IMapServiceStatics3)->get_DataAttributions(put_abi(value))); return value; } @@ -1659,12 +1738,12 @@ inline Windows::Foundation::IAsyncOperation().FindLocationsAtAsync(queryPoint); } -inline Windows::Foundation::IAsyncOperation MapLocationFinder::FindLocationsAsync(hstring_ref searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint) +inline Windows::Foundation::IAsyncOperation MapLocationFinder::FindLocationsAsync(hstring_view searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint) { return get_activation_factory().FindLocationsAsync(searchText, referencePoint); } -inline Windows::Foundation::IAsyncOperation MapLocationFinder::FindLocationsAsync(hstring_ref searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint, uint32_t maxCount) +inline Windows::Foundation::IAsyncOperation MapLocationFinder::FindLocationsAsync(hstring_view searchText, const Windows::Devices::Geolocation::Geopoint & referencePoint, uint32_t maxCount) { return get_activation_factory().FindLocationsAsync(searchText, referencePoint, maxCount); } @@ -1708,22 +1787,22 @@ inline Windows::Foundation::IAsyncOperation().GetDrivingRouteAsync(startPoint, endPoint, optimization, restrictions, headingInDegrees); } -inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints) +inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(iterable wayPoints) { return get_activation_factory().GetDrivingRouteFromWaypointsAsync(wayPoints); } -inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization) +inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization) { return get_activation_factory().GetDrivingRouteFromWaypointsAsync(wayPoints, optimization); } -inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions) +inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions) { return get_activation_factory().GetDrivingRouteFromWaypointsAsync(wayPoints, optimization, restrictions); } -inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees) +inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetDrivingRouteFromWaypointsAsync(iterable wayPoints, Windows::Services::Maps::MapRouteOptimization optimization, Windows::Services::Maps::MapRouteRestrictions restrictions, double headingInDegrees) { return get_activation_factory().GetDrivingRouteFromWaypointsAsync(wayPoints, optimization, restrictions, headingInDegrees); } @@ -1733,7 +1812,7 @@ inline Windows::Foundation::IAsyncOperation().GetWalkingRouteAsync(startPoint, endPoint); } -inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetWalkingRouteFromWaypointsAsync(const Windows::Foundation::Collections::IIterable & wayPoints) +inline Windows::Foundation::IAsyncOperation MapRouteFinder::GetWalkingRouteFromWaypointsAsync(iterable wayPoints) { return get_activation_factory().GetWalkingRouteFromWaypointsAsync(wayPoints); } @@ -1743,7 +1822,7 @@ inline Windows::Foundation::IAsyncOperation().GetDrivingRouteAsync(startPoint, endPoint, options); } -inline void MapService::ServiceToken(hstring_ref value) +inline void MapService::ServiceToken(hstring_view value) { get_activation_factory().ServiceToken(value); } @@ -1766,3 +1845,257 @@ inline hstring MapService::DataAttributions() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapAddress2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapLocationFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapLocationFinderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapLocationFinderStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRoute2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteDrivingOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteFinderResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteFinderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteFinderStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteLeg & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteManeuver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapRouteManeuver2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapServiceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapServiceStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::IMapServiceStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapAddress & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapLocationFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapRoute & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapRouteDrivingOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapRouteFinderResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapRouteLeg & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Maps::MapRouteManeuver & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Services.Store.h b/10.0.14393.0/winrt/Windows.Services.Store.h index d2700d394..dfdaba06b 100644 --- a/10.0.14393.0/winrt/Windows.Services.Store.h +++ b/10.0.14393.0/winrt/Windows.Services.Store.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_StorePackageLicense(abi_arg_out value) noexcept override + HRESULT __stdcall get_StorePackageLicense(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StorePackageLicense()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorePackageLicense()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produc { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_SkuStoreId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SkuStoreId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SkuStoreId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SkuStoreId()); return S_OK; } catch (...) @@ -66,7 +72,8 @@ struct produce : produce_baseshim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -79,7 +86,8 @@ struct produce : produce_baseshim().IsTrial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrial()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -101,11 +110,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AddOnLicenses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddOnLicenses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddOnLicenses()); return S_OK; } catch (...) @@ -129,11 +140,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrialTimeRemaining(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrialTimeRemaining()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrialTimeRemaining()); return S_OK; } catch (...) @@ -146,7 +158,8 @@ struct produce : produce_baseshim().IsTrialOwnedByThisUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrialOwnedByThisUser()); return S_OK; } catch (...) @@ -155,11 +168,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrialUniqueId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrialUniqueId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrialUniqueId()); return S_OK; } catch (...) @@ -173,11 +187,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StoreId(abi_arg_out value) noexcept override + HRESULT __stdcall get_StoreId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreId()); return S_OK; } catch (...) @@ -187,11 +202,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_EndDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndDate()); return S_OK; } catch (...) @@ -200,11 +216,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Price(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Price()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Price()); return S_OK; } catch (...) @@ -214,11 +231,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -228,11 +246,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync()); return S_OK; } catch (...) @@ -242,11 +261,12 @@ struct produce : produce_base storePurchaseProperties, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseWithPurchasePropertiesAsync(impl::abi_arg_in storePurchaseProperties, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); return S_OK; } catch (...) @@ -264,7 +284,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsTrial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrial()); return S_OK; } catch (...) @@ -273,11 +294,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_CampaignId(abi_arg_out value) noexcept override + HRESULT __stdcall get_CampaignId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CampaignId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CampaignId()); return S_OK; } catch (...) @@ -287,11 +309,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DeveloperOfferId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeveloperOfferId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeveloperOfferId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeveloperOfferId()); return S_OK; } catch (...) @@ -301,11 +324,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_AcquiredDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_AcquiredDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcquiredDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcquiredDate()); return S_OK; } catch (...) @@ -314,11 +338,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_StartDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_StartDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StartDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartDate()); return S_OK; } catch (...) @@ -327,11 +352,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_EndDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_EndDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EndDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndDate()); return S_OK; } catch (...) @@ -340,11 +366,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TrialTimeRemaining(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrialTimeRemaining(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrialTimeRemaining()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrialTimeRemaining()); return S_OK; } catch (...) @@ -353,11 +380,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ExtendedJsonData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -375,7 +403,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -388,7 +417,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().TrackingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackingId()); return S_OK; } catch (...) @@ -401,7 +431,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BalanceRemaining()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BalanceRemaining()); return S_OK; } catch (...) @@ -414,7 +445,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -427,11 +459,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -441,11 +474,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_OfflineLicensesChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().OfflineLicensesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().OfflineLicensesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -458,6 +492,7 @@ struct produce : produce_baseshim()); this->shim().OfflineLicensesChanged(token); return S_OK; } @@ -467,11 +502,12 @@ struct produce : produce_base serviceTicket, abi_arg_in publisherUserId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCustomerPurchaseIdAsync(impl::abi_arg_in serviceTicket, impl::abi_arg_in publisherUserId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCustomerPurchaseIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCustomerPurchaseIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); return S_OK; } catch (...) @@ -481,11 +517,12 @@ struct produce : produce_base serviceTicket, abi_arg_in publisherUserId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCustomerCollectionsIdAsync(impl::abi_arg_in serviceTicket, impl::abi_arg_in publisherUserId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCustomerCollectionsIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCustomerCollectionsIdAsync(*reinterpret_cast(&serviceTicket), *reinterpret_cast(&publisherUserId))); return S_OK; } catch (...) @@ -495,11 +532,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetAppLicenseAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAppLicenseAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAppLicenseAsync()); return S_OK; } catch (...) @@ -509,11 +547,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetStoreProductForCurrentAppAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStoreProductForCurrentAppAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStoreProductForCurrentAppAsync()); return S_OK; } catch (...) @@ -523,11 +562,12 @@ struct produce : produce_base> productKinds, abi_arg_in> storeIds, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetStoreProductsAsync(impl::abi_arg_in> productKinds, impl::abi_arg_in> storeIds, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStoreProductsAsync(*reinterpret_cast *>(&productKinds), *reinterpret_cast *>(&storeIds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStoreProductsAsync(*reinterpret_cast *>(&productKinds), *reinterpret_cast *>(&storeIds))); return S_OK; } catch (...) @@ -537,11 +577,12 @@ struct produce : produce_base> productKinds, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAssociatedStoreProductsAsync(impl::abi_arg_in> productKinds, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAssociatedStoreProductsAsync(*reinterpret_cast *>(&productKinds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAssociatedStoreProductsAsync(*reinterpret_cast *>(&productKinds))); return S_OK; } catch (...) @@ -551,11 +592,12 @@ struct produce : produce_base> productKinds, uint32_t maxItemsToRetrievePerPage, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetAssociatedStoreProductsWithPagingAsync(impl::abi_arg_in> productKinds, uint32_t maxItemsToRetrievePerPage, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetAssociatedStoreProductsWithPagingAsync(*reinterpret_cast *>(&productKinds), maxItemsToRetrievePerPage)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAssociatedStoreProductsWithPagingAsync(*reinterpret_cast *>(&productKinds), maxItemsToRetrievePerPage)); return S_OK; } catch (...) @@ -565,11 +607,12 @@ struct produce : produce_base> productKinds, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetUserCollectionAsync(impl::abi_arg_in> productKinds, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetUserCollectionAsync(*reinterpret_cast *>(&productKinds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetUserCollectionAsync(*reinterpret_cast *>(&productKinds))); return S_OK; } catch (...) @@ -579,11 +622,12 @@ struct produce : produce_base> productKinds, uint32_t maxItemsToRetrievePerPage, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetUserCollectionWithPagingAsync(impl::abi_arg_in> productKinds, uint32_t maxItemsToRetrievePerPage, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetUserCollectionWithPagingAsync(*reinterpret_cast *>(&productKinds), maxItemsToRetrievePerPage)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetUserCollectionWithPagingAsync(*reinterpret_cast *>(&productKinds), maxItemsToRetrievePerPage)); return S_OK; } catch (...) @@ -593,11 +637,12 @@ struct produce : produce_base productStoreId, uint32_t quantity, GUID trackingId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReportConsumableFulfillmentAsync(impl::abi_arg_in productStoreId, uint32_t quantity, GUID trackingId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productStoreId), quantity, trackingId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReportConsumableFulfillmentAsync(*reinterpret_cast(&productStoreId), quantity, trackingId)); return S_OK; } catch (...) @@ -607,11 +652,12 @@ struct produce : produce_base productStoreId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetConsumableBalanceRemainingAsync(impl::abi_arg_in productStoreId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetConsumableBalanceRemainingAsync(*reinterpret_cast(&productStoreId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetConsumableBalanceRemainingAsync(*reinterpret_cast(&productStoreId))); return S_OK; } catch (...) @@ -621,11 +667,12 @@ struct produce : produce_base optionalPackage, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_AcquireStoreLicenseForOptionalPackageAsync(impl::abi_arg_in optionalPackage, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().AcquireStoreLicenseForOptionalPackageAsync(*reinterpret_cast(&optionalPackage))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AcquireStoreLicenseForOptionalPackageAsync(*reinterpret_cast(&optionalPackage))); return S_OK; } catch (...) @@ -635,11 +682,12 @@ struct produce : produce_base storeId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseAsync(impl::abi_arg_in storeId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storeId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storeId))); return S_OK; } catch (...) @@ -649,11 +697,12 @@ struct produce : produce_base storeId, abi_arg_in storePurchaseProperties, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseWithPurchasePropertiesAsync(impl::abi_arg_in storeId, impl::abi_arg_in storePurchaseProperties, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storeId), *reinterpret_cast(&storePurchaseProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storeId), *reinterpret_cast(&storePurchaseProperties))); return S_OK; } catch (...) @@ -663,11 +712,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_GetAppAndOptionalStorePackageUpdatesAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetAppAndOptionalStorePackageUpdatesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAppAndOptionalStorePackageUpdatesAsync()); return S_OK; } catch (...) @@ -677,11 +727,12 @@ struct produce : produce_base> storePackageUpdates, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDownloadStorePackageUpdatesAsync(impl::abi_arg_in> storePackageUpdates, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDownloadStorePackageUpdatesAsync(*reinterpret_cast *>(&storePackageUpdates))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDownloadStorePackageUpdatesAsync(*reinterpret_cast *>(&storePackageUpdates))); return S_OK; } catch (...) @@ -691,11 +742,12 @@ struct produce : produce_base> storePackageUpdates, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDownloadAndInstallStorePackageUpdatesAsync(impl::abi_arg_in> storePackageUpdates, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDownloadAndInstallStorePackageUpdatesAsync(*reinterpret_cast *>(&storePackageUpdates))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDownloadAndInstallStorePackageUpdatesAsync(*reinterpret_cast *>(&storePackageUpdates))); return S_OK; } catch (...) @@ -705,11 +757,12 @@ struct produce : produce_base> storeIds, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDownloadAndInstallStorePackagesAsync(impl::abi_arg_in> storeIds, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDownloadAndInstallStorePackagesAsync(*reinterpret_cast *>(&storeIds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDownloadAndInstallStorePackagesAsync(*reinterpret_cast *>(&storeIds))); return S_OK; } catch (...) @@ -723,11 +776,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -737,11 +791,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -755,11 +810,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -769,11 +825,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ImagePurposeTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImagePurposeTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImagePurposeTag()); return S_OK; } catch (...) @@ -787,7 +844,8 @@ struct produce : produce_baseshim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -800,7 +858,8 @@ struct produce : produce_baseshim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -809,11 +868,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Caption(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Caption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Caption()); return S_OK; } catch (...) @@ -827,11 +887,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SkuStoreId(abi_arg_out value) noexcept override + HRESULT __stdcall get_SkuStoreId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SkuStoreId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SkuStoreId()); return S_OK; } catch (...) @@ -845,7 +906,8 @@ struct produce : produce_baseshim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -854,11 +916,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExpirationDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpirationDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationDate()); return S_OK; } catch (...) @@ -867,11 +930,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -881,11 +945,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InAppOfferToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InAppOfferToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InAppOfferToken()); return S_OK; } catch (...) @@ -899,11 +964,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_LicenseLost(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_LicenseLost(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LicenseLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LicenseLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -916,6 +982,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LicenseLost(token); return S_OK; } @@ -925,11 +992,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -943,7 +1011,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsValid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsValid()); return S_OK; } catch (...) @@ -956,6 +1025,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ReleaseLicense(); return S_OK; } @@ -969,11 +1039,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Package(abi_arg_out value) noexcept override + HRESULT __stdcall get_Package(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Package()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Package()); return S_OK; } catch (...) @@ -987,7 +1058,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Mandatory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mandatory()); return S_OK; } catch (...) @@ -1004,7 +1076,8 @@ struct produce : produce { try { - *value = detach(this->shim().OverallState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverallState()); return S_OK; } catch (...) @@ -1013,11 +1086,12 @@ struct produce : produce } } - HRESULT __stdcall get_StorePackageUpdateStatuses(abi_arg_out> value) noexcept override + HRESULT __stdcall get_StorePackageUpdateStatuses(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StorePackageUpdateStatuses()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorePackageUpdateStatuses()); return S_OK; } catch (...) @@ -1031,11 +1105,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_FormattedBasePrice(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormattedBasePrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedBasePrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedBasePrice()); return S_OK; } catch (...) @@ -1045,11 +1120,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FormattedPrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedPrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedPrice()); return S_OK; } catch (...) @@ -1063,7 +1139,8 @@ struct produce : produce_baseshim().IsOnSale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnSale()); return S_OK; } catch (...) @@ -1072,11 +1149,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SaleEndDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaleEndDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaleEndDate()); return S_OK; } catch (...) @@ -1085,11 +1163,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrencyCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrencyCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrencyCode()); return S_OK; } catch (...) @@ -1099,11 +1178,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FormattedRecurrencePrice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedRecurrencePrice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedRecurrencePrice()); return S_OK; } catch (...) @@ -1117,11 +1197,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StoreId(abi_arg_out value) noexcept override + HRESULT __stdcall get_StoreId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreId()); return S_OK; } catch (...) @@ -1131,11 +1212,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1145,11 +1227,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1159,11 +1242,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1173,11 +1257,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ProductKind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProductKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProductKind()); return S_OK; } catch (...) @@ -1191,7 +1276,8 @@ struct produce : produce_baseshim().HasDigitalDownload()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasDigitalDownload()); return S_OK; } catch (...) @@ -1200,11 +1286,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -1214,11 +1301,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Images(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Images()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Images()); return S_OK; } catch (...) @@ -1228,11 +1316,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Videos(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Videos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Videos()); return S_OK; } catch (...) @@ -1242,11 +1331,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Skus(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Skus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Skus()); return S_OK; } catch (...) @@ -1260,7 +1350,8 @@ struct produce : produce_baseshim().IsInUserCollection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInUserCollection()); return S_OK; } catch (...) @@ -1269,11 +1360,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Price(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Price()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Price()); return S_OK; } catch (...) @@ -1283,11 +1375,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -1297,11 +1390,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LinkUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinkUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkUri()); return S_OK; } catch (...) @@ -1311,11 +1405,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetIsAnySkuInstalledAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsAnySkuInstalledAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsAnySkuInstalledAsync()); return S_OK; } catch (...) @@ -1325,11 +1420,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync()); return S_OK; } catch (...) @@ -1339,11 +1435,12 @@ struct produce : produce_base storePurchaseProperties, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseWithPurchasePropertiesAsync(impl::abi_arg_in storePurchaseProperties, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); return S_OK; } catch (...) @@ -1353,11 +1450,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InAppOfferToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InAppOfferToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InAppOfferToken()); return S_OK; } catch (...) @@ -1371,11 +1469,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Products(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Products(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Products()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Products()); return S_OK; } catch (...) @@ -1389,7 +1488,8 @@ struct produce : pro { try { - *value = detach(this->shim().HasMoreResults()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasMoreResults()); return S_OK; } catch (...) @@ -1402,7 +1502,8 @@ struct produce : pro { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -1411,11 +1512,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetNextAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetNextAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetNextAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetNextAsync()); return S_OK; } catch (...) @@ -1429,11 +1531,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_Products(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Products(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Products()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Products()); return S_OK; } catch (...) @@ -1447,7 +1550,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -1460,11 +1564,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Product(abi_arg_out value) noexcept override + HRESULT __stdcall get_Product(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Product()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Product()); return S_OK; } catch (...) @@ -1478,7 +1583,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -1491,11 +1597,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1505,10 +1612,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -1518,11 +1626,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ExtendedJsonData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -1532,10 +1641,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_ExtendedJsonData(abi_arg_in value) noexcept override + HRESULT __stdcall put_ExtendedJsonData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExtendedJsonData(*reinterpret_cast(&value)); return S_OK; } @@ -1549,11 +1659,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in name, abi_arg_out storePurchaseProperties) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in name, impl::abi_arg_out storePurchaseProperties) noexcept override { try { - *storePurchaseProperties = detach(this->shim().Create(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *storePurchaseProperties = detach_abi(this->shim().Create(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1571,7 +1682,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -1584,7 +1696,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -1597,11 +1710,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_SendRequestAsync(abi_arg_in context, uint32_t requestKind, abi_arg_in parametersAsJson, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SendRequestAsync(impl::abi_arg_in context, uint32_t requestKind, impl::abi_arg_in parametersAsJson, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SendRequestAsync(*reinterpret_cast(&context), requestKind, *reinterpret_cast(¶metersAsJson))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SendRequestAsync(*reinterpret_cast(&context), requestKind, *reinterpret_cast(¶metersAsJson))); return S_OK; } catch (...) @@ -1615,11 +1729,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Response(abi_arg_out value) noexcept override + HRESULT __stdcall get_Response(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Response()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Response()); return S_OK; } catch (...) @@ -1633,7 +1748,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -1646,11 +1762,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_StoreId(abi_arg_out value) noexcept override + HRESULT __stdcall get_StoreId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StoreId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoreId()); return S_OK; } catch (...) @@ -1660,11 +1777,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1674,11 +1792,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1688,11 +1807,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -1706,7 +1826,8 @@ struct produce : produce_baseshim().IsTrial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTrial()); return S_OK; } catch (...) @@ -1715,11 +1836,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomDeveloperData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomDeveloperData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomDeveloperData()); return S_OK; } catch (...) @@ -1729,11 +1851,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Images(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Images()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Images()); return S_OK; } catch (...) @@ -1743,11 +1866,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Videos(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Videos()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Videos()); return S_OK; } catch (...) @@ -1757,11 +1881,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Availabilities(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Availabilities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Availabilities()); return S_OK; } catch (...) @@ -1771,11 +1896,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Price(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Price()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Price()); return S_OK; } catch (...) @@ -1785,11 +1911,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtendedJsonData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedJsonData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedJsonData()); return S_OK; } catch (...) @@ -1803,7 +1930,8 @@ struct produce : produce_baseshim().IsInUserCollection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInUserCollection()); return S_OK; } catch (...) @@ -1812,11 +1940,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BundledSkus(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BundledSkus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BundledSkus()); return S_OK; } catch (...) @@ -1826,11 +1955,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CollectionData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CollectionData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CollectionData()); return S_OK; } catch (...) @@ -1840,11 +1970,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetIsInstalledAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIsInstalledAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIsInstalledAsync()); return S_OK; } catch (...) @@ -1854,11 +1985,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync()); return S_OK; } catch (...) @@ -1868,11 +2000,12 @@ struct produce : produce_base storePurchaseProperties, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestPurchaseWithPurchasePropertiesAsync(impl::abi_arg_in storePurchaseProperties, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestPurchaseAsync(*reinterpret_cast(&storePurchaseProperties))); return S_OK; } catch (...) @@ -1886,7 +2019,8 @@ struct produce : produce_baseshim().IsSubscription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSubscription()); return S_OK; } catch (...) @@ -1895,11 +2029,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SubscriptionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubscriptionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubscriptionInfo()); return S_OK; } catch (...) @@ -1917,7 +2052,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BillingPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BillingPeriod()); return S_OK; } catch (...) @@ -1930,7 +2066,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().BillingPeriodUnit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BillingPeriodUnit()); return S_OK; } catch (...) @@ -1943,7 +2080,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().HasTrialPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasTrialPeriod()); return S_OK; } catch (...) @@ -1956,7 +2094,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().TrialPeriod()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrialPeriod()); return S_OK; } catch (...) @@ -1969,7 +2108,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().TrialPeriodUnit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrialPeriodUnit()); return S_OK; } catch (...) @@ -1982,11 +2122,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -1996,11 +2137,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideoPurposeTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoPurposeTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoPurposeTag()); return S_OK; } catch (...) @@ -2014,7 +2156,8 @@ struct produce : produce_baseshim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -2027,7 +2170,8 @@ struct produce : produce_baseshim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -2036,11 +2180,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Caption(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Caption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Caption()); return S_OK; } catch (...) @@ -2050,11 +2195,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PreviewImage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviewImage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviewImage()); return S_OK; } catch (...) @@ -2072,1002 +2218,1002 @@ namespace Windows::Services::Store { template Windows::Foundation::Collections::IMapView impl_IStoreProductPagedQueryResult::Products() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Products(put(value))); + check_hresult(WINRT_SHIM(IStoreProductPagedQueryResult)->get_Products(put_abi(value))); return value; } template bool impl_IStoreProductPagedQueryResult::HasMoreResults() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasMoreResults(&value)); + check_hresult(WINRT_SHIM(IStoreProductPagedQueryResult)->get_HasMoreResults(&value)); return value; } template HRESULT impl_IStoreProductPagedQueryResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreProductPagedQueryResult)->get_ExtendedError(&value)); return value; } template Windows::Foundation::IAsyncOperation impl_IStoreProductPagedQueryResult::GetNextAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetNextAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreProductPagedQueryResult)->abi_GetNextAsync(put_abi(operation))); return operation; } template Windows::Foundation::Collections::IMapView impl_IStoreProductQueryResult::Products() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Products(put(value))); + check_hresult(WINRT_SHIM(IStoreProductQueryResult)->get_Products(put_abi(value))); return value; } template HRESULT impl_IStoreProductQueryResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreProductQueryResult)->get_ExtendedError(&value)); return value; } template Windows::Services::Store::StoreProduct impl_IStoreProductResult::Product() const { Windows::Services::Store::StoreProduct value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Product(put(value))); + check_hresult(WINRT_SHIM(IStoreProductResult)->get_Product(put_abi(value))); return value; } template HRESULT impl_IStoreProductResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreProductResult)->get_ExtendedError(&value)); return value; } template hstring impl_IStorePurchaseProperties::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IStorePurchaseProperties)->get_Name(put_abi(value))); return value; } -template void impl_IStorePurchaseProperties::Name(hstring_ref value) const +template void impl_IStorePurchaseProperties::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(IStorePurchaseProperties)->put_Name(get_abi(value))); } template hstring impl_IStorePurchaseProperties::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStorePurchaseProperties)->get_ExtendedJsonData(put_abi(value))); return value; } -template void impl_IStorePurchaseProperties::ExtendedJsonData(hstring_ref value) const +template void impl_IStorePurchaseProperties::ExtendedJsonData(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ExtendedJsonData(get(value))); + check_hresult(WINRT_SHIM(IStorePurchaseProperties)->put_ExtendedJsonData(get_abi(value))); } -template Windows::Services::Store::StorePurchaseProperties impl_IStorePurchasePropertiesFactory::Create(hstring_ref name) const +template Windows::Services::Store::StorePurchaseProperties impl_IStorePurchasePropertiesFactory::Create(hstring_view name) const { Windows::Services::Store::StorePurchaseProperties storePurchaseProperties { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(name), put(storePurchaseProperties))); + check_hresult(WINRT_SHIM(IStorePurchasePropertiesFactory)->abi_Create(get_abi(name), put_abi(storePurchaseProperties))); return storePurchaseProperties; } template bool impl_IStoreCollectionData::IsTrial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrial(&value)); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_IsTrial(&value)); return value; } template hstring impl_IStoreCollectionData::CampaignId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CampaignId(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_CampaignId(put_abi(value))); return value; } template hstring impl_IStoreCollectionData::DeveloperOfferId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeveloperOfferId(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_DeveloperOfferId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IStoreCollectionData::AcquiredDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_AcquiredDate(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_AcquiredDate(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IStoreCollectionData::StartDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_StartDate(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_StartDate(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IStoreCollectionData::EndDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_EndDate(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_EndDate(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IStoreCollectionData::TrialTimeRemaining() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrialTimeRemaining(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_TrialTimeRemaining(put_abi(value))); return value; } template hstring impl_IStoreCollectionData::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreCollectionData)->get_ExtendedJsonData(put_abi(value))); return value; } template hstring impl_IStoreLicense::SkuStoreId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SkuStoreId(put(value))); + check_hresult(WINRT_SHIM(IStoreLicense)->get_SkuStoreId(put_abi(value))); return value; } template bool impl_IStoreLicense::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IStoreLicense)->get_IsActive(&value)); return value; } template Windows::Foundation::DateTime impl_IStoreLicense::ExpirationDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IStoreLicense)->get_ExpirationDate(put_abi(value))); return value; } template hstring impl_IStoreLicense::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreLicense)->get_ExtendedJsonData(put_abi(value))); return value; } template hstring impl_IStoreLicense::InAppOfferToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InAppOfferToken(put(value))); + check_hresult(WINRT_SHIM(IStoreLicense)->get_InAppOfferToken(put_abi(value))); return value; } template hstring impl_IStoreAppLicense::SkuStoreId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SkuStoreId(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_SkuStoreId(put_abi(value))); return value; } template bool impl_IStoreAppLicense::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_IsActive(&value)); return value; } template bool impl_IStoreAppLicense::IsTrial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrial(&value)); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_IsTrial(&value)); return value; } template Windows::Foundation::DateTime impl_IStoreAppLicense::ExpirationDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpirationDate(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_ExpirationDate(put_abi(value))); return value; } template hstring impl_IStoreAppLicense::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_ExtendedJsonData(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IStoreAppLicense::AddOnLicenses() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_AddOnLicenses(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_AddOnLicenses(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IStoreAppLicense::TrialTimeRemaining() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_TrialTimeRemaining(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_TrialTimeRemaining(put_abi(value))); return value; } template bool impl_IStoreAppLicense::IsTrialOwnedByThisUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrialOwnedByThisUser(&value)); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_IsTrialOwnedByThisUser(&value)); return value; } template hstring impl_IStoreAppLicense::TrialUniqueId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TrialUniqueId(put(value))); + check_hresult(WINRT_SHIM(IStoreAppLicense)->get_TrialUniqueId(put_abi(value))); return value; } template hstring impl_IStoreSendRequestResult::Response() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Response(put(value))); + check_hresult(WINRT_SHIM(IStoreSendRequestResult)->get_Response(put_abi(value))); return value; } template HRESULT impl_IStoreSendRequestResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreSendRequestResult)->get_ExtendedError(&value)); return value; } template hstring impl_IStoreProduct::StoreId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreId(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_StoreId(put_abi(value))); return value; } template hstring impl_IStoreProduct::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Language(put_abi(value))); return value; } template hstring impl_IStoreProduct::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Title(put_abi(value))); return value; } template hstring impl_IStoreProduct::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Description(put_abi(value))); return value; } template hstring impl_IStoreProduct::ProductKind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProductKind(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_ProductKind(put_abi(value))); return value; } template bool impl_IStoreProduct::HasDigitalDownload() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasDigitalDownload(&value)); + check_hresult(WINRT_SHIM(IStoreProduct)->get_HasDigitalDownload(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreProduct::Keywords() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Keywords(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreProduct::Images() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Images(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Images(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreProduct::Videos() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Videos(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Videos(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreProduct::Skus() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Skus(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Skus(put_abi(value))); return value; } template bool impl_IStoreProduct::IsInUserCollection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInUserCollection(&value)); + check_hresult(WINRT_SHIM(IStoreProduct)->get_IsInUserCollection(&value)); return value; } template Windows::Services::Store::StorePrice impl_IStoreProduct::Price() const { Windows::Services::Store::StorePrice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Price(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_Price(put_abi(value))); return value; } template hstring impl_IStoreProduct::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_ExtendedJsonData(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IStoreProduct::LinkUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinkUri(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_LinkUri(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStoreProduct::GetIsAnySkuInstalledAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsAnySkuInstalledAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreProduct)->abi_GetIsAnySkuInstalledAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreProduct::RequestPurchaseAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreProduct)->abi_RequestPurchaseAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreProduct::RequestPurchaseAsync(const Windows::Services::Store::StorePurchaseProperties & storePurchaseProperties) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseWithPurchasePropertiesAsync(get(storePurchaseProperties), put(operation))); + check_hresult(WINRT_SHIM(IStoreProduct)->abi_RequestPurchaseWithPurchasePropertiesAsync(get_abi(storePurchaseProperties), put_abi(operation))); return operation; } template hstring impl_IStoreProduct::InAppOfferToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_InAppOfferToken(put(value))); + check_hresult(WINRT_SHIM(IStoreProduct)->get_InAppOfferToken(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IStoreImage::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IStoreImage)->get_Uri(put_abi(value))); return value; } template hstring impl_IStoreImage::ImagePurposeTag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ImagePurposeTag(put(value))); + check_hresult(WINRT_SHIM(IStoreImage)->get_ImagePurposeTag(put_abi(value))); return value; } template uint32_t impl_IStoreImage::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IStoreImage)->get_Width(&value)); return value; } template uint32_t impl_IStoreImage::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IStoreImage)->get_Height(&value)); return value; } template hstring impl_IStoreImage::Caption() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Caption(put(value))); + check_hresult(WINRT_SHIM(IStoreImage)->get_Caption(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IStoreVideo::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IStoreVideo)->get_Uri(put_abi(value))); return value; } template hstring impl_IStoreVideo::VideoPurposeTag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VideoPurposeTag(put(value))); + check_hresult(WINRT_SHIM(IStoreVideo)->get_VideoPurposeTag(put_abi(value))); return value; } template uint32_t impl_IStoreVideo::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IStoreVideo)->get_Width(&value)); return value; } template uint32_t impl_IStoreVideo::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IStoreVideo)->get_Height(&value)); return value; } template hstring impl_IStoreVideo::Caption() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Caption(put(value))); + check_hresult(WINRT_SHIM(IStoreVideo)->get_Caption(put_abi(value))); return value; } template Windows::Services::Store::StoreImage impl_IStoreVideo::PreviewImage() const { Windows::Services::Store::StoreImage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreviewImage(put(value))); + check_hresult(WINRT_SHIM(IStoreVideo)->get_PreviewImage(put_abi(value))); return value; } template hstring impl_IStoreSku::StoreId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreId(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_StoreId(put_abi(value))); return value; } template hstring impl_IStoreSku::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Language(put_abi(value))); return value; } template hstring impl_IStoreSku::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Title(put_abi(value))); return value; } template hstring impl_IStoreSku::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Description(put_abi(value))); return value; } template bool impl_IStoreSku::IsTrial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTrial(&value)); + check_hresult(WINRT_SHIM(IStoreSku)->get_IsTrial(&value)); return value; } template hstring impl_IStoreSku::CustomDeveloperData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CustomDeveloperData(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_CustomDeveloperData(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreSku::Images() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Images(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Images(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreSku::Videos() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Videos(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Videos(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreSku::Availabilities() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Availabilities(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Availabilities(put_abi(value))); return value; } template Windows::Services::Store::StorePrice impl_IStoreSku::Price() const { Windows::Services::Store::StorePrice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Price(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_Price(put_abi(value))); return value; } template hstring impl_IStoreSku::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_ExtendedJsonData(put_abi(value))); return value; } template bool impl_IStoreSku::IsInUserCollection() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInUserCollection(&value)); + check_hresult(WINRT_SHIM(IStoreSku)->get_IsInUserCollection(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IStoreSku::BundledSkus() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_BundledSkus(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_BundledSkus(put_abi(value))); return value; } template Windows::Services::Store::StoreCollectionData impl_IStoreSku::CollectionData() const { Windows::Services::Store::StoreCollectionData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CollectionData(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_CollectionData(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStoreSku::GetIsInstalledAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIsInstalledAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreSku)->abi_GetIsInstalledAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreSku::RequestPurchaseAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreSku)->abi_RequestPurchaseAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreSku::RequestPurchaseAsync(const Windows::Services::Store::StorePurchaseProperties & storePurchaseProperties) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseWithPurchasePropertiesAsync(get(storePurchaseProperties), put(operation))); + check_hresult(WINRT_SHIM(IStoreSku)->abi_RequestPurchaseWithPurchasePropertiesAsync(get_abi(storePurchaseProperties), put_abi(operation))); return operation; } template bool impl_IStoreSku::IsSubscription() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSubscription(&value)); + check_hresult(WINRT_SHIM(IStoreSku)->get_IsSubscription(&value)); return value; } template Windows::Services::Store::StoreSubscriptionInfo impl_IStoreSku::SubscriptionInfo() const { Windows::Services::Store::StoreSubscriptionInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SubscriptionInfo(put(value))); + check_hresult(WINRT_SHIM(IStoreSku)->get_SubscriptionInfo(put_abi(value))); return value; } template hstring impl_IStoreAvailability::StoreId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StoreId(put(value))); + check_hresult(WINRT_SHIM(IStoreAvailability)->get_StoreId(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IStoreAvailability::EndDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_EndDate(put(value))); + check_hresult(WINRT_SHIM(IStoreAvailability)->get_EndDate(put_abi(value))); return value; } template Windows::Services::Store::StorePrice impl_IStoreAvailability::Price() const { Windows::Services::Store::StorePrice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Price(put(value))); + check_hresult(WINRT_SHIM(IStoreAvailability)->get_Price(put_abi(value))); return value; } template hstring impl_IStoreAvailability::ExtendedJsonData() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedJsonData(put(value))); + check_hresult(WINRT_SHIM(IStoreAvailability)->get_ExtendedJsonData(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStoreAvailability::RequestPurchaseAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreAvailability)->abi_RequestPurchaseAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreAvailability::RequestPurchaseAsync(const Windows::Services::Store::StorePurchaseProperties & storePurchaseProperties) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseWithPurchasePropertiesAsync(get(storePurchaseProperties), put(operation))); + check_hresult(WINRT_SHIM(IStoreAvailability)->abi_RequestPurchaseWithPurchasePropertiesAsync(get_abi(storePurchaseProperties), put_abi(operation))); return operation; } template hstring impl_IStorePrice::FormattedBasePrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedBasePrice(put(value))); + check_hresult(WINRT_SHIM(IStorePrice)->get_FormattedBasePrice(put_abi(value))); return value; } template hstring impl_IStorePrice::FormattedPrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedPrice(put(value))); + check_hresult(WINRT_SHIM(IStorePrice)->get_FormattedPrice(put_abi(value))); return value; } template bool impl_IStorePrice::IsOnSale() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnSale(&value)); + check_hresult(WINRT_SHIM(IStorePrice)->get_IsOnSale(&value)); return value; } template Windows::Foundation::DateTime impl_IStorePrice::SaleEndDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_SaleEndDate(put(value))); + check_hresult(WINRT_SHIM(IStorePrice)->get_SaleEndDate(put_abi(value))); return value; } template hstring impl_IStorePrice::CurrencyCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrencyCode(put(value))); + check_hresult(WINRT_SHIM(IStorePrice)->get_CurrencyCode(put_abi(value))); return value; } template hstring impl_IStorePrice::FormattedRecurrencePrice() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormattedRecurrencePrice(put(value))); + check_hresult(WINRT_SHIM(IStorePrice)->get_FormattedRecurrencePrice(put_abi(value))); return value; } template uint32_t impl_IStoreSubscriptionInfo::BillingPeriod() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BillingPeriod(&value)); + check_hresult(WINRT_SHIM(IStoreSubscriptionInfo)->get_BillingPeriod(&value)); return value; } template Windows::Services::Store::StoreDurationUnit impl_IStoreSubscriptionInfo::BillingPeriodUnit() const { Windows::Services::Store::StoreDurationUnit value {}; - check_hresult(static_cast(static_cast(*this))->get_BillingPeriodUnit(&value)); + check_hresult(WINRT_SHIM(IStoreSubscriptionInfo)->get_BillingPeriodUnit(&value)); return value; } template bool impl_IStoreSubscriptionInfo::HasTrialPeriod() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasTrialPeriod(&value)); + check_hresult(WINRT_SHIM(IStoreSubscriptionInfo)->get_HasTrialPeriod(&value)); return value; } template uint32_t impl_IStoreSubscriptionInfo::TrialPeriod() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TrialPeriod(&value)); + check_hresult(WINRT_SHIM(IStoreSubscriptionInfo)->get_TrialPeriod(&value)); return value; } template Windows::Services::Store::StoreDurationUnit impl_IStoreSubscriptionInfo::TrialPeriodUnit() const { Windows::Services::Store::StoreDurationUnit value {}; - check_hresult(static_cast(static_cast(*this))->get_TrialPeriodUnit(&value)); + check_hresult(WINRT_SHIM(IStoreSubscriptionInfo)->get_TrialPeriodUnit(&value)); return value; } template Windows::Services::Store::StoreConsumableStatus impl_IStoreConsumableResult::Status() const { Windows::Services::Store::StoreConsumableStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IStoreConsumableResult)->get_Status(&value)); return value; } template GUID impl_IStoreConsumableResult::TrackingId() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->get_TrackingId(&value)); + check_hresult(WINRT_SHIM(IStoreConsumableResult)->get_TrackingId(&value)); return value; } template uint32_t impl_IStoreConsumableResult::BalanceRemaining() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BalanceRemaining(&value)); + check_hresult(WINRT_SHIM(IStoreConsumableResult)->get_BalanceRemaining(&value)); return value; } template HRESULT impl_IStoreConsumableResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreConsumableResult)->get_ExtendedError(&value)); return value; } template Windows::Services::Store::StorePurchaseStatus impl_IStorePurchaseResult::Status() const { Windows::Services::Store::StorePurchaseStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IStorePurchaseResult)->get_Status(&value)); return value; } template HRESULT impl_IStorePurchaseResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStorePurchaseResult)->get_ExtendedError(&value)); return value; } template Windows::Services::Store::StoreContext impl_IStoreContextStatics::GetDefault() const { Windows::Services::Store::StoreContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(value))); + check_hresult(WINRT_SHIM(IStoreContextStatics)->abi_GetDefault(put_abi(value))); return value; } template Windows::Services::Store::StoreContext impl_IStoreContextStatics::GetForUser(const Windows::System::User & user) const { Windows::Services::Store::StoreContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(value))); + check_hresult(WINRT_SHIM(IStoreContextStatics)->abi_GetForUser(get_abi(user), put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IStoreRequestHelperStatics::SendRequestAsync(const Windows::Services::Store::StoreContext & context, uint32_t requestKind, hstring_ref parametersAsJson) const +template Windows::Foundation::IAsyncOperation impl_IStoreRequestHelperStatics::SendRequestAsync(const Windows::Services::Store::StoreContext & context, uint32_t requestKind, hstring_view parametersAsJson) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SendRequestAsync(get(context), requestKind, get(parametersAsJson), put(operation))); + check_hresult(WINRT_SHIM(IStoreRequestHelperStatics)->abi_SendRequestAsync(get_abi(context), requestKind, get_abi(parametersAsJson), put_abi(operation))); return operation; } template Windows::System::User impl_IStoreContext::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IStoreContext)->get_User(put_abi(value))); return value; } -template event_token impl_IStoreContext::OfflineLicensesChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IStoreContext::OfflineLicensesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_OfflineLicensesChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IStoreContext)->add_OfflineLicensesChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IStoreContext::OfflineLicensesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IStoreContext::OfflineLicensesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Store::IStoreContext::remove_OfflineLicensesChanged, OfflineLicensesChanged(handler)); } template void impl_IStoreContext::OfflineLicensesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_OfflineLicensesChanged(token)); + check_hresult(WINRT_SHIM(IStoreContext)->remove_OfflineLicensesChanged(token)); } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetCustomerPurchaseIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetCustomerPurchaseIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCustomerPurchaseIdAsync(get(serviceTicket), get(publisherUserId), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetCustomerPurchaseIdAsync(get_abi(serviceTicket), get_abi(publisherUserId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetCustomerCollectionsIdAsync(hstring_ref serviceTicket, hstring_ref publisherUserId) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetCustomerCollectionsIdAsync(hstring_view serviceTicket, hstring_view publisherUserId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCustomerCollectionsIdAsync(get(serviceTicket), get(publisherUserId), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetCustomerCollectionsIdAsync(get_abi(serviceTicket), get_abi(publisherUserId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetAppLicenseAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppLicenseAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetAppLicenseAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetStoreProductForCurrentAppAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStoreProductForCurrentAppAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetStoreProductForCurrentAppAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetStoreProductsAsync(const Windows::Foundation::Collections::IIterable & productKinds, const Windows::Foundation::Collections::IIterable & storeIds) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetStoreProductsAsync(iterable productKinds, iterable storeIds) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStoreProductsAsync(get(productKinds), get(storeIds), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetStoreProductsAsync(get_abi(productKinds), get_abi(storeIds), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetAssociatedStoreProductsAsync(const Windows::Foundation::Collections::IIterable & productKinds) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetAssociatedStoreProductsAsync(iterable productKinds) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAssociatedStoreProductsAsync(get(productKinds), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetAssociatedStoreProductsAsync(get_abi(productKinds), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetAssociatedStoreProductsWithPagingAsync(const Windows::Foundation::Collections::IIterable & productKinds, uint32_t maxItemsToRetrievePerPage) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetAssociatedStoreProductsWithPagingAsync(iterable productKinds, uint32_t maxItemsToRetrievePerPage) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAssociatedStoreProductsWithPagingAsync(get(productKinds), maxItemsToRetrievePerPage, put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetAssociatedStoreProductsWithPagingAsync(get_abi(productKinds), maxItemsToRetrievePerPage, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetUserCollectionAsync(const Windows::Foundation::Collections::IIterable & productKinds) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetUserCollectionAsync(iterable productKinds) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetUserCollectionAsync(get(productKinds), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetUserCollectionAsync(get_abi(productKinds), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetUserCollectionWithPagingAsync(const Windows::Foundation::Collections::IIterable & productKinds, uint32_t maxItemsToRetrievePerPage) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetUserCollectionWithPagingAsync(iterable productKinds, uint32_t maxItemsToRetrievePerPage) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetUserCollectionWithPagingAsync(get(productKinds), maxItemsToRetrievePerPage, put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetUserCollectionWithPagingAsync(get_abi(productKinds), maxItemsToRetrievePerPage, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::ReportConsumableFulfillmentAsync(hstring_ref productStoreId, uint32_t quantity, GUID trackingId) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::ReportConsumableFulfillmentAsync(hstring_view productStoreId, uint32_t quantity, GUID trackingId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReportConsumableFulfillmentAsync(get(productStoreId), quantity, trackingId, put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_ReportConsumableFulfillmentAsync(get_abi(productStoreId), quantity, trackingId, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetConsumableBalanceRemainingAsync(hstring_ref productStoreId) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::GetConsumableBalanceRemainingAsync(hstring_view productStoreId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetConsumableBalanceRemainingAsync(get(productStoreId), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetConsumableBalanceRemainingAsync(get_abi(productStoreId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStoreContext::AcquireStoreLicenseForOptionalPackageAsync(const Windows::ApplicationModel::Package & optionalPackage) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_AcquireStoreLicenseForOptionalPackageAsync(get(optionalPackage), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_AcquireStoreLicenseForOptionalPackageAsync(get_abi(optionalPackage), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::RequestPurchaseAsync(hstring_ref storeId) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::RequestPurchaseAsync(hstring_view storeId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseAsync(get(storeId), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_RequestPurchaseAsync(get_abi(storeId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStoreContext::RequestPurchaseAsync(hstring_ref storeId, const Windows::Services::Store::StorePurchaseProperties & storePurchaseProperties) const +template Windows::Foundation::IAsyncOperation impl_IStoreContext::RequestPurchaseAsync(hstring_view storeId, const Windows::Services::Store::StorePurchaseProperties & storePurchaseProperties) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestPurchaseWithPurchasePropertiesAsync(get(storeId), get(storePurchaseProperties), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_RequestPurchaseWithPurchasePropertiesAsync(get_abi(storeId), get_abi(storePurchaseProperties), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStoreContext::GetAppAndOptionalStorePackageUpdatesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAppAndOptionalStorePackageUpdatesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_GetAppAndOptionalStorePackageUpdatesAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadStorePackageUpdatesAsync(const Windows::Foundation::Collections::IIterable & storePackageUpdates) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadStorePackageUpdatesAsync(iterable storePackageUpdates) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDownloadStorePackageUpdatesAsync(get(storePackageUpdates), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_RequestDownloadStorePackageUpdatesAsync(get_abi(storePackageUpdates), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadAndInstallStorePackageUpdatesAsync(const Windows::Foundation::Collections::IIterable & storePackageUpdates) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadAndInstallStorePackageUpdatesAsync(iterable storePackageUpdates) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDownloadAndInstallStorePackageUpdatesAsync(get(storePackageUpdates), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_RequestDownloadAndInstallStorePackageUpdatesAsync(get_abi(storePackageUpdates), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadAndInstallStorePackagesAsync(const Windows::Foundation::Collections::IIterable & storeIds) const +template Windows::Foundation::IAsyncOperationWithProgress impl_IStoreContext::RequestDownloadAndInstallStorePackagesAsync(iterable storeIds) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDownloadAndInstallStorePackagesAsync(get(storeIds), put(operation))); + check_hresult(WINRT_SHIM(IStoreContext)->abi_RequestDownloadAndInstallStorePackagesAsync(get_abi(storeIds), put_abi(operation))); return operation; } template Windows::ApplicationModel::Package impl_IStorePackageUpdate::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IStorePackageUpdate)->get_Package(put_abi(value))); return value; } template bool impl_IStorePackageUpdate::Mandatory() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Mandatory(&value)); + check_hresult(WINRT_SHIM(IStorePackageUpdate)->get_Mandatory(&value)); return value; } template Windows::Services::Store::StorePackageUpdateState impl_IStorePackageUpdateResult::OverallState() const { Windows::Services::Store::StorePackageUpdateState value {}; - check_hresult(static_cast(static_cast(*this))->get_OverallState(&value)); + check_hresult(WINRT_SHIM(IStorePackageUpdateResult)->get_OverallState(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IStorePackageUpdateResult::StorePackageUpdateStatuses() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_StorePackageUpdateStatuses(put(value))); + check_hresult(WINRT_SHIM(IStorePackageUpdateResult)->get_StorePackageUpdateStatuses(put_abi(value))); return value; } template Windows::Services::Store::StorePackageLicense impl_IStoreAcquireLicenseResult::StorePackageLicense() const { Windows::Services::Store::StorePackageLicense value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StorePackageLicense(put(value))); + check_hresult(WINRT_SHIM(IStoreAcquireLicenseResult)->get_StorePackageLicense(put_abi(value))); return value; } template HRESULT impl_IStoreAcquireLicenseResult::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(IStoreAcquireLicenseResult)->get_ExtendedError(&value)); return value; } -template event_token impl_IStorePackageLicense::LicenseLost(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IStorePackageLicense::LicenseLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LicenseLost(get(handler), &token)); + check_hresult(WINRT_SHIM(IStorePackageLicense)->add_LicenseLost(get_abi(handler), &token)); return token; } -template event_revoker impl_IStorePackageLicense::LicenseLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IStorePackageLicense::LicenseLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Services::Store::IStorePackageLicense::remove_LicenseLost, LicenseLost(handler)); } template void impl_IStorePackageLicense::LicenseLost(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LicenseLost(token)); + check_hresult(WINRT_SHIM(IStorePackageLicense)->remove_LicenseLost(token)); } template Windows::ApplicationModel::Package impl_IStorePackageLicense::Package() const { Windows::ApplicationModel::Package value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Package(put(value))); + check_hresult(WINRT_SHIM(IStorePackageLicense)->get_Package(put_abi(value))); return value; } template bool impl_IStorePackageLicense::IsValid() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsValid(&value)); + check_hresult(WINRT_SHIM(IStorePackageLicense)->get_IsValid(&value)); return value; } template void impl_IStorePackageLicense::ReleaseLicense() const { - check_hresult(static_cast(static_cast(*this))->abi_ReleaseLicense()); + check_hresult(WINRT_SHIM(IStorePackageLicense)->abi_ReleaseLicense()); } inline Windows::Services::Store::StoreContext StoreContext::GetDefault() @@ -3084,11 +3230,11 @@ inline StorePurchaseProperties::StorePurchaseProperties() : StorePurchaseProperties(activate_instance()) {} -inline StorePurchaseProperties::StorePurchaseProperties(hstring_ref name) : +inline StorePurchaseProperties::StorePurchaseProperties(hstring_view name) : StorePurchaseProperties(get_activation_factory().Create(name)) {} -inline Windows::Foundation::IAsyncOperation StoreRequestHelper::SendRequestAsync(const Windows::Services::Store::StoreContext & context, uint32_t requestKind, hstring_ref parametersAsJson) +inline Windows::Foundation::IAsyncOperation StoreRequestHelper::SendRequestAsync(const Windows::Services::Store::StoreContext & context, uint32_t requestKind, hstring_view parametersAsJson) { return get_activation_factory().SendRequestAsync(context, requestKind, parametersAsJson); } @@ -3096,3 +3242,428 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreAcquireLicenseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreAppLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreAvailability & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreCollectionData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreConsumableResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreContextStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreImage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePackageLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePackageUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePackageUpdateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePrice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreProduct & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreProductPagedQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreProductQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreProductResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePurchaseProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePurchasePropertiesFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStorePurchaseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreRequestHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreSendRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreSku & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreSubscriptionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::IStoreVideo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreAcquireLicenseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreAppLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreAvailability & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreCollectionData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreConsumableResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreImage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePackageLicense & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePackageUpdate & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePackageUpdateResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePrice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreProduct & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreProductPagedQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreProductQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreProductResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePurchaseProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StorePurchaseResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreSendRequestResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreSku & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreSubscriptionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Services::Store::StoreVideo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.AccessCache.h b/10.0.14393.0/winrt/Windows.Storage.AccessCache.h index 29e0c8276..d7118c14b 100644 --- a/10.0.14393.0/winrt/Windows.Storage.AccessCache.h +++ b/10.0.14393.0/winrt/Windows.Storage.AccessCache.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_RemovedEntry(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemovedEntry(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemovedEntry()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedEntry()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_FutureAccessList(abi_arg_out value) noexcept override + HRESULT __stdcall get_FutureAccessList(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FutureAccessList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FutureAccessList()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MostRecentlyUsedList(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MostRecentlyUsedList()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MostRecentlyUsedList()); return S_OK; } catch (...) @@ -66,11 +72,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddOverloadDefaultMetadata(abi_arg_in file, abi_arg_out token) noexcept override + HRESULT __stdcall abi_AddOverloadDefaultMetadata(impl::abi_arg_in file, impl::abi_arg_out token) noexcept override { try { - *token = detach(this->shim().Add(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Add(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -80,11 +87,12 @@ struct produce : produ } } - HRESULT __stdcall abi_Add(abi_arg_in file, abi_arg_in metadata, abi_arg_out token) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in file, impl::abi_arg_in metadata, impl::abi_arg_out token) noexcept override { try { - *token = detach(this->shim().Add(*reinterpret_cast(&file), *reinterpret_cast(&metadata))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Add(*reinterpret_cast(&file), *reinterpret_cast(&metadata))); return S_OK; } catch (...) @@ -94,10 +102,11 @@ struct produce : produ } } - HRESULT __stdcall abi_AddOrReplaceOverloadDefaultMetadata(abi_arg_in token, abi_arg_in file) noexcept override + HRESULT __stdcall abi_AddOrReplaceOverloadDefaultMetadata(impl::abi_arg_in token, impl::abi_arg_in file) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddOrReplace(*reinterpret_cast(&token), *reinterpret_cast(&file)); return S_OK; } @@ -107,10 +116,11 @@ struct produce : produ } } - HRESULT __stdcall abi_AddOrReplace(abi_arg_in token, abi_arg_in file, abi_arg_in metadata) noexcept override + HRESULT __stdcall abi_AddOrReplace(impl::abi_arg_in token, impl::abi_arg_in file, impl::abi_arg_in metadata) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddOrReplace(*reinterpret_cast(&token), *reinterpret_cast(&file), *reinterpret_cast(&metadata)); return S_OK; } @@ -120,11 +130,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetItemAsync(abi_arg_in token, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetItemAsync(impl::abi_arg_in token, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetItemAsync(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemAsync(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFileAsync(abi_arg_in token, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFileAsync(impl::abi_arg_in token, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFileAsync(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFileAsync(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -148,11 +160,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFolderAsync(abi_arg_in token, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFolderAsync(impl::abi_arg_in token, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFolderAsync(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFolderAsync(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetItemWithOptionsAsync(abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetItemWithOptionsAsync(impl::abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetItemAsync(*reinterpret_cast(&token), options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemAsync(*reinterpret_cast(&token), options)); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFileWithOptionsAsync(abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFileWithOptionsAsync(impl::abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFileAsync(*reinterpret_cast(&token), options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFileAsync(*reinterpret_cast(&token), options)); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFolderWithOptionsAsync(abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFolderWithOptionsAsync(impl::abi_arg_in token, Windows::Storage::AccessCache::AccessCacheOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFolderAsync(*reinterpret_cast(&token), options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFolderAsync(*reinterpret_cast(&token), options)); return S_OK; } catch (...) @@ -204,10 +220,11 @@ struct produce : produ } } - HRESULT __stdcall abi_Remove(abi_arg_in token) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in token) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&token)); return S_OK; } @@ -217,11 +234,12 @@ struct produce : produ } } - HRESULT __stdcall abi_ContainsItem(abi_arg_in token, bool * value) noexcept override + HRESULT __stdcall abi_ContainsItem(impl::abi_arg_in token, bool * value) noexcept override { try { - *value = detach(this->shim().ContainsItem(*reinterpret_cast(&token))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainsItem(*reinterpret_cast(&token))); return S_OK; } catch (...) @@ -234,6 +252,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -243,11 +262,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CheckAccess(abi_arg_in file, bool * value) noexcept override + HRESULT __stdcall abi_CheckAccess(impl::abi_arg_in file, bool * value) noexcept override { try { - *value = detach(this->shim().CheckAccess(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckAccess(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -256,11 +276,12 @@ struct produce : produ } } - HRESULT __stdcall get_Entries(abi_arg_out> entries) noexcept override + HRESULT __stdcall get_Entries(impl::abi_arg_out> entries) noexcept override { try { - *entries = detach(this->shim().Entries()); + typename D::abi_guard guard(this->shim()); + *entries = detach_abi(this->shim().Entries()); return S_OK; } catch (...) @@ -274,7 +295,8 @@ struct produce : produ { try { - *value = detach(this->shim().MaximumItemsAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumItemsAllowed()); return S_OK; } catch (...) @@ -287,11 +309,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall add_ItemRemoved(abi_arg_in> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ItemRemoved(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ItemRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ItemRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -304,6 +327,7 @@ struct produceshim()); this->shim().ItemRemoved(eventCookie); return S_OK; } @@ -317,11 +341,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_AddWithMetadataAndVisibility(abi_arg_in file, abi_arg_in metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility, abi_arg_out token) noexcept override + HRESULT __stdcall abi_AddWithMetadataAndVisibility(impl::abi_arg_in file, impl::abi_arg_in metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility, impl::abi_arg_out token) noexcept override { try { - *token = detach(this->shim().Add(*reinterpret_cast(&file), *reinterpret_cast(&metadata), visibility)); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Add(*reinterpret_cast(&file), *reinterpret_cast(&metadata), visibility)); return S_OK; } catch (...) @@ -331,10 +356,11 @@ struct produce token, abi_arg_in file, abi_arg_in metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) noexcept override + HRESULT __stdcall abi_AddOrReplaceWithMetadataAndVisibility(impl::abi_arg_in token, impl::abi_arg_in file, impl::abi_arg_in metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddOrReplace(*reinterpret_cast(&token), *reinterpret_cast(&file), *reinterpret_cast(&metadata), visibility); return S_OK; } @@ -352,118 +378,118 @@ namespace Windows::Storage::AccessCache { template Windows::Storage::AccessCache::AccessListEntry impl_IItemRemovedEventArgs::RemovedEntry() const { Windows::Storage::AccessCache::AccessListEntry value {}; - check_hresult(static_cast(static_cast(*this))->get_RemovedEntry(put(value))); + check_hresult(WINRT_SHIM(IItemRemovedEventArgs)->get_RemovedEntry(put_abi(value))); return value; } template hstring impl_IStorageItemAccessList::Add(const Windows::Storage::IStorageItem & file) const { hstring token; - check_hresult(static_cast(static_cast(*this))->abi_AddOverloadDefaultMetadata(get(file), put(token))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_AddOverloadDefaultMetadata(get_abi(file), put_abi(token))); return token; } -template hstring impl_IStorageItemAccessList::Add(const Windows::Storage::IStorageItem & file, hstring_ref metadata) const +template hstring impl_IStorageItemAccessList::Add(const Windows::Storage::IStorageItem & file, hstring_view metadata) const { hstring token; - check_hresult(static_cast(static_cast(*this))->abi_Add(get(file), get(metadata), put(token))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_Add(get_abi(file), get_abi(metadata), put_abi(token))); return token; } -template void impl_IStorageItemAccessList::AddOrReplace(hstring_ref token, const Windows::Storage::IStorageItem & file) const +template void impl_IStorageItemAccessList::AddOrReplace(hstring_view token, const Windows::Storage::IStorageItem & file) const { - check_hresult(static_cast(static_cast(*this))->abi_AddOrReplaceOverloadDefaultMetadata(get(token), get(file))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_AddOrReplaceOverloadDefaultMetadata(get_abi(token), get_abi(file))); } -template void impl_IStorageItemAccessList::AddOrReplace(hstring_ref token, const Windows::Storage::IStorageItem & file, hstring_ref metadata) const +template void impl_IStorageItemAccessList::AddOrReplace(hstring_view token, const Windows::Storage::IStorageItem & file, hstring_view metadata) const { - check_hresult(static_cast(static_cast(*this))->abi_AddOrReplace(get(token), get(file), get(metadata))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_AddOrReplace(get_abi(token), get_abi(file), get_abi(metadata))); } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetItemAsync(hstring_ref token) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetItemAsync(hstring_view token) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemAsync(get(token), put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetItemAsync(get_abi(token), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFileAsync(hstring_ref token) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFileAsync(hstring_view token) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFileAsync(get(token), put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetFileAsync(get_abi(token), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFolderAsync(hstring_ref token) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFolderAsync(hstring_view token) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderAsync(get(token), put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetFolderAsync(get_abi(token), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetItemAsync(hstring_ref token, Windows::Storage::AccessCache::AccessCacheOptions options) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetItemAsync(hstring_view token, Windows::Storage::AccessCache::AccessCacheOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemWithOptionsAsync(get(token), options, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetItemWithOptionsAsync(get_abi(token), options, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFileAsync(hstring_ref token, Windows::Storage::AccessCache::AccessCacheOptions options) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFileAsync(hstring_view token, Windows::Storage::AccessCache::AccessCacheOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFileWithOptionsAsync(get(token), options, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetFileWithOptionsAsync(get_abi(token), options, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFolderAsync(hstring_ref token, Windows::Storage::AccessCache::AccessCacheOptions options) const +template Windows::Foundation::IAsyncOperation impl_IStorageItemAccessList::GetFolderAsync(hstring_view token, Windows::Storage::AccessCache::AccessCacheOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderWithOptionsAsync(get(token), options, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_GetFolderWithOptionsAsync(get_abi(token), options, put_abi(operation))); return operation; } -template void impl_IStorageItemAccessList::Remove(hstring_ref token) const +template void impl_IStorageItemAccessList::Remove(hstring_view token) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(token))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_Remove(get_abi(token))); } -template bool impl_IStorageItemAccessList::ContainsItem(hstring_ref token) const +template bool impl_IStorageItemAccessList::ContainsItem(hstring_view token) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ContainsItem(get(token), &value)); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_ContainsItem(get_abi(token), &value)); return value; } template void impl_IStorageItemAccessList::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_Clear()); } template bool impl_IStorageItemAccessList::CheckAccess(const Windows::Storage::IStorageItem & file) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckAccess(get(file), &value)); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->abi_CheckAccess(get_abi(file), &value)); return value; } template Windows::Storage::AccessCache::AccessListEntryView impl_IStorageItemAccessList::Entries() const { Windows::Storage::AccessCache::AccessListEntryView entries { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Entries(put(entries))); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->get_Entries(put_abi(entries))); return entries; } template uint32_t impl_IStorageItemAccessList::MaximumItemsAllowed() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaximumItemsAllowed(&value)); + check_hresult(WINRT_SHIM(IStorageItemAccessList)->get_MaximumItemsAllowed(&value)); return value; } template event_token impl_IStorageItemMostRecentlyUsedList::ItemRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ItemRemoved(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemMostRecentlyUsedList)->add_ItemRemoved(get_abi(handler), &eventCookie)); return eventCookie; } @@ -474,32 +500,32 @@ template event_revoker impl_IStor template void impl_IStorageItemMostRecentlyUsedList::ItemRemoved(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemRemoved(eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemMostRecentlyUsedList)->remove_ItemRemoved(eventCookie)); } -template hstring impl_IStorageItemMostRecentlyUsedList2::Add(const Windows::Storage::IStorageItem & file, hstring_ref metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) const +template hstring impl_IStorageItemMostRecentlyUsedList2::Add(const Windows::Storage::IStorageItem & file, hstring_view metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) const { hstring token; - check_hresult(static_cast(static_cast(*this))->abi_AddWithMetadataAndVisibility(get(file), get(metadata), visibility, put(token))); + check_hresult(WINRT_SHIM(IStorageItemMostRecentlyUsedList2)->abi_AddWithMetadataAndVisibility(get_abi(file), get_abi(metadata), visibility, put_abi(token))); return token; } -template void impl_IStorageItemMostRecentlyUsedList2::AddOrReplace(hstring_ref token, const Windows::Storage::IStorageItem & file, hstring_ref metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) const +template void impl_IStorageItemMostRecentlyUsedList2::AddOrReplace(hstring_view token, const Windows::Storage::IStorageItem & file, hstring_view metadata, Windows::Storage::AccessCache::RecentStorageItemVisibility visibility) const { - check_hresult(static_cast(static_cast(*this))->abi_AddOrReplaceWithMetadataAndVisibility(get(token), get(file), get(metadata), visibility)); + check_hresult(WINRT_SHIM(IStorageItemMostRecentlyUsedList2)->abi_AddOrReplaceWithMetadataAndVisibility(get_abi(token), get_abi(file), get_abi(metadata), visibility)); } template Windows::Storage::AccessCache::StorageItemAccessList impl_IStorageApplicationPermissionsStatics::FutureAccessList() const { Windows::Storage::AccessCache::StorageItemAccessList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FutureAccessList(put(value))); + check_hresult(WINRT_SHIM(IStorageApplicationPermissionsStatics)->get_FutureAccessList(put_abi(value))); return value; } template Windows::Storage::AccessCache::StorageItemMostRecentlyUsedList impl_IStorageApplicationPermissionsStatics::MostRecentlyUsedList() const { Windows::Storage::AccessCache::StorageItemMostRecentlyUsedList value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MostRecentlyUsedList(put(value))); + check_hresult(WINRT_SHIM(IStorageApplicationPermissionsStatics)->get_MostRecentlyUsedList(put_abi(value))); return value; } @@ -516,3 +542,86 @@ inline Windows::Storage::AccessCache::StorageItemMostRecentlyUsedList StorageApp } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::IItemRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::IStorageApplicationPermissionsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::IStorageItemAccessList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::IStorageItemMostRecentlyUsedList2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::AccessListEntryView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::ItemRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::StorageItemAccessList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::AccessCache::StorageItemMostRecentlyUsedList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.BulkAccess.h b/10.0.14393.0/winrt/Windows.Storage.BulkAccess.h index 617da64ac..f0ce15d7d 100644 --- a/10.0.14393.0/winrt/Windows.Storage.BulkAccess.h +++ b/10.0.14393.0/winrt/Windows.Storage.BulkAccess.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.FileProperties.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync(startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync(startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetItemsAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync()); return S_OK; } catch (...) @@ -47,11 +52,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFilesAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync(startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync(startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -61,11 +67,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFilesAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync()); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFoldersAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync(startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync(startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFoldersAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync()); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetVirtualizedItemsVector(abi_arg_out vector) noexcept override + HRESULT __stdcall abi_GetVirtualizedItemsVector(impl::abi_arg_out vector) noexcept override { try { - *vector = detach(this->shim().GetVirtualizedItemsVector()); + typename D::abi_guard guard(this->shim()); + *vector = detach_abi(this->shim().GetVirtualizedItemsVector()); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetVirtualizedFilesVector(abi_arg_out vector) noexcept override + HRESULT __stdcall abi_GetVirtualizedFilesVector(impl::abi_arg_out vector) noexcept override { try { - *vector = detach(this->shim().GetVirtualizedFilesVector()); + typename D::abi_guard guard(this->shim()); + *vector = detach_abi(this->shim().GetVirtualizedFilesVector()); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetVirtualizedFoldersVector(abi_arg_out vector) noexcept override + HRESULT __stdcall abi_GetVirtualizedFoldersVector(impl::abi_arg_out vector) noexcept override { try { - *vector = detach(this->shim().GetVirtualizedFoldersVector()); + typename D::abi_guard guard(this->shim()); + *vector = detach_abi(this->shim().GetVirtualizedFoldersVector()); return S_OK; } catch (...) @@ -149,11 +161,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateWithMode(abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithMode(impl::abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithMode(*reinterpret_cast(&queryResult), mode)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithMode(*reinterpret_cast(&queryResult), mode)); return S_OK; } catch (...) @@ -163,11 +176,12 @@ struct produce } } - HRESULT __stdcall abi_CreateWithModeAndSize(abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithModeAndSize(impl::abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithModeAndSize(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithModeAndSize(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize)); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce } } - HRESULT __stdcall abi_CreateWithModeAndSizeAndOptions(abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithModeAndSizeAndOptions(impl::abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithModeAndSizeAndOptions(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize, thumbnailOptions)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithModeAndSizeAndOptions(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize, thumbnailOptions)); return S_OK; } catch (...) @@ -191,11 +206,12 @@ struct produce } } - HRESULT __stdcall abi_CreateWithModeAndSizeAndOptionsAndFlags(abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions, bool delayLoad, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithModeAndSizeAndOptionsAndFlags(impl::abi_arg_in queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions, bool delayLoad, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithModeAndSizeAndOptionsAndFlags(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize, thumbnailOptions, delayLoad)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithModeAndSizeAndOptionsAndFlags(*reinterpret_cast(&queryResult), mode, requestedThumbnailSize, thumbnailOptions, delayLoad)); return S_OK; } catch (...) @@ -209,11 +225,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_MusicProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_MusicProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MusicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MusicProperties()); return S_OK; } catch (...) @@ -223,11 +240,12 @@ struct produce : produ } } - HRESULT __stdcall get_VideoProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_VideoProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideoProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideoProperties()); return S_OK; } catch (...) @@ -237,11 +255,12 @@ struct produce : produ } } - HRESULT __stdcall get_ImageProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImageProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImageProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImageProperties()); return S_OK; } catch (...) @@ -251,11 +270,12 @@ struct produce : produ } } - HRESULT __stdcall get_DocumentProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentProperties()); return S_OK; } catch (...) @@ -265,11 +285,12 @@ struct produce : produ } } - HRESULT __stdcall get_BasicProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_BasicProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BasicProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BasicProperties()); return S_OK; } catch (...) @@ -279,11 +300,12 @@ struct produce : produ } } - HRESULT __stdcall get_Thumbnail(abi_arg_out value) noexcept override + HRESULT __stdcall get_Thumbnail(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thumbnail()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thumbnail()); return S_OK; } catch (...) @@ -293,11 +315,12 @@ struct produce : produ } } - HRESULT __stdcall add_ThumbnailUpdated(abi_arg_in> changedHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ThumbnailUpdated(impl::abi_arg_in> changedHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ThumbnailUpdated(*reinterpret_cast *>(&changedHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ThumbnailUpdated(*reinterpret_cast *>(&changedHandler))); return S_OK; } catch (...) @@ -310,6 +333,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ThumbnailUpdated(eventCookie); return S_OK; } @@ -319,11 +343,12 @@ struct produce : produ } } - HRESULT __stdcall add_PropertiesUpdated(abi_arg_in> changedHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_PropertiesUpdated(impl::abi_arg_in> changedHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().PropertiesUpdated(*reinterpret_cast *>(&changedHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().PropertiesUpdated(*reinterpret_cast *>(&changedHandler))); return S_OK; } catch (...) @@ -336,6 +361,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().PropertiesUpdated(eventCookie); return S_OK; } @@ -353,167 +379,167 @@ namespace Windows::Storage::BulkAccess { template Windows::Storage::FileProperties::MusicProperties impl_IStorageItemInformation::MusicProperties() const { Windows::Storage::FileProperties::MusicProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MusicProperties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_MusicProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::VideoProperties impl_IStorageItemInformation::VideoProperties() const { Windows::Storage::FileProperties::VideoProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideoProperties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_VideoProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::ImageProperties impl_IStorageItemInformation::ImageProperties() const { Windows::Storage::FileProperties::ImageProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImageProperties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_ImageProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::DocumentProperties impl_IStorageItemInformation::DocumentProperties() const { Windows::Storage::FileProperties::DocumentProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentProperties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_DocumentProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::BasicProperties impl_IStorageItemInformation::BasicProperties() const { Windows::Storage::FileProperties::BasicProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BasicProperties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_BasicProperties(put_abi(value))); return value; } template Windows::Storage::FileProperties::StorageItemThumbnail impl_IStorageItemInformation::Thumbnail() const { Windows::Storage::FileProperties::StorageItemThumbnail value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Thumbnail(put(value))); + check_hresult(WINRT_SHIM(IStorageItemInformation)->get_Thumbnail(put_abi(value))); return value; } -template event_token impl_IStorageItemInformation::ThumbnailUpdated(const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_token impl_IStorageItemInformation::ThumbnailUpdated(const Windows::Foundation::TypedEventHandler & changedHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ThumbnailUpdated(get(changedHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemInformation)->add_ThumbnailUpdated(get_abi(changedHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IStorageItemInformation::ThumbnailUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_revoker impl_IStorageItemInformation::ThumbnailUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::BulkAccess::IStorageItemInformation::remove_ThumbnailUpdated, ThumbnailUpdated(changedHandler)); } template void impl_IStorageItemInformation::ThumbnailUpdated(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ThumbnailUpdated(eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemInformation)->remove_ThumbnailUpdated(eventCookie)); } -template event_token impl_IStorageItemInformation::PropertiesUpdated(const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_token impl_IStorageItemInformation::PropertiesUpdated(const Windows::Foundation::TypedEventHandler & changedHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_PropertiesUpdated(get(changedHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemInformation)->add_PropertiesUpdated(get_abi(changedHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IStorageItemInformation::PropertiesUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_revoker impl_IStorageItemInformation::PropertiesUpdated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::BulkAccess::IStorageItemInformation::remove_PropertiesUpdated, PropertiesUpdated(changedHandler)); } template void impl_IStorageItemInformation::PropertiesUpdated(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PropertiesUpdated(eventCookie)); + check_hresult(WINRT_SHIM(IStorageItemInformation)->remove_PropertiesUpdated(eventCookie)); } template Windows::Storage::BulkAccess::FileInformationFactory impl_IFileInformationFactoryFactory::CreateWithMode(const Windows::Storage::Search::IStorageQueryResultBase & queryResult, Windows::Storage::FileProperties::ThumbnailMode mode) const { Windows::Storage::BulkAccess::FileInformationFactory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithMode(get(queryResult), mode, put(value))); + check_hresult(WINRT_SHIM(IFileInformationFactoryFactory)->abi_CreateWithMode(get_abi(queryResult), mode, put_abi(value))); return value; } template Windows::Storage::BulkAccess::FileInformationFactory impl_IFileInformationFactoryFactory::CreateWithModeAndSize(const Windows::Storage::Search::IStorageQueryResultBase & queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize) const { Windows::Storage::BulkAccess::FileInformationFactory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithModeAndSize(get(queryResult), mode, requestedThumbnailSize, put(value))); + check_hresult(WINRT_SHIM(IFileInformationFactoryFactory)->abi_CreateWithModeAndSize(get_abi(queryResult), mode, requestedThumbnailSize, put_abi(value))); return value; } template Windows::Storage::BulkAccess::FileInformationFactory impl_IFileInformationFactoryFactory::CreateWithModeAndSizeAndOptions(const Windows::Storage::Search::IStorageQueryResultBase & queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions) const { Windows::Storage::BulkAccess::FileInformationFactory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithModeAndSizeAndOptions(get(queryResult), mode, requestedThumbnailSize, thumbnailOptions, put(value))); + check_hresult(WINRT_SHIM(IFileInformationFactoryFactory)->abi_CreateWithModeAndSizeAndOptions(get_abi(queryResult), mode, requestedThumbnailSize, thumbnailOptions, put_abi(value))); return value; } template Windows::Storage::BulkAccess::FileInformationFactory impl_IFileInformationFactoryFactory::CreateWithModeAndSizeAndOptionsAndFlags(const Windows::Storage::Search::IStorageQueryResultBase & queryResult, Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedThumbnailSize, Windows::Storage::FileProperties::ThumbnailOptions thumbnailOptions, bool delayLoad) const { Windows::Storage::BulkAccess::FileInformationFactory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithModeAndSizeAndOptionsAndFlags(get(queryResult), mode, requestedThumbnailSize, thumbnailOptions, delayLoad, put(value))); + check_hresult(WINRT_SHIM(IFileInformationFactoryFactory)->abi_CreateWithModeAndSizeAndOptionsAndFlags(get_abi(queryResult), mode, requestedThumbnailSize, thumbnailOptions, delayLoad, put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsync(startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetItemsAsync(startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetItemsAsyncDefaultStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetFilesAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsync(startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetFilesAsync(startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetFilesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetFilesAsyncDefaultStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetFoldersAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsync(startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetFoldersAsync(startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IFileInformationFactory::GetFoldersAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetFoldersAsyncDefaultStartAndCount(put_abi(operation))); return operation; } -template Windows::IInspectable impl_IFileInformationFactory::GetVirtualizedItemsVector() const +template Windows::Foundation::IInspectable impl_IFileInformationFactory::GetVirtualizedItemsVector() const { - Windows::IInspectable vector; - check_hresult(static_cast(static_cast(*this))->abi_GetVirtualizedItemsVector(put(vector))); + Windows::Foundation::IInspectable vector; + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetVirtualizedItemsVector(put_abi(vector))); return vector; } -template Windows::IInspectable impl_IFileInformationFactory::GetVirtualizedFilesVector() const +template Windows::Foundation::IInspectable impl_IFileInformationFactory::GetVirtualizedFilesVector() const { - Windows::IInspectable vector; - check_hresult(static_cast(static_cast(*this))->abi_GetVirtualizedFilesVector(put(vector))); + Windows::Foundation::IInspectable vector; + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetVirtualizedFilesVector(put_abi(vector))); return vector; } -template Windows::IInspectable impl_IFileInformationFactory::GetVirtualizedFoldersVector() const +template Windows::Foundation::IInspectable impl_IFileInformationFactory::GetVirtualizedFoldersVector() const { - Windows::IInspectable vector; - check_hresult(static_cast(static_cast(*this))->abi_GetVirtualizedFoldersVector(put(vector))); + Windows::Foundation::IInspectable vector; + check_hresult(WINRT_SHIM(IFileInformationFactory)->abi_GetVirtualizedFoldersVector(put_abi(vector))); return vector; } @@ -536,3 +562,59 @@ inline FileInformationFactory::FileInformationFactory(const Windows::Storage::Se } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::IFileInformationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::IFileInformationFactoryFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::IStorageItemInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::FileInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::FileInformationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::BulkAccess::FolderInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Compression.h b/10.0.14393.0/winrt/Windows.Storage.Compression.h index cdc93bd6b..363a9ee0c 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Compression.h +++ b/10.0.14393.0/winrt/Windows.Storage.Compression.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Storage.Compression.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_FinishAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FinishAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FinishAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FinishAsync()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_base stream) noexcept override + HRESULT __stdcall abi_DetachStream(impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().DetachStream()); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().DetachStream()); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCompressor(abi_arg_in underlyingStream, abi_arg_out createdCompressor) noexcept override + HRESULT __stdcall abi_CreateCompressor(impl::abi_arg_in underlyingStream, impl::abi_arg_out createdCompressor) noexcept override { try { - *createdCompressor = detach(this->shim().CreateCompressor(*reinterpret_cast(&underlyingStream))); + typename D::abi_guard guard(this->shim()); + *createdCompressor = detach_abi(this->shim().CreateCompressor(*reinterpret_cast(&underlyingStream))); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateCompressorEx(abi_arg_in underlyingStream, Windows::Storage::Compression::CompressAlgorithm algorithm, uint32_t blockSize, abi_arg_out createdCompressor) noexcept override + HRESULT __stdcall abi_CreateCompressorEx(impl::abi_arg_in underlyingStream, Windows::Storage::Compression::CompressAlgorithm algorithm, uint32_t blockSize, impl::abi_arg_out createdCompressor) noexcept override { try { - *createdCompressor = detach(this->shim().CreateCompressorEx(*reinterpret_cast(&underlyingStream), algorithm, blockSize)); + typename D::abi_guard guard(this->shim()); + *createdCompressor = detach_abi(this->shim().CreateCompressorEx(*reinterpret_cast(&underlyingStream), algorithm, blockSize)); return S_OK; } catch (...) @@ -81,11 +88,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_DetachStream(abi_arg_out stream) noexcept override + HRESULT __stdcall abi_DetachStream(impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().DetachStream()); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().DetachStream()); return S_OK; } catch (...) @@ -99,11 +107,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateDecompressor(abi_arg_in underlyingStream, abi_arg_out createdDecompressor) noexcept override + HRESULT __stdcall abi_CreateDecompressor(impl::abi_arg_in underlyingStream, impl::abi_arg_out createdDecompressor) noexcept override { try { - *createdDecompressor = detach(this->shim().CreateDecompressor(*reinterpret_cast(&underlyingStream))); + typename D::abi_guard guard(this->shim()); + *createdDecompressor = detach_abi(this->shim().CreateDecompressor(*reinterpret_cast(&underlyingStream))); return S_OK; } catch (...) @@ -121,42 +130,42 @@ namespace Windows::Storage::Compression { template Windows::Foundation::IAsyncOperation impl_ICompressor::FinishAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FinishAsync(put(operation))); + check_hresult(WINRT_SHIM(ICompressor)->abi_FinishAsync(put_abi(operation))); return operation; } template Windows::Storage::Streams::IOutputStream impl_ICompressor::DetachStream() const { Windows::Storage::Streams::IOutputStream stream; - check_hresult(static_cast(static_cast(*this))->abi_DetachStream(put(stream))); + check_hresult(WINRT_SHIM(ICompressor)->abi_DetachStream(put_abi(stream))); return stream; } template Windows::Storage::Streams::IInputStream impl_IDecompressor::DetachStream() const { Windows::Storage::Streams::IInputStream stream; - check_hresult(static_cast(static_cast(*this))->abi_DetachStream(put(stream))); + check_hresult(WINRT_SHIM(IDecompressor)->abi_DetachStream(put_abi(stream))); return stream; } template Windows::Storage::Compression::Compressor impl_ICompressorFactory::CreateCompressor(const Windows::Storage::Streams::IOutputStream & underlyingStream) const { Windows::Storage::Compression::Compressor createdCompressor { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCompressor(get(underlyingStream), put(createdCompressor))); + check_hresult(WINRT_SHIM(ICompressorFactory)->abi_CreateCompressor(get_abi(underlyingStream), put_abi(createdCompressor))); return createdCompressor; } template Windows::Storage::Compression::Compressor impl_ICompressorFactory::CreateCompressorEx(const Windows::Storage::Streams::IOutputStream & underlyingStream, Windows::Storage::Compression::CompressAlgorithm algorithm, uint32_t blockSize) const { Windows::Storage::Compression::Compressor createdCompressor { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCompressorEx(get(underlyingStream), algorithm, blockSize, put(createdCompressor))); + check_hresult(WINRT_SHIM(ICompressorFactory)->abi_CreateCompressorEx(get_abi(underlyingStream), algorithm, blockSize, put_abi(createdCompressor))); return createdCompressor; } template Windows::Storage::Compression::Decompressor impl_IDecompressorFactory::CreateDecompressor(const Windows::Storage::Streams::IInputStream & underlyingStream) const { Windows::Storage::Compression::Decompressor createdDecompressor { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDecompressor(get(underlyingStream), put(createdDecompressor))); + check_hresult(WINRT_SHIM(IDecompressorFactory)->abi_CreateDecompressor(get_abi(underlyingStream), put_abi(createdDecompressor))); return createdDecompressor; } @@ -175,3 +184,59 @@ inline Decompressor::Decompressor(const Windows::Storage::Streams::IInputStream } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::ICompressor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::ICompressorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::IDecompressor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::IDecompressorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::Compressor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Compression::Decompressor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.FileProperties.h b/10.0.14393.0/winrt/Windows.Storage.FileProperties.h index cf7147f72..e55481950 100644 --- a/10.0.14393.0/winrt/Windows.Storage.FileProperties.h +++ b/10.0.14393.0/winrt/Windows.Storage.FileProperties.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Geolocation.3.h" @@ -23,7 +26,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -32,11 +36,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DateModified(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateModified(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateModified()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateModified()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ItemDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemDate()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Author(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produ } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -90,10 +98,11 @@ struct produce : produ } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -103,11 +112,12 @@ struct produce : produ } } - HRESULT __stdcall get_Keywords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : produ } } - HRESULT __stdcall get_Comment(abi_arg_out value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -131,10 +142,11 @@ struct produce : produ } } - HRESULT __stdcall put_Comment(abi_arg_in value) noexcept override + HRESULT __stdcall put_Comment(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Comment(*reinterpret_cast(&value)); return S_OK; } @@ -148,11 +160,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetGeotagAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetGeotagAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetGeotagAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetGeotagAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce : prod } } - HRESULT __stdcall abi_SetGeotagFromGeolocatorAsync(abi_arg_in file, abi_arg_in geolocator, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SetGeotagFromGeolocatorAsync(impl::abi_arg_in file, impl::abi_arg_in geolocator, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SetGeotagFromGeolocatorAsync(*reinterpret_cast(&file), *reinterpret_cast(&geolocator))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetGeotagFromGeolocatorAsync(*reinterpret_cast(&file), *reinterpret_cast(&geolocator))); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : prod } } - HRESULT __stdcall abi_SetGeotagAsync(abi_arg_in file, abi_arg_in geopoint, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SetGeotagAsync(impl::abi_arg_in file, impl::abi_arg_in geopoint, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SetGeotagAsync(*reinterpret_cast(&file), *reinterpret_cast(&geopoint))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetGeotagAsync(*reinterpret_cast(&file), *reinterpret_cast(&geopoint))); return S_OK; } catch (...) @@ -198,7 +213,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Rating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rating()); return S_OK; } catch (...) @@ -211,6 +227,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Rating(value); return S_OK; } @@ -220,11 +237,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Keywords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -234,11 +252,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DateTaken(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateTaken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateTaken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTaken()); return S_OK; } catch (...) @@ -247,10 +266,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_DateTaken(abi_arg_in value) noexcept override + HRESULT __stdcall put_DateTaken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DateTaken(*reinterpret_cast(&value)); return S_OK; } @@ -264,7 +284,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -277,7 +298,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -286,11 +308,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -300,10 +323,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -313,11 +337,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Latitude(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Latitude(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Latitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Latitude()); return S_OK; } catch (...) @@ -327,11 +352,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Longitude(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Longitude(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Longitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Longitude()); return S_OK; } catch (...) @@ -341,11 +367,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CameraManufacturer(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraManufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraManufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraManufacturer()); return S_OK; } catch (...) @@ -355,10 +382,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_CameraManufacturer(abi_arg_in value) noexcept override + HRESULT __stdcall put_CameraManufacturer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraManufacturer(*reinterpret_cast(&value)); return S_OK; } @@ -368,11 +396,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CameraModel(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraModel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraModel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraModel()); return S_OK; } catch (...) @@ -382,10 +411,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_CameraModel(abi_arg_in value) noexcept override + HRESULT __stdcall put_CameraModel(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CameraModel(*reinterpret_cast(&value)); return S_OK; } @@ -399,7 +429,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -408,11 +439,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PeopleNames(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PeopleNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PeopleNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeopleNames()); return S_OK; } catch (...) @@ -426,11 +458,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Album(abi_arg_out value) noexcept override + HRESULT __stdcall get_Album(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Album()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Album()); return S_OK; } catch (...) @@ -440,10 +473,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Album(abi_arg_in value) noexcept override + HRESULT __stdcall put_Album(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Album(*reinterpret_cast(&value)); return S_OK; } @@ -453,11 +487,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Artist(abi_arg_out value) noexcept override + HRESULT __stdcall get_Artist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Artist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Artist()); return S_OK; } catch (...) @@ -467,10 +502,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Artist(abi_arg_in value) noexcept override + HRESULT __stdcall put_Artist(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Artist(*reinterpret_cast(&value)); return S_OK; } @@ -480,11 +516,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Genre(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Genre(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Genre()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Genre()); return S_OK; } catch (...) @@ -498,7 +535,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().TrackNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackNumber()); return S_OK; } catch (...) @@ -511,6 +549,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().TrackNumber(value); return S_OK; } @@ -520,11 +559,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -534,10 +574,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -551,7 +592,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Rating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rating()); return S_OK; } catch (...) @@ -564,6 +606,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Rating(value); return S_OK; } @@ -573,11 +616,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -590,7 +634,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Bitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bitrate()); return S_OK; } catch (...) @@ -599,11 +644,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlbumArtist(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlbumArtist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumArtist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumArtist()); return S_OK; } catch (...) @@ -613,10 +659,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_AlbumArtist(abi_arg_in value) noexcept override + HRESULT __stdcall put_AlbumArtist(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AlbumArtist(*reinterpret_cast(&value)); return S_OK; } @@ -626,11 +673,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Composers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Composers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Composers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Composers()); return S_OK; } catch (...) @@ -640,11 +688,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Conductors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Conductors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Conductors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Conductors()); return S_OK; } catch (...) @@ -654,11 +703,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Subtitle(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -668,10 +718,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Subtitle(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subtitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return S_OK; } @@ -681,11 +732,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Producers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Producers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Producers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Producers()); return S_OK; } catch (...) @@ -695,11 +747,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Publisher(abi_arg_out value) noexcept override + HRESULT __stdcall get_Publisher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Publisher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Publisher()); return S_OK; } catch (...) @@ -709,10 +762,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Publisher(abi_arg_in value) noexcept override + HRESULT __stdcall put_Publisher(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Publisher(*reinterpret_cast(&value)); return S_OK; } @@ -722,11 +776,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Writers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Writers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Writers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Writers()); return S_OK; } catch (...) @@ -740,7 +795,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Year()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Year()); return S_OK; } catch (...) @@ -753,6 +809,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Year(value); return S_OK; } @@ -766,11 +823,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetMusicPropertiesAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetMusicPropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetMusicPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetMusicPropertiesAsync()); return S_OK; } catch (...) @@ -780,11 +838,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetVideoPropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetVideoPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetVideoPropertiesAsync()); return S_OK; } catch (...) @@ -794,11 +853,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetImagePropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetImagePropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetImagePropertiesAsync()); return S_OK; } catch (...) @@ -808,11 +868,12 @@ struct produce> operation) noexcept override + HRESULT __stdcall abi_GetDocumentPropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDocumentPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDocumentPropertiesAsync()); return S_OK; } catch (...) @@ -826,11 +887,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RetrievePropertiesAsync(abi_arg_in> propertiesToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_RetrievePropertiesAsync(impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().RetrievePropertiesAsync(*reinterpret_cast *>(&propertiesToRetrieve))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RetrievePropertiesAsync(*reinterpret_cast *>(&propertiesToRetrieve))); return S_OK; } catch (...) @@ -840,11 +902,12 @@ struct produce } } - HRESULT __stdcall abi_SavePropertiesAsync(abi_arg_in>> propertiesToSave, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SavePropertiesAsync(impl::abi_arg_in>> propertiesToSave, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SavePropertiesAsync(*reinterpret_cast> *>(&propertiesToSave))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SavePropertiesAsync(*reinterpret_cast> *>(&propertiesToSave))); return S_OK; } catch (...) @@ -854,11 +917,12 @@ struct produce } } - HRESULT __stdcall abi_SavePropertiesAsyncOverloadDefault(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SavePropertiesAsyncOverloadDefault(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SavePropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SavePropertiesAsync()); return S_OK; } catch (...) @@ -876,7 +940,8 @@ struct produce : prod { try { - *value = detach(this->shim().OriginalWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalWidth()); return S_OK; } catch (...) @@ -889,7 +954,8 @@ struct produce : prod { try { - *value = detach(this->shim().OriginalHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalHeight()); return S_OK; } catch (...) @@ -902,7 +968,8 @@ struct produce : prod { try { - *value = detach(this->shim().ReturnedSmallerCachedSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReturnedSmallerCachedSize()); return S_OK; } catch (...) @@ -915,7 +982,8 @@ struct produce : prod { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -932,7 +1000,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Rating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rating()); return S_OK; } catch (...) @@ -945,6 +1014,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Rating(value); return S_OK; } @@ -954,11 +1024,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Keywords(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -972,7 +1043,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -985,7 +1057,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -994,11 +1067,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -1007,11 +1081,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Latitude(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Latitude(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Latitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Latitude()); return S_OK; } catch (...) @@ -1021,11 +1096,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Longitude(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Longitude(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Longitude()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Longitude()); return S_OK; } catch (...) @@ -1035,11 +1111,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1049,10 +1126,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -1062,11 +1140,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Subtitle(abi_arg_out value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -1076,10 +1155,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Subtitle(abi_arg_in value) noexcept override + HRESULT __stdcall put_Subtitle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return S_OK; } @@ -1089,11 +1169,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Producers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Producers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Producers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Producers()); return S_OK; } catch (...) @@ -1103,11 +1184,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Publisher(abi_arg_out value) noexcept override + HRESULT __stdcall get_Publisher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Publisher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Publisher()); return S_OK; } catch (...) @@ -1117,10 +1199,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Publisher(abi_arg_in value) noexcept override + HRESULT __stdcall put_Publisher(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Publisher(*reinterpret_cast(&value)); return S_OK; } @@ -1130,11 +1213,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Writers(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Writers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Writers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Writers()); return S_OK; } catch (...) @@ -1148,7 +1232,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Year()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Year()); return S_OK; } catch (...) @@ -1161,6 +1246,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Year(value); return S_OK; } @@ -1174,7 +1260,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Bitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bitrate()); return S_OK; } catch (...) @@ -1183,11 +1270,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Directors(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Directors(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Directors()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Directors()); return S_OK; } catch (...) @@ -1201,7 +1289,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -1218,560 +1307,560 @@ namespace Windows::Storage::FileProperties { template Windows::Foundation::IAsyncOperation impl_IGeotagHelperStatics::GetGeotagAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetGeotagAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IGeotagHelperStatics)->abi_GetGeotagAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IGeotagHelperStatics::SetGeotagFromGeolocatorAsync(const Windows::Storage::IStorageFile & file, const Windows::Devices::Geolocation::Geolocator & geolocator) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SetGeotagFromGeolocatorAsync(get(file), get(geolocator), put(operation))); + check_hresult(WINRT_SHIM(IGeotagHelperStatics)->abi_SetGeotagFromGeolocatorAsync(get_abi(file), get_abi(geolocator), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IGeotagHelperStatics::SetGeotagAsync(const Windows::Storage::IStorageFile & file, const Windows::Devices::Geolocation::Geopoint & geopoint) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SetGeotagAsync(get(file), get(geopoint), put(operation))); + check_hresult(WINRT_SHIM(IGeotagHelperStatics)->abi_SetGeotagAsync(get_abi(file), get_abi(geopoint), put_abi(operation))); return operation; } template uint32_t impl_IThumbnailProperties::OriginalWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OriginalWidth(&value)); + check_hresult(WINRT_SHIM(IThumbnailProperties)->get_OriginalWidth(&value)); return value; } template uint32_t impl_IThumbnailProperties::OriginalHeight() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OriginalHeight(&value)); + check_hresult(WINRT_SHIM(IThumbnailProperties)->get_OriginalHeight(&value)); return value; } template bool impl_IThumbnailProperties::ReturnedSmallerCachedSize() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ReturnedSmallerCachedSize(&value)); + check_hresult(WINRT_SHIM(IThumbnailProperties)->get_ReturnedSmallerCachedSize(&value)); return value; } template Windows::Storage::FileProperties::ThumbnailType impl_IThumbnailProperties::Type() const { Windows::Storage::FileProperties::ThumbnailType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IThumbnailProperties)->get_Type(&value)); return value; } -template Windows::Foundation::IAsyncOperation> impl_IStorageItemExtraProperties::RetrievePropertiesAsync(const Windows::Foundation::Collections::IIterable & propertiesToRetrieve) const +template Windows::Foundation::IAsyncOperation> impl_IStorageItemExtraProperties::RetrievePropertiesAsync(iterable propertiesToRetrieve) const { - Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_RetrievePropertiesAsync(get(propertiesToRetrieve), put(operation))); + Windows::Foundation::IAsyncOperation> operation; + check_hresult(WINRT_SHIM(IStorageItemExtraProperties)->abi_RetrievePropertiesAsync(get_abi(propertiesToRetrieve), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStorageItemExtraProperties::SavePropertiesAsync(const Windows::Foundation::Collections::IIterable> & propertiesToSave) const +template Windows::Foundation::IAsyncAction impl_IStorageItemExtraProperties::SavePropertiesAsync(iterable> propertiesToSave) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SavePropertiesAsync(get(propertiesToSave), put(operation))); + check_hresult(WINRT_SHIM(IStorageItemExtraProperties)->abi_SavePropertiesAsync(get_abi(propertiesToSave), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageItemExtraProperties::SavePropertiesAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SavePropertiesAsyncOverloadDefault(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemExtraProperties)->abi_SavePropertiesAsyncOverloadDefault(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemContentProperties::GetMusicPropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetMusicPropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemContentProperties)->abi_GetMusicPropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemContentProperties::GetVideoPropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetVideoPropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemContentProperties)->abi_GetVideoPropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemContentProperties::GetImagePropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetImagePropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemContentProperties)->abi_GetImagePropertiesAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemContentProperties::GetDocumentPropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDocumentPropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemContentProperties)->abi_GetDocumentPropertiesAsync(put_abi(operation))); return operation; } template hstring impl_IMusicProperties::Album() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Album(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Album(put_abi(value))); return value; } -template void impl_IMusicProperties::Album(hstring_ref value) const +template void impl_IMusicProperties::Album(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Album(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Album(get_abi(value))); } template hstring impl_IMusicProperties::Artist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Artist(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Artist(put_abi(value))); return value; } -template void impl_IMusicProperties::Artist(hstring_ref value) const +template void impl_IMusicProperties::Artist(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Artist(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Artist(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMusicProperties::Genre() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Genre(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Genre(put_abi(value))); return value; } template uint32_t impl_IMusicProperties::TrackNumber() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TrackNumber(&value)); + check_hresult(WINRT_SHIM(IMusicProperties)->get_TrackNumber(&value)); return value; } template void impl_IMusicProperties::TrackNumber(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TrackNumber(value)); + check_hresult(WINRT_SHIM(IMusicProperties)->put_TrackNumber(value)); } template hstring impl_IMusicProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Title(put_abi(value))); return value; } -template void impl_IMusicProperties::Title(hstring_ref value) const +template void impl_IMusicProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Title(get_abi(value))); } template uint32_t impl_IMusicProperties::Rating() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Rating(&value)); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Rating(&value)); return value; } template void impl_IMusicProperties::Rating(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Rating(value)); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Rating(value)); } template Windows::Foundation::TimeSpan impl_IMusicProperties::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Duration(put_abi(value))); return value; } template uint32_t impl_IMusicProperties::Bitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bitrate(&value)); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Bitrate(&value)); return value; } template hstring impl_IMusicProperties::AlbumArtist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlbumArtist(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_AlbumArtist(put_abi(value))); return value; } -template void impl_IMusicProperties::AlbumArtist(hstring_ref value) const +template void impl_IMusicProperties::AlbumArtist(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_AlbumArtist(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_AlbumArtist(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMusicProperties::Composers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Composers(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Composers(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMusicProperties::Conductors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Conductors(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Conductors(put_abi(value))); return value; } template hstring impl_IMusicProperties::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Subtitle(put_abi(value))); return value; } -template void impl_IMusicProperties::Subtitle(hstring_ref value) const +template void impl_IMusicProperties::Subtitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subtitle(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Subtitle(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMusicProperties::Producers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Producers(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Producers(put_abi(value))); return value; } template hstring impl_IMusicProperties::Publisher() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Publisher(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Publisher(put_abi(value))); return value; } -template void impl_IMusicProperties::Publisher(hstring_ref value) const +template void impl_IMusicProperties::Publisher(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Publisher(get(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Publisher(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMusicProperties::Writers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Writers(put(value))); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Writers(put_abi(value))); return value; } template uint32_t impl_IMusicProperties::Year() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Year(&value)); + check_hresult(WINRT_SHIM(IMusicProperties)->get_Year(&value)); return value; } template void impl_IMusicProperties::Year(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Year(value)); + check_hresult(WINRT_SHIM(IMusicProperties)->put_Year(value)); } template uint32_t impl_IImageProperties::Rating() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Rating(&value)); + check_hresult(WINRT_SHIM(IImageProperties)->get_Rating(&value)); return value; } template void impl_IImageProperties::Rating(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Rating(value)); + check_hresult(WINRT_SHIM(IImageProperties)->put_Rating(value)); } template Windows::Foundation::Collections::IVector impl_IImageProperties::Keywords() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_Keywords(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IImageProperties::DateTaken() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DateTaken(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_DateTaken(put_abi(value))); return value; } template void impl_IImageProperties::DateTaken(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_DateTaken(get(value))); + check_hresult(WINRT_SHIM(IImageProperties)->put_DateTaken(get_abi(value))); } template uint32_t impl_IImageProperties::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IImageProperties)->get_Width(&value)); return value; } template uint32_t impl_IImageProperties::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IImageProperties)->get_Height(&value)); return value; } template hstring impl_IImageProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_Title(put_abi(value))); return value; } -template void impl_IImageProperties::Title(hstring_ref value) const +template void impl_IImageProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IImageProperties)->put_Title(get_abi(value))); } template Windows::Foundation::IReference impl_IImageProperties::Latitude() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Latitude(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_Latitude(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IImageProperties::Longitude() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Longitude(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_Longitude(put_abi(value))); return value; } template hstring impl_IImageProperties::CameraManufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CameraManufacturer(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_CameraManufacturer(put_abi(value))); return value; } -template void impl_IImageProperties::CameraManufacturer(hstring_ref value) const +template void impl_IImageProperties::CameraManufacturer(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CameraManufacturer(get(value))); + check_hresult(WINRT_SHIM(IImageProperties)->put_CameraManufacturer(get_abi(value))); } template hstring impl_IImageProperties::CameraModel() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CameraModel(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_CameraModel(put_abi(value))); return value; } -template void impl_IImageProperties::CameraModel(hstring_ref value) const +template void impl_IImageProperties::CameraModel(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CameraModel(get(value))); + check_hresult(WINRT_SHIM(IImageProperties)->put_CameraModel(get_abi(value))); } template Windows::Storage::FileProperties::PhotoOrientation impl_IImageProperties::Orientation() const { Windows::Storage::FileProperties::PhotoOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IImageProperties)->get_Orientation(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IImageProperties::PeopleNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_PeopleNames(put(value))); + check_hresult(WINRT_SHIM(IImageProperties)->get_PeopleNames(put_abi(value))); return value; } template uint32_t impl_IVideoProperties::Rating() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Rating(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Rating(&value)); return value; } template void impl_IVideoProperties::Rating(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Rating(value)); + check_hresult(WINRT_SHIM(IVideoProperties)->put_Rating(value)); } template Windows::Foundation::Collections::IVector impl_IVideoProperties::Keywords() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Keywords(put_abi(value))); return value; } template uint32_t impl_IVideoProperties::Width() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Width(&value)); return value; } template uint32_t impl_IVideoProperties::Height() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Height(&value)); return value; } template Windows::Foundation::TimeSpan impl_IVideoProperties::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Duration(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IVideoProperties::Latitude() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Latitude(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Latitude(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IVideoProperties::Longitude() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Longitude(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Longitude(put_abi(value))); return value; } template hstring impl_IVideoProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Title(put_abi(value))); return value; } -template void impl_IVideoProperties::Title(hstring_ref value) const +template void impl_IVideoProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->put_Title(get_abi(value))); } template hstring impl_IVideoProperties::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Subtitle(put_abi(value))); return value; } -template void impl_IVideoProperties::Subtitle(hstring_ref value) const +template void impl_IVideoProperties::Subtitle(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Subtitle(get(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->put_Subtitle(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVideoProperties::Producers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Producers(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Producers(put_abi(value))); return value; } template hstring impl_IVideoProperties::Publisher() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Publisher(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Publisher(put_abi(value))); return value; } -template void impl_IVideoProperties::Publisher(hstring_ref value) const +template void impl_IVideoProperties::Publisher(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Publisher(get(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->put_Publisher(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IVideoProperties::Writers() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Writers(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Writers(put_abi(value))); return value; } template uint32_t impl_IVideoProperties::Year() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Year(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Year(&value)); return value; } template void impl_IVideoProperties::Year(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Year(value)); + check_hresult(WINRT_SHIM(IVideoProperties)->put_Year(value)); } template uint32_t impl_IVideoProperties::Bitrate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Bitrate(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Bitrate(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IVideoProperties::Directors() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Directors(put(value))); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Directors(put_abi(value))); return value; } template Windows::Storage::FileProperties::VideoOrientation impl_IVideoProperties::Orientation() const { Windows::Storage::FileProperties::VideoOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IVideoProperties)->get_Orientation(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IDocumentProperties::Author() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->get_Author(put_abi(value))); return value; } template hstring impl_IDocumentProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->get_Title(put_abi(value))); return value; } -template void impl_IDocumentProperties::Title(hstring_ref value) const +template void impl_IDocumentProperties::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->put_Title(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IDocumentProperties::Keywords() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->get_Keywords(put_abi(value))); return value; } template hstring impl_IDocumentProperties::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->get_Comment(put_abi(value))); return value; } -template void impl_IDocumentProperties::Comment(hstring_ref value) const +template void impl_IDocumentProperties::Comment(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Comment(get(value))); + check_hresult(WINRT_SHIM(IDocumentProperties)->put_Comment(get_abi(value))); } template uint64_t impl_IBasicProperties::Size() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(IBasicProperties)->get_Size(&value)); return value; } template Windows::Foundation::DateTime impl_IBasicProperties::DateModified() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DateModified(put(value))); + check_hresult(WINRT_SHIM(IBasicProperties)->get_DateModified(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IBasicProperties::ItemDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemDate(put(value))); + check_hresult(WINRT_SHIM(IBasicProperties)->get_ItemDate(put_abi(value))); return value; } @@ -1793,3 +1882,149 @@ inline Windows::Foundation::IAsyncAction GeotagHelper::SetGeotagAsync(const Wind } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IBasicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IDocumentProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IGeotagHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IImageProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IMusicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IStorageItemContentProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IStorageItemExtraProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IThumbnailProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::IVideoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::BasicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::DocumentProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::ImageProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::MusicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::StorageItemContentProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::StorageItemThumbnail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::FileProperties::VideoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Pickers.Provider.h b/10.0.14393.0/winrt/Windows.Storage.Pickers.Provider.h index d4da825e9..760c1c420 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Pickers.Provider.h +++ b/10.0.14393.0/winrt/Windows.Storage.Pickers.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AddFile(abi_arg_in id, abi_arg_in file, Windows::Storage::Pickers::Provider::AddFileResult * addResult) noexcept override + HRESULT __stdcall abi_AddFile(impl::abi_arg_in id, impl::abi_arg_in file, Windows::Storage::Pickers::Provider::AddFileResult * addResult) noexcept override { try { - *addResult = detach(this->shim().AddFile(*reinterpret_cast(&id), *reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *addResult = detach_abi(this->shim().AddFile(*reinterpret_cast(&id), *reinterpret_cast(&file))); return S_OK; } catch (...) @@ -29,10 +33,11 @@ struct produce : prod } } - HRESULT __stdcall abi_RemoveFile(abi_arg_in id) noexcept override + HRESULT __stdcall abi_RemoveFile(impl::abi_arg_in id) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveFile(*reinterpret_cast(&id)); return S_OK; } @@ -42,11 +47,12 @@ struct produce : prod } } - HRESULT __stdcall abi_ContainsFile(abi_arg_in id, bool * isContained) noexcept override + HRESULT __stdcall abi_ContainsFile(impl::abi_arg_in id, bool * isContained) noexcept override { try { - *isContained = detach(this->shim().ContainsFile(*reinterpret_cast(&id))); + typename D::abi_guard guard(this->shim()); + *isContained = detach_abi(this->shim().ContainsFile(*reinterpret_cast(&id))); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CanAddFile(abi_arg_in file, bool * canAdd) noexcept override + HRESULT __stdcall abi_CanAddFile(impl::abi_arg_in file, bool * canAdd) noexcept override { try { - *canAdd = detach(this->shim().CanAddFile(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *canAdd = detach_abi(this->shim().CanAddFile(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -68,11 +75,12 @@ struct produce : prod } } - HRESULT __stdcall get_AllowedFileTypes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AllowedFileTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllowedFileTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedFileTypes()); return S_OK; } catch (...) @@ -86,7 +94,8 @@ struct produce : prod { try { - *value = detach(this->shim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -95,11 +104,12 @@ struct produce : prod } } - HRESULT __stdcall get_SettingsIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_SettingsIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SettingsIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SettingsIdentifier()); return S_OK; } catch (...) @@ -109,11 +119,12 @@ struct produce : prod } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -123,10 +134,11 @@ struct produce : prod } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -136,11 +148,12 @@ struct produce : prod } } - HRESULT __stdcall add_FileRemoved(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FileRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FileRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FileRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -153,6 +166,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().FileRemoved(token); return S_OK; } @@ -162,11 +176,12 @@ struct produce : prod } } - HRESULT __stdcall add_Closing(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Closing(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Closing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -179,6 +194,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Closing(token); return S_OK; } @@ -192,11 +208,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -210,11 +227,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -224,10 +242,11 @@ struct produce : prod } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -237,11 +256,12 @@ struct produce : prod } } - HRESULT __stdcall get_AllowedFileTypes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AllowedFileTypes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllowedFileTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedFileTypes()); return S_OK; } catch (...) @@ -251,11 +271,12 @@ struct produce : prod } } - HRESULT __stdcall get_SettingsIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_SettingsIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SettingsIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SettingsIdentifier()); return S_OK; } catch (...) @@ -265,11 +286,12 @@ struct produce : prod } } - HRESULT __stdcall get_FileName(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileName()); return S_OK; } catch (...) @@ -279,11 +301,12 @@ struct produce : prod } } - HRESULT __stdcall abi_TrySetFileName(abi_arg_in value, Windows::Storage::Pickers::Provider::SetFileNameResult * result) noexcept override + HRESULT __stdcall abi_TrySetFileName(impl::abi_arg_in value, Windows::Storage::Pickers::Provider::SetFileNameResult * result) noexcept override { try { - *result = detach(this->shim().TrySetFileName(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetFileName(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -292,11 +315,12 @@ struct produce : prod } } - HRESULT __stdcall add_FileNameChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FileNameChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FileNameChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FileNameChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -309,6 +333,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().FileNameChanged(token); return S_OK; } @@ -318,11 +343,12 @@ struct produce : prod } } - HRESULT __stdcall add_TargetFileRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_TargetFileRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().TargetFileRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TargetFileRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -335,6 +361,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetFileRequested(token); return S_OK; } @@ -352,6 +379,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -365,11 +393,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ClosingOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClosingOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClosingOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClosingOperation()); return S_OK; } catch (...) @@ -383,7 +412,8 @@ struct produce { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -396,11 +426,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -410,11 +441,12 @@ struct produce } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -427,11 +459,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_TargetFile(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetFile()); return S_OK; } catch (...) @@ -441,10 +474,11 @@ struct produce : pro } } - HRESULT __stdcall put_TargetFile(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetFile(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetFile(*reinterpret_cast(&value)); return S_OK; } @@ -454,11 +488,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -476,6 +511,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -489,11 +525,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -511,73 +548,73 @@ namespace Windows::Storage::Pickers::Provider { template hstring impl_IFileRemovedEventArgs::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IFileRemovedEventArgs)->get_Id(put_abi(value))); return value; } -template Windows::Storage::Pickers::Provider::AddFileResult impl_IFileOpenPickerUI::AddFile(hstring_ref id, const Windows::Storage::IStorageFile & file) const +template Windows::Storage::Pickers::Provider::AddFileResult impl_IFileOpenPickerUI::AddFile(hstring_view id, const Windows::Storage::IStorageFile & file) const { Windows::Storage::Pickers::Provider::AddFileResult addResult {}; - check_hresult(static_cast(static_cast(*this))->abi_AddFile(get(id), get(file), &addResult)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->abi_AddFile(get_abi(id), get_abi(file), &addResult)); return addResult; } -template void impl_IFileOpenPickerUI::RemoveFile(hstring_ref id) const +template void impl_IFileOpenPickerUI::RemoveFile(hstring_view id) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFile(get(id))); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->abi_RemoveFile(get_abi(id))); } -template bool impl_IFileOpenPickerUI::ContainsFile(hstring_ref id) const +template bool impl_IFileOpenPickerUI::ContainsFile(hstring_view id) const { bool isContained {}; - check_hresult(static_cast(static_cast(*this))->abi_ContainsFile(get(id), &isContained)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->abi_ContainsFile(get_abi(id), &isContained)); return isContained; } template bool impl_IFileOpenPickerUI::CanAddFile(const Windows::Storage::IStorageFile & file) const { bool canAdd {}; - check_hresult(static_cast(static_cast(*this))->abi_CanAddFile(get(file), &canAdd)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->abi_CanAddFile(get_abi(file), &canAdd)); return canAdd; } template Windows::Foundation::Collections::IVectorView impl_IFileOpenPickerUI::AllowedFileTypes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AllowedFileTypes(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->get_AllowedFileTypes(put_abi(value))); return value; } template Windows::Storage::Pickers::Provider::FileSelectionMode impl_IFileOpenPickerUI::SelectionMode() const { Windows::Storage::Pickers::Provider::FileSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->get_SelectionMode(&value)); return value; } template hstring impl_IFileOpenPickerUI::SettingsIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SettingsIdentifier(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->get_SettingsIdentifier(put_abi(value))); return value; } template hstring impl_IFileOpenPickerUI::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->get_Title(put_abi(value))); return value; } -template void impl_IFileOpenPickerUI::Title(hstring_ref value) const +template void impl_IFileOpenPickerUI::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->put_Title(get_abi(value))); } template event_token impl_IFileOpenPickerUI::FileRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FileRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->add_FileRemoved(get_abi(handler), &token)); return token; } @@ -588,13 +625,13 @@ template event_revoker impl_IFileOpenPickerUI template void impl_IFileOpenPickerUI::FileRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FileRemoved(token)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->remove_FileRemoved(token)); } template event_token impl_IFileOpenPickerUI::Closing(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closing(get(handler), &token)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->add_Closing(get_abi(handler), &token)); return token; } @@ -605,103 +642,103 @@ template event_revoker impl_IFileOpenPickerUI template void impl_IFileOpenPickerUI::Closing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closing(token)); + check_hresult(WINRT_SHIM(IFileOpenPickerUI)->remove_Closing(token)); } template Windows::Storage::Pickers::Provider::PickerClosingOperation impl_IPickerClosingEventArgs::ClosingOperation() const { Windows::Storage::Pickers::Provider::PickerClosingOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClosingOperation(put(value))); + check_hresult(WINRT_SHIM(IPickerClosingEventArgs)->get_ClosingOperation(put_abi(value))); return value; } template bool impl_IPickerClosingEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(IPickerClosingEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Storage::Pickers::Provider::PickerClosingDeferral impl_IPickerClosingOperation::GetDeferral() const { Windows::Storage::Pickers::Provider::PickerClosingDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IPickerClosingOperation)->abi_GetDeferral(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IPickerClosingOperation::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IPickerClosingOperation)->get_Deadline(put_abi(value))); return value; } template void impl_IPickerClosingDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IPickerClosingDeferral)->abi_Complete()); } template hstring impl_IFileSavePickerUI::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->get_Title(put_abi(value))); return value; } -template void impl_IFileSavePickerUI::Title(hstring_ref value) const +template void impl_IFileSavePickerUI::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->put_Title(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IFileSavePickerUI::AllowedFileTypes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AllowedFileTypes(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->get_AllowedFileTypes(put_abi(value))); return value; } template hstring impl_IFileSavePickerUI::SettingsIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SettingsIdentifier(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->get_SettingsIdentifier(put_abi(value))); return value; } template hstring impl_IFileSavePickerUI::FileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FileName(put(value))); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->get_FileName(put_abi(value))); return value; } -template Windows::Storage::Pickers::Provider::SetFileNameResult impl_IFileSavePickerUI::TrySetFileName(hstring_ref value) const +template Windows::Storage::Pickers::Provider::SetFileNameResult impl_IFileSavePickerUI::TrySetFileName(hstring_view value) const { Windows::Storage::Pickers::Provider::SetFileNameResult result {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetFileName(get(value), &result)); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->abi_TrySetFileName(get_abi(value), &result)); return result; } -template event_token impl_IFileSavePickerUI::FileNameChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IFileSavePickerUI::FileNameChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FileNameChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->add_FileNameChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IFileSavePickerUI::FileNameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IFileSavePickerUI::FileNameChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::Pickers::Provider::IFileSavePickerUI::remove_FileNameChanged, FileNameChanged(handler)); } template void impl_IFileSavePickerUI::FileNameChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FileNameChanged(token)); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->remove_FileNameChanged(token)); } template event_token impl_IFileSavePickerUI::TargetFileRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TargetFileRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->add_TargetFileRequested(get_abi(handler), &token)); return token; } @@ -712,40 +749,204 @@ template event_revoker impl_IFileSavePickerUI template void impl_IFileSavePickerUI::TargetFileRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TargetFileRequested(token)); + check_hresult(WINRT_SHIM(IFileSavePickerUI)->remove_TargetFileRequested(token)); } template Windows::Storage::Pickers::Provider::TargetFileRequest impl_ITargetFileRequestedEventArgs::Request() const { Windows::Storage::Pickers::Provider::TargetFileRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ITargetFileRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Storage::IStorageFile impl_ITargetFileRequest::TargetFile() const { Windows::Storage::IStorageFile value; - check_hresult(static_cast(static_cast(*this))->get_TargetFile(put(value))); + check_hresult(WINRT_SHIM(ITargetFileRequest)->get_TargetFile(put_abi(value))); return value; } template void impl_ITargetFileRequest::TargetFile(const Windows::Storage::IStorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetFile(get(value))); + check_hresult(WINRT_SHIM(ITargetFileRequest)->put_TargetFile(get_abi(value))); } template Windows::Storage::Pickers::Provider::TargetFileRequestDeferral impl_ITargetFileRequest::GetDeferral() const { Windows::Storage::Pickers::Provider::TargetFileRequestDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ITargetFileRequest)->abi_GetDeferral(put_abi(value))); return value; } template void impl_ITargetFileRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ITargetFileRequestDeferral)->abi_Complete()); } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IFileOpenPickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IFileRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IFileSavePickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IPickerClosingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IPickerClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::IPickerClosingOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::ITargetFileRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::ITargetFileRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::ITargetFileRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::FileOpenPickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::FileRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::FileSavePickerUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::PickerClosingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::PickerClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::PickerClosingOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::TargetFileRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::TargetFileRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::Provider::TargetFileRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Pickers.h b/10.0.14393.0/winrt/Windows.Storage.Pickers.h index 606289a35..c3125631f 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Pickers.h +++ b/10.0.14393.0/winrt/Windows.Storage.Pickers.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" @@ -21,7 +24,8 @@ struct produce : produce_baseshim().ViewMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewMode()); return S_OK; } catch (...) @@ -34,6 +38,7 @@ struct produce : produce_baseshim()); this->shim().ViewMode(value); return S_OK; } @@ -43,11 +48,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SettingsIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SettingsIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SettingsIdentifier()); return S_OK; } catch (...) @@ -57,10 +63,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SettingsIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SettingsIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -74,7 +81,8 @@ struct produce : produce_baseshim().SuggestedStartLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedStartLocation()); return S_OK; } catch (...) @@ -87,6 +95,7 @@ struct produce : produce_baseshim()); this->shim().SuggestedStartLocation(value); return S_OK; } @@ -96,11 +105,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommitButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommitButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommitButtonText()); return S_OK; } catch (...) @@ -110,10 +120,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CommitButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -123,11 +134,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_FileTypeFilter(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileTypeFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypeFilter()); return S_OK; } catch (...) @@ -137,11 +149,12 @@ struct produce : produce_base> pickSingleFileOperation) noexcept override + HRESULT __stdcall abi_PickSingleFileAsync(impl::abi_arg_out> pickSingleFileOperation) noexcept override { try { - *pickSingleFileOperation = detach(this->shim().PickSingleFileAsync()); + typename D::abi_guard guard(this->shim()); + *pickSingleFileOperation = detach_abi(this->shim().PickSingleFileAsync()); return S_OK; } catch (...) @@ -151,11 +164,12 @@ struct produce : produce_base>> pickMultipleFilesOperation) noexcept override + HRESULT __stdcall abi_PickMultipleFilesAsync(impl::abi_arg_out>> pickMultipleFilesOperation) noexcept override { try { - *pickMultipleFilesOperation = detach(this->shim().PickMultipleFilesAsync()); + typename D::abi_guard guard(this->shim()); + *pickMultipleFilesOperation = detach_abi(this->shim().PickMultipleFilesAsync()); return S_OK; } catch (...) @@ -169,11 +183,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ContinuationData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContinuationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContinuationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContinuationData()); return S_OK; } catch (...) @@ -187,6 +202,7 @@ struct produce : produce_baseshim()); this->shim().PickSingleFileAndContinue(); return S_OK; } @@ -200,6 +216,7 @@ struct produce : produce_baseshim()); this->shim().PickMultipleFilesAndContinue(); return S_OK; } @@ -213,11 +230,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ResumePickSingleFileAsync(abi_arg_out> pickSingleFileOperation) noexcept override + HRESULT __stdcall abi_ResumePickSingleFileAsync(impl::abi_arg_out> pickSingleFileOperation) noexcept override { try { - *pickSingleFileOperation = detach(this->shim().ResumePickSingleFileAsync()); + typename D::abi_guard guard(this->shim()); + *pickSingleFileOperation = detach_abi(this->shim().ResumePickSingleFileAsync()); return S_OK; } catch (...) @@ -231,11 +249,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_PickSingleFileAsync(abi_arg_in pickerOperationId, abi_arg_out> pickSingleFileOperation) noexcept override + HRESULT __stdcall abi_PickSingleFileAsync(impl::abi_arg_in pickerOperationId, impl::abi_arg_out> pickSingleFileOperation) noexcept override { try { - *pickSingleFileOperation = detach(this->shim().PickSingleFileAsync(*reinterpret_cast(&pickerOperationId))); + typename D::abi_guard guard(this->shim()); + *pickSingleFileOperation = detach_abi(this->shim().PickSingleFileAsync(*reinterpret_cast(&pickerOperationId))); return S_OK; } catch (...) @@ -249,11 +268,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_SettingsIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_SettingsIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SettingsIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SettingsIdentifier()); return S_OK; } catch (...) @@ -263,10 +283,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SettingsIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SettingsIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -280,7 +301,8 @@ struct produce : produce_baseshim().SuggestedStartLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedStartLocation()); return S_OK; } catch (...) @@ -293,6 +315,7 @@ struct produce : produce_baseshim()); this->shim().SuggestedStartLocation(value); return S_OK; } @@ -302,11 +325,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommitButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommitButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommitButtonText()); return S_OK; } catch (...) @@ -316,10 +340,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CommitButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -329,11 +354,12 @@ struct produce : produce_base>> value) noexcept override + HRESULT __stdcall get_FileTypeChoices(impl::abi_arg_out>> value) noexcept override { try { - *value = detach(this->shim().FileTypeChoices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypeChoices()); return S_OK; } catch (...) @@ -343,11 +369,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultFileExtension(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultFileExtension()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultFileExtension()); return S_OK; } catch (...) @@ -357,10 +384,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DefaultFileExtension(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultFileExtension(*reinterpret_cast(&value)); return S_OK; } @@ -370,11 +398,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SuggestedSaveFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuggestedSaveFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedSaveFile()); return S_OK; } catch (...) @@ -384,10 +413,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SuggestedSaveFile(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuggestedSaveFile(*reinterpret_cast(&value)); return S_OK; } @@ -397,11 +427,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SuggestedFileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuggestedFileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedFileName()); return S_OK; } catch (...) @@ -411,10 +442,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SuggestedFileName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuggestedFileName(*reinterpret_cast(&value)); return S_OK; } @@ -424,11 +456,12 @@ struct produce : produce_base> pickSaveFileOperation) noexcept override + HRESULT __stdcall abi_PickSaveFileAsync(impl::abi_arg_out> pickSaveFileOperation) noexcept override { try { - *pickSaveFileOperation = detach(this->shim().PickSaveFileAsync()); + typename D::abi_guard guard(this->shim()); + *pickSaveFileOperation = detach_abi(this->shim().PickSaveFileAsync()); return S_OK; } catch (...) @@ -442,11 +475,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ContinuationData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContinuationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContinuationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContinuationData()); return S_OK; } catch (...) @@ -460,6 +494,7 @@ struct produce : produce_baseshim()); this->shim().PickSaveFileAndContinue(); return S_OK; } @@ -473,11 +508,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_EnterpriseId(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnterpriseId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnterpriseId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnterpriseId()); return S_OK; } catch (...) @@ -487,10 +523,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_EnterpriseId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EnterpriseId(*reinterpret_cast(&value)); return S_OK; } @@ -508,7 +545,8 @@ struct produce : produce_baseshim().ViewMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewMode()); return S_OK; } catch (...) @@ -521,6 +559,7 @@ struct produce : produce_baseshim()); this->shim().ViewMode(value); return S_OK; } @@ -530,11 +569,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SettingsIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SettingsIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SettingsIdentifier()); return S_OK; } catch (...) @@ -544,10 +584,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SettingsIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SettingsIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -561,7 +602,8 @@ struct produce : produce_baseshim().SuggestedStartLocation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedStartLocation()); return S_OK; } catch (...) @@ -574,6 +616,7 @@ struct produce : produce_baseshim()); this->shim().SuggestedStartLocation(value); return S_OK; } @@ -583,11 +626,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommitButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommitButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommitButtonText()); return S_OK; } catch (...) @@ -597,10 +641,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CommitButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -610,11 +655,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_FileTypeFilter(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileTypeFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypeFilter()); return S_OK; } catch (...) @@ -624,11 +670,12 @@ struct produce : produce_base> pickSingleFolderOperation) noexcept override + HRESULT __stdcall abi_PickSingleFolderAsync(impl::abi_arg_out> pickSingleFolderOperation) noexcept override { try { - *pickSingleFolderOperation = detach(this->shim().PickSingleFolderAsync()); + typename D::abi_guard guard(this->shim()); + *pickSingleFolderOperation = detach_abi(this->shim().PickSingleFolderAsync()); return S_OK; } catch (...) @@ -642,11 +689,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ContinuationData(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContinuationData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContinuationData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContinuationData()); return S_OK; } catch (...) @@ -660,6 +708,7 @@ struct produce : produce_baseshim()); this->shim().PickFolderAndContinue(); return S_OK; } @@ -677,285 +726,285 @@ namespace Windows::Storage::Pickers { template Windows::Storage::Pickers::PickerViewMode impl_IFileOpenPicker::ViewMode() const { Windows::Storage::Pickers::PickerViewMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewMode(&value)); + check_hresult(WINRT_SHIM(IFileOpenPicker)->get_ViewMode(&value)); return value; } template void impl_IFileOpenPicker::ViewMode(Windows::Storage::Pickers::PickerViewMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ViewMode(value)); + check_hresult(WINRT_SHIM(IFileOpenPicker)->put_ViewMode(value)); } template hstring impl_IFileOpenPicker::SettingsIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SettingsIdentifier(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->get_SettingsIdentifier(put_abi(value))); return value; } -template void impl_IFileOpenPicker::SettingsIdentifier(hstring_ref value) const +template void impl_IFileOpenPicker::SettingsIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SettingsIdentifier(get(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->put_SettingsIdentifier(get_abi(value))); } template Windows::Storage::Pickers::PickerLocationId impl_IFileOpenPicker::SuggestedStartLocation() const { Windows::Storage::Pickers::PickerLocationId value {}; - check_hresult(static_cast(static_cast(*this))->get_SuggestedStartLocation(&value)); + check_hresult(WINRT_SHIM(IFileOpenPicker)->get_SuggestedStartLocation(&value)); return value; } template void impl_IFileOpenPicker::SuggestedStartLocation(Windows::Storage::Pickers::PickerLocationId value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedStartLocation(value)); + check_hresult(WINRT_SHIM(IFileOpenPicker)->put_SuggestedStartLocation(value)); } template hstring impl_IFileOpenPicker::CommitButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CommitButtonText(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->get_CommitButtonText(put_abi(value))); return value; } -template void impl_IFileOpenPicker::CommitButtonText(hstring_ref value) const +template void impl_IFileOpenPicker::CommitButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CommitButtonText(get(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->put_CommitButtonText(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IFileOpenPicker::FileTypeFilter() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FileTypeFilter(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->get_FileTypeFilter(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IFileOpenPicker::PickSingleFileAsync() const { Windows::Foundation::IAsyncOperation pickSingleFileOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleFileAsync(put(pickSingleFileOperation))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->abi_PickSingleFileAsync(put_abi(pickSingleFileOperation))); return pickSingleFileOperation; } template Windows::Foundation::IAsyncOperation> impl_IFileOpenPicker::PickMultipleFilesAsync() const { Windows::Foundation::IAsyncOperation> pickMultipleFilesOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickMultipleFilesAsync(put(pickMultipleFilesOperation))); + check_hresult(WINRT_SHIM(IFileOpenPicker)->abi_PickMultipleFilesAsync(put_abi(pickMultipleFilesOperation))); return pickMultipleFilesOperation; } template Windows::Foundation::Collections::ValueSet impl_IFileOpenPicker2::ContinuationData() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContinuationData(put(value))); + check_hresult(WINRT_SHIM(IFileOpenPicker2)->get_ContinuationData(put_abi(value))); return value; } template void impl_IFileOpenPicker2::PickSingleFileAndContinue() const { - check_hresult(static_cast(static_cast(*this))->abi_PickSingleFileAndContinue()); + check_hresult(WINRT_SHIM(IFileOpenPicker2)->abi_PickSingleFileAndContinue()); } template void impl_IFileOpenPicker2::PickMultipleFilesAndContinue() const { - check_hresult(static_cast(static_cast(*this))->abi_PickMultipleFilesAndContinue()); + check_hresult(WINRT_SHIM(IFileOpenPicker2)->abi_PickMultipleFilesAndContinue()); } -template Windows::Foundation::IAsyncOperation impl_IFileOpenPickerWithOperationId::PickSingleFileAsync(hstring_ref pickerOperationId) const +template Windows::Foundation::IAsyncOperation impl_IFileOpenPickerWithOperationId::PickSingleFileAsync(hstring_view pickerOperationId) const { Windows::Foundation::IAsyncOperation pickSingleFileOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleFileAsync(get(pickerOperationId), put(pickSingleFileOperation))); + check_hresult(WINRT_SHIM(IFileOpenPickerWithOperationId)->abi_PickSingleFileAsync(get_abi(pickerOperationId), put_abi(pickSingleFileOperation))); return pickSingleFileOperation; } template Windows::Foundation::IAsyncOperation impl_IFileOpenPickerStatics::ResumePickSingleFileAsync() const { Windows::Foundation::IAsyncOperation pickSingleFileOperation; - check_hresult(static_cast(static_cast(*this))->abi_ResumePickSingleFileAsync(put(pickSingleFileOperation))); + check_hresult(WINRT_SHIM(IFileOpenPickerStatics)->abi_ResumePickSingleFileAsync(put_abi(pickSingleFileOperation))); return pickSingleFileOperation; } template hstring impl_IFileSavePicker::SettingsIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SettingsIdentifier(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_SettingsIdentifier(put_abi(value))); return value; } -template void impl_IFileSavePicker::SettingsIdentifier(hstring_ref value) const +template void impl_IFileSavePicker::SettingsIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SettingsIdentifier(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_SettingsIdentifier(get_abi(value))); } template Windows::Storage::Pickers::PickerLocationId impl_IFileSavePicker::SuggestedStartLocation() const { Windows::Storage::Pickers::PickerLocationId value {}; - check_hresult(static_cast(static_cast(*this))->get_SuggestedStartLocation(&value)); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_SuggestedStartLocation(&value)); return value; } template void impl_IFileSavePicker::SuggestedStartLocation(Windows::Storage::Pickers::PickerLocationId value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedStartLocation(value)); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_SuggestedStartLocation(value)); } template hstring impl_IFileSavePicker::CommitButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CommitButtonText(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_CommitButtonText(put_abi(value))); return value; } -template void impl_IFileSavePicker::CommitButtonText(hstring_ref value) const +template void impl_IFileSavePicker::CommitButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CommitButtonText(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_CommitButtonText(get_abi(value))); } template Windows::Foundation::Collections::IMap> impl_IFileSavePicker::FileTypeChoices() const { Windows::Foundation::Collections::IMap> value; - check_hresult(static_cast(static_cast(*this))->get_FileTypeChoices(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_FileTypeChoices(put_abi(value))); return value; } template hstring impl_IFileSavePicker::DefaultFileExtension() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DefaultFileExtension(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_DefaultFileExtension(put_abi(value))); return value; } -template void impl_IFileSavePicker::DefaultFileExtension(hstring_ref value) const +template void impl_IFileSavePicker::DefaultFileExtension(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultFileExtension(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_DefaultFileExtension(get_abi(value))); } template Windows::Storage::StorageFile impl_IFileSavePicker::SuggestedSaveFile() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuggestedSaveFile(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_SuggestedSaveFile(put_abi(value))); return value; } template void impl_IFileSavePicker::SuggestedSaveFile(const Windows::Storage::StorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedSaveFile(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_SuggestedSaveFile(get_abi(value))); } template hstring impl_IFileSavePicker::SuggestedFileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SuggestedFileName(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->get_SuggestedFileName(put_abi(value))); return value; } -template void impl_IFileSavePicker::SuggestedFileName(hstring_ref value) const +template void impl_IFileSavePicker::SuggestedFileName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedFileName(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker)->put_SuggestedFileName(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IFileSavePicker::PickSaveFileAsync() const { Windows::Foundation::IAsyncOperation pickSaveFileOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickSaveFileAsync(put(pickSaveFileOperation))); + check_hresult(WINRT_SHIM(IFileSavePicker)->abi_PickSaveFileAsync(put_abi(pickSaveFileOperation))); return pickSaveFileOperation; } template Windows::Foundation::Collections::ValueSet impl_IFileSavePicker2::ContinuationData() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContinuationData(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker2)->get_ContinuationData(put_abi(value))); return value; } template void impl_IFileSavePicker2::PickSaveFileAndContinue() const { - check_hresult(static_cast(static_cast(*this))->abi_PickSaveFileAndContinue()); + check_hresult(WINRT_SHIM(IFileSavePicker2)->abi_PickSaveFileAndContinue()); } template hstring impl_IFileSavePicker3::EnterpriseId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EnterpriseId(put(value))); + check_hresult(WINRT_SHIM(IFileSavePicker3)->get_EnterpriseId(put_abi(value))); return value; } -template void impl_IFileSavePicker3::EnterpriseId(hstring_ref value) const +template void impl_IFileSavePicker3::EnterpriseId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_EnterpriseId(get(value))); + check_hresult(WINRT_SHIM(IFileSavePicker3)->put_EnterpriseId(get_abi(value))); } template Windows::Storage::Pickers::PickerViewMode impl_IFolderPicker::ViewMode() const { Windows::Storage::Pickers::PickerViewMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewMode(&value)); + check_hresult(WINRT_SHIM(IFolderPicker)->get_ViewMode(&value)); return value; } template void impl_IFolderPicker::ViewMode(Windows::Storage::Pickers::PickerViewMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ViewMode(value)); + check_hresult(WINRT_SHIM(IFolderPicker)->put_ViewMode(value)); } template hstring impl_IFolderPicker::SettingsIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SettingsIdentifier(put(value))); + check_hresult(WINRT_SHIM(IFolderPicker)->get_SettingsIdentifier(put_abi(value))); return value; } -template void impl_IFolderPicker::SettingsIdentifier(hstring_ref value) const +template void impl_IFolderPicker::SettingsIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SettingsIdentifier(get(value))); + check_hresult(WINRT_SHIM(IFolderPicker)->put_SettingsIdentifier(get_abi(value))); } template Windows::Storage::Pickers::PickerLocationId impl_IFolderPicker::SuggestedStartLocation() const { Windows::Storage::Pickers::PickerLocationId value {}; - check_hresult(static_cast(static_cast(*this))->get_SuggestedStartLocation(&value)); + check_hresult(WINRT_SHIM(IFolderPicker)->get_SuggestedStartLocation(&value)); return value; } template void impl_IFolderPicker::SuggestedStartLocation(Windows::Storage::Pickers::PickerLocationId value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedStartLocation(value)); + check_hresult(WINRT_SHIM(IFolderPicker)->put_SuggestedStartLocation(value)); } template hstring impl_IFolderPicker::CommitButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CommitButtonText(put(value))); + check_hresult(WINRT_SHIM(IFolderPicker)->get_CommitButtonText(put_abi(value))); return value; } -template void impl_IFolderPicker::CommitButtonText(hstring_ref value) const +template void impl_IFolderPicker::CommitButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CommitButtonText(get(value))); + check_hresult(WINRT_SHIM(IFolderPicker)->put_CommitButtonText(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IFolderPicker::FileTypeFilter() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FileTypeFilter(put(value))); + check_hresult(WINRT_SHIM(IFolderPicker)->get_FileTypeFilter(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IFolderPicker::PickSingleFolderAsync() const { Windows::Foundation::IAsyncOperation pickSingleFolderOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleFolderAsync(put(pickSingleFolderOperation))); + check_hresult(WINRT_SHIM(IFolderPicker)->abi_PickSingleFolderAsync(put_abi(pickSingleFolderOperation))); return pickSingleFolderOperation; } template Windows::Foundation::Collections::ValueSet impl_IFolderPicker2::ContinuationData() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContinuationData(put(value))); + check_hresult(WINRT_SHIM(IFolderPicker2)->get_ContinuationData(put_abi(value))); return value; } template void impl_IFolderPicker2::PickFolderAndContinue() const { - check_hresult(static_cast(static_cast(*this))->abi_PickFolderAndContinue()); + check_hresult(WINRT_SHIM(IFolderPicker2)->abi_PickFolderAndContinue()); } inline FileOpenPicker::FileOpenPicker() : @@ -978,3 +1027,140 @@ inline FolderPicker::FolderPicker() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileOpenPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileOpenPicker2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileOpenPickerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileOpenPickerWithOperationId & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileSavePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileSavePicker2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFileSavePicker3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFolderPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::IFolderPicker2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FileExtensionVector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FileOpenPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FilePickerFileTypesOrderedMap & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FilePickerSelectedFilesArray & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FileSavePicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Pickers::FolderPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Provider.h b/10.0.14393.0/winrt/Windows.Storage.Provider.h index c890ed877..23669c644 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Provider.h +++ b/10.0.14393.0/winrt/Windows.Storage.Provider.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Storage.Provider.3.h" @@ -15,10 +18,11 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_SetUpdateInformation(abi_arg_in file, abi_arg_in contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) noexcept override + HRESULT __stdcall abi_SetUpdateInformation(impl::abi_arg_in file, impl::abi_arg_in contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetUpdateInformation(*reinterpret_cast(&file), *reinterpret_cast(&contentId), readMode, writeMode, options); return S_OK; } @@ -32,11 +36,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -46,10 +51,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -63,7 +69,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().UpdateTarget()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTarget()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_FileUpdateRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_FileUpdateRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().FileUpdateRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FileUpdateRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -89,6 +97,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().FileUpdateRequested(token); return S_OK; } @@ -98,11 +107,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_UIRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UIRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UIRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UIRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -115,6 +125,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().UIRequested(token); return S_OK; } @@ -128,7 +139,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().UIStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UIStatus()); return S_OK; } catch (...) @@ -141,11 +153,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_UpdateRequest(abi_arg_out value) noexcept override + HRESULT __stdcall get_UpdateRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpdateRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateRequest()); return S_OK; } catch (...) @@ -155,11 +168,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -173,11 +187,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_ContentId(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentId()); return S_OK; } catch (...) @@ -187,11 +202,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_File(abi_arg_out value) noexcept override + HRESULT __stdcall get_File(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().File()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().File()); return S_OK; } catch (...) @@ -205,7 +221,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -218,6 +235,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Status(value); return S_OK; } @@ -227,11 +245,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -241,10 +260,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_UpdateLocalFile(abi_arg_in value) noexcept override + HRESULT __stdcall abi_UpdateLocalFile(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateLocalFile(*reinterpret_cast(&value)); return S_OK; } @@ -258,11 +278,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_UserInputNeededMessage(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserInputNeededMessage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserInputNeededMessage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserInputNeededMessage()); return S_OK; } catch (...) @@ -272,10 +293,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_UserInputNeededMessage(abi_arg_in value) noexcept override + HRESULT __stdcall put_UserInputNeededMessage(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserInputNeededMessage(*reinterpret_cast(&value)); return S_OK; } @@ -293,6 +315,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -306,11 +329,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -328,26 +352,26 @@ namespace Windows::Storage::Provider { template hstring impl_ICachedFileUpdaterUI::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->get_Title(put_abi(value))); return value; } -template void impl_ICachedFileUpdaterUI::Title(hstring_ref value) const +template void impl_ICachedFileUpdaterUI::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->put_Title(get_abi(value))); } template Windows::Storage::Provider::CachedFileTarget impl_ICachedFileUpdaterUI::UpdateTarget() const { Windows::Storage::Provider::CachedFileTarget value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateTarget(&value)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->get_UpdateTarget(&value)); return value; } template event_token impl_ICachedFileUpdaterUI::FileUpdateRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FileUpdateRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->add_FileUpdateRequested(get_abi(handler), &token)); return token; } @@ -358,115 +382,115 @@ template event_revoker impl_ICachedFileUpdate template void impl_ICachedFileUpdaterUI::FileUpdateRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FileUpdateRequested(token)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->remove_FileUpdateRequested(token)); } -template event_token impl_ICachedFileUpdaterUI::UIRequested(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICachedFileUpdaterUI::UIRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UIRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->add_UIRequested(get_abi(handler), &token)); return token; } -template event_revoker impl_ICachedFileUpdaterUI::UIRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICachedFileUpdaterUI::UIRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::Provider::ICachedFileUpdaterUI::remove_UIRequested, UIRequested(handler)); } template void impl_ICachedFileUpdaterUI::UIRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UIRequested(token)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->remove_UIRequested(token)); } template Windows::Storage::Provider::UIStatus impl_ICachedFileUpdaterUI::UIStatus() const { Windows::Storage::Provider::UIStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_UIStatus(&value)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI)->get_UIStatus(&value)); return value; } template Windows::Storage::Provider::FileUpdateRequest impl_IFileUpdateRequestedEventArgs::Request() const { Windows::Storage::Provider::FileUpdateRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequestedEventArgs)->get_Request(put_abi(value))); return value; } template hstring impl_IFileUpdateRequest::ContentId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentId(put(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->get_ContentId(put_abi(value))); return value; } template Windows::Storage::StorageFile impl_IFileUpdateRequest::File() const { Windows::Storage::StorageFile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_File(put(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->get_File(put_abi(value))); return value; } template Windows::Storage::Provider::FileUpdateStatus impl_IFileUpdateRequest::Status() const { Windows::Storage::Provider::FileUpdateStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->get_Status(&value)); return value; } template void impl_IFileUpdateRequest::Status(Windows::Storage::Provider::FileUpdateStatus value) const { - check_hresult(static_cast(static_cast(*this))->put_Status(value)); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->put_Status(value)); } template Windows::Storage::Provider::FileUpdateRequestDeferral impl_IFileUpdateRequest::GetDeferral() const { Windows::Storage::Provider::FileUpdateRequestDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->abi_GetDeferral(put_abi(value))); return value; } template void impl_IFileUpdateRequest::UpdateLocalFile(const Windows::Storage::IStorageFile & value) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateLocalFile(get(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest)->abi_UpdateLocalFile(get_abi(value))); } template void impl_IFileUpdateRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IFileUpdateRequestDeferral)->abi_Complete()); } template Windows::Storage::Provider::FileUpdateRequest impl_ICachedFileUpdaterUI2::UpdateRequest() const { Windows::Storage::Provider::FileUpdateRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UpdateRequest(put(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI2)->get_UpdateRequest(put_abi(value))); return value; } template Windows::Storage::Provider::FileUpdateRequestDeferral impl_ICachedFileUpdaterUI2::GetDeferral() const { Windows::Storage::Provider::FileUpdateRequestDeferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICachedFileUpdaterUI2)->abi_GetDeferral(put_abi(value))); return value; } template hstring impl_IFileUpdateRequest2::UserInputNeededMessage() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserInputNeededMessage(put(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest2)->get_UserInputNeededMessage(put_abi(value))); return value; } -template void impl_IFileUpdateRequest2::UserInputNeededMessage(hstring_ref value) const +template void impl_IFileUpdateRequest2::UserInputNeededMessage(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UserInputNeededMessage(get(value))); + check_hresult(WINRT_SHIM(IFileUpdateRequest2)->put_UserInputNeededMessage(get_abi(value))); } -template void impl_ICachedFileUpdaterStatics::SetUpdateInformation(const Windows::Storage::IStorageFile & file, hstring_ref contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) const +template void impl_ICachedFileUpdaterStatics::SetUpdateInformation(const Windows::Storage::IStorageFile & file, hstring_view contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) const { - check_hresult(static_cast(static_cast(*this))->abi_SetUpdateInformation(get(file), get(contentId), readMode, writeMode, options)); + check_hresult(WINRT_SHIM(ICachedFileUpdaterStatics)->abi_SetUpdateInformation(get_abi(file), get_abi(contentId), readMode, writeMode, options)); } -inline void CachedFileUpdater::SetUpdateInformation(const Windows::Storage::IStorageFile & file, hstring_ref contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) +inline void CachedFileUpdater::SetUpdateInformation(const Windows::Storage::IStorageFile & file, hstring_view contentId, Windows::Storage::Provider::ReadActivationMode readMode, Windows::Storage::Provider::WriteActivationMode writeMode, Windows::Storage::Provider::CachedFileOptions options) { get_activation_factory().SetUpdateInformation(file, contentId, readMode, writeMode, options); } @@ -474,3 +498,104 @@ inline void CachedFileUpdater::SetUpdateInformation(const Windows::Storage::ISto } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::ICachedFileUpdaterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::ICachedFileUpdaterUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::ICachedFileUpdaterUI2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::IFileUpdateRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::IFileUpdateRequest2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::IFileUpdateRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::IFileUpdateRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::CachedFileUpdaterUI & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::FileUpdateRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::FileUpdateRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Provider::FileUpdateRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Search.h b/10.0.14393.0/winrt/Windows.Storage.Search.h index 5d799cb61..00736aa95 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Search.h +++ b/10.0.14393.0/winrt/Windows.Storage.Search.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Foundation.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_AddAsync(abi_arg_in indexableContent, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AddAsync(impl::abi_arg_in indexableContent, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AddAsync(*reinterpret_cast(&indexableContent))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AddAsync(*reinterpret_cast(&indexableContent))); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : produce_base indexableContent, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_UpdateAsync(impl::abi_arg_in indexableContent, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().UpdateAsync(*reinterpret_cast(&indexableContent))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAsync(*reinterpret_cast(&indexableContent))); return S_OK; } catch (...) @@ -47,11 +52,12 @@ struct produce : produce_base contentId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(impl::abi_arg_in contentId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync(*reinterpret_cast(&contentId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync(*reinterpret_cast(&contentId))); return S_OK; } catch (...) @@ -61,11 +67,12 @@ struct produce : produce_base> contentIds, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_DeleteMultipleAsync(impl::abi_arg_in> contentIds, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteMultipleAsync(*reinterpret_cast *>(&contentIds))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteMultipleAsync(*reinterpret_cast *>(&contentIds))); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_DeleteAllAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAllAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAllAsync()); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produce_base contentId, abi_arg_in> propertiesToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_RetrievePropertiesAsync(impl::abi_arg_in contentId, impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().RetrievePropertiesAsync(*reinterpret_cast(&contentId), *reinterpret_cast *>(&propertiesToRetrieve))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RetrievePropertiesAsync(*reinterpret_cast(&contentId), *reinterpret_cast *>(&propertiesToRetrieve))); return S_OK; } catch (...) @@ -107,7 +116,8 @@ struct produce : produce_baseshim().Revision()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Revision()); return S_OK; } catch (...) @@ -120,11 +130,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCountAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetCountAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetCountAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetCountAsync()); return S_OK; } catch (...) @@ -134,11 +145,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetPropertiesAsync(abi_arg_out>>> operation) noexcept override + HRESULT __stdcall abi_GetPropertiesAsync(impl::abi_arg_out>>> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertiesAsync()); return S_OK; } catch (...) @@ -148,11 +160,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetPropertiesRangeAsync(uint32_t startIndex, uint32_t maxItems, abi_arg_out>>> operation) noexcept override + HRESULT __stdcall abi_GetPropertiesRangeAsync(uint32_t startIndex, uint32_t maxItems, impl::abi_arg_out>>> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertiesAsync(startIndex, maxItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertiesAsync(startIndex, maxItems)); return S_OK; } catch (...) @@ -162,11 +175,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAsync()); return S_OK; } catch (...) @@ -176,11 +190,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetRangeAsync(uint32_t startIndex, uint32_t maxItems, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetRangeAsync(uint32_t startIndex, uint32_t maxItems, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetAsync(startIndex, maxItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetAsync(startIndex, maxItems)); return S_OK; } catch (...) @@ -190,11 +205,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_QueryFolder(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryFolder()); return S_OK; } catch (...) @@ -208,11 +224,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateQueryWithSortOrderAndLanguage(abi_arg_in searchFilter, abi_arg_in> propertiesToRetrieve, abi_arg_in> sortOrder, abi_arg_in searchFilterLanguage, abi_arg_out query) noexcept override + HRESULT __stdcall abi_CreateQueryWithSortOrderAndLanguage(impl::abi_arg_in searchFilter, impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_in> sortOrder, impl::abi_arg_in searchFilterLanguage, impl::abi_arg_out query) noexcept override { try { - *query = detach(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve), *reinterpret_cast *>(&sortOrder), *reinterpret_cast(&searchFilterLanguage))); + typename D::abi_guard guard(this->shim()); + *query = detach_abi(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve), *reinterpret_cast *>(&sortOrder), *reinterpret_cast(&searchFilterLanguage))); return S_OK; } catch (...) @@ -222,11 +239,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateQueryWithSortOrder(abi_arg_in searchFilter, abi_arg_in> propertiesToRetrieve, abi_arg_in> sortOrder, abi_arg_out query) noexcept override + HRESULT __stdcall abi_CreateQueryWithSortOrder(impl::abi_arg_in searchFilter, impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_in> sortOrder, impl::abi_arg_out query) noexcept override { try { - *query = detach(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve), *reinterpret_cast *>(&sortOrder))); + typename D::abi_guard guard(this->shim()); + *query = detach_abi(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve), *reinterpret_cast *>(&sortOrder))); return S_OK; } catch (...) @@ -236,11 +254,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateQuery(abi_arg_in searchFilter, abi_arg_in> propertiesToRetrieve, abi_arg_out query) noexcept override + HRESULT __stdcall abi_CreateQuery(impl::abi_arg_in searchFilter, impl::abi_arg_in> propertiesToRetrieve, impl::abi_arg_out query) noexcept override { try { - *query = detach(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve))); + typename D::abi_guard guard(this->shim()); + *query = detach_abi(this->shim().CreateQuery(*reinterpret_cast(&searchFilter), *reinterpret_cast *>(&propertiesToRetrieve))); return S_OK; } catch (...) @@ -254,11 +273,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetIndexerWithName(abi_arg_in indexName, abi_arg_out index) noexcept override + HRESULT __stdcall abi_GetIndexerWithName(impl::abi_arg_in indexName, impl::abi_arg_out index) noexcept override { try { - *index = detach(this->shim().GetIndexer(*reinterpret_cast(&indexName))); + typename D::abi_guard guard(this->shim()); + *index = detach_abi(this->shim().GetIndexer(*reinterpret_cast(&indexName))); return S_OK; } catch (...) @@ -268,11 +288,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetIndexer(abi_arg_out index) noexcept override + HRESULT __stdcall abi_GetIndexer(impl::abi_arg_out index) noexcept override { try { - *index = detach(this->shim().GetIndexer()); + typename D::abi_guard guard(this->shim()); + *index = detach_abi(this->shim().GetIndexer()); return S_OK; } catch (...) @@ -286,11 +307,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -300,10 +322,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -313,11 +336,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -327,11 +351,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Stream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stream()); return S_OK; } catch (...) @@ -341,10 +366,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Stream(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Stream(*reinterpret_cast(&value)); return S_OK; } @@ -354,11 +380,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StreamContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StreamContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreamContentType()); return S_OK; } catch (...) @@ -368,10 +395,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_StreamContentType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StreamContentType(*reinterpret_cast(&value)); return S_OK; } @@ -385,11 +413,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FileTypeFilter(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FileTypeFilter(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FileTypeFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileTypeFilter()); return S_OK; } catch (...) @@ -403,7 +432,8 @@ struct produce : produce_baseshim().FolderDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FolderDepth()); return S_OK; } catch (...) @@ -416,6 +446,7 @@ struct produce : produce_baseshim()); this->shim().FolderDepth(value); return S_OK; } @@ -425,11 +456,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ApplicationSearchFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ApplicationSearchFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationSearchFilter()); return S_OK; } catch (...) @@ -439,10 +471,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ApplicationSearchFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplicationSearchFilter(*reinterpret_cast(&value)); return S_OK; } @@ -452,11 +485,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UserSearchFilter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserSearchFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserSearchFilter()); return S_OK; } catch (...) @@ -466,10 +500,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_UserSearchFilter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UserSearchFilter(*reinterpret_cast(&value)); return S_OK; } @@ -479,11 +514,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -493,10 +529,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -510,7 +547,8 @@ struct produce : produce_baseshim().IndexerOption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndexerOption()); return S_OK; } catch (...) @@ -523,6 +561,7 @@ struct produce : produce_baseshim()); this->shim().IndexerOption(value); return S_OK; } @@ -532,11 +571,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SortOrder(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SortOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SortOrder()); return S_OK; } catch (...) @@ -546,11 +586,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_GroupPropertyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupPropertyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupPropertyName()); return S_OK; } catch (...) @@ -564,7 +605,8 @@ struct produce : produce_baseshim().DateStackOption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateStackOption()); return S_OK; } catch (...) @@ -573,11 +615,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SaveToString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaveToString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaveToString()); return S_OK; } catch (...) @@ -587,10 +630,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_LoadFromString(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadFromString(*reinterpret_cast(&value)); return S_OK; } @@ -604,6 +648,7 @@ struct produce : produce_baseshim()); this->shim().SetThumbnailPrefetch(mode, requestedSize, options); return S_OK; } @@ -613,10 +658,11 @@ struct produce : produce_base> propertiesToRetrieve) noexcept override + HRESULT __stdcall abi_SetPropertyPrefetch(Windows::Storage::FileProperties::PropertyPrefetchOptions options, impl::abi_arg_in> propertiesToRetrieve) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPropertyPrefetch(options, *reinterpret_cast *>(&propertiesToRetrieve)); return S_OK; } @@ -630,11 +676,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCommonFileQuery(Windows::Storage::Search::CommonFileQuery query, abi_arg_in> fileTypeFilter, abi_arg_out queryOptions) noexcept override + HRESULT __stdcall abi_CreateCommonFileQuery(Windows::Storage::Search::CommonFileQuery query, impl::abi_arg_in> fileTypeFilter, impl::abi_arg_out queryOptions) noexcept override { try { - *queryOptions = detach(this->shim().CreateCommonFileQuery(query, *reinterpret_cast *>(&fileTypeFilter))); + typename D::abi_guard guard(this->shim()); + *queryOptions = detach_abi(this->shim().CreateCommonFileQuery(query, *reinterpret_cast *>(&fileTypeFilter))); return S_OK; } catch (...) @@ -644,11 +691,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateCommonFolderQuery(Windows::Storage::Search::CommonFolderQuery query, abi_arg_out queryOptions) noexcept override + HRESULT __stdcall abi_CreateCommonFolderQuery(Windows::Storage::Search::CommonFolderQuery query, impl::abi_arg_out queryOptions) noexcept override { try { - *queryOptions = detach(this->shim().CreateCommonFolderQuery(query)); + typename D::abi_guard guard(this->shim()); + *queryOptions = detach_abi(this->shim().CreateCommonFolderQuery(query)); return S_OK; } catch (...) @@ -662,11 +710,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_StorageProviderIdFilter(abi_arg_out> value) noexcept override + HRESULT __stdcall get_StorageProviderIdFilter(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().StorageProviderIdFilter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorageProviderIdFilter()); return S_OK; } catch (...) @@ -680,11 +729,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync(startIndex, maxNumberOfItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync(startIndex, maxNumberOfItems)); return S_OK; } catch (...) @@ -694,11 +744,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetFilesAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync()); return S_OK; } catch (...) @@ -712,11 +763,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetMatchingPropertiesWithRanges(abi_arg_in file, abi_arg_out>> result) noexcept override + HRESULT __stdcall abi_GetMatchingPropertiesWithRanges(impl::abi_arg_in file, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetMatchingPropertiesWithRanges(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetMatchingPropertiesWithRanges(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -730,11 +782,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetIndexedStateAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetIndexedStateAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetIndexedStateAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetIndexedStateAsync()); return S_OK; } catch (...) @@ -744,11 +797,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFileQueryOverloadDefault(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFileQueryOverloadDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFileQuery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFileQuery()); return S_OK; } catch (...) @@ -758,11 +812,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFileQuery(Windows::Storage::Search::CommonFileQuery query, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFileQuery(Windows::Storage::Search::CommonFileQuery query, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFileQuery(query)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFileQuery(query)); return S_OK; } catch (...) @@ -772,11 +827,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFileQueryWithOptions(abi_arg_in queryOptions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFileQueryWithOptions(impl::abi_arg_in queryOptions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFileQueryWithOptions(*reinterpret_cast(&queryOptions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFileQueryWithOptions(*reinterpret_cast(&queryOptions))); return S_OK; } catch (...) @@ -786,11 +842,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFolderQueryOverloadDefault(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFolderQueryOverloadDefault(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFolderQuery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFolderQuery()); return S_OK; } catch (...) @@ -800,11 +857,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFolderQuery(Windows::Storage::Search::CommonFolderQuery query, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFolderQuery(Windows::Storage::Search::CommonFolderQuery query, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFolderQuery(query)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFolderQuery(query)); return S_OK; } catch (...) @@ -814,11 +872,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateFolderQueryWithOptions(abi_arg_in queryOptions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateFolderQueryWithOptions(impl::abi_arg_in queryOptions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateFolderQueryWithOptions(*reinterpret_cast(&queryOptions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateFolderQueryWithOptions(*reinterpret_cast(&queryOptions))); return S_OK; } catch (...) @@ -828,11 +887,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateItemQuery(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateItemQuery(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateItemQuery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateItemQuery()); return S_OK; } catch (...) @@ -842,11 +902,12 @@ struct produce : pro } } - HRESULT __stdcall abi_CreateItemQueryWithOptions(abi_arg_in queryOptions, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateItemQueryWithOptions(impl::abi_arg_in queryOptions, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateItemQueryWithOptions(*reinterpret_cast(&queryOptions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateItemQueryWithOptions(*reinterpret_cast(&queryOptions))); return S_OK; } catch (...) @@ -856,11 +917,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetFilesAsync(Windows::Storage::Search::CommonFileQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsync(Windows::Storage::Search::CommonFileQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync(query, startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync(query, startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -870,11 +932,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetFilesAsyncOverloadDefaultStartAndCount(Windows::Storage::Search::CommonFileQuery query, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsyncOverloadDefaultStartAndCount(Windows::Storage::Search::CommonFileQuery query, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync(query)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync(query)); return S_OK; } catch (...) @@ -884,11 +947,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetFoldersAsync(Windows::Storage::Search::CommonFolderQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsync(Windows::Storage::Search::CommonFolderQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync(query, startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync(query, startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -898,11 +962,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetFoldersAsyncOverloadDefaultStartAndCount(Windows::Storage::Search::CommonFolderQuery query, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsyncOverloadDefaultStartAndCount(Windows::Storage::Search::CommonFolderQuery query, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync(query)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync(query)); return S_OK; } catch (...) @@ -912,11 +977,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync(startIndex, maxItemsToRetrieve)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync(startIndex, maxItemsToRetrieve)); return S_OK; } catch (...) @@ -926,11 +992,12 @@ struct produce : pro } } - HRESULT __stdcall abi_AreQueryOptionsSupported(abi_arg_in queryOptions, bool * value) noexcept override + HRESULT __stdcall abi_AreQueryOptionsSupported(impl::abi_arg_in queryOptions, bool * value) noexcept override { try { - *value = detach(this->shim().AreQueryOptionsSupported(*reinterpret_cast(&queryOptions))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreQueryOptionsSupported(*reinterpret_cast(&queryOptions))); return S_OK; } catch (...) @@ -943,7 +1010,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsCommonFolderQuerySupported(query)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCommonFolderQuerySupported(query)); return S_OK; } catch (...) @@ -956,7 +1024,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsCommonFileQuerySupported(query)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCommonFileQuerySupported(query)); return S_OK; } catch (...) @@ -969,11 +1038,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetFoldersAsync(uint32_t startIndex, uint32_t maxNumberOfItems, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsync(uint32_t startIndex, uint32_t maxNumberOfItems, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync(startIndex, maxNumberOfItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync(startIndex, maxNumberOfItems)); return S_OK; } catch (...) @@ -983,11 +1053,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetFoldersAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync()); return S_OK; } catch (...) @@ -1001,11 +1072,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync(startIndex, maxNumberOfItems)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync(startIndex, maxNumberOfItems)); return S_OK; } catch (...) @@ -1015,11 +1087,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetItemsAsyncDefaultStartAndCount(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsyncDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync()); return S_OK; } catch (...) @@ -1033,11 +1106,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Folder(abi_arg_out value) noexcept override + HRESULT __stdcall get_Folder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Folder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Folder()); return S_OK; } catch (...) @@ -1047,11 +1121,12 @@ struct produce lastQueryTime, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateModifiedSinceQuery(impl::abi_arg_in lastQueryTime, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateModifiedSinceQuery(*reinterpret_cast(&lastQueryTime))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateModifiedSinceQuery(*reinterpret_cast(&lastQueryTime))); return S_OK; } catch (...) @@ -1065,11 +1140,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetItemCountAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetItemCountAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetItemCountAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemCountAsync()); return S_OK; } catch (...) @@ -1079,11 +1155,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Folder(abi_arg_out container) noexcept override + HRESULT __stdcall get_Folder(impl::abi_arg_out container) noexcept override { try { - *container = detach(this->shim().Folder()); + typename D::abi_guard guard(this->shim()); + *container = detach_abi(this->shim().Folder()); return S_OK; } catch (...) @@ -1093,11 +1170,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_ContentsChanged(abi_arg_in> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_ContentsChanged(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().ContentsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().ContentsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1110,6 +1188,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentsChanged(eventCookie); return S_OK; } @@ -1119,11 +1198,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_OptionsChanged(abi_arg_in> changedHandler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_OptionsChanged(impl::abi_arg_in> changedHandler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().OptionsChanged(*reinterpret_cast *>(&changedHandler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().OptionsChanged(*reinterpret_cast *>(&changedHandler))); return S_OK; } catch (...) @@ -1136,6 +1216,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().OptionsChanged(eventCookie); return S_OK; } @@ -1145,11 +1226,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_FindStartIndexAsync(abi_arg_in value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FindStartIndexAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FindStartIndexAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindStartIndexAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -1159,11 +1241,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetCurrentQueryOptions(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentQueryOptions(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentQueryOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentQueryOptions()); return S_OK; } catch (...) @@ -1173,10 +1256,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_ApplyNewQueryOptions(abi_arg_in newQueryOptions) noexcept override + HRESULT __stdcall abi_ApplyNewQueryOptions(impl::abi_arg_in newQueryOptions) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ApplyNewQueryOptions(*reinterpret_cast(&newQueryOptions)); return S_OK; } @@ -1190,11 +1274,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -1204,10 +1289,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -1217,11 +1303,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1231,11 +1318,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Value(impl::abi_arg_in value) noexcept override { try { - this->shim().Value(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Value(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -1249,580 +1337,580 @@ struct produce : produce_base Windows::Storage::Search::ContentIndexer impl_IContentIndexerStatics::GetIndexer(hstring_ref indexName) const +template Windows::Storage::Search::ContentIndexer impl_IContentIndexerStatics::GetIndexer(hstring_view indexName) const { Windows::Storage::Search::ContentIndexer index { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetIndexerWithName(get(indexName), put(index))); + check_hresult(WINRT_SHIM(IContentIndexerStatics)->abi_GetIndexerWithName(get_abi(indexName), put_abi(index))); return index; } template Windows::Storage::Search::ContentIndexer impl_IContentIndexerStatics::GetIndexer() const { Windows::Storage::Search::ContentIndexer index { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetIndexer(put(index))); + check_hresult(WINRT_SHIM(IContentIndexerStatics)->abi_GetIndexer(put_abi(index))); return index; } template hstring impl_IIndexableContent::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->get_Id(put_abi(value))); return value; } -template void impl_IIndexableContent::Id(hstring_ref value) const +template void impl_IIndexableContent::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->put_Id(get_abi(value))); } -template Windows::Foundation::Collections::IMap impl_IIndexableContent::Properties() const +template Windows::Foundation::Collections::IMap impl_IIndexableContent::Properties() const { - Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMap value; + check_hresult(WINRT_SHIM(IIndexableContent)->get_Properties(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_IIndexableContent::Stream() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_Stream(put(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->get_Stream(put_abi(value))); return value; } template void impl_IIndexableContent::Stream(const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_Stream(get(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->put_Stream(get_abi(value))); } template hstring impl_IIndexableContent::StreamContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StreamContentType(put(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->get_StreamContentType(put_abi(value))); return value; } -template void impl_IIndexableContent::StreamContentType(hstring_ref value) const +template void impl_IIndexableContent::StreamContentType(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_StreamContentType(get(value))); + check_hresult(WINRT_SHIM(IIndexableContent)->put_StreamContentType(get_abi(value))); } template Windows::Foundation::IAsyncAction impl_IContentIndexer::AddAsync(const Windows::Storage::Search::IIndexableContent & indexableContent) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AddAsync(get(indexableContent), put(operation))); + check_hresult(WINRT_SHIM(IContentIndexer)->abi_AddAsync(get_abi(indexableContent), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IContentIndexer::UpdateAsync(const Windows::Storage::Search::IIndexableContent & indexableContent) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAsync(get(indexableContent), put(operation))); + check_hresult(WINRT_SHIM(IContentIndexer)->abi_UpdateAsync(get_abi(indexableContent), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IContentIndexer::DeleteAsync(hstring_ref contentId) const +template Windows::Foundation::IAsyncAction impl_IContentIndexer::DeleteAsync(hstring_view contentId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(get(contentId), put(operation))); + check_hresult(WINRT_SHIM(IContentIndexer)->abi_DeleteAsync(get_abi(contentId), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IContentIndexer::DeleteMultipleAsync(const Windows::Foundation::Collections::IIterable & contentIds) const +template Windows::Foundation::IAsyncAction impl_IContentIndexer::DeleteMultipleAsync(iterable contentIds) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteMultipleAsync(get(contentIds), put(operation))); + check_hresult(WINRT_SHIM(IContentIndexer)->abi_DeleteMultipleAsync(get_abi(contentIds), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IContentIndexer::DeleteAllAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAllAsync(put(operation))); + check_hresult(WINRT_SHIM(IContentIndexer)->abi_DeleteAllAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_IContentIndexer::RetrievePropertiesAsync(hstring_ref contentId, const Windows::Foundation::Collections::IIterable & propertiesToRetrieve) const +template Windows::Foundation::IAsyncOperation> impl_IContentIndexer::RetrievePropertiesAsync(hstring_view contentId, iterable propertiesToRetrieve) const { - Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_RetrievePropertiesAsync(get(contentId), get(propertiesToRetrieve), put(operation))); + Windows::Foundation::IAsyncOperation> operation; + check_hresult(WINRT_SHIM(IContentIndexer)->abi_RetrievePropertiesAsync(get_abi(contentId), get_abi(propertiesToRetrieve), put_abi(operation))); return operation; } template uint64_t impl_IContentIndexer::Revision() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Revision(&value)); + check_hresult(WINRT_SHIM(IContentIndexer)->get_Revision(&value)); return value; } template hstring impl_IValueAndLanguage::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IValueAndLanguage)->get_Language(put_abi(value))); return value; } -template void impl_IValueAndLanguage::Language(hstring_ref value) const +template void impl_IValueAndLanguage::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(IValueAndLanguage)->put_Language(get_abi(value))); } -template Windows::IInspectable impl_IValueAndLanguage::Value() const +template Windows::Foundation::IInspectable impl_IValueAndLanguage::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IValueAndLanguage)->get_Value(put_abi(value))); return value; } -template void impl_IValueAndLanguage::Value(const Windows::IInspectable & value) const +template void impl_IValueAndLanguage::Value(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(get(value))); + check_hresult(WINRT_SHIM(IValueAndLanguage)->put_Value(get_abi(value))); } -template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_ref searchFilter, const Windows::Foundation::Collections::IIterable & propertiesToRetrieve, const Windows::Foundation::Collections::IIterable & sortOrder, hstring_ref searchFilterLanguage) const +template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_view searchFilter, iterable propertiesToRetrieve, iterable sortOrder, hstring_view searchFilterLanguage) const { Windows::Storage::Search::ContentIndexerQuery query { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateQueryWithSortOrderAndLanguage(get(searchFilter), get(propertiesToRetrieve), get(sortOrder), get(searchFilterLanguage), put(query))); + check_hresult(WINRT_SHIM(IContentIndexerQueryOperations)->abi_CreateQueryWithSortOrderAndLanguage(get_abi(searchFilter), get_abi(propertiesToRetrieve), get_abi(sortOrder), get_abi(searchFilterLanguage), put_abi(query))); return query; } -template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_ref searchFilter, const Windows::Foundation::Collections::IIterable & propertiesToRetrieve, const Windows::Foundation::Collections::IIterable & sortOrder) const +template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_view searchFilter, iterable propertiesToRetrieve, iterable sortOrder) const { Windows::Storage::Search::ContentIndexerQuery query { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateQueryWithSortOrder(get(searchFilter), get(propertiesToRetrieve), get(sortOrder), put(query))); + check_hresult(WINRT_SHIM(IContentIndexerQueryOperations)->abi_CreateQueryWithSortOrder(get_abi(searchFilter), get_abi(propertiesToRetrieve), get_abi(sortOrder), put_abi(query))); return query; } -template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_ref searchFilter, const Windows::Foundation::Collections::IIterable & propertiesToRetrieve) const +template Windows::Storage::Search::ContentIndexerQuery impl_IContentIndexerQueryOperations::CreateQuery(hstring_view searchFilter, iterable propertiesToRetrieve) const { Windows::Storage::Search::ContentIndexerQuery query { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateQuery(get(searchFilter), get(propertiesToRetrieve), put(query))); + check_hresult(WINRT_SHIM(IContentIndexerQueryOperations)->abi_CreateQuery(get_abi(searchFilter), get_abi(propertiesToRetrieve), put_abi(query))); return query; } template Windows::Foundation::IAsyncOperation impl_IContentIndexerQuery::GetCountAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetCountAsync(put(operation))); + check_hresult(WINRT_SHIM(IContentIndexerQuery)->abi_GetCountAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation>> impl_IContentIndexerQuery::GetPropertiesAsync() const +template Windows::Foundation::IAsyncOperation>> impl_IContentIndexerQuery::GetPropertiesAsync() const { - Windows::Foundation::IAsyncOperation>> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertiesAsync(put(operation))); + Windows::Foundation::IAsyncOperation>> operation; + check_hresult(WINRT_SHIM(IContentIndexerQuery)->abi_GetPropertiesAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation>> impl_IContentIndexerQuery::GetPropertiesAsync(uint32_t startIndex, uint32_t maxItems) const +template Windows::Foundation::IAsyncOperation>> impl_IContentIndexerQuery::GetPropertiesAsync(uint32_t startIndex, uint32_t maxItems) const { - Windows::Foundation::IAsyncOperation>> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertiesRangeAsync(startIndex, maxItems, put(operation))); + Windows::Foundation::IAsyncOperation>> operation; + check_hresult(WINRT_SHIM(IContentIndexerQuery)->abi_GetPropertiesRangeAsync(startIndex, maxItems, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IContentIndexerQuery::GetAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetAsync(put(operation))); + check_hresult(WINRT_SHIM(IContentIndexerQuery)->abi_GetAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IContentIndexerQuery::GetAsync(uint32_t startIndex, uint32_t maxItems) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetRangeAsync(startIndex, maxItems, put(operation))); + check_hresult(WINRT_SHIM(IContentIndexerQuery)->abi_GetRangeAsync(startIndex, maxItems, put_abi(operation))); return operation; } template Windows::Storage::StorageFolder impl_IContentIndexerQuery::QueryFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_QueryFolder(put(value))); + check_hresult(WINRT_SHIM(IContentIndexerQuery)->get_QueryFolder(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IQueryOptions::FileTypeFilter() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_FileTypeFilter(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_FileTypeFilter(put_abi(value))); return value; } template Windows::Storage::Search::FolderDepth impl_IQueryOptions::FolderDepth() const { Windows::Storage::Search::FolderDepth value {}; - check_hresult(static_cast(static_cast(*this))->get_FolderDepth(&value)); + check_hresult(WINRT_SHIM(IQueryOptions)->get_FolderDepth(&value)); return value; } template void impl_IQueryOptions::FolderDepth(Windows::Storage::Search::FolderDepth value) const { - check_hresult(static_cast(static_cast(*this))->put_FolderDepth(value)); + check_hresult(WINRT_SHIM(IQueryOptions)->put_FolderDepth(value)); } template hstring impl_IQueryOptions::ApplicationSearchFilter() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationSearchFilter(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_ApplicationSearchFilter(put_abi(value))); return value; } -template void impl_IQueryOptions::ApplicationSearchFilter(hstring_ref value) const +template void impl_IQueryOptions::ApplicationSearchFilter(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ApplicationSearchFilter(get(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->put_ApplicationSearchFilter(get_abi(value))); } template hstring impl_IQueryOptions::UserSearchFilter() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UserSearchFilter(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_UserSearchFilter(put_abi(value))); return value; } -template void impl_IQueryOptions::UserSearchFilter(hstring_ref value) const +template void impl_IQueryOptions::UserSearchFilter(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UserSearchFilter(get(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->put_UserSearchFilter(get_abi(value))); } template hstring impl_IQueryOptions::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_Language(put_abi(value))); return value; } -template void impl_IQueryOptions::Language(hstring_ref value) const +template void impl_IQueryOptions::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->put_Language(get_abi(value))); } template Windows::Storage::Search::IndexerOption impl_IQueryOptions::IndexerOption() const { Windows::Storage::Search::IndexerOption value {}; - check_hresult(static_cast(static_cast(*this))->get_IndexerOption(&value)); + check_hresult(WINRT_SHIM(IQueryOptions)->get_IndexerOption(&value)); return value; } template void impl_IQueryOptions::IndexerOption(Windows::Storage::Search::IndexerOption value) const { - check_hresult(static_cast(static_cast(*this))->put_IndexerOption(value)); + check_hresult(WINRT_SHIM(IQueryOptions)->put_IndexerOption(value)); } template Windows::Foundation::Collections::IVector impl_IQueryOptions::SortOrder() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SortOrder(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_SortOrder(put_abi(value))); return value; } template hstring impl_IQueryOptions::GroupPropertyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GroupPropertyName(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->get_GroupPropertyName(put_abi(value))); return value; } template Windows::Storage::Search::DateStackOption impl_IQueryOptions::DateStackOption() const { Windows::Storage::Search::DateStackOption value {}; - check_hresult(static_cast(static_cast(*this))->get_DateStackOption(&value)); + check_hresult(WINRT_SHIM(IQueryOptions)->get_DateStackOption(&value)); return value; } template hstring impl_IQueryOptions::SaveToString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_SaveToString(put(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->abi_SaveToString(put_abi(value))); return value; } -template void impl_IQueryOptions::LoadFromString(hstring_ref value) const +template void impl_IQueryOptions::LoadFromString(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadFromString(get(value))); + check_hresult(WINRT_SHIM(IQueryOptions)->abi_LoadFromString(get_abi(value))); } template void impl_IQueryOptions::SetThumbnailPrefetch(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, Windows::Storage::FileProperties::ThumbnailOptions options) const { - check_hresult(static_cast(static_cast(*this))->abi_SetThumbnailPrefetch(mode, requestedSize, options)); + check_hresult(WINRT_SHIM(IQueryOptions)->abi_SetThumbnailPrefetch(mode, requestedSize, options)); } -template void impl_IQueryOptions::SetPropertyPrefetch(Windows::Storage::FileProperties::PropertyPrefetchOptions options, const Windows::Foundation::Collections::IIterable & propertiesToRetrieve) const +template void impl_IQueryOptions::SetPropertyPrefetch(Windows::Storage::FileProperties::PropertyPrefetchOptions options, iterable propertiesToRetrieve) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPropertyPrefetch(options, get(propertiesToRetrieve))); + check_hresult(WINRT_SHIM(IQueryOptions)->abi_SetPropertyPrefetch(options, get_abi(propertiesToRetrieve))); } template Windows::Foundation::Collections::IVector impl_IQueryOptionsWithProviderFilter::StorageProviderIdFilter() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_StorageProviderIdFilter(put(value))); + check_hresult(WINRT_SHIM(IQueryOptionsWithProviderFilter)->get_StorageProviderIdFilter(put_abi(value))); return value; } -template Windows::Storage::Search::QueryOptions impl_IQueryOptionsFactory::CreateCommonFileQuery(Windows::Storage::Search::CommonFileQuery query, const Windows::Foundation::Collections::IIterable & fileTypeFilter) const +template Windows::Storage::Search::QueryOptions impl_IQueryOptionsFactory::CreateCommonFileQuery(Windows::Storage::Search::CommonFileQuery query, iterable fileTypeFilter) const { Windows::Storage::Search::QueryOptions queryOptions { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCommonFileQuery(query, get(fileTypeFilter), put(queryOptions))); + check_hresult(WINRT_SHIM(IQueryOptionsFactory)->abi_CreateCommonFileQuery(query, get_abi(fileTypeFilter), put_abi(queryOptions))); return queryOptions; } template Windows::Storage::Search::QueryOptions impl_IQueryOptionsFactory::CreateCommonFolderQuery(Windows::Storage::Search::CommonFolderQuery query) const { Windows::Storage::Search::QueryOptions queryOptions { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCommonFolderQuery(query, put(queryOptions))); + check_hresult(WINRT_SHIM(IQueryOptionsFactory)->abi_CreateCommonFolderQuery(query, put_abi(queryOptions))); return queryOptions; } template Windows::Foundation::IAsyncOperation impl_IStorageQueryResultBase::GetItemCountAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemCountAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->abi_GetItemCountAsync(put_abi(operation))); return operation; } template Windows::Storage::StorageFolder impl_IStorageQueryResultBase::Folder() const { Windows::Storage::StorageFolder container { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Folder(put(container))); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->get_Folder(put_abi(container))); return container; } -template event_token impl_IStorageQueryResultBase::ContentsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IStorageQueryResultBase::ContentsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ContentsChanged(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->add_ContentsChanged(get_abi(handler), &eventCookie)); return eventCookie; } -template event_revoker impl_IStorageQueryResultBase::ContentsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IStorageQueryResultBase::ContentsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::Search::IStorageQueryResultBase::remove_ContentsChanged, ContentsChanged(handler)); } template void impl_IStorageQueryResultBase::ContentsChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ContentsChanged(eventCookie)); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->remove_ContentsChanged(eventCookie)); } -template event_token impl_IStorageQueryResultBase::OptionsChanged(const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_token impl_IStorageQueryResultBase::OptionsChanged(const Windows::Foundation::TypedEventHandler & changedHandler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_OptionsChanged(get(changedHandler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->add_OptionsChanged(get_abi(changedHandler), &eventCookie)); return eventCookie; } -template event_revoker impl_IStorageQueryResultBase::OptionsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const +template event_revoker impl_IStorageQueryResultBase::OptionsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & changedHandler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::Search::IStorageQueryResultBase::remove_OptionsChanged, OptionsChanged(changedHandler)); } template void impl_IStorageQueryResultBase::OptionsChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_OptionsChanged(eventCookie)); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->remove_OptionsChanged(eventCookie)); } -template Windows::Foundation::IAsyncOperation impl_IStorageQueryResultBase::FindStartIndexAsync(const Windows::IInspectable & value) const +template Windows::Foundation::IAsyncOperation impl_IStorageQueryResultBase::FindStartIndexAsync(const Windows::Foundation::IInspectable & value) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FindStartIndexAsync(get(value), put(operation))); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->abi_FindStartIndexAsync(get_abi(value), put_abi(operation))); return operation; } template Windows::Storage::Search::QueryOptions impl_IStorageQueryResultBase::GetCurrentQueryOptions() const { Windows::Storage::Search::QueryOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentQueryOptions(put(value))); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->abi_GetCurrentQueryOptions(put_abi(value))); return value; } template void impl_IStorageQueryResultBase::ApplyNewQueryOptions(const Windows::Storage::Search::QueryOptions & newQueryOptions) const { - check_hresult(static_cast(static_cast(*this))->abi_ApplyNewQueryOptions(get(newQueryOptions))); + check_hresult(WINRT_SHIM(IStorageQueryResultBase)->abi_ApplyNewQueryOptions(get_abi(newQueryOptions))); } template Windows::Foundation::IAsyncOperation> impl_IStorageFileQueryResult::GetFilesAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsync(startIndex, maxNumberOfItems, put(operation))); + check_hresult(WINRT_SHIM(IStorageFileQueryResult)->abi_GetFilesAsync(startIndex, maxNumberOfItems, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFileQueryResult::GetFilesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageFileQueryResult)->abi_GetFilesAsyncDefaultStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::Collections::IMap> impl_IStorageFileQueryResult2::GetMatchingPropertiesWithRanges(const Windows::Storage::StorageFile & file) const { Windows::Foundation::Collections::IMap> result; - check_hresult(static_cast(static_cast(*this))->abi_GetMatchingPropertiesWithRanges(get(file), put(result))); + check_hresult(WINRT_SHIM(IStorageFileQueryResult2)->abi_GetMatchingPropertiesWithRanges(get_abi(file), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryResult::GetFoldersAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsync(startIndex, maxNumberOfItems, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryResult)->abi_GetFoldersAsync(startIndex, maxNumberOfItems, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryResult::GetFoldersAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryResult)->abi_GetFoldersAsyncDefaultStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageItemQueryResult::GetItemsAsync(uint32_t startIndex, uint32_t maxNumberOfItems) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsync(startIndex, maxNumberOfItems, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemQueryResult)->abi_GetItemsAsync(startIndex, maxNumberOfItems, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageItemQueryResult::GetItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsyncDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageItemQueryResult)->abi_GetItemsAsyncDefaultStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFolderQueryOperations::GetIndexedStateAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetIndexedStateAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetIndexedStateAsync(put_abi(operation))); return operation; } template Windows::Storage::Search::StorageFileQueryResult impl_IStorageFolderQueryOperations::CreateFileQuery() const { Windows::Storage::Search::StorageFileQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileQueryOverloadDefault(put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFileQueryOverloadDefault(put_abi(value))); return value; } template Windows::Storage::Search::StorageFileQueryResult impl_IStorageFolderQueryOperations::CreateFileQuery(Windows::Storage::Search::CommonFileQuery query) const { Windows::Storage::Search::StorageFileQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileQuery(query, put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFileQuery(query, put_abi(value))); return value; } template Windows::Storage::Search::StorageFileQueryResult impl_IStorageFolderQueryOperations::CreateFileQueryWithOptions(const Windows::Storage::Search::QueryOptions & queryOptions) const { Windows::Storage::Search::StorageFileQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileQueryWithOptions(get(queryOptions), put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFileQueryWithOptions(get_abi(queryOptions), put_abi(value))); return value; } template Windows::Storage::Search::StorageFolderQueryResult impl_IStorageFolderQueryOperations::CreateFolderQuery() const { Windows::Storage::Search::StorageFolderQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderQueryOverloadDefault(put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFolderQueryOverloadDefault(put_abi(value))); return value; } template Windows::Storage::Search::StorageFolderQueryResult impl_IStorageFolderQueryOperations::CreateFolderQuery(Windows::Storage::Search::CommonFolderQuery query) const { Windows::Storage::Search::StorageFolderQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderQuery(query, put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFolderQuery(query, put_abi(value))); return value; } template Windows::Storage::Search::StorageFolderQueryResult impl_IStorageFolderQueryOperations::CreateFolderQueryWithOptions(const Windows::Storage::Search::QueryOptions & queryOptions) const { Windows::Storage::Search::StorageFolderQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderQueryWithOptions(get(queryOptions), put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateFolderQueryWithOptions(get_abi(queryOptions), put_abi(value))); return value; } template Windows::Storage::Search::StorageItemQueryResult impl_IStorageFolderQueryOperations::CreateItemQuery() const { Windows::Storage::Search::StorageItemQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateItemQuery(put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateItemQuery(put_abi(value))); return value; } template Windows::Storage::Search::StorageItemQueryResult impl_IStorageFolderQueryOperations::CreateItemQueryWithOptions(const Windows::Storage::Search::QueryOptions & queryOptions) const { Windows::Storage::Search::StorageItemQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateItemQueryWithOptions(get(queryOptions), put(value))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_CreateItemQueryWithOptions(get_abi(queryOptions), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryOperations::GetFilesAsync(Windows::Storage::Search::CommonFileQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsync(query, startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetFilesAsync(query, startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryOperations::GetFilesAsync(Windows::Storage::Search::CommonFileQuery query) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsyncOverloadDefaultStartAndCount(query, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetFilesAsyncOverloadDefaultStartAndCount(query, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryOperations::GetFoldersAsync(Windows::Storage::Search::CommonFolderQuery query, uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsync(query, startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetFoldersAsync(query, startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryOperations::GetFoldersAsync(Windows::Storage::Search::CommonFolderQuery query) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsyncOverloadDefaultStartAndCount(query, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetFoldersAsyncOverloadDefaultStartAndCount(query, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolderQueryOperations::GetItemsAsync(uint32_t startIndex, uint32_t maxItemsToRetrieve) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsync(startIndex, maxItemsToRetrieve, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_GetItemsAsync(startIndex, maxItemsToRetrieve, put_abi(operation))); return operation; } template bool impl_IStorageFolderQueryOperations::AreQueryOptionsSupported(const Windows::Storage::Search::QueryOptions & queryOptions) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_AreQueryOptionsSupported(get(queryOptions), &value)); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_AreQueryOptionsSupported(get_abi(queryOptions), &value)); return value; } template bool impl_IStorageFolderQueryOperations::IsCommonFolderQuerySupported(Windows::Storage::Search::CommonFolderQuery query) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCommonFolderQuerySupported(query, &value)); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_IsCommonFolderQuerySupported(query, &value)); return value; } template bool impl_IStorageFolderQueryOperations::IsCommonFileQuerySupported(Windows::Storage::Search::CommonFileQuery query) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsCommonFileQuerySupported(query, &value)); + check_hresult(WINRT_SHIM(IStorageFolderQueryOperations)->abi_IsCommonFileQuerySupported(query, &value)); return value; } template Windows::Storage::StorageFolder impl_IStorageLibraryContentChangedTriggerDetails::Folder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Folder(put(value))); + check_hresult(WINRT_SHIM(IStorageLibraryContentChangedTriggerDetails)->get_Folder(put_abi(value))); return value; } template Windows::Storage::Search::StorageItemQueryResult impl_IStorageLibraryContentChangedTriggerDetails::CreateModifiedSinceQuery(const Windows::Foundation::DateTime & lastQueryTime) const { Windows::Storage::Search::StorageItemQueryResult result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateModifiedSinceQuery(get(lastQueryTime), put(result))); + check_hresult(WINRT_SHIM(IStorageLibraryContentChangedTriggerDetails)->abi_CreateModifiedSinceQuery(get_abi(lastQueryTime), put_abi(result))); return result; } -inline Windows::Storage::Search::ContentIndexer ContentIndexer::GetIndexer(hstring_ref indexName) +inline Windows::Storage::Search::ContentIndexer ContentIndexer::GetIndexer(hstring_view indexName) { return get_activation_factory().GetIndexer(indexName); } @@ -1840,7 +1928,7 @@ inline QueryOptions::QueryOptions() : QueryOptions(activate_instance()) {} -inline QueryOptions::QueryOptions(Windows::Storage::Search::CommonFileQuery query, const Windows::Foundation::Collections::IIterable & fileTypeFilter) : +inline QueryOptions::QueryOptions(Windows::Storage::Search::CommonFileQuery query, iterable fileTypeFilter) : QueryOptions(get_activation_factory().CreateCommonFileQuery(query, fileTypeFilter)) {} @@ -1855,3 +1943,239 @@ inline ValueAndLanguage::ValueAndLanguage() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IContentIndexer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IContentIndexerQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IContentIndexerQueryOperations & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IContentIndexerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IIndexableContent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IQueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IQueryOptionsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IQueryOptionsWithProviderFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageFileQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageFileQueryResult2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageFolderQueryOperations & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageFolderQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageItemQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageLibraryContentChangedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IStorageQueryResultBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IValueAndLanguage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::ContentIndexer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::ContentIndexerQuery & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::IndexableContent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::QueryOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::SortEntryVector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::StorageFileQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::StorageFolderQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::StorageItemQueryResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Search::ValueAndLanguage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.Streams.h b/10.0.14393.0/winrt/Windows.Storage.Streams.h index b6810e369..82b308476 100644 --- a/10.0.14393.0/winrt/Windows.Storage.Streams.h +++ b/10.0.14393.0/winrt/Windows.Storage.Streams.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -21,7 +24,8 @@ struct produce : produce_baseshim().Capacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Capacity()); return S_OK; } catch (...) @@ -34,7 +38,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -47,6 +52,7 @@ struct produce : produce_baseshim()); this->shim().Length(value); return S_OK; } @@ -60,11 +66,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(uint32_t capacity, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(uint32_t capacity, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(capacity)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(capacity)); return S_OK; } catch (...) @@ -78,11 +85,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCopyFromMemoryBuffer(abi_arg_in input, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateCopyFromMemoryBuffer(impl::abi_arg_in input, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateCopyFromMemoryBuffer(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateCopyFromMemoryBuffer(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -92,11 +100,12 @@ struct produce : produce_base input, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMemoryBufferOverIBuffer(impl::abi_arg_in input, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMemoryBufferOverIBuffer(*reinterpret_cast(&input))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMemoryBufferOverIBuffer(*reinterpret_cast(&input))); return S_OK; } catch (...) @@ -110,11 +119,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ContentType(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -132,7 +142,8 @@ struct produce : produce_baseshim().UnconsumedBufferLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnconsumedBufferLength()); return S_OK; } catch (...) @@ -145,7 +156,8 @@ struct produce : produce_baseshim().UnicodeEncoding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnicodeEncoding()); return S_OK; } catch (...) @@ -158,6 +170,7 @@ struct produce : produce_baseshim()); this->shim().UnicodeEncoding(value); return S_OK; } @@ -171,7 +184,8 @@ struct produce : produce_baseshim().ByteOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ByteOrder()); return S_OK; } catch (...) @@ -184,6 +198,7 @@ struct produce : produce_baseshim()); this->shim().ByteOrder(value); return S_OK; } @@ -197,7 +212,8 @@ struct produce : produce_baseshim().InputStreamOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputStreamOptions()); return S_OK; } catch (...) @@ -210,6 +226,7 @@ struct produce : produce_baseshim()); this->shim().InputStreamOptions(value); return S_OK; } @@ -223,7 +240,8 @@ struct produce : produce_baseshim().ReadByte()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadByte()); return S_OK; } catch (...) @@ -232,10 +250,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ReadBytes(uint32_t __valueSize, impl::abi_arg_out value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReadBytes(*value); return S_OK; } @@ -245,11 +264,12 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_ReadBuffer(uint32_t length, impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().ReadBuffer(length)); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().ReadBuffer(length)); return S_OK; } catch (...) @@ -263,7 +283,8 @@ struct produce : produce_baseshim().ReadBoolean()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadBoolean()); return S_OK; } catch (...) @@ -276,7 +297,8 @@ struct produce : produce_baseshim().ReadGuid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadGuid()); return S_OK; } catch (...) @@ -289,7 +311,8 @@ struct produce : produce_baseshim().ReadInt16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadInt16()); return S_OK; } catch (...) @@ -302,7 +325,8 @@ struct produce : produce_baseshim().ReadInt32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadInt32()); return S_OK; } catch (...) @@ -315,7 +339,8 @@ struct produce : produce_baseshim().ReadInt64()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadInt64()); return S_OK; } catch (...) @@ -328,7 +353,8 @@ struct produce : produce_baseshim().ReadUInt16()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadUInt16()); return S_OK; } catch (...) @@ -341,7 +367,8 @@ struct produce : produce_baseshim().ReadUInt32()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadUInt32()); return S_OK; } catch (...) @@ -354,7 +381,8 @@ struct produce : produce_baseshim().ReadUInt64()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadUInt64()); return S_OK; } catch (...) @@ -367,7 +395,8 @@ struct produce : produce_baseshim().ReadSingle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadSingle()); return S_OK; } catch (...) @@ -380,7 +409,8 @@ struct produce : produce_baseshim().ReadDouble()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadDouble()); return S_OK; } catch (...) @@ -389,11 +419,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ReadString(uint32_t codeUnitCount, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReadString(codeUnitCount)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadString(codeUnitCount)); return S_OK; } catch (...) @@ -403,11 +434,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ReadDateTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReadDateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadDateTime()); return S_OK; } catch (...) @@ -416,11 +448,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ReadTimeSpan(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReadTimeSpan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadTimeSpan()); return S_OK; } catch (...) @@ -429,11 +462,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_LoadAsync(uint32_t count, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LoadAsync(count)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LoadAsync(count)); return S_OK; } catch (...) @@ -443,11 +477,12 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_DetachBuffer(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().DetachBuffer()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().DetachBuffer()); return S_OK; } catch (...) @@ -457,11 +492,12 @@ struct produce : produce_base stream) noexcept override + HRESULT __stdcall abi_DetachStream(impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().DetachStream()); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().DetachStream()); return S_OK; } catch (...) @@ -475,11 +511,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateDataReader(abi_arg_in inputStream, abi_arg_out dataReader) noexcept override + HRESULT __stdcall abi_CreateDataReader(impl::abi_arg_in inputStream, impl::abi_arg_out dataReader) noexcept override { try { - *dataReader = detach(this->shim().CreateDataReader(*reinterpret_cast(&inputStream))); + typename D::abi_guard guard(this->shim()); + *dataReader = detach_abi(this->shim().CreateDataReader(*reinterpret_cast(&inputStream))); return S_OK; } catch (...) @@ -493,11 +530,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_FromBuffer(abi_arg_in buffer, abi_arg_out dataReader) noexcept override + HRESULT __stdcall abi_FromBuffer(impl::abi_arg_in buffer, impl::abi_arg_out dataReader) noexcept override { try { - *dataReader = detach(this->shim().FromBuffer(*reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *dataReader = detach_abi(this->shim().FromBuffer(*reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -515,7 +553,8 @@ struct produce : produce_baseshim().UnstoredBufferLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnstoredBufferLength()); return S_OK; } catch (...) @@ -528,7 +567,8 @@ struct produce : produce_baseshim().UnicodeEncoding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnicodeEncoding()); return S_OK; } catch (...) @@ -541,6 +581,7 @@ struct produce : produce_baseshim()); this->shim().UnicodeEncoding(value); return S_OK; } @@ -554,7 +595,8 @@ struct produce : produce_baseshim().ByteOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ByteOrder()); return S_OK; } catch (...) @@ -567,6 +609,7 @@ struct produce : produce_baseshim()); this->shim().ByteOrder(value); return S_OK; } @@ -580,6 +623,7 @@ struct produce : produce_baseshim()); this->shim().WriteByte(value); return S_OK; } @@ -589,11 +633,12 @@ struct produce : produce_base * value) noexcept override + HRESULT __stdcall abi_WriteBytes(uint32_t __valueSize, impl::abi_arg_in * value) noexcept override { try { - this->shim().WriteBytes(array_ref(value, value + __valueSize)); + typename D::abi_guard guard(this->shim()); + this->shim().WriteBytes(array_view(value, value + __valueSize)); return S_OK; } catch (...) @@ -602,10 +647,11 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_WriteBuffer(impl::abi_arg_in buffer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteBuffer(*reinterpret_cast(&buffer)); return S_OK; } @@ -615,10 +661,11 @@ struct produce : produce_base buffer, uint32_t start, uint32_t count) noexcept override + HRESULT __stdcall abi_WriteBufferRange(impl::abi_arg_in buffer, uint32_t start, uint32_t count) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteBuffer(*reinterpret_cast(&buffer), start, count); return S_OK; } @@ -632,6 +679,7 @@ struct produce : produce_baseshim()); this->shim().WriteBoolean(value); return S_OK; } @@ -645,6 +693,7 @@ struct produce : produce_baseshim()); this->shim().WriteGuid(value); return S_OK; } @@ -658,6 +707,7 @@ struct produce : produce_baseshim()); this->shim().WriteInt16(value); return S_OK; } @@ -671,6 +721,7 @@ struct produce : produce_baseshim()); this->shim().WriteInt32(value); return S_OK; } @@ -684,6 +735,7 @@ struct produce : produce_baseshim()); this->shim().WriteInt64(value); return S_OK; } @@ -697,6 +749,7 @@ struct produce : produce_baseshim()); this->shim().WriteUInt16(value); return S_OK; } @@ -710,6 +763,7 @@ struct produce : produce_baseshim()); this->shim().WriteUInt32(value); return S_OK; } @@ -723,6 +777,7 @@ struct produce : produce_baseshim()); this->shim().WriteUInt64(value); return S_OK; } @@ -736,6 +791,7 @@ struct produce : produce_baseshim()); this->shim().WriteSingle(value); return S_OK; } @@ -749,6 +805,7 @@ struct produce : produce_baseshim()); this->shim().WriteDouble(value); return S_OK; } @@ -758,10 +815,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_WriteDateTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteDateTime(*reinterpret_cast(&value)); return S_OK; } @@ -771,10 +829,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_WriteTimeSpan(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WriteTimeSpan(*reinterpret_cast(&value)); return S_OK; } @@ -784,11 +843,12 @@ struct produce : produce_base value, uint32_t * codeUnitCount) noexcept override + HRESULT __stdcall abi_WriteString(impl::abi_arg_in value, uint32_t * codeUnitCount) noexcept override { try { - *codeUnitCount = detach(this->shim().WriteString(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *codeUnitCount = detach_abi(this->shim().WriteString(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -797,11 +857,12 @@ struct produce : produce_base value, uint32_t * codeUnitCount) noexcept override + HRESULT __stdcall abi_MeasureString(impl::abi_arg_in value, uint32_t * codeUnitCount) noexcept override { try { - *codeUnitCount = detach(this->shim().MeasureString(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *codeUnitCount = detach_abi(this->shim().MeasureString(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -810,11 +871,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_StoreAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().StoreAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StoreAsync()); return S_OK; } catch (...) @@ -824,11 +886,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_FlushAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FlushAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FlushAsync()); return S_OK; } catch (...) @@ -838,11 +901,12 @@ struct produce : produce_base buffer) noexcept override + HRESULT __stdcall abi_DetachBuffer(impl::abi_arg_out buffer) noexcept override { try { - *buffer = detach(this->shim().DetachBuffer()); + typename D::abi_guard guard(this->shim()); + *buffer = detach_abi(this->shim().DetachBuffer()); return S_OK; } catch (...) @@ -852,11 +916,12 @@ struct produce : produce_base outputStream) noexcept override + HRESULT __stdcall abi_DetachStream(impl::abi_arg_out outputStream) noexcept override { try { - *outputStream = detach(this->shim().DetachStream()); + typename D::abi_guard guard(this->shim()); + *outputStream = detach_abi(this->shim().DetachStream()); return S_OK; } catch (...) @@ -870,11 +935,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateDataWriter(abi_arg_in outputStream, abi_arg_out dataWriter) noexcept override + HRESULT __stdcall abi_CreateDataWriter(impl::abi_arg_in outputStream, impl::abi_arg_out dataWriter) noexcept override { try { - *dataWriter = detach(this->shim().CreateDataWriter(*reinterpret_cast(&outputStream))); + typename D::abi_guard guard(this->shim()); + *dataWriter = detach_abi(this->shim().CreateDataWriter(*reinterpret_cast(&outputStream))); return S_OK; } catch (...) @@ -888,11 +954,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_ReadAsync(abi_arg_in buffer, uint32_t count, Windows::Storage::Streams::InputStreamOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReadAsync(impl::abi_arg_in buffer, uint32_t count, Windows::Storage::Streams::InputStreamOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReadAsync(*reinterpret_cast(&buffer), count, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReadAsync(*reinterpret_cast(&buffer), count, options)); return S_OK; } catch (...) @@ -906,11 +973,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OpenSequentialReadAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenSequentialReadAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenSequentialReadAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenSequentialReadAsync()); return S_OK; } catch (...) @@ -924,11 +992,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_WriteAsync(abi_arg_in buffer, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_WriteAsync(impl::abi_arg_in buffer, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().WriteAsync(*reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteAsync(*reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -938,11 +1007,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_FlushAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FlushAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FlushAsync()); return S_OK; } catch (...) @@ -960,7 +1030,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -973,6 +1044,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Size(value); return S_OK; } @@ -982,11 +1054,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetInputStreamAt(uint64_t position, abi_arg_out stream) noexcept override + HRESULT __stdcall abi_GetInputStreamAt(uint64_t position, impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().GetInputStreamAt(position)); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().GetInputStreamAt(position)); return S_OK; } catch (...) @@ -996,11 +1069,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetOutputStreamAt(uint64_t position, abi_arg_out stream) noexcept override + HRESULT __stdcall abi_GetOutputStreamAt(uint64_t position, impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().GetOutputStreamAt(position)); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().GetOutputStreamAt(position)); return S_OK; } catch (...) @@ -1014,7 +1088,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1027,6 +1102,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Seek(position); return S_OK; } @@ -1036,11 +1112,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CloneStream(abi_arg_out stream) noexcept override + HRESULT __stdcall abi_CloneStream(impl::abi_arg_out stream) noexcept override { try { - *stream = detach(this->shim().CloneStream()); + typename D::abi_guard guard(this->shim()); + *stream = detach_abi(this->shim().CloneStream()); return S_OK; } catch (...) @@ -1054,7 +1131,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().CanRead()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRead()); return S_OK; } catch (...) @@ -1067,7 +1145,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().CanWrite()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanWrite()); return S_OK; } catch (...) @@ -1080,11 +1159,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_OpenReadAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenReadAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenReadAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenReadAsync()); return S_OK; } catch (...) @@ -1098,11 +1178,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromFile(abi_arg_in file, abi_arg_out streamReference) noexcept override + HRESULT __stdcall abi_CreateFromFile(impl::abi_arg_in file, impl::abi_arg_out streamReference) noexcept override { try { - *streamReference = detach(this->shim().CreateFromFile(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *streamReference = detach_abi(this->shim().CreateFromFile(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -1112,11 +1193,12 @@ struct produce uri, abi_arg_out streamReference) noexcept override + HRESULT __stdcall abi_CreateFromUri(impl::abi_arg_in uri, impl::abi_arg_out streamReference) noexcept override { try { - *streamReference = detach(this->shim().CreateFromUri(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *streamReference = detach_abi(this->shim().CreateFromUri(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1126,11 +1208,12 @@ struct produce stream, abi_arg_out streamReference) noexcept override + HRESULT __stdcall abi_CreateFromStream(impl::abi_arg_in stream, impl::abi_arg_out streamReference) noexcept override { try { - *streamReference = detach(this->shim().CreateFromStream(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *streamReference = detach_abi(this->shim().CreateFromStream(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -1144,11 +1227,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CopyAsync(abi_arg_in source, abi_arg_in destination, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyAsync(impl::abi_arg_in source, impl::abi_arg_in destination, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination))); return S_OK; } catch (...) @@ -1158,11 +1242,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CopySizeAsync(abi_arg_in source, abi_arg_in destination, uint64_t bytesToCopy, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopySizeAsync(impl::abi_arg_in source, impl::abi_arg_in destination, uint64_t bytesToCopy, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), bytesToCopy)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination), bytesToCopy)); return S_OK; } catch (...) @@ -1172,11 +1257,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CopyAndCloseAsync(abi_arg_in source, abi_arg_in destination, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyAndCloseAsync(impl::abi_arg_in source, impl::abi_arg_in destination, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAndCloseAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAndCloseAsync(*reinterpret_cast(&source), *reinterpret_cast(&destination))); return S_OK; } catch (...) @@ -1198,531 +1284,531 @@ namespace Windows::Storage::Streams { template uint32_t impl_IDataReader::UnconsumedBufferLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UnconsumedBufferLength(&value)); + check_hresult(WINRT_SHIM(IDataReader)->get_UnconsumedBufferLength(&value)); return value; } template Windows::Storage::Streams::UnicodeEncoding impl_IDataReader::UnicodeEncoding() const { Windows::Storage::Streams::UnicodeEncoding value {}; - check_hresult(static_cast(static_cast(*this))->get_UnicodeEncoding(&value)); + check_hresult(WINRT_SHIM(IDataReader)->get_UnicodeEncoding(&value)); return value; } template void impl_IDataReader::UnicodeEncoding(Windows::Storage::Streams::UnicodeEncoding value) const { - check_hresult(static_cast(static_cast(*this))->put_UnicodeEncoding(value)); + check_hresult(WINRT_SHIM(IDataReader)->put_UnicodeEncoding(value)); } template Windows::Storage::Streams::ByteOrder impl_IDataReader::ByteOrder() const { Windows::Storage::Streams::ByteOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_ByteOrder(&value)); + check_hresult(WINRT_SHIM(IDataReader)->get_ByteOrder(&value)); return value; } template void impl_IDataReader::ByteOrder(Windows::Storage::Streams::ByteOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_ByteOrder(value)); + check_hresult(WINRT_SHIM(IDataReader)->put_ByteOrder(value)); } template Windows::Storage::Streams::InputStreamOptions impl_IDataReader::InputStreamOptions() const { Windows::Storage::Streams::InputStreamOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_InputStreamOptions(&value)); + check_hresult(WINRT_SHIM(IDataReader)->get_InputStreamOptions(&value)); return value; } template void impl_IDataReader::InputStreamOptions(Windows::Storage::Streams::InputStreamOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_InputStreamOptions(value)); + check_hresult(WINRT_SHIM(IDataReader)->put_InputStreamOptions(value)); } template uint8_t impl_IDataReader::ReadByte() const { uint8_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadByte(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadByte(&value)); return value; } -template void impl_IDataReader::ReadBytes(array_ref value) const +template void impl_IDataReader::ReadBytes(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_ReadBytes(value.size(), get(value))); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadBytes(value.size(), get_abi(value))); } template Windows::Storage::Streams::IBuffer impl_IDataReader::ReadBuffer(uint32_t length) const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_ReadBuffer(length, put(buffer))); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadBuffer(length, put_abi(buffer))); return buffer; } template bool impl_IDataReader::ReadBoolean() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadBoolean(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadBoolean(&value)); return value; } template GUID impl_IDataReader::ReadGuid() const { GUID value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadGuid(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadGuid(&value)); return value; } template int16_t impl_IDataReader::ReadInt16() const { int16_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadInt16(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadInt16(&value)); return value; } template int32_t impl_IDataReader::ReadInt32() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadInt32(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadInt32(&value)); return value; } template int64_t impl_IDataReader::ReadInt64() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadInt64(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadInt64(&value)); return value; } template uint16_t impl_IDataReader::ReadUInt16() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadUInt16(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadUInt16(&value)); return value; } template uint32_t impl_IDataReader::ReadUInt32() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadUInt32(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadUInt32(&value)); return value; } template uint64_t impl_IDataReader::ReadUInt64() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadUInt64(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadUInt64(&value)); return value; } template float impl_IDataReader::ReadSingle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadSingle(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadSingle(&value)); return value; } template double impl_IDataReader::ReadDouble() const { double value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadDouble(&value)); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadDouble(&value)); return value; } template hstring impl_IDataReader::ReadString(uint32_t codeUnitCount) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_ReadString(codeUnitCount, put(value))); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadString(codeUnitCount, put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IDataReader::ReadDateTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadDateTime(put(value))); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadDateTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IDataReader::ReadTimeSpan() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->abi_ReadTimeSpan(put(value))); + check_hresult(WINRT_SHIM(IDataReader)->abi_ReadTimeSpan(put_abi(value))); return value; } template Windows::Storage::Streams::DataReaderLoadOperation impl_IDataReader::LoadAsync(uint32_t count) const { Windows::Storage::Streams::DataReaderLoadOperation operation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_LoadAsync(count, put(operation))); + check_hresult(WINRT_SHIM(IDataReader)->abi_LoadAsync(count, put_abi(operation))); return operation; } template Windows::Storage::Streams::IBuffer impl_IDataReader::DetachBuffer() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_DetachBuffer(put(buffer))); + check_hresult(WINRT_SHIM(IDataReader)->abi_DetachBuffer(put_abi(buffer))); return buffer; } template Windows::Storage::Streams::IInputStream impl_IDataReader::DetachStream() const { Windows::Storage::Streams::IInputStream stream; - check_hresult(static_cast(static_cast(*this))->abi_DetachStream(put(stream))); + check_hresult(WINRT_SHIM(IDataReader)->abi_DetachStream(put_abi(stream))); return stream; } template Windows::Storage::Streams::DataReader impl_IDataReaderFactory::CreateDataReader(const Windows::Storage::Streams::IInputStream & inputStream) const { Windows::Storage::Streams::DataReader dataReader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDataReader(get(inputStream), put(dataReader))); + check_hresult(WINRT_SHIM(IDataReaderFactory)->abi_CreateDataReader(get_abi(inputStream), put_abi(dataReader))); return dataReader; } template Windows::Storage::Streams::DataReader impl_IDataReaderStatics::FromBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Storage::Streams::DataReader dataReader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromBuffer(get(buffer), put(dataReader))); + check_hresult(WINRT_SHIM(IDataReaderStatics)->abi_FromBuffer(get_abi(buffer), put_abi(dataReader))); return dataReader; } template uint32_t impl_IDataWriter::UnstoredBufferLength() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UnstoredBufferLength(&value)); + check_hresult(WINRT_SHIM(IDataWriter)->get_UnstoredBufferLength(&value)); return value; } template Windows::Storage::Streams::UnicodeEncoding impl_IDataWriter::UnicodeEncoding() const { Windows::Storage::Streams::UnicodeEncoding value {}; - check_hresult(static_cast(static_cast(*this))->get_UnicodeEncoding(&value)); + check_hresult(WINRT_SHIM(IDataWriter)->get_UnicodeEncoding(&value)); return value; } template void impl_IDataWriter::UnicodeEncoding(Windows::Storage::Streams::UnicodeEncoding value) const { - check_hresult(static_cast(static_cast(*this))->put_UnicodeEncoding(value)); + check_hresult(WINRT_SHIM(IDataWriter)->put_UnicodeEncoding(value)); } template Windows::Storage::Streams::ByteOrder impl_IDataWriter::ByteOrder() const { Windows::Storage::Streams::ByteOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_ByteOrder(&value)); + check_hresult(WINRT_SHIM(IDataWriter)->get_ByteOrder(&value)); return value; } template void impl_IDataWriter::ByteOrder(Windows::Storage::Streams::ByteOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_ByteOrder(value)); + check_hresult(WINRT_SHIM(IDataWriter)->put_ByteOrder(value)); } template void impl_IDataWriter::WriteByte(uint8_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteByte(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteByte(value)); } -template void impl_IDataWriter::WriteBytes(array_ref value) const +template void impl_IDataWriter::WriteBytes(array_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteBytes(value.size(), get(value))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteBytes(value.size(), get_abi(value))); } template void impl_IDataWriter::WriteBuffer(const Windows::Storage::Streams::IBuffer & buffer) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteBuffer(get(buffer))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteBuffer(get_abi(buffer))); } template void impl_IDataWriter::WriteBuffer(const Windows::Storage::Streams::IBuffer & buffer, uint32_t start, uint32_t count) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteBufferRange(get(buffer), start, count)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteBufferRange(get_abi(buffer), start, count)); } template void impl_IDataWriter::WriteBoolean(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteBoolean(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteBoolean(value)); } template void impl_IDataWriter::WriteGuid(GUID value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteGuid(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteGuid(value)); } template void impl_IDataWriter::WriteInt16(int16_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteInt16(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteInt16(value)); } template void impl_IDataWriter::WriteInt32(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteInt32(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteInt32(value)); } template void impl_IDataWriter::WriteInt64(int64_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteInt64(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteInt64(value)); } template void impl_IDataWriter::WriteUInt16(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteUInt16(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteUInt16(value)); } template void impl_IDataWriter::WriteUInt32(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteUInt32(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteUInt32(value)); } template void impl_IDataWriter::WriteUInt64(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteUInt64(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteUInt64(value)); } template void impl_IDataWriter::WriteSingle(float value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteSingle(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteSingle(value)); } template void impl_IDataWriter::WriteDouble(double value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteDouble(value)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteDouble(value)); } template void impl_IDataWriter::WriteDateTime(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteDateTime(get(value))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteDateTime(get_abi(value))); } template void impl_IDataWriter::WriteTimeSpan(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->abi_WriteTimeSpan(get(value))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteTimeSpan(get_abi(value))); } -template uint32_t impl_IDataWriter::WriteString(hstring_ref value) const +template uint32_t impl_IDataWriter::WriteString(hstring_view value) const { uint32_t codeUnitCount {}; - check_hresult(static_cast(static_cast(*this))->abi_WriteString(get(value), &codeUnitCount)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_WriteString(get_abi(value), &codeUnitCount)); return codeUnitCount; } -template uint32_t impl_IDataWriter::MeasureString(hstring_ref value) const +template uint32_t impl_IDataWriter::MeasureString(hstring_view value) const { uint32_t codeUnitCount {}; - check_hresult(static_cast(static_cast(*this))->abi_MeasureString(get(value), &codeUnitCount)); + check_hresult(WINRT_SHIM(IDataWriter)->abi_MeasureString(get_abi(value), &codeUnitCount)); return codeUnitCount; } template Windows::Storage::Streams::DataWriterStoreOperation impl_IDataWriter::StoreAsync() const { Windows::Storage::Streams::DataWriterStoreOperation operation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_StoreAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_StoreAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IDataWriter::FlushAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FlushAsync(put(operation))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_FlushAsync(put_abi(operation))); return operation; } template Windows::Storage::Streams::IBuffer impl_IDataWriter::DetachBuffer() const { Windows::Storage::Streams::IBuffer buffer; - check_hresult(static_cast(static_cast(*this))->abi_DetachBuffer(put(buffer))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_DetachBuffer(put_abi(buffer))); return buffer; } template Windows::Storage::Streams::IOutputStream impl_IDataWriter::DetachStream() const { Windows::Storage::Streams::IOutputStream outputStream; - check_hresult(static_cast(static_cast(*this))->abi_DetachStream(put(outputStream))); + check_hresult(WINRT_SHIM(IDataWriter)->abi_DetachStream(put_abi(outputStream))); return outputStream; } template Windows::Storage::Streams::DataWriter impl_IDataWriterFactory::CreateDataWriter(const Windows::Storage::Streams::IOutputStream & outputStream) const { Windows::Storage::Streams::DataWriter dataWriter { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDataWriter(get(outputStream), put(dataWriter))); + check_hresult(WINRT_SHIM(IDataWriterFactory)->abi_CreateDataWriter(get_abi(outputStream), put_abi(dataWriter))); return dataWriter; } template Windows::Foundation::IAsyncOperation impl_IRandomAccessStreamReference::OpenReadAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenReadAsync(put(operation))); + check_hresult(WINRT_SHIM(IRandomAccessStreamReference)->abi_OpenReadAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IRandomAccessStreamStatics::CopyAsync(const Windows::Storage::Streams::IInputStream & source, const Windows::Storage::Streams::IOutputStream & destination) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyAsync(get(source), get(destination), put(operation))); + check_hresult(WINRT_SHIM(IRandomAccessStreamStatics)->abi_CopyAsync(get_abi(source), get_abi(destination), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IRandomAccessStreamStatics::CopyAsync(const Windows::Storage::Streams::IInputStream & source, const Windows::Storage::Streams::IOutputStream & destination, uint64_t bytesToCopy) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_CopySizeAsync(get(source), get(destination), bytesToCopy, put(operation))); + check_hresult(WINRT_SHIM(IRandomAccessStreamStatics)->abi_CopySizeAsync(get_abi(source), get_abi(destination), bytesToCopy, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IRandomAccessStreamStatics::CopyAndCloseAsync(const Windows::Storage::Streams::IInputStream & source, const Windows::Storage::Streams::IOutputStream & destination) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyAndCloseAsync(get(source), get(destination), put(operation))); + check_hresult(WINRT_SHIM(IRandomAccessStreamStatics)->abi_CopyAndCloseAsync(get_abi(source), get_abi(destination), put_abi(operation))); return operation; } template Windows::Storage::Streams::Buffer impl_IBufferFactory::Create(uint32_t capacity) const { Windows::Storage::Streams::Buffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(capacity, put(value))); + check_hresult(WINRT_SHIM(IBufferFactory)->abi_Create(capacity, put_abi(value))); return value; } template uint32_t impl_IBuffer::Capacity() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Capacity(&value)); + check_hresult(WINRT_SHIM(IBuffer)->get_Capacity(&value)); return value; } template uint32_t impl_IBuffer::Length() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IBuffer)->get_Length(&value)); return value; } template void impl_IBuffer::Length(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Length(value)); + check_hresult(WINRT_SHIM(IBuffer)->put_Length(value)); } template Windows::Storage::Streams::Buffer impl_IBufferStatics::CreateCopyFromMemoryBuffer(const Windows::Foundation::IMemoryBuffer & input) const { Windows::Storage::Streams::Buffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCopyFromMemoryBuffer(get(input), put(value))); + check_hresult(WINRT_SHIM(IBufferStatics)->abi_CreateCopyFromMemoryBuffer(get_abi(input), put_abi(value))); return value; } template Windows::Foundation::MemoryBuffer impl_IBufferStatics::CreateMemoryBufferOverIBuffer(const Windows::Storage::Streams::IBuffer & input) const { Windows::Foundation::MemoryBuffer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMemoryBufferOverIBuffer(get(input), put(value))); + check_hresult(WINRT_SHIM(IBufferStatics)->abi_CreateMemoryBufferOverIBuffer(get_abi(input), put_abi(value))); return value; } template hstring impl_IContentTypeProvider::ContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentType(put(value))); + check_hresult(WINRT_SHIM(IContentTypeProvider)->get_ContentType(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IInputStreamReference::OpenSequentialReadAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenSequentialReadAsync(put(operation))); + check_hresult(WINRT_SHIM(IInputStreamReference)->abi_OpenSequentialReadAsync(put_abi(operation))); return operation; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IRandomAccessStreamReferenceStatics::CreateFromFile(const Windows::Storage::IStorageFile & file) const { Windows::Storage::Streams::RandomAccessStreamReference streamReference { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromFile(get(file), put(streamReference))); + check_hresult(WINRT_SHIM(IRandomAccessStreamReferenceStatics)->abi_CreateFromFile(get_abi(file), put_abi(streamReference))); return streamReference; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IRandomAccessStreamReferenceStatics::CreateFromUri(const Windows::Foundation::Uri & uri) const { Windows::Storage::Streams::RandomAccessStreamReference streamReference { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromUri(get(uri), put(streamReference))); + check_hresult(WINRT_SHIM(IRandomAccessStreamReferenceStatics)->abi_CreateFromUri(get_abi(uri), put_abi(streamReference))); return streamReference; } template Windows::Storage::Streams::RandomAccessStreamReference impl_IRandomAccessStreamReferenceStatics::CreateFromStream(const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Storage::Streams::RandomAccessStreamReference streamReference { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromStream(get(stream), put(streamReference))); + check_hresult(WINRT_SHIM(IRandomAccessStreamReferenceStatics)->abi_CreateFromStream(get_abi(stream), put_abi(streamReference))); return streamReference; } template Windows::Foundation::IAsyncOperationWithProgress impl_IInputStream::ReadAsync(const Windows::Storage::Streams::IBuffer & buffer, uint32_t count, Windows::Storage::Streams::InputStreamOptions options) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_ReadAsync(get(buffer), count, options, put(operation))); + check_hresult(WINRT_SHIM(IInputStream)->abi_ReadAsync(get_abi(buffer), count, options, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperationWithProgress impl_IOutputStream::WriteAsync(const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::IAsyncOperationWithProgress operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteAsync(get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IOutputStream)->abi_WriteAsync(get_abi(buffer), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IOutputStream::FlushAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FlushAsync(put(operation))); + check_hresult(WINRT_SHIM(IOutputStream)->abi_FlushAsync(put_abi(operation))); return operation; } template uint64_t impl_IRandomAccessStream::Size() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->get_Size(&value)); return value; } template void impl_IRandomAccessStream::Size(uint64_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Size(value)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->put_Size(value)); } template Windows::Storage::Streams::IInputStream impl_IRandomAccessStream::GetInputStreamAt(uint64_t position) const { Windows::Storage::Streams::IInputStream stream; - check_hresult(static_cast(static_cast(*this))->abi_GetInputStreamAt(position, put(stream))); + check_hresult(WINRT_SHIM(IRandomAccessStream)->abi_GetInputStreamAt(position, put_abi(stream))); return stream; } template Windows::Storage::Streams::IOutputStream impl_IRandomAccessStream::GetOutputStreamAt(uint64_t position) const { Windows::Storage::Streams::IOutputStream stream; - check_hresult(static_cast(static_cast(*this))->abi_GetOutputStreamAt(position, put(stream))); + check_hresult(WINRT_SHIM(IRandomAccessStream)->abi_GetOutputStreamAt(position, put_abi(stream))); return stream; } template uint64_t impl_IRandomAccessStream::Position() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(&value)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->get_Position(&value)); return value; } template void impl_IRandomAccessStream::Seek(uint64_t position) const { - check_hresult(static_cast(static_cast(*this))->abi_Seek(position)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->abi_Seek(position)); } template Windows::Storage::Streams::IRandomAccessStream impl_IRandomAccessStream::CloneStream() const { Windows::Storage::Streams::IRandomAccessStream stream; - check_hresult(static_cast(static_cast(*this))->abi_CloneStream(put(stream))); + check_hresult(WINRT_SHIM(IRandomAccessStream)->abi_CloneStream(put_abi(stream))); return stream; } template bool impl_IRandomAccessStream::CanRead() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanRead(&value)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->get_CanRead(&value)); return value; } template bool impl_IRandomAccessStream::CanWrite() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanWrite(&value)); + check_hresult(WINRT_SHIM(IRandomAccessStream)->get_CanWrite(&value)); return value; } @@ -1794,3 +1880,275 @@ inline Windows::Storage::Streams::RandomAccessStreamReference RandomAccessStream } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IBuffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IBufferFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IBufferStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IContentTypeProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IDataReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IDataReaderFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IDataReaderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IDataWriter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IDataWriterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IInputStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IInputStreamReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IOutputStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IRandomAccessStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IRandomAccessStreamReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IRandomAccessStreamReferenceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IRandomAccessStreamStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::IRandomAccessStreamWithContentType & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::Buffer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::DataReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::DataReaderLoadOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::DataWriter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::DataWriterStoreOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::FileInputStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::FileOutputStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::FileRandomAccessStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::InMemoryRandomAccessStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::InputStreamOverStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::OutputStreamOverStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::RandomAccessStreamOverStream & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::Streams::RandomAccessStreamReference & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.Storage.h b/10.0.14393.0/winrt/Windows.Storage.h index 22ca57e6e..761f7384c 100644 --- a/10.0.14393.0/winrt/Windows.Storage.h +++ b/10.0.14393.0/winrt/Windows.Storage.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -32,7 +35,7 @@ template ApplicationDataSetVersionHandler::ApplicationD inline void ApplicationDataSetVersionHandler::operator()(const Windows::Storage::SetVersionRequest & setVersionRequest) const { - check_hresult((*this)->abi_Invoke(get(setVersionRequest))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(setVersionRequest))); } template StreamedFileDataRequestedHandler::StreamedFileDataRequestedHandler(L lambda) : @@ -49,7 +52,7 @@ template StreamedFileDataRequestedHandler::StreamedFile inline void StreamedFileDataRequestedHandler::operator()(const Windows::Storage::StreamedFileDataRequest & stream) const { - check_hresult((*this)->abi_Invoke(get(stream))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(stream))); } } @@ -63,7 +66,8 @@ struct produce : produce_baseshim().Version()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Version()); return S_OK; } catch (...) @@ -72,11 +76,12 @@ struct produce : produce_base handler, abi_arg_out setVersionOperation) noexcept override + HRESULT __stdcall abi_SetVersionAsync(uint32_t desiredVersion, impl::abi_arg_in handler, impl::abi_arg_out setVersionOperation) noexcept override { try { - *setVersionOperation = detach(this->shim().SetVersionAsync(desiredVersion, *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *setVersionOperation = detach_abi(this->shim().SetVersionAsync(desiredVersion, *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -86,11 +91,12 @@ struct produce : produce_base clearOperation) noexcept override + HRESULT __stdcall abi_ClearAllAsync(impl::abi_arg_out clearOperation) noexcept override { try { - *clearOperation = detach(this->shim().ClearAsync()); + typename D::abi_guard guard(this->shim()); + *clearOperation = detach_abi(this->shim().ClearAsync()); return S_OK; } catch (...) @@ -100,11 +106,12 @@ struct produce : produce_base clearOperation) noexcept override + HRESULT __stdcall abi_ClearAsync(Windows::Storage::ApplicationDataLocality locality, impl::abi_arg_out clearOperation) noexcept override { try { - *clearOperation = detach(this->shim().ClearAsync(locality)); + typename D::abi_guard guard(this->shim()); + *clearOperation = detach_abi(this->shim().ClearAsync(locality)); return S_OK; } catch (...) @@ -114,11 +121,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LocalSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalSettings()); return S_OK; } catch (...) @@ -128,11 +136,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RoamingSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoamingSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingSettings()); return S_OK; } catch (...) @@ -142,11 +151,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LocalFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalFolder()); return S_OK; } catch (...) @@ -156,11 +166,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RoamingFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoamingFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingFolder()); return S_OK; } catch (...) @@ -170,11 +181,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemporaryFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemporaryFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemporaryFolder()); return S_OK; } catch (...) @@ -184,11 +196,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_DataChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().DataChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DataChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -201,6 +214,7 @@ struct produce : produce_baseshim()); this->shim().DataChanged(token); return S_OK; } @@ -214,6 +228,7 @@ struct produce : produce_baseshim()); this->shim().SignalDataChanged(); return S_OK; } @@ -227,7 +242,8 @@ struct produce : produce_baseshim().RoamingStorageQuota()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingStorageQuota()); return S_OK; } catch (...) @@ -240,11 +256,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LocalCacheFolder(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalCacheFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalCacheFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalCacheFolder()); return S_OK; } catch (...) @@ -258,11 +275,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetPublisherCacheFolder(abi_arg_in folderName, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetPublisherCacheFolder(impl::abi_arg_in folderName, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetPublisherCacheFolder(*reinterpret_cast(&folderName))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPublisherCacheFolder(*reinterpret_cast(&folderName))); return S_OK; } catch (...) @@ -272,11 +290,12 @@ struct produce : produce_base folderName, abi_arg_out clearOperation) noexcept override + HRESULT __stdcall abi_ClearPublisherCacheFolderAsync(impl::abi_arg_in folderName, impl::abi_arg_out clearOperation) noexcept override { try { - *clearOperation = detach(this->shim().ClearPublisherCacheFolderAsync(*reinterpret_cast(&folderName))); + typename D::abi_guard guard(this->shim()); + *clearOperation = detach_abi(this->shim().ClearPublisherCacheFolderAsync(*reinterpret_cast(&folderName))); return S_OK; } catch (...) @@ -286,11 +305,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SharedLocalFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SharedLocalFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SharedLocalFolder()); return S_OK; } catch (...) @@ -304,11 +324,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -322,7 +343,8 @@ struct produce : produce_baseshim().Locality()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Locality()); return S_OK; } catch (...) @@ -331,11 +353,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Values(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Values()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Values()); return S_OK; } catch (...) @@ -345,11 +368,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Containers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Containers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Containers()); return S_OK; } catch (...) @@ -359,11 +383,12 @@ struct produce : produce_base name, Windows::Storage::ApplicationDataCreateDisposition disposition, abi_arg_out container) noexcept override + HRESULT __stdcall abi_CreateContainer(impl::abi_arg_in name, Windows::Storage::ApplicationDataCreateDisposition disposition, impl::abi_arg_out container) noexcept override { try { - *container = detach(this->shim().CreateContainer(*reinterpret_cast(&name), disposition)); + typename D::abi_guard guard(this->shim()); + *container = detach_abi(this->shim().CreateContainer(*reinterpret_cast(&name), disposition)); return S_OK; } catch (...) @@ -373,10 +398,11 @@ struct produce : produce_base name) noexcept override + HRESULT __stdcall abi_DeleteContainer(impl::abi_arg_in name) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeleteContainer(*reinterpret_cast(&name)); return S_OK; } @@ -390,11 +416,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -408,11 +435,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForUserAsync(abi_arg_in user, abi_arg_out> getForUserOperation) noexcept override + HRESULT __stdcall abi_GetForUserAsync(impl::abi_arg_in user, impl::abi_arg_out> getForUserOperation) noexcept override { try { - *getForUserOperation = detach(this->shim().GetForUserAsync(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *getForUserOperation = detach_abi(this->shim().GetForUserAsync(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -426,10 +454,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_DeferUpdates(abi_arg_in file) noexcept override + HRESULT __stdcall abi_DeferUpdates(impl::abi_arg_in file) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeferUpdates(*reinterpret_cast(&file)); return S_OK; } @@ -439,11 +468,12 @@ struct produce : produce_base file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CompleteUpdatesAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CompleteUpdatesAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CompleteUpdatesAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -457,11 +487,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFileAsync(abi_arg_in desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileAsync(impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -471,11 +502,12 @@ struct produce : produce_base desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderAsync(impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -485,11 +517,12 @@ struct produce : produce_base desiredName, Windows::Storage::CreationCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileWithCollisionOptionAsync(impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -499,11 +532,12 @@ struct produce : produce_base desiredName, Windows::Storage::CreationCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderWithCollisionOptionAsync(impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -517,11 +551,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFileForUserAsync(abi_arg_in user, abi_arg_in desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileForUserAsync(impl::abi_arg_in user, impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -531,11 +566,12 @@ struct produce : produce_base user, abi_arg_in desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderForUserAsync(impl::abi_arg_in user, impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -545,11 +581,12 @@ struct produce : produce_base user, abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileForUserWithCollisionOptionAsync(impl::abi_arg_in user, impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -559,11 +596,12 @@ struct produce : produce_base user, abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderForUserWithCollisionOptionAsync(impl::abi_arg_in user, impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -577,11 +615,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ReadTextAsync(abi_arg_in file, abi_arg_out> textOperation) noexcept override + HRESULT __stdcall abi_ReadTextAsync(impl::abi_arg_in file, impl::abi_arg_out> textOperation) noexcept override { try { - *textOperation = detach(this->shim().ReadTextAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().ReadTextAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -591,11 +630,12 @@ struct produce : produce_base file, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out> textOperation) noexcept override + HRESULT __stdcall abi_ReadTextWithEncodingAsync(impl::abi_arg_in file, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out> textOperation) noexcept override { try { - *textOperation = detach(this->shim().ReadTextAsync(*reinterpret_cast(&file), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().ReadTextAsync(*reinterpret_cast(&file), encoding)); return S_OK; } catch (...) @@ -605,11 +645,12 @@ struct produce : produce_base file, abi_arg_in contents, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_WriteTextAsync(impl::abi_arg_in file, impl::abi_arg_in contents, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().WriteTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().WriteTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents))); return S_OK; } catch (...) @@ -619,11 +660,12 @@ struct produce : produce_base file, abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_WriteTextWithEncodingAsync(impl::abi_arg_in file, impl::abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().WriteTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().WriteTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents), encoding)); return S_OK; } catch (...) @@ -633,11 +675,12 @@ struct produce : produce_base file, abi_arg_in contents, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_AppendTextAsync(impl::abi_arg_in file, impl::abi_arg_in contents, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().AppendTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().AppendTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents))); return S_OK; } catch (...) @@ -647,11 +690,12 @@ struct produce : produce_base file, abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_AppendTextWithEncodingAsync(impl::abi_arg_in file, impl::abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().AppendTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().AppendTextAsync(*reinterpret_cast(&file), *reinterpret_cast(&contents), encoding)); return S_OK; } catch (...) @@ -661,11 +705,12 @@ struct produce : produce_base file, abi_arg_out>> linesOperation) noexcept override + HRESULT __stdcall abi_ReadLinesAsync(impl::abi_arg_in file, impl::abi_arg_out>> linesOperation) noexcept override { try { - *linesOperation = detach(this->shim().ReadLinesAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *linesOperation = detach_abi(this->shim().ReadLinesAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -675,11 +720,12 @@ struct produce : produce_base file, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out>> linesOperation) noexcept override + HRESULT __stdcall abi_ReadLinesWithEncodingAsync(impl::abi_arg_in file, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out>> linesOperation) noexcept override { try { - *linesOperation = detach(this->shim().ReadLinesAsync(*reinterpret_cast(&file), encoding)); + typename D::abi_guard guard(this->shim()); + *linesOperation = detach_abi(this->shim().ReadLinesAsync(*reinterpret_cast(&file), encoding)); return S_OK; } catch (...) @@ -689,11 +735,12 @@ struct produce : produce_base file, abi_arg_in> lines, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteLinesAsync(impl::abi_arg_in file, impl::abi_arg_in> lines, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines))); return S_OK; } catch (...) @@ -703,11 +750,12 @@ struct produce : produce_base file, abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteLinesWithEncodingAsync(impl::abi_arg_in file, impl::abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines), encoding)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines), encoding)); return S_OK; } catch (...) @@ -717,11 +765,12 @@ struct produce : produce_base file, abi_arg_in> lines, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AppendLinesAsync(impl::abi_arg_in file, impl::abi_arg_in> lines, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AppendLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AppendLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines))); return S_OK; } catch (...) @@ -731,11 +780,12 @@ struct produce : produce_base file, abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AppendLinesWithEncodingAsync(impl::abi_arg_in file, impl::abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AppendLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines), encoding)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AppendLinesAsync(*reinterpret_cast(&file), *reinterpret_cast *>(&lines), encoding)); return S_OK; } catch (...) @@ -745,11 +795,12 @@ struct produce : produce_base file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReadBufferAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReadBufferAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReadBufferAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -759,11 +810,12 @@ struct produce : produce_base file, abi_arg_in buffer, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteBufferAsync(impl::abi_arg_in file, impl::abi_arg_in buffer, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteBufferAsync(*reinterpret_cast(&file), *reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteBufferAsync(*reinterpret_cast(&file), *reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -773,11 +825,12 @@ struct produce : produce_base file, uint32_t __bufferSize, abi_arg_in * buffer, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteBytesAsync(impl::abi_arg_in file, uint32_t __bufferSize, impl::abi_arg_in * buffer, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteBytesAsync(*reinterpret_cast(&file), array_ref(buffer, buffer + __bufferSize))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteBytesAsync(*reinterpret_cast(&file), array_view(buffer, buffer + __bufferSize))); return S_OK; } catch (...) @@ -791,11 +844,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CameraRoll(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraRoll(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraRoll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraRoll()); return S_OK; } catch (...) @@ -809,11 +863,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Playlists(abi_arg_out value) noexcept override + HRESULT __stdcall get_Playlists(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Playlists()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Playlists()); return S_OK; } catch (...) @@ -827,11 +882,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_SavedPictures(abi_arg_out value) noexcept override + HRESULT __stdcall get_SavedPictures(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SavedPictures()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SavedPictures()); return S_OK; } catch (...) @@ -845,11 +901,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_MusicLibrary(abi_arg_out value) noexcept override + HRESULT __stdcall get_MusicLibrary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MusicLibrary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MusicLibrary()); return S_OK; } catch (...) @@ -859,11 +916,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PicturesLibrary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PicturesLibrary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PicturesLibrary()); return S_OK; } catch (...) @@ -873,11 +931,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VideosLibrary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VideosLibrary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VideosLibrary()); return S_OK; } catch (...) @@ -887,11 +946,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DocumentsLibrary(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentsLibrary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentsLibrary()); return S_OK; } catch (...) @@ -901,11 +961,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HomeGroup(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeGroup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeGroup()); return S_OK; } catch (...) @@ -915,11 +976,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RemovableDevices(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemovableDevices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovableDevices()); return S_OK; } catch (...) @@ -929,11 +991,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MediaServerDevices(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaServerDevices()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaServerDevices()); return S_OK; } catch (...) @@ -947,11 +1010,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Objects3D(abi_arg_out value) noexcept override + HRESULT __stdcall get_Objects3D(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Objects3D()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Objects3D()); return S_OK; } catch (...) @@ -961,11 +1025,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AppCaptures(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppCaptures()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppCaptures()); return S_OK; } catch (...) @@ -975,11 +1040,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RecordedCalls(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RecordedCalls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecordedCalls()); return S_OK; } catch (...) @@ -993,11 +1059,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetFolderForUserAsync(abi_arg_in user, Windows::Storage::KnownFolderId folderId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFolderForUserAsync(impl::abi_arg_in user, Windows::Storage::KnownFolderId folderId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFolderForUserAsync(*reinterpret_cast(&user), folderId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFolderForUserAsync(*reinterpret_cast(&user), folderId)); return S_OK; } catch (...) @@ -1011,11 +1078,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ReadTextAsync(abi_arg_in absolutePath, abi_arg_out> textOperation) noexcept override + HRESULT __stdcall abi_ReadTextAsync(impl::abi_arg_in absolutePath, impl::abi_arg_out> textOperation) noexcept override { try { - *textOperation = detach(this->shim().ReadTextAsync(*reinterpret_cast(&absolutePath))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().ReadTextAsync(*reinterpret_cast(&absolutePath))); return S_OK; } catch (...) @@ -1025,11 +1093,12 @@ struct produce : produce_base absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out> textOperation) noexcept override + HRESULT __stdcall abi_ReadTextWithEncodingAsync(impl::abi_arg_in absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out> textOperation) noexcept override { try { - *textOperation = detach(this->shim().ReadTextAsync(*reinterpret_cast(&absolutePath), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().ReadTextAsync(*reinterpret_cast(&absolutePath), encoding)); return S_OK; } catch (...) @@ -1039,11 +1108,12 @@ struct produce : produce_base absolutePath, abi_arg_in contents, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_WriteTextAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in contents, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().WriteTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().WriteTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents))); return S_OK; } catch (...) @@ -1053,11 +1123,12 @@ struct produce : produce_base absolutePath, abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_WriteTextWithEncodingAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().WriteTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().WriteTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents), encoding)); return S_OK; } catch (...) @@ -1067,11 +1138,12 @@ struct produce : produce_base absolutePath, abi_arg_in contents, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_AppendTextAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in contents, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().AppendTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents))); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().AppendTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents))); return S_OK; } catch (...) @@ -1081,11 +1153,12 @@ struct produce : produce_base absolutePath, abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out textOperation) noexcept override + HRESULT __stdcall abi_AppendTextWithEncodingAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in contents, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out textOperation) noexcept override { try { - *textOperation = detach(this->shim().AppendTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents), encoding)); + typename D::abi_guard guard(this->shim()); + *textOperation = detach_abi(this->shim().AppendTextAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&contents), encoding)); return S_OK; } catch (...) @@ -1095,11 +1168,12 @@ struct produce : produce_base absolutePath, abi_arg_out>> linesOperation) noexcept override + HRESULT __stdcall abi_ReadLinesAsync(impl::abi_arg_in absolutePath, impl::abi_arg_out>> linesOperation) noexcept override { try { - *linesOperation = detach(this->shim().ReadLinesAsync(*reinterpret_cast(&absolutePath))); + typename D::abi_guard guard(this->shim()); + *linesOperation = detach_abi(this->shim().ReadLinesAsync(*reinterpret_cast(&absolutePath))); return S_OK; } catch (...) @@ -1109,11 +1183,12 @@ struct produce : produce_base absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out>> linesOperation) noexcept override + HRESULT __stdcall abi_ReadLinesWithEncodingAsync(impl::abi_arg_in absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out>> linesOperation) noexcept override { try { - *linesOperation = detach(this->shim().ReadLinesAsync(*reinterpret_cast(&absolutePath), encoding)); + typename D::abi_guard guard(this->shim()); + *linesOperation = detach_abi(this->shim().ReadLinesAsync(*reinterpret_cast(&absolutePath), encoding)); return S_OK; } catch (...) @@ -1123,11 +1198,12 @@ struct produce : produce_base absolutePath, abi_arg_in> lines, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteLinesAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in> lines, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines))); return S_OK; } catch (...) @@ -1137,11 +1213,12 @@ struct produce : produce_base absolutePath, abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteLinesWithEncodingAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines), encoding)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines), encoding)); return S_OK; } catch (...) @@ -1151,11 +1228,12 @@ struct produce : produce_base absolutePath, abi_arg_in> lines, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AppendLinesAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in> lines, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AppendLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AppendLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines))); return S_OK; } catch (...) @@ -1165,11 +1243,12 @@ struct produce : produce_base absolutePath, abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AppendLinesWithEncodingAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in> lines, Windows::Storage::Streams::UnicodeEncoding encoding, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AppendLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines), encoding)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AppendLinesAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast *>(&lines), encoding)); return S_OK; } catch (...) @@ -1179,11 +1258,12 @@ struct produce : produce_base absolutePath, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReadBufferAsync(impl::abi_arg_in absolutePath, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReadBufferAsync(*reinterpret_cast(&absolutePath))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReadBufferAsync(*reinterpret_cast(&absolutePath))); return S_OK; } catch (...) @@ -1193,11 +1273,12 @@ struct produce : produce_base absolutePath, abi_arg_in buffer, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteBufferAsync(impl::abi_arg_in absolutePath, impl::abi_arg_in buffer, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteBufferAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&buffer))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteBufferAsync(*reinterpret_cast(&absolutePath), *reinterpret_cast(&buffer))); return S_OK; } catch (...) @@ -1207,11 +1288,12 @@ struct produce : produce_base absolutePath, uint32_t __bufferSize, abi_arg_in * buffer, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_WriteBytesAsync(impl::abi_arg_in absolutePath, uint32_t __bufferSize, impl::abi_arg_in * buffer, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().WriteBytesAsync(*reinterpret_cast(&absolutePath), array_ref(buffer, buffer + __bufferSize))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().WriteBytesAsync(*reinterpret_cast(&absolutePath), array_view(buffer, buffer + __bufferSize))); return S_OK; } catch (...) @@ -1229,6 +1311,7 @@ struct produce : produce_baseshim()); this->shim().Complete(); return S_OK; } @@ -1246,7 +1329,8 @@ struct produce : produce_baseshim().CurrentVersion()); + typename D::abi_guard guard(this->shim()); + *currentVersion = detach_abi(this->shim().CurrentVersion()); return S_OK; } catch (...) @@ -1259,7 +1343,8 @@ struct produce : produce_baseshim().DesiredVersion()); + typename D::abi_guard guard(this->shim()); + *desiredVersion = detach_abi(this->shim().DesiredVersion()); return S_OK; } catch (...) @@ -1268,11 +1353,12 @@ struct produce : produce_base deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1286,11 +1372,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FileType(abi_arg_out value) noexcept override + HRESULT __stdcall get_FileType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FileType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FileType()); return S_OK; } catch (...) @@ -1300,11 +1387,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -1314,11 +1402,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_OpenAsync(Windows::Storage::FileAccessMode accessMode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenAsync(accessMode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenAsync(accessMode)); return S_OK; } catch (...) @@ -1328,11 +1417,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_OpenTransactedWriteAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenTransactedWriteAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenTransactedWriteAsync()); return S_OK; } catch (...) @@ -1342,11 +1432,12 @@ struct produce : produce_base destinationFolder, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyOverloadDefaultNameAndOptions(impl::abi_arg_in destinationFolder, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder))); return S_OK; } catch (...) @@ -1356,11 +1447,12 @@ struct produce : produce_base destinationFolder, abi_arg_in desiredNewName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyOverloadDefaultOptions(impl::abi_arg_in destinationFolder, impl::abi_arg_in desiredNewName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName))); return S_OK; } catch (...) @@ -1370,11 +1462,12 @@ struct produce : produce_base destinationFolder, abi_arg_in desiredNewName, Windows::Storage::NameCollisionOption option, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CopyOverload(impl::abi_arg_in destinationFolder, impl::abi_arg_in desiredNewName, Windows::Storage::NameCollisionOption option, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName), option)); return S_OK; } catch (...) @@ -1384,11 +1477,12 @@ struct produce : produce_base fileToReplace, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_CopyAndReplaceAsync(impl::abi_arg_in fileToReplace, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CopyAndReplaceAsync(*reinterpret_cast(&fileToReplace))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CopyAndReplaceAsync(*reinterpret_cast(&fileToReplace))); return S_OK; } catch (...) @@ -1398,11 +1492,12 @@ struct produce : produce_base destinationFolder, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_MoveOverloadDefaultNameAndOptions(impl::abi_arg_in destinationFolder, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder))); return S_OK; } catch (...) @@ -1412,11 +1507,12 @@ struct produce : produce_base destinationFolder, abi_arg_in desiredNewName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_MoveOverloadDefaultOptions(impl::abi_arg_in destinationFolder, impl::abi_arg_in desiredNewName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName))); return S_OK; } catch (...) @@ -1426,11 +1522,12 @@ struct produce : produce_base destinationFolder, abi_arg_in desiredNewName, Windows::Storage::NameCollisionOption option, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_MoveOverload(impl::abi_arg_in destinationFolder, impl::abi_arg_in desiredNewName, Windows::Storage::NameCollisionOption option, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().MoveAsync(*reinterpret_cast(&destinationFolder), *reinterpret_cast(&desiredNewName), option)); return S_OK; } catch (...) @@ -1440,11 +1537,12 @@ struct produce : produce_base fileToReplace, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_MoveAndReplaceAsync(impl::abi_arg_in fileToReplace, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().MoveAndReplaceAsync(*reinterpret_cast(&fileToReplace))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().MoveAndReplaceAsync(*reinterpret_cast(&fileToReplace))); return S_OK; } catch (...) @@ -1458,11 +1556,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OpenWithOptionsAsync(Windows::Storage::FileAccessMode accessMode, Windows::Storage::StorageOpenOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_OpenWithOptionsAsync(Windows::Storage::FileAccessMode accessMode, Windows::Storage::StorageOpenOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenAsync(accessMode, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenAsync(accessMode, options)); return S_OK; } catch (...) @@ -1472,11 +1571,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_OpenTransactedWriteWithOptionsAsync(Windows::Storage::StorageOpenOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().OpenTransactedWriteAsync(options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().OpenTransactedWriteAsync(options)); return S_OK; } catch (...) @@ -1494,7 +1594,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsAvailable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAvailable()); return S_OK; } catch (...) @@ -1507,11 +1608,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetFileFromPathAsync(abi_arg_in path, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFileFromPathAsync(impl::abi_arg_in path, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFileFromPathAsync(*reinterpret_cast(&path))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFileFromPathAsync(*reinterpret_cast(&path))); return S_OK; } catch (...) @@ -1521,11 +1623,12 @@ struct produce : produce_base uri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFileFromApplicationUriAsync(impl::abi_arg_in uri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFileFromApplicationUriAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFileFromApplicationUriAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1535,11 +1638,12 @@ struct produce : produce_base displayNameWithExtension, abi_arg_in dataRequested, abi_arg_in thumbnail, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateStreamedFileAsync(impl::abi_arg_in displayNameWithExtension, impl::abi_arg_in dataRequested, impl::abi_arg_in thumbnail, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateStreamedFileAsync(*reinterpret_cast(&displayNameWithExtension), *reinterpret_cast(&dataRequested), *reinterpret_cast(&thumbnail))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateStreamedFileAsync(*reinterpret_cast(&displayNameWithExtension), *reinterpret_cast(&dataRequested), *reinterpret_cast(&thumbnail))); return S_OK; } catch (...) @@ -1549,11 +1653,12 @@ struct produce : produce_base fileToReplace, abi_arg_in dataRequested, abi_arg_in thumbnail, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReplaceWithStreamedFileAsync(impl::abi_arg_in fileToReplace, impl::abi_arg_in dataRequested, impl::abi_arg_in thumbnail, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReplaceWithStreamedFileAsync(*reinterpret_cast(&fileToReplace), *reinterpret_cast(&dataRequested), *reinterpret_cast(&thumbnail))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReplaceWithStreamedFileAsync(*reinterpret_cast(&fileToReplace), *reinterpret_cast(&dataRequested), *reinterpret_cast(&thumbnail))); return S_OK; } catch (...) @@ -1563,11 +1668,12 @@ struct produce : produce_base displayNameWithExtension, abi_arg_in uri, abi_arg_in thumbnail, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateStreamedFileFromUriAsync(impl::abi_arg_in displayNameWithExtension, impl::abi_arg_in uri, impl::abi_arg_in thumbnail, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateStreamedFileFromUriAsync(*reinterpret_cast(&displayNameWithExtension), *reinterpret_cast(&uri), *reinterpret_cast(&thumbnail))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateStreamedFileFromUriAsync(*reinterpret_cast(&displayNameWithExtension), *reinterpret_cast(&uri), *reinterpret_cast(&thumbnail))); return S_OK; } catch (...) @@ -1577,11 +1683,12 @@ struct produce : produce_base fileToReplace, abi_arg_in uri, abi_arg_in thumbnail, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_ReplaceWithStreamedFileFromUriAsync(impl::abi_arg_in fileToReplace, impl::abi_arg_in uri, impl::abi_arg_in thumbnail, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().ReplaceWithStreamedFileFromUriAsync(*reinterpret_cast(&fileToReplace), *reinterpret_cast(&uri), *reinterpret_cast(&thumbnail))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReplaceWithStreamedFileFromUriAsync(*reinterpret_cast(&fileToReplace), *reinterpret_cast(&uri), *reinterpret_cast(&thumbnail))); return S_OK; } catch (...) @@ -1595,11 +1702,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFileAsyncOverloadDefaultOptions(abi_arg_in desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileAsyncOverloadDefaultOptions(impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -1609,11 +1717,12 @@ struct produce : produce_base desiredName, Windows::Storage::CreationCollisionOption options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFileAsync(impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName), options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFileAsync(*reinterpret_cast(&desiredName), options)); return S_OK; } catch (...) @@ -1623,11 +1732,12 @@ struct produce : produce_base desiredName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderAsyncOverloadDefaultOptions(impl::abi_arg_in desiredName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -1637,11 +1747,12 @@ struct produce : produce_base desiredName, Windows::Storage::CreationCollisionOption options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_CreateFolderAsync(impl::abi_arg_in desiredName, Windows::Storage::CreationCollisionOption options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName), options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CreateFolderAsync(*reinterpret_cast(&desiredName), options)); return S_OK; } catch (...) @@ -1651,11 +1762,12 @@ struct produce : produce_base name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFileAsync(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFileAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFileAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1665,11 +1777,12 @@ struct produce : produce_base name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFolderAsync(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFolderAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFolderAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1679,11 +1792,12 @@ struct produce : produce_base name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetItemAsync(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetItemAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1693,11 +1807,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_GetFilesAsyncOverloadDefaultOptionsStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFilesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFilesAsync()); return S_OK; } catch (...) @@ -1707,11 +1822,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_GetFoldersAsyncOverloadDefaultOptionsStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetFoldersAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFoldersAsync()); return S_OK; } catch (...) @@ -1721,11 +1837,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_GetItemsAsyncOverloadDefaultStartAndCount(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().GetItemsAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetItemsAsync()); return S_OK; } catch (...) @@ -1739,11 +1856,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_TryGetItemAsync(abi_arg_in name, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryGetItemAsync(impl::abi_arg_in name, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryGetItemAsync(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryGetItemAsync(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -1757,11 +1875,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetFolderFromPathAsync(abi_arg_in path, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFolderFromPathAsync(impl::abi_arg_in path, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFolderFromPathAsync(*reinterpret_cast(&path))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFolderFromPathAsync(*reinterpret_cast(&path))); return S_OK; } catch (...) @@ -1775,11 +1894,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RenameAsyncOverloadDefaultOptions(abi_arg_in desiredName, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RenameAsyncOverloadDefaultOptions(impl::abi_arg_in desiredName, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RenameAsync(*reinterpret_cast(&desiredName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenameAsync(*reinterpret_cast(&desiredName))); return S_OK; } catch (...) @@ -1789,11 +1909,12 @@ struct produce : produce_base desiredName, Windows::Storage::NameCollisionOption option, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RenameAsync(impl::abi_arg_in desiredName, Windows::Storage::NameCollisionOption option, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RenameAsync(*reinterpret_cast(&desiredName), option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RenameAsync(*reinterpret_cast(&desiredName), option)); return S_OK; } catch (...) @@ -1803,11 +1924,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_DeleteAsyncOverloadDefaultOptions(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync()); return S_OK; } catch (...) @@ -1817,11 +1939,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_DeleteAsync(Windows::Storage::StorageDeleteOption option, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().DeleteAsync(option)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().DeleteAsync(option)); return S_OK; } catch (...) @@ -1831,11 +1954,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetBasicPropertiesAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetBasicPropertiesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetBasicPropertiesAsync()); return S_OK; } catch (...) @@ -1845,11 +1969,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -1859,11 +1984,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -1877,7 +2003,8 @@ struct produce : produce_baseshim().Attributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Attributes()); return S_OK; } catch (...) @@ -1886,11 +2013,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DateCreated(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateCreated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateCreated()); return S_OK; } catch (...) @@ -1903,7 +2031,8 @@ struct produce : produce_baseshim().IsOfType(type)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOfType(type)); return S_OK; } catch (...) @@ -1916,11 +2045,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetParentAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetParentAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetParentAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetParentAsync()); return S_OK; } catch (...) @@ -1930,11 +2060,12 @@ struct produce : produce_base item, bool * value) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in item, bool * value) noexcept override { try { - *value = detach(this->shim().IsEqual(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEqual(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -1947,11 +2078,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailAsync(mode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailAsync(mode)); return S_OK; } catch (...) @@ -1961,11 +2093,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailAsyncOverloadDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailAsync(mode, requestedSize)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailAsync(mode, requestedSize)); return S_OK; } catch (...) @@ -1975,11 +2108,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, Windows::Storage::FileProperties::ThumbnailOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetThumbnailAsync(mode, requestedSize, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetThumbnailAsync(mode, requestedSize, options)); return S_OK; } catch (...) @@ -1989,11 +2123,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2003,11 +2138,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayType()); return S_OK; } catch (...) @@ -2017,11 +2153,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FolderRelativeId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FolderRelativeId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FolderRelativeId()); return S_OK; } catch (...) @@ -2031,11 +2168,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -2049,11 +2187,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetScaledImageAsThumbnailAsync(mode)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetScaledImageAsThumbnailAsync(mode)); return S_OK; } catch (...) @@ -2063,11 +2202,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetScaledImageAsThumbnailAsync(mode, requestedSize)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetScaledImageAsThumbnailAsync(mode, requestedSize)); return S_OK; } catch (...) @@ -2077,11 +2217,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetScaledImageAsThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, Windows::Storage::FileProperties::ThumbnailOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetScaledImageAsThumbnailAsync(mode, requestedSize, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetScaledImageAsThumbnailAsync(mode, requestedSize, options)); return S_OK; } catch (...) @@ -2095,11 +2236,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Provider(abi_arg_out value) noexcept override + HRESULT __stdcall get_Provider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Provider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Provider()); return S_OK; } catch (...) @@ -2113,11 +2255,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_RequestAddFolderAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAddFolderAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAddFolderAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAddFolderAsync()); return S_OK; } catch (...) @@ -2127,11 +2270,12 @@ struct produce : produce_base folder, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestRemoveFolderAsync(impl::abi_arg_in folder, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestRemoveFolderAsync(*reinterpret_cast(&folder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestRemoveFolderAsync(*reinterpret_cast(&folder))); return S_OK; } catch (...) @@ -2141,11 +2285,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Folders(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Folders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Folders()); return S_OK; } catch (...) @@ -2155,11 +2300,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SaveFolder(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SaveFolder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SaveFolder()); return S_OK; } catch (...) @@ -2169,11 +2315,12 @@ struct produce : produce_base> handler, event_token * eventCookie) noexcept override + HRESULT __stdcall add_DefinitionChanged(impl::abi_arg_in> handler, event_token * eventCookie) noexcept override { try { - *eventCookie = detach(this->shim().DefinitionChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *eventCookie = detach_abi(this->shim().DefinitionChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2186,6 +2333,7 @@ struct produce : produce_baseshim()); this->shim().DefinitionChanged(eventCookie); return S_OK; } @@ -2199,11 +2347,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ChangeTracker(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChangeTracker(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChangeTracker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeTracker()); return S_OK; } catch (...) @@ -2221,7 +2370,8 @@ struct produce : produce_baseshim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -2230,11 +2380,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -2244,11 +2395,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PreviousPath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreviousPath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreviousPath()); return S_OK; } catch (...) @@ -2262,7 +2414,8 @@ struct produce : produce_baseshim().IsOfType(type)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOfType(type)); return S_OK; } catch (...) @@ -2271,11 +2424,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetStorageItemAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetStorageItemAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetStorageItemAsync()); return S_OK; } catch (...) @@ -2289,11 +2443,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ReadBatchAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_ReadBatchAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().ReadBatchAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ReadBatchAsync()); return S_OK; } catch (...) @@ -2303,11 +2458,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AcceptChangesAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_AcceptChangesAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().AcceptChangesAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().AcceptChangesAsync()); return S_OK; } catch (...) @@ -2321,11 +2477,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_GetChangeReader(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetChangeReader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetChangeReader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetChangeReader()); return S_OK; } catch (...) @@ -2339,6 +2496,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Enable(); return S_OK; } @@ -2352,6 +2510,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Reset(); return S_OK; } @@ -2365,11 +2524,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetLibraryAsync(Windows::Storage::KnownLibraryId libraryId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetLibraryAsync(Windows::Storage::KnownLibraryId libraryId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetLibraryAsync(libraryId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetLibraryAsync(libraryId)); return S_OK; } catch (...) @@ -2383,11 +2543,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetLibraryForUserAsync(abi_arg_in user, Windows::Storage::KnownLibraryId libraryId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetLibraryForUserAsync(impl::abi_arg_in user, Windows::Storage::KnownLibraryId libraryId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetLibraryForUserAsync(*reinterpret_cast(&user), libraryId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetLibraryForUserAsync(*reinterpret_cast(&user), libraryId)); return S_OK; } catch (...) @@ -2401,11 +2562,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2415,11 +2577,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2433,11 +2596,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Stream(abi_arg_out value) noexcept override + HRESULT __stdcall get_Stream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stream()); return S_OK; } catch (...) @@ -2447,11 +2611,12 @@ struct produce : produce_base operation) noexcept override + HRESULT __stdcall abi_CommitAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().CommitAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().CommitAsync()); return S_OK; } catch (...) @@ -2469,6 +2634,7 @@ struct produce : produce_baseshim()); this->shim().FailAndClose(failureMode); return S_OK; } @@ -2482,11 +2648,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_EncodingBitrate(abi_arg_out value) noexcept override + HRESULT __stdcall get_EncodingBitrate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EncodingBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EncodingBitrate()); return S_OK; } catch (...) @@ -2500,11 +2667,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LatitudeDecimal(abi_arg_out value) noexcept override + HRESULT __stdcall get_LatitudeDecimal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LatitudeDecimal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LatitudeDecimal()); return S_OK; } catch (...) @@ -2514,11 +2682,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LongitudeDecimal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LongitudeDecimal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LongitudeDecimal()); return S_OK; } catch (...) @@ -2532,11 +2701,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HorizontalSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalSize()); return S_OK; } catch (...) @@ -2546,11 +2716,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VerticalSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalSize()); return S_OK; } catch (...) @@ -2564,11 +2735,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -2578,11 +2750,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Producer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Producer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Producer()); return S_OK; } catch (...) @@ -2592,11 +2765,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Publisher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Publisher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Publisher()); return S_OK; } catch (...) @@ -2606,11 +2780,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SubTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubTitle()); return S_OK; } catch (...) @@ -2620,11 +2795,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Writer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Writer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Writer()); return S_OK; } catch (...) @@ -2634,11 +2810,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Year(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Year()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Year()); return S_OK; } catch (...) @@ -2652,11 +2829,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AlbumArtist(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlbumArtist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumArtist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumArtist()); return S_OK; } catch (...) @@ -2666,11 +2844,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AlbumTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlbumTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlbumTitle()); return S_OK; } catch (...) @@ -2680,11 +2859,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Artist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Artist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Artist()); return S_OK; } catch (...) @@ -2694,11 +2874,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Composer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Composer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Composer()); return S_OK; } catch (...) @@ -2708,11 +2889,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Conductor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Conductor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Conductor()); return S_OK; } catch (...) @@ -2722,11 +2904,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayArtist(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayArtist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayArtist()); return S_OK; } catch (...) @@ -2736,11 +2919,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Genre(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Genre()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Genre()); return S_OK; } catch (...) @@ -2750,11 +2934,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TrackNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrackNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrackNumber()); return S_OK; } catch (...) @@ -2768,11 +2953,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CameraManufacturer(abi_arg_out value) noexcept override + HRESULT __stdcall get_CameraManufacturer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraManufacturer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraManufacturer()); return S_OK; } catch (...) @@ -2782,11 +2968,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CameraModel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CameraModel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CameraModel()); return S_OK; } catch (...) @@ -2796,11 +2983,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DateTaken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateTaken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTaken()); return S_OK; } catch (...) @@ -2810,11 +2998,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -2824,11 +3013,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PeopleNames(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeopleNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeopleNames()); return S_OK; } catch (...) @@ -2842,11 +3032,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -2856,11 +3047,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -2870,11 +3062,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemNameDisplay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemNameDisplay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemNameDisplay()); return S_OK; } catch (...) @@ -2884,11 +3077,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Keywords(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Keywords()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Keywords()); return S_OK; } catch (...) @@ -2898,11 +3092,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Rating(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Rating()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rating()); return S_OK; } catch (...) @@ -2912,11 +3107,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -2926,11 +3122,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Audio(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Audio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Audio()); return S_OK; } catch (...) @@ -2940,11 +3137,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_GPS(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GPS()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GPS()); return S_OK; } catch (...) @@ -2954,11 +3152,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Media(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Media()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Media()); return S_OK; } catch (...) @@ -2968,11 +3167,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Music(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Music()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Music()); return S_OK; } catch (...) @@ -2982,11 +3182,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Photo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Photo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Photo()); return S_OK; } catch (...) @@ -2996,11 +3197,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Video(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Video()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Video()); return S_OK; } catch (...) @@ -3010,11 +3212,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -3028,11 +3231,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Director(abi_arg_out value) noexcept override + HRESULT __stdcall get_Director(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Director()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Director()); return S_OK; } catch (...) @@ -3042,11 +3246,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FrameHeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameHeight()); return S_OK; } catch (...) @@ -3056,11 +3261,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FrameWidth(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameWidth()); return S_OK; } catch (...) @@ -3070,11 +3276,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -3084,11 +3291,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TotalBitrate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TotalBitrate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalBitrate()); return S_OK; } catch (...) @@ -3106,1428 +3314,1428 @@ namespace Windows::Storage { template Windows::Foundation::IAsyncOperation impl_IStorageLibraryStatics::GetLibraryAsync(Windows::Storage::KnownLibraryId libraryId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetLibraryAsync(libraryId, put(operation))); + check_hresult(WINRT_SHIM(IStorageLibraryStatics)->abi_GetLibraryAsync(libraryId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageLibraryStatics2::GetLibraryForUserAsync(const Windows::System::User & user, Windows::Storage::KnownLibraryId libraryId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetLibraryForUserAsync(get(user), libraryId, put(operation))); + check_hresult(WINRT_SHIM(IStorageLibraryStatics2)->abi_GetLibraryForUserAsync(get_abi(user), libraryId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageLibrary::RequestAddFolderAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAddFolderAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageLibrary)->abi_RequestAddFolderAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageLibrary::RequestRemoveFolderAsync(const Windows::Storage::StorageFolder & folder) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestRemoveFolderAsync(get(folder), put(operation))); + check_hresult(WINRT_SHIM(IStorageLibrary)->abi_RequestRemoveFolderAsync(get_abi(folder), put_abi(operation))); return operation; } template Windows::Foundation::Collections::IObservableVector impl_IStorageLibrary::Folders() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_Folders(put(value))); + check_hresult(WINRT_SHIM(IStorageLibrary)->get_Folders(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IStorageLibrary::SaveFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SaveFolder(put(value))); + check_hresult(WINRT_SHIM(IStorageLibrary)->get_SaveFolder(put_abi(value))); return value; } -template event_token impl_IStorageLibrary::DefinitionChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IStorageLibrary::DefinitionChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token eventCookie {}; - check_hresult(static_cast(static_cast(*this))->add_DefinitionChanged(get(handler), &eventCookie)); + check_hresult(WINRT_SHIM(IStorageLibrary)->add_DefinitionChanged(get_abi(handler), &eventCookie)); return eventCookie; } -template event_revoker impl_IStorageLibrary::DefinitionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IStorageLibrary::DefinitionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::IStorageLibrary::remove_DefinitionChanged, DefinitionChanged(handler)); } template void impl_IStorageLibrary::DefinitionChanged(event_token eventCookie) const { - check_hresult(static_cast(static_cast(*this))->remove_DefinitionChanged(eventCookie)); + check_hresult(WINRT_SHIM(IStorageLibrary)->remove_DefinitionChanged(eventCookie)); } template Windows::Storage::StorageLibraryChangeTracker impl_IStorageLibrary2::ChangeTracker() const { Windows::Storage::StorageLibraryChangeTracker value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChangeTracker(put(value))); + check_hresult(WINRT_SHIM(IStorageLibrary2)->get_ChangeTracker(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::MusicLibrary() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MusicLibrary(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_MusicLibrary(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::PicturesLibrary() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PicturesLibrary(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_PicturesLibrary(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::VideosLibrary() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VideosLibrary(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_VideosLibrary(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::DocumentsLibrary() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentsLibrary(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_DocumentsLibrary(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::HomeGroup() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HomeGroup(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_HomeGroup(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::RemovableDevices() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemovableDevices(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_RemovableDevices(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics::MediaServerDevices() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaServerDevices(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics)->get_MediaServerDevices(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics2::Objects3D() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Objects3D(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics2)->get_Objects3D(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics2::AppCaptures() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppCaptures(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics2)->get_AppCaptures(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersStatics2::RecordedCalls() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RecordedCalls(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics2)->get_RecordedCalls(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IKnownFoldersStatics3::GetFolderForUserAsync(const Windows::System::User & user, Windows::Storage::KnownFolderId folderId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderForUserAsync(get(user), folderId, put(operation))); + check_hresult(WINRT_SHIM(IKnownFoldersStatics3)->abi_GetFolderForUserAsync(get_abi(user), folderId, put_abi(operation))); return operation; } template Windows::Storage::StorageFolder impl_IKnownFoldersPlaylistsStatics::Playlists() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Playlists(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersPlaylistsStatics)->get_Playlists(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersCameraRollStatics::CameraRoll() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CameraRoll(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersCameraRollStatics)->get_CameraRoll(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IKnownFoldersSavedPicturesStatics::SavedPictures() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SavedPictures(put(value))); + check_hresult(WINRT_SHIM(IKnownFoldersSavedPicturesStatics)->get_SavedPictures(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFileAsync(hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFileAsync(hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileAsync(get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics)->abi_CreateFileAsync(get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFolderAsync(hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFolderAsync(hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderAsync(get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics)->abi_CreateFolderAsync(get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFileAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFileAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileWithCollisionOptionAsync(get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics)->abi_CreateFileWithCollisionOptionAsync(get_abi(desiredName), option, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFolderAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics::CreateFolderAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderWithCollisionOptionAsync(get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics)->abi_CreateFolderWithCollisionOptionAsync(get_abi(desiredName), option, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFileForUserAsync(const Windows::System::User & user, hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFileForUserAsync(const Windows::System::User & user, hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileForUserAsync(get(user), get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics2)->abi_CreateFileForUserAsync(get_abi(user), get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFolderForUserAsync(const Windows::System::User & user, hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFolderForUserAsync(const Windows::System::User & user, hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderForUserAsync(get(user), get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics2)->abi_CreateFolderForUserAsync(get_abi(user), get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFileForUserAsync(const Windows::System::User & user, hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFileForUserAsync(const Windows::System::User & user, hstring_view desiredName, Windows::Storage::CreationCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileForUserWithCollisionOptionAsync(get(user), get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics2)->abi_CreateFileForUserWithCollisionOptionAsync(get_abi(user), get_abi(desiredName), option, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFolderForUserAsync(const Windows::System::User & user, hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IDownloadsFolderStatics2::CreateFolderForUserAsync(const Windows::System::User & user, hstring_view desiredName, Windows::Storage::CreationCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderForUserWithCollisionOptionAsync(get(user), get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IDownloadsFolderStatics2)->abi_CreateFolderForUserWithCollisionOptionAsync(get_abi(user), get_abi(desiredName), option, put_abi(operation))); return operation; } template Windows::Storage::StorageLibraryChangeType impl_IStorageLibraryChange::ChangeType() const { Windows::Storage::StorageLibraryChangeType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IStorageLibraryChange)->get_ChangeType(&value)); return value; } template hstring impl_IStorageLibraryChange::Path() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IStorageLibraryChange)->get_Path(put_abi(value))); return value; } template hstring impl_IStorageLibraryChange::PreviousPath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PreviousPath(put(value))); + check_hresult(WINRT_SHIM(IStorageLibraryChange)->get_PreviousPath(put_abi(value))); return value; } template bool impl_IStorageLibraryChange::IsOfType(Windows::Storage::StorageItemTypes type) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsOfType(type, &value)); + check_hresult(WINRT_SHIM(IStorageLibraryChange)->abi_IsOfType(type, &value)); return value; } template Windows::Foundation::IAsyncOperation impl_IStorageLibraryChange::GetStorageItemAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetStorageItemAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageLibraryChange)->abi_GetStorageItemAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStorageItem::RenameAsync(hstring_ref desiredName) const +template Windows::Foundation::IAsyncAction impl_IStorageItem::RenameAsync(hstring_view desiredName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RenameAsyncOverloadDefaultOptions(get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IStorageItem)->abi_RenameAsyncOverloadDefaultOptions(get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStorageItem::RenameAsync(hstring_ref desiredName, Windows::Storage::NameCollisionOption option) const +template Windows::Foundation::IAsyncAction impl_IStorageItem::RenameAsync(hstring_view desiredName, Windows::Storage::NameCollisionOption option) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RenameAsync(get(desiredName), option, put(operation))); + check_hresult(WINRT_SHIM(IStorageItem)->abi_RenameAsync(get_abi(desiredName), option, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageItem::DeleteAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsyncOverloadDefaultOptions(put(operation))); + check_hresult(WINRT_SHIM(IStorageItem)->abi_DeleteAsyncOverloadDefaultOptions(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageItem::DeleteAsync(Windows::Storage::StorageDeleteOption option) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_DeleteAsync(option, put(operation))); + check_hresult(WINRT_SHIM(IStorageItem)->abi_DeleteAsync(option, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItem::GetBasicPropertiesAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetBasicPropertiesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItem)->abi_GetBasicPropertiesAsync(put_abi(operation))); return operation; } template hstring impl_IStorageItem::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IStorageItem)->get_Name(put_abi(value))); return value; } template hstring impl_IStorageItem::Path() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IStorageItem)->get_Path(put_abi(value))); return value; } template Windows::Storage::FileAttributes impl_IStorageItem::Attributes() const { Windows::Storage::FileAttributes value {}; - check_hresult(static_cast(static_cast(*this))->get_Attributes(&value)); + check_hresult(WINRT_SHIM(IStorageItem)->get_Attributes(&value)); return value; } template Windows::Foundation::DateTime impl_IStorageItem::DateCreated() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DateCreated(put(value))); + check_hresult(WINRT_SHIM(IStorageItem)->get_DateCreated(put_abi(value))); return value; } template bool impl_IStorageItem::IsOfType(Windows::Storage::StorageItemTypes type) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsOfType(type, &value)); + check_hresult(WINRT_SHIM(IStorageItem)->abi_IsOfType(type, &value)); return value; } template Windows::Foundation::IAsyncOperation> impl_IStorageLibraryChangeReader::ReadBatchAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_ReadBatchAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageLibraryChangeReader)->abi_ReadBatchAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageLibraryChangeReader::AcceptChangesAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AcceptChangesAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageLibraryChangeReader)->abi_AcceptChangesAsync(put_abi(operation))); return operation; } template Windows::Storage::StorageLibraryChangeReader impl_IStorageLibraryChangeTracker::GetChangeReader() const { Windows::Storage::StorageLibraryChangeReader value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChangeReader(put(value))); + check_hresult(WINRT_SHIM(IStorageLibraryChangeTracker)->abi_GetChangeReader(put_abi(value))); return value; } template void impl_IStorageLibraryChangeTracker::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(IStorageLibraryChangeTracker)->abi_Enable()); } template void impl_IStorageLibraryChangeTracker::Reset() const { - check_hresult(static_cast(static_cast(*this))->abi_Reset()); + check_hresult(WINRT_SHIM(IStorageLibraryChangeTracker)->abi_Reset()); } template void impl_IStreamedFileDataRequest::FailAndClose(Windows::Storage::StreamedFileFailureMode failureMode) const { - check_hresult(static_cast(static_cast(*this))->abi_FailAndClose(failureMode)); + check_hresult(WINRT_SHIM(IStreamedFileDataRequest)->abi_FailAndClose(failureMode)); } -template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::GetFileFromPathAsync(hstring_ref path) const +template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::GetFileFromPathAsync(hstring_view path) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFileFromPathAsync(get(path), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_GetFileFromPathAsync(get_abi(path), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::GetFileFromApplicationUriAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFileFromApplicationUriAsync(get(uri), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_GetFileFromApplicationUriAsync(get_abi(uri), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::CreateStreamedFileAsync(hstring_ref displayNameWithExtension, const Windows::Storage::StreamedFileDataRequestedHandler & dataRequested, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const +template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::CreateStreamedFileAsync(hstring_view displayNameWithExtension, const Windows::Storage::StreamedFileDataRequestedHandler & dataRequested, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateStreamedFileAsync(get(displayNameWithExtension), get(dataRequested), get(thumbnail), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_CreateStreamedFileAsync(get_abi(displayNameWithExtension), get_abi(dataRequested), get_abi(thumbnail), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::ReplaceWithStreamedFileAsync(const Windows::Storage::IStorageFile & fileToReplace, const Windows::Storage::StreamedFileDataRequestedHandler & dataRequested, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReplaceWithStreamedFileAsync(get(fileToReplace), get(dataRequested), get(thumbnail), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_ReplaceWithStreamedFileAsync(get_abi(fileToReplace), get_abi(dataRequested), get_abi(thumbnail), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::CreateStreamedFileFromUriAsync(hstring_ref displayNameWithExtension, const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const +template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::CreateStreamedFileFromUriAsync(hstring_view displayNameWithExtension, const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateStreamedFileFromUriAsync(get(displayNameWithExtension), get(uri), get(thumbnail), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_CreateStreamedFileFromUriAsync(get_abi(displayNameWithExtension), get_abi(uri), get_abi(thumbnail), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFileStatics::ReplaceWithStreamedFileFromUriAsync(const Windows::Storage::IStorageFile & fileToReplace, const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReplaceWithStreamedFileFromUriAsync(get(fileToReplace), get(uri), get(thumbnail), put(operation))); + check_hresult(WINRT_SHIM(IStorageFileStatics)->abi_ReplaceWithStreamedFileFromUriAsync(get_abi(fileToReplace), get_abi(uri), get_abi(thumbnail), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFileAsync(hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFileAsync(hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileAsyncOverloadDefaultOptions(get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_CreateFileAsyncOverloadDefaultOptions(get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFileAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption options) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFileAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFileAsync(get(desiredName), options, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_CreateFileAsync(get_abi(desiredName), options, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFolderAsync(hstring_ref desiredName) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFolderAsync(hstring_view desiredName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderAsyncOverloadDefaultOptions(get(desiredName), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_CreateFolderAsyncOverloadDefaultOptions(get_abi(desiredName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFolderAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption options) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::CreateFolderAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CreateFolderAsync(get(desiredName), options, put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_CreateFolderAsync(get_abi(desiredName), options, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetFileAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetFileAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFileAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetFileAsync(get_abi(name), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetFolderAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetFolderAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetFolderAsync(get_abi(name), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetItemAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder::GetItemAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetItemAsync(get_abi(name), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolder::GetFilesAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFilesAsyncOverloadDefaultOptionsStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetFilesAsyncOverloadDefaultOptionsStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolder::GetFoldersAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFoldersAsyncOverloadDefaultOptionsStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetFoldersAsyncOverloadDefaultOptionsStartAndCount(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IStorageFolder::GetItemsAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsAsyncOverloadDefaultStartAndCount(put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder)->abi_GetItemsAsyncOverloadDefaultStartAndCount(put_abi(operation))); return operation; } template hstring impl_IStorageFile::FileType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FileType(put(value))); + check_hresult(WINRT_SHIM(IStorageFile)->get_FileType(put_abi(value))); return value; } template hstring impl_IStorageFile::ContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentType(put(value))); + check_hresult(WINRT_SHIM(IStorageFile)->get_ContentType(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStorageFile::OpenAsync(Windows::Storage::FileAccessMode accessMode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenAsync(accessMode, put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_OpenAsync(accessMode, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFile::OpenTransactedWriteAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenTransactedWriteAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_OpenTransactedWriteAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFile::CopyAsync(const Windows::Storage::IStorageFolder & destinationFolder) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyOverloadDefaultNameAndOptions(get(destinationFolder), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_CopyOverloadDefaultNameAndOptions(get_abi(destinationFolder), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFile::CopyAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_ref desiredNewName) const +template Windows::Foundation::IAsyncOperation impl_IStorageFile::CopyAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_view desiredNewName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyOverloadDefaultOptions(get(destinationFolder), get(desiredNewName), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_CopyOverloadDefaultOptions(get_abi(destinationFolder), get_abi(desiredNewName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFile::CopyAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_ref desiredNewName, Windows::Storage::NameCollisionOption option) const +template Windows::Foundation::IAsyncOperation impl_IStorageFile::CopyAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_view desiredNewName, Windows::Storage::NameCollisionOption option) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyOverload(get(destinationFolder), get(desiredNewName), option, put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_CopyOverload(get_abi(destinationFolder), get_abi(desiredNewName), option, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageFile::CopyAndReplaceAsync(const Windows::Storage::IStorageFile & fileToReplace) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CopyAndReplaceAsync(get(fileToReplace), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_CopyAndReplaceAsync(get_abi(fileToReplace), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAsync(const Windows::Storage::IStorageFolder & destinationFolder) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_MoveOverloadDefaultNameAndOptions(get(destinationFolder), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_MoveOverloadDefaultNameAndOptions(get_abi(destinationFolder), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_ref desiredNewName) const +template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_view desiredNewName) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_MoveOverloadDefaultOptions(get(destinationFolder), get(desiredNewName), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_MoveOverloadDefaultOptions(get_abi(destinationFolder), get_abi(desiredNewName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_ref desiredNewName, Windows::Storage::NameCollisionOption option) const +template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAsync(const Windows::Storage::IStorageFolder & destinationFolder, hstring_view desiredNewName, Windows::Storage::NameCollisionOption option) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_MoveOverload(get(destinationFolder), get(desiredNewName), option, put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_MoveOverload(get_abi(destinationFolder), get_abi(desiredNewName), option, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IStorageFile::MoveAndReplaceAsync(const Windows::Storage::IStorageFile & fileToReplace) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_MoveAndReplaceAsync(get(fileToReplace), put(operation))); + check_hresult(WINRT_SHIM(IStorageFile)->abi_MoveAndReplaceAsync(get_abi(fileToReplace), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolderStatics::GetFolderFromPathAsync(hstring_ref path) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolderStatics::GetFolderFromPathAsync(hstring_view path) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFolderFromPathAsync(get(path), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolderStatics)->abi_GetFolderFromPathAsync(get_abi(path), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItem2::GetParentAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetParentAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageItem2)->abi_GetParentAsync(put_abi(operation))); return operation; } template bool impl_IStorageItem2::IsEqual(const Windows::Storage::IStorageItem & item) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(item), &value)); + check_hresult(WINRT_SHIM(IStorageItem2)->abi_IsEqual(get_abi(item), &value)); return value; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties::GetThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(mode, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->abi_GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(mode, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties::GetThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsyncOverloadDefaultOptions(mode, requestedSize, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->abi_GetThumbnailAsyncOverloadDefaultOptions(mode, requestedSize, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties::GetThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, Windows::Storage::FileProperties::ThumbnailOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetThumbnailAsync(mode, requestedSize, options, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->abi_GetThumbnailAsync(mode, requestedSize, options, put_abi(operation))); return operation; } template hstring impl_IStorageItemProperties::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IStorageItemProperties::DisplayType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayType(put(value))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->get_DisplayType(put_abi(value))); return value; } template hstring impl_IStorageItemProperties::FolderRelativeId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FolderRelativeId(put(value))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->get_FolderRelativeId(put_abi(value))); return value; } template Windows::Storage::FileProperties::StorageItemContentProperties impl_IStorageItemProperties::Properties() const { Windows::Storage::FileProperties::StorageItemContentProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IStorageItemProperties)->get_Properties(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties2::GetScaledImageAsThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(mode, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties2)->abi_GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(mode, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties2::GetScaledImageAsThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(mode, requestedSize, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties2)->abi_GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(mode, requestedSize, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageItemProperties2::GetScaledImageAsThumbnailAsync(Windows::Storage::FileProperties::ThumbnailMode mode, uint32_t requestedSize, Windows::Storage::FileProperties::ThumbnailOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetScaledImageAsThumbnailAsync(mode, requestedSize, options, put(operation))); + check_hresult(WINRT_SHIM(IStorageItemProperties2)->abi_GetScaledImageAsThumbnailAsync(mode, requestedSize, options, put_abi(operation))); return operation; } template Windows::Storage::StorageProvider impl_IStorageItemPropertiesWithProvider::Provider() const { Windows::Storage::StorageProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Provider(put(value))); + check_hresult(WINRT_SHIM(IStorageItemPropertiesWithProvider)->get_Provider(put_abi(value))); return value; } template bool impl_IStorageFilePropertiesWithAvailability::IsAvailable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAvailable(&value)); + check_hresult(WINRT_SHIM(IStorageFilePropertiesWithAvailability)->get_IsAvailable(&value)); return value; } template hstring impl_IStorageProvider::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IStorageProvider)->get_Id(put_abi(value))); return value; } template hstring impl_IStorageProvider::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IStorageProvider)->get_DisplayName(put_abi(value))); return value; } -template Windows::Foundation::IAsyncOperation impl_IStorageFolder2::TryGetItemAsync(hstring_ref name) const +template Windows::Foundation::IAsyncOperation impl_IStorageFolder2::TryGetItemAsync(hstring_view name) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryGetItemAsync(get(name), put(operation))); + check_hresult(WINRT_SHIM(IStorageFolder2)->abi_TryGetItemAsync(get_abi(name), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFile2::OpenAsync(Windows::Storage::FileAccessMode accessMode, Windows::Storage::StorageOpenOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenWithOptionsAsync(accessMode, options, put(operation))); + check_hresult(WINRT_SHIM(IStorageFile2)->abi_OpenWithOptionsAsync(accessMode, options, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IStorageFile2::OpenTransactedWriteAsync(Windows::Storage::StorageOpenOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_OpenTransactedWriteWithOptionsAsync(options, put(operation))); + check_hresult(WINRT_SHIM(IStorageFile2)->abi_OpenTransactedWriteWithOptionsAsync(options, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IFileIOStatics::ReadTextAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation textOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadTextAsync(get(file), put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_ReadTextAsync(get_abi(file), put_abi(textOperation))); return textOperation; } template Windows::Foundation::IAsyncOperation impl_IFileIOStatics::ReadTextAsync(const Windows::Storage::IStorageFile & file, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncOperation textOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadTextWithEncodingAsync(get(file), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_ReadTextWithEncodingAsync(get_abi(file), encoding, put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_WriteTextAsync(get(file), get(contents), put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteTextAsync(get_abi(file), get_abi(contents), put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_WriteTextWithEncodingAsync(get(file), get(contents), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteTextWithEncodingAsync(get_abi(file), get_abi(contents), encoding, put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_AppendTextAsync(get(file), get(contents), put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_AppendTextAsync(get_abi(file), get_abi(contents), put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_AppendTextWithEncodingAsync(get(file), get(contents), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_AppendTextWithEncodingAsync(get_abi(file), get_abi(contents), encoding, put_abi(textOperation))); return textOperation; } template Windows::Foundation::IAsyncOperation> impl_IFileIOStatics::ReadLinesAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation> linesOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadLinesAsync(get(file), put(linesOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_ReadLinesAsync(get_abi(file), put_abi(linesOperation))); return linesOperation; } template Windows::Foundation::IAsyncOperation> impl_IFileIOStatics::ReadLinesAsync(const Windows::Storage::IStorageFile & file, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncOperation> linesOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadLinesWithEncodingAsync(get(file), encoding, put(linesOperation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_ReadLinesWithEncodingAsync(get_abi(file), encoding, put_abi(linesOperation))); return linesOperation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteLinesAsync(get(file), get(lines), put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteLinesAsync(get_abi(file), get_abi(lines), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteLinesWithEncodingAsync(get(file), get(lines), encoding, put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteLinesWithEncodingAsync(get_abi(file), get_abi(lines), encoding, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AppendLinesAsync(get(file), get(lines), put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_AppendLinesAsync(get_abi(file), get_abi(lines), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::AppendLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AppendLinesWithEncodingAsync(get(file), get(lines), encoding, put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_AppendLinesWithEncodingAsync(get_abi(file), get_abi(lines), encoding, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IFileIOStatics::ReadBufferAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReadBufferAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_ReadBufferAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteBufferAsync(const Windows::Storage::IStorageFile & file, const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteBufferAsync(get(file), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteBufferAsync(get_abi(file), get_abi(buffer), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteBytesAsync(const Windows::Storage::IStorageFile & file, array_ref buffer) const +template Windows::Foundation::IAsyncAction impl_IFileIOStatics::WriteBytesAsync(const Windows::Storage::IStorageFile & file, array_view buffer) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteBytesAsync(get(file), buffer.size(), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IFileIOStatics)->abi_WriteBytesAsync(get_abi(file), buffer.size(), get_abi(buffer), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadTextAsync(hstring_ref absolutePath) const +template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadTextAsync(hstring_view absolutePath) const { Windows::Foundation::IAsyncOperation textOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadTextAsync(get(absolutePath), put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_ReadTextAsync(get_abi(absolutePath), put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadTextAsync(hstring_ref absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadTextAsync(hstring_view absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncOperation textOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadTextWithEncodingAsync(get(absolutePath), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_ReadTextWithEncodingAsync(get_abi(absolutePath), encoding, put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteTextAsync(hstring_ref absolutePath, hstring_ref contents) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteTextAsync(hstring_view absolutePath, hstring_view contents) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_WriteTextAsync(get(absolutePath), get(contents), put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteTextAsync(get_abi(absolutePath), get_abi(contents), put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteTextAsync(hstring_ref absolutePath, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteTextAsync(hstring_view absolutePath, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_WriteTextWithEncodingAsync(get(absolutePath), get(contents), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteTextWithEncodingAsync(get_abi(absolutePath), get_abi(contents), encoding, put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendTextAsync(hstring_ref absolutePath, hstring_ref contents) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendTextAsync(hstring_view absolutePath, hstring_view contents) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_AppendTextAsync(get(absolutePath), get(contents), put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_AppendTextAsync(get_abi(absolutePath), get_abi(contents), put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendTextAsync(hstring_ref absolutePath, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendTextAsync(hstring_view absolutePath, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction textOperation; - check_hresult(static_cast(static_cast(*this))->abi_AppendTextWithEncodingAsync(get(absolutePath), get(contents), encoding, put(textOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_AppendTextWithEncodingAsync(get_abi(absolutePath), get_abi(contents), encoding, put_abi(textOperation))); return textOperation; } -template Windows::Foundation::IAsyncOperation> impl_IPathIOStatics::ReadLinesAsync(hstring_ref absolutePath) const +template Windows::Foundation::IAsyncOperation> impl_IPathIOStatics::ReadLinesAsync(hstring_view absolutePath) const { Windows::Foundation::IAsyncOperation> linesOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadLinesAsync(get(absolutePath), put(linesOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_ReadLinesAsync(get_abi(absolutePath), put_abi(linesOperation))); return linesOperation; } -template Windows::Foundation::IAsyncOperation> impl_IPathIOStatics::ReadLinesAsync(hstring_ref absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncOperation> impl_IPathIOStatics::ReadLinesAsync(hstring_view absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncOperation> linesOperation; - check_hresult(static_cast(static_cast(*this))->abi_ReadLinesWithEncodingAsync(get(absolutePath), encoding, put(linesOperation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_ReadLinesWithEncodingAsync(get_abi(absolutePath), encoding, put_abi(linesOperation))); return linesOperation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteLinesAsync(hstring_view absolutePath, iterable lines) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteLinesAsync(get(absolutePath), get(lines), put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteLinesAsync(get_abi(absolutePath), get_abi(lines), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteLinesAsync(hstring_view absolutePath, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteLinesWithEncodingAsync(get(absolutePath), get(lines), encoding, put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteLinesWithEncodingAsync(get_abi(absolutePath), get_abi(lines), encoding, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendLinesAsync(hstring_view absolutePath, iterable lines) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AppendLinesAsync(get(absolutePath), get(lines), put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_AppendLinesAsync(get_abi(absolutePath), get_abi(lines), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::AppendLinesAsync(hstring_view absolutePath, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_AppendLinesWithEncodingAsync(get(absolutePath), get(lines), encoding, put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_AppendLinesWithEncodingAsync(get_abi(absolutePath), get_abi(lines), encoding, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadBufferAsync(hstring_ref absolutePath) const +template Windows::Foundation::IAsyncOperation impl_IPathIOStatics::ReadBufferAsync(hstring_view absolutePath) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_ReadBufferAsync(get(absolutePath), put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_ReadBufferAsync(get_abi(absolutePath), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteBufferAsync(hstring_ref absolutePath, const Windows::Storage::Streams::IBuffer & buffer) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteBufferAsync(hstring_view absolutePath, const Windows::Storage::Streams::IBuffer & buffer) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteBufferAsync(get(absolutePath), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteBufferAsync(get_abi(absolutePath), get_abi(buffer), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteBytesAsync(hstring_ref absolutePath, array_ref buffer) const +template Windows::Foundation::IAsyncAction impl_IPathIOStatics::WriteBytesAsync(hstring_view absolutePath, array_view buffer) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_WriteBytesAsync(get(absolutePath), buffer.size(), get(buffer), put(operation))); + check_hresult(WINRT_SHIM(IPathIOStatics)->abi_WriteBytesAsync(get_abi(absolutePath), buffer.size(), get_abi(buffer), put_abi(operation))); return operation; } template void impl_ICachedFileManagerStatics::DeferUpdates(const Windows::Storage::IStorageFile & file) const { - check_hresult(static_cast(static_cast(*this))->abi_DeferUpdates(get(file))); + check_hresult(WINRT_SHIM(ICachedFileManagerStatics)->abi_DeferUpdates(get_abi(file))); } template Windows::Foundation::IAsyncOperation impl_ICachedFileManagerStatics::CompleteUpdatesAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_CompleteUpdatesAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(ICachedFileManagerStatics)->abi_CompleteUpdatesAsync(get_abi(file), put_abi(operation))); return operation; } template hstring impl_ISystemAudioProperties::EncodingBitrate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_EncodingBitrate(put(value))); + check_hresult(WINRT_SHIM(ISystemAudioProperties)->get_EncodingBitrate(put_abi(value))); return value; } template hstring impl_ISystemGPSProperties::LatitudeDecimal() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LatitudeDecimal(put(value))); + check_hresult(WINRT_SHIM(ISystemGPSProperties)->get_LatitudeDecimal(put_abi(value))); return value; } template hstring impl_ISystemGPSProperties::LongitudeDecimal() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LongitudeDecimal(put(value))); + check_hresult(WINRT_SHIM(ISystemGPSProperties)->get_LongitudeDecimal(put_abi(value))); return value; } template hstring impl_ISystemImageProperties::HorizontalSize() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HorizontalSize(put(value))); + check_hresult(WINRT_SHIM(ISystemImageProperties)->get_HorizontalSize(put_abi(value))); return value; } template hstring impl_ISystemImageProperties::VerticalSize() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_VerticalSize(put(value))); + check_hresult(WINRT_SHIM(ISystemImageProperties)->get_VerticalSize(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::Duration() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_Duration(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::Producer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Producer(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_Producer(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::Publisher() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Publisher(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_Publisher(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::SubTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubTitle(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_SubTitle(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::Writer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Writer(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_Writer(put_abi(value))); return value; } template hstring impl_ISystemMediaProperties::Year() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Year(put(value))); + check_hresult(WINRT_SHIM(ISystemMediaProperties)->get_Year(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::AlbumArtist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlbumArtist(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_AlbumArtist(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::AlbumTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AlbumTitle(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_AlbumTitle(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::Artist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Artist(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_Artist(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::Composer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Composer(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_Composer(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::Conductor() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Conductor(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_Conductor(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::DisplayArtist() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayArtist(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_DisplayArtist(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::Genre() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Genre(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_Genre(put_abi(value))); return value; } template hstring impl_ISystemMusicProperties::TrackNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TrackNumber(put(value))); + check_hresult(WINRT_SHIM(ISystemMusicProperties)->get_TrackNumber(put_abi(value))); return value; } template hstring impl_ISystemPhotoProperties::CameraManufacturer() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CameraManufacturer(put(value))); + check_hresult(WINRT_SHIM(ISystemPhotoProperties)->get_CameraManufacturer(put_abi(value))); return value; } template hstring impl_ISystemPhotoProperties::CameraModel() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CameraModel(put(value))); + check_hresult(WINRT_SHIM(ISystemPhotoProperties)->get_CameraModel(put_abi(value))); return value; } template hstring impl_ISystemPhotoProperties::DateTaken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DateTaken(put(value))); + check_hresult(WINRT_SHIM(ISystemPhotoProperties)->get_DateTaken(put_abi(value))); return value; } template hstring impl_ISystemPhotoProperties::Orientation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(ISystemPhotoProperties)->get_Orientation(put_abi(value))); return value; } template hstring impl_ISystemPhotoProperties::PeopleNames() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PeopleNames(put(value))); + check_hresult(WINRT_SHIM(ISystemPhotoProperties)->get_PeopleNames(put_abi(value))); return value; } template hstring impl_ISystemVideoProperties::Director() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Director(put(value))); + check_hresult(WINRT_SHIM(ISystemVideoProperties)->get_Director(put_abi(value))); return value; } template hstring impl_ISystemVideoProperties::FrameHeight() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrameHeight(put(value))); + check_hresult(WINRT_SHIM(ISystemVideoProperties)->get_FrameHeight(put_abi(value))); return value; } template hstring impl_ISystemVideoProperties::FrameWidth() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrameWidth(put(value))); + check_hresult(WINRT_SHIM(ISystemVideoProperties)->get_FrameWidth(put_abi(value))); return value; } template hstring impl_ISystemVideoProperties::Orientation() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(ISystemVideoProperties)->get_Orientation(put_abi(value))); return value; } template hstring impl_ISystemVideoProperties::TotalBitrate() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TotalBitrate(put(value))); + check_hresult(WINRT_SHIM(ISystemVideoProperties)->get_TotalBitrate(put_abi(value))); return value; } template hstring impl_ISystemProperties::Author() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Author(put_abi(value))); return value; } template hstring impl_ISystemProperties::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Comment(put_abi(value))); return value; } template hstring impl_ISystemProperties::ItemNameDisplay() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ItemNameDisplay(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_ItemNameDisplay(put_abi(value))); return value; } template hstring impl_ISystemProperties::Keywords() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Keywords(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Keywords(put_abi(value))); return value; } template hstring impl_ISystemProperties::Rating() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Rating(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Rating(put_abi(value))); return value; } template hstring impl_ISystemProperties::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Title(put_abi(value))); return value; } template Windows::Storage::SystemAudioProperties impl_ISystemProperties::Audio() const { Windows::Storage::SystemAudioProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Audio(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Audio(put_abi(value))); return value; } template Windows::Storage::SystemGPSProperties impl_ISystemProperties::GPS() const { Windows::Storage::SystemGPSProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GPS(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_GPS(put_abi(value))); return value; } template Windows::Storage::SystemMediaProperties impl_ISystemProperties::Media() const { Windows::Storage::SystemMediaProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Media(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Media(put_abi(value))); return value; } template Windows::Storage::SystemMusicProperties impl_ISystemProperties::Music() const { Windows::Storage::SystemMusicProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Music(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Music(put_abi(value))); return value; } template Windows::Storage::SystemPhotoProperties impl_ISystemProperties::Photo() const { Windows::Storage::SystemPhotoProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Photo(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Photo(put_abi(value))); return value; } template Windows::Storage::SystemVideoProperties impl_ISystemProperties::Video() const { Windows::Storage::SystemVideoProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Video(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Video(put_abi(value))); return value; } template Windows::Storage::SystemImageProperties impl_ISystemProperties::Image() const { Windows::Storage::SystemImageProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(ISystemProperties)->get_Image(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_IStorageStreamTransaction::Stream() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->get_Stream(put(value))); + check_hresult(WINRT_SHIM(IStorageStreamTransaction)->get_Stream(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IStorageStreamTransaction::CommitAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_CommitAsync(put(operation))); + check_hresult(WINRT_SHIM(IStorageStreamTransaction)->abi_CommitAsync(put_abi(operation))); return operation; } template Windows::Storage::ApplicationData impl_IApplicationDataStatics::Current() const { Windows::Storage::ApplicationData value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IApplicationDataStatics)->get_Current(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IApplicationDataStatics2::GetForUserAsync(const Windows::System::User & user) const { Windows::Foundation::IAsyncOperation getForUserOperation; - check_hresult(static_cast(static_cast(*this))->abi_GetForUserAsync(get(user), put(getForUserOperation))); + check_hresult(WINRT_SHIM(IApplicationDataStatics2)->abi_GetForUserAsync(get_abi(user), put_abi(getForUserOperation))); return getForUserOperation; } template uint32_t impl_IApplicationData::Version() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Version(&value)); + check_hresult(WINRT_SHIM(IApplicationData)->get_Version(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IApplicationData::SetVersionAsync(uint32_t desiredVersion, const Windows::Storage::ApplicationDataSetVersionHandler & handler) const { Windows::Foundation::IAsyncAction setVersionOperation; - check_hresult(static_cast(static_cast(*this))->abi_SetVersionAsync(desiredVersion, get(handler), put(setVersionOperation))); + check_hresult(WINRT_SHIM(IApplicationData)->abi_SetVersionAsync(desiredVersion, get_abi(handler), put_abi(setVersionOperation))); return setVersionOperation; } template Windows::Foundation::IAsyncAction impl_IApplicationData::ClearAsync() const { Windows::Foundation::IAsyncAction clearOperation; - check_hresult(static_cast(static_cast(*this))->abi_ClearAllAsync(put(clearOperation))); + check_hresult(WINRT_SHIM(IApplicationData)->abi_ClearAllAsync(put_abi(clearOperation))); return clearOperation; } template Windows::Foundation::IAsyncAction impl_IApplicationData::ClearAsync(Windows::Storage::ApplicationDataLocality locality) const { Windows::Foundation::IAsyncAction clearOperation; - check_hresult(static_cast(static_cast(*this))->abi_ClearAsync(locality, put(clearOperation))); + check_hresult(WINRT_SHIM(IApplicationData)->abi_ClearAsync(locality, put_abi(clearOperation))); return clearOperation; } template Windows::Storage::ApplicationDataContainer impl_IApplicationData::LocalSettings() const { Windows::Storage::ApplicationDataContainer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalSettings(put(value))); + check_hresult(WINRT_SHIM(IApplicationData)->get_LocalSettings(put_abi(value))); return value; } template Windows::Storage::ApplicationDataContainer impl_IApplicationData::RoamingSettings() const { Windows::Storage::ApplicationDataContainer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RoamingSettings(put(value))); + check_hresult(WINRT_SHIM(IApplicationData)->get_RoamingSettings(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IApplicationData::LocalFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalFolder(put(value))); + check_hresult(WINRT_SHIM(IApplicationData)->get_LocalFolder(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IApplicationData::RoamingFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RoamingFolder(put(value))); + check_hresult(WINRT_SHIM(IApplicationData)->get_RoamingFolder(put_abi(value))); return value; } template Windows::Storage::StorageFolder impl_IApplicationData::TemporaryFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemporaryFolder(put(value))); + check_hresult(WINRT_SHIM(IApplicationData)->get_TemporaryFolder(put_abi(value))); return value; } -template event_token impl_IApplicationData::DataChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IApplicationData::DataChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DataChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IApplicationData)->add_DataChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IApplicationData::DataChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IApplicationData::DataChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::Storage::IApplicationData::remove_DataChanged, DataChanged(handler)); } template void impl_IApplicationData::DataChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DataChanged(token)); + check_hresult(WINRT_SHIM(IApplicationData)->remove_DataChanged(token)); } template void impl_IApplicationData::SignalDataChanged() const { - check_hresult(static_cast(static_cast(*this))->abi_SignalDataChanged()); + check_hresult(WINRT_SHIM(IApplicationData)->abi_SignalDataChanged()); } template uint64_t impl_IApplicationData::RoamingStorageQuota() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RoamingStorageQuota(&value)); + check_hresult(WINRT_SHIM(IApplicationData)->get_RoamingStorageQuota(&value)); return value; } template Windows::Storage::StorageFolder impl_IApplicationData2::LocalCacheFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalCacheFolder(put(value))); + check_hresult(WINRT_SHIM(IApplicationData2)->get_LocalCacheFolder(put_abi(value))); return value; } -template Windows::Storage::StorageFolder impl_IApplicationData3::GetPublisherCacheFolder(hstring_ref folderName) const +template Windows::Storage::StorageFolder impl_IApplicationData3::GetPublisherCacheFolder(hstring_view folderName) const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPublisherCacheFolder(get(folderName), put(value))); + check_hresult(WINRT_SHIM(IApplicationData3)->abi_GetPublisherCacheFolder(get_abi(folderName), put_abi(value))); return value; } -template Windows::Foundation::IAsyncAction impl_IApplicationData3::ClearPublisherCacheFolderAsync(hstring_ref folderName) const +template Windows::Foundation::IAsyncAction impl_IApplicationData3::ClearPublisherCacheFolderAsync(hstring_view folderName) const { Windows::Foundation::IAsyncAction clearOperation; - check_hresult(static_cast(static_cast(*this))->abi_ClearPublisherCacheFolderAsync(get(folderName), put(clearOperation))); + check_hresult(WINRT_SHIM(IApplicationData3)->abi_ClearPublisherCacheFolderAsync(get_abi(folderName), put_abi(clearOperation))); return clearOperation; } template Windows::Storage::StorageFolder impl_IApplicationData3::SharedLocalFolder() const { Windows::Storage::StorageFolder value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SharedLocalFolder(put(value))); + check_hresult(WINRT_SHIM(IApplicationData3)->get_SharedLocalFolder(put_abi(value))); return value; } template uint32_t impl_ISetVersionRequest::CurrentVersion() const { uint32_t currentVersion {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentVersion(¤tVersion)); + check_hresult(WINRT_SHIM(ISetVersionRequest)->get_CurrentVersion(¤tVersion)); return currentVersion; } template uint32_t impl_ISetVersionRequest::DesiredVersion() const { uint32_t desiredVersion {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredVersion(&desiredVersion)); + check_hresult(WINRT_SHIM(ISetVersionRequest)->get_DesiredVersion(&desiredVersion)); return desiredVersion; } template Windows::Storage::SetVersionDeferral impl_ISetVersionRequest::GetDeferral() const { Windows::Storage::SetVersionDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(ISetVersionRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_ISetVersionDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(ISetVersionDeferral)->abi_Complete()); } template hstring impl_IApplicationDataContainer::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->get_Name(put_abi(value))); return value; } template Windows::Storage::ApplicationDataLocality impl_IApplicationDataContainer::Locality() const { Windows::Storage::ApplicationDataLocality value {}; - check_hresult(static_cast(static_cast(*this))->get_Locality(&value)); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->get_Locality(&value)); return value; } template Windows::Foundation::Collections::IPropertySet impl_IApplicationDataContainer::Values() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_Values(put(value))); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->get_Values(put_abi(value))); return value; } template Windows::Foundation::Collections::IMapView impl_IApplicationDataContainer::Containers() const { Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Containers(put(value))); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->get_Containers(put_abi(value))); return value; } -template Windows::Storage::ApplicationDataContainer impl_IApplicationDataContainer::CreateContainer(hstring_ref name, Windows::Storage::ApplicationDataCreateDisposition disposition) const +template Windows::Storage::ApplicationDataContainer impl_IApplicationDataContainer::CreateContainer(hstring_view name, Windows::Storage::ApplicationDataCreateDisposition disposition) const { Windows::Storage::ApplicationDataContainer container { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateContainer(get(name), disposition, put(container))); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->abi_CreateContainer(get_abi(name), disposition, put_abi(container))); return container; } -template void impl_IApplicationDataContainer::DeleteContainer(hstring_ref name) const +template void impl_IApplicationDataContainer::DeleteContainer(hstring_view name) const { - check_hresult(static_cast(static_cast(*this))->abi_DeleteContainer(get(name))); + check_hresult(WINRT_SHIM(IApplicationDataContainer)->abi_DeleteContainer(get_abi(name))); } inline Windows::Storage::ApplicationData ApplicationData::Current() @@ -4554,42 +4762,42 @@ inline Windows::Foundation::IAsyncOperation().CompleteUpdatesAsync(file); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileAsync(hstring_ref desiredName) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileAsync(hstring_view desiredName) { return get_activation_factory().CreateFileAsync(desiredName); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderAsync(hstring_ref desiredName) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderAsync(hstring_view desiredName) { return get_activation_factory().CreateFolderAsync(desiredName); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption option) { return get_activation_factory().CreateFileAsync(desiredName, option); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderAsync(hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderAsync(hstring_view desiredName, Windows::Storage::CreationCollisionOption option) { return get_activation_factory().CreateFolderAsync(desiredName, option); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileForUserAsync(const Windows::System::User & user, hstring_ref desiredName) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileForUserAsync(const Windows::System::User & user, hstring_view desiredName) { return get_activation_factory().CreateFileForUserAsync(user, desiredName); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderForUserAsync(const Windows::System::User & user, hstring_ref desiredName) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderForUserAsync(const Windows::System::User & user, hstring_view desiredName) { return get_activation_factory().CreateFolderForUserAsync(user, desiredName); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileForUserAsync(const Windows::System::User & user, hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFileForUserAsync(const Windows::System::User & user, hstring_view desiredName, Windows::Storage::CreationCollisionOption option) { return get_activation_factory().CreateFileForUserAsync(user, desiredName, option); } -inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderForUserAsync(const Windows::System::User & user, hstring_ref desiredName, Windows::Storage::CreationCollisionOption option) +inline Windows::Foundation::IAsyncOperation DownloadsFolder::CreateFolderForUserAsync(const Windows::System::User & user, hstring_view desiredName, Windows::Storage::CreationCollisionOption option) { return get_activation_factory().CreateFolderForUserAsync(user, desiredName, option); } @@ -4604,22 +4812,22 @@ inline Windows::Foundation::IAsyncOperation FileIO::ReadTextAsync(const return get_activation_factory().ReadTextAsync(file, encoding); } -inline Windows::Foundation::IAsyncAction FileIO::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents) +inline Windows::Foundation::IAsyncAction FileIO::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents) { return get_activation_factory().WriteTextAsync(file, contents); } -inline Windows::Foundation::IAsyncAction FileIO::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction FileIO::WriteTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().WriteTextAsync(file, contents, encoding); } -inline Windows::Foundation::IAsyncAction FileIO::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents) +inline Windows::Foundation::IAsyncAction FileIO::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents) { return get_activation_factory().AppendTextAsync(file, contents); } -inline Windows::Foundation::IAsyncAction FileIO::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction FileIO::AppendTextAsync(const Windows::Storage::IStorageFile & file, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().AppendTextAsync(file, contents, encoding); } @@ -4634,22 +4842,22 @@ inline Windows::Foundation::IAsyncOperation().ReadLinesAsync(file, encoding); } -inline Windows::Foundation::IAsyncAction FileIO::WriteLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines) +inline Windows::Foundation::IAsyncAction FileIO::WriteLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines) { return get_activation_factory().WriteLinesAsync(file, lines); } -inline Windows::Foundation::IAsyncAction FileIO::WriteLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction FileIO::WriteLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().WriteLinesAsync(file, lines, encoding); } -inline Windows::Foundation::IAsyncAction FileIO::AppendLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines) +inline Windows::Foundation::IAsyncAction FileIO::AppendLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines) { return get_activation_factory().AppendLinesAsync(file, lines); } -inline Windows::Foundation::IAsyncAction FileIO::AppendLinesAsync(const Windows::Storage::IStorageFile & file, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction FileIO::AppendLinesAsync(const Windows::Storage::IStorageFile & file, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().AppendLinesAsync(file, lines, encoding); } @@ -4664,7 +4872,7 @@ inline Windows::Foundation::IAsyncAction FileIO::WriteBufferAsync(const Windows: return get_activation_factory().WriteBufferAsync(file, buffer); } -inline Windows::Foundation::IAsyncAction FileIO::WriteBytesAsync(const Windows::Storage::IStorageFile & file, array_ref buffer) +inline Windows::Foundation::IAsyncAction FileIO::WriteBytesAsync(const Windows::Storage::IStorageFile & file, array_view buffer) { return get_activation_factory().WriteBytesAsync(file, buffer); } @@ -4739,82 +4947,82 @@ inline Windows::Foundation::IAsyncOperation Kno return get_activation_factory().GetFolderForUserAsync(user, folderId); } -inline Windows::Foundation::IAsyncOperation PathIO::ReadTextAsync(hstring_ref absolutePath) +inline Windows::Foundation::IAsyncOperation PathIO::ReadTextAsync(hstring_view absolutePath) { return get_activation_factory().ReadTextAsync(absolutePath); } -inline Windows::Foundation::IAsyncOperation PathIO::ReadTextAsync(hstring_ref absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncOperation PathIO::ReadTextAsync(hstring_view absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().ReadTextAsync(absolutePath, encoding); } -inline Windows::Foundation::IAsyncAction PathIO::WriteTextAsync(hstring_ref absolutePath, hstring_ref contents) +inline Windows::Foundation::IAsyncAction PathIO::WriteTextAsync(hstring_view absolutePath, hstring_view contents) { return get_activation_factory().WriteTextAsync(absolutePath, contents); } -inline Windows::Foundation::IAsyncAction PathIO::WriteTextAsync(hstring_ref absolutePath, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction PathIO::WriteTextAsync(hstring_view absolutePath, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().WriteTextAsync(absolutePath, contents, encoding); } -inline Windows::Foundation::IAsyncAction PathIO::AppendTextAsync(hstring_ref absolutePath, hstring_ref contents) +inline Windows::Foundation::IAsyncAction PathIO::AppendTextAsync(hstring_view absolutePath, hstring_view contents) { return get_activation_factory().AppendTextAsync(absolutePath, contents); } -inline Windows::Foundation::IAsyncAction PathIO::AppendTextAsync(hstring_ref absolutePath, hstring_ref contents, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction PathIO::AppendTextAsync(hstring_view absolutePath, hstring_view contents, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().AppendTextAsync(absolutePath, contents, encoding); } -inline Windows::Foundation::IAsyncOperation> PathIO::ReadLinesAsync(hstring_ref absolutePath) +inline Windows::Foundation::IAsyncOperation> PathIO::ReadLinesAsync(hstring_view absolutePath) { return get_activation_factory().ReadLinesAsync(absolutePath); } -inline Windows::Foundation::IAsyncOperation> PathIO::ReadLinesAsync(hstring_ref absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncOperation> PathIO::ReadLinesAsync(hstring_view absolutePath, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().ReadLinesAsync(absolutePath, encoding); } -inline Windows::Foundation::IAsyncAction PathIO::WriteLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines) +inline Windows::Foundation::IAsyncAction PathIO::WriteLinesAsync(hstring_view absolutePath, iterable lines) { return get_activation_factory().WriteLinesAsync(absolutePath, lines); } -inline Windows::Foundation::IAsyncAction PathIO::WriteLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction PathIO::WriteLinesAsync(hstring_view absolutePath, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().WriteLinesAsync(absolutePath, lines, encoding); } -inline Windows::Foundation::IAsyncAction PathIO::AppendLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines) +inline Windows::Foundation::IAsyncAction PathIO::AppendLinesAsync(hstring_view absolutePath, iterable lines) { return get_activation_factory().AppendLinesAsync(absolutePath, lines); } -inline Windows::Foundation::IAsyncAction PathIO::AppendLinesAsync(hstring_ref absolutePath, const Windows::Foundation::Collections::IIterable & lines, Windows::Storage::Streams::UnicodeEncoding encoding) +inline Windows::Foundation::IAsyncAction PathIO::AppendLinesAsync(hstring_view absolutePath, iterable lines, Windows::Storage::Streams::UnicodeEncoding encoding) { return get_activation_factory().AppendLinesAsync(absolutePath, lines, encoding); } -inline Windows::Foundation::IAsyncOperation PathIO::ReadBufferAsync(hstring_ref absolutePath) +inline Windows::Foundation::IAsyncOperation PathIO::ReadBufferAsync(hstring_view absolutePath) { return get_activation_factory().ReadBufferAsync(absolutePath); } -inline Windows::Foundation::IAsyncAction PathIO::WriteBufferAsync(hstring_ref absolutePath, const Windows::Storage::Streams::IBuffer & buffer) +inline Windows::Foundation::IAsyncAction PathIO::WriteBufferAsync(hstring_view absolutePath, const Windows::Storage::Streams::IBuffer & buffer) { return get_activation_factory().WriteBufferAsync(absolutePath, buffer); } -inline Windows::Foundation::IAsyncAction PathIO::WriteBytesAsync(hstring_ref absolutePath, array_ref buffer) +inline Windows::Foundation::IAsyncAction PathIO::WriteBytesAsync(hstring_view absolutePath, array_view buffer) { return get_activation_factory().WriteBytesAsync(absolutePath, buffer); } -inline Windows::Foundation::IAsyncOperation StorageFile::GetFileFromPathAsync(hstring_ref path) +inline Windows::Foundation::IAsyncOperation StorageFile::GetFileFromPathAsync(hstring_view path) { return get_activation_factory().GetFileFromPathAsync(path); } @@ -4824,7 +5032,7 @@ inline Windows::Foundation::IAsyncOperation Stora return get_activation_factory().GetFileFromApplicationUriAsync(uri); } -inline Windows::Foundation::IAsyncOperation StorageFile::CreateStreamedFileAsync(hstring_ref displayNameWithExtension, const Windows::Storage::StreamedFileDataRequestedHandler & dataRequested, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) +inline Windows::Foundation::IAsyncOperation StorageFile::CreateStreamedFileAsync(hstring_view displayNameWithExtension, const Windows::Storage::StreamedFileDataRequestedHandler & dataRequested, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) { return get_activation_factory().CreateStreamedFileAsync(displayNameWithExtension, dataRequested, thumbnail); } @@ -4834,7 +5042,7 @@ inline Windows::Foundation::IAsyncOperation Stora return get_activation_factory().ReplaceWithStreamedFileAsync(fileToReplace, dataRequested, thumbnail); } -inline Windows::Foundation::IAsyncOperation StorageFile::CreateStreamedFileFromUriAsync(hstring_ref displayNameWithExtension, const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) +inline Windows::Foundation::IAsyncOperation StorageFile::CreateStreamedFileFromUriAsync(hstring_view displayNameWithExtension, const Windows::Foundation::Uri & uri, const Windows::Storage::Streams::IRandomAccessStreamReference & thumbnail) { return get_activation_factory().CreateStreamedFileFromUriAsync(displayNameWithExtension, uri, thumbnail); } @@ -4844,7 +5052,7 @@ inline Windows::Foundation::IAsyncOperation Stora return get_activation_factory().ReplaceWithStreamedFileFromUriAsync(fileToReplace, uri, thumbnail); } -inline Windows::Foundation::IAsyncOperation StorageFolder::GetFolderFromPathAsync(hstring_ref path) +inline Windows::Foundation::IAsyncOperation StorageFolder::GetFolderFromPathAsync(hstring_view path) { return get_activation_factory().GetFolderFromPathAsync(path); } @@ -4927,3 +5135,644 @@ inline Windows::Storage::SystemImageProperties SystemProperties::Image() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationData2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationData3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationDataContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationDataStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IApplicationDataStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ICachedFileManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IDownloadsFolderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IDownloadsFolderStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IFileIOStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersCameraRollStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersPlaylistsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersSavedPicturesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IKnownFoldersStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IPathIOStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISetVersionDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISetVersionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFile2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFilePropertiesWithAvailability & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFolder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFolder2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageFolderStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageItem2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageItemProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageItemProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageItemPropertiesWithProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibrary & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibrary2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibraryChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibraryChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibraryChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibraryStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageLibraryStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStorageStreamTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::IStreamedFileDataRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemAudioProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemGPSProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemImageProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemMediaProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemMusicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemPhotoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ISystemVideoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ApplicationData & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ApplicationDataCompositeValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ApplicationDataContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::ApplicationDataContainerSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SetVersionDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SetVersionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageFile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageFolder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageLibrary & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageLibraryChange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageLibraryChangeReader & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageLibraryChangeTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StorageStreamTransaction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::StreamedFileDataRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemAudioProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemGPSProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemImageProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemMediaProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemMusicProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemPhotoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::Storage::SystemVideoProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Diagnostics.h b/10.0.14393.0/winrt/Windows.System.Diagnostics.h index 14cf18946..1a26d594e 100644 --- a/10.0.14393.0/winrt/Windows.System.Diagnostics.h +++ b/10.0.14393.0/winrt/Windows.System.Diagnostics.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.System.Diagnostics.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_GetReport(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetReport(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetReport()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_KernelTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_KernelTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KernelTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KernelTime()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produc } } - HRESULT __stdcall get_UserTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_UserTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UserTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserTime()); return S_OK; } catch (...) @@ -67,7 +73,8 @@ struct produce : produc { try { - *value = detach(this->shim().ProcessId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProcessId()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce : produc } } - HRESULT __stdcall get_ExecutableFileName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExecutableFileName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExecutableFileName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExecutableFileName()); return S_OK; } catch (...) @@ -90,11 +98,12 @@ struct produce : produc } } - HRESULT __stdcall get_Parent(abi_arg_out value) noexcept override + HRESULT __stdcall get_Parent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Parent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Parent()); return S_OK; } catch (...) @@ -104,11 +113,12 @@ struct produce : produc } } - HRESULT __stdcall get_ProcessStartTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProcessStartTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProcessStartTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProcessStartTime()); return S_OK; } catch (...) @@ -117,11 +127,12 @@ struct produce : produc } } - HRESULT __stdcall get_DiskUsage(abi_arg_out value) noexcept override + HRESULT __stdcall get_DiskUsage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DiskUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiskUsage()); return S_OK; } catch (...) @@ -131,11 +142,12 @@ struct produce : produc } } - HRESULT __stdcall get_MemoryUsage(abi_arg_out value) noexcept override + HRESULT __stdcall get_MemoryUsage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MemoryUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MemoryUsage()); return S_OK; } catch (...) @@ -145,11 +157,12 @@ struct produce : produc } } - HRESULT __stdcall get_CpuUsage(abi_arg_out value) noexcept override + HRESULT __stdcall get_CpuUsage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CpuUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CpuUsage()); return S_OK; } catch (...) @@ -163,11 +176,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetForProcesses(abi_arg_out> processes) noexcept override + HRESULT __stdcall abi_GetForProcesses(impl::abi_arg_out> processes) noexcept override { try { - *processes = detach(this->shim().GetForProcesses()); + typename D::abi_guard guard(this->shim()); + *processes = detach_abi(this->shim().GetForProcesses()); return S_OK; } catch (...) @@ -177,11 +191,12 @@ struct produce : } } - HRESULT __stdcall abi_GetForCurrentProcess(abi_arg_out processes) noexcept override + HRESULT __stdcall abi_GetForCurrentProcess(impl::abi_arg_out processes) noexcept override { try { - *processes = detach(this->shim().GetForCurrentProcess()); + typename D::abi_guard guard(this->shim()); + *processes = detach_abi(this->shim().GetForCurrentProcess()); return S_OK; } catch (...) @@ -195,11 +210,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetReport(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetReport(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetReport()); return S_OK; } catch (...) @@ -217,7 +233,8 @@ struct produce : produ { try { - *value = detach(this->shim().ReadOperationCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReadOperationCount()); return S_OK; } catch (...) @@ -230,7 +247,8 @@ struct produce : produ { try { - *value = detach(this->shim().WriteOperationCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WriteOperationCount()); return S_OK; } catch (...) @@ -243,7 +261,8 @@ struct produce : produ { try { - *value = detach(this->shim().OtherOperationCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherOperationCount()); return S_OK; } catch (...) @@ -256,7 +275,8 @@ struct produce : produ { try { - *value = detach(this->shim().BytesReadCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesReadCount()); return S_OK; } catch (...) @@ -269,7 +289,8 @@ struct produce : produ { try { - *value = detach(this->shim().BytesWrittenCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BytesWrittenCount()); return S_OK; } catch (...) @@ -282,7 +303,8 @@ struct produce : produ { try { - *value = detach(this->shim().OtherBytesCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OtherBytesCount()); return S_OK; } catch (...) @@ -295,11 +317,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetReport(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetReport(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetReport()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetReport()); return S_OK; } catch (...) @@ -317,7 +340,8 @@ struct produce : pro { try { - *value = detach(this->shim().NonPagedPoolSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonPagedPoolSizeInBytes()); return S_OK; } catch (...) @@ -330,7 +354,8 @@ struct produce : pro { try { - *value = detach(this->shim().PageFaultCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageFaultCount()); return S_OK; } catch (...) @@ -343,7 +368,8 @@ struct produce : pro { try { - *value = detach(this->shim().PageFileSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageFileSizeInBytes()); return S_OK; } catch (...) @@ -356,7 +382,8 @@ struct produce : pro { try { - *value = detach(this->shim().PagedPoolSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PagedPoolSizeInBytes()); return S_OK; } catch (...) @@ -369,7 +396,8 @@ struct produce : pro { try { - *value = detach(this->shim().PeakNonPagedPoolSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakNonPagedPoolSizeInBytes()); return S_OK; } catch (...) @@ -382,7 +410,8 @@ struct produce : pro { try { - *value = detach(this->shim().PeakPageFileSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakPageFileSizeInBytes()); return S_OK; } catch (...) @@ -395,7 +424,8 @@ struct produce : pro { try { - *value = detach(this->shim().PeakPagedPoolSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakPagedPoolSizeInBytes()); return S_OK; } catch (...) @@ -408,7 +438,8 @@ struct produce : pro { try { - *value = detach(this->shim().PeakVirtualMemorySizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakVirtualMemorySizeInBytes()); return S_OK; } catch (...) @@ -421,7 +452,8 @@ struct produce : pro { try { - *value = detach(this->shim().PeakWorkingSetSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakWorkingSetSizeInBytes()); return S_OK; } catch (...) @@ -434,7 +466,8 @@ struct produce : pro { try { - *value = detach(this->shim().PrivatePageCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrivatePageCount()); return S_OK; } catch (...) @@ -447,7 +480,8 @@ struct produce : pro { try { - *value = detach(this->shim().VirtualMemorySizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VirtualMemorySizeInBytes()); return S_OK; } catch (...) @@ -460,7 +494,8 @@ struct produce : pro { try { - *value = detach(this->shim().WorkingSetSizeInBytes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkingSetSizeInBytes()); return S_OK; } catch (...) @@ -477,224 +512,224 @@ namespace Windows::System::Diagnostics { template uint32_t impl_IProcessDiagnosticInfo::ProcessId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ProcessId(&value)); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_ProcessId(&value)); return value; } template hstring impl_IProcessDiagnosticInfo::ExecutableFileName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExecutableFileName(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_ExecutableFileName(put_abi(value))); return value; } template Windows::System::Diagnostics::ProcessDiagnosticInfo impl_IProcessDiagnosticInfo::Parent() const { Windows::System::Diagnostics::ProcessDiagnosticInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Parent(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_Parent(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IProcessDiagnosticInfo::ProcessStartTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_ProcessStartTime(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_ProcessStartTime(put_abi(value))); return value; } template Windows::System::Diagnostics::ProcessDiskUsage impl_IProcessDiagnosticInfo::DiskUsage() const { Windows::System::Diagnostics::ProcessDiskUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DiskUsage(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_DiskUsage(put_abi(value))); return value; } template Windows::System::Diagnostics::ProcessMemoryUsage impl_IProcessDiagnosticInfo::MemoryUsage() const { Windows::System::Diagnostics::ProcessMemoryUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MemoryUsage(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_MemoryUsage(put_abi(value))); return value; } template Windows::System::Diagnostics::ProcessCpuUsage impl_IProcessDiagnosticInfo::CpuUsage() const { Windows::System::Diagnostics::ProcessCpuUsage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CpuUsage(put(value))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfo)->get_CpuUsage(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IProcessDiagnosticInfoStatics::GetForProcesses() const { Windows::Foundation::Collections::IVectorView processes; - check_hresult(static_cast(static_cast(*this))->abi_GetForProcesses(put(processes))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfoStatics)->abi_GetForProcesses(put_abi(processes))); return processes; } template Windows::System::Diagnostics::ProcessDiagnosticInfo impl_IProcessDiagnosticInfoStatics::GetForCurrentProcess() const { Windows::System::Diagnostics::ProcessDiagnosticInfo processes { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentProcess(put(processes))); + check_hresult(WINRT_SHIM(IProcessDiagnosticInfoStatics)->abi_GetForCurrentProcess(put_abi(processes))); return processes; } template Windows::System::Diagnostics::ProcessMemoryUsageReport impl_IProcessMemoryUsage::GetReport() const { Windows::System::Diagnostics::ProcessMemoryUsageReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetReport(put(value))); + check_hresult(WINRT_SHIM(IProcessMemoryUsage)->abi_GetReport(put_abi(value))); return value; } template uint64_t impl_IProcessMemoryUsageReport::NonPagedPoolSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NonPagedPoolSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_NonPagedPoolSizeInBytes(&value)); return value; } template uint32_t impl_IProcessMemoryUsageReport::PageFaultCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PageFaultCount(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PageFaultCount(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PageFileSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PageFileSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PageFileSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PagedPoolSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PagedPoolSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PagedPoolSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PeakNonPagedPoolSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakNonPagedPoolSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PeakNonPagedPoolSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PeakPageFileSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakPageFileSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PeakPageFileSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PeakPagedPoolSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakPagedPoolSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PeakPagedPoolSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PeakVirtualMemorySizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakVirtualMemorySizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PeakVirtualMemorySizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PeakWorkingSetSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakWorkingSetSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PeakWorkingSetSizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::PrivatePageCount() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PrivatePageCount(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_PrivatePageCount(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::VirtualMemorySizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VirtualMemorySizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_VirtualMemorySizeInBytes(&value)); return value; } template uint64_t impl_IProcessMemoryUsageReport::WorkingSetSizeInBytes() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_WorkingSetSizeInBytes(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryUsageReport)->get_WorkingSetSizeInBytes(&value)); return value; } template Windows::System::Diagnostics::ProcessDiskUsageReport impl_IProcessDiskUsage::GetReport() const { Windows::System::Diagnostics::ProcessDiskUsageReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetReport(put(value))); + check_hresult(WINRT_SHIM(IProcessDiskUsage)->abi_GetReport(put_abi(value))); return value; } template int64_t impl_IProcessDiskUsageReport::ReadOperationCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ReadOperationCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_ReadOperationCount(&value)); return value; } template int64_t impl_IProcessDiskUsageReport::WriteOperationCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_WriteOperationCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_WriteOperationCount(&value)); return value; } template int64_t impl_IProcessDiskUsageReport::OtherOperationCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherOperationCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_OtherOperationCount(&value)); return value; } template int64_t impl_IProcessDiskUsageReport::BytesReadCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesReadCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_BytesReadCount(&value)); return value; } template int64_t impl_IProcessDiskUsageReport::BytesWrittenCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BytesWrittenCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_BytesWrittenCount(&value)); return value; } template int64_t impl_IProcessDiskUsageReport::OtherBytesCount() const { int64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OtherBytesCount(&value)); + check_hresult(WINRT_SHIM(IProcessDiskUsageReport)->get_OtherBytesCount(&value)); return value; } template Windows::System::Diagnostics::ProcessCpuUsageReport impl_IProcessCpuUsage::GetReport() const { Windows::System::Diagnostics::ProcessCpuUsageReport value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetReport(put(value))); + check_hresult(WINRT_SHIM(IProcessCpuUsage)->abi_GetReport(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IProcessCpuUsageReport::KernelTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_KernelTime(put(value))); + check_hresult(WINRT_SHIM(IProcessCpuUsageReport)->get_KernelTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IProcessCpuUsageReport::UserTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_UserTime(put(value))); + check_hresult(WINRT_SHIM(IProcessCpuUsageReport)->get_UserTime(put_abi(value))); return value; } @@ -711,3 +746,140 @@ inline Windows::System::Diagnostics::ProcessDiagnosticInfo ProcessDiagnosticInfo } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessCpuUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessCpuUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessDiagnosticInfoStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessDiskUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessDiskUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessMemoryUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessCpuUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessCpuUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessDiagnosticInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessDiskUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessDiskUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessMemoryUsage & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Diagnostics::ProcessMemoryUsageReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Display.h b/10.0.14393.0/winrt/Windows.System.Display.h index 895453cf8..da95bc256 100644 --- a/10.0.14393.0/winrt/Windows.System.Display.h +++ b/10.0.14393.0/winrt/Windows.System.Display.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.Display.3.h" #include "Windows.System.h" @@ -17,6 +20,7 @@ struct produce : produce_baseshim()); this->shim().RequestActive(); return S_OK; } @@ -30,6 +34,7 @@ struct produce : produce_baseshim()); this->shim().RequestRelease(); return S_OK; } @@ -46,12 +51,12 @@ namespace Windows::System::Display { template void impl_IDisplayRequest::RequestActive() const { - check_hresult(static_cast(static_cast(*this))->abi_RequestActive()); + check_hresult(WINRT_SHIM(IDisplayRequest)->abi_RequestActive()); } template void impl_IDisplayRequest::RequestRelease() const { - check_hresult(static_cast(static_cast(*this))->abi_RequestRelease()); + check_hresult(WINRT_SHIM(IDisplayRequest)->abi_RequestRelease()); } inline DisplayRequest::DisplayRequest() : @@ -61,3 +66,23 @@ inline DisplayRequest::DisplayRequest() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Display::IDisplayRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Display::DisplayRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Power.Diagnostics.h b/10.0.14393.0/winrt/Windows.System.Power.Diagnostics.h index 47b4360d5..3882c177f 100644 --- a/10.0.14393.0/winrt/Windows.System.Power.Diagnostics.h +++ b/10.0.14393.0/winrt/Windows.System.Power.Diagnostics.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.Power.Diagnostics.3.h" #include "Windows.System.Power.h" @@ -17,7 +20,8 @@ struct produceshim().DeviceSpecificConversionFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceSpecificConversionFactor()); return S_OK; } catch (...) @@ -30,7 +34,8 @@ struct produceshim().ComputeTotalEnergyUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputeTotalEnergyUsage()); return S_OK; } catch (...) @@ -43,6 +48,7 @@ struct produceshim()); this->shim().ResetTotalEnergyUsage(); return S_OK; } @@ -60,7 +66,8 @@ struct produceshim().DeviceSpecificConversionFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceSpecificConversionFactor()); return S_OK; } catch (...) @@ -73,7 +80,8 @@ struct produceshim().ComputeTotalEnergyUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputeTotalEnergyUsage()); return S_OK; } catch (...) @@ -86,6 +94,7 @@ struct produceshim()); this->shim().ResetTotalEnergyUsage(); return S_OK; } @@ -103,39 +112,39 @@ namespace Windows::System::Power::Diagnostics { template double impl_IBackgroundEnergyDiagnosticsStatics::DeviceSpecificConversionFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceSpecificConversionFactor(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyDiagnosticsStatics)->get_DeviceSpecificConversionFactor(&value)); return value; } template uint64_t impl_IBackgroundEnergyDiagnosticsStatics::ComputeTotalEnergyUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ComputeTotalEnergyUsage(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyDiagnosticsStatics)->abi_ComputeTotalEnergyUsage(&value)); return value; } template void impl_IBackgroundEnergyDiagnosticsStatics::ResetTotalEnergyUsage() const { - check_hresult(static_cast(static_cast(*this))->abi_ResetTotalEnergyUsage()); + check_hresult(WINRT_SHIM(IBackgroundEnergyDiagnosticsStatics)->abi_ResetTotalEnergyUsage()); } template double impl_IForegroundEnergyDiagnosticsStatics::DeviceSpecificConversionFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DeviceSpecificConversionFactor(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyDiagnosticsStatics)->get_DeviceSpecificConversionFactor(&value)); return value; } template uint64_t impl_IForegroundEnergyDiagnosticsStatics::ComputeTotalEnergyUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_ComputeTotalEnergyUsage(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyDiagnosticsStatics)->abi_ComputeTotalEnergyUsage(&value)); return value; } template void impl_IForegroundEnergyDiagnosticsStatics::ResetTotalEnergyUsage() const { - check_hresult(static_cast(static_cast(*this))->abi_ResetTotalEnergyUsage()); + check_hresult(WINRT_SHIM(IForegroundEnergyDiagnosticsStatics)->abi_ResetTotalEnergyUsage()); } inline double BackgroundEnergyDiagnostics::DeviceSpecificConversionFactor() @@ -171,3 +180,23 @@ inline void ForegroundEnergyDiagnostics::ResetTotalEnergyUsage() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Power::Diagnostics::IBackgroundEnergyDiagnosticsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Power::Diagnostics::IForegroundEnergyDiagnosticsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Power.h b/10.0.14393.0/winrt/Windows.System.Power.h index 8321a6070..2838b5b37 100644 --- a/10.0.14393.0/winrt/Windows.System.Power.h +++ b/10.0.14393.0/winrt/Windows.System.Power.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.Power.3.h" #include "Windows.System.h" @@ -18,7 +21,8 @@ struct produce : pro { try { - *value = detach(this->shim().LowUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowUsageLevel()); return S_OK; } catch (...) @@ -31,7 +35,8 @@ struct produce : pro { try { - *value = detach(this->shim().NearMaxAcceptableUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NearMaxAcceptableUsageLevel()); return S_OK; } catch (...) @@ -44,7 +49,8 @@ struct produce : pro { try { - *value = detach(this->shim().MaxAcceptableUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAcceptableUsageLevel()); return S_OK; } catch (...) @@ -57,7 +63,8 @@ struct produce : pro { try { - *value = detach(this->shim().ExcessiveUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExcessiveUsageLevel()); return S_OK; } catch (...) @@ -70,7 +77,8 @@ struct produce : pro { try { - *value = detach(this->shim().NearTerminationUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NearTerminationUsageLevel()); return S_OK; } catch (...) @@ -83,7 +91,8 @@ struct produce : pro { try { - *value = detach(this->shim().TerminationUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TerminationUsageLevel()); return S_OK; } catch (...) @@ -96,7 +105,8 @@ struct produce : pro { try { - *value = detach(this->shim().RecentEnergyUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecentEnergyUsage()); return S_OK; } catch (...) @@ -109,7 +119,8 @@ struct produce : pro { try { - *value = detach(this->shim().RecentEnergyUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecentEnergyUsageLevel()); return S_OK; } catch (...) @@ -118,11 +129,12 @@ struct produce : pro } } - HRESULT __stdcall add_RecentEnergyUsageIncreased(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecentEnergyUsageIncreased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecentEnergyUsageIncreased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecentEnergyUsageIncreased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -135,6 +147,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().RecentEnergyUsageIncreased(token); return S_OK; } @@ -144,11 +157,12 @@ struct produce : pro } } - HRESULT __stdcall add_RecentEnergyUsageReturnedToLow(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecentEnergyUsageReturnedToLow(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecentEnergyUsageReturnedToLow(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecentEnergyUsageReturnedToLow(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -161,6 +175,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().RecentEnergyUsageReturnedToLow(token); return S_OK; } @@ -178,7 +193,8 @@ struct produce : pro { try { - *value = detach(this->shim().LowUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LowUsageLevel()); return S_OK; } catch (...) @@ -191,7 +207,8 @@ struct produce : pro { try { - *value = detach(this->shim().NearMaxAcceptableUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NearMaxAcceptableUsageLevel()); return S_OK; } catch (...) @@ -204,7 +221,8 @@ struct produce : pro { try { - *value = detach(this->shim().MaxAcceptableUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxAcceptableUsageLevel()); return S_OK; } catch (...) @@ -217,7 +235,8 @@ struct produce : pro { try { - *value = detach(this->shim().ExcessiveUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExcessiveUsageLevel()); return S_OK; } catch (...) @@ -230,7 +249,8 @@ struct produce : pro { try { - *value = detach(this->shim().RecentEnergyUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecentEnergyUsage()); return S_OK; } catch (...) @@ -243,7 +263,8 @@ struct produce : pro { try { - *value = detach(this->shim().RecentEnergyUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RecentEnergyUsageLevel()); return S_OK; } catch (...) @@ -252,11 +273,12 @@ struct produce : pro } } - HRESULT __stdcall add_RecentEnergyUsageIncreased(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecentEnergyUsageIncreased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecentEnergyUsageIncreased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecentEnergyUsageIncreased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -269,6 +291,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().RecentEnergyUsageIncreased(token); return S_OK; } @@ -278,11 +301,12 @@ struct produce : pro } } - HRESULT __stdcall add_RecentEnergyUsageReturnedToLow(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecentEnergyUsageReturnedToLow(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecentEnergyUsageReturnedToLow(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecentEnergyUsageReturnedToLow(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -295,6 +319,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().RecentEnergyUsageReturnedToLow(token); return S_OK; } @@ -312,7 +337,8 @@ struct produce : produce_baseshim().EnergySaverStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnergySaverStatus()); return S_OK; } catch (...) @@ -321,11 +347,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnergySaverStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnergySaverStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnergySaverStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -338,6 +365,7 @@ struct produce : produce_baseshim()); this->shim().EnergySaverStatusChanged(token); return S_OK; } @@ -351,7 +379,8 @@ struct produce : produce_baseshim().BatteryStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BatteryStatus()); return S_OK; } catch (...) @@ -360,11 +389,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_BatteryStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BatteryStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BatteryStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -377,6 +407,7 @@ struct produce : produce_baseshim()); this->shim().BatteryStatusChanged(token); return S_OK; } @@ -390,7 +421,8 @@ struct produce : produce_baseshim().PowerSupplyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PowerSupplyStatus()); return S_OK; } catch (...) @@ -399,11 +431,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_PowerSupplyStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().PowerSupplyStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PowerSupplyStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -416,6 +449,7 @@ struct produce : produce_baseshim()); this->shim().PowerSupplyStatusChanged(token); return S_OK; } @@ -429,7 +463,8 @@ struct produce : produce_baseshim().RemainingChargePercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingChargePercent()); return S_OK; } catch (...) @@ -438,11 +473,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemainingChargePercentChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemainingChargePercentChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemainingChargePercentChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -455,6 +491,7 @@ struct produce : produce_baseshim()); this->shim().RemainingChargePercentChanged(token); return S_OK; } @@ -464,11 +501,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RemainingDischargeTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemainingDischargeTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemainingDischargeTime()); return S_OK; } catch (...) @@ -477,11 +515,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemainingDischargeTimeChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemainingDischargeTimeChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemainingDischargeTimeChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -494,6 +533,7 @@ struct produce : produce_baseshim()); this->shim().RemainingDischargeTimeChanged(token); return S_OK; } @@ -511,287 +551,287 @@ namespace Windows::System::Power { template Windows::System::Power::EnergySaverStatus impl_IPowerManagerStatics::EnergySaverStatus() const { Windows::System::Power::EnergySaverStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_EnergySaverStatus(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_EnergySaverStatus(&value)); return value; } -template event_token impl_IPowerManagerStatics::EnergySaverStatusChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPowerManagerStatics::EnergySaverStatusChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnergySaverStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_EnergySaverStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::EnergySaverStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPowerManagerStatics::EnergySaverStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IPowerManagerStatics::remove_EnergySaverStatusChanged, EnergySaverStatusChanged(handler)); } template void impl_IPowerManagerStatics::EnergySaverStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnergySaverStatusChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_EnergySaverStatusChanged(token)); } template Windows::System::Power::BatteryStatus impl_IPowerManagerStatics::BatteryStatus() const { Windows::System::Power::BatteryStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_BatteryStatus(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_BatteryStatus(&value)); return value; } -template event_token impl_IPowerManagerStatics::BatteryStatusChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPowerManagerStatics::BatteryStatusChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BatteryStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_BatteryStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::BatteryStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPowerManagerStatics::BatteryStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IPowerManagerStatics::remove_BatteryStatusChanged, BatteryStatusChanged(handler)); } template void impl_IPowerManagerStatics::BatteryStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BatteryStatusChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_BatteryStatusChanged(token)); } template Windows::System::Power::PowerSupplyStatus impl_IPowerManagerStatics::PowerSupplyStatus() const { Windows::System::Power::PowerSupplyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_PowerSupplyStatus(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_PowerSupplyStatus(&value)); return value; } -template event_token impl_IPowerManagerStatics::PowerSupplyStatusChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPowerManagerStatics::PowerSupplyStatusChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PowerSupplyStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_PowerSupplyStatusChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::PowerSupplyStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPowerManagerStatics::PowerSupplyStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IPowerManagerStatics::remove_PowerSupplyStatusChanged, PowerSupplyStatusChanged(handler)); } template void impl_IPowerManagerStatics::PowerSupplyStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PowerSupplyStatusChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_PowerSupplyStatusChanged(token)); } template int32_t impl_IPowerManagerStatics::RemainingChargePercent() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RemainingChargePercent(&value)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_RemainingChargePercent(&value)); return value; } -template event_token impl_IPowerManagerStatics::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPowerManagerStatics::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemainingChargePercentChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_RemainingChargePercentChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPowerManagerStatics::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IPowerManagerStatics::remove_RemainingChargePercentChanged, RemainingChargePercentChanged(handler)); } template void impl_IPowerManagerStatics::RemainingChargePercentChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemainingChargePercentChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_RemainingChargePercentChanged(token)); } template Windows::Foundation::TimeSpan impl_IPowerManagerStatics::RemainingDischargeTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_RemainingDischargeTime(put(value))); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->get_RemainingDischargeTime(put_abi(value))); return value; } -template event_token impl_IPowerManagerStatics::RemainingDischargeTimeChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPowerManagerStatics::RemainingDischargeTimeChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemainingDischargeTimeChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->add_RemainingDischargeTimeChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPowerManagerStatics::RemainingDischargeTimeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPowerManagerStatics::RemainingDischargeTimeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IPowerManagerStatics::remove_RemainingDischargeTimeChanged, RemainingDischargeTimeChanged(handler)); } template void impl_IPowerManagerStatics::RemainingDischargeTimeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemainingDischargeTimeChanged(token)); + check_hresult(WINRT_SHIM(IPowerManagerStatics)->remove_RemainingDischargeTimeChanged(token)); } template uint32_t impl_IBackgroundEnergyManagerStatics::LowUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LowUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_LowUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::NearMaxAcceptableUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NearMaxAcceptableUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_NearMaxAcceptableUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::MaxAcceptableUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAcceptableUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_MaxAcceptableUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::ExcessiveUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExcessiveUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_ExcessiveUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::NearTerminationUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NearTerminationUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_NearTerminationUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::TerminationUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TerminationUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_TerminationUsageLevel(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::RecentEnergyUsage() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecentEnergyUsage(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_RecentEnergyUsage(&value)); return value; } template uint32_t impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecentEnergyUsageLevel(&value)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->get_RecentEnergyUsageLevel(&value)); return value; } -template event_token impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecentEnergyUsageIncreased(get(handler), &token)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->add_RecentEnergyUsageIncreased(get_abi(handler), &token)); return token; } -template event_revoker impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IBackgroundEnergyManagerStatics::remove_RecentEnergyUsageIncreased, RecentEnergyUsageIncreased(handler)); } template void impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageIncreased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecentEnergyUsageIncreased(token)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->remove_RecentEnergyUsageIncreased(token)); } -template event_token impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecentEnergyUsageReturnedToLow(get(handler), &token)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->add_RecentEnergyUsageReturnedToLow(get_abi(handler), &token)); return token; } -template event_revoker impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IBackgroundEnergyManagerStatics::remove_RecentEnergyUsageReturnedToLow, RecentEnergyUsageReturnedToLow(handler)); } template void impl_IBackgroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecentEnergyUsageReturnedToLow(token)); + check_hresult(WINRT_SHIM(IBackgroundEnergyManagerStatics)->remove_RecentEnergyUsageReturnedToLow(token)); } template uint32_t impl_IForegroundEnergyManagerStatics::LowUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LowUsageLevel(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_LowUsageLevel(&value)); return value; } template uint32_t impl_IForegroundEnergyManagerStatics::NearMaxAcceptableUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NearMaxAcceptableUsageLevel(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_NearMaxAcceptableUsageLevel(&value)); return value; } template uint32_t impl_IForegroundEnergyManagerStatics::MaxAcceptableUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxAcceptableUsageLevel(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_MaxAcceptableUsageLevel(&value)); return value; } template uint32_t impl_IForegroundEnergyManagerStatics::ExcessiveUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExcessiveUsageLevel(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_ExcessiveUsageLevel(&value)); return value; } template uint32_t impl_IForegroundEnergyManagerStatics::RecentEnergyUsage() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecentEnergyUsage(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_RecentEnergyUsage(&value)); return value; } template uint32_t impl_IForegroundEnergyManagerStatics::RecentEnergyUsageLevel() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RecentEnergyUsageLevel(&value)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->get_RecentEnergyUsageLevel(&value)); return value; } -template event_token impl_IForegroundEnergyManagerStatics::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IForegroundEnergyManagerStatics::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecentEnergyUsageIncreased(get(handler), &token)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->add_RecentEnergyUsageIncreased(get_abi(handler), &token)); return token; } -template event_revoker impl_IForegroundEnergyManagerStatics::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IForegroundEnergyManagerStatics::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IForegroundEnergyManagerStatics::remove_RecentEnergyUsageIncreased, RecentEnergyUsageIncreased(handler)); } template void impl_IForegroundEnergyManagerStatics::RecentEnergyUsageIncreased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecentEnergyUsageIncreased(token)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->remove_RecentEnergyUsageIncreased(token)); } -template event_token impl_IForegroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IForegroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecentEnergyUsageReturnedToLow(get(handler), &token)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->add_RecentEnergyUsageReturnedToLow(get_abi(handler), &token)); return token; } -template event_revoker impl_IForegroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IForegroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Power::IForegroundEnergyManagerStatics::remove_RecentEnergyUsageReturnedToLow, RecentEnergyUsageReturnedToLow(handler)); } template void impl_IForegroundEnergyManagerStatics::RecentEnergyUsageReturnedToLow(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecentEnergyUsageReturnedToLow(token)); + check_hresult(WINRT_SHIM(IForegroundEnergyManagerStatics)->remove_RecentEnergyUsageReturnedToLow(token)); } inline uint32_t BackgroundEnergyManager::LowUsageLevel() @@ -834,12 +874,12 @@ inline uint32_t BackgroundEnergyManager::RecentEnergyUsageLevel() return get_activation_factory().RecentEnergyUsageLevel(); } -inline event_token BackgroundEnergyManager::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) +inline event_token BackgroundEnergyManager::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RecentEnergyUsageIncreased(handler); } -inline factory_event_revoker BackgroundEnergyManager::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker BackgroundEnergyManager::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IBackgroundEnergyManagerStatics::remove_RecentEnergyUsageIncreased, factory.RecentEnergyUsageIncreased(handler) }; @@ -850,12 +890,12 @@ inline void BackgroundEnergyManager::RecentEnergyUsageIncreased(event_token toke get_activation_factory().RecentEnergyUsageIncreased(token); } -inline event_token BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) +inline event_token BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RecentEnergyUsageReturnedToLow(handler); } -inline factory_event_revoker BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IBackgroundEnergyManagerStatics::remove_RecentEnergyUsageReturnedToLow, factory.RecentEnergyUsageReturnedToLow(handler) }; @@ -896,12 +936,12 @@ inline uint32_t ForegroundEnergyManager::RecentEnergyUsageLevel() return get_activation_factory().RecentEnergyUsageLevel(); } -inline event_token ForegroundEnergyManager::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) +inline event_token ForegroundEnergyManager::RecentEnergyUsageIncreased(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RecentEnergyUsageIncreased(handler); } -inline factory_event_revoker ForegroundEnergyManager::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker ForegroundEnergyManager::RecentEnergyUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IForegroundEnergyManagerStatics::remove_RecentEnergyUsageIncreased, factory.RecentEnergyUsageIncreased(handler) }; @@ -912,12 +952,12 @@ inline void ForegroundEnergyManager::RecentEnergyUsageIncreased(event_token toke get_activation_factory().RecentEnergyUsageIncreased(token); } -inline event_token ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) +inline event_token ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RecentEnergyUsageReturnedToLow(handler); } -inline factory_event_revoker ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IForegroundEnergyManagerStatics::remove_RecentEnergyUsageReturnedToLow, factory.RecentEnergyUsageReturnedToLow(handler) }; @@ -933,12 +973,12 @@ inline Windows::System::Power::EnergySaverStatus PowerManager::EnergySaverStatus return get_activation_factory().EnergySaverStatus(); } -inline event_token PowerManager::EnergySaverStatusChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PowerManager::EnergySaverStatusChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().EnergySaverStatusChanged(handler); } -inline factory_event_revoker PowerManager::EnergySaverStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PowerManager::EnergySaverStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IPowerManagerStatics::remove_EnergySaverStatusChanged, factory.EnergySaverStatusChanged(handler) }; @@ -954,12 +994,12 @@ inline Windows::System::Power::BatteryStatus PowerManager::BatteryStatus() return get_activation_factory().BatteryStatus(); } -inline event_token PowerManager::BatteryStatusChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PowerManager::BatteryStatusChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().BatteryStatusChanged(handler); } -inline factory_event_revoker PowerManager::BatteryStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PowerManager::BatteryStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IPowerManagerStatics::remove_BatteryStatusChanged, factory.BatteryStatusChanged(handler) }; @@ -975,12 +1015,12 @@ inline Windows::System::Power::PowerSupplyStatus PowerManager::PowerSupplyStatus return get_activation_factory().PowerSupplyStatus(); } -inline event_token PowerManager::PowerSupplyStatusChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PowerManager::PowerSupplyStatusChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().PowerSupplyStatusChanged(handler); } -inline factory_event_revoker PowerManager::PowerSupplyStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PowerManager::PowerSupplyStatusChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IPowerManagerStatics::remove_PowerSupplyStatusChanged, factory.PowerSupplyStatusChanged(handler) }; @@ -996,12 +1036,12 @@ inline int32_t PowerManager::RemainingChargePercent() return get_activation_factory().RemainingChargePercent(); } -inline event_token PowerManager::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PowerManager::RemainingChargePercentChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RemainingChargePercentChanged(handler); } -inline factory_event_revoker PowerManager::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PowerManager::RemainingChargePercentChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IPowerManagerStatics::remove_RemainingChargePercentChanged, factory.RemainingChargePercentChanged(handler) }; @@ -1017,12 +1057,12 @@ inline Windows::Foundation::TimeSpan PowerManager::RemainingDischargeTime() return get_activation_factory().RemainingDischargeTime(); } -inline event_token PowerManager::RemainingDischargeTimeChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PowerManager::RemainingDischargeTimeChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().RemainingDischargeTimeChanged(handler); } -inline factory_event_revoker PowerManager::RemainingDischargeTimeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PowerManager::RemainingDischargeTimeChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Power::IPowerManagerStatics::remove_RemainingDischargeTimeChanged, factory.RemainingDischargeTimeChanged(handler) }; @@ -1036,3 +1076,32 @@ inline void PowerManager::RemainingDischargeTimeChanged(event_token token) } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Power::IBackgroundEnergyManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Power::IForegroundEnergyManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Power::IPowerManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Profile.SystemManufacturers.h b/10.0.14393.0/winrt/Windows.System.Profile.SystemManufacturers.h index 0238636a7..7642ba940 100644 --- a/10.0.14393.0/winrt/Windows.System.Profile.SystemManufacturers.h +++ b/10.0.14393.0/winrt/Windows.System.Profile.SystemManufacturers.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.Profile.SystemManufacturers.3.h" #include "Windows.System.Profile.h" @@ -13,11 +16,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_SerialNumber(abi_arg_out value) noexcept override + HRESULT __stdcall get_SerialNumber(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SerialNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SerialNumber()); return S_OK; } catch (...) @@ -35,7 +39,7 @@ namespace Windows::System::Profile::SystemManufacturers { template hstring impl_ISmbiosInformationStatics::SerialNumber() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SerialNumber(put(value))); + check_hresult(WINRT_SHIM(ISmbiosInformationStatics)->get_SerialNumber(put_abi(value))); return value; } @@ -47,3 +51,14 @@ inline hstring SmbiosInformation::SerialNumber() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::SystemManufacturers::ISmbiosInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Profile.h b/10.0.14393.0/winrt/Windows.System.Profile.h index 54ad26dc2..8ec02c7cb 100644 --- a/10.0.14393.0/winrt/Windows.System.Profile.h +++ b/10.0.14393.0/winrt/Windows.System.Profile.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.Foundation.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_VersionInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_VersionInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VersionInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VersionInfo()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DeviceForm(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceForm(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceForm()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceForm()); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_DeviceFamily(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceFamily()); return S_OK; } catch (...) @@ -63,11 +69,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DeviceFamilyVersion(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceFamilyVersion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceFamilyVersion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceFamilyVersion()); return S_OK; } catch (...) @@ -81,11 +88,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetPackageSpecificToken(abi_arg_in nonce, abi_arg_out packageSpecificHardwareToken) noexcept override + HRESULT __stdcall abi_GetPackageSpecificToken(impl::abi_arg_in nonce, impl::abi_arg_out packageSpecificHardwareToken) noexcept override { try { - *packageSpecificHardwareToken = detach(this->shim().GetPackageSpecificToken(*reinterpret_cast(&nonce))); + typename D::abi_guard guard(this->shim()); + *packageSpecificHardwareToken = detach_abi(this->shim().GetPackageSpecificToken(*reinterpret_cast(&nonce))); return S_OK; } catch (...) @@ -99,11 +107,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -113,11 +122,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Signature(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Signature()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Signature()); return S_OK; } catch (...) @@ -127,11 +137,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Certificate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Certificate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Certificate()); return S_OK; } catch (...) @@ -145,11 +156,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_RetailAccessCode(abi_arg_out value) noexcept override + HRESULT __stdcall get_RetailAccessCode(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RetailAccessCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RetailAccessCode()); return S_OK; } catch (...) @@ -159,11 +171,12 @@ struct produce : } } - HRESULT __stdcall get_ManufacturerName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ManufacturerName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ManufacturerName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManufacturerName()); return S_OK; } catch (...) @@ -173,11 +186,12 @@ struct produce : } } - HRESULT __stdcall get_ModelName(abi_arg_out value) noexcept override + HRESULT __stdcall get_ModelName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ModelName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModelName()); return S_OK; } catch (...) @@ -187,11 +201,12 @@ struct produce : } } - HRESULT __stdcall get_DisplayModelName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayModelName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayModelName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayModelName()); return S_OK; } catch (...) @@ -201,11 +216,12 @@ struct produce : } } - HRESULT __stdcall get_Price(abi_arg_out value) noexcept override + HRESULT __stdcall get_Price(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Price()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Price()); return S_OK; } catch (...) @@ -215,11 +231,12 @@ struct produce : } } - HRESULT __stdcall get_IsFeatured(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFeatured(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFeatured()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFeatured()); return S_OK; } catch (...) @@ -229,11 +246,12 @@ struct produce : } } - HRESULT __stdcall get_FormFactor(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormFactor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormFactor()); return S_OK; } catch (...) @@ -243,11 +261,12 @@ struct produce : } } - HRESULT __stdcall get_ScreenSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScreenSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScreenSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScreenSize()); return S_OK; } catch (...) @@ -257,11 +276,12 @@ struct produce : } } - HRESULT __stdcall get_Weight(abi_arg_out value) noexcept override + HRESULT __stdcall get_Weight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Weight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Weight()); return S_OK; } catch (...) @@ -271,11 +291,12 @@ struct produce : } } - HRESULT __stdcall get_DisplayDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayDescription()); return S_OK; } catch (...) @@ -285,11 +306,12 @@ struct produce : } } - HRESULT __stdcall get_BatteryLifeDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_BatteryLifeDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BatteryLifeDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BatteryLifeDescription()); return S_OK; } catch (...) @@ -299,11 +321,12 @@ struct produce : } } - HRESULT __stdcall get_ProcessorDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProcessorDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProcessorDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProcessorDescription()); return S_OK; } catch (...) @@ -313,11 +336,12 @@ struct produce : } } - HRESULT __stdcall get_Memory(abi_arg_out value) noexcept override + HRESULT __stdcall get_Memory(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Memory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Memory()); return S_OK; } catch (...) @@ -327,11 +351,12 @@ struct produce : } } - HRESULT __stdcall get_StorageDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_StorageDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StorageDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StorageDescription()); return S_OK; } catch (...) @@ -341,11 +366,12 @@ struct produce : } } - HRESULT __stdcall get_GraphicsDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_GraphicsDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GraphicsDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GraphicsDescription()); return S_OK; } catch (...) @@ -355,11 +381,12 @@ struct produce : } } - HRESULT __stdcall get_FrontCameraDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrontCameraDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrontCameraDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrontCameraDescription()); return S_OK; } catch (...) @@ -369,11 +396,12 @@ struct produce : } } - HRESULT __stdcall get_RearCameraDescription(abi_arg_out value) noexcept override + HRESULT __stdcall get_RearCameraDescription(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RearCameraDescription()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RearCameraDescription()); return S_OK; } catch (...) @@ -383,11 +411,12 @@ struct produce : } } - HRESULT __stdcall get_HasNfc(abi_arg_out value) noexcept override + HRESULT __stdcall get_HasNfc(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasNfc()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasNfc()); return S_OK; } catch (...) @@ -397,11 +426,12 @@ struct produce : } } - HRESULT __stdcall get_HasSdSlot(abi_arg_out value) noexcept override + HRESULT __stdcall get_HasSdSlot(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasSdSlot()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasSdSlot()); return S_OK; } catch (...) @@ -411,11 +441,12 @@ struct produce : } } - HRESULT __stdcall get_HasOpticalDrive(abi_arg_out value) noexcept override + HRESULT __stdcall get_HasOpticalDrive(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasOpticalDrive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasOpticalDrive()); return S_OK; } catch (...) @@ -425,11 +456,12 @@ struct produce : } } - HRESULT __stdcall get_IsOfficeInstalled(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOfficeInstalled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOfficeInstalled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOfficeInstalled()); return S_OK; } catch (...) @@ -439,11 +471,12 @@ struct produce : } } - HRESULT __stdcall get_WindowsEdition(abi_arg_out value) noexcept override + HRESULT __stdcall get_WindowsEdition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WindowsEdition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WindowsEdition()); return S_OK; } catch (...) @@ -461,7 +494,8 @@ struct produceshim().CollectionLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CollectionLevel()); return S_OK; } catch (...) @@ -470,11 +504,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_CollectionLevelChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().CollectionLevelChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CollectionLevelChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -487,6 +522,7 @@ struct produceshim()); this->shim().CollectionLevelChanged(token); return S_OK; } @@ -500,7 +536,8 @@ struct produceshim().CanCollectDiagnostics(level)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CanCollectDiagnostics(level)); return S_OK; } catch (...) @@ -517,7 +554,8 @@ struct produce : produce_baseshim().IsDemoModeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDemoModeEnabled()); return S_OK; } catch (...) @@ -526,11 +564,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -548,7 +587,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -561,11 +601,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -579,7 +620,8 @@ struct produce : produce { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -592,11 +634,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_GetSystemIdForPublisher(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetSystemIdForPublisher(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSystemIdForPublisher()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSystemIdForPublisher()); return S_OK; } catch (...) @@ -606,11 +649,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetSystemIdForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetSystemIdForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSystemIdForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSystemIdForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -628,290 +672,290 @@ namespace Windows::System::Profile { template Windows::System::Profile::AnalyticsVersionInfo impl_IAnalyticsInfoStatics::VersionInfo() const { Windows::System::Profile::AnalyticsVersionInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VersionInfo(put(value))); + check_hresult(WINRT_SHIM(IAnalyticsInfoStatics)->get_VersionInfo(put_abi(value))); return value; } template hstring impl_IAnalyticsInfoStatics::DeviceForm() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceForm(put(value))); + check_hresult(WINRT_SHIM(IAnalyticsInfoStatics)->get_DeviceForm(put_abi(value))); return value; } template hstring impl_IAnalyticsVersionInfo::DeviceFamily() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceFamily(put(value))); + check_hresult(WINRT_SHIM(IAnalyticsVersionInfo)->get_DeviceFamily(put_abi(value))); return value; } template hstring impl_IAnalyticsVersionInfo::DeviceFamilyVersion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceFamilyVersion(put(value))); + check_hresult(WINRT_SHIM(IAnalyticsVersionInfo)->get_DeviceFamilyVersion(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_ISystemIdentificationInfo::Id() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(ISystemIdentificationInfo)->get_Id(put_abi(value))); return value; } template Windows::System::Profile::SystemIdentificationSource impl_ISystemIdentificationInfo::Source() const { Windows::System::Profile::SystemIdentificationSource value {}; - check_hresult(static_cast(static_cast(*this))->get_Source(&value)); + check_hresult(WINRT_SHIM(ISystemIdentificationInfo)->get_Source(&value)); return value; } template Windows::System::Profile::SystemIdentificationInfo impl_ISystemIdentificationStatics::GetSystemIdForPublisher() const { Windows::System::Profile::SystemIdentificationInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemIdForPublisher(put(result))); + check_hresult(WINRT_SHIM(ISystemIdentificationStatics)->abi_GetSystemIdForPublisher(put_abi(result))); return result; } template Windows::System::Profile::SystemIdentificationInfo impl_ISystemIdentificationStatics::GetSystemIdForUser(const Windows::System::User & user) const { Windows::System::Profile::SystemIdentificationInfo result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSystemIdForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(ISystemIdentificationStatics)->abi_GetSystemIdForUser(get_abi(user), put_abi(result))); return result; } template Windows::System::Profile::PlatformDataCollectionLevel impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevel() const { Windows::System::Profile::PlatformDataCollectionLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_CollectionLevel(&value)); + check_hresult(WINRT_SHIM(IPlatformDiagnosticsAndUsageDataSettingsStatics)->get_CollectionLevel(&value)); return value; } -template event_token impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevelChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevelChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CollectionLevelChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IPlatformDiagnosticsAndUsageDataSettingsStatics)->add_CollectionLevelChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::Profile::IPlatformDiagnosticsAndUsageDataSettingsStatics::remove_CollectionLevelChanged, CollectionLevelChanged(handler)); } template void impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CollectionLevelChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CollectionLevelChanged(token)); + check_hresult(WINRT_SHIM(IPlatformDiagnosticsAndUsageDataSettingsStatics)->remove_CollectionLevelChanged(token)); } template bool impl_IPlatformDiagnosticsAndUsageDataSettingsStatics::CanCollectDiagnostics(Windows::System::Profile::PlatformDataCollectionLevel level) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_CanCollectDiagnostics(level, &result)); + check_hresult(WINRT_SHIM(IPlatformDiagnosticsAndUsageDataSettingsStatics)->abi_CanCollectDiagnostics(level, &result)); return result; } template Windows::Storage::Streams::IBuffer impl_IHardwareToken::Id() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IHardwareToken)->get_Id(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IHardwareToken::Signature() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Signature(put(value))); + check_hresult(WINRT_SHIM(IHardwareToken)->get_Signature(put_abi(value))); return value; } template Windows::Storage::Streams::IBuffer impl_IHardwareToken::Certificate() const { Windows::Storage::Streams::IBuffer value; - check_hresult(static_cast(static_cast(*this))->get_Certificate(put(value))); + check_hresult(WINRT_SHIM(IHardwareToken)->get_Certificate(put_abi(value))); return value; } template Windows::System::Profile::HardwareToken impl_IHardwareIdentificationStatics::GetPackageSpecificToken(const Windows::Storage::Streams::IBuffer & nonce) const { Windows::System::Profile::HardwareToken packageSpecificHardwareToken { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPackageSpecificToken(get(nonce), put(packageSpecificHardwareToken))); + check_hresult(WINRT_SHIM(IHardwareIdentificationStatics)->abi_GetPackageSpecificToken(get_abi(nonce), put_abi(packageSpecificHardwareToken))); return packageSpecificHardwareToken; } template bool impl_ISharedModeSettingsStatics::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(ISharedModeSettingsStatics)->get_IsEnabled(&value)); return value; } template bool impl_IRetailInfoStatics::IsDemoModeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDemoModeEnabled(&value)); + check_hresult(WINRT_SHIM(IRetailInfoStatics)->get_IsDemoModeEnabled(&value)); return value; } -template Windows::Foundation::Collections::IMapView impl_IRetailInfoStatics::Properties() const +template Windows::Foundation::Collections::IMapView impl_IRetailInfoStatics::Properties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IRetailInfoStatics)->get_Properties(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::RetailAccessCode() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RetailAccessCode(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_RetailAccessCode(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::ManufacturerName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ManufacturerName(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_ManufacturerName(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::ModelName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ModelName(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_ModelName(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::DisplayModelName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayModelName(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_DisplayModelName(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::Price() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Price(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_Price(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::IsFeatured() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsFeatured(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_IsFeatured(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::FormFactor() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FormFactor(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_FormFactor(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::ScreenSize() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ScreenSize(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_ScreenSize(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::Weight() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Weight(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_Weight(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::DisplayDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_DisplayDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::BatteryLifeDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BatteryLifeDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_BatteryLifeDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::ProcessorDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProcessorDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_ProcessorDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::Memory() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Memory(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_Memory(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::StorageDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StorageDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_StorageDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::GraphicsDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GraphicsDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_GraphicsDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::FrontCameraDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FrontCameraDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_FrontCameraDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::RearCameraDescription() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RearCameraDescription(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_RearCameraDescription(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::HasNfc() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HasNfc(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_HasNfc(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::HasSdSlot() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HasSdSlot(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_HasSdSlot(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::HasOpticalDrive() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HasOpticalDrive(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_HasOpticalDrive(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::IsOfficeInstalled() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_IsOfficeInstalled(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_IsOfficeInstalled(put_abi(value))); return value; } template hstring impl_IKnownRetailInfoPropertiesStatics::WindowsEdition() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WindowsEdition(put(value))); + check_hresult(WINRT_SHIM(IKnownRetailInfoPropertiesStatics)->get_WindowsEdition(put_abi(value))); return value; } @@ -1045,12 +1089,12 @@ inline Windows::System::Profile::PlatformDataCollectionLevel PlatformDiagnostics return get_activation_factory().CollectionLevel(); } -inline event_token PlatformDiagnosticsAndUsageDataSettings::CollectionLevelChanged(const Windows::Foundation::EventHandler & handler) +inline event_token PlatformDiagnosticsAndUsageDataSettings::CollectionLevelChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().CollectionLevelChanged(handler); } -inline factory_event_revoker PlatformDiagnosticsAndUsageDataSettings::CollectionLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker PlatformDiagnosticsAndUsageDataSettings::CollectionLevelChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::Profile::IPlatformDiagnosticsAndUsageDataSettingsStatics::remove_CollectionLevelChanged, factory.CollectionLevelChanged(handler) }; @@ -1071,7 +1115,7 @@ inline bool RetailInfo::IsDemoModeEnabled() return get_activation_factory().IsDemoModeEnabled(); } -inline Windows::Foundation::Collections::IMapView RetailInfo::Properties() +inline Windows::Foundation::Collections::IMapView RetailInfo::Properties() { return get_activation_factory().Properties(); } @@ -1094,3 +1138,122 @@ inline Windows::System::Profile::SystemIdentificationInfo SystemIdentification:: } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IAnalyticsInfoStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IAnalyticsVersionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IHardwareIdentificationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IHardwareToken & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IKnownRetailInfoPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IPlatformDiagnosticsAndUsageDataSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::IRetailInfoStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::ISharedModeSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::ISystemIdentificationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::ISystemIdentificationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::AnalyticsVersionInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::HardwareToken & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Profile::SystemIdentificationInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.RemoteDesktop.h b/10.0.14393.0/winrt/Windows.System.RemoteDesktop.h index 23856f584..9a1c1cf0a 100644 --- a/10.0.14393.0/winrt/Windows.System.RemoteDesktop.h +++ b/10.0.14393.0/winrt/Windows.System.RemoteDesktop.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.RemoteDesktop.3.h" #include "Windows.System.h" @@ -17,7 +20,8 @@ struct produce : { try { - *value = detach(this->shim().IsRemote()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRemote()); return S_OK; } catch (...) @@ -34,7 +38,7 @@ namespace Windows::System::RemoteDesktop { template bool impl_IInteractiveSessionStatics::IsRemote() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRemote(&value)); + check_hresult(WINRT_SHIM(IInteractiveSessionStatics)->get_IsRemote(&value)); return value; } @@ -46,3 +50,14 @@ inline bool InteractiveSession::IsRemote() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteDesktop::IInteractiveSessionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.RemoteSystems.h b/10.0.14393.0/winrt/Windows.System.RemoteSystems.h index 973597458..49e208f1e 100644 --- a/10.0.14393.0/winrt/Windows.System.RemoteSystems.h +++ b/10.0.14393.0/winrt/Windows.System.RemoteSystems.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Networking.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -44,11 +49,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Kind(abi_arg_out value) noexcept override + HRESULT __stdcall get_Kind(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -62,7 +68,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -75,7 +82,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsAvailableByProximity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAvailableByProximity()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_RemoteSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystem()); return S_OK; } catch (...) @@ -106,11 +115,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_RemoteSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystem()); return S_OK; } catch (...) @@ -124,11 +134,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in remoteSystem, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in remoteSystem, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&remoteSystem))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&remoteSystem))); return S_OK; } catch (...) @@ -146,7 +157,8 @@ struct produceshim().RemoteSystemDiscoveryType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystemDiscoveryType()); return S_OK; } catch (...) @@ -159,11 +171,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::System::RemoteSystems::RemoteSystemDiscoveryType discoveryType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::System::RemoteSystems::RemoteSystemDiscoveryType discoveryType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(discoveryType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(discoveryType)); return S_OK; } catch (...) @@ -181,11 +194,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_RemoteSystemKinds(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemoteSystemKinds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemoteSystemKinds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystemKinds()); return S_OK; } catch (...) @@ -199,11 +213,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in> remoteSystemKinds, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in> remoteSystemKinds, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast *>(&remoteSystemKinds))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast *>(&remoteSystemKinds))); return S_OK; } catch (...) @@ -217,11 +232,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Phone(abi_arg_out value) noexcept override + HRESULT __stdcall get_Phone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Phone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Phone()); return S_OK; } catch (...) @@ -231,11 +247,12 @@ struct produce : pr } } - HRESULT __stdcall get_Hub(abi_arg_out value) noexcept override + HRESULT __stdcall get_Hub(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Hub()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hub()); return S_OK; } catch (...) @@ -245,11 +262,12 @@ struct produce : pr } } - HRESULT __stdcall get_Holographic(abi_arg_out value) noexcept override + HRESULT __stdcall get_Holographic(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Holographic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Holographic()); return S_OK; } catch (...) @@ -259,11 +277,12 @@ struct produce : pr } } - HRESULT __stdcall get_Desktop(abi_arg_out value) noexcept override + HRESULT __stdcall get_Desktop(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Desktop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Desktop()); return S_OK; } catch (...) @@ -273,11 +292,12 @@ struct produce : pr } } - HRESULT __stdcall get_Xbox(abi_arg_out value) noexcept override + HRESULT __stdcall get_Xbox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Xbox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Xbox()); return S_OK; } catch (...) @@ -291,11 +311,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_RemoteSystemId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteSystemId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteSystemId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystemId()); return S_OK; } catch (...) @@ -309,11 +330,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_FindByHostNameAsync(abi_arg_in hostName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_FindByHostNameAsync(impl::abi_arg_in hostName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().FindByHostNameAsync(*reinterpret_cast(&hostName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindByHostNameAsync(*reinterpret_cast(&hostName))); return S_OK; } catch (...) @@ -323,11 +345,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateWatcher(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -337,11 +360,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateWatcherWithFilters(abi_arg_in> filters, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWatcherWithFilters(impl::abi_arg_in> filters, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWatcher(*reinterpret_cast *>(&filters))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWatcher(*reinterpret_cast *>(&filters))); return S_OK; } catch (...) @@ -351,11 +375,12 @@ struct produce : produc } } - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -373,7 +398,8 @@ struct produce { try { - *value = detach(this->shim().RemoteSystemStatusType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystemStatusType()); return S_OK; } catch (...) @@ -386,11 +412,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::System::RemoteSystems::RemoteSystemStatusType remoteSystemStatusType, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(Windows::System::RemoteSystems::RemoteSystemStatusType remoteSystemStatusType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(remoteSystemStatusType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(remoteSystemStatusType)); return S_OK; } catch (...) @@ -404,11 +431,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_RemoteSystem(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteSystem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteSystem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteSystem()); return S_OK; } catch (...) @@ -426,6 +454,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Start(); return S_OK; } @@ -439,6 +468,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -448,11 +478,12 @@ struct produce : produc } } - HRESULT __stdcall add_RemoteSystemAdded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemoteSystemAdded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemoteSystemAdded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemoteSystemAdded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -465,6 +496,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteSystemAdded(token); return S_OK; } @@ -474,11 +506,12 @@ struct produce : produc } } - HRESULT __stdcall add_RemoteSystemUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemoteSystemUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemoteSystemUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemoteSystemUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -491,6 +524,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteSystemUpdated(token); return S_OK; } @@ -500,11 +534,12 @@ struct produce : produc } } - HRESULT __stdcall add_RemoteSystemRemoved(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RemoteSystemRemoved(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RemoteSystemRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RemoteSystemRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -517,6 +552,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteSystemRemoved(token); return S_OK; } @@ -534,80 +570,80 @@ namespace Windows::System::RemoteSystems { template Windows::Foundation::IAsyncOperation impl_IRemoteSystemStatics::FindByHostNameAsync(const Windows::Networking::HostName & hostName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_FindByHostNameAsync(get(hostName), put(operation))); + check_hresult(WINRT_SHIM(IRemoteSystemStatics)->abi_FindByHostNameAsync(get_abi(hostName), put_abi(operation))); return operation; } template Windows::System::RemoteSystems::RemoteSystemWatcher impl_IRemoteSystemStatics::CreateWatcher() const { Windows::System::RemoteSystems::RemoteSystemWatcher result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemStatics)->abi_CreateWatcher(put_abi(result))); return result; } -template Windows::System::RemoteSystems::RemoteSystemWatcher impl_IRemoteSystemStatics::CreateWatcher(const Windows::Foundation::Collections::IIterable & filters) const +template Windows::System::RemoteSystems::RemoteSystemWatcher impl_IRemoteSystemStatics::CreateWatcher(iterable filters) const { Windows::System::RemoteSystems::RemoteSystemWatcher result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcherWithFilters(get(filters), put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemStatics)->abi_CreateWatcherWithFilters(get_abi(filters), put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IRemoteSystemStatics::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(operation))); + check_hresult(WINRT_SHIM(IRemoteSystemStatics)->abi_RequestAccessAsync(put_abi(operation))); return operation; } template hstring impl_IRemoteSystem::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystem)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IRemoteSystem::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystem)->get_Id(put_abi(value))); return value; } template hstring impl_IRemoteSystem::Kind() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Kind(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystem)->get_Kind(put_abi(value))); return value; } template Windows::System::RemoteSystems::RemoteSystemStatus impl_IRemoteSystem::Status() const { Windows::System::RemoteSystems::RemoteSystemStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IRemoteSystem)->get_Status(&value)); return value; } template bool impl_IRemoteSystem::IsAvailableByProximity() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAvailableByProximity(&value)); + check_hresult(WINRT_SHIM(IRemoteSystem)->get_IsAvailableByProximity(&value)); return value; } template void impl_IRemoteSystemWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->abi_Start()); } template void impl_IRemoteSystemWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->abi_Stop()); } template event_token impl_IRemoteSystemWatcher::RemoteSystemAdded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemoteSystemAdded(get(handler), &token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->add_RemoteSystemAdded(get_abi(handler), &token)); return token; } @@ -618,13 +654,13 @@ template event_revoker impl_IRemoteSystemWatc template void impl_IRemoteSystemWatcher::RemoteSystemAdded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemoteSystemAdded(token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->remove_RemoteSystemAdded(token)); } template event_token impl_IRemoteSystemWatcher::RemoteSystemUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemoteSystemUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->add_RemoteSystemUpdated(get_abi(handler), &token)); return token; } @@ -635,13 +671,13 @@ template event_revoker impl_IRemoteSystemWatc template void impl_IRemoteSystemWatcher::RemoteSystemUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemoteSystemUpdated(token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->remove_RemoteSystemUpdated(token)); } template event_token impl_IRemoteSystemWatcher::RemoteSystemRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RemoteSystemRemoved(get(handler), &token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->add_RemoteSystemRemoved(get_abi(handler), &token)); return token; } @@ -652,118 +688,118 @@ template event_revoker impl_IRemoteSystemWatc template void impl_IRemoteSystemWatcher::RemoteSystemRemoved(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RemoteSystemRemoved(token)); + check_hresult(WINRT_SHIM(IRemoteSystemWatcher)->remove_RemoteSystemRemoved(token)); } template Windows::System::RemoteSystems::RemoteSystem impl_IRemoteSystemAddedEventArgs::RemoteSystem() const { Windows::System::RemoteSystems::RemoteSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystem(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemAddedEventArgs)->get_RemoteSystem(put_abi(value))); return value; } template Windows::System::RemoteSystems::RemoteSystem impl_IRemoteSystemUpdatedEventArgs::RemoteSystem() const { Windows::System::RemoteSystems::RemoteSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystem(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemUpdatedEventArgs)->get_RemoteSystem(put_abi(value))); return value; } template hstring impl_IRemoteSystemRemovedEventArgs::RemoteSystemId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystemId(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemRemovedEventArgs)->get_RemoteSystemId(put_abi(value))); return value; } template Windows::System::RemoteSystems::RemoteSystemConnectionRequest impl_IRemoteSystemConnectionRequestFactory::Create(const Windows::System::RemoteSystems::RemoteSystem & remoteSystem) const { Windows::System::RemoteSystems::RemoteSystemConnectionRequest result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(remoteSystem), put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemConnectionRequestFactory)->abi_Create(get_abi(remoteSystem), put_abi(result))); return result; } template Windows::System::RemoteSystems::RemoteSystem impl_IRemoteSystemConnectionRequest::RemoteSystem() const { Windows::System::RemoteSystems::RemoteSystem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystem(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemConnectionRequest)->get_RemoteSystem(put_abi(value))); return value; } template hstring impl_IRemoteSystemKindStatics::Phone() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Phone(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindStatics)->get_Phone(put_abi(value))); return value; } template hstring impl_IRemoteSystemKindStatics::Hub() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Hub(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindStatics)->get_Hub(put_abi(value))); return value; } template hstring impl_IRemoteSystemKindStatics::Holographic() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Holographic(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindStatics)->get_Holographic(put_abi(value))); return value; } template hstring impl_IRemoteSystemKindStatics::Desktop() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Desktop(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindStatics)->get_Desktop(put_abi(value))); return value; } template hstring impl_IRemoteSystemKindStatics::Xbox() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Xbox(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindStatics)->get_Xbox(put_abi(value))); return value; } -template Windows::System::RemoteSystems::RemoteSystemKindFilter impl_IRemoteSystemKindFilterFactory::Create(const Windows::Foundation::Collections::IIterable & remoteSystemKinds) const +template Windows::System::RemoteSystems::RemoteSystemKindFilter impl_IRemoteSystemKindFilterFactory::Create(iterable remoteSystemKinds) const { Windows::System::RemoteSystems::RemoteSystemKindFilter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(remoteSystemKinds), put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemKindFilterFactory)->abi_Create(get_abi(remoteSystemKinds), put_abi(result))); return result; } template Windows::Foundation::Collections::IVectorView impl_IRemoteSystemKindFilter::RemoteSystemKinds() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystemKinds(put(value))); + check_hresult(WINRT_SHIM(IRemoteSystemKindFilter)->get_RemoteSystemKinds(put_abi(value))); return value; } template Windows::System::RemoteSystems::RemoteSystemDiscoveryTypeFilter impl_IRemoteSystemDiscoveryTypeFilterFactory::Create(Windows::System::RemoteSystems::RemoteSystemDiscoveryType discoveryType) const { Windows::System::RemoteSystems::RemoteSystemDiscoveryTypeFilter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(discoveryType, put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemDiscoveryTypeFilterFactory)->abi_Create(discoveryType, put_abi(result))); return result; } template Windows::System::RemoteSystems::RemoteSystemDiscoveryType impl_IRemoteSystemDiscoveryTypeFilter::RemoteSystemDiscoveryType() const { Windows::System::RemoteSystems::RemoteSystemDiscoveryType value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystemDiscoveryType(&value)); + check_hresult(WINRT_SHIM(IRemoteSystemDiscoveryTypeFilter)->get_RemoteSystemDiscoveryType(&value)); return value; } template Windows::System::RemoteSystems::RemoteSystemStatusTypeFilter impl_IRemoteSystemStatusTypeFilterFactory::Create(Windows::System::RemoteSystems::RemoteSystemStatusType remoteSystemStatusType) const { Windows::System::RemoteSystems::RemoteSystemStatusTypeFilter result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(remoteSystemStatusType, put(result))); + check_hresult(WINRT_SHIM(IRemoteSystemStatusTypeFilterFactory)->abi_Create(remoteSystemStatusType, put_abi(result))); return result; } template Windows::System::RemoteSystems::RemoteSystemStatusType impl_IRemoteSystemStatusTypeFilter::RemoteSystemStatusType() const { Windows::System::RemoteSystems::RemoteSystemStatusType value {}; - check_hresult(static_cast(static_cast(*this))->get_RemoteSystemStatusType(&value)); + check_hresult(WINRT_SHIM(IRemoteSystemStatusTypeFilter)->get_RemoteSystemStatusType(&value)); return value; } @@ -777,7 +813,7 @@ inline Windows::System::RemoteSystems::RemoteSystemWatcher RemoteSystem::CreateW return get_activation_factory().CreateWatcher(); } -inline Windows::System::RemoteSystems::RemoteSystemWatcher RemoteSystem::CreateWatcher(const Windows::Foundation::Collections::IIterable & filters) +inline Windows::System::RemoteSystems::RemoteSystemWatcher RemoteSystem::CreateWatcher(iterable filters) { return get_activation_factory().CreateWatcher(filters); } @@ -795,7 +831,7 @@ inline RemoteSystemDiscoveryTypeFilter::RemoteSystemDiscoveryTypeFilter(Windows: RemoteSystemDiscoveryTypeFilter(get_activation_factory().Create(discoveryType)) {} -inline RemoteSystemKindFilter::RemoteSystemKindFilter(const Windows::Foundation::Collections::IIterable & remoteSystemKinds) : +inline RemoteSystemKindFilter::RemoteSystemKindFilter(iterable remoteSystemKinds) : RemoteSystemKindFilter(get_activation_factory().Create(remoteSystemKinds)) {} @@ -831,3 +867,230 @@ inline RemoteSystemStatusTypeFilter::RemoteSystemStatusTypeFilter(Windows::Syste } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemConnectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemConnectionRequestFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemDiscoveryTypeFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemDiscoveryTypeFilterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemKindFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemKindFilterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemKindStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemStatusTypeFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemStatusTypeFilterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::IRemoteSystemWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemAddedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemDiscoveryTypeFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemKindFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemRemovedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemStatusTypeFilter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteSystems::RemoteSystemWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Threading.Core.h b/10.0.14393.0/winrt/Windows.System.Threading.Core.h index 0cb1a9b1e..5026bce9b 100644 --- a/10.0.14393.0/winrt/Windows.System.Threading.Core.h +++ b/10.0.14393.0/winrt/Windows.System.Threading.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.Threading.3.h" #include "internal/Windows.System.Threading.Core.3.h" @@ -26,7 +29,7 @@ template SignalHandler::SignalHandler(O * object, M met inline void SignalHandler::operator()(const Windows::System::Threading::Core::SignalNotifier & signalNotifier, bool timedOut) const { - check_hresult((*this)->abi_Invoke(get(signalNotifier), timedOut)); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(signalNotifier), timedOut)); } } @@ -36,11 +39,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RunAsync(abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RunAsync(impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RunAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RunAsync()); return S_OK; } catch (...) @@ -54,11 +58,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateWorkItem(abi_arg_in handler, abi_arg_out workItem) noexcept override + HRESULT __stdcall abi_CreateWorkItem(impl::abi_arg_in handler, impl::abi_arg_out workItem) noexcept override { try { - *workItem = detach(this->shim().CreateWorkItem(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *workItem = detach_abi(this->shim().CreateWorkItem(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -68,11 +73,12 @@ struct produce handler, Windows::System::Threading::WorkItemPriority priority, abi_arg_out WorkItem) noexcept override + HRESULT __stdcall abi_CreateWorkItemWithPriority(impl::abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, impl::abi_arg_out WorkItem) noexcept override { try { - *WorkItem = detach(this->shim().CreateWorkItemWithPriority(*reinterpret_cast(&handler), priority)); + typename D::abi_guard guard(this->shim()); + *WorkItem = detach_abi(this->shim().CreateWorkItemWithPriority(*reinterpret_cast(&handler), priority)); return S_OK; } catch (...) @@ -82,11 +88,12 @@ struct produce handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options, abi_arg_out WorkItem) noexcept override + HRESULT __stdcall abi_CreateWorkItemWithPriorityAndOptions(impl::abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options, impl::abi_arg_out WorkItem) noexcept override { try { - *WorkItem = detach(this->shim().CreateWorkItemWithPriorityAndOptions(*reinterpret_cast(&handler), priority, options)); + typename D::abi_guard guard(this->shim()); + *WorkItem = detach_abi(this->shim().CreateWorkItemWithPriorityAndOptions(*reinterpret_cast(&handler), priority, options)); return S_OK; } catch (...) @@ -104,6 +111,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Enable(); return S_OK; } @@ -117,6 +125,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Terminate(); return S_OK; } @@ -130,11 +139,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_AttachToEvent(abi_arg_in name, abi_arg_in handler, abi_arg_out signalNotifier) noexcept override + HRESULT __stdcall abi_AttachToEvent(impl::abi_arg_in name, impl::abi_arg_in handler, impl::abi_arg_out signalNotifier) noexcept override { try { - *signalNotifier = detach(this->shim().AttachToEvent(*reinterpret_cast(&name), *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *signalNotifier = detach_abi(this->shim().AttachToEvent(*reinterpret_cast(&name), *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -144,11 +154,12 @@ struct produce : pr } } - HRESULT __stdcall abi_AttachToEventWithTimeout(abi_arg_in name, abi_arg_in handler, abi_arg_in timeout, abi_arg_out signalNotifier) noexcept override + HRESULT __stdcall abi_AttachToEventWithTimeout(impl::abi_arg_in name, impl::abi_arg_in handler, impl::abi_arg_in timeout, impl::abi_arg_out signalNotifier) noexcept override { try { - *signalNotifier = detach(this->shim().AttachToEvent(*reinterpret_cast(&name), *reinterpret_cast(&handler), *reinterpret_cast(&timeout))); + typename D::abi_guard guard(this->shim()); + *signalNotifier = detach_abi(this->shim().AttachToEvent(*reinterpret_cast(&name), *reinterpret_cast(&handler), *reinterpret_cast(&timeout))); return S_OK; } catch (...) @@ -158,11 +169,12 @@ struct produce : pr } } - HRESULT __stdcall abi_AttachToSemaphore(abi_arg_in name, abi_arg_in handler, abi_arg_out signalNotifier) noexcept override + HRESULT __stdcall abi_AttachToSemaphore(impl::abi_arg_in name, impl::abi_arg_in handler, impl::abi_arg_out signalNotifier) noexcept override { try { - *signalNotifier = detach(this->shim().AttachToSemaphore(*reinterpret_cast(&name), *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *signalNotifier = detach_abi(this->shim().AttachToSemaphore(*reinterpret_cast(&name), *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -172,11 +184,12 @@ struct produce : pr } } - HRESULT __stdcall abi_AttachToSemaphoreWithTimeout(abi_arg_in name, abi_arg_in handler, abi_arg_in timeout, abi_arg_out signalNotifier) noexcept override + HRESULT __stdcall abi_AttachToSemaphoreWithTimeout(impl::abi_arg_in name, impl::abi_arg_in handler, impl::abi_arg_in timeout, impl::abi_arg_out signalNotifier) noexcept override { try { - *signalNotifier = detach(this->shim().AttachToSemaphore(*reinterpret_cast(&name), *reinterpret_cast(&handler), *reinterpret_cast(&timeout))); + typename D::abi_guard guard(this->shim()); + *signalNotifier = detach_abi(this->shim().AttachToSemaphore(*reinterpret_cast(&name), *reinterpret_cast(&handler), *reinterpret_cast(&timeout))); return S_OK; } catch (...) @@ -191,70 +204,70 @@ struct produce : pr namespace Windows::System::Threading::Core { -template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToEvent(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler) const +template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToEvent(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler) const { Windows::System::Threading::Core::SignalNotifier signalNotifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AttachToEvent(get(name), get(handler), put(signalNotifier))); + check_hresult(WINRT_SHIM(ISignalNotifierStatics)->abi_AttachToEvent(get_abi(name), get_abi(handler), put_abi(signalNotifier))); return signalNotifier; } -template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToEvent(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) const +template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToEvent(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) const { Windows::System::Threading::Core::SignalNotifier signalNotifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AttachToEventWithTimeout(get(name), get(handler), get(timeout), put(signalNotifier))); + check_hresult(WINRT_SHIM(ISignalNotifierStatics)->abi_AttachToEventWithTimeout(get_abi(name), get_abi(handler), get_abi(timeout), put_abi(signalNotifier))); return signalNotifier; } -template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToSemaphore(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler) const +template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToSemaphore(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler) const { Windows::System::Threading::Core::SignalNotifier signalNotifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AttachToSemaphore(get(name), get(handler), put(signalNotifier))); + check_hresult(WINRT_SHIM(ISignalNotifierStatics)->abi_AttachToSemaphore(get_abi(name), get_abi(handler), put_abi(signalNotifier))); return signalNotifier; } -template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToSemaphore(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) const +template Windows::System::Threading::Core::SignalNotifier impl_ISignalNotifierStatics::AttachToSemaphore(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) const { Windows::System::Threading::Core::SignalNotifier signalNotifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AttachToSemaphoreWithTimeout(get(name), get(handler), get(timeout), put(signalNotifier))); + check_hresult(WINRT_SHIM(ISignalNotifierStatics)->abi_AttachToSemaphoreWithTimeout(get_abi(name), get_abi(handler), get_abi(timeout), put_abi(signalNotifier))); return signalNotifier; } template Windows::System::Threading::Core::PreallocatedWorkItem impl_IPreallocatedWorkItemFactory::CreateWorkItem(const Windows::System::Threading::WorkItemHandler & handler) const { Windows::System::Threading::Core::PreallocatedWorkItem workItem { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWorkItem(get(handler), put(workItem))); + check_hresult(WINRT_SHIM(IPreallocatedWorkItemFactory)->abi_CreateWorkItem(get_abi(handler), put_abi(workItem))); return workItem; } template Windows::System::Threading::Core::PreallocatedWorkItem impl_IPreallocatedWorkItemFactory::CreateWorkItemWithPriority(const Windows::System::Threading::WorkItemHandler & handler, Windows::System::Threading::WorkItemPriority priority) const { Windows::System::Threading::Core::PreallocatedWorkItem WorkItem { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWorkItemWithPriority(get(handler), priority, put(WorkItem))); + check_hresult(WINRT_SHIM(IPreallocatedWorkItemFactory)->abi_CreateWorkItemWithPriority(get_abi(handler), priority, put_abi(WorkItem))); return WorkItem; } template Windows::System::Threading::Core::PreallocatedWorkItem impl_IPreallocatedWorkItemFactory::CreateWorkItemWithPriorityAndOptions(const Windows::System::Threading::WorkItemHandler & handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options) const { Windows::System::Threading::Core::PreallocatedWorkItem WorkItem { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWorkItemWithPriorityAndOptions(get(handler), priority, options, put(WorkItem))); + check_hresult(WINRT_SHIM(IPreallocatedWorkItemFactory)->abi_CreateWorkItemWithPriorityAndOptions(get_abi(handler), priority, options, put_abi(WorkItem))); return WorkItem; } template Windows::Foundation::IAsyncAction impl_IPreallocatedWorkItem::RunAsync() const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RunAsync(put(operation))); + check_hresult(WINRT_SHIM(IPreallocatedWorkItem)->abi_RunAsync(put_abi(operation))); return operation; } template void impl_ISignalNotifier::Enable() const { - check_hresult(static_cast(static_cast(*this))->abi_Enable()); + check_hresult(WINRT_SHIM(ISignalNotifier)->abi_Enable()); } template void impl_ISignalNotifier::Terminate() const { - check_hresult(static_cast(static_cast(*this))->abi_Terminate()); + check_hresult(WINRT_SHIM(ISignalNotifier)->abi_Terminate()); } inline PreallocatedWorkItem::PreallocatedWorkItem(const Windows::System::Threading::WorkItemHandler & handler) : @@ -269,22 +282,22 @@ inline PreallocatedWorkItem::PreallocatedWorkItem(const Windows::System::Threadi PreallocatedWorkItem(get_activation_factory().CreateWorkItemWithPriorityAndOptions(handler, priority, options)) {} -inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToEvent(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler) +inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToEvent(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler) { return get_activation_factory().AttachToEvent(name, handler); } -inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToEvent(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) +inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToEvent(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) { return get_activation_factory().AttachToEvent(name, handler, timeout); } -inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToSemaphore(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler) +inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToSemaphore(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler) { return get_activation_factory().AttachToSemaphore(name, handler); } -inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToSemaphore(hstring_ref name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) +inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachToSemaphore(hstring_view name, const Windows::System::Threading::Core::SignalHandler & handler, const Windows::Foundation::TimeSpan & timeout) { return get_activation_factory().AttachToSemaphore(name, handler, timeout); } @@ -292,3 +305,59 @@ inline Windows::System::Threading::Core::SignalNotifier SignalNotifier::AttachTo } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::IPreallocatedWorkItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::IPreallocatedWorkItemFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::ISignalNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::ISignalNotifierStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::PreallocatedWorkItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::Core::SignalNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.Threading.h b/10.0.14393.0/winrt/Windows.System.Threading.h index d5f9dd5d0..c0df5fd01 100644 --- a/10.0.14393.0/winrt/Windows.System.Threading.h +++ b/10.0.14393.0/winrt/Windows.System.Threading.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.Threading.3.h" #include "Windows.System.h" @@ -25,7 +28,7 @@ template TimerDestroyedHandler::TimerDestroyedHandler(O inline void TimerDestroyedHandler::operator()(const Windows::System::Threading::ThreadPoolTimer & timer) const { - check_hresult((*this)->abi_Invoke(get(timer))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(timer))); } template TimerElapsedHandler::TimerElapsedHandler(L lambda) : @@ -42,7 +45,7 @@ template TimerElapsedHandler::TimerElapsedHandler(O * o inline void TimerElapsedHandler::operator()(const Windows::System::Threading::ThreadPoolTimer & timer) const { - check_hresult((*this)->abi_Invoke(get(timer))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(timer))); } template WorkItemHandler::WorkItemHandler(L lambda) : @@ -59,7 +62,7 @@ template WorkItemHandler::WorkItemHandler(O * object, M inline void WorkItemHandler::operator()(const Windows::Foundation::IAsyncAction & operation) const { - check_hresult((*this)->abi_Invoke(get(operation))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(operation))); } } @@ -69,11 +72,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RunAsync(abi_arg_in handler, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RunAsync(impl::abi_arg_in handler, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RunAsync(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RunAsync(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -83,11 +87,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RunWithPriorityAsync(abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RunWithPriorityAsync(impl::abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RunAsync(*reinterpret_cast(&handler), priority)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RunAsync(*reinterpret_cast(&handler), priority)); return S_OK; } catch (...) @@ -97,11 +102,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_RunWithPriorityAndOptionsAsync(abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_RunWithPriorityAndOptionsAsync(impl::abi_arg_in handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().RunAsync(*reinterpret_cast(&handler), priority, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RunAsync(*reinterpret_cast(&handler), priority, options)); return S_OK; } catch (...) @@ -115,11 +121,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Period(abi_arg_out value) noexcept override + HRESULT __stdcall get_Period(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Period()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Period()); return S_OK; } catch (...) @@ -128,11 +135,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Delay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -145,6 +153,7 @@ struct produce : produce_baseshim()); this->shim().Cancel(); return S_OK; } @@ -158,11 +167,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreatePeriodicTimer(abi_arg_in handler, abi_arg_in period, abi_arg_out timer) noexcept override + HRESULT __stdcall abi_CreatePeriodicTimer(impl::abi_arg_in handler, impl::abi_arg_in period, impl::abi_arg_out timer) noexcept override { try { - *timer = detach(this->shim().CreatePeriodicTimer(*reinterpret_cast(&handler), *reinterpret_cast(&period))); + typename D::abi_guard guard(this->shim()); + *timer = detach_abi(this->shim().CreatePeriodicTimer(*reinterpret_cast(&handler), *reinterpret_cast(&period))); return S_OK; } catch (...) @@ -172,11 +182,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateTimer(abi_arg_in handler, abi_arg_in delay, abi_arg_out timer) noexcept override + HRESULT __stdcall abi_CreateTimer(impl::abi_arg_in handler, impl::abi_arg_in delay, impl::abi_arg_out timer) noexcept override { try { - *timer = detach(this->shim().CreateTimer(*reinterpret_cast(&handler), *reinterpret_cast(&delay))); + typename D::abi_guard guard(this->shim()); + *timer = detach_abi(this->shim().CreateTimer(*reinterpret_cast(&handler), *reinterpret_cast(&delay))); return S_OK; } catch (...) @@ -186,11 +197,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreatePeriodicTimerWithCompletion(abi_arg_in handler, abi_arg_in period, abi_arg_in destroyed, abi_arg_out timer) noexcept override + HRESULT __stdcall abi_CreatePeriodicTimerWithCompletion(impl::abi_arg_in handler, impl::abi_arg_in period, impl::abi_arg_in destroyed, impl::abi_arg_out timer) noexcept override { try { - *timer = detach(this->shim().CreatePeriodicTimer(*reinterpret_cast(&handler), *reinterpret_cast(&period), *reinterpret_cast(&destroyed))); + typename D::abi_guard guard(this->shim()); + *timer = detach_abi(this->shim().CreatePeriodicTimer(*reinterpret_cast(&handler), *reinterpret_cast(&period), *reinterpret_cast(&destroyed))); return S_OK; } catch (...) @@ -200,11 +212,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateTimerWithCompletion(abi_arg_in handler, abi_arg_in delay, abi_arg_in destroyed, abi_arg_out timer) noexcept override + HRESULT __stdcall abi_CreateTimerWithCompletion(impl::abi_arg_in handler, impl::abi_arg_in delay, impl::abi_arg_in destroyed, impl::abi_arg_out timer) noexcept override { try { - *timer = detach(this->shim().CreateTimer(*reinterpret_cast(&handler), *reinterpret_cast(&delay), *reinterpret_cast(&destroyed))); + typename D::abi_guard guard(this->shim()); + *timer = detach_abi(this->shim().CreateTimer(*reinterpret_cast(&handler), *reinterpret_cast(&delay), *reinterpret_cast(&destroyed))); return S_OK; } catch (...) @@ -222,68 +235,68 @@ namespace Windows::System::Threading { template Windows::Foundation::IAsyncAction impl_IThreadPoolStatics::RunAsync(const Windows::System::Threading::WorkItemHandler & handler) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RunAsync(get(handler), put(operation))); + check_hresult(WINRT_SHIM(IThreadPoolStatics)->abi_RunAsync(get_abi(handler), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IThreadPoolStatics::RunAsync(const Windows::System::Threading::WorkItemHandler & handler, Windows::System::Threading::WorkItemPriority priority) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RunWithPriorityAsync(get(handler), priority, put(operation))); + check_hresult(WINRT_SHIM(IThreadPoolStatics)->abi_RunWithPriorityAsync(get_abi(handler), priority, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IThreadPoolStatics::RunAsync(const Windows::System::Threading::WorkItemHandler & handler, Windows::System::Threading::WorkItemPriority priority, Windows::System::Threading::WorkItemOptions options) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_RunWithPriorityAndOptionsAsync(get(handler), priority, options, put(operation))); + check_hresult(WINRT_SHIM(IThreadPoolStatics)->abi_RunWithPriorityAndOptionsAsync(get_abi(handler), priority, options, put_abi(operation))); return operation; } template Windows::Foundation::TimeSpan impl_IThreadPoolTimer::Period() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Period(put(value))); + check_hresult(WINRT_SHIM(IThreadPoolTimer)->get_Period(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IThreadPoolTimer::Delay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(put(value))); + check_hresult(WINRT_SHIM(IThreadPoolTimer)->get_Delay(put_abi(value))); return value; } template void impl_IThreadPoolTimer::Cancel() const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel()); + check_hresult(WINRT_SHIM(IThreadPoolTimer)->abi_Cancel()); } template Windows::System::Threading::ThreadPoolTimer impl_IThreadPoolTimerStatics::CreatePeriodicTimer(const Windows::System::Threading::TimerElapsedHandler & handler, const Windows::Foundation::TimeSpan & period) const { Windows::System::Threading::ThreadPoolTimer timer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePeriodicTimer(get(handler), get(period), put(timer))); + check_hresult(WINRT_SHIM(IThreadPoolTimerStatics)->abi_CreatePeriodicTimer(get_abi(handler), get_abi(period), put_abi(timer))); return timer; } template Windows::System::Threading::ThreadPoolTimer impl_IThreadPoolTimerStatics::CreateTimer(const Windows::System::Threading::TimerElapsedHandler & handler, const Windows::Foundation::TimeSpan & delay) const { Windows::System::Threading::ThreadPoolTimer timer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTimer(get(handler), get(delay), put(timer))); + check_hresult(WINRT_SHIM(IThreadPoolTimerStatics)->abi_CreateTimer(get_abi(handler), get_abi(delay), put_abi(timer))); return timer; } template Windows::System::Threading::ThreadPoolTimer impl_IThreadPoolTimerStatics::CreatePeriodicTimer(const Windows::System::Threading::TimerElapsedHandler & handler, const Windows::Foundation::TimeSpan & period, const Windows::System::Threading::TimerDestroyedHandler & destroyed) const { Windows::System::Threading::ThreadPoolTimer timer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePeriodicTimerWithCompletion(get(handler), get(period), get(destroyed), put(timer))); + check_hresult(WINRT_SHIM(IThreadPoolTimerStatics)->abi_CreatePeriodicTimerWithCompletion(get_abi(handler), get_abi(period), get_abi(destroyed), put_abi(timer))); return timer; } template Windows::System::Threading::ThreadPoolTimer impl_IThreadPoolTimerStatics::CreateTimer(const Windows::System::Threading::TimerElapsedHandler & handler, const Windows::Foundation::TimeSpan & delay, const Windows::System::Threading::TimerDestroyedHandler & destroyed) const { Windows::System::Threading::ThreadPoolTimer timer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTimerWithCompletion(get(handler), get(delay), get(destroyed), put(timer))); + check_hresult(WINRT_SHIM(IThreadPoolTimerStatics)->abi_CreateTimerWithCompletion(get_abi(handler), get_abi(delay), get_abi(destroyed), put_abi(timer))); return timer; } @@ -325,3 +338,41 @@ inline Windows::System::Threading::ThreadPoolTimer ThreadPoolTimer::CreateTimer( } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::IThreadPoolStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::IThreadPoolTimer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::IThreadPoolTimerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::Threading::ThreadPoolTimer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.UserProfile.h b/10.0.14393.0/winrt/Windows.System.UserProfile.h index c88205136..60ee6bfba 100644 --- a/10.0.14393.0/winrt/Windows.System.UserProfile.h +++ b/10.0.14393.0/winrt/Windows.System.UserProfile.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.System.3.h" #include "internal/Windows.Storage.3.h" #include "internal/Windows.Foundation.3.h" @@ -20,11 +23,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_AdvertisingId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdvertisingId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvertisingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisingId()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce : pr } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -52,11 +57,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_AdvertisingId(abi_arg_out value) noexcept override + HRESULT __stdcall get_AdvertisingId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AdvertisingId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdvertisingId()); return S_OK; } catch (...) @@ -70,11 +76,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -92,11 +99,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetDefault(abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetDefault(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetDefault()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetDefault()); return S_OK; } catch (...) @@ -110,11 +118,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Calendars(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Calendars(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Calendars()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Calendars()); return S_OK; } catch (...) @@ -124,11 +133,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Clocks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Clocks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clocks()); return S_OK; } catch (...) @@ -138,11 +148,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Currencies(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Currencies()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Currencies()); return S_OK; } catch (...) @@ -152,11 +163,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Languages(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Languages()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Languages()); return S_OK; } catch (...) @@ -166,11 +178,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HomeGeographicRegion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HomeGeographicRegion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HomeGeographicRegion()); return S_OK; } catch (...) @@ -184,7 +197,8 @@ struct produceshim().WeekStartsOn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekStartsOn()); return S_OK; } catch (...) @@ -197,11 +211,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_RequestSetImageFeedAsync(abi_arg_in syndicationFeedUri, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_RequestSetImageFeedAsync(impl::abi_arg_in syndicationFeedUri, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RequestSetImageFeedAsync(*reinterpret_cast(&syndicationFeedUri))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestSetImageFeedAsync(*reinterpret_cast(&syndicationFeedUri))); return S_OK; } catch (...) @@ -215,7 +230,8 @@ struct produce : p { try { - *result = detach(this->shim().TryRemoveImageFeed()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryRemoveImageFeed()); return S_OK; } catch (...) @@ -228,11 +244,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_OriginalImageFile(abi_arg_out value) noexcept override + HRESULT __stdcall get_OriginalImageFile(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OriginalImageFile()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OriginalImageFile()); return S_OK; } catch (...) @@ -242,11 +259,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetImageStream(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetImageStream(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetImageStream()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetImageStream()); return S_OK; } catch (...) @@ -256,11 +274,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetImageFileAsync(abi_arg_in value, abi_arg_out Operation) noexcept override + HRESULT __stdcall abi_SetImageFileAsync(impl::abi_arg_in value, impl::abi_arg_out Operation) noexcept override { try { - *Operation = detach(this->shim().SetImageFileAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *Operation = detach_abi(this->shim().SetImageFileAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -270,11 +289,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetImageStreamAsync(abi_arg_in value, abi_arg_out Operation) noexcept override + HRESULT __stdcall abi_SetImageStreamAsync(impl::abi_arg_in value, impl::abi_arg_out Operation) noexcept override { try { - *Operation = detach(this->shim().SetImageStreamAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *Operation = detach_abi(this->shim().SetImageStreamAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -292,7 +312,8 @@ struct produce : produ { try { - *value = detach(this->shim().AccountPictureChangeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountPictureChangeEnabled()); return S_OK; } catch (...) @@ -305,7 +326,8 @@ struct produce : produ { try { - *value = detach(this->shim().NameAccessAllowed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NameAccessAllowed()); return S_OK; } catch (...) @@ -314,11 +336,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetAccountPicture(Windows::System::UserProfile::AccountPictureKind kind, abi_arg_out storageFile) noexcept override + HRESULT __stdcall abi_GetAccountPicture(Windows::System::UserProfile::AccountPictureKind kind, impl::abi_arg_out storageFile) noexcept override { try { - *storageFile = detach(this->shim().GetAccountPicture(kind)); + typename D::abi_guard guard(this->shim()); + *storageFile = detach_abi(this->shim().GetAccountPicture(kind)); return S_OK; } catch (...) @@ -328,11 +351,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetAccountPictureAsync(abi_arg_in image, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SetAccountPictureAsync(impl::abi_arg_in image, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SetAccountPictureAsync(*reinterpret_cast(&image))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetAccountPictureAsync(*reinterpret_cast(&image))); return S_OK; } catch (...) @@ -342,11 +366,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetAccountPicturesAsync(abi_arg_in smallImage, abi_arg_in largeImage, abi_arg_in video, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SetAccountPicturesAsync(impl::abi_arg_in smallImage, impl::abi_arg_in largeImage, impl::abi_arg_in video, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SetAccountPicturesAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetAccountPicturesAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); return S_OK; } catch (...) @@ -356,11 +381,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetAccountPictureFromStreamAsync(abi_arg_in image, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SetAccountPictureFromStreamAsync(impl::abi_arg_in image, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SetAccountPictureFromStreamAsync(*reinterpret_cast(&image))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetAccountPictureFromStreamAsync(*reinterpret_cast(&image))); return S_OK; } catch (...) @@ -370,11 +396,12 @@ struct produce : produ } } - HRESULT __stdcall abi_SetAccountPicturesFromStreamsAsync(abi_arg_in smallImage, abi_arg_in largeImage, abi_arg_in video, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_SetAccountPicturesFromStreamsAsync(impl::abi_arg_in smallImage, impl::abi_arg_in largeImage, impl::abi_arg_in video, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().SetAccountPicturesFromStreamsAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SetAccountPicturesFromStreamsAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); return S_OK; } catch (...) @@ -384,11 +411,12 @@ struct produce : produ } } - HRESULT __stdcall add_AccountPictureChanged(abi_arg_in> changeHandler, event_token * token) noexcept override + HRESULT __stdcall add_AccountPictureChanged(impl::abi_arg_in> changeHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().AccountPictureChanged(*reinterpret_cast *>(&changeHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AccountPictureChanged(*reinterpret_cast *>(&changeHandler))); return S_OK; } catch (...) @@ -401,6 +429,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AccountPictureChanged(token); return S_OK; } @@ -410,11 +439,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDisplayNameAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDisplayNameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDisplayNameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDisplayNameAsync()); return S_OK; } catch (...) @@ -424,11 +454,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetFirstNameAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetFirstNameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetFirstNameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetFirstNameAsync()); return S_OK; } catch (...) @@ -438,11 +469,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLastNameAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetLastNameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetLastNameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetLastNameAsync()); return S_OK; } catch (...) @@ -452,11 +484,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetPrincipalNameAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPrincipalNameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPrincipalNameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPrincipalNameAsync()); return S_OK; } catch (...) @@ -466,11 +499,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetSessionInitiationProtocolUriAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetSessionInitiationProtocolUriAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetSessionInitiationProtocolUriAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetSessionInitiationProtocolUriAsync()); return S_OK; } catch (...) @@ -480,11 +514,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDomainNameAsync(abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetDomainNameAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetDomainNameAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetDomainNameAsync()); return S_OK; } catch (...) @@ -498,11 +533,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_TrySetLockScreenImageAsync(abi_arg_in imageFile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TrySetLockScreenImageAsync(impl::abi_arg_in imageFile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TrySetLockScreenImageAsync(*reinterpret_cast(&imageFile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TrySetLockScreenImageAsync(*reinterpret_cast(&imageFile))); return S_OK; } catch (...) @@ -512,11 +548,12 @@ struct produce imageFile, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TrySetWallpaperImageAsync(impl::abi_arg_in imageFile, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TrySetWallpaperImageAsync(*reinterpret_cast(&imageFile))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TrySetWallpaperImageAsync(*reinterpret_cast(&imageFile))); return S_OK; } catch (...) @@ -530,11 +567,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out value) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -548,7 +586,8 @@ struct produceshim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -565,255 +604,255 @@ namespace Windows::System::UserProfile { template hstring impl_IAdvertisingManagerStatics::AdvertisingId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdvertisingId(put(value))); + check_hresult(WINRT_SHIM(IAdvertisingManagerStatics)->get_AdvertisingId(put_abi(value))); return value; } template hstring impl_IAdvertisingManagerForUser::AdvertisingId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AdvertisingId(put(value))); + check_hresult(WINRT_SHIM(IAdvertisingManagerForUser)->get_AdvertisingId(put_abi(value))); return value; } template Windows::System::User impl_IAdvertisingManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IAdvertisingManagerForUser)->get_User(put_abi(value))); return value; } template Windows::System::UserProfile::AdvertisingManagerForUser impl_IAdvertisingManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::System::UserProfile::AdvertisingManagerForUser value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(value))); + check_hresult(WINRT_SHIM(IAdvertisingManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IUserProfilePersonalizationSettings::TrySetLockScreenImageAsync(const Windows::Storage::StorageFile & imageFile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TrySetLockScreenImageAsync(get(imageFile), put(operation))); + check_hresult(WINRT_SHIM(IUserProfilePersonalizationSettings)->abi_TrySetLockScreenImageAsync(get_abi(imageFile), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserProfilePersonalizationSettings::TrySetWallpaperImageAsync(const Windows::Storage::StorageFile & imageFile) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TrySetWallpaperImageAsync(get(imageFile), put(operation))); + check_hresult(WINRT_SHIM(IUserProfilePersonalizationSettings)->abi_TrySetWallpaperImageAsync(get_abi(imageFile), put_abi(operation))); return operation; } template Windows::System::UserProfile::UserProfilePersonalizationSettings impl_IUserProfilePersonalizationSettingsStatics::Current() const { Windows::System::UserProfile::UserProfilePersonalizationSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(value))); + check_hresult(WINRT_SHIM(IUserProfilePersonalizationSettingsStatics)->get_Current(put_abi(value))); return value; } template bool impl_IUserProfilePersonalizationSettingsStatics::IsSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&result)); + check_hresult(WINRT_SHIM(IUserProfilePersonalizationSettingsStatics)->abi_IsSupported(&result)); return result; } template Windows::Foundation::Collections::IVectorView impl_IGlobalizationPreferencesStatics::Calendars() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Calendars(put(value))); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_Calendars(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGlobalizationPreferencesStatics::Clocks() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Clocks(put(value))); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_Clocks(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGlobalizationPreferencesStatics::Currencies() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Currencies(put(value))); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_Currencies(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IGlobalizationPreferencesStatics::Languages() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Languages(put(value))); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_Languages(put_abi(value))); return value; } template hstring impl_IGlobalizationPreferencesStatics::HomeGeographicRegion() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HomeGeographicRegion(put(value))); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_HomeGeographicRegion(put_abi(value))); return value; } template Windows::Globalization::DayOfWeek impl_IGlobalizationPreferencesStatics::WeekStartsOn() const { Windows::Globalization::DayOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_WeekStartsOn(&value)); + check_hresult(WINRT_SHIM(IGlobalizationPreferencesStatics)->get_WeekStartsOn(&value)); return value; } template Windows::System::UserProfile::FirstSignInSettings impl_IFirstSignInSettingsStatics::GetDefault() const { Windows::System::UserProfile::FirstSignInSettings result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDefault(put(result))); + check_hresult(WINRT_SHIM(IFirstSignInSettingsStatics)->abi_GetDefault(put_abi(result))); return result; } template bool impl_IUserInformationStatics::AccountPictureChangeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AccountPictureChangeEnabled(&value)); + check_hresult(WINRT_SHIM(IUserInformationStatics)->get_AccountPictureChangeEnabled(&value)); return value; } template bool impl_IUserInformationStatics::NameAccessAllowed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_NameAccessAllowed(&value)); + check_hresult(WINRT_SHIM(IUserInformationStatics)->get_NameAccessAllowed(&value)); return value; } template Windows::Storage::IStorageFile impl_IUserInformationStatics::GetAccountPicture(Windows::System::UserProfile::AccountPictureKind kind) const { Windows::Storage::IStorageFile storageFile; - check_hresult(static_cast(static_cast(*this))->abi_GetAccountPicture(kind, put(storageFile))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetAccountPicture(kind, put_abi(storageFile))); return storageFile; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::SetAccountPictureAsync(const Windows::Storage::IStorageFile & image) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SetAccountPictureAsync(get(image), put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_SetAccountPictureAsync(get_abi(image), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::SetAccountPicturesAsync(const Windows::Storage::IStorageFile & smallImage, const Windows::Storage::IStorageFile & largeImage, const Windows::Storage::IStorageFile & video) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SetAccountPicturesAsync(get(smallImage), get(largeImage), get(video), put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_SetAccountPicturesAsync(get_abi(smallImage), get_abi(largeImage), get_abi(video), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::SetAccountPictureFromStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & image) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SetAccountPictureFromStreamAsync(get(image), put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_SetAccountPictureFromStreamAsync(get_abi(image), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::SetAccountPicturesFromStreamsAsync(const Windows::Storage::Streams::IRandomAccessStream & smallImage, const Windows::Storage::Streams::IRandomAccessStream & largeImage, const Windows::Storage::Streams::IRandomAccessStream & video) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_SetAccountPicturesFromStreamsAsync(get(smallImage), get(largeImage), get(video), put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_SetAccountPicturesFromStreamsAsync(get_abi(smallImage), get_abi(largeImage), get_abi(video), put_abi(operation))); return operation; } -template event_token impl_IUserInformationStatics::AccountPictureChanged(const Windows::Foundation::EventHandler & changeHandler) const +template event_token impl_IUserInformationStatics::AccountPictureChanged(const Windows::Foundation::EventHandler & changeHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AccountPictureChanged(get(changeHandler), &token)); + check_hresult(WINRT_SHIM(IUserInformationStatics)->add_AccountPictureChanged(get_abi(changeHandler), &token)); return token; } -template event_revoker impl_IUserInformationStatics::AccountPictureChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const +template event_revoker impl_IUserInformationStatics::AccountPictureChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) const { return impl::make_event_revoker(this, &ABI::Windows::System::UserProfile::IUserInformationStatics::remove_AccountPictureChanged, AccountPictureChanged(changeHandler)); } template void impl_IUserInformationStatics::AccountPictureChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AccountPictureChanged(token)); + check_hresult(WINRT_SHIM(IUserInformationStatics)->remove_AccountPictureChanged(token)); } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetDisplayNameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDisplayNameAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetDisplayNameAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetFirstNameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetFirstNameAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetFirstNameAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetLastNameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetLastNameAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetLastNameAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetPrincipalNameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPrincipalNameAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetPrincipalNameAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetSessionInitiationProtocolUriAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetSessionInitiationProtocolUriAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetSessionInitiationProtocolUriAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUserInformationStatics::GetDomainNameAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetDomainNameAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserInformationStatics)->abi_GetDomainNameAsync(put_abi(operation))); return operation; } template Windows::Foundation::Uri impl_ILockScreenStatics::OriginalImageFile() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OriginalImageFile(put(value))); + check_hresult(WINRT_SHIM(ILockScreenStatics)->get_OriginalImageFile(put_abi(value))); return value; } template Windows::Storage::Streams::IRandomAccessStream impl_ILockScreenStatics::GetImageStream() const { Windows::Storage::Streams::IRandomAccessStream value; - check_hresult(static_cast(static_cast(*this))->abi_GetImageStream(put(value))); + check_hresult(WINRT_SHIM(ILockScreenStatics)->abi_GetImageStream(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_ILockScreenStatics::SetImageFileAsync(const Windows::Storage::IStorageFile & value) const { Windows::Foundation::IAsyncAction Operation; - check_hresult(static_cast(static_cast(*this))->abi_SetImageFileAsync(get(value), put(Operation))); + check_hresult(WINRT_SHIM(ILockScreenStatics)->abi_SetImageFileAsync(get_abi(value), put_abi(Operation))); return Operation; } template Windows::Foundation::IAsyncAction impl_ILockScreenStatics::SetImageStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & value) const { Windows::Foundation::IAsyncAction Operation; - check_hresult(static_cast(static_cast(*this))->abi_SetImageStreamAsync(get(value), put(Operation))); + check_hresult(WINRT_SHIM(ILockScreenStatics)->abi_SetImageStreamAsync(get_abi(value), put_abi(Operation))); return Operation; } template Windows::Foundation::IAsyncOperation impl_ILockScreenImageFeedStatics::RequestSetImageFeedAsync(const Windows::Foundation::Uri & syndicationFeedUri) const { Windows::Foundation::IAsyncOperation value; - check_hresult(static_cast(static_cast(*this))->abi_RequestSetImageFeedAsync(get(syndicationFeedUri), put(value))); + check_hresult(WINRT_SHIM(ILockScreenImageFeedStatics)->abi_RequestSetImageFeedAsync(get_abi(syndicationFeedUri), put_abi(value))); return value; } template bool impl_ILockScreenImageFeedStatics::TryRemoveImageFeed() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryRemoveImageFeed(&result)); + check_hresult(WINRT_SHIM(ILockScreenImageFeedStatics)->abi_TryRemoveImageFeed(&result)); return result; } @@ -927,12 +966,12 @@ inline Windows::Foundation::IAsyncOperation().SetAccountPicturesFromStreamsAsync(smallImage, largeImage, video); } -inline event_token UserInformation::AccountPictureChanged(const Windows::Foundation::EventHandler & changeHandler) +inline event_token UserInformation::AccountPictureChanged(const Windows::Foundation::EventHandler & changeHandler) { return get_activation_factory().AccountPictureChanged(changeHandler); } -inline factory_event_revoker UserInformation::AccountPictureChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) +inline factory_event_revoker UserInformation::AccountPictureChanged(auto_revoke_t, const Windows::Foundation::EventHandler & changeHandler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::UserProfile::IUserInformationStatics::remove_AccountPictureChanged, factory.AccountPictureChanged(changeHandler) }; @@ -986,3 +1025,131 @@ inline bool UserProfilePersonalizationSettings::IsSupported() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IAdvertisingManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IAdvertisingManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IAdvertisingManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IFirstSignInSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IFirstSignInSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::ILockScreenImageFeedStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::ILockScreenStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IUserInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::AdvertisingManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::FirstSignInSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserProfile::UserProfilePersonalizationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.System.h b/10.0.14393.0/winrt/Windows.System.h index 0a5850f26..f88c42949 100644 --- a/10.0.14393.0/winrt/Windows.System.h +++ b/10.0.14393.0/winrt/Windows.System.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.Popups.3.h" @@ -24,7 +27,8 @@ struct produce : produce_baseshim().PrivateCommitUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrivateCommitUsage()); return S_OK; } catch (...) @@ -37,7 +41,8 @@ struct produce : produce_baseshim().PeakPrivateCommitUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeakPrivateCommitUsage()); return S_OK; } catch (...) @@ -50,7 +55,8 @@ struct produce : produce_baseshim().TotalCommitUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalCommitUsage()); return S_OK; } catch (...) @@ -63,7 +69,8 @@ struct produce : produce_baseshim().TotalCommitLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalCommitLimit()); return S_OK; } catch (...) @@ -80,7 +87,8 @@ struct produce : prod { try { - *value = detach(this->shim().OldLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldLimit()); return S_OK; } catch (...) @@ -93,7 +101,8 @@ struct produce : prod { try { - *value = detach(this->shim().NewLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewLimit()); return S_OK; } catch (...) @@ -106,11 +115,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_ItemsToSelect(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ItemsToSelect(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ItemsToSelect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsToSelect()); return S_OK; } catch (...) @@ -124,11 +134,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -138,11 +149,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstName()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LastName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LastName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastName()); return S_OK; } catch (...) @@ -166,11 +179,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ProviderName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProviderName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProviderName()); return S_OK; } catch (...) @@ -180,11 +194,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AccountName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountName()); return S_OK; } catch (...) @@ -194,11 +209,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_GuestHost(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GuestHost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GuestHost()); return S_OK; } catch (...) @@ -208,11 +224,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrincipalName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrincipalName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrincipalName()); return S_OK; } catch (...) @@ -222,11 +239,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DomainName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DomainName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DomainName()); return S_OK; } catch (...) @@ -236,11 +254,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SessionInitiationProtocolUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SessionInitiationProtocolUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SessionInitiationProtocolUri()); return S_OK; } catch (...) @@ -258,7 +277,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -267,11 +287,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Result(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -289,7 +310,8 @@ struct produce : produce_baseshim().TreatAsUntrusted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TreatAsUntrusted()); return S_OK; } catch (...) @@ -302,6 +324,7 @@ struct produce : produce_baseshim()); this->shim().TreatAsUntrusted(value); return S_OK; } @@ -315,7 +338,8 @@ struct produce : produce_baseshim().DisplayApplicationPicker()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayApplicationPicker()); return S_OK; } catch (...) @@ -328,6 +352,7 @@ struct produce : produce_baseshim()); this->shim().DisplayApplicationPicker(value); return S_OK; } @@ -337,11 +362,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UI(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UI()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UI()); return S_OK; } catch (...) @@ -351,11 +377,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PreferredApplicationPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreferredApplicationPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredApplicationPackageFamilyName()); return S_OK; } catch (...) @@ -365,10 +392,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PreferredApplicationPackageFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredApplicationPackageFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -378,11 +406,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PreferredApplicationDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreferredApplicationDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredApplicationDisplayName()); return S_OK; } catch (...) @@ -392,10 +421,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PreferredApplicationDisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredApplicationDisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -405,11 +435,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FallbackUri()); return S_OK; } catch (...) @@ -419,10 +450,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FallbackUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FallbackUri(*reinterpret_cast(&value)); return S_OK; } @@ -432,11 +464,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentType()); return S_OK; } catch (...) @@ -446,10 +479,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContentType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentType(*reinterpret_cast(&value)); return S_OK; } @@ -463,11 +497,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TargetApplicationPackageFamilyName(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetApplicationPackageFamilyName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetApplicationPackageFamilyName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetApplicationPackageFamilyName()); return S_OK; } catch (...) @@ -477,10 +512,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TargetApplicationPackageFamilyName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetApplicationPackageFamilyName(*reinterpret_cast(&value)); return S_OK; } @@ -490,11 +526,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NeighboringFilesQuery(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NeighboringFilesQuery()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NeighboringFilesQuery()); return S_OK; } catch (...) @@ -504,10 +541,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_NeighboringFilesQuery(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NeighboringFilesQuery(*reinterpret_cast(&value)); return S_OK; } @@ -525,7 +563,8 @@ struct produce : produce_baseshim().IgnoreAppUriHandlers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IgnoreAppUriHandlers()); return S_OK; } catch (...) @@ -538,6 +577,7 @@ struct produce : produce_baseshim()); this->shim().IgnoreAppUriHandlers(value); return S_OK; } @@ -551,11 +591,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LaunchFileAsync(abi_arg_in file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchFileAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchFileAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchFileAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -565,11 +606,12 @@ struct produce : produce_base file, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchFileWithOptionsAsync(impl::abi_arg_in file, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -579,11 +621,12 @@ struct produce : produce_base uri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriAsync(impl::abi_arg_in uri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -593,11 +636,12 @@ struct produce : produce_base uri, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithOptionsAsync(impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -611,11 +655,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LaunchUriForResultsAsync(abi_arg_in uri, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriForResultsAsync(impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -625,11 +670,12 @@ struct produce : produce_base uri, abi_arg_in options, abi_arg_in inputData, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriForResultsWithDataAsync(impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_in inputData, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return S_OK; } catch (...) @@ -639,11 +685,12 @@ struct produce : produce_base uri, abi_arg_in options, abi_arg_in inputData, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithDataAsync(impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_in inputData, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return S_OK; } catch (...) @@ -653,11 +700,12 @@ struct produce : produce_base uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryUriSupportAsync(impl::abi_arg_in uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), launchQuerySupportType)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), launchQuerySupportType)); return S_OK; } catch (...) @@ -667,11 +715,12 @@ struct produce : produce_base uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, abi_arg_in packageFamilyName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryUriSupportWithPackageFamilyNameAsync(impl::abi_arg_in uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), launchQuerySupportType, *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), launchQuerySupportType, *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -681,11 +730,12 @@ struct produce : produce_base file, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryFileSupportAsync(impl::abi_arg_in file, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file))); return S_OK; } catch (...) @@ -695,11 +745,12 @@ struct produce : produce_base file, abi_arg_in packageFamilyName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryFileSupportWithPackageFamilyNameAsync(impl::abi_arg_in file, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file), *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file), *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -709,11 +760,12 @@ struct produce : produce_base scheme, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindUriSchemeHandlersAsync(impl::abi_arg_in scheme, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme))); return S_OK; } catch (...) @@ -723,11 +775,12 @@ struct produce : produce_base scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindUriSchemeHandlersWithLaunchUriTypeAsync(impl::abi_arg_in scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme), launchQuerySupportType)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme), launchQuerySupportType)); return S_OK; } catch (...) @@ -737,11 +790,12 @@ struct produce : produce_base extension, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindFileHandlersAsync(impl::abi_arg_in extension, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindFileHandlersAsync(*reinterpret_cast(&extension))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindFileHandlersAsync(*reinterpret_cast(&extension))); return S_OK; } catch (...) @@ -755,11 +809,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LaunchFolderAsync(abi_arg_in folder, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchFolderAsync(impl::abi_arg_in folder, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder))); return S_OK; } catch (...) @@ -769,11 +824,12 @@ struct produce : produce_base folder, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchFolderWithOptionsAsync(impl::abi_arg_in folder, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -787,11 +843,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_QueryAppUriSupportAsync(abi_arg_in uri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryAppUriSupportAsync(impl::abi_arg_in uri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -801,11 +858,12 @@ struct produce : produce_base uri, abi_arg_in packageFamilyName, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_QueryAppUriSupportWithPackageFamilyNameAsync(impl::abi_arg_in uri, impl::abi_arg_in packageFamilyName, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri), *reinterpret_cast(&packageFamilyName))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri), *reinterpret_cast(&packageFamilyName))); return S_OK; } catch (...) @@ -815,11 +873,12 @@ struct produce : produce_base uri, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAppUriHandlersAsync(impl::abi_arg_in uri, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAppUriHandlersAsync(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAppUriHandlersAsync(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -829,11 +888,12 @@ struct produce : produce_base user, abi_arg_in uri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriForUserAsync(impl::abi_arg_in user, impl::abi_arg_in uri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -843,11 +903,12 @@ struct produce : produce_base user, abi_arg_in uri, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithOptionsForUserAsync(impl::abi_arg_in user, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -857,11 +918,12 @@ struct produce : produce_base user, abi_arg_in uri, abi_arg_in options, abi_arg_in inputData, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithDataForUserAsync(impl::abi_arg_in user, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_in inputData, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return S_OK; } catch (...) @@ -871,11 +933,12 @@ struct produce : produce_base user, abi_arg_in uri, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriForResultsForUserAsync(impl::abi_arg_in user, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -885,11 +948,12 @@ struct produce : produce_base user, abi_arg_in uri, abi_arg_in options, abi_arg_in inputData, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriForResultsWithDataForUserAsync(impl::abi_arg_in user, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_in inputData, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return S_OK; } catch (...) @@ -903,11 +967,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_InvocationPoint(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InvocationPoint(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InvocationPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InvocationPoint()); return S_OK; } catch (...) @@ -917,10 +982,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_InvocationPoint(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InvocationPoint(*reinterpret_cast *>(&value)); return S_OK; } @@ -930,11 +996,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SelectionRect(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectionRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionRect()); return S_OK; } catch (...) @@ -944,10 +1011,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_SelectionRect(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionRect(*reinterpret_cast *>(&value)); return S_OK; } @@ -961,7 +1029,8 @@ struct produce : produce_baseshim().PreferredPlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredPlacement()); return S_OK; } catch (...) @@ -974,6 +1043,7 @@ struct produce : produce_baseshim()); this->shim().PreferredPlacement(value); return S_OK; } @@ -991,7 +1061,8 @@ struct produce : produce_baseshim().DesiredRemainingView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredRemainingView()); return S_OK; } catch (...) @@ -1004,6 +1075,7 @@ struct produce : produce_baseshim()); this->shim().DesiredRemainingView(value); return S_OK; } @@ -1021,7 +1093,8 @@ struct produce : produce_baseshim().AppMemoryUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppMemoryUsage()); return S_OK; } catch (...) @@ -1034,7 +1107,8 @@ struct produce : produce_baseshim().AppMemoryUsageLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppMemoryUsageLimit()); return S_OK; } catch (...) @@ -1047,7 +1121,8 @@ struct produce : produce_baseshim().AppMemoryUsageLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppMemoryUsageLevel()); return S_OK; } catch (...) @@ -1056,11 +1131,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AppMemoryUsageIncreased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AppMemoryUsageIncreased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AppMemoryUsageIncreased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1073,6 +1149,7 @@ struct produce : produce_baseshim()); this->shim().AppMemoryUsageIncreased(token); return S_OK; } @@ -1082,11 +1159,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AppMemoryUsageDecreased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AppMemoryUsageDecreased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AppMemoryUsageDecreased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1099,6 +1177,7 @@ struct produce : produce_baseshim()); this->shim().AppMemoryUsageDecreased(token); return S_OK; } @@ -1108,11 +1187,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AppMemoryUsageLimitChanging(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AppMemoryUsageLimitChanging(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AppMemoryUsageLimitChanging(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1125,6 +1205,7 @@ struct produce : produce_baseshim()); this->shim().AppMemoryUsageLimitChanging(token); return S_OK; } @@ -1138,11 +1219,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetAppMemoryReport(abi_arg_out memoryReport) noexcept override + HRESULT __stdcall abi_GetAppMemoryReport(impl::abi_arg_out memoryReport) noexcept override { try { - *memoryReport = detach(this->shim().GetAppMemoryReport()); + typename D::abi_guard guard(this->shim()); + *memoryReport = detach_abi(this->shim().GetAppMemoryReport()); return S_OK; } catch (...) @@ -1152,11 +1234,12 @@ struct produce : produce_base memoryReport) noexcept override + HRESULT __stdcall abi_GetProcessMemoryReport(impl::abi_arg_out memoryReport) noexcept override { try { - *memoryReport = detach(this->shim().GetProcessMemoryReport()); + typename D::abi_guard guard(this->shim()); + *memoryReport = detach_abi(this->shim().GetProcessMemoryReport()); return S_OK; } catch (...) @@ -1174,7 +1257,8 @@ struct produce : produce_baseshim().TrySetAppMemoryUsageLimit(value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySetAppMemoryUsageLimit(value)); return S_OK; } catch (...) @@ -1187,11 +1271,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StandardInput(abi_arg_out value) noexcept override + HRESULT __stdcall get_StandardInput(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StandardInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StandardInput()); return S_OK; } catch (...) @@ -1201,10 +1286,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_StandardInput(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StandardInput(*reinterpret_cast(&value)); return S_OK; } @@ -1214,11 +1300,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StandardOutput(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StandardOutput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StandardOutput()); return S_OK; } catch (...) @@ -1228,10 +1315,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_StandardOutput(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StandardOutput(*reinterpret_cast(&value)); return S_OK; } @@ -1241,11 +1329,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StandardError(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StandardError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StandardError()); return S_OK; } catch (...) @@ -1255,10 +1344,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_StandardError(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StandardError(*reinterpret_cast(&value)); return S_OK; } @@ -1268,11 +1358,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_WorkingDirectory(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WorkingDirectory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WorkingDirectory()); return S_OK; } catch (...) @@ -1282,10 +1373,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_WorkingDirectory(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WorkingDirectory(*reinterpret_cast(&value)); return S_OK; } @@ -1303,7 +1395,8 @@ struct produce : produce_baseshim().ExitCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExitCode()); return S_OK; } catch (...) @@ -1316,11 +1409,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_RunToCompletionAsync(abi_arg_in fileName, abi_arg_in args, abi_arg_out> asyncOperationResult) noexcept override + HRESULT __stdcall abi_RunToCompletionAsync(impl::abi_arg_in fileName, impl::abi_arg_in args, impl::abi_arg_out> asyncOperationResult) noexcept override { try { - *asyncOperationResult = detach(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args))); + typename D::abi_guard guard(this->shim()); + *asyncOperationResult = detach_abi(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args))); return S_OK; } catch (...) @@ -1330,11 +1424,12 @@ struct produce : produce_base fileName, abi_arg_in args, abi_arg_in options, abi_arg_out> asyncOperationResult) noexcept override + HRESULT __stdcall abi_RunToCompletionAsyncWithOptions(impl::abi_arg_in fileName, impl::abi_arg_in args, impl::abi_arg_in options, impl::abi_arg_out> asyncOperationResult) noexcept override { try { - *asyncOperationResult = detach(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *asyncOperationResult = detach_abi(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -1352,7 +1447,8 @@ struct produce : produce_baseshim().PrivateWorkingSetUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrivateWorkingSetUsage()); return S_OK; } catch (...) @@ -1365,7 +1461,8 @@ struct produce : produce_baseshim().TotalWorkingSetUsage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TotalWorkingSetUsage()); return S_OK; } catch (...) @@ -1378,10 +1475,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ReportCompleted(abi_arg_in data) noexcept override + HRESULT __stdcall abi_ReportCompleted(impl::abi_arg_in data) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&data)); return S_OK; } @@ -1395,11 +1493,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_FallbackUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_FallbackUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FallbackUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FallbackUri()); return S_OK; } catch (...) @@ -1409,10 +1508,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FallbackUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FallbackUri(*reinterpret_cast(&value)); return S_OK; } @@ -1422,11 +1522,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_PreferredAppIds(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PreferredAppIds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredAppIds()); return S_OK; } catch (...) @@ -1440,11 +1541,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_LaunchUriAsync(abi_arg_in remoteSystemConnectionRequest, abi_arg_in uri, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriAsync(impl::abi_arg_in remoteSystemConnectionRequest, impl::abi_arg_in uri, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -1454,11 +1556,12 @@ struct produce : produce_base remoteSystemConnectionRequest, abi_arg_in uri, abi_arg_in options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithOptionsAsync(impl::abi_arg_in remoteSystemConnectionRequest, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return S_OK; } catch (...) @@ -1468,11 +1571,12 @@ struct produce : produce_base remoteSystemConnectionRequest, abi_arg_in uri, abi_arg_in options, abi_arg_in inputData, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_LaunchUriWithDataAsync(impl::abi_arg_in remoteSystemConnectionRequest, impl::abi_arg_in uri, impl::abi_arg_in options, impl::abi_arg_in inputData, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return S_OK; } catch (...) @@ -1486,10 +1590,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_BeginShutdown(Windows::System::ShutdownKind shutdownKind, abi_arg_in timeout) noexcept override + HRESULT __stdcall abi_BeginShutdown(Windows::System::ShutdownKind shutdownKind, impl::abi_arg_in timeout) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeginShutdown(shutdownKind, *reinterpret_cast(&timeout)); return S_OK; } @@ -1503,6 +1608,7 @@ struct produce : produce_baseshim()); this->shim().CancelShutdown(); return S_OK; } @@ -1516,11 +1622,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CurrentTimeZoneDisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentTimeZoneDisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentTimeZoneDisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentTimeZoneDisplayName()); return S_OK; } catch (...) @@ -1530,11 +1637,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SupportedTimeZoneDisplayNames(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SupportedTimeZoneDisplayNames()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedTimeZoneDisplayNames()); return S_OK; } catch (...) @@ -1548,7 +1656,8 @@ struct produce : produce_baseshim().CanChangeTimeZone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanChangeTimeZone()); return S_OK; } catch (...) @@ -1557,10 +1666,11 @@ struct produce : produce_base timeZoneDisplayName) noexcept override + HRESULT __stdcall abi_ChangeTimeZoneByDisplayName(impl::abi_arg_in timeZoneDisplayName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChangeTimeZoneByDisplayName(*reinterpret_cast(&timeZoneDisplayName)); return S_OK; } @@ -1574,11 +1684,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_NonRoamableId(abi_arg_out value) noexcept override + HRESULT __stdcall get_NonRoamableId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NonRoamableId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NonRoamableId()); return S_OK; } catch (...) @@ -1592,7 +1703,8 @@ struct produce : produce_baseshim().AuthenticationStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthenticationStatus()); return S_OK; } catch (...) @@ -1605,7 +1717,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -1614,11 +1727,12 @@ struct produce : produce_base value, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPropertyAsync(impl::abi_arg_in value, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertyAsync(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertyAsync(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -1628,11 +1742,12 @@ struct produce : produce_base> values, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_GetPropertiesAsync(impl::abi_arg_in> values, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPropertiesAsync(*reinterpret_cast *>(&values))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPropertiesAsync(*reinterpret_cast *>(&values))); return S_OK; } catch (...) @@ -1642,11 +1757,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_GetPictureAsync(Windows::System::UserPictureSize desiredSize, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().GetPictureAsync(desiredSize)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().GetPictureAsync(desiredSize)); return S_OK; } catch (...) @@ -1664,6 +1780,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1677,11 +1794,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1691,11 +1809,12 @@ struct produce : } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -1709,7 +1828,8 @@ struct produce : { try { - *value = detach(this->shim().NewStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewStatus()); return S_OK; } catch (...) @@ -1722,7 +1842,8 @@ struct produce : { try { - *value = detach(this->shim().CurrentStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentStatus()); return S_OK; } catch (...) @@ -1735,11 +1856,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -1753,11 +1875,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -1767,11 +1890,12 @@ struct produce : pro } } - HRESULT __stdcall get_NewUser(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewUser(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewUser()); return S_OK; } catch (...) @@ -1781,11 +1905,12 @@ struct produce : pro } } - HRESULT __stdcall get_OldUser(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldUser(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldUser()); return S_OK; } catch (...) @@ -1799,11 +1924,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_FindUserFromDeviceId(abi_arg_in deviceId, abi_arg_out user) noexcept override + HRESULT __stdcall abi_FindUserFromDeviceId(impl::abi_arg_in deviceId, impl::abi_arg_out user) noexcept override { try { - *user = detach(this->shim().FindUserFromDeviceId(*reinterpret_cast(&deviceId))); + typename D::abi_guard guard(this->shim()); + *user = detach_abi(this->shim().FindUserFromDeviceId(*reinterpret_cast(&deviceId))); return S_OK; } catch (...) @@ -1813,11 +1939,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_UserDeviceAssociationChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_UserDeviceAssociationChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().UserDeviceAssociationChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UserDeviceAssociationChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1830,6 +1957,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().UserDeviceAssociationChanged(token); return S_OK; } @@ -1847,7 +1975,8 @@ struct produce : produce_baseshim().AllowGuestAccounts()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowGuestAccounts()); return S_OK; } catch (...) @@ -1860,6 +1989,7 @@ struct produce : produce_baseshim()); this->shim().AllowGuestAccounts(value); return S_OK; } @@ -1869,11 +1999,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SuggestedSelectedUser(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SuggestedSelectedUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuggestedSelectedUser()); return S_OK; } catch (...) @@ -1883,10 +2014,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SuggestedSelectedUser(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SuggestedSelectedUser(*reinterpret_cast(&value)); return S_OK; } @@ -1896,11 +2028,12 @@ struct produce : produce_base> pickSingleUserOperation) noexcept override + HRESULT __stdcall abi_PickSingleUserAsync(impl::abi_arg_out> pickSingleUserOperation) noexcept override { try { - *pickSingleUserOperation = detach(this->shim().PickSingleUserAsync()); + typename D::abi_guard guard(this->shim()); + *pickSingleUserOperation = detach_abi(this->shim().PickSingleUserAsync()); return S_OK; } catch (...) @@ -1918,7 +2051,8 @@ struct produce : produce_baseshim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -1931,11 +2065,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWatcher(abi_arg_out watcher) noexcept override + HRESULT __stdcall abi_CreateWatcher(impl::abi_arg_out watcher) noexcept override { try { - *watcher = detach(this->shim().CreateWatcher()); + typename D::abi_guard guard(this->shim()); + *watcher = detach_abi(this->shim().CreateWatcher()); return S_OK; } catch (...) @@ -1945,11 +2080,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -1959,11 +2095,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsyncByType(Windows::System::UserType type, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync(type)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync(type)); return S_OK; } catch (...) @@ -1973,11 +2110,12 @@ struct produce : produce_base>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsyncByTypeAndStatus(Windows::System::UserType type, Windows::System::UserAuthenticationStatus status, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync(type, status)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync(type, status)); return S_OK; } catch (...) @@ -1987,11 +2125,12 @@ struct produce : produce_base nonRoamableId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetFromId(impl::abi_arg_in nonRoamableId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetFromId(*reinterpret_cast(&nonRoamableId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFromId(*reinterpret_cast(&nonRoamableId))); return S_OK; } catch (...) @@ -2009,7 +2148,8 @@ struct produce : produce_baseshim().Status()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Status()); return S_OK; } catch (...) @@ -2022,6 +2162,7 @@ struct produce : produce_baseshim()); this->shim().Start(); return S_OK; } @@ -2035,6 +2176,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -2044,11 +2186,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Added(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Added(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Added(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2061,6 +2204,7 @@ struct produce : produce_baseshim()); this->shim().Added(token); return S_OK; } @@ -2070,11 +2214,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Removed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Removed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Removed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2087,6 +2232,7 @@ struct produce : produce_baseshim()); this->shim().Removed(token); return S_OK; } @@ -2096,11 +2242,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Updated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Updated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Updated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2113,6 +2260,7 @@ struct produce : produce_baseshim()); this->shim().Updated(token); return S_OK; } @@ -2122,11 +2270,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AuthenticationStatusChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AuthenticationStatusChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AuthenticationStatusChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2139,6 +2288,7 @@ struct produce : produce_baseshim()); this->shim().AuthenticationStatusChanged(token); return S_OK; } @@ -2148,11 +2298,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_AuthenticationStatusChanging(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().AuthenticationStatusChanging(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().AuthenticationStatusChanging(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2165,6 +2316,7 @@ struct produce : produce_baseshim()); this->shim().AuthenticationStatusChanging(token); return S_OK; } @@ -2174,11 +2326,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_EnumerationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnumerationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2191,6 +2344,7 @@ struct produce : produce_baseshim()); this->shim().EnumerationCompleted(token); return S_OK; } @@ -2200,11 +2354,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Stopped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Stopped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Stopped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2217,6 +2372,7 @@ struct produce : produce_baseshim()); this->shim().Stopped(token); return S_OK; } @@ -2234,118 +2390,118 @@ namespace Windows::System { template uint64_t impl_IAppMemoryReport::PrivateCommitUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PrivateCommitUsage(&value)); + check_hresult(WINRT_SHIM(IAppMemoryReport)->get_PrivateCommitUsage(&value)); return value; } template uint64_t impl_IAppMemoryReport::PeakPrivateCommitUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PeakPrivateCommitUsage(&value)); + check_hresult(WINRT_SHIM(IAppMemoryReport)->get_PeakPrivateCommitUsage(&value)); return value; } template uint64_t impl_IAppMemoryReport::TotalCommitUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalCommitUsage(&value)); + check_hresult(WINRT_SHIM(IAppMemoryReport)->get_TotalCommitUsage(&value)); return value; } template uint64_t impl_IAppMemoryReport::TotalCommitLimit() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalCommitLimit(&value)); + check_hresult(WINRT_SHIM(IAppMemoryReport)->get_TotalCommitLimit(&value)); return value; } template uint64_t impl_IProcessMemoryReport::PrivateWorkingSetUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PrivateWorkingSetUsage(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryReport)->get_PrivateWorkingSetUsage(&value)); return value; } template uint64_t impl_IProcessMemoryReport::TotalWorkingSetUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TotalWorkingSetUsage(&value)); + check_hresult(WINRT_SHIM(IProcessMemoryReport)->get_TotalWorkingSetUsage(&value)); return value; } template uint64_t impl_IAppMemoryUsageLimitChangingEventArgs::OldLimit() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_OldLimit(&value)); + check_hresult(WINRT_SHIM(IAppMemoryUsageLimitChangingEventArgs)->get_OldLimit(&value)); return value; } template uint64_t impl_IAppMemoryUsageLimitChangingEventArgs::NewLimit() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NewLimit(&value)); + check_hresult(WINRT_SHIM(IAppMemoryUsageLimitChangingEventArgs)->get_NewLimit(&value)); return value; } template uint64_t impl_IMemoryManagerStatics::AppMemoryUsage() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AppMemoryUsage(&value)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->get_AppMemoryUsage(&value)); return value; } template uint64_t impl_IMemoryManagerStatics::AppMemoryUsageLimit() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AppMemoryUsageLimit(&value)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->get_AppMemoryUsageLimit(&value)); return value; } template Windows::System::AppMemoryUsageLevel impl_IMemoryManagerStatics::AppMemoryUsageLevel() const { Windows::System::AppMemoryUsageLevel value {}; - check_hresult(static_cast(static_cast(*this))->get_AppMemoryUsageLevel(&value)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->get_AppMemoryUsageLevel(&value)); return value; } -template event_token impl_IMemoryManagerStatics::AppMemoryUsageIncreased(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMemoryManagerStatics::AppMemoryUsageIncreased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AppMemoryUsageIncreased(get(handler), &token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->add_AppMemoryUsageIncreased(get_abi(handler), &token)); return token; } -template event_revoker impl_IMemoryManagerStatics::AppMemoryUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMemoryManagerStatics::AppMemoryUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::IMemoryManagerStatics::remove_AppMemoryUsageIncreased, AppMemoryUsageIncreased(handler)); } template void impl_IMemoryManagerStatics::AppMemoryUsageIncreased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AppMemoryUsageIncreased(token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->remove_AppMemoryUsageIncreased(token)); } -template event_token impl_IMemoryManagerStatics::AppMemoryUsageDecreased(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IMemoryManagerStatics::AppMemoryUsageDecreased(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AppMemoryUsageDecreased(get(handler), &token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->add_AppMemoryUsageDecreased(get_abi(handler), &token)); return token; } -template event_revoker impl_IMemoryManagerStatics::AppMemoryUsageDecreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IMemoryManagerStatics::AppMemoryUsageDecreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::IMemoryManagerStatics::remove_AppMemoryUsageDecreased, AppMemoryUsageDecreased(handler)); } template void impl_IMemoryManagerStatics::AppMemoryUsageDecreased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AppMemoryUsageDecreased(token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->remove_AppMemoryUsageDecreased(token)); } template event_token impl_IMemoryManagerStatics::AppMemoryUsageLimitChanging(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AppMemoryUsageLimitChanging(get(handler), &token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->add_AppMemoryUsageLimitChanging(get_abi(handler), &token)); return token; } @@ -2356,133 +2512,133 @@ template event_revoker impl_IMemoryManagerSt template void impl_IMemoryManagerStatics::AppMemoryUsageLimitChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AppMemoryUsageLimitChanging(token)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics)->remove_AppMemoryUsageLimitChanging(token)); } template Windows::System::AppMemoryReport impl_IMemoryManagerStatics2::GetAppMemoryReport() const { Windows::System::AppMemoryReport memoryReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAppMemoryReport(put(memoryReport))); + check_hresult(WINRT_SHIM(IMemoryManagerStatics2)->abi_GetAppMemoryReport(put_abi(memoryReport))); return memoryReport; } template Windows::System::ProcessMemoryReport impl_IMemoryManagerStatics2::GetProcessMemoryReport() const { Windows::System::ProcessMemoryReport memoryReport { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetProcessMemoryReport(put(memoryReport))); + check_hresult(WINRT_SHIM(IMemoryManagerStatics2)->abi_GetProcessMemoryReport(put_abi(memoryReport))); return memoryReport; } template bool impl_IMemoryManagerStatics3::TrySetAppMemoryUsageLimit(uint64_t value) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetAppMemoryUsageLimit(value, &result)); + check_hresult(WINRT_SHIM(IMemoryManagerStatics3)->abi_TrySetAppMemoryUsageLimit(value, &result)); return result; } template void impl_IProtocolForResultsOperation::ReportCompleted(const Windows::Foundation::Collections::ValueSet & data) const { - check_hresult(static_cast(static_cast(*this))->abi_ReportCompleted(get(data))); + check_hresult(WINRT_SHIM(IProtocolForResultsOperation)->abi_ReportCompleted(get_abi(data))); } template hstring impl_IUser::NonRoamableId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_NonRoamableId(put(value))); + check_hresult(WINRT_SHIM(IUser)->get_NonRoamableId(put_abi(value))); return value; } template Windows::System::UserAuthenticationStatus impl_IUser::AuthenticationStatus() const { Windows::System::UserAuthenticationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_AuthenticationStatus(&value)); + check_hresult(WINRT_SHIM(IUser)->get_AuthenticationStatus(&value)); return value; } template Windows::System::UserType impl_IUser::Type() const { Windows::System::UserType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IUser)->get_Type(&value)); return value; } -template Windows::Foundation::IAsyncOperation impl_IUser::GetPropertyAsync(hstring_ref value) const +template Windows::Foundation::IAsyncOperation impl_IUser::GetPropertyAsync(hstring_view value) const { - Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertyAsync(get(value), put(operation))); + Windows::Foundation::IAsyncOperation operation; + check_hresult(WINRT_SHIM(IUser)->abi_GetPropertyAsync(get_abi(value), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_IUser::GetPropertiesAsync(const Windows::Foundation::Collections::IVectorView & values) const +template Windows::Foundation::IAsyncOperation impl_IUser::GetPropertiesAsync(vector_view values) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPropertiesAsync(get(values), put(operation))); + check_hresult(WINRT_SHIM(IUser)->abi_GetPropertiesAsync(get_abi(values), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IUser::GetPictureAsync(Windows::System::UserPictureSize desiredSize) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_GetPictureAsync(desiredSize, put(operation))); + check_hresult(WINRT_SHIM(IUser)->abi_GetPictureAsync(desiredSize, put_abi(operation))); return operation; } template Windows::System::UserWatcher impl_IUserStatics::CreateWatcher() const { Windows::System::UserWatcher watcher { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWatcher(put(watcher))); + check_hresult(WINRT_SHIM(IUserStatics)->abi_CreateWatcher(put_abi(watcher))); return watcher; } template Windows::Foundation::IAsyncOperation> impl_IUserStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(operation))); + check_hresult(WINRT_SHIM(IUserStatics)->abi_FindAllAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IUserStatics::FindAllAsync(Windows::System::UserType type) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncByType(type, put(operation))); + check_hresult(WINRT_SHIM(IUserStatics)->abi_FindAllAsyncByType(type, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_IUserStatics::FindAllAsync(Windows::System::UserType type, Windows::System::UserAuthenticationStatus status) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsyncByTypeAndStatus(type, status, put(operation))); + check_hresult(WINRT_SHIM(IUserStatics)->abi_FindAllAsyncByTypeAndStatus(type, status, put_abi(operation))); return operation; } -template Windows::System::User impl_IUserStatics::GetFromId(hstring_ref nonRoamableId) const +template Windows::System::User impl_IUserStatics::GetFromId(hstring_view nonRoamableId) const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetFromId(get(nonRoamableId), put(value))); + check_hresult(WINRT_SHIM(IUserStatics)->abi_GetFromId(get_abi(nonRoamableId), put_abi(value))); return value; } template Windows::System::UserWatcherStatus impl_IUserWatcher::Status() const { Windows::System::UserWatcherStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(IUserWatcher)->get_Status(&value)); return value; } template void impl_IUserWatcher::Start() const { - check_hresult(static_cast(static_cast(*this))->abi_Start()); + check_hresult(WINRT_SHIM(IUserWatcher)->abi_Start()); } template void impl_IUserWatcher::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IUserWatcher)->abi_Stop()); } template event_token impl_IUserWatcher::Added(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Added(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_Added(get_abi(handler), &token)); return token; } @@ -2493,13 +2649,13 @@ template event_revoker impl_IUserWatcher::Added(au template void impl_IUserWatcher::Added(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Added(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_Added(token)); } template event_token impl_IUserWatcher::Removed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Removed(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_Removed(get_abi(handler), &token)); return token; } @@ -2510,13 +2666,13 @@ template event_revoker impl_IUserWatcher::Removed( template void impl_IUserWatcher::Removed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Removed(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_Removed(token)); } template event_token impl_IUserWatcher::Updated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Updated(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_Updated(get_abi(handler), &token)); return token; } @@ -2527,13 +2683,13 @@ template event_revoker impl_IUserWatcher::Updated( template void impl_IUserWatcher::Updated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Updated(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_Updated(token)); } template event_token impl_IUserWatcher::AuthenticationStatusChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AuthenticationStatusChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_AuthenticationStatusChanged(get_abi(handler), &token)); return token; } @@ -2544,13 +2700,13 @@ template event_revoker impl_IUserWatcher::Authenti template void impl_IUserWatcher::AuthenticationStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AuthenticationStatusChanged(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_AuthenticationStatusChanged(token)); } template event_token impl_IUserWatcher::AuthenticationStatusChanging(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_AuthenticationStatusChanging(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_AuthenticationStatusChanging(get_abi(handler), &token)); return token; } @@ -2561,216 +2717,216 @@ template event_revoker impl_IUserWatcher::Authenti template void impl_IUserWatcher::AuthenticationStatusChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_AuthenticationStatusChanging(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_AuthenticationStatusChanging(token)); } -template event_token impl_IUserWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IUserWatcher::EnumerationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnumerationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_EnumerationCompleted(get_abi(handler), &token)); return token; } -template event_revoker impl_IUserWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IUserWatcher::EnumerationCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::IUserWatcher::remove_EnumerationCompleted, EnumerationCompleted(handler)); } template void impl_IUserWatcher::EnumerationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnumerationCompleted(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_EnumerationCompleted(token)); } -template event_token impl_IUserWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IUserWatcher::Stopped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Stopped(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserWatcher)->add_Stopped(get_abi(handler), &token)); return token; } -template event_revoker impl_IUserWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IUserWatcher::Stopped(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::System::IUserWatcher::remove_Stopped, Stopped(handler)); } template void impl_IUserWatcher::Stopped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Stopped(token)); + check_hresult(WINRT_SHIM(IUserWatcher)->remove_Stopped(token)); } template Windows::System::User impl_IUserChangedEventArgs::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IUserChangedEventArgs)->get_User(put_abi(value))); return value; } template void impl_IUserAuthenticationStatusChangeDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IUserAuthenticationStatusChangeDeferral)->abi_Complete()); } template Windows::System::UserAuthenticationStatusChangeDeferral impl_IUserAuthenticationStatusChangingEventArgs::GetDeferral() const { Windows::System::UserAuthenticationStatusChangeDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IUserAuthenticationStatusChangingEventArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::System::User impl_IUserAuthenticationStatusChangingEventArgs::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IUserAuthenticationStatusChangingEventArgs)->get_User(put_abi(value))); return value; } template Windows::System::UserAuthenticationStatus impl_IUserAuthenticationStatusChangingEventArgs::NewStatus() const { Windows::System::UserAuthenticationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_NewStatus(&value)); + check_hresult(WINRT_SHIM(IUserAuthenticationStatusChangingEventArgs)->get_NewStatus(&value)); return value; } template Windows::System::UserAuthenticationStatus impl_IUserAuthenticationStatusChangingEventArgs::CurrentStatus() const { Windows::System::UserAuthenticationStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentStatus(&value)); + check_hresult(WINRT_SHIM(IUserAuthenticationStatusChangingEventArgs)->get_CurrentStatus(&value)); return value; } template hstring impl_IKnownUserPropertiesStatics::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_DisplayName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::FirstName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FirstName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_FirstName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::LastName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LastName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_LastName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::ProviderName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ProviderName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_ProviderName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::AccountName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AccountName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_AccountName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::GuestHost() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GuestHost(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_GuestHost(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::PrincipalName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrincipalName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_PrincipalName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::DomainName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DomainName(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_DomainName(put_abi(value))); return value; } template hstring impl_IKnownUserPropertiesStatics::SessionInitiationProtocolUri() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SessionInitiationProtocolUri(put(value))); + check_hresult(WINRT_SHIM(IKnownUserPropertiesStatics)->get_SessionInitiationProtocolUri(put_abi(value))); return value; } template bool impl_IUserPickerStatics::IsSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&value)); + check_hresult(WINRT_SHIM(IUserPickerStatics)->abi_IsSupported(&value)); return value; } template bool impl_IUserPicker::AllowGuestAccounts() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowGuestAccounts(&value)); + check_hresult(WINRT_SHIM(IUserPicker)->get_AllowGuestAccounts(&value)); return value; } template void impl_IUserPicker::AllowGuestAccounts(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowGuestAccounts(value)); + check_hresult(WINRT_SHIM(IUserPicker)->put_AllowGuestAccounts(value)); } template Windows::System::User impl_IUserPicker::SuggestedSelectedUser() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SuggestedSelectedUser(put(value))); + check_hresult(WINRT_SHIM(IUserPicker)->get_SuggestedSelectedUser(put_abi(value))); return value; } template void impl_IUserPicker::SuggestedSelectedUser(const Windows::System::User & value) const { - check_hresult(static_cast(static_cast(*this))->put_SuggestedSelectedUser(get(value))); + check_hresult(WINRT_SHIM(IUserPicker)->put_SuggestedSelectedUser(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IUserPicker::PickSingleUserAsync() const { Windows::Foundation::IAsyncOperation pickSingleUserOperation; - check_hresult(static_cast(static_cast(*this))->abi_PickSingleUserAsync(put(pickSingleUserOperation))); + check_hresult(WINRT_SHIM(IUserPicker)->abi_PickSingleUserAsync(put_abi(pickSingleUserOperation))); return pickSingleUserOperation; } template hstring impl_IUserDeviceAssociationChangedEventArgs::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IUserDeviceAssociationChangedEventArgs)->get_DeviceId(put_abi(value))); return value; } template Windows::System::User impl_IUserDeviceAssociationChangedEventArgs::NewUser() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NewUser(put(value))); + check_hresult(WINRT_SHIM(IUserDeviceAssociationChangedEventArgs)->get_NewUser(put_abi(value))); return value; } template Windows::System::User impl_IUserDeviceAssociationChangedEventArgs::OldUser() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OldUser(put(value))); + check_hresult(WINRT_SHIM(IUserDeviceAssociationChangedEventArgs)->get_OldUser(put_abi(value))); return value; } -template Windows::System::User impl_IUserDeviceAssociationStatics::FindUserFromDeviceId(hstring_ref deviceId) const +template Windows::System::User impl_IUserDeviceAssociationStatics::FindUserFromDeviceId(hstring_view deviceId) const { Windows::System::User user { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindUserFromDeviceId(get(deviceId), put(user))); + check_hresult(WINRT_SHIM(IUserDeviceAssociationStatics)->abi_FindUserFromDeviceId(get_abi(deviceId), put_abi(user))); return user; } template event_token impl_IUserDeviceAssociationStatics::UserDeviceAssociationChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UserDeviceAssociationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserDeviceAssociationStatics)->add_UserDeviceAssociationChanged(get_abi(handler), &token)); return token; } @@ -2781,504 +2937,504 @@ template event_revoker impl_IUserDev template void impl_IUserDeviceAssociationStatics::UserDeviceAssociationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UserDeviceAssociationChanged(token)); + check_hresult(WINRT_SHIM(IUserDeviceAssociationStatics)->remove_UserDeviceAssociationChanged(token)); } template Windows::System::LaunchUriStatus impl_ILaunchUriResult::Status() const { Windows::System::LaunchUriStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_Status(&value)); + check_hresult(WINRT_SHIM(ILaunchUriResult)->get_Status(&value)); return value; } template Windows::Foundation::Collections::ValueSet impl_ILaunchUriResult::Result() const { Windows::Foundation::Collections::ValueSet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Result(put(value))); + check_hresult(WINRT_SHIM(ILaunchUriResult)->get_Result(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ILauncherUIOptions::InvocationPoint() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InvocationPoint(put(value))); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->get_InvocationPoint(put_abi(value))); return value; } -template void impl_ILauncherUIOptions::InvocationPoint(const Windows::Foundation::IReference & value) const +template void impl_ILauncherUIOptions::InvocationPoint(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InvocationPoint(get(value))); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->put_InvocationPoint(get_abi(value))); } template Windows::Foundation::IReference impl_ILauncherUIOptions::SelectionRect() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SelectionRect(put(value))); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->get_SelectionRect(put_abi(value))); return value; } -template void impl_ILauncherUIOptions::SelectionRect(const Windows::Foundation::IReference & value) const +template void impl_ILauncherUIOptions::SelectionRect(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionRect(get(value))); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->put_SelectionRect(get_abi(value))); } template Windows::UI::Popups::Placement impl_ILauncherUIOptions::PreferredPlacement() const { Windows::UI::Popups::Placement value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferredPlacement(&value)); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->get_PreferredPlacement(&value)); return value; } template void impl_ILauncherUIOptions::PreferredPlacement(Windows::UI::Popups::Placement value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredPlacement(value)); + check_hresult(WINRT_SHIM(ILauncherUIOptions)->put_PreferredPlacement(value)); } template bool impl_ILauncherOptions::TreatAsUntrusted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TreatAsUntrusted(&value)); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_TreatAsUntrusted(&value)); return value; } template void impl_ILauncherOptions::TreatAsUntrusted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_TreatAsUntrusted(value)); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_TreatAsUntrusted(value)); } template bool impl_ILauncherOptions::DisplayApplicationPicker() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayApplicationPicker(&value)); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_DisplayApplicationPicker(&value)); return value; } template void impl_ILauncherOptions::DisplayApplicationPicker(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayApplicationPicker(value)); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_DisplayApplicationPicker(value)); } template Windows::System::LauncherUIOptions impl_ILauncherOptions::UI() const { Windows::System::LauncherUIOptions value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UI(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_UI(put_abi(value))); return value; } template hstring impl_ILauncherOptions::PreferredApplicationPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PreferredApplicationPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_PreferredApplicationPackageFamilyName(put_abi(value))); return value; } -template void impl_ILauncherOptions::PreferredApplicationPackageFamilyName(hstring_ref value) const +template void impl_ILauncherOptions::PreferredApplicationPackageFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredApplicationPackageFamilyName(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_PreferredApplicationPackageFamilyName(get_abi(value))); } template hstring impl_ILauncherOptions::PreferredApplicationDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PreferredApplicationDisplayName(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_PreferredApplicationDisplayName(put_abi(value))); return value; } -template void impl_ILauncherOptions::PreferredApplicationDisplayName(hstring_ref value) const +template void impl_ILauncherOptions::PreferredApplicationDisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredApplicationDisplayName(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_PreferredApplicationDisplayName(get_abi(value))); } template Windows::Foundation::Uri impl_ILauncherOptions::FallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FallbackUri(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_FallbackUri(put_abi(value))); return value; } template void impl_ILauncherOptions::FallbackUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_FallbackUri(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_FallbackUri(get_abi(value))); } template hstring impl_ILauncherOptions::ContentType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ContentType(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->get_ContentType(put_abi(value))); return value; } -template void impl_ILauncherOptions::ContentType(hstring_ref value) const +template void impl_ILauncherOptions::ContentType(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentType(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions)->put_ContentType(get_abi(value))); } template hstring impl_ILauncherOptions2::TargetApplicationPackageFamilyName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TargetApplicationPackageFamilyName(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions2)->get_TargetApplicationPackageFamilyName(put_abi(value))); return value; } -template void impl_ILauncherOptions2::TargetApplicationPackageFamilyName(hstring_ref value) const +template void impl_ILauncherOptions2::TargetApplicationPackageFamilyName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TargetApplicationPackageFamilyName(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions2)->put_TargetApplicationPackageFamilyName(get_abi(value))); } template Windows::Storage::Search::StorageFileQueryResult impl_ILauncherOptions2::NeighboringFilesQuery() const { Windows::Storage::Search::StorageFileQueryResult value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NeighboringFilesQuery(put(value))); + check_hresult(WINRT_SHIM(ILauncherOptions2)->get_NeighboringFilesQuery(put_abi(value))); return value; } template void impl_ILauncherOptions2::NeighboringFilesQuery(const Windows::Storage::Search::StorageFileQueryResult & value) const { - check_hresult(static_cast(static_cast(*this))->put_NeighboringFilesQuery(get(value))); + check_hresult(WINRT_SHIM(ILauncherOptions2)->put_NeighboringFilesQuery(get_abi(value))); } template bool impl_ILauncherOptions3::IgnoreAppUriHandlers() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IgnoreAppUriHandlers(&value)); + check_hresult(WINRT_SHIM(ILauncherOptions3)->get_IgnoreAppUriHandlers(&value)); return value; } template void impl_ILauncherOptions3::IgnoreAppUriHandlers(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IgnoreAppUriHandlers(value)); + check_hresult(WINRT_SHIM(ILauncherOptions3)->put_IgnoreAppUriHandlers(value)); } template Windows::UI::ViewManagement::ViewSizePreference impl_ILauncherViewOptions::DesiredRemainingView() const { Windows::UI::ViewManagement::ViewSizePreference value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredRemainingView(&value)); + check_hresult(WINRT_SHIM(ILauncherViewOptions)->get_DesiredRemainingView(&value)); return value; } template void impl_ILauncherViewOptions::DesiredRemainingView(Windows::UI::ViewManagement::ViewSizePreference value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredRemainingView(value)); + check_hresult(WINRT_SHIM(ILauncherViewOptions)->put_DesiredRemainingView(value)); } template Windows::Foundation::Uri impl_IRemoteLauncherOptions::FallbackUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FallbackUri(put(value))); + check_hresult(WINRT_SHIM(IRemoteLauncherOptions)->get_FallbackUri(put_abi(value))); return value; } template void impl_IRemoteLauncherOptions::FallbackUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_FallbackUri(get(value))); + check_hresult(WINRT_SHIM(IRemoteLauncherOptions)->put_FallbackUri(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IRemoteLauncherOptions::PreferredAppIds() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_PreferredAppIds(put(value))); + check_hresult(WINRT_SHIM(IRemoteLauncherOptions)->get_PreferredAppIds(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IFolderLauncherOptions::ItemsToSelect() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ItemsToSelect(put(value))); + check_hresult(WINRT_SHIM(IFolderLauncherOptions)->get_ItemsToSelect(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics::LaunchFileAsync(const Windows::Storage::IStorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFileAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics)->abi_LaunchFileAsync(get_abi(file), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics::LaunchFileAsync(const Windows::Storage::IStorageFile & file, const Windows::System::LauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFileWithOptionsAsync(get(file), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics)->abi_LaunchFileWithOptionsAsync(get_abi(file), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics::LaunchUriAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriAsync(get(uri), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics)->abi_LaunchUriAsync(get_abi(uri), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics::LaunchUriAsync(const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithOptionsAsync(get(uri), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics)->abi_LaunchUriWithOptionsAsync(get_abi(uri), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::LaunchUriForResultsAsync(const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriForResultsAsync(get(uri), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_LaunchUriForResultsAsync(get_abi(uri), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::LaunchUriForResultsAsync(const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options, const Windows::Foundation::Collections::ValueSet & inputData) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriForResultsWithDataAsync(get(uri), get(options), get(inputData), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_LaunchUriForResultsWithDataAsync(get_abi(uri), get_abi(options), get_abi(inputData), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::LaunchUriAsync(const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options, const Windows::Foundation::Collections::ValueSet & inputData) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithDataAsync(get(uri), get(options), get(inputData), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_LaunchUriWithDataAsync(get_abi(uri), get_abi(options), get_abi(inputData), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryUriSupportAsync(const Windows::Foundation::Uri & uri, Windows::System::LaunchQuerySupportType launchQuerySupportType) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryUriSupportAsync(get(uri), launchQuerySupportType, put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_QueryUriSupportAsync(get_abi(uri), launchQuerySupportType, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryUriSupportAsync(const Windows::Foundation::Uri & uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, hstring_ref packageFamilyName) const +template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryUriSupportAsync(const Windows::Foundation::Uri & uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, hstring_view packageFamilyName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryUriSupportWithPackageFamilyNameAsync(get(uri), launchQuerySupportType, get(packageFamilyName), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_QueryUriSupportWithPackageFamilyNameAsync(get_abi(uri), launchQuerySupportType, get_abi(packageFamilyName), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryFileSupportAsync(const Windows::Storage::StorageFile & file) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryFileSupportAsync(get(file), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_QueryFileSupportAsync(get_abi(file), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryFileSupportAsync(const Windows::Storage::StorageFile & file, hstring_ref packageFamilyName) const +template Windows::Foundation::IAsyncOperation impl_ILauncherStatics2::QueryFileSupportAsync(const Windows::Storage::StorageFile & file, hstring_view packageFamilyName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryFileSupportWithPackageFamilyNameAsync(get(file), get(packageFamilyName), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_QueryFileSupportWithPackageFamilyNameAsync(get_abi(file), get_abi(packageFamilyName), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindUriSchemeHandlersAsync(hstring_ref scheme) const +template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindUriSchemeHandlersAsync(hstring_view scheme) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindUriSchemeHandlersAsync(get(scheme), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_FindUriSchemeHandlersAsync(get_abi(scheme), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindUriSchemeHandlersAsync(hstring_ref scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType) const +template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindUriSchemeHandlersAsync(hstring_view scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindUriSchemeHandlersWithLaunchUriTypeAsync(get(scheme), launchQuerySupportType, put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_FindUriSchemeHandlersWithLaunchUriTypeAsync(get_abi(scheme), launchQuerySupportType, put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindFileHandlersAsync(hstring_ref extension) const +template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics2::FindFileHandlersAsync(hstring_view extension) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindFileHandlersAsync(get(extension), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics2)->abi_FindFileHandlersAsync(get_abi(extension), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics3::LaunchFolderAsync(const Windows::Storage::IStorageFolder & folder) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFolderAsync(get(folder), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics3)->abi_LaunchFolderAsync(get_abi(folder), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics3::LaunchFolderAsync(const Windows::Storage::IStorageFolder & folder, const Windows::System::FolderLauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchFolderWithOptionsAsync(get(folder), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics3)->abi_LaunchFolderWithOptionsAsync(get_abi(folder), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::QueryAppUriSupportAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryAppUriSupportAsync(get(uri), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_QueryAppUriSupportAsync(get_abi(uri), put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::QueryAppUriSupportAsync(const Windows::Foundation::Uri & uri, hstring_ref packageFamilyName) const +template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::QueryAppUriSupportAsync(const Windows::Foundation::Uri & uri, hstring_view packageFamilyName) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_QueryAppUriSupportWithPackageFamilyNameAsync(get(uri), get(packageFamilyName), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_QueryAppUriSupportWithPackageFamilyNameAsync(get_abi(uri), get_abi(packageFamilyName), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_ILauncherStatics4::FindAppUriHandlersAsync(const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAppUriHandlersAsync(get(uri), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_FindAppUriHandlersAsync(get_abi(uri), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::LaunchUriForUserAsync(const Windows::System::User & user, const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriForUserAsync(get(user), get(uri), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_LaunchUriForUserAsync(get_abi(user), get_abi(uri), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::LaunchUriForUserAsync(const Windows::System::User & user, const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithOptionsForUserAsync(get(user), get(uri), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_LaunchUriWithOptionsForUserAsync(get_abi(user), get_abi(uri), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::LaunchUriForUserAsync(const Windows::System::User & user, const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options, const Windows::Foundation::Collections::ValueSet & inputData) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithDataForUserAsync(get(user), get(uri), get(options), get(inputData), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_LaunchUriWithDataForUserAsync(get_abi(user), get_abi(uri), get_abi(options), get_abi(inputData), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::LaunchUriForResultsForUserAsync(const Windows::System::User & user, const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriForResultsForUserAsync(get(user), get(uri), get(options), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_LaunchUriForResultsForUserAsync(get_abi(user), get_abi(uri), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ILauncherStatics4::LaunchUriForResultsForUserAsync(const Windows::System::User & user, const Windows::Foundation::Uri & uri, const Windows::System::LauncherOptions & options, const Windows::Foundation::Collections::ValueSet & inputData) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriForResultsWithDataForUserAsync(get(user), get(uri), get(options), get(inputData), put(operation))); + check_hresult(WINRT_SHIM(ILauncherStatics4)->abi_LaunchUriForResultsWithDataForUserAsync(get_abi(user), get_abi(uri), get_abi(options), get_abi(inputData), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IRemoteLauncherStatics::LaunchUriAsync(const Windows::System::RemoteSystems::RemoteSystemConnectionRequest & remoteSystemConnectionRequest, const Windows::Foundation::Uri & uri) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriAsync(get(remoteSystemConnectionRequest), get(uri), put(operation))); + check_hresult(WINRT_SHIM(IRemoteLauncherStatics)->abi_LaunchUriAsync(get_abi(remoteSystemConnectionRequest), get_abi(uri), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IRemoteLauncherStatics::LaunchUriAsync(const Windows::System::RemoteSystems::RemoteSystemConnectionRequest & remoteSystemConnectionRequest, const Windows::Foundation::Uri & uri, const Windows::System::RemoteLauncherOptions & options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithOptionsAsync(get(remoteSystemConnectionRequest), get(uri), get(options), put(operation))); + check_hresult(WINRT_SHIM(IRemoteLauncherStatics)->abi_LaunchUriWithOptionsAsync(get_abi(remoteSystemConnectionRequest), get_abi(uri), get_abi(options), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IRemoteLauncherStatics::LaunchUriAsync(const Windows::System::RemoteSystems::RemoteSystemConnectionRequest & remoteSystemConnectionRequest, const Windows::Foundation::Uri & uri, const Windows::System::RemoteLauncherOptions & options, const Windows::Foundation::Collections::ValueSet & inputData) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_LaunchUriWithDataAsync(get(remoteSystemConnectionRequest), get(uri), get(options), get(inputData), put(operation))); + check_hresult(WINRT_SHIM(IRemoteLauncherStatics)->abi_LaunchUriWithDataAsync(get_abi(remoteSystemConnectionRequest), get_abi(uri), get_abi(options), get_abi(inputData), put_abi(operation))); return operation; } template Windows::Storage::Streams::IInputStream impl_IProcessLauncherOptions::StandardInput() const { Windows::Storage::Streams::IInputStream value; - check_hresult(static_cast(static_cast(*this))->get_StandardInput(put(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->get_StandardInput(put_abi(value))); return value; } template void impl_IProcessLauncherOptions::StandardInput(const Windows::Storage::Streams::IInputStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_StandardInput(get(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->put_StandardInput(get_abi(value))); } template Windows::Storage::Streams::IOutputStream impl_IProcessLauncherOptions::StandardOutput() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_StandardOutput(put(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->get_StandardOutput(put_abi(value))); return value; } template void impl_IProcessLauncherOptions::StandardOutput(const Windows::Storage::Streams::IOutputStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_StandardOutput(get(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->put_StandardOutput(get_abi(value))); } template Windows::Storage::Streams::IOutputStream impl_IProcessLauncherOptions::StandardError() const { Windows::Storage::Streams::IOutputStream value; - check_hresult(static_cast(static_cast(*this))->get_StandardError(put(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->get_StandardError(put_abi(value))); return value; } template void impl_IProcessLauncherOptions::StandardError(const Windows::Storage::Streams::IOutputStream & value) const { - check_hresult(static_cast(static_cast(*this))->put_StandardError(get(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->put_StandardError(get_abi(value))); } template hstring impl_IProcessLauncherOptions::WorkingDirectory() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WorkingDirectory(put(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->get_WorkingDirectory(put_abi(value))); return value; } -template void impl_IProcessLauncherOptions::WorkingDirectory(hstring_ref value) const +template void impl_IProcessLauncherOptions::WorkingDirectory(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_WorkingDirectory(get(value))); + check_hresult(WINRT_SHIM(IProcessLauncherOptions)->put_WorkingDirectory(get_abi(value))); } -template Windows::Foundation::IAsyncOperation impl_IProcessLauncherStatics::RunToCompletionAsync(hstring_ref fileName, hstring_ref args) const +template Windows::Foundation::IAsyncOperation impl_IProcessLauncherStatics::RunToCompletionAsync(hstring_view fileName, hstring_view args) const { Windows::Foundation::IAsyncOperation asyncOperationResult; - check_hresult(static_cast(static_cast(*this))->abi_RunToCompletionAsync(get(fileName), get(args), put(asyncOperationResult))); + check_hresult(WINRT_SHIM(IProcessLauncherStatics)->abi_RunToCompletionAsync(get_abi(fileName), get_abi(args), put_abi(asyncOperationResult))); return asyncOperationResult; } -template Windows::Foundation::IAsyncOperation impl_IProcessLauncherStatics::RunToCompletionAsync(hstring_ref fileName, hstring_ref args, const Windows::System::ProcessLauncherOptions & options) const +template Windows::Foundation::IAsyncOperation impl_IProcessLauncherStatics::RunToCompletionAsync(hstring_view fileName, hstring_view args, const Windows::System::ProcessLauncherOptions & options) const { Windows::Foundation::IAsyncOperation asyncOperationResult; - check_hresult(static_cast(static_cast(*this))->abi_RunToCompletionAsyncWithOptions(get(fileName), get(args), get(options), put(asyncOperationResult))); + check_hresult(WINRT_SHIM(IProcessLauncherStatics)->abi_RunToCompletionAsyncWithOptions(get_abi(fileName), get_abi(args), get_abi(options), put_abi(asyncOperationResult))); return asyncOperationResult; } template uint32_t impl_IProcessLauncherResult::ExitCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ExitCode(&value)); + check_hresult(WINRT_SHIM(IProcessLauncherResult)->get_ExitCode(&value)); return value; } template void impl_IShutdownManagerStatics::BeginShutdown(Windows::System::ShutdownKind shutdownKind, const Windows::Foundation::TimeSpan & timeout) const { - check_hresult(static_cast(static_cast(*this))->abi_BeginShutdown(shutdownKind, get(timeout))); + check_hresult(WINRT_SHIM(IShutdownManagerStatics)->abi_BeginShutdown(shutdownKind, get_abi(timeout))); } template void impl_IShutdownManagerStatics::CancelShutdown() const { - check_hresult(static_cast(static_cast(*this))->abi_CancelShutdown()); + check_hresult(WINRT_SHIM(IShutdownManagerStatics)->abi_CancelShutdown()); } template hstring impl_ITimeZoneSettingsStatics::CurrentTimeZoneDisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CurrentTimeZoneDisplayName(put(value))); + check_hresult(WINRT_SHIM(ITimeZoneSettingsStatics)->get_CurrentTimeZoneDisplayName(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ITimeZoneSettingsStatics::SupportedTimeZoneDisplayNames() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SupportedTimeZoneDisplayNames(put(value))); + check_hresult(WINRT_SHIM(ITimeZoneSettingsStatics)->get_SupportedTimeZoneDisplayNames(put_abi(value))); return value; } template bool impl_ITimeZoneSettingsStatics::CanChangeTimeZone() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanChangeTimeZone(&value)); + check_hresult(WINRT_SHIM(ITimeZoneSettingsStatics)->get_CanChangeTimeZone(&value)); return value; } -template void impl_ITimeZoneSettingsStatics::ChangeTimeZoneByDisplayName(hstring_ref timeZoneDisplayName) const +template void impl_ITimeZoneSettingsStatics::ChangeTimeZoneByDisplayName(hstring_view timeZoneDisplayName) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangeTimeZoneByDisplayName(get(timeZoneDisplayName))); + check_hresult(WINRT_SHIM(ITimeZoneSettingsStatics)->abi_ChangeTimeZoneByDisplayName(get_abi(timeZoneDisplayName))); } inline FolderLauncherOptions::FolderLauncherOptions() : @@ -3370,7 +3526,7 @@ inline Windows::Foundation::IAsyncOperation().QueryUriSupportAsync(uri, launchQuerySupportType); } -inline Windows::Foundation::IAsyncOperation Launcher::QueryUriSupportAsync(const Windows::Foundation::Uri & uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, hstring_ref packageFamilyName) +inline Windows::Foundation::IAsyncOperation Launcher::QueryUriSupportAsync(const Windows::Foundation::Uri & uri, Windows::System::LaunchQuerySupportType launchQuerySupportType, hstring_view packageFamilyName) { return get_activation_factory().QueryUriSupportAsync(uri, launchQuerySupportType, packageFamilyName); } @@ -3380,22 +3536,22 @@ inline Windows::Foundation::IAsyncOperation().QueryFileSupportAsync(file); } -inline Windows::Foundation::IAsyncOperation Launcher::QueryFileSupportAsync(const Windows::Storage::StorageFile & file, hstring_ref packageFamilyName) +inline Windows::Foundation::IAsyncOperation Launcher::QueryFileSupportAsync(const Windows::Storage::StorageFile & file, hstring_view packageFamilyName) { return get_activation_factory().QueryFileSupportAsync(file, packageFamilyName); } -inline Windows::Foundation::IAsyncOperation> Launcher::FindUriSchemeHandlersAsync(hstring_ref scheme) +inline Windows::Foundation::IAsyncOperation> Launcher::FindUriSchemeHandlersAsync(hstring_view scheme) { return get_activation_factory().FindUriSchemeHandlersAsync(scheme); } -inline Windows::Foundation::IAsyncOperation> Launcher::FindUriSchemeHandlersAsync(hstring_ref scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType) +inline Windows::Foundation::IAsyncOperation> Launcher::FindUriSchemeHandlersAsync(hstring_view scheme, Windows::System::LaunchQuerySupportType launchQuerySupportType) { return get_activation_factory().FindUriSchemeHandlersAsync(scheme, launchQuerySupportType); } -inline Windows::Foundation::IAsyncOperation> Launcher::FindFileHandlersAsync(hstring_ref extension) +inline Windows::Foundation::IAsyncOperation> Launcher::FindFileHandlersAsync(hstring_view extension) { return get_activation_factory().FindFileHandlersAsync(extension); } @@ -3415,7 +3571,7 @@ inline Windows::Foundation::IAsyncOperation().QueryAppUriSupportAsync(uri); } -inline Windows::Foundation::IAsyncOperation Launcher::QueryAppUriSupportAsync(const Windows::Foundation::Uri & uri, hstring_ref packageFamilyName) +inline Windows::Foundation::IAsyncOperation Launcher::QueryAppUriSupportAsync(const Windows::Foundation::Uri & uri, hstring_view packageFamilyName) { return get_activation_factory().QueryAppUriSupportAsync(uri, packageFamilyName); } @@ -3469,12 +3625,12 @@ inline Windows::System::AppMemoryUsageLevel MemoryManager::AppMemoryUsageLevel() return get_activation_factory().AppMemoryUsageLevel(); } -inline event_token MemoryManager::AppMemoryUsageIncreased(const Windows::Foundation::EventHandler & handler) +inline event_token MemoryManager::AppMemoryUsageIncreased(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().AppMemoryUsageIncreased(handler); } -inline factory_event_revoker MemoryManager::AppMemoryUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MemoryManager::AppMemoryUsageIncreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::IMemoryManagerStatics::remove_AppMemoryUsageIncreased, factory.AppMemoryUsageIncreased(handler) }; @@ -3485,12 +3641,12 @@ inline void MemoryManager::AppMemoryUsageIncreased(event_token token) get_activation_factory().AppMemoryUsageIncreased(token); } -inline event_token MemoryManager::AppMemoryUsageDecreased(const Windows::Foundation::EventHandler & handler) +inline event_token MemoryManager::AppMemoryUsageDecreased(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().AppMemoryUsageDecreased(handler); } -inline factory_event_revoker MemoryManager::AppMemoryUsageDecreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker MemoryManager::AppMemoryUsageDecreased(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::System::IMemoryManagerStatics::remove_AppMemoryUsageDecreased, factory.AppMemoryUsageDecreased(handler) }; @@ -3532,12 +3688,12 @@ inline bool MemoryManager::TrySetAppMemoryUsageLimit(uint64_t value) return get_activation_factory().TrySetAppMemoryUsageLimit(value); } -inline Windows::Foundation::IAsyncOperation ProcessLauncher::RunToCompletionAsync(hstring_ref fileName, hstring_ref args) +inline Windows::Foundation::IAsyncOperation ProcessLauncher::RunToCompletionAsync(hstring_view fileName, hstring_view args) { return get_activation_factory().RunToCompletionAsync(fileName, args); } -inline Windows::Foundation::IAsyncOperation ProcessLauncher::RunToCompletionAsync(hstring_ref fileName, hstring_ref args, const Windows::System::ProcessLauncherOptions & options) +inline Windows::Foundation::IAsyncOperation ProcessLauncher::RunToCompletionAsync(hstring_view fileName, hstring_view args, const Windows::System::ProcessLauncherOptions & options) { return get_activation_factory().RunToCompletionAsync(fileName, args, options); } @@ -3590,7 +3746,7 @@ inline bool TimeZoneSettings::CanChangeTimeZone() return get_activation_factory().CanChangeTimeZone(); } -inline void TimeZoneSettings::ChangeTimeZoneByDisplayName(hstring_ref timeZoneDisplayName) +inline void TimeZoneSettings::ChangeTimeZoneByDisplayName(hstring_view timeZoneDisplayName) { get_activation_factory().ChangeTimeZoneByDisplayName(timeZoneDisplayName); } @@ -3615,12 +3771,12 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(type, status); } -inline Windows::System::User User::GetFromId(hstring_ref nonRoamableId) +inline Windows::System::User User::GetFromId(hstring_view nonRoamableId) { return get_activation_factory().GetFromId(nonRoamableId); } -inline Windows::System::User UserDeviceAssociation::FindUserFromDeviceId(hstring_ref deviceId) +inline Windows::System::User UserDeviceAssociation::FindUserFromDeviceId(hstring_view deviceId) { return get_activation_factory().FindUserFromDeviceId(deviceId); } @@ -3653,3 +3809,491 @@ inline bool UserPicker::IsSupported() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IAppMemoryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IAppMemoryUsageLimitChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IFolderLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IKnownUserPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILaunchUriResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherOptions2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherOptions3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherUIOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ILauncherViewOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IMemoryManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IMemoryManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IMemoryManagerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IProcessLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IProcessLauncherResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IProcessLauncherStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IProcessMemoryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IProtocolForResultsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IRemoteLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IRemoteLauncherStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IShutdownManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ITimeZoneSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserAuthenticationStatusChangeDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserAuthenticationStatusChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserDeviceAssociationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserDeviceAssociationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserPickerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::IUserWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::AppMemoryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::AppMemoryUsageLimitChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::FolderLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::LaunchUriResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::LauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::LauncherUIOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ProcessLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ProcessLauncherResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ProcessMemoryReport & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::ProtocolForResultsOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::RemoteLauncherOptions & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::User & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserAuthenticationStatusChangeDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserAuthenticationStatusChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserDeviceAssociationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserPicker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::System::UserWatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.ApplicationSettings.h b/10.0.14393.0/winrt/Windows.UI.ApplicationSettings.h index 0d26802ff..2d4145381 100644 --- a/10.0.14393.0/winrt/Windows.UI.ApplicationSettings.h +++ b/10.0.14393.0/winrt/Windows.UI.ApplicationSettings.h @@ -1,12 +1,15 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + +#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Popups.3.h" #include "internal/Windows.Security.Credentials.3.h" #include "internal/Windows.Foundation.Collections.3.h" -#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.ApplicationSettings.3.h" #include "Windows.UI.h" #include "Windows.UI.Popups.h" @@ -29,7 +32,7 @@ template CredentialCommandCredentialDeletedHandler::Cre inline void CredentialCommandCredentialDeletedHandler::operator()(const Windows::UI::ApplicationSettings::CredentialCommand & command) const { - check_hresult((*this)->abi_Invoke(get(command))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(command))); } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(L lambda) : @@ -46,7 +49,7 @@ template WebAccountCommandInvokedHandler::WebAccountCom inline void WebAccountCommandInvokedHandler::operator()(const Windows::UI::ApplicationSettings::WebAccountCommand & command, const Windows::UI::ApplicationSettings::WebAccountInvokedArgs & args) const { - check_hresult((*this)->abi_Invoke(get(command), get(args))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(command), get_abi(args))); } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(L lambda) : @@ -63,7 +66,7 @@ template WebAccountProviderCommandInvokedHandler::WebAc inline void WebAccountProviderCommandInvokedHandler::operator()(const Windows::UI::ApplicationSettings::WebAccountProviderCommand & command) const { - check_hresult((*this)->abi_Invoke(get(command))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(command))); } } @@ -73,11 +76,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_AccountCommandsRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AccountCommandsRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AccountCommandsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AccountCommandsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -90,6 +94,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AccountCommandsRequested(cookie); return S_OK; } @@ -103,11 +108,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_WebAccountProviderCommands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_WebAccountProviderCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebAccountProviderCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountProviderCommands()); return S_OK; } catch (...) @@ -117,11 +123,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_WebAccountCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().WebAccountCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountCommands()); return S_OK; } catch (...) @@ -131,11 +138,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_CredentialCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CredentialCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialCommands()); return S_OK; } catch (...) @@ -145,11 +153,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -159,11 +168,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderText()); return S_OK; } catch (...) @@ -173,10 +183,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_HeaderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderText(*reinterpret_cast(&value)); return S_OK; } @@ -186,11 +197,12 @@ struct produce deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -208,6 +220,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -221,11 +234,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -239,6 +253,7 @@ struct produceshim()); this->shim().Show(); return S_OK; } @@ -252,11 +267,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_ShowManageAccountsAsync(abi_arg_out asyncInfo) noexcept override + HRESULT __stdcall abi_ShowManageAccountsAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ShowManageAccountsAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ShowManageAccountsAsync()); return S_OK; } catch (...) @@ -266,11 +282,12 @@ struct produce asyncInfo) noexcept override + HRESULT __stdcall abi_ShowAddAccountAsync(impl::abi_arg_out asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ShowAddAccountAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ShowAddAccountAsync()); return S_OK; } catch (...) @@ -284,11 +301,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PasswordCredential(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasswordCredential(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordCredential()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordCredential()); return S_OK; } catch (...) @@ -298,11 +316,12 @@ struct produce : produc } } - HRESULT __stdcall get_CredentialDeleted(abi_arg_out value) noexcept override + HRESULT __stdcall get_CredentialDeleted(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CredentialDeleted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CredentialDeleted()); return S_OK; } catch (...) @@ -316,11 +335,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateCredentialCommand(abi_arg_in passwordCredential, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateCredentialCommand(impl::abi_arg_in passwordCredential, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateCredentialCommand(*reinterpret_cast(&passwordCredential))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateCredentialCommand(*reinterpret_cast(&passwordCredential))); return S_OK; } catch (...) @@ -330,11 +350,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateCredentialCommandWithHandler(abi_arg_in passwordCredential, abi_arg_in deleted, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateCredentialCommandWithHandler(impl::abi_arg_in passwordCredential, impl::abi_arg_in deleted, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateCredentialCommandWithHandler(*reinterpret_cast(&passwordCredential), *reinterpret_cast(&deleted))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateCredentialCommandWithHandler(*reinterpret_cast(&passwordCredential), *reinterpret_cast(&deleted))); return S_OK; } catch (...) @@ -348,11 +369,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateSettingsCommand(abi_arg_in settingsCommandId, abi_arg_in label, abi_arg_in handler, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateSettingsCommand(impl::abi_arg_in settingsCommandId, impl::abi_arg_in label, impl::abi_arg_in handler, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateSettingsCommand(*reinterpret_cast(&settingsCommandId), *reinterpret_cast(&label), *reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateSettingsCommand(*reinterpret_cast(&settingsCommandId), *reinterpret_cast(&label), *reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -366,11 +388,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_AccountsCommand(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccountsCommand(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccountsCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccountsCommand()); return S_OK; } catch (...) @@ -384,11 +407,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall add_CommandsRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_CommandsRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().CommandsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().CommandsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -401,6 +425,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CommandsRequested(cookie); return S_OK; } @@ -414,11 +439,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_ApplicationCommands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ApplicationCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ApplicationCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ApplicationCommands()); return S_OK; } catch (...) @@ -432,11 +458,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out request) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out request) noexcept override { try { - *request = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *request = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -450,11 +477,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -468,6 +496,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(); return S_OK; } @@ -481,7 +510,8 @@ struct produce : prod { try { - *value = detach(this->shim().Edge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Edge()); return S_OK; } catch (...) @@ -494,11 +524,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_WebAccount(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccount(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccount()); return S_OK; } catch (...) @@ -508,11 +539,12 @@ struct produce : produc } } - HRESULT __stdcall get_Invoked(abi_arg_out value) noexcept override + HRESULT __stdcall get_Invoked(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Invoked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invoked()); return S_OK; } catch (...) @@ -526,7 +558,8 @@ struct produce : produc { try { - *value = detach(this->shim().Actions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Actions()); return S_OK; } catch (...) @@ -539,11 +572,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateWebAccountCommand(abi_arg_in webAccount, abi_arg_in invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWebAccountCommand(impl::abi_arg_in webAccount, impl::abi_arg_in invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWebAccountCommand(*reinterpret_cast(&webAccount), *reinterpret_cast(&invoked), actions)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWebAccountCommand(*reinterpret_cast(&webAccount), *reinterpret_cast(&invoked), actions)); return S_OK; } catch (...) @@ -561,7 +595,8 @@ struct produce : pr { try { - *action = detach(this->shim().Action()); + typename D::abi_guard guard(this->shim()); + *action = detach_abi(this->shim().Action()); return S_OK; } catch (...) @@ -574,11 +609,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_WebAccountProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_WebAccountProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WebAccountProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebAccountProvider()); return S_OK; } catch (...) @@ -588,11 +624,12 @@ struct produce } } - HRESULT __stdcall get_Invoked(abi_arg_out value) noexcept override + HRESULT __stdcall get_Invoked(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Invoked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invoked()); return S_OK; } catch (...) @@ -606,11 +643,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateWebAccountProviderCommand(abi_arg_in webAccountProvider, abi_arg_in invoked, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWebAccountProviderCommand(impl::abi_arg_in webAccountProvider, impl::abi_arg_in invoked, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWebAccountProviderCommand(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&invoked))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWebAccountProviderCommand(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&invoked))); return S_OK; } catch (...) @@ -625,186 +663,186 @@ struct produce Windows::UI::ApplicationSettings::SettingsCommand impl_ISettingsCommandFactory::CreateSettingsCommand(const Windows::IInspectable & settingsCommandId, hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & handler) const +template Windows::UI::ApplicationSettings::SettingsCommand impl_ISettingsCommandFactory::CreateSettingsCommand(const Windows::Foundation::IInspectable & settingsCommandId, hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & handler) const { Windows::UI::ApplicationSettings::SettingsCommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSettingsCommand(get(settingsCommandId), get(label), get(handler), put(instance))); + check_hresult(WINRT_SHIM(ISettingsCommandFactory)->abi_CreateSettingsCommand(get_abi(settingsCommandId), get_abi(label), get_abi(handler), put_abi(instance))); return instance; } template Windows::UI::ApplicationSettings::SettingsCommand impl_ISettingsCommandStatics::AccountsCommand() const { Windows::UI::ApplicationSettings::SettingsCommand value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AccountsCommand(put(value))); + check_hresult(WINRT_SHIM(ISettingsCommandStatics)->get_AccountsCommand(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::WebAccountProviderCommand impl_IWebAccountProviderCommandFactory::CreateWebAccountProviderCommand(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, const Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler & invoked) const { Windows::UI::ApplicationSettings::WebAccountProviderCommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWebAccountProviderCommand(get(webAccountProvider), get(invoked), put(instance))); + check_hresult(WINRT_SHIM(IWebAccountProviderCommandFactory)->abi_CreateWebAccountProviderCommand(get_abi(webAccountProvider), get_abi(invoked), put_abi(instance))); return instance; } template Windows::Security::Credentials::WebAccountProvider impl_IWebAccountProviderCommand::WebAccountProvider() const { Windows::Security::Credentials::WebAccountProvider value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccountProvider(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderCommand)->get_WebAccountProvider(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler impl_IWebAccountProviderCommand::Invoked() const { Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_Invoked(put(value))); + check_hresult(WINRT_SHIM(IWebAccountProviderCommand)->get_Invoked(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::WebAccountAction impl_IWebAccountInvokedArgs::Action() const { Windows::UI::ApplicationSettings::WebAccountAction action {}; - check_hresult(static_cast(static_cast(*this))->get_Action(&action)); + check_hresult(WINRT_SHIM(IWebAccountInvokedArgs)->get_Action(&action)); return action; } template Windows::UI::ApplicationSettings::WebAccountCommand impl_IWebAccountCommandFactory::CreateWebAccountCommand(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler & invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions) const { Windows::UI::ApplicationSettings::WebAccountCommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWebAccountCommand(get(webAccount), get(invoked), actions, put(instance))); + check_hresult(WINRT_SHIM(IWebAccountCommandFactory)->abi_CreateWebAccountCommand(get_abi(webAccount), get_abi(invoked), actions, put_abi(instance))); return instance; } template Windows::Security::Credentials::WebAccount impl_IWebAccountCommand::WebAccount() const { Windows::Security::Credentials::WebAccount value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WebAccount(put(value))); + check_hresult(WINRT_SHIM(IWebAccountCommand)->get_WebAccount(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler impl_IWebAccountCommand::Invoked() const { Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_Invoked(put(value))); + check_hresult(WINRT_SHIM(IWebAccountCommand)->get_Invoked(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::SupportedWebAccountActions impl_IWebAccountCommand::Actions() const { Windows::UI::ApplicationSettings::SupportedWebAccountActions value {}; - check_hresult(static_cast(static_cast(*this))->get_Actions(&value)); + check_hresult(WINRT_SHIM(IWebAccountCommand)->get_Actions(&value)); return value; } template Windows::UI::ApplicationSettings::CredentialCommand impl_ICredentialCommandFactory::CreateCredentialCommand(const Windows::Security::Credentials::PasswordCredential & passwordCredential) const { Windows::UI::ApplicationSettings::CredentialCommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCredentialCommand(get(passwordCredential), put(instance))); + check_hresult(WINRT_SHIM(ICredentialCommandFactory)->abi_CreateCredentialCommand(get_abi(passwordCredential), put_abi(instance))); return instance; } template Windows::UI::ApplicationSettings::CredentialCommand impl_ICredentialCommandFactory::CreateCredentialCommandWithHandler(const Windows::Security::Credentials::PasswordCredential & passwordCredential, const Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler & deleted) const { Windows::UI::ApplicationSettings::CredentialCommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCredentialCommandWithHandler(get(passwordCredential), get(deleted), put(instance))); + check_hresult(WINRT_SHIM(ICredentialCommandFactory)->abi_CreateCredentialCommandWithHandler(get_abi(passwordCredential), get_abi(deleted), put_abi(instance))); return instance; } template Windows::Security::Credentials::PasswordCredential impl_ICredentialCommand::PasswordCredential() const { Windows::Security::Credentials::PasswordCredential value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasswordCredential(put(value))); + check_hresult(WINRT_SHIM(ICredentialCommand)->get_PasswordCredential(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler impl_ICredentialCommand::CredentialDeleted() const { Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_CredentialDeleted(put(value))); + check_hresult(WINRT_SHIM(ICredentialCommand)->get_CredentialDeleted(put_abi(value))); return value; } template void impl_IAccountsSettingsPaneEventDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneEventDeferral)->abi_Complete()); } template Windows::Foundation::Collections::IVector impl_IAccountsSettingsPaneCommandsRequestedEventArgs::WebAccountProviderCommands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WebAccountProviderCommands(put(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->get_WebAccountProviderCommands(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAccountsSettingsPaneCommandsRequestedEventArgs::WebAccountCommands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_WebAccountCommands(put(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->get_WebAccountCommands(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAccountsSettingsPaneCommandsRequestedEventArgs::CredentialCommands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_CredentialCommands(put(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->get_CredentialCommands(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAccountsSettingsPaneCommandsRequestedEventArgs::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->get_Commands(put_abi(value))); return value; } template hstring impl_IAccountsSettingsPaneCommandsRequestedEventArgs::HeaderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderText(put(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->get_HeaderText(put_abi(value))); return value; } -template void impl_IAccountsSettingsPaneCommandsRequestedEventArgs::HeaderText(hstring_ref value) const +template void impl_IAccountsSettingsPaneCommandsRequestedEventArgs::HeaderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderText(get(value))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->put_HeaderText(get_abi(value))); } template Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral impl_IAccountsSettingsPaneCommandsRequestedEventArgs::GetDeferral() const { Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneCommandsRequestedEventArgs)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::UI::ApplicationSettings::AccountsSettingsPane impl_IAccountsSettingsPaneStatics::GetForCurrentView() const { Windows::UI::ApplicationSettings::AccountsSettingsPane current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneStatics)->abi_GetForCurrentView(put_abi(current))); return current; } template void impl_IAccountsSettingsPaneStatics::Show() const { - check_hresult(static_cast(static_cast(*this))->abi_Show()); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneStatics)->abi_Show()); } template Windows::Foundation::IAsyncAction impl_IAccountsSettingsPaneStatics2::ShowManageAccountsAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ShowManageAccountsAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneStatics2)->abi_ShowManageAccountsAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::Foundation::IAsyncAction impl_IAccountsSettingsPaneStatics2::ShowAddAccountAsync() const { Windows::Foundation::IAsyncAction asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ShowAddAccountAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(IAccountsSettingsPaneStatics2)->abi_ShowAddAccountAsync(put_abi(asyncInfo))); return asyncInfo; } template event_token impl_IAccountsSettingsPane::AccountCommandsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AccountCommandsRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IAccountsSettingsPane)->add_AccountCommandsRequested(get_abi(handler), &cookie)); return cookie; } @@ -815,46 +853,46 @@ template event_revoker impl_IAccountsSetting template void impl_IAccountsSettingsPane::AccountCommandsRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AccountCommandsRequested(cookie)); + check_hresult(WINRT_SHIM(IAccountsSettingsPane)->remove_AccountCommandsRequested(cookie)); } template Windows::Foundation::Collections::IVector impl_ISettingsPaneCommandsRequest::ApplicationCommands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_ApplicationCommands(put(value))); + check_hresult(WINRT_SHIM(ISettingsPaneCommandsRequest)->get_ApplicationCommands(put_abi(value))); return value; } template Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest impl_ISettingsPaneCommandsRequestedEventArgs::Request() const { Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest request { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(request))); + check_hresult(WINRT_SHIM(ISettingsPaneCommandsRequestedEventArgs)->get_Request(put_abi(request))); return request; } template Windows::UI::ApplicationSettings::SettingsPane impl_ISettingsPaneStatics::GetForCurrentView() const { Windows::UI::ApplicationSettings::SettingsPane current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(ISettingsPaneStatics)->abi_GetForCurrentView(put_abi(current))); return current; } template void impl_ISettingsPaneStatics::Show() const { - check_hresult(static_cast(static_cast(*this))->abi_Show()); + check_hresult(WINRT_SHIM(ISettingsPaneStatics)->abi_Show()); } template Windows::UI::ApplicationSettings::SettingsEdgeLocation impl_ISettingsPaneStatics::Edge() const { Windows::UI::ApplicationSettings::SettingsEdgeLocation value {}; - check_hresult(static_cast(static_cast(*this))->get_Edge(&value)); + check_hresult(WINRT_SHIM(ISettingsPaneStatics)->get_Edge(&value)); return value; } template event_token impl_ISettingsPane::CommandsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_CommandsRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ISettingsPane)->add_CommandsRequested(get_abi(handler), &cookie)); return cookie; } @@ -865,7 +903,7 @@ template event_revoker impl_ISettingsPane::Comman template void impl_ISettingsPane::CommandsRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CommandsRequested(cookie)); + check_hresult(WINRT_SHIM(ISettingsPane)->remove_CommandsRequested(cookie)); } inline Windows::UI::ApplicationSettings::AccountsSettingsPane AccountsSettingsPane::GetForCurrentView() @@ -896,7 +934,7 @@ inline CredentialCommand::CredentialCommand(const Windows::Security::Credentials CredentialCommand(get_activation_factory().CreateCredentialCommandWithHandler(passwordCredential, deleted)) {} -inline SettingsCommand::SettingsCommand(const Windows::IInspectable & settingsCommandId, hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & handler) : +inline SettingsCommand::SettingsCommand(const Windows::Foundation::IInspectable & settingsCommandId, hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & handler) : SettingsCommand(get_activation_factory().CreateSettingsCommand(settingsCommandId, label, handler)) {} @@ -931,3 +969,266 @@ inline WebAccountProviderCommand::WebAccountProviderCommand(const Windows::Secur } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneEventDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ICredentialCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ICredentialCommandFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsCommandFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsCommandStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::ISettingsPaneStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IWebAccountCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IWebAccountCommandFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IWebAccountInvokedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IWebAccountProviderCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::IWebAccountProviderCommandFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::CredentialCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::SettingsCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::SettingsPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::WebAccountCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Composition.Effects.h b/10.0.14393.0/winrt/Windows.UI.Composition.Effects.h index 15841ef6e..bce721225 100644 --- a/10.0.14393.0/winrt/Windows.UI.Composition.Effects.h +++ b/10.0.14393.0/winrt/Windows.UI.Composition.Effects.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Graphics.Effects.3.h" #include "internal/Windows.UI.Composition.Effects.3.h" #include "Windows.UI.Composition.h" @@ -19,7 +22,8 @@ struct produce : pro { try { - *value = detach(this->shim().AmbientAmount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AmbientAmount()); return S_OK; } catch (...) @@ -32,6 +36,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().AmbientAmount(value); return S_OK; } @@ -45,7 +50,8 @@ struct produce : pro { try { - *value = detach(this->shim().DiffuseAmount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DiffuseAmount()); return S_OK; } catch (...) @@ -58,6 +64,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().DiffuseAmount(value); return S_OK; } @@ -67,11 +74,12 @@ struct produce : pro } } - HRESULT __stdcall get_NormalMapSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalMapSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalMapSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalMapSource()); return S_OK; } catch (...) @@ -81,10 +89,11 @@ struct produce : pro } } - HRESULT __stdcall put_NormalMapSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_NormalMapSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NormalMapSource(*reinterpret_cast(&value)); return S_OK; } @@ -98,7 +107,8 @@ struct produce : pro { try { - *value = detach(this->shim().SpecularAmount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpecularAmount()); return S_OK; } catch (...) @@ -111,6 +121,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SpecularAmount(value); return S_OK; } @@ -124,7 +135,8 @@ struct produce : pro { try { - *value = detach(this->shim().SpecularShine()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpecularShine()); return S_OK; } catch (...) @@ -137,6 +149,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SpecularShine(value); return S_OK; } @@ -154,61 +167,61 @@ namespace Windows::UI::Composition::Effects { template float impl_ISceneLightingEffect::AmbientAmount() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_AmbientAmount(&value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->get_AmbientAmount(&value)); return value; } template void impl_ISceneLightingEffect::AmbientAmount(float value) const { - check_hresult(static_cast(static_cast(*this))->put_AmbientAmount(value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->put_AmbientAmount(value)); } template float impl_ISceneLightingEffect::DiffuseAmount() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_DiffuseAmount(&value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->get_DiffuseAmount(&value)); return value; } template void impl_ISceneLightingEffect::DiffuseAmount(float value) const { - check_hresult(static_cast(static_cast(*this))->put_DiffuseAmount(value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->put_DiffuseAmount(value)); } template Windows::Graphics::Effects::IGraphicsEffectSource impl_ISceneLightingEffect::NormalMapSource() const { Windows::Graphics::Effects::IGraphicsEffectSource value; - check_hresult(static_cast(static_cast(*this))->get_NormalMapSource(put(value))); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->get_NormalMapSource(put_abi(value))); return value; } template void impl_ISceneLightingEffect::NormalMapSource(const Windows::Graphics::Effects::IGraphicsEffectSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_NormalMapSource(get(value))); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->put_NormalMapSource(get_abi(value))); } template float impl_ISceneLightingEffect::SpecularAmount() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_SpecularAmount(&value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->get_SpecularAmount(&value)); return value; } template void impl_ISceneLightingEffect::SpecularAmount(float value) const { - check_hresult(static_cast(static_cast(*this))->put_SpecularAmount(value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->put_SpecularAmount(value)); } template float impl_ISceneLightingEffect::SpecularShine() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_SpecularShine(&value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->get_SpecularShine(&value)); return value; } template void impl_ISceneLightingEffect::SpecularShine(float value) const { - check_hresult(static_cast(static_cast(*this))->put_SpecularShine(value)); + check_hresult(WINRT_SHIM(ISceneLightingEffect)->put_SpecularShine(value)); } inline SceneLightingEffect::SceneLightingEffect() : @@ -218,3 +231,23 @@ inline SceneLightingEffect::SceneLightingEffect() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Effects::ISceneLightingEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Effects::SceneLightingEffect & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Composition.Interactions.h b/10.0.14393.0/winrt/Windows.UI.Composition.Interactions.h index 2d6509a98..690c48e8d 100644 --- a/10.0.14393.0/winrt/Windows.UI.Composition.Interactions.h +++ b/10.0.14393.0/winrt/Windows.UI.Composition.Interactions.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Composition.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -27,7 +30,8 @@ struct produceshim().Count()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Count()); return S_OK; } catch (...) @@ -36,10 +40,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&value)); return S_OK; } @@ -49,10 +54,11 @@ struct produce value) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&value)); return S_OK; } @@ -66,6 +72,7 @@ struct produceshim()); this->shim().RemoveAll(); return S_OK; } @@ -79,11 +86,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InteractionSources(abi_arg_out value) noexcept override + HRESULT __stdcall get_InteractionSources(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InteractionSources()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSources()); return S_OK; } catch (...) @@ -97,7 +105,8 @@ struct produce : { try { - *value = detach(this->shim().IsPositionRoundingSuggested()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPositionRoundingSuggested()); return S_OK; } catch (...) @@ -106,11 +115,12 @@ struct produce : } } - HRESULT __stdcall get_MaxPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxPosition()); return S_OK; } catch (...) @@ -119,10 +129,11 @@ struct produce : } } - HRESULT __stdcall put_MaxPosition(abi_arg_in value) noexcept override + HRESULT __stdcall put_MaxPosition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxPosition(*reinterpret_cast(&value)); return S_OK; } @@ -136,7 +147,8 @@ struct produce : { try { - *value = detach(this->shim().MaxScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxScale()); return S_OK; } catch (...) @@ -149,6 +161,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxScale(value); return S_OK; } @@ -158,11 +171,12 @@ struct produce : } } - HRESULT __stdcall get_MinPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinPosition()); return S_OK; } catch (...) @@ -171,10 +185,11 @@ struct produce : } } - HRESULT __stdcall put_MinPosition(abi_arg_in value) noexcept override + HRESULT __stdcall put_MinPosition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinPosition(*reinterpret_cast(&value)); return S_OK; } @@ -188,7 +203,8 @@ struct produce : { try { - *value = detach(this->shim().MinScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinScale()); return S_OK; } catch (...) @@ -201,6 +217,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().MinScale(value); return S_OK; } @@ -210,11 +227,12 @@ struct produce : } } - HRESULT __stdcall get_NaturalRestingPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalRestingPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalRestingPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalRestingPosition()); return S_OK; } catch (...) @@ -227,7 +245,8 @@ struct produce : { try { - *value = detach(this->shim().NaturalRestingScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalRestingScale()); return S_OK; } catch (...) @@ -236,11 +255,12 @@ struct produce : } } - HRESULT __stdcall get_Owner(abi_arg_out value) noexcept override + HRESULT __stdcall get_Owner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Owner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Owner()); return S_OK; } catch (...) @@ -250,11 +270,12 @@ struct produce : } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -263,11 +284,12 @@ struct produce : } } - HRESULT __stdcall get_PositionInertiaDecayRate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PositionInertiaDecayRate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PositionInertiaDecayRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionInertiaDecayRate()); return S_OK; } catch (...) @@ -277,10 +299,11 @@ struct produce : } } - HRESULT __stdcall put_PositionInertiaDecayRate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_PositionInertiaDecayRate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PositionInertiaDecayRate(*reinterpret_cast *>(&value)); return S_OK; } @@ -290,11 +313,12 @@ struct produce : } } - HRESULT __stdcall get_PositionVelocityInPixelsPerSecond(abi_arg_out value) noexcept override + HRESULT __stdcall get_PositionVelocityInPixelsPerSecond(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionVelocityInPixelsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionVelocityInPixelsPerSecond()); return S_OK; } catch (...) @@ -307,7 +331,8 @@ struct produce : { try { - *value = detach(this->shim().Scale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scale()); return S_OK; } catch (...) @@ -316,11 +341,12 @@ struct produce : } } - HRESULT __stdcall get_ScaleInertiaDecayRate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ScaleInertiaDecayRate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ScaleInertiaDecayRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaleInertiaDecayRate()); return S_OK; } catch (...) @@ -330,10 +356,11 @@ struct produce : } } - HRESULT __stdcall put_ScaleInertiaDecayRate(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ScaleInertiaDecayRate(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ScaleInertiaDecayRate(*reinterpret_cast *>(&value)); return S_OK; } @@ -347,7 +374,8 @@ struct produce : { try { - *value = detach(this->shim().ScaleVelocityInPercentPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaleVelocityInPercentPerSecond()); return S_OK; } catch (...) @@ -360,6 +388,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AdjustPositionXIfGreaterThanThreshold(adjustment, positionThreshold); return S_OK; } @@ -373,6 +402,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AdjustPositionYIfGreaterThanThreshold(adjustment, positionThreshold); return S_OK; } @@ -382,10 +412,11 @@ struct produce : } } - HRESULT __stdcall abi_ConfigurePositionXInertiaModifiers(abi_arg_in> modifiers) noexcept override + HRESULT __stdcall abi_ConfigurePositionXInertiaModifiers(impl::abi_arg_in> modifiers) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigurePositionXInertiaModifiers(*reinterpret_cast *>(&modifiers)); return S_OK; } @@ -395,10 +426,11 @@ struct produce : } } - HRESULT __stdcall abi_ConfigurePositionYInertiaModifiers(abi_arg_in> modifiers) noexcept override + HRESULT __stdcall abi_ConfigurePositionYInertiaModifiers(impl::abi_arg_in> modifiers) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigurePositionYInertiaModifiers(*reinterpret_cast *>(&modifiers)); return S_OK; } @@ -408,10 +440,11 @@ struct produce : } } - HRESULT __stdcall abi_ConfigureScaleInertiaModifiers(abi_arg_in> modifiers) noexcept override + HRESULT __stdcall abi_ConfigureScaleInertiaModifiers(impl::abi_arg_in> modifiers) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigureScaleInertiaModifiers(*reinterpret_cast *>(&modifiers)); return S_OK; } @@ -421,11 +454,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdatePosition(abi_arg_in value, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdatePosition(impl::abi_arg_in value, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdatePosition(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdatePosition(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -434,11 +468,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdatePositionBy(abi_arg_in amount, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdatePositionBy(impl::abi_arg_in amount, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdatePositionBy(*reinterpret_cast(&amount))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdatePositionBy(*reinterpret_cast(&amount))); return S_OK; } catch (...) @@ -447,11 +482,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdatePositionWithAnimation(abi_arg_in animation, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdatePositionWithAnimation(impl::abi_arg_in animation, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdatePositionWithAnimation(*reinterpret_cast(&animation))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdatePositionWithAnimation(*reinterpret_cast(&animation))); return S_OK; } catch (...) @@ -460,11 +496,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdatePositionWithAdditionalVelocity(abi_arg_in velocityInPixelsPerSecond, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdatePositionWithAdditionalVelocity(impl::abi_arg_in velocityInPixelsPerSecond, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdatePositionWithAdditionalVelocity(*reinterpret_cast(&velocityInPixelsPerSecond))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdatePositionWithAdditionalVelocity(*reinterpret_cast(&velocityInPixelsPerSecond))); return S_OK; } catch (...) @@ -473,11 +510,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdateScale(float value, abi_arg_in centerPoint, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdateScale(float value, impl::abi_arg_in centerPoint, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdateScale(value, *reinterpret_cast(¢erPoint))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdateScale(value, *reinterpret_cast(¢erPoint))); return S_OK; } catch (...) @@ -486,11 +524,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdateScaleWithAnimation(abi_arg_in animation, abi_arg_in centerPoint, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdateScaleWithAnimation(impl::abi_arg_in animation, impl::abi_arg_in centerPoint, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdateScaleWithAnimation(*reinterpret_cast(&animation), *reinterpret_cast(¢erPoint))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdateScaleWithAnimation(*reinterpret_cast(&animation), *reinterpret_cast(¢erPoint))); return S_OK; } catch (...) @@ -499,11 +538,12 @@ struct produce : } } - HRESULT __stdcall abi_TryUpdateScaleWithAdditionalVelocity(float velocityInPercentPerSecond, abi_arg_in centerPoint, int32_t * requestId) noexcept override + HRESULT __stdcall abi_TryUpdateScaleWithAdditionalVelocity(float velocityInPercentPerSecond, impl::abi_arg_in centerPoint, int32_t * requestId) noexcept override { try { - *requestId = detach(this->shim().TryUpdateScaleWithAdditionalVelocity(velocityInPercentPerSecond, *reinterpret_cast(¢erPoint))); + typename D::abi_guard guard(this->shim()); + *requestId = detach_abi(this->shim().TryUpdateScaleWithAdditionalVelocity(velocityInPercentPerSecond, *reinterpret_cast(¢erPoint))); return S_OK; } catch (...) @@ -520,7 +560,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -537,7 +578,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -558,11 +600,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Condition(abi_arg_out value) noexcept override + HRESULT __stdcall get_Condition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Condition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Condition()); return S_OK; } catch (...) @@ -572,10 +615,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Condition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Condition(*reinterpret_cast(&value)); return S_OK; } @@ -585,11 +629,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Motion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Motion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Motion()); return S_OK; } catch (...) @@ -599,10 +644,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Motion(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Motion(*reinterpret_cast(&value)); return S_OK; } @@ -616,11 +662,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in compositor, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in compositor, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&compositor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&compositor))); return S_OK; } catch (...) @@ -634,11 +681,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Condition(abi_arg_out value) noexcept override + HRESULT __stdcall get_Condition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Condition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Condition()); return S_OK; } catch (...) @@ -648,10 +696,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Condition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Condition(*reinterpret_cast(&value)); return S_OK; } @@ -661,11 +710,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RestingValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RestingValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RestingValue()); return S_OK; } catch (...) @@ -675,10 +725,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_RestingValue(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RestingValue(*reinterpret_cast(&value)); return S_OK; } @@ -692,11 +743,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in compositor, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in compositor, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&compositor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&compositor))); return S_OK; } catch (...) @@ -710,11 +762,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ModifiedRestingPosition(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ModifiedRestingPosition(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ModifiedRestingPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModifiedRestingPosition()); return S_OK; } catch (...) @@ -724,11 +777,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ModifiedRestingScale(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ModifiedRestingScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ModifiedRestingScale()); return S_OK; } catch (...) @@ -738,11 +792,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NaturalRestingPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalRestingPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalRestingPosition()); return S_OK; } catch (...) @@ -755,7 +810,8 @@ struct produceshim().NaturalRestingScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalRestingScale()); return S_OK; } catch (...) @@ -764,11 +820,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PositionVelocityInPixelsPerSecond(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionVelocityInPixelsPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionVelocityInPixelsPerSecond()); return S_OK; } catch (...) @@ -781,7 +838,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -794,7 +852,8 @@ struct produceshim().ScaleVelocityInPercentPerSecond()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaleVelocityInPercentPerSecond()); return S_OK; } catch (...) @@ -811,7 +870,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -824,10 +884,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CustomAnimationStateEntered(abi_arg_in sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_CustomAnimationStateEntered(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomAnimationStateEntered(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -837,10 +898,11 @@ struct produce sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_IdleStateEntered(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IdleStateEntered(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -850,10 +912,11 @@ struct produce sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_InertiaStateEntered(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InertiaStateEntered(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -863,10 +926,11 @@ struct produce sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_InteractingStateEntered(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InteractingStateEntered(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -876,10 +940,11 @@ struct produce sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_RequestIgnored(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RequestIgnored(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -889,10 +954,11 @@ struct produce sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_ValuesChanged(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ValuesChanged(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } @@ -910,7 +976,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -923,11 +990,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in compositor, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in compositor, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&compositor))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&compositor))); return S_OK; } catch (...) @@ -937,11 +1005,12 @@ struct produce compositor, abi_arg_in owner, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithOwner(impl::abi_arg_in compositor, impl::abi_arg_in owner, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithOwner(*reinterpret_cast(&compositor), *reinterpret_cast(&owner))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithOwner(*reinterpret_cast(&compositor), *reinterpret_cast(&owner))); return S_OK; } catch (...) @@ -955,11 +1024,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -972,7 +1042,8 @@ struct produceshim().RequestId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequestId()); return S_OK; } catch (...) @@ -985,7 +1056,8 @@ struct produceshim().Scale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scale()); return S_OK; } catch (...) @@ -1002,7 +1074,8 @@ struct produceshim().IsPositionXRailsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPositionXRailsEnabled()); return S_OK; } catch (...) @@ -1015,6 +1088,7 @@ struct produceshim()); this->shim().IsPositionXRailsEnabled(value); return S_OK; } @@ -1028,7 +1102,8 @@ struct produceshim().IsPositionYRailsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPositionYRailsEnabled()); return S_OK; } catch (...) @@ -1041,6 +1116,7 @@ struct produceshim()); this->shim().IsPositionYRailsEnabled(value); return S_OK; } @@ -1054,7 +1130,8 @@ struct produceshim().ManipulationRedirectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManipulationRedirectionMode()); return S_OK; } catch (...) @@ -1067,6 +1144,7 @@ struct produceshim()); this->shim().ManipulationRedirectionMode(value); return S_OK; } @@ -1080,7 +1158,8 @@ struct produceshim().PositionXChainingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionXChainingMode()); return S_OK; } catch (...) @@ -1093,6 +1172,7 @@ struct produceshim()); this->shim().PositionXChainingMode(value); return S_OK; } @@ -1106,7 +1186,8 @@ struct produceshim().PositionXSourceMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionXSourceMode()); return S_OK; } catch (...) @@ -1119,6 +1200,7 @@ struct produceshim()); this->shim().PositionXSourceMode(value); return S_OK; } @@ -1132,7 +1214,8 @@ struct produceshim().PositionYChainingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionYChainingMode()); return S_OK; } catch (...) @@ -1145,6 +1228,7 @@ struct produceshim()); this->shim().PositionYChainingMode(value); return S_OK; } @@ -1158,7 +1242,8 @@ struct produceshim().PositionYSourceMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionYSourceMode()); return S_OK; } catch (...) @@ -1171,6 +1256,7 @@ struct produceshim()); this->shim().PositionYSourceMode(value); return S_OK; } @@ -1184,7 +1270,8 @@ struct produceshim().ScaleChainingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaleChainingMode()); return S_OK; } catch (...) @@ -1197,6 +1284,7 @@ struct produceshim()); this->shim().ScaleChainingMode(value); return S_OK; } @@ -1210,7 +1298,8 @@ struct produceshim().ScaleSourceMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScaleSourceMode()); return S_OK; } catch (...) @@ -1223,6 +1312,7 @@ struct produceshim()); this->shim().ScaleSourceMode(value); return S_OK; } @@ -1232,11 +1322,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1246,10 +1337,11 @@ struct produce pointerPoint) noexcept override + HRESULT __stdcall abi_TryRedirectForManipulation(impl::abi_arg_in pointerPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TryRedirectForManipulation(*reinterpret_cast(&pointerPoint)); return S_OK; } @@ -1263,11 +1355,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in source, abi_arg_out result) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in source, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Create(*reinterpret_cast(&source))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Create(*reinterpret_cast(&source))); return S_OK; } catch (...) @@ -1285,563 +1378,563 @@ namespace Windows::UI::Composition::Interactions { template int32_t impl_ICompositionInteractionSourceCollection::Count() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Count(&value)); + check_hresult(WINRT_SHIM(ICompositionInteractionSourceCollection)->get_Count(&value)); return value; } template void impl_ICompositionInteractionSourceCollection::Add(const Windows::UI::Composition::Interactions::ICompositionInteractionSource & value) const { - check_hresult(static_cast(static_cast(*this))->abi_Add(get(value))); + check_hresult(WINRT_SHIM(ICompositionInteractionSourceCollection)->abi_Add(get_abi(value))); } template void impl_ICompositionInteractionSourceCollection::Remove(const Windows::UI::Composition::Interactions::ICompositionInteractionSource & value) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(value))); + check_hresult(WINRT_SHIM(ICompositionInteractionSourceCollection)->abi_Remove(get_abi(value))); } template void impl_ICompositionInteractionSourceCollection::RemoveAll() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAll()); + check_hresult(WINRT_SHIM(ICompositionInteractionSourceCollection)->abi_RemoveAll()); } template Windows::UI::Composition::Interactions::InteractionTracker impl_IInteractionTrackerStatics::Create(const Windows::UI::Composition::Compositor & compositor) const { Windows::UI::Composition::Interactions::InteractionTracker result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(compositor), put(result))); + check_hresult(WINRT_SHIM(IInteractionTrackerStatics)->abi_Create(get_abi(compositor), put_abi(result))); return result; } template Windows::UI::Composition::Interactions::InteractionTracker impl_IInteractionTrackerStatics::CreateWithOwner(const Windows::UI::Composition::Compositor & compositor, const Windows::UI::Composition::Interactions::IInteractionTrackerOwner & owner) const { Windows::UI::Composition::Interactions::InteractionTracker result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithOwner(get(compositor), get(owner), put(result))); + check_hresult(WINRT_SHIM(IInteractionTrackerStatics)->abi_CreateWithOwner(get_abi(compositor), get_abi(owner), put_abi(result))); return result; } template void impl_IInteractionTrackerOwner::CustomAnimationStateEntered(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerCustomAnimationStateEnteredArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_CustomAnimationStateEntered(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_CustomAnimationStateEntered(get_abi(sender), get_abi(args))); } template void impl_IInteractionTrackerOwner::IdleStateEntered(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerIdleStateEnteredArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_IdleStateEntered(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_IdleStateEntered(get_abi(sender), get_abi(args))); } template void impl_IInteractionTrackerOwner::InertiaStateEntered(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerInertiaStateEnteredArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_InertiaStateEntered(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_InertiaStateEntered(get_abi(sender), get_abi(args))); } template void impl_IInteractionTrackerOwner::InteractingStateEntered(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerInteractingStateEnteredArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_InteractingStateEntered(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_InteractingStateEntered(get_abi(sender), get_abi(args))); } template void impl_IInteractionTrackerOwner::RequestIgnored(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerRequestIgnoredArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_RequestIgnored(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_RequestIgnored(get_abi(sender), get_abi(args))); } template void impl_IInteractionTrackerOwner::ValuesChanged(const Windows::UI::Composition::Interactions::InteractionTracker & sender, const Windows::UI::Composition::Interactions::InteractionTrackerValuesChangedArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_ValuesChanged(get(sender), get(args))); + check_hresult(WINRT_SHIM(IInteractionTrackerOwner)->abi_ValuesChanged(get_abi(sender), get_abi(args))); } template Windows::UI::Composition::Interactions::CompositionInteractionSourceCollection impl_IInteractionTracker::InteractionSources() const { Windows::UI::Composition::Interactions::CompositionInteractionSourceCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InteractionSources(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_InteractionSources(put_abi(value))); return value; } template bool impl_IInteractionTracker::IsPositionRoundingSuggested() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPositionRoundingSuggested(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_IsPositionRoundingSuggested(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_IInteractionTracker::MaxPosition() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxPosition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_MaxPosition(put_abi(value))); return value; } template void impl_IInteractionTracker::MaxPosition(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxPosition(get(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_MaxPosition(get_abi(value))); } template float impl_IInteractionTracker::MaxScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxScale(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_MaxScale(&value)); return value; } template void impl_IInteractionTracker::MaxScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxScale(value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_MaxScale(value)); } template Windows::Foundation::Numerics::float3 impl_IInteractionTracker::MinPosition() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_MinPosition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_MinPosition(put_abi(value))); return value; } template void impl_IInteractionTracker::MinPosition(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinPosition(get(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_MinPosition(get_abi(value))); } template float impl_IInteractionTracker::MinScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_MinScale(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_MinScale(&value)); return value; } template void impl_IInteractionTracker::MinScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_MinScale(value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_MinScale(value)); } template Windows::Foundation::Numerics::float3 impl_IInteractionTracker::NaturalRestingPosition() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalRestingPosition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_NaturalRestingPosition(put_abi(value))); return value; } template float impl_IInteractionTracker::NaturalRestingScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalRestingScale(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_NaturalRestingScale(&value)); return value; } template Windows::UI::Composition::Interactions::IInteractionTrackerOwner impl_IInteractionTracker::Owner() const { Windows::UI::Composition::Interactions::IInteractionTrackerOwner value; - check_hresult(static_cast(static_cast(*this))->get_Owner(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_Owner(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_IInteractionTracker::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_Position(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IInteractionTracker::PositionInertiaDecayRate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_PositionInertiaDecayRate(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_PositionInertiaDecayRate(put_abi(value))); return value; } -template void impl_IInteractionTracker::PositionInertiaDecayRate(const Windows::Foundation::IReference & value) const +template void impl_IInteractionTracker::PositionInertiaDecayRate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionInertiaDecayRate(get(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_PositionInertiaDecayRate(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_IInteractionTracker::PositionVelocityInPixelsPerSecond() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionVelocityInPixelsPerSecond(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_PositionVelocityInPixelsPerSecond(put_abi(value))); return value; } template float impl_IInteractionTracker::Scale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Scale(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_Scale(&value)); return value; } template Windows::Foundation::IReference impl_IInteractionTracker::ScaleInertiaDecayRate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ScaleInertiaDecayRate(put(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_ScaleInertiaDecayRate(put_abi(value))); return value; } -template void impl_IInteractionTracker::ScaleInertiaDecayRate(const Windows::Foundation::IReference & value) const +template void impl_IInteractionTracker::ScaleInertiaDecayRate(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaleInertiaDecayRate(get(value))); + check_hresult(WINRT_SHIM(IInteractionTracker)->put_ScaleInertiaDecayRate(get_abi(value))); } template float impl_IInteractionTracker::ScaleVelocityInPercentPerSecond() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaleVelocityInPercentPerSecond(&value)); + check_hresult(WINRT_SHIM(IInteractionTracker)->get_ScaleVelocityInPercentPerSecond(&value)); return value; } template void impl_IInteractionTracker::AdjustPositionXIfGreaterThanThreshold(float adjustment, float positionThreshold) const { - check_hresult(static_cast(static_cast(*this))->abi_AdjustPositionXIfGreaterThanThreshold(adjustment, positionThreshold)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_AdjustPositionXIfGreaterThanThreshold(adjustment, positionThreshold)); } template void impl_IInteractionTracker::AdjustPositionYIfGreaterThanThreshold(float adjustment, float positionThreshold) const { - check_hresult(static_cast(static_cast(*this))->abi_AdjustPositionYIfGreaterThanThreshold(adjustment, positionThreshold)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_AdjustPositionYIfGreaterThanThreshold(adjustment, positionThreshold)); } -template void impl_IInteractionTracker::ConfigurePositionXInertiaModifiers(const Windows::Foundation::Collections::IIterable & modifiers) const +template void impl_IInteractionTracker::ConfigurePositionXInertiaModifiers(iterable modifiers) const { - check_hresult(static_cast(static_cast(*this))->abi_ConfigurePositionXInertiaModifiers(get(modifiers))); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_ConfigurePositionXInertiaModifiers(get_abi(modifiers))); } -template void impl_IInteractionTracker::ConfigurePositionYInertiaModifiers(const Windows::Foundation::Collections::IIterable & modifiers) const +template void impl_IInteractionTracker::ConfigurePositionYInertiaModifiers(iterable modifiers) const { - check_hresult(static_cast(static_cast(*this))->abi_ConfigurePositionYInertiaModifiers(get(modifiers))); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_ConfigurePositionYInertiaModifiers(get_abi(modifiers))); } -template void impl_IInteractionTracker::ConfigureScaleInertiaModifiers(const Windows::Foundation::Collections::IIterable & modifiers) const +template void impl_IInteractionTracker::ConfigureScaleInertiaModifiers(iterable modifiers) const { - check_hresult(static_cast(static_cast(*this))->abi_ConfigureScaleInertiaModifiers(get(modifiers))); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_ConfigureScaleInertiaModifiers(get_abi(modifiers))); } template int32_t impl_IInteractionTracker::TryUpdatePosition(const Windows::Foundation::Numerics::float3 & value) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdatePosition(get(value), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdatePosition(get_abi(value), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdatePositionBy(const Windows::Foundation::Numerics::float3 & amount) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdatePositionBy(get(amount), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdatePositionBy(get_abi(amount), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdatePositionWithAnimation(const Windows::UI::Composition::CompositionAnimation & animation) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdatePositionWithAnimation(get(animation), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdatePositionWithAnimation(get_abi(animation), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdatePositionWithAdditionalVelocity(const Windows::Foundation::Numerics::float3 & velocityInPixelsPerSecond) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdatePositionWithAdditionalVelocity(get(velocityInPixelsPerSecond), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdatePositionWithAdditionalVelocity(get_abi(velocityInPixelsPerSecond), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdateScale(float value, const Windows::Foundation::Numerics::float3 & centerPoint) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdateScale(value, get(centerPoint), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdateScale(value, get_abi(centerPoint), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdateScaleWithAnimation(const Windows::UI::Composition::CompositionAnimation & animation, const Windows::Foundation::Numerics::float3 & centerPoint) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdateScaleWithAnimation(get(animation), get(centerPoint), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdateScaleWithAnimation(get_abi(animation), get_abi(centerPoint), &requestId)); return requestId; } template int32_t impl_IInteractionTracker::TryUpdateScaleWithAdditionalVelocity(float velocityInPercentPerSecond, const Windows::Foundation::Numerics::float3 & centerPoint) const { int32_t requestId {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUpdateScaleWithAdditionalVelocity(velocityInPercentPerSecond, get(centerPoint), &requestId)); + check_hresult(WINRT_SHIM(IInteractionTracker)->abi_TryUpdateScaleWithAdditionalVelocity(velocityInPercentPerSecond, get_abi(centerPoint), &requestId)); return requestId; } template int32_t impl_IInteractionTrackerCustomAnimationStateEnteredArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerCustomAnimationStateEnteredArgs)->get_RequestId(&value)); return value; } template int32_t impl_IInteractionTrackerIdleStateEnteredArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerIdleStateEnteredArgs)->get_RequestId(&value)); return value; } template int32_t impl_IInteractionTrackerInteractingStateEnteredArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerInteractingStateEnteredArgs)->get_RequestId(&value)); return value; } template Windows::UI::Composition::Interactions::InteractionTrackerInertiaRestingValue impl_IInteractionTrackerInertiaRestingValueStatics::Create(const Windows::UI::Composition::Compositor & compositor) const { Windows::UI::Composition::Interactions::InteractionTrackerInertiaRestingValue result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(compositor), put(result))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaRestingValueStatics)->abi_Create(get_abi(compositor), put_abi(result))); return result; } template Windows::UI::Composition::ExpressionAnimation impl_IInteractionTrackerInertiaRestingValue::Condition() const { Windows::UI::Composition::ExpressionAnimation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Condition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaRestingValue)->get_Condition(put_abi(value))); return value; } template void impl_IInteractionTrackerInertiaRestingValue::Condition(const Windows::UI::Composition::ExpressionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->put_Condition(get(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaRestingValue)->put_Condition(get_abi(value))); } template Windows::UI::Composition::ExpressionAnimation impl_IInteractionTrackerInertiaRestingValue::RestingValue() const { Windows::UI::Composition::ExpressionAnimation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RestingValue(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaRestingValue)->get_RestingValue(put_abi(value))); return value; } template void impl_IInteractionTrackerInertiaRestingValue::RestingValue(const Windows::UI::Composition::ExpressionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->put_RestingValue(get(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaRestingValue)->put_RestingValue(get_abi(value))); } template Windows::UI::Composition::Interactions::InteractionTrackerInertiaMotion impl_IInteractionTrackerInertiaMotionStatics::Create(const Windows::UI::Composition::Compositor & compositor) const { Windows::UI::Composition::Interactions::InteractionTrackerInertiaMotion result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(compositor), put(result))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaMotionStatics)->abi_Create(get_abi(compositor), put_abi(result))); return result; } template Windows::UI::Composition::ExpressionAnimation impl_IInteractionTrackerInertiaMotion::Condition() const { Windows::UI::Composition::ExpressionAnimation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Condition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaMotion)->get_Condition(put_abi(value))); return value; } template void impl_IInteractionTrackerInertiaMotion::Condition(const Windows::UI::Composition::ExpressionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->put_Condition(get(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaMotion)->put_Condition(get_abi(value))); } template Windows::UI::Composition::ExpressionAnimation impl_IInteractionTrackerInertiaMotion::Motion() const { Windows::UI::Composition::ExpressionAnimation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Motion(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaMotion)->get_Motion(put_abi(value))); return value; } template void impl_IInteractionTrackerInertiaMotion::Motion(const Windows::UI::Composition::ExpressionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->put_Motion(get(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaMotion)->put_Motion(get_abi(value))); } template Windows::Foundation::IReference impl_IInteractionTrackerInertiaStateEnteredArgs::ModifiedRestingPosition() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ModifiedRestingPosition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_ModifiedRestingPosition(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IInteractionTrackerInertiaStateEnteredArgs::ModifiedRestingScale() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ModifiedRestingScale(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_ModifiedRestingScale(put_abi(value))); return value; } template Windows::Foundation::Numerics::float3 impl_IInteractionTrackerInertiaStateEnteredArgs::NaturalRestingPosition() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalRestingPosition(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_NaturalRestingPosition(put_abi(value))); return value; } template float impl_IInteractionTrackerInertiaStateEnteredArgs::NaturalRestingScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalRestingScale(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_NaturalRestingScale(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_IInteractionTrackerInertiaStateEnteredArgs::PositionVelocityInPixelsPerSecond() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionVelocityInPixelsPerSecond(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_PositionVelocityInPixelsPerSecond(put_abi(value))); return value; } template int32_t impl_IInteractionTrackerInertiaStateEnteredArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_RequestId(&value)); return value; } template float impl_IInteractionTrackerInertiaStateEnteredArgs::ScaleVelocityInPercentPerSecond() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaleVelocityInPercentPerSecond(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerInertiaStateEnteredArgs)->get_ScaleVelocityInPercentPerSecond(&value)); return value; } template int32_t impl_IInteractionTrackerRequestIgnoredArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerRequestIgnoredArgs)->get_RequestId(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_IInteractionTrackerValuesChangedArgs::Position() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IInteractionTrackerValuesChangedArgs)->get_Position(put_abi(value))); return value; } template int32_t impl_IInteractionTrackerValuesChangedArgs::RequestId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RequestId(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerValuesChangedArgs)->get_RequestId(&value)); return value; } template float impl_IInteractionTrackerValuesChangedArgs::Scale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Scale(&value)); + check_hresult(WINRT_SHIM(IInteractionTrackerValuesChangedArgs)->get_Scale(&value)); return value; } template Windows::UI::Composition::Interactions::VisualInteractionSource impl_IVisualInteractionSourceStatics::Create(const Windows::UI::Composition::Visual & source) const { Windows::UI::Composition::Interactions::VisualInteractionSource result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(source), put(result))); + check_hresult(WINRT_SHIM(IVisualInteractionSourceStatics)->abi_Create(get_abi(source), put_abi(result))); return result; } template bool impl_IVisualInteractionSource::IsPositionXRailsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPositionXRailsEnabled(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_IsPositionXRailsEnabled(&value)); return value; } template void impl_IVisualInteractionSource::IsPositionXRailsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPositionXRailsEnabled(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_IsPositionXRailsEnabled(value)); } template bool impl_IVisualInteractionSource::IsPositionYRailsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPositionYRailsEnabled(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_IsPositionYRailsEnabled(&value)); return value; } template void impl_IVisualInteractionSource::IsPositionYRailsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPositionYRailsEnabled(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_IsPositionYRailsEnabled(value)); } template Windows::UI::Composition::Interactions::VisualInteractionSourceRedirectionMode impl_IVisualInteractionSource::ManipulationRedirectionMode() const { Windows::UI::Composition::Interactions::VisualInteractionSourceRedirectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ManipulationRedirectionMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_ManipulationRedirectionMode(&value)); return value; } template void impl_IVisualInteractionSource::ManipulationRedirectionMode(Windows::UI::Composition::Interactions::VisualInteractionSourceRedirectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ManipulationRedirectionMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_ManipulationRedirectionMode(value)); } template Windows::UI::Composition::Interactions::InteractionChainingMode impl_IVisualInteractionSource::PositionXChainingMode() const { Windows::UI::Composition::Interactions::InteractionChainingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionXChainingMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_PositionXChainingMode(&value)); return value; } template void impl_IVisualInteractionSource::PositionXChainingMode(Windows::UI::Composition::Interactions::InteractionChainingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionXChainingMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_PositionXChainingMode(value)); } template Windows::UI::Composition::Interactions::InteractionSourceMode impl_IVisualInteractionSource::PositionXSourceMode() const { Windows::UI::Composition::Interactions::InteractionSourceMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionXSourceMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_PositionXSourceMode(&value)); return value; } template void impl_IVisualInteractionSource::PositionXSourceMode(Windows::UI::Composition::Interactions::InteractionSourceMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionXSourceMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_PositionXSourceMode(value)); } template Windows::UI::Composition::Interactions::InteractionChainingMode impl_IVisualInteractionSource::PositionYChainingMode() const { Windows::UI::Composition::Interactions::InteractionChainingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionYChainingMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_PositionYChainingMode(&value)); return value; } template void impl_IVisualInteractionSource::PositionYChainingMode(Windows::UI::Composition::Interactions::InteractionChainingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionYChainingMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_PositionYChainingMode(value)); } template Windows::UI::Composition::Interactions::InteractionSourceMode impl_IVisualInteractionSource::PositionYSourceMode() const { Windows::UI::Composition::Interactions::InteractionSourceMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PositionYSourceMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_PositionYSourceMode(&value)); return value; } template void impl_IVisualInteractionSource::PositionYSourceMode(Windows::UI::Composition::Interactions::InteractionSourceMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PositionYSourceMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_PositionYSourceMode(value)); } template Windows::UI::Composition::Interactions::InteractionChainingMode impl_IVisualInteractionSource::ScaleChainingMode() const { Windows::UI::Composition::Interactions::InteractionChainingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaleChainingMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_ScaleChainingMode(&value)); return value; } template void impl_IVisualInteractionSource::ScaleChainingMode(Windows::UI::Composition::Interactions::InteractionChainingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaleChainingMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_ScaleChainingMode(value)); } template Windows::UI::Composition::Interactions::InteractionSourceMode impl_IVisualInteractionSource::ScaleSourceMode() const { Windows::UI::Composition::Interactions::InteractionSourceMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ScaleSourceMode(&value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_ScaleSourceMode(&value)); return value; } template void impl_IVisualInteractionSource::ScaleSourceMode(Windows::UI::Composition::Interactions::InteractionSourceMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ScaleSourceMode(value)); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->put_ScaleSourceMode(value)); } template Windows::UI::Composition::Visual impl_IVisualInteractionSource::Source() const { Windows::UI::Composition::Visual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->get_Source(put_abi(value))); return value; } template void impl_IVisualInteractionSource::TryRedirectForManipulation(const Windows::UI::Input::PointerPoint & pointerPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_TryRedirectForManipulation(get(pointerPoint))); + check_hresult(WINRT_SHIM(IVisualInteractionSource)->abi_TryRedirectForManipulation(get_abi(pointerPoint))); } inline Windows::UI::Composition::Interactions::InteractionTracker InteractionTracker::Create(const Windows::UI::Composition::Compositor & compositor) @@ -1872,3 +1965,284 @@ inline Windows::UI::Composition::Interactions::VisualInteractionSource VisualInt } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::ICompositionInteractionSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::ICompositionInteractionSourceCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerCustomAnimationStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerIdleStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaModifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaModifierFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaMotion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaMotionStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaRestingValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaRestingValueStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInertiaStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerInteractingStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerOwner & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerRequestIgnoredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IInteractionTrackerValuesChangedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IVisualInteractionSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::IVisualInteractionSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::CompositionInteractionSourceCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTracker & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerCustomAnimationStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerIdleStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerInertiaModifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerInertiaMotion & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerInertiaRestingValue & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerInertiaStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerInteractingStateEnteredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerRequestIgnoredArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::InteractionTrackerValuesChangedArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Interactions::VisualInteractionSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Composition.h b/10.0.14393.0/winrt/Windows.UI.Composition.h index 58c16e660..93a8b3b0d 100644 --- a/10.0.14393.0/winrt/Windows.UI.Composition.h +++ b/10.0.14393.0/winrt/Windows.UI.Composition.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Graphics.DirectX.3.h" @@ -22,11 +25,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -35,10 +39,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -56,7 +61,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().InterpolationColorSpace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InterpolationColorSpace()); return S_OK; } catch (...) @@ -69,6 +75,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().InterpolationColorSpace(value); return S_OK; } @@ -78,10 +85,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -91,10 +99,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, abi_arg_in value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -112,6 +121,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearAllParameters(); return S_OK; } @@ -121,10 +131,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_ClearParameter(abi_arg_in key) noexcept override + HRESULT __stdcall abi_ClearParameter(impl::abi_arg_in key) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClearParameter(*reinterpret_cast(&key)); return S_OK; } @@ -134,10 +145,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetColorParameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetColorParameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetColorParameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -147,10 +159,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetMatrix3x2Parameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetMatrix3x2Parameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMatrix3x2Parameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -160,10 +173,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetMatrix4x4Parameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetMatrix4x4Parameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMatrix4x4Parameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -173,10 +187,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetQuaternionParameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetQuaternionParameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetQuaternionParameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -186,10 +201,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetReferenceParameter(abi_arg_in key, abi_arg_in compositionObject) noexcept override + HRESULT __stdcall abi_SetReferenceParameter(impl::abi_arg_in key, impl::abi_arg_in compositionObject) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetReferenceParameter(*reinterpret_cast(&key), *reinterpret_cast(&compositionObject)); return S_OK; } @@ -199,10 +215,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetScalarParameter(abi_arg_in key, float value) noexcept override + HRESULT __stdcall abi_SetScalarParameter(impl::abi_arg_in key, float value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetScalarParameter(*reinterpret_cast(&key), value); return S_OK; } @@ -212,10 +229,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetVector2Parameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetVector2Parameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVector2Parameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -225,10 +243,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetVector3Parameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetVector3Parameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVector3Parameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -238,10 +257,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SetVector4Parameter(abi_arg_in key, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetVector4Parameter(impl::abi_arg_in key, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVector4Parameter(*reinterpret_cast(&key), *reinterpret_cast(&value)); return S_OK; } @@ -255,10 +275,11 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_SetBooleanParameter(abi_arg_in key, bool value) noexcept override + HRESULT __stdcall abi_SetBooleanParameter(impl::abi_arg_in key, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBooleanParameter(*reinterpret_cast(&key), value); return S_OK; } @@ -268,11 +289,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Target(abi_arg_out value) noexcept override + HRESULT __stdcall get_Target(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Target()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Target()); return S_OK; } catch (...) @@ -282,10 +304,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Target(abi_arg_in value) noexcept override + HRESULT __stdcall put_Target(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Target(*reinterpret_cast(&value)); return S_OK; } @@ -311,7 +334,8 @@ struct produce : produc { try { - *value = detach(this->shim().Count()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Count()); return S_OK; } catch (...) @@ -320,10 +344,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Add(abi_arg_in value) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&value)); return S_OK; } @@ -333,10 +358,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Remove(abi_arg_in value) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&value)); return S_OK; } @@ -350,6 +376,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAll(); return S_OK; } @@ -383,11 +410,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AnchorPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnchorPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnchorPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnchorPoint()); return S_OK; } catch (...) @@ -396,10 +424,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AnchorPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AnchorPoint(*reinterpret_cast(&value)); return S_OK; } @@ -409,11 +438,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CenterPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CenterPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterPoint()); return S_OK; } catch (...) @@ -422,10 +452,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CenterPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CenterPoint(*reinterpret_cast(&value)); return S_OK; } @@ -435,11 +466,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -448,10 +480,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -465,7 +498,8 @@ struct produce : produce_baseshim().RotationAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngle()); return S_OK; } catch (...) @@ -478,6 +512,7 @@ struct produce : produce_baseshim()); this->shim().RotationAngle(value); return S_OK; } @@ -491,7 +526,8 @@ struct produce : produce_baseshim().RotationAngleInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngleInDegrees()); return S_OK; } catch (...) @@ -504,6 +540,7 @@ struct produce : produce_baseshim()); this->shim().RotationAngleInDegrees(value); return S_OK; } @@ -513,11 +550,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Scale(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Scale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scale()); return S_OK; } catch (...) @@ -526,10 +564,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Scale(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Scale(*reinterpret_cast(&value)); return S_OK; } @@ -539,11 +578,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TransformMatrix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransformMatrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransformMatrix()); return S_OK; } catch (...) @@ -552,10 +592,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TransformMatrix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransformMatrix(*reinterpret_cast(&value)); return S_OK; } @@ -573,11 +614,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -586,10 +628,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Color(abi_arg_in value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -607,7 +650,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -620,7 +664,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsEnded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnded()); return S_OK; } catch (...) @@ -629,11 +674,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_Completed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Completed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Completed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -646,6 +692,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Completed(token); return S_OK; } @@ -663,7 +710,8 @@ struct produce : produc { try { - *value = detach(this->shim().AlphaMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlphaMode()); return S_OK; } catch (...) @@ -676,7 +724,8 @@ struct produce : produc { try { - *value = detach(this->shim().PixelFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelFormat()); return S_OK; } catch (...) @@ -685,11 +734,12 @@ struct produce : produc } } - HRESULT __stdcall get_Size(abi_arg_out value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -710,11 +760,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetSourceParameter(abi_arg_in name, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetSourceParameter(impl::abi_arg_in name, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSourceParameter(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSourceParameter(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -724,10 +775,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetSourceParameter(abi_arg_in name, abi_arg_in source) noexcept override + HRESULT __stdcall abi_SetSourceParameter(impl::abi_arg_in name, impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSourceParameter(*reinterpret_cast(&name), *reinterpret_cast(&source)); return S_OK; } @@ -741,11 +793,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateBrush(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateBrush()); return S_OK; } catch (...) @@ -759,7 +812,8 @@ struct produce : produce { try { - *value = detach(this->shim().ExtendedError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedError()); return S_OK; } catch (...) @@ -772,7 +826,8 @@ struct produce : produce { try { - *value = detach(this->shim().LoadStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LoadStatus()); return S_OK; } catch (...) @@ -785,11 +840,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -803,11 +859,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in name, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in name, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Create(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Create(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -821,11 +878,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateDrawingSurface(abi_arg_in sizePixels, Windows::Graphics::DirectX::DirectXPixelFormat pixelFormat, Windows::Graphics::DirectX::DirectXAlphaMode alphaMode, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateDrawingSurface(impl::abi_arg_in sizePixels, Windows::Graphics::DirectX::DirectXPixelFormat pixelFormat, Windows::Graphics::DirectX::DirectXAlphaMode alphaMode, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDrawingSurface(*reinterpret_cast(&sizePixels), pixelFormat, alphaMode)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDrawingSurface(*reinterpret_cast(&sizePixels), pixelFormat, alphaMode)); return S_OK; } catch (...) @@ -835,11 +893,12 @@ struct produce : produc } } - HRESULT __stdcall add_RenderingDeviceReplaced(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RenderingDeviceReplaced(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RenderingDeviceReplaced(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RenderingDeviceReplaced(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -852,6 +911,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RenderingDeviceReplaced(token); return S_OK; } @@ -865,11 +925,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Targets(abi_arg_out value) noexcept override + HRESULT __stdcall get_Targets(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Targets()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Targets()); return S_OK; } catch (...) @@ -887,11 +948,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Mask(abi_arg_out value) noexcept override + HRESULT __stdcall get_Mask(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mask()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mask()); return S_OK; } catch (...) @@ -901,10 +963,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Mask(abi_arg_in value) noexcept override + HRESULT __stdcall put_Mask(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Mask(*reinterpret_cast(&value)); return S_OK; } @@ -914,11 +977,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -928,10 +992,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Source(abi_arg_in value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -949,7 +1014,8 @@ struct produce : produce { try { - *value = detach(this->shim().BottomInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomInset()); return S_OK; } catch (...) @@ -962,6 +1028,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().BottomInset(value); return S_OK; } @@ -975,7 +1042,8 @@ struct produce : produce { try { - *value = detach(this->shim().BottomInsetScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomInsetScale()); return S_OK; } catch (...) @@ -988,6 +1056,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().BottomInsetScale(value); return S_OK; } @@ -1001,7 +1070,8 @@ struct produce : produce { try { - *value = detach(this->shim().IsCenterHollow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCenterHollow()); return S_OK; } catch (...) @@ -1014,6 +1084,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCenterHollow(value); return S_OK; } @@ -1027,7 +1098,8 @@ struct produce : produce { try { - *value = detach(this->shim().LeftInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftInset()); return S_OK; } catch (...) @@ -1040,6 +1112,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LeftInset(value); return S_OK; } @@ -1053,7 +1126,8 @@ struct produce : produce { try { - *value = detach(this->shim().LeftInsetScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftInsetScale()); return S_OK; } catch (...) @@ -1066,6 +1140,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LeftInsetScale(value); return S_OK; } @@ -1079,7 +1154,8 @@ struct produce : produce { try { - *value = detach(this->shim().RightInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightInset()); return S_OK; } catch (...) @@ -1092,6 +1168,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RightInset(value); return S_OK; } @@ -1105,7 +1182,8 @@ struct produce : produce { try { - *value = detach(this->shim().RightInsetScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightInsetScale()); return S_OK; } catch (...) @@ -1118,6 +1196,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RightInsetScale(value); return S_OK; } @@ -1127,11 +1206,12 @@ struct produce : produce } } - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -1141,10 +1221,11 @@ struct produce : produce } } - HRESULT __stdcall put_Source(abi_arg_in value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -1158,7 +1239,8 @@ struct produce : produce { try { - *value = detach(this->shim().TopInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopInset()); return S_OK; } catch (...) @@ -1171,6 +1253,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().TopInset(value); return S_OK; } @@ -1184,7 +1267,8 @@ struct produce : produce { try { - *value = detach(this->shim().TopInsetScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopInsetScale()); return S_OK; } catch (...) @@ -1197,6 +1281,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().TopInsetScale(value); return S_OK; } @@ -1210,6 +1295,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetInsets(inset); return S_OK; } @@ -1223,6 +1309,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetInsets(left, top, right, bottom); return S_OK; } @@ -1236,6 +1323,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetInsetScales(scale); return S_OK; } @@ -1249,6 +1337,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetInsetScales(left, top, right, bottom); return S_OK; } @@ -1262,11 +1351,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Compositor(abi_arg_out value) noexcept override + HRESULT __stdcall get_Compositor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Compositor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Compositor()); return S_OK; } catch (...) @@ -1276,11 +1366,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Dispatcher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dispatcher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dispatcher()); return S_OK; } catch (...) @@ -1290,11 +1381,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -1304,10 +1396,11 @@ struct produce : produce_base propertyName, abi_arg_in animation) noexcept override + HRESULT __stdcall abi_StartAnimation(impl::abi_arg_in propertyName, impl::abi_arg_in animation) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartAnimation(*reinterpret_cast(&propertyName), *reinterpret_cast(&animation)); return S_OK; } @@ -1317,10 +1410,11 @@ struct produce : produce_base propertyName) noexcept override + HRESULT __stdcall abi_StopAnimation(impl::abi_arg_in propertyName) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StopAnimation(*reinterpret_cast(&propertyName)); return S_OK; } @@ -1334,11 +1428,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Comment(abi_arg_out value) noexcept override + HRESULT __stdcall get_Comment(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Comment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Comment()); return S_OK; } catch (...) @@ -1348,10 +1443,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Comment(abi_arg_in value) noexcept override + HRESULT __stdcall put_Comment(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Comment(*reinterpret_cast(&value)); return S_OK; } @@ -1361,11 +1457,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ImplicitAnimations(abi_arg_out value) noexcept override + HRESULT __stdcall get_ImplicitAnimations(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ImplicitAnimations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ImplicitAnimations()); return S_OK; } catch (...) @@ -1375,10 +1472,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_ImplicitAnimations(abi_arg_in value) noexcept override + HRESULT __stdcall put_ImplicitAnimations(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ImplicitAnimations(*reinterpret_cast(&value)); return S_OK; } @@ -1388,10 +1486,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_StartAnimationGroup(abi_arg_in value) noexcept override + HRESULT __stdcall abi_StartAnimationGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartAnimationGroup(*reinterpret_cast(&value)); return S_OK; } @@ -1401,10 +1500,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_StopAnimationGroup(abi_arg_in value) noexcept override + HRESULT __stdcall abi_StopAnimationGroup(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StopAnimationGroup(*reinterpret_cast(&value)); return S_OK; } @@ -1422,10 +1522,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_InsertColor(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertColor(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertColor(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1435,10 +1536,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertMatrix3x2(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertMatrix3x2(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertMatrix3x2(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1448,10 +1550,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertMatrix4x4(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertMatrix4x4(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertMatrix4x4(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1461,10 +1564,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertQuaternion(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertQuaternion(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertQuaternion(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1474,10 +1578,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertScalar(abi_arg_in propertyName, float value) noexcept override + HRESULT __stdcall abi_InsertScalar(impl::abi_arg_in propertyName, float value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertScalar(*reinterpret_cast(&propertyName), value); return S_OK; } @@ -1487,10 +1592,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertVector2(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertVector2(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertVector2(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1500,10 +1606,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertVector3(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertVector3(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertVector3(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1513,10 +1620,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_InsertVector4(abi_arg_in propertyName, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertVector4(impl::abi_arg_in propertyName, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertVector4(*reinterpret_cast(&propertyName), *reinterpret_cast(&value)); return S_OK; } @@ -1526,11 +1634,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetColor(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetColor(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetColor(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetColor(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1539,11 +1648,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetMatrix3x2(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetMatrix3x2(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetMatrix3x2(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetMatrix3x2(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1552,11 +1662,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetMatrix4x4(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetMatrix4x4(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetMatrix4x4(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetMatrix4x4(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1565,11 +1676,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetQuaternion(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetQuaternion(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetQuaternion(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetQuaternion(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1578,11 +1690,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetScalar(abi_arg_in propertyName, float * value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetScalar(impl::abi_arg_in propertyName, float * value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetScalar(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetScalar(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1591,11 +1704,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetVector2(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetVector2(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetVector2(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetVector2(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1604,11 +1718,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetVector3(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetVector3(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetVector3(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetVector3(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1617,11 +1732,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_TryGetVector4(abi_arg_in propertyName, abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetVector4(impl::abi_arg_in propertyName, impl::abi_arg_out value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetVector4(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetVector4(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1634,10 +1750,11 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_InsertBoolean(abi_arg_in propertyName, bool value) noexcept override + HRESULT __stdcall abi_InsertBoolean(impl::abi_arg_in propertyName, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertBoolean(*reinterpret_cast(&propertyName), value); return S_OK; } @@ -1647,11 +1764,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_TryGetBoolean(abi_arg_in propertyName, bool * value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override + HRESULT __stdcall abi_TryGetBoolean(impl::abi_arg_in propertyName, bool * value, Windows::UI::Composition::CompositionGetValueStatus * result) noexcept override { try { - *result = detach(this->shim().TryGetBoolean(*reinterpret_cast(&propertyName), *value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryGetBoolean(*reinterpret_cast(&propertyName), *value)); return S_OK; } catch (...) @@ -1668,7 +1786,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -1681,7 +1800,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsEnded()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnded()); return S_OK; } catch (...) @@ -1694,6 +1814,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().End(); return S_OK; } @@ -1707,6 +1828,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Resume(); return S_OK; } @@ -1720,6 +1842,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Suspend(); return S_OK; } @@ -1729,11 +1852,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_Completed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Completed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Completed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1746,6 +1870,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Completed(token); return S_OK; } @@ -1775,7 +1900,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().BitmapInterpolationMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BitmapInterpolationMode()); return S_OK; } catch (...) @@ -1788,6 +1914,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().BitmapInterpolationMode(value); return S_OK; } @@ -1801,7 +1928,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().HorizontalAlignmentRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalAlignmentRatio()); return S_OK; } catch (...) @@ -1814,6 +1942,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().HorizontalAlignmentRatio(value); return S_OK; } @@ -1827,7 +1956,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -1840,6 +1970,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stretch(value); return S_OK; } @@ -1849,11 +1980,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Surface(abi_arg_out value) noexcept override + HRESULT __stdcall get_Surface(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Surface()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Surface()); return S_OK; } catch (...) @@ -1863,10 +1995,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Surface(abi_arg_in value) noexcept override + HRESULT __stdcall put_Surface(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Surface(*reinterpret_cast(&value)); return S_OK; } @@ -1880,7 +2013,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().VerticalAlignmentRatio()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalAlignmentRatio()); return S_OK; } catch (...) @@ -1893,6 +2027,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().VerticalAlignmentRatio(value); return S_OK; } @@ -1906,11 +2041,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_AnchorPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnchorPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnchorPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnchorPoint()); return S_OK; } catch (...) @@ -1919,10 +2055,11 @@ struct produce : produce } } - HRESULT __stdcall put_AnchorPoint(abi_arg_in value) noexcept override + HRESULT __stdcall put_AnchorPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AnchorPoint(*reinterpret_cast(&value)); return S_OK; } @@ -1932,11 +2069,12 @@ struct produce : produce } } - HRESULT __stdcall get_CenterPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_CenterPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CenterPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterPoint()); return S_OK; } catch (...) @@ -1945,10 +2083,11 @@ struct produce : produce } } - HRESULT __stdcall put_CenterPoint(abi_arg_in value) noexcept override + HRESULT __stdcall put_CenterPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CenterPoint(*reinterpret_cast(&value)); return S_OK; } @@ -1958,11 +2097,12 @@ struct produce : produce } } - HRESULT __stdcall get_Offset(abi_arg_out value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -1971,10 +2111,11 @@ struct produce : produce } } - HRESULT __stdcall put_Offset(abi_arg_in value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -1988,7 +2129,8 @@ struct produce : produce { try { - *value = detach(this->shim().RotationAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngle()); return S_OK; } catch (...) @@ -2001,6 +2143,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RotationAngle(value); return S_OK; } @@ -2014,7 +2157,8 @@ struct produce : produce { try { - *value = detach(this->shim().RotationAngleInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngleInDegrees()); return S_OK; } catch (...) @@ -2027,6 +2171,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RotationAngleInDegrees(value); return S_OK; } @@ -2036,11 +2181,12 @@ struct produce : produce } } - HRESULT __stdcall get_Scale(abi_arg_out value) noexcept override + HRESULT __stdcall get_Scale(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Scale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scale()); return S_OK; } catch (...) @@ -2049,10 +2195,11 @@ struct produce : produce } } - HRESULT __stdcall put_Scale(abi_arg_in value) noexcept override + HRESULT __stdcall put_Scale(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Scale(*reinterpret_cast(&value)); return S_OK; } @@ -2062,11 +2209,12 @@ struct produce : produce } } - HRESULT __stdcall get_TransformMatrix(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransformMatrix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransformMatrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransformMatrix()); return S_OK; } catch (...) @@ -2075,10 +2223,11 @@ struct produce : produce } } - HRESULT __stdcall put_TransformMatrix(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransformMatrix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransformMatrix(*reinterpret_cast(&value)); return S_OK; } @@ -2092,11 +2241,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Root(abi_arg_out value) noexcept override + HRESULT __stdcall get_Root(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Root()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Root()); return S_OK; } catch (...) @@ -2106,10 +2256,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Root(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Root(*reinterpret_cast(&value)); return S_OK; } @@ -2123,11 +2274,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateColorKeyFrameAnimation(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateColorKeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateColorKeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateColorKeyFrameAnimation()); return S_OK; } catch (...) @@ -2137,11 +2289,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateColorBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateColorBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateColorBrush()); return S_OK; } catch (...) @@ -2151,11 +2304,12 @@ struct produce : produce_base color, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateColorBrushWithColor(impl::abi_arg_in color, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateColorBrush(*reinterpret_cast(&color))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateColorBrush(*reinterpret_cast(&color))); return S_OK; } catch (...) @@ -2165,11 +2319,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateContainerVisual(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateContainerVisual()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateContainerVisual()); return S_OK; } catch (...) @@ -2179,11 +2334,12 @@ struct produce : produce_base controlPoint1, abi_arg_in controlPoint2, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateCubicBezierEasingFunction(impl::abi_arg_in controlPoint1, impl::abi_arg_in controlPoint2, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateCubicBezierEasingFunction(*reinterpret_cast(&controlPoint1), *reinterpret_cast(&controlPoint2))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateCubicBezierEasingFunction(*reinterpret_cast(&controlPoint1), *reinterpret_cast(&controlPoint2))); return S_OK; } catch (...) @@ -2193,11 +2349,12 @@ struct produce : produce_base graphicsEffect, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateEffectFactory(impl::abi_arg_in graphicsEffect, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateEffectFactory(*reinterpret_cast(&graphicsEffect))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateEffectFactory(*reinterpret_cast(&graphicsEffect))); return S_OK; } catch (...) @@ -2207,11 +2364,12 @@ struct produce : produce_base graphicsEffect, abi_arg_in> animatableProperties, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateEffectFactoryWithProperties(impl::abi_arg_in graphicsEffect, impl::abi_arg_in> animatableProperties, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateEffectFactory(*reinterpret_cast(&graphicsEffect), *reinterpret_cast *>(&animatableProperties))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateEffectFactory(*reinterpret_cast(&graphicsEffect), *reinterpret_cast *>(&animatableProperties))); return S_OK; } catch (...) @@ -2221,11 +2379,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateExpressionAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateExpressionAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateExpressionAnimation()); return S_OK; } catch (...) @@ -2235,11 +2394,12 @@ struct produce : produce_base expression, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateExpressionAnimationWithExpression(impl::abi_arg_in expression, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateExpressionAnimation(*reinterpret_cast(&expression))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateExpressionAnimation(*reinterpret_cast(&expression))); return S_OK; } catch (...) @@ -2249,11 +2409,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateInsetClip(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateInsetClip()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateInsetClip()); return S_OK; } catch (...) @@ -2263,11 +2424,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateInsetClipWithInsets(float leftInset, float topInset, float rightInset, float bottomInset, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateInsetClip(leftInset, topInset, rightInset, bottomInset)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateInsetClip(leftInset, topInset, rightInset, bottomInset)); return S_OK; } catch (...) @@ -2277,11 +2439,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateLinearEasingFunction(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateLinearEasingFunction()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateLinearEasingFunction()); return S_OK; } catch (...) @@ -2291,11 +2454,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreatePropertySet(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreatePropertySet()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreatePropertySet()); return S_OK; } catch (...) @@ -2305,11 +2469,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateQuaternionKeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateQuaternionKeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateQuaternionKeyFrameAnimation()); return S_OK; } catch (...) @@ -2319,11 +2484,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateScalarKeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateScalarKeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateScalarKeyFrameAnimation()); return S_OK; } catch (...) @@ -2333,11 +2499,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateScopedBatch(Windows::UI::Composition::CompositionBatchTypes batchType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateScopedBatch(batchType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateScopedBatch(batchType)); return S_OK; } catch (...) @@ -2347,11 +2514,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateSpriteVisual(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateSpriteVisual()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateSpriteVisual()); return S_OK; } catch (...) @@ -2361,11 +2529,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateSurfaceBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateSurfaceBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateSurfaceBrush()); return S_OK; } catch (...) @@ -2375,11 +2544,12 @@ struct produce : produce_base surface, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateSurfaceBrushWithSurface(impl::abi_arg_in surface, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateSurfaceBrush(*reinterpret_cast(&surface))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateSurfaceBrush(*reinterpret_cast(&surface))); return S_OK; } catch (...) @@ -2389,11 +2559,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateTargetForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateTargetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateTargetForCurrentView()); return S_OK; } catch (...) @@ -2403,11 +2574,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateVector2KeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateVector2KeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateVector2KeyFrameAnimation()); return S_OK; } catch (...) @@ -2417,11 +2589,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateVector3KeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateVector3KeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateVector3KeyFrameAnimation()); return S_OK; } catch (...) @@ -2431,11 +2604,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateVector4KeyFrameAnimation(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateVector4KeyFrameAnimation()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateVector4KeyFrameAnimation()); return S_OK; } catch (...) @@ -2445,11 +2619,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetCommitBatch(Windows::UI::Composition::CompositionBatchTypes batchType, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetCommitBatch(batchType)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetCommitBatch(batchType)); return S_OK; } catch (...) @@ -2463,11 +2638,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateAmbientLight(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateAmbientLight(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateAmbientLight()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateAmbientLight()); return S_OK; } catch (...) @@ -2477,11 +2653,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateAnimationGroup(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateAnimationGroup()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateAnimationGroup()); return S_OK; } catch (...) @@ -2491,11 +2668,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateBackdropBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateBackdropBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateBackdropBrush()); return S_OK; } catch (...) @@ -2505,11 +2683,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateDistantLight(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDistantLight()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDistantLight()); return S_OK; } catch (...) @@ -2519,11 +2698,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateDropShadow(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateDropShadow()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateDropShadow()); return S_OK; } catch (...) @@ -2533,11 +2713,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateImplicitAnimationCollection(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateImplicitAnimationCollection()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateImplicitAnimationCollection()); return S_OK; } catch (...) @@ -2547,11 +2728,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateLayerVisual(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateLayerVisual()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateLayerVisual()); return S_OK; } catch (...) @@ -2561,11 +2743,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateMaskBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateMaskBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateMaskBrush()); return S_OK; } catch (...) @@ -2575,11 +2758,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateNineGridBrush(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateNineGridBrush()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateNineGridBrush()); return S_OK; } catch (...) @@ -2589,11 +2773,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreatePointLight(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreatePointLight()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreatePointLight()); return S_OK; } catch (...) @@ -2603,11 +2788,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateSpotLight(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateSpotLight()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateSpotLight()); return S_OK; } catch (...) @@ -2617,11 +2803,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateStepEasingFunction(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateStepEasingFunction()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateStepEasingFunction()); return S_OK; } catch (...) @@ -2631,11 +2818,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateStepEasingFunctionWithStepCount(int32_t stepCount, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateStepEasingFunction(stepCount)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateStepEasingFunction(stepCount)); return S_OK; } catch (...) @@ -2649,11 +2837,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Children(abi_arg_out value) noexcept override + HRESULT __stdcall get_Children(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Children()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Children()); return S_OK; } catch (...) @@ -2671,11 +2860,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_ControlPoint1(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlPoint1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlPoint1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlPoint1()); return S_OK; } catch (...) @@ -2684,11 +2874,12 @@ struct produce : produc } } - HRESULT __stdcall get_ControlPoint2(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlPoint2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlPoint2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlPoint2()); return S_OK; } catch (...) @@ -2701,11 +2892,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -2714,10 +2906,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -2727,11 +2920,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CoordinateSpace(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSpace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSpace()); return S_OK; } catch (...) @@ -2741,10 +2935,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CoordinateSpace(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CoordinateSpace(*reinterpret_cast(&value)); return S_OK; } @@ -2754,11 +2949,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Direction(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -2767,10 +2963,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Direction(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Direction(*reinterpret_cast(&value)); return S_OK; } @@ -2788,7 +2985,8 @@ struct produce : produce_baseshim().BlurRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlurRadius()); return S_OK; } catch (...) @@ -2801,6 +2999,7 @@ struct produce : produce_baseshim()); this->shim().BlurRadius(value); return S_OK; } @@ -2810,11 +3009,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -2823,10 +3023,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -2836,11 +3037,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Mask(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Mask()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mask()); return S_OK; } catch (...) @@ -2850,10 +3052,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Mask(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Mask(*reinterpret_cast(&value)); return S_OK; } @@ -2863,11 +3066,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -2876,10 +3080,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -2893,7 +3098,8 @@ struct produce : produce_baseshim().Opacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opacity()); return S_OK; } catch (...) @@ -2906,6 +3112,7 @@ struct produce : produce_baseshim()); this->shim().Opacity(value); return S_OK; } @@ -2919,11 +3126,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Expression(abi_arg_out value) noexcept override + HRESULT __stdcall get_Expression(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Expression()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Expression()); return S_OK; } catch (...) @@ -2933,10 +3141,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Expression(abi_arg_in value) noexcept override + HRESULT __stdcall put_Expression(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Expression(*reinterpret_cast(&value)); return S_OK; } @@ -2958,7 +3167,8 @@ struct produce : produce_baseshim().BottomInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomInset()); return S_OK; } catch (...) @@ -2971,6 +3181,7 @@ struct produce : produce_baseshim()); this->shim().BottomInset(value); return S_OK; } @@ -2984,7 +3195,8 @@ struct produce : produce_baseshim().LeftInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftInset()); return S_OK; } catch (...) @@ -2997,6 +3209,7 @@ struct produce : produce_baseshim()); this->shim().LeftInset(value); return S_OK; } @@ -3010,7 +3223,8 @@ struct produce : produce_baseshim().RightInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightInset()); return S_OK; } catch (...) @@ -3023,6 +3237,7 @@ struct produce : produce_baseshim()); this->shim().RightInset(value); return S_OK; } @@ -3036,7 +3251,8 @@ struct produce : produce_baseshim().TopInset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopInset()); return S_OK; } catch (...) @@ -3049,6 +3265,7 @@ struct produce : produce_baseshim()); this->shim().TopInset(value); return S_OK; } @@ -3062,11 +3279,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DelayTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DelayTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DelayTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DelayTime()); return S_OK; } catch (...) @@ -3075,10 +3293,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DelayTime(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DelayTime(*reinterpret_cast(&value)); return S_OK; } @@ -3088,11 +3307,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -3101,10 +3321,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Duration(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return S_OK; } @@ -3118,7 +3339,8 @@ struct produce : produce_baseshim().IterationBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IterationBehavior()); return S_OK; } catch (...) @@ -3131,6 +3353,7 @@ struct produce : produce_baseshim()); this->shim().IterationBehavior(value); return S_OK; } @@ -3144,7 +3367,8 @@ struct produce : produce_baseshim().IterationCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IterationCount()); return S_OK; } catch (...) @@ -3157,6 +3381,7 @@ struct produce : produce_baseshim()); this->shim().IterationCount(value); return S_OK; } @@ -3170,7 +3395,8 @@ struct produce : produce_baseshim().KeyFrameCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyFrameCount()); return S_OK; } catch (...) @@ -3183,7 +3409,8 @@ struct produce : produce_baseshim().StopBehavior()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopBehavior()); return S_OK; } catch (...) @@ -3196,6 +3423,7 @@ struct produce : produce_baseshim()); this->shim().StopBehavior(value); return S_OK; } @@ -3205,10 +3433,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_InsertExpressionKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertExpressionKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -3218,10 +3447,11 @@ struct produce : produce_base value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertExpressionKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertExpressionKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -3239,7 +3469,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -3252,6 +3483,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Direction(value); return S_OK; } @@ -3269,11 +3501,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Effect(abi_arg_out value) noexcept override + HRESULT __stdcall get_Effect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Effect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Effect()); return S_OK; } catch (...) @@ -3283,10 +3516,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Effect(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Effect(*reinterpret_cast(&value)); return S_OK; } @@ -3304,11 +3538,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -3317,10 +3552,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -3334,7 +3570,8 @@ struct produce : produce_baseshim().ConstantAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConstantAttenuation()); return S_OK; } catch (...) @@ -3347,6 +3584,7 @@ struct produce : produce_baseshim()); this->shim().ConstantAttenuation(value); return S_OK; } @@ -3356,11 +3594,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CoordinateSpace(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSpace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSpace()); return S_OK; } catch (...) @@ -3370,10 +3609,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CoordinateSpace(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CoordinateSpace(*reinterpret_cast(&value)); return S_OK; } @@ -3387,7 +3627,8 @@ struct produce : produce_baseshim().LinearAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinearAttenuation()); return S_OK; } catch (...) @@ -3400,6 +3641,7 @@ struct produce : produce_baseshim()); this->shim().LinearAttenuation(value); return S_OK; } @@ -3409,11 +3651,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -3422,10 +3665,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -3439,7 +3683,8 @@ struct produce : produce_baseshim().QuadraticAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QuadraticAttenuation()); return S_OK; } catch (...) @@ -3452,6 +3697,7 @@ struct produce : produce_baseshim()); this->shim().QuadraticAttenuation(value); return S_OK; } @@ -3465,10 +3711,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -3478,10 +3725,11 @@ struct produce : prod } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, abi_arg_in value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -3495,11 +3743,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_GraphicsDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_GraphicsDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GraphicsDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GraphicsDevice()); return S_OK; } catch (...) @@ -3517,6 +3766,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, value); return S_OK; } @@ -3526,10 +3776,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, float value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, float value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, value, *reinterpret_cast(&easingFunction)); return S_OK; } @@ -3547,7 +3798,8 @@ struct produce : produce_baseshim().ConstantAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConstantAttenuation()); return S_OK; } catch (...) @@ -3560,6 +3812,7 @@ struct produce : produce_baseshim()); this->shim().ConstantAttenuation(value); return S_OK; } @@ -3569,11 +3822,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CoordinateSpace(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CoordinateSpace()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CoordinateSpace()); return S_OK; } catch (...) @@ -3583,10 +3837,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CoordinateSpace(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CoordinateSpace(*reinterpret_cast(&value)); return S_OK; } @@ -3596,11 +3851,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Direction(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Direction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Direction()); return S_OK; } catch (...) @@ -3609,10 +3865,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Direction(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Direction(*reinterpret_cast(&value)); return S_OK; } @@ -3626,7 +3883,8 @@ struct produce : produce_baseshim().InnerConeAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InnerConeAngle()); return S_OK; } catch (...) @@ -3639,6 +3897,7 @@ struct produce : produce_baseshim()); this->shim().InnerConeAngle(value); return S_OK; } @@ -3652,7 +3911,8 @@ struct produce : produce_baseshim().InnerConeAngleInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InnerConeAngleInDegrees()); return S_OK; } catch (...) @@ -3665,6 +3925,7 @@ struct produce : produce_baseshim()); this->shim().InnerConeAngleInDegrees(value); return S_OK; } @@ -3674,11 +3935,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InnerConeColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InnerConeColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InnerConeColor()); return S_OK; } catch (...) @@ -3687,10 +3949,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_InnerConeColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InnerConeColor(*reinterpret_cast(&value)); return S_OK; } @@ -3704,7 +3967,8 @@ struct produce : produce_baseshim().LinearAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinearAttenuation()); return S_OK; } catch (...) @@ -3717,6 +3981,7 @@ struct produce : produce_baseshim()); this->shim().LinearAttenuation(value); return S_OK; } @@ -3726,11 +3991,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -3739,10 +4005,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -3756,7 +4023,8 @@ struct produce : produce_baseshim().OuterConeAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuterConeAngle()); return S_OK; } catch (...) @@ -3769,6 +4037,7 @@ struct produce : produce_baseshim()); this->shim().OuterConeAngle(value); return S_OK; } @@ -3782,7 +4051,8 @@ struct produce : produce_baseshim().OuterConeAngleInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuterConeAngleInDegrees()); return S_OK; } catch (...) @@ -3795,6 +4065,7 @@ struct produce : produce_baseshim()); this->shim().OuterConeAngleInDegrees(value); return S_OK; } @@ -3804,11 +4075,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OuterConeColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OuterConeColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OuterConeColor()); return S_OK; } catch (...) @@ -3817,10 +4089,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OuterConeColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OuterConeColor(*reinterpret_cast(&value)); return S_OK; } @@ -3834,7 +4107,8 @@ struct produce : produce_baseshim().QuadraticAttenuation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QuadraticAttenuation()); return S_OK; } catch (...) @@ -3847,6 +4121,7 @@ struct produce : produce_baseshim()); this->shim().QuadraticAttenuation(value); return S_OK; } @@ -3860,11 +4135,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Brush(abi_arg_out value) noexcept override + HRESULT __stdcall get_Brush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Brush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Brush()); return S_OK; } catch (...) @@ -3874,10 +4150,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Brush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Brush(*reinterpret_cast(&value)); return S_OK; } @@ -3891,11 +4168,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Shadow(abi_arg_out value) noexcept override + HRESULT __stdcall get_Shadow(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Shadow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Shadow()); return S_OK; } catch (...) @@ -3905,10 +4183,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Shadow(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Shadow(*reinterpret_cast(&value)); return S_OK; } @@ -3926,7 +4205,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().FinalStep()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalStep()); return S_OK; } catch (...) @@ -3939,6 +4219,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().FinalStep(value); return S_OK; } @@ -3952,7 +4233,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().InitialStep()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialStep()); return S_OK; } catch (...) @@ -3965,6 +4247,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().InitialStep(value); return S_OK; } @@ -3978,7 +4261,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsFinalStepSingleFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFinalStepSingleFrame()); return S_OK; } catch (...) @@ -3991,6 +4275,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFinalStepSingleFrame(value); return S_OK; } @@ -4004,7 +4289,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsInitialStepSingleFrame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInitialStepSingleFrame()); return S_OK; } catch (...) @@ -4017,6 +4303,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsInitialStepSingleFrame(value); return S_OK; } @@ -4030,7 +4317,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().StepCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StepCount()); return S_OK; } catch (...) @@ -4043,6 +4331,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().StepCount(value); return S_OK; } @@ -4056,10 +4345,11 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -4069,10 +4359,11 @@ struct produce : produce } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, abi_arg_in value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -4086,10 +4377,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -4099,10 +4391,11 @@ struct produce : produce } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, abi_arg_in value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -4116,10 +4409,11 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertKeyFrame(float normalizedProgressKey, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value)); return S_OK; } @@ -4129,10 +4423,11 @@ struct produce : produce } } - HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, abi_arg_in value, abi_arg_in easingFunction) noexcept override + HRESULT __stdcall abi_InsertKeyFrameWithEasingFunction(float normalizedProgressKey, impl::abi_arg_in value, impl::abi_arg_in easingFunction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertKeyFrame(normalizedProgressKey, *reinterpret_cast(&value), *reinterpret_cast(&easingFunction)); return S_OK; } @@ -4146,11 +4441,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_AnchorPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnchorPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnchorPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnchorPoint()); return S_OK; } catch (...) @@ -4159,10 +4455,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_AnchorPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AnchorPoint(*reinterpret_cast(&value)); return S_OK; } @@ -4176,7 +4473,8 @@ struct produce : produce_baseshim().BackfaceVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackfaceVisibility()); return S_OK; } catch (...) @@ -4189,6 +4487,7 @@ struct produce : produce_baseshim()); this->shim().BackfaceVisibility(value); return S_OK; } @@ -4202,7 +4501,8 @@ struct produce : produce_baseshim().BorderMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderMode()); return S_OK; } catch (...) @@ -4215,6 +4515,7 @@ struct produce : produce_baseshim()); this->shim().BorderMode(value); return S_OK; } @@ -4224,11 +4525,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CenterPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CenterPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterPoint()); return S_OK; } catch (...) @@ -4237,10 +4539,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CenterPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CenterPoint(*reinterpret_cast(&value)); return S_OK; } @@ -4250,11 +4553,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Clip(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Clip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Clip()); return S_OK; } catch (...) @@ -4264,10 +4568,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Clip(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Clip(*reinterpret_cast(&value)); return S_OK; } @@ -4281,7 +4586,8 @@ struct produce : produce_baseshim().CompositeMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositeMode()); return S_OK; } catch (...) @@ -4294,6 +4600,7 @@ struct produce : produce_baseshim()); this->shim().CompositeMode(value); return S_OK; } @@ -4307,7 +4614,8 @@ struct produce : produce_baseshim().IsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVisible()); return S_OK; } catch (...) @@ -4320,6 +4628,7 @@ struct produce : produce_baseshim()); this->shim().IsVisible(value); return S_OK; } @@ -4329,11 +4638,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Offset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Offset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Offset()); return S_OK; } catch (...) @@ -4342,10 +4652,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Offset(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Offset(*reinterpret_cast(&value)); return S_OK; } @@ -4359,7 +4670,8 @@ struct produce : produce_baseshim().Opacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opacity()); return S_OK; } catch (...) @@ -4372,6 +4684,7 @@ struct produce : produce_baseshim()); this->shim().Opacity(value); return S_OK; } @@ -4381,11 +4694,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -4394,10 +4708,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Orientation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(*reinterpret_cast(&value)); return S_OK; } @@ -4407,11 +4722,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Parent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Parent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Parent()); return S_OK; } catch (...) @@ -4425,7 +4741,8 @@ struct produce : produce_baseshim().RotationAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngle()); return S_OK; } catch (...) @@ -4438,6 +4755,7 @@ struct produce : produce_baseshim()); this->shim().RotationAngle(value); return S_OK; } @@ -4451,7 +4769,8 @@ struct produce : produce_baseshim().RotationAngleInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAngleInDegrees()); return S_OK; } catch (...) @@ -4464,6 +4783,7 @@ struct produce : produce_baseshim()); this->shim().RotationAngleInDegrees(value); return S_OK; } @@ -4473,11 +4793,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RotationAxis(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RotationAxis()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationAxis()); return S_OK; } catch (...) @@ -4486,10 +4807,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RotationAxis(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RotationAxis(*reinterpret_cast(&value)); return S_OK; } @@ -4499,11 +4821,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Scale(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Scale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scale()); return S_OK; } catch (...) @@ -4512,10 +4835,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Scale(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Scale(*reinterpret_cast(&value)); return S_OK; } @@ -4525,11 +4849,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -4538,10 +4863,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Size(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Size(*reinterpret_cast(&value)); return S_OK; } @@ -4551,11 +4877,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TransformMatrix(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransformMatrix()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransformMatrix()); return S_OK; } catch (...) @@ -4564,10 +4891,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TransformMatrix(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransformMatrix(*reinterpret_cast(&value)); return S_OK; } @@ -4585,7 +4913,8 @@ struct produce : produce_baseshim().Count()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Count()); return S_OK; } catch (...) @@ -4594,10 +4923,11 @@ struct produce : produce_base newChild, abi_arg_in sibling) noexcept override + HRESULT __stdcall abi_InsertAbove(impl::abi_arg_in newChild, impl::abi_arg_in sibling) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertAbove(*reinterpret_cast(&newChild), *reinterpret_cast(&sibling)); return S_OK; } @@ -4607,10 +4937,11 @@ struct produce : produce_base newChild) noexcept override + HRESULT __stdcall abi_InsertAtBottom(impl::abi_arg_in newChild) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertAtBottom(*reinterpret_cast(&newChild)); return S_OK; } @@ -4620,10 +4951,11 @@ struct produce : produce_base newChild) noexcept override + HRESULT __stdcall abi_InsertAtTop(impl::abi_arg_in newChild) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertAtTop(*reinterpret_cast(&newChild)); return S_OK; } @@ -4633,10 +4965,11 @@ struct produce : produce_base newChild, abi_arg_in sibling) noexcept override + HRESULT __stdcall abi_InsertBelow(impl::abi_arg_in newChild, impl::abi_arg_in sibling) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertBelow(*reinterpret_cast(&newChild), *reinterpret_cast(&sibling)); return S_OK; } @@ -4646,10 +4979,11 @@ struct produce : produce_base child) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in child) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&child)); return S_OK; } @@ -4663,6 +4997,7 @@ struct produce : produce_baseshim()); this->shim().RemoveAll(); return S_OK; } @@ -4684,7 +5019,8 @@ struct produce : produc { try { - *value = detach(this->shim().Count()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Count()); return S_OK; } catch (...) @@ -4693,10 +5029,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Add(abi_arg_in newVisual) noexcept override + HRESULT __stdcall abi_Add(impl::abi_arg_in newVisual) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&newVisual)); return S_OK; } @@ -4706,10 +5043,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Remove(abi_arg_in visual) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in visual) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&visual)); return S_OK; } @@ -4723,6 +5061,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAll(); return S_OK; } @@ -4740,337 +5079,337 @@ namespace Windows::UI::Composition { template Windows::UI::Color impl_IAmbientLight::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IAmbientLight)->get_Color(put_abi(value))); return value; } template void impl_IAmbientLight::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IAmbientLight)->put_Color(get_abi(value))); } template Windows::UI::Composition::CompositionColorSpace impl_IColorKeyFrameAnimation::InterpolationColorSpace() const { Windows::UI::Composition::CompositionColorSpace value {}; - check_hresult(static_cast(static_cast(*this))->get_InterpolationColorSpace(&value)); + check_hresult(WINRT_SHIM(IColorKeyFrameAnimation)->get_InterpolationColorSpace(&value)); return value; } template void impl_IColorKeyFrameAnimation::InterpolationColorSpace(Windows::UI::Composition::CompositionColorSpace value) const { - check_hresult(static_cast(static_cast(*this))->put_InterpolationColorSpace(value)); + check_hresult(WINRT_SHIM(IColorKeyFrameAnimation)->put_InterpolationColorSpace(value)); } template void impl_IColorKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IColorKeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, get_abi(value))); } template void impl_IColorKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::UI::Color & value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IColorKeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template void impl_ICompositionAnimation::ClearAllParameters() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearAllParameters()); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_ClearAllParameters()); } -template void impl_ICompositionAnimation::ClearParameter(hstring_ref key) const +template void impl_ICompositionAnimation::ClearParameter(hstring_view key) const { - check_hresult(static_cast(static_cast(*this))->abi_ClearParameter(get(key))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_ClearParameter(get_abi(key))); } -template void impl_ICompositionAnimation::SetColorParameter(hstring_ref key, const Windows::UI::Color & value) const +template void impl_ICompositionAnimation::SetColorParameter(hstring_view key, const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetColorParameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetColorParameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetMatrix3x2Parameter(hstring_ref key, const Windows::Foundation::Numerics::float3x2 & value) const +template void impl_ICompositionAnimation::SetMatrix3x2Parameter(hstring_view key, const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMatrix3x2Parameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetMatrix3x2Parameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetMatrix4x4Parameter(hstring_ref key, const Windows::Foundation::Numerics::float4x4 & value) const +template void impl_ICompositionAnimation::SetMatrix4x4Parameter(hstring_view key, const Windows::Foundation::Numerics::float4x4 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMatrix4x4Parameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetMatrix4x4Parameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetQuaternionParameter(hstring_ref key, const Windows::Foundation::Numerics::quaternion & value) const +template void impl_ICompositionAnimation::SetQuaternionParameter(hstring_view key, const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetQuaternionParameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetQuaternionParameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetReferenceParameter(hstring_ref key, const Windows::UI::Composition::CompositionObject & compositionObject) const +template void impl_ICompositionAnimation::SetReferenceParameter(hstring_view key, const Windows::UI::Composition::CompositionObject & compositionObject) const { - check_hresult(static_cast(static_cast(*this))->abi_SetReferenceParameter(get(key), get(compositionObject))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetReferenceParameter(get_abi(key), get_abi(compositionObject))); } -template void impl_ICompositionAnimation::SetScalarParameter(hstring_ref key, float value) const +template void impl_ICompositionAnimation::SetScalarParameter(hstring_view key, float value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetScalarParameter(get(key), value)); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetScalarParameter(get_abi(key), value)); } -template void impl_ICompositionAnimation::SetVector2Parameter(hstring_ref key, const Windows::Foundation::Numerics::float2 & value) const +template void impl_ICompositionAnimation::SetVector2Parameter(hstring_view key, const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVector2Parameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetVector2Parameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetVector3Parameter(hstring_ref key, const Windows::Foundation::Numerics::float3 & value) const +template void impl_ICompositionAnimation::SetVector3Parameter(hstring_view key, const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVector3Parameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetVector3Parameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation::SetVector4Parameter(hstring_ref key, const Windows::Foundation::Numerics::float4 & value) const +template void impl_ICompositionAnimation::SetVector4Parameter(hstring_view key, const Windows::Foundation::Numerics::float4 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVector4Parameter(get(key), get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation)->abi_SetVector4Parameter(get_abi(key), get_abi(value))); } -template void impl_ICompositionAnimation2::SetBooleanParameter(hstring_ref key, bool value) const +template void impl_ICompositionAnimation2::SetBooleanParameter(hstring_view key, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBooleanParameter(get(key), value)); + check_hresult(WINRT_SHIM(ICompositionAnimation2)->abi_SetBooleanParameter(get_abi(key), value)); } template hstring impl_ICompositionAnimation2::Target() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Target(put(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation2)->get_Target(put_abi(value))); return value; } -template void impl_ICompositionAnimation2::Target(hstring_ref value) const +template void impl_ICompositionAnimation2::Target(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Target(get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimation2)->put_Target(get_abi(value))); } template int32_t impl_ICompositionAnimationGroup::Count() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Count(&value)); + check_hresult(WINRT_SHIM(ICompositionAnimationGroup)->get_Count(&value)); return value; } template void impl_ICompositionAnimationGroup::Add(const Windows::UI::Composition::CompositionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->abi_Add(get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimationGroup)->abi_Add(get_abi(value))); } template void impl_ICompositionAnimationGroup::Remove(const Windows::UI::Composition::CompositionAnimation & value) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(value))); + check_hresult(WINRT_SHIM(ICompositionAnimationGroup)->abi_Remove(get_abi(value))); } template void impl_ICompositionAnimationGroup::RemoveAll() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAll()); + check_hresult(WINRT_SHIM(ICompositionAnimationGroup)->abi_RemoveAll()); } template Windows::Foundation::Numerics::float2 impl_ICompositionClip2::AnchorPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_AnchorPoint(put(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_AnchorPoint(put_abi(value))); return value; } template void impl_ICompositionClip2::AnchorPoint(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_AnchorPoint(get(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_AnchorPoint(get_abi(value))); } template Windows::Foundation::Numerics::float2 impl_ICompositionClip2::CenterPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_CenterPoint(put(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_CenterPoint(put_abi(value))); return value; } template void impl_ICompositionClip2::CenterPoint(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_CenterPoint(get(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_CenterPoint(get_abi(value))); } template Windows::Foundation::Numerics::float2 impl_ICompositionClip2::Offset() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_Offset(put_abi(value))); return value; } template void impl_ICompositionClip2::Offset(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_Offset(get_abi(value))); } template float impl_ICompositionClip2::RotationAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngle(&value)); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_RotationAngle(&value)); return value; } template void impl_ICompositionClip2::RotationAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngle(value)); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_RotationAngle(value)); } template float impl_ICompositionClip2::RotationAngleInDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngleInDegrees(&value)); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_RotationAngleInDegrees(&value)); return value; } template void impl_ICompositionClip2::RotationAngleInDegrees(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngleInDegrees(value)); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_RotationAngleInDegrees(value)); } template Windows::Foundation::Numerics::float2 impl_ICompositionClip2::Scale() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Scale(put(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_Scale(put_abi(value))); return value; } template void impl_ICompositionClip2::Scale(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Scale(get(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_Scale(get_abi(value))); } template Windows::Foundation::Numerics::float3x2 impl_ICompositionClip2::TransformMatrix() const { Windows::Foundation::Numerics::float3x2 value {}; - check_hresult(static_cast(static_cast(*this))->get_TransformMatrix(put(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->get_TransformMatrix(put_abi(value))); return value; } template void impl_ICompositionClip2::TransformMatrix(const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransformMatrix(get(value))); + check_hresult(WINRT_SHIM(ICompositionClip2)->put_TransformMatrix(get_abi(value))); } template Windows::UI::Color impl_ICompositionColorBrush::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(ICompositionColorBrush)->get_Color(put_abi(value))); return value; } template void impl_ICompositionColorBrush::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(ICompositionColorBrush)->put_Color(get_abi(value))); } template bool impl_ICompositionCommitBatch::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(ICompositionCommitBatch)->get_IsActive(&value)); return value; } template bool impl_ICompositionCommitBatch::IsEnded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnded(&value)); + check_hresult(WINRT_SHIM(ICompositionCommitBatch)->get_IsEnded(&value)); return value; } -template event_token impl_ICompositionCommitBatch::Completed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICompositionCommitBatch::Completed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(handler), &token)); + check_hresult(WINRT_SHIM(ICompositionCommitBatch)->add_Completed(get_abi(handler), &token)); return token; } -template event_revoker impl_ICompositionCommitBatch::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICompositionCommitBatch::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Composition::ICompositionCommitBatch::remove_Completed, Completed(handler)); } template void impl_ICompositionCommitBatch::Completed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(token)); + check_hresult(WINRT_SHIM(ICompositionCommitBatch)->remove_Completed(token)); } template Windows::Graphics::DirectX::DirectXAlphaMode impl_ICompositionDrawingSurface::AlphaMode() const { Windows::Graphics::DirectX::DirectXAlphaMode value {}; - check_hresult(static_cast(static_cast(*this))->get_AlphaMode(&value)); + check_hresult(WINRT_SHIM(ICompositionDrawingSurface)->get_AlphaMode(&value)); return value; } template Windows::Graphics::DirectX::DirectXPixelFormat impl_ICompositionDrawingSurface::PixelFormat() const { Windows::Graphics::DirectX::DirectXPixelFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_PixelFormat(&value)); + check_hresult(WINRT_SHIM(ICompositionDrawingSurface)->get_PixelFormat(&value)); return value; } template Windows::Foundation::Size impl_ICompositionDrawingSurface::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(ICompositionDrawingSurface)->get_Size(put_abi(value))); return value; } -template Windows::UI::Composition::CompositionBrush impl_ICompositionEffectBrush::GetSourceParameter(hstring_ref name) const +template Windows::UI::Composition::CompositionBrush impl_ICompositionEffectBrush::GetSourceParameter(hstring_view name) const { Windows::UI::Composition::CompositionBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSourceParameter(get(name), put(result))); + check_hresult(WINRT_SHIM(ICompositionEffectBrush)->abi_GetSourceParameter(get_abi(name), put_abi(result))); return result; } -template void impl_ICompositionEffectBrush::SetSourceParameter(hstring_ref name, const Windows::UI::Composition::CompositionBrush & source) const +template void impl_ICompositionEffectBrush::SetSourceParameter(hstring_view name, const Windows::UI::Composition::CompositionBrush & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSourceParameter(get(name), get(source))); + check_hresult(WINRT_SHIM(ICompositionEffectBrush)->abi_SetSourceParameter(get_abi(name), get_abi(source))); } template Windows::UI::Composition::CompositionEffectBrush impl_ICompositionEffectFactory::CreateBrush() const { Windows::UI::Composition::CompositionEffectBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositionEffectFactory)->abi_CreateBrush(put_abi(result))); return result; } template HRESULT impl_ICompositionEffectFactory::ExtendedError() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtendedError(&value)); + check_hresult(WINRT_SHIM(ICompositionEffectFactory)->get_ExtendedError(&value)); return value; } template Windows::UI::Composition::CompositionEffectFactoryLoadStatus impl_ICompositionEffectFactory::LoadStatus() const { Windows::UI::Composition::CompositionEffectFactoryLoadStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_LoadStatus(&value)); + check_hresult(WINRT_SHIM(ICompositionEffectFactory)->get_LoadStatus(&value)); return value; } template hstring impl_ICompositionEffectSourceParameter::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ICompositionEffectSourceParameter)->get_Name(put_abi(value))); return value; } -template Windows::UI::Composition::CompositionEffectSourceParameter impl_ICompositionEffectSourceParameterFactory::Create(hstring_ref name) const +template Windows::UI::Composition::CompositionEffectSourceParameter impl_ICompositionEffectSourceParameterFactory::Create(hstring_view name) const { Windows::UI::Composition::CompositionEffectSourceParameter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(name), put(instance))); + check_hresult(WINRT_SHIM(ICompositionEffectSourceParameterFactory)->abi_Create(get_abi(name), put_abi(instance))); return instance; } template Windows::UI::Composition::CompositionDrawingSurface impl_ICompositionGraphicsDevice::CreateDrawingSurface(const Windows::Foundation::Size & sizePixels, Windows::Graphics::DirectX::DirectXPixelFormat pixelFormat, Windows::Graphics::DirectX::DirectXAlphaMode alphaMode) const { Windows::UI::Composition::CompositionDrawingSurface result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDrawingSurface(get(sizePixels), pixelFormat, alphaMode, put(result))); + check_hresult(WINRT_SHIM(ICompositionGraphicsDevice)->abi_CreateDrawingSurface(get_abi(sizePixels), pixelFormat, alphaMode, put_abi(result))); return result; } template event_token impl_ICompositionGraphicsDevice::RenderingDeviceReplaced(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RenderingDeviceReplaced(get(handler), &token)); + check_hresult(WINRT_SHIM(ICompositionGraphicsDevice)->add_RenderingDeviceReplaced(get_abi(handler), &token)); return token; } @@ -5081,1708 +5420,1708 @@ template event_revoker impl_ICompositio template void impl_ICompositionGraphicsDevice::RenderingDeviceReplaced(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RenderingDeviceReplaced(token)); + check_hresult(WINRT_SHIM(ICompositionGraphicsDevice)->remove_RenderingDeviceReplaced(token)); } template Windows::UI::Composition::VisualUnorderedCollection impl_ICompositionLight::Targets() const { Windows::UI::Composition::VisualUnorderedCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Targets(put(value))); + check_hresult(WINRT_SHIM(ICompositionLight)->get_Targets(put_abi(value))); return value; } template Windows::UI::Composition::CompositionBrush impl_ICompositionMaskBrush::Mask() const { Windows::UI::Composition::CompositionBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Mask(put(value))); + check_hresult(WINRT_SHIM(ICompositionMaskBrush)->get_Mask(put_abi(value))); return value; } template void impl_ICompositionMaskBrush::Mask(const Windows::UI::Composition::CompositionBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Mask(get(value))); + check_hresult(WINRT_SHIM(ICompositionMaskBrush)->put_Mask(get_abi(value))); } template Windows::UI::Composition::CompositionBrush impl_ICompositionMaskBrush::Source() const { Windows::UI::Composition::CompositionBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ICompositionMaskBrush)->get_Source(put_abi(value))); return value; } template void impl_ICompositionMaskBrush::Source(const Windows::UI::Composition::CompositionBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(ICompositionMaskBrush)->put_Source(get_abi(value))); } template float impl_ICompositionNineGridBrush::BottomInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BottomInset(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_BottomInset(&value)); return value; } template void impl_ICompositionNineGridBrush::BottomInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BottomInset(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_BottomInset(value)); } template float impl_ICompositionNineGridBrush::BottomInsetScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BottomInsetScale(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_BottomInsetScale(&value)); return value; } template void impl_ICompositionNineGridBrush::BottomInsetScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BottomInsetScale(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_BottomInsetScale(value)); } template bool impl_ICompositionNineGridBrush::IsCenterHollow() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCenterHollow(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_IsCenterHollow(&value)); return value; } template void impl_ICompositionNineGridBrush::IsCenterHollow(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCenterHollow(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_IsCenterHollow(value)); } template float impl_ICompositionNineGridBrush::LeftInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LeftInset(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_LeftInset(&value)); return value; } template void impl_ICompositionNineGridBrush::LeftInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LeftInset(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_LeftInset(value)); } template float impl_ICompositionNineGridBrush::LeftInsetScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LeftInsetScale(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_LeftInsetScale(&value)); return value; } template void impl_ICompositionNineGridBrush::LeftInsetScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LeftInsetScale(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_LeftInsetScale(value)); } template float impl_ICompositionNineGridBrush::RightInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RightInset(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_RightInset(&value)); return value; } template void impl_ICompositionNineGridBrush::RightInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RightInset(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_RightInset(value)); } template float impl_ICompositionNineGridBrush::RightInsetScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RightInsetScale(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_RightInsetScale(&value)); return value; } template void impl_ICompositionNineGridBrush::RightInsetScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RightInsetScale(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_RightInsetScale(value)); } template Windows::UI::Composition::CompositionBrush impl_ICompositionNineGridBrush::Source() const { Windows::UI::Composition::CompositionBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_Source(put_abi(value))); return value; } template void impl_ICompositionNineGridBrush::Source(const Windows::UI::Composition::CompositionBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_Source(get_abi(value))); } template float impl_ICompositionNineGridBrush::TopInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TopInset(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_TopInset(&value)); return value; } template void impl_ICompositionNineGridBrush::TopInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_TopInset(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_TopInset(value)); } template float impl_ICompositionNineGridBrush::TopInsetScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TopInsetScale(&value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->get_TopInsetScale(&value)); return value; } template void impl_ICompositionNineGridBrush::TopInsetScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_TopInsetScale(value)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->put_TopInsetScale(value)); } template void impl_ICompositionNineGridBrush::SetInsets(float inset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetInsets(inset)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->abi_SetInsets(inset)); } template void impl_ICompositionNineGridBrush::SetInsets(float left, float top, float right, float bottom) const { - check_hresult(static_cast(static_cast(*this))->abi_SetInsetsWithValues(left, top, right, bottom)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->abi_SetInsetsWithValues(left, top, right, bottom)); } template void impl_ICompositionNineGridBrush::SetInsetScales(float scale) const { - check_hresult(static_cast(static_cast(*this))->abi_SetInsetScales(scale)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->abi_SetInsetScales(scale)); } template void impl_ICompositionNineGridBrush::SetInsetScales(float left, float top, float right, float bottom) const { - check_hresult(static_cast(static_cast(*this))->abi_SetInsetScalesWithValues(left, top, right, bottom)); + check_hresult(WINRT_SHIM(ICompositionNineGridBrush)->abi_SetInsetScalesWithValues(left, top, right, bottom)); } template Windows::UI::Composition::Compositor impl_ICompositionObject::Compositor() const { Windows::UI::Composition::Compositor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Compositor(put(value))); + check_hresult(WINRT_SHIM(ICompositionObject)->get_Compositor(put_abi(value))); return value; } template Windows::UI::Core::CoreDispatcher impl_ICompositionObject::Dispatcher() const { Windows::UI::Core::CoreDispatcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Dispatcher(put(value))); + check_hresult(WINRT_SHIM(ICompositionObject)->get_Dispatcher(put_abi(value))); return value; } template Windows::UI::Composition::CompositionPropertySet impl_ICompositionObject::Properties() const { Windows::UI::Composition::CompositionPropertySet value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(ICompositionObject)->get_Properties(put_abi(value))); return value; } -template void impl_ICompositionObject::StartAnimation(hstring_ref propertyName, const Windows::UI::Composition::CompositionAnimation & animation) const +template void impl_ICompositionObject::StartAnimation(hstring_view propertyName, const Windows::UI::Composition::CompositionAnimation & animation) const { - check_hresult(static_cast(static_cast(*this))->abi_StartAnimation(get(propertyName), get(animation))); + check_hresult(WINRT_SHIM(ICompositionObject)->abi_StartAnimation(get_abi(propertyName), get_abi(animation))); } -template void impl_ICompositionObject::StopAnimation(hstring_ref propertyName) const +template void impl_ICompositionObject::StopAnimation(hstring_view propertyName) const { - check_hresult(static_cast(static_cast(*this))->abi_StopAnimation(get(propertyName))); + check_hresult(WINRT_SHIM(ICompositionObject)->abi_StopAnimation(get_abi(propertyName))); } template hstring impl_ICompositionObject2::Comment() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Comment(put(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->get_Comment(put_abi(value))); return value; } -template void impl_ICompositionObject2::Comment(hstring_ref value) const +template void impl_ICompositionObject2::Comment(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Comment(get(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->put_Comment(get_abi(value))); } template Windows::UI::Composition::ImplicitAnimationCollection impl_ICompositionObject2::ImplicitAnimations() const { Windows::UI::Composition::ImplicitAnimationCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ImplicitAnimations(put(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->get_ImplicitAnimations(put_abi(value))); return value; } template void impl_ICompositionObject2::ImplicitAnimations(const Windows::UI::Composition::ImplicitAnimationCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ImplicitAnimations(get(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->put_ImplicitAnimations(get_abi(value))); } template void impl_ICompositionObject2::StartAnimationGroup(const Windows::UI::Composition::ICompositionAnimationBase & value) const { - check_hresult(static_cast(static_cast(*this))->abi_StartAnimationGroup(get(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->abi_StartAnimationGroup(get_abi(value))); } template void impl_ICompositionObject2::StopAnimationGroup(const Windows::UI::Composition::ICompositionAnimationBase & value) const { - check_hresult(static_cast(static_cast(*this))->abi_StopAnimationGroup(get(value))); + check_hresult(WINRT_SHIM(ICompositionObject2)->abi_StopAnimationGroup(get_abi(value))); } -template void impl_ICompositionPropertySet::InsertColor(hstring_ref propertyName, const Windows::UI::Color & value) const +template void impl_ICompositionPropertySet::InsertColor(hstring_view propertyName, const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertColor(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertColor(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertMatrix3x2(hstring_ref propertyName, const Windows::Foundation::Numerics::float3x2 & value) const +template void impl_ICompositionPropertySet::InsertMatrix3x2(hstring_view propertyName, const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertMatrix3x2(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertMatrix3x2(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertMatrix4x4(hstring_ref propertyName, const Windows::Foundation::Numerics::float4x4 & value) const +template void impl_ICompositionPropertySet::InsertMatrix4x4(hstring_view propertyName, const Windows::Foundation::Numerics::float4x4 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertMatrix4x4(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertMatrix4x4(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertQuaternion(hstring_ref propertyName, const Windows::Foundation::Numerics::quaternion & value) const +template void impl_ICompositionPropertySet::InsertQuaternion(hstring_view propertyName, const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertQuaternion(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertQuaternion(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertScalar(hstring_ref propertyName, float value) const +template void impl_ICompositionPropertySet::InsertScalar(hstring_view propertyName, float value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertScalar(get(propertyName), value)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertScalar(get_abi(propertyName), value)); } -template void impl_ICompositionPropertySet::InsertVector2(hstring_ref propertyName, const Windows::Foundation::Numerics::float2 & value) const +template void impl_ICompositionPropertySet::InsertVector2(hstring_view propertyName, const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertVector2(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertVector2(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertVector3(hstring_ref propertyName, const Windows::Foundation::Numerics::float3 & value) const +template void impl_ICompositionPropertySet::InsertVector3(hstring_view propertyName, const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertVector3(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertVector3(get_abi(propertyName), get_abi(value))); } -template void impl_ICompositionPropertySet::InsertVector4(hstring_ref propertyName, const Windows::Foundation::Numerics::float4 & value) const +template void impl_ICompositionPropertySet::InsertVector4(hstring_view propertyName, const Windows::Foundation::Numerics::float4 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertVector4(get(propertyName), get(value))); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_InsertVector4(get_abi(propertyName), get_abi(value))); } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetColor(hstring_ref propertyName, Windows::UI::Color & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetColor(hstring_view propertyName, Windows::UI::Color & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetColor(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetColor(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetMatrix3x2(hstring_ref propertyName, Windows::Foundation::Numerics::float3x2 & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetMatrix3x2(hstring_view propertyName, Windows::Foundation::Numerics::float3x2 & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetMatrix3x2(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetMatrix3x2(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetMatrix4x4(hstring_ref propertyName, Windows::Foundation::Numerics::float4x4 & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetMatrix4x4(hstring_view propertyName, Windows::Foundation::Numerics::float4x4 & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetMatrix4x4(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetMatrix4x4(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetQuaternion(hstring_ref propertyName, Windows::Foundation::Numerics::quaternion & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetQuaternion(hstring_view propertyName, Windows::Foundation::Numerics::quaternion & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetQuaternion(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetQuaternion(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetScalar(hstring_ref propertyName, float & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetScalar(hstring_view propertyName, float & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetScalar(get(propertyName), &value, &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetScalar(get_abi(propertyName), &value, &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector2(hstring_ref propertyName, Windows::Foundation::Numerics::float2 & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector2(hstring_view propertyName, Windows::Foundation::Numerics::float2 & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetVector2(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetVector2(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector3(hstring_ref propertyName, Windows::Foundation::Numerics::float3 & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector3(hstring_view propertyName, Windows::Foundation::Numerics::float3 & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetVector3(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetVector3(get_abi(propertyName), put_abi(value), &result)); return result; } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector4(hstring_ref propertyName, Windows::Foundation::Numerics::float4 & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet::TryGetVector4(hstring_view propertyName, Windows::Foundation::Numerics::float4 & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetVector4(get(propertyName), put(value), &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet)->abi_TryGetVector4(get_abi(propertyName), put_abi(value), &result)); return result; } -template void impl_ICompositionPropertySet2::InsertBoolean(hstring_ref propertyName, bool value) const +template void impl_ICompositionPropertySet2::InsertBoolean(hstring_view propertyName, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertBoolean(get(propertyName), value)); + check_hresult(WINRT_SHIM(ICompositionPropertySet2)->abi_InsertBoolean(get_abi(propertyName), value)); } -template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet2::TryGetBoolean(hstring_ref propertyName, bool & value) const +template Windows::UI::Composition::CompositionGetValueStatus impl_ICompositionPropertySet2::TryGetBoolean(hstring_view propertyName, bool & value) const { Windows::UI::Composition::CompositionGetValueStatus result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryGetBoolean(get(propertyName), &value, &result)); + check_hresult(WINRT_SHIM(ICompositionPropertySet2)->abi_TryGetBoolean(get_abi(propertyName), &value, &result)); return result; } template bool impl_ICompositionScopedBatch::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->get_IsActive(&value)); return value; } template bool impl_ICompositionScopedBatch::IsEnded() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnded(&value)); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->get_IsEnded(&value)); return value; } template void impl_ICompositionScopedBatch::End() const { - check_hresult(static_cast(static_cast(*this))->abi_End()); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->abi_End()); } template void impl_ICompositionScopedBatch::Resume() const { - check_hresult(static_cast(static_cast(*this))->abi_Resume()); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->abi_Resume()); } template void impl_ICompositionScopedBatch::Suspend() const { - check_hresult(static_cast(static_cast(*this))->abi_Suspend()); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->abi_Suspend()); } -template event_token impl_ICompositionScopedBatch::Completed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICompositionScopedBatch::Completed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(handler), &token)); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->add_Completed(get_abi(handler), &token)); return token; } -template event_revoker impl_ICompositionScopedBatch::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICompositionScopedBatch::Completed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Composition::ICompositionScopedBatch::remove_Completed, Completed(handler)); } template void impl_ICompositionScopedBatch::Completed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(token)); + check_hresult(WINRT_SHIM(ICompositionScopedBatch)->remove_Completed(token)); } template Windows::UI::Composition::CompositionBitmapInterpolationMode impl_ICompositionSurfaceBrush::BitmapInterpolationMode() const { Windows::UI::Composition::CompositionBitmapInterpolationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_BitmapInterpolationMode(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->get_BitmapInterpolationMode(&value)); return value; } template void impl_ICompositionSurfaceBrush::BitmapInterpolationMode(Windows::UI::Composition::CompositionBitmapInterpolationMode value) const { - check_hresult(static_cast(static_cast(*this))->put_BitmapInterpolationMode(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->put_BitmapInterpolationMode(value)); } template float impl_ICompositionSurfaceBrush::HorizontalAlignmentRatio() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalAlignmentRatio(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->get_HorizontalAlignmentRatio(&value)); return value; } template void impl_ICompositionSurfaceBrush::HorizontalAlignmentRatio(float value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalAlignmentRatio(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->put_HorizontalAlignmentRatio(value)); } template Windows::UI::Composition::CompositionStretch impl_ICompositionSurfaceBrush::Stretch() const { Windows::UI::Composition::CompositionStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->get_Stretch(&value)); return value; } template void impl_ICompositionSurfaceBrush::Stretch(Windows::UI::Composition::CompositionStretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->put_Stretch(value)); } template Windows::UI::Composition::ICompositionSurface impl_ICompositionSurfaceBrush::Surface() const { Windows::UI::Composition::ICompositionSurface value; - check_hresult(static_cast(static_cast(*this))->get_Surface(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->get_Surface(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush::Surface(const Windows::UI::Composition::ICompositionSurface & value) const { - check_hresult(static_cast(static_cast(*this))->put_Surface(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->put_Surface(get_abi(value))); } template float impl_ICompositionSurfaceBrush::VerticalAlignmentRatio() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalAlignmentRatio(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->get_VerticalAlignmentRatio(&value)); return value; } template void impl_ICompositionSurfaceBrush::VerticalAlignmentRatio(float value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalAlignmentRatio(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush)->put_VerticalAlignmentRatio(value)); } template Windows::Foundation::Numerics::float2 impl_ICompositionSurfaceBrush2::AnchorPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_AnchorPoint(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_AnchorPoint(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush2::AnchorPoint(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_AnchorPoint(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_AnchorPoint(get_abi(value))); } template Windows::Foundation::Numerics::float2 impl_ICompositionSurfaceBrush2::CenterPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_CenterPoint(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_CenterPoint(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush2::CenterPoint(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_CenterPoint(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_CenterPoint(get_abi(value))); } template Windows::Foundation::Numerics::float2 impl_ICompositionSurfaceBrush2::Offset() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_Offset(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush2::Offset(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_Offset(get_abi(value))); } template float impl_ICompositionSurfaceBrush2::RotationAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngle(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_RotationAngle(&value)); return value; } template void impl_ICompositionSurfaceBrush2::RotationAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngle(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_RotationAngle(value)); } template float impl_ICompositionSurfaceBrush2::RotationAngleInDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngleInDegrees(&value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_RotationAngleInDegrees(&value)); return value; } template void impl_ICompositionSurfaceBrush2::RotationAngleInDegrees(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngleInDegrees(value)); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_RotationAngleInDegrees(value)); } template Windows::Foundation::Numerics::float2 impl_ICompositionSurfaceBrush2::Scale() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Scale(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_Scale(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush2::Scale(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Scale(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_Scale(get_abi(value))); } template Windows::Foundation::Numerics::float3x2 impl_ICompositionSurfaceBrush2::TransformMatrix() const { Windows::Foundation::Numerics::float3x2 value {}; - check_hresult(static_cast(static_cast(*this))->get_TransformMatrix(put(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->get_TransformMatrix(put_abi(value))); return value; } template void impl_ICompositionSurfaceBrush2::TransformMatrix(const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransformMatrix(get(value))); + check_hresult(WINRT_SHIM(ICompositionSurfaceBrush2)->put_TransformMatrix(get_abi(value))); } template Windows::UI::Composition::Visual impl_ICompositionTarget::Root() const { Windows::UI::Composition::Visual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Root(put(value))); + check_hresult(WINRT_SHIM(ICompositionTarget)->get_Root(put_abi(value))); return value; } template void impl_ICompositionTarget::Root(const Windows::UI::Composition::Visual & value) const { - check_hresult(static_cast(static_cast(*this))->put_Root(get(value))); + check_hresult(WINRT_SHIM(ICompositionTarget)->put_Root(get_abi(value))); } template Windows::UI::Composition::ColorKeyFrameAnimation impl_ICompositor::CreateColorKeyFrameAnimation() const { Windows::UI::Composition::ColorKeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateColorKeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateColorKeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::CompositionColorBrush impl_ICompositor::CreateColorBrush() const { Windows::UI::Composition::CompositionColorBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateColorBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateColorBrush(put_abi(result))); return result; } template Windows::UI::Composition::CompositionColorBrush impl_ICompositor::CreateColorBrush(const Windows::UI::Color & color) const { Windows::UI::Composition::CompositionColorBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateColorBrushWithColor(get(color), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateColorBrushWithColor(get_abi(color), put_abi(result))); return result; } template Windows::UI::Composition::ContainerVisual impl_ICompositor::CreateContainerVisual() const { Windows::UI::Composition::ContainerVisual result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateContainerVisual(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateContainerVisual(put_abi(result))); return result; } template Windows::UI::Composition::CubicBezierEasingFunction impl_ICompositor::CreateCubicBezierEasingFunction(const Windows::Foundation::Numerics::float2 & controlPoint1, const Windows::Foundation::Numerics::float2 & controlPoint2) const { Windows::UI::Composition::CubicBezierEasingFunction result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCubicBezierEasingFunction(get(controlPoint1), get(controlPoint2), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateCubicBezierEasingFunction(get_abi(controlPoint1), get_abi(controlPoint2), put_abi(result))); return result; } template Windows::UI::Composition::CompositionEffectFactory impl_ICompositor::CreateEffectFactory(const Windows::Graphics::Effects::IGraphicsEffect & graphicsEffect) const { Windows::UI::Composition::CompositionEffectFactory result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateEffectFactory(get(graphicsEffect), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateEffectFactory(get_abi(graphicsEffect), put_abi(result))); return result; } -template Windows::UI::Composition::CompositionEffectFactory impl_ICompositor::CreateEffectFactory(const Windows::Graphics::Effects::IGraphicsEffect & graphicsEffect, const Windows::Foundation::Collections::IIterable & animatableProperties) const +template Windows::UI::Composition::CompositionEffectFactory impl_ICompositor::CreateEffectFactory(const Windows::Graphics::Effects::IGraphicsEffect & graphicsEffect, iterable animatableProperties) const { Windows::UI::Composition::CompositionEffectFactory result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateEffectFactoryWithProperties(get(graphicsEffect), get(animatableProperties), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateEffectFactoryWithProperties(get_abi(graphicsEffect), get_abi(animatableProperties), put_abi(result))); return result; } template Windows::UI::Composition::ExpressionAnimation impl_ICompositor::CreateExpressionAnimation() const { Windows::UI::Composition::ExpressionAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateExpressionAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateExpressionAnimation(put_abi(result))); return result; } -template Windows::UI::Composition::ExpressionAnimation impl_ICompositor::CreateExpressionAnimation(hstring_ref expression) const +template Windows::UI::Composition::ExpressionAnimation impl_ICompositor::CreateExpressionAnimation(hstring_view expression) const { Windows::UI::Composition::ExpressionAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateExpressionAnimationWithExpression(get(expression), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateExpressionAnimationWithExpression(get_abi(expression), put_abi(result))); return result; } template Windows::UI::Composition::InsetClip impl_ICompositor::CreateInsetClip() const { Windows::UI::Composition::InsetClip result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInsetClip(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateInsetClip(put_abi(result))); return result; } template Windows::UI::Composition::InsetClip impl_ICompositor::CreateInsetClip(float leftInset, float topInset, float rightInset, float bottomInset) const { Windows::UI::Composition::InsetClip result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInsetClipWithInsets(leftInset, topInset, rightInset, bottomInset, put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateInsetClipWithInsets(leftInset, topInset, rightInset, bottomInset, put_abi(result))); return result; } template Windows::UI::Composition::LinearEasingFunction impl_ICompositor::CreateLinearEasingFunction() const { Windows::UI::Composition::LinearEasingFunction result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLinearEasingFunction(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateLinearEasingFunction(put_abi(result))); return result; } template Windows::UI::Composition::CompositionPropertySet impl_ICompositor::CreatePropertySet() const { Windows::UI::Composition::CompositionPropertySet result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePropertySet(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreatePropertySet(put_abi(result))); return result; } template Windows::UI::Composition::QuaternionKeyFrameAnimation impl_ICompositor::CreateQuaternionKeyFrameAnimation() const { Windows::UI::Composition::QuaternionKeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateQuaternionKeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateQuaternionKeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::ScalarKeyFrameAnimation impl_ICompositor::CreateScalarKeyFrameAnimation() const { Windows::UI::Composition::ScalarKeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateScalarKeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateScalarKeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::CompositionScopedBatch impl_ICompositor::CreateScopedBatch(Windows::UI::Composition::CompositionBatchTypes batchType) const { Windows::UI::Composition::CompositionScopedBatch result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateScopedBatch(batchType, put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateScopedBatch(batchType, put_abi(result))); return result; } template Windows::UI::Composition::SpriteVisual impl_ICompositor::CreateSpriteVisual() const { Windows::UI::Composition::SpriteVisual result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSpriteVisual(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateSpriteVisual(put_abi(result))); return result; } template Windows::UI::Composition::CompositionSurfaceBrush impl_ICompositor::CreateSurfaceBrush() const { Windows::UI::Composition::CompositionSurfaceBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSurfaceBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateSurfaceBrush(put_abi(result))); return result; } template Windows::UI::Composition::CompositionSurfaceBrush impl_ICompositor::CreateSurfaceBrush(const Windows::UI::Composition::ICompositionSurface & surface) const { Windows::UI::Composition::CompositionSurfaceBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSurfaceBrushWithSurface(get(surface), put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateSurfaceBrushWithSurface(get_abi(surface), put_abi(result))); return result; } template Windows::UI::Composition::CompositionTarget impl_ICompositor::CreateTargetForCurrentView() const { Windows::UI::Composition::CompositionTarget result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTargetForCurrentView(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateTargetForCurrentView(put_abi(result))); return result; } template Windows::UI::Composition::Vector2KeyFrameAnimation impl_ICompositor::CreateVector2KeyFrameAnimation() const { Windows::UI::Composition::Vector2KeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVector2KeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateVector2KeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::Vector3KeyFrameAnimation impl_ICompositor::CreateVector3KeyFrameAnimation() const { Windows::UI::Composition::Vector3KeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVector3KeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateVector3KeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::Vector4KeyFrameAnimation impl_ICompositor::CreateVector4KeyFrameAnimation() const { Windows::UI::Composition::Vector4KeyFrameAnimation result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateVector4KeyFrameAnimation(put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_CreateVector4KeyFrameAnimation(put_abi(result))); return result; } template Windows::UI::Composition::CompositionCommitBatch impl_ICompositor::GetCommitBatch(Windows::UI::Composition::CompositionBatchTypes batchType) const { Windows::UI::Composition::CompositionCommitBatch result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCommitBatch(batchType, put(result))); + check_hresult(WINRT_SHIM(ICompositor)->abi_GetCommitBatch(batchType, put_abi(result))); return result; } template Windows::UI::Composition::AmbientLight impl_ICompositor2::CreateAmbientLight() const { Windows::UI::Composition::AmbientLight result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAmbientLight(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateAmbientLight(put_abi(result))); return result; } template Windows::UI::Composition::CompositionAnimationGroup impl_ICompositor2::CreateAnimationGroup() const { Windows::UI::Composition::CompositionAnimationGroup result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateAnimationGroup(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateAnimationGroup(put_abi(result))); return result; } template Windows::UI::Composition::CompositionBackdropBrush impl_ICompositor2::CreateBackdropBrush() const { Windows::UI::Composition::CompositionBackdropBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBackdropBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateBackdropBrush(put_abi(result))); return result; } template Windows::UI::Composition::DistantLight impl_ICompositor2::CreateDistantLight() const { Windows::UI::Composition::DistantLight result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDistantLight(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateDistantLight(put_abi(result))); return result; } template Windows::UI::Composition::DropShadow impl_ICompositor2::CreateDropShadow() const { Windows::UI::Composition::DropShadow result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateDropShadow(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateDropShadow(put_abi(result))); return result; } template Windows::UI::Composition::ImplicitAnimationCollection impl_ICompositor2::CreateImplicitAnimationCollection() const { Windows::UI::Composition::ImplicitAnimationCollection result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateImplicitAnimationCollection(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateImplicitAnimationCollection(put_abi(result))); return result; } template Windows::UI::Composition::LayerVisual impl_ICompositor2::CreateLayerVisual() const { Windows::UI::Composition::LayerVisual result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateLayerVisual(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateLayerVisual(put_abi(result))); return result; } template Windows::UI::Composition::CompositionMaskBrush impl_ICompositor2::CreateMaskBrush() const { Windows::UI::Composition::CompositionMaskBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMaskBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateMaskBrush(put_abi(result))); return result; } template Windows::UI::Composition::CompositionNineGridBrush impl_ICompositor2::CreateNineGridBrush() const { Windows::UI::Composition::CompositionNineGridBrush result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateNineGridBrush(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateNineGridBrush(put_abi(result))); return result; } template Windows::UI::Composition::PointLight impl_ICompositor2::CreatePointLight() const { Windows::UI::Composition::PointLight result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePointLight(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreatePointLight(put_abi(result))); return result; } template Windows::UI::Composition::SpotLight impl_ICompositor2::CreateSpotLight() const { Windows::UI::Composition::SpotLight result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSpotLight(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateSpotLight(put_abi(result))); return result; } template Windows::UI::Composition::StepEasingFunction impl_ICompositor2::CreateStepEasingFunction() const { Windows::UI::Composition::StepEasingFunction result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStepEasingFunction(put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateStepEasingFunction(put_abi(result))); return result; } template Windows::UI::Composition::StepEasingFunction impl_ICompositor2::CreateStepEasingFunction(int32_t stepCount) const { Windows::UI::Composition::StepEasingFunction result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStepEasingFunctionWithStepCount(stepCount, put(result))); + check_hresult(WINRT_SHIM(ICompositor2)->abi_CreateStepEasingFunctionWithStepCount(stepCount, put_abi(result))); return result; } template Windows::UI::Composition::VisualCollection impl_IContainerVisual::Children() const { Windows::UI::Composition::VisualCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Children(put(value))); + check_hresult(WINRT_SHIM(IContainerVisual)->get_Children(put_abi(value))); return value; } template Windows::Foundation::Numerics::float2 impl_ICubicBezierEasingFunction::ControlPoint1() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlPoint1(put(value))); + check_hresult(WINRT_SHIM(ICubicBezierEasingFunction)->get_ControlPoint1(put_abi(value))); return value; } template Windows::Foundation::Numerics::float2 impl_ICubicBezierEasingFunction::ControlPoint2() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlPoint2(put(value))); + check_hresult(WINRT_SHIM(ICubicBezierEasingFunction)->get_ControlPoint2(put_abi(value))); return value; } template Windows::UI::Color impl_IDistantLight::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IDistantLight)->get_Color(put_abi(value))); return value; } template void impl_IDistantLight::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IDistantLight)->put_Color(get_abi(value))); } template Windows::UI::Composition::Visual impl_IDistantLight::CoordinateSpace() const { Windows::UI::Composition::Visual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSpace(put(value))); + check_hresult(WINRT_SHIM(IDistantLight)->get_CoordinateSpace(put_abi(value))); return value; } template void impl_IDistantLight::CoordinateSpace(const Windows::UI::Composition::Visual & value) const { - check_hresult(static_cast(static_cast(*this))->put_CoordinateSpace(get(value))); + check_hresult(WINRT_SHIM(IDistantLight)->put_CoordinateSpace(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_IDistantLight::Direction() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(put(value))); + check_hresult(WINRT_SHIM(IDistantLight)->get_Direction(put_abi(value))); return value; } template void impl_IDistantLight::Direction(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Direction(get(value))); + check_hresult(WINRT_SHIM(IDistantLight)->put_Direction(get_abi(value))); } template float impl_IDropShadow::BlurRadius() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BlurRadius(&value)); + check_hresult(WINRT_SHIM(IDropShadow)->get_BlurRadius(&value)); return value; } template void impl_IDropShadow::BlurRadius(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BlurRadius(value)); + check_hresult(WINRT_SHIM(IDropShadow)->put_BlurRadius(value)); } template Windows::UI::Color impl_IDropShadow::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IDropShadow)->get_Color(put_abi(value))); return value; } template void impl_IDropShadow::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IDropShadow)->put_Color(get_abi(value))); } template Windows::UI::Composition::CompositionBrush impl_IDropShadow::Mask() const { Windows::UI::Composition::CompositionBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Mask(put(value))); + check_hresult(WINRT_SHIM(IDropShadow)->get_Mask(put_abi(value))); return value; } template void impl_IDropShadow::Mask(const Windows::UI::Composition::CompositionBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Mask(get(value))); + check_hresult(WINRT_SHIM(IDropShadow)->put_Mask(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_IDropShadow::Offset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(IDropShadow)->get_Offset(put_abi(value))); return value; } template void impl_IDropShadow::Offset(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(IDropShadow)->put_Offset(get_abi(value))); } template float impl_IDropShadow::Opacity() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Opacity(&value)); + check_hresult(WINRT_SHIM(IDropShadow)->get_Opacity(&value)); return value; } template void impl_IDropShadow::Opacity(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Opacity(value)); + check_hresult(WINRT_SHIM(IDropShadow)->put_Opacity(value)); } template hstring impl_IExpressionAnimation::Expression() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Expression(put(value))); + check_hresult(WINRT_SHIM(IExpressionAnimation)->get_Expression(put_abi(value))); return value; } -template void impl_IExpressionAnimation::Expression(hstring_ref value) const +template void impl_IExpressionAnimation::Expression(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Expression(get(value))); + check_hresult(WINRT_SHIM(IExpressionAnimation)->put_Expression(get_abi(value))); } template float impl_IInsetClip::BottomInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BottomInset(&value)); + check_hresult(WINRT_SHIM(IInsetClip)->get_BottomInset(&value)); return value; } template void impl_IInsetClip::BottomInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BottomInset(value)); + check_hresult(WINRT_SHIM(IInsetClip)->put_BottomInset(value)); } template float impl_IInsetClip::LeftInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LeftInset(&value)); + check_hresult(WINRT_SHIM(IInsetClip)->get_LeftInset(&value)); return value; } template void impl_IInsetClip::LeftInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LeftInset(value)); + check_hresult(WINRT_SHIM(IInsetClip)->put_LeftInset(value)); } template float impl_IInsetClip::RightInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RightInset(&value)); + check_hresult(WINRT_SHIM(IInsetClip)->get_RightInset(&value)); return value; } template void impl_IInsetClip::RightInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RightInset(value)); + check_hresult(WINRT_SHIM(IInsetClip)->put_RightInset(value)); } template float impl_IInsetClip::TopInset() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TopInset(&value)); + check_hresult(WINRT_SHIM(IInsetClip)->get_TopInset(&value)); return value; } template void impl_IInsetClip::TopInset(float value) const { - check_hresult(static_cast(static_cast(*this))->put_TopInset(value)); + check_hresult(WINRT_SHIM(IInsetClip)->put_TopInset(value)); } template Windows::Foundation::TimeSpan impl_IKeyFrameAnimation::DelayTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DelayTime(put(value))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_DelayTime(put_abi(value))); return value; } template void impl_IKeyFrameAnimation::DelayTime(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_DelayTime(get(value))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->put_DelayTime(get_abi(value))); } template Windows::Foundation::TimeSpan impl_IKeyFrameAnimation::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_Duration(put_abi(value))); return value; } template void impl_IKeyFrameAnimation::Duration(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Duration(get(value))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->put_Duration(get_abi(value))); } template Windows::UI::Composition::AnimationIterationBehavior impl_IKeyFrameAnimation::IterationBehavior() const { Windows::UI::Composition::AnimationIterationBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_IterationBehavior(&value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_IterationBehavior(&value)); return value; } template void impl_IKeyFrameAnimation::IterationBehavior(Windows::UI::Composition::AnimationIterationBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_IterationBehavior(value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->put_IterationBehavior(value)); } template int32_t impl_IKeyFrameAnimation::IterationCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IterationCount(&value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_IterationCount(&value)); return value; } template void impl_IKeyFrameAnimation::IterationCount(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IterationCount(value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->put_IterationCount(value)); } template int32_t impl_IKeyFrameAnimation::KeyFrameCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyFrameCount(&value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_KeyFrameCount(&value)); return value; } template Windows::UI::Composition::AnimationStopBehavior impl_IKeyFrameAnimation::StopBehavior() const { Windows::UI::Composition::AnimationStopBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_StopBehavior(&value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->get_StopBehavior(&value)); return value; } template void impl_IKeyFrameAnimation::StopBehavior(Windows::UI::Composition::AnimationStopBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_StopBehavior(value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->put_StopBehavior(value)); } -template void impl_IKeyFrameAnimation::InsertExpressionKeyFrame(float normalizedProgressKey, hstring_ref value) const +template void impl_IKeyFrameAnimation::InsertExpressionKeyFrame(float normalizedProgressKey, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertExpressionKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->abi_InsertExpressionKeyFrame(normalizedProgressKey, get_abi(value))); } -template void impl_IKeyFrameAnimation::InsertExpressionKeyFrame(float normalizedProgressKey, hstring_ref value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const +template void impl_IKeyFrameAnimation::InsertExpressionKeyFrame(float normalizedProgressKey, hstring_view value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertExpressionKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IKeyFrameAnimation)->abi_InsertExpressionKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template Windows::UI::Composition::AnimationDirection impl_IKeyFrameAnimation2::Direction() const { Windows::UI::Composition::AnimationDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(&value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation2)->get_Direction(&value)); return value; } template void impl_IKeyFrameAnimation2::Direction(Windows::UI::Composition::AnimationDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_Direction(value)); + check_hresult(WINRT_SHIM(IKeyFrameAnimation2)->put_Direction(value)); } template Windows::UI::Composition::CompositionEffectBrush impl_ILayerVisual::Effect() const { Windows::UI::Composition::CompositionEffectBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Effect(put(value))); + check_hresult(WINRT_SHIM(ILayerVisual)->get_Effect(put_abi(value))); return value; } template void impl_ILayerVisual::Effect(const Windows::UI::Composition::CompositionEffectBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Effect(get(value))); + check_hresult(WINRT_SHIM(ILayerVisual)->put_Effect(get_abi(value))); } template Windows::UI::Color impl_IPointLight::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IPointLight)->get_Color(put_abi(value))); return value; } template void impl_IPointLight::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IPointLight)->put_Color(get_abi(value))); } template float impl_IPointLight::ConstantAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ConstantAttenuation(&value)); + check_hresult(WINRT_SHIM(IPointLight)->get_ConstantAttenuation(&value)); return value; } template void impl_IPointLight::ConstantAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_ConstantAttenuation(value)); + check_hresult(WINRT_SHIM(IPointLight)->put_ConstantAttenuation(value)); } template Windows::UI::Composition::Visual impl_IPointLight::CoordinateSpace() const { Windows::UI::Composition::Visual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSpace(put(value))); + check_hresult(WINRT_SHIM(IPointLight)->get_CoordinateSpace(put_abi(value))); return value; } template void impl_IPointLight::CoordinateSpace(const Windows::UI::Composition::Visual & value) const { - check_hresult(static_cast(static_cast(*this))->put_CoordinateSpace(get(value))); + check_hresult(WINRT_SHIM(IPointLight)->put_CoordinateSpace(get_abi(value))); } template float impl_IPointLight::LinearAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LinearAttenuation(&value)); + check_hresult(WINRT_SHIM(IPointLight)->get_LinearAttenuation(&value)); return value; } template void impl_IPointLight::LinearAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LinearAttenuation(value)); + check_hresult(WINRT_SHIM(IPointLight)->put_LinearAttenuation(value)); } template Windows::Foundation::Numerics::float3 impl_IPointLight::Offset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(IPointLight)->get_Offset(put_abi(value))); return value; } template void impl_IPointLight::Offset(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(IPointLight)->put_Offset(get_abi(value))); } template float impl_IPointLight::QuadraticAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_QuadraticAttenuation(&value)); + check_hresult(WINRT_SHIM(IPointLight)->get_QuadraticAttenuation(&value)); return value; } template void impl_IPointLight::QuadraticAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_QuadraticAttenuation(value)); + check_hresult(WINRT_SHIM(IPointLight)->put_QuadraticAttenuation(value)); } template void impl_IQuaternionKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IQuaternionKeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, get_abi(value))); } template void impl_IQuaternionKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::quaternion & value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IQuaternionKeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template Windows::UI::Composition::CompositionGraphicsDevice impl_IRenderingDeviceReplacedEventArgs::GraphicsDevice() const { Windows::UI::Composition::CompositionGraphicsDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GraphicsDevice(put(value))); + check_hresult(WINRT_SHIM(IRenderingDeviceReplacedEventArgs)->get_GraphicsDevice(put_abi(value))); return value; } template void impl_IScalarKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, float value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, value)); + check_hresult(WINRT_SHIM(IScalarKeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, value)); } template void impl_IScalarKeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, float value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, value, get(easingFunction))); + check_hresult(WINRT_SHIM(IScalarKeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, value, get_abi(easingFunction))); } template float impl_ISpotLight::ConstantAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ConstantAttenuation(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_ConstantAttenuation(&value)); return value; } template void impl_ISpotLight::ConstantAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_ConstantAttenuation(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_ConstantAttenuation(value)); } template Windows::UI::Composition::Visual impl_ISpotLight::CoordinateSpace() const { Windows::UI::Composition::Visual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CoordinateSpace(put(value))); + check_hresult(WINRT_SHIM(ISpotLight)->get_CoordinateSpace(put_abi(value))); return value; } template void impl_ISpotLight::CoordinateSpace(const Windows::UI::Composition::Visual & value) const { - check_hresult(static_cast(static_cast(*this))->put_CoordinateSpace(get(value))); + check_hresult(WINRT_SHIM(ISpotLight)->put_CoordinateSpace(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_ISpotLight::Direction() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Direction(put(value))); + check_hresult(WINRT_SHIM(ISpotLight)->get_Direction(put_abi(value))); return value; } template void impl_ISpotLight::Direction(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Direction(get(value))); + check_hresult(WINRT_SHIM(ISpotLight)->put_Direction(get_abi(value))); } template float impl_ISpotLight::InnerConeAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InnerConeAngle(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_InnerConeAngle(&value)); return value; } template void impl_ISpotLight::InnerConeAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InnerConeAngle(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_InnerConeAngle(value)); } template float impl_ISpotLight::InnerConeAngleInDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InnerConeAngleInDegrees(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_InnerConeAngleInDegrees(&value)); return value; } template void impl_ISpotLight::InnerConeAngleInDegrees(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InnerConeAngleInDegrees(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_InnerConeAngleInDegrees(value)); } template Windows::UI::Color impl_ISpotLight::InnerConeColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_InnerConeColor(put(value))); + check_hresult(WINRT_SHIM(ISpotLight)->get_InnerConeColor(put_abi(value))); return value; } template void impl_ISpotLight::InnerConeColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_InnerConeColor(get(value))); + check_hresult(WINRT_SHIM(ISpotLight)->put_InnerConeColor(get_abi(value))); } template float impl_ISpotLight::LinearAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LinearAttenuation(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_LinearAttenuation(&value)); return value; } template void impl_ISpotLight::LinearAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LinearAttenuation(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_LinearAttenuation(value)); } template Windows::Foundation::Numerics::float3 impl_ISpotLight::Offset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(ISpotLight)->get_Offset(put_abi(value))); return value; } template void impl_ISpotLight::Offset(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(ISpotLight)->put_Offset(get_abi(value))); } template float impl_ISpotLight::OuterConeAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_OuterConeAngle(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_OuterConeAngle(&value)); return value; } template void impl_ISpotLight::OuterConeAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_OuterConeAngle(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_OuterConeAngle(value)); } template float impl_ISpotLight::OuterConeAngleInDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_OuterConeAngleInDegrees(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_OuterConeAngleInDegrees(&value)); return value; } template void impl_ISpotLight::OuterConeAngleInDegrees(float value) const { - check_hresult(static_cast(static_cast(*this))->put_OuterConeAngleInDegrees(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_OuterConeAngleInDegrees(value)); } template Windows::UI::Color impl_ISpotLight::OuterConeColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_OuterConeColor(put(value))); + check_hresult(WINRT_SHIM(ISpotLight)->get_OuterConeColor(put_abi(value))); return value; } template void impl_ISpotLight::OuterConeColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_OuterConeColor(get(value))); + check_hresult(WINRT_SHIM(ISpotLight)->put_OuterConeColor(get_abi(value))); } template float impl_ISpotLight::QuadraticAttenuation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_QuadraticAttenuation(&value)); + check_hresult(WINRT_SHIM(ISpotLight)->get_QuadraticAttenuation(&value)); return value; } template void impl_ISpotLight::QuadraticAttenuation(float value) const { - check_hresult(static_cast(static_cast(*this))->put_QuadraticAttenuation(value)); + check_hresult(WINRT_SHIM(ISpotLight)->put_QuadraticAttenuation(value)); } template Windows::UI::Composition::CompositionBrush impl_ISpriteVisual::Brush() const { Windows::UI::Composition::CompositionBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Brush(put(value))); + check_hresult(WINRT_SHIM(ISpriteVisual)->get_Brush(put_abi(value))); return value; } template void impl_ISpriteVisual::Brush(const Windows::UI::Composition::CompositionBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Brush(get(value))); + check_hresult(WINRT_SHIM(ISpriteVisual)->put_Brush(get_abi(value))); } template Windows::UI::Composition::CompositionShadow impl_ISpriteVisual2::Shadow() const { Windows::UI::Composition::CompositionShadow value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Shadow(put(value))); + check_hresult(WINRT_SHIM(ISpriteVisual2)->get_Shadow(put_abi(value))); return value; } template void impl_ISpriteVisual2::Shadow(const Windows::UI::Composition::CompositionShadow & value) const { - check_hresult(static_cast(static_cast(*this))->put_Shadow(get(value))); + check_hresult(WINRT_SHIM(ISpriteVisual2)->put_Shadow(get_abi(value))); } template int32_t impl_IStepEasingFunction::FinalStep() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FinalStep(&value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->get_FinalStep(&value)); return value; } template void impl_IStepEasingFunction::FinalStep(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_FinalStep(value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->put_FinalStep(value)); } template int32_t impl_IStepEasingFunction::InitialStep() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_InitialStep(&value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->get_InitialStep(&value)); return value; } template void impl_IStepEasingFunction::InitialStep(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_InitialStep(value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->put_InitialStep(value)); } template bool impl_IStepEasingFunction::IsFinalStepSingleFrame() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFinalStepSingleFrame(&value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->get_IsFinalStepSingleFrame(&value)); return value; } template void impl_IStepEasingFunction::IsFinalStepSingleFrame(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFinalStepSingleFrame(value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->put_IsFinalStepSingleFrame(value)); } template bool impl_IStepEasingFunction::IsInitialStepSingleFrame() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInitialStepSingleFrame(&value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->get_IsInitialStepSingleFrame(&value)); return value; } template void impl_IStepEasingFunction::IsInitialStepSingleFrame(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInitialStepSingleFrame(value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->put_IsInitialStepSingleFrame(value)); } template int32_t impl_IStepEasingFunction::StepCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StepCount(&value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->get_StepCount(&value)); return value; } template void impl_IStepEasingFunction::StepCount(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_StepCount(value)); + check_hresult(WINRT_SHIM(IStepEasingFunction)->put_StepCount(value)); } template void impl_IVector2KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IVector2KeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, get_abi(value))); } template void impl_IVector2KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float2 & value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IVector2KeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template void impl_IVector3KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IVector3KeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, get_abi(value))); } template void impl_IVector3KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float3 & value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IVector3KeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template void impl_IVector4KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float4 & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrame(normalizedProgressKey, get(value))); + check_hresult(WINRT_SHIM(IVector4KeyFrameAnimation)->abi_InsertKeyFrame(normalizedProgressKey, get_abi(value))); } template void impl_IVector4KeyFrameAnimation::InsertKeyFrame(float normalizedProgressKey, const Windows::Foundation::Numerics::float4 & value, const Windows::UI::Composition::CompositionEasingFunction & easingFunction) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get(value), get(easingFunction))); + check_hresult(WINRT_SHIM(IVector4KeyFrameAnimation)->abi_InsertKeyFrameWithEasingFunction(normalizedProgressKey, get_abi(value), get_abi(easingFunction))); } template Windows::Foundation::Numerics::float2 impl_IVisual::AnchorPoint() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_AnchorPoint(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_AnchorPoint(put_abi(value))); return value; } template void impl_IVisual::AnchorPoint(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_AnchorPoint(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_AnchorPoint(get_abi(value))); } template Windows::UI::Composition::CompositionBackfaceVisibility impl_IVisual::BackfaceVisibility() const { Windows::UI::Composition::CompositionBackfaceVisibility value {}; - check_hresult(static_cast(static_cast(*this))->get_BackfaceVisibility(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_BackfaceVisibility(&value)); return value; } template void impl_IVisual::BackfaceVisibility(Windows::UI::Composition::CompositionBackfaceVisibility value) const { - check_hresult(static_cast(static_cast(*this))->put_BackfaceVisibility(value)); + check_hresult(WINRT_SHIM(IVisual)->put_BackfaceVisibility(value)); } template Windows::UI::Composition::CompositionBorderMode impl_IVisual::BorderMode() const { Windows::UI::Composition::CompositionBorderMode value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderMode(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_BorderMode(&value)); return value; } template void impl_IVisual::BorderMode(Windows::UI::Composition::CompositionBorderMode value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderMode(value)); + check_hresult(WINRT_SHIM(IVisual)->put_BorderMode(value)); } template Windows::Foundation::Numerics::float3 impl_IVisual::CenterPoint() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_CenterPoint(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_CenterPoint(put_abi(value))); return value; } template void impl_IVisual::CenterPoint(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_CenterPoint(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_CenterPoint(get_abi(value))); } template Windows::UI::Composition::CompositionClip impl_IVisual::Clip() const { Windows::UI::Composition::CompositionClip value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Clip(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Clip(put_abi(value))); return value; } template void impl_IVisual::Clip(const Windows::UI::Composition::CompositionClip & value) const { - check_hresult(static_cast(static_cast(*this))->put_Clip(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_Clip(get_abi(value))); } template Windows::UI::Composition::CompositionCompositeMode impl_IVisual::CompositeMode() const { Windows::UI::Composition::CompositionCompositeMode value {}; - check_hresult(static_cast(static_cast(*this))->get_CompositeMode(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_CompositeMode(&value)); return value; } template void impl_IVisual::CompositeMode(Windows::UI::Composition::CompositionCompositeMode value) const { - check_hresult(static_cast(static_cast(*this))->put_CompositeMode(value)); + check_hresult(WINRT_SHIM(IVisual)->put_CompositeMode(value)); } template bool impl_IVisual::IsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVisible(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_IsVisible(&value)); return value; } template void impl_IVisual::IsVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsVisible(value)); + check_hresult(WINRT_SHIM(IVisual)->put_IsVisible(value)); } template Windows::Foundation::Numerics::float3 impl_IVisual::Offset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Offset(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Offset(put_abi(value))); return value; } template void impl_IVisual::Offset(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Offset(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_Offset(get_abi(value))); } template float impl_IVisual::Opacity() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Opacity(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_Opacity(&value)); return value; } template void impl_IVisual::Opacity(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Opacity(value)); + check_hresult(WINRT_SHIM(IVisual)->put_Opacity(value)); } template Windows::Foundation::Numerics::quaternion impl_IVisual::Orientation() const { Windows::Foundation::Numerics::quaternion value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Orientation(put_abi(value))); return value; } template void impl_IVisual::Orientation(const Windows::Foundation::Numerics::quaternion & value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_Orientation(get_abi(value))); } template Windows::UI::Composition::ContainerVisual impl_IVisual::Parent() const { Windows::UI::Composition::ContainerVisual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Parent(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Parent(put_abi(value))); return value; } template float impl_IVisual::RotationAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngle(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_RotationAngle(&value)); return value; } template void impl_IVisual::RotationAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngle(value)); + check_hresult(WINRT_SHIM(IVisual)->put_RotationAngle(value)); } template float impl_IVisual::RotationAngleInDegrees() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAngleInDegrees(&value)); + check_hresult(WINRT_SHIM(IVisual)->get_RotationAngleInDegrees(&value)); return value; } template void impl_IVisual::RotationAngleInDegrees(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAngleInDegrees(value)); + check_hresult(WINRT_SHIM(IVisual)->put_RotationAngleInDegrees(value)); } template Windows::Foundation::Numerics::float3 impl_IVisual::RotationAxis() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationAxis(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_RotationAxis(put_abi(value))); return value; } template void impl_IVisual::RotationAxis(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationAxis(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_RotationAxis(get_abi(value))); } template Windows::Foundation::Numerics::float3 impl_IVisual::Scale() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Scale(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Scale(put_abi(value))); return value; } template void impl_IVisual::Scale(const Windows::Foundation::Numerics::float3 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Scale(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_Scale(get_abi(value))); } template Windows::Foundation::Numerics::float2 impl_IVisual::Size() const { Windows::Foundation::Numerics::float2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_Size(put_abi(value))); return value; } template void impl_IVisual::Size(const Windows::Foundation::Numerics::float2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Size(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_Size(get_abi(value))); } template Windows::Foundation::Numerics::float4x4 impl_IVisual::TransformMatrix() const { Windows::Foundation::Numerics::float4x4 value {}; - check_hresult(static_cast(static_cast(*this))->get_TransformMatrix(put(value))); + check_hresult(WINRT_SHIM(IVisual)->get_TransformMatrix(put_abi(value))); return value; } template void impl_IVisual::TransformMatrix(const Windows::Foundation::Numerics::float4x4 & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransformMatrix(get(value))); + check_hresult(WINRT_SHIM(IVisual)->put_TransformMatrix(get_abi(value))); } template int32_t impl_IVisualCollection::Count() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Count(&value)); + check_hresult(WINRT_SHIM(IVisualCollection)->get_Count(&value)); return value; } template void impl_IVisualCollection::InsertAbove(const Windows::UI::Composition::Visual & newChild, const Windows::UI::Composition::Visual & sibling) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertAbove(get(newChild), get(sibling))); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_InsertAbove(get_abi(newChild), get_abi(sibling))); } template void impl_IVisualCollection::InsertAtBottom(const Windows::UI::Composition::Visual & newChild) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertAtBottom(get(newChild))); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_InsertAtBottom(get_abi(newChild))); } template void impl_IVisualCollection::InsertAtTop(const Windows::UI::Composition::Visual & newChild) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertAtTop(get(newChild))); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_InsertAtTop(get_abi(newChild))); } template void impl_IVisualCollection::InsertBelow(const Windows::UI::Composition::Visual & newChild, const Windows::UI::Composition::Visual & sibling) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertBelow(get(newChild), get(sibling))); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_InsertBelow(get_abi(newChild), get_abi(sibling))); } template void impl_IVisualCollection::Remove(const Windows::UI::Composition::Visual & child) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(child))); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_Remove(get_abi(child))); } template void impl_IVisualCollection::RemoveAll() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAll()); + check_hresult(WINRT_SHIM(IVisualCollection)->abi_RemoveAll()); } template int32_t impl_IVisualUnorderedCollection::Count() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Count(&value)); + check_hresult(WINRT_SHIM(IVisualUnorderedCollection)->get_Count(&value)); return value; } template void impl_IVisualUnorderedCollection::Add(const Windows::UI::Composition::Visual & newVisual) const { - check_hresult(static_cast(static_cast(*this))->abi_Add(get(newVisual))); + check_hresult(WINRT_SHIM(IVisualUnorderedCollection)->abi_Add(get_abi(newVisual))); } template void impl_IVisualUnorderedCollection::Remove(const Windows::UI::Composition::Visual & visual) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(visual))); + check_hresult(WINRT_SHIM(IVisualUnorderedCollection)->abi_Remove(get_abi(visual))); } template void impl_IVisualUnorderedCollection::RemoveAll() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAll()); + check_hresult(WINRT_SHIM(IVisualUnorderedCollection)->abi_RemoveAll()); } -inline CompositionEffectSourceParameter::CompositionEffectSourceParameter(hstring_ref name) : +inline CompositionEffectSourceParameter::CompositionEffectSourceParameter(hstring_view name) : CompositionEffectSourceParameter(get_activation_factory().Create(name)) {} @@ -6793,3 +7132,1076 @@ inline Compositor::Compositor() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IAmbientLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IColorKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionAnimation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionAnimationBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionAnimationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionAnimationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionBackdropBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionBatchCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionBrushFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionClip2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionClipFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionColorBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionCommitBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionDrawingSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEasingFunctionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEffectBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEffectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEffectSourceParameter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionEffectSourceParameterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionGraphicsDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionLightFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionMaskBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionNineGridBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionObject2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionObjectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionPropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionPropertySet2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionScopedBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionShadow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionShadowFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionSurfaceBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionSurfaceBrush2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositionTarget & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICompositor2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IContainerVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IContainerVisualFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ICubicBezierEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IDistantLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IDropShadow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IExpressionAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IImplicitAnimationCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IInsetClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IKeyFrameAnimation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IKeyFrameAnimationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ILayerVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ILinearEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IPointLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IQuaternionKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IRenderingDeviceReplacedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IScalarKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ISpotLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ISpriteVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ISpriteVisual2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IStepEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVector2KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVector3KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVector4KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVisualCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVisualFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::IVisualUnorderedCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::AmbientLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ColorKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionAnimationGroup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionBackdropBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionBatchCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionColorBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionCommitBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionDrawingSurface & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionEffectBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionEffectFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionEffectSourceParameter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionGraphicsDevice & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionMaskBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionNineGridBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionObject & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionPropertySet & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionScopedBatch & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionShadow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionSurfaceBrush & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CompositionTarget & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Compositor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ContainerVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::CubicBezierEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::DistantLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::DropShadow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ExpressionAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ImplicitAnimationCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::InsetClip & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::LayerVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::LinearEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::PointLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::QuaternionKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::RenderingDeviceReplacedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::ScalarKeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::SpotLight & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::SpriteVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::StepEasingFunction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Vector2KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Vector3KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Vector4KeyFrameAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::Visual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::VisualCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Composition::VisualUnorderedCollection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Core.AnimationMetrics.h b/10.0.14393.0/winrt/Windows.UI.Core.AnimationMetrics.h index d89439810..aa3f7569e 100644 --- a/10.0.14393.0/winrt/Windows.UI.Core.AnimationMetrics.h +++ b/10.0.14393.0/winrt/Windows.UI.Core.AnimationMetrics.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.Core.AnimationMetrics.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Animations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Animations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Animations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Animations()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce : } } - HRESULT __stdcall get_StaggerDelay(abi_arg_out value) noexcept override + HRESULT __stdcall get_StaggerDelay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StaggerDelay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StaggerDelay()); return S_OK; } catch (...) @@ -46,7 +51,8 @@ struct produce : { try { - *value = detach(this->shim().StaggerDelayFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StaggerDelayFactor()); return S_OK; } catch (...) @@ -55,11 +61,12 @@ struct produce : } } - HRESULT __stdcall get_DelayLimit(abi_arg_out value) noexcept override + HRESULT __stdcall get_DelayLimit(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DelayLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DelayLimit()); return S_OK; } catch (...) @@ -72,7 +79,8 @@ struct produce : { try { - *value = detach(this->shim().ZOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZOrder()); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::UI::Core::AnimationMetrics::AnimationEffect effect, Windows::UI::Core::AnimationMetrics::AnimationEffectTarget target, abi_arg_out animation) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::UI::Core::AnimationMetrics::AnimationEffect effect, Windows::UI::Core::AnimationMetrics::AnimationEffectTarget target, impl::abi_arg_out animation) noexcept override { try { - *animation = detach(this->shim().CreateInstance(effect, target)); + typename D::abi_guard guard(this->shim()); + *animation = detach_abi(this->shim().CreateInstance(effect, target)); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_InitialOpacity(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InitialOpacity(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InitialOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialOpacity()); return S_OK; } catch (...) @@ -121,7 +131,8 @@ struct produce : prod { try { - *value = detach(this->shim().FinalOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalOpacity()); return S_OK; } catch (...) @@ -138,7 +149,8 @@ struct produce : pro { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -147,11 +159,12 @@ struct produce : pro } } - HRESULT __stdcall get_Delay(abi_arg_out value) noexcept override + HRESULT __stdcall get_Delay(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -160,11 +173,12 @@ struct produce : pro } } - HRESULT __stdcall get_Duration(abi_arg_out value) noexcept override + HRESULT __stdcall get_Duration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Duration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Duration()); return S_OK; } catch (...) @@ -173,11 +187,12 @@ struct produce : pro } } - HRESULT __stdcall get_Control1(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control1()); return S_OK; } catch (...) @@ -186,11 +201,12 @@ struct produce : pro } } - HRESULT __stdcall get_Control2(abi_arg_out value) noexcept override + HRESULT __stdcall get_Control2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Control2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Control2()); return S_OK; } catch (...) @@ -203,11 +219,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_InitialScaleX(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InitialScaleX(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InitialScaleX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialScaleX()); return S_OK; } catch (...) @@ -217,11 +234,12 @@ struct produce : produc } } - HRESULT __stdcall get_InitialScaleY(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InitialScaleY(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InitialScaleY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialScaleY()); return S_OK; } catch (...) @@ -235,7 +253,8 @@ struct produce : produc { try { - *value = detach(this->shim().FinalScaleX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalScaleX()); return S_OK; } catch (...) @@ -248,7 +267,8 @@ struct produce : produc { try { - *value = detach(this->shim().FinalScaleY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalScaleY()); return S_OK; } catch (...) @@ -257,11 +277,12 @@ struct produce : produc } } - HRESULT __stdcall get_NormalizedOrigin(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalizedOrigin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedOrigin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedOrigin()); return S_OK; } catch (...) @@ -278,126 +299,126 @@ namespace Windows::UI::Core::AnimationMetrics { template Windows::UI::Core::AnimationMetrics::PropertyAnimationType impl_IPropertyAnimation::Type() const { Windows::UI::Core::AnimationMetrics::PropertyAnimationType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IPropertyAnimation)->get_Type(&value)); return value; } template Windows::Foundation::TimeSpan impl_IPropertyAnimation::Delay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(put(value))); + check_hresult(WINRT_SHIM(IPropertyAnimation)->get_Delay(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IPropertyAnimation::Duration() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Duration(put(value))); + check_hresult(WINRT_SHIM(IPropertyAnimation)->get_Duration(put_abi(value))); return value; } template Windows::Foundation::Point impl_IPropertyAnimation::Control1() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Control1(put(value))); + check_hresult(WINRT_SHIM(IPropertyAnimation)->get_Control1(put_abi(value))); return value; } template Windows::Foundation::Point impl_IPropertyAnimation::Control2() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Control2(put(value))); + check_hresult(WINRT_SHIM(IPropertyAnimation)->get_Control2(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IScaleAnimation::InitialScaleX() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InitialScaleX(put(value))); + check_hresult(WINRT_SHIM(IScaleAnimation)->get_InitialScaleX(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IScaleAnimation::InitialScaleY() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InitialScaleY(put(value))); + check_hresult(WINRT_SHIM(IScaleAnimation)->get_InitialScaleY(put_abi(value))); return value; } template float impl_IScaleAnimation::FinalScaleX() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_FinalScaleX(&value)); + check_hresult(WINRT_SHIM(IScaleAnimation)->get_FinalScaleX(&value)); return value; } template float impl_IScaleAnimation::FinalScaleY() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_FinalScaleY(&value)); + check_hresult(WINRT_SHIM(IScaleAnimation)->get_FinalScaleY(&value)); return value; } template Windows::Foundation::Point impl_IScaleAnimation::NormalizedOrigin() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizedOrigin(put(value))); + check_hresult(WINRT_SHIM(IScaleAnimation)->get_NormalizedOrigin(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IOpacityAnimation::InitialOpacity() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InitialOpacity(put(value))); + check_hresult(WINRT_SHIM(IOpacityAnimation)->get_InitialOpacity(put_abi(value))); return value; } template float impl_IOpacityAnimation::FinalOpacity() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_FinalOpacity(&value)); + check_hresult(WINRT_SHIM(IOpacityAnimation)->get_FinalOpacity(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IAnimationDescription::Animations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Animations(put(value))); + check_hresult(WINRT_SHIM(IAnimationDescription)->get_Animations(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IAnimationDescription::StaggerDelay() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_StaggerDelay(put(value))); + check_hresult(WINRT_SHIM(IAnimationDescription)->get_StaggerDelay(put_abi(value))); return value; } template float impl_IAnimationDescription::StaggerDelayFactor() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_StaggerDelayFactor(&value)); + check_hresult(WINRT_SHIM(IAnimationDescription)->get_StaggerDelayFactor(&value)); return value; } template Windows::Foundation::TimeSpan impl_IAnimationDescription::DelayLimit() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_DelayLimit(put(value))); + check_hresult(WINRT_SHIM(IAnimationDescription)->get_DelayLimit(put_abi(value))); return value; } template int32_t impl_IAnimationDescription::ZOrder() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZOrder(&value)); + check_hresult(WINRT_SHIM(IAnimationDescription)->get_ZOrder(&value)); return value; } template Windows::UI::Core::AnimationMetrics::AnimationDescription impl_IAnimationDescriptionFactory::CreateInstance(Windows::UI::Core::AnimationMetrics::AnimationEffect effect, Windows::UI::Core::AnimationMetrics::AnimationEffectTarget target) const { Windows::UI::Core::AnimationMetrics::AnimationDescription animation { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(effect, target, put(animation))); + check_hresult(WINRT_SHIM(IAnimationDescriptionFactory)->abi_CreateInstance(effect, target, put_abi(animation))); return animation; } @@ -408,3 +429,95 @@ inline AnimationDescription::AnimationDescription(Windows::UI::Core::AnimationMe } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::IAnimationDescriptionFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::IOpacityAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::IPropertyAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::IScaleAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::OpacityAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::ScaleAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AnimationMetrics::TranslationAnimation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Core.h b/10.0.14393.0/winrt/Windows.UI.Core.h index d9f176cc0..53db7f0e8 100644 --- a/10.0.14393.0/winrt/Windows.UI.Core.h +++ b/10.0.14393.0/winrt/Windows.UI.Core.h @@ -1,12 +1,15 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + +#include "internal/Windows.Foundation.3.h" #include "internal/Windows.System.3.h" #include "internal/Windows.UI.Input.3.h" #include "internal/Windows.Foundation.Collections.3.h" -#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Popups.3.h" #include "internal/Windows.UI.Core.3.h" #include "Windows.UI.h" @@ -29,7 +32,7 @@ template DispatchedHandler::DispatchedHandler(O * objec inline void DispatchedHandler::operator()() const { - check_hresult((*this)->abi_Invoke()); + check_hresult((*(abi **)this)->abi_Invoke()); } template IdleDispatchedHandler::IdleDispatchedHandler(L lambda) : @@ -46,7 +49,7 @@ template IdleDispatchedHandler::IdleDispatchedHandler(O inline void IdleDispatchedHandler::operator()(const Windows::UI::Core::IdleDispatchedHandlerArgs & e) const { - check_hresult((*this)->abi_Invoke(get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(e))); } } @@ -60,7 +63,8 @@ struct produce : produce_baseshim().EventType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EventType()); return S_OK; } catch (...) @@ -73,7 +77,8 @@ struct produce : produce_baseshim().VirtualKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VirtualKey()); return S_OK; } catch (...) @@ -82,11 +87,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_KeyStatus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStatus()); return S_OK; } catch (...) @@ -99,11 +105,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -117,11 +124,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AutomationProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutomationProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutomationProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomationProvider()); return S_OK; } catch (...) @@ -131,11 +139,12 @@ struct produce : pr } } - HRESULT __stdcall put_AutomationProvider(abi_arg_in value) noexcept override + HRESULT __stdcall put_AutomationProvider(impl::abi_arg_in value) noexcept override { try { - this->shim().AutomationProvider(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().AutomationProvider(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -152,7 +161,8 @@ struct produce : produce_baseshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -165,6 +175,7 @@ struct produce : produce_baseshim()); this->shim().Handled(value); return S_OK; } @@ -182,7 +193,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().KeyCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyCode()); return S_OK; } catch (...) @@ -191,11 +203,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_KeyStatus(abi_arg_out value) noexcept override + HRESULT __stdcall get_KeyStatus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStatus()); return S_OK; } catch (...) @@ -208,11 +221,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_PointerPosition(abi_arg_out value) noexcept override + HRESULT __stdcall get_PointerPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerPosition()); return S_OK; } catch (...) @@ -221,11 +235,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SearchBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchBounds()); return S_OK; } catch (...) @@ -234,11 +249,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClosestInteractiveBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClosestInteractiveBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClosestInteractiveBounds()); return S_OK; } catch (...) @@ -247,10 +263,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ClosestInteractiveBounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClosestInteractiveBounds(*reinterpret_cast(&value)); return S_OK; } @@ -264,11 +281,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_AcceleratorKeyActivated(abi_arg_in> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_AcceleratorKeyActivated(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().AcceleratorKeyActivated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().AcceleratorKeyActivated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -281,6 +299,7 @@ struct produce : produce_baseshim()); this->shim().AcceleratorKeyActivated(cookie); return S_OK; } @@ -294,11 +313,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_ClosestInteractiveBoundsRequested(abi_arg_in> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ClosestInteractiveBoundsRequested(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -311,6 +331,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ClosestInteractiveBoundsRequested(cookie); return S_OK; } @@ -328,7 +349,8 @@ struct produce : produce_baseshim().HasFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasFocus()); return S_OK; } catch (...) @@ -337,11 +359,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_GotFocus(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().GotFocus(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().GotFocus(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -354,6 +377,7 @@ struct produce : produce_baseshim()); this->shim().GotFocus(cookie); return S_OK; } @@ -363,11 +387,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_LostFocus(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().LostFocus(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().LostFocus(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -380,6 +405,7 @@ struct produce : produce_baseshim()); this->shim().LostFocus(cookie); return S_OK; } @@ -397,7 +423,8 @@ struct produce : produce_baseshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -410,7 +437,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -423,11 +451,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateCursor(Windows::UI::Core::CoreCursorType type, uint32_t id, abi_arg_out cursor) noexcept override + HRESULT __stdcall abi_CreateCursor(Windows::UI::Core::CoreCursorType type, uint32_t id, impl::abi_arg_out cursor) noexcept override { try { - *cursor = detach(this->shim().CreateCursor(type, id)); + typename D::abi_guard guard(this->shim()); + *cursor = detach_abi(this->shim().CreateCursor(type, id)); return S_OK; } catch (...) @@ -445,7 +474,8 @@ struct produce : produce_baseshim().HasThreadAccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasThreadAccess()); return S_OK; } catch (...) @@ -458,6 +488,7 @@ struct produce : produce_baseshim()); this->shim().ProcessEvents(options); return S_OK; } @@ -467,11 +498,12 @@ struct produce : produce_base agileCallback, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_RunAsync(Windows::UI::Core::CoreDispatcherPriority priority, impl::abi_arg_in agileCallback, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().RunAsync(priority, *reinterpret_cast(&agileCallback))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().RunAsync(priority, *reinterpret_cast(&agileCallback))); return S_OK; } catch (...) @@ -481,11 +513,12 @@ struct produce : produce_base agileCallback, abi_arg_out asyncAction) noexcept override + HRESULT __stdcall abi_RunIdleAsync(impl::abi_arg_in agileCallback, impl::abi_arg_out asyncAction) noexcept override { try { - *asyncAction = detach(this->shim().RunIdleAsync(*reinterpret_cast(&agileCallback))); + typename D::abi_guard guard(this->shim()); + *asyncAction = detach_abi(this->shim().RunIdleAsync(*reinterpret_cast(&agileCallback))); return S_OK; } catch (...) @@ -499,11 +532,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_TryRunAsync(Windows::UI::Core::CoreDispatcherPriority priority, abi_arg_in agileCallback, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryRunAsync(Windows::UI::Core::CoreDispatcherPriority priority, impl::abi_arg_in agileCallback, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryRunAsync(priority, *reinterpret_cast(&agileCallback))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryRunAsync(priority, *reinterpret_cast(&agileCallback))); return S_OK; } catch (...) @@ -513,11 +547,12 @@ struct produce : produce_base agileCallback, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_TryRunIdleAsync(impl::abi_arg_in agileCallback, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().TryRunIdleAsync(*reinterpret_cast(&agileCallback))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().TryRunIdleAsync(*reinterpret_cast(&agileCallback))); return S_OK; } catch (...) @@ -535,7 +570,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().CurrentPriority()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentPriority()); return S_OK; } catch (...) @@ -548,6 +584,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().CurrentPriority(value); return S_OK; } @@ -561,7 +598,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ShouldYield()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldYield()); return S_OK; } catch (...) @@ -574,7 +612,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ShouldYield(priority)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldYield(priority)); return S_OK; } catch (...) @@ -587,6 +626,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().StopProcessEvents(); return S_OK; } @@ -600,11 +640,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Dispatcher(abi_arg_out value) noexcept override + HRESULT __stdcall get_Dispatcher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dispatcher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dispatcher()); return S_OK; } catch (...) @@ -618,7 +659,8 @@ struct produce : produce_baseshim().IsInputEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInputEnabled()); return S_OK; } catch (...) @@ -631,6 +673,7 @@ struct produce : produce_baseshim()); this->shim().IsInputEnabled(value); return S_OK; } @@ -640,11 +683,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_InputEnabled(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().InputEnabled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().InputEnabled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -657,6 +701,7 @@ struct produce : produce_baseshim()); this->shim().InputEnabled(cookie); return S_OK; } @@ -674,7 +719,8 @@ struct produce : produce_baseshim().GetCurrentKeyState(virtualKey)); + typename D::abi_guard guard(this->shim()); + *KeyState = detach_abi(this->shim().GetCurrentKeyState(virtualKey)); return S_OK; } catch (...) @@ -683,11 +729,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_CharacterReceived(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().CharacterReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().CharacterReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -700,6 +747,7 @@ struct produce : produce_baseshim()); this->shim().CharacterReceived(cookie); return S_OK; } @@ -709,11 +757,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_KeyDown(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().KeyDown(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().KeyDown(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -726,6 +775,7 @@ struct produce : produce_baseshim()); this->shim().KeyDown(cookie); return S_OK; } @@ -735,11 +785,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_KeyUp(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().KeyUp(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().KeyUp(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -752,6 +803,7 @@ struct produce : produce_baseshim()); this->shim().KeyUp(cookie); return S_OK; } @@ -765,11 +817,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentKeyEventDeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetCurrentKeyEventDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentKeyEventDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentKeyEventDeviceId()); return S_OK; } catch (...) @@ -787,6 +840,7 @@ struct produce : produce_baseshim()); this->shim().ReleasePointerCapture(); return S_OK; } @@ -800,6 +854,7 @@ struct produce : produce_baseshim()); this->shim().SetPointerCapture(); return S_OK; } @@ -813,7 +868,8 @@ struct produce : produce_baseshim().HasCapture()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasCapture()); return S_OK; } catch (...) @@ -822,11 +878,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PointerPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerPosition()); return S_OK; } catch (...) @@ -835,11 +892,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PointerCursor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerCursor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerCursor()); return S_OK; } catch (...) @@ -849,10 +907,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PointerCursor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerCursor(*reinterpret_cast(&value)); return S_OK; } @@ -862,11 +921,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerCaptureLost(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerCaptureLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerCaptureLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -879,6 +939,7 @@ struct produce : produce_baseshim()); this->shim().PointerCaptureLost(cookie); return S_OK; } @@ -888,11 +949,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerEntered(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -905,6 +967,7 @@ struct produce : produce_baseshim()); this->shim().PointerEntered(cookie); return S_OK; } @@ -914,11 +977,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerExited(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerExited(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerExited(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -931,6 +995,7 @@ struct produce : produce_baseshim()); this->shim().PointerExited(cookie); return S_OK; } @@ -940,11 +1005,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerMoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -957,6 +1023,7 @@ struct produce : produce_baseshim()); this->shim().PointerMoved(cookie); return S_OK; } @@ -966,11 +1033,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -983,6 +1051,7 @@ struct produce : produce_baseshim()); this->shim().PointerPressed(cookie); return S_OK; } @@ -992,11 +1061,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerReleased(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1009,6 +1079,7 @@ struct produce : produce_baseshim()); this->shim().PointerReleased(cookie); return S_OK; } @@ -1018,11 +1089,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerWheelChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerWheelChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerWheelChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1035,6 +1107,7 @@ struct produce : produce_baseshim()); this->shim().PointerWheelChanged(cookie); return S_OK; } @@ -1048,11 +1121,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_PointerRoutedAway(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerRoutedAway(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerRoutedAway(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerRoutedAway(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1065,6 +1139,7 @@ struct produce : produce_baseshim()); this->shim().PointerRoutedAway(cookie); return S_OK; } @@ -1074,11 +1149,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerRoutedTo(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerRoutedTo(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerRoutedTo(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1091,6 +1167,7 @@ struct produce : produce_baseshim()); this->shim().PointerRoutedTo(cookie); return S_OK; } @@ -1100,11 +1177,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerRoutedReleased(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerRoutedReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerRoutedReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1117,6 +1195,7 @@ struct produce : produce_baseshim()); this->shim().PointerRoutedReleased(cookie); return S_OK; } @@ -1130,11 +1209,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_TouchHitTesting(abi_arg_in> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_TouchHitTesting(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().TouchHitTesting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().TouchHitTesting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1147,6 +1227,7 @@ struct produce : produce_baseshim()); this->shim().TouchHitTesting(cookie); return S_OK; } @@ -1160,11 +1241,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AutomationHostProvider(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutomationHostProvider(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutomationHostProvider()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomationHostProvider()); return S_OK; } catch (...) @@ -1174,11 +1256,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -1187,11 +1270,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CustomProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomProperties()); return S_OK; } catch (...) @@ -1201,11 +1285,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Dispatcher(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Dispatcher()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Dispatcher()); return S_OK; } catch (...) @@ -1219,7 +1304,8 @@ struct produce : produce_baseshim().FlowDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowDirection()); return S_OK; } catch (...) @@ -1232,6 +1318,7 @@ struct produce : produce_baseshim()); this->shim().FlowDirection(value); return S_OK; } @@ -1245,7 +1332,8 @@ struct produce : produce_baseshim().IsInputEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInputEnabled()); return S_OK; } catch (...) @@ -1258,6 +1346,7 @@ struct produce : produce_baseshim()); this->shim().IsInputEnabled(value); return S_OK; } @@ -1267,11 +1356,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PointerCursor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerCursor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerCursor()); return S_OK; } catch (...) @@ -1281,10 +1371,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PointerCursor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerCursor(*reinterpret_cast(&value)); return S_OK; } @@ -1294,11 +1385,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PointerPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerPosition()); return S_OK; } catch (...) @@ -1311,7 +1403,8 @@ struct produce : produce_baseshim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -1324,6 +1417,7 @@ struct produce : produce_baseshim()); this->shim().Activate(); return S_OK; } @@ -1337,6 +1431,7 @@ struct produce : produce_baseshim()); this->shim().Close(); return S_OK; } @@ -1350,7 +1445,8 @@ struct produce : produce_baseshim().GetAsyncKeyState(virtualKey)); + typename D::abi_guard guard(this->shim()); + *KeyState = detach_abi(this->shim().GetAsyncKeyState(virtualKey)); return S_OK; } catch (...) @@ -1363,7 +1459,8 @@ struct produce : produce_baseshim().GetKeyState(virtualKey)); + typename D::abi_guard guard(this->shim()); + *KeyState = detach_abi(this->shim().GetKeyState(virtualKey)); return S_OK; } catch (...) @@ -1376,6 +1473,7 @@ struct produce : produce_baseshim()); this->shim().ReleasePointerCapture(); return S_OK; } @@ -1389,6 +1487,7 @@ struct produce : produce_baseshim()); this->shim().SetPointerCapture(); return S_OK; } @@ -1398,11 +1497,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_Activated(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().Activated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().Activated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1415,6 +1515,7 @@ struct produce : produce_baseshim()); this->shim().Activated(cookie); return S_OK; } @@ -1424,11 +1525,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_AutomationProviderRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().AutomationProviderRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().AutomationProviderRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1441,6 +1543,7 @@ struct produce : produce_baseshim()); this->shim().AutomationProviderRequested(cookie); return S_OK; } @@ -1450,11 +1553,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_CharacterReceived(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().CharacterReceived(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().CharacterReceived(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1467,6 +1571,7 @@ struct produce : produce_baseshim()); this->shim().CharacterReceived(cookie); return S_OK; } @@ -1476,11 +1581,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().Closed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().Closed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1493,6 +1599,7 @@ struct produce : produce_baseshim()); this->shim().Closed(cookie); return S_OK; } @@ -1502,11 +1609,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_InputEnabled(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().InputEnabled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().InputEnabled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1519,6 +1627,7 @@ struct produce : produce_baseshim()); this->shim().InputEnabled(cookie); return S_OK; } @@ -1528,11 +1637,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_KeyDown(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().KeyDown(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().KeyDown(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1545,6 +1655,7 @@ struct produce : produce_baseshim()); this->shim().KeyDown(cookie); return S_OK; } @@ -1554,11 +1665,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_KeyUp(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().KeyUp(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().KeyUp(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1571,6 +1683,7 @@ struct produce : produce_baseshim()); this->shim().KeyUp(cookie); return S_OK; } @@ -1580,11 +1693,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerCaptureLost(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerCaptureLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerCaptureLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1597,6 +1711,7 @@ struct produce : produce_baseshim()); this->shim().PointerCaptureLost(cookie); return S_OK; } @@ -1606,11 +1721,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerEntered(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1623,6 +1739,7 @@ struct produce : produce_baseshim()); this->shim().PointerEntered(cookie); return S_OK; } @@ -1632,11 +1749,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerExited(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerExited(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerExited(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1649,6 +1767,7 @@ struct produce : produce_baseshim()); this->shim().PointerExited(cookie); return S_OK; } @@ -1658,11 +1777,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerMoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1675,6 +1795,7 @@ struct produce : produce_baseshim()); this->shim().PointerMoved(cookie); return S_OK; } @@ -1684,11 +1805,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1701,6 +1823,7 @@ struct produce : produce_baseshim()); this->shim().PointerPressed(cookie); return S_OK; } @@ -1710,11 +1833,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerReleased(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1727,6 +1851,7 @@ struct produce : produce_baseshim()); this->shim().PointerReleased(cookie); return S_OK; } @@ -1736,11 +1861,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_TouchHitTesting(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().TouchHitTesting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().TouchHitTesting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1753,6 +1879,7 @@ struct produce : produce_baseshim()); this->shim().TouchHitTesting(cookie); return S_OK; } @@ -1762,11 +1889,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerWheelChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerWheelChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerWheelChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1779,6 +1907,7 @@ struct produce : produce_baseshim()); this->shim().PointerWheelChanged(cookie); return S_OK; } @@ -1788,11 +1917,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_SizeChanged(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().SizeChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().SizeChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1805,6 +1935,7 @@ struct produce : produce_baseshim()); this->shim().SizeChanged(cookie); return S_OK; } @@ -1814,11 +1945,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_VisibilityChanged(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().VisibilityChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1831,6 +1963,7 @@ struct produce : produce_baseshim()); this->shim().VisibilityChanged(cookie); return S_OK; } @@ -1844,10 +1977,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_PointerPosition(abi_arg_in value) noexcept override + HRESULT __stdcall put_PointerPosition(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerPosition(*reinterpret_cast(&value)); return S_OK; } @@ -1861,11 +1995,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_ClosestInteractiveBoundsRequested(abi_arg_in> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ClosestInteractiveBoundsRequested(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1878,6 +2013,7 @@ struct produce : produce_baseshim()); this->shim().ClosestInteractiveBoundsRequested(cookie); return S_OK; } @@ -1887,11 +2023,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetCurrentKeyEventDeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetCurrentKeyEventDeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetCurrentKeyEventDeviceId()); return S_OK; } catch (...) @@ -1905,11 +2042,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Showing(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Showing(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Showing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Showing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1922,6 +2060,7 @@ struct produce : produce_baseshim()); this->shim().Showing(cookie); return S_OK; } @@ -1931,11 +2070,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaxSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSize()); return S_OK; } catch (...) @@ -1944,11 +2084,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MinSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinSize()); return S_OK; } catch (...) @@ -1957,11 +2098,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -1971,10 +2113,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -1988,7 +2131,8 @@ struct produce : produce_baseshim().IsInteractionDelayed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInteractionDelayed()); return S_OK; } catch (...) @@ -2001,6 +2145,7 @@ struct produce : produce_baseshim()); this->shim().IsInteractionDelayed(value); return S_OK; } @@ -2010,11 +2155,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -2028,7 +2174,8 @@ struct produce : produce_baseshim().DefaultCommandIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultCommandIndex()); return S_OK; } catch (...) @@ -2041,6 +2188,7 @@ struct produce : produce_baseshim()); this->shim().DefaultCommandIndex(value); return S_OK; } @@ -2054,7 +2202,8 @@ struct produce : produce_baseshim().CancelCommandIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CancelCommandIndex()); return S_OK; } catch (...) @@ -2067,6 +2216,7 @@ struct produce : produce_baseshim()); this->shim().CancelCommandIndex(value); return S_OK; } @@ -2076,11 +2226,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackButtonCommand(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackButtonCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackButtonCommand()); return S_OK; } catch (...) @@ -2090,10 +2241,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackButtonCommand(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackButtonCommand(*reinterpret_cast(&value)); return S_OK; } @@ -2103,11 +2255,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -2121,11 +2274,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWithTitle(abi_arg_in title, abi_arg_out coreWindowDialog) noexcept override + HRESULT __stdcall abi_CreateWithTitle(impl::abi_arg_in title, impl::abi_arg_out coreWindowDialog) noexcept override { try { - *coreWindowDialog = detach(this->shim().CreateWithTitle(*reinterpret_cast(&title))); + typename D::abi_guard guard(this->shim()); + *coreWindowDialog = detach_abi(this->shim().CreateWithTitle(*reinterpret_cast(&title))); return S_OK; } catch (...) @@ -2143,7 +2297,8 @@ struct produce : produce_baseshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -2156,6 +2311,7 @@ struct produce : produce_baseshim()); this->shim().Handled(value); return S_OK; } @@ -2169,11 +2325,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Showing(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Showing(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Showing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Showing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2186,6 +2343,7 @@ struct produce : produce_baseshim()); this->shim().Showing(cookie); return S_OK; } @@ -2195,11 +2353,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaxSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSize()); return S_OK; } catch (...) @@ -2208,11 +2367,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MinSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinSize()); return S_OK; } catch (...) @@ -2221,11 +2381,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -2235,10 +2396,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -2252,7 +2414,8 @@ struct produce : produce_baseshim().IsInteractionDelayed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInteractionDelayed()); return S_OK; } catch (...) @@ -2265,6 +2428,7 @@ struct produce : produce_baseshim()); this->shim().IsInteractionDelayed(value); return S_OK; } @@ -2274,11 +2438,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -2292,7 +2457,8 @@ struct produce : produce_baseshim().DefaultCommandIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultCommandIndex()); return S_OK; } catch (...) @@ -2305,6 +2471,7 @@ struct produce : produce_baseshim()); this->shim().DefaultCommandIndex(value); return S_OK; } @@ -2314,11 +2481,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackButtonCommand(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackButtonCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackButtonCommand()); return S_OK; } catch (...) @@ -2328,10 +2496,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackButtonCommand(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackButtonCommand(*reinterpret_cast(&value)); return S_OK; } @@ -2341,11 +2510,12 @@ struct produce : produce_base> asyncInfo) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out> asyncInfo) noexcept override { try { - *asyncInfo = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -2359,11 +2529,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in position, abi_arg_out coreWindowFlyout) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in position, impl::abi_arg_out coreWindowFlyout) noexcept override { try { - *coreWindowFlyout = detach(this->shim().Create(*reinterpret_cast(&position))); + typename D::abi_guard guard(this->shim()); + *coreWindowFlyout = detach_abi(this->shim().Create(*reinterpret_cast(&position))); return S_OK; } catch (...) @@ -2373,11 +2544,12 @@ struct produce : produce_base position, abi_arg_in title, abi_arg_out coreWindowFlyout) noexcept override + HRESULT __stdcall abi_CreateWithTitle(impl::abi_arg_in position, impl::abi_arg_in title, impl::abi_arg_out coreWindowFlyout) noexcept override { try { - *coreWindowFlyout = detach(this->shim().CreateWithTitle(*reinterpret_cast(&position), *reinterpret_cast(&title))); + typename D::abi_guard guard(this->shim()); + *coreWindowFlyout = detach_abi(this->shim().CreateWithTitle(*reinterpret_cast(&position), *reinterpret_cast(&title))); return S_OK; } catch (...) @@ -2391,10 +2563,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SetDesiredSize(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetDesiredSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDesiredSize(*reinterpret_cast(&value)); return S_OK; } @@ -2412,6 +2585,7 @@ struct produce : produce_baseshim()); this->shim().NotifyLayoutCompleted(); return S_OK; } @@ -2429,6 +2603,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ShouldWaitForLayoutCompletion(value); return S_OK; } @@ -2442,7 +2617,8 @@ struct produce : { try { - *value = detach(this->shim().ShouldWaitForLayoutCompletion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldWaitForLayoutCompletion()); return S_OK; } catch (...) @@ -2455,11 +2631,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out CoreWindowResizeManager) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out CoreWindowResizeManager) noexcept override { try { - *CoreWindowResizeManager = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *CoreWindowResizeManager = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2473,11 +2650,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentThread(abi_arg_out ppWindow) noexcept override + HRESULT __stdcall abi_GetForCurrentThread(impl::abi_arg_out ppWindow) noexcept override { try { - *ppWindow = detach(this->shim().GetForCurrentThread()); + typename D::abi_guard guard(this->shim()); + *ppWindow = detach_abi(this->shim().GetForCurrentThread()); return S_OK; } catch (...) @@ -2495,7 +2673,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsDispatcherIdle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDispatcherIdle()); return S_OK; } catch (...) @@ -2508,10 +2687,11 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_Initialize(abi_arg_in window) noexcept override + HRESULT __stdcall abi_Initialize(impl::abi_arg_in window) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Initialize(*reinterpret_cast(&window)); return S_OK; } @@ -2529,7 +2709,8 @@ struct produce : produce_baseshim().InputEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputEnabled()); return S_OK; } catch (...) @@ -2546,7 +2727,8 @@ struct produce : produce_baseshim().VirtualKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VirtualKey()); return S_OK; } catch (...) @@ -2555,11 +2737,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_KeyStatus(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().KeyStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyStatus()); return S_OK; } catch (...) @@ -2572,11 +2755,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DeviceId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeviceId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeviceId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeviceId()); return S_OK; } catch (...) @@ -2590,11 +2774,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CurrentPoint(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentPoint()); return S_OK; } catch (...) @@ -2608,7 +2793,8 @@ struct produce : produce_baseshim().KeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyModifiers()); return S_OK; } catch (...) @@ -2617,11 +2803,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_GetIntermediatePoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetIntermediatePoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIntermediatePoints()); return S_OK; } catch (...) @@ -2635,11 +2822,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_BackRequested(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_BackRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().BackRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BackRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2652,6 +2840,7 @@ struct produce : produce_baseshim()); this->shim().BackRequested(token); return S_OK; } @@ -2669,7 +2858,8 @@ struct produce : produce_baseshim().AppViewBackButtonVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppViewBackButtonVisibility()); return S_OK; } catch (...) @@ -2682,6 +2872,7 @@ struct produce : produce_baseshim()); this->shim().AppViewBackButtonVisibility(value); return S_OK; } @@ -2695,11 +2886,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out loader) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out loader) noexcept override { try { - *loader = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *loader = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2713,11 +2905,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ProximityEvaluation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProximityEvaluation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProximityEvaluation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProximityEvaluation()); return S_OK; } catch (...) @@ -2726,10 +2919,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ProximityEvaluation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProximityEvaluation(*reinterpret_cast(&value)); return S_OK; } @@ -2739,11 +2933,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Point(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Point()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Point()); return S_OK; } catch (...) @@ -2752,11 +2947,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BoundingBox(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingBox()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingBox()); return S_OK; } catch (...) @@ -2765,11 +2961,12 @@ struct produce : produce_base controlBoundingBox, abi_arg_out proximityEvaluation) noexcept override + HRESULT __stdcall abi_EvaluateProximityToRect(impl::abi_arg_in controlBoundingBox, impl::abi_arg_out proximityEvaluation) noexcept override { try { - *proximityEvaluation = detach(this->shim().EvaluateProximity(*reinterpret_cast(&controlBoundingBox))); + typename D::abi_guard guard(this->shim()); + *proximityEvaluation = detach_abi(this->shim().EvaluateProximity(*reinterpret_cast(&controlBoundingBox))); return S_OK; } catch (...) @@ -2778,11 +2975,12 @@ struct produce : produce_base * controlVertices, abi_arg_out proximityEvaluation) noexcept override + HRESULT __stdcall abi_EvaluateProximityToPolygon(uint32_t __controlVerticesSize, impl::abi_arg_in * controlVertices, impl::abi_arg_out proximityEvaluation) noexcept override { try { - *proximityEvaluation = detach(this->shim().EvaluateProximity(*reinterpret_cast(&controlVertices))); + typename D::abi_guard guard(this->shim()); + *proximityEvaluation = detach_abi(this->shim().EvaluateProximity(*reinterpret_cast(&controlVertices))); return S_OK; } catch (...) @@ -2799,7 +2997,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -2816,7 +3015,8 @@ struct produce : produce_baseshim().WindowActivationState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WindowActivationState()); return S_OK; } catch (...) @@ -2829,11 +3029,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Size(abi_arg_out value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -2850,293 +3051,293 @@ namespace Windows::UI::Core { template bool impl_ICoreWindowEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(ICoreWindowEventArgs)->get_Handled(&value)); return value; } template void impl_ICoreWindowEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(ICoreWindowEventArgs)->put_Handled(value)); } -template Windows::IInspectable impl_IAutomationProviderRequestedEventArgs::AutomationProvider() const +template Windows::Foundation::IInspectable impl_IAutomationProviderRequestedEventArgs::AutomationProvider() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_AutomationProvider(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IAutomationProviderRequestedEventArgs)->get_AutomationProvider(put_abi(value))); return value; } -template void impl_IAutomationProviderRequestedEventArgs::AutomationProvider(const Windows::IInspectable & value) const +template void impl_IAutomationProviderRequestedEventArgs::AutomationProvider(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_AutomationProvider(get(value))); + check_hresult(WINRT_SHIM(IAutomationProviderRequestedEventArgs)->put_AutomationProvider(get_abi(value))); } template uint32_t impl_ICharacterReceivedEventArgs::KeyCode() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyCode(&value)); + check_hresult(WINRT_SHIM(ICharacterReceivedEventArgs)->get_KeyCode(&value)); return value; } template Windows::UI::Core::CorePhysicalKeyStatus impl_ICharacterReceivedEventArgs::KeyStatus() const { Windows::UI::Core::CorePhysicalKeyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyStatus(put(value))); + check_hresult(WINRT_SHIM(ICharacterReceivedEventArgs)->get_KeyStatus(put_abi(value))); return value; } template bool impl_IInputEnabledEventArgs::InputEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InputEnabled(&value)); + check_hresult(WINRT_SHIM(IInputEnabledEventArgs)->get_InputEnabled(&value)); return value; } template Windows::System::VirtualKey impl_IKeyEventArgs::VirtualKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_VirtualKey(&value)); + check_hresult(WINRT_SHIM(IKeyEventArgs)->get_VirtualKey(&value)); return value; } template Windows::UI::Core::CorePhysicalKeyStatus impl_IKeyEventArgs::KeyStatus() const { Windows::UI::Core::CorePhysicalKeyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyStatus(put(value))); + check_hresult(WINRT_SHIM(IKeyEventArgs)->get_KeyStatus(put_abi(value))); return value; } template hstring impl_IKeyEventArgs2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IKeyEventArgs2)->get_DeviceId(put_abi(value))); return value; } template Windows::UI::Input::PointerPoint impl_IPointerEventArgs::CurrentPoint() const { Windows::UI::Input::PointerPoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentPoint(put(value))); + check_hresult(WINRT_SHIM(IPointerEventArgs)->get_CurrentPoint(put_abi(value))); return value; } template Windows::System::VirtualKeyModifiers impl_IPointerEventArgs::KeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyModifiers(&value)); + check_hresult(WINRT_SHIM(IPointerEventArgs)->get_KeyModifiers(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IPointerEventArgs::GetIntermediatePoints() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetIntermediatePoints(put(value))); + check_hresult(WINRT_SHIM(IPointerEventArgs)->abi_GetIntermediatePoints(put_abi(value))); return value; } template Windows::UI::Core::CoreProximityEvaluation impl_ITouchHitTestingEventArgs::ProximityEvaluation() const { Windows::UI::Core::CoreProximityEvaluation value {}; - check_hresult(static_cast(static_cast(*this))->get_ProximityEvaluation(put(value))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->get_ProximityEvaluation(put_abi(value))); return value; } template void impl_ITouchHitTestingEventArgs::ProximityEvaluation(const Windows::UI::Core::CoreProximityEvaluation & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProximityEvaluation(get(value))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->put_ProximityEvaluation(get_abi(value))); } template Windows::Foundation::Point impl_ITouchHitTestingEventArgs::Point() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Point(put(value))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->get_Point(put_abi(value))); return value; } template Windows::Foundation::Rect impl_ITouchHitTestingEventArgs::BoundingBox() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_BoundingBox(put(value))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->get_BoundingBox(put_abi(value))); return value; } template Windows::UI::Core::CoreProximityEvaluation impl_ITouchHitTestingEventArgs::EvaluateProximity(const Windows::Foundation::Rect & controlBoundingBox) const { Windows::UI::Core::CoreProximityEvaluation proximityEvaluation {}; - check_hresult(static_cast(static_cast(*this))->abi_EvaluateProximityToRect(get(controlBoundingBox), put(proximityEvaluation))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->abi_EvaluateProximityToRect(get_abi(controlBoundingBox), put_abi(proximityEvaluation))); return proximityEvaluation; } -template Windows::UI::Core::CoreProximityEvaluation impl_ITouchHitTestingEventArgs::EvaluateProximity(array_ref controlVertices) const +template Windows::UI::Core::CoreProximityEvaluation impl_ITouchHitTestingEventArgs::EvaluateProximity(array_view controlVertices) const { Windows::UI::Core::CoreProximityEvaluation proximityEvaluation {}; - check_hresult(static_cast(static_cast(*this))->abi_EvaluateProximityToPolygon(controlVertices.size(), get(controlVertices), put(proximityEvaluation))); + check_hresult(WINRT_SHIM(ITouchHitTestingEventArgs)->abi_EvaluateProximityToPolygon(controlVertices.size(), get_abi(controlVertices), put_abi(proximityEvaluation))); return proximityEvaluation; } template Windows::Foundation::Point impl_IClosestInteractiveBoundsRequestedEventArgs::PointerPosition() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerPosition(put(value))); + check_hresult(WINRT_SHIM(IClosestInteractiveBoundsRequestedEventArgs)->get_PointerPosition(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IClosestInteractiveBoundsRequestedEventArgs::SearchBounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchBounds(put(value))); + check_hresult(WINRT_SHIM(IClosestInteractiveBoundsRequestedEventArgs)->get_SearchBounds(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IClosestInteractiveBoundsRequestedEventArgs::ClosestInteractiveBounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ClosestInteractiveBounds(put(value))); + check_hresult(WINRT_SHIM(IClosestInteractiveBoundsRequestedEventArgs)->get_ClosestInteractiveBounds(put_abi(value))); return value; } template void impl_IClosestInteractiveBoundsRequestedEventArgs::ClosestInteractiveBounds(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_ClosestInteractiveBounds(get(value))); + check_hresult(WINRT_SHIM(IClosestInteractiveBoundsRequestedEventArgs)->put_ClosestInteractiveBounds(get_abi(value))); } template Windows::UI::Core::CoreWindowActivationState impl_IWindowActivatedEventArgs::WindowActivationState() const { Windows::UI::Core::CoreWindowActivationState value {}; - check_hresult(static_cast(static_cast(*this))->get_WindowActivationState(&value)); + check_hresult(WINRT_SHIM(IWindowActivatedEventArgs)->get_WindowActivationState(&value)); return value; } template Windows::Foundation::Size impl_IWindowSizeChangedEventArgs::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IWindowSizeChangedEventArgs)->get_Size(put_abi(value))); return value; } template bool impl_IVisibilityChangedEventArgs::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IVisibilityChangedEventArgs)->get_Visible(&value)); return value; } -template Windows::IInspectable impl_ICoreWindow::AutomationHostProvider() const +template Windows::Foundation::IInspectable impl_ICoreWindow::AutomationHostProvider() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_AutomationHostProvider(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICoreWindow)->get_AutomationHostProvider(put_abi(value))); return value; } template Windows::Foundation::Rect impl_ICoreWindow::Bounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->get_Bounds(put_abi(value))); return value; } template Windows::Foundation::Collections::IPropertySet impl_ICoreWindow::CustomProperties() const { Windows::Foundation::Collections::IPropertySet value; - check_hresult(static_cast(static_cast(*this))->get_CustomProperties(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->get_CustomProperties(put_abi(value))); return value; } template Windows::UI::Core::CoreDispatcher impl_ICoreWindow::Dispatcher() const { Windows::UI::Core::CoreDispatcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Dispatcher(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->get_Dispatcher(put_abi(value))); return value; } template Windows::UI::Core::CoreWindowFlowDirection impl_ICoreWindow::FlowDirection() const { Windows::UI::Core::CoreWindowFlowDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_FlowDirection(&value)); + check_hresult(WINRT_SHIM(ICoreWindow)->get_FlowDirection(&value)); return value; } template void impl_ICoreWindow::FlowDirection(Windows::UI::Core::CoreWindowFlowDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_FlowDirection(value)); + check_hresult(WINRT_SHIM(ICoreWindow)->put_FlowDirection(value)); } template bool impl_ICoreWindow::IsInputEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInputEnabled(&value)); + check_hresult(WINRT_SHIM(ICoreWindow)->get_IsInputEnabled(&value)); return value; } template void impl_ICoreWindow::IsInputEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInputEnabled(value)); + check_hresult(WINRT_SHIM(ICoreWindow)->put_IsInputEnabled(value)); } template Windows::UI::Core::CoreCursor impl_ICoreWindow::PointerCursor() const { Windows::UI::Core::CoreCursor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerCursor(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->get_PointerCursor(put_abi(value))); return value; } template void impl_ICoreWindow::PointerCursor(const Windows::UI::Core::CoreCursor & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerCursor(get(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->put_PointerCursor(get_abi(value))); } template Windows::Foundation::Point impl_ICoreWindow::PointerPosition() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerPosition(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow)->get_PointerPosition(put_abi(value))); return value; } template bool impl_ICoreWindow::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(ICoreWindow)->get_Visible(&value)); return value; } template void impl_ICoreWindow::Activate() const { - check_hresult(static_cast(static_cast(*this))->abi_Activate()); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_Activate()); } template void impl_ICoreWindow::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_Close()); } template Windows::UI::Core::CoreVirtualKeyStates impl_ICoreWindow::GetAsyncKeyState(Windows::System::VirtualKey virtualKey) const { Windows::UI::Core::CoreVirtualKeyStates KeyState {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAsyncKeyState(virtualKey, &KeyState)); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_GetAsyncKeyState(virtualKey, &KeyState)); return KeyState; } template Windows::UI::Core::CoreVirtualKeyStates impl_ICoreWindow::GetKeyState(Windows::System::VirtualKey virtualKey) const { Windows::UI::Core::CoreVirtualKeyStates KeyState {}; - check_hresult(static_cast(static_cast(*this))->abi_GetKeyState(virtualKey, &KeyState)); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_GetKeyState(virtualKey, &KeyState)); return KeyState; } template void impl_ICoreWindow::ReleasePointerCapture() const { - check_hresult(static_cast(static_cast(*this))->abi_ReleasePointerCapture()); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_ReleasePointerCapture()); } template void impl_ICoreWindow::SetPointerCapture() const { - check_hresult(static_cast(static_cast(*this))->abi_SetPointerCapture()); + check_hresult(WINRT_SHIM(ICoreWindow)->abi_SetPointerCapture()); } template event_token impl_ICoreWindow::Activated(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Activated(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_Activated(get_abi(handler), &pCookie)); return pCookie; } @@ -3147,13 +3348,13 @@ template event_revoker impl_ICoreWindow::Activated( template void impl_ICoreWindow::Activated(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Activated(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_Activated(cookie)); } template event_token impl_ICoreWindow::AutomationProviderRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_AutomationProviderRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_AutomationProviderRequested(get_abi(handler), &cookie)); return cookie; } @@ -3164,13 +3365,13 @@ template event_revoker impl_ICoreWindow::Automation template void impl_ICoreWindow::AutomationProviderRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AutomationProviderRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_AutomationProviderRequested(cookie)); } template event_token impl_ICoreWindow::CharacterReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_CharacterReceived(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_CharacterReceived(get_abi(handler), &pCookie)); return pCookie; } @@ -3181,13 +3382,13 @@ template event_revoker impl_ICoreWindow::CharacterR template void impl_ICoreWindow::CharacterReceived(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CharacterReceived(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_CharacterReceived(cookie)); } template event_token impl_ICoreWindow::Closed(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_Closed(get_abi(handler), &pCookie)); return pCookie; } @@ -3198,13 +3399,13 @@ template event_revoker impl_ICoreWindow::Closed(aut template void impl_ICoreWindow::Closed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_Closed(cookie)); } template event_token impl_ICoreWindow::InputEnabled(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_InputEnabled(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_InputEnabled(get_abi(handler), &pCookie)); return pCookie; } @@ -3215,13 +3416,13 @@ template event_revoker impl_ICoreWindow::InputEnabl template void impl_ICoreWindow::InputEnabled(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_InputEnabled(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_InputEnabled(cookie)); } template event_token impl_ICoreWindow::KeyDown(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_KeyDown(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_KeyDown(get_abi(handler), &pCookie)); return pCookie; } @@ -3232,13 +3433,13 @@ template event_revoker impl_ICoreWindow::KeyDown(au template void impl_ICoreWindow::KeyDown(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyDown(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_KeyDown(cookie)); } template event_token impl_ICoreWindow::KeyUp(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_KeyUp(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_KeyUp(get_abi(handler), &pCookie)); return pCookie; } @@ -3249,13 +3450,13 @@ template event_revoker impl_ICoreWindow::KeyUp(auto template void impl_ICoreWindow::KeyUp(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyUp(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_KeyUp(cookie)); } template event_token impl_ICoreWindow::PointerCaptureLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerCaptureLost(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerCaptureLost(get_abi(handler), &cookie)); return cookie; } @@ -3266,13 +3467,13 @@ template event_revoker impl_ICoreWindow::PointerCap template void impl_ICoreWindow::PointerCaptureLost(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerCaptureLost(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerCaptureLost(cookie)); } template event_token impl_ICoreWindow::PointerEntered(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerEntered(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerEntered(get_abi(handler), &cookie)); return cookie; } @@ -3283,13 +3484,13 @@ template event_revoker impl_ICoreWindow::PointerEnt template void impl_ICoreWindow::PointerEntered(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerEntered(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerEntered(cookie)); } template event_token impl_ICoreWindow::PointerExited(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerExited(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerExited(get_abi(handler), &cookie)); return cookie; } @@ -3300,13 +3501,13 @@ template event_revoker impl_ICoreWindow::PointerExi template void impl_ICoreWindow::PointerExited(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerExited(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerExited(cookie)); } template event_token impl_ICoreWindow::PointerMoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerMoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerMoved(get_abi(handler), &cookie)); return cookie; } @@ -3317,13 +3518,13 @@ template event_revoker impl_ICoreWindow::PointerMov template void impl_ICoreWindow::PointerMoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerMoved(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerMoved(cookie)); } template event_token impl_ICoreWindow::PointerPressed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerPressed(get_abi(handler), &cookie)); return cookie; } @@ -3334,13 +3535,13 @@ template event_revoker impl_ICoreWindow::PointerPre template void impl_ICoreWindow::PointerPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerPressed(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerPressed(cookie)); } template event_token impl_ICoreWindow::PointerReleased(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerReleased(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerReleased(get_abi(handler), &cookie)); return cookie; } @@ -3351,13 +3552,13 @@ template event_revoker impl_ICoreWindow::PointerRel template void impl_ICoreWindow::PointerReleased(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerReleased(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerReleased(cookie)); } template event_token impl_ICoreWindow::TouchHitTesting(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_TouchHitTesting(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_TouchHitTesting(get_abi(handler), &pCookie)); return pCookie; } @@ -3368,13 +3569,13 @@ template event_revoker impl_ICoreWindow::TouchHitTe template void impl_ICoreWindow::TouchHitTesting(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TouchHitTesting(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_TouchHitTesting(cookie)); } template event_token impl_ICoreWindow::PointerWheelChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerWheelChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_PointerWheelChanged(get_abi(handler), &cookie)); return cookie; } @@ -3385,13 +3586,13 @@ template event_revoker impl_ICoreWindow::PointerWhe template void impl_ICoreWindow::PointerWheelChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerWheelChanged(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_PointerWheelChanged(cookie)); } template event_token impl_ICoreWindow::SizeChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_SizeChanged(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_SizeChanged(get_abi(handler), &pCookie)); return pCookie; } @@ -3402,13 +3603,13 @@ template event_revoker impl_ICoreWindow::SizeChange template void impl_ICoreWindow::SizeChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SizeChanged(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_SizeChanged(cookie)); } template event_token impl_ICoreWindow::VisibilityChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_VisibilityChanged(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->add_VisibilityChanged(get_abi(handler), &pCookie)); return pCookie; } @@ -3419,18 +3620,18 @@ template event_revoker impl_ICoreWindow::Visibility template void impl_ICoreWindow::VisibilityChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_VisibilityChanged(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow)->remove_VisibilityChanged(cookie)); } template void impl_ICoreWindow2::PointerPosition(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerPosition(get(value))); + check_hresult(WINRT_SHIM(ICoreWindow2)->put_PointerPosition(get_abi(value))); } template event_token impl_ICoreWindow3::ClosestInteractiveBoundsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ClosestInteractiveBoundsRequested(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreWindow3)->add_ClosestInteractiveBoundsRequested(get_abi(handler), &pCookie)); return pCookie; } @@ -3441,55 +3642,55 @@ template event_revoker impl_ICoreWindow3::ClosestI template void impl_ICoreWindow3::ClosestInteractiveBoundsRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ClosestInteractiveBoundsRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreWindow3)->remove_ClosestInteractiveBoundsRequested(cookie)); } template hstring impl_ICoreWindow3::GetCurrentKeyEventDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentKeyEventDeviceId(put(value))); + check_hresult(WINRT_SHIM(ICoreWindow3)->abi_GetCurrentKeyEventDeviceId(put_abi(value))); return value; } template Windows::UI::Core::CoreWindow impl_ICoreWindowStatic::GetForCurrentThread() const { Windows::UI::Core::CoreWindow ppWindow { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentThread(put(ppWindow))); + check_hresult(WINRT_SHIM(ICoreWindowStatic)->abi_GetForCurrentThread(put_abi(ppWindow))); return ppWindow; } template Windows::UI::Core::CoreAcceleratorKeyEventType impl_IAcceleratorKeyEventArgs::EventType() const { Windows::UI::Core::CoreAcceleratorKeyEventType value {}; - check_hresult(static_cast(static_cast(*this))->get_EventType(&value)); + check_hresult(WINRT_SHIM(IAcceleratorKeyEventArgs)->get_EventType(&value)); return value; } template Windows::System::VirtualKey impl_IAcceleratorKeyEventArgs::VirtualKey() const { Windows::System::VirtualKey value {}; - check_hresult(static_cast(static_cast(*this))->get_VirtualKey(&value)); + check_hresult(WINRT_SHIM(IAcceleratorKeyEventArgs)->get_VirtualKey(&value)); return value; } template Windows::UI::Core::CorePhysicalKeyStatus impl_IAcceleratorKeyEventArgs::KeyStatus() const { Windows::UI::Core::CorePhysicalKeyStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyStatus(put(value))); + check_hresult(WINRT_SHIM(IAcceleratorKeyEventArgs)->get_KeyStatus(put_abi(value))); return value; } template hstring impl_IAcceleratorKeyEventArgs2::DeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DeviceId(put(value))); + check_hresult(WINRT_SHIM(IAcceleratorKeyEventArgs2)->get_DeviceId(put_abi(value))); return value; } template event_token impl_ICoreAcceleratorKeys::AcceleratorKeyActivated(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_AcceleratorKeyActivated(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreAcceleratorKeys)->add_AcceleratorKeyActivated(get_abi(handler), &pCookie)); return pCookie; } @@ -3500,455 +3701,455 @@ template event_revoker impl_ICoreAcceleratorK template void impl_ICoreAcceleratorKeys::AcceleratorKeyActivated(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_AcceleratorKeyActivated(cookie)); + check_hresult(WINRT_SHIM(ICoreAcceleratorKeys)->remove_AcceleratorKeyActivated(cookie)); } template bool impl_ICoreDispatcher::HasThreadAccess() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasThreadAccess(&value)); + check_hresult(WINRT_SHIM(ICoreDispatcher)->get_HasThreadAccess(&value)); return value; } template void impl_ICoreDispatcher::ProcessEvents(Windows::UI::Core::CoreProcessEventsOption options) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessEvents(options)); + check_hresult(WINRT_SHIM(ICoreDispatcher)->abi_ProcessEvents(options)); } template Windows::Foundation::IAsyncAction impl_ICoreDispatcher::RunAsync(Windows::UI::Core::CoreDispatcherPriority priority, const Windows::UI::Core::DispatchedHandler & agileCallback) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_RunAsync(priority, get(agileCallback), put(asyncAction))); + check_hresult(WINRT_SHIM(ICoreDispatcher)->abi_RunAsync(priority, get_abi(agileCallback), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncAction impl_ICoreDispatcher::RunIdleAsync(const Windows::UI::Core::IdleDispatchedHandler & agileCallback) const { Windows::Foundation::IAsyncAction asyncAction; - check_hresult(static_cast(static_cast(*this))->abi_RunIdleAsync(get(agileCallback), put(asyncAction))); + check_hresult(WINRT_SHIM(ICoreDispatcher)->abi_RunIdleAsync(get_abi(agileCallback), put_abi(asyncAction))); return asyncAction; } template Windows::Foundation::IAsyncOperation impl_ICoreDispatcher2::TryRunAsync(Windows::UI::Core::CoreDispatcherPriority priority, const Windows::UI::Core::DispatchedHandler & agileCallback) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryRunAsync(priority, get(agileCallback), put(asyncOperation))); + check_hresult(WINRT_SHIM(ICoreDispatcher2)->abi_TryRunAsync(priority, get_abi(agileCallback), put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_ICoreDispatcher2::TryRunIdleAsync(const Windows::UI::Core::IdleDispatchedHandler & agileCallback) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_TryRunIdleAsync(get(agileCallback), put(asyncOperation))); + check_hresult(WINRT_SHIM(ICoreDispatcher2)->abi_TryRunIdleAsync(get_abi(agileCallback), put_abi(asyncOperation))); return asyncOperation; } template Windows::UI::Core::CoreDispatcherPriority impl_ICoreDispatcherWithTaskPriority::CurrentPriority() const { Windows::UI::Core::CoreDispatcherPriority value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentPriority(&value)); + check_hresult(WINRT_SHIM(ICoreDispatcherWithTaskPriority)->get_CurrentPriority(&value)); return value; } template void impl_ICoreDispatcherWithTaskPriority::CurrentPriority(Windows::UI::Core::CoreDispatcherPriority value) const { - check_hresult(static_cast(static_cast(*this))->put_CurrentPriority(value)); + check_hresult(WINRT_SHIM(ICoreDispatcherWithTaskPriority)->put_CurrentPriority(value)); } template bool impl_ICoreDispatcherWithTaskPriority::ShouldYield() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ShouldYield(&value)); + check_hresult(WINRT_SHIM(ICoreDispatcherWithTaskPriority)->abi_ShouldYield(&value)); return value; } template bool impl_ICoreDispatcherWithTaskPriority::ShouldYield(Windows::UI::Core::CoreDispatcherPriority priority) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_ShouldYieldToPriority(priority, &value)); + check_hresult(WINRT_SHIM(ICoreDispatcherWithTaskPriority)->abi_ShouldYieldToPriority(priority, &value)); return value; } template void impl_ICoreDispatcherWithTaskPriority::StopProcessEvents() const { - check_hresult(static_cast(static_cast(*this))->abi_StopProcessEvents()); + check_hresult(WINRT_SHIM(ICoreDispatcherWithTaskPriority)->abi_StopProcessEvents()); } template bool impl_IIdleDispatchedHandlerArgs::IsDispatcherIdle() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDispatcherIdle(&value)); + check_hresult(WINRT_SHIM(IIdleDispatchedHandlerArgs)->get_IsDispatcherIdle(&value)); return value; } template uint32_t impl_ICoreCursor::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ICoreCursor)->get_Id(&value)); return value; } template Windows::UI::Core::CoreCursorType impl_ICoreCursor::Type() const { Windows::UI::Core::CoreCursorType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(ICoreCursor)->get_Type(&value)); return value; } template Windows::UI::Core::CoreCursor impl_ICoreCursorFactory::CreateCursor(Windows::UI::Core::CoreCursorType type, uint32_t id) const { Windows::UI::Core::CoreCursor cursor { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateCursor(type, id, put(cursor))); + check_hresult(WINRT_SHIM(ICoreCursorFactory)->abi_CreateCursor(type, id, put_abi(cursor))); return cursor; } template void impl_IInitializeWithCoreWindow::Initialize(const Windows::UI::Core::CoreWindow & window) const { - check_hresult(static_cast(static_cast(*this))->abi_Initialize(get(window))); + check_hresult(WINRT_SHIM(IInitializeWithCoreWindow)->abi_Initialize(get_abi(window))); } template void impl_ICoreWindowResizeManager::NotifyLayoutCompleted() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyLayoutCompleted()); + check_hresult(WINRT_SHIM(ICoreWindowResizeManager)->abi_NotifyLayoutCompleted()); } template void impl_ICoreWindowResizeManagerLayoutCapability::ShouldWaitForLayoutCompletion(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShouldWaitForLayoutCompletion(value)); + check_hresult(WINRT_SHIM(ICoreWindowResizeManagerLayoutCapability)->put_ShouldWaitForLayoutCompletion(value)); } template bool impl_ICoreWindowResizeManagerLayoutCapability::ShouldWaitForLayoutCompletion() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldWaitForLayoutCompletion(&value)); + check_hresult(WINRT_SHIM(ICoreWindowResizeManagerLayoutCapability)->get_ShouldWaitForLayoutCompletion(&value)); return value; } template Windows::UI::Core::CoreWindowResizeManager impl_ICoreWindowResizeManagerStatics::GetForCurrentView() const { Windows::UI::Core::CoreWindowResizeManager CoreWindowResizeManager { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(CoreWindowResizeManager))); + check_hresult(WINRT_SHIM(ICoreWindowResizeManagerStatics)->abi_GetForCurrentView(put_abi(CoreWindowResizeManager))); return CoreWindowResizeManager; } template Windows::UI::Core::CoreDispatcher impl_ICoreInputSourceBase::Dispatcher() const { Windows::UI::Core::CoreDispatcher value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Dispatcher(put(value))); + check_hresult(WINRT_SHIM(ICoreInputSourceBase)->get_Dispatcher(put_abi(value))); return value; } template bool impl_ICoreInputSourceBase::IsInputEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInputEnabled(&value)); + check_hresult(WINRT_SHIM(ICoreInputSourceBase)->get_IsInputEnabled(&value)); return value; } template void impl_ICoreInputSourceBase::IsInputEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInputEnabled(value)); + check_hresult(WINRT_SHIM(ICoreInputSourceBase)->put_IsInputEnabled(value)); } -template event_token impl_ICoreInputSourceBase::InputEnabled(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreInputSourceBase::InputEnabled(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_InputEnabled(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreInputSourceBase)->add_InputEnabled(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreInputSourceBase::InputEnabled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreInputSourceBase::InputEnabled(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreInputSourceBase::remove_InputEnabled, InputEnabled(handler)); } template void impl_ICoreInputSourceBase::InputEnabled(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_InputEnabled(cookie)); + check_hresult(WINRT_SHIM(ICoreInputSourceBase)->remove_InputEnabled(cookie)); } template void impl_ICorePointerInputSource::ReleasePointerCapture() const { - check_hresult(static_cast(static_cast(*this))->abi_ReleasePointerCapture()); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->abi_ReleasePointerCapture()); } template void impl_ICorePointerInputSource::SetPointerCapture() const { - check_hresult(static_cast(static_cast(*this))->abi_SetPointerCapture()); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->abi_SetPointerCapture()); } template bool impl_ICorePointerInputSource::HasCapture() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasCapture(&value)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->get_HasCapture(&value)); return value; } template Windows::Foundation::Point impl_ICorePointerInputSource::PointerPosition() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerPosition(put(value))); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->get_PointerPosition(put_abi(value))); return value; } template Windows::UI::Core::CoreCursor impl_ICorePointerInputSource::PointerCursor() const { Windows::UI::Core::CoreCursor value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerCursor(put(value))); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->get_PointerCursor(put_abi(value))); return value; } template void impl_ICorePointerInputSource::PointerCursor(const Windows::UI::Core::CoreCursor & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerCursor(get(value))); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->put_PointerCursor(get_abi(value))); } -template event_token impl_ICorePointerInputSource::PointerCaptureLost(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerCaptureLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerCaptureLost(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerCaptureLost(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerCaptureLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerCaptureLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerCaptureLost, PointerCaptureLost(handler)); } template void impl_ICorePointerInputSource::PointerCaptureLost(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerCaptureLost(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerCaptureLost(cookie)); } -template event_token impl_ICorePointerInputSource::PointerEntered(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerEntered(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerEntered(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerEntered(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerEntered(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerEntered(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerEntered, PointerEntered(handler)); } template void impl_ICorePointerInputSource::PointerEntered(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerEntered(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerEntered(cookie)); } -template event_token impl_ICorePointerInputSource::PointerExited(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerExited(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerExited(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerExited(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerExited(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerExited(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerExited, PointerExited(handler)); } template void impl_ICorePointerInputSource::PointerExited(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerExited(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerExited(cookie)); } -template event_token impl_ICorePointerInputSource::PointerMoved(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerMoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerMoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerMoved(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerMoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerMoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerMoved, PointerMoved(handler)); } template void impl_ICorePointerInputSource::PointerMoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerMoved(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerMoved(cookie)); } -template event_token impl_ICorePointerInputSource::PointerPressed(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerPressed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerPressed(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerPressed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerPressed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerPressed, PointerPressed(handler)); } template void impl_ICorePointerInputSource::PointerPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerPressed(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerPressed(cookie)); } -template event_token impl_ICorePointerInputSource::PointerReleased(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerReleased(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerReleased(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerReleased(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerReleased(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerReleased(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerReleased, PointerReleased(handler)); } template void impl_ICorePointerInputSource::PointerReleased(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerReleased(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerReleased(cookie)); } -template event_token impl_ICorePointerInputSource::PointerWheelChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICorePointerInputSource::PointerWheelChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerWheelChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->add_PointerWheelChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICorePointerInputSource::PointerWheelChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICorePointerInputSource::PointerWheelChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICorePointerInputSource::remove_PointerWheelChanged, PointerWheelChanged(handler)); } template void impl_ICorePointerInputSource::PointerWheelChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerWheelChanged(cookie)); + check_hresult(WINRT_SHIM(ICorePointerInputSource)->remove_PointerWheelChanged(cookie)); } template Windows::UI::Core::CoreVirtualKeyStates impl_ICoreKeyboardInputSource::GetCurrentKeyState(Windows::System::VirtualKey virtualKey) const { Windows::UI::Core::CoreVirtualKeyStates KeyState {}; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentKeyState(virtualKey, &KeyState)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->abi_GetCurrentKeyState(virtualKey, &KeyState)); return KeyState; } -template event_token impl_ICoreKeyboardInputSource::CharacterReceived(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreKeyboardInputSource::CharacterReceived(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_CharacterReceived(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->add_CharacterReceived(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreKeyboardInputSource::CharacterReceived(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreKeyboardInputSource::CharacterReceived(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreKeyboardInputSource::remove_CharacterReceived, CharacterReceived(handler)); } template void impl_ICoreKeyboardInputSource::CharacterReceived(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CharacterReceived(cookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->remove_CharacterReceived(cookie)); } -template event_token impl_ICoreKeyboardInputSource::KeyDown(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreKeyboardInputSource::KeyDown(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_KeyDown(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->add_KeyDown(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreKeyboardInputSource::KeyDown(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreKeyboardInputSource::KeyDown(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreKeyboardInputSource::remove_KeyDown, KeyDown(handler)); } template void impl_ICoreKeyboardInputSource::KeyDown(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyDown(cookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->remove_KeyDown(cookie)); } -template event_token impl_ICoreKeyboardInputSource::KeyUp(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreKeyboardInputSource::KeyUp(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_KeyUp(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->add_KeyUp(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreKeyboardInputSource::KeyUp(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreKeyboardInputSource::KeyUp(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreKeyboardInputSource::remove_KeyUp, KeyUp(handler)); } template void impl_ICoreKeyboardInputSource::KeyUp(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyUp(cookie)); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource)->remove_KeyUp(cookie)); } template hstring impl_ICoreKeyboardInputSource2::GetCurrentKeyEventDeviceId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentKeyEventDeviceId(put(value))); + check_hresult(WINRT_SHIM(ICoreKeyboardInputSource2)->abi_GetCurrentKeyEventDeviceId(put_abi(value))); return value; } template bool impl_ICoreComponentFocusable::HasFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasFocus(&value)); + check_hresult(WINRT_SHIM(ICoreComponentFocusable)->get_HasFocus(&value)); return value; } -template event_token impl_ICoreComponentFocusable::GotFocus(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreComponentFocusable::GotFocus(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_GotFocus(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreComponentFocusable)->add_GotFocus(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreComponentFocusable::GotFocus(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreComponentFocusable::GotFocus(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreComponentFocusable::remove_GotFocus, GotFocus(handler)); } template void impl_ICoreComponentFocusable::GotFocus(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_GotFocus(cookie)); + check_hresult(WINRT_SHIM(ICoreComponentFocusable)->remove_GotFocus(cookie)); } -template event_token impl_ICoreComponentFocusable::LostFocus(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreComponentFocusable::LostFocus(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_LostFocus(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreComponentFocusable)->add_LostFocus(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreComponentFocusable::LostFocus(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreComponentFocusable::LostFocus(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreComponentFocusable::remove_LostFocus, LostFocus(handler)); } template void impl_ICoreComponentFocusable::LostFocus(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_LostFocus(cookie)); + check_hresult(WINRT_SHIM(ICoreComponentFocusable)->remove_LostFocus(cookie)); } -template event_token impl_ICoreTouchHitTesting::TouchHitTesting(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreTouchHitTesting::TouchHitTesting(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_TouchHitTesting(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreTouchHitTesting)->add_TouchHitTesting(get_abi(handler), &pCookie)); return pCookie; } -template event_revoker impl_ICoreTouchHitTesting::TouchHitTesting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreTouchHitTesting::TouchHitTesting(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Core::ICoreTouchHitTesting::remove_TouchHitTesting, TouchHitTesting(handler)); } template void impl_ICoreTouchHitTesting::TouchHitTesting(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TouchHitTesting(cookie)); + check_hresult(WINRT_SHIM(ICoreTouchHitTesting)->remove_TouchHitTesting(cookie)); } template event_token impl_ICoreClosestInteractiveBoundsRequested::ClosestInteractiveBoundsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ClosestInteractiveBoundsRequested(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(ICoreClosestInteractiveBoundsRequested)->add_ClosestInteractiveBoundsRequested(get_abi(handler), &pCookie)); return pCookie; } @@ -3959,13 +4160,13 @@ template event_revoker impl template void impl_ICoreClosestInteractiveBoundsRequested::ClosestInteractiveBoundsRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ClosestInteractiveBoundsRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreClosestInteractiveBoundsRequested)->remove_ClosestInteractiveBoundsRequested(cookie)); } template event_token impl_ICorePointerRedirector::PointerRoutedAway(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerRoutedAway(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->add_PointerRoutedAway(get_abi(handler), &cookie)); return cookie; } @@ -3976,13 +4177,13 @@ template event_revoker impl_ICorePointerRed template void impl_ICorePointerRedirector::PointerRoutedAway(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerRoutedAway(cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->remove_PointerRoutedAway(cookie)); } template event_token impl_ICorePointerRedirector::PointerRoutedTo(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerRoutedTo(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->add_PointerRoutedTo(get_abi(handler), &cookie)); return cookie; } @@ -3993,13 +4194,13 @@ template event_revoker impl_ICorePointerRed template void impl_ICorePointerRedirector::PointerRoutedTo(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerRoutedTo(cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->remove_PointerRoutedTo(cookie)); } template event_token impl_ICorePointerRedirector::PointerRoutedReleased(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerRoutedReleased(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->add_PointerRoutedReleased(get_abi(handler), &cookie)); return cookie; } @@ -4010,13 +4211,13 @@ template event_revoker impl_ICorePointerRed template void impl_ICorePointerRedirector::PointerRoutedReleased(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerRoutedReleased(cookie)); + check_hresult(WINRT_SHIM(ICorePointerRedirector)->remove_PointerRoutedReleased(cookie)); } template event_token impl_ISystemNavigationManager::BackRequested(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BackRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISystemNavigationManager)->add_BackRequested(get_abi(handler), &token)); return token; } @@ -4027,49 +4228,49 @@ template event_revoker impl_ISystemNaviga template void impl_ISystemNavigationManager::BackRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BackRequested(token)); + check_hresult(WINRT_SHIM(ISystemNavigationManager)->remove_BackRequested(token)); } template Windows::UI::Core::AppViewBackButtonVisibility impl_ISystemNavigationManager2::AppViewBackButtonVisibility() const { Windows::UI::Core::AppViewBackButtonVisibility value {}; - check_hresult(static_cast(static_cast(*this))->get_AppViewBackButtonVisibility(&value)); + check_hresult(WINRT_SHIM(ISystemNavigationManager2)->get_AppViewBackButtonVisibility(&value)); return value; } template void impl_ISystemNavigationManager2::AppViewBackButtonVisibility(Windows::UI::Core::AppViewBackButtonVisibility value) const { - check_hresult(static_cast(static_cast(*this))->put_AppViewBackButtonVisibility(value)); + check_hresult(WINRT_SHIM(ISystemNavigationManager2)->put_AppViewBackButtonVisibility(value)); } template Windows::UI::Core::SystemNavigationManager impl_ISystemNavigationManagerStatics::GetForCurrentView() const { Windows::UI::Core::SystemNavigationManager loader { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(loader))); + check_hresult(WINRT_SHIM(ISystemNavigationManagerStatics)->abi_GetForCurrentView(put_abi(loader))); return loader; } template bool impl_IBackRequestedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IBackRequestedEventArgs)->get_Handled(&value)); return value; } template void impl_IBackRequestedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IBackRequestedEventArgs)->put_Handled(value)); } template void impl_ICoreWindowPopupShowingEventArgs::SetDesiredSize(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredSize(get(value))); + check_hresult(WINRT_SHIM(ICoreWindowPopupShowingEventArgs)->abi_SetDesiredSize(get_abi(value))); } template event_token impl_ICoreWindowDialog::Showing(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Showing(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->add_Showing(get_abi(handler), &cookie)); return cookie; } @@ -4080,108 +4281,108 @@ template event_revoker impl_ICoreWindowDialog template void impl_ICoreWindowDialog::Showing(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Showing(cookie)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->remove_Showing(cookie)); } template Windows::Foundation::Size impl_ICoreWindowDialog::MaxSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSize(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_MaxSize(put_abi(value))); return value; } template Windows::Foundation::Size impl_ICoreWindowDialog::MinSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MinSize(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_MinSize(put_abi(value))); return value; } template hstring impl_ICoreWindowDialog::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_Title(put_abi(value))); return value; } -template void impl_ICoreWindowDialog::Title(hstring_ref value) const +template void impl_ICoreWindowDialog::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->put_Title(get_abi(value))); } template int32_t impl_ICoreWindowDialog::IsInteractionDelayed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInteractionDelayed(&value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_IsInteractionDelayed(&value)); return value; } template void impl_ICoreWindowDialog::IsInteractionDelayed(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInteractionDelayed(value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->put_IsInteractionDelayed(value)); } template Windows::Foundation::Collections::IVector impl_ICoreWindowDialog::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_Commands(put_abi(value))); return value; } template uint32_t impl_ICoreWindowDialog::DefaultCommandIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultCommandIndex(&value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_DefaultCommandIndex(&value)); return value; } template void impl_ICoreWindowDialog::DefaultCommandIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultCommandIndex(value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->put_DefaultCommandIndex(value)); } template uint32_t impl_ICoreWindowDialog::CancelCommandIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CancelCommandIndex(&value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_CancelCommandIndex(&value)); return value; } template void impl_ICoreWindowDialog::CancelCommandIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CancelCommandIndex(value)); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->put_CancelCommandIndex(value)); } template Windows::UI::Popups::UICommandInvokedHandler impl_ICoreWindowDialog::BackButtonCommand() const { Windows::UI::Popups::UICommandInvokedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_BackButtonCommand(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->get_BackButtonCommand(put_abi(value))); return value; } template void impl_ICoreWindowDialog::BackButtonCommand(const Windows::UI::Popups::UICommandInvokedHandler & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackButtonCommand(get(value))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->put_BackButtonCommand(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_ICoreWindowDialog::ShowAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(ICoreWindowDialog)->abi_ShowAsync(put_abi(asyncInfo))); return asyncInfo; } -template Windows::UI::Core::CoreWindowDialog impl_ICoreWindowDialogFactory::CreateWithTitle(hstring_ref title) const +template Windows::UI::Core::CoreWindowDialog impl_ICoreWindowDialogFactory::CreateWithTitle(hstring_view title) const { Windows::UI::Core::CoreWindowDialog coreWindowDialog { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTitle(get(title), put(coreWindowDialog))); + check_hresult(WINRT_SHIM(ICoreWindowDialogFactory)->abi_CreateWithTitle(get_abi(title), put_abi(coreWindowDialog))); return coreWindowDialog; } template event_token impl_ICoreWindowFlyout::Showing(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Showing(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->add_Showing(get_abi(handler), &cookie)); return cookie; } @@ -4192,96 +4393,96 @@ template event_revoker impl_ICoreWindowFlyout template void impl_ICoreWindowFlyout::Showing(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Showing(cookie)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->remove_Showing(cookie)); } template Windows::Foundation::Size impl_ICoreWindowFlyout::MaxSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSize(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_MaxSize(put_abi(value))); return value; } template Windows::Foundation::Size impl_ICoreWindowFlyout::MinSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_MinSize(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_MinSize(put_abi(value))); return value; } template hstring impl_ICoreWindowFlyout::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_Title(put_abi(value))); return value; } -template void impl_ICoreWindowFlyout::Title(hstring_ref value) const +template void impl_ICoreWindowFlyout::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->put_Title(get_abi(value))); } template int32_t impl_ICoreWindowFlyout::IsInteractionDelayed() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInteractionDelayed(&value)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_IsInteractionDelayed(&value)); return value; } template void impl_ICoreWindowFlyout::IsInteractionDelayed(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInteractionDelayed(value)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->put_IsInteractionDelayed(value)); } template Windows::Foundation::Collections::IVector impl_ICoreWindowFlyout::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_Commands(put_abi(value))); return value; } template uint32_t impl_ICoreWindowFlyout::DefaultCommandIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultCommandIndex(&value)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_DefaultCommandIndex(&value)); return value; } template void impl_ICoreWindowFlyout::DefaultCommandIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultCommandIndex(value)); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->put_DefaultCommandIndex(value)); } template Windows::UI::Popups::UICommandInvokedHandler impl_ICoreWindowFlyout::BackButtonCommand() const { Windows::UI::Popups::UICommandInvokedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_BackButtonCommand(put(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->get_BackButtonCommand(put_abi(value))); return value; } template void impl_ICoreWindowFlyout::BackButtonCommand(const Windows::UI::Popups::UICommandInvokedHandler & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackButtonCommand(get(value))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->put_BackButtonCommand(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_ICoreWindowFlyout::ShowAsync() const { Windows::Foundation::IAsyncOperation asyncInfo; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(asyncInfo))); + check_hresult(WINRT_SHIM(ICoreWindowFlyout)->abi_ShowAsync(put_abi(asyncInfo))); return asyncInfo; } template Windows::UI::Core::CoreWindowFlyout impl_ICoreWindowFlyoutFactory::Create(const Windows::Foundation::Point & position) const { Windows::UI::Core::CoreWindowFlyout coreWindowFlyout { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(position), put(coreWindowFlyout))); + check_hresult(WINRT_SHIM(ICoreWindowFlyoutFactory)->abi_Create(get_abi(position), put_abi(coreWindowFlyout))); return coreWindowFlyout; } -template Windows::UI::Core::CoreWindowFlyout impl_ICoreWindowFlyoutFactory::CreateWithTitle(const Windows::Foundation::Point & position, hstring_ref title) const +template Windows::UI::Core::CoreWindowFlyout impl_ICoreWindowFlyoutFactory::CreateWithTitle(const Windows::Foundation::Point & position, hstring_view title) const { Windows::UI::Core::CoreWindowFlyout coreWindowFlyout { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTitle(get(position), get(title), put(coreWindowFlyout))); + check_hresult(WINRT_SHIM(ICoreWindowFlyoutFactory)->abi_CreateWithTitle(get_abi(position), get_abi(title), put_abi(coreWindowFlyout))); return coreWindowFlyout; } @@ -4298,7 +4499,7 @@ inline CoreWindowDialog::CoreWindowDialog() : CoreWindowDialog(activate_instance()) {} -inline CoreWindowDialog::CoreWindowDialog(hstring_ref title) : +inline CoreWindowDialog::CoreWindowDialog(hstring_view title) : CoreWindowDialog(get_activation_factory().CreateWithTitle(title)) {} @@ -4306,7 +4507,7 @@ inline CoreWindowFlyout::CoreWindowFlyout(const Windows::Foundation::Point & pos CoreWindowFlyout(get_activation_factory().Create(position)) {} -inline CoreWindowFlyout::CoreWindowFlyout(const Windows::Foundation::Point & position, hstring_ref title) : +inline CoreWindowFlyout::CoreWindowFlyout(const Windows::Foundation::Point & position, hstring_view title) : CoreWindowFlyout(get_activation_factory().CreateWithTitle(position, title)) {} @@ -4323,3 +4524,644 @@ inline Windows::UI::Core::SystemNavigationManager SystemNavigationManager::GetFo } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IAcceleratorKeyEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IAcceleratorKeyEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IAutomationProviderRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IBackRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICharacterReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IClosestInteractiveBoundsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreAcceleratorKeys & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreClosestInteractiveBoundsRequested & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreComponentFocusable & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreCursor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreCursorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreDispatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreDispatcher2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreDispatcherWithTaskPriority & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreInputSourceBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreKeyboardInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreKeyboardInputSource2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICorePointerInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICorePointerRedirector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreTouchHitTesting & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindow2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindow3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowDialog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowDialogFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowFlyout & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowFlyoutFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowPopupShowingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowResizeManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowResizeManagerLayoutCapability & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowResizeManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ICoreWindowStatic & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IIdleDispatchedHandlerArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IInitializeWithCoreWindow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IInputEnabledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IKeyEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IKeyEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IPointerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ISystemNavigationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ISystemNavigationManager2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ISystemNavigationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ITouchHitTestingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IVisibilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IWindowActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IWindowSizeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AcceleratorKeyEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::AutomationProviderRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::BackRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CharacterReceivedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::ClosestInteractiveBoundsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreAcceleratorKeys & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreComponentInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreCursor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreDispatcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreIndependentInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindow & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindowDialog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindowEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindowFlyout & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindowPopupShowingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::CoreWindowResizeManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::IdleDispatchedHandlerArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::InputEnabledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::KeyEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::PointerEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::SystemNavigationManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::TouchHitTestingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::VisibilityChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::WindowActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Core::WindowSizeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Input.Inking.Core.h b/10.0.14393.0/winrt/Windows.UI.Input.Inking.Core.h index 71568ad7d..0d4c5c15f 100644 --- a/10.0.14393.0/winrt/Windows.UI.Input.Inking.Core.h +++ b/10.0.14393.0/winrt/Windows.UI.Input.Inking.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Input.Inking.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -16,11 +19,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_PointerEntering(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerEntering(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerEntering(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerEntering(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -33,6 +37,7 @@ struct produceshim()); this->shim().PointerEntering(cookie); return S_OK; } @@ -42,11 +47,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerHovering(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerHovering(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerHovering(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -59,6 +65,7 @@ struct produceshim()); this->shim().PointerHovering(cookie); return S_OK; } @@ -68,11 +75,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerExiting(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerExiting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerExiting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -85,6 +93,7 @@ struct produceshim()); this->shim().PointerExiting(cookie); return S_OK; } @@ -94,11 +103,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerPressing(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerPressing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerPressing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -111,6 +121,7 @@ struct produceshim()); this->shim().PointerPressing(cookie); return S_OK; } @@ -120,11 +131,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerMoving(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerMoving(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerMoving(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -137,6 +149,7 @@ struct produceshim()); this->shim().PointerMoving(cookie); return S_OK; } @@ -146,11 +159,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerReleasing(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerReleasing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerReleasing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -163,6 +177,7 @@ struct produceshim()); this->shim().PointerReleasing(cookie); return S_OK; } @@ -172,11 +187,12 @@ struct produce> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerLost(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -189,6 +205,7 @@ struct produceshim()); this->shim().PointerLost(cookie); return S_OK; } @@ -198,11 +215,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_InkPresenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkPresenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkPresenter()); return S_OK; } catch (...) @@ -216,11 +234,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in inkPresenter, abi_arg_out inkIndependentInputSource) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in inkPresenter, impl::abi_arg_out inkIndependentInputSource) noexcept override { try { - *inkIndependentInputSource = detach(this->shim().Create(*reinterpret_cast(&inkPresenter))); + typename D::abi_guard guard(this->shim()); + *inkIndependentInputSource = detach_abi(this->shim().Create(*reinterpret_cast(&inkPresenter))); return S_OK; } catch (...) @@ -234,11 +253,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NewInkPoints(abi_arg_out> value) noexcept override + HRESULT __stdcall get_NewInkPoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NewInkPoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewInkPoints()); return S_OK; } catch (...) @@ -252,7 +272,8 @@ struct produceshim().PointerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerId()); return S_OK; } catch (...) @@ -265,7 +286,8 @@ struct produceshim().Disposition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Disposition()); return S_OK; } catch (...) @@ -278,6 +300,7 @@ struct produceshim()); this->shim().Disposition(value); return S_OK; } @@ -291,11 +314,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_WetStrokeStarting(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_WetStrokeStarting(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().WetStrokeStarting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().WetStrokeStarting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -308,6 +332,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().WetStrokeStarting(cookie); return S_OK; } @@ -317,11 +342,12 @@ struct produce } } - HRESULT __stdcall add_WetStrokeContinuing(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_WetStrokeContinuing(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().WetStrokeContinuing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().WetStrokeContinuing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -334,6 +360,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().WetStrokeContinuing(cookie); return S_OK; } @@ -343,11 +370,12 @@ struct produce } } - HRESULT __stdcall add_WetStrokeStopping(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_WetStrokeStopping(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().WetStrokeStopping(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().WetStrokeStopping(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -360,6 +388,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().WetStrokeStopping(cookie); return S_OK; } @@ -369,11 +398,12 @@ struct produce } } - HRESULT __stdcall add_WetStrokeCompleted(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_WetStrokeCompleted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().WetStrokeCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().WetStrokeCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -386,6 +416,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().WetStrokeCompleted(cookie); return S_OK; } @@ -395,11 +426,12 @@ struct produce } } - HRESULT __stdcall add_WetStrokeCanceled(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_WetStrokeCanceled(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().WetStrokeCanceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().WetStrokeCanceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -412,6 +444,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().WetStrokeCanceled(cookie); return S_OK; } @@ -421,11 +454,12 @@ struct produce } } - HRESULT __stdcall get_InkPresenter(abi_arg_out value) noexcept override + HRESULT __stdcall get_InkPresenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkPresenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkPresenter()); return S_OK; } catch (...) @@ -439,11 +473,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in inkPresenter, abi_arg_out WetStrokeUpdateSource) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in inkPresenter, impl::abi_arg_out WetStrokeUpdateSource) noexcept override { try { - *WetStrokeUpdateSource = detach(this->shim().Create(*reinterpret_cast(&inkPresenter))); + typename D::abi_guard guard(this->shim()); + *WetStrokeUpdateSource = detach_abi(this->shim().Create(*reinterpret_cast(&inkPresenter))); return S_OK; } catch (...) @@ -461,7 +496,7 @@ namespace Windows::UI::Input::Inking::Core { template event_token impl_ICoreInkIndependentInputSource::PointerEntering(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerEntering(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerEntering(get_abi(handler), &cookie)); return cookie; } @@ -472,13 +507,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerEntering(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerEntering(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerEntering(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerHovering(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerHovering(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerHovering(get_abi(handler), &cookie)); return cookie; } @@ -489,13 +524,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerHovering(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerHovering(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerHovering(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerExiting(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerExiting(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerExiting(get_abi(handler), &cookie)); return cookie; } @@ -506,13 +541,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerExiting(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerExiting(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerExiting(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerPressing(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerPressing(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerPressing(get_abi(handler), &cookie)); return cookie; } @@ -523,13 +558,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerPressing(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerPressing(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerPressing(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerMoving(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerMoving(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerMoving(get_abi(handler), &cookie)); return cookie; } @@ -540,13 +575,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerMoving(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerMoving(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerMoving(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerReleasing(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerReleasing(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerReleasing(get_abi(handler), &cookie)); return cookie; } @@ -557,13 +592,13 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerReleasing(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerReleasing(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerReleasing(cookie)); } template event_token impl_ICoreInkIndependentInputSource::PointerLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerLost(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->add_PointerLost(get_abi(handler), &cookie)); return cookie; } @@ -574,53 +609,53 @@ template event_revoker impl_ICoreIn template void impl_ICoreInkIndependentInputSource::PointerLost(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerLost(cookie)); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->remove_PointerLost(cookie)); } template Windows::UI::Input::Inking::InkPresenter impl_ICoreInkIndependentInputSource::InkPresenter() const { Windows::UI::Input::Inking::InkPresenter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InkPresenter(put(value))); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSource)->get_InkPresenter(put_abi(value))); return value; } template Windows::UI::Input::Inking::Core::CoreInkIndependentInputSource impl_ICoreInkIndependentInputSourceStatics::Create(const Windows::UI::Input::Inking::InkPresenter & inkPresenter) const { Windows::UI::Input::Inking::Core::CoreInkIndependentInputSource inkIndependentInputSource { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(inkPresenter), put(inkIndependentInputSource))); + check_hresult(WINRT_SHIM(ICoreInkIndependentInputSourceStatics)->abi_Create(get_abi(inkPresenter), put_abi(inkIndependentInputSource))); return inkIndependentInputSource; } template Windows::Foundation::Collections::IVector impl_ICoreWetStrokeUpdateEventArgs::NewInkPoints() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_NewInkPoints(put(value))); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateEventArgs)->get_NewInkPoints(put_abi(value))); return value; } template uint32_t impl_ICoreWetStrokeUpdateEventArgs::PointerId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerId(&value)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateEventArgs)->get_PointerId(&value)); return value; } template Windows::UI::Input::Inking::Core::CoreWetStrokeDisposition impl_ICoreWetStrokeUpdateEventArgs::Disposition() const { Windows::UI::Input::Inking::Core::CoreWetStrokeDisposition value {}; - check_hresult(static_cast(static_cast(*this))->get_Disposition(&value)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateEventArgs)->get_Disposition(&value)); return value; } template void impl_ICoreWetStrokeUpdateEventArgs::Disposition(Windows::UI::Input::Inking::Core::CoreWetStrokeDisposition value) const { - check_hresult(static_cast(static_cast(*this))->put_Disposition(value)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateEventArgs)->put_Disposition(value)); } template event_token impl_ICoreWetStrokeUpdateSource::WetStrokeStarting(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_WetStrokeStarting(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->add_WetStrokeStarting(get_abi(handler), &cookie)); return cookie; } @@ -631,13 +666,13 @@ template event_revoker impl_ICoreWetStr template void impl_ICoreWetStrokeUpdateSource::WetStrokeStarting(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_WetStrokeStarting(cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->remove_WetStrokeStarting(cookie)); } template event_token impl_ICoreWetStrokeUpdateSource::WetStrokeContinuing(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_WetStrokeContinuing(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->add_WetStrokeContinuing(get_abi(handler), &cookie)); return cookie; } @@ -648,13 +683,13 @@ template event_revoker impl_ICoreWetStr template void impl_ICoreWetStrokeUpdateSource::WetStrokeContinuing(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_WetStrokeContinuing(cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->remove_WetStrokeContinuing(cookie)); } template event_token impl_ICoreWetStrokeUpdateSource::WetStrokeStopping(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_WetStrokeStopping(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->add_WetStrokeStopping(get_abi(handler), &cookie)); return cookie; } @@ -665,13 +700,13 @@ template event_revoker impl_ICoreWetStr template void impl_ICoreWetStrokeUpdateSource::WetStrokeStopping(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_WetStrokeStopping(cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->remove_WetStrokeStopping(cookie)); } template event_token impl_ICoreWetStrokeUpdateSource::WetStrokeCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_WetStrokeCompleted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->add_WetStrokeCompleted(get_abi(handler), &cookie)); return cookie; } @@ -682,13 +717,13 @@ template event_revoker impl_ICoreWetStr template void impl_ICoreWetStrokeUpdateSource::WetStrokeCompleted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_WetStrokeCompleted(cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->remove_WetStrokeCompleted(cookie)); } template event_token impl_ICoreWetStrokeUpdateSource::WetStrokeCanceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_WetStrokeCanceled(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->add_WetStrokeCanceled(get_abi(handler), &cookie)); return cookie; } @@ -699,20 +734,20 @@ template event_revoker impl_ICoreWetStr template void impl_ICoreWetStrokeUpdateSource::WetStrokeCanceled(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_WetStrokeCanceled(cookie)); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->remove_WetStrokeCanceled(cookie)); } template Windows::UI::Input::Inking::InkPresenter impl_ICoreWetStrokeUpdateSource::InkPresenter() const { Windows::UI::Input::Inking::InkPresenter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InkPresenter(put(value))); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSource)->get_InkPresenter(put_abi(value))); return value; } template Windows::UI::Input::Inking::Core::CoreWetStrokeUpdateSource impl_ICoreWetStrokeUpdateSourceStatics::Create(const Windows::UI::Input::Inking::InkPresenter & inkPresenter) const { Windows::UI::Input::Inking::Core::CoreWetStrokeUpdateSource WetStrokeUpdateSource { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(inkPresenter), put(WetStrokeUpdateSource))); + check_hresult(WINRT_SHIM(ICoreWetStrokeUpdateSourceStatics)->abi_Create(get_abi(inkPresenter), put_abi(WetStrokeUpdateSource))); return WetStrokeUpdateSource; } @@ -729,3 +764,77 @@ inline Windows::UI::Input::Inking::Core::CoreWetStrokeUpdateSource CoreWetStroke } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::ICoreInkIndependentInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::ICoreInkIndependentInputSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::ICoreWetStrokeUpdateEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::ICoreWetStrokeUpdateSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::ICoreWetStrokeUpdateSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::CoreInkIndependentInputSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::CoreWetStrokeUpdateEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::Core::CoreWetStrokeUpdateSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Input.Inking.h b/10.0.14393.0/winrt/Windows.UI.Input.Inking.h index 27089f479..138bd5b37 100644 --- a/10.0.14393.0/winrt/Windows.UI.Input.Inking.h +++ b/10.0.14393.0/winrt/Windows.UI.Input.Inking.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.Core.3.h" #include "internal/Windows.Foundation.3.h" @@ -19,11 +22,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Color(abi_arg_out value) noexcept override + HRESULT __stdcall get_Color(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Color()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Color()); return S_OK; } catch (...) @@ -32,10 +36,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Color(abi_arg_in value) noexcept override + HRESULT __stdcall put_Color(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Color(*reinterpret_cast(&value)); return S_OK; } @@ -49,7 +54,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PenTip()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenTip()); return S_OK; } catch (...) @@ -62,6 +68,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().PenTip(value); return S_OK; } @@ -71,11 +78,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Size(abi_arg_out value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -84,10 +92,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Size(abi_arg_in value) noexcept override + HRESULT __stdcall put_Size(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Size(*reinterpret_cast(&value)); return S_OK; } @@ -101,7 +110,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IgnorePressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IgnorePressure()); return S_OK; } catch (...) @@ -114,6 +124,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IgnorePressure(value); return S_OK; } @@ -127,7 +138,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().FitToCurve()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FitToCurve()); return S_OK; } catch (...) @@ -140,6 +152,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().FitToCurve(value); return S_OK; } @@ -153,11 +166,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_PenTipTransform(abi_arg_out value) noexcept override + HRESULT __stdcall get_PenTipTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PenTipTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenTipTransform()); return S_OK; } catch (...) @@ -166,10 +180,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_PenTipTransform(abi_arg_in value) noexcept override + HRESULT __stdcall put_PenTipTransform(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PenTipTransform(*reinterpret_cast(&value)); return S_OK; } @@ -183,7 +198,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().DrawAsHighlighter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DrawAsHighlighter()); return S_OK; } catch (...) @@ -196,6 +212,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().DrawAsHighlighter(value); return S_OK; } @@ -213,7 +230,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -222,11 +240,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PencilProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_PencilProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PencilProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PencilProperties()); return S_OK; } catch (...) @@ -244,7 +263,8 @@ struct produceshim().Opacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opacity()); return S_OK; } catch (...) @@ -257,6 +277,7 @@ struct produceshim()); this->shim().Opacity(value); return S_OK; } @@ -270,11 +291,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateForPencil(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateForPencil(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateForPencil()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateForPencil()); return S_OK; } catch (...) @@ -292,7 +314,8 @@ struct produce { try { - *value = detach(this->shim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -305,6 +328,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Mode(value); return S_OK; } @@ -318,7 +342,8 @@ struct produce { try { - *value = detach(this->shim().RightDragAction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightDragAction()); return S_OK; } catch (...) @@ -331,6 +356,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().RightDragAction(value); return S_OK; } @@ -348,7 +374,8 @@ struct produce : produce_baseshim().Mode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Mode()); return S_OK; } catch (...) @@ -361,6 +388,7 @@ struct produce : produce_baseshim()); this->shim().Mode(value); return S_OK; } @@ -370,10 +398,11 @@ struct produce : produce_base pointerPoint) noexcept override + HRESULT __stdcall abi_ProcessPointerDown(impl::abi_arg_in pointerPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessPointerDown(*reinterpret_cast(&pointerPoint)); return S_OK; } @@ -383,11 +412,12 @@ struct produce : produce_base pointerPoint, abi_arg_out updateInformation) noexcept override + HRESULT __stdcall abi_ProcessPointerUpdate(impl::abi_arg_in pointerPoint, impl::abi_arg_out updateInformation) noexcept override { try { - *updateInformation = detach(this->shim().ProcessPointerUpdate(*reinterpret_cast(&pointerPoint))); + typename D::abi_guard guard(this->shim()); + *updateInformation = detach_abi(this->shim().ProcessPointerUpdate(*reinterpret_cast(&pointerPoint))); return S_OK; } catch (...) @@ -397,11 +427,12 @@ struct produce : produce_base pointerPoint, abi_arg_out updateRectangle) noexcept override + HRESULT __stdcall abi_ProcessPointerUp(impl::abi_arg_in pointerPoint, impl::abi_arg_out updateRectangle) noexcept override { try { - *updateRectangle = detach(this->shim().ProcessPointerUp(*reinterpret_cast(&pointerPoint))); + typename D::abi_guard guard(this->shim()); + *updateRectangle = detach_abi(this->shim().ProcessPointerUp(*reinterpret_cast(&pointerPoint))); return S_OK; } catch (...) @@ -410,10 +441,11 @@ struct produce : produce_base drawingAttributes) noexcept override + HRESULT __stdcall abi_SetDefaultDrawingAttributes(impl::abi_arg_in drawingAttributes) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultDrawingAttributes(*reinterpret_cast(&drawingAttributes)); return S_OK; } @@ -423,11 +455,12 @@ struct produce : produce_base>> recognitionResults) noexcept override + HRESULT __stdcall abi_RecognizeAsync2(Windows::UI::Input::Inking::InkRecognitionTarget recognitionTarget, impl::abi_arg_out>> recognitionResults) noexcept override { try { - *recognitionResults = detach(this->shim().RecognizeAsync(recognitionTarget)); + typename D::abi_guard guard(this->shim()); + *recognitionResults = detach_abi(this->shim().RecognizeAsync(recognitionTarget)); return S_OK; } catch (...) @@ -441,11 +474,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -458,7 +492,8 @@ struct produce : produce_baseshim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -471,11 +506,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInkPoint(abi_arg_in position, float pressure, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateInkPoint(impl::abi_arg_in position, float pressure, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateInkPoint(*reinterpret_cast(&position), pressure)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateInkPoint(*reinterpret_cast(&position), pressure)); return S_OK; } catch (...) @@ -493,7 +529,8 @@ struct produce : produce_baseshim().IsInputEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInputEnabled()); return S_OK; } catch (...) @@ -506,6 +543,7 @@ struct produce : produce_baseshim()); this->shim().IsInputEnabled(value); return S_OK; } @@ -519,7 +557,8 @@ struct produce : produce_baseshim().InputDeviceTypes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputDeviceTypes()); return S_OK; } catch (...) @@ -532,6 +571,7 @@ struct produce : produce_baseshim()); this->shim().InputDeviceTypes(value); return S_OK; } @@ -541,11 +581,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UnprocessedInput(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UnprocessedInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnprocessedInput()); return S_OK; } catch (...) @@ -555,11 +596,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StrokeInput(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeInput()); return S_OK; } catch (...) @@ -569,11 +611,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputProcessingConfiguration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputProcessingConfiguration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputProcessingConfiguration()); return S_OK; } catch (...) @@ -583,11 +626,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StrokeContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeContainer()); return S_OK; } catch (...) @@ -597,10 +641,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_StrokeContainer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeContainer(*reinterpret_cast(&value)); return S_OK; } @@ -610,11 +655,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_CopyDefaultDrawingAttributes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CopyDefaultDrawingAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CopyDefaultDrawingAttributes()); return S_OK; } catch (...) @@ -624,10 +670,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_UpdateDefaultDrawingAttributes(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateDefaultDrawingAttributes(*reinterpret_cast(&value)); return S_OK; } @@ -637,11 +684,12 @@ struct produce : produce_base inkSynchronizer) noexcept override + HRESULT __stdcall abi_ActivateCustomDrying(impl::abi_arg_out inkSynchronizer) noexcept override { try { - *inkSynchronizer = detach(this->shim().ActivateCustomDrying()); + typename D::abi_guard guard(this->shim()); + *inkSynchronizer = detach_abi(this->shim().ActivateCustomDrying()); return S_OK; } catch (...) @@ -655,6 +703,7 @@ struct produce : produce_baseshim()); this->shim().SetPredefinedConfiguration(value); return S_OK; } @@ -664,11 +713,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokesCollected(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokesCollected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokesCollected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -681,6 +731,7 @@ struct produce : produce_baseshim()); this->shim().StrokesCollected(cookie); return S_OK; } @@ -690,11 +741,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokesErased(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokesErased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokesErased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -707,6 +759,7 @@ struct produce : produce_baseshim()); this->shim().StrokesErased(cookie); return S_OK; } @@ -724,7 +777,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -737,6 +791,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Length(value); return S_OK; } @@ -750,7 +805,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -763,6 +819,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Width(value); return S_OK; } @@ -776,11 +833,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in inkPresenter, abi_arg_out inkPresenterRuler) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in inkPresenter, impl::abi_arg_out inkPresenterRuler) noexcept override { try { - *inkPresenterRuler = detach(this->shim().Create(*reinterpret_cast(&inkPresenter))); + typename D::abi_guard guard(this->shim()); + *inkPresenterRuler = detach_abi(this->shim().Create(*reinterpret_cast(&inkPresenter))); return S_OK; } catch (...) @@ -798,7 +856,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -811,7 +870,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVisible()); return S_OK; } catch (...) @@ -824,6 +884,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsVisible(value); return S_OK; } @@ -833,11 +894,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -846,10 +908,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_BackgroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -859,11 +922,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ForegroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -872,10 +936,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_ForegroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -885,11 +950,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Transform(abi_arg_out value) noexcept override + HRESULT __stdcall get_Transform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Transform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Transform()); return S_OK; } catch (...) @@ -898,10 +964,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Transform(abi_arg_in value) noexcept override + HRESULT __stdcall put_Transform(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Transform(*reinterpret_cast(&value)); return S_OK; } @@ -915,11 +982,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_BoundingRect(abi_arg_out boundingRect) noexcept override + HRESULT __stdcall get_BoundingRect(impl::abi_arg_out boundingRect) noexcept override { try { - *boundingRect = detach(this->shim().BoundingRect()); + typename D::abi_guard guard(this->shim()); + *boundingRect = detach_abi(this->shim().BoundingRect()); return S_OK; } catch (...) @@ -928,11 +996,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetTextCandidates(abi_arg_out> textCandidates) noexcept override + HRESULT __stdcall abi_GetTextCandidates(impl::abi_arg_out> textCandidates) noexcept override { try { - *textCandidates = detach(this->shim().GetTextCandidates()); + typename D::abi_guard guard(this->shim()); + *textCandidates = detach_abi(this->shim().GetTextCandidates()); return S_OK; } catch (...) @@ -942,11 +1011,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetStrokes(abi_arg_out> strokes) noexcept override + HRESULT __stdcall abi_GetStrokes(impl::abi_arg_out> strokes) noexcept override { try { - *strokes = detach(this->shim().GetStrokes()); + typename D::abi_guard guard(this->shim()); + *strokes = detach_abi(this->shim().GetStrokes()); return S_OK; } catch (...) @@ -960,11 +1030,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -978,10 +1049,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_SetDefaultRecognizer(abi_arg_in recognizer) noexcept override + HRESULT __stdcall abi_SetDefaultRecognizer(impl::abi_arg_in recognizer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultRecognizer(*reinterpret_cast(&recognizer)); return S_OK; } @@ -991,11 +1063,12 @@ struct produce : produce } } - HRESULT __stdcall abi_RecognizeAsync(abi_arg_in strokeCollection, Windows::UI::Input::Inking::InkRecognitionTarget recognitionTarget, abi_arg_out>> recognitionResults) noexcept override + HRESULT __stdcall abi_RecognizeAsync(impl::abi_arg_in strokeCollection, Windows::UI::Input::Inking::InkRecognitionTarget recognitionTarget, impl::abi_arg_out>> recognitionResults) noexcept override { try { - *recognitionResults = detach(this->shim().RecognizeAsync(*reinterpret_cast(&strokeCollection), recognitionTarget)); + typename D::abi_guard guard(this->shim()); + *recognitionResults = detach_abi(this->shim().RecognizeAsync(*reinterpret_cast(&strokeCollection), recognitionTarget)); return S_OK; } catch (...) @@ -1005,11 +1078,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetRecognizers(abi_arg_out> recognizerView) noexcept override + HRESULT __stdcall abi_GetRecognizers(impl::abi_arg_out> recognizerView) noexcept override { try { - *recognizerView = detach(this->shim().GetRecognizers()); + typename D::abi_guard guard(this->shim()); + *recognizerView = detach_abi(this->shim().GetRecognizers()); return S_OK; } catch (...) @@ -1023,11 +1097,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_DrawingAttributes(abi_arg_out value) noexcept override + HRESULT __stdcall get_DrawingAttributes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DrawingAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DrawingAttributes()); return S_OK; } catch (...) @@ -1037,10 +1112,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DrawingAttributes(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DrawingAttributes(*reinterpret_cast(&value)); return S_OK; } @@ -1050,11 +1126,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BoundingRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingRect()); return S_OK; } catch (...) @@ -1067,7 +1144,8 @@ struct produce : produce_baseshim().Selected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selected()); return S_OK; } catch (...) @@ -1080,6 +1158,7 @@ struct produce : produce_baseshim()); this->shim().Selected(value); return S_OK; } @@ -1093,7 +1172,8 @@ struct produce : produce_baseshim().Recognized()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Recognized()); return S_OK; } catch (...) @@ -1102,11 +1182,12 @@ struct produce : produce_base> renderingSegments) noexcept override + HRESULT __stdcall abi_GetRenderingSegments(impl::abi_arg_out> renderingSegments) noexcept override { try { - *renderingSegments = detach(this->shim().GetRenderingSegments()); + typename D::abi_guard guard(this->shim()); + *renderingSegments = detach_abi(this->shim().GetRenderingSegments()); return S_OK; } catch (...) @@ -1116,11 +1197,12 @@ struct produce : produce_base clonedStroke) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out clonedStroke) noexcept override { try { - *clonedStroke = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *clonedStroke = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -1134,11 +1216,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PointTransform(abi_arg_out value) noexcept override + HRESULT __stdcall get_PointTransform(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointTransform()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointTransform()); return S_OK; } catch (...) @@ -1147,10 +1230,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PointTransform(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointTransform(*reinterpret_cast(&value)); return S_OK; } @@ -1160,11 +1244,12 @@ struct produce : produce_base> inkPoints) noexcept override + HRESULT __stdcall abi_GetInkPoints(impl::abi_arg_out> inkPoints) noexcept override { try { - *inkPoints = detach(this->shim().GetInkPoints()); + typename D::abi_guard guard(this->shim()); + *inkPoints = detach_abi(this->shim().GetInkPoints()); return S_OK; } catch (...) @@ -1178,10 +1263,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_BeginStroke(abi_arg_in pointerPoint) noexcept override + HRESULT __stdcall abi_BeginStroke(impl::abi_arg_in pointerPoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BeginStroke(*reinterpret_cast(&pointerPoint)); return S_OK; } @@ -1191,11 +1277,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_AppendToStroke(abi_arg_in pointerPoint, abi_arg_out previousPointerPoint) noexcept override + HRESULT __stdcall abi_AppendToStroke(impl::abi_arg_in pointerPoint, impl::abi_arg_out previousPointerPoint) noexcept override { try { - *previousPointerPoint = detach(this->shim().AppendToStroke(*reinterpret_cast(&pointerPoint))); + typename D::abi_guard guard(this->shim()); + *previousPointerPoint = detach_abi(this->shim().AppendToStroke(*reinterpret_cast(&pointerPoint))); return S_OK; } catch (...) @@ -1205,11 +1292,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_EndStroke(abi_arg_in pointerPoint, abi_arg_out stroke) noexcept override + HRESULT __stdcall abi_EndStroke(impl::abi_arg_in pointerPoint, impl::abi_arg_out stroke) noexcept override { try { - *stroke = detach(this->shim().EndStroke(*reinterpret_cast(&pointerPoint))); + typename D::abi_guard guard(this->shim()); + *stroke = detach_abi(this->shim().EndStroke(*reinterpret_cast(&pointerPoint))); return S_OK; } catch (...) @@ -1219,11 +1307,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_CreateStroke(abi_arg_in> points, abi_arg_out stroke) noexcept override + HRESULT __stdcall abi_CreateStroke(impl::abi_arg_in> points, impl::abi_arg_out stroke) noexcept override { try { - *stroke = detach(this->shim().CreateStroke(*reinterpret_cast *>(&points))); + typename D::abi_guard guard(this->shim()); + *stroke = detach_abi(this->shim().CreateStroke(*reinterpret_cast *>(&points))); return S_OK; } catch (...) @@ -1233,10 +1322,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_SetDefaultDrawingAttributes(abi_arg_in drawingAttributes) noexcept override + HRESULT __stdcall abi_SetDefaultDrawingAttributes(impl::abi_arg_in drawingAttributes) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultDrawingAttributes(*reinterpret_cast(&drawingAttributes)); return S_OK; } @@ -1250,11 +1340,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateStrokeFromInkPoints(abi_arg_in> inkPoints, abi_arg_in transform, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateStrokeFromInkPoints(impl::abi_arg_in> inkPoints, impl::abi_arg_in transform, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateStrokeFromInkPoints(*reinterpret_cast *>(&inkPoints), *reinterpret_cast(&transform))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateStrokeFromInkPoints(*reinterpret_cast *>(&inkPoints), *reinterpret_cast(&transform))); return S_OK; } catch (...) @@ -1268,11 +1359,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_BoundingRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundingRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingRect()); return S_OK; } catch (...) @@ -1281,10 +1373,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_AddStroke(abi_arg_in stroke) noexcept override + HRESULT __stdcall abi_AddStroke(impl::abi_arg_in stroke) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStroke(*reinterpret_cast(&stroke)); return S_OK; } @@ -1294,11 +1387,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_DeleteSelected(abi_arg_out invalidatedRect) noexcept override + HRESULT __stdcall abi_DeleteSelected(impl::abi_arg_out invalidatedRect) noexcept override { try { - *invalidatedRect = detach(this->shim().DeleteSelected()); + typename D::abi_guard guard(this->shim()); + *invalidatedRect = detach_abi(this->shim().DeleteSelected()); return S_OK; } catch (...) @@ -1307,11 +1401,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_MoveSelected(abi_arg_in translation, abi_arg_out invalidatedRectangle) noexcept override + HRESULT __stdcall abi_MoveSelected(impl::abi_arg_in translation, impl::abi_arg_out invalidatedRectangle) noexcept override { try { - *invalidatedRectangle = detach(this->shim().MoveSelected(*reinterpret_cast(&translation))); + typename D::abi_guard guard(this->shim()); + *invalidatedRectangle = detach_abi(this->shim().MoveSelected(*reinterpret_cast(&translation))); return S_OK; } catch (...) @@ -1320,11 +1415,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SelectWithPolyLine(abi_arg_in> polyline, abi_arg_out invalidatedRectangle) noexcept override + HRESULT __stdcall abi_SelectWithPolyLine(impl::abi_arg_in> polyline, impl::abi_arg_out invalidatedRectangle) noexcept override { try { - *invalidatedRectangle = detach(this->shim().SelectWithPolyLine(*reinterpret_cast *>(&polyline))); + typename D::abi_guard guard(this->shim()); + *invalidatedRectangle = detach_abi(this->shim().SelectWithPolyLine(*reinterpret_cast *>(&polyline))); return S_OK; } catch (...) @@ -1333,11 +1429,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SelectWithLine(abi_arg_in from, abi_arg_in to, abi_arg_out invalidatedRectangle) noexcept override + HRESULT __stdcall abi_SelectWithLine(impl::abi_arg_in from, impl::abi_arg_in to, impl::abi_arg_out invalidatedRectangle) noexcept override { try { - *invalidatedRectangle = detach(this->shim().SelectWithLine(*reinterpret_cast(&from), *reinterpret_cast(&to))); + typename D::abi_guard guard(this->shim()); + *invalidatedRectangle = detach_abi(this->shim().SelectWithLine(*reinterpret_cast(&from), *reinterpret_cast(&to))); return S_OK; } catch (...) @@ -1350,6 +1447,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CopySelectedToClipboard(); return S_OK; } @@ -1359,11 +1457,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_PasteFromClipboard(abi_arg_in position, abi_arg_out invalidatedRectangle) noexcept override + HRESULT __stdcall abi_PasteFromClipboard(impl::abi_arg_in position, impl::abi_arg_out invalidatedRectangle) noexcept override { try { - *invalidatedRectangle = detach(this->shim().PasteFromClipboard(*reinterpret_cast(&position))); + typename D::abi_guard guard(this->shim()); + *invalidatedRectangle = detach_abi(this->shim().PasteFromClipboard(*reinterpret_cast(&position))); return S_OK; } catch (...) @@ -1376,7 +1475,8 @@ struct produce : produce_bas { try { - *canPaste = detach(this->shim().CanPasteFromClipboard()); + typename D::abi_guard guard(this->shim()); + *canPaste = detach_abi(this->shim().CanPasteFromClipboard()); return S_OK; } catch (...) @@ -1385,11 +1485,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_LoadAsync(abi_arg_in inputStream, abi_arg_out> loadAction) noexcept override + HRESULT __stdcall abi_LoadAsync(impl::abi_arg_in inputStream, impl::abi_arg_out> loadAction) noexcept override { try { - *loadAction = detach(this->shim().LoadAsync(*reinterpret_cast(&inputStream))); + typename D::abi_guard guard(this->shim()); + *loadAction = detach_abi(this->shim().LoadAsync(*reinterpret_cast(&inputStream))); return S_OK; } catch (...) @@ -1399,11 +1500,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_SaveAsync(abi_arg_in outputStream, abi_arg_out> outputStreamOperation) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_in outputStream, impl::abi_arg_out> outputStreamOperation) noexcept override { try { - *outputStreamOperation = detach(this->shim().SaveAsync(*reinterpret_cast(&outputStream))); + typename D::abi_guard guard(this->shim()); + *outputStreamOperation = detach_abi(this->shim().SaveAsync(*reinterpret_cast(&outputStream))); return S_OK; } catch (...) @@ -1413,10 +1515,11 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_UpdateRecognitionResults(abi_arg_in> recognitionResults) noexcept override + HRESULT __stdcall abi_UpdateRecognitionResults(impl::abi_arg_in> recognitionResults) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UpdateRecognitionResults(*reinterpret_cast *>(&recognitionResults)); return S_OK; } @@ -1426,11 +1529,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetStrokes(abi_arg_out> strokeView) noexcept override + HRESULT __stdcall abi_GetStrokes(impl::abi_arg_out> strokeView) noexcept override { try { - *strokeView = detach(this->shim().GetStrokes()); + typename D::abi_guard guard(this->shim()); + *strokeView = detach_abi(this->shim().GetStrokes()); return S_OK; } catch (...) @@ -1440,11 +1544,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetRecognitionResults(abi_arg_out> recognitionResults) noexcept override + HRESULT __stdcall abi_GetRecognitionResults(impl::abi_arg_out> recognitionResults) noexcept override { try { - *recognitionResults = detach(this->shim().GetRecognitionResults()); + typename D::abi_guard guard(this->shim()); + *recognitionResults = detach_abi(this->shim().GetRecognitionResults()); return S_OK; } catch (...) @@ -1458,10 +1563,11 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_AddStrokes(abi_arg_in> strokes) noexcept override + HRESULT __stdcall abi_AddStrokes(impl::abi_arg_in> strokes) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddStrokes(*reinterpret_cast *>(&strokes)); return S_OK; } @@ -1475,6 +1581,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -1488,11 +1595,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall add_StrokeStarted(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokeStarted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokeStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokeStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1505,6 +1613,7 @@ struct produce : produce_baseshim()); this->shim().StrokeStarted(cookie); return S_OK; } @@ -1514,11 +1623,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokeContinued(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokeContinued(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokeContinued(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1531,6 +1641,7 @@ struct produce : produce_baseshim()); this->shim().StrokeContinued(cookie); return S_OK; } @@ -1540,11 +1651,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokeEnded(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokeEnded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokeEnded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1557,6 +1669,7 @@ struct produce : produce_baseshim()); this->shim().StrokeEnded(cookie); return S_OK; } @@ -1566,11 +1679,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_StrokeCanceled(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().StrokeCanceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().StrokeCanceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1583,6 +1697,7 @@ struct produce : produce_baseshim()); this->shim().StrokeCanceled(cookie); return S_OK; } @@ -1592,11 +1707,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InkPresenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkPresenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkPresenter()); return S_OK; } catch (...) @@ -1610,11 +1726,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1623,11 +1740,12 @@ struct produce : prod } } - HRESULT __stdcall get_BezierControlPoint1(abi_arg_out value) noexcept override + HRESULT __stdcall get_BezierControlPoint1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BezierControlPoint1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BezierControlPoint1()); return S_OK; } catch (...) @@ -1636,11 +1754,12 @@ struct produce : prod } } - HRESULT __stdcall get_BezierControlPoint2(abi_arg_out value) noexcept override + HRESULT __stdcall get_BezierControlPoint2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BezierControlPoint2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BezierControlPoint2()); return S_OK; } catch (...) @@ -1653,7 +1772,8 @@ struct produce : prod { try { - *value = detach(this->shim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -1666,7 +1786,8 @@ struct produce : prod { try { - *value = detach(this->shim().TiltX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltX()); return S_OK; } catch (...) @@ -1679,7 +1800,8 @@ struct produce : prod { try { - *value = detach(this->shim().TiltY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltY()); return S_OK; } catch (...) @@ -1692,7 +1814,8 @@ struct produce : prod { try { - *value = detach(this->shim().Twist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Twist()); return S_OK; } catch (...) @@ -1705,11 +1828,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Strokes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Strokes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Strokes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Strokes()); return S_OK; } catch (...) @@ -1723,11 +1847,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Strokes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Strokes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Strokes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Strokes()); return S_OK; } catch (...) @@ -1741,11 +1866,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_BeginDry(abi_arg_out> inkStrokes) noexcept override + HRESULT __stdcall abi_BeginDry(impl::abi_arg_out> inkStrokes) noexcept override { try { - *inkStrokes = detach(this->shim().BeginDry()); + typename D::abi_guard guard(this->shim()); + *inkStrokes = detach_abi(this->shim().BeginDry()); return S_OK; } catch (...) @@ -1759,6 +1885,7 @@ struct produce : produce_baseshim()); this->shim().EndDry(); return S_OK; } @@ -1772,11 +1899,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_PointerEntered(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerEntered(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerEntered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1789,6 +1917,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerEntered(cookie); return S_OK; } @@ -1798,11 +1927,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerHovered(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerHovered(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerHovered(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerHovered(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1815,6 +1945,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerHovered(cookie); return S_OK; } @@ -1824,11 +1955,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerExited(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerExited(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerExited(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerExited(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1841,6 +1973,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerExited(cookie); return S_OK; } @@ -1850,11 +1983,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerPressed(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerPressed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerPressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1867,6 +2001,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerPressed(cookie); return S_OK; } @@ -1876,11 +2011,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerMoved(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerMoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerMoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1893,6 +2029,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerMoved(cookie); return S_OK; } @@ -1902,11 +2039,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerReleased(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerReleased(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1919,6 +2057,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerReleased(cookie); return S_OK; } @@ -1928,11 +2067,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_PointerLost(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_PointerLost(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().PointerLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().PointerLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1945,6 +2085,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerLost(cookie); return S_OK; } @@ -1954,11 +2095,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_InkPresenter(abi_arg_out value) noexcept override + HRESULT __stdcall get_InkPresenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkPresenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkPresenter()); return S_OK; } catch (...) @@ -1976,102 +2118,102 @@ namespace Windows::UI::Input::Inking { template Windows::Foundation::Collections::IVectorView impl_IInkStrokesCollectedEventArgs::Strokes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Strokes(put(value))); + check_hresult(WINRT_SHIM(IInkStrokesCollectedEventArgs)->get_Strokes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IInkStrokesErasedEventArgs::Strokes() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Strokes(put(value))); + check_hresult(WINRT_SHIM(IInkStrokesErasedEventArgs)->get_Strokes(put_abi(value))); return value; } template bool impl_IInkPresenter::IsInputEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInputEnabled(&value)); + check_hresult(WINRT_SHIM(IInkPresenter)->get_IsInputEnabled(&value)); return value; } template void impl_IInkPresenter::IsInputEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInputEnabled(value)); + check_hresult(WINRT_SHIM(IInkPresenter)->put_IsInputEnabled(value)); } template Windows::UI::Core::CoreInputDeviceTypes impl_IInkPresenter::InputDeviceTypes() const { Windows::UI::Core::CoreInputDeviceTypes value {}; - check_hresult(static_cast(static_cast(*this))->get_InputDeviceTypes(&value)); + check_hresult(WINRT_SHIM(IInkPresenter)->get_InputDeviceTypes(&value)); return value; } template void impl_IInkPresenter::InputDeviceTypes(Windows::UI::Core::CoreInputDeviceTypes value) const { - check_hresult(static_cast(static_cast(*this))->put_InputDeviceTypes(value)); + check_hresult(WINRT_SHIM(IInkPresenter)->put_InputDeviceTypes(value)); } template Windows::UI::Input::Inking::InkUnprocessedInput impl_IInkPresenter::UnprocessedInput() const { Windows::UI::Input::Inking::InkUnprocessedInput value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UnprocessedInput(put(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->get_UnprocessedInput(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkStrokeInput impl_IInkPresenter::StrokeInput() const { Windows::UI::Input::Inking::InkStrokeInput value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StrokeInput(put(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->get_StrokeInput(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkInputProcessingConfiguration impl_IInkPresenter::InputProcessingConfiguration() const { Windows::UI::Input::Inking::InkInputProcessingConfiguration value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputProcessingConfiguration(put(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->get_InputProcessingConfiguration(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkStrokeContainer impl_IInkPresenter::StrokeContainer() const { Windows::UI::Input::Inking::InkStrokeContainer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StrokeContainer(put(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->get_StrokeContainer(put_abi(value))); return value; } template void impl_IInkPresenter::StrokeContainer(const Windows::UI::Input::Inking::InkStrokeContainer & value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeContainer(get(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->put_StrokeContainer(get_abi(value))); } template Windows::UI::Input::Inking::InkDrawingAttributes impl_IInkPresenter::CopyDefaultDrawingAttributes() const { Windows::UI::Input::Inking::InkDrawingAttributes value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CopyDefaultDrawingAttributes(put(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->abi_CopyDefaultDrawingAttributes(put_abi(value))); return value; } template void impl_IInkPresenter::UpdateDefaultDrawingAttributes(const Windows::UI::Input::Inking::InkDrawingAttributes & value) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateDefaultDrawingAttributes(get(value))); + check_hresult(WINRT_SHIM(IInkPresenter)->abi_UpdateDefaultDrawingAttributes(get_abi(value))); } template Windows::UI::Input::Inking::InkSynchronizer impl_IInkPresenter::ActivateCustomDrying() const { Windows::UI::Input::Inking::InkSynchronizer inkSynchronizer { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ActivateCustomDrying(put(inkSynchronizer))); + check_hresult(WINRT_SHIM(IInkPresenter)->abi_ActivateCustomDrying(put_abi(inkSynchronizer))); return inkSynchronizer; } template void impl_IInkPresenter::SetPredefinedConfiguration(Windows::UI::Input::Inking::InkPresenterPredefinedConfiguration value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPredefinedConfiguration(value)); + check_hresult(WINRT_SHIM(IInkPresenter)->abi_SetPredefinedConfiguration(value)); } template event_token impl_IInkPresenter::StrokesCollected(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokesCollected(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkPresenter)->add_StrokesCollected(get_abi(handler), &cookie)); return cookie; } @@ -2082,13 +2224,13 @@ template event_revoker impl_IInkPresenter::Stroke template void impl_IInkPresenter::StrokesCollected(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokesCollected(cookie)); + check_hresult(WINRT_SHIM(IInkPresenter)->remove_StrokesCollected(cookie)); } template event_token impl_IInkPresenter::StrokesErased(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokesErased(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkPresenter)->add_StrokesErased(get_abi(handler), &cookie)); return cookie; } @@ -2099,49 +2241,49 @@ template event_revoker impl_IInkPresenter::Stroke template void impl_IInkPresenter::StrokesErased(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokesErased(cookie)); + check_hresult(WINRT_SHIM(IInkPresenter)->remove_StrokesErased(cookie)); } template Windows::UI::Input::Inking::InkInputProcessingMode impl_IInkInputProcessingConfiguration::Mode() const { Windows::UI::Input::Inking::InkInputProcessingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IInkInputProcessingConfiguration)->get_Mode(&value)); return value; } template void impl_IInkInputProcessingConfiguration::Mode(Windows::UI::Input::Inking::InkInputProcessingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IInkInputProcessingConfiguration)->put_Mode(value)); } template Windows::UI::Input::Inking::InkInputRightDragAction impl_IInkInputProcessingConfiguration::RightDragAction() const { Windows::UI::Input::Inking::InkInputRightDragAction value {}; - check_hresult(static_cast(static_cast(*this))->get_RightDragAction(&value)); + check_hresult(WINRT_SHIM(IInkInputProcessingConfiguration)->get_RightDragAction(&value)); return value; } template void impl_IInkInputProcessingConfiguration::RightDragAction(Windows::UI::Input::Inking::InkInputRightDragAction value) const { - check_hresult(static_cast(static_cast(*this))->put_RightDragAction(value)); + check_hresult(WINRT_SHIM(IInkInputProcessingConfiguration)->put_RightDragAction(value)); } template Windows::Foundation::Collections::IVectorView impl_IInkSynchronizer::BeginDry() const { Windows::Foundation::Collections::IVectorView inkStrokes; - check_hresult(static_cast(static_cast(*this))->abi_BeginDry(put(inkStrokes))); + check_hresult(WINRT_SHIM(IInkSynchronizer)->abi_BeginDry(put_abi(inkStrokes))); return inkStrokes; } template void impl_IInkSynchronizer::EndDry() const { - check_hresult(static_cast(static_cast(*this))->abi_EndDry()); + check_hresult(WINRT_SHIM(IInkSynchronizer)->abi_EndDry()); } template event_token impl_IInkUnprocessedInput::PointerEntered(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerEntered(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerEntered(get_abi(handler), &cookie)); return cookie; } @@ -2152,13 +2294,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerEntered(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerEntered(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerEntered(cookie)); } template event_token impl_IInkUnprocessedInput::PointerHovered(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerHovered(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerHovered(get_abi(handler), &cookie)); return cookie; } @@ -2169,13 +2311,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerHovered(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerHovered(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerHovered(cookie)); } template event_token impl_IInkUnprocessedInput::PointerExited(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerExited(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerExited(get_abi(handler), &cookie)); return cookie; } @@ -2186,13 +2328,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerExited(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerExited(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerExited(cookie)); } template event_token impl_IInkUnprocessedInput::PointerPressed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerPressed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerPressed(get_abi(handler), &cookie)); return cookie; } @@ -2203,13 +2345,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerPressed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerPressed(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerPressed(cookie)); } template event_token impl_IInkUnprocessedInput::PointerMoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerMoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerMoved(get_abi(handler), &cookie)); return cookie; } @@ -2220,13 +2362,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerMoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerMoved(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerMoved(cookie)); } template event_token impl_IInkUnprocessedInput::PointerReleased(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerReleased(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerReleased(get_abi(handler), &cookie)); return cookie; } @@ -2237,13 +2379,13 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerReleased(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerReleased(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerReleased(cookie)); } template event_token impl_IInkUnprocessedInput::PointerLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_PointerLost(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->add_PointerLost(get_abi(handler), &cookie)); return cookie; } @@ -2254,20 +2396,20 @@ template event_revoker impl_IInkUnprocessedIn template void impl_IInkUnprocessedInput::PointerLost(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_PointerLost(cookie)); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->remove_PointerLost(cookie)); } template Windows::UI::Input::Inking::InkPresenter impl_IInkUnprocessedInput::InkPresenter() const { Windows::UI::Input::Inking::InkPresenter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InkPresenter(put(value))); + check_hresult(WINRT_SHIM(IInkUnprocessedInput)->get_InkPresenter(put_abi(value))); return value; } template event_token impl_IInkStrokeInput::StrokeStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokeStarted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->add_StrokeStarted(get_abi(handler), &cookie)); return cookie; } @@ -2278,13 +2420,13 @@ template event_revoker impl_IInkStrokeInput::St template void impl_IInkStrokeInput::StrokeStarted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokeStarted(cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->remove_StrokeStarted(cookie)); } template event_token impl_IInkStrokeInput::StrokeContinued(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokeContinued(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->add_StrokeContinued(get_abi(handler), &cookie)); return cookie; } @@ -2295,13 +2437,13 @@ template event_revoker impl_IInkStrokeInput::St template void impl_IInkStrokeInput::StrokeContinued(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokeContinued(cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->remove_StrokeContinued(cookie)); } template event_token impl_IInkStrokeInput::StrokeEnded(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokeEnded(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->add_StrokeEnded(get_abi(handler), &cookie)); return cookie; } @@ -2312,13 +2454,13 @@ template event_revoker impl_IInkStrokeInput::St template void impl_IInkStrokeInput::StrokeEnded(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokeEnded(cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->remove_StrokeEnded(cookie)); } template event_token impl_IInkStrokeInput::StrokeCanceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_StrokeCanceled(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->add_StrokeCanceled(get_abi(handler), &cookie)); return cookie; } @@ -2329,587 +2471,587 @@ template event_revoker impl_IInkStrokeInput::St template void impl_IInkStrokeInput::StrokeCanceled(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_StrokeCanceled(cookie)); + check_hresult(WINRT_SHIM(IInkStrokeInput)->remove_StrokeCanceled(cookie)); } template Windows::UI::Input::Inking::InkPresenter impl_IInkStrokeInput::InkPresenter() const { Windows::UI::Input::Inking::InkPresenter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InkPresenter(put(value))); + check_hresult(WINRT_SHIM(IInkStrokeInput)->get_InkPresenter(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkPresenterStencilKind impl_IInkPresenterStencil::Kind() const { Windows::UI::Input::Inking::InkPresenterStencilKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->get_Kind(&value)); return value; } template bool impl_IInkPresenterStencil::IsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVisible(&value)); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->get_IsVisible(&value)); return value; } template void impl_IInkPresenterStencil::IsVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsVisible(value)); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->put_IsVisible(value)); } template Windows::UI::Color impl_IInkPresenterStencil::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->get_BackgroundColor(put_abi(value))); return value; } template void impl_IInkPresenterStencil::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->put_BackgroundColor(get_abi(value))); } template Windows::UI::Color impl_IInkPresenterStencil::ForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->get_ForegroundColor(put_abi(value))); return value; } template void impl_IInkPresenterStencil::ForegroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->put_ForegroundColor(get_abi(value))); } template Windows::Foundation::Numerics::float3x2 impl_IInkPresenterStencil::Transform() const { Windows::Foundation::Numerics::float3x2 value {}; - check_hresult(static_cast(static_cast(*this))->get_Transform(put(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->get_Transform(put_abi(value))); return value; } template void impl_IInkPresenterStencil::Transform(const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_Transform(get(value))); + check_hresult(WINRT_SHIM(IInkPresenterStencil)->put_Transform(get_abi(value))); } template double impl_IInkPresenterRuler::Length() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(IInkPresenterRuler)->get_Length(&value)); return value; } template void impl_IInkPresenterRuler::Length(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Length(value)); + check_hresult(WINRT_SHIM(IInkPresenterRuler)->put_Length(value)); } template double impl_IInkPresenterRuler::Width() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(&value)); + check_hresult(WINRT_SHIM(IInkPresenterRuler)->get_Width(&value)); return value; } template void impl_IInkPresenterRuler::Width(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Width(value)); + check_hresult(WINRT_SHIM(IInkPresenterRuler)->put_Width(value)); } template Windows::UI::Input::Inking::InkPresenterRuler impl_IInkPresenterRulerFactory::Create(const Windows::UI::Input::Inking::InkPresenter & inkPresenter) const { Windows::UI::Input::Inking::InkPresenterRuler inkPresenterRuler { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(inkPresenter), put(inkPresenterRuler))); + check_hresult(WINRT_SHIM(IInkPresenterRulerFactory)->abi_Create(get_abi(inkPresenter), put_abi(inkPresenterRuler))); return inkPresenterRuler; } template Windows::Foundation::Point impl_IInkPoint::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IInkPoint)->get_Position(put_abi(value))); return value; } template float impl_IInkPoint::Pressure() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IInkPoint)->get_Pressure(&value)); return value; } template Windows::UI::Input::Inking::InkPoint impl_IInkPointFactory::CreateInkPoint(const Windows::Foundation::Point & position, float pressure) const { Windows::UI::Input::Inking::InkPoint result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInkPoint(get(position), pressure, put(result))); + check_hresult(WINRT_SHIM(IInkPointFactory)->abi_CreateInkPoint(get_abi(position), pressure, put_abi(result))); return result; } template Windows::UI::Color impl_IInkDrawingAttributes::Color() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_Color(put(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->get_Color(put_abi(value))); return value; } template void impl_IInkDrawingAttributes::Color(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_Color(get(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->put_Color(get_abi(value))); } template Windows::UI::Input::Inking::PenTipShape impl_IInkDrawingAttributes::PenTip() const { Windows::UI::Input::Inking::PenTipShape value {}; - check_hresult(static_cast(static_cast(*this))->get_PenTip(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->get_PenTip(&value)); return value; } template void impl_IInkDrawingAttributes::PenTip(Windows::UI::Input::Inking::PenTipShape value) const { - check_hresult(static_cast(static_cast(*this))->put_PenTip(value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->put_PenTip(value)); } template Windows::Foundation::Size impl_IInkDrawingAttributes::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->get_Size(put_abi(value))); return value; } template void impl_IInkDrawingAttributes::Size(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_Size(get(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->put_Size(get_abi(value))); } template bool impl_IInkDrawingAttributes::IgnorePressure() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IgnorePressure(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->get_IgnorePressure(&value)); return value; } template void impl_IInkDrawingAttributes::IgnorePressure(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IgnorePressure(value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->put_IgnorePressure(value)); } template bool impl_IInkDrawingAttributes::FitToCurve() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_FitToCurve(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->get_FitToCurve(&value)); return value; } template void impl_IInkDrawingAttributes::FitToCurve(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_FitToCurve(value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes)->put_FitToCurve(value)); } template Windows::Foundation::Numerics::float3x2 impl_IInkDrawingAttributes2::PenTipTransform() const { Windows::Foundation::Numerics::float3x2 value {}; - check_hresult(static_cast(static_cast(*this))->get_PenTipTransform(put(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes2)->get_PenTipTransform(put_abi(value))); return value; } template void impl_IInkDrawingAttributes2::PenTipTransform(const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_PenTipTransform(get(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes2)->put_PenTipTransform(get_abi(value))); } template bool impl_IInkDrawingAttributes2::DrawAsHighlighter() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DrawAsHighlighter(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes2)->get_DrawAsHighlighter(&value)); return value; } template void impl_IInkDrawingAttributes2::DrawAsHighlighter(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DrawAsHighlighter(value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes2)->put_DrawAsHighlighter(value)); } template double impl_IInkDrawingAttributesPencilProperties::Opacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Opacity(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributesPencilProperties)->get_Opacity(&value)); return value; } template void impl_IInkDrawingAttributesPencilProperties::Opacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Opacity(value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributesPencilProperties)->put_Opacity(value)); } template Windows::UI::Input::Inking::InkDrawingAttributesKind impl_IInkDrawingAttributes3::Kind() const { Windows::UI::Input::Inking::InkDrawingAttributesKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IInkDrawingAttributes3)->get_Kind(&value)); return value; } template Windows::UI::Input::Inking::InkDrawingAttributesPencilProperties impl_IInkDrawingAttributes3::PencilProperties() const { Windows::UI::Input::Inking::InkDrawingAttributesPencilProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PencilProperties(put(value))); + check_hresult(WINRT_SHIM(IInkDrawingAttributes3)->get_PencilProperties(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkDrawingAttributes impl_IInkDrawingAttributesStatics::CreateForPencil() const { Windows::UI::Input::Inking::InkDrawingAttributes result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateForPencil(put(result))); + check_hresult(WINRT_SHIM(IInkDrawingAttributesStatics)->abi_CreateForPencil(put_abi(result))); return result; } template Windows::Foundation::Point impl_IInkStrokeRenderingSegment::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Point impl_IInkStrokeRenderingSegment::BezierControlPoint1() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_BezierControlPoint1(put(value))); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_BezierControlPoint1(put_abi(value))); return value; } template Windows::Foundation::Point impl_IInkStrokeRenderingSegment::BezierControlPoint2() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_BezierControlPoint2(put(value))); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_BezierControlPoint2(put_abi(value))); return value; } template float impl_IInkStrokeRenderingSegment::Pressure() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_Pressure(&value)); return value; } template float impl_IInkStrokeRenderingSegment::TiltX() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TiltX(&value)); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_TiltX(&value)); return value; } template float impl_IInkStrokeRenderingSegment::TiltY() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TiltY(&value)); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_TiltY(&value)); return value; } template float impl_IInkStrokeRenderingSegment::Twist() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Twist(&value)); + check_hresult(WINRT_SHIM(IInkStrokeRenderingSegment)->get_Twist(&value)); return value; } template Windows::UI::Input::Inking::InkDrawingAttributes impl_IInkStroke::DrawingAttributes() const { Windows::UI::Input::Inking::InkDrawingAttributes value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DrawingAttributes(put(value))); + check_hresult(WINRT_SHIM(IInkStroke)->get_DrawingAttributes(put_abi(value))); return value; } template void impl_IInkStroke::DrawingAttributes(const Windows::UI::Input::Inking::InkDrawingAttributes & value) const { - check_hresult(static_cast(static_cast(*this))->put_DrawingAttributes(get(value))); + check_hresult(WINRT_SHIM(IInkStroke)->put_DrawingAttributes(get_abi(value))); } template Windows::Foundation::Rect impl_IInkStroke::BoundingRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_BoundingRect(put(value))); + check_hresult(WINRT_SHIM(IInkStroke)->get_BoundingRect(put_abi(value))); return value; } template bool impl_IInkStroke::Selected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Selected(&value)); + check_hresult(WINRT_SHIM(IInkStroke)->get_Selected(&value)); return value; } template void impl_IInkStroke::Selected(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Selected(value)); + check_hresult(WINRT_SHIM(IInkStroke)->put_Selected(value)); } template bool impl_IInkStroke::Recognized() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Recognized(&value)); + check_hresult(WINRT_SHIM(IInkStroke)->get_Recognized(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_IInkStroke::GetRenderingSegments() const { Windows::Foundation::Collections::IVectorView renderingSegments; - check_hresult(static_cast(static_cast(*this))->abi_GetRenderingSegments(put(renderingSegments))); + check_hresult(WINRT_SHIM(IInkStroke)->abi_GetRenderingSegments(put_abi(renderingSegments))); return renderingSegments; } template Windows::UI::Input::Inking::InkStroke impl_IInkStroke::Clone() const { Windows::UI::Input::Inking::InkStroke clonedStroke { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(clonedStroke))); + check_hresult(WINRT_SHIM(IInkStroke)->abi_Clone(put_abi(clonedStroke))); return clonedStroke; } template Windows::Foundation::Numerics::float3x2 impl_IInkStroke2::PointTransform() const { Windows::Foundation::Numerics::float3x2 value {}; - check_hresult(static_cast(static_cast(*this))->get_PointTransform(put(value))); + check_hresult(WINRT_SHIM(IInkStroke2)->get_PointTransform(put_abi(value))); return value; } template void impl_IInkStroke2::PointTransform(const Windows::Foundation::Numerics::float3x2 & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointTransform(get(value))); + check_hresult(WINRT_SHIM(IInkStroke2)->put_PointTransform(get_abi(value))); } template Windows::Foundation::Collections::IVectorView impl_IInkStroke2::GetInkPoints() const { Windows::Foundation::Collections::IVectorView inkPoints; - check_hresult(static_cast(static_cast(*this))->abi_GetInkPoints(put(inkPoints))); + check_hresult(WINRT_SHIM(IInkStroke2)->abi_GetInkPoints(put_abi(inkPoints))); return inkPoints; } template void impl_IInkStrokeBuilder::BeginStroke(const Windows::UI::Input::PointerPoint & pointerPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_BeginStroke(get(pointerPoint))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder)->abi_BeginStroke(get_abi(pointerPoint))); } template Windows::UI::Input::PointerPoint impl_IInkStrokeBuilder::AppendToStroke(const Windows::UI::Input::PointerPoint & pointerPoint) const { Windows::UI::Input::PointerPoint previousPointerPoint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_AppendToStroke(get(pointerPoint), put(previousPointerPoint))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder)->abi_AppendToStroke(get_abi(pointerPoint), put_abi(previousPointerPoint))); return previousPointerPoint; } template Windows::UI::Input::Inking::InkStroke impl_IInkStrokeBuilder::EndStroke(const Windows::UI::Input::PointerPoint & pointerPoint) const { Windows::UI::Input::Inking::InkStroke stroke { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_EndStroke(get(pointerPoint), put(stroke))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder)->abi_EndStroke(get_abi(pointerPoint), put_abi(stroke))); return stroke; } -template Windows::UI::Input::Inking::InkStroke impl_IInkStrokeBuilder::CreateStroke(const Windows::Foundation::Collections::IIterable & points) const +template Windows::UI::Input::Inking::InkStroke impl_IInkStrokeBuilder::CreateStroke(iterable points) const { Windows::UI::Input::Inking::InkStroke stroke { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStroke(get(points), put(stroke))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder)->abi_CreateStroke(get_abi(points), put_abi(stroke))); return stroke; } template void impl_IInkStrokeBuilder::SetDefaultDrawingAttributes(const Windows::UI::Input::Inking::InkDrawingAttributes & drawingAttributes) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultDrawingAttributes(get(drawingAttributes))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder)->abi_SetDefaultDrawingAttributes(get_abi(drawingAttributes))); } -template Windows::UI::Input::Inking::InkStroke impl_IInkStrokeBuilder2::CreateStrokeFromInkPoints(const Windows::Foundation::Collections::IIterable & inkPoints, const Windows::Foundation::Numerics::float3x2 & transform) const +template Windows::UI::Input::Inking::InkStroke impl_IInkStrokeBuilder2::CreateStrokeFromInkPoints(iterable inkPoints, const Windows::Foundation::Numerics::float3x2 & transform) const { Windows::UI::Input::Inking::InkStroke result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateStrokeFromInkPoints(get(inkPoints), get(transform), put(result))); + check_hresult(WINRT_SHIM(IInkStrokeBuilder2)->abi_CreateStrokeFromInkPoints(get_abi(inkPoints), get_abi(transform), put_abi(result))); return result; } template Windows::Foundation::Rect impl_IInkRecognitionResult::BoundingRect() const { Windows::Foundation::Rect boundingRect {}; - check_hresult(static_cast(static_cast(*this))->get_BoundingRect(put(boundingRect))); + check_hresult(WINRT_SHIM(IInkRecognitionResult)->get_BoundingRect(put_abi(boundingRect))); return boundingRect; } template Windows::Foundation::Collections::IVectorView impl_IInkRecognitionResult::GetTextCandidates() const { Windows::Foundation::Collections::IVectorView textCandidates; - check_hresult(static_cast(static_cast(*this))->abi_GetTextCandidates(put(textCandidates))); + check_hresult(WINRT_SHIM(IInkRecognitionResult)->abi_GetTextCandidates(put_abi(textCandidates))); return textCandidates; } template Windows::Foundation::Collections::IVectorView impl_IInkRecognitionResult::GetStrokes() const { Windows::Foundation::Collections::IVectorView strokes; - check_hresult(static_cast(static_cast(*this))->abi_GetStrokes(put(strokes))); + check_hresult(WINRT_SHIM(IInkRecognitionResult)->abi_GetStrokes(put_abi(strokes))); return strokes; } template Windows::Foundation::Rect impl_IInkStrokeContainer::BoundingRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_BoundingRect(put(value))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->get_BoundingRect(put_abi(value))); return value; } template void impl_IInkStrokeContainer::AddStroke(const Windows::UI::Input::Inking::InkStroke & stroke) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStroke(get(stroke))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_AddStroke(get_abi(stroke))); } template Windows::Foundation::Rect impl_IInkStrokeContainer::DeleteSelected() const { Windows::Foundation::Rect invalidatedRect {}; - check_hresult(static_cast(static_cast(*this))->abi_DeleteSelected(put(invalidatedRect))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_DeleteSelected(put_abi(invalidatedRect))); return invalidatedRect; } template Windows::Foundation::Rect impl_IInkStrokeContainer::MoveSelected(const Windows::Foundation::Point & translation) const { Windows::Foundation::Rect invalidatedRectangle {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveSelected(get(translation), put(invalidatedRectangle))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_MoveSelected(get_abi(translation), put_abi(invalidatedRectangle))); return invalidatedRectangle; } -template Windows::Foundation::Rect impl_IInkStrokeContainer::SelectWithPolyLine(const Windows::Foundation::Collections::IIterable & polyline) const +template Windows::Foundation::Rect impl_IInkStrokeContainer::SelectWithPolyLine(iterable polyline) const { Windows::Foundation::Rect invalidatedRectangle {}; - check_hresult(static_cast(static_cast(*this))->abi_SelectWithPolyLine(get(polyline), put(invalidatedRectangle))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_SelectWithPolyLine(get_abi(polyline), put_abi(invalidatedRectangle))); return invalidatedRectangle; } template Windows::Foundation::Rect impl_IInkStrokeContainer::SelectWithLine(const Windows::Foundation::Point & from, const Windows::Foundation::Point & to) const { Windows::Foundation::Rect invalidatedRectangle {}; - check_hresult(static_cast(static_cast(*this))->abi_SelectWithLine(get(from), get(to), put(invalidatedRectangle))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_SelectWithLine(get_abi(from), get_abi(to), put_abi(invalidatedRectangle))); return invalidatedRectangle; } template void impl_IInkStrokeContainer::CopySelectedToClipboard() const { - check_hresult(static_cast(static_cast(*this))->abi_CopySelectedToClipboard()); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_CopySelectedToClipboard()); } template Windows::Foundation::Rect impl_IInkStrokeContainer::PasteFromClipboard(const Windows::Foundation::Point & position) const { Windows::Foundation::Rect invalidatedRectangle {}; - check_hresult(static_cast(static_cast(*this))->abi_PasteFromClipboard(get(position), put(invalidatedRectangle))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_PasteFromClipboard(get_abi(position), put_abi(invalidatedRectangle))); return invalidatedRectangle; } template bool impl_IInkStrokeContainer::CanPasteFromClipboard() const { bool canPaste {}; - check_hresult(static_cast(static_cast(*this))->abi_CanPasteFromClipboard(&canPaste)); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_CanPasteFromClipboard(&canPaste)); return canPaste; } template Windows::Foundation::IAsyncActionWithProgress impl_IInkStrokeContainer::LoadAsync(const Windows::Storage::Streams::IInputStream & inputStream) const { Windows::Foundation::IAsyncActionWithProgress loadAction; - check_hresult(static_cast(static_cast(*this))->abi_LoadAsync(get(inputStream), put(loadAction))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_LoadAsync(get_abi(inputStream), put_abi(loadAction))); return loadAction; } template Windows::Foundation::IAsyncOperationWithProgress impl_IInkStrokeContainer::SaveAsync(const Windows::Storage::Streams::IOutputStream & outputStream) const { Windows::Foundation::IAsyncOperationWithProgress outputStreamOperation; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(get(outputStream), put(outputStreamOperation))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_SaveAsync(get_abi(outputStream), put_abi(outputStreamOperation))); return outputStreamOperation; } -template void impl_IInkStrokeContainer::UpdateRecognitionResults(const Windows::Foundation::Collections::IVectorView & recognitionResults) const +template void impl_IInkStrokeContainer::UpdateRecognitionResults(vector_view recognitionResults) const { - check_hresult(static_cast(static_cast(*this))->abi_UpdateRecognitionResults(get(recognitionResults))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_UpdateRecognitionResults(get_abi(recognitionResults))); } template Windows::Foundation::Collections::IVectorView impl_IInkStrokeContainer::GetStrokes() const { Windows::Foundation::Collections::IVectorView strokeView; - check_hresult(static_cast(static_cast(*this))->abi_GetStrokes(put(strokeView))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_GetStrokes(put_abi(strokeView))); return strokeView; } template Windows::Foundation::Collections::IVectorView impl_IInkStrokeContainer::GetRecognitionResults() const { Windows::Foundation::Collections::IVectorView recognitionResults; - check_hresult(static_cast(static_cast(*this))->abi_GetRecognitionResults(put(recognitionResults))); + check_hresult(WINRT_SHIM(IInkStrokeContainer)->abi_GetRecognitionResults(put_abi(recognitionResults))); return recognitionResults; } -template void impl_IInkStrokeContainer2::AddStrokes(const Windows::Foundation::Collections::IIterable & strokes) const +template void impl_IInkStrokeContainer2::AddStrokes(iterable strokes) const { - check_hresult(static_cast(static_cast(*this))->abi_AddStrokes(get(strokes))); + check_hresult(WINRT_SHIM(IInkStrokeContainer2)->abi_AddStrokes(get_abi(strokes))); } template void impl_IInkStrokeContainer2::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IInkStrokeContainer2)->abi_Clear()); } template hstring impl_IInkRecognizer::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(IInkRecognizer)->get_Name(put_abi(value))); return value; } template void impl_IInkRecognizerContainer::SetDefaultRecognizer(const Windows::UI::Input::Inking::InkRecognizer & recognizer) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultRecognizer(get(recognizer))); + check_hresult(WINRT_SHIM(IInkRecognizerContainer)->abi_SetDefaultRecognizer(get_abi(recognizer))); } template Windows::Foundation::IAsyncOperation> impl_IInkRecognizerContainer::RecognizeAsync(const Windows::UI::Input::Inking::InkStrokeContainer & strokeCollection, Windows::UI::Input::Inking::InkRecognitionTarget recognitionTarget) const { Windows::Foundation::IAsyncOperation> recognitionResults; - check_hresult(static_cast(static_cast(*this))->abi_RecognizeAsync(get(strokeCollection), recognitionTarget, put(recognitionResults))); + check_hresult(WINRT_SHIM(IInkRecognizerContainer)->abi_RecognizeAsync(get_abi(strokeCollection), recognitionTarget, put_abi(recognitionResults))); return recognitionResults; } template Windows::Foundation::Collections::IVectorView impl_IInkRecognizerContainer::GetRecognizers() const { Windows::Foundation::Collections::IVectorView recognizerView; - check_hresult(static_cast(static_cast(*this))->abi_GetRecognizers(put(recognizerView))); + check_hresult(WINRT_SHIM(IInkRecognizerContainer)->abi_GetRecognizers(put_abi(recognizerView))); return recognizerView; } template Windows::UI::Input::Inking::InkManipulationMode impl_IInkManager::Mode() const { Windows::UI::Input::Inking::InkManipulationMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Mode(&value)); + check_hresult(WINRT_SHIM(IInkManager)->get_Mode(&value)); return value; } template void impl_IInkManager::Mode(Windows::UI::Input::Inking::InkManipulationMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Mode(value)); + check_hresult(WINRT_SHIM(IInkManager)->put_Mode(value)); } template void impl_IInkManager::ProcessPointerDown(const Windows::UI::Input::PointerPoint & pointerPoint) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessPointerDown(get(pointerPoint))); + check_hresult(WINRT_SHIM(IInkManager)->abi_ProcessPointerDown(get_abi(pointerPoint))); } -template Windows::IInspectable impl_IInkManager::ProcessPointerUpdate(const Windows::UI::Input::PointerPoint & pointerPoint) const +template Windows::Foundation::IInspectable impl_IInkManager::ProcessPointerUpdate(const Windows::UI::Input::PointerPoint & pointerPoint) const { - Windows::IInspectable updateInformation; - check_hresult(static_cast(static_cast(*this))->abi_ProcessPointerUpdate(get(pointerPoint), put(updateInformation))); + Windows::Foundation::IInspectable updateInformation; + check_hresult(WINRT_SHIM(IInkManager)->abi_ProcessPointerUpdate(get_abi(pointerPoint), put_abi(updateInformation))); return updateInformation; } template Windows::Foundation::Rect impl_IInkManager::ProcessPointerUp(const Windows::UI::Input::PointerPoint & pointerPoint) const { Windows::Foundation::Rect updateRectangle {}; - check_hresult(static_cast(static_cast(*this))->abi_ProcessPointerUp(get(pointerPoint), put(updateRectangle))); + check_hresult(WINRT_SHIM(IInkManager)->abi_ProcessPointerUp(get_abi(pointerPoint), put_abi(updateRectangle))); return updateRectangle; } template void impl_IInkManager::SetDefaultDrawingAttributes(const Windows::UI::Input::Inking::InkDrawingAttributes & drawingAttributes) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultDrawingAttributes(get(drawingAttributes))); + check_hresult(WINRT_SHIM(IInkManager)->abi_SetDefaultDrawingAttributes(get_abi(drawingAttributes))); } template Windows::Foundation::IAsyncOperation> impl_IInkManager::RecognizeAsync(Windows::UI::Input::Inking::InkRecognitionTarget recognitionTarget) const { Windows::Foundation::IAsyncOperation> recognitionResults; - check_hresult(static_cast(static_cast(*this))->abi_RecognizeAsync2(recognitionTarget, put(recognitionResults))); + check_hresult(WINRT_SHIM(IInkManager)->abi_RecognizeAsync2(recognitionTarget, put_abi(recognitionResults))); return recognitionResults; } @@ -2949,3 +3091,428 @@ inline InkStrokeContainer::InkStrokeContainer() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkDrawingAttributes & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkDrawingAttributes2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkDrawingAttributes3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkDrawingAttributesPencilProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkDrawingAttributesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkInputProcessingConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPointFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPresenterRuler & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPresenterRulerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkPresenterStencil & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkRecognitionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkRecognizerContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStroke & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStroke2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeBuilder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeBuilder2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeContainer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokeRenderingSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokesCollectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkStrokesErasedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkSynchronizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::IInkUnprocessedInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkDrawingAttributes & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkDrawingAttributesPencilProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkInputProcessingConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkPoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkPresenterRuler & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkRecognitionResult & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkRecognizerContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStroke & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokeBuilder & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokeContainer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokeInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokeRenderingSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokesCollectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkStrokesErasedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkSynchronizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Inking::InkUnprocessedInput & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Input.Preview.Injection.h b/10.0.14393.0/winrt/Windows.UI.Input.Preview.Injection.h index ff1b5f73b..6ab981559 100644 --- a/10.0.14393.0/winrt/Windows.UI.Input.Preview.Injection.h +++ b/10.0.14393.0/winrt/Windows.UI.Input.Preview.Injection.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.Input.Preview.Injection.3.h" #include "Windows.UI.Input.h" @@ -18,7 +21,8 @@ struct produceshim().KeyOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyOptions()); return S_OK; } catch (...) @@ -31,6 +35,7 @@ struct produceshim()); this->shim().KeyOptions(value); return S_OK; } @@ -44,7 +49,8 @@ struct produceshim().ScanCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScanCode()); return S_OK; } catch (...) @@ -57,6 +63,7 @@ struct produceshim()); this->shim().ScanCode(value); return S_OK; } @@ -70,7 +77,8 @@ struct produceshim().VirtualKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VirtualKey()); return S_OK; } catch (...) @@ -83,6 +91,7 @@ struct produceshim()); this->shim().VirtualKey(value); return S_OK; } @@ -100,7 +109,8 @@ struct produceshim().MouseOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseOptions()); return S_OK; } catch (...) @@ -113,6 +123,7 @@ struct produceshim()); this->shim().MouseOptions(value); return S_OK; } @@ -126,7 +137,8 @@ struct produceshim().MouseData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseData()); return S_OK; } catch (...) @@ -139,6 +151,7 @@ struct produceshim()); this->shim().MouseData(value); return S_OK; } @@ -152,7 +165,8 @@ struct produceshim().DeltaY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeltaY()); return S_OK; } catch (...) @@ -165,6 +179,7 @@ struct produceshim()); this->shim().DeltaY(value); return S_OK; } @@ -178,7 +193,8 @@ struct produceshim().DeltaX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeltaX()); return S_OK; } catch (...) @@ -191,6 +207,7 @@ struct produceshim()); this->shim().DeltaX(value); return S_OK; } @@ -204,7 +221,8 @@ struct produceshim().TimeOffsetInMilliseconds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeOffsetInMilliseconds()); return S_OK; } catch (...) @@ -217,6 +235,7 @@ struct produceshim()); this->shim().TimeOffsetInMilliseconds(value); return S_OK; } @@ -230,11 +249,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PointerInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_PointerInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerInfo()); return S_OK; } catch (...) @@ -243,10 +263,11 @@ struct produce } } - HRESULT __stdcall put_PointerInfo(abi_arg_in value) noexcept override + HRESULT __stdcall put_PointerInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerInfo(*reinterpret_cast(&value)); return S_OK; } @@ -260,7 +281,8 @@ struct produce { try { - *value = detach(this->shim().PenButtons()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenButtons()); return S_OK; } catch (...) @@ -273,6 +295,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PenButtons(value); return S_OK; } @@ -286,7 +309,8 @@ struct produce { try { - *value = detach(this->shim().PenParameters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenParameters()); return S_OK; } catch (...) @@ -299,6 +323,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().PenParameters(value); return S_OK; } @@ -312,7 +337,8 @@ struct produce { try { - *value = detach(this->shim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -325,6 +351,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Pressure(value); return S_OK; } @@ -338,7 +365,8 @@ struct produce { try { - *value = detach(this->shim().Rotation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Rotation()); return S_OK; } catch (...) @@ -351,6 +379,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Rotation(value); return S_OK; } @@ -364,7 +393,8 @@ struct produce { try { - *value = detach(this->shim().TiltX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltX()); return S_OK; } catch (...) @@ -377,6 +407,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().TiltX(value); return S_OK; } @@ -390,7 +421,8 @@ struct produce { try { - *value = detach(this->shim().TiltY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltY()); return S_OK; } catch (...) @@ -403,6 +435,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().TiltY(value); return S_OK; } @@ -416,11 +449,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -429,10 +463,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Contact(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Contact(*reinterpret_cast(&value)); return S_OK; } @@ -446,7 +481,8 @@ struct produceshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -459,6 +495,7 @@ struct produceshim()); this->shim().Orientation(value); return S_OK; } @@ -468,11 +505,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerInfo()); return S_OK; } catch (...) @@ -481,10 +519,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerInfo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerInfo(*reinterpret_cast(&value)); return S_OK; } @@ -498,7 +537,8 @@ struct produceshim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -511,6 +551,7 @@ struct produceshim()); this->shim().Pressure(value); return S_OK; } @@ -524,7 +565,8 @@ struct produceshim().TouchParameters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TouchParameters()); return S_OK; } catch (...) @@ -537,6 +579,7 @@ struct produceshim()); this->shim().TouchParameters(value); return S_OK; } @@ -550,10 +593,11 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_InjectKeyboardInput(abi_arg_in> input) noexcept override + HRESULT __stdcall abi_InjectKeyboardInput(impl::abi_arg_in> input) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InjectKeyboardInput(*reinterpret_cast *>(&input)); return S_OK; } @@ -563,10 +607,11 @@ struct produce : prod } } - HRESULT __stdcall abi_InjectMouseInput(abi_arg_in> input) noexcept override + HRESULT __stdcall abi_InjectMouseInput(impl::abi_arg_in> input) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InjectMouseInput(*reinterpret_cast *>(&input)); return S_OK; } @@ -580,6 +625,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().InitializeTouchInjection(visualMode); return S_OK; } @@ -589,10 +635,11 @@ struct produce : prod } } - HRESULT __stdcall abi_InjectTouchInput(abi_arg_in> input) noexcept override + HRESULT __stdcall abi_InjectTouchInput(impl::abi_arg_in> input) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InjectTouchInput(*reinterpret_cast *>(&input)); return S_OK; } @@ -606,6 +653,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().UninitializeTouchInjection(); return S_OK; } @@ -619,6 +667,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().InitializePenInjection(visualMode); return S_OK; } @@ -628,10 +677,11 @@ struct produce : prod } } - HRESULT __stdcall abi_InjectPenInput(abi_arg_in input) noexcept override + HRESULT __stdcall abi_InjectPenInput(impl::abi_arg_in input) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InjectPenInput(*reinterpret_cast(&input)); return S_OK; } @@ -645,6 +695,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().UninitializePenInjection(); return S_OK; } @@ -658,6 +709,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().InjectShortcut(shortcut); return S_OK; } @@ -671,11 +723,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_TryCreate(abi_arg_out instance) noexcept override + HRESULT __stdcall abi_TryCreate(impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().TryCreate()); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().TryCreate()); return S_OK; } catch (...) @@ -693,292 +746,292 @@ namespace Windows::UI::Input::Preview::Injection { template Windows::UI::Input::Preview::Injection::InjectedInputRectangle impl_IInjectedInputTouchInfo::Contact() const { Windows::UI::Input::Preview::Injection::InjectedInputRectangle value {}; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->get_Contact(put_abi(value))); return value; } template void impl_IInjectedInputTouchInfo::Contact(const Windows::UI::Input::Preview::Injection::InjectedInputRectangle & value) const { - check_hresult(static_cast(static_cast(*this))->put_Contact(get(value))); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->put_Contact(get_abi(value))); } template int32_t impl_IInjectedInputTouchInfo::Orientation() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->get_Orientation(&value)); return value; } template void impl_IInjectedInputTouchInfo::Orientation(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->put_Orientation(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo impl_IInjectedInputTouchInfo::PointerInfo() const { Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerInfo(put(value))); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->get_PointerInfo(put_abi(value))); return value; } template void impl_IInjectedInputTouchInfo::PointerInfo(const Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerInfo(get(value))); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->put_PointerInfo(get_abi(value))); } template double impl_IInjectedInputTouchInfo::Pressure() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->get_Pressure(&value)); return value; } template void impl_IInjectedInputTouchInfo::Pressure(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Pressure(value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->put_Pressure(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputTouchParameters impl_IInjectedInputTouchInfo::TouchParameters() const { Windows::UI::Input::Preview::Injection::InjectedInputTouchParameters value {}; - check_hresult(static_cast(static_cast(*this))->get_TouchParameters(&value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->get_TouchParameters(&value)); return value; } template void impl_IInjectedInputTouchInfo::TouchParameters(Windows::UI::Input::Preview::Injection::InjectedInputTouchParameters value) const { - check_hresult(static_cast(static_cast(*this))->put_TouchParameters(value)); + check_hresult(WINRT_SHIM(IInjectedInputTouchInfo)->put_TouchParameters(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo impl_IInjectedInputPenInfo::PointerInfo() const { Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerInfo(put(value))); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_PointerInfo(put_abi(value))); return value; } template void impl_IInjectedInputPenInfo::PointerInfo(const Windows::UI::Input::Preview::Injection::InjectedInputPointerInfo & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerInfo(get(value))); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_PointerInfo(get_abi(value))); } template Windows::UI::Input::Preview::Injection::InjectedInputPenButtons impl_IInjectedInputPenInfo::PenButtons() const { Windows::UI::Input::Preview::Injection::InjectedInputPenButtons value {}; - check_hresult(static_cast(static_cast(*this))->get_PenButtons(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_PenButtons(&value)); return value; } template void impl_IInjectedInputPenInfo::PenButtons(Windows::UI::Input::Preview::Injection::InjectedInputPenButtons value) const { - check_hresult(static_cast(static_cast(*this))->put_PenButtons(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_PenButtons(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputPenParameters impl_IInjectedInputPenInfo::PenParameters() const { Windows::UI::Input::Preview::Injection::InjectedInputPenParameters value {}; - check_hresult(static_cast(static_cast(*this))->get_PenParameters(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_PenParameters(&value)); return value; } template void impl_IInjectedInputPenInfo::PenParameters(Windows::UI::Input::Preview::Injection::InjectedInputPenParameters value) const { - check_hresult(static_cast(static_cast(*this))->put_PenParameters(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_PenParameters(value)); } template double impl_IInjectedInputPenInfo::Pressure() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_Pressure(&value)); return value; } template void impl_IInjectedInputPenInfo::Pressure(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Pressure(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_Pressure(value)); } template double impl_IInjectedInputPenInfo::Rotation() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Rotation(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_Rotation(&value)); return value; } template void impl_IInjectedInputPenInfo::Rotation(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Rotation(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_Rotation(value)); } template int32_t impl_IInjectedInputPenInfo::TiltX() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TiltX(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_TiltX(&value)); return value; } template void impl_IInjectedInputPenInfo::TiltX(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TiltX(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_TiltX(value)); } template int32_t impl_IInjectedInputPenInfo::TiltY() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TiltY(&value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->get_TiltY(&value)); return value; } template void impl_IInjectedInputPenInfo::TiltY(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TiltY(value)); + check_hresult(WINRT_SHIM(IInjectedInputPenInfo)->put_TiltY(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputMouseOptions impl_IInjectedInputMouseInfo::MouseOptions() const { Windows::UI::Input::Preview::Injection::InjectedInputMouseOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_MouseOptions(&value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->get_MouseOptions(&value)); return value; } template void impl_IInjectedInputMouseInfo::MouseOptions(Windows::UI::Input::Preview::Injection::InjectedInputMouseOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_MouseOptions(value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->put_MouseOptions(value)); } template uint32_t impl_IInjectedInputMouseInfo::MouseData() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MouseData(&value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->get_MouseData(&value)); return value; } template void impl_IInjectedInputMouseInfo::MouseData(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MouseData(value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->put_MouseData(value)); } template int32_t impl_IInjectedInputMouseInfo::DeltaY() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DeltaY(&value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->get_DeltaY(&value)); return value; } template void impl_IInjectedInputMouseInfo::DeltaY(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DeltaY(value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->put_DeltaY(value)); } template int32_t impl_IInjectedInputMouseInfo::DeltaX() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DeltaX(&value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->get_DeltaX(&value)); return value; } template void impl_IInjectedInputMouseInfo::DeltaX(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DeltaX(value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->put_DeltaX(value)); } template uint32_t impl_IInjectedInputMouseInfo::TimeOffsetInMilliseconds() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TimeOffsetInMilliseconds(&value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->get_TimeOffsetInMilliseconds(&value)); return value; } template void impl_IInjectedInputMouseInfo::TimeOffsetInMilliseconds(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TimeOffsetInMilliseconds(value)); + check_hresult(WINRT_SHIM(IInjectedInputMouseInfo)->put_TimeOffsetInMilliseconds(value)); } template Windows::UI::Input::Preview::Injection::InjectedInputKeyOptions impl_IInjectedInputKeyboardInfo::KeyOptions() const { Windows::UI::Input::Preview::Injection::InjectedInputKeyOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyOptions(&value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->get_KeyOptions(&value)); return value; } template void impl_IInjectedInputKeyboardInfo::KeyOptions(Windows::UI::Input::Preview::Injection::InjectedInputKeyOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_KeyOptions(value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->put_KeyOptions(value)); } template uint16_t impl_IInjectedInputKeyboardInfo::ScanCode() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ScanCode(&value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->get_ScanCode(&value)); return value; } template void impl_IInjectedInputKeyboardInfo::ScanCode(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ScanCode(value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->put_ScanCode(value)); } template uint16_t impl_IInjectedInputKeyboardInfo::VirtualKey() const { uint16_t value {}; - check_hresult(static_cast(static_cast(*this))->get_VirtualKey(&value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->get_VirtualKey(&value)); return value; } template void impl_IInjectedInputKeyboardInfo::VirtualKey(uint16_t value) const { - check_hresult(static_cast(static_cast(*this))->put_VirtualKey(value)); + check_hresult(WINRT_SHIM(IInjectedInputKeyboardInfo)->put_VirtualKey(value)); } -template void impl_IInputInjector::InjectKeyboardInput(const Windows::Foundation::Collections::IIterable & input) const +template void impl_IInputInjector::InjectKeyboardInput(iterable input) const { - check_hresult(static_cast(static_cast(*this))->abi_InjectKeyboardInput(get(input))); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InjectKeyboardInput(get_abi(input))); } -template void impl_IInputInjector::InjectMouseInput(const Windows::Foundation::Collections::IIterable & input) const +template void impl_IInputInjector::InjectMouseInput(iterable input) const { - check_hresult(static_cast(static_cast(*this))->abi_InjectMouseInput(get(input))); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InjectMouseInput(get_abi(input))); } template void impl_IInputInjector::InitializeTouchInjection(Windows::UI::Input::Preview::Injection::InjectedInputVisualizationMode visualMode) const { - check_hresult(static_cast(static_cast(*this))->abi_InitializeTouchInjection(visualMode)); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InitializeTouchInjection(visualMode)); } -template void impl_IInputInjector::InjectTouchInput(const Windows::Foundation::Collections::IIterable & input) const +template void impl_IInputInjector::InjectTouchInput(iterable input) const { - check_hresult(static_cast(static_cast(*this))->abi_InjectTouchInput(get(input))); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InjectTouchInput(get_abi(input))); } template void impl_IInputInjector::UninitializeTouchInjection() const { - check_hresult(static_cast(static_cast(*this))->abi_UninitializeTouchInjection()); + check_hresult(WINRT_SHIM(IInputInjector)->abi_UninitializeTouchInjection()); } template void impl_IInputInjector::InitializePenInjection(Windows::UI::Input::Preview::Injection::InjectedInputVisualizationMode visualMode) const { - check_hresult(static_cast(static_cast(*this))->abi_InitializePenInjection(visualMode)); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InitializePenInjection(visualMode)); } template void impl_IInputInjector::InjectPenInput(const Windows::UI::Input::Preview::Injection::InjectedInputPenInfo & input) const { - check_hresult(static_cast(static_cast(*this))->abi_InjectPenInput(get(input))); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InjectPenInput(get_abi(input))); } template void impl_IInputInjector::UninitializePenInjection() const { - check_hresult(static_cast(static_cast(*this))->abi_UninitializePenInjection()); + check_hresult(WINRT_SHIM(IInputInjector)->abi_UninitializePenInjection()); } template void impl_IInputInjector::InjectShortcut(Windows::UI::Input::Preview::Injection::InjectedInputShortcut shortcut) const { - check_hresult(static_cast(static_cast(*this))->abi_InjectShortcut(shortcut)); + check_hresult(WINRT_SHIM(IInputInjector)->abi_InjectShortcut(shortcut)); } template Windows::UI::Input::Preview::Injection::InputInjector impl_IInputInjectorStatics::TryCreate() const { Windows::UI::Input::Preview::Injection::InputInjector instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryCreate(put(instance))); + check_hresult(WINRT_SHIM(IInputInjectorStatics)->abi_TryCreate(put_abi(instance))); return instance; } @@ -1006,3 +1059,104 @@ inline Windows::UI::Input::Preview::Injection::InputInjector InputInjector::TryC } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInjectedInputKeyboardInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInjectedInputMouseInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInjectedInputPenInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInjectedInputTouchInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInputInjector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::IInputInjectorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::InjectedInputKeyboardInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::InjectedInputMouseInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::InjectedInputPenInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::InjectedInputTouchInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Preview::Injection::InputInjector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Input.Spatial.h b/10.0.14393.0/winrt/Windows.UI.Input.Spatial.h index c8c4052f1..31ad40f66 100644 --- a/10.0.14393.0/winrt/Windows.UI.Input.Spatial.h +++ b/10.0.14393.0/winrt/Windows.UI.Input.Spatial.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Perception.Spatial.3.h" #include "internal/Windows.Perception.3.h" @@ -18,11 +21,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_RecognitionStarted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecognitionStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecognitionStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecognitionStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -35,6 +39,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RecognitionStarted(token); return S_OK; } @@ -44,11 +49,12 @@ struct produce : prod } } - HRESULT __stdcall add_RecognitionEnded(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_RecognitionEnded(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RecognitionEnded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RecognitionEnded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -61,6 +67,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().RecognitionEnded(token); return S_OK; } @@ -70,11 +77,12 @@ struct produce : prod } } - HRESULT __stdcall add_Tapped(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Tapped(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Tapped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Tapped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -87,6 +95,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Tapped(token); return S_OK; } @@ -96,11 +105,12 @@ struct produce : prod } } - HRESULT __stdcall add_HoldStarted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_HoldStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HoldStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HoldStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -113,6 +123,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().HoldStarted(token); return S_OK; } @@ -122,11 +133,12 @@ struct produce : prod } } - HRESULT __stdcall add_HoldCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_HoldCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HoldCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HoldCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -139,6 +151,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().HoldCompleted(token); return S_OK; } @@ -148,11 +161,12 @@ struct produce : prod } } - HRESULT __stdcall add_HoldCanceled(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_HoldCanceled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().HoldCanceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HoldCanceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -165,6 +179,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().HoldCanceled(token); return S_OK; } @@ -174,11 +189,12 @@ struct produce : prod } } - HRESULT __stdcall add_ManipulationStarted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ManipulationStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ManipulationStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ManipulationStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -191,6 +207,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ManipulationStarted(token); return S_OK; } @@ -200,11 +217,12 @@ struct produce : prod } } - HRESULT __stdcall add_ManipulationUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ManipulationUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ManipulationUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ManipulationUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -217,6 +235,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ManipulationUpdated(token); return S_OK; } @@ -226,11 +245,12 @@ struct produce : prod } } - HRESULT __stdcall add_ManipulationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ManipulationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ManipulationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ManipulationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -243,6 +263,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ManipulationCompleted(token); return S_OK; } @@ -252,11 +273,12 @@ struct produce : prod } } - HRESULT __stdcall add_ManipulationCanceled(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ManipulationCanceled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ManipulationCanceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ManipulationCanceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -269,6 +291,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ManipulationCanceled(token); return S_OK; } @@ -278,11 +301,12 @@ struct produce : prod } } - HRESULT __stdcall add_NavigationStarted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NavigationStarted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -295,6 +319,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigationStarted(token); return S_OK; } @@ -304,11 +329,12 @@ struct produce : prod } } - HRESULT __stdcall add_NavigationUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NavigationUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -321,6 +347,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigationUpdated(token); return S_OK; } @@ -330,11 +357,12 @@ struct produce : prod } } - HRESULT __stdcall add_NavigationCompleted(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NavigationCompleted(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -347,6 +375,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigationCompleted(token); return S_OK; } @@ -356,11 +385,12 @@ struct produce : prod } } - HRESULT __stdcall add_NavigationCanceled(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_NavigationCanceled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationCanceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationCanceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -373,6 +403,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigationCanceled(token); return S_OK; } @@ -382,10 +413,11 @@ struct produce : prod } } - HRESULT __stdcall abi_CaptureInteraction(abi_arg_in interaction) noexcept override + HRESULT __stdcall abi_CaptureInteraction(impl::abi_arg_in interaction) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CaptureInteraction(*reinterpret_cast(&interaction)); return S_OK; } @@ -399,6 +431,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().CancelPendingGestures(); return S_OK; } @@ -412,7 +445,8 @@ struct produce : prod { try { - *succeeded = detach(this->shim().TrySetGestureSettings(settings)); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().TrySetGestureSettings(settings)); return S_OK; } catch (...) @@ -425,7 +459,8 @@ struct produce : prod { try { - *value = detach(this->shim().GestureSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GestureSettings()); return S_OK; } catch (...) @@ -438,11 +473,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_Create(Windows::UI::Input::Spatial::SpatialGestureSettings settings, abi_arg_out value) noexcept override + HRESULT __stdcall abi_Create(Windows::UI::Input::Spatial::SpatialGestureSettings settings, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Create(settings)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Create(settings)); return S_OK; } catch (...) @@ -460,7 +496,8 @@ struct produce : { try { - *value = detach(this->shim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -477,7 +514,8 @@ struct produce : { try { - *value = detach(this->shim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -494,7 +532,8 @@ struct produce : p { try { - *value = detach(this->shim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -503,11 +542,12 @@ struct produce : p } } - HRESULT __stdcall abi_TryGetPointerPose(abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -521,11 +561,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_SourceState(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceState(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceState()); return S_OK; } catch (...) @@ -543,7 +584,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -552,11 +594,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -566,11 +609,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Interaction(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Interaction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Interaction()); return S_OK; } catch (...) @@ -584,11 +628,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_SourceDetected(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceDetected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceDetected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceDetected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -601,6 +646,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceDetected(token); return S_OK; } @@ -610,11 +656,12 @@ struct produce : pro } } - HRESULT __stdcall add_SourceLost(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceLost(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -627,6 +674,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceLost(token); return S_OK; } @@ -636,11 +684,12 @@ struct produce : pro } } - HRESULT __stdcall add_SourceUpdated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceUpdated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -653,6 +702,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceUpdated(token); return S_OK; } @@ -662,11 +712,12 @@ struct produce : pro } } - HRESULT __stdcall add_SourcePressed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourcePressed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourcePressed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourcePressed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -679,6 +730,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SourcePressed(token); return S_OK; } @@ -688,11 +740,12 @@ struct produce : pro } } - HRESULT __stdcall add_SourceReleased(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_SourceReleased(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().SourceReleased(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SourceReleased(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -705,6 +758,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceReleased(token); return S_OK; } @@ -714,11 +768,12 @@ struct produce : pro } } - HRESULT __stdcall add_InteractionDetected(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_InteractionDetected(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().InteractionDetected(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().InteractionDetected(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -731,6 +786,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().InteractionDetected(token); return S_OK; } @@ -740,11 +796,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDetectedSourcesAtTimestamp(abi_arg_in timeStamp, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetDetectedSourcesAtTimestamp(impl::abi_arg_in timeStamp, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetDetectedSourcesAtTimestamp(*reinterpret_cast(&timeStamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDetectedSourcesAtTimestamp(*reinterpret_cast(&timeStamp))); return S_OK; } catch (...) @@ -758,11 +815,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -780,7 +838,8 @@ struct produce : prod { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -793,7 +852,8 @@ struct produce : prod { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -806,11 +866,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_State(abi_arg_out value) noexcept override + HRESULT __stdcall get_State(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -824,11 +885,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -838,11 +900,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_Velocity(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Velocity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocity()); return S_OK; } catch (...) @@ -856,11 +919,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Orientation(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Orientation(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -874,11 +938,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_TryGetSourceLossMitigationDirection(abi_arg_in coordinateSystem, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_TryGetSourceLossMitigationDirection(impl::abi_arg_in coordinateSystem, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TryGetSourceLossMitigationDirection(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetSourceLossMitigationDirection(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -892,7 +957,8 @@ struct produceshim().SourceLossRisk()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceLossRisk()); return S_OK; } catch (...) @@ -901,11 +967,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetLocation(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetLocation(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetLocation(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -919,11 +986,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -933,11 +1001,12 @@ struct produce : } } - HRESULT __stdcall get_Properties(abi_arg_out value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -951,7 +1020,8 @@ struct produce : { try { - *value = detach(this->shim().IsPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPressed()); return S_OK; } catch (...) @@ -960,11 +1030,12 @@ struct produce : } } - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -974,11 +1045,12 @@ struct produce : } } - HRESULT __stdcall abi_TryGetPointerPose(abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -996,7 +1068,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1013,7 +1086,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1022,11 +1096,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetCumulativeDelta(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetCumulativeDelta(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetCumulativeDelta(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1040,11 +1115,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Translation(abi_arg_out value) noexcept override + HRESULT __stdcall get_Translation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Translation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Translation()); return S_OK; } catch (...) @@ -1061,7 +1137,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1070,11 +1147,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1092,7 +1170,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1101,11 +1180,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetCumulativeDelta(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetCumulativeDelta(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetCumulativeDelta(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1123,7 +1203,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1140,7 +1221,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1149,11 +1231,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NormalizedOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedOffset()); return S_OK; } catch (...) @@ -1170,7 +1253,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1179,11 +1263,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1197,7 +1282,8 @@ struct produceshim().IsNavigatingX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNavigatingX()); return S_OK; } catch (...) @@ -1210,7 +1296,8 @@ struct produceshim().IsNavigatingY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNavigatingY()); return S_OK; } catch (...) @@ -1223,7 +1310,8 @@ struct produceshim().IsNavigatingZ()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNavigatingZ()); return S_OK; } catch (...) @@ -1240,7 +1328,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1249,11 +1338,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NormalizedOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedOffset()); return S_OK; } catch (...) @@ -1266,11 +1356,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Timestamp(abi_arg_out value) noexcept override + HRESULT __stdcall get_Timestamp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1280,11 +1371,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Head(abi_arg_out value) noexcept override + HRESULT __stdcall get_Head(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Head()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Head()); return S_OK; } catch (...) @@ -1298,11 +1390,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_TryGetAtTimestamp(abi_arg_in coordinateSystem, abi_arg_in timestamp, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetAtTimestamp(impl::abi_arg_in coordinateSystem, impl::abi_arg_in timestamp, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetAtTimestamp(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(×tamp))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetAtTimestamp(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(×tamp))); return S_OK; } catch (...) @@ -1320,7 +1413,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1337,7 +1431,8 @@ struct produceshim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1346,11 +1441,12 @@ struct produce coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1364,7 +1460,8 @@ struct produceshim().IsGesturePossible(gesture)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGesturePossible(gesture)); return S_OK; } catch (...) @@ -1381,7 +1478,8 @@ struct produce : produc { try { - *value = detach(this->shim().InteractionSourceKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionSourceKind()); return S_OK; } catch (...) @@ -1390,11 +1488,12 @@ struct produce : produc } } - HRESULT __stdcall abi_TryGetPointerPose(abi_arg_in coordinateSystem, abi_arg_out value) noexcept override + HRESULT __stdcall abi_TryGetPointerPose(impl::abi_arg_in coordinateSystem, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TryGetPointerPose(*reinterpret_cast(&coordinateSystem))); return S_OK; } catch (...) @@ -1408,7 +1507,8 @@ struct produce : produc { try { - *value = detach(this->shim().TapCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TapCount()); return S_OK; } catch (...) @@ -1425,329 +1525,329 @@ namespace Windows::UI::Input::Spatial { template Windows::Foundation::IReference impl_ISpatialInteractionSourceLocation::Position() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceLocation)->get_Position(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISpatialInteractionSourceLocation::Velocity() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Velocity(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceLocation)->get_Velocity(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ISpatialInteractionSourceLocation2::Orientation() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Orientation(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceLocation2)->get_Orientation(put_abi(value))); return value; } template uint32_t impl_ISpatialInteractionSource::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(ISpatialInteractionSource)->get_Id(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialInteractionSource::Kind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(ISpatialInteractionSource)->get_Kind(&value)); return value; } template Windows::Foundation::IReference impl_ISpatialInteractionSourceProperties::TryGetSourceLossMitigationDirection(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_TryGetSourceLossMitigationDirection(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceProperties)->abi_TryGetSourceLossMitigationDirection(get_abi(coordinateSystem), put_abi(value))); return value; } template double impl_ISpatialInteractionSourceProperties::SourceLossRisk() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SourceLossRisk(&value)); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceProperties)->get_SourceLossRisk(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceLocation impl_ISpatialInteractionSourceProperties::TryGetLocation(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialInteractionSourceLocation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetLocation(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceProperties)->abi_TryGetLocation(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::Perception::PerceptionTimestamp impl_ISpatialPointerPose::Timestamp() const { Windows::Perception::PerceptionTimestamp value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISpatialPointerPose)->get_Timestamp(put_abi(value))); return value; } template Windows::Perception::People::HeadPose impl_ISpatialPointerPose::Head() const { Windows::Perception::People::HeadPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Head(put(value))); + check_hresult(WINRT_SHIM(ISpatialPointerPose)->get_Head(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialPointerPoseStatics::TryGetAtTimestamp(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem, const Windows::Perception::PerceptionTimestamp & timestamp) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetAtTimestamp(get(coordinateSystem), get(timestamp), put(value))); + check_hresult(WINRT_SHIM(ISpatialPointerPoseStatics)->abi_TryGetAtTimestamp(get_abi(coordinateSystem), get_abi(timestamp), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSource impl_ISpatialInteractionSourceState::Source() const { Windows::UI::Input::Spatial::SpatialInteractionSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceState)->get_Source(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceProperties impl_ISpatialInteractionSourceState::Properties() const { Windows::UI::Input::Spatial::SpatialInteractionSourceProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceState)->get_Properties(put_abi(value))); return value; } template bool impl_ISpatialInteractionSourceState::IsPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPressed(&value)); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceState)->get_IsPressed(&value)); return value; } template Windows::Perception::PerceptionTimestamp impl_ISpatialInteractionSourceState::Timestamp() const { Windows::Perception::PerceptionTimestamp value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceState)->get_Timestamp(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialInteractionSourceState::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceState)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialRecognitionStartedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialRecognitionStartedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialRecognitionStartedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialRecognitionStartedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template bool impl_ISpatialRecognitionStartedEventArgs::IsGesturePossible(Windows::UI::Input::Spatial::SpatialGestureSettings gesture) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsGesturePossible(gesture, &value)); + check_hresult(WINRT_SHIM(ISpatialRecognitionStartedEventArgs)->abi_IsGesturePossible(gesture, &value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialRecognitionEndedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialRecognitionEndedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialTappedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialTappedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialTappedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialTappedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template uint32_t impl_ISpatialTappedEventArgs::TapCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TapCount(&value)); + check_hresult(WINRT_SHIM(ISpatialTappedEventArgs)->get_TapCount(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialHoldStartedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialHoldStartedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialHoldStartedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialHoldStartedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialHoldCompletedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialHoldCompletedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialHoldCanceledEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialHoldCanceledEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialManipulationDelta::Translation() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_Translation(put(value))); + check_hresult(WINRT_SHIM(ISpatialManipulationDelta)->get_Translation(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialManipulationStartedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialManipulationStartedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialManipulationStartedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialManipulationStartedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialManipulationUpdatedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialManipulationUpdatedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialManipulationDelta impl_ISpatialManipulationUpdatedEventArgs::TryGetCumulativeDelta(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialManipulationDelta value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetCumulativeDelta(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialManipulationUpdatedEventArgs)->abi_TryGetCumulativeDelta(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialManipulationCompletedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialManipulationCompletedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialManipulationDelta impl_ISpatialManipulationCompletedEventArgs::TryGetCumulativeDelta(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialManipulationDelta value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetCumulativeDelta(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialManipulationCompletedEventArgs)->abi_TryGetCumulativeDelta(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialManipulationCanceledEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialManipulationCanceledEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialNavigationStartedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationStartedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialNavigationStartedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialNavigationStartedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template bool impl_ISpatialNavigationStartedEventArgs::IsNavigatingX() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNavigatingX(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationStartedEventArgs)->get_IsNavigatingX(&value)); return value; } template bool impl_ISpatialNavigationStartedEventArgs::IsNavigatingY() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNavigatingY(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationStartedEventArgs)->get_IsNavigatingY(&value)); return value; } template bool impl_ISpatialNavigationStartedEventArgs::IsNavigatingZ() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNavigatingZ(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationStartedEventArgs)->get_IsNavigatingZ(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialNavigationUpdatedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationUpdatedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialNavigationUpdatedEventArgs::NormalizedOffset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizedOffset(put(value))); + check_hresult(WINRT_SHIM(ISpatialNavigationUpdatedEventArgs)->get_NormalizedOffset(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialNavigationCompletedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationCompletedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::Foundation::Numerics::float3 impl_ISpatialNavigationCompletedEventArgs::NormalizedOffset() const { Windows::Foundation::Numerics::float3 value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizedOffset(put(value))); + check_hresult(WINRT_SHIM(ISpatialNavigationCompletedEventArgs)->get_NormalizedOffset(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialNavigationCanceledEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialNavigationCanceledEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceState impl_ISpatialInteraction::SourceState() const { Windows::UI::Input::Spatial::SpatialInteractionSourceState value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceState(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteraction)->get_SourceState(put_abi(value))); return value; } template event_token impl_ISpatialGestureRecognizer::RecognitionStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecognitionStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_RecognitionStarted(get_abi(handler), &token)); return token; } @@ -1758,13 +1858,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::RecognitionStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecognitionStarted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_RecognitionStarted(token)); } template event_token impl_ISpatialGestureRecognizer::RecognitionEnded(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RecognitionEnded(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_RecognitionEnded(get_abi(handler), &token)); return token; } @@ -1775,13 +1875,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::RecognitionEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RecognitionEnded(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_RecognitionEnded(token)); } template event_token impl_ISpatialGestureRecognizer::Tapped(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Tapped(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_Tapped(get_abi(handler), &token)); return token; } @@ -1792,13 +1892,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::Tapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Tapped(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_Tapped(token)); } template event_token impl_ISpatialGestureRecognizer::HoldStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HoldStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_HoldStarted(get_abi(handler), &token)); return token; } @@ -1809,13 +1909,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::HoldStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HoldStarted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_HoldStarted(token)); } template event_token impl_ISpatialGestureRecognizer::HoldCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HoldCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_HoldCompleted(get_abi(handler), &token)); return token; } @@ -1826,13 +1926,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::HoldCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HoldCompleted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_HoldCompleted(token)); } template event_token impl_ISpatialGestureRecognizer::HoldCanceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HoldCanceled(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_HoldCanceled(get_abi(handler), &token)); return token; } @@ -1843,13 +1943,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::HoldCanceled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HoldCanceled(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_HoldCanceled(token)); } template event_token impl_ISpatialGestureRecognizer::ManipulationStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_ManipulationStarted(get_abi(handler), &token)); return token; } @@ -1860,13 +1960,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::ManipulationStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationStarted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_ManipulationStarted(token)); } template event_token impl_ISpatialGestureRecognizer::ManipulationUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_ManipulationUpdated(get_abi(handler), &token)); return token; } @@ -1877,13 +1977,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::ManipulationUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationUpdated(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_ManipulationUpdated(token)); } template event_token impl_ISpatialGestureRecognizer::ManipulationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_ManipulationCompleted(get_abi(handler), &token)); return token; } @@ -1894,13 +1994,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::ManipulationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationCompleted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_ManipulationCompleted(token)); } template event_token impl_ISpatialGestureRecognizer::ManipulationCanceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationCanceled(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_ManipulationCanceled(get_abi(handler), &token)); return token; } @@ -1911,13 +2011,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::ManipulationCanceled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationCanceled(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_ManipulationCanceled(token)); } template event_token impl_ISpatialGestureRecognizer::NavigationStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationStarted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_NavigationStarted(get_abi(handler), &token)); return token; } @@ -1928,13 +2028,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::NavigationStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationStarted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_NavigationStarted(token)); } template event_token impl_ISpatialGestureRecognizer::NavigationUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_NavigationUpdated(get_abi(handler), &token)); return token; } @@ -1945,13 +2045,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::NavigationUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationUpdated(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_NavigationUpdated(token)); } template event_token impl_ISpatialGestureRecognizer::NavigationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationCompleted(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_NavigationCompleted(get_abi(handler), &token)); return token; } @@ -1962,13 +2062,13 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::NavigationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationCompleted(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_NavigationCompleted(token)); } template event_token impl_ISpatialGestureRecognizer::NavigationCanceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationCanceled(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->add_NavigationCanceled(get_abi(handler), &token)); return token; } @@ -1979,72 +2079,72 @@ template event_revoker impl_ISpatialGest template void impl_ISpatialGestureRecognizer::NavigationCanceled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationCanceled(token)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->remove_NavigationCanceled(token)); } template void impl_ISpatialGestureRecognizer::CaptureInteraction(const Windows::UI::Input::Spatial::SpatialInteraction & interaction) const { - check_hresult(static_cast(static_cast(*this))->abi_CaptureInteraction(get(interaction))); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->abi_CaptureInteraction(get_abi(interaction))); } template void impl_ISpatialGestureRecognizer::CancelPendingGestures() const { - check_hresult(static_cast(static_cast(*this))->abi_CancelPendingGestures()); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->abi_CancelPendingGestures()); } template bool impl_ISpatialGestureRecognizer::TrySetGestureSettings(Windows::UI::Input::Spatial::SpatialGestureSettings settings) const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetGestureSettings(settings, &succeeded)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->abi_TrySetGestureSettings(settings, &succeeded)); return succeeded; } template Windows::UI::Input::Spatial::SpatialGestureSettings impl_ISpatialGestureRecognizer::GestureSettings() const { Windows::UI::Input::Spatial::SpatialGestureSettings value {}; - check_hresult(static_cast(static_cast(*this))->get_GestureSettings(&value)); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizer)->get_GestureSettings(&value)); return value; } template Windows::UI::Input::Spatial::SpatialGestureRecognizer impl_ISpatialGestureRecognizerFactory::Create(Windows::UI::Input::Spatial::SpatialGestureSettings settings) const { Windows::UI::Input::Spatial::SpatialGestureRecognizer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(settings, put(value))); + check_hresult(WINRT_SHIM(ISpatialGestureRecognizerFactory)->abi_Create(settings, put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceKind impl_ISpatialInteractionDetectedEventArgs::InteractionSourceKind() const { Windows::UI::Input::Spatial::SpatialInteractionSourceKind value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionSourceKind(&value)); + check_hresult(WINRT_SHIM(ISpatialInteractionDetectedEventArgs)->get_InteractionSourceKind(&value)); return value; } template Windows::UI::Input::Spatial::SpatialPointerPose impl_ISpatialInteractionDetectedEventArgs::TryGetPointerPose(const Windows::Perception::Spatial::SpatialCoordinateSystem & coordinateSystem) const { Windows::UI::Input::Spatial::SpatialPointerPose value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_TryGetPointerPose(get(coordinateSystem), put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionDetectedEventArgs)->abi_TryGetPointerPose(get_abi(coordinateSystem), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteraction impl_ISpatialInteractionDetectedEventArgs::Interaction() const { Windows::UI::Input::Spatial::SpatialInteraction value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Interaction(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionDetectedEventArgs)->get_Interaction(put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionSourceState impl_ISpatialInteractionSourceEventArgs::State() const { Windows::UI::Input::Spatial::SpatialInteractionSourceState value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_State(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionSourceEventArgs)->get_State(put_abi(value))); return value; } template event_token impl_ISpatialInteractionManager::SourceDetected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceDetected(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_SourceDetected(get_abi(handler), &token)); return token; } @@ -2055,13 +2155,13 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::SourceDetected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceDetected(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_SourceDetected(token)); } template event_token impl_ISpatialInteractionManager::SourceLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceLost(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_SourceLost(get_abi(handler), &token)); return token; } @@ -2072,13 +2172,13 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::SourceLost(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceLost(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_SourceLost(token)); } template event_token impl_ISpatialInteractionManager::SourceUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceUpdated(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_SourceUpdated(get_abi(handler), &token)); return token; } @@ -2089,13 +2189,13 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::SourceUpdated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceUpdated(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_SourceUpdated(token)); } template event_token impl_ISpatialInteractionManager::SourcePressed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourcePressed(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_SourcePressed(get_abi(handler), &token)); return token; } @@ -2106,13 +2206,13 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::SourcePressed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourcePressed(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_SourcePressed(token)); } template event_token impl_ISpatialInteractionManager::SourceReleased(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SourceReleased(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_SourceReleased(get_abi(handler), &token)); return token; } @@ -2123,13 +2223,13 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::SourceReleased(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SourceReleased(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_SourceReleased(token)); } template event_token impl_ISpatialInteractionManager::InteractionDetected(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_InteractionDetected(get(handler), &token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->add_InteractionDetected(get_abi(handler), &token)); return token; } @@ -2140,20 +2240,20 @@ template event_revoker impl_ISpatialInt template void impl_ISpatialInteractionManager::InteractionDetected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_InteractionDetected(token)); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->remove_InteractionDetected(token)); } template Windows::Foundation::Collections::IVectorView impl_ISpatialInteractionManager::GetDetectedSourcesAtTimestamp(const Windows::Perception::PerceptionTimestamp & timeStamp) const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->abi_GetDetectedSourcesAtTimestamp(get(timeStamp), put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionManager)->abi_GetDetectedSourcesAtTimestamp(get_abi(timeStamp), put_abi(value))); return value; } template Windows::UI::Input::Spatial::SpatialInteractionManager impl_ISpatialInteractionManagerStatics::GetForCurrentView() const { Windows::UI::Input::Spatial::SpatialInteractionManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(ISpatialInteractionManagerStatics)->abi_GetForCurrentView(put_abi(value))); return value; } @@ -2174,3 +2274,491 @@ inline Windows::UI::Input::Spatial::SpatialPointerPose SpatialPointerPose::TryGe } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialGestureRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialGestureRecognizerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialHoldCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialHoldCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialHoldStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteraction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSourceEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSourceLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSourceLocation2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSourceProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialInteractionSourceState & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialManipulationCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialManipulationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialManipulationDelta & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialManipulationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialManipulationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialNavigationCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialNavigationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialNavigationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialNavigationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialPointerPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialPointerPoseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialRecognitionEndedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialRecognitionStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::ISpatialTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialGestureRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialHoldCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialHoldCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialHoldStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteraction & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionDetectedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionSourceEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionSourceLocation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionSourceProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialInteractionSourceState & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialManipulationCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialManipulationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialManipulationDelta & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialManipulationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialManipulationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialNavigationCanceledEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialNavigationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialNavigationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialNavigationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialPointerPose & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialRecognitionEndedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialRecognitionStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::Spatial::SpatialTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Input.h b/10.0.14393.0/winrt/Windows.UI.Input.h index 5568c784b..2512e3fb8 100644 --- a/10.0.14393.0/winrt/Windows.UI.Input.h +++ b/10.0.14393.0/winrt/Windows.UI.Input.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Input.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -21,7 +24,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -30,11 +34,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -47,7 +52,8 @@ struct produce : produce_baseshim().CrossSlidingState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CrossSlidingState()); return S_OK; } catch (...) @@ -64,7 +70,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -90,7 +98,8 @@ struct produce : produce_baseshim().DraggingState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DraggingState()); return S_OK; } catch (...) @@ -103,11 +112,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Starting(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Starting(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Starting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Starting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -120,6 +130,7 @@ struct produce : produce_baseshim()); this->shim().Starting(token); return S_OK; } @@ -129,11 +140,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Completed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Completed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Completed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -146,6 +158,7 @@ struct produce : produce_baseshim()); this->shim().Completed(token); return S_OK; } @@ -155,11 +168,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Canceled(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Canceled(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Canceled(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -172,6 +186,7 @@ struct produce : produce_baseshim()); this->shim().Canceled(token); return S_OK; } @@ -189,7 +204,8 @@ struct produce : produce_baseshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -202,11 +218,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -224,7 +241,8 @@ struct produce : produce_baseshim().GestureSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GestureSettings()); return S_OK; } catch (...) @@ -237,6 +255,7 @@ struct produce : produce_baseshim()); this->shim().GestureSettings(value); return S_OK; } @@ -250,7 +269,8 @@ struct produce : produce_baseshim().IsInertial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInertial()); return S_OK; } catch (...) @@ -263,7 +283,8 @@ struct produce : produce_baseshim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -276,7 +297,8 @@ struct produce : produce_baseshim().ShowGestureFeedback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowGestureFeedback()); return S_OK; } catch (...) @@ -289,6 +311,7 @@ struct produce : produce_baseshim()); this->shim().ShowGestureFeedback(value); return S_OK; } @@ -298,11 +321,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PivotCenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PivotCenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PivotCenter()); return S_OK; } catch (...) @@ -311,10 +335,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PivotCenter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PivotCenter(*reinterpret_cast(&value)); return S_OK; } @@ -328,7 +353,8 @@ struct produce : produce_baseshim().PivotRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PivotRadius()); return S_OK; } catch (...) @@ -341,6 +367,7 @@ struct produce : produce_baseshim()); this->shim().PivotRadius(value); return S_OK; } @@ -354,7 +381,8 @@ struct produce : produce_baseshim().InertiaTranslationDeceleration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaTranslationDeceleration()); return S_OK; } catch (...) @@ -367,6 +395,7 @@ struct produce : produce_baseshim()); this->shim().InertiaTranslationDeceleration(value); return S_OK; } @@ -380,7 +409,8 @@ struct produce : produce_baseshim().InertiaRotationDeceleration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaRotationDeceleration()); return S_OK; } catch (...) @@ -393,6 +423,7 @@ struct produce : produce_baseshim()); this->shim().InertiaRotationDeceleration(value); return S_OK; } @@ -406,7 +437,8 @@ struct produce : produce_baseshim().InertiaExpansionDeceleration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaExpansionDeceleration()); return S_OK; } catch (...) @@ -419,6 +451,7 @@ struct produce : produce_baseshim()); this->shim().InertiaExpansionDeceleration(value); return S_OK; } @@ -432,7 +465,8 @@ struct produce : produce_baseshim().InertiaTranslationDisplacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaTranslationDisplacement()); return S_OK; } catch (...) @@ -445,6 +479,7 @@ struct produce : produce_baseshim()); this->shim().InertiaTranslationDisplacement(value); return S_OK; } @@ -458,7 +493,8 @@ struct produce : produce_baseshim().InertiaRotationAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaRotationAngle()); return S_OK; } catch (...) @@ -471,6 +507,7 @@ struct produce : produce_baseshim()); this->shim().InertiaRotationAngle(value); return S_OK; } @@ -484,7 +521,8 @@ struct produce : produce_baseshim().InertiaExpansion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InertiaExpansion()); return S_OK; } catch (...) @@ -497,6 +535,7 @@ struct produce : produce_baseshim()); this->shim().InertiaExpansion(value); return S_OK; } @@ -510,7 +549,8 @@ struct produce : produce_baseshim().ManipulationExact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ManipulationExact()); return S_OK; } catch (...) @@ -523,6 +563,7 @@ struct produce : produce_baseshim()); this->shim().ManipulationExact(value); return S_OK; } @@ -532,11 +573,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CrossSlideThresholds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CrossSlideThresholds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CrossSlideThresholds()); return S_OK; } catch (...) @@ -545,10 +587,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CrossSlideThresholds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CrossSlideThresholds(*reinterpret_cast(&value)); return S_OK; } @@ -562,7 +605,8 @@ struct produce : produce_baseshim().CrossSlideHorizontally()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CrossSlideHorizontally()); return S_OK; } catch (...) @@ -575,6 +619,7 @@ struct produce : produce_baseshim()); this->shim().CrossSlideHorizontally(value); return S_OK; } @@ -588,7 +633,8 @@ struct produce : produce_baseshim().CrossSlideExact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CrossSlideExact()); return S_OK; } catch (...) @@ -601,6 +647,7 @@ struct produce : produce_baseshim()); this->shim().CrossSlideExact(value); return S_OK; } @@ -614,7 +661,8 @@ struct produce : produce_baseshim().AutoProcessInertia()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoProcessInertia()); return S_OK; } catch (...) @@ -627,6 +675,7 @@ struct produce : produce_baseshim()); this->shim().AutoProcessInertia(value); return S_OK; } @@ -636,11 +685,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MouseWheelParameters(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MouseWheelParameters()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseWheelParameters()); return S_OK; } catch (...) @@ -650,11 +700,12 @@ struct produce : produce_base value, bool * canBeDoubleTap) noexcept override + HRESULT __stdcall abi_CanBeDoubleTap(impl::abi_arg_in value, bool * canBeDoubleTap) noexcept override { try { - *canBeDoubleTap = detach(this->shim().CanBeDoubleTap(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *canBeDoubleTap = detach_abi(this->shim().CanBeDoubleTap(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -663,10 +714,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ProcessDownEvent(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessDownEvent(*reinterpret_cast(&value)); return S_OK; } @@ -676,10 +728,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall abi_ProcessMoveEvents(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessMoveEvents(*reinterpret_cast *>(&value)); return S_OK; } @@ -689,10 +742,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_ProcessUpEvent(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessUpEvent(*reinterpret_cast(&value)); return S_OK; } @@ -702,10 +756,11 @@ struct produce : produce_base value, bool isShiftKeyDown, bool isControlKeyDown) noexcept override + HRESULT __stdcall abi_ProcessMouseWheelEvent(impl::abi_arg_in value, bool isShiftKeyDown, bool isControlKeyDown) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProcessMouseWheelEvent(*reinterpret_cast(&value), isShiftKeyDown, isControlKeyDown); return S_OK; } @@ -719,6 +774,7 @@ struct produce : produce_baseshim()); this->shim().ProcessInertia(); return S_OK; } @@ -732,6 +788,7 @@ struct produce : produce_baseshim()); this->shim().CompleteGesture(); return S_OK; } @@ -741,11 +798,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_Tapped(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().Tapped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().Tapped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -758,6 +816,7 @@ struct produce : produce_baseshim()); this->shim().Tapped(cookie); return S_OK; } @@ -767,11 +826,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_RightTapped(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().RightTapped(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().RightTapped(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -784,6 +844,7 @@ struct produce : produce_baseshim()); this->shim().RightTapped(cookie); return S_OK; } @@ -793,11 +854,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_Holding(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().Holding(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().Holding(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -810,6 +872,7 @@ struct produce : produce_baseshim()); this->shim().Holding(cookie); return S_OK; } @@ -819,11 +882,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_Dragging(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().Dragging(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().Dragging(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -836,6 +900,7 @@ struct produce : produce_baseshim()); this->shim().Dragging(cookie); return S_OK; } @@ -845,11 +910,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ManipulationStarted(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ManipulationStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ManipulationStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -862,6 +928,7 @@ struct produce : produce_baseshim()); this->shim().ManipulationStarted(cookie); return S_OK; } @@ -871,11 +938,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ManipulationUpdated(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ManipulationUpdated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ManipulationUpdated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -888,6 +956,7 @@ struct produce : produce_baseshim()); this->shim().ManipulationUpdated(cookie); return S_OK; } @@ -897,11 +966,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ManipulationInertiaStarting(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ManipulationInertiaStarting(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ManipulationInertiaStarting(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -914,6 +984,7 @@ struct produce : produce_baseshim()); this->shim().ManipulationInertiaStarting(cookie); return S_OK; } @@ -923,11 +994,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_ManipulationCompleted(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().ManipulationCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().ManipulationCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -940,6 +1012,7 @@ struct produce : produce_baseshim()); this->shim().ManipulationCompleted(cookie); return S_OK; } @@ -949,11 +1022,12 @@ struct produce : produce_base> handler, event_token * pCookie) noexcept override + HRESULT __stdcall add_CrossSliding(impl::abi_arg_in> handler, event_token * pCookie) noexcept override { try { - *pCookie = detach(this->shim().CrossSliding(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *pCookie = detach_abi(this->shim().CrossSliding(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -966,6 +1040,7 @@ struct produce : produce_baseshim()); this->shim().CrossSliding(cookie); return S_OK; } @@ -983,7 +1058,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -992,11 +1068,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1009,7 +1086,8 @@ struct produce : produce_baseshim().HoldingState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HoldingState()); return S_OK; } catch (...) @@ -1026,7 +1104,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsInterceptionEnabledWhenInForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInterceptionEnabledWhenInForeground()); return S_OK; } catch (...) @@ -1039,6 +1118,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsInterceptionEnabledWhenInForeground(value); return S_OK; } @@ -1048,11 +1128,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_KeyDown(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_KeyDown(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().KeyDown(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().KeyDown(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1065,6 +1146,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().KeyDown(token); return S_OK; } @@ -1074,11 +1156,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_KeyUp(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_KeyUp(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().KeyUp(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().KeyUp(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1091,6 +1174,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().KeyUp(token); return S_OK; } @@ -1104,11 +1188,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out keyboardDeliverySettings) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out keyboardDeliverySettings) noexcept override { try { - *keyboardDeliverySettings = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *keyboardDeliverySettings = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1126,7 +1211,8 @@ struct produce : produce { try { - *value = detach(this->shim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -1135,11 +1221,12 @@ struct produce : produce } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1148,11 +1235,12 @@ struct produce : produce } } - HRESULT __stdcall get_Cumulative(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cumulative(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cumulative()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cumulative()); return S_OK; } catch (...) @@ -1161,11 +1249,12 @@ struct produce : produce } } - HRESULT __stdcall get_Velocities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Velocities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Velocities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocities()); return S_OK; } catch (...) @@ -1182,7 +1271,8 @@ struct produce : p { try { - *value = detach(this->shim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -1191,11 +1281,12 @@ struct produce : p } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1204,11 +1295,12 @@ struct produce : p } } - HRESULT __stdcall get_Delta(abi_arg_out value) noexcept override + HRESULT __stdcall get_Delta(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delta()); return S_OK; } catch (...) @@ -1217,11 +1309,12 @@ struct produce : p } } - HRESULT __stdcall get_Cumulative(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cumulative(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cumulative()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cumulative()); return S_OK; } catch (...) @@ -1230,11 +1323,12 @@ struct produce : p } } - HRESULT __stdcall get_Velocities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Velocities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Velocities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocities()); return S_OK; } catch (...) @@ -1251,7 +1345,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -1260,11 +1355,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1273,11 +1369,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Cumulative(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cumulative(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cumulative()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cumulative()); return S_OK; } catch (...) @@ -1294,7 +1391,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -1303,11 +1401,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1316,11 +1415,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Delta(abi_arg_out value) noexcept override + HRESULT __stdcall get_Delta(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Delta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delta()); return S_OK; } catch (...) @@ -1329,11 +1429,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Cumulative(abi_arg_out value) noexcept override + HRESULT __stdcall get_Cumulative(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Cumulative()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cumulative()); return S_OK; } catch (...) @@ -1342,11 +1443,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Velocities(abi_arg_out value) noexcept override + HRESULT __stdcall get_Velocities(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Velocities()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Velocities()); return S_OK; } catch (...) @@ -1359,11 +1461,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_CharTranslation(abi_arg_out value) noexcept override + HRESULT __stdcall get_CharTranslation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharTranslation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharTranslation()); return S_OK; } catch (...) @@ -1372,10 +1475,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CharTranslation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CharTranslation(*reinterpret_cast(&value)); return S_OK; } @@ -1389,7 +1493,8 @@ struct produce : produce_baseshim().DeltaScale()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeltaScale()); return S_OK; } catch (...) @@ -1402,6 +1507,7 @@ struct produce : produce_baseshim()); this->shim().DeltaScale(value); return S_OK; } @@ -1415,7 +1521,8 @@ struct produce : produce_baseshim().DeltaRotationAngle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeltaRotationAngle()); return S_OK; } catch (...) @@ -1428,6 +1535,7 @@ struct produce : produce_baseshim()); this->shim().DeltaRotationAngle(value); return S_OK; } @@ -1437,11 +1545,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PageTranslation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PageTranslation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageTranslation()); return S_OK; } catch (...) @@ -1450,10 +1559,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PageTranslation(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PageTranslation(*reinterpret_cast(&value)); return S_OK; } @@ -1467,11 +1577,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PointerDevice(abi_arg_out value) noexcept override + HRESULT __stdcall get_PointerDevice(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerDevice()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDevice()); return S_OK; } catch (...) @@ -1481,11 +1592,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -1494,11 +1606,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RawPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RawPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RawPosition()); return S_OK; } catch (...) @@ -1511,7 +1624,8 @@ struct produce : produce_baseshim().PointerId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerId()); return S_OK; } catch (...) @@ -1524,7 +1638,8 @@ struct produce : produce_baseshim().FrameId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameId()); return S_OK; } catch (...) @@ -1537,7 +1652,8 @@ struct produce : produce_baseshim().Timestamp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Timestamp()); return S_OK; } catch (...) @@ -1550,7 +1666,8 @@ struct produce : produce_baseshim().IsInContact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInContact()); return S_OK; } catch (...) @@ -1559,11 +1676,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Properties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Properties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Properties()); return S_OK; } catch (...) @@ -1581,7 +1699,8 @@ struct produce : produce_baseshim().Pressure()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pressure()); return S_OK; } catch (...) @@ -1594,7 +1713,8 @@ struct produce : produce_baseshim().IsInverted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInverted()); return S_OK; } catch (...) @@ -1607,7 +1727,8 @@ struct produce : produce_baseshim().IsEraser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEraser()); return S_OK; } catch (...) @@ -1620,7 +1741,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -1633,7 +1755,8 @@ struct produce : produce_baseshim().XTilt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XTilt()); return S_OK; } catch (...) @@ -1646,7 +1769,8 @@ struct produce : produce_baseshim().YTilt()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YTilt()); return S_OK; } catch (...) @@ -1659,7 +1783,8 @@ struct produce : produce_baseshim().Twist()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Twist()); return S_OK; } catch (...) @@ -1668,11 +1793,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContactRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactRect()); return S_OK; } catch (...) @@ -1681,11 +1807,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContactRectRaw(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContactRectRaw()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContactRectRaw()); return S_OK; } catch (...) @@ -1698,7 +1825,8 @@ struct produce : produce_baseshim().TouchConfidence()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TouchConfidence()); return S_OK; } catch (...) @@ -1711,7 +1839,8 @@ struct produce : produce_baseshim().IsLeftButtonPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLeftButtonPressed()); return S_OK; } catch (...) @@ -1724,7 +1853,8 @@ struct produce : produce_baseshim().IsRightButtonPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRightButtonPressed()); return S_OK; } catch (...) @@ -1737,7 +1867,8 @@ struct produce : produce_baseshim().IsMiddleButtonPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMiddleButtonPressed()); return S_OK; } catch (...) @@ -1750,7 +1881,8 @@ struct produce : produce_baseshim().MouseWheelDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseWheelDelta()); return S_OK; } catch (...) @@ -1763,7 +1895,8 @@ struct produce : produce_baseshim().IsHorizontalMouseWheel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHorizontalMouseWheel()); return S_OK; } catch (...) @@ -1776,7 +1909,8 @@ struct produce : produce_baseshim().IsPrimary()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrimary()); return S_OK; } catch (...) @@ -1789,7 +1923,8 @@ struct produce : produce_baseshim().IsInRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInRange()); return S_OK; } catch (...) @@ -1802,7 +1937,8 @@ struct produce : produce_baseshim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -1815,7 +1951,8 @@ struct produce : produce_baseshim().IsBarrelButtonPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBarrelButtonPressed()); return S_OK; } catch (...) @@ -1828,7 +1965,8 @@ struct produce : produce_baseshim().IsXButton1Pressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsXButton1Pressed()); return S_OK; } catch (...) @@ -1841,7 +1979,8 @@ struct produce : produce_baseshim().IsXButton2Pressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsXButton2Pressed()); return S_OK; } catch (...) @@ -1854,7 +1993,8 @@ struct produce : produce_baseshim().PointerUpdateKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerUpdateKind()); return S_OK; } catch (...) @@ -1867,7 +2007,8 @@ struct produce : produce_baseshim().HasUsage(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasUsage(usagePage, usageId)); return S_OK; } catch (...) @@ -1880,7 +2021,8 @@ struct produce : produce_baseshim().GetUsageValue(usagePage, usageId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetUsageValue(usagePage, usageId)); return S_OK; } catch (...) @@ -1893,11 +2035,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ZDistance(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ZDistance(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ZDistance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZDistance()); return S_OK; } catch (...) @@ -1911,11 +2054,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetCurrentPoint(uint32_t pointerId, abi_arg_out pointerPoint) noexcept override + HRESULT __stdcall abi_GetCurrentPoint(uint32_t pointerId, impl::abi_arg_out pointerPoint) noexcept override { try { - *pointerPoint = detach(this->shim().GetCurrentPoint(pointerId)); + typename D::abi_guard guard(this->shim()); + *pointerPoint = detach_abi(this->shim().GetCurrentPoint(pointerId)); return S_OK; } catch (...) @@ -1925,11 +2069,12 @@ struct produce : produce_base> pointerPoints) noexcept override + HRESULT __stdcall abi_GetIntermediatePoints(uint32_t pointerId, impl::abi_arg_out> pointerPoints) noexcept override { try { - *pointerPoints = detach(this->shim().GetIntermediatePoints(pointerId)); + typename D::abi_guard guard(this->shim()); + *pointerPoints = detach_abi(this->shim().GetIntermediatePoints(pointerId)); return S_OK; } catch (...) @@ -1939,11 +2084,12 @@ struct produce : produce_base transform, abi_arg_out pointerPoint) noexcept override + HRESULT __stdcall abi_GetCurrentPointTransformed(uint32_t pointerId, impl::abi_arg_in transform, impl::abi_arg_out pointerPoint) noexcept override { try { - *pointerPoint = detach(this->shim().GetCurrentPoint(pointerId, *reinterpret_cast(&transform))); + typename D::abi_guard guard(this->shim()); + *pointerPoint = detach_abi(this->shim().GetCurrentPoint(pointerId, *reinterpret_cast(&transform))); return S_OK; } catch (...) @@ -1953,11 +2099,12 @@ struct produce : produce_base transform, abi_arg_out> pointerPoints) noexcept override + HRESULT __stdcall abi_GetIntermediatePointsTransformed(uint32_t pointerId, impl::abi_arg_in transform, impl::abi_arg_out> pointerPoints) noexcept override { try { - *pointerPoints = detach(this->shim().GetIntermediatePoints(pointerId, *reinterpret_cast(&transform))); + typename D::abi_guard guard(this->shim()); + *pointerPoints = detach_abi(this->shim().GetIntermediatePoints(pointerId, *reinterpret_cast(&transform))); return S_OK; } catch (...) @@ -1971,11 +2118,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Inverse(abi_arg_out value) noexcept override + HRESULT __stdcall get_Inverse(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Inverse()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Inverse()); return S_OK; } catch (...) @@ -1985,11 +2133,12 @@ struct produce : produce_base inPoint, abi_arg_out outPoint, bool * returnValue) noexcept override + HRESULT __stdcall abi_TryTransform(impl::abi_arg_in inPoint, impl::abi_arg_out outPoint, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryTransform(*reinterpret_cast(&inPoint), *outPoint)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryTransform(*reinterpret_cast(&inPoint), *outPoint)); return S_OK; } catch (...) @@ -1998,11 +2147,12 @@ struct produce : produce_base rect, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_TransformBounds(impl::abi_arg_in rect, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().TransformBounds(*reinterpret_cast(&rect))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TransformBounds(*reinterpret_cast(&rect))); return S_OK; } catch (...) @@ -2019,6 +2169,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsContactFeedbackEnabled(value); return S_OK; } @@ -2032,7 +2183,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsContactFeedbackEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsContactFeedbackEnabled()); return S_OK; } catch (...) @@ -2045,6 +2197,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsBarrelButtonFeedbackEnabled(value); return S_OK; } @@ -2058,7 +2211,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsBarrelButtonFeedbackEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBarrelButtonFeedbackEnabled()); return S_OK; } catch (...) @@ -2071,11 +2225,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out visualizationSettings) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out visualizationSettings) noexcept override { try { - *visualizationSettings = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *visualizationSettings = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2089,11 +2244,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Menu(abi_arg_out value) noexcept override + HRESULT __stdcall get_Menu(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Menu()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Menu()); return S_OK; } catch (...) @@ -2107,7 +2263,8 @@ struct produce : produce_baseshim().RotationResolutionInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationResolutionInDegrees()); return S_OK; } catch (...) @@ -2120,6 +2277,7 @@ struct produce : produce_baseshim()); this->shim().RotationResolutionInDegrees(value); return S_OK; } @@ -2133,7 +2291,8 @@ struct produce : produce_baseshim().UseAutomaticHapticFeedback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseAutomaticHapticFeedback()); return S_OK; } catch (...) @@ -2146,6 +2305,7 @@ struct produce : produce_baseshim()); this->shim().UseAutomaticHapticFeedback(value); return S_OK; } @@ -2155,11 +2315,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ScreenContactStarted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ScreenContactStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ScreenContactStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2172,6 +2333,7 @@ struct produce : produce_baseshim()); this->shim().ScreenContactStarted(cookie); return S_OK; } @@ -2181,11 +2343,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ScreenContactEnded(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ScreenContactEnded(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ScreenContactEnded(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2198,6 +2361,7 @@ struct produce : produce_baseshim()); this->shim().ScreenContactEnded(cookie); return S_OK; } @@ -2207,11 +2371,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ScreenContactContinued(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ScreenContactContinued(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ScreenContactContinued(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2224,6 +2389,7 @@ struct produce : produce_baseshim()); this->shim().ScreenContactContinued(cookie); return S_OK; } @@ -2233,11 +2399,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ControlLost(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ControlLost(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ControlLost(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2250,6 +2417,7 @@ struct produce : produce_baseshim()); this->shim().ControlLost(cookie); return S_OK; } @@ -2259,11 +2427,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_RotationChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().RotationChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RotationChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2276,6 +2445,7 @@ struct produce : produce_baseshim()); this->shim().RotationChanged(token); return S_OK; } @@ -2285,11 +2455,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_ButtonClicked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ButtonClicked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ButtonClicked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2302,6 +2473,7 @@ struct produce : produce_baseshim()); this->shim().ButtonClicked(token); return S_OK; } @@ -2311,11 +2483,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ControlAcquired(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ControlAcquired(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ControlAcquired(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2328,6 +2501,7 @@ struct produce : produce_baseshim()); this->shim().ControlAcquired(cookie); return S_OK; } @@ -2341,11 +2515,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -2359,10 +2534,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_SetDefaultMenuItems(abi_arg_in> buttons) noexcept override + HRESULT __stdcall abi_SetDefaultMenuItems(impl::abi_arg_in> buttons) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultMenuItems(*reinterpret_cast *>(&buttons)); return S_OK; } @@ -2376,6 +2552,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().ResetToDefaultMenuItems(); return S_OK; } @@ -2389,7 +2566,8 @@ struct produce : produce_ { try { - *result = detach(this->shim().TrySelectDefaultMenuItem(type)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySelectDefaultMenuItem(type)); return S_OK; } catch (...) @@ -2402,11 +2580,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out configuration) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out configuration) noexcept override { try { - *configuration = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *configuration = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2420,11 +2599,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -2438,11 +2618,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -2456,7 +2637,8 @@ struct produce : produce_baseshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -2469,6 +2651,7 @@ struct produce : produce_baseshim()); this->shim().IsEnabled(value); return S_OK; } @@ -2478,11 +2661,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_GetSelectedMenuItem(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetSelectedMenuItem()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetSelectedMenuItem()); return S_OK; } catch (...) @@ -2492,10 +2676,11 @@ struct produce : produce_base menuItem) noexcept override + HRESULT __stdcall abi_SelectMenuItem(impl::abi_arg_in menuItem) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectMenuItem(*reinterpret_cast(&menuItem)); return S_OK; } @@ -2509,7 +2694,8 @@ struct produce : produce_baseshim().TrySelectPreviouslySelectedMenuItem()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TrySelectPreviouslySelectedMenuItem()); return S_OK; } catch (...) @@ -2522,11 +2708,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_DisplayText(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayText()); return S_OK; } catch (...) @@ -2536,11 +2723,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -2550,11 +2738,12 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Tag(abi_arg_in value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { - this->shim().Tag(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -2563,11 +2752,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_Invoked(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Invoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Invoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Invoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2580,6 +2770,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Invoked(token); return S_OK; } @@ -2593,11 +2784,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateFromIcon(abi_arg_in displayText, abi_arg_in icon, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromIcon(impl::abi_arg_in displayText, impl::abi_arg_in icon, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromIcon(*reinterpret_cast(&displayText), *reinterpret_cast(&icon))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromIcon(*reinterpret_cast(&displayText), *reinterpret_cast(&icon))); return S_OK; } catch (...) @@ -2607,11 +2799,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateFromKnownIcon(abi_arg_in displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateFromKnownIcon(impl::abi_arg_in displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateFromKnownIcon(*reinterpret_cast(&displayText), value)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateFromKnownIcon(*reinterpret_cast(&displayText), value)); return S_OK; } catch (...) @@ -2629,7 +2822,8 @@ struct produce { try { - *value = detach(this->shim().RotationDeltaInDegrees()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotationDeltaInDegrees()); return S_OK; } catch (...) @@ -2638,11 +2832,12 @@ struct produce } } - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -2656,11 +2851,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Bounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -2669,11 +2865,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2686,11 +2883,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -2704,11 +2902,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Contact(abi_arg_out value) noexcept override + HRESULT __stdcall get_Contact(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Contact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Contact()); return S_OK; } catch (...) @@ -2726,7 +2925,8 @@ struct produce : produce_baseshim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -2735,11 +2935,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_CreateForCurrentView(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateForCurrentView()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateForCurrentView()); return S_OK; } catch (...) @@ -2757,7 +2958,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -2766,11 +2968,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2787,7 +2990,8 @@ struct produce : produce_baseshim().PointerDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerDeviceType()); return S_OK; } catch (...) @@ -2796,11 +3000,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2813,7 +3018,8 @@ struct produce : produce_baseshim().TapCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TapCount()); return S_OK; } catch (...) @@ -2830,21 +3036,21 @@ namespace Windows::UI::Input { template Windows::UI::Input::EdgeGestureKind impl_IEdgeGestureEventArgs::Kind() const { Windows::UI::Input::EdgeGestureKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IEdgeGestureEventArgs)->get_Kind(&value)); return value; } template Windows::UI::Input::EdgeGesture impl_IEdgeGestureStatics::GetForCurrentView() const { Windows::UI::Input::EdgeGesture current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(IEdgeGestureStatics)->abi_GetForCurrentView(put_abi(current))); return current; } template event_token impl_IEdgeGesture::Starting(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Starting(get(handler), &token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->add_Starting(get_abi(handler), &token)); return token; } @@ -2855,13 +3061,13 @@ template event_revoker impl_IEdgeGesture::Starting template void impl_IEdgeGesture::Starting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Starting(token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->remove_Starting(token)); } template event_token impl_IEdgeGesture::Completed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Completed(get(handler), &token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->add_Completed(get_abi(handler), &token)); return token; } @@ -2872,13 +3078,13 @@ template event_revoker impl_IEdgeGesture::Complete template void impl_IEdgeGesture::Completed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Completed(token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->remove_Completed(token)); } template event_token impl_IEdgeGesture::Canceled(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Canceled(get(handler), &token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->add_Canceled(get_abi(handler), &token)); return token; } @@ -2889,25 +3095,25 @@ template event_revoker impl_IEdgeGesture::Canceled template void impl_IEdgeGesture::Canceled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Canceled(token)); + check_hresult(WINRT_SHIM(IEdgeGesture)->remove_Canceled(token)); } template bool impl_IKeyboardDeliveryInterceptor::IsInterceptionEnabledWhenInForeground() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInterceptionEnabledWhenInForeground(&value)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->get_IsInterceptionEnabledWhenInForeground(&value)); return value; } template void impl_IKeyboardDeliveryInterceptor::IsInterceptionEnabledWhenInForeground(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsInterceptionEnabledWhenInForeground(value)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->put_IsInterceptionEnabledWhenInForeground(value)); } template event_token impl_IKeyboardDeliveryInterceptor::KeyDown(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_KeyDown(get(handler), &token)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->add_KeyDown(get_abi(handler), &token)); return token; } @@ -2918,13 +3124,13 @@ template event_revoker impl_IKeyboard template void impl_IKeyboardDeliveryInterceptor::KeyDown(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyDown(token)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->remove_KeyDown(token)); } template event_token impl_IKeyboardDeliveryInterceptor::KeyUp(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_KeyUp(get(handler), &token)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->add_KeyUp(get_abi(handler), &token)); return token; } @@ -2935,523 +3141,523 @@ template event_revoker impl_IKeyboard template void impl_IKeyboardDeliveryInterceptor::KeyUp(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_KeyUp(token)); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptor)->remove_KeyUp(token)); } template Windows::UI::Input::KeyboardDeliveryInterceptor impl_IKeyboardDeliveryInterceptorStatics::GetForCurrentView() const { Windows::UI::Input::KeyboardDeliveryInterceptor keyboardDeliverySettings { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(keyboardDeliverySettings))); + check_hresult(WINRT_SHIM(IKeyboardDeliveryInterceptorStatics)->abi_GetForCurrentView(put_abi(keyboardDeliverySettings))); return keyboardDeliverySettings; } template Windows::Devices::Input::PointerDeviceType impl_ITappedEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(ITappedEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_ITappedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ITappedEventArgs)->get_Position(put_abi(value))); return value; } template uint32_t impl_ITappedEventArgs::TapCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TapCount(&value)); + check_hresult(WINRT_SHIM(ITappedEventArgs)->get_TapCount(&value)); return value; } template Windows::Devices::Input::PointerDeviceType impl_IRightTappedEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IRightTappedEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IRightTappedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IRightTappedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Input::PointerDeviceType impl_IHoldingEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IHoldingEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IHoldingEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IHoldingEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::HoldingState impl_IHoldingEventArgs::HoldingState() const { Windows::UI::Input::HoldingState value {}; - check_hresult(static_cast(static_cast(*this))->get_HoldingState(&value)); + check_hresult(WINRT_SHIM(IHoldingEventArgs)->get_HoldingState(&value)); return value; } template Windows::Devices::Input::PointerDeviceType impl_IDraggingEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IDraggingEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IDraggingEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IDraggingEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::DraggingState impl_IDraggingEventArgs::DraggingState() const { Windows::UI::Input::DraggingState value {}; - check_hresult(static_cast(static_cast(*this))->get_DraggingState(&value)); + check_hresult(WINRT_SHIM(IDraggingEventArgs)->get_DraggingState(&value)); return value; } template Windows::Devices::Input::PointerDeviceType impl_IManipulationStartedEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IManipulationStartedEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IManipulationStartedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IManipulationStartedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationStartedEventArgs::Cumulative() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Cumulative(put(value))); + check_hresult(WINRT_SHIM(IManipulationStartedEventArgs)->get_Cumulative(put_abi(value))); return value; } template Windows::Devices::Input::PointerDeviceType impl_IManipulationUpdatedEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IManipulationUpdatedEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IManipulationUpdatedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IManipulationUpdatedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationUpdatedEventArgs::Delta() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Delta(put(value))); + check_hresult(WINRT_SHIM(IManipulationUpdatedEventArgs)->get_Delta(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationUpdatedEventArgs::Cumulative() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Cumulative(put(value))); + check_hresult(WINRT_SHIM(IManipulationUpdatedEventArgs)->get_Cumulative(put_abi(value))); return value; } template Windows::UI::Input::ManipulationVelocities impl_IManipulationUpdatedEventArgs::Velocities() const { Windows::UI::Input::ManipulationVelocities value {}; - check_hresult(static_cast(static_cast(*this))->get_Velocities(put(value))); + check_hresult(WINRT_SHIM(IManipulationUpdatedEventArgs)->get_Velocities(put_abi(value))); return value; } template Windows::Devices::Input::PointerDeviceType impl_IManipulationInertiaStartingEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IManipulationInertiaStartingEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IManipulationInertiaStartingEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IManipulationInertiaStartingEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationInertiaStartingEventArgs::Delta() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Delta(put(value))); + check_hresult(WINRT_SHIM(IManipulationInertiaStartingEventArgs)->get_Delta(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationInertiaStartingEventArgs::Cumulative() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Cumulative(put(value))); + check_hresult(WINRT_SHIM(IManipulationInertiaStartingEventArgs)->get_Cumulative(put_abi(value))); return value; } template Windows::UI::Input::ManipulationVelocities impl_IManipulationInertiaStartingEventArgs::Velocities() const { Windows::UI::Input::ManipulationVelocities value {}; - check_hresult(static_cast(static_cast(*this))->get_Velocities(put(value))); + check_hresult(WINRT_SHIM(IManipulationInertiaStartingEventArgs)->get_Velocities(put_abi(value))); return value; } template Windows::Devices::Input::PointerDeviceType impl_IManipulationCompletedEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(IManipulationCompletedEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_IManipulationCompletedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IManipulationCompletedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::ManipulationDelta impl_IManipulationCompletedEventArgs::Cumulative() const { Windows::UI::Input::ManipulationDelta value {}; - check_hresult(static_cast(static_cast(*this))->get_Cumulative(put(value))); + check_hresult(WINRT_SHIM(IManipulationCompletedEventArgs)->get_Cumulative(put_abi(value))); return value; } template Windows::UI::Input::ManipulationVelocities impl_IManipulationCompletedEventArgs::Velocities() const { Windows::UI::Input::ManipulationVelocities value {}; - check_hresult(static_cast(static_cast(*this))->get_Velocities(put(value))); + check_hresult(WINRT_SHIM(IManipulationCompletedEventArgs)->get_Velocities(put_abi(value))); return value; } template Windows::Devices::Input::PointerDeviceType impl_ICrossSlidingEventArgs::PointerDeviceType() const { Windows::Devices::Input::PointerDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerDeviceType(&value)); + check_hresult(WINRT_SHIM(ICrossSlidingEventArgs)->get_PointerDeviceType(&value)); return value; } template Windows::Foundation::Point impl_ICrossSlidingEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(ICrossSlidingEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Input::CrossSlidingState impl_ICrossSlidingEventArgs::CrossSlidingState() const { Windows::UI::Input::CrossSlidingState value {}; - check_hresult(static_cast(static_cast(*this))->get_CrossSlidingState(&value)); + check_hresult(WINRT_SHIM(ICrossSlidingEventArgs)->get_CrossSlidingState(&value)); return value; } template Windows::Foundation::Point impl_IMouseWheelParameters::CharTranslation() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_CharTranslation(put(value))); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->get_CharTranslation(put_abi(value))); return value; } template void impl_IMouseWheelParameters::CharTranslation(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_CharTranslation(get(value))); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->put_CharTranslation(get_abi(value))); } template float impl_IMouseWheelParameters::DeltaScale() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_DeltaScale(&value)); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->get_DeltaScale(&value)); return value; } template void impl_IMouseWheelParameters::DeltaScale(float value) const { - check_hresult(static_cast(static_cast(*this))->put_DeltaScale(value)); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->put_DeltaScale(value)); } template float impl_IMouseWheelParameters::DeltaRotationAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_DeltaRotationAngle(&value)); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->get_DeltaRotationAngle(&value)); return value; } template void impl_IMouseWheelParameters::DeltaRotationAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_DeltaRotationAngle(value)); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->put_DeltaRotationAngle(value)); } template Windows::Foundation::Point impl_IMouseWheelParameters::PageTranslation() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_PageTranslation(put(value))); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->get_PageTranslation(put_abi(value))); return value; } template void impl_IMouseWheelParameters::PageTranslation(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_PageTranslation(get(value))); + check_hresult(WINRT_SHIM(IMouseWheelParameters)->put_PageTranslation(get_abi(value))); } template Windows::UI::Input::GestureSettings impl_IGestureRecognizer::GestureSettings() const { Windows::UI::Input::GestureSettings value {}; - check_hresult(static_cast(static_cast(*this))->get_GestureSettings(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_GestureSettings(&value)); return value; } template void impl_IGestureRecognizer::GestureSettings(Windows::UI::Input::GestureSettings value) const { - check_hresult(static_cast(static_cast(*this))->put_GestureSettings(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_GestureSettings(value)); } template bool impl_IGestureRecognizer::IsInertial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInertial(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_IsInertial(&value)); return value; } template bool impl_IGestureRecognizer::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_IsActive(&value)); return value; } template bool impl_IGestureRecognizer::ShowGestureFeedback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowGestureFeedback(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_ShowGestureFeedback(&value)); return value; } template void impl_IGestureRecognizer::ShowGestureFeedback(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowGestureFeedback(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_ShowGestureFeedback(value)); } template Windows::Foundation::Point impl_IGestureRecognizer::PivotCenter() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_PivotCenter(put(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_PivotCenter(put_abi(value))); return value; } template void impl_IGestureRecognizer::PivotCenter(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_PivotCenter(get(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_PivotCenter(get_abi(value))); } template float impl_IGestureRecognizer::PivotRadius() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_PivotRadius(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_PivotRadius(&value)); return value; } template void impl_IGestureRecognizer::PivotRadius(float value) const { - check_hresult(static_cast(static_cast(*this))->put_PivotRadius(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_PivotRadius(value)); } template float impl_IGestureRecognizer::InertiaTranslationDeceleration() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaTranslationDeceleration(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaTranslationDeceleration(&value)); return value; } template void impl_IGestureRecognizer::InertiaTranslationDeceleration(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaTranslationDeceleration(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaTranslationDeceleration(value)); } template float impl_IGestureRecognizer::InertiaRotationDeceleration() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaRotationDeceleration(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaRotationDeceleration(&value)); return value; } template void impl_IGestureRecognizer::InertiaRotationDeceleration(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaRotationDeceleration(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaRotationDeceleration(value)); } template float impl_IGestureRecognizer::InertiaExpansionDeceleration() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaExpansionDeceleration(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaExpansionDeceleration(&value)); return value; } template void impl_IGestureRecognizer::InertiaExpansionDeceleration(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaExpansionDeceleration(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaExpansionDeceleration(value)); } template float impl_IGestureRecognizer::InertiaTranslationDisplacement() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaTranslationDisplacement(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaTranslationDisplacement(&value)); return value; } template void impl_IGestureRecognizer::InertiaTranslationDisplacement(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaTranslationDisplacement(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaTranslationDisplacement(value)); } template float impl_IGestureRecognizer::InertiaRotationAngle() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaRotationAngle(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaRotationAngle(&value)); return value; } template void impl_IGestureRecognizer::InertiaRotationAngle(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaRotationAngle(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaRotationAngle(value)); } template float impl_IGestureRecognizer::InertiaExpansion() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_InertiaExpansion(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_InertiaExpansion(&value)); return value; } template void impl_IGestureRecognizer::InertiaExpansion(float value) const { - check_hresult(static_cast(static_cast(*this))->put_InertiaExpansion(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_InertiaExpansion(value)); } template bool impl_IGestureRecognizer::ManipulationExact() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ManipulationExact(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_ManipulationExact(&value)); return value; } template void impl_IGestureRecognizer::ManipulationExact(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ManipulationExact(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_ManipulationExact(value)); } template Windows::UI::Input::CrossSlideThresholds impl_IGestureRecognizer::CrossSlideThresholds() const { Windows::UI::Input::CrossSlideThresholds value {}; - check_hresult(static_cast(static_cast(*this))->get_CrossSlideThresholds(put(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_CrossSlideThresholds(put_abi(value))); return value; } template void impl_IGestureRecognizer::CrossSlideThresholds(const Windows::UI::Input::CrossSlideThresholds & value) const { - check_hresult(static_cast(static_cast(*this))->put_CrossSlideThresholds(get(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_CrossSlideThresholds(get_abi(value))); } template bool impl_IGestureRecognizer::CrossSlideHorizontally() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CrossSlideHorizontally(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_CrossSlideHorizontally(&value)); return value; } template void impl_IGestureRecognizer::CrossSlideHorizontally(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CrossSlideHorizontally(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_CrossSlideHorizontally(value)); } template bool impl_IGestureRecognizer::CrossSlideExact() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CrossSlideExact(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_CrossSlideExact(&value)); return value; } template void impl_IGestureRecognizer::CrossSlideExact(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CrossSlideExact(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_CrossSlideExact(value)); } template bool impl_IGestureRecognizer::AutoProcessInertia() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoProcessInertia(&value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_AutoProcessInertia(&value)); return value; } template void impl_IGestureRecognizer::AutoProcessInertia(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoProcessInertia(value)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->put_AutoProcessInertia(value)); } template Windows::UI::Input::MouseWheelParameters impl_IGestureRecognizer::MouseWheelParameters() const { Windows::UI::Input::MouseWheelParameters value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MouseWheelParameters(put(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->get_MouseWheelParameters(put_abi(value))); return value; } template bool impl_IGestureRecognizer::CanBeDoubleTap(const Windows::UI::Input::PointerPoint & value) const { bool canBeDoubleTap {}; - check_hresult(static_cast(static_cast(*this))->abi_CanBeDoubleTap(get(value), &canBeDoubleTap)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_CanBeDoubleTap(get_abi(value), &canBeDoubleTap)); return canBeDoubleTap; } template void impl_IGestureRecognizer::ProcessDownEvent(const Windows::UI::Input::PointerPoint & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessDownEvent(get(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_ProcessDownEvent(get_abi(value))); } template void impl_IGestureRecognizer::ProcessMoveEvents(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessMoveEvents(get(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_ProcessMoveEvents(get_abi(value))); } template void impl_IGestureRecognizer::ProcessUpEvent(const Windows::UI::Input::PointerPoint & value) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessUpEvent(get(value))); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_ProcessUpEvent(get_abi(value))); } template void impl_IGestureRecognizer::ProcessMouseWheelEvent(const Windows::UI::Input::PointerPoint & value, bool isShiftKeyDown, bool isControlKeyDown) const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessMouseWheelEvent(get(value), isShiftKeyDown, isControlKeyDown)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_ProcessMouseWheelEvent(get_abi(value), isShiftKeyDown, isControlKeyDown)); } template void impl_IGestureRecognizer::ProcessInertia() const { - check_hresult(static_cast(static_cast(*this))->abi_ProcessInertia()); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_ProcessInertia()); } template void impl_IGestureRecognizer::CompleteGesture() const { - check_hresult(static_cast(static_cast(*this))->abi_CompleteGesture()); + check_hresult(WINRT_SHIM(IGestureRecognizer)->abi_CompleteGesture()); } template event_token impl_IGestureRecognizer::Tapped(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Tapped(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_Tapped(get_abi(handler), &pCookie)); return pCookie; } @@ -3462,13 +3668,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::Tapped(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Tapped(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_Tapped(cookie)); } template event_token impl_IGestureRecognizer::RightTapped(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_RightTapped(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_RightTapped(get_abi(handler), &pCookie)); return pCookie; } @@ -3479,13 +3685,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::RightTapped(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_RightTapped(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_RightTapped(cookie)); } template event_token impl_IGestureRecognizer::Holding(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Holding(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_Holding(get_abi(handler), &pCookie)); return pCookie; } @@ -3496,13 +3702,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::Holding(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Holding(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_Holding(cookie)); } template event_token impl_IGestureRecognizer::Dragging(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_Dragging(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_Dragging(get_abi(handler), &pCookie)); return pCookie; } @@ -3513,13 +3719,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::Dragging(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Dragging(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_Dragging(cookie)); } template event_token impl_IGestureRecognizer::ManipulationStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationStarted(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_ManipulationStarted(get_abi(handler), &pCookie)); return pCookie; } @@ -3530,13 +3736,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::ManipulationStarted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationStarted(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_ManipulationStarted(cookie)); } template event_token impl_IGestureRecognizer::ManipulationUpdated(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationUpdated(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_ManipulationUpdated(get_abi(handler), &pCookie)); return pCookie; } @@ -3547,13 +3753,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::ManipulationUpdated(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationUpdated(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_ManipulationUpdated(cookie)); } template event_token impl_IGestureRecognizer::ManipulationInertiaStarting(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationInertiaStarting(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_ManipulationInertiaStarting(get_abi(handler), &pCookie)); return pCookie; } @@ -3564,13 +3770,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::ManipulationInertiaStarting(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationInertiaStarting(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_ManipulationInertiaStarting(cookie)); } template event_token impl_IGestureRecognizer::ManipulationCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_ManipulationCompleted(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_ManipulationCompleted(get_abi(handler), &pCookie)); return pCookie; } @@ -3581,13 +3787,13 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::ManipulationCompleted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ManipulationCompleted(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_ManipulationCompleted(cookie)); } template event_token impl_IGestureRecognizer::CrossSliding(const Windows::Foundation::TypedEventHandler & handler) const { event_token pCookie {}; - check_hresult(static_cast(static_cast(*this))->add_CrossSliding(get(handler), &pCookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->add_CrossSliding(get_abi(handler), &pCookie)); return pCookie; } @@ -3598,411 +3804,411 @@ template event_revoker impl_IGestureRecognizer< template void impl_IGestureRecognizer::CrossSliding(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CrossSliding(cookie)); + check_hresult(WINRT_SHIM(IGestureRecognizer)->remove_CrossSliding(cookie)); } template Windows::UI::Input::PointerPoint impl_IPointerPointStatics::GetCurrentPoint(uint32_t pointerId) const { Windows::UI::Input::PointerPoint pointerPoint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentPoint(pointerId, put(pointerPoint))); + check_hresult(WINRT_SHIM(IPointerPointStatics)->abi_GetCurrentPoint(pointerId, put_abi(pointerPoint))); return pointerPoint; } template Windows::Foundation::Collections::IVector impl_IPointerPointStatics::GetIntermediatePoints(uint32_t pointerId) const { Windows::Foundation::Collections::IVector pointerPoints; - check_hresult(static_cast(static_cast(*this))->abi_GetIntermediatePoints(pointerId, put(pointerPoints))); + check_hresult(WINRT_SHIM(IPointerPointStatics)->abi_GetIntermediatePoints(pointerId, put_abi(pointerPoints))); return pointerPoints; } template Windows::UI::Input::PointerPoint impl_IPointerPointStatics::GetCurrentPoint(uint32_t pointerId, const Windows::UI::Input::IPointerPointTransform & transform) const { Windows::UI::Input::PointerPoint pointerPoint { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetCurrentPointTransformed(pointerId, get(transform), put(pointerPoint))); + check_hresult(WINRT_SHIM(IPointerPointStatics)->abi_GetCurrentPointTransformed(pointerId, get_abi(transform), put_abi(pointerPoint))); return pointerPoint; } template Windows::Foundation::Collections::IVector impl_IPointerPointStatics::GetIntermediatePoints(uint32_t pointerId, const Windows::UI::Input::IPointerPointTransform & transform) const { Windows::Foundation::Collections::IVector pointerPoints; - check_hresult(static_cast(static_cast(*this))->abi_GetIntermediatePointsTransformed(pointerId, get(transform), put(pointerPoints))); + check_hresult(WINRT_SHIM(IPointerPointStatics)->abi_GetIntermediatePointsTransformed(pointerId, get_abi(transform), put_abi(pointerPoints))); return pointerPoints; } template Windows::UI::Input::IPointerPointTransform impl_IPointerPointTransform::Inverse() const { Windows::UI::Input::IPointerPointTransform value; - check_hresult(static_cast(static_cast(*this))->get_Inverse(put(value))); + check_hresult(WINRT_SHIM(IPointerPointTransform)->get_Inverse(put_abi(value))); return value; } template bool impl_IPointerPointTransform::TryTransform(const Windows::Foundation::Point & inPoint, Windows::Foundation::Point & outPoint) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_TryTransform(get(inPoint), put(outPoint), &returnValue)); + check_hresult(WINRT_SHIM(IPointerPointTransform)->abi_TryTransform(get_abi(inPoint), put_abi(outPoint), &returnValue)); return returnValue; } template Windows::Foundation::Rect impl_IPointerPointTransform::TransformBounds(const Windows::Foundation::Rect & rect) const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_TransformBounds(get(rect), put(returnValue))); + check_hresult(WINRT_SHIM(IPointerPointTransform)->abi_TransformBounds(get_abi(rect), put_abi(returnValue))); return returnValue; } template Windows::Devices::Input::PointerDevice impl_IPointerPoint::PointerDevice() const { Windows::Devices::Input::PointerDevice value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerDevice(put(value))); + check_hresult(WINRT_SHIM(IPointerPoint)->get_PointerDevice(put_abi(value))); return value; } template Windows::Foundation::Point impl_IPointerPoint::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IPointerPoint)->get_Position(put_abi(value))); return value; } template Windows::Foundation::Point impl_IPointerPoint::RawPosition() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_RawPosition(put(value))); + check_hresult(WINRT_SHIM(IPointerPoint)->get_RawPosition(put_abi(value))); return value; } template uint32_t impl_IPointerPoint::PointerId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerId(&value)); + check_hresult(WINRT_SHIM(IPointerPoint)->get_PointerId(&value)); return value; } template uint32_t impl_IPointerPoint::FrameId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FrameId(&value)); + check_hresult(WINRT_SHIM(IPointerPoint)->get_FrameId(&value)); return value; } template uint64_t impl_IPointerPoint::Timestamp() const { uint64_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Timestamp(&value)); + check_hresult(WINRT_SHIM(IPointerPoint)->get_Timestamp(&value)); return value; } template bool impl_IPointerPoint::IsInContact() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInContact(&value)); + check_hresult(WINRT_SHIM(IPointerPoint)->get_IsInContact(&value)); return value; } template Windows::UI::Input::PointerPointProperties impl_IPointerPoint::Properties() const { Windows::UI::Input::PointerPointProperties value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Properties(put(value))); + check_hresult(WINRT_SHIM(IPointerPoint)->get_Properties(put_abi(value))); return value; } template float impl_IPointerPointProperties::Pressure() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Pressure(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_Pressure(&value)); return value; } template bool impl_IPointerPointProperties::IsInverted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInverted(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsInverted(&value)); return value; } template bool impl_IPointerPointProperties::IsEraser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEraser(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsEraser(&value)); return value; } template float impl_IPointerPointProperties::Orientation() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_Orientation(&value)); return value; } template float impl_IPointerPointProperties::XTilt() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_XTilt(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_XTilt(&value)); return value; } template float impl_IPointerPointProperties::YTilt() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_YTilt(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_YTilt(&value)); return value; } template float impl_IPointerPointProperties::Twist() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Twist(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_Twist(&value)); return value; } template Windows::Foundation::Rect impl_IPointerPointProperties::ContactRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ContactRect(put(value))); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_ContactRect(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IPointerPointProperties::ContactRectRaw() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ContactRectRaw(put(value))); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_ContactRectRaw(put_abi(value))); return value; } template bool impl_IPointerPointProperties::TouchConfidence() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TouchConfidence(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_TouchConfidence(&value)); return value; } template bool impl_IPointerPointProperties::IsLeftButtonPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLeftButtonPressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsLeftButtonPressed(&value)); return value; } template bool impl_IPointerPointProperties::IsRightButtonPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRightButtonPressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsRightButtonPressed(&value)); return value; } template bool impl_IPointerPointProperties::IsMiddleButtonPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMiddleButtonPressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsMiddleButtonPressed(&value)); return value; } template int32_t impl_IPointerPointProperties::MouseWheelDelta() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MouseWheelDelta(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_MouseWheelDelta(&value)); return value; } template bool impl_IPointerPointProperties::IsHorizontalMouseWheel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHorizontalMouseWheel(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsHorizontalMouseWheel(&value)); return value; } template bool impl_IPointerPointProperties::IsPrimary() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrimary(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsPrimary(&value)); return value; } template bool impl_IPointerPointProperties::IsInRange() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInRange(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsInRange(&value)); return value; } template bool impl_IPointerPointProperties::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsCanceled(&value)); return value; } template bool impl_IPointerPointProperties::IsBarrelButtonPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBarrelButtonPressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsBarrelButtonPressed(&value)); return value; } template bool impl_IPointerPointProperties::IsXButton1Pressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsXButton1Pressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsXButton1Pressed(&value)); return value; } template bool impl_IPointerPointProperties::IsXButton2Pressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsXButton2Pressed(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_IsXButton2Pressed(&value)); return value; } template Windows::UI::Input::PointerUpdateKind impl_IPointerPointProperties::PointerUpdateKind() const { Windows::UI::Input::PointerUpdateKind value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerUpdateKind(&value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->get_PointerUpdateKind(&value)); return value; } template bool impl_IPointerPointProperties::HasUsage(uint32_t usagePage, uint32_t usageId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_HasUsage(usagePage, usageId, &value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->abi_HasUsage(usagePage, usageId, &value)); return value; } template int32_t impl_IPointerPointProperties::GetUsageValue(uint32_t usagePage, uint32_t usageId) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetUsageValue(usagePage, usageId, &value)); + check_hresult(WINRT_SHIM(IPointerPointProperties)->abi_GetUsageValue(usagePage, usageId, &value)); return value; } template Windows::Foundation::IReference impl_IPointerPointProperties2::ZDistance() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ZDistance(put(value))); + check_hresult(WINRT_SHIM(IPointerPointProperties2)->get_ZDistance(put_abi(value))); return value; } template void impl_IPointerVisualizationSettings::IsContactFeedbackEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsContactFeedbackEnabled(value)); + check_hresult(WINRT_SHIM(IPointerVisualizationSettings)->put_IsContactFeedbackEnabled(value)); } template bool impl_IPointerVisualizationSettings::IsContactFeedbackEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsContactFeedbackEnabled(&value)); + check_hresult(WINRT_SHIM(IPointerVisualizationSettings)->get_IsContactFeedbackEnabled(&value)); return value; } template void impl_IPointerVisualizationSettings::IsBarrelButtonFeedbackEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsBarrelButtonFeedbackEnabled(value)); + check_hresult(WINRT_SHIM(IPointerVisualizationSettings)->put_IsBarrelButtonFeedbackEnabled(value)); } template bool impl_IPointerVisualizationSettings::IsBarrelButtonFeedbackEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBarrelButtonFeedbackEnabled(&value)); + check_hresult(WINRT_SHIM(IPointerVisualizationSettings)->get_IsBarrelButtonFeedbackEnabled(&value)); return value; } template Windows::UI::Input::PointerVisualizationSettings impl_IPointerVisualizationSettingsStatics::GetForCurrentView() const { Windows::UI::Input::PointerVisualizationSettings visualizationSettings { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(visualizationSettings))); + check_hresult(WINRT_SHIM(IPointerVisualizationSettingsStatics)->abi_GetForCurrentView(put_abi(visualizationSettings))); return visualizationSettings; } template Windows::Foundation::Rect impl_IRadialControllerScreenContact::Bounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerScreenContact)->get_Bounds(put_abi(value))); return value; } template Windows::Foundation::Point impl_IRadialControllerScreenContact::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerScreenContact)->get_Position(put_abi(value))); return value; } template double impl_IRadialControllerRotationChangedEventArgs::RotationDeltaInDegrees() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationDeltaInDegrees(&value)); + check_hresult(WINRT_SHIM(IRadialControllerRotationChangedEventArgs)->get_RotationDeltaInDegrees(&value)); return value; } template Windows::UI::Input::RadialControllerScreenContact impl_IRadialControllerRotationChangedEventArgs::Contact() const { Windows::UI::Input::RadialControllerScreenContact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerRotationChangedEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::UI::Input::RadialControllerScreenContact impl_IRadialControllerScreenContactStartedEventArgs::Contact() const { Windows::UI::Input::RadialControllerScreenContact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerScreenContactStartedEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::UI::Input::RadialControllerScreenContact impl_IRadialControllerScreenContactContinuedEventArgs::Contact() const { Windows::UI::Input::RadialControllerScreenContact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerScreenContactContinuedEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::UI::Input::RadialControllerScreenContact impl_IRadialControllerButtonClickedEventArgs::Contact() const { Windows::UI::Input::RadialControllerScreenContact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerButtonClickedEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::UI::Input::RadialControllerScreenContact impl_IRadialControllerControlAcquiredEventArgs::Contact() const { Windows::UI::Input::RadialControllerScreenContact value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Contact(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerControlAcquiredEventArgs)->get_Contact(put_abi(value))); return value; } template Windows::UI::Input::RadialControllerMenu impl_IRadialController::Menu() const { Windows::UI::Input::RadialControllerMenu value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Menu(put(value))); + check_hresult(WINRT_SHIM(IRadialController)->get_Menu(put_abi(value))); return value; } template double impl_IRadialController::RotationResolutionInDegrees() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_RotationResolutionInDegrees(&value)); + check_hresult(WINRT_SHIM(IRadialController)->get_RotationResolutionInDegrees(&value)); return value; } template void impl_IRadialController::RotationResolutionInDegrees(double value) const { - check_hresult(static_cast(static_cast(*this))->put_RotationResolutionInDegrees(value)); + check_hresult(WINRT_SHIM(IRadialController)->put_RotationResolutionInDegrees(value)); } template bool impl_IRadialController::UseAutomaticHapticFeedback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UseAutomaticHapticFeedback(&value)); + check_hresult(WINRT_SHIM(IRadialController)->get_UseAutomaticHapticFeedback(&value)); return value; } template void impl_IRadialController::UseAutomaticHapticFeedback(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_UseAutomaticHapticFeedback(value)); + check_hresult(WINRT_SHIM(IRadialController)->put_UseAutomaticHapticFeedback(value)); } template event_token impl_IRadialController::ScreenContactStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ScreenContactStarted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IRadialController)->add_ScreenContactStarted(get_abi(handler), &cookie)); return cookie; } @@ -4013,30 +4219,30 @@ template event_revoker impl_IRadialController template void impl_IRadialController::ScreenContactStarted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ScreenContactStarted(cookie)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ScreenContactStarted(cookie)); } -template event_token impl_IRadialController::ScreenContactEnded(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IRadialController::ScreenContactEnded(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ScreenContactEnded(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IRadialController)->add_ScreenContactEnded(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IRadialController::ScreenContactEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IRadialController::ScreenContactEnded(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Input::IRadialController::remove_ScreenContactEnded, ScreenContactEnded(handler)); } template void impl_IRadialController::ScreenContactEnded(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ScreenContactEnded(cookie)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ScreenContactEnded(cookie)); } template event_token impl_IRadialController::ScreenContactContinued(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ScreenContactContinued(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IRadialController)->add_ScreenContactContinued(get_abi(handler), &cookie)); return cookie; } @@ -4047,30 +4253,30 @@ template event_revoker impl_IRadialController template void impl_IRadialController::ScreenContactContinued(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ScreenContactContinued(cookie)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ScreenContactContinued(cookie)); } -template event_token impl_IRadialController::ControlLost(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IRadialController::ControlLost(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ControlLost(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IRadialController)->add_ControlLost(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IRadialController::ControlLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IRadialController::ControlLost(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Input::IRadialController::remove_ControlLost, ControlLost(handler)); } template void impl_IRadialController::ControlLost(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ControlLost(cookie)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ControlLost(cookie)); } template event_token impl_IRadialController::RotationChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RotationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IRadialController)->add_RotationChanged(get_abi(handler), &token)); return token; } @@ -4081,13 +4287,13 @@ template event_revoker impl_IRadialController template void impl_IRadialController::RotationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RotationChanged(token)); + check_hresult(WINRT_SHIM(IRadialController)->remove_RotationChanged(token)); } template event_token impl_IRadialController::ButtonClicked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ButtonClicked(get(handler), &token)); + check_hresult(WINRT_SHIM(IRadialController)->add_ButtonClicked(get_abi(handler), &token)); return token; } @@ -4098,13 +4304,13 @@ template event_revoker impl_IRadialController template void impl_IRadialController::ButtonClicked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ButtonClicked(token)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ButtonClicked(token)); } template event_token impl_IRadialController::ControlAcquired(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ControlAcquired(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IRadialController)->add_ControlAcquired(get_abi(handler), &cookie)); return cookie; } @@ -4115,132 +4321,132 @@ template event_revoker impl_IRadialController template void impl_IRadialController::ControlAcquired(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ControlAcquired(cookie)); + check_hresult(WINRT_SHIM(IRadialController)->remove_ControlAcquired(cookie)); } template bool impl_IRadialControllerStatics::IsSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&result)); + check_hresult(WINRT_SHIM(IRadialControllerStatics)->abi_IsSupported(&result)); return result; } template Windows::UI::Input::RadialController impl_IRadialControllerStatics::CreateForCurrentView() const { Windows::UI::Input::RadialController result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateForCurrentView(put(result))); + check_hresult(WINRT_SHIM(IRadialControllerStatics)->abi_CreateForCurrentView(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IRadialControllerMenu::Items() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->get_Items(put_abi(value))); return value; } template bool impl_IRadialControllerMenu::IsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEnabled(&value)); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->get_IsEnabled(&value)); return value; } template void impl_IRadialControllerMenu::IsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsEnabled(value)); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->put_IsEnabled(value)); } template Windows::UI::Input::RadialControllerMenuItem impl_IRadialControllerMenu::GetSelectedMenuItem() const { Windows::UI::Input::RadialControllerMenuItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSelectedMenuItem(put(result))); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->abi_GetSelectedMenuItem(put_abi(result))); return result; } template void impl_IRadialControllerMenu::SelectMenuItem(const Windows::UI::Input::RadialControllerMenuItem & menuItem) const { - check_hresult(static_cast(static_cast(*this))->abi_SelectMenuItem(get(menuItem))); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->abi_SelectMenuItem(get_abi(menuItem))); } template bool impl_IRadialControllerMenu::TrySelectPreviouslySelectedMenuItem() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySelectPreviouslySelectedMenuItem(&result)); + check_hresult(WINRT_SHIM(IRadialControllerMenu)->abi_TrySelectPreviouslySelectedMenuItem(&result)); return result; } -template Windows::UI::Input::RadialControllerMenuItem impl_IRadialControllerMenuItemStatics::CreateFromIcon(hstring_ref displayText, const Windows::Storage::Streams::RandomAccessStreamReference & icon) const +template Windows::UI::Input::RadialControllerMenuItem impl_IRadialControllerMenuItemStatics::CreateFromIcon(hstring_view displayText, const Windows::Storage::Streams::RandomAccessStreamReference & icon) const { Windows::UI::Input::RadialControllerMenuItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromIcon(get(displayText), get(icon), put(result))); + check_hresult(WINRT_SHIM(IRadialControllerMenuItemStatics)->abi_CreateFromIcon(get_abi(displayText), get_abi(icon), put_abi(result))); return result; } -template Windows::UI::Input::RadialControllerMenuItem impl_IRadialControllerMenuItemStatics::CreateFromKnownIcon(hstring_ref displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value) const +template Windows::UI::Input::RadialControllerMenuItem impl_IRadialControllerMenuItemStatics::CreateFromKnownIcon(hstring_view displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value) const { Windows::UI::Input::RadialControllerMenuItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromKnownIcon(get(displayText), value, put(result))); + check_hresult(WINRT_SHIM(IRadialControllerMenuItemStatics)->abi_CreateFromKnownIcon(get_abi(displayText), value, put_abi(result))); return result; } template hstring impl_IRadialControllerMenuItem::DisplayText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayText(put(value))); + check_hresult(WINRT_SHIM(IRadialControllerMenuItem)->get_DisplayText(put_abi(value))); return value; } -template Windows::IInspectable impl_IRadialControllerMenuItem::Tag() const +template Windows::Foundation::IInspectable impl_IRadialControllerMenuItem::Tag() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRadialControllerMenuItem)->get_Tag(put_abi(value))); return value; } -template void impl_IRadialControllerMenuItem::Tag(const Windows::IInspectable & value) const +template void impl_IRadialControllerMenuItem::Tag(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(IRadialControllerMenuItem)->put_Tag(get_abi(value))); } -template event_token impl_IRadialControllerMenuItem::Invoked(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IRadialControllerMenuItem::Invoked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Invoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IRadialControllerMenuItem)->add_Invoked(get_abi(handler), &token)); return token; } -template event_revoker impl_IRadialControllerMenuItem::Invoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IRadialControllerMenuItem::Invoked(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Input::IRadialControllerMenuItem::remove_Invoked, Invoked(handler)); } template void impl_IRadialControllerMenuItem::Invoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Invoked(token)); + check_hresult(WINRT_SHIM(IRadialControllerMenuItem)->remove_Invoked(token)); } -template void impl_IRadialControllerConfiguration::SetDefaultMenuItems(const Windows::Foundation::Collections::IIterable & buttons) const +template void impl_IRadialControllerConfiguration::SetDefaultMenuItems(iterable buttons) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultMenuItems(get(buttons))); + check_hresult(WINRT_SHIM(IRadialControllerConfiguration)->abi_SetDefaultMenuItems(get_abi(buttons))); } template void impl_IRadialControllerConfiguration::ResetToDefaultMenuItems() const { - check_hresult(static_cast(static_cast(*this))->abi_ResetToDefaultMenuItems()); + check_hresult(WINRT_SHIM(IRadialControllerConfiguration)->abi_ResetToDefaultMenuItems()); } template bool impl_IRadialControllerConfiguration::TrySelectDefaultMenuItem(Windows::UI::Input::RadialControllerSystemMenuItemKind type) const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySelectDefaultMenuItem(type, &result)); + check_hresult(WINRT_SHIM(IRadialControllerConfiguration)->abi_TrySelectDefaultMenuItem(type, &result)); return result; } template Windows::UI::Input::RadialControllerConfiguration impl_IRadialControllerConfigurationStatics::GetForCurrentView() const { Windows::UI::Input::RadialControllerConfiguration configuration { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(configuration))); + check_hresult(WINRT_SHIM(IRadialControllerConfigurationStatics)->abi_GetForCurrentView(put_abi(configuration))); return configuration; } @@ -4298,12 +4504,12 @@ inline Windows::UI::Input::RadialControllerConfiguration RadialControllerConfigu return get_activation_factory().GetForCurrentView(); } -inline Windows::UI::Input::RadialControllerMenuItem RadialControllerMenuItem::CreateFromIcon(hstring_ref displayText, const Windows::Storage::Streams::RandomAccessStreamReference & icon) +inline Windows::UI::Input::RadialControllerMenuItem RadialControllerMenuItem::CreateFromIcon(hstring_view displayText, const Windows::Storage::Streams::RandomAccessStreamReference & icon) { return get_activation_factory().CreateFromIcon(displayText, icon); } -inline Windows::UI::Input::RadialControllerMenuItem RadialControllerMenuItem::CreateFromKnownIcon(hstring_ref displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value) +inline Windows::UI::Input::RadialControllerMenuItem RadialControllerMenuItem::CreateFromKnownIcon(hstring_view displayText, Windows::UI::Input::RadialControllerMenuKnownIcon value) { return get_activation_factory().CreateFromKnownIcon(displayText, value); } @@ -4311,3 +4517,572 @@ inline Windows::UI::Input::RadialControllerMenuItem RadialControllerMenuItem::Cr } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ICrossSlidingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IDraggingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IEdgeGesture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IEdgeGestureEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IEdgeGestureStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IGestureRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IHoldingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IKeyboardDeliveryInterceptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IKeyboardDeliveryInterceptorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IManipulationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IManipulationInertiaStartingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IManipulationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IManipulationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IMouseWheelParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerPoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerPointProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerPointProperties2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerPointStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerPointTransform & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerVisualizationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IPointerVisualizationSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerConfigurationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerControlAcquiredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerMenu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerMenuItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerMenuItemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerRotationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerScreenContact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerScreenContactContinuedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerScreenContactStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRadialControllerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::IRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ITappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::CrossSlidingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::DraggingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::EdgeGesture & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::EdgeGestureEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::GestureRecognizer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::HoldingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::KeyboardDeliveryInterceptor & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ManipulationCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ManipulationInertiaStartingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ManipulationStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::ManipulationUpdatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::MouseWheelParameters & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::PointerPoint & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::PointerPointProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::PointerVisualizationSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialController & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerButtonClickedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerConfiguration & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerControlAcquiredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerMenu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerMenuItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerRotationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerScreenContact & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerScreenContactContinuedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RadialControllerScreenContactStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::RightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Input::TappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Notifications.Management.h b/10.0.14393.0/winrt/Windows.UI.Notifications.Management.h index 575584d1d..8a090050b 100644 --- a/10.0.14393.0/winrt/Windows.UI.Notifications.Management.h +++ b/10.0.14393.0/winrt/Windows.UI.Notifications.Management.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Notifications.3.h" #include "internal/Windows.UI.Notifications.Management.3.h" @@ -15,11 +18,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall abi_RequestAccessAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_RequestAccessAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().RequestAccessAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().RequestAccessAsync()); return S_OK; } catch (...) @@ -33,7 +37,8 @@ struct produceshim().GetAccessStatus()); + typename D::abi_guard guard(this->shim()); + *accessStatus = detach_abi(this->shim().GetAccessStatus()); return S_OK; } catch (...) @@ -42,11 +47,12 @@ struct produce> handler, event_token * token) noexcept override + HRESULT __stdcall add_NotificationChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().NotificationChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NotificationChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -59,6 +65,7 @@ struct produceshim()); this->shim().NotificationChanged(token); return S_OK; } @@ -68,11 +75,12 @@ struct produce>> result) noexcept override + HRESULT __stdcall abi_GetNotificationsAsync(Windows::UI::Notifications::NotificationKinds kinds, impl::abi_arg_out>> result) noexcept override { try { - *result = detach(this->shim().GetNotificationsAsync(kinds)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetNotificationsAsync(kinds)); return S_OK; } catch (...) @@ -82,11 +90,12 @@ struct produce result) noexcept override + HRESULT __stdcall abi_GetNotification(uint32_t notificationId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetNotification(notificationId)); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetNotification(notificationId)); return S_OK; } catch (...) @@ -100,6 +109,7 @@ struct produceshim()); this->shim().ClearNotifications(); return S_OK; } @@ -113,6 +123,7 @@ struct produceshim()); this->shim().RemoveNotification(notificationId); return S_OK; } @@ -126,11 +137,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out result) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -148,28 +160,28 @@ namespace Windows::UI::Notifications::Management { template Windows::UI::Notifications::Management::UserNotificationListener impl_IUserNotificationListenerStatics::Current() const { Windows::UI::Notifications::Management::UserNotificationListener result { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Current(put(result))); + check_hresult(WINRT_SHIM(IUserNotificationListenerStatics)->get_Current(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IUserNotificationListener::RequestAccessAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_RequestAccessAsync(put(result))); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_RequestAccessAsync(put_abi(result))); return result; } template Windows::UI::Notifications::Management::UserNotificationListenerAccessStatus impl_IUserNotificationListener::GetAccessStatus() const { Windows::UI::Notifications::Management::UserNotificationListenerAccessStatus accessStatus {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessStatus(&accessStatus)); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_GetAccessStatus(&accessStatus)); return accessStatus; } template event_token impl_IUserNotificationListener::NotificationChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NotificationChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IUserNotificationListener)->add_NotificationChanged(get_abi(handler), &token)); return token; } @@ -180,31 +192,31 @@ template event_revoker impl_IUserNotific template void impl_IUserNotificationListener::NotificationChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NotificationChanged(token)); + check_hresult(WINRT_SHIM(IUserNotificationListener)->remove_NotificationChanged(token)); } template Windows::Foundation::IAsyncOperation> impl_IUserNotificationListener::GetNotificationsAsync(Windows::UI::Notifications::NotificationKinds kinds) const { Windows::Foundation::IAsyncOperation> result; - check_hresult(static_cast(static_cast(*this))->abi_GetNotificationsAsync(kinds, put(result))); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_GetNotificationsAsync(kinds, put_abi(result))); return result; } template Windows::UI::Notifications::UserNotification impl_IUserNotificationListener::GetNotification(uint32_t notificationId) const { Windows::UI::Notifications::UserNotification result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetNotification(notificationId, put(result))); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_GetNotification(notificationId, put_abi(result))); return result; } template void impl_IUserNotificationListener::ClearNotifications() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearNotifications()); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_ClearNotifications()); } template void impl_IUserNotificationListener::RemoveNotification(uint32_t notificationId) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveNotification(notificationId)); + check_hresult(WINRT_SHIM(IUserNotificationListener)->abi_RemoveNotification(notificationId)); } inline Windows::UI::Notifications::Management::UserNotificationListener UserNotificationListener::Current() @@ -215,3 +227,32 @@ inline Windows::UI::Notifications::Management::UserNotificationListener UserNoti } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::Management::IUserNotificationListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::Management::IUserNotificationListenerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::Management::UserNotificationListener & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Notifications.h b/10.0.14393.0/winrt/Windows.UI.Notifications.h index 74a537f5a..b28932200 100644 --- a/10.0.14393.0/winrt/Windows.UI.Notifications.h +++ b/10.0.14393.0/winrt/Windows.UI.Notifications.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.ApplicationModel.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -22,7 +25,8 @@ struct produce : pr { try { - *value = detach(this->shim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : pr } } - HRESULT __stdcall get_Hints(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Hints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Hints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hints()); return S_OK; } catch (...) @@ -49,11 +54,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -63,10 +69,11 @@ struct produce : produ } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -76,11 +83,12 @@ struct produce : produ } } - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -90,10 +98,11 @@ struct produce : produ } } - HRESULT __stdcall put_Language(abi_arg_in value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -107,11 +116,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -121,10 +131,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ExpirationTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -134,11 +145,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_CreateBadgeNotification(abi_arg_in content, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateBadgeNotification(impl::abi_arg_in content, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateBadgeNotification(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateBadgeNotification(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -170,11 +183,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateBadgeUpdaterForApplication(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForApplication(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateBadgeUpdaterForApplication()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateBadgeUpdaterForApplication()); return S_OK; } catch (...) @@ -184,11 +198,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateBadgeUpdaterForApplicationWithId(abi_arg_in applicationId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForApplicationWithId(impl::abi_arg_in applicationId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -198,11 +213,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateBadgeUpdaterForSecondaryTile(abi_arg_in tileId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -212,11 +228,12 @@ struct produce : prod } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -230,11 +247,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateBadgeUpdaterForApplication(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForApplication(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBadgeUpdaterForApplication()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBadgeUpdaterForApplication()); return S_OK; } catch (...) @@ -244,11 +262,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateBadgeUpdaterForApplicationWithId(abi_arg_in applicationId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForApplicationWithId(impl::abi_arg_in applicationId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -258,11 +277,12 @@ struct produce : prod } } - HRESULT __stdcall abi_CreateBadgeUpdaterForSecondaryTile(abi_arg_in tileId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateBadgeUpdaterForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -272,11 +292,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType type, abi_arg_out content) noexcept override + HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType type, impl::abi_arg_out content) noexcept override { try { - *content = detach(this->shim().GetTemplateContent(type)); + typename D::abi_guard guard(this->shim()); + *content = detach_abi(this->shim().GetTemplateContent(type)); return S_OK; } catch (...) @@ -290,11 +311,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -308,10 +330,11 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Update(abi_arg_in notification) noexcept override + HRESULT __stdcall abi_Update(impl::abi_arg_in notification) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(¬ification)); return S_OK; } @@ -325,6 +348,7 @@ struct produce : produce_baseshim()); this->shim().Clear(); return S_OK; } @@ -334,10 +358,11 @@ struct produce : produce_base badgeContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdate(impl::abi_arg_in badgeContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), requestedInterval); return S_OK; } @@ -347,10 +372,11 @@ struct produce : produce_base badgeContent, abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdateAtTime(impl::abi_arg_in badgeContent, impl::abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), *reinterpret_cast(&startTime), requestedInterval); return S_OK; } @@ -364,6 +390,7 @@ struct produce : produce_baseshim()); this->shim().StopPeriodicUpdate(); return S_OK; } @@ -377,11 +404,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Style(abi_arg_out value) noexcept override + HRESULT __stdcall get_Style(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Style()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Style()); return S_OK; } catch (...) @@ -391,11 +419,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Wrap(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wrap()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wrap()); return S_OK; } catch (...) @@ -405,11 +434,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxLines(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -419,11 +449,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinLines(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinLines()); return S_OK; } catch (...) @@ -433,11 +464,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TextStacking(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextStacking()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextStacking()); return S_OK; } catch (...) @@ -447,11 +479,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Align(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Align()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Align()); return S_OK; } catch (...) @@ -465,11 +498,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Caption(abi_arg_out value) noexcept override + HRESULT __stdcall get_Caption(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Caption()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Caption()); return S_OK; } catch (...) @@ -479,11 +513,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Body(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Body()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Body()); return S_OK; } catch (...) @@ -493,11 +528,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Base(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Base()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Base()); return S_OK; } catch (...) @@ -507,11 +543,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subtitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subtitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subtitle()); return S_OK; } catch (...) @@ -521,11 +558,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -535,11 +573,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Subheader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Subheader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subheader()); return S_OK; } catch (...) @@ -549,11 +588,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -563,11 +603,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TitleNumeral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleNumeral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleNumeral()); return S_OK; } catch (...) @@ -577,11 +618,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SubheaderNumeral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubheaderNumeral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubheaderNumeral()); return S_OK; } catch (...) @@ -591,11 +633,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderNumeral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderNumeral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderNumeral()); return S_OK; } catch (...) @@ -605,11 +648,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CaptionSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CaptionSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaptionSubtle()); return S_OK; } catch (...) @@ -619,11 +663,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BodySubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BodySubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BodySubtle()); return S_OK; } catch (...) @@ -633,11 +678,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BaseSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BaseSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaseSubtle()); return S_OK; } catch (...) @@ -647,11 +693,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SubtitleSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubtitleSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubtitleSubtle()); return S_OK; } catch (...) @@ -661,11 +708,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TitleSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleSubtle()); return S_OK; } catch (...) @@ -675,11 +723,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SubheaderSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubheaderSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubheaderSubtle()); return S_OK; } catch (...) @@ -689,11 +738,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SubheaderNumeralSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SubheaderNumeralSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SubheaderNumeralSubtle()); return S_OK; } catch (...) @@ -703,11 +753,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderSubtle()); return S_OK; } catch (...) @@ -717,11 +768,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderNumeralSubtle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderNumeralSubtle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderNumeralSubtle()); return S_OK; } catch (...) @@ -735,11 +787,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ToastGeneric(abi_arg_out value) noexcept override + HRESULT __stdcall get_ToastGeneric(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ToastGeneric()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToastGeneric()); return S_OK; } catch (...) @@ -753,11 +806,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -767,10 +821,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -780,11 +835,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Visual(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Visual()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visual()); return S_OK; } catch (...) @@ -794,10 +850,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Visual(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Visual(*reinterpret_cast(&value)); return S_OK; } @@ -811,11 +868,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Template(abi_arg_out value) noexcept override + HRESULT __stdcall get_Template(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Template()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Template()); return S_OK; } catch (...) @@ -825,10 +883,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Template(abi_arg_in value) noexcept override + HRESULT __stdcall put_Template(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Template(*reinterpret_cast(&value)); return S_OK; } @@ -838,11 +897,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -852,10 +912,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Language(abi_arg_in value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -865,11 +926,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Hints(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Hints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Hints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hints()); return S_OK; } catch (...) @@ -879,11 +941,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetTextElements(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_GetTextElements(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().GetTextElements()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetTextElements()); return S_OK; } catch (...) @@ -897,11 +960,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -911,10 +975,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Language(abi_arg_in value) noexcept override + HRESULT __stdcall put_Language(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Language(*reinterpret_cast(&value)); return S_OK; } @@ -924,11 +989,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Bindings(abi_arg_out> result) noexcept override + HRESULT __stdcall get_Bindings(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().Bindings()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().Bindings()); return S_OK; } catch (...) @@ -938,11 +1004,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetBinding(abi_arg_in templateName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetBinding(impl::abi_arg_in templateName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetBinding(*reinterpret_cast(&templateName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetBinding(*reinterpret_cast(&templateName))); return S_OK; } catch (...) @@ -956,11 +1023,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -970,11 +1038,12 @@ struct produce : prod } } - HRESULT __stdcall get_DeliveryTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeliveryTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeliveryTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeliveryTime()); return S_OK; } catch (...) @@ -983,10 +1052,11 @@ struct produce : prod } } - HRESULT __stdcall put_ExpirationTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -996,11 +1066,12 @@ struct produce : prod } } - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -1010,10 +1081,11 @@ struct produce : prod } } - HRESULT __stdcall put_Tag(abi_arg_in value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } @@ -1023,11 +1095,12 @@ struct produce : prod } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -1037,10 +1110,11 @@ struct produce : prod } } - HRESULT __stdcall put_Id(abi_arg_in value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -1050,11 +1124,12 @@ struct produce : prod } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1068,11 +1143,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateScheduledTileNotification(abi_arg_in content, abi_arg_in deliveryTime, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateScheduledTileNotification(impl::abi_arg_in content, impl::abi_arg_in deliveryTime, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateScheduledTileNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateScheduledTileNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); return S_OK; } catch (...) @@ -1086,11 +1162,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -1100,11 +1177,12 @@ struct produce : pro } } - HRESULT __stdcall get_DeliveryTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DeliveryTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DeliveryTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeliveryTime()); return S_OK; } catch (...) @@ -1113,11 +1191,12 @@ struct produce : pro } } - HRESULT __stdcall get_SnoozeInterval(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SnoozeInterval(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SnoozeInterval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SnoozeInterval()); return S_OK; } catch (...) @@ -1131,7 +1210,8 @@ struct produce : pro { try { - *value = detach(this->shim().MaximumSnoozeCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumSnoozeCount()); return S_OK; } catch (...) @@ -1140,10 +1220,11 @@ struct produce : pro } } - HRESULT __stdcall put_Id(abi_arg_in value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return S_OK; } @@ -1153,11 +1234,12 @@ struct produce : pro } } - HRESULT __stdcall get_Id(abi_arg_out value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -1171,10 +1253,11 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall put_Tag(abi_arg_in value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } @@ -1184,11 +1267,12 @@ struct produce : pr } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -1198,10 +1282,11 @@ struct produce : pr } } - HRESULT __stdcall put_Group(abi_arg_in value) noexcept override + HRESULT __stdcall put_Group(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Group(*reinterpret_cast(&value)); return S_OK; } @@ -1211,11 +1296,12 @@ struct produce : pr } } - HRESULT __stdcall get_Group(abi_arg_out value) noexcept override + HRESULT __stdcall get_Group(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -1229,6 +1315,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().SuppressPopup(value); return S_OK; } @@ -1242,7 +1329,8 @@ struct produce : pr { try { - *value = detach(this->shim().SuppressPopup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuppressPopup()); return S_OK; } catch (...) @@ -1259,7 +1347,8 @@ struct produce : pr { try { - *value = detach(this->shim().NotificationMirroring()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotificationMirroring()); return S_OK; } catch (...) @@ -1272,6 +1361,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().NotificationMirroring(value); return S_OK; } @@ -1281,11 +1371,12 @@ struct produce : pr } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -1295,10 +1386,11 @@ struct produce : pr } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -1312,11 +1404,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateScheduledToastNotification(abi_arg_in content, abi_arg_in deliveryTime, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateScheduledToastNotification(impl::abi_arg_in content, impl::abi_arg_in deliveryTime, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateScheduledToastNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateScheduledToastNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); return S_OK; } catch (...) @@ -1326,11 +1419,12 @@ struct produce content, abi_arg_in deliveryTime, abi_arg_in snoozeInterval, uint32_t maximumSnoozeCount, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateScheduledToastNotificationRecurring(impl::abi_arg_in content, impl::abi_arg_in deliveryTime, impl::abi_arg_in snoozeInterval, uint32_t maximumSnoozeCount, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateScheduledToastNotificationRecurring(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime), *reinterpret_cast(&snoozeInterval), maximumSnoozeCount)); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateScheduledToastNotificationRecurring(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime), *reinterpret_cast(&snoozeInterval), maximumSnoozeCount)); return S_OK; } catch (...) @@ -1344,11 +1438,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -1362,11 +1457,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -1376,10 +1472,11 @@ struct produce : produce } } - HRESULT __stdcall put_ExpirationTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -1389,11 +1486,12 @@ struct produce : produce } } - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -1407,11 +1505,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateTileFlyoutNotification(abi_arg_in content, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateTileFlyoutNotification(impl::abi_arg_in content, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateTileFlyoutNotification(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateTileFlyoutNotification(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -1425,11 +1524,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateTileFlyoutUpdaterForApplication(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileFlyoutUpdaterForApplication(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileFlyoutUpdaterForApplication()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileFlyoutUpdaterForApplication()); return S_OK; } catch (...) @@ -1439,11 +1539,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateTileFlyoutUpdaterForApplicationWithId(abi_arg_in applicationId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileFlyoutUpdaterForApplicationWithId(impl::abi_arg_in applicationId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileFlyoutUpdaterForApplication(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileFlyoutUpdaterForApplication(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1453,11 +1554,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateTileFlyoutUpdaterForSecondaryTile(abi_arg_in tileId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileFlyoutUpdaterForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileFlyoutUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileFlyoutUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -1467,11 +1569,12 @@ struct produce : } } - HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType type, abi_arg_out content) noexcept override + HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType type, impl::abi_arg_out content) noexcept override { try { - *content = detach(this->shim().GetTemplateContent(type)); + typename D::abi_guard guard(this->shim()); + *content = detach_abi(this->shim().GetTemplateContent(type)); return S_OK; } catch (...) @@ -1485,10 +1588,11 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_Update(abi_arg_in notification) noexcept override + HRESULT __stdcall abi_Update(impl::abi_arg_in notification) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(¬ification)); return S_OK; } @@ -1502,6 +1606,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -1511,10 +1616,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_StartPeriodicUpdate(abi_arg_in tileFlyoutContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdate(impl::abi_arg_in tileFlyoutContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), requestedInterval); return S_OK; } @@ -1524,10 +1630,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_StartPeriodicUpdateAtTime(abi_arg_in tileFlyoutContent, abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdateAtTime(impl::abi_arg_in tileFlyoutContent, impl::abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), *reinterpret_cast(&startTime), requestedInterval); return S_OK; } @@ -1541,6 +1648,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().StopPeriodicUpdate(); return S_OK; } @@ -1554,7 +1662,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Setting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Setting()); return S_OK; } catch (...) @@ -1567,11 +1676,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -1581,10 +1691,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_ExpirationTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -1594,11 +1705,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -1608,10 +1720,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Tag(abi_arg_in value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } @@ -1621,11 +1734,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -1639,11 +1753,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateTileNotification(abi_arg_in content, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateTileNotification(impl::abi_arg_in content, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateTileNotification(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateTileNotification(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -1657,11 +1772,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateTileUpdaterForApplication(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForApplication(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForApplicationForUser()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForApplicationForUser()); return S_OK; } catch (...) @@ -1671,11 +1787,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateTileUpdaterForApplicationWithId(abi_arg_in applicationId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForApplicationWithId(impl::abi_arg_in applicationId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1685,11 +1802,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateTileUpdaterForSecondaryTile(abi_arg_in tileId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -1699,11 +1817,12 @@ struct produce : produ } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -1717,11 +1836,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateTileUpdaterForApplication(abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForApplication(impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForApplication()); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForApplication()); return S_OK; } catch (...) @@ -1731,11 +1851,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateTileUpdaterForApplicationWithId(abi_arg_in applicationId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForApplicationWithId(impl::abi_arg_in applicationId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -1745,11 +1866,12 @@ struct produce : produ } } - HRESULT __stdcall abi_CreateTileUpdaterForSecondaryTile(abi_arg_in tileId, abi_arg_out updater) noexcept override + HRESULT __stdcall abi_CreateTileUpdaterForSecondaryTile(impl::abi_arg_in tileId, impl::abi_arg_out updater) noexcept override { try { - *updater = detach(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *updater = detach_abi(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -1759,11 +1881,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::TileTemplateType type, abi_arg_out content) noexcept override + HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::TileTemplateType type, impl::abi_arg_out content) noexcept override { try { - *content = detach(this->shim().GetTemplateContent(type)); + typename D::abi_guard guard(this->shim()); + *content = detach_abi(this->shim().GetTemplateContent(type)); return S_OK; } catch (...) @@ -1777,11 +1900,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -1795,10 +1919,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_Update(abi_arg_in notification) noexcept override + HRESULT __stdcall abi_Update(impl::abi_arg_in notification) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(¬ification)); return S_OK; } @@ -1812,6 +1937,7 @@ struct produce : produce_baseshim()); this->shim().Clear(); return S_OK; } @@ -1825,6 +1951,7 @@ struct produce : produce_baseshim()); this->shim().EnableNotificationQueue(enable); return S_OK; } @@ -1838,7 +1965,8 @@ struct produce : produce_baseshim().Setting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Setting()); return S_OK; } catch (...) @@ -1847,10 +1975,11 @@ struct produce : produce_base scheduledTile) noexcept override + HRESULT __stdcall abi_AddToSchedule(impl::abi_arg_in scheduledTile) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddToSchedule(*reinterpret_cast(&scheduledTile)); return S_OK; } @@ -1860,10 +1989,11 @@ struct produce : produce_base scheduledTile) noexcept override + HRESULT __stdcall abi_RemoveFromSchedule(impl::abi_arg_in scheduledTile) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledTile)); return S_OK; } @@ -1873,11 +2003,12 @@ struct produce : produce_base> scheduledTiles) noexcept override + HRESULT __stdcall abi_GetScheduledTileNotifications(impl::abi_arg_out> scheduledTiles) noexcept override { try { - *scheduledTiles = detach(this->shim().GetScheduledTileNotifications()); + typename D::abi_guard guard(this->shim()); + *scheduledTiles = detach_abi(this->shim().GetScheduledTileNotifications()); return S_OK; } catch (...) @@ -1887,10 +2018,11 @@ struct produce : produce_base tileContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdate(impl::abi_arg_in tileContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), requestedInterval); return S_OK; } @@ -1900,10 +2032,11 @@ struct produce : produce_base tileContent, abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdateAtTime(impl::abi_arg_in tileContent, impl::abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), *reinterpret_cast(&startTime), requestedInterval); return S_OK; } @@ -1917,6 +2050,7 @@ struct produce : produce_baseshim()); this->shim().StopPeriodicUpdate(); return S_OK; } @@ -1926,10 +2060,11 @@ struct produce : produce_base> tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdateBatch(impl::abi_arg_in> tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdateBatch(*reinterpret_cast *>(&tileContents), requestedInterval); return S_OK; } @@ -1939,10 +2074,11 @@ struct produce : produce_base> tileContents, abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override + HRESULT __stdcall abi_StartPeriodicUpdateBatchAtTime(impl::abi_arg_in> tileContents, impl::abi_arg_in startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartPeriodicUpdateBatch(*reinterpret_cast *>(&tileContents), *reinterpret_cast(&startTime), requestedInterval); return S_OK; } @@ -1960,6 +2096,7 @@ struct produce : produce_baseshim()); this->shim().EnableNotificationQueueForSquare150x150(enable); return S_OK; } @@ -1973,6 +2110,7 @@ struct produce : produce_baseshim()); this->shim().EnableNotificationQueueForWide310x150(enable); return S_OK; } @@ -1986,6 +2124,7 @@ struct produce : produce_baseshim()); this->shim().EnableNotificationQueueForSquare310x310(enable); return S_OK; } @@ -1999,11 +2138,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Arguments(abi_arg_out value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -2021,7 +2161,8 @@ struct produce : produc { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -2038,7 +2179,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ErrorCode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ErrorCode()); return S_OK; } catch (...) @@ -2051,11 +2193,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -2065,10 +2208,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ExpirationTime(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ExpirationTime(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast *>(&value)); return S_OK; } @@ -2078,11 +2222,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ExpirationTime(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ExpirationTime(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ExpirationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpirationTime()); return S_OK; } catch (...) @@ -2092,11 +2237,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_Dismissed(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Dismissed(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Dismissed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Dismissed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2109,6 +2255,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Dismissed(cookie); return S_OK; } @@ -2118,11 +2265,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_Activated(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_Activated(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().Activated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().Activated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2135,6 +2283,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Activated(cookie); return S_OK; } @@ -2144,11 +2293,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_Failed(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Failed(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Failed(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Failed(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2161,6 +2311,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Failed(token); return S_OK; } @@ -2174,10 +2325,11 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall put_Tag(abi_arg_in value) noexcept override + HRESULT __stdcall put_Tag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Tag(*reinterpret_cast(&value)); return S_OK; } @@ -2187,11 +2339,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -2201,10 +2354,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Group(abi_arg_in value) noexcept override + HRESULT __stdcall put_Group(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Group(*reinterpret_cast(&value)); return S_OK; } @@ -2214,11 +2368,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Group(abi_arg_out value) noexcept override + HRESULT __stdcall get_Group(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -2232,6 +2387,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().SuppressPopup(value); return S_OK; } @@ -2245,7 +2401,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().SuppressPopup()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuppressPopup()); return S_OK; } catch (...) @@ -2262,7 +2419,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().NotificationMirroring()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NotificationMirroring()); return S_OK; } catch (...) @@ -2275,6 +2433,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().NotificationMirroring(value); return S_OK; } @@ -2284,11 +2443,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_RemoteId(abi_arg_out value) noexcept override + HRESULT __stdcall get_RemoteId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RemoteId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemoteId()); return S_OK; } catch (...) @@ -2298,10 +2458,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_RemoteId(abi_arg_in value) noexcept override + HRESULT __stdcall put_RemoteId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoteId(*reinterpret_cast(&value)); return S_OK; } @@ -2315,11 +2476,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Argument(abi_arg_out argument) noexcept override + HRESULT __stdcall get_Argument(impl::abi_arg_out argument) noexcept override { try { - *argument = detach(this->shim().Argument()); + typename D::abi_guard guard(this->shim()); + *argument = detach_abi(this->shim().Argument()); return S_OK; } catch (...) @@ -2329,11 +2491,12 @@ struct produce inputs) noexcept override + HRESULT __stdcall get_UserInput(impl::abi_arg_out inputs) noexcept override { try { - *inputs = detach(this->shim().UserInput()); + typename D::abi_guard guard(this->shim()); + *inputs = detach_abi(this->shim().UserInput()); return S_OK; } catch (...) @@ -2347,11 +2510,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateToastNotification(abi_arg_in content, abi_arg_out notification) noexcept override + HRESULT __stdcall abi_CreateToastNotification(impl::abi_arg_in content, impl::abi_arg_out notification) noexcept override { try { - *notification = detach(this->shim().CreateToastNotification(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *notification = detach_abi(this->shim().CreateToastNotification(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -2365,10 +2529,11 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_RemoveGroup(abi_arg_in group) noexcept override + HRESULT __stdcall abi_RemoveGroup(impl::abi_arg_in group) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveGroup(*reinterpret_cast(&group)); return S_OK; } @@ -2378,10 +2543,11 @@ struct produce : produ } } - HRESULT __stdcall abi_RemoveGroupWithId(abi_arg_in group, abi_arg_in applicationId) noexcept override + HRESULT __stdcall abi_RemoveGroupWithId(impl::abi_arg_in group, impl::abi_arg_in applicationId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveGroup(*reinterpret_cast(&group), *reinterpret_cast(&applicationId)); return S_OK; } @@ -2391,10 +2557,11 @@ struct produce : produ } } - HRESULT __stdcall abi_RemoveGroupedTagWithId(abi_arg_in tag, abi_arg_in group, abi_arg_in applicationId) noexcept override + HRESULT __stdcall abi_RemoveGroupedTagWithId(impl::abi_arg_in tag, impl::abi_arg_in group, impl::abi_arg_in applicationId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group), *reinterpret_cast(&applicationId)); return S_OK; } @@ -2404,10 +2571,11 @@ struct produce : produ } } - HRESULT __stdcall abi_RemoveGroupedTag(abi_arg_in tag, abi_arg_in group) noexcept override + HRESULT __stdcall abi_RemoveGroupedTag(impl::abi_arg_in tag, impl::abi_arg_in group) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group)); return S_OK; } @@ -2417,10 +2585,11 @@ struct produce : produ } } - HRESULT __stdcall abi_Remove(abi_arg_in tag) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in tag) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&tag)); return S_OK; } @@ -2434,6 +2603,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(); return S_OK; } @@ -2443,10 +2613,11 @@ struct produce : produ } } - HRESULT __stdcall abi_ClearWithId(abi_arg_in applicationId) noexcept override + HRESULT __stdcall abi_ClearWithId(impl::abi_arg_in applicationId) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Clear(*reinterpret_cast(&applicationId)); return S_OK; } @@ -2460,11 +2631,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_GetHistory(abi_arg_out> toasts) noexcept override + HRESULT __stdcall abi_GetHistory(impl::abi_arg_out> toasts) noexcept override { try { - *toasts = detach(this->shim().GetHistory()); + typename D::abi_guard guard(this->shim()); + *toasts = detach_abi(this->shim().GetHistory()); return S_OK; } catch (...) @@ -2474,11 +2646,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetHistoryWithId(abi_arg_in applicationId, abi_arg_out> toasts) noexcept override + HRESULT __stdcall abi_GetHistoryWithId(impl::abi_arg_in applicationId, impl::abi_arg_out> toasts) noexcept override { try { - *toasts = detach(this->shim().GetHistory(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *toasts = detach_abi(this->shim().GetHistory(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -2496,7 +2669,8 @@ struct produceshim().ChangeType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeType()); return S_OK; } catch (...) @@ -2509,11 +2683,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateToastNotifier(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateToastNotifier(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateToastNotifier()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateToastNotifier()); return S_OK; } catch (...) @@ -2523,11 +2698,12 @@ struct produce } } - HRESULT __stdcall abi_CreateToastNotifierWithId(abi_arg_in applicationId, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateToastNotifierWithId(impl::abi_arg_in applicationId, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -2537,11 +2713,12 @@ struct produce } } - HRESULT __stdcall get_History(abi_arg_out value) noexcept override + HRESULT __stdcall get_History(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().History()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().History()); return S_OK; } catch (...) @@ -2551,11 +2728,12 @@ struct produce } } - HRESULT __stdcall get_User(abi_arg_out value) noexcept override + HRESULT __stdcall get_User(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().User()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().User()); return S_OK; } catch (...) @@ -2569,11 +2747,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateToastNotifier(abi_arg_out notifier) noexcept override + HRESULT __stdcall abi_CreateToastNotifier(impl::abi_arg_out notifier) noexcept override { try { - *notifier = detach(this->shim().CreateToastNotifier()); + typename D::abi_guard guard(this->shim()); + *notifier = detach_abi(this->shim().CreateToastNotifier()); return S_OK; } catch (...) @@ -2583,11 +2762,12 @@ struct produce } } - HRESULT __stdcall abi_CreateToastNotifierWithId(abi_arg_in applicationId, abi_arg_out notifier) noexcept override + HRESULT __stdcall abi_CreateToastNotifierWithId(impl::abi_arg_in applicationId, impl::abi_arg_out notifier) noexcept override { try { - *notifier = detach(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *notifier = detach_abi(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -2597,11 +2777,12 @@ struct produce } } - HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::ToastTemplateType type, abi_arg_out content) noexcept override + HRESULT __stdcall abi_GetTemplateContent(Windows::UI::Notifications::ToastTemplateType type, impl::abi_arg_out content) noexcept override { try { - *content = detach(this->shim().GetTemplateContent(type)); + typename D::abi_guard guard(this->shim()); + *content = detach_abi(this->shim().GetTemplateContent(type)); return S_OK; } catch (...) @@ -2615,11 +2796,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_History(abi_arg_out value) noexcept override + HRESULT __stdcall get_History(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().History()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().History()); return S_OK; } catch (...) @@ -2633,11 +2815,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetForUser(abi_arg_in user, abi_arg_out result) noexcept override + HRESULT __stdcall abi_GetForUser(impl::abi_arg_in user, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().GetForUser(*reinterpret_cast(&user))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().GetForUser(*reinterpret_cast(&user))); return S_OK; } catch (...) @@ -2651,6 +2834,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigureNotificationMirroring(value); return S_OK; } @@ -2664,10 +2848,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_Show(abi_arg_in notification) noexcept override + HRESULT __stdcall abi_Show(impl::abi_arg_in notification) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(¬ification)); return S_OK; } @@ -2677,10 +2862,11 @@ struct produce : produce_base notification) noexcept override + HRESULT __stdcall abi_Hide(impl::abi_arg_in notification) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Hide(*reinterpret_cast(¬ification)); return S_OK; } @@ -2694,7 +2880,8 @@ struct produce : produce_baseshim().Setting()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Setting()); return S_OK; } catch (...) @@ -2703,10 +2890,11 @@ struct produce : produce_base scheduledToast) noexcept override + HRESULT __stdcall abi_AddToSchedule(impl::abi_arg_in scheduledToast) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddToSchedule(*reinterpret_cast(&scheduledToast)); return S_OK; } @@ -2716,10 +2904,11 @@ struct produce : produce_base scheduledToast) noexcept override + HRESULT __stdcall abi_RemoveFromSchedule(impl::abi_arg_in scheduledToast) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledToast)); return S_OK; } @@ -2729,11 +2918,12 @@ struct produce : produce_base> scheduledToasts) noexcept override + HRESULT __stdcall abi_GetScheduledToastNotifications(impl::abi_arg_out> scheduledToasts) noexcept override { try { - *scheduledToasts = detach(this->shim().GetScheduledToastNotifications()); + typename D::abi_guard guard(this->shim()); + *scheduledToasts = detach_abi(this->shim().GetScheduledToastNotifications()); return S_OK; } catch (...) @@ -2747,11 +2937,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Notification(abi_arg_out value) noexcept override + HRESULT __stdcall get_Notification(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Notification()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Notification()); return S_OK; } catch (...) @@ -2761,11 +2952,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_AppInfo(abi_arg_out value) noexcept override + HRESULT __stdcall get_AppInfo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AppInfo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AppInfo()); return S_OK; } catch (...) @@ -2779,7 +2971,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -2788,11 +2981,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_CreationTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_CreationTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreationTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreationTime()); return S_OK; } catch (...) @@ -2809,7 +3003,8 @@ struct produce { try { - *value = detach(this->shim().ChangeKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeKind()); return S_OK; } catch (...) @@ -2822,7 +3017,8 @@ struct produce { try { - *value = detach(this->shim().UserNotificationId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserNotificationId()); return S_OK; } catch (...) @@ -2839,822 +3035,822 @@ namespace Windows::UI::Notifications { template hstring impl_IShownTileNotification::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IShownTileNotification)->get_Arguments(put_abi(value))); return value; } template Windows::UI::Notifications::UserNotificationChangedKind impl_IUserNotificationChangedEventArgs::ChangeKind() const { Windows::UI::Notifications::UserNotificationChangedKind value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeKind(&value)); + check_hresult(WINRT_SHIM(IUserNotificationChangedEventArgs)->get_ChangeKind(&value)); return value; } template uint32_t impl_IUserNotificationChangedEventArgs::UserNotificationId() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UserNotificationId(&value)); + check_hresult(WINRT_SHIM(IUserNotificationChangedEventArgs)->get_UserNotificationId(&value)); return value; } template Windows::UI::Notifications::Notification impl_IUserNotification::Notification() const { Windows::UI::Notifications::Notification value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Notification(put(value))); + check_hresult(WINRT_SHIM(IUserNotification)->get_Notification(put_abi(value))); return value; } template Windows::ApplicationModel::AppInfo impl_IUserNotification::AppInfo() const { Windows::ApplicationModel::AppInfo value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AppInfo(put(value))); + check_hresult(WINRT_SHIM(IUserNotification)->get_AppInfo(put_abi(value))); return value; } template uint32_t impl_IUserNotification::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IUserNotification)->get_Id(&value)); return value; } template Windows::Foundation::DateTime impl_IUserNotification::CreationTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_CreationTime(put(value))); + check_hresult(WINRT_SHIM(IUserNotification)->get_CreationTime(put_abi(value))); return value; } template hstring impl_INotificationVisual::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(INotificationVisual)->get_Language(put_abi(value))); return value; } -template void impl_INotificationVisual::Language(hstring_ref value) const +template void impl_INotificationVisual::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(INotificationVisual)->put_Language(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_INotificationVisual::Bindings() const { Windows::Foundation::Collections::IVector result; - check_hresult(static_cast(static_cast(*this))->get_Bindings(put(result))); + check_hresult(WINRT_SHIM(INotificationVisual)->get_Bindings(put_abi(result))); return result; } -template Windows::UI::Notifications::NotificationBinding impl_INotificationVisual::GetBinding(hstring_ref templateName) const +template Windows::UI::Notifications::NotificationBinding impl_INotificationVisual::GetBinding(hstring_view templateName) const { Windows::UI::Notifications::NotificationBinding result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetBinding(get(templateName), put(result))); + check_hresult(WINRT_SHIM(INotificationVisual)->abi_GetBinding(get_abi(templateName), put_abi(result))); return result; } template Windows::UI::Notifications::AdaptiveNotificationContentKind impl_IAdaptiveNotificationContent::Kind() const { Windows::UI::Notifications::AdaptiveNotificationContentKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IAdaptiveNotificationContent)->get_Kind(&value)); return value; } template Windows::Foundation::Collections::IMap impl_IAdaptiveNotificationContent::Hints() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Hints(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveNotificationContent)->get_Hints(put_abi(value))); return value; } template hstring impl_INotificationBinding::Template() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Template(put(value))); + check_hresult(WINRT_SHIM(INotificationBinding)->get_Template(put_abi(value))); return value; } -template void impl_INotificationBinding::Template(hstring_ref value) const +template void impl_INotificationBinding::Template(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Template(get(value))); + check_hresult(WINRT_SHIM(INotificationBinding)->put_Template(get_abi(value))); } template hstring impl_INotificationBinding::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(INotificationBinding)->get_Language(put_abi(value))); return value; } -template void impl_INotificationBinding::Language(hstring_ref value) const +template void impl_INotificationBinding::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(INotificationBinding)->put_Language(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_INotificationBinding::Hints() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_Hints(put(value))); + check_hresult(WINRT_SHIM(INotificationBinding)->get_Hints(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_INotificationBinding::GetTextElements() const { Windows::Foundation::Collections::IVectorView result; - check_hresult(static_cast(static_cast(*this))->abi_GetTextElements(put(result))); + check_hresult(WINRT_SHIM(INotificationBinding)->abi_GetTextElements(put_abi(result))); return result; } template hstring impl_IKnownNotificationBindingsStatics::ToastGeneric() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ToastGeneric(put(value))); + check_hresult(WINRT_SHIM(IKnownNotificationBindingsStatics)->get_ToastGeneric(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::Style() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Style(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_Style(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::Wrap() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Wrap(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_Wrap(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::MaxLines() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_MaxLines(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::MinLines() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MinLines(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_MinLines(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::TextStacking() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextStacking(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_TextStacking(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationHintsStatics::Align() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Align(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationHintsStatics)->get_Align(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Caption() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Caption(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Caption(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Body() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Body(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Body(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Base() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Base(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Base(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Subtitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subtitle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Subtitle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Title(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Subheader() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Subheader(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Subheader(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::Header() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_Header(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::TitleNumeral() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TitleNumeral(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_TitleNumeral(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeral() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubheaderNumeral(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeral(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeral() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderNumeral(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeral(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::CaptionSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CaptionSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_CaptionSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::BodySubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BodySubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_BodySubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::BaseSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_BaseSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_BaseSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::SubtitleSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubtitleSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_SubtitleSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::TitleSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TitleSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_TitleSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::SubheaderSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubheaderSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeralSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SubheaderNumeralSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeralSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::HeaderSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderSubtle(put_abi(value))); return value; } template hstring impl_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeralSubtle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderNumeralSubtle(put(value))); + check_hresult(WINRT_SHIM(IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeralSubtle(put_abi(value))); return value; } template hstring impl_IAdaptiveNotificationText::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveNotificationText)->get_Text(put_abi(value))); return value; } -template void impl_IAdaptiveNotificationText::Text(hstring_ref value) const +template void impl_IAdaptiveNotificationText::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveNotificationText)->put_Text(get_abi(value))); } template hstring impl_IAdaptiveNotificationText::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(IAdaptiveNotificationText)->get_Language(put_abi(value))); return value; } -template void impl_IAdaptiveNotificationText::Language(hstring_ref value) const +template void impl_IAdaptiveNotificationText::Language(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Language(get(value))); + check_hresult(WINRT_SHIM(IAdaptiveNotificationText)->put_Language(get_abi(value))); } template Windows::UI::Notifications::ToastDismissalReason impl_IToastDismissedEventArgs::Reason() const { Windows::UI::Notifications::ToastDismissalReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IToastDismissedEventArgs)->get_Reason(&value)); return value; } template HRESULT impl_IToastFailedEventArgs::ErrorCode() const { HRESULT value {}; - check_hresult(static_cast(static_cast(*this))->get_ErrorCode(&value)); + check_hresult(WINRT_SHIM(IToastFailedEventArgs)->get_ErrorCode(&value)); return value; } template hstring impl_IToastActivatedEventArgs::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IToastActivatedEventArgs)->get_Arguments(put_abi(value))); return value; } template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerStatics::CreateTileUpdaterForApplication() const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForApplication(put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerStatics)->abi_CreateTileUpdaterForApplication(put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerStatics::CreateTileUpdaterForApplication(hstring_ref applicationId) const +template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerStatics::CreateTileUpdaterForApplication(hstring_view applicationId) const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForApplicationWithId(get(applicationId), put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerStatics)->abi_CreateTileUpdaterForApplicationWithId(get_abi(applicationId), put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerStatics::CreateTileUpdaterForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerStatics::CreateTileUpdaterForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForSecondaryTile(get(tileId), put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerStatics)->abi_CreateTileUpdaterForSecondaryTile(get_abi(tileId), put_abi(updater))); return updater; } template Windows::Data::Xml::Dom::XmlDocument impl_ITileUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileTemplateType type) const { Windows::Data::Xml::Dom::XmlDocument content { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTemplateContent(type, put(content))); + check_hresult(WINRT_SHIM(ITileUpdateManagerStatics)->abi_GetTemplateContent(type, put_abi(content))); return content; } template Windows::UI::Notifications::TileUpdateManagerForUser impl_ITileUpdateManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::UI::Notifications::TileUpdateManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(ITileUpdateManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerForUser::CreateTileUpdaterForApplicationForUser() const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForApplication(put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerForUser)->abi_CreateTileUpdaterForApplication(put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerForUser::CreateTileUpdaterForApplication(hstring_ref applicationId) const +template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerForUser::CreateTileUpdaterForApplication(hstring_view applicationId) const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForApplicationWithId(get(applicationId), put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerForUser)->abi_CreateTileUpdaterForApplicationWithId(get_abi(applicationId), put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerForUser::CreateTileUpdaterForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::TileUpdater impl_ITileUpdateManagerForUser::CreateTileUpdaterForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::TileUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileUpdaterForSecondaryTile(get(tileId), put(updater))); + check_hresult(WINRT_SHIM(ITileUpdateManagerForUser)->abi_CreateTileUpdaterForSecondaryTile(get_abi(tileId), put_abi(updater))); return updater; } template Windows::System::User impl_ITileUpdateManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(ITileUpdateManagerForUser)->get_User(put_abi(value))); return value; } template void impl_ITileUpdater::Update(const Windows::UI::Notifications::TileNotification & notification) const { - check_hresult(static_cast(static_cast(*this))->abi_Update(get(notification))); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_Update(get_abi(notification))); } template void impl_ITileUpdater::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_Clear()); } template void impl_ITileUpdater::EnableNotificationQueue(bool enable) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableNotificationQueue(enable)); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_EnableNotificationQueue(enable)); } template Windows::UI::Notifications::NotificationSetting impl_ITileUpdater::Setting() const { Windows::UI::Notifications::NotificationSetting value {}; - check_hresult(static_cast(static_cast(*this))->get_Setting(&value)); + check_hresult(WINRT_SHIM(ITileUpdater)->get_Setting(&value)); return value; } template void impl_ITileUpdater::AddToSchedule(const Windows::UI::Notifications::ScheduledTileNotification & scheduledTile) const { - check_hresult(static_cast(static_cast(*this))->abi_AddToSchedule(get(scheduledTile))); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_AddToSchedule(get_abi(scheduledTile))); } template void impl_ITileUpdater::RemoveFromSchedule(const Windows::UI::Notifications::ScheduledTileNotification & scheduledTile) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFromSchedule(get(scheduledTile))); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_RemoveFromSchedule(get_abi(scheduledTile))); } template Windows::Foundation::Collections::IVectorView impl_ITileUpdater::GetScheduledTileNotifications() const { Windows::Foundation::Collections::IVectorView scheduledTiles; - check_hresult(static_cast(static_cast(*this))->abi_GetScheduledTileNotifications(put(scheduledTiles))); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_GetScheduledTileNotifications(put_abi(scheduledTiles))); return scheduledTiles; } template void impl_ITileUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & tileContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdate(get(tileContent), requestedInterval)); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_StartPeriodicUpdate(get_abi(tileContent), requestedInterval)); } template void impl_ITileUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & tileContent, const Windows::Foundation::DateTime & startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdateAtTime(get(tileContent), get(startTime), requestedInterval)); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_StartPeriodicUpdateAtTime(get_abi(tileContent), get_abi(startTime), requestedInterval)); } template void impl_ITileUpdater::StopPeriodicUpdate() const { - check_hresult(static_cast(static_cast(*this))->abi_StopPeriodicUpdate()); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_StopPeriodicUpdate()); } -template void impl_ITileUpdater::StartPeriodicUpdateBatch(const Windows::Foundation::Collections::IIterable & tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const +template void impl_ITileUpdater::StartPeriodicUpdateBatch(iterable tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdateBatch(get(tileContents), requestedInterval)); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_StartPeriodicUpdateBatch(get_abi(tileContents), requestedInterval)); } -template void impl_ITileUpdater::StartPeriodicUpdateBatch(const Windows::Foundation::Collections::IIterable & tileContents, const Windows::Foundation::DateTime & startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const +template void impl_ITileUpdater::StartPeriodicUpdateBatch(iterable tileContents, const Windows::Foundation::DateTime & startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdateBatchAtTime(get(tileContents), get(startTime), requestedInterval)); + check_hresult(WINRT_SHIM(ITileUpdater)->abi_StartPeriodicUpdateBatchAtTime(get_abi(tileContents), get_abi(startTime), requestedInterval)); } template void impl_ITileUpdater2::EnableNotificationQueueForSquare150x150(bool enable) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableNotificationQueueForSquare150x150(enable)); + check_hresult(WINRT_SHIM(ITileUpdater2)->abi_EnableNotificationQueueForSquare150x150(enable)); } template void impl_ITileUpdater2::EnableNotificationQueueForWide310x150(bool enable) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableNotificationQueueForWide310x150(enable)); + check_hresult(WINRT_SHIM(ITileUpdater2)->abi_EnableNotificationQueueForWide310x150(enable)); } template void impl_ITileUpdater2::EnableNotificationQueueForSquare310x310(bool enable) const { - check_hresult(static_cast(static_cast(*this))->abi_EnableNotificationQueueForSquare310x310(enable)); + check_hresult(WINRT_SHIM(ITileUpdater2)->abi_EnableNotificationQueueForSquare310x310(enable)); } template Windows::UI::Notifications::TileFlyoutUpdater impl_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication() const { Windows::UI::Notifications::TileFlyoutUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileFlyoutUpdaterForApplication(put(updater))); + check_hresult(WINRT_SHIM(ITileFlyoutUpdateManagerStatics)->abi_CreateTileFlyoutUpdaterForApplication(put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileFlyoutUpdater impl_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication(hstring_ref applicationId) const +template Windows::UI::Notifications::TileFlyoutUpdater impl_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication(hstring_view applicationId) const { Windows::UI::Notifications::TileFlyoutUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileFlyoutUpdaterForApplicationWithId(get(applicationId), put(updater))); + check_hresult(WINRT_SHIM(ITileFlyoutUpdateManagerStatics)->abi_CreateTileFlyoutUpdaterForApplicationWithId(get_abi(applicationId), put_abi(updater))); return updater; } -template Windows::UI::Notifications::TileFlyoutUpdater impl_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::TileFlyoutUpdater impl_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::TileFlyoutUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileFlyoutUpdaterForSecondaryTile(get(tileId), put(updater))); + check_hresult(WINRT_SHIM(ITileFlyoutUpdateManagerStatics)->abi_CreateTileFlyoutUpdaterForSecondaryTile(get_abi(tileId), put_abi(updater))); return updater; } template Windows::Data::Xml::Dom::XmlDocument impl_ITileFlyoutUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType type) const { Windows::Data::Xml::Dom::XmlDocument content { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTemplateContent(type, put(content))); + check_hresult(WINRT_SHIM(ITileFlyoutUpdateManagerStatics)->abi_GetTemplateContent(type, put_abi(content))); return content; } template void impl_ITileFlyoutUpdater::Update(const Windows::UI::Notifications::TileFlyoutNotification & notification) const { - check_hresult(static_cast(static_cast(*this))->abi_Update(get(notification))); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->abi_Update(get_abi(notification))); } template void impl_ITileFlyoutUpdater::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->abi_Clear()); } template void impl_ITileFlyoutUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & tileFlyoutContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdate(get(tileFlyoutContent), requestedInterval)); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->abi_StartPeriodicUpdate(get_abi(tileFlyoutContent), requestedInterval)); } template void impl_ITileFlyoutUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & tileFlyoutContent, const Windows::Foundation::DateTime & startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdateAtTime(get(tileFlyoutContent), get(startTime), requestedInterval)); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->abi_StartPeriodicUpdateAtTime(get_abi(tileFlyoutContent), get_abi(startTime), requestedInterval)); } template void impl_ITileFlyoutUpdater::StopPeriodicUpdate() const { - check_hresult(static_cast(static_cast(*this))->abi_StopPeriodicUpdate()); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->abi_StopPeriodicUpdate()); } template Windows::UI::Notifications::NotificationSetting impl_ITileFlyoutUpdater::Setting() const { Windows::UI::Notifications::NotificationSetting value {}; - check_hresult(static_cast(static_cast(*this))->get_Setting(&value)); + check_hresult(WINRT_SHIM(ITileFlyoutUpdater)->get_Setting(&value)); return value; } template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication() const { Windows::UI::Notifications::BadgeUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForApplication(put(updater))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerStatics)->abi_CreateBadgeUpdaterForApplication(put_abi(updater))); return updater; } -template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication(hstring_ref applicationId) const +template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication(hstring_view applicationId) const { Windows::UI::Notifications::BadgeUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForApplicationWithId(get(applicationId), put(updater))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerStatics)->abi_CreateBadgeUpdaterForApplicationWithId(get_abi(applicationId), put_abi(updater))); return updater; } -template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::BadgeUpdater updater { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForSecondaryTile(get(tileId), put(updater))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerStatics)->abi_CreateBadgeUpdaterForSecondaryTile(get_abi(tileId), put_abi(updater))); return updater; } template Windows::Data::Xml::Dom::XmlDocument impl_IBadgeUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType type) const { Windows::Data::Xml::Dom::XmlDocument content { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTemplateContent(type, put(content))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerStatics)->abi_GetTemplateContent(type, put_abi(content))); return content; } template Windows::UI::Notifications::BadgeUpdateManagerForUser impl_IBadgeUpdateManagerStatics2::GetForUser(const Windows::System::User & user) const { Windows::UI::Notifications::BadgeUpdateManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerStatics2)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication() const { Windows::UI::Notifications::BadgeUpdater result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForApplication(put(result))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerForUser)->abi_CreateBadgeUpdaterForApplication(put_abi(result))); return result; } -template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication(hstring_ref applicationId) const +template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication(hstring_view applicationId) const { Windows::UI::Notifications::BadgeUpdater result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForApplicationWithId(get(applicationId), put(result))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerForUser)->abi_CreateBadgeUpdaterForApplicationWithId(get_abi(applicationId), put_abi(result))); return result; } -template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForSecondaryTile(hstring_ref tileId) const +template Windows::UI::Notifications::BadgeUpdater impl_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForSecondaryTile(hstring_view tileId) const { Windows::UI::Notifications::BadgeUpdater result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeUpdaterForSecondaryTile(get(tileId), put(result))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerForUser)->abi_CreateBadgeUpdaterForSecondaryTile(get_abi(tileId), put_abi(result))); return result; } template Windows::System::User impl_IBadgeUpdateManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IBadgeUpdateManagerForUser)->get_User(put_abi(value))); return value; } template void impl_IBadgeUpdater::Update(const Windows::UI::Notifications::BadgeNotification & notification) const { - check_hresult(static_cast(static_cast(*this))->abi_Update(get(notification))); + check_hresult(WINRT_SHIM(IBadgeUpdater)->abi_Update(get_abi(notification))); } template void impl_IBadgeUpdater::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IBadgeUpdater)->abi_Clear()); } template void impl_IBadgeUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & badgeContent, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdate(get(badgeContent), requestedInterval)); + check_hresult(WINRT_SHIM(IBadgeUpdater)->abi_StartPeriodicUpdate(get_abi(badgeContent), requestedInterval)); } template void impl_IBadgeUpdater::StartPeriodicUpdate(const Windows::Foundation::Uri & badgeContent, const Windows::Foundation::DateTime & startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence requestedInterval) const { - check_hresult(static_cast(static_cast(*this))->abi_StartPeriodicUpdateAtTime(get(badgeContent), get(startTime), requestedInterval)); + check_hresult(WINRT_SHIM(IBadgeUpdater)->abi_StartPeriodicUpdateAtTime(get_abi(badgeContent), get_abi(startTime), requestedInterval)); } template void impl_IBadgeUpdater::StopPeriodicUpdate() const { - check_hresult(static_cast(static_cast(*this))->abi_StopPeriodicUpdate()); + check_hresult(WINRT_SHIM(IBadgeUpdater)->abi_StopPeriodicUpdate()); } template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerStatics::CreateToastNotifier() const { Windows::UI::Notifications::ToastNotifier notifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifier(put(notifier))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics)->abi_CreateToastNotifier(put_abi(notifier))); return notifier; } -template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerStatics::CreateToastNotifier(hstring_ref applicationId) const +template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerStatics::CreateToastNotifier(hstring_view applicationId) const { Windows::UI::Notifications::ToastNotifier notifier { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifierWithId(get(applicationId), put(notifier))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics)->abi_CreateToastNotifierWithId(get_abi(applicationId), put_abi(notifier))); return notifier; } template Windows::Data::Xml::Dom::XmlDocument impl_IToastNotificationManagerStatics::GetTemplateContent(Windows::UI::Notifications::ToastTemplateType type) const { Windows::Data::Xml::Dom::XmlDocument content { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetTemplateContent(type, put(content))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics)->abi_GetTemplateContent(type, put_abi(content))); return content; } template void impl_IToastNotifier::Show(const Windows::UI::Notifications::ToastNotification & notification) const { - check_hresult(static_cast(static_cast(*this))->abi_Show(get(notification))); + check_hresult(WINRT_SHIM(IToastNotifier)->abi_Show(get_abi(notification))); } template void impl_IToastNotifier::Hide(const Windows::UI::Notifications::ToastNotification & notification) const { - check_hresult(static_cast(static_cast(*this))->abi_Hide(get(notification))); + check_hresult(WINRT_SHIM(IToastNotifier)->abi_Hide(get_abi(notification))); } template Windows::UI::Notifications::NotificationSetting impl_IToastNotifier::Setting() const { Windows::UI::Notifications::NotificationSetting value {}; - check_hresult(static_cast(static_cast(*this))->get_Setting(&value)); + check_hresult(WINRT_SHIM(IToastNotifier)->get_Setting(&value)); return value; } template void impl_IToastNotifier::AddToSchedule(const Windows::UI::Notifications::ScheduledToastNotification & scheduledToast) const { - check_hresult(static_cast(static_cast(*this))->abi_AddToSchedule(get(scheduledToast))); + check_hresult(WINRT_SHIM(IToastNotifier)->abi_AddToSchedule(get_abi(scheduledToast))); } template void impl_IToastNotifier::RemoveFromSchedule(const Windows::UI::Notifications::ScheduledToastNotification & scheduledToast) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFromSchedule(get(scheduledToast))); + check_hresult(WINRT_SHIM(IToastNotifier)->abi_RemoveFromSchedule(get_abi(scheduledToast))); } template Windows::Foundation::Collections::IVectorView impl_IToastNotifier::GetScheduledToastNotifications() const { Windows::Foundation::Collections::IVectorView scheduledToasts; - check_hresult(static_cast(static_cast(*this))->abi_GetScheduledToastNotifications(put(scheduledToasts))); + check_hresult(WINRT_SHIM(IToastNotifier)->abi_GetScheduledToastNotifications(put_abi(scheduledToasts))); return scheduledToasts; } template Windows::UI::Notifications::TileNotification impl_ITileNotificationFactory::CreateTileNotification(const Windows::Data::Xml::Dom::XmlDocument & content) const { Windows::UI::Notifications::TileNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileNotification(get(content), put(notification))); + check_hresult(WINRT_SHIM(ITileNotificationFactory)->abi_CreateTileNotification(get_abi(content), put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_ITileNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ITileNotification)->get_Content(put_abi(value))); return value; } -template void impl_ITileNotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_ITileNotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(ITileNotification)->put_ExpirationTime(get_abi(value))); } template Windows::Foundation::IReference impl_ITileNotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(ITileNotification)->get_ExpirationTime(put_abi(value))); return value; } -template void impl_ITileNotification::Tag(hstring_ref value) const +template void impl_ITileNotification::Tag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(ITileNotification)->put_Tag(get_abi(value))); } template hstring impl_ITileNotification::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(ITileNotification)->get_Tag(put_abi(value))); return value; } template Windows::UI::Notifications::TileFlyoutNotification impl_ITileFlyoutNotificationFactory::CreateTileFlyoutNotification(const Windows::Data::Xml::Dom::XmlDocument & content) const { Windows::UI::Notifications::TileFlyoutNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTileFlyoutNotification(get(content), put(notification))); + check_hresult(WINRT_SHIM(ITileFlyoutNotificationFactory)->abi_CreateTileFlyoutNotification(get_abi(content), put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_ITileFlyoutNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ITileFlyoutNotification)->get_Content(put_abi(value))); return value; } -template void impl_ITileFlyoutNotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_ITileFlyoutNotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(ITileFlyoutNotification)->put_ExpirationTime(get_abi(value))); } template Windows::Foundation::IReference impl_ITileFlyoutNotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(ITileFlyoutNotification)->get_ExpirationTime(put_abi(value))); return value; } template Windows::UI::Notifications::BadgeNotification impl_IBadgeNotificationFactory::CreateBadgeNotification(const Windows::Data::Xml::Dom::XmlDocument & content) const { Windows::UI::Notifications::BadgeNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateBadgeNotification(get(content), put(notification))); + check_hresult(WINRT_SHIM(IBadgeNotificationFactory)->abi_CreateBadgeNotification(get_abi(content), put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_IBadgeNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IBadgeNotification)->get_Content(put_abi(value))); return value; } -template void impl_IBadgeNotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_IBadgeNotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(IBadgeNotification)->put_ExpirationTime(get_abi(value))); } template Windows::Foundation::IReference impl_IBadgeNotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IBadgeNotification)->get_ExpirationTime(put_abi(value))); return value; } template Windows::UI::Notifications::ToastNotification impl_IToastNotificationFactory::CreateToastNotification(const Windows::Data::Xml::Dom::XmlDocument & content) const { Windows::UI::Notifications::ToastNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotification(get(content), put(notification))); + check_hresult(WINRT_SHIM(IToastNotificationFactory)->abi_CreateToastNotification(get_abi(content), put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_IToastNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IToastNotification)->get_Content(put_abi(value))); return value; } -template void impl_IToastNotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_IToastNotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(IToastNotification)->put_ExpirationTime(get_abi(value))); } template Windows::Foundation::IReference impl_IToastNotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IToastNotification)->get_ExpirationTime(put_abi(value))); return value; } template event_token impl_IToastNotification::Dismissed(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Dismissed(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IToastNotification)->add_Dismissed(get_abi(handler), &cookie)); return cookie; } @@ -3665,30 +3861,30 @@ template event_revoker impl_IToastNotification< template void impl_IToastNotification::Dismissed(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Dismissed(cookie)); + check_hresult(WINRT_SHIM(IToastNotification)->remove_Dismissed(cookie)); } -template event_token impl_IToastNotification::Activated(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IToastNotification::Activated(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_Activated(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IToastNotification)->add_Activated(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IToastNotification::Activated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IToastNotification::Activated(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Notifications::IToastNotification::remove_Activated, Activated(handler)); } template void impl_IToastNotification::Activated(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_Activated(cookie)); + check_hresult(WINRT_SHIM(IToastNotification)->remove_Activated(cookie)); } template event_token impl_IToastNotification::Failed(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Failed(get(handler), &token)); + check_hresult(WINRT_SHIM(IToastNotification)->add_Failed(get_abi(handler), &token)); return token; } @@ -3699,378 +3895,378 @@ template event_revoker impl_IToastNotification< template void impl_IToastNotification::Failed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Failed(token)); + check_hresult(WINRT_SHIM(IToastNotification)->remove_Failed(token)); } -template void impl_IToastNotification2::Tag(hstring_ref value) const +template void impl_IToastNotification2::Tag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(IToastNotification2)->put_Tag(get_abi(value))); } template hstring impl_IToastNotification2::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(IToastNotification2)->get_Tag(put_abi(value))); return value; } -template void impl_IToastNotification2::Group(hstring_ref value) const +template void impl_IToastNotification2::Group(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Group(get(value))); + check_hresult(WINRT_SHIM(IToastNotification2)->put_Group(get_abi(value))); } template hstring impl_IToastNotification2::Group() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Group(put(value))); + check_hresult(WINRT_SHIM(IToastNotification2)->get_Group(put_abi(value))); return value; } template void impl_IToastNotification2::SuppressPopup(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SuppressPopup(value)); + check_hresult(WINRT_SHIM(IToastNotification2)->put_SuppressPopup(value)); } template bool impl_IToastNotification2::SuppressPopup() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SuppressPopup(&value)); + check_hresult(WINRT_SHIM(IToastNotification2)->get_SuppressPopup(&value)); return value; } template Windows::Foundation::IReference impl_INotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(INotification)->get_ExpirationTime(put_abi(value))); return value; } -template void impl_INotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_INotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(INotification)->put_ExpirationTime(get_abi(value))); } template Windows::UI::Notifications::NotificationVisual impl_INotification::Visual() const { Windows::UI::Notifications::NotificationVisual value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Visual(put(value))); + check_hresult(WINRT_SHIM(INotification)->get_Visual(put_abi(value))); return value; } template void impl_INotification::Visual(const Windows::UI::Notifications::NotificationVisual & value) const { - check_hresult(static_cast(static_cast(*this))->put_Visual(get(value))); + check_hresult(WINRT_SHIM(INotification)->put_Visual(get_abi(value))); } template Windows::UI::Notifications::NotificationMirroring impl_IToastNotification3::NotificationMirroring() const { Windows::UI::Notifications::NotificationMirroring value {}; - check_hresult(static_cast(static_cast(*this))->get_NotificationMirroring(&value)); + check_hresult(WINRT_SHIM(IToastNotification3)->get_NotificationMirroring(&value)); return value; } template void impl_IToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring value) const { - check_hresult(static_cast(static_cast(*this))->put_NotificationMirroring(value)); + check_hresult(WINRT_SHIM(IToastNotification3)->put_NotificationMirroring(value)); } template hstring impl_IToastNotification3::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IToastNotification3)->get_RemoteId(put_abi(value))); return value; } -template void impl_IToastNotification3::RemoteId(hstring_ref value) const +template void impl_IToastNotification3::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IToastNotification3)->put_RemoteId(get_abi(value))); } template Windows::UI::Notifications::ScheduledToastNotification impl_IScheduledToastNotificationFactory::CreateScheduledToastNotification(const Windows::Data::Xml::Dom::XmlDocument & content, const Windows::Foundation::DateTime & deliveryTime) const { Windows::UI::Notifications::ScheduledToastNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateScheduledToastNotification(get(content), get(deliveryTime), put(notification))); + check_hresult(WINRT_SHIM(IScheduledToastNotificationFactory)->abi_CreateScheduledToastNotification(get_abi(content), get_abi(deliveryTime), put_abi(notification))); return notification; } template Windows::UI::Notifications::ScheduledToastNotification impl_IScheduledToastNotificationFactory::CreateScheduledToastNotificationRecurring(const Windows::Data::Xml::Dom::XmlDocument & content, const Windows::Foundation::DateTime & deliveryTime, const Windows::Foundation::TimeSpan & snoozeInterval, uint32_t maximumSnoozeCount) const { Windows::UI::Notifications::ScheduledToastNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateScheduledToastNotificationRecurring(get(content), get(deliveryTime), get(snoozeInterval), maximumSnoozeCount, put(notification))); + check_hresult(WINRT_SHIM(IScheduledToastNotificationFactory)->abi_CreateScheduledToastNotificationRecurring(get_abi(content), get_abi(deliveryTime), get_abi(snoozeInterval), maximumSnoozeCount, put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_IScheduledToastNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->get_Content(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IScheduledToastNotification::DeliveryTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DeliveryTime(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->get_DeliveryTime(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IScheduledToastNotification::SnoozeInterval() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_SnoozeInterval(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->get_SnoozeInterval(put_abi(value))); return value; } template uint32_t impl_IScheduledToastNotification::MaximumSnoozeCount() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaximumSnoozeCount(&value)); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->get_MaximumSnoozeCount(&value)); return value; } -template void impl_IScheduledToastNotification::Id(hstring_ref value) const +template void impl_IScheduledToastNotification::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->put_Id(get_abi(value))); } template hstring impl_IScheduledToastNotification::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification)->get_Id(put_abi(value))); return value; } -template void impl_IScheduledToastNotification2::Tag(hstring_ref value) const +template void impl_IScheduledToastNotification2::Tag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->put_Tag(get_abi(value))); } template hstring impl_IScheduledToastNotification2::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->get_Tag(put_abi(value))); return value; } -template void impl_IScheduledToastNotification2::Group(hstring_ref value) const +template void impl_IScheduledToastNotification2::Group(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Group(get(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->put_Group(get_abi(value))); } template hstring impl_IScheduledToastNotification2::Group() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Group(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->get_Group(put_abi(value))); return value; } template void impl_IScheduledToastNotification2::SuppressPopup(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SuppressPopup(value)); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->put_SuppressPopup(value)); } template bool impl_IScheduledToastNotification2::SuppressPopup() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SuppressPopup(&value)); + check_hresult(WINRT_SHIM(IScheduledToastNotification2)->get_SuppressPopup(&value)); return value; } template Windows::UI::Notifications::NotificationMirroring impl_IScheduledToastNotification3::NotificationMirroring() const { Windows::UI::Notifications::NotificationMirroring value {}; - check_hresult(static_cast(static_cast(*this))->get_NotificationMirroring(&value)); + check_hresult(WINRT_SHIM(IScheduledToastNotification3)->get_NotificationMirroring(&value)); return value; } template void impl_IScheduledToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring value) const { - check_hresult(static_cast(static_cast(*this))->put_NotificationMirroring(value)); + check_hresult(WINRT_SHIM(IScheduledToastNotification3)->put_NotificationMirroring(value)); } template hstring impl_IScheduledToastNotification3::RemoteId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_RemoteId(put(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification3)->get_RemoteId(put_abi(value))); return value; } -template void impl_IScheduledToastNotification3::RemoteId(hstring_ref value) const +template void impl_IScheduledToastNotification3::RemoteId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_RemoteId(get(value))); + check_hresult(WINRT_SHIM(IScheduledToastNotification3)->put_RemoteId(get_abi(value))); } template Windows::UI::Notifications::ScheduledTileNotification impl_IScheduledTileNotificationFactory::CreateScheduledTileNotification(const Windows::Data::Xml::Dom::XmlDocument & content, const Windows::Foundation::DateTime & deliveryTime) const { Windows::UI::Notifications::ScheduledTileNotification notification { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateScheduledTileNotification(get(content), get(deliveryTime), put(notification))); + check_hresult(WINRT_SHIM(IScheduledTileNotificationFactory)->abi_CreateScheduledTileNotification(get_abi(content), get_abi(deliveryTime), put_abi(notification))); return notification; } template Windows::Data::Xml::Dom::XmlDocument impl_IScheduledTileNotification::Content() const { Windows::Data::Xml::Dom::XmlDocument value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->get_Content(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IScheduledTileNotification::DeliveryTime() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_DeliveryTime(put(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->get_DeliveryTime(put_abi(value))); return value; } -template void impl_IScheduledTileNotification::ExpirationTime(const Windows::Foundation::IReference & value) const +template void impl_IScheduledTileNotification::ExpirationTime(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ExpirationTime(get(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->put_ExpirationTime(get_abi(value))); } template Windows::Foundation::IReference impl_IScheduledTileNotification::ExpirationTime() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ExpirationTime(put(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->get_ExpirationTime(put_abi(value))); return value; } -template void impl_IScheduledTileNotification::Tag(hstring_ref value) const +template void impl_IScheduledTileNotification::Tag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Tag(get(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->put_Tag(get_abi(value))); } template hstring impl_IScheduledTileNotification::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->get_Tag(put_abi(value))); return value; } -template void impl_IScheduledTileNotification::Id(hstring_ref value) const +template void impl_IScheduledTileNotification::Id(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->put_Id(get_abi(value))); } template hstring impl_IScheduledTileNotification::Id() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + check_hresult(WINRT_SHIM(IScheduledTileNotification)->get_Id(put_abi(value))); return value; } template Windows::UI::Notifications::ToastNotificationHistory impl_IToastNotificationManagerStatics2::History() const { Windows::UI::Notifications::ToastNotificationHistory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_History(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics2)->get_History(put_abi(value))); return value; } template Windows::UI::Notifications::ToastNotificationManagerForUser impl_IToastNotificationManagerStatics4::GetForUser(const Windows::System::User & user) const { Windows::UI::Notifications::ToastNotificationManagerForUser result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForUser(get(user), put(result))); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics4)->abi_GetForUser(get_abi(user), put_abi(result))); return result; } template void impl_IToastNotificationManagerStatics4::ConfigureNotificationMirroring(Windows::UI::Notifications::NotificationMirroring value) const { - check_hresult(static_cast(static_cast(*this))->abi_ConfigureNotificationMirroring(value)); + check_hresult(WINRT_SHIM(IToastNotificationManagerStatics4)->abi_ConfigureNotificationMirroring(value)); } template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerForUser::CreateToastNotifier() const { Windows::UI::Notifications::ToastNotifier result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifier(put(result))); + check_hresult(WINRT_SHIM(IToastNotificationManagerForUser)->abi_CreateToastNotifier(put_abi(result))); return result; } -template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerForUser::CreateToastNotifier(hstring_ref applicationId) const +template Windows::UI::Notifications::ToastNotifier impl_IToastNotificationManagerForUser::CreateToastNotifier(hstring_view applicationId) const { Windows::UI::Notifications::ToastNotifier result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateToastNotifierWithId(get(applicationId), put(result))); + check_hresult(WINRT_SHIM(IToastNotificationManagerForUser)->abi_CreateToastNotifierWithId(get_abi(applicationId), put_abi(result))); return result; } template Windows::UI::Notifications::ToastNotificationHistory impl_IToastNotificationManagerForUser::History() const { Windows::UI::Notifications::ToastNotificationHistory value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_History(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationManagerForUser)->get_History(put_abi(value))); return value; } template Windows::System::User impl_IToastNotificationManagerForUser::User() const { Windows::System::User value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_User(put(value))); + check_hresult(WINRT_SHIM(IToastNotificationManagerForUser)->get_User(put_abi(value))); return value; } -template void impl_IToastNotificationHistory::RemoveGroup(hstring_ref group) const +template void impl_IToastNotificationHistory::RemoveGroup(hstring_view group) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveGroup(get(group))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_RemoveGroup(get_abi(group))); } -template void impl_IToastNotificationHistory::RemoveGroup(hstring_ref group, hstring_ref applicationId) const +template void impl_IToastNotificationHistory::RemoveGroup(hstring_view group, hstring_view applicationId) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveGroupWithId(get(group), get(applicationId))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_RemoveGroupWithId(get_abi(group), get_abi(applicationId))); } -template void impl_IToastNotificationHistory::Remove(hstring_ref tag, hstring_ref group, hstring_ref applicationId) const +template void impl_IToastNotificationHistory::Remove(hstring_view tag, hstring_view group, hstring_view applicationId) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveGroupedTagWithId(get(tag), get(group), get(applicationId))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_RemoveGroupedTagWithId(get_abi(tag), get_abi(group), get_abi(applicationId))); } -template void impl_IToastNotificationHistory::Remove(hstring_ref tag, hstring_ref group) const +template void impl_IToastNotificationHistory::Remove(hstring_view tag, hstring_view group) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveGroupedTag(get(tag), get(group))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_RemoveGroupedTag(get_abi(tag), get_abi(group))); } -template void impl_IToastNotificationHistory::Remove(hstring_ref tag) const +template void impl_IToastNotificationHistory::Remove(hstring_view tag) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(tag))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_Remove(get_abi(tag))); } template void impl_IToastNotificationHistory::Clear() const { - check_hresult(static_cast(static_cast(*this))->abi_Clear()); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_Clear()); } -template void impl_IToastNotificationHistory::Clear(hstring_ref applicationId) const +template void impl_IToastNotificationHistory::Clear(hstring_view applicationId) const { - check_hresult(static_cast(static_cast(*this))->abi_ClearWithId(get(applicationId))); + check_hresult(WINRT_SHIM(IToastNotificationHistory)->abi_ClearWithId(get_abi(applicationId))); } template Windows::Foundation::Collections::IVectorView impl_IToastNotificationHistory2::GetHistory() const { Windows::Foundation::Collections::IVectorView toasts; - check_hresult(static_cast(static_cast(*this))->abi_GetHistory(put(toasts))); + check_hresult(WINRT_SHIM(IToastNotificationHistory2)->abi_GetHistory(put_abi(toasts))); return toasts; } -template Windows::Foundation::Collections::IVectorView impl_IToastNotificationHistory2::GetHistory(hstring_ref applicationId) const +template Windows::Foundation::Collections::IVectorView impl_IToastNotificationHistory2::GetHistory(hstring_view applicationId) const { Windows::Foundation::Collections::IVectorView toasts; - check_hresult(static_cast(static_cast(*this))->abi_GetHistoryWithId(get(applicationId), put(toasts))); + check_hresult(WINRT_SHIM(IToastNotificationHistory2)->abi_GetHistoryWithId(get_abi(applicationId), put_abi(toasts))); return toasts; } template Windows::UI::Notifications::ToastHistoryChangedType impl_IToastNotificationHistoryChangedTriggerDetail::ChangeType() const { Windows::UI::Notifications::ToastHistoryChangedType value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeType(&value)); + check_hresult(WINRT_SHIM(IToastNotificationHistoryChangedTriggerDetail)->get_ChangeType(&value)); return value; } template hstring impl_IToastNotificationActionTriggerDetail::Argument() const { hstring argument; - check_hresult(static_cast(static_cast(*this))->get_Argument(put(argument))); + check_hresult(WINRT_SHIM(IToastNotificationActionTriggerDetail)->get_Argument(put_abi(argument))); return argument; } template Windows::Foundation::Collections::ValueSet impl_IToastNotificationActionTriggerDetail::UserInput() const { Windows::Foundation::Collections::ValueSet inputs { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UserInput(put(inputs))); + check_hresult(WINRT_SHIM(IToastNotificationActionTriggerDetail)->get_UserInput(put_abi(inputs))); return inputs; } @@ -4087,12 +4283,12 @@ inline Windows::UI::Notifications::BadgeUpdater BadgeUpdateManager::CreateBadgeU return get_activation_factory().CreateBadgeUpdaterForApplication(); } -inline Windows::UI::Notifications::BadgeUpdater BadgeUpdateManager::CreateBadgeUpdaterForApplication(hstring_ref applicationId) +inline Windows::UI::Notifications::BadgeUpdater BadgeUpdateManager::CreateBadgeUpdaterForApplication(hstring_view applicationId) { return get_activation_factory().CreateBadgeUpdaterForApplication(applicationId); } -inline Windows::UI::Notifications::BadgeUpdater BadgeUpdateManager::CreateBadgeUpdaterForSecondaryTile(hstring_ref tileId) +inline Windows::UI::Notifications::BadgeUpdater BadgeUpdateManager::CreateBadgeUpdaterForSecondaryTile(hstring_view tileId) { return get_activation_factory().CreateBadgeUpdaterForSecondaryTile(tileId); } @@ -4262,12 +4458,12 @@ inline Windows::UI::Notifications::TileFlyoutUpdater TileFlyoutUpdateManager::Cr return get_activation_factory().CreateTileFlyoutUpdaterForApplication(); } -inline Windows::UI::Notifications::TileFlyoutUpdater TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication(hstring_ref applicationId) +inline Windows::UI::Notifications::TileFlyoutUpdater TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication(hstring_view applicationId) { return get_activation_factory().CreateTileFlyoutUpdaterForApplication(applicationId); } -inline Windows::UI::Notifications::TileFlyoutUpdater TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForSecondaryTile(hstring_ref tileId) +inline Windows::UI::Notifications::TileFlyoutUpdater TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForSecondaryTile(hstring_view tileId) { return get_activation_factory().CreateTileFlyoutUpdaterForSecondaryTile(tileId); } @@ -4286,12 +4482,12 @@ inline Windows::UI::Notifications::TileUpdater TileUpdateManager::CreateTileUpda return get_activation_factory().CreateTileUpdaterForApplication(); } -inline Windows::UI::Notifications::TileUpdater TileUpdateManager::CreateTileUpdaterForApplication(hstring_ref applicationId) +inline Windows::UI::Notifications::TileUpdater TileUpdateManager::CreateTileUpdaterForApplication(hstring_view applicationId) { return get_activation_factory().CreateTileUpdaterForApplication(applicationId); } -inline Windows::UI::Notifications::TileUpdater TileUpdateManager::CreateTileUpdaterForSecondaryTile(hstring_ref tileId) +inline Windows::UI::Notifications::TileUpdater TileUpdateManager::CreateTileUpdaterForSecondaryTile(hstring_view tileId) { return get_activation_factory().CreateTileUpdaterForSecondaryTile(tileId); } @@ -4315,7 +4511,7 @@ inline Windows::UI::Notifications::ToastNotifier ToastNotificationManager::Creat return get_activation_factory().CreateToastNotifier(); } -inline Windows::UI::Notifications::ToastNotifier ToastNotificationManager::CreateToastNotifier(hstring_ref applicationId) +inline Windows::UI::Notifications::ToastNotifier ToastNotificationManager::CreateToastNotifier(hstring_view applicationId) { return get_activation_factory().CreateToastNotifier(applicationId); } @@ -4343,3 +4539,689 @@ inline void ToastNotificationManager::ConfigureNotificationMirroring(Windows::UI } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IAdaptiveNotificationContent & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IAdaptiveNotificationText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeUpdateManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeUpdateManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeUpdateManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IBadgeUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IKnownNotificationBindingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::INotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::INotificationBinding & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::INotificationVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledTileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledTileNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledToastNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledToastNotification2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledToastNotification3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IScheduledToastNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IShownTileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileFlyoutNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileFlyoutNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileFlyoutUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileUpdateManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileUpdateManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileUpdateManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ITileUpdater2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastDismissedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotification2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotification3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationActionTriggerDetail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationHistory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationHistory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationHistoryChangedTriggerDetail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotificationManagerStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IToastNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IUserNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::IUserNotificationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::AdaptiveNotificationText & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::BadgeNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::BadgeUpdateManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::BadgeUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::Notification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::NotificationBinding & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::NotificationVisual & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ScheduledTileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ScheduledToastNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ShownTileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::TileFlyoutNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::TileFlyoutUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::TileNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::TileUpdateManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::TileUpdater & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastDismissedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastFailedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotificationActionTriggerDetail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotificationHistory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotificationHistoryChangedTriggerDetail & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotificationManagerForUser & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::ToastNotifier & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::UserNotification & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Notifications::UserNotificationChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Popups.h b/10.0.14393.0/winrt/Windows.UI.Popups.h index 755a17563..3157cb1f0 100644 --- a/10.0.14393.0/winrt/Windows.UI.Popups.h +++ b/10.0.14393.0/winrt/Windows.UI.Popups.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Popups.3.h" @@ -26,7 +29,7 @@ template UICommandInvokedHandler::UICommandInvokedHandl inline void UICommandInvokedHandler::operator()(const Windows::UI::Popups::IUICommand & command) const { - check_hresult((*this)->abi_Invoke(get(command))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(command))); } } @@ -36,11 +39,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -50,10 +54,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -63,11 +68,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -81,7 +87,8 @@ struct produce : produce_baseshim().DefaultCommandIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultCommandIndex()); return S_OK; } catch (...) @@ -94,6 +101,7 @@ struct produce : produce_baseshim()); this->shim().DefaultCommandIndex(value); return S_OK; } @@ -107,7 +115,8 @@ struct produce : produce_baseshim().CancelCommandIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CancelCommandIndex()); return S_OK; } catch (...) @@ -120,6 +129,7 @@ struct produce : produce_baseshim()); this->shim().CancelCommandIndex(value); return S_OK; } @@ -129,11 +139,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -143,10 +154,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return S_OK; } @@ -156,11 +168,12 @@ struct produce : produce_base> messageDialogAsyncOperation) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out> messageDialogAsyncOperation) noexcept override { try { - *messageDialogAsyncOperation = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *messageDialogAsyncOperation = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -174,7 +187,8 @@ struct produce : produce_baseshim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -187,6 +201,7 @@ struct produce : produce_baseshim()); this->shim().Options(value); return S_OK; } @@ -200,11 +215,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in content, abi_arg_out messageDialog) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in content, impl::abi_arg_out messageDialog) noexcept override { try { - *messageDialog = detach(this->shim().Create(*reinterpret_cast(&content))); + typename D::abi_guard guard(this->shim()); + *messageDialog = detach_abi(this->shim().Create(*reinterpret_cast(&content))); return S_OK; } catch (...) @@ -214,11 +230,12 @@ struct produce : produce_base content, abi_arg_in title, abi_arg_out messageDialog) noexcept override + HRESULT __stdcall abi_CreateWithTitle(impl::abi_arg_in content, impl::abi_arg_in title, impl::abi_arg_out messageDialog) noexcept override { try { - *messageDialog = detach(this->shim().CreateWithTitle(*reinterpret_cast(&content), *reinterpret_cast(&title))); + typename D::abi_guard guard(this->shim()); + *messageDialog = detach_abi(this->shim().CreateWithTitle(*reinterpret_cast(&content), *reinterpret_cast(&title))); return S_OK; } catch (...) @@ -232,11 +249,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Commands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Commands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Commands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Commands()); return S_OK; } catch (...) @@ -246,11 +264,12 @@ struct produce : produce_base invocationPoint, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_in invocationPoint, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().ShowAsync(*reinterpret_cast(&invocationPoint))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().ShowAsync(*reinterpret_cast(&invocationPoint))); return S_OK; } catch (...) @@ -260,11 +279,12 @@ struct produce : produce_base selection, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_ShowAsyncWithRect(impl::abi_arg_in selection, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().ShowForSelectionAsync(*reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().ShowForSelectionAsync(*reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -274,11 +294,12 @@ struct produce : produce_base selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> asyncOperation) noexcept override + HRESULT __stdcall abi_ShowAsyncWithRectAndPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> asyncOperation) noexcept override { try { - *asyncOperation = detach(this->shim().ShowForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *asyncOperation = detach_abi(this->shim().ShowForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -292,11 +313,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Label(abi_arg_out value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -306,10 +328,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -319,11 +342,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Invoked(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Invoked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Invoked()); return S_OK; } catch (...) @@ -333,10 +357,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Invoked(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Invoked(*reinterpret_cast(&value)); return S_OK; } @@ -346,11 +371,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Id(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -360,11 +386,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Id(impl::abi_arg_in value) noexcept override { try { - this->shim().Id(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Id(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -377,11 +404,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in label, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in label, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Create(*reinterpret_cast(&label))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Create(*reinterpret_cast(&label))); return S_OK; } catch (...) @@ -391,11 +419,12 @@ struct produce : produce_base label, abi_arg_in action, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWithHandler(impl::abi_arg_in label, impl::abi_arg_in action, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWithHandler(*reinterpret_cast(&label), *reinterpret_cast(&action))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWithHandler(*reinterpret_cast(&label), *reinterpret_cast(&action))); return S_OK; } catch (...) @@ -405,11 +434,12 @@ struct produce : produce_base label, abi_arg_in action, abi_arg_in commandId, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWithHandlerAndId(impl::abi_arg_in label, impl::abi_arg_in action, impl::abi_arg_in commandId, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWithHandlerAndId(*reinterpret_cast(&label), *reinterpret_cast(&action), *reinterpret_cast(&commandId))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWithHandlerAndId(*reinterpret_cast(&label), *reinterpret_cast(&action), *reinterpret_cast(&commandId))); return S_OK; } catch (...) @@ -427,181 +457,181 @@ namespace Windows::UI::Popups { template hstring impl_IMessageDialog::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMessageDialog)->get_Title(put_abi(value))); return value; } -template void impl_IMessageDialog::Title(hstring_ref value) const +template void impl_IMessageDialog::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IMessageDialog)->put_Title(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMessageDialog::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(IMessageDialog)->get_Commands(put_abi(value))); return value; } template uint32_t impl_IMessageDialog::DefaultCommandIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultCommandIndex(&value)); + check_hresult(WINRT_SHIM(IMessageDialog)->get_DefaultCommandIndex(&value)); return value; } template void impl_IMessageDialog::DefaultCommandIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultCommandIndex(value)); + check_hresult(WINRT_SHIM(IMessageDialog)->put_DefaultCommandIndex(value)); } template uint32_t impl_IMessageDialog::CancelCommandIndex() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CancelCommandIndex(&value)); + check_hresult(WINRT_SHIM(IMessageDialog)->get_CancelCommandIndex(&value)); return value; } template void impl_IMessageDialog::CancelCommandIndex(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CancelCommandIndex(value)); + check_hresult(WINRT_SHIM(IMessageDialog)->put_CancelCommandIndex(value)); } template hstring impl_IMessageDialog::Content() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IMessageDialog)->get_Content(put_abi(value))); return value; } -template void impl_IMessageDialog::Content(hstring_ref value) const +template void impl_IMessageDialog::Content(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(IMessageDialog)->put_Content(get_abi(value))); } template Windows::Foundation::IAsyncOperation impl_IMessageDialog::ShowAsync() const { Windows::Foundation::IAsyncOperation messageDialogAsyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(messageDialogAsyncOperation))); + check_hresult(WINRT_SHIM(IMessageDialog)->abi_ShowAsync(put_abi(messageDialogAsyncOperation))); return messageDialogAsyncOperation; } template Windows::UI::Popups::MessageDialogOptions impl_IMessageDialog::Options() const { Windows::UI::Popups::MessageDialogOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_Options(&value)); + check_hresult(WINRT_SHIM(IMessageDialog)->get_Options(&value)); return value; } template void impl_IMessageDialog::Options(Windows::UI::Popups::MessageDialogOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_Options(value)); + check_hresult(WINRT_SHIM(IMessageDialog)->put_Options(value)); } -template Windows::UI::Popups::MessageDialog impl_IMessageDialogFactory::Create(hstring_ref content) const +template Windows::UI::Popups::MessageDialog impl_IMessageDialogFactory::Create(hstring_view content) const { Windows::UI::Popups::MessageDialog messageDialog { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(content), put(messageDialog))); + check_hresult(WINRT_SHIM(IMessageDialogFactory)->abi_Create(get_abi(content), put_abi(messageDialog))); return messageDialog; } -template Windows::UI::Popups::MessageDialog impl_IMessageDialogFactory::CreateWithTitle(hstring_ref content, hstring_ref title) const +template Windows::UI::Popups::MessageDialog impl_IMessageDialogFactory::CreateWithTitle(hstring_view content, hstring_view title) const { Windows::UI::Popups::MessageDialog messageDialog { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithTitle(get(content), get(title), put(messageDialog))); + check_hresult(WINRT_SHIM(IMessageDialogFactory)->abi_CreateWithTitle(get_abi(content), get_abi(title), put_abi(messageDialog))); return messageDialog; } template hstring impl_IUICommand::Label() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Label(put(value))); + check_hresult(WINRT_SHIM(IUICommand)->get_Label(put_abi(value))); return value; } -template void impl_IUICommand::Label(hstring_ref value) const +template void impl_IUICommand::Label(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Label(get(value))); + check_hresult(WINRT_SHIM(IUICommand)->put_Label(get_abi(value))); } template Windows::UI::Popups::UICommandInvokedHandler impl_IUICommand::Invoked() const { Windows::UI::Popups::UICommandInvokedHandler value {}; - check_hresult(static_cast(static_cast(*this))->get_Invoked(put(value))); + check_hresult(WINRT_SHIM(IUICommand)->get_Invoked(put_abi(value))); return value; } template void impl_IUICommand::Invoked(const Windows::UI::Popups::UICommandInvokedHandler & value) const { - check_hresult(static_cast(static_cast(*this))->put_Invoked(get(value))); + check_hresult(WINRT_SHIM(IUICommand)->put_Invoked(get_abi(value))); } -template Windows::IInspectable impl_IUICommand::Id() const +template Windows::Foundation::IInspectable impl_IUICommand::Id() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Id(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IUICommand)->get_Id(put_abi(value))); return value; } -template void impl_IUICommand::Id(const Windows::IInspectable & value) const +template void impl_IUICommand::Id(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Id(get(value))); + check_hresult(WINRT_SHIM(IUICommand)->put_Id(get_abi(value))); } -template Windows::UI::Popups::UICommand impl_IUICommandFactory::Create(hstring_ref label) const +template Windows::UI::Popups::UICommand impl_IUICommandFactory::Create(hstring_view label) const { Windows::UI::Popups::UICommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(label), put(instance))); + check_hresult(WINRT_SHIM(IUICommandFactory)->abi_Create(get_abi(label), put_abi(instance))); return instance; } -template Windows::UI::Popups::UICommand impl_IUICommandFactory::CreateWithHandler(hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & action) const +template Windows::UI::Popups::UICommand impl_IUICommandFactory::CreateWithHandler(hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & action) const { Windows::UI::Popups::UICommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithHandler(get(label), get(action), put(instance))); + check_hresult(WINRT_SHIM(IUICommandFactory)->abi_CreateWithHandler(get_abi(label), get_abi(action), put_abi(instance))); return instance; } -template Windows::UI::Popups::UICommand impl_IUICommandFactory::CreateWithHandlerAndId(hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & action, const Windows::IInspectable & commandId) const +template Windows::UI::Popups::UICommand impl_IUICommandFactory::CreateWithHandlerAndId(hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & action, const Windows::Foundation::IInspectable & commandId) const { Windows::UI::Popups::UICommand instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithHandlerAndId(get(label), get(action), get(commandId), put(instance))); + check_hresult(WINRT_SHIM(IUICommandFactory)->abi_CreateWithHandlerAndId(get_abi(label), get_abi(action), get_abi(commandId), put_abi(instance))); return instance; } template Windows::Foundation::Collections::IVector impl_IPopupMenu::Commands() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Commands(put(value))); + check_hresult(WINRT_SHIM(IPopupMenu)->get_Commands(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IPopupMenu::ShowAsync(const Windows::Foundation::Point & invocationPoint) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(get(invocationPoint), put(asyncOperation))); + check_hresult(WINRT_SHIM(IPopupMenu)->abi_ShowAsync(get_abi(invocationPoint), put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IPopupMenu::ShowForSelectionAsync(const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsyncWithRect(get(selection), put(asyncOperation))); + check_hresult(WINRT_SHIM(IPopupMenu)->abi_ShowAsyncWithRect(get_abi(selection), put_abi(asyncOperation))); return asyncOperation; } template Windows::Foundation::IAsyncOperation impl_IPopupMenu::ShowForSelectionAsync(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation asyncOperation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsyncWithRectAndPlacement(get(selection), preferredPlacement, put(asyncOperation))); + check_hresult(WINRT_SHIM(IPopupMenu)->abi_ShowAsyncWithRectAndPlacement(get_abi(selection), preferredPlacement, put_abi(asyncOperation))); return asyncOperation; } -inline MessageDialog::MessageDialog(hstring_ref content) : +inline MessageDialog::MessageDialog(hstring_view content) : MessageDialog(get_activation_factory().Create(content)) {} -inline MessageDialog::MessageDialog(hstring_ref content, hstring_ref title) : +inline MessageDialog::MessageDialog(hstring_view content, hstring_view title) : MessageDialog(get_activation_factory().CreateWithTitle(content, title)) {} @@ -613,15 +643,15 @@ inline UICommand::UICommand() : UICommand(activate_instance()) {} -inline UICommand::UICommand(hstring_ref label) : +inline UICommand::UICommand(hstring_view label) : UICommand(get_activation_factory().Create(label)) {} -inline UICommand::UICommand(hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & action) : +inline UICommand::UICommand(hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & action) : UICommand(get_activation_factory().CreateWithHandler(label, action)) {} -inline UICommand::UICommand(hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & action, const Windows::IInspectable & commandId) : +inline UICommand::UICommand(hstring_view label, const Windows::UI::Popups::UICommandInvokedHandler & action, const Windows::Foundation::IInspectable & commandId) : UICommand(get_activation_factory().CreateWithHandlerAndId(label, action, commandId)) {} @@ -632,3 +662,86 @@ inline UICommandSeparator::UICommandSeparator() : } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::IMessageDialog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::IMessageDialogFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::IPopupMenu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::IUICommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::IUICommandFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::MessageDialog & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::PopupMenu & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::UICommand & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Popups::UICommandSeparator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.StartScreen.h b/10.0.14393.0/winrt/Windows.UI.StartScreen.h index db324e689..469fac5c0 100644 --- a/10.0.14393.0/winrt/Windows.UI.StartScreen.h +++ b/10.0.14393.0/winrt/Windows.UI.StartScreen.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.3.h" @@ -17,11 +20,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -35,7 +39,8 @@ struct produce : produce_baseshim().SystemGroupKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SystemGroupKind()); return S_OK; } catch (...) @@ -48,6 +53,7 @@ struct produce : produce_baseshim()); this->shim().SystemGroupKind(value); return S_OK; } @@ -57,11 +63,12 @@ struct produce : produce_base result) noexcept override + HRESULT __stdcall abi_SaveAsync(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().SaveAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().SaveAsync()); return S_OK; } catch (...) @@ -79,7 +86,8 @@ struct produce : produce_baseshim().Kind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kind()); return S_OK; } catch (...) @@ -88,11 +96,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -106,7 +115,8 @@ struct produce : produce_baseshim().RemovedByUser()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedByUser()); return S_OK; } catch (...) @@ -115,11 +125,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Description(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Description()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Description()); return S_OK; } catch (...) @@ -129,10 +140,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Description(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Description(*reinterpret_cast(&value)); return S_OK; } @@ -142,11 +154,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -156,10 +169,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -169,11 +183,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_GroupName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupName()); return S_OK; } catch (...) @@ -183,10 +198,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_GroupName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupName(*reinterpret_cast(&value)); return S_OK; } @@ -196,11 +212,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo()); return S_OK; } catch (...) @@ -210,10 +227,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Logo(*reinterpret_cast(&value)); return S_OK; } @@ -227,11 +245,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateWithArguments(abi_arg_in arguments, abi_arg_in displayName, abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateWithArguments(impl::abi_arg_in arguments, impl::abi_arg_in displayName, impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateWithArguments(*reinterpret_cast(&arguments), *reinterpret_cast(&displayName))); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateWithArguments(*reinterpret_cast(&arguments), *reinterpret_cast(&displayName))); return S_OK; } catch (...) @@ -241,11 +260,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_CreateSeparator(abi_arg_out result) noexcept override + HRESULT __stdcall abi_CreateSeparator(impl::abi_arg_out result) noexcept override { try { - *result = detach(this->shim().CreateSeparator()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().CreateSeparator()); return S_OK; } catch (...) @@ -259,11 +279,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_LoadCurrentAsync(abi_arg_out> result) noexcept override + HRESULT __stdcall abi_LoadCurrentAsync(impl::abi_arg_out> result) noexcept override { try { - *result = detach(this->shim().LoadCurrentAsync()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().LoadCurrentAsync()); return S_OK; } catch (...) @@ -277,7 +298,8 @@ struct produce : produce_baseshim().IsSupported()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().IsSupported()); return S_OK; } catch (...) @@ -290,10 +312,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_TileId(abi_arg_in value) noexcept override + HRESULT __stdcall put_TileId(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TileId(*reinterpret_cast(&value)); return S_OK; } @@ -303,11 +326,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TileId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileId()); return S_OK; } catch (...) @@ -317,10 +341,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Arguments(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Arguments(*reinterpret_cast(&value)); return S_OK; } @@ -330,11 +355,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Arguments(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Arguments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Arguments()); return S_OK; } catch (...) @@ -344,10 +370,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ShortName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShortName(*reinterpret_cast(&value)); return S_OK; } @@ -357,11 +384,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ShortName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShortName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShortName()); return S_OK; } catch (...) @@ -371,10 +399,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DisplayName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return S_OK; } @@ -384,11 +413,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -398,10 +428,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Logo(*reinterpret_cast(&value)); return S_OK; } @@ -411,11 +442,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Logo()); return S_OK; } catch (...) @@ -425,10 +457,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SmallLogo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SmallLogo(*reinterpret_cast(&value)); return S_OK; } @@ -438,11 +471,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SmallLogo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmallLogo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallLogo()); return S_OK; } catch (...) @@ -452,10 +486,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_WideLogo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().WideLogo(*reinterpret_cast(&value)); return S_OK; } @@ -465,11 +500,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_WideLogo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WideLogo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WideLogo()); return S_OK; } catch (...) @@ -479,10 +515,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LockScreenBadgeLogo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LockScreenBadgeLogo(*reinterpret_cast(&value)); return S_OK; } @@ -492,11 +529,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LockScreenBadgeLogo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LockScreenBadgeLogo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockScreenBadgeLogo()); return S_OK; } catch (...) @@ -510,6 +548,7 @@ struct produce : produce_baseshim()); this->shim().LockScreenDisplayBadgeAndTileText(value); return S_OK; } @@ -523,7 +562,8 @@ struct produce : produce_baseshim().LockScreenDisplayBadgeAndTileText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LockScreenDisplayBadgeAndTileText()); return S_OK; } catch (...) @@ -536,6 +576,7 @@ struct produce : produce_baseshim()); this->shim().TileOptions(value); return S_OK; } @@ -549,7 +590,8 @@ struct produce : produce_baseshim().TileOptions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileOptions()); return S_OK; } catch (...) @@ -562,6 +604,7 @@ struct produce : produce_baseshim()); this->shim().ForegroundText(value); return S_OK; } @@ -575,7 +618,8 @@ struct produce : produce_baseshim().ForegroundText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundText()); return S_OK; } catch (...) @@ -584,10 +628,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -597,11 +642,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -610,11 +656,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_RequestCreateAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestCreateAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestCreateAsync()); return S_OK; } catch (...) @@ -624,11 +671,12 @@ struct produce : produce_base invocationPoint, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestCreateAsyncWithPoint(impl::abi_arg_in invocationPoint, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestCreateAsync(*reinterpret_cast(&invocationPoint))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestCreateAsync(*reinterpret_cast(&invocationPoint))); return S_OK; } catch (...) @@ -638,11 +686,12 @@ struct produce : produce_base selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestCreateAsyncWithRect(impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestCreateForSelectionAsync(*reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestCreateForSelectionAsync(*reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -652,11 +701,12 @@ struct produce : produce_base selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestCreateAsyncWithRectAndPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestCreateForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestCreateForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -666,11 +716,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_RequestDeleteAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDeleteAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDeleteAsync()); return S_OK; } catch (...) @@ -680,11 +731,12 @@ struct produce : produce_base invocationPoint, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDeleteAsyncWithPoint(impl::abi_arg_in invocationPoint, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDeleteAsync(*reinterpret_cast(&invocationPoint))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDeleteAsync(*reinterpret_cast(&invocationPoint))); return S_OK; } catch (...) @@ -694,11 +746,12 @@ struct produce : produce_base selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDeleteAsyncWithRect(impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDeleteForSelectionAsync(*reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDeleteForSelectionAsync(*reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -708,11 +761,12 @@ struct produce : produce_base selection, Windows::UI::Popups::Placement preferredPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestDeleteAsyncWithRectAndPlacement(impl::abi_arg_in selection, Windows::UI::Popups::Placement preferredPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestDeleteForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestDeleteForSelectionAsync(*reinterpret_cast(&selection), preferredPlacement)); return S_OK; } catch (...) @@ -722,11 +776,12 @@ struct produce : produce_base> operation) noexcept override + HRESULT __stdcall abi_UpdateAsync(impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().UpdateAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().UpdateAsync()); return S_OK; } catch (...) @@ -740,10 +795,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall put_PhoneticName(abi_arg_in value) noexcept override + HRESULT __stdcall put_PhoneticName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PhoneticName(*reinterpret_cast(&value)); return S_OK; } @@ -753,11 +809,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PhoneticName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PhoneticName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PhoneticName()); return S_OK; } catch (...) @@ -767,11 +824,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VisualElements(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VisualElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisualElements()); return S_OK; } catch (...) @@ -785,6 +843,7 @@ struct produce : produce_baseshim()); this->shim().RoamingEnabled(value); return S_OK; } @@ -798,7 +857,8 @@ struct produce : produce_baseshim().RoamingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoamingEnabled()); return S_OK; } catch (...) @@ -807,11 +867,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_VisualElementsRequested(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VisualElementsRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VisualElementsRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -824,6 +885,7 @@ struct produce : produce_baseshim()); this->shim().VisualElementsRequested(token); return S_OK; } @@ -837,11 +899,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateTile(abi_arg_in tileId, abi_arg_in shortName, abi_arg_in displayName, abi_arg_in arguments, Windows::UI::StartScreen::TileOptions tileOptions, abi_arg_in logoReference, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateTile(impl::abi_arg_in tileId, impl::abi_arg_in shortName, impl::abi_arg_in displayName, impl::abi_arg_in arguments, Windows::UI::StartScreen::TileOptions tileOptions, impl::abi_arg_in logoReference, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateTile(*reinterpret_cast(&tileId), *reinterpret_cast(&shortName), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), tileOptions, *reinterpret_cast(&logoReference))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateTile(*reinterpret_cast(&tileId), *reinterpret_cast(&shortName), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), tileOptions, *reinterpret_cast(&logoReference))); return S_OK; } catch (...) @@ -851,11 +914,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateWideTile(abi_arg_in tileId, abi_arg_in shortName, abi_arg_in displayName, abi_arg_in arguments, Windows::UI::StartScreen::TileOptions tileOptions, abi_arg_in logoReference, abi_arg_in wideLogoReference, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWideTile(impl::abi_arg_in tileId, impl::abi_arg_in shortName, impl::abi_arg_in displayName, impl::abi_arg_in arguments, Windows::UI::StartScreen::TileOptions tileOptions, impl::abi_arg_in logoReference, impl::abi_arg_in wideLogoReference, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWideTile(*reinterpret_cast(&tileId), *reinterpret_cast(&shortName), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), tileOptions, *reinterpret_cast(&logoReference), *reinterpret_cast(&wideLogoReference))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWideTile(*reinterpret_cast(&tileId), *reinterpret_cast(&shortName), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), tileOptions, *reinterpret_cast(&logoReference), *reinterpret_cast(&wideLogoReference))); return S_OK; } catch (...) @@ -865,11 +929,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_CreateWithId(abi_arg_in tileId, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateWithId(impl::abi_arg_in tileId, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateWithId(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateWithId(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -883,11 +948,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateMinimalTile(abi_arg_in tileId, abi_arg_in displayName, abi_arg_in arguments, abi_arg_in square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize, abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateMinimalTile(impl::abi_arg_in tileId, impl::abi_arg_in displayName, impl::abi_arg_in arguments, impl::abi_arg_in square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateMinimalTile(*reinterpret_cast(&tileId), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), *reinterpret_cast(&square150x150Logo), desiredSize)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateMinimalTile(*reinterpret_cast(&tileId), *reinterpret_cast(&displayName), *reinterpret_cast(&arguments), *reinterpret_cast(&square150x150Logo), desiredSize)); return S_OK; } catch (...) @@ -901,11 +967,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_Exists(abi_arg_in tileId, bool * exists) noexcept override + HRESULT __stdcall abi_Exists(impl::abi_arg_in tileId, bool * exists) noexcept override { try { - *exists = detach(this->shim().Exists(*reinterpret_cast(&tileId))); + typename D::abi_guard guard(this->shim()); + *exists = detach_abi(this->shim().Exists(*reinterpret_cast(&tileId))); return S_OK; } catch (...) @@ -914,11 +981,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindAllAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync()); return S_OK; } catch (...) @@ -928,11 +996,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindAllForApplicationAsync(abi_arg_in applicationId, abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllForApplicationAsync(impl::abi_arg_in applicationId, impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllAsync(*reinterpret_cast(&applicationId))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllAsync(*reinterpret_cast(&applicationId))); return S_OK; } catch (...) @@ -942,11 +1011,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_FindAllForPackageAsync(abi_arg_out>> operation) noexcept override + HRESULT __stdcall abi_FindAllForPackageAsync(impl::abi_arg_out>> operation) noexcept override { try { - *operation = detach(this->shim().FindAllForPackageAsync()); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().FindAllForPackageAsync()); return S_OK; } catch (...) @@ -960,10 +1030,11 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall put_Square30x30Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square30x30Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square30x30Logo(*reinterpret_cast(&value)); return S_OK; } @@ -973,11 +1044,12 @@ struct produce : prod } } - HRESULT __stdcall get_Square30x30Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square30x30Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square30x30Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square30x30Logo()); return S_OK; } catch (...) @@ -987,10 +1059,11 @@ struct produce : prod } } - HRESULT __stdcall put_Square70x70Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square70x70Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square70x70Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1000,11 +1073,12 @@ struct produce : prod } } - HRESULT __stdcall get_Square70x70Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square70x70Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square70x70Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square70x70Logo()); return S_OK; } catch (...) @@ -1014,10 +1088,11 @@ struct produce : prod } } - HRESULT __stdcall put_Square150x150Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square150x150Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square150x150Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1027,11 +1102,12 @@ struct produce : prod } } - HRESULT __stdcall get_Square150x150Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square150x150Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square150x150Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square150x150Logo()); return S_OK; } catch (...) @@ -1041,10 +1117,11 @@ struct produce : prod } } - HRESULT __stdcall put_Wide310x150Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Wide310x150Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Wide310x150Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1054,11 +1131,12 @@ struct produce : prod } } - HRESULT __stdcall get_Wide310x150Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Wide310x150Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Wide310x150Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Wide310x150Logo()); return S_OK; } catch (...) @@ -1068,10 +1146,11 @@ struct produce : prod } } - HRESULT __stdcall put_Square310x310Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square310x310Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square310x310Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1081,11 +1160,12 @@ struct produce : prod } } - HRESULT __stdcall get_Square310x310Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square310x310Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square310x310Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square310x310Logo()); return S_OK; } catch (...) @@ -1099,6 +1179,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundText(value); return S_OK; } @@ -1112,7 +1193,8 @@ struct produce : prod { try { - *value = detach(this->shim().ForegroundText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundText()); return S_OK; } catch (...) @@ -1121,10 +1203,11 @@ struct produce : prod } } - HRESULT __stdcall put_BackgroundColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -1134,11 +1217,12 @@ struct produce : prod } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -1151,6 +1235,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowNameOnSquare150x150Logo(value); return S_OK; } @@ -1164,7 +1249,8 @@ struct produce : prod { try { - *value = detach(this->shim().ShowNameOnSquare150x150Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowNameOnSquare150x150Logo()); return S_OK; } catch (...) @@ -1177,6 +1263,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowNameOnWide310x150Logo(value); return S_OK; } @@ -1190,7 +1277,8 @@ struct produce : prod { try { - *value = detach(this->shim().ShowNameOnWide310x150Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowNameOnWide310x150Logo()); return S_OK; } catch (...) @@ -1203,6 +1291,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowNameOnSquare310x310Logo(value); return S_OK; } @@ -1216,7 +1305,8 @@ struct produce : prod { try { - *value = detach(this->shim().ShowNameOnSquare310x310Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowNameOnSquare310x310Logo()); return S_OK; } catch (...) @@ -1229,10 +1319,11 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall put_Square71x71Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square71x71Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square71x71Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1242,11 +1333,12 @@ struct produce : pro } } - HRESULT __stdcall get_Square71x71Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square71x71Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square71x71Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square71x71Logo()); return S_OK; } catch (...) @@ -1260,10 +1352,11 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall put_Square44x44Logo(abi_arg_in value) noexcept override + HRESULT __stdcall put_Square44x44Logo(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Square44x44Logo(*reinterpret_cast(&value)); return S_OK; } @@ -1273,11 +1366,12 @@ struct produce : pro } } - HRESULT __stdcall get_Square44x44Logo(abi_arg_out value) noexcept override + HRESULT __stdcall get_Square44x44Logo(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Square44x44Logo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Square44x44Logo()); return S_OK; } catch (...) @@ -1291,11 +1385,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_VisualElements(abi_arg_out value) noexcept override + HRESULT __stdcall get_VisualElements(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VisualElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisualElements()); return S_OK; } catch (...) @@ -1305,11 +1400,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_AlternateVisualElements(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AlternateVisualElements(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AlternateVisualElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlternateVisualElements()); return S_OK; } catch (...) @@ -1319,11 +1415,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Deadline(abi_arg_out value) noexcept override + HRESULT __stdcall get_Deadline(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Deadline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Deadline()); return S_OK; } catch (...) @@ -1332,11 +1429,12 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1354,6 +1452,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -1367,11 +1466,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1389,368 +1489,368 @@ namespace Windows::UI::StartScreen { template Windows::UI::StartScreen::JumpListItemKind impl_IJumpListItem::Kind() const { Windows::UI::StartScreen::JumpListItemKind value {}; - check_hresult(static_cast(static_cast(*this))->get_Kind(&value)); + check_hresult(WINRT_SHIM(IJumpListItem)->get_Kind(&value)); return value; } template hstring impl_IJumpListItem::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->get_Arguments(put_abi(value))); return value; } template bool impl_IJumpListItem::RemovedByUser() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RemovedByUser(&value)); + check_hresult(WINRT_SHIM(IJumpListItem)->get_RemovedByUser(&value)); return value; } template hstring impl_IJumpListItem::Description() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Description(put(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->get_Description(put_abi(value))); return value; } -template void impl_IJumpListItem::Description(hstring_ref value) const +template void impl_IJumpListItem::Description(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Description(get(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->put_Description(get_abi(value))); } template hstring impl_IJumpListItem::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->get_DisplayName(put_abi(value))); return value; } -template void impl_IJumpListItem::DisplayName(hstring_ref value) const +template void impl_IJumpListItem::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->put_DisplayName(get_abi(value))); } template hstring impl_IJumpListItem::GroupName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GroupName(put(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->get_GroupName(put_abi(value))); return value; } -template void impl_IJumpListItem::GroupName(hstring_ref value) const +template void impl_IJumpListItem::GroupName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupName(get(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->put_GroupName(get_abi(value))); } template Windows::Foundation::Uri impl_IJumpListItem::Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Logo(put(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->get_Logo(put_abi(value))); return value; } template void impl_IJumpListItem::Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Logo(get(value))); + check_hresult(WINRT_SHIM(IJumpListItem)->put_Logo(get_abi(value))); } -template Windows::UI::StartScreen::JumpListItem impl_IJumpListItemStatics::CreateWithArguments(hstring_ref arguments, hstring_ref displayName) const +template Windows::UI::StartScreen::JumpListItem impl_IJumpListItemStatics::CreateWithArguments(hstring_view arguments, hstring_view displayName) const { Windows::UI::StartScreen::JumpListItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithArguments(get(arguments), get(displayName), put(result))); + check_hresult(WINRT_SHIM(IJumpListItemStatics)->abi_CreateWithArguments(get_abi(arguments), get_abi(displayName), put_abi(result))); return result; } template Windows::UI::StartScreen::JumpListItem impl_IJumpListItemStatics::CreateSeparator() const { Windows::UI::StartScreen::JumpListItem result { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateSeparator(put(result))); + check_hresult(WINRT_SHIM(IJumpListItemStatics)->abi_CreateSeparator(put_abi(result))); return result; } template Windows::Foundation::Collections::IVector impl_IJumpList::Items() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IJumpList)->get_Items(put_abi(value))); return value; } template Windows::UI::StartScreen::JumpListSystemGroupKind impl_IJumpList::SystemGroupKind() const { Windows::UI::StartScreen::JumpListSystemGroupKind value {}; - check_hresult(static_cast(static_cast(*this))->get_SystemGroupKind(&value)); + check_hresult(WINRT_SHIM(IJumpList)->get_SystemGroupKind(&value)); return value; } template void impl_IJumpList::SystemGroupKind(Windows::UI::StartScreen::JumpListSystemGroupKind value) const { - check_hresult(static_cast(static_cast(*this))->put_SystemGroupKind(value)); + check_hresult(WINRT_SHIM(IJumpList)->put_SystemGroupKind(value)); } template Windows::Foundation::IAsyncAction impl_IJumpList::SaveAsync() const { Windows::Foundation::IAsyncAction result; - check_hresult(static_cast(static_cast(*this))->abi_SaveAsync(put(result))); + check_hresult(WINRT_SHIM(IJumpList)->abi_SaveAsync(put_abi(result))); return result; } template Windows::Foundation::IAsyncOperation impl_IJumpListStatics::LoadCurrentAsync() const { Windows::Foundation::IAsyncOperation result; - check_hresult(static_cast(static_cast(*this))->abi_LoadCurrentAsync(put(result))); + check_hresult(WINRT_SHIM(IJumpListStatics)->abi_LoadCurrentAsync(put_abi(result))); return result; } template bool impl_IJumpListStatics::IsSupported() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_IsSupported(&result)); + check_hresult(WINRT_SHIM(IJumpListStatics)->abi_IsSupported(&result)); return result; } -template void impl_ISecondaryTile::TileId(hstring_ref value) const +template void impl_ISecondaryTile::TileId(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TileId(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_TileId(get_abi(value))); } template hstring impl_ISecondaryTile::TileId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TileId(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_TileId(put_abi(value))); return value; } -template void impl_ISecondaryTile::Arguments(hstring_ref value) const +template void impl_ISecondaryTile::Arguments(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Arguments(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_Arguments(get_abi(value))); } template hstring impl_ISecondaryTile::Arguments() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Arguments(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_Arguments(put_abi(value))); return value; } -template void impl_ISecondaryTile::ShortName(hstring_ref value) const +template void impl_ISecondaryTile::ShortName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ShortName(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_ShortName(get_abi(value))); } template hstring impl_ISecondaryTile::ShortName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ShortName(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_ShortName(put_abi(value))); return value; } -template void impl_ISecondaryTile::DisplayName(hstring_ref value) const +template void impl_ISecondaryTile::DisplayName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayName(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_DisplayName(get_abi(value))); } template hstring impl_ISecondaryTile::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_DisplayName(put_abi(value))); return value; } template void impl_ISecondaryTile::Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTile::Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_Logo(put_abi(value))); return value; } template void impl_ISecondaryTile::SmallLogo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_SmallLogo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_SmallLogo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTile::SmallLogo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmallLogo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_SmallLogo(put_abi(value))); return value; } template void impl_ISecondaryTile::WideLogo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_WideLogo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_WideLogo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTile::WideLogo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WideLogo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_WideLogo(put_abi(value))); return value; } template void impl_ISecondaryTile::LockScreenBadgeLogo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_LockScreenBadgeLogo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_LockScreenBadgeLogo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTile::LockScreenBadgeLogo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LockScreenBadgeLogo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_LockScreenBadgeLogo(put_abi(value))); return value; } template void impl_ISecondaryTile::LockScreenDisplayBadgeAndTileText(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_LockScreenDisplayBadgeAndTileText(value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_LockScreenDisplayBadgeAndTileText(value)); } template bool impl_ISecondaryTile::LockScreenDisplayBadgeAndTileText() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LockScreenDisplayBadgeAndTileText(&value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_LockScreenDisplayBadgeAndTileText(&value)); return value; } template void impl_ISecondaryTile::TileOptions(Windows::UI::StartScreen::TileOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_TileOptions(value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_TileOptions(value)); } template Windows::UI::StartScreen::TileOptions impl_ISecondaryTile::TileOptions() const { Windows::UI::StartScreen::TileOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_TileOptions(&value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_TileOptions(&value)); return value; } template void impl_ISecondaryTile::ForegroundText(Windows::UI::StartScreen::ForegroundText value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundText(value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_ForegroundText(value)); } template Windows::UI::StartScreen::ForegroundText impl_ISecondaryTile::ForegroundText() const { Windows::UI::StartScreen::ForegroundText value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundText(&value)); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_ForegroundText(&value)); return value; } template void impl_ISecondaryTile::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->put_BackgroundColor(get_abi(value))); } template Windows::UI::Color impl_ISecondaryTile::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile)->get_BackgroundColor(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestCreateAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestCreateAsync(put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestCreateAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestCreateAsync(const Windows::Foundation::Point & invocationPoint) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestCreateAsyncWithPoint(get(invocationPoint), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestCreateAsyncWithPoint(get_abi(invocationPoint), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestCreateForSelectionAsync(const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestCreateAsyncWithRect(get(selection), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestCreateAsyncWithRect(get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestCreateForSelectionAsync(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestCreateAsyncWithRectAndPlacement(get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestCreateAsyncWithRectAndPlacement(get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestDeleteAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDeleteAsync(put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestDeleteAsync(put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestDeleteAsync(const Windows::Foundation::Point & invocationPoint) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDeleteAsyncWithPoint(get(invocationPoint), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestDeleteAsyncWithPoint(get_abi(invocationPoint), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestDeleteForSelectionAsync(const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDeleteAsyncWithRect(get(selection), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestDeleteAsyncWithRect(get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::RequestDeleteForSelectionAsync(const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement preferredPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestDeleteAsyncWithRectAndPlacement(get(selection), preferredPlacement, put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_RequestDeleteAsyncWithRectAndPlacement(get_abi(selection), preferredPlacement, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_ISecondaryTile::UpdateAsync() const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_UpdateAsync(put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTile)->abi_UpdateAsync(put_abi(operation))); return operation; } -template void impl_ISecondaryTile2::PhoneticName(hstring_ref value) const +template void impl_ISecondaryTile2::PhoneticName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PhoneticName(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTile2)->put_PhoneticName(get_abi(value))); } template hstring impl_ISecondaryTile2::PhoneticName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PhoneticName(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile2)->get_PhoneticName(put_abi(value))); return value; } template Windows::UI::StartScreen::SecondaryTileVisualElements impl_ISecondaryTile2::VisualElements() const { Windows::UI::StartScreen::SecondaryTileVisualElements value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VisualElements(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTile2)->get_VisualElements(put_abi(value))); return value; } template void impl_ISecondaryTile2::RoamingEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RoamingEnabled(value)); + check_hresult(WINRT_SHIM(ISecondaryTile2)->put_RoamingEnabled(value)); } template bool impl_ISecondaryTile2::RoamingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RoamingEnabled(&value)); + check_hresult(WINRT_SHIM(ISecondaryTile2)->get_RoamingEnabled(&value)); return value; } template event_token impl_ISecondaryTile2::VisualElementsRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VisualElementsRequested(get(handler), &token)); + check_hresult(WINRT_SHIM(ISecondaryTile2)->add_VisualElementsRequested(get_abi(handler), &token)); return token; } @@ -1761,247 +1861,247 @@ template event_revoker impl_ISecondaryTile2::Vi template void impl_ISecondaryTile2::VisualElementsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VisualElementsRequested(token)); + check_hresult(WINRT_SHIM(ISecondaryTile2)->remove_VisualElementsRequested(token)); } template void impl_ISecondaryTileVisualElements::Square30x30Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square30x30Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_Square30x30Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements::Square30x30Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square30x30Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_Square30x30Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::Square70x70Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square70x70Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_Square70x70Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements::Square70x70Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square70x70Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_Square70x70Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::Square150x150Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square150x150Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_Square150x150Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements::Square150x150Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square150x150Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_Square150x150Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::Wide310x150Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Wide310x150Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_Wide310x150Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements::Wide310x150Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Wide310x150Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_Wide310x150Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::Square310x310Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square310x310Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_Square310x310Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements::Square310x310Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square310x310Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_Square310x310Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::ForegroundText(Windows::UI::StartScreen::ForegroundText value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundText(value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_ForegroundText(value)); } template Windows::UI::StartScreen::ForegroundText impl_ISecondaryTileVisualElements::ForegroundText() const { Windows::UI::StartScreen::ForegroundText value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundText(&value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_ForegroundText(&value)); return value; } template void impl_ISecondaryTileVisualElements::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_BackgroundColor(get_abi(value))); } template Windows::UI::Color impl_ISecondaryTileVisualElements::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_BackgroundColor(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements::ShowNameOnSquare150x150Logo(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowNameOnSquare150x150Logo(value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_ShowNameOnSquare150x150Logo(value)); } template bool impl_ISecondaryTileVisualElements::ShowNameOnSquare150x150Logo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowNameOnSquare150x150Logo(&value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_ShowNameOnSquare150x150Logo(&value)); return value; } template void impl_ISecondaryTileVisualElements::ShowNameOnWide310x150Logo(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowNameOnWide310x150Logo(value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_ShowNameOnWide310x150Logo(value)); } template bool impl_ISecondaryTileVisualElements::ShowNameOnWide310x150Logo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowNameOnWide310x150Logo(&value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_ShowNameOnWide310x150Logo(&value)); return value; } template void impl_ISecondaryTileVisualElements::ShowNameOnSquare310x310Logo(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowNameOnSquare310x310Logo(value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->put_ShowNameOnSquare310x310Logo(value)); } template bool impl_ISecondaryTileVisualElements::ShowNameOnSquare310x310Logo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowNameOnSquare310x310Logo(&value)); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements)->get_ShowNameOnSquare310x310Logo(&value)); return value; } template void impl_ISecondaryTileVisualElements2::Square71x71Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square71x71Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements2)->put_Square71x71Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements2::Square71x71Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square71x71Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements2)->get_Square71x71Logo(put_abi(value))); return value; } template void impl_ISecondaryTileVisualElements3::Square44x44Logo(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Square44x44Logo(get(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements3)->put_Square44x44Logo(get_abi(value))); } template Windows::Foundation::Uri impl_ISecondaryTileVisualElements3::Square44x44Logo() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Square44x44Logo(put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileVisualElements3)->get_Square44x44Logo(put_abi(value))); return value; } -template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateTile(hstring_ref tileId, hstring_ref shortName, hstring_ref displayName, hstring_ref arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference) const +template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateTile(hstring_view tileId, hstring_view shortName, hstring_view displayName, hstring_view arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference) const { Windows::UI::StartScreen::SecondaryTile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateTile(get(tileId), get(shortName), get(displayName), get(arguments), tileOptions, get(logoReference), put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileFactory)->abi_CreateTile(get_abi(tileId), get_abi(shortName), get_abi(displayName), get_abi(arguments), tileOptions, get_abi(logoReference), put_abi(value))); return value; } -template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateWideTile(hstring_ref tileId, hstring_ref shortName, hstring_ref displayName, hstring_ref arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference, const Windows::Foundation::Uri & wideLogoReference) const +template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateWideTile(hstring_view tileId, hstring_view shortName, hstring_view displayName, hstring_view arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference, const Windows::Foundation::Uri & wideLogoReference) const { Windows::UI::StartScreen::SecondaryTile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWideTile(get(tileId), get(shortName), get(displayName), get(arguments), tileOptions, get(logoReference), get(wideLogoReference), put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileFactory)->abi_CreateWideTile(get_abi(tileId), get_abi(shortName), get_abi(displayName), get_abi(arguments), tileOptions, get_abi(logoReference), get_abi(wideLogoReference), put_abi(value))); return value; } -template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateWithId(hstring_ref tileId) const +template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory::CreateWithId(hstring_view tileId) const { Windows::UI::StartScreen::SecondaryTile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithId(get(tileId), put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileFactory)->abi_CreateWithId(get_abi(tileId), put_abi(value))); return value; } -template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory2::CreateMinimalTile(hstring_ref tileId, hstring_ref displayName, hstring_ref arguments, const Windows::Foundation::Uri & square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize) const +template Windows::UI::StartScreen::SecondaryTile impl_ISecondaryTileFactory2::CreateMinimalTile(hstring_view tileId, hstring_view displayName, hstring_view arguments, const Windows::Foundation::Uri & square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize) const { Windows::UI::StartScreen::SecondaryTile value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateMinimalTile(get(tileId), get(displayName), get(arguments), get(square150x150Logo), desiredSize, put(value))); + check_hresult(WINRT_SHIM(ISecondaryTileFactory2)->abi_CreateMinimalTile(get_abi(tileId), get_abi(displayName), get_abi(arguments), get_abi(square150x150Logo), desiredSize, put_abi(value))); return value; } -template bool impl_ISecondaryTileStatics::Exists(hstring_ref tileId) const +template bool impl_ISecondaryTileStatics::Exists(hstring_view tileId) const { bool exists {}; - check_hresult(static_cast(static_cast(*this))->abi_Exists(get(tileId), &exists)); + check_hresult(WINRT_SHIM(ISecondaryTileStatics)->abi_Exists(get_abi(tileId), &exists)); return exists; } template Windows::Foundation::IAsyncOperation> impl_ISecondaryTileStatics::FindAllAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllAsync(put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTileStatics)->abi_FindAllAsync(put_abi(operation))); return operation; } -template Windows::Foundation::IAsyncOperation> impl_ISecondaryTileStatics::FindAllAsync(hstring_ref applicationId) const +template Windows::Foundation::IAsyncOperation> impl_ISecondaryTileStatics::FindAllAsync(hstring_view applicationId) const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllForApplicationAsync(get(applicationId), put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTileStatics)->abi_FindAllForApplicationAsync(get_abi(applicationId), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation> impl_ISecondaryTileStatics::FindAllForPackageAsync() const { Windows::Foundation::IAsyncOperation> operation; - check_hresult(static_cast(static_cast(*this))->abi_FindAllForPackageAsync(put(operation))); + check_hresult(WINRT_SHIM(ISecondaryTileStatics)->abi_FindAllForPackageAsync(put_abi(operation))); return operation; } template Windows::UI::StartScreen::VisualElementsRequest impl_IVisualElementsRequestedEventArgs::Request() const { Windows::UI::StartScreen::VisualElementsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IVisualElementsRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::UI::StartScreen::SecondaryTileVisualElements impl_IVisualElementsRequest::VisualElements() const { Windows::UI::StartScreen::SecondaryTileVisualElements value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VisualElements(put(value))); + check_hresult(WINRT_SHIM(IVisualElementsRequest)->get_VisualElements(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IVisualElementsRequest::AlternateVisualElements() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AlternateVisualElements(put(value))); + check_hresult(WINRT_SHIM(IVisualElementsRequest)->get_AlternateVisualElements(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IVisualElementsRequest::Deadline() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Deadline(put(value))); + check_hresult(WINRT_SHIM(IVisualElementsRequest)->get_Deadline(put_abi(value))); return value; } template Windows::UI::StartScreen::VisualElementsRequestDeferral impl_IVisualElementsRequest::GetDeferral() const { Windows::UI::StartScreen::VisualElementsRequestDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IVisualElementsRequest)->abi_GetDeferral(put_abi(deferral))); return deferral; } template void impl_IVisualElementsRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IVisualElementsRequestDeferral)->abi_Complete()); } inline Windows::Foundation::IAsyncOperation JumpList::LoadCurrentAsync() @@ -2014,7 +2114,7 @@ inline bool JumpList::IsSupported() return get_activation_factory().IsSupported(); } -inline Windows::UI::StartScreen::JumpListItem JumpListItem::CreateWithArguments(hstring_ref arguments, hstring_ref displayName) +inline Windows::UI::StartScreen::JumpListItem JumpListItem::CreateWithArguments(hstring_view arguments, hstring_view displayName) { return get_activation_factory().CreateWithArguments(arguments, displayName); } @@ -2028,23 +2128,23 @@ inline SecondaryTile::SecondaryTile() : SecondaryTile(activate_instance()) {} -inline SecondaryTile::SecondaryTile(hstring_ref tileId, hstring_ref shortName, hstring_ref displayName, hstring_ref arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference) : +inline SecondaryTile::SecondaryTile(hstring_view tileId, hstring_view shortName, hstring_view displayName, hstring_view arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference) : SecondaryTile(get_activation_factory().CreateTile(tileId, shortName, displayName, arguments, tileOptions, logoReference)) {} -inline SecondaryTile::SecondaryTile(hstring_ref tileId, hstring_ref shortName, hstring_ref displayName, hstring_ref arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference, const Windows::Foundation::Uri & wideLogoReference) : +inline SecondaryTile::SecondaryTile(hstring_view tileId, hstring_view shortName, hstring_view displayName, hstring_view arguments, Windows::UI::StartScreen::TileOptions tileOptions, const Windows::Foundation::Uri & logoReference, const Windows::Foundation::Uri & wideLogoReference) : SecondaryTile(get_activation_factory().CreateWideTile(tileId, shortName, displayName, arguments, tileOptions, logoReference, wideLogoReference)) {} -inline SecondaryTile::SecondaryTile(hstring_ref tileId) : +inline SecondaryTile::SecondaryTile(hstring_view tileId) : SecondaryTile(get_activation_factory().CreateWithId(tileId)) {} -inline SecondaryTile::SecondaryTile(hstring_ref tileId, hstring_ref displayName, hstring_ref arguments, const Windows::Foundation::Uri & square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize) : +inline SecondaryTile::SecondaryTile(hstring_view tileId, hstring_view displayName, hstring_view arguments, const Windows::Foundation::Uri & square150x150Logo, Windows::UI::StartScreen::TileSize desiredSize) : SecondaryTile(get_activation_factory().CreateMinimalTile(tileId, displayName, arguments, square150x150Logo, desiredSize)) {} -inline bool SecondaryTile::Exists(hstring_ref tileId) +inline bool SecondaryTile::Exists(hstring_view tileId) { return get_activation_factory().Exists(tileId); } @@ -2054,7 +2154,7 @@ inline Windows::Foundation::IAsyncOperation().FindAllAsync(); } -inline Windows::Foundation::IAsyncOperation> SecondaryTile::FindAllAsync(hstring_ref applicationId) +inline Windows::Foundation::IAsyncOperation> SecondaryTile::FindAllAsync(hstring_view applicationId) { return get_activation_factory().FindAllAsync(applicationId); } @@ -2067,3 +2167,203 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IJumpList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IJumpListItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IJumpListItemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IJumpListStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTile2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileFactory2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileVisualElements & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileVisualElements2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::ISecondaryTileVisualElements3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IVisualElementsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IVisualElementsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::IVisualElementsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::JumpList & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::JumpListItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::SecondaryTile & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::SecondaryTileVisualElements & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::VisualElementsRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::VisualElementsRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::StartScreen::VisualElementsRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Text.Core.h b/10.0.14393.0/winrt/Windows.UI.Text.Core.h index e77c4c763..941179ae8 100644 --- a/10.0.14393.0/winrt/Windows.UI.Text.Core.h +++ b/10.0.14393.0/winrt/Windows.UI.Text.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Globalization.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,7 +23,8 @@ struct produceshim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -29,11 +33,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_CompositionSegments(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().CompositionSegments()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionSegments()); return S_OK; } catch (...) @@ -43,11 +48,12 @@ struct produce value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -61,11 +67,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PreconversionString(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreconversionString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreconversionString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreconversionString()); return S_OK; } catch (...) @@ -75,11 +82,12 @@ struct produce : produc } } - HRESULT __stdcall get_Range(abi_arg_out value) noexcept override + HRESULT __stdcall get_Range(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Range()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Range()); return S_OK; } catch (...) @@ -96,7 +104,8 @@ struct produce { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -105,11 +114,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -123,11 +133,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Name(abi_arg_out value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -137,10 +148,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Name(abi_arg_in value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -154,7 +166,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().InputScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScope()); return S_OK; } catch (...) @@ -167,6 +180,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().InputScope(value); return S_OK; } @@ -180,7 +194,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -193,6 +208,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsReadOnly(value); return S_OK; } @@ -206,7 +222,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().InputPaneDisplayPolicy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputPaneDisplayPolicy()); return S_OK; } catch (...) @@ -219,6 +236,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().InputPaneDisplayPolicy(value); return S_OK; } @@ -228,11 +246,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_TextRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_TextRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().TextRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().TextRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -245,6 +264,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().TextRequested(cookie); return S_OK; } @@ -254,11 +274,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_SelectionRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_SelectionRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().SelectionRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().SelectionRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -271,6 +292,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionRequested(cookie); return S_OK; } @@ -280,11 +302,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_LayoutRequested(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_LayoutRequested(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().LayoutRequested(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().LayoutRequested(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -297,6 +320,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().LayoutRequested(cookie); return S_OK; } @@ -306,11 +330,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_TextUpdating(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_TextUpdating(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().TextUpdating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().TextUpdating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -323,6 +348,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().TextUpdating(cookie); return S_OK; } @@ -332,11 +358,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_SelectionUpdating(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_SelectionUpdating(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().SelectionUpdating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().SelectionUpdating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -349,6 +376,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionUpdating(cookie); return S_OK; } @@ -358,11 +386,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_FormatUpdating(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_FormatUpdating(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().FormatUpdating(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().FormatUpdating(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -375,6 +404,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().FormatUpdating(cookie); return S_OK; } @@ -384,11 +414,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_CompositionStarted(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_CompositionStarted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().CompositionStarted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().CompositionStarted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -401,6 +432,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CompositionStarted(cookie); return S_OK; } @@ -410,11 +442,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_CompositionCompleted(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_CompositionCompleted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().CompositionCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().CompositionCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -427,6 +460,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CompositionCompleted(cookie); return S_OK; } @@ -436,11 +470,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_FocusRemoved(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_FocusRemoved(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().FocusRemoved(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().FocusRemoved(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -453,6 +488,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().FocusRemoved(cookie); return S_OK; } @@ -466,6 +502,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyFocusEnter(); return S_OK; } @@ -479,6 +516,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyFocusLeave(); return S_OK; } @@ -488,10 +526,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_NotifyTextChanged(abi_arg_in modifiedRange, int32_t newLength, abi_arg_in newSelection) noexcept override + HRESULT __stdcall abi_NotifyTextChanged(impl::abi_arg_in modifiedRange, int32_t newLength, impl::abi_arg_in newSelection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyTextChanged(*reinterpret_cast(&modifiedRange), newLength, *reinterpret_cast(&newSelection)); return S_OK; } @@ -501,10 +540,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_NotifySelectionChanged(abi_arg_in selection) noexcept override + HRESULT __stdcall abi_NotifySelectionChanged(impl::abi_arg_in selection) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifySelectionChanged(*reinterpret_cast(&selection)); return S_OK; } @@ -518,6 +558,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyLayoutChanged(); return S_OK; } @@ -531,11 +572,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall add_NotifyFocusLeaveCompleted(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_NotifyFocusLeaveCompleted(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().NotifyFocusLeaveCompleted(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().NotifyFocusLeaveCompleted(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -548,6 +590,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().NotifyFocusLeaveCompleted(cookie); return S_OK; } @@ -561,11 +604,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Range(abi_arg_out value) noexcept override + HRESULT __stdcall get_Range(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Range()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Range()); return S_OK; } catch (...) @@ -574,11 +618,12 @@ struct produce : p } } - HRESULT __stdcall get_TextColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TextColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TextColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextColor()); return S_OK; } catch (...) @@ -588,11 +633,12 @@ struct produce : p } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -602,11 +648,12 @@ struct produce : p } } - HRESULT __stdcall get_UnderlineColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_UnderlineColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UnderlineColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnderlineColor()); return S_OK; } catch (...) @@ -616,11 +663,12 @@ struct produce : p } } - HRESULT __stdcall get_UnderlineType(abi_arg_out> value) noexcept override + HRESULT __stdcall get_UnderlineType(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().UnderlineType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UnderlineType()); return S_OK; } catch (...) @@ -634,7 +682,8 @@ struct produce : p { try { - *value = detach(this->shim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -647,7 +696,8 @@ struct produce : p { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -660,6 +710,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().Result(value); return S_OK; } @@ -673,7 +724,8 @@ struct produce : p { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -682,11 +734,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -700,11 +753,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_TextBounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextBounds()); return S_OK; } catch (...) @@ -713,10 +767,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TextBounds(abi_arg_in value) noexcept override + HRESULT __stdcall put_TextBounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextBounds(*reinterpret_cast(&value)); return S_OK; } @@ -726,11 +781,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ControlBounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlBounds()); return S_OK; } catch (...) @@ -739,10 +795,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ControlBounds(abi_arg_in value) noexcept override + HRESULT __stdcall put_ControlBounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ControlBounds(*reinterpret_cast(&value)); return S_OK; } @@ -756,11 +813,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Range(abi_arg_out value) noexcept override + HRESULT __stdcall get_Range(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Range()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Range()); return S_OK; } catch (...) @@ -769,11 +827,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_LayoutBounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_LayoutBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LayoutBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LayoutBounds()); return S_OK; } catch (...) @@ -787,7 +846,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -796,11 +856,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -814,11 +875,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -832,11 +894,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Selection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Selection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Selection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selection()); return S_OK; } catch (...) @@ -845,10 +908,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Selection(abi_arg_in value) noexcept override + HRESULT __stdcall put_Selection(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Selection(*reinterpret_cast(&value)); return S_OK; } @@ -862,7 +926,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -871,11 +936,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -889,11 +955,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -907,11 +974,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Selection(abi_arg_out value) noexcept override + HRESULT __stdcall get_Selection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Selection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selection()); return S_OK; } catch (...) @@ -924,7 +992,8 @@ struct produce { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -937,6 +1006,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Result(value); return S_OK; } @@ -950,7 +1020,8 @@ struct produce { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -959,11 +1030,12 @@ struct produce } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -977,11 +1049,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_InputLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputLanguage()); return S_OK; } catch (...) @@ -991,11 +1064,12 @@ struct produce : produce_b } } - HRESULT __stdcall add_InputLanguageChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_InputLanguageChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().InputLanguageChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().InputLanguageChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1008,6 +1082,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().InputLanguageChanged(cookie); return S_OK; } @@ -1017,11 +1092,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_CreateEditContext(abi_arg_out value) noexcept override + HRESULT __stdcall abi_CreateEditContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CreateEditContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CreateEditContext()); return S_OK; } catch (...) @@ -1035,11 +1111,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1057,7 +1134,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().HiddenCharacter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HiddenCharacter()); return S_OK; } catch (...) @@ -1070,11 +1148,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Range(abi_arg_out value) noexcept override + HRESULT __stdcall get_Range(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Range()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Range()); return S_OK; } catch (...) @@ -1083,11 +1162,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1097,10 +1177,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -1114,7 +1195,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -1123,11 +1205,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1141,11 +1224,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Request(abi_arg_out value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -1159,11 +1243,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Range(abi_arg_out value) noexcept override + HRESULT __stdcall get_Range(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Range()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Range()); return S_OK; } catch (...) @@ -1172,11 +1257,12 @@ struct produce : pro } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1186,11 +1272,12 @@ struct produce : pro } } - HRESULT __stdcall get_NewSelection(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewSelection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewSelection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewSelection()); return S_OK; } catch (...) @@ -1199,11 +1286,12 @@ struct produce : pro } } - HRESULT __stdcall get_InputLanguage(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputLanguage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputLanguage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputLanguage()); return S_OK; } catch (...) @@ -1217,7 +1305,8 @@ struct produce : pro { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -1230,6 +1319,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Result(value); return S_OK; } @@ -1243,7 +1333,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsCanceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCanceled()); return S_OK; } catch (...) @@ -1252,11 +1343,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -1274,394 +1366,394 @@ namespace Windows::UI::Text::Core { template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextTextRequest::Range() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Range(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextRequest)->get_Range(put_abi(value))); return value; } template hstring impl_ICoreTextTextRequest::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextRequest)->get_Text(put_abi(value))); return value; } -template void impl_ICoreTextTextRequest::Text(hstring_ref value) const +template void impl_ICoreTextTextRequest::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(ICoreTextTextRequest)->put_Text(get_abi(value))); } template bool impl_ICoreTextTextRequest::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextTextRequest)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextTextRequest::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextRequest)->abi_GetDeferral(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextTextRequest impl_ICoreTextTextRequestedEventArgs::Request() const { Windows::UI::Text::Core::CoreTextTextRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextSelectionRequest::Selection() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Selection(put(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionRequest)->get_Selection(put_abi(value))); return value; } template void impl_ICoreTextSelectionRequest::Selection(const Windows::UI::Text::Core::CoreTextRange & value) const { - check_hresult(static_cast(static_cast(*this))->put_Selection(get(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionRequest)->put_Selection(get_abi(value))); } template bool impl_ICoreTextSelectionRequest::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextSelectionRequest)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextSelectionRequest::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionRequest)->abi_GetDeferral(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextSelectionRequest impl_ICoreTextSelectionRequestedEventArgs::Request() const { Windows::UI::Text::Core::CoreTextSelectionRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Rect impl_ICoreTextLayoutBounds::TextBounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_TextBounds(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutBounds)->get_TextBounds(put_abi(value))); return value; } template void impl_ICoreTextLayoutBounds::TextBounds(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_TextBounds(get(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutBounds)->put_TextBounds(get_abi(value))); } template Windows::Foundation::Rect impl_ICoreTextLayoutBounds::ControlBounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ControlBounds(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutBounds)->get_ControlBounds(put_abi(value))); return value; } template void impl_ICoreTextLayoutBounds::ControlBounds(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_ControlBounds(get(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutBounds)->put_ControlBounds(get_abi(value))); } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextLayoutRequest::Range() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Range(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutRequest)->get_Range(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextLayoutBounds impl_ICoreTextLayoutRequest::LayoutBounds() const { Windows::UI::Text::Core::CoreTextLayoutBounds value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LayoutBounds(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutRequest)->get_LayoutBounds(put_abi(value))); return value; } template bool impl_ICoreTextLayoutRequest::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextLayoutRequest)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextLayoutRequest::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutRequest)->abi_GetDeferral(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextLayoutRequest impl_ICoreTextLayoutRequestedEventArgs::Request() const { Windows::UI::Text::Core::CoreTextLayoutRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ICoreTextLayoutRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextTextUpdatingEventArgs::Range() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Range(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_Range(put_abi(value))); return value; } template hstring impl_ICoreTextTextUpdatingEventArgs::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_Text(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextTextUpdatingEventArgs::NewSelection() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_NewSelection(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_NewSelection(put_abi(value))); return value; } template Windows::Globalization::Language impl_ICoreTextTextUpdatingEventArgs::InputLanguage() const { Windows::Globalization::Language value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputLanguage(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_InputLanguage(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextTextUpdatingResult impl_ICoreTextTextUpdatingEventArgs::Result() const { Windows::UI::Text::Core::CoreTextTextUpdatingResult value {}; - check_hresult(static_cast(static_cast(*this))->get_Result(&value)); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_Result(&value)); return value; } template void impl_ICoreTextTextUpdatingEventArgs::Result(Windows::UI::Text::Core::CoreTextTextUpdatingResult value) const { - check_hresult(static_cast(static_cast(*this))->put_Result(value)); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->put_Result(value)); } template bool impl_ICoreTextTextUpdatingEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextTextUpdatingEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextTextUpdatingEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextSelectionUpdatingEventArgs::Selection() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Selection(put(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionUpdatingEventArgs)->get_Selection(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextSelectionUpdatingResult impl_ICoreTextSelectionUpdatingEventArgs::Result() const { Windows::UI::Text::Core::CoreTextSelectionUpdatingResult value {}; - check_hresult(static_cast(static_cast(*this))->get_Result(&value)); + check_hresult(WINRT_SHIM(ICoreTextSelectionUpdatingEventArgs)->get_Result(&value)); return value; } template void impl_ICoreTextSelectionUpdatingEventArgs::Result(Windows::UI::Text::Core::CoreTextSelectionUpdatingResult value) const { - check_hresult(static_cast(static_cast(*this))->put_Result(value)); + check_hresult(WINRT_SHIM(ICoreTextSelectionUpdatingEventArgs)->put_Result(value)); } template bool impl_ICoreTextSelectionUpdatingEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextSelectionUpdatingEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextSelectionUpdatingEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextSelectionUpdatingEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextFormatUpdatingEventArgs::Range() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Range(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_Range(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICoreTextFormatUpdatingEventArgs::TextColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_TextColor(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_TextColor(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICoreTextFormatUpdatingEventArgs::BackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_BackgroundColor(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICoreTextFormatUpdatingEventArgs::UnderlineColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_UnderlineColor(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_UnderlineColor(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICoreTextFormatUpdatingEventArgs::UnderlineType() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_UnderlineType(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_UnderlineType(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextFormatUpdatingReason impl_ICoreTextFormatUpdatingEventArgs::Reason() const { Windows::UI::Text::Core::CoreTextFormatUpdatingReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_Reason(&value)); return value; } template Windows::UI::Text::Core::CoreTextFormatUpdatingResult impl_ICoreTextFormatUpdatingEventArgs::Result() const { Windows::UI::Text::Core::CoreTextFormatUpdatingResult value {}; - check_hresult(static_cast(static_cast(*this))->get_Result(&value)); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_Result(&value)); return value; } template void impl_ICoreTextFormatUpdatingEventArgs::Result(Windows::UI::Text::Core::CoreTextFormatUpdatingResult value) const { - check_hresult(static_cast(static_cast(*this))->put_Result(value)); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->put_Result(value)); } template bool impl_ICoreTextFormatUpdatingEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextFormatUpdatingEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextFormatUpdatingEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_ICoreTextCompositionStartedEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextCompositionStartedEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Deferral impl_ICoreTextCompositionStartedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextCompositionStartedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } template bool impl_ICoreTextCompositionCompletedEventArgs::IsCanceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCanceled(&value)); + check_hresult(WINRT_SHIM(ICoreTextCompositionCompletedEventArgs)->get_IsCanceled(&value)); return value; } template Windows::Foundation::Collections::IVectorView impl_ICoreTextCompositionCompletedEventArgs::CompositionSegments() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_CompositionSegments(put(value))); + check_hresult(WINRT_SHIM(ICoreTextCompositionCompletedEventArgs)->get_CompositionSegments(put_abi(value))); return value; } template Windows::Foundation::Deferral impl_ICoreTextCompositionCompletedEventArgs::GetDeferral() const { Windows::Foundation::Deferral value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(value))); + check_hresult(WINRT_SHIM(ICoreTextCompositionCompletedEventArgs)->abi_GetDeferral(put_abi(value))); return value; } -template event_token impl_ICoreTextEditContext2::NotifyFocusLeaveCompleted(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreTextEditContext2::NotifyFocusLeaveCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_NotifyFocusLeaveCompleted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext2)->add_NotifyFocusLeaveCompleted(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICoreTextEditContext2::NotifyFocusLeaveCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreTextEditContext2::NotifyFocusLeaveCompleted(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Text::Core::ICoreTextEditContext2::remove_NotifyFocusLeaveCompleted, NotifyFocusLeaveCompleted(handler)); } template void impl_ICoreTextEditContext2::NotifyFocusLeaveCompleted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_NotifyFocusLeaveCompleted(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext2)->remove_NotifyFocusLeaveCompleted(cookie)); } template hstring impl_ICoreTextEditContext::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->get_Name(put_abi(value))); return value; } -template void impl_ICoreTextEditContext::Name(hstring_ref value) const +template void impl_ICoreTextEditContext::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->put_Name(get_abi(value))); } template Windows::UI::Text::Core::CoreTextInputScope impl_ICoreTextEditContext::InputScope() const { Windows::UI::Text::Core::CoreTextInputScope value {}; - check_hresult(static_cast(static_cast(*this))->get_InputScope(&value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->get_InputScope(&value)); return value; } template void impl_ICoreTextEditContext::InputScope(Windows::UI::Text::Core::CoreTextInputScope value) const { - check_hresult(static_cast(static_cast(*this))->put_InputScope(value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->put_InputScope(value)); } template bool impl_ICoreTextEditContext::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->get_IsReadOnly(&value)); return value; } template void impl_ICoreTextEditContext::IsReadOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsReadOnly(value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->put_IsReadOnly(value)); } template Windows::UI::Text::Core::CoreTextInputPaneDisplayPolicy impl_ICoreTextEditContext::InputPaneDisplayPolicy() const { Windows::UI::Text::Core::CoreTextInputPaneDisplayPolicy value {}; - check_hresult(static_cast(static_cast(*this))->get_InputPaneDisplayPolicy(&value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->get_InputPaneDisplayPolicy(&value)); return value; } template void impl_ICoreTextEditContext::InputPaneDisplayPolicy(Windows::UI::Text::Core::CoreTextInputPaneDisplayPolicy value) const { - check_hresult(static_cast(static_cast(*this))->put_InputPaneDisplayPolicy(value)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->put_InputPaneDisplayPolicy(value)); } template event_token impl_ICoreTextEditContext::TextRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_TextRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_TextRequested(get_abi(handler), &cookie)); return cookie; } @@ -1672,13 +1764,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::TextRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TextRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_TextRequested(cookie)); } template event_token impl_ICoreTextEditContext::SelectionRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_SelectionRequested(get_abi(handler), &cookie)); return cookie; } @@ -1689,13 +1781,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::SelectionRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_SelectionRequested(cookie)); } template event_token impl_ICoreTextEditContext::LayoutRequested(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_LayoutRequested(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_LayoutRequested(get_abi(handler), &cookie)); return cookie; } @@ -1706,13 +1798,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::LayoutRequested(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_LayoutRequested(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_LayoutRequested(cookie)); } template event_token impl_ICoreTextEditContext::TextUpdating(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_TextUpdating(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_TextUpdating(get_abi(handler), &cookie)); return cookie; } @@ -1723,13 +1815,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::TextUpdating(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TextUpdating(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_TextUpdating(cookie)); } template event_token impl_ICoreTextEditContext::SelectionUpdating(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionUpdating(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_SelectionUpdating(get_abi(handler), &cookie)); return cookie; } @@ -1740,13 +1832,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::SelectionUpdating(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionUpdating(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_SelectionUpdating(cookie)); } template event_token impl_ICoreTextEditContext::FormatUpdating(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_FormatUpdating(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_FormatUpdating(get_abi(handler), &cookie)); return cookie; } @@ -1757,13 +1849,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::FormatUpdating(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_FormatUpdating(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_FormatUpdating(cookie)); } template event_token impl_ICoreTextEditContext::CompositionStarted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_CompositionStarted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_CompositionStarted(get_abi(handler), &cookie)); return cookie; } @@ -1774,13 +1866,13 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::CompositionStarted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CompositionStarted(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_CompositionStarted(cookie)); } template event_token impl_ICoreTextEditContext::CompositionCompleted(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_CompositionCompleted(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_CompositionCompleted(get_abi(handler), &cookie)); return cookie; } @@ -1791,107 +1883,107 @@ template event_revoker impl_ICoreTextEditCont template void impl_ICoreTextEditContext::CompositionCompleted(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_CompositionCompleted(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_CompositionCompleted(cookie)); } -template event_token impl_ICoreTextEditContext::FocusRemoved(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreTextEditContext::FocusRemoved(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_FocusRemoved(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->add_FocusRemoved(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICoreTextEditContext::FocusRemoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreTextEditContext::FocusRemoved(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Text::Core::ICoreTextEditContext::remove_FocusRemoved, FocusRemoved(handler)); } template void impl_ICoreTextEditContext::FocusRemoved(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_FocusRemoved(cookie)); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->remove_FocusRemoved(cookie)); } template void impl_ICoreTextEditContext::NotifyFocusEnter() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyFocusEnter()); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->abi_NotifyFocusEnter()); } template void impl_ICoreTextEditContext::NotifyFocusLeave() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyFocusLeave()); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->abi_NotifyFocusLeave()); } template void impl_ICoreTextEditContext::NotifyTextChanged(const Windows::UI::Text::Core::CoreTextRange & modifiedRange, int32_t newLength, const Windows::UI::Text::Core::CoreTextRange & newSelection) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyTextChanged(get(modifiedRange), newLength, get(newSelection))); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->abi_NotifyTextChanged(get_abi(modifiedRange), newLength, get_abi(newSelection))); } template void impl_ICoreTextEditContext::NotifySelectionChanged(const Windows::UI::Text::Core::CoreTextRange & selection) const { - check_hresult(static_cast(static_cast(*this))->abi_NotifySelectionChanged(get(selection))); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->abi_NotifySelectionChanged(get_abi(selection))); } template void impl_ICoreTextEditContext::NotifyLayoutChanged() const { - check_hresult(static_cast(static_cast(*this))->abi_NotifyLayoutChanged()); + check_hresult(WINRT_SHIM(ICoreTextEditContext)->abi_NotifyLayoutChanged()); } template Windows::Globalization::Language impl_ICoreTextServicesManager::InputLanguage() const { Windows::Globalization::Language value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputLanguage(put(value))); + check_hresult(WINRT_SHIM(ICoreTextServicesManager)->get_InputLanguage(put_abi(value))); return value; } -template event_token impl_ICoreTextServicesManager::InputLanguageChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_ICoreTextServicesManager::InputLanguageChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_InputLanguageChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(ICoreTextServicesManager)->add_InputLanguageChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_ICoreTextServicesManager::InputLanguageChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_ICoreTextServicesManager::InputLanguageChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Text::Core::ICoreTextServicesManager::remove_InputLanguageChanged, InputLanguageChanged(handler)); } template void impl_ICoreTextServicesManager::InputLanguageChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_InputLanguageChanged(cookie)); + check_hresult(WINRT_SHIM(ICoreTextServicesManager)->remove_InputLanguageChanged(cookie)); } template Windows::UI::Text::Core::CoreTextEditContext impl_ICoreTextServicesManager::CreateEditContext() const { Windows::UI::Text::Core::CoreTextEditContext value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateEditContext(put(value))); + check_hresult(WINRT_SHIM(ICoreTextServicesManager)->abi_CreateEditContext(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextServicesManager impl_ICoreTextServicesManagerStatics::GetForCurrentView() const { Windows::UI::Text::Core::CoreTextServicesManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(ICoreTextServicesManagerStatics)->abi_GetForCurrentView(put_abi(value))); return value; } template wchar_t impl_ICoreTextServicesStatics::HiddenCharacter() const { wchar_t value {}; - check_hresult(static_cast(static_cast(*this))->get_HiddenCharacter(&value)); + check_hresult(WINRT_SHIM(ICoreTextServicesStatics)->get_HiddenCharacter(&value)); return value; } template hstring impl_ICoreTextCompositionSegment::PreconversionString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PreconversionString(put(value))); + check_hresult(WINRT_SHIM(ICoreTextCompositionSegment)->get_PreconversionString(put_abi(value))); return value; } template Windows::UI::Text::Core::CoreTextRange impl_ICoreTextCompositionSegment::Range() const { Windows::UI::Text::Core::CoreTextRange value {}; - check_hresult(static_cast(static_cast(*this))->get_Range(put(value))); + check_hresult(WINRT_SHIM(ICoreTextCompositionSegment)->get_Range(put_abi(value))); return value; } @@ -1908,3 +2000,302 @@ inline Windows::UI::Text::Core::CoreTextServicesManager CoreTextServicesManager: } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextCompositionCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextCompositionSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextCompositionStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextEditContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextEditContext2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextFormatUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextLayoutBounds & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextLayoutRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextLayoutRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextSelectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextSelectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextSelectionUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextServicesManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextServicesManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextServicesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextTextRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextTextRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::ICoreTextTextUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextCompositionCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextCompositionSegment & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextCompositionStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextEditContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextFormatUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextLayoutBounds & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextLayoutRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextLayoutRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextSelectionRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextSelectionRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextSelectionUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextServicesManager & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextTextRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextTextRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::Core::CoreTextTextUpdatingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Text.h b/10.0.14393.0/winrt/Windows.UI.Text.h index 6da5fe901..873d3b7d4 100644 --- a/10.0.14393.0/winrt/Windows.UI.Text.h +++ b/10.0.14393.0/winrt/Windows.UI.Text.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Storage.Streams.3.h" @@ -20,11 +23,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Black(abi_arg_out value) noexcept override + HRESULT __stdcall get_Black(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Black()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Black()); return S_OK; } catch (...) @@ -33,11 +37,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Bold(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bold()); return S_OK; } catch (...) @@ -46,11 +51,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtraBlack(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtraBlack()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtraBlack()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtraBold(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtraBold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtraBold()); return S_OK; } catch (...) @@ -72,11 +79,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ExtraLight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtraLight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtraLight()); return S_OK; } catch (...) @@ -85,11 +93,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Light(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Light()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Light()); return S_OK; } catch (...) @@ -98,11 +107,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Medium(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Medium()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Medium()); return S_OK; } catch (...) @@ -111,11 +121,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Normal(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Normal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Normal()); return S_OK; } catch (...) @@ -124,11 +135,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SemiBold(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemiBold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemiBold()); return S_OK; } catch (...) @@ -137,11 +149,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SemiLight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemiLight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemiLight()); return S_OK; } catch (...) @@ -150,11 +163,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Thin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Thin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Thin()); return S_OK; } catch (...) @@ -171,7 +185,8 @@ struct produce : produce_baseshim().AllCaps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllCaps()); return S_OK; } catch (...) @@ -184,6 +199,7 @@ struct produce : produce_baseshim()); this->shim().AllCaps(value); return S_OK; } @@ -193,11 +209,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -206,10 +223,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -223,7 +241,8 @@ struct produce : produce_baseshim().Bold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bold()); return S_OK; } catch (...) @@ -236,6 +255,7 @@ struct produce : produce_baseshim()); this->shim().Bold(value); return S_OK; } @@ -249,7 +269,8 @@ struct produce : produce_baseshim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -262,6 +283,7 @@ struct produce : produce_baseshim()); this->shim().FontStretch(value); return S_OK; } @@ -275,7 +297,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -288,6 +311,7 @@ struct produce : produce_baseshim()); this->shim().FontStyle(value); return S_OK; } @@ -297,11 +321,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -310,10 +335,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -327,7 +353,8 @@ struct produce : produce_baseshim().Hidden()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Hidden()); return S_OK; } catch (...) @@ -340,6 +367,7 @@ struct produce : produce_baseshim()); this->shim().Hidden(value); return S_OK; } @@ -353,7 +381,8 @@ struct produce : produce_baseshim().Italic()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Italic()); return S_OK; } catch (...) @@ -366,6 +395,7 @@ struct produce : produce_baseshim()); this->shim().Italic(value); return S_OK; } @@ -379,7 +409,8 @@ struct produce : produce_baseshim().Kerning()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Kerning()); return S_OK; } catch (...) @@ -392,6 +423,7 @@ struct produce : produce_baseshim()); this->shim().Kerning(value); return S_OK; } @@ -401,11 +433,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LanguageTag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LanguageTag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LanguageTag()); return S_OK; } catch (...) @@ -415,10 +448,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LanguageTag(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LanguageTag(*reinterpret_cast(&value)); return S_OK; } @@ -432,7 +466,8 @@ struct produce : produce_baseshim().LinkType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinkType()); return S_OK; } catch (...) @@ -441,11 +476,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Name(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Name()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Name()); return S_OK; } catch (...) @@ -455,10 +491,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Name(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return S_OK; } @@ -472,7 +509,8 @@ struct produce : produce_baseshim().Outline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Outline()); return S_OK; } catch (...) @@ -485,6 +523,7 @@ struct produce : produce_baseshim()); this->shim().Outline(value); return S_OK; } @@ -498,7 +537,8 @@ struct produce : produce_baseshim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -511,6 +551,7 @@ struct produce : produce_baseshim()); this->shim().Position(value); return S_OK; } @@ -524,7 +565,8 @@ struct produce : produce_baseshim().ProtectedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectedText()); return S_OK; } catch (...) @@ -537,6 +579,7 @@ struct produce : produce_baseshim()); this->shim().ProtectedText(value); return S_OK; } @@ -550,7 +593,8 @@ struct produce : produce_baseshim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -563,6 +607,7 @@ struct produce : produce_baseshim()); this->shim().Size(value); return S_OK; } @@ -576,7 +621,8 @@ struct produce : produce_baseshim().SmallCaps()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallCaps()); return S_OK; } catch (...) @@ -589,6 +635,7 @@ struct produce : produce_baseshim()); this->shim().SmallCaps(value); return S_OK; } @@ -602,7 +649,8 @@ struct produce : produce_baseshim().Spacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Spacing()); return S_OK; } catch (...) @@ -615,6 +663,7 @@ struct produce : produce_baseshim()); this->shim().Spacing(value); return S_OK; } @@ -628,7 +677,8 @@ struct produce : produce_baseshim().Strikethrough()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Strikethrough()); return S_OK; } catch (...) @@ -641,6 +691,7 @@ struct produce : produce_baseshim()); this->shim().Strikethrough(value); return S_OK; } @@ -654,7 +705,8 @@ struct produce : produce_baseshim().Subscript()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Subscript()); return S_OK; } catch (...) @@ -667,6 +719,7 @@ struct produce : produce_baseshim()); this->shim().Subscript(value); return S_OK; } @@ -680,7 +733,8 @@ struct produce : produce_baseshim().Superscript()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Superscript()); return S_OK; } catch (...) @@ -693,6 +747,7 @@ struct produce : produce_baseshim()); this->shim().Superscript(value); return S_OK; } @@ -706,7 +761,8 @@ struct produce : produce_baseshim().TextScript()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextScript()); return S_OK; } catch (...) @@ -719,6 +775,7 @@ struct produce : produce_baseshim()); this->shim().TextScript(value); return S_OK; } @@ -732,7 +789,8 @@ struct produce : produce_baseshim().Underline()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Underline()); return S_OK; } catch (...) @@ -745,6 +803,7 @@ struct produce : produce_baseshim()); this->shim().Underline(value); return S_OK; } @@ -758,7 +817,8 @@ struct produce : produce_baseshim().Weight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Weight()); return S_OK; } catch (...) @@ -771,6 +831,7 @@ struct produce : produce_baseshim()); this->shim().Weight(value); return S_OK; } @@ -780,10 +841,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetClone(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetClone(*reinterpret_cast(&value)); return S_OK; } @@ -793,11 +855,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetClone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetClone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetClone()); return S_OK; } catch (...) @@ -807,11 +870,12 @@ struct produce : produce_base format, bool * value) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in format, bool * value) noexcept override { try { - *value = detach(this->shim().IsEqual(*reinterpret_cast(&format))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEqual(*reinterpret_cast(&format))); return S_OK; } catch (...) @@ -824,11 +888,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_AutoColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoColor()); return S_OK; } catch (...) @@ -841,7 +906,8 @@ struct produce : produce_baseshim().MinUnitCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinUnitCount()); return S_OK; } catch (...) @@ -854,7 +920,8 @@ struct produce : produce_baseshim().MaxUnitCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxUnitCount()); return S_OK; } catch (...) @@ -863,11 +930,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_UndefinedColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UndefinedColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndefinedColor()); return S_OK; } catch (...) @@ -880,7 +948,8 @@ struct produce : produce_baseshim().UndefinedFloatValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndefinedFloatValue()); return S_OK; } catch (...) @@ -893,7 +962,8 @@ struct produce : produce_baseshim().UndefinedInt32Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndefinedInt32Value()); return S_OK; } catch (...) @@ -906,7 +976,8 @@ struct produce : produce_baseshim().UndefinedFontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndefinedFontStretch()); return S_OK; } catch (...) @@ -919,7 +990,8 @@ struct produce : produce_baseshim().UndefinedFontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndefinedFontStyle()); return S_OK; } catch (...) @@ -936,7 +1008,8 @@ struct produce : produce_baseshim().CaretType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaretType()); return S_OK; } catch (...) @@ -949,6 +1022,7 @@ struct produce : produce_baseshim()); this->shim().CaretType(value); return S_OK; } @@ -962,7 +1036,8 @@ struct produce : produce_baseshim().DefaultTabStop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultTabStop()); return S_OK; } catch (...) @@ -975,6 +1050,7 @@ struct produce : produce_baseshim()); this->shim().DefaultTabStop(value); return S_OK; } @@ -984,11 +1060,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Selection(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Selection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Selection()); return S_OK; } catch (...) @@ -1002,7 +1079,8 @@ struct produce : produce_baseshim().UndoLimit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UndoLimit()); return S_OK; } catch (...) @@ -1015,6 +1093,7 @@ struct produce : produce_baseshim()); this->shim().UndoLimit(value); return S_OK; } @@ -1028,7 +1107,8 @@ struct produce : produce_baseshim().CanCopy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanCopy()); return S_OK; } catch (...) @@ -1041,7 +1121,8 @@ struct produce : produce_baseshim().CanPaste()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPaste()); return S_OK; } catch (...) @@ -1054,7 +1135,8 @@ struct produce : produce_baseshim().CanRedo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRedo()); return S_OK; } catch (...) @@ -1067,7 +1149,8 @@ struct produce : produce_baseshim().CanUndo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanUndo()); return S_OK; } catch (...) @@ -1080,7 +1163,8 @@ struct produce : produce_baseshim().ApplyDisplayUpdates()); + typename D::abi_guard guard(this->shim()); + *count = detach_abi(this->shim().ApplyDisplayUpdates()); return S_OK; } catch (...) @@ -1093,7 +1177,8 @@ struct produce : produce_baseshim().BatchDisplayUpdates()); + typename D::abi_guard guard(this->shim()); + *count = detach_abi(this->shim().BatchDisplayUpdates()); return S_OK; } catch (...) @@ -1106,6 +1191,7 @@ struct produce : produce_baseshim()); this->shim().BeginUndoGroup(); return S_OK; } @@ -1119,6 +1205,7 @@ struct produce : produce_baseshim()); this->shim().EndUndoGroup(); return S_OK; } @@ -1128,11 +1215,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDefaultCharacterFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefaultCharacterFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefaultCharacterFormat()); return S_OK; } catch (...) @@ -1142,11 +1230,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetDefaultParagraphFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetDefaultParagraphFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDefaultParagraphFormat()); return S_OK; } catch (...) @@ -1156,11 +1245,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetRange(int32_t startPosition, int32_t endPosition, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRange(startPosition, endPosition)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRange(startPosition, endPosition)); return S_OK; } catch (...) @@ -1170,11 +1260,12 @@ struct produce : produce_base point, Windows::UI::Text::PointOptions options, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetRangeFromPoint(impl::abi_arg_in point, Windows::UI::Text::PointOptions options, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRangeFromPoint(*reinterpret_cast(&point), options)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRangeFromPoint(*reinterpret_cast(&point), options)); return S_OK; } catch (...) @@ -1184,10 +1275,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetText(Windows::UI::Text::TextGetOptions options, impl::abi_arg_out value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetText(options, *value); return S_OK; } @@ -1198,10 +1290,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_LoadFromStream(Windows::UI::Text::TextSetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadFromStream(options, *reinterpret_cast(&value)); return S_OK; } @@ -1215,6 +1308,7 @@ struct produce : produce_baseshim()); this->shim().Redo(); return S_OK; } @@ -1224,10 +1318,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SaveToStream(Windows::UI::Text::TextGetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SaveToStream(options, *reinterpret_cast(&value)); return S_OK; } @@ -1237,10 +1332,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetDefaultCharacterFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultCharacterFormat(*reinterpret_cast(&value)); return S_OK; } @@ -1250,10 +1346,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetDefaultParagraphFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDefaultParagraphFormat(*reinterpret_cast(&value)); return S_OK; } @@ -1263,10 +1360,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetText(Windows::UI::Text::TextSetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetText(options, *reinterpret_cast(&value)); return S_OK; } @@ -1280,6 +1378,7 @@ struct produce : produce_baseshim()); this->shim().Undo(); return S_OK; } @@ -1297,7 +1396,8 @@ struct produce : produce_baseshim().Alignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Alignment()); return S_OK; } catch (...) @@ -1310,6 +1410,7 @@ struct produce : produce_baseshim()); this->shim().Alignment(value); return S_OK; } @@ -1323,7 +1424,8 @@ struct produce : produce_baseshim().FirstLineIndent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstLineIndent()); return S_OK; } catch (...) @@ -1336,7 +1438,8 @@ struct produce : produce_baseshim().KeepTogether()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeepTogether()); return S_OK; } catch (...) @@ -1349,6 +1452,7 @@ struct produce : produce_baseshim()); this->shim().KeepTogether(value); return S_OK; } @@ -1362,7 +1466,8 @@ struct produce : produce_baseshim().KeepWithNext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeepWithNext()); return S_OK; } catch (...) @@ -1375,6 +1480,7 @@ struct produce : produce_baseshim()); this->shim().KeepWithNext(value); return S_OK; } @@ -1388,7 +1494,8 @@ struct produce : produce_baseshim().LeftIndent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftIndent()); return S_OK; } catch (...) @@ -1401,7 +1508,8 @@ struct produce : produce_baseshim().LineSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineSpacing()); return S_OK; } catch (...) @@ -1414,7 +1522,8 @@ struct produce : produce_baseshim().LineSpacingRule()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineSpacingRule()); return S_OK; } catch (...) @@ -1427,7 +1536,8 @@ struct produce : produce_baseshim().ListAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListAlignment()); return S_OK; } catch (...) @@ -1440,6 +1550,7 @@ struct produce : produce_baseshim()); this->shim().ListAlignment(value); return S_OK; } @@ -1453,7 +1564,8 @@ struct produce : produce_baseshim().ListLevelIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListLevelIndex()); return S_OK; } catch (...) @@ -1466,6 +1578,7 @@ struct produce : produce_baseshim()); this->shim().ListLevelIndex(value); return S_OK; } @@ -1479,7 +1592,8 @@ struct produce : produce_baseshim().ListStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListStart()); return S_OK; } catch (...) @@ -1492,6 +1606,7 @@ struct produce : produce_baseshim()); this->shim().ListStart(value); return S_OK; } @@ -1505,7 +1620,8 @@ struct produce : produce_baseshim().ListStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListStyle()); return S_OK; } catch (...) @@ -1518,6 +1634,7 @@ struct produce : produce_baseshim()); this->shim().ListStyle(value); return S_OK; } @@ -1531,7 +1648,8 @@ struct produce : produce_baseshim().ListTab()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListTab()); return S_OK; } catch (...) @@ -1544,6 +1662,7 @@ struct produce : produce_baseshim()); this->shim().ListTab(value); return S_OK; } @@ -1557,7 +1676,8 @@ struct produce : produce_baseshim().ListType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListType()); return S_OK; } catch (...) @@ -1570,6 +1690,7 @@ struct produce : produce_baseshim()); this->shim().ListType(value); return S_OK; } @@ -1583,7 +1704,8 @@ struct produce : produce_baseshim().NoLineNumber()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoLineNumber()); return S_OK; } catch (...) @@ -1596,6 +1718,7 @@ struct produce : produce_baseshim()); this->shim().NoLineNumber(value); return S_OK; } @@ -1609,7 +1732,8 @@ struct produce : produce_baseshim().PageBreakBefore()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PageBreakBefore()); return S_OK; } catch (...) @@ -1622,6 +1746,7 @@ struct produce : produce_baseshim()); this->shim().PageBreakBefore(value); return S_OK; } @@ -1635,7 +1760,8 @@ struct produce : produce_baseshim().RightIndent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightIndent()); return S_OK; } catch (...) @@ -1648,6 +1774,7 @@ struct produce : produce_baseshim()); this->shim().RightIndent(value); return S_OK; } @@ -1661,7 +1788,8 @@ struct produce : produce_baseshim().RightToLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightToLeft()); return S_OK; } catch (...) @@ -1674,6 +1802,7 @@ struct produce : produce_baseshim()); this->shim().RightToLeft(value); return S_OK; } @@ -1687,7 +1816,8 @@ struct produce : produce_baseshim().Style()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Style()); return S_OK; } catch (...) @@ -1700,6 +1830,7 @@ struct produce : produce_baseshim()); this->shim().Style(value); return S_OK; } @@ -1713,7 +1844,8 @@ struct produce : produce_baseshim().SpaceAfter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpaceAfter()); return S_OK; } catch (...) @@ -1726,6 +1858,7 @@ struct produce : produce_baseshim()); this->shim().SpaceAfter(value); return S_OK; } @@ -1739,7 +1872,8 @@ struct produce : produce_baseshim().SpaceBefore()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SpaceBefore()); return S_OK; } catch (...) @@ -1752,6 +1886,7 @@ struct produce : produce_baseshim()); this->shim().SpaceBefore(value); return S_OK; } @@ -1765,7 +1900,8 @@ struct produce : produce_baseshim().WidowControl()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WidowControl()); return S_OK; } catch (...) @@ -1778,6 +1914,7 @@ struct produce : produce_baseshim()); this->shim().WidowControl(value); return S_OK; } @@ -1791,7 +1928,8 @@ struct produce : produce_baseshim().TabCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TabCount()); return S_OK; } catch (...) @@ -1804,6 +1942,7 @@ struct produce : produce_baseshim()); this->shim().AddTab(position, align, leader); return S_OK; } @@ -1817,6 +1956,7 @@ struct produce : produce_baseshim()); this->shim().ClearAllTabs(); return S_OK; } @@ -1830,6 +1970,7 @@ struct produce : produce_baseshim()); this->shim().DeleteTab(position); return S_OK; } @@ -1839,11 +1980,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetClone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetClone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetClone()); return S_OK; } catch (...) @@ -1857,6 +1999,7 @@ struct produce : produce_baseshim()); this->shim().GetTab(index, *position, *align, *leader); return S_OK; } @@ -1866,11 +2009,12 @@ struct produce : produce_base format, bool * value) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in format, bool * value) noexcept override { try { - *value = detach(this->shim().IsEqual(*reinterpret_cast(&format))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEqual(*reinterpret_cast(&format))); return S_OK; } catch (...) @@ -1879,10 +2023,11 @@ struct produce : produce_base format) noexcept override + HRESULT __stdcall abi_SetClone(impl::abi_arg_in format) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetClone(*reinterpret_cast(&format)); return S_OK; } @@ -1896,6 +2041,7 @@ struct produce : produce_baseshim()); this->shim().SetIndents(start, left, right); return S_OK; } @@ -1909,6 +2055,7 @@ struct produce : produce_baseshim()); this->shim().SetLineSpacing(rule, spacing); return S_OK; } @@ -1926,7 +2073,8 @@ struct produce : produce_baseshim().Character()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Character()); return S_OK; } catch (...) @@ -1939,6 +2087,7 @@ struct produce : produce_baseshim()); this->shim().Character(value); return S_OK; } @@ -1948,11 +2097,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CharacterFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacterFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterFormat()); return S_OK; } catch (...) @@ -1962,10 +2112,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CharacterFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CharacterFormat(*reinterpret_cast(&value)); return S_OK; } @@ -1975,11 +2126,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FormattedText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormattedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormattedText()); return S_OK; } catch (...) @@ -1989,10 +2141,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FormattedText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FormattedText(*reinterpret_cast(&value)); return S_OK; } @@ -2006,7 +2159,8 @@ struct produce : produce_baseshim().EndPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EndPosition()); return S_OK; } catch (...) @@ -2019,6 +2173,7 @@ struct produce : produce_baseshim()); this->shim().EndPosition(value); return S_OK; } @@ -2032,7 +2187,8 @@ struct produce : produce_baseshim().Gravity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Gravity()); return S_OK; } catch (...) @@ -2045,6 +2201,7 @@ struct produce : produce_baseshim()); this->shim().Gravity(value); return S_OK; } @@ -2058,7 +2215,8 @@ struct produce : produce_baseshim().Length()); + typename D::abi_guard guard(this->shim()); + *length = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -2067,11 +2225,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Link(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Link()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Link()); return S_OK; } catch (...) @@ -2081,10 +2240,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Link(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Link(*reinterpret_cast(&value)); return S_OK; } @@ -2094,11 +2254,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ParagraphFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ParagraphFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ParagraphFormat()); return S_OK; } catch (...) @@ -2108,10 +2269,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ParagraphFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ParagraphFormat(*reinterpret_cast(&value)); return S_OK; } @@ -2125,7 +2287,8 @@ struct produce : produce_baseshim().StartPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartPosition()); return S_OK; } catch (...) @@ -2138,6 +2301,7 @@ struct produce : produce_baseshim()); this->shim().StartPosition(value); return S_OK; } @@ -2151,7 +2315,8 @@ struct produce : produce_baseshim().StoryLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StoryLength()); return S_OK; } catch (...) @@ -2160,11 +2325,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -2174,10 +2340,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -2191,7 +2358,8 @@ struct produce : produce_baseshim().CanPaste(format)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPaste(format)); return S_OK; } catch (...) @@ -2204,6 +2372,7 @@ struct produce : produce_baseshim()); this->shim().ChangeCase(value); return S_OK; } @@ -2217,6 +2386,7 @@ struct produce : produce_baseshim()); this->shim().Collapse(value); return S_OK; } @@ -2230,6 +2400,7 @@ struct produce : produce_baseshim()); this->shim().Copy(); return S_OK; } @@ -2243,6 +2414,7 @@ struct produce : produce_baseshim()); this->shim().Cut(); return S_OK; } @@ -2256,7 +2428,8 @@ struct produce : produce_baseshim().Delete(unit, count)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().Delete(unit, count)); return S_OK; } catch (...) @@ -2269,7 +2442,8 @@ struct produce : produce_baseshim().EndOf(unit, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().EndOf(unit, extend)); return S_OK; } catch (...) @@ -2282,7 +2456,8 @@ struct produce : produce_baseshim().Expand(unit)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().Expand(unit)); return S_OK; } catch (...) @@ -2291,11 +2466,12 @@ struct produce : produce_base value, int32_t scanLength, Windows::UI::Text::FindOptions options, int32_t * length) noexcept override + HRESULT __stdcall abi_FindText(impl::abi_arg_in value, int32_t scanLength, Windows::UI::Text::FindOptions options, int32_t * length) noexcept override { try { - *length = detach(this->shim().FindText(*reinterpret_cast(&value), scanLength, options)); + typename D::abi_guard guard(this->shim()); + *length = detach_abi(this->shim().FindText(*reinterpret_cast(&value), scanLength, options)); return S_OK; } catch (...) @@ -2308,6 +2484,7 @@ struct produce : produce_baseshim()); this->shim().GetCharacterUtf32(*value, offset); return S_OK; } @@ -2317,11 +2494,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetClone(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetClone()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetClone()); return S_OK; } catch (...) @@ -2335,7 +2513,8 @@ struct produce : produce_baseshim().GetIndex(unit)); + typename D::abi_guard guard(this->shim()); + *index = detach_abi(this->shim().GetIndex(unit)); return S_OK; } catch (...) @@ -2344,10 +2523,11 @@ struct produce : produce_base point) noexcept override + HRESULT __stdcall abi_GetPoint(Windows::UI::Text::HorizontalCharacterAlignment horizontalAlign, Windows::UI::Text::VerticalCharacterAlignment verticalAlign, Windows::UI::Text::PointOptions options, impl::abi_arg_out point) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetPoint(horizontalAlign, verticalAlign, options, *point); return S_OK; } @@ -2357,10 +2537,11 @@ struct produce : produce_base rect, int32_t * hit) noexcept override + HRESULT __stdcall abi_GetRect(Windows::UI::Text::PointOptions options, impl::abi_arg_out rect, int32_t * hit) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetRect(options, *rect, *hit); return S_OK; } @@ -2370,10 +2551,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetText(Windows::UI::Text::TextGetOptions options, impl::abi_arg_out value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetText(options, *value); return S_OK; } @@ -2384,10 +2566,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_GetTextViaStream(Windows::UI::Text::TextGetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetTextViaStream(options, *reinterpret_cast(&value)); return S_OK; } @@ -2397,11 +2580,12 @@ struct produce : produce_base range, bool * value) noexcept override + HRESULT __stdcall abi_InRange(impl::abi_arg_in range, bool * value) noexcept override { try { - *value = detach(this->shim().InRange(*reinterpret_cast(&range))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InRange(*reinterpret_cast(&range))); return S_OK; } catch (...) @@ -2410,10 +2594,11 @@ struct produce : produce_base alternateText, abi_arg_in value) noexcept override + HRESULT __stdcall abi_InsertImage(int32_t width, int32_t height, int32_t ascent, Windows::UI::Text::VerticalCharacterAlignment verticalAlign, impl::abi_arg_in alternateText, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertImage(width, height, ascent, verticalAlign, *reinterpret_cast(&alternateText), *reinterpret_cast(&value)); return S_OK; } @@ -2423,11 +2608,12 @@ struct produce : produce_base range, bool * value) noexcept override + HRESULT __stdcall abi_InStory(impl::abi_arg_in range, bool * value) noexcept override { try { - *value = detach(this->shim().InStory(*reinterpret_cast(&range))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InStory(*reinterpret_cast(&range))); return S_OK; } catch (...) @@ -2436,11 +2622,12 @@ struct produce : produce_base range, bool * value) noexcept override + HRESULT __stdcall abi_IsEqual(impl::abi_arg_in range, bool * value) noexcept override { try { - *value = detach(this->shim().IsEqual(*reinterpret_cast(&range))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEqual(*reinterpret_cast(&range))); return S_OK; } catch (...) @@ -2453,7 +2640,8 @@ struct produce : produce_baseshim().Move(unit, count)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().Move(unit, count)); return S_OK; } catch (...) @@ -2466,7 +2654,8 @@ struct produce : produce_baseshim().MoveEnd(unit, count)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveEnd(unit, count)); return S_OK; } catch (...) @@ -2479,7 +2668,8 @@ struct produce : produce_baseshim().MoveStart(unit, count)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveStart(unit, count)); return S_OK; } catch (...) @@ -2492,6 +2682,7 @@ struct produce : produce_baseshim()); this->shim().Paste(format); return S_OK; } @@ -2505,6 +2696,7 @@ struct produce : produce_baseshim()); this->shim().ScrollIntoView(value); return S_OK; } @@ -2518,6 +2710,7 @@ struct produce : produce_baseshim()); this->shim().MatchSelection(); return S_OK; } @@ -2531,6 +2724,7 @@ struct produce : produce_baseshim()); this->shim().SetIndex(unit, index, extend); return S_OK; } @@ -2540,10 +2734,11 @@ struct produce : produce_base point, Windows::UI::Text::PointOptions options, bool extend) noexcept override + HRESULT __stdcall abi_SetPoint(impl::abi_arg_in point, Windows::UI::Text::PointOptions options, bool extend) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPoint(*reinterpret_cast(&point), options, extend); return S_OK; } @@ -2557,6 +2752,7 @@ struct produce : produce_baseshim()); this->shim().SetRange(startPosition, endPosition); return S_OK; } @@ -2566,10 +2762,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetText(Windows::UI::Text::TextSetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetText(options, *reinterpret_cast(&value)); return S_OK; } @@ -2579,10 +2776,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_SetTextViaStream(Windows::UI::Text::TextSetOptions options, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetTextViaStream(options, *reinterpret_cast(&value)); return S_OK; } @@ -2596,7 +2794,8 @@ struct produce : produce_baseshim().StartOf(unit, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().StartOf(unit, extend)); return S_OK; } catch (...) @@ -2613,7 +2812,8 @@ struct produce : produce_baseshim().Options()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Options()); return S_OK; } catch (...) @@ -2626,6 +2826,7 @@ struct produce : produce_baseshim()); this->shim().Options(value); return S_OK; } @@ -2639,7 +2840,8 @@ struct produce : produce_baseshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -2652,7 +2854,8 @@ struct produce : produce_baseshim().EndKey(unit, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().EndKey(unit, extend)); return S_OK; } catch (...) @@ -2665,7 +2868,8 @@ struct produce : produce_baseshim().HomeKey(unit, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().HomeKey(unit, extend)); return S_OK; } catch (...) @@ -2678,7 +2882,8 @@ struct produce : produce_baseshim().MoveDown(unit, count, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveDown(unit, count, extend)); return S_OK; } catch (...) @@ -2691,7 +2896,8 @@ struct produce : produce_baseshim().MoveLeft(unit, count, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveLeft(unit, count, extend)); return S_OK; } catch (...) @@ -2704,7 +2910,8 @@ struct produce : produce_baseshim().MoveRight(unit, count, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveRight(unit, count, extend)); return S_OK; } catch (...) @@ -2717,7 +2924,8 @@ struct produce : produce_baseshim().MoveUp(unit, count, extend)); + typename D::abi_guard guard(this->shim()); + *delta = detach_abi(this->shim().MoveUp(unit, count, extend)); return S_OK; } catch (...) @@ -2726,10 +2934,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_TypeText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TypeText(*reinterpret_cast(&value)); return S_OK; } @@ -2747,1262 +2956,1262 @@ namespace Windows::UI::Text { template Windows::UI::Color impl_ITextConstantsStatics::AutoColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoColor(put(value))); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_AutoColor(put_abi(value))); return value; } template int32_t impl_ITextConstantsStatics::MinUnitCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinUnitCount(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_MinUnitCount(&value)); return value; } template int32_t impl_ITextConstantsStatics::MaxUnitCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxUnitCount(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_MaxUnitCount(&value)); return value; } template Windows::UI::Color impl_ITextConstantsStatics::UndefinedColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_UndefinedColor(put(value))); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_UndefinedColor(put_abi(value))); return value; } template float impl_ITextConstantsStatics::UndefinedFloatValue() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_UndefinedFloatValue(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_UndefinedFloatValue(&value)); return value; } template int32_t impl_ITextConstantsStatics::UndefinedInt32Value() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UndefinedInt32Value(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_UndefinedInt32Value(&value)); return value; } template Windows::UI::Text::FontStretch impl_ITextConstantsStatics::UndefinedFontStretch() const { Windows::UI::Text::FontStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_UndefinedFontStretch(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_UndefinedFontStretch(&value)); return value; } template Windows::UI::Text::FontStyle impl_ITextConstantsStatics::UndefinedFontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_UndefinedFontStyle(&value)); + check_hresult(WINRT_SHIM(ITextConstantsStatics)->get_UndefinedFontStyle(&value)); return value; } template Windows::UI::Text::CaretType impl_ITextDocument::CaretType() const { Windows::UI::Text::CaretType value {}; - check_hresult(static_cast(static_cast(*this))->get_CaretType(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->get_CaretType(&value)); return value; } template void impl_ITextDocument::CaretType(Windows::UI::Text::CaretType value) const { - check_hresult(static_cast(static_cast(*this))->put_CaretType(value)); + check_hresult(WINRT_SHIM(ITextDocument)->put_CaretType(value)); } template float impl_ITextDocument::DefaultTabStop() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultTabStop(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->get_DefaultTabStop(&value)); return value; } template void impl_ITextDocument::DefaultTabStop(float value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultTabStop(value)); + check_hresult(WINRT_SHIM(ITextDocument)->put_DefaultTabStop(value)); } template Windows::UI::Text::ITextSelection impl_ITextDocument::Selection() const { Windows::UI::Text::ITextSelection value; - check_hresult(static_cast(static_cast(*this))->get_Selection(put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->get_Selection(put_abi(value))); return value; } template uint32_t impl_ITextDocument::UndoLimit() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_UndoLimit(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->get_UndoLimit(&value)); return value; } template void impl_ITextDocument::UndoLimit(uint32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_UndoLimit(value)); + check_hresult(WINRT_SHIM(ITextDocument)->put_UndoLimit(value)); } template bool impl_ITextDocument::CanCopy() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CanCopy(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_CanCopy(&value)); return value; } template bool impl_ITextDocument::CanPaste() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CanPaste(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_CanPaste(&value)); return value; } template bool impl_ITextDocument::CanRedo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CanRedo(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_CanRedo(&value)); return value; } template bool impl_ITextDocument::CanUndo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CanUndo(&value)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_CanUndo(&value)); return value; } template int32_t impl_ITextDocument::ApplyDisplayUpdates() const { int32_t count {}; - check_hresult(static_cast(static_cast(*this))->abi_ApplyDisplayUpdates(&count)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_ApplyDisplayUpdates(&count)); return count; } template int32_t impl_ITextDocument::BatchDisplayUpdates() const { int32_t count {}; - check_hresult(static_cast(static_cast(*this))->abi_BatchDisplayUpdates(&count)); + check_hresult(WINRT_SHIM(ITextDocument)->abi_BatchDisplayUpdates(&count)); return count; } template void impl_ITextDocument::BeginUndoGroup() const { - check_hresult(static_cast(static_cast(*this))->abi_BeginUndoGroup()); + check_hresult(WINRT_SHIM(ITextDocument)->abi_BeginUndoGroup()); } template void impl_ITextDocument::EndUndoGroup() const { - check_hresult(static_cast(static_cast(*this))->abi_EndUndoGroup()); + check_hresult(WINRT_SHIM(ITextDocument)->abi_EndUndoGroup()); } template Windows::UI::Text::ITextCharacterFormat impl_ITextDocument::GetDefaultCharacterFormat() const { Windows::UI::Text::ITextCharacterFormat value; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultCharacterFormat(put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_GetDefaultCharacterFormat(put_abi(value))); return value; } template Windows::UI::Text::ITextParagraphFormat impl_ITextDocument::GetDefaultParagraphFormat() const { Windows::UI::Text::ITextParagraphFormat value; - check_hresult(static_cast(static_cast(*this))->abi_GetDefaultParagraphFormat(put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_GetDefaultParagraphFormat(put_abi(value))); return value; } template Windows::UI::Text::ITextRange impl_ITextDocument::GetRange(int32_t startPosition, int32_t endPosition) const { Windows::UI::Text::ITextRange value; - check_hresult(static_cast(static_cast(*this))->abi_GetRange(startPosition, endPosition, put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_GetRange(startPosition, endPosition, put_abi(value))); return value; } template Windows::UI::Text::ITextRange impl_ITextDocument::GetRangeFromPoint(const Windows::Foundation::Point & point, Windows::UI::Text::PointOptions options) const { Windows::UI::Text::ITextRange value; - check_hresult(static_cast(static_cast(*this))->abi_GetRangeFromPoint(get(point), options, put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_GetRangeFromPoint(get_abi(point), options, put_abi(value))); return value; } template void impl_ITextDocument::GetText(Windows::UI::Text::TextGetOptions options, hstring & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetText(options, put(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_GetText(options, put_abi(value))); } template void impl_ITextDocument::LoadFromStream(Windows::UI::Text::TextSetOptions options, const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->abi_LoadFromStream(options, get(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_LoadFromStream(options, get_abi(value))); } template void impl_ITextDocument::Redo() const { - check_hresult(static_cast(static_cast(*this))->abi_Redo()); + check_hresult(WINRT_SHIM(ITextDocument)->abi_Redo()); } template void impl_ITextDocument::SaveToStream(Windows::UI::Text::TextGetOptions options, const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SaveToStream(options, get(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_SaveToStream(options, get_abi(value))); } template void impl_ITextDocument::SetDefaultCharacterFormat(const Windows::UI::Text::ITextCharacterFormat & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultCharacterFormat(get(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_SetDefaultCharacterFormat(get_abi(value))); } template void impl_ITextDocument::SetDefaultParagraphFormat(const Windows::UI::Text::ITextParagraphFormat & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDefaultParagraphFormat(get(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_SetDefaultParagraphFormat(get_abi(value))); } -template void impl_ITextDocument::SetText(Windows::UI::Text::TextSetOptions options, hstring_ref value) const +template void impl_ITextDocument::SetText(Windows::UI::Text::TextSetOptions options, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetText(options, get(value))); + check_hresult(WINRT_SHIM(ITextDocument)->abi_SetText(options, get_abi(value))); } template void impl_ITextDocument::Undo() const { - check_hresult(static_cast(static_cast(*this))->abi_Undo()); + check_hresult(WINRT_SHIM(ITextDocument)->abi_Undo()); } template wchar_t impl_ITextRange::Character() const { wchar_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Character(&value)); + check_hresult(WINRT_SHIM(ITextRange)->get_Character(&value)); return value; } template void impl_ITextRange::Character(wchar_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Character(value)); + check_hresult(WINRT_SHIM(ITextRange)->put_Character(value)); } template Windows::UI::Text::ITextCharacterFormat impl_ITextRange::CharacterFormat() const { Windows::UI::Text::ITextCharacterFormat value; - check_hresult(static_cast(static_cast(*this))->get_CharacterFormat(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->get_CharacterFormat(put_abi(value))); return value; } template void impl_ITextRange::CharacterFormat(const Windows::UI::Text::ITextCharacterFormat & value) const { - check_hresult(static_cast(static_cast(*this))->put_CharacterFormat(get(value))); + check_hresult(WINRT_SHIM(ITextRange)->put_CharacterFormat(get_abi(value))); } template Windows::UI::Text::ITextRange impl_ITextRange::FormattedText() const { Windows::UI::Text::ITextRange value; - check_hresult(static_cast(static_cast(*this))->get_FormattedText(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->get_FormattedText(put_abi(value))); return value; } template void impl_ITextRange::FormattedText(const Windows::UI::Text::ITextRange & value) const { - check_hresult(static_cast(static_cast(*this))->put_FormattedText(get(value))); + check_hresult(WINRT_SHIM(ITextRange)->put_FormattedText(get_abi(value))); } template int32_t impl_ITextRange::EndPosition() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_EndPosition(&value)); + check_hresult(WINRT_SHIM(ITextRange)->get_EndPosition(&value)); return value; } template void impl_ITextRange::EndPosition(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_EndPosition(value)); + check_hresult(WINRT_SHIM(ITextRange)->put_EndPosition(value)); } template Windows::UI::Text::RangeGravity impl_ITextRange::Gravity() const { Windows::UI::Text::RangeGravity value {}; - check_hresult(static_cast(static_cast(*this))->get_Gravity(&value)); + check_hresult(WINRT_SHIM(ITextRange)->get_Gravity(&value)); return value; } template void impl_ITextRange::Gravity(Windows::UI::Text::RangeGravity value) const { - check_hresult(static_cast(static_cast(*this))->put_Gravity(value)); + check_hresult(WINRT_SHIM(ITextRange)->put_Gravity(value)); } template int32_t impl_ITextRange::Length() const { int32_t length {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&length)); + check_hresult(WINRT_SHIM(ITextRange)->get_Length(&length)); return length; } template hstring impl_ITextRange::Link() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Link(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->get_Link(put_abi(value))); return value; } -template void impl_ITextRange::Link(hstring_ref value) const +template void impl_ITextRange::Link(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Link(get(value))); + check_hresult(WINRT_SHIM(ITextRange)->put_Link(get_abi(value))); } template Windows::UI::Text::ITextParagraphFormat impl_ITextRange::ParagraphFormat() const { Windows::UI::Text::ITextParagraphFormat value; - check_hresult(static_cast(static_cast(*this))->get_ParagraphFormat(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->get_ParagraphFormat(put_abi(value))); return value; } template void impl_ITextRange::ParagraphFormat(const Windows::UI::Text::ITextParagraphFormat & value) const { - check_hresult(static_cast(static_cast(*this))->put_ParagraphFormat(get(value))); + check_hresult(WINRT_SHIM(ITextRange)->put_ParagraphFormat(get_abi(value))); } template int32_t impl_ITextRange::StartPosition() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartPosition(&value)); + check_hresult(WINRT_SHIM(ITextRange)->get_StartPosition(&value)); return value; } template void impl_ITextRange::StartPosition(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_StartPosition(value)); + check_hresult(WINRT_SHIM(ITextRange)->put_StartPosition(value)); } template int32_t impl_ITextRange::StoryLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StoryLength(&value)); + check_hresult(WINRT_SHIM(ITextRange)->get_StoryLength(&value)); return value; } template hstring impl_ITextRange::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->get_Text(put_abi(value))); return value; } -template void impl_ITextRange::Text(hstring_ref value) const +template void impl_ITextRange::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(ITextRange)->put_Text(get_abi(value))); } template bool impl_ITextRange::CanPaste(int32_t format) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_CanPaste(format, &value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_CanPaste(format, &value)); return value; } template void impl_ITextRange::ChangeCase(Windows::UI::Text::LetterCase value) const { - check_hresult(static_cast(static_cast(*this))->abi_ChangeCase(value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_ChangeCase(value)); } template void impl_ITextRange::Collapse(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_Collapse(value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_Collapse(value)); } template void impl_ITextRange::Copy() const { - check_hresult(static_cast(static_cast(*this))->abi_Copy()); + check_hresult(WINRT_SHIM(ITextRange)->abi_Copy()); } template void impl_ITextRange::Cut() const { - check_hresult(static_cast(static_cast(*this))->abi_Cut()); + check_hresult(WINRT_SHIM(ITextRange)->abi_Cut()); } template int32_t impl_ITextRange::Delete(Windows::UI::Text::TextRangeUnit unit, int32_t count) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_Delete(unit, count, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_Delete(unit, count, &delta)); return delta; } template int32_t impl_ITextRange::EndOf(Windows::UI::Text::TextRangeUnit unit, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_EndOf(unit, extend, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_EndOf(unit, extend, &delta)); return delta; } template int32_t impl_ITextRange::Expand(Windows::UI::Text::TextRangeUnit unit) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_Expand(unit, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_Expand(unit, &delta)); return delta; } -template int32_t impl_ITextRange::FindText(hstring_ref value, int32_t scanLength, Windows::UI::Text::FindOptions options) const +template int32_t impl_ITextRange::FindText(hstring_view value, int32_t scanLength, Windows::UI::Text::FindOptions options) const { int32_t length {}; - check_hresult(static_cast(static_cast(*this))->abi_FindText(get(value), scanLength, options, &length)); + check_hresult(WINRT_SHIM(ITextRange)->abi_FindText(get_abi(value), scanLength, options, &length)); return length; } template void impl_ITextRange::GetCharacterUtf32(uint32_t & value, int32_t offset) const { - check_hresult(static_cast(static_cast(*this))->abi_GetCharacterUtf32(&value, offset)); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetCharacterUtf32(&value, offset)); } template Windows::UI::Text::ITextRange impl_ITextRange::GetClone() const { Windows::UI::Text::ITextRange value; - check_hresult(static_cast(static_cast(*this))->abi_GetClone(put(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetClone(put_abi(value))); return value; } template int32_t impl_ITextRange::GetIndex(Windows::UI::Text::TextRangeUnit unit) const { int32_t index {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIndex(unit, &index)); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetIndex(unit, &index)); return index; } template void impl_ITextRange::GetPoint(Windows::UI::Text::HorizontalCharacterAlignment horizontalAlign, Windows::UI::Text::VerticalCharacterAlignment verticalAlign, Windows::UI::Text::PointOptions options, Windows::Foundation::Point & point) const { - check_hresult(static_cast(static_cast(*this))->abi_GetPoint(horizontalAlign, verticalAlign, options, put(point))); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetPoint(horizontalAlign, verticalAlign, options, put_abi(point))); } template void impl_ITextRange::GetRect(Windows::UI::Text::PointOptions options, Windows::Foundation::Rect & rect, int32_t & hit) const { - check_hresult(static_cast(static_cast(*this))->abi_GetRect(options, put(rect), &hit)); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetRect(options, put_abi(rect), &hit)); } template void impl_ITextRange::GetText(Windows::UI::Text::TextGetOptions options, hstring & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetText(options, put(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetText(options, put_abi(value))); } template void impl_ITextRange::GetTextViaStream(Windows::UI::Text::TextGetOptions options, const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->abi_GetTextViaStream(options, get(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_GetTextViaStream(options, get_abi(value))); } template bool impl_ITextRange::InRange(const Windows::UI::Text::ITextRange & range) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_InRange(get(range), &value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_InRange(get_abi(range), &value)); return value; } -template void impl_ITextRange::InsertImage(int32_t width, int32_t height, int32_t ascent, Windows::UI::Text::VerticalCharacterAlignment verticalAlign, hstring_ref alternateText, const Windows::Storage::Streams::IRandomAccessStream & value) const +template void impl_ITextRange::InsertImage(int32_t width, int32_t height, int32_t ascent, Windows::UI::Text::VerticalCharacterAlignment verticalAlign, hstring_view alternateText, const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertImage(width, height, ascent, verticalAlign, get(alternateText), get(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_InsertImage(width, height, ascent, verticalAlign, get_abi(alternateText), get_abi(value))); } template bool impl_ITextRange::InStory(const Windows::UI::Text::ITextRange & range) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_InStory(get(range), &value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_InStory(get_abi(range), &value)); return value; } template bool impl_ITextRange::IsEqual(const Windows::UI::Text::ITextRange & range) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(range), &value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_IsEqual(get_abi(range), &value)); return value; } template int32_t impl_ITextRange::Move(Windows::UI::Text::TextRangeUnit unit, int32_t count) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_Move(unit, count, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_Move(unit, count, &delta)); return delta; } template int32_t impl_ITextRange::MoveEnd(Windows::UI::Text::TextRangeUnit unit, int32_t count) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveEnd(unit, count, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_MoveEnd(unit, count, &delta)); return delta; } template int32_t impl_ITextRange::MoveStart(Windows::UI::Text::TextRangeUnit unit, int32_t count) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveStart(unit, count, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_MoveStart(unit, count, &delta)); return delta; } template void impl_ITextRange::Paste(int32_t format) const { - check_hresult(static_cast(static_cast(*this))->abi_Paste(format)); + check_hresult(WINRT_SHIM(ITextRange)->abi_Paste(format)); } template void impl_ITextRange::ScrollIntoView(Windows::UI::Text::PointOptions value) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoView(value)); + check_hresult(WINRT_SHIM(ITextRange)->abi_ScrollIntoView(value)); } template void impl_ITextRange::MatchSelection() const { - check_hresult(static_cast(static_cast(*this))->abi_MatchSelection()); + check_hresult(WINRT_SHIM(ITextRange)->abi_MatchSelection()); } template void impl_ITextRange::SetIndex(Windows::UI::Text::TextRangeUnit unit, int32_t index, bool extend) const { - check_hresult(static_cast(static_cast(*this))->abi_SetIndex(unit, index, extend)); + check_hresult(WINRT_SHIM(ITextRange)->abi_SetIndex(unit, index, extend)); } template void impl_ITextRange::SetPoint(const Windows::Foundation::Point & point, Windows::UI::Text::PointOptions options, bool extend) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPoint(get(point), options, extend)); + check_hresult(WINRT_SHIM(ITextRange)->abi_SetPoint(get_abi(point), options, extend)); } template void impl_ITextRange::SetRange(int32_t startPosition, int32_t endPosition) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRange(startPosition, endPosition)); + check_hresult(WINRT_SHIM(ITextRange)->abi_SetRange(startPosition, endPosition)); } -template void impl_ITextRange::SetText(Windows::UI::Text::TextSetOptions options, hstring_ref value) const +template void impl_ITextRange::SetText(Windows::UI::Text::TextSetOptions options, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetText(options, get(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_SetText(options, get_abi(value))); } template void impl_ITextRange::SetTextViaStream(Windows::UI::Text::TextSetOptions options, const Windows::Storage::Streams::IRandomAccessStream & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetTextViaStream(options, get(value))); + check_hresult(WINRT_SHIM(ITextRange)->abi_SetTextViaStream(options, get_abi(value))); } template int32_t impl_ITextRange::StartOf(Windows::UI::Text::TextRangeUnit unit, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_StartOf(unit, extend, &delta)); + check_hresult(WINRT_SHIM(ITextRange)->abi_StartOf(unit, extend, &delta)); return delta; } template Windows::UI::Text::SelectionOptions impl_ITextSelection::Options() const { Windows::UI::Text::SelectionOptions value {}; - check_hresult(static_cast(static_cast(*this))->get_Options(&value)); + check_hresult(WINRT_SHIM(ITextSelection)->get_Options(&value)); return value; } template void impl_ITextSelection::Options(Windows::UI::Text::SelectionOptions value) const { - check_hresult(static_cast(static_cast(*this))->put_Options(value)); + check_hresult(WINRT_SHIM(ITextSelection)->put_Options(value)); } template Windows::UI::Text::SelectionType impl_ITextSelection::Type() const { Windows::UI::Text::SelectionType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(ITextSelection)->get_Type(&value)); return value; } template int32_t impl_ITextSelection::EndKey(Windows::UI::Text::TextRangeUnit unit, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_EndKey(unit, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_EndKey(unit, extend, &delta)); return delta; } template int32_t impl_ITextSelection::HomeKey(Windows::UI::Text::TextRangeUnit unit, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_HomeKey(unit, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_HomeKey(unit, extend, &delta)); return delta; } template int32_t impl_ITextSelection::MoveDown(Windows::UI::Text::TextRangeUnit unit, int32_t count, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveDown(unit, count, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_MoveDown(unit, count, extend, &delta)); return delta; } template int32_t impl_ITextSelection::MoveLeft(Windows::UI::Text::TextRangeUnit unit, int32_t count, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveLeft(unit, count, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_MoveLeft(unit, count, extend, &delta)); return delta; } template int32_t impl_ITextSelection::MoveRight(Windows::UI::Text::TextRangeUnit unit, int32_t count, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveRight(unit, count, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_MoveRight(unit, count, extend, &delta)); return delta; } template int32_t impl_ITextSelection::MoveUp(Windows::UI::Text::TextRangeUnit unit, int32_t count, bool extend) const { int32_t delta {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveUp(unit, count, extend, &delta)); + check_hresult(WINRT_SHIM(ITextSelection)->abi_MoveUp(unit, count, extend, &delta)); return delta; } -template void impl_ITextSelection::TypeText(hstring_ref value) const +template void impl_ITextSelection::TypeText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_TypeText(get(value))); + check_hresult(WINRT_SHIM(ITextSelection)->abi_TypeText(get_abi(value))); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::AllCaps() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_AllCaps(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_AllCaps(&value)); return value; } template void impl_ITextCharacterFormat::AllCaps(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_AllCaps(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_AllCaps(value)); } template Windows::UI::Color impl_ITextCharacterFormat::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_BackgroundColor(put_abi(value))); return value; } template void impl_ITextCharacterFormat::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_BackgroundColor(get_abi(value))); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Bold() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bold(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Bold(&value)); return value; } template void impl_ITextCharacterFormat::Bold(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Bold(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Bold(value)); } template Windows::UI::Text::FontStretch impl_ITextCharacterFormat::FontStretch() const { Windows::UI::Text::FontStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStretch(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_FontStretch(&value)); return value; } template void impl_ITextCharacterFormat::FontStretch(Windows::UI::Text::FontStretch value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStretch(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_FontStretch(value)); } template Windows::UI::Text::FontStyle impl_ITextCharacterFormat::FontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_FontStyle(&value)); return value; } template void impl_ITextCharacterFormat::FontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStyle(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_FontStyle(value)); } template Windows::UI::Color impl_ITextCharacterFormat::ForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_ForegroundColor(put_abi(value))); return value; } template void impl_ITextCharacterFormat::ForegroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_ForegroundColor(get_abi(value))); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Hidden() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Hidden(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Hidden(&value)); return value; } template void impl_ITextCharacterFormat::Hidden(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Hidden(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Hidden(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Italic() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Italic(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Italic(&value)); return value; } template void impl_ITextCharacterFormat::Italic(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Italic(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Italic(value)); } template float impl_ITextCharacterFormat::Kerning() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Kerning(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Kerning(&value)); return value; } template void impl_ITextCharacterFormat::Kerning(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Kerning(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Kerning(value)); } template hstring impl_ITextCharacterFormat::LanguageTag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_LanguageTag(put(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_LanguageTag(put_abi(value))); return value; } -template void impl_ITextCharacterFormat::LanguageTag(hstring_ref value) const +template void impl_ITextCharacterFormat::LanguageTag(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_LanguageTag(get(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_LanguageTag(get_abi(value))); } template Windows::UI::Text::LinkType impl_ITextCharacterFormat::LinkType() const { Windows::UI::Text::LinkType value {}; - check_hresult(static_cast(static_cast(*this))->get_LinkType(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_LinkType(&value)); return value; } template hstring impl_ITextCharacterFormat::Name() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Name(put(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Name(put_abi(value))); return value; } -template void impl_ITextCharacterFormat::Name(hstring_ref value) const +template void impl_ITextCharacterFormat::Name(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Name(get(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Name(get_abi(value))); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Outline() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Outline(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Outline(&value)); return value; } template void impl_ITextCharacterFormat::Outline(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Outline(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Outline(value)); } template float impl_ITextCharacterFormat::Position() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Position(&value)); return value; } template void impl_ITextCharacterFormat::Position(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Position(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::ProtectedText() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_ProtectedText(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_ProtectedText(&value)); return value; } template void impl_ITextCharacterFormat::ProtectedText(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectedText(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_ProtectedText(value)); } template float impl_ITextCharacterFormat::Size() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Size(&value)); return value; } template void impl_ITextCharacterFormat::Size(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Size(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Size(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::SmallCaps() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_SmallCaps(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_SmallCaps(&value)); return value; } template void impl_ITextCharacterFormat::SmallCaps(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_SmallCaps(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_SmallCaps(value)); } template float impl_ITextCharacterFormat::Spacing() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_Spacing(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Spacing(&value)); return value; } template void impl_ITextCharacterFormat::Spacing(float value) const { - check_hresult(static_cast(static_cast(*this))->put_Spacing(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Spacing(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Strikethrough() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Strikethrough(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Strikethrough(&value)); return value; } template void impl_ITextCharacterFormat::Strikethrough(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Strikethrough(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Strikethrough(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Subscript() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Subscript(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Subscript(&value)); return value; } template void impl_ITextCharacterFormat::Subscript(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Subscript(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Subscript(value)); } template Windows::UI::Text::FormatEffect impl_ITextCharacterFormat::Superscript() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_Superscript(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Superscript(&value)); return value; } template void impl_ITextCharacterFormat::Superscript(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_Superscript(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Superscript(value)); } template Windows::UI::Text::TextScript impl_ITextCharacterFormat::TextScript() const { Windows::UI::Text::TextScript value {}; - check_hresult(static_cast(static_cast(*this))->get_TextScript(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_TextScript(&value)); return value; } template void impl_ITextCharacterFormat::TextScript(Windows::UI::Text::TextScript value) const { - check_hresult(static_cast(static_cast(*this))->put_TextScript(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_TextScript(value)); } template Windows::UI::Text::UnderlineType impl_ITextCharacterFormat::Underline() const { Windows::UI::Text::UnderlineType value {}; - check_hresult(static_cast(static_cast(*this))->get_Underline(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Underline(&value)); return value; } template void impl_ITextCharacterFormat::Underline(Windows::UI::Text::UnderlineType value) const { - check_hresult(static_cast(static_cast(*this))->put_Underline(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Underline(value)); } template int32_t impl_ITextCharacterFormat::Weight() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Weight(&value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->get_Weight(&value)); return value; } template void impl_ITextCharacterFormat::Weight(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Weight(value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->put_Weight(value)); } template void impl_ITextCharacterFormat::SetClone(const Windows::UI::Text::ITextCharacterFormat & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetClone(get(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->abi_SetClone(get_abi(value))); } template Windows::UI::Text::ITextCharacterFormat impl_ITextCharacterFormat::GetClone() const { Windows::UI::Text::ITextCharacterFormat value; - check_hresult(static_cast(static_cast(*this))->abi_GetClone(put(value))); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->abi_GetClone(put_abi(value))); return value; } template bool impl_ITextCharacterFormat::IsEqual(const Windows::UI::Text::ITextCharacterFormat & format) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(format), &value)); + check_hresult(WINRT_SHIM(ITextCharacterFormat)->abi_IsEqual(get_abi(format), &value)); return value; } template Windows::UI::Text::ParagraphAlignment impl_ITextParagraphFormat::Alignment() const { Windows::UI::Text::ParagraphAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_Alignment(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_Alignment(&value)); return value; } template void impl_ITextParagraphFormat::Alignment(Windows::UI::Text::ParagraphAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_Alignment(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_Alignment(value)); } template float impl_ITextParagraphFormat::FirstLineIndent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstLineIndent(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_FirstLineIndent(&value)); return value; } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::KeepTogether() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_KeepTogether(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_KeepTogether(&value)); return value; } template void impl_ITextParagraphFormat::KeepTogether(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_KeepTogether(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_KeepTogether(value)); } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::KeepWithNext() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_KeepWithNext(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_KeepWithNext(&value)); return value; } template void impl_ITextParagraphFormat::KeepWithNext(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_KeepWithNext(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_KeepWithNext(value)); } template float impl_ITextParagraphFormat::LeftIndent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LeftIndent(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_LeftIndent(&value)); return value; } template float impl_ITextParagraphFormat::LineSpacing() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LineSpacing(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_LineSpacing(&value)); return value; } template Windows::UI::Text::LineSpacingRule impl_ITextParagraphFormat::LineSpacingRule() const { Windows::UI::Text::LineSpacingRule value {}; - check_hresult(static_cast(static_cast(*this))->get_LineSpacingRule(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_LineSpacingRule(&value)); return value; } template Windows::UI::Text::MarkerAlignment impl_ITextParagraphFormat::ListAlignment() const { Windows::UI::Text::MarkerAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_ListAlignment(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListAlignment(&value)); return value; } template void impl_ITextParagraphFormat::ListAlignment(Windows::UI::Text::MarkerAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_ListAlignment(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListAlignment(value)); } template int32_t impl_ITextParagraphFormat::ListLevelIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ListLevelIndex(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListLevelIndex(&value)); return value; } template void impl_ITextParagraphFormat::ListLevelIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ListLevelIndex(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListLevelIndex(value)); } template int32_t impl_ITextParagraphFormat::ListStart() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ListStart(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListStart(&value)); return value; } template void impl_ITextParagraphFormat::ListStart(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ListStart(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListStart(value)); } template Windows::UI::Text::MarkerStyle impl_ITextParagraphFormat::ListStyle() const { Windows::UI::Text::MarkerStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_ListStyle(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListStyle(&value)); return value; } template void impl_ITextParagraphFormat::ListStyle(Windows::UI::Text::MarkerStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_ListStyle(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListStyle(value)); } template float impl_ITextParagraphFormat::ListTab() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ListTab(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListTab(&value)); return value; } template void impl_ITextParagraphFormat::ListTab(float value) const { - check_hresult(static_cast(static_cast(*this))->put_ListTab(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListTab(value)); } template Windows::UI::Text::MarkerType impl_ITextParagraphFormat::ListType() const { Windows::UI::Text::MarkerType value {}; - check_hresult(static_cast(static_cast(*this))->get_ListType(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_ListType(&value)); return value; } template void impl_ITextParagraphFormat::ListType(Windows::UI::Text::MarkerType value) const { - check_hresult(static_cast(static_cast(*this))->put_ListType(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_ListType(value)); } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::NoLineNumber() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_NoLineNumber(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_NoLineNumber(&value)); return value; } template void impl_ITextParagraphFormat::NoLineNumber(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_NoLineNumber(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_NoLineNumber(value)); } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::PageBreakBefore() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_PageBreakBefore(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_PageBreakBefore(&value)); return value; } template void impl_ITextParagraphFormat::PageBreakBefore(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_PageBreakBefore(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_PageBreakBefore(value)); } template float impl_ITextParagraphFormat::RightIndent() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RightIndent(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_RightIndent(&value)); return value; } template void impl_ITextParagraphFormat::RightIndent(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RightIndent(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_RightIndent(value)); } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::RightToLeft() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_RightToLeft(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_RightToLeft(&value)); return value; } template void impl_ITextParagraphFormat::RightToLeft(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_RightToLeft(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_RightToLeft(value)); } template Windows::UI::Text::ParagraphStyle impl_ITextParagraphFormat::Style() const { Windows::UI::Text::ParagraphStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_Style(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_Style(&value)); return value; } template void impl_ITextParagraphFormat::Style(Windows::UI::Text::ParagraphStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_Style(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_Style(value)); } template float impl_ITextParagraphFormat::SpaceAfter() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_SpaceAfter(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_SpaceAfter(&value)); return value; } template void impl_ITextParagraphFormat::SpaceAfter(float value) const { - check_hresult(static_cast(static_cast(*this))->put_SpaceAfter(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_SpaceAfter(value)); } template float impl_ITextParagraphFormat::SpaceBefore() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_SpaceBefore(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_SpaceBefore(&value)); return value; } template void impl_ITextParagraphFormat::SpaceBefore(float value) const { - check_hresult(static_cast(static_cast(*this))->put_SpaceBefore(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_SpaceBefore(value)); } template Windows::UI::Text::FormatEffect impl_ITextParagraphFormat::WidowControl() const { Windows::UI::Text::FormatEffect value {}; - check_hresult(static_cast(static_cast(*this))->get_WidowControl(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_WidowControl(&value)); return value; } template void impl_ITextParagraphFormat::WidowControl(Windows::UI::Text::FormatEffect value) const { - check_hresult(static_cast(static_cast(*this))->put_WidowControl(value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->put_WidowControl(value)); } template int32_t impl_ITextParagraphFormat::TabCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TabCount(&value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->get_TabCount(&value)); return value; } template void impl_ITextParagraphFormat::AddTab(float position, Windows::UI::Text::TabAlignment align, Windows::UI::Text::TabLeader leader) const { - check_hresult(static_cast(static_cast(*this))->abi_AddTab(position, align, leader)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_AddTab(position, align, leader)); } template void impl_ITextParagraphFormat::ClearAllTabs() const { - check_hresult(static_cast(static_cast(*this))->abi_ClearAllTabs()); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_ClearAllTabs()); } template void impl_ITextParagraphFormat::DeleteTab(float position) const { - check_hresult(static_cast(static_cast(*this))->abi_DeleteTab(position)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_DeleteTab(position)); } template Windows::UI::Text::ITextParagraphFormat impl_ITextParagraphFormat::GetClone() const { Windows::UI::Text::ITextParagraphFormat value; - check_hresult(static_cast(static_cast(*this))->abi_GetClone(put(value))); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_GetClone(put_abi(value))); return value; } template void impl_ITextParagraphFormat::GetTab(int32_t index, float & position, Windows::UI::Text::TabAlignment & align, Windows::UI::Text::TabLeader & leader) const { - check_hresult(static_cast(static_cast(*this))->abi_GetTab(index, &position, &align, &leader)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_GetTab(index, &position, &align, &leader)); } template bool impl_ITextParagraphFormat::IsEqual(const Windows::UI::Text::ITextParagraphFormat & format) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEqual(get(format), &value)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_IsEqual(get_abi(format), &value)); return value; } template void impl_ITextParagraphFormat::SetClone(const Windows::UI::Text::ITextParagraphFormat & format) const { - check_hresult(static_cast(static_cast(*this))->abi_SetClone(get(format))); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_SetClone(get_abi(format))); } template void impl_ITextParagraphFormat::SetIndents(float start, float left, float right) const { - check_hresult(static_cast(static_cast(*this))->abi_SetIndents(start, left, right)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_SetIndents(start, left, right)); } template void impl_ITextParagraphFormat::SetLineSpacing(Windows::UI::Text::LineSpacingRule rule, float spacing) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLineSpacing(rule, spacing)); + check_hresult(WINRT_SHIM(ITextParagraphFormat)->abi_SetLineSpacing(rule, spacing)); } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Black() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Black(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Black(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Bold() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Bold(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Bold(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::ExtraBlack() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtraBlack(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_ExtraBlack(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::ExtraBold() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtraBold(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_ExtraBold(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::ExtraLight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtraLight(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_ExtraLight(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Light() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Light(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Light(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Medium() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Medium(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Medium(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Normal() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Normal(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Normal(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::SemiBold() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_SemiBold(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_SemiBold(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::SemiLight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_SemiLight(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_SemiLight(put_abi(value))); return value; } template Windows::UI::Text::FontWeight impl_IFontWeightsStatics::Thin() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_Thin(put(value))); + check_hresult(WINRT_SHIM(IFontWeightsStatics)->get_Thin(put_abi(value))); return value; } @@ -4104,3 +4313,86 @@ inline Windows::UI::Text::FontStyle TextConstants::UndefinedFontStyle() } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::IFontWeights & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::IFontWeightsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextCharacterFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextConstantsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextDocument & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextParagraphFormat & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextRange & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::ITextSelection & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Text::FontWeights & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.ViewManagement.h b/10.0.14393.0/winrt/Windows.UI.ViewManagement.h index 3479a95bb..ee072c6b6 100644 --- a/10.0.14393.0/winrt/Windows.UI.ViewManagement.h +++ b/10.0.14393.0/winrt/Windows.UI.ViewManagement.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Core.3.h" #include "internal/Windows.Devices.Enumeration.3.h" @@ -22,7 +25,8 @@ struct produce : produce { try { - *value = detach(this->shim().HighContrast()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighContrast()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce : produce } } - HRESULT __stdcall get_HighContrastScheme(abi_arg_out value) noexcept override + HRESULT __stdcall get_HighContrastScheme(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HighContrastScheme()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HighContrastScheme()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce : produce } } - HRESULT __stdcall add_HighContrastChanged(abi_arg_in> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_HighContrastChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().HighContrastChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().HighContrastChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -62,6 +68,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().HighContrastChanged(cookie); return S_OK; } @@ -75,11 +82,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_ShowAsStandaloneAsync(int32_t viewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ShowAsStandaloneAsync(int32_t viewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ShowAsStandaloneAsync(viewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAsStandaloneAsync(viewId)); return S_OK; } catch (...) @@ -89,11 +97,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ShowAsStandaloneWithSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_ShowAsStandaloneWithSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().ShowAsStandaloneAsync(viewId, sizePreference)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().ShowAsStandaloneAsync(viewId, sizePreference)); return S_OK; } catch (...) @@ -107,7 +116,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsViewPresentedOnActivationVirtualDesktop(viewId)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsViewPresentedOnActivationVirtualDesktop(viewId)); return S_OK; } catch (...) @@ -124,7 +134,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -137,7 +148,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().AdjacentToLeftDisplayEdge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdjacentToLeftDisplayEdge()); return S_OK; } catch (...) @@ -150,7 +162,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().AdjacentToRightDisplayEdge()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdjacentToRightDisplayEdge()); return S_OK; } catch (...) @@ -163,7 +176,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsFullScreen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullScreen()); return S_OK; } catch (...) @@ -176,7 +190,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsOnLockScreen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnLockScreen()); return S_OK; } catch (...) @@ -189,7 +204,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsScreenCaptureEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsScreenCaptureEnabled()); return S_OK; } catch (...) @@ -202,6 +218,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsScreenCaptureEnabled(value); return S_OK; } @@ -211,10 +228,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Title(abi_arg_in value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -224,11 +242,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -242,7 +261,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -251,11 +271,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_Consolidated(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Consolidated(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Consolidated(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Consolidated(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -268,6 +289,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Consolidated(token); return S_OK; } @@ -285,7 +307,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SuppressSystemOverlays()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SuppressSystemOverlays()); return S_OK; } catch (...) @@ -298,6 +321,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().SuppressSystemOverlays(value); return S_OK; } @@ -307,11 +331,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_VisibleBounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_VisibleBounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VisibleBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisibleBounds()); return S_OK; } catch (...) @@ -320,11 +345,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_VisibleBoundsChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_VisibleBoundsChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().VisibleBoundsChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VisibleBoundsChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -337,6 +363,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().VisibleBoundsChanged(token); return S_OK; } @@ -350,7 +377,8 @@ struct produce : produce_base { try { - *success = detach(this->shim().SetDesiredBoundsMode(boundsMode)); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().SetDesiredBoundsMode(boundsMode)); return S_OK; } catch (...) @@ -363,7 +391,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().DesiredBoundsMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredBoundsMode()); return S_OK; } catch (...) @@ -376,11 +405,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_TitleBar(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleBar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleBar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleBar()); return S_OK; } catch (...) @@ -394,7 +424,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().FullScreenSystemOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullScreenSystemOverlayMode()); return S_OK; } catch (...) @@ -407,6 +438,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().FullScreenSystemOverlayMode(value); return S_OK; } @@ -420,7 +452,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().IsFullScreenMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullScreenMode()); return S_OK; } catch (...) @@ -433,7 +466,8 @@ struct produce : produce_base { try { - *success = detach(this->shim().TryEnterFullScreenMode()); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryEnterFullScreenMode()); return S_OK; } catch (...) @@ -446,6 +480,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ExitFullScreenMode(); return S_OK; } @@ -459,6 +494,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowStandardSystemOverlays(); return S_OK; } @@ -468,11 +504,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TryResizeView(abi_arg_in value, bool * success) noexcept override + HRESULT __stdcall abi_TryResizeView(impl::abi_arg_in value, bool * success) noexcept override { try { - *success = detach(this->shim().TryResizeView(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryResizeView(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -481,10 +518,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_SetPreferredMinSize(abi_arg_in minSize) noexcept override + HRESULT __stdcall abi_SetPreferredMinSize(impl::abi_arg_in minSize) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPreferredMinSize(*reinterpret_cast(&minSize)); return S_OK; } @@ -502,7 +540,8 @@ struct produceshim().IsUserInitiated()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsUserInitiated()); return S_OK; } catch (...) @@ -519,7 +558,8 @@ struct produceshim().TryUnsnapToFullscreen()); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryUnsnapToFullscreen()); return S_OK; } catch (...) @@ -532,11 +572,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetApplicationViewIdForWindow(abi_arg_in window, int32_t * id) noexcept override + HRESULT __stdcall abi_GetApplicationViewIdForWindow(impl::abi_arg_in window, int32_t * id) noexcept override { try { - *id = detach(this->shim().GetApplicationViewIdForWindow(*reinterpret_cast(&window))); + typename D::abi_guard guard(this->shim()); + *id = detach_abi(this->shim().GetApplicationViewIdForWindow(*reinterpret_cast(&window))); return S_OK; } catch (...) @@ -557,7 +598,8 @@ struct produce : { try { - *value = detach(this->shim().DisableLayoutScaling()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisableLayoutScaling()); return S_OK; } catch (...) @@ -570,7 +612,8 @@ struct produce : { try { - *success = detach(this->shim().TrySetDisableLayoutScaling(disableLayoutScaling)); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TrySetDisableLayoutScaling(disableLayoutScaling)); return S_OK; } catch (...) @@ -587,7 +630,8 @@ struct produce : produc { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -600,7 +644,8 @@ struct produce : produc { try { - *success = detach(this->shim().TryUnsnap()); + typename D::abi_guard guard(this->shim()); + *success = detach_abi(this->shim().TryUnsnap()); return S_OK; } catch (...) @@ -613,11 +658,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -631,7 +677,8 @@ struct produce : produ { try { - *value = detach(this->shim().TerminateAppOnFinalViewClose()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TerminateAppOnFinalViewClose()); return S_OK; } catch (...) @@ -644,6 +691,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().TerminateAppOnFinalViewClose(value); return S_OK; } @@ -661,7 +709,8 @@ struct produce : produ { try { - *value = detach(this->shim().PreferredLaunchWindowingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredLaunchWindowingMode()); return S_OK; } catch (...) @@ -674,6 +723,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredLaunchWindowingMode(value); return S_OK; } @@ -683,11 +733,12 @@ struct produce : produ } } - HRESULT __stdcall get_PreferredLaunchViewSize(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreferredLaunchViewSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreferredLaunchViewSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreferredLaunchViewSize()); return S_OK; } catch (...) @@ -696,10 +747,11 @@ struct produce : produ } } - HRESULT __stdcall put_PreferredLaunchViewSize(abi_arg_in value) noexcept override + HRESULT __stdcall put_PreferredLaunchViewSize(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PreferredLaunchViewSize(*reinterpret_cast(&value)); return S_OK; } @@ -717,6 +769,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableShowingMainViewOnActivation(); return S_OK; } @@ -726,11 +779,12 @@ struct produce } } - HRESULT __stdcall abi_TryShowAsStandaloneAsync(int32_t viewId, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryShowAsStandaloneAsync(int32_t viewId, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryShowAsStandaloneAsync(viewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryShowAsStandaloneAsync(viewId)); return S_OK; } catch (...) @@ -740,11 +794,12 @@ struct produce } } - HRESULT __stdcall abi_TryShowAsStandaloneWithSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryShowAsStandaloneWithSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryShowAsStandaloneAsync(viewId, sizePreference)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryShowAsStandaloneAsync(viewId, sizePreference)); return S_OK; } catch (...) @@ -754,11 +809,12 @@ struct produce } } - HRESULT __stdcall abi_TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, int32_t anchorViewId, Windows::UI::ViewManagement::ViewSizePreference anchorSizePreference, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, int32_t anchorViewId, Windows::UI::ViewManagement::ViewSizePreference anchorSizePreference, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().TryShowAsStandaloneAsync(viewId, sizePreference, anchorViewId, anchorSizePreference)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().TryShowAsStandaloneAsync(viewId, sizePreference, anchorViewId, anchorSizePreference)); return S_OK; } catch (...) @@ -768,11 +824,12 @@ struct produce } } - HRESULT __stdcall abi_SwitchAsync(int32_t viewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SwitchAsync(int32_t viewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SwitchAsync(viewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SwitchAsync(viewId)); return S_OK; } catch (...) @@ -782,11 +839,12 @@ struct produce } } - HRESULT __stdcall abi_SwitchFromViewAsync(int32_t toViewId, int32_t fromViewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SwitchFromViewAsync(int32_t toViewId, int32_t fromViewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SwitchAsync(toViewId, fromViewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SwitchAsync(toViewId, fromViewId)); return S_OK; } catch (...) @@ -796,11 +854,12 @@ struct produce } } - HRESULT __stdcall abi_SwitchFromViewWithOptionsAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SwitchFromViewWithOptionsAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SwitchAsync(toViewId, fromViewId, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SwitchAsync(toViewId, fromViewId, options)); return S_OK; } catch (...) @@ -810,11 +869,12 @@ struct produce } } - HRESULT __stdcall abi_PrepareForCustomAnimatedSwitchAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_PrepareForCustomAnimatedSwitchAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().PrepareForCustomAnimatedSwitchAsync(toViewId, fromViewId, options)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().PrepareForCustomAnimatedSwitchAsync(toViewId, fromViewId, options)); return S_OK; } catch (...) @@ -832,6 +892,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().DisableSystemViewActivationPolicy(); return S_OK; } @@ -845,10 +906,11 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall put_ForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -858,11 +920,12 @@ struct produce : produ } } - HRESULT __stdcall get_ForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -872,10 +935,11 @@ struct produce : produ } } - HRESULT __stdcall put_BackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -885,11 +949,12 @@ struct produce : produ } } - HRESULT __stdcall get_BackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -899,10 +964,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -912,11 +978,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonForegroundColor()); return S_OK; } catch (...) @@ -926,10 +993,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonBackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonBackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonBackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -939,11 +1007,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonBackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonBackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonBackgroundColor()); return S_OK; } catch (...) @@ -953,10 +1022,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonHoverForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonHoverForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonHoverForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -966,11 +1036,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonHoverForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonHoverForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonHoverForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonHoverForegroundColor()); return S_OK; } catch (...) @@ -980,10 +1051,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonHoverBackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonHoverBackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonHoverBackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -993,11 +1065,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonHoverBackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonHoverBackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonHoverBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonHoverBackgroundColor()); return S_OK; } catch (...) @@ -1007,10 +1080,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonPressedForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonPressedForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonPressedForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1020,11 +1094,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonPressedForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonPressedForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonPressedForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonPressedForegroundColor()); return S_OK; } catch (...) @@ -1034,10 +1109,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonPressedBackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonPressedBackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonPressedBackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1047,11 +1123,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonPressedBackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonPressedBackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonPressedBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonPressedBackgroundColor()); return S_OK; } catch (...) @@ -1061,10 +1138,11 @@ struct produce : produ } } - HRESULT __stdcall put_InactiveForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_InactiveForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InactiveForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1074,11 +1152,12 @@ struct produce : produ } } - HRESULT __stdcall get_InactiveForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InactiveForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InactiveForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InactiveForegroundColor()); return S_OK; } catch (...) @@ -1088,10 +1167,11 @@ struct produce : produ } } - HRESULT __stdcall put_InactiveBackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_InactiveBackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InactiveBackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1101,11 +1181,12 @@ struct produce : produ } } - HRESULT __stdcall get_InactiveBackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_InactiveBackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().InactiveBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InactiveBackgroundColor()); return S_OK; } catch (...) @@ -1115,10 +1196,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonInactiveForegroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonInactiveForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonInactiveForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1128,11 +1210,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonInactiveForegroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonInactiveForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonInactiveForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonInactiveForegroundColor()); return S_OK; } catch (...) @@ -1142,10 +1225,11 @@ struct produce : produ } } - HRESULT __stdcall put_ButtonInactiveBackgroundColor(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ButtonInactiveBackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ButtonInactiveBackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1155,11 +1239,12 @@ struct produce : produ } } - HRESULT __stdcall get_ButtonInactiveBackgroundColor(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ButtonInactiveBackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ButtonInactiveBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ButtonInactiveBackgroundColor()); return S_OK; } catch (...) @@ -1177,7 +1262,8 @@ struct produce { try { - *value = detach(this->shim().ViewId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewId()); return S_OK; } catch (...) @@ -1190,6 +1276,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ViewId(value); return S_OK; } @@ -1203,11 +1290,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DataPackageFormatId(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataPackageFormatId(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataPackageFormatId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataPackageFormatId()); return S_OK; } catch (...) @@ -1221,11 +1309,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_Showing(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_Showing(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Showing(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Showing(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1238,6 +1327,7 @@ struct produce : produce_baseshim()); this->shim().Showing(token); return S_OK; } @@ -1247,11 +1337,12 @@ struct produce : produce_base> handler, event_token * token) noexcept override + HRESULT __stdcall add_Hiding(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Hiding(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Hiding(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1264,6 +1355,7 @@ struct produce : produce_baseshim()); this->shim().Hiding(token); return S_OK; } @@ -1273,11 +1365,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OccludedRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OccludedRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OccludedRect()); return S_OK; } catch (...) @@ -1294,7 +1387,8 @@ struct produce : produce_baseshim().TryShow()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryShow()); return S_OK; } catch (...) @@ -1307,7 +1401,8 @@ struct produce : produce_baseshim().TryHide()); + typename D::abi_guard guard(this->shim()); + *result = detach_abi(this->shim().TryHide()); return S_OK; } catch (...) @@ -1324,7 +1419,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -1337,6 +1433,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Visible(value); return S_OK; } @@ -1350,11 +1447,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out inputPane) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out inputPane) noexcept override { try { - *inputPane = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *inputPane = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1368,11 +1466,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_OccludedRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_OccludedRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OccludedRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OccludedRect()); return S_OK; } catch (...) @@ -1385,6 +1484,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().EnsuredFocusedElementInView(value); return S_OK; } @@ -1398,7 +1498,8 @@ struct produce : { try { - *value = detach(this->shim().EnsuredFocusedElementInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnsuredFocusedElementInView()); return S_OK; } catch (...) @@ -1411,11 +1512,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_StartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StartProjectingAsync(projectionViewId, anchorViewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartProjectingAsync(projectionViewId, anchorViewId)); return S_OK; } catch (...) @@ -1425,11 +1527,12 @@ struct produce : prod } } - HRESULT __stdcall abi_SwapDisplaysForViewsAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_SwapDisplaysForViewsAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().SwapDisplaysForViewsAsync(projectionViewId, anchorViewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().SwapDisplaysForViewsAsync(projectionViewId, anchorViewId)); return S_OK; } catch (...) @@ -1439,11 +1542,12 @@ struct produce : prod } } - HRESULT __stdcall abi_StopProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StopProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StopProjectingAsync(projectionViewId, anchorViewId)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StopProjectingAsync(projectionViewId, anchorViewId)); return S_OK; } catch (...) @@ -1457,7 +1561,8 @@ struct produce : prod { try { - *value = detach(this->shim().ProjectionDisplayAvailable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProjectionDisplayAvailable()); return S_OK; } catch (...) @@ -1466,11 +1571,12 @@ struct produce : prod } } - HRESULT __stdcall add_ProjectionDisplayAvailableChanged(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ProjectionDisplayAvailableChanged(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ProjectionDisplayAvailableChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ProjectionDisplayAvailableChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -1483,6 +1589,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ProjectionDisplayAvailableChanged(token); return S_OK; } @@ -1496,11 +1603,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_StartProjectingWithDeviceInfoAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_in displayDeviceInfo, abi_arg_out operation) noexcept override + HRESULT __stdcall abi_StartProjectingWithDeviceInfoAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_in displayDeviceInfo, impl::abi_arg_out operation) noexcept override { try { - *operation = detach(this->shim().StartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&displayDeviceInfo))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().StartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&displayDeviceInfo))); return S_OK; } catch (...) @@ -1510,11 +1618,12 @@ struct produce : pro } } - HRESULT __stdcall abi_RequestStartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_in selection, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_in selection, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&selection))); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&selection))); return S_OK; } catch (...) @@ -1524,11 +1633,12 @@ struct produce : pro } } - HRESULT __stdcall abi_RequestStartProjectingWithPlacementAsync(int32_t projectionViewId, int32_t anchorViewId, abi_arg_in selection, Windows::UI::Popups::Placement prefferedPlacement, abi_arg_out> operation) noexcept override + HRESULT __stdcall abi_RequestStartProjectingWithPlacementAsync(int32_t projectionViewId, int32_t anchorViewId, impl::abi_arg_in selection, Windows::UI::Popups::Placement prefferedPlacement, impl::abi_arg_out> operation) noexcept override { try { - *operation = detach(this->shim().RequestStartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&selection), prefferedPlacement)); + typename D::abi_guard guard(this->shim()); + *operation = detach_abi(this->shim().RequestStartProjectingAsync(projectionViewId, anchorViewId, *reinterpret_cast(&selection), prefferedPlacement)); return S_OK; } catch (...) @@ -1538,11 +1648,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetDeviceSelector(abi_arg_out selector) noexcept override + HRESULT __stdcall abi_GetDeviceSelector(impl::abi_arg_out selector) noexcept override { try { - *selector = detach(this->shim().GetDeviceSelector()); + typename D::abi_guard guard(this->shim()); + *selector = detach_abi(this->shim().GetDeviceSelector()); return S_OK; } catch (...) @@ -1556,11 +1667,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_ShowAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -1570,11 +1682,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_HideAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().HideAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().HideAsync()); return S_OK; } catch (...) @@ -1588,7 +1701,8 @@ struct produce : produce_baseshim().BackgroundOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundOpacity()); return S_OK; } catch (...) @@ -1601,6 +1715,7 @@ struct produce : produce_baseshim()); this->shim().BackgroundOpacity(value); return S_OK; } @@ -1610,11 +1725,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -1624,10 +1740,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1637,11 +1754,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -1651,10 +1769,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast *>(&value)); return S_OK; } @@ -1664,11 +1783,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ProgressIndicator(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProgressIndicator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProgressIndicator()); return S_OK; } catch (...) @@ -1678,11 +1798,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OccludedRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OccludedRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OccludedRect()); return S_OK; } catch (...) @@ -1691,11 +1812,12 @@ struct produce : produce_base> eventHandler, event_token * token) noexcept override + HRESULT __stdcall add_Showing(impl::abi_arg_in> eventHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().Showing(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Showing(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1708,6 +1830,7 @@ struct produce : produce_baseshim()); this->shim().Showing(token); return S_OK; } @@ -1717,11 +1840,12 @@ struct produce : produce_base> eventHandler, event_token * token) noexcept override + HRESULT __stdcall add_Hiding(impl::abi_arg_in> eventHandler, event_token * token) noexcept override { try { - *token = detach(this->shim().Hiding(*reinterpret_cast *>(&eventHandler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Hiding(*reinterpret_cast *>(&eventHandler))); return S_OK; } catch (...) @@ -1734,6 +1858,7 @@ struct produce : produce_baseshim()); this->shim().Hiding(token); return S_OK; } @@ -1747,11 +1872,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ShowAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -1761,11 +1887,12 @@ struct produce : pr } } - HRESULT __stdcall abi_HideAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_HideAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().HideAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().HideAsync()); return S_OK; } catch (...) @@ -1775,11 +1902,12 @@ struct produce : pr } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1789,10 +1917,11 @@ struct produce : pr } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -1802,11 +1931,12 @@ struct produce : pr } } - HRESULT __stdcall get_ProgressValue(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ProgressValue(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ProgressValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProgressValue()); return S_OK; } catch (...) @@ -1816,10 +1946,11 @@ struct produce : pr } } - HRESULT __stdcall put_ProgressValue(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ProgressValue(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProgressValue(*reinterpret_cast *>(&value)); return S_OK; } @@ -1833,11 +1964,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -1855,7 +1987,8 @@ struct produce : produce_baseshim().HandPreference()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HandPreference()); return S_OK; } catch (...) @@ -1864,11 +1997,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CursorSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CursorSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CursorSize()); return S_OK; } catch (...) @@ -1877,11 +2011,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ScrollBarSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollBarSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollBarSize()); return S_OK; } catch (...) @@ -1890,11 +2025,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ScrollBarArrowSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollBarArrowSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollBarArrowSize()); return S_OK; } catch (...) @@ -1903,11 +2039,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ScrollBarThumbBoxSize(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollBarThumbBoxSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollBarThumbBoxSize()); return S_OK; } catch (...) @@ -1920,7 +2057,8 @@ struct produce : produce_baseshim().MessageDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MessageDuration()); return S_OK; } catch (...) @@ -1933,7 +2071,8 @@ struct produce : produce_baseshim().AnimationsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnimationsEnabled()); return S_OK; } catch (...) @@ -1946,7 +2085,8 @@ struct produce : produce_baseshim().CaretBrowsingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaretBrowsingEnabled()); return S_OK; } catch (...) @@ -1959,7 +2099,8 @@ struct produce : produce_baseshim().CaretBlinkRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaretBlinkRate()); return S_OK; } catch (...) @@ -1972,7 +2113,8 @@ struct produce : produce_baseshim().CaretWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CaretWidth()); return S_OK; } catch (...) @@ -1985,7 +2127,8 @@ struct produce : produce_baseshim().DoubleClickTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DoubleClickTime()); return S_OK; } catch (...) @@ -1998,7 +2141,8 @@ struct produce : produce_baseshim().MouseHoverTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MouseHoverTime()); return S_OK; } catch (...) @@ -2007,11 +2151,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall abi_UIElementColor(Windows::UI::ViewManagement::UIElementType desiredElement, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UIElementColor(desiredElement)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UIElementColor(desiredElement)); return S_OK; } catch (...) @@ -2028,7 +2173,8 @@ struct produce : produce_baseshim().TextScaleFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextScaleFactor()); return S_OK; } catch (...) @@ -2037,11 +2183,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_TextScaleFactorChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().TextScaleFactorChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().TextScaleFactorChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2054,6 +2201,7 @@ struct produce : produce_baseshim()); this->shim().TextScaleFactorChanged(cookie); return S_OK; } @@ -2067,11 +2215,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetColorValue(Windows::UI::ViewManagement::UIColorType desiredColor, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetColorValue(Windows::UI::ViewManagement::UIColorType desiredColor, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetColorValue(desiredColor)); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetColorValue(desiredColor)); return S_OK; } catch (...) @@ -2080,11 +2229,12 @@ struct produce : produce_base> handler, event_token * cookie) noexcept override + HRESULT __stdcall add_ColorValuesChanged(impl::abi_arg_in> handler, event_token * cookie) noexcept override { try { - *cookie = detach(this->shim().ColorValuesChanged(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *cookie = detach_abi(this->shim().ColorValuesChanged(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -2097,6 +2247,7 @@ struct produce : produce_baseshim()); this->shim().ColorValuesChanged(cookie); return S_OK; } @@ -2114,7 +2265,8 @@ struct produce : produce_baseshim().UserInteractionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UserInteractionMode()); return S_OK; } catch (...) @@ -2127,11 +2279,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out current) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out current) noexcept override { try { - *current = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *current = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -2148,197 +2301,197 @@ namespace Windows::UI::ViewManagement { template void impl_IApplicationViewSwitcherStatics::DisableShowingMainViewOnActivation() const { - check_hresult(static_cast(static_cast(*this))->abi_DisableShowingMainViewOnActivation()); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_DisableShowingMainViewOnActivation()); } template Windows::Foundation::IAsyncOperation impl_IApplicationViewSwitcherStatics::TryShowAsStandaloneAsync(int32_t viewId) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryShowAsStandaloneAsync(viewId, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_TryShowAsStandaloneAsync(viewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IApplicationViewSwitcherStatics::TryShowAsStandaloneAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryShowAsStandaloneWithSizePreferenceAsync(viewId, sizePreference, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_TryShowAsStandaloneWithSizePreferenceAsync(viewId, sizePreference, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IApplicationViewSwitcherStatics::TryShowAsStandaloneAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference, int32_t anchorViewId, Windows::UI::ViewManagement::ViewSizePreference anchorSizePreference) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(viewId, sizePreference, anchorViewId, anchorSizePreference, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(viewId, sizePreference, anchorViewId, anchorSizePreference, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IApplicationViewSwitcherStatics::SwitchAsync(int32_t viewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SwitchAsync(viewId, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_SwitchAsync(viewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IApplicationViewSwitcherStatics::SwitchAsync(int32_t toViewId, int32_t fromViewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SwitchFromViewAsync(toViewId, fromViewId, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_SwitchFromViewAsync(toViewId, fromViewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IApplicationViewSwitcherStatics::SwitchAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SwitchFromViewWithOptionsAsync(toViewId, fromViewId, options, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_SwitchFromViewWithOptionsAsync(toViewId, fromViewId, options, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IApplicationViewSwitcherStatics::PrepareForCustomAnimatedSwitchAsync(int32_t toViewId, int32_t fromViewId, Windows::UI::ViewManagement::ApplicationViewSwitchingOptions options) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_PrepareForCustomAnimatedSwitchAsync(toViewId, fromViewId, options, put(operation))); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics)->abi_PrepareForCustomAnimatedSwitchAsync(toViewId, fromViewId, options, put_abi(operation))); return operation; } template void impl_IApplicationViewSwitcherStatics2::DisableSystemViewActivationPolicy() const { - check_hresult(static_cast(static_cast(*this))->abi_DisableSystemViewActivationPolicy()); + check_hresult(WINRT_SHIM(IApplicationViewSwitcherStatics2)->abi_DisableSystemViewActivationPolicy()); } template int32_t impl_IApplicationViewInteropStatics::GetApplicationViewIdForWindow(const Windows::UI::Core::ICoreWindow & window) const { int32_t id {}; - check_hresult(static_cast(static_cast(*this))->abi_GetApplicationViewIdForWindow(get(window), &id)); + check_hresult(WINRT_SHIM(IApplicationViewInteropStatics)->abi_GetApplicationViewIdForWindow(get_abi(window), &id)); return id; } template Windows::UI::ViewManagement::ApplicationViewState impl_IApplicationViewStatics::Value() const { Windows::UI::ViewManagement::ApplicationViewState value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IApplicationViewStatics)->get_Value(&value)); return value; } template bool impl_IApplicationViewStatics::TryUnsnap() const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUnsnap(&success)); + check_hresult(WINRT_SHIM(IApplicationViewStatics)->abi_TryUnsnap(&success)); return success; } template Windows::UI::ViewManagement::ApplicationView impl_IApplicationViewStatics2::GetForCurrentView() const { Windows::UI::ViewManagement::ApplicationView current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(IApplicationViewStatics2)->abi_GetForCurrentView(put_abi(current))); return current; } template bool impl_IApplicationViewStatics2::TerminateAppOnFinalViewClose() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TerminateAppOnFinalViewClose(&value)); + check_hresult(WINRT_SHIM(IApplicationViewStatics2)->get_TerminateAppOnFinalViewClose(&value)); return value; } template void impl_IApplicationViewStatics2::TerminateAppOnFinalViewClose(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_TerminateAppOnFinalViewClose(value)); + check_hresult(WINRT_SHIM(IApplicationViewStatics2)->put_TerminateAppOnFinalViewClose(value)); } template Windows::UI::ViewManagement::ApplicationViewWindowingMode impl_IApplicationViewStatics3::PreferredLaunchWindowingMode() const { Windows::UI::ViewManagement::ApplicationViewWindowingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferredLaunchWindowingMode(&value)); + check_hresult(WINRT_SHIM(IApplicationViewStatics3)->get_PreferredLaunchWindowingMode(&value)); return value; } template void impl_IApplicationViewStatics3::PreferredLaunchWindowingMode(Windows::UI::ViewManagement::ApplicationViewWindowingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredLaunchWindowingMode(value)); + check_hresult(WINRT_SHIM(IApplicationViewStatics3)->put_PreferredLaunchWindowingMode(value)); } template Windows::Foundation::Size impl_IApplicationViewStatics3::PreferredLaunchViewSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_PreferredLaunchViewSize(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewStatics3)->get_PreferredLaunchViewSize(put_abi(value))); return value; } template void impl_IApplicationViewStatics3::PreferredLaunchViewSize(const Windows::Foundation::Size & value) const { - check_hresult(static_cast(static_cast(*this))->put_PreferredLaunchViewSize(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewStatics3)->put_PreferredLaunchViewSize(get_abi(value))); } template Windows::UI::ViewManagement::ApplicationViewOrientation impl_IApplicationView::Orientation() const { Windows::UI::ViewManagement::ApplicationViewOrientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_Orientation(&value)); return value; } template bool impl_IApplicationView::AdjacentToLeftDisplayEdge() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AdjacentToLeftDisplayEdge(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_AdjacentToLeftDisplayEdge(&value)); return value; } template bool impl_IApplicationView::AdjacentToRightDisplayEdge() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AdjacentToRightDisplayEdge(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_AdjacentToRightDisplayEdge(&value)); return value; } template bool impl_IApplicationView::IsFullScreen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullScreen(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_IsFullScreen(&value)); return value; } template bool impl_IApplicationView::IsOnLockScreen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOnLockScreen(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_IsOnLockScreen(&value)); return value; } template bool impl_IApplicationView::IsScreenCaptureEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsScreenCaptureEnabled(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_IsScreenCaptureEnabled(&value)); return value; } template void impl_IApplicationView::IsScreenCaptureEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsScreenCaptureEnabled(value)); + check_hresult(WINRT_SHIM(IApplicationView)->put_IsScreenCaptureEnabled(value)); } -template void impl_IApplicationView::Title(hstring_ref value) const +template void impl_IApplicationView::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IApplicationView)->put_Title(get_abi(value))); } template hstring impl_IApplicationView::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IApplicationView)->get_Title(put_abi(value))); return value; } template int32_t impl_IApplicationView::Id() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IApplicationView)->get_Id(&value)); return value; } template event_token impl_IApplicationView::Consolidated(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Consolidated(get(handler), &token)); + check_hresult(WINRT_SHIM(IApplicationView)->add_Consolidated(get_abi(handler), &token)); return token; } @@ -2349,335 +2502,335 @@ template event_revoker impl_IApplicationView:: template void impl_IApplicationView::Consolidated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Consolidated(token)); + check_hresult(WINRT_SHIM(IApplicationView)->remove_Consolidated(token)); } template bool impl_IApplicationView2::SuppressSystemOverlays() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SuppressSystemOverlays(&value)); + check_hresult(WINRT_SHIM(IApplicationView2)->get_SuppressSystemOverlays(&value)); return value; } template void impl_IApplicationView2::SuppressSystemOverlays(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SuppressSystemOverlays(value)); + check_hresult(WINRT_SHIM(IApplicationView2)->put_SuppressSystemOverlays(value)); } template Windows::Foundation::Rect impl_IApplicationView2::VisibleBounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_VisibleBounds(put(value))); + check_hresult(WINRT_SHIM(IApplicationView2)->get_VisibleBounds(put_abi(value))); return value; } -template event_token impl_IApplicationView2::VisibleBoundsChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IApplicationView2::VisibleBoundsChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VisibleBoundsChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IApplicationView2)->add_VisibleBoundsChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IApplicationView2::VisibleBoundsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IApplicationView2::VisibleBoundsChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IApplicationView2::remove_VisibleBoundsChanged, VisibleBoundsChanged(handler)); } template void impl_IApplicationView2::VisibleBoundsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VisibleBoundsChanged(token)); + check_hresult(WINRT_SHIM(IApplicationView2)->remove_VisibleBoundsChanged(token)); } template bool impl_IApplicationView2::SetDesiredBoundsMode(Windows::UI::ViewManagement::ApplicationViewBoundsMode boundsMode) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredBoundsMode(boundsMode, &success)); + check_hresult(WINRT_SHIM(IApplicationView2)->abi_SetDesiredBoundsMode(boundsMode, &success)); return success; } template Windows::UI::ViewManagement::ApplicationViewBoundsMode impl_IApplicationView2::DesiredBoundsMode() const { Windows::UI::ViewManagement::ApplicationViewBoundsMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredBoundsMode(&value)); + check_hresult(WINRT_SHIM(IApplicationView2)->get_DesiredBoundsMode(&value)); return value; } -template void impl_IApplicationViewTitleBar::ForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::BackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::BackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_BackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::BackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_BackgroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonBackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonBackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonBackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonBackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonBackgroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonHoverForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonHoverForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonHoverForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonHoverForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonHoverForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonHoverForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonHoverForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonHoverBackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonHoverBackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonHoverBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonHoverBackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonHoverBackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonHoverBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonHoverBackgroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonPressedForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonPressedForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonPressedForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonPressedForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonPressedForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonPressedForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonPressedForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonPressedBackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonPressedBackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonPressedBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonPressedBackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonPressedBackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonPressedBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonPressedBackgroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::InactiveForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::InactiveForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InactiveForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_InactiveForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::InactiveForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InactiveForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_InactiveForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::InactiveBackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::InactiveBackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_InactiveBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_InactiveBackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::InactiveBackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_InactiveBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_InactiveBackgroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonInactiveForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonInactiveForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonInactiveForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonInactiveForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonInactiveForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonInactiveForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonInactiveForegroundColor(put_abi(value))); return value; } -template void impl_IApplicationViewTitleBar::ButtonInactiveBackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IApplicationViewTitleBar::ButtonInactiveBackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ButtonInactiveBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->put_ButtonInactiveBackgroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IApplicationViewTitleBar::ButtonInactiveBackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ButtonInactiveBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTitleBar)->get_ButtonInactiveBackgroundColor(put_abi(value))); return value; } template Windows::UI::ViewManagement::ApplicationViewTitleBar impl_IApplicationView3::TitleBar() const { Windows::UI::ViewManagement::ApplicationViewTitleBar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleBar(put(value))); + check_hresult(WINRT_SHIM(IApplicationView3)->get_TitleBar(put_abi(value))); return value; } template Windows::UI::ViewManagement::FullScreenSystemOverlayMode impl_IApplicationView3::FullScreenSystemOverlayMode() const { Windows::UI::ViewManagement::FullScreenSystemOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_FullScreenSystemOverlayMode(&value)); + check_hresult(WINRT_SHIM(IApplicationView3)->get_FullScreenSystemOverlayMode(&value)); return value; } template void impl_IApplicationView3::FullScreenSystemOverlayMode(Windows::UI::ViewManagement::FullScreenSystemOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_FullScreenSystemOverlayMode(value)); + check_hresult(WINRT_SHIM(IApplicationView3)->put_FullScreenSystemOverlayMode(value)); } template bool impl_IApplicationView3::IsFullScreenMode() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullScreenMode(&value)); + check_hresult(WINRT_SHIM(IApplicationView3)->get_IsFullScreenMode(&value)); return value; } template bool impl_IApplicationView3::TryEnterFullScreenMode() const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryEnterFullScreenMode(&success)); + check_hresult(WINRT_SHIM(IApplicationView3)->abi_TryEnterFullScreenMode(&success)); return success; } template void impl_IApplicationView3::ExitFullScreenMode() const { - check_hresult(static_cast(static_cast(*this))->abi_ExitFullScreenMode()); + check_hresult(WINRT_SHIM(IApplicationView3)->abi_ExitFullScreenMode()); } template void impl_IApplicationView3::ShowStandardSystemOverlays() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowStandardSystemOverlays()); + check_hresult(WINRT_SHIM(IApplicationView3)->abi_ShowStandardSystemOverlays()); } template bool impl_IApplicationView3::TryResizeView(const Windows::Foundation::Size & value) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryResizeView(get(value), &success)); + check_hresult(WINRT_SHIM(IApplicationView3)->abi_TryResizeView(get_abi(value), &success)); return success; } template void impl_IApplicationView3::SetPreferredMinSize(const Windows::Foundation::Size & minSize) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPreferredMinSize(get(minSize))); + check_hresult(WINRT_SHIM(IApplicationView3)->abi_SetPreferredMinSize(get_abi(minSize))); } template bool impl_IApplicationViewFullscreenStatics::TryUnsnapToFullscreen() const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TryUnsnapToFullscreen(&success)); + check_hresult(WINRT_SHIM(IApplicationViewFullscreenStatics)->abi_TryUnsnapToFullscreen(&success)); return success; } template bool impl_IApplicationViewConsolidatedEventArgs::IsUserInitiated() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsUserInitiated(&value)); + check_hresult(WINRT_SHIM(IApplicationViewConsolidatedEventArgs)->get_IsUserInitiated(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IActivationViewSwitcher::ShowAsStandaloneAsync(int32_t viewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsStandaloneAsync(viewId, put(operation))); + check_hresult(WINRT_SHIM(IActivationViewSwitcher)->abi_ShowAsStandaloneAsync(viewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IActivationViewSwitcher::ShowAsStandaloneAsync(int32_t viewId, Windows::UI::ViewManagement::ViewSizePreference sizePreference) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsStandaloneWithSizePreferenceAsync(viewId, sizePreference, put(operation))); + check_hresult(WINRT_SHIM(IActivationViewSwitcher)->abi_ShowAsStandaloneWithSizePreferenceAsync(viewId, sizePreference, put_abi(operation))); return operation; } template bool impl_IActivationViewSwitcher::IsViewPresentedOnActivationVirtualDesktop(int32_t viewId) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_IsViewPresentedOnActivationVirtualDesktop(viewId, &value)); + check_hresult(WINRT_SHIM(IActivationViewSwitcher)->abi_IsViewPresentedOnActivationVirtualDesktop(viewId, &value)); return value; } template int32_t impl_IApplicationViewTransferContext::ViewId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewId(&value)); + check_hresult(WINRT_SHIM(IApplicationViewTransferContext)->get_ViewId(&value)); return value; } template void impl_IApplicationViewTransferContext::ViewId(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ViewId(value)); + check_hresult(WINRT_SHIM(IApplicationViewTransferContext)->put_ViewId(value)); } template hstring impl_IApplicationViewTransferContextStatics::DataPackageFormatId() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DataPackageFormatId(put(value))); + check_hresult(WINRT_SHIM(IApplicationViewTransferContextStatics)->get_DataPackageFormatId(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IInputPaneVisibilityEventArgs::OccludedRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_OccludedRect(put(value))); + check_hresult(WINRT_SHIM(IInputPaneVisibilityEventArgs)->get_OccludedRect(put_abi(value))); return value; } template void impl_IInputPaneVisibilityEventArgs::EnsuredFocusedElementInView(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_EnsuredFocusedElementInView(value)); + check_hresult(WINRT_SHIM(IInputPaneVisibilityEventArgs)->put_EnsuredFocusedElementInView(value)); } template bool impl_IInputPaneVisibilityEventArgs::EnsuredFocusedElementInView() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_EnsuredFocusedElementInView(&value)); + check_hresult(WINRT_SHIM(IInputPaneVisibilityEventArgs)->get_EnsuredFocusedElementInView(&value)); return value; } template event_token impl_IInputPane::Showing(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Showing(get(handler), &token)); + check_hresult(WINRT_SHIM(IInputPane)->add_Showing(get_abi(handler), &token)); return token; } @@ -2688,13 +2841,13 @@ template event_revoker impl_IInputPane::Showing(auto template void impl_IInputPane::Showing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Showing(token)); + check_hresult(WINRT_SHIM(IInputPane)->remove_Showing(token)); } template event_token impl_IInputPane::Hiding(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Hiding(get(handler), &token)); + check_hresult(WINRT_SHIM(IInputPane)->add_Hiding(get_abi(handler), &token)); return token; } @@ -2705,461 +2858,461 @@ template event_revoker impl_IInputPane::Hiding(auto_ template void impl_IInputPane::Hiding(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Hiding(token)); + check_hresult(WINRT_SHIM(IInputPane)->remove_Hiding(token)); } template Windows::Foundation::Rect impl_IInputPane::OccludedRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_OccludedRect(put(value))); + check_hresult(WINRT_SHIM(IInputPane)->get_OccludedRect(put_abi(value))); return value; } template bool impl_IInputPane2::TryShow() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryShow(&result)); + check_hresult(WINRT_SHIM(IInputPane2)->abi_TryShow(&result)); return result; } template bool impl_IInputPane2::TryHide() const { bool result {}; - check_hresult(static_cast(static_cast(*this))->abi_TryHide(&result)); + check_hresult(WINRT_SHIM(IInputPane2)->abi_TryHide(&result)); return result; } template bool impl_IInputPaneControl::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IInputPaneControl)->get_Visible(&value)); return value; } template void impl_IInputPaneControl::Visible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Visible(value)); + check_hresult(WINRT_SHIM(IInputPaneControl)->put_Visible(value)); } template Windows::UI::ViewManagement::InputPane impl_IInputPaneStatics::GetForCurrentView() const { Windows::UI::ViewManagement::InputPane inputPane { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(inputPane))); + check_hresult(WINRT_SHIM(IInputPaneStatics)->abi_GetForCurrentView(put_abi(inputPane))); return inputPane; } template Windows::Foundation::IAsyncAction impl_IProjectionManagerStatics::StartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StartProjectingAsync(projectionViewId, anchorViewId, put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->abi_StartProjectingAsync(projectionViewId, anchorViewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IProjectionManagerStatics::SwapDisplaysForViewsAsync(int32_t projectionViewId, int32_t anchorViewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_SwapDisplaysForViewsAsync(projectionViewId, anchorViewId, put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->abi_SwapDisplaysForViewsAsync(projectionViewId, anchorViewId, put_abi(operation))); return operation; } template Windows::Foundation::IAsyncAction impl_IProjectionManagerStatics::StopProjectingAsync(int32_t projectionViewId, int32_t anchorViewId) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StopProjectingAsync(projectionViewId, anchorViewId, put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->abi_StopProjectingAsync(projectionViewId, anchorViewId, put_abi(operation))); return operation; } template bool impl_IProjectionManagerStatics::ProjectionDisplayAvailable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ProjectionDisplayAvailable(&value)); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->get_ProjectionDisplayAvailable(&value)); return value; } -template event_token impl_IProjectionManagerStatics::ProjectionDisplayAvailableChanged(const Windows::Foundation::EventHandler & handler) const +template event_token impl_IProjectionManagerStatics::ProjectionDisplayAvailableChanged(const Windows::Foundation::EventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ProjectionDisplayAvailableChanged(get(handler), &token)); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->add_ProjectionDisplayAvailableChanged(get_abi(handler), &token)); return token; } -template event_revoker impl_IProjectionManagerStatics::ProjectionDisplayAvailableChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const +template event_revoker impl_IProjectionManagerStatics::ProjectionDisplayAvailableChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IProjectionManagerStatics::remove_ProjectionDisplayAvailableChanged, ProjectionDisplayAvailableChanged(handler)); } template void impl_IProjectionManagerStatics::ProjectionDisplayAvailableChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ProjectionDisplayAvailableChanged(token)); + check_hresult(WINRT_SHIM(IProjectionManagerStatics)->remove_ProjectionDisplayAvailableChanged(token)); } template Windows::Foundation::IAsyncAction impl_IProjectionManagerStatics2::StartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, const Windows::Devices::Enumeration::DeviceInformation & displayDeviceInfo) const { Windows::Foundation::IAsyncAction operation; - check_hresult(static_cast(static_cast(*this))->abi_StartProjectingWithDeviceInfoAsync(projectionViewId, anchorViewId, get(displayDeviceInfo), put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics2)->abi_StartProjectingWithDeviceInfoAsync(projectionViewId, anchorViewId, get_abi(displayDeviceInfo), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IProjectionManagerStatics2::RequestStartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, const Windows::Foundation::Rect & selection) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStartProjectingAsync(projectionViewId, anchorViewId, get(selection), put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics2)->abi_RequestStartProjectingAsync(projectionViewId, anchorViewId, get_abi(selection), put_abi(operation))); return operation; } template Windows::Foundation::IAsyncOperation impl_IProjectionManagerStatics2::RequestStartProjectingAsync(int32_t projectionViewId, int32_t anchorViewId, const Windows::Foundation::Rect & selection, Windows::UI::Popups::Placement prefferedPlacement) const { Windows::Foundation::IAsyncOperation operation; - check_hresult(static_cast(static_cast(*this))->abi_RequestStartProjectingWithPlacementAsync(projectionViewId, anchorViewId, get(selection), prefferedPlacement, put(operation))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics2)->abi_RequestStartProjectingWithPlacementAsync(projectionViewId, anchorViewId, get_abi(selection), prefferedPlacement, put_abi(operation))); return operation; } template hstring impl_IProjectionManagerStatics2::GetDeviceSelector() const { hstring selector; - check_hresult(static_cast(static_cast(*this))->abi_GetDeviceSelector(put(selector))); + check_hresult(WINRT_SHIM(IProjectionManagerStatics2)->abi_GetDeviceSelector(put_abi(selector))); return selector; } template Windows::UI::ViewManagement::UserInteractionMode impl_IUIViewSettings::UserInteractionMode() const { Windows::UI::ViewManagement::UserInteractionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_UserInteractionMode(&value)); + check_hresult(WINRT_SHIM(IUIViewSettings)->get_UserInteractionMode(&value)); return value; } template Windows::UI::ViewManagement::UIViewSettings impl_IUIViewSettingsStatics::GetForCurrentView() const { Windows::UI::ViewManagement::UIViewSettings current { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(current))); + check_hresult(WINRT_SHIM(IUIViewSettingsStatics)->abi_GetForCurrentView(put_abi(current))); return current; } template bool impl_IAccessibilitySettings::HighContrast() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HighContrast(&value)); + check_hresult(WINRT_SHIM(IAccessibilitySettings)->get_HighContrast(&value)); return value; } template hstring impl_IAccessibilitySettings::HighContrastScheme() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HighContrastScheme(put(value))); + check_hresult(WINRT_SHIM(IAccessibilitySettings)->get_HighContrastScheme(put_abi(value))); return value; } -template event_token impl_IAccessibilitySettings::HighContrastChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IAccessibilitySettings::HighContrastChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_HighContrastChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IAccessibilitySettings)->add_HighContrastChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IAccessibilitySettings::HighContrastChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IAccessibilitySettings::HighContrastChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IAccessibilitySettings::remove_HighContrastChanged, HighContrastChanged(handler)); } template void impl_IAccessibilitySettings::HighContrastChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_HighContrastChanged(cookie)); + check_hresult(WINRT_SHIM(IAccessibilitySettings)->remove_HighContrastChanged(cookie)); } template Windows::UI::ViewManagement::HandPreference impl_IUISettings::HandPreference() const { Windows::UI::ViewManagement::HandPreference value {}; - check_hresult(static_cast(static_cast(*this))->get_HandPreference(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_HandPreference(&value)); return value; } template Windows::Foundation::Size impl_IUISettings::CursorSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_CursorSize(put(value))); + check_hresult(WINRT_SHIM(IUISettings)->get_CursorSize(put_abi(value))); return value; } template Windows::Foundation::Size impl_IUISettings::ScrollBarSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollBarSize(put(value))); + check_hresult(WINRT_SHIM(IUISettings)->get_ScrollBarSize(put_abi(value))); return value; } template Windows::Foundation::Size impl_IUISettings::ScrollBarArrowSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollBarArrowSize(put(value))); + check_hresult(WINRT_SHIM(IUISettings)->get_ScrollBarArrowSize(put_abi(value))); return value; } template Windows::Foundation::Size impl_IUISettings::ScrollBarThumbBoxSize() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollBarThumbBoxSize(put(value))); + check_hresult(WINRT_SHIM(IUISettings)->get_ScrollBarThumbBoxSize(put_abi(value))); return value; } template uint32_t impl_IUISettings::MessageDuration() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MessageDuration(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_MessageDuration(&value)); return value; } template bool impl_IUISettings::AnimationsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AnimationsEnabled(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_AnimationsEnabled(&value)); return value; } template bool impl_IUISettings::CaretBrowsingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CaretBrowsingEnabled(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_CaretBrowsingEnabled(&value)); return value; } template uint32_t impl_IUISettings::CaretBlinkRate() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CaretBlinkRate(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_CaretBlinkRate(&value)); return value; } template uint32_t impl_IUISettings::CaretWidth() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CaretWidth(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_CaretWidth(&value)); return value; } template uint32_t impl_IUISettings::DoubleClickTime() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DoubleClickTime(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_DoubleClickTime(&value)); return value; } template uint32_t impl_IUISettings::MouseHoverTime() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MouseHoverTime(&value)); + check_hresult(WINRT_SHIM(IUISettings)->get_MouseHoverTime(&value)); return value; } template Windows::UI::Color impl_IUISettings::UIElementColor(Windows::UI::ViewManagement::UIElementType desiredElement) const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->abi_UIElementColor(desiredElement, put(value))); + check_hresult(WINRT_SHIM(IUISettings)->abi_UIElementColor(desiredElement, put_abi(value))); return value; } template double impl_IUISettings2::TextScaleFactor() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_TextScaleFactor(&value)); + check_hresult(WINRT_SHIM(IUISettings2)->get_TextScaleFactor(&value)); return value; } -template event_token impl_IUISettings2::TextScaleFactorChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IUISettings2::TextScaleFactorChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_TextScaleFactorChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IUISettings2)->add_TextScaleFactorChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IUISettings2::TextScaleFactorChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IUISettings2::TextScaleFactorChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IUISettings2::remove_TextScaleFactorChanged, TextScaleFactorChanged(handler)); } template void impl_IUISettings2::TextScaleFactorChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_TextScaleFactorChanged(cookie)); + check_hresult(WINRT_SHIM(IUISettings2)->remove_TextScaleFactorChanged(cookie)); } template Windows::UI::Color impl_IUISettings3::GetColorValue(Windows::UI::ViewManagement::UIColorType desiredColor) const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetColorValue(desiredColor, put(value))); + check_hresult(WINRT_SHIM(IUISettings3)->abi_GetColorValue(desiredColor, put_abi(value))); return value; } -template event_token impl_IUISettings3::ColorValuesChanged(const Windows::Foundation::TypedEventHandler & handler) const +template event_token impl_IUISettings3::ColorValuesChanged(const Windows::Foundation::TypedEventHandler & handler) const { event_token cookie {}; - check_hresult(static_cast(static_cast(*this))->add_ColorValuesChanged(get(handler), &cookie)); + check_hresult(WINRT_SHIM(IUISettings3)->add_ColorValuesChanged(get_abi(handler), &cookie)); return cookie; } -template event_revoker impl_IUISettings3::ColorValuesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const +template event_revoker impl_IUISettings3::ColorValuesChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & handler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IUISettings3::remove_ColorValuesChanged, ColorValuesChanged(handler)); } template void impl_IUISettings3::ColorValuesChanged(event_token cookie) const { - check_hresult(static_cast(static_cast(*this))->remove_ColorValuesChanged(cookie)); + check_hresult(WINRT_SHIM(IUISettings3)->remove_ColorValuesChanged(cookie)); } template bool impl_IApplicationViewScalingStatics::DisableLayoutScaling() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DisableLayoutScaling(&value)); + check_hresult(WINRT_SHIM(IApplicationViewScalingStatics)->get_DisableLayoutScaling(&value)); return value; } template bool impl_IApplicationViewScalingStatics::TrySetDisableLayoutScaling(bool disableLayoutScaling) const { bool success {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetDisableLayoutScaling(disableLayoutScaling, &success)); + check_hresult(WINRT_SHIM(IApplicationViewScalingStatics)->abi_TrySetDisableLayoutScaling(disableLayoutScaling, &success)); return success; } template Windows::UI::ViewManagement::StatusBar impl_IStatusBarStatics::GetForCurrentView() const { Windows::UI::ViewManagement::StatusBar value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(value))); + check_hresult(WINRT_SHIM(IStatusBarStatics)->abi_GetForCurrentView(put_abi(value))); return value; } template Windows::Foundation::IAsyncAction impl_IStatusBar::ShowAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IStatusBar)->abi_ShowAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncAction impl_IStatusBar::HideAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_HideAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IStatusBar)->abi_HideAsync(put_abi(returnValue))); return returnValue; } template double impl_IStatusBar::BackgroundOpacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundOpacity(&value)); + check_hresult(WINRT_SHIM(IStatusBar)->get_BackgroundOpacity(&value)); return value; } template void impl_IStatusBar::BackgroundOpacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundOpacity(value)); + check_hresult(WINRT_SHIM(IStatusBar)->put_BackgroundOpacity(value)); } template Windows::Foundation::IReference impl_IStatusBar::ForegroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IStatusBar)->get_ForegroundColor(put_abi(value))); return value; } -template void impl_IStatusBar::ForegroundColor(const Windows::Foundation::IReference & value) const +template void impl_IStatusBar::ForegroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IStatusBar)->put_ForegroundColor(get_abi(value))); } template Windows::Foundation::IReference impl_IStatusBar::BackgroundColor() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IStatusBar)->get_BackgroundColor(put_abi(value))); return value; } -template void impl_IStatusBar::BackgroundColor(const Windows::Foundation::IReference & value) const +template void impl_IStatusBar::BackgroundColor(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IStatusBar)->put_BackgroundColor(get_abi(value))); } template Windows::UI::ViewManagement::StatusBarProgressIndicator impl_IStatusBar::ProgressIndicator() const { Windows::UI::ViewManagement::StatusBarProgressIndicator value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProgressIndicator(put(value))); + check_hresult(WINRT_SHIM(IStatusBar)->get_ProgressIndicator(put_abi(value))); return value; } template Windows::Foundation::Rect impl_IStatusBar::OccludedRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_OccludedRect(put(value))); + check_hresult(WINRT_SHIM(IStatusBar)->get_OccludedRect(put_abi(value))); return value; } -template event_token impl_IStatusBar::Showing(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IStatusBar::Showing(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Showing(get(eventHandler), &token)); + check_hresult(WINRT_SHIM(IStatusBar)->add_Showing(get_abi(eventHandler), &token)); return token; } -template event_revoker impl_IStatusBar::Showing(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IStatusBar::Showing(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IStatusBar::remove_Showing, Showing(eventHandler)); } template void impl_IStatusBar::Showing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Showing(token)); + check_hresult(WINRT_SHIM(IStatusBar)->remove_Showing(token)); } -template event_token impl_IStatusBar::Hiding(const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_token impl_IStatusBar::Hiding(const Windows::Foundation::TypedEventHandler & eventHandler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Hiding(get(eventHandler), &token)); + check_hresult(WINRT_SHIM(IStatusBar)->add_Hiding(get_abi(eventHandler), &token)); return token; } -template event_revoker impl_IStatusBar::Hiding(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const +template event_revoker impl_IStatusBar::Hiding(auto_revoke_t, const Windows::Foundation::TypedEventHandler & eventHandler) const { return impl::make_event_revoker(this, &ABI::Windows::UI::ViewManagement::IStatusBar::remove_Hiding, Hiding(eventHandler)); } template void impl_IStatusBar::Hiding(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Hiding(token)); + check_hresult(WINRT_SHIM(IStatusBar)->remove_Hiding(token)); } template Windows::Foundation::IAsyncAction impl_IStatusBarProgressIndicator::ShowAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->abi_ShowAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncAction impl_IStatusBarProgressIndicator::HideAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_HideAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->abi_HideAsync(put_abi(returnValue))); return returnValue; } template hstring impl_IStatusBarProgressIndicator::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->get_Text(put_abi(value))); return value; } -template void impl_IStatusBarProgressIndicator::Text(hstring_ref value) const +template void impl_IStatusBarProgressIndicator::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->put_Text(get_abi(value))); } template Windows::Foundation::IReference impl_IStatusBarProgressIndicator::ProgressValue() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_ProgressValue(put(value))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->get_ProgressValue(put_abi(value))); return value; } -template void impl_IStatusBarProgressIndicator::ProgressValue(const Windows::Foundation::IReference & value) const +template void impl_IStatusBarProgressIndicator::ProgressValue(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProgressValue(get(value))); + check_hresult(WINRT_SHIM(IStatusBarProgressIndicator)->put_ProgressValue(get_abi(value))); } inline AccessibilitySettings::AccessibilitySettings() : @@ -3310,12 +3463,12 @@ inline bool ProjectionManager::ProjectionDisplayAvailable() return get_activation_factory().ProjectionDisplayAvailable(); } -inline event_token ProjectionManager::ProjectionDisplayAvailableChanged(const Windows::Foundation::EventHandler & handler) +inline event_token ProjectionManager::ProjectionDisplayAvailableChanged(const Windows::Foundation::EventHandler & handler) { return get_activation_factory().ProjectionDisplayAvailableChanged(handler); } -inline factory_event_revoker ProjectionManager::ProjectionDisplayAvailableChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) +inline factory_event_revoker ProjectionManager::ProjectionDisplayAvailableChanged(auto_revoke_t, const Windows::Foundation::EventHandler & handler) { auto factory = get_activation_factory(); return { factory, &ABI::Windows::UI::ViewManagement::IProjectionManagerStatics::remove_ProjectionDisplayAvailableChanged, factory.ProjectionDisplayAvailableChanged(handler) }; @@ -3363,3 +3516,419 @@ inline Windows::UI::ViewManagement::UIViewSettings UIViewSettings::GetForCurrent } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IAccessibilitySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IActivationViewSwitcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationView2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationView3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewConsolidatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewFullscreenStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewInteropStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewScaling & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewScalingStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewSwitcherStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewSwitcherStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewTitleBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewTransferContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewTransferContextStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IInputPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IInputPane2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IInputPaneControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IInputPaneStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IInputPaneVisibilityEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IProjectionManagerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IProjectionManagerStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IStatusBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IStatusBarProgressIndicator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IStatusBarStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IUISettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IUISettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IUISettings3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IUIViewSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::IUIViewSettingsStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::AccessibilitySettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ActivationViewSwitcher & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ApplicationView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ApplicationViewConsolidatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ApplicationViewScaling & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ApplicationViewTitleBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::ApplicationViewTransferContext & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::InputPane & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::InputPaneVisibilityEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::StatusBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::StatusBarProgressIndicator & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::UISettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::ViewManagement::UIViewSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.WebUI.Core.h b/10.0.14393.0/winrt/Windows.UI.WebUI.Core.h index c2fff4ff5..7f2ebc601 100644 --- a/10.0.14393.0/winrt/Windows.UI.WebUI.Core.h +++ b/10.0.14393.0/winrt/Windows.UI.WebUI.Core.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -27,7 +30,7 @@ template MenuClosedEventHandler::MenuClosedEventHandler inline void MenuClosedEventHandler::operator()() const { - check_hresult((*this)->abi_Invoke()); + check_hresult((*(abi **)this)->abi_Invoke()); } template MenuOpenedEventHandler::MenuOpenedEventHandler(L lambda) : @@ -44,7 +47,7 @@ template MenuOpenedEventHandler::MenuOpenedEventHandler inline void MenuOpenedEventHandler::operator()() const { - check_hresult((*this)->abi_Invoke()); + check_hresult((*(abi **)this)->abi_Invoke()); } template SizeChangedEventHandler::SizeChangedEventHandler(L lambda) : @@ -61,7 +64,7 @@ template SizeChangedEventHandler::SizeChangedEventHandl inline void SizeChangedEventHandler::operator()(const Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs & eventArgs) const { - check_hresult((*this)->abi_Invoke(get(eventArgs))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(eventArgs))); } } @@ -75,7 +78,8 @@ struct produce : produce_baseshim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -88,6 +92,7 @@ struct produce : produce_baseshim()); this->shim().Visible(value); return S_OK; } @@ -101,7 +106,8 @@ struct produce : produce_baseshim().Opacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Opacity()); return S_OK; } catch (...) @@ -114,6 +120,7 @@ struct produce : produce_baseshim()); this->shim().Opacity(value); return S_OK; } @@ -123,11 +130,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ForegroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundColor()); return S_OK; } catch (...) @@ -136,10 +144,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ForegroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -149,11 +158,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundColor()); return S_OK; } catch (...) @@ -162,10 +172,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -179,7 +190,8 @@ struct produce : produce_baseshim().ClosedDisplayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClosedDisplayMode()); return S_OK; } catch (...) @@ -192,6 +204,7 @@ struct produce : produce_baseshim()); this->shim().ClosedDisplayMode(value); return S_OK; } @@ -205,7 +218,8 @@ struct produce : produce_baseshim().IsOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpen()); return S_OK; } catch (...) @@ -218,6 +232,7 @@ struct produce : produce_baseshim()); this->shim().IsOpen(value); return S_OK; } @@ -227,11 +242,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -240,11 +256,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_PrimaryCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PrimaryCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryCommands()); return S_OK; } catch (...) @@ -254,11 +271,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SecondaryCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SecondaryCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryCommands()); return S_OK; } catch (...) @@ -268,11 +286,12 @@ struct produce : produce_base handler, event_token * value) noexcept override + HRESULT __stdcall add_MenuOpened(impl::abi_arg_in handler, event_token * value) noexcept override { try { - *value = detach(this->shim().MenuOpened(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MenuOpened(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -285,6 +304,7 @@ struct produce : produce_baseshim()); this->shim().MenuOpened(value); return S_OK; } @@ -294,11 +314,12 @@ struct produce : produce_base handler, event_token * value) noexcept override + HRESULT __stdcall add_MenuClosed(impl::abi_arg_in handler, event_token * value) noexcept override { try { - *value = detach(this->shim().MenuClosed(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MenuClosed(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -311,6 +332,7 @@ struct produce : produce_baseshim()); this->shim().MenuClosed(value); return S_OK; } @@ -320,11 +342,12 @@ struct produce : produce_base handler, event_token * value) noexcept override + HRESULT __stdcall add_SizeChanged(impl::abi_arg_in handler, event_token * value) noexcept override { try { - *value = detach(this->shim().SizeChanged(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeChanged(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -337,6 +360,7 @@ struct produce : produce_baseshim()); this->shim().SizeChanged(value); return S_OK; } @@ -350,11 +374,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -364,10 +389,11 @@ struct produce : produc } } - HRESULT __stdcall put_Uri(abi_arg_in value) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return S_OK; } @@ -381,11 +407,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in uri, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in uri, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Create(*reinterpret_cast(&uri))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Create(*reinterpret_cast(&uri))); return S_OK; } catch (...) @@ -399,11 +426,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -413,10 +441,11 @@ struct produce } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -426,11 +455,12 @@ struct produce } } - HRESULT __stdcall add_ItemInvoked(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemInvoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemInvoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemInvoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -443,6 +473,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemInvoked(token); return S_OK; } @@ -468,7 +499,8 @@ struct produce : produc { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -481,6 +513,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return S_OK; } @@ -490,11 +523,12 @@ struct produce : produc } } - HRESULT __stdcall get_Label(abi_arg_out value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -504,10 +538,11 @@ struct produce : produc } } - HRESULT __stdcall put_Label(abi_arg_in value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -521,7 +556,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsToggleButton()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsToggleButton()); return S_OK; } catch (...) @@ -534,6 +570,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsToggleButton(value); return S_OK; } @@ -547,7 +584,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsChecked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsChecked()); return S_OK; } catch (...) @@ -560,6 +598,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsChecked(value); return S_OK; } @@ -569,11 +608,12 @@ struct produce : produc } } - HRESULT __stdcall get_Icon(abi_arg_out value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -583,10 +623,11 @@ struct produce : produc } } - HRESULT __stdcall put_Icon(abi_arg_in value) noexcept override + HRESULT __stdcall put_Icon(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Icon(*reinterpret_cast(&value)); return S_OK; } @@ -596,11 +637,12 @@ struct produce : produc } } - HRESULT __stdcall add_ItemInvoked(abi_arg_in> handler, event_token * token) noexcept override + HRESULT __stdcall add_ItemInvoked(impl::abi_arg_in> handler, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemInvoked(*reinterpret_cast *>(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemInvoked(*reinterpret_cast *>(&handler))); return S_OK; } catch (...) @@ -613,6 +655,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemInvoked(token); return S_OK; } @@ -630,7 +673,8 @@ struct produceshim().IsPrimaryCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrimaryCommand()); return S_OK; } catch (...) @@ -643,11 +687,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Size(abi_arg_out value) noexcept override + HRESULT __stdcall get_Size(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Size()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Size()); return S_OK; } catch (...) @@ -660,11 +705,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetForCurrentView(abi_arg_out commandBar) noexcept override + HRESULT __stdcall abi_GetForCurrentView(impl::abi_arg_out commandBar) noexcept override { try { - *commandBar = detach(this->shim().GetForCurrentView()); + typename D::abi_guard guard(this->shim()); + *commandBar = detach_abi(this->shim().GetForCurrentView()); return S_OK; } catch (...) @@ -678,11 +724,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Symbol(abi_arg_out value) noexcept override + HRESULT __stdcall get_Symbol(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Symbol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Symbol()); return S_OK; } catch (...) @@ -692,10 +739,11 @@ struct produce : produc } } - HRESULT __stdcall put_Symbol(abi_arg_in value) noexcept override + HRESULT __stdcall put_Symbol(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Symbol(*reinterpret_cast(&value)); return S_OK; } @@ -709,11 +757,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_Create(abi_arg_in symbol, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_Create(impl::abi_arg_in symbol, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().Create(*reinterpret_cast(&symbol))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().Create(*reinterpret_cast(&symbol))); return S_OK; } catch (...) @@ -731,74 +780,74 @@ namespace Windows::UI::WebUI::Core { template bool impl_IWebUICommandBarItemInvokedEventArgs::IsPrimaryCommand() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrimaryCommand(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBarItemInvokedEventArgs)->get_IsPrimaryCommand(&value)); return value; } template bool impl_IWebUICommandBarIconButton::Enabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Enabled(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->get_Enabled(&value)); return value; } template void impl_IWebUICommandBarIconButton::Enabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->put_Enabled(value)); } template hstring impl_IWebUICommandBarIconButton::Label() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Label(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->get_Label(put_abi(value))); return value; } -template void impl_IWebUICommandBarIconButton::Label(hstring_ref value) const +template void impl_IWebUICommandBarIconButton::Label(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Label(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->put_Label(get_abi(value))); } template bool impl_IWebUICommandBarIconButton::IsToggleButton() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsToggleButton(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->get_IsToggleButton(&value)); return value; } template void impl_IWebUICommandBarIconButton::IsToggleButton(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsToggleButton(value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->put_IsToggleButton(value)); } template bool impl_IWebUICommandBarIconButton::IsChecked() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsChecked(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->get_IsChecked(&value)); return value; } template void impl_IWebUICommandBarIconButton::IsChecked(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsChecked(value)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->put_IsChecked(value)); } template Windows::UI::WebUI::Core::IWebUICommandBarIcon impl_IWebUICommandBarIconButton::Icon() const { Windows::UI::WebUI::Core::IWebUICommandBarIcon value; - check_hresult(static_cast(static_cast(*this))->get_Icon(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->get_Icon(put_abi(value))); return value; } template void impl_IWebUICommandBarIconButton::Icon(const Windows::UI::WebUI::Core::IWebUICommandBarIcon & value) const { - check_hresult(static_cast(static_cast(*this))->put_Icon(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->put_Icon(get_abi(value))); } template event_token impl_IWebUICommandBarIconButton::ItemInvoked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemInvoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->add_ItemInvoked(get_abi(handler), &token)); return token; } @@ -809,25 +858,25 @@ template event_revoker impl_IWebUIComma template void impl_IWebUICommandBarIconButton::ItemInvoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemInvoked(token)); + check_hresult(WINRT_SHIM(IWebUICommandBarIconButton)->remove_ItemInvoked(token)); } template hstring impl_IWebUICommandBarConfirmationButton::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarConfirmationButton)->get_Text(put_abi(value))); return value; } -template void impl_IWebUICommandBarConfirmationButton::Text(hstring_ref value) const +template void impl_IWebUICommandBarConfirmationButton::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarConfirmationButton)->put_Text(get_abi(value))); } template event_token impl_IWebUICommandBarConfirmationButton::ItemInvoked(const Windows::Foundation::TypedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemInvoked(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUICommandBarConfirmationButton)->add_ItemInvoked(get_abi(handler), &token)); return token; } @@ -838,151 +887,151 @@ template event_revoker impl_IWe template void impl_IWebUICommandBarConfirmationButton::ItemInvoked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemInvoked(token)); + check_hresult(WINRT_SHIM(IWebUICommandBarConfirmationButton)->remove_ItemInvoked(token)); } template Windows::Foundation::Uri impl_IWebUICommandBarBitmapIcon::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarBitmapIcon)->get_Uri(put_abi(value))); return value; } template void impl_IWebUICommandBarBitmapIcon::Uri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarBitmapIcon)->put_Uri(get_abi(value))); } template Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon impl_IWebUICommandBarBitmapIconFactory::Create(const Windows::Foundation::Uri & uri) const { Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(uri), put(instance))); + check_hresult(WINRT_SHIM(IWebUICommandBarBitmapIconFactory)->abi_Create(get_abi(uri), put_abi(instance))); return instance; } template hstring impl_IWebUICommandBarSymbolIcon::Symbol() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Symbol(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarSymbolIcon)->get_Symbol(put_abi(value))); return value; } -template void impl_IWebUICommandBarSymbolIcon::Symbol(hstring_ref value) const +template void impl_IWebUICommandBarSymbolIcon::Symbol(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Symbol(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarSymbolIcon)->put_Symbol(get_abi(value))); } -template Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon impl_IWebUICommandBarSymbolIconFactory::Create(hstring_ref symbol) const +template Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon impl_IWebUICommandBarSymbolIconFactory::Create(hstring_view symbol) const { Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_Create(get(symbol), put(instance))); + check_hresult(WINRT_SHIM(IWebUICommandBarSymbolIconFactory)->abi_Create(get_abi(symbol), put_abi(instance))); return instance; } template Windows::Foundation::Size impl_IWebUICommandBarSizeChangedEventArgs::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBarSizeChangedEventArgs)->get_Size(put_abi(value))); return value; } template bool impl_IWebUICommandBar::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_Visible(&value)); return value; } template void impl_IWebUICommandBar::Visible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Visible(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_Visible(value)); } template double impl_IWebUICommandBar::Opacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Opacity(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_Opacity(&value)); return value; } template void impl_IWebUICommandBar::Opacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Opacity(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_Opacity(value)); } template Windows::UI::Color impl_IWebUICommandBar::ForegroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_ForegroundColor(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_ForegroundColor(put_abi(value))); return value; } template void impl_IWebUICommandBar::ForegroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_ForegroundColor(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_ForegroundColor(get_abi(value))); } template Windows::UI::Color impl_IWebUICommandBar::BackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_BackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_BackgroundColor(put_abi(value))); return value; } template void impl_IWebUICommandBar::BackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_BackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_BackgroundColor(get_abi(value))); } template Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode impl_IWebUICommandBar::ClosedDisplayMode() const { Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ClosedDisplayMode(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_ClosedDisplayMode(&value)); return value; } template void impl_IWebUICommandBar::ClosedDisplayMode(Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ClosedDisplayMode(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_ClosedDisplayMode(value)); } template bool impl_IWebUICommandBar::IsOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOpen(&value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_IsOpen(&value)); return value; } template void impl_IWebUICommandBar::IsOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOpen(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->put_IsOpen(value)); } template Windows::Foundation::Size impl_IWebUICommandBar::Size() const { Windows::Foundation::Size value {}; - check_hresult(static_cast(static_cast(*this))->get_Size(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_Size(put_abi(value))); return value; } template Windows::Foundation::Collections::IObservableVector impl_IWebUICommandBar::PrimaryCommands() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_PrimaryCommands(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_PrimaryCommands(put_abi(value))); return value; } template Windows::Foundation::Collections::IObservableVector impl_IWebUICommandBar::SecondaryCommands() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_SecondaryCommands(put(value))); + check_hresult(WINRT_SHIM(IWebUICommandBar)->get_SecondaryCommands(put_abi(value))); return value; } template event_token impl_IWebUICommandBar::MenuOpened(const Windows::UI::WebUI::Core::MenuOpenedEventHandler & handler) const { event_token value {}; - check_hresult(static_cast(static_cast(*this))->add_MenuOpened(get(handler), &value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->add_MenuOpened(get_abi(handler), &value)); return value; } @@ -993,13 +1042,13 @@ template event_revoker impl_IWebUICommandBar:: template void impl_IWebUICommandBar::MenuOpened(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_MenuOpened(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->remove_MenuOpened(value)); } template event_token impl_IWebUICommandBar::MenuClosed(const Windows::UI::WebUI::Core::MenuClosedEventHandler & handler) const { event_token value {}; - check_hresult(static_cast(static_cast(*this))->add_MenuClosed(get(handler), &value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->add_MenuClosed(get_abi(handler), &value)); return value; } @@ -1010,13 +1059,13 @@ template event_revoker impl_IWebUICommandBar:: template void impl_IWebUICommandBar::MenuClosed(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_MenuClosed(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->remove_MenuClosed(value)); } template event_token impl_IWebUICommandBar::SizeChanged(const Windows::UI::WebUI::Core::SizeChangedEventHandler & handler) const { event_token value {}; - check_hresult(static_cast(static_cast(*this))->add_SizeChanged(get(handler), &value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->add_SizeChanged(get_abi(handler), &value)); return value; } @@ -1027,13 +1076,13 @@ template event_revoker impl_IWebUICommandBar:: template void impl_IWebUICommandBar::SizeChanged(event_token value) const { - check_hresult(static_cast(static_cast(*this))->remove_SizeChanged(value)); + check_hresult(WINRT_SHIM(IWebUICommandBar)->remove_SizeChanged(value)); } template Windows::UI::WebUI::Core::WebUICommandBar impl_IWebUICommandBarStatics::GetForCurrentView() const { Windows::UI::WebUI::Core::WebUICommandBar commandBar { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetForCurrentView(put(commandBar))); + check_hresult(WINRT_SHIM(IWebUICommandBarStatics)->abi_GetForCurrentView(put_abi(commandBar))); return commandBar; } @@ -1062,10 +1111,183 @@ inline WebUICommandBarSymbolIcon::WebUICommandBarSymbolIcon() : WebUICommandBarSymbolIcon(activate_instance()) {} -inline WebUICommandBarSymbolIcon::WebUICommandBarSymbolIcon(hstring_ref symbol) : +inline WebUICommandBarSymbolIcon::WebUICommandBarSymbolIcon(hstring_view symbol) : WebUICommandBarSymbolIcon(get_activation_factory().Create(symbol)) {} } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarBitmapIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarBitmapIconFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarConfirmationButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarItemInvokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarSizeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarSymbolIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::IWebUICommandBarSymbolIconFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.WebUI.h b/10.0.14393.0/winrt/Windows.UI.WebUI.h index a4257efe4..01efbd4f9 100644 --- a/10.0.14393.0/winrt/Windows.UI.WebUI.h +++ b/10.0.14393.0/winrt/Windows.UI.WebUI.h @@ -1,8 +1,12 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + +#include "internal/Windows.Foundation.3.h" #include "internal/Windows.ApplicationModel.Activation.3.h" #include "internal/Windows.ApplicationModel.3.h" #include "internal/Windows.UI.WebUI.3.h" @@ -29,9 +33,9 @@ template ActivatedEventHandler::ActivatedEventHandler(O ActivatedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ActivatedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::ApplicationModel::Activation::IActivatedEventArgs & eventArgs) const +inline void ActivatedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::ApplicationModel::Activation::IActivatedEventArgs & eventArgs) const { - check_hresult((*this)->abi_Invoke(get(sender), get(eventArgs))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(eventArgs))); } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(L lambda) : @@ -46,9 +50,9 @@ template EnteredBackgroundEventHandler::EnteredBackgrou EnteredBackgroundEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void EnteredBackgroundEventHandler::operator()(const Windows::IInspectable & sender, const Windows::ApplicationModel::IEnteredBackgroundEventArgs & e) const +inline void EnteredBackgroundEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::ApplicationModel::IEnteredBackgroundEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(L lambda) : @@ -63,9 +67,9 @@ template LeavingBackgroundEventHandler::LeavingBackgrou LeavingBackgroundEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void LeavingBackgroundEventHandler::operator()(const Windows::IInspectable & sender, const Windows::ApplicationModel::ILeavingBackgroundEventArgs & e) const +inline void LeavingBackgroundEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::ApplicationModel::ILeavingBackgroundEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template NavigatedEventHandler::NavigatedEventHandler(L lambda) : @@ -80,9 +84,9 @@ template NavigatedEventHandler::NavigatedEventHandler(O NavigatedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void NavigatedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::WebUI::IWebUINavigatedEventArgs & e) const +inline void NavigatedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::WebUI::IWebUINavigatedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ResumingEventHandler::ResumingEventHandler(L lambda) : @@ -97,9 +101,9 @@ template ResumingEventHandler::ResumingEventHandler(O * ResumingEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ResumingEventHandler::operator()(const Windows::IInspectable & sender) const +inline void ResumingEventHandler::operator()(const Windows::Foundation::IInspectable & sender) const { - check_hresult((*this)->abi_Invoke(get(sender))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender))); } template SuspendingEventHandler::SuspendingEventHandler(L lambda) : @@ -114,9 +118,9 @@ template SuspendingEventHandler::SuspendingEventHandler SuspendingEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void SuspendingEventHandler::operator()(const Windows::IInspectable & sender, const Windows::ApplicationModel::ISuspendingEventArgs & e) const +inline void SuspendingEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::ApplicationModel::ISuspendingEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -130,6 +134,7 @@ struct produce : produce_baseshim()); this->shim().Complete(); return S_OK; } @@ -143,11 +148,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ActivatedOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActivatedOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActivatedOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActivatedOperation()); return S_OK; } catch (...) @@ -161,11 +167,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -183,7 +190,8 @@ struct produce : produce_baseshim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -196,6 +204,7 @@ struct produce : produce_baseshim()); this->shim().Content(value); return S_OK; } @@ -209,7 +218,8 @@ struct produce : produce_baseshim().LeftMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftMargin()); return S_OK; } catch (...) @@ -222,6 +232,7 @@ struct produce : produce_baseshim()); this->shim().LeftMargin(value); return S_OK; } @@ -235,7 +246,8 @@ struct produce : produce_baseshim().TopMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopMargin()); return S_OK; } catch (...) @@ -248,6 +260,7 @@ struct produce : produce_baseshim()); this->shim().TopMargin(value); return S_OK; } @@ -261,7 +274,8 @@ struct produce : produce_baseshim().RightMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightMargin()); return S_OK; } catch (...) @@ -274,6 +288,7 @@ struct produce : produce_baseshim()); this->shim().RightMargin(value); return S_OK; } @@ -287,7 +302,8 @@ struct produce : produce_baseshim().BottomMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomMargin()); return S_OK; } catch (...) @@ -300,6 +316,7 @@ struct produce : produce_baseshim()); this->shim().BottomMargin(value); return S_OK; } @@ -313,7 +330,8 @@ struct produce : produce_baseshim().EnableHeaderFooter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnableHeaderFooter()); return S_OK; } catch (...) @@ -326,6 +344,7 @@ struct produce : produce_baseshim()); this->shim().EnableHeaderFooter(value); return S_OK; } @@ -339,7 +358,8 @@ struct produce : produce_baseshim().ShrinkToFit()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShrinkToFit()); return S_OK; } catch (...) @@ -352,6 +372,7 @@ struct produce : produce_baseshim()); this->shim().ShrinkToFit(value); return S_OK; } @@ -365,7 +386,8 @@ struct produce : produce_baseshim().PercentScale()); + typename D::abi_guard guard(this->shim()); + *pScalePercent = detach_abi(this->shim().PercentScale()); return S_OK; } catch (...) @@ -378,6 +400,7 @@ struct produce : produce_baseshim()); this->shim().PercentScale(scalePercent); return S_OK; } @@ -387,11 +410,12 @@ struct produce : produce_base pstrPageRange) noexcept override + HRESULT __stdcall get_PageRange(impl::abi_arg_out pstrPageRange) noexcept override { try { - *pstrPageRange = detach(this->shim().PageRange()); + typename D::abi_guard guard(this->shim()); + *pstrPageRange = detach_abi(this->shim().PageRange()); return S_OK; } catch (...) @@ -401,11 +425,12 @@ struct produce : produce_base strPageRange, bool * pfSuccess) noexcept override + HRESULT __stdcall abi_TrySetPageRange(impl::abi_arg_in strPageRange, bool * pfSuccess) noexcept override { try { - *pfSuccess = detach(this->shim().TrySetPageRange(*reinterpret_cast(&strPageRange))); + typename D::abi_guard guard(this->shim()); + *pfSuccess = detach_abi(this->shim().TrySetPageRange(*reinterpret_cast(&strPageRange))); return S_OK; } catch (...) @@ -418,11 +443,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_Activated(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_Activated(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Activated(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Activated(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -435,6 +461,7 @@ struct produce : produce_baseshim()); this->shim().Activated(token); return S_OK; } @@ -444,11 +471,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_Suspending(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Suspending(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Suspending(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -461,6 +489,7 @@ struct produce : produce_baseshim()); this->shim().Suspending(token); return S_OK; } @@ -470,11 +499,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_Resuming(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Resuming(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Resuming(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -487,6 +517,7 @@ struct produce : produce_baseshim()); this->shim().Resuming(token); return S_OK; } @@ -496,11 +527,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_Navigated(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().Navigated(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Navigated(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -513,6 +545,7 @@ struct produce : produce_baseshim()); this->shim().Navigated(token); return S_OK; } @@ -526,11 +559,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_LeavingBackground(abi_arg_in handler, event_token * token) noexcept override + HRESULT __stdcall add_LeavingBackground(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().LeavingBackground(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LeavingBackground(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -543,6 +577,7 @@ struct produce : produce_baseshim()); this->shim().LeavingBackground(token); return S_OK; } @@ -552,11 +587,12 @@ struct produce : produce_base handler, event_token * token) noexcept override + HRESULT __stdcall add_EnteredBackground(impl::abi_arg_in handler, event_token * token) noexcept override { try { - *token = detach(this->shim().EnteredBackground(*reinterpret_cast(&handler))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EnteredBackground(*reinterpret_cast(&handler))); return S_OK; } catch (...) @@ -569,6 +605,7 @@ struct produce : produce_baseshim()); this->shim().EnteredBackground(token); return S_OK; } @@ -582,6 +619,7 @@ struct produce : produce_baseshim()); this->shim().EnablePrelaunch(value); return S_OK; } @@ -599,7 +637,8 @@ struct produce : produce_ba { try { - *succeeded = detach(this->shim().Succeeded()); + typename D::abi_guard guard(this->shim()); + *succeeded = detach_abi(this->shim().Succeeded()); return S_OK; } catch (...) @@ -612,6 +651,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Succeeded(succeeded); return S_OK; } @@ -625,11 +665,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Current(abi_arg_out backgroundTaskInstance) noexcept override + HRESULT __stdcall get_Current(impl::abi_arg_out backgroundTaskInstance) noexcept override { try { - *backgroundTaskInstance = detach(this->shim().Current()); + typename D::abi_guard guard(this->shim()); + *backgroundTaskInstance = detach_abi(this->shim().Current()); return S_OK; } catch (...) @@ -647,6 +688,7 @@ struct produce : produce_baseshim()); this->shim().Complete(); return S_OK; } @@ -660,11 +702,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_NavigatedOperation(abi_arg_out value) noexcept override + HRESULT __stdcall get_NavigatedOperation(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NavigatedOperation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NavigatedOperation()); return S_OK; } catch (...) @@ -678,11 +721,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetDeferral(abi_arg_out deferral) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out deferral) noexcept override { try { - *deferral = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *deferral = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -699,65 +743,65 @@ namespace Windows::UI::WebUI { template void impl_IActivatedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IActivatedDeferral)->abi_Complete()); } template Windows::UI::WebUI::ActivatedDeferral impl_IActivatedOperation::GetDeferral() const { Windows::UI::WebUI::ActivatedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IActivatedOperation)->abi_GetDeferral(put_abi(deferral))); return deferral; } template Windows::UI::WebUI::ActivatedOperation impl_IActivatedEventArgsDeferral::ActivatedOperation() const { Windows::UI::WebUI::ActivatedOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActivatedOperation(put(value))); + check_hresult(WINRT_SHIM(IActivatedEventArgsDeferral)->get_ActivatedOperation(put_abi(value))); return value; } template Windows::UI::WebUI::WebUINavigatedOperation impl_IWebUINavigatedEventArgs::NavigatedOperation() const { Windows::UI::WebUI::WebUINavigatedOperation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NavigatedOperation(put(value))); + check_hresult(WINRT_SHIM(IWebUINavigatedEventArgs)->get_NavigatedOperation(put_abi(value))); return value; } template bool impl_IWebUIBackgroundTaskInstance::Succeeded() const { bool succeeded {}; - check_hresult(static_cast(static_cast(*this))->get_Succeeded(&succeeded)); + check_hresult(WINRT_SHIM(IWebUIBackgroundTaskInstance)->get_Succeeded(&succeeded)); return succeeded; } template void impl_IWebUIBackgroundTaskInstance::Succeeded(bool succeeded) const { - check_hresult(static_cast(static_cast(*this))->put_Succeeded(succeeded)); + check_hresult(WINRT_SHIM(IWebUIBackgroundTaskInstance)->put_Succeeded(succeeded)); } template Windows::UI::WebUI::IWebUIBackgroundTaskInstance impl_IWebUIBackgroundTaskInstanceStatics::Current() const { Windows::UI::WebUI::IWebUIBackgroundTaskInstance backgroundTaskInstance; - check_hresult(static_cast(static_cast(*this))->get_Current(put(backgroundTaskInstance))); + check_hresult(WINRT_SHIM(IWebUIBackgroundTaskInstanceStatics)->get_Current(put_abi(backgroundTaskInstance))); return backgroundTaskInstance; } template void impl_IWebUINavigatedDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IWebUINavigatedDeferral)->abi_Complete()); } template Windows::UI::WebUI::WebUINavigatedDeferral impl_IWebUINavigatedOperation::GetDeferral() const { Windows::UI::WebUI::WebUINavigatedDeferral deferral { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(deferral))); + check_hresult(WINRT_SHIM(IWebUINavigatedOperation)->abi_GetDeferral(put_abi(deferral))); return deferral; } template event_token impl_IWebUIActivationStatics::Activated(const Windows::UI::WebUI::ActivatedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Activated(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->add_Activated(get_abi(handler), &token)); return token; } @@ -768,13 +812,13 @@ template event_revoker impl_IWebUIActivati template void impl_IWebUIActivationStatics::Activated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Activated(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->remove_Activated(token)); } template event_token impl_IWebUIActivationStatics::Suspending(const Windows::UI::WebUI::SuspendingEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Suspending(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->add_Suspending(get_abi(handler), &token)); return token; } @@ -785,13 +829,13 @@ template event_revoker impl_IWebUIActivati template void impl_IWebUIActivationStatics::Suspending(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Suspending(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->remove_Suspending(token)); } template event_token impl_IWebUIActivationStatics::Resuming(const Windows::UI::WebUI::ResumingEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Resuming(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->add_Resuming(get_abi(handler), &token)); return token; } @@ -802,13 +846,13 @@ template event_revoker impl_IWebUIActivati template void impl_IWebUIActivationStatics::Resuming(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Resuming(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->remove_Resuming(token)); } template event_token impl_IWebUIActivationStatics::Navigated(const Windows::UI::WebUI::NavigatedEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Navigated(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->add_Navigated(get_abi(handler), &token)); return token; } @@ -819,13 +863,13 @@ template event_revoker impl_IWebUIActivati template void impl_IWebUIActivationStatics::Navigated(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Navigated(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics)->remove_Navigated(token)); } template event_token impl_IWebUIActivationStatics2::LeavingBackground(const Windows::UI::WebUI::LeavingBackgroundEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LeavingBackground(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics2)->add_LeavingBackground(get_abi(handler), &token)); return token; } @@ -836,13 +880,13 @@ template event_revoker impl_IWebUIActivat template void impl_IWebUIActivationStatics2::LeavingBackground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LeavingBackground(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics2)->remove_LeavingBackground(token)); } template event_token impl_IWebUIActivationStatics2::EnteredBackground(const Windows::UI::WebUI::EnteredBackgroundEventHandler & handler) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_EnteredBackground(get(handler), &token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics2)->add_EnteredBackground(get_abi(handler), &token)); return token; } @@ -853,121 +897,121 @@ template event_revoker impl_IWebUIActivat template void impl_IWebUIActivationStatics2::EnteredBackground(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_EnteredBackground(token)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics2)->remove_EnteredBackground(token)); } template void impl_IWebUIActivationStatics2::EnablePrelaunch(bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_EnablePrelaunch(value)); + check_hresult(WINRT_SHIM(IWebUIActivationStatics2)->abi_EnablePrelaunch(value)); } template Windows::UI::WebUI::PrintContent impl_IHtmlPrintDocumentSource::Content() const { Windows::UI::WebUI::PrintContent value {}; - check_hresult(static_cast(static_cast(*this))->get_Content(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_Content(&value)); return value; } template void impl_IHtmlPrintDocumentSource::Content(Windows::UI::WebUI::PrintContent value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_Content(value)); } template float impl_IHtmlPrintDocumentSource::LeftMargin() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_LeftMargin(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_LeftMargin(&value)); return value; } template void impl_IHtmlPrintDocumentSource::LeftMargin(float value) const { - check_hresult(static_cast(static_cast(*this))->put_LeftMargin(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_LeftMargin(value)); } template float impl_IHtmlPrintDocumentSource::TopMargin() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_TopMargin(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_TopMargin(&value)); return value; } template void impl_IHtmlPrintDocumentSource::TopMargin(float value) const { - check_hresult(static_cast(static_cast(*this))->put_TopMargin(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_TopMargin(value)); } template float impl_IHtmlPrintDocumentSource::RightMargin() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_RightMargin(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_RightMargin(&value)); return value; } template void impl_IHtmlPrintDocumentSource::RightMargin(float value) const { - check_hresult(static_cast(static_cast(*this))->put_RightMargin(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_RightMargin(value)); } template float impl_IHtmlPrintDocumentSource::BottomMargin() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_BottomMargin(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_BottomMargin(&value)); return value; } template void impl_IHtmlPrintDocumentSource::BottomMargin(float value) const { - check_hresult(static_cast(static_cast(*this))->put_BottomMargin(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_BottomMargin(value)); } template bool impl_IHtmlPrintDocumentSource::EnableHeaderFooter() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_EnableHeaderFooter(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_EnableHeaderFooter(&value)); return value; } template void impl_IHtmlPrintDocumentSource::EnableHeaderFooter(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_EnableHeaderFooter(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_EnableHeaderFooter(value)); } template bool impl_IHtmlPrintDocumentSource::ShrinkToFit() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShrinkToFit(&value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_ShrinkToFit(&value)); return value; } template void impl_IHtmlPrintDocumentSource::ShrinkToFit(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShrinkToFit(value)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_ShrinkToFit(value)); } template float impl_IHtmlPrintDocumentSource::PercentScale() const { float pScalePercent {}; - check_hresult(static_cast(static_cast(*this))->get_PercentScale(&pScalePercent)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_PercentScale(&pScalePercent)); return pScalePercent; } template void impl_IHtmlPrintDocumentSource::PercentScale(float scalePercent) const { - check_hresult(static_cast(static_cast(*this))->put_PercentScale(scalePercent)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->put_PercentScale(scalePercent)); } template hstring impl_IHtmlPrintDocumentSource::PageRange() const { hstring pstrPageRange; - check_hresult(static_cast(static_cast(*this))->get_PageRange(put(pstrPageRange))); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->get_PageRange(put_abi(pstrPageRange))); return pstrPageRange; } -template bool impl_IHtmlPrintDocumentSource::TrySetPageRange(hstring_ref strPageRange) const +template bool impl_IHtmlPrintDocumentSource::TrySetPageRange(hstring_view strPageRange) const { bool pfSuccess {}; - check_hresult(static_cast(static_cast(*this))->abi_TrySetPageRange(get(strPageRange), &pfSuccess)); + check_hresult(WINRT_SHIM(IHtmlPrintDocumentSource)->abi_TrySetPageRange(get_abi(strPageRange), &pfSuccess)); return pfSuccess; } @@ -1080,3 +1124,554 @@ inline Windows::UI::WebUI::IWebUIBackgroundTaskInstance WebUIBackgroundTaskInsta } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IActivatedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IActivatedEventArgsDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IActivatedOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUIActivationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUIActivationStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstance & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstanceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUINavigatedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUINavigatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::IWebUINavigatedOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::ActivatedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::ActivatedOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::EnteredBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::HtmlPrintDocumentSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::LeavingBackgroundEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::SuspendingDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::SuspendingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::SuspendingOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIAppointmentsProviderAddAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIBackgroundTaskInstanceRuntimeClass & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUICachedFileUpdaterActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUICameraSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactMapActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactMessageActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactPostActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIContactVideoCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIDeviceActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIDevicePairingActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIDialReceiverActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFileActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFileOpenPickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFileOpenPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFileSavePickerActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFileSavePickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIFolderPickerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUILaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUILockScreenActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUILockScreenCallActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUINavigatedDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUINavigatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUINavigatedOperation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIPrint3DWorkflowActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIPrintTaskSettingsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIProtocolActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIProtocolForResultsActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIRestrictedLaunchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUISearchActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIShareTargetActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIToastNotificationActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIUserDataAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIVoiceCommandActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIWalletActionActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIWebAccountProviderActivatedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::WebUI::WebUIWebAuthenticationBrokerContinuationEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Peers.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Peers.h index b5663fe27..130ef067d 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Peers.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Peers.h @@ -1,12 +1,15 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + +#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Xaml.Controls.Primitives.3.h" #include "internal/Windows.UI.Xaml.Controls.3.h" #include "internal/Windows.UI.Xaml.Automation.3.h" -#include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.UI.Xaml.Automation.Provider.3.h" #include "internal/Windows.UI.Xaml.3.h" @@ -27,11 +30,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -50,11 +54,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -73,11 +78,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -96,11 +102,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); return S_OK; } catch (...) @@ -114,11 +121,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EventsSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_EventsSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EventsSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EventsSource()); return S_OK; } catch (...) @@ -128,10 +136,11 @@ struct produce : produ } } - HRESULT __stdcall put_EventsSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_EventsSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().EventsSource(*reinterpret_cast(&value)); return S_OK; } @@ -141,11 +150,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetPattern(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPattern(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPattern(patternInterface)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPattern(patternInterface)); return S_OK; } catch (...) @@ -159,6 +169,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().RaiseAutomationEvent(eventId); return S_OK; } @@ -168,11 +179,12 @@ struct produce : produ } } - HRESULT __stdcall abi_RaisePropertyChangedEvent(abi_arg_in automationProperty, abi_arg_in oldValue, abi_arg_in newValue) noexcept override + HRESULT __stdcall abi_RaisePropertyChangedEvent(impl::abi_arg_in automationProperty, impl::abi_arg_in oldValue, impl::abi_arg_in newValue) noexcept override { try { - this->shim().RaisePropertyChangedEvent(*reinterpret_cast(&automationProperty), *reinterpret_cast(&oldValue), *reinterpret_cast(&newValue)); + typename D::abi_guard guard(this->shim()); + this->shim().RaisePropertyChangedEvent(*reinterpret_cast(&automationProperty), *reinterpret_cast(&oldValue), *reinterpret_cast(&newValue)); return S_OK; } catch (...) @@ -181,11 +193,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetAcceleratorKey(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAcceleratorKey(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAcceleratorKey()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAcceleratorKey()); return S_OK; } catch (...) @@ -195,11 +208,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetAccessKey(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAccessKey(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAccessKey()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAccessKey()); return S_OK; } catch (...) @@ -213,7 +227,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().GetAutomationControlType()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAutomationControlType()); return S_OK; } catch (...) @@ -222,11 +237,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetAutomationId(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAutomationId(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAutomationId()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAutomationId()); return S_OK; } catch (...) @@ -236,11 +252,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetBoundingRectangle(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetBoundingRectangle(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetBoundingRectangle()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetBoundingRectangle()); return S_OK; } catch (...) @@ -249,11 +266,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetChildren(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_GetChildren(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetChildren()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetChildren()); return S_OK; } catch (...) @@ -263,11 +281,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetClassName(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetClassName(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetClassName()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetClassName()); return S_OK; } catch (...) @@ -277,11 +296,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetClickablePoint(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetClickablePoint(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetClickablePoint()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetClickablePoint()); return S_OK; } catch (...) @@ -290,11 +310,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetHelpText(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetHelpText(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetHelpText()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetHelpText()); return S_OK; } catch (...) @@ -304,11 +325,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetItemStatus(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItemStatus(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemStatus()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemStatus()); return S_OK; } catch (...) @@ -318,11 +340,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetItemType(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItemType(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemType()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemType()); return S_OK; } catch (...) @@ -332,11 +355,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLabeledBy(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetLabeledBy(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLabeledBy()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLabeledBy()); return S_OK; } catch (...) @@ -346,11 +370,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLocalizedControlType(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetLocalizedControlType(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLocalizedControlType()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLocalizedControlType()); return S_OK; } catch (...) @@ -360,11 +385,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetName(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetName(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetName()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetName()); return S_OK; } catch (...) @@ -378,7 +404,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().GetOrientation()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetOrientation()); return S_OK; } catch (...) @@ -391,7 +418,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().HasKeyboardFocus()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().HasKeyboardFocus()); return S_OK; } catch (...) @@ -404,7 +432,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsContentElement()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsContentElement()); return S_OK; } catch (...) @@ -417,7 +446,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsControlElement()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsControlElement()); return S_OK; } catch (...) @@ -430,7 +460,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -443,7 +474,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsKeyboardFocusable()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsKeyboardFocusable()); return S_OK; } catch (...) @@ -456,7 +488,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsOffscreen()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsOffscreen()); return S_OK; } catch (...) @@ -469,7 +502,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsPassword()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsPassword()); return S_OK; } catch (...) @@ -482,7 +516,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().IsRequiredForForm()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsRequiredForForm()); return S_OK; } catch (...) @@ -495,6 +530,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFocus(); return S_OK; } @@ -504,11 +540,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetParent(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetParent(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetParent()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetParent()); return S_OK; } catch (...) @@ -522,6 +559,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().InvalidatePeer(); return S_OK; } @@ -531,11 +569,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetPeerFromPoint(abi_arg_in point, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPeerFromPoint(impl::abi_arg_in point, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPeerFromPoint(*reinterpret_cast(&point))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPeerFromPoint(*reinterpret_cast(&point))); return S_OK; } catch (...) @@ -549,7 +588,8 @@ struct produce : produ { try { - *returnValue = detach(this->shim().GetLiveSetting()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLiveSetting()); return S_OK; } catch (...) @@ -566,11 +606,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_Navigate(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_Navigate(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().Navigate(direction)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Navigate(direction)); return S_OK; } catch (...) @@ -580,11 +621,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetElementFromPoint(abi_arg_in pointInWindowCoordinates, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetElementFromPoint(impl::abi_arg_in pointInWindowCoordinates, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetElementFromPoint(*reinterpret_cast(&pointInWindowCoordinates))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetElementFromPoint(*reinterpret_cast(&pointInWindowCoordinates))); return S_OK; } catch (...) @@ -594,11 +636,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetFocusedElement(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetFocusedElement(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFocusedElement()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFocusedElement()); return S_OK; } catch (...) @@ -612,6 +655,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowContextMenu(); return S_OK; } @@ -621,11 +665,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetControlledPeers(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_GetControlledPeers(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetControlledPeers()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetControlledPeers()); return S_OK; } catch (...) @@ -635,11 +680,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetAnnotations(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_GetAnnotations(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAnnotations()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAnnotations()); return S_OK; } catch (...) @@ -649,10 +695,11 @@ struct produce : prod } } - HRESULT __stdcall abi_SetParent(abi_arg_in peer) noexcept override + HRESULT __stdcall abi_SetParent(impl::abi_arg_in peer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetParent(*reinterpret_cast(&peer)); return S_OK; } @@ -662,10 +709,11 @@ struct produce : prod } } - HRESULT __stdcall abi_RaiseTextEditTextChangedEvent(Windows::UI::Xaml::Automation::AutomationTextEditChangeType automationTextEditChangeType, abi_arg_in> changedData) noexcept override + HRESULT __stdcall abi_RaiseTextEditTextChangedEvent(Windows::UI::Xaml::Automation::AutomationTextEditChangeType automationTextEditChangeType, impl::abi_arg_in> changedData) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RaiseTextEditTextChangedEvent(automationTextEditChangeType, *reinterpret_cast *>(&changedData)); return S_OK; } @@ -679,7 +727,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().GetPositionInSet()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPositionInSet()); return S_OK; } catch (...) @@ -692,7 +741,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().GetSizeOfSet()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetSizeOfSet()); return S_OK; } catch (...) @@ -705,7 +755,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().GetLevel()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLevel()); return S_OK; } catch (...) @@ -714,10 +765,11 @@ struct produce : prod } } - HRESULT __stdcall abi_RaiseStructureChangedEvent(Windows::UI::Xaml::Automation::Peers::AutomationStructureChangeType structureChangeType, abi_arg_in child) noexcept override + HRESULT __stdcall abi_RaiseStructureChangedEvent(Windows::UI::Xaml::Automation::Peers::AutomationStructureChangeType structureChangeType, impl::abi_arg_in child) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RaiseStructureChangedEvent(structureChangeType, *reinterpret_cast(&child)); return S_OK; } @@ -735,7 +787,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().GetLandmarkType()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLandmarkType()); return S_OK; } catch (...) @@ -744,11 +797,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetLocalizedLandmarkType(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetLocalizedLandmarkType(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLocalizedLandmarkType()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLocalizedLandmarkType()); return S_OK; } catch (...) @@ -766,7 +820,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().IsPeripheral()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsPeripheral()); return S_OK; } catch (...) @@ -779,7 +834,8 @@ struct produce : prod { try { - *returnValue = detach(this->shim().IsDataValidForForm()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsDataValidForForm()); return S_OK; } catch (...) @@ -788,11 +844,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetFullDescription(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetFullDescription(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFullDescription()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFullDescription()); return S_OK; } catch (...) @@ -810,7 +867,8 @@ struct produceshim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -823,6 +881,7 @@ struct produceshim()); this->shim().Type(value); return S_OK; } @@ -832,11 +891,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Peer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Peer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Peer()); return S_OK; } catch (...) @@ -846,10 +906,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Peer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Peer(*reinterpret_cast(&value)); return S_OK; } @@ -863,11 +924,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(type)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(type)); return S_OK; } catch (...) @@ -877,11 +939,12 @@ struct produce peer, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWithPeerParameter(Windows::UI::Xaml::Automation::AnnotationType type, impl::abi_arg_in peer, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWithPeerParameter(type, *reinterpret_cast(&peer))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWithPeerParameter(type, *reinterpret_cast(&peer))); return S_OK; } catch (...) @@ -895,11 +958,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TypeProperty()); return S_OK; } catch (...) @@ -909,11 +973,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PeerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PeerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PeerProperty()); return S_OK; } catch (...) @@ -927,11 +992,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -946,11 +1012,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GetPatternCore(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPatternCore(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPatternCore(patternInterface)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPatternCore(patternInterface)); return S_OK; } catch (...) @@ -960,11 +1027,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetAcceleratorKeyCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAcceleratorKeyCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAcceleratorKeyCore()); return S_OK; } catch (...) @@ -974,11 +1042,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetAccessKeyCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAccessKeyCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAccessKeyCore()); return S_OK; } catch (...) @@ -992,7 +1061,8 @@ struct produceshim().GetAutomationControlTypeCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAutomationControlTypeCore()); return S_OK; } catch (...) @@ -1001,11 +1071,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetAutomationIdCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAutomationIdCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAutomationIdCore()); return S_OK; } catch (...) @@ -1015,11 +1086,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetBoundingRectangleCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetBoundingRectangleCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetBoundingRectangleCore()); return S_OK; } catch (...) @@ -1028,11 +1100,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetChildrenCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetChildrenCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetChildrenCore()); return S_OK; } catch (...) @@ -1042,11 +1115,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetClassNameCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetClassNameCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetClassNameCore()); return S_OK; } catch (...) @@ -1056,11 +1130,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetClickablePointCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetClickablePointCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetClickablePointCore()); return S_OK; } catch (...) @@ -1069,11 +1144,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetHelpTextCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetHelpTextCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetHelpTextCore()); return S_OK; } catch (...) @@ -1083,11 +1159,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetItemStatusCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemStatusCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemStatusCore()); return S_OK; } catch (...) @@ -1097,11 +1174,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetItemTypeCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemTypeCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemTypeCore()); return S_OK; } catch (...) @@ -1111,11 +1189,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetLabeledByCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLabeledByCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLabeledByCore()); return S_OK; } catch (...) @@ -1125,11 +1204,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetLocalizedControlTypeCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLocalizedControlTypeCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLocalizedControlTypeCore()); return S_OK; } catch (...) @@ -1139,11 +1219,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetNameCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNameCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNameCore()); return S_OK; } catch (...) @@ -1157,7 +1238,8 @@ struct produceshim().GetOrientationCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetOrientationCore()); return S_OK; } catch (...) @@ -1170,7 +1252,8 @@ struct produceshim().HasKeyboardFocusCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().HasKeyboardFocusCore()); return S_OK; } catch (...) @@ -1183,7 +1266,8 @@ struct produceshim().IsContentElementCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsContentElementCore()); return S_OK; } catch (...) @@ -1196,7 +1280,8 @@ struct produceshim().IsControlElementCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsControlElementCore()); return S_OK; } catch (...) @@ -1209,7 +1294,8 @@ struct produceshim().IsEnabledCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsEnabledCore()); return S_OK; } catch (...) @@ -1222,7 +1308,8 @@ struct produceshim().IsKeyboardFocusableCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsKeyboardFocusableCore()); return S_OK; } catch (...) @@ -1235,7 +1322,8 @@ struct produceshim().IsOffscreenCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsOffscreenCore()); return S_OK; } catch (...) @@ -1248,7 +1336,8 @@ struct produceshim().IsPasswordCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsPasswordCore()); return S_OK; } catch (...) @@ -1261,7 +1350,8 @@ struct produceshim().IsRequiredForFormCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsRequiredForFormCore()); return S_OK; } catch (...) @@ -1274,6 +1364,7 @@ struct produceshim()); this->shim().SetFocusCore(); return S_OK; } @@ -1283,11 +1374,12 @@ struct produce point, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPeerFromPointCore(impl::abi_arg_in point, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPeerFromPointCore(*reinterpret_cast(&point))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPeerFromPointCore(*reinterpret_cast(&point))); return S_OK; } catch (...) @@ -1301,7 +1393,8 @@ struct produceshim().GetLiveSettingCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLiveSettingCore()); return S_OK; } catch (...) @@ -1318,6 +1411,7 @@ struct produceshim()); this->shim().ShowContextMenuCore(); return S_OK; } @@ -1327,11 +1421,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetControlledPeersCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetControlledPeersCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetControlledPeersCore()); return S_OK; } catch (...) @@ -1345,11 +1440,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_NavigateCore(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_NavigateCore(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().NavigateCore(direction)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().NavigateCore(direction)); return S_OK; } catch (...) @@ -1359,11 +1455,12 @@ struct produce pointInWindowCoordinates, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetElementFromPointCore(impl::abi_arg_in pointInWindowCoordinates, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetElementFromPointCore(*reinterpret_cast(&pointInWindowCoordinates))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetElementFromPointCore(*reinterpret_cast(&pointInWindowCoordinates))); return S_OK; } catch (...) @@ -1373,11 +1470,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetFocusedElementCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFocusedElementCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFocusedElementCore()); return S_OK; } catch (...) @@ -1387,11 +1485,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetAnnotationsCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAnnotationsCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAnnotationsCore()); return S_OK; } catch (...) @@ -1405,7 +1504,8 @@ struct produceshim().GetPositionInSetCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPositionInSetCore()); return S_OK; } catch (...) @@ -1418,7 +1518,8 @@ struct produceshim().GetSizeOfSetCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetSizeOfSetCore()); return S_OK; } catch (...) @@ -1431,7 +1532,8 @@ struct produceshim().GetLevelCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLevelCore()); return S_OK; } catch (...) @@ -1448,7 +1550,8 @@ struct produceshim().GetLandmarkTypeCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLandmarkTypeCore()); return S_OK; } catch (...) @@ -1457,11 +1560,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetLocalizedLandmarkTypeCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLocalizedLandmarkTypeCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLocalizedLandmarkTypeCore()); return S_OK; } catch (...) @@ -1479,7 +1583,8 @@ struct produceshim().IsPeripheralCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsPeripheralCore()); return S_OK; } catch (...) @@ -1492,7 +1597,8 @@ struct produceshim().IsDataValidForFormCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsDataValidForFormCore()); return S_OK; } catch (...) @@ -1501,11 +1607,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetFullDescriptionCore(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFullDescriptionCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFullDescriptionCore()); return S_OK; } catch (...) @@ -1515,11 +1622,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetDescribedByCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetDescribedByCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetDescribedByCore()); return S_OK; } catch (...) @@ -1529,11 +1637,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetFlowsToCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFlowsToCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFlowsToCore()); return S_OK; } catch (...) @@ -1543,11 +1652,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetFlowsFromCore(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetFlowsFromCore()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetFlowsFromCore()); return S_OK; } catch (...) @@ -1561,11 +1671,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_PeerFromProvider(abi_arg_in provider, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_PeerFromProvider(impl::abi_arg_in provider, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().PeerFromProvider(*reinterpret_cast(&provider))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().PeerFromProvider(*reinterpret_cast(&provider))); return S_OK; } catch (...) @@ -1575,11 +1686,12 @@ struct produce peer, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ProviderFromPeer(impl::abi_arg_in peer, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ProviderFromPeer(*reinterpret_cast(&peer))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ProviderFromPeer(*reinterpret_cast(&peer))); return S_OK; } catch (...) @@ -1597,7 +1709,8 @@ struct produce { try { - *returnValue = detach(this->shim().ListenerExists(eventId)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ListenerExists(eventId)); return S_OK; } catch (...) @@ -1610,11 +1723,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_GenerateRawElementProviderRuntimeId(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GenerateRawElementProviderRuntimeId(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GenerateRawElementProviderRuntimeId()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GenerateRawElementProviderRuntimeId()); return S_OK; } catch (...) @@ -1631,11 +1745,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1654,11 +1769,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1677,11 +1793,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1700,11 +1817,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1723,11 +1841,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1746,11 +1865,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1769,11 +1889,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1792,11 +1913,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1819,11 +1941,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1842,11 +1965,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1865,11 +1989,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1888,11 +2013,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1907,11 +2033,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Owner(abi_arg_out value) noexcept override + HRESULT __stdcall get_Owner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Owner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Owner()); return S_OK; } catch (...) @@ -1925,11 +2052,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1944,11 +2072,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromElement(abi_arg_in element, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_FromElement(impl::abi_arg_in element, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FromElement(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FromElement(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1958,11 +2087,12 @@ struct produce element, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreatePeerForElement(impl::abi_arg_in element, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreatePeerForElement(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreatePeerForElement(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1980,11 +2110,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2003,11 +2134,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2026,11 +2158,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2049,11 +2182,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2072,11 +2206,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2095,11 +2230,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2118,11 +2254,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2141,11 +2278,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2164,11 +2302,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2187,11 +2326,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -2201,11 +2341,12 @@ struct produce : p } } - HRESULT __stdcall get_ItemsControlAutomationPeer(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsControlAutomationPeer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsControlAutomationPeer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsControlAutomationPeer()); return S_OK; } catch (...) @@ -2219,11 +2360,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2242,11 +2384,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateItemAutomationPeer(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateItemAutomationPeer(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateItemAutomationPeer(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateItemAutomationPeer(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -2260,11 +2403,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2279,11 +2423,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_OnCreateItemAutomationPeer(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_OnCreateItemAutomationPeer(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().OnCreateItemAutomationPeer(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().OnCreateItemAutomationPeer(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -2301,11 +2446,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2324,11 +2470,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2347,11 +2494,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2374,11 +2522,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2397,11 +2546,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2420,11 +2570,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2443,11 +2594,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2466,11 +2618,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2489,11 +2642,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2528,11 +2682,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2551,11 +2706,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2574,11 +2730,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2597,11 +2754,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2620,11 +2778,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2643,11 +2802,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2670,11 +2830,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); return S_OK; } catch (...) @@ -2692,11 +2853,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner))); return S_OK; } catch (...) @@ -2714,11 +2876,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent))); return S_OK; } catch (...) @@ -2736,11 +2899,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2759,11 +2923,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2782,11 +2947,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2805,11 +2971,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2828,11 +2995,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2851,11 +3019,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2874,11 +3043,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2897,11 +3067,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2920,11 +3091,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2943,11 +3115,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2966,11 +3139,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2989,11 +3163,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3012,11 +3187,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithParentAndItem(abi_arg_in item, abi_arg_in parent, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithParentAndItem(impl::abi_arg_in item, impl::abi_arg_in parent, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithParentAndItem(*reinterpret_cast(&item), *reinterpret_cast(&parent), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3035,11 +3211,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3058,11 +3235,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3081,11 +3259,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3104,11 +3283,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3127,11 +3307,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3150,11 +3331,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3173,11 +3355,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3200,11 +3383,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3223,11 +3407,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3246,11 +3431,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithOwner(abi_arg_in owner, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithOwner(impl::abi_arg_in owner, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithOwner(*reinterpret_cast(&owner), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3266,1276 +3452,1276 @@ struct produce Windows::IInspectable impl_IItemAutomationPeer::Item() const +template Windows::Foundation::IInspectable impl_IItemAutomationPeer::Item() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IItemAutomationPeer)->get_Item(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer impl_IItemAutomationPeer::ItemsControlAutomationPeer() const { Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsControlAutomationPeer(put(value))); + check_hresult(WINRT_SHIM(IItemAutomationPeer)->get_ItemsControlAutomationPeer(put_abi(value))); return value; } -template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IItemAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ButtonBaseAutomationPeer impl_IButtonBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ButtonBase & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ButtonBaseAutomationPeer impl_IButtonBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ButtonBase & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ButtonBaseAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IButtonBaseAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::CaptureElementAutomationPeer impl_ICaptureElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::CaptureElement & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::CaptureElementAutomationPeer impl_ICaptureElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::CaptureElement & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::CaptureElementAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICaptureElementAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ComboBoxItemAutomationPeer impl_IComboBoxItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ComboBoxItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ComboBoxItemAutomationPeer impl_IComboBoxItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ComboBoxItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ComboBoxItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IComboBoxItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::FlipViewItemAutomationPeer impl_IFlipViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlipViewItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::FlipViewItemAutomationPeer impl_IFlipViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlipViewItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::FlipViewItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlipViewItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::GroupItemAutomationPeer impl_IGroupItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GroupItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::GroupItemAutomationPeer impl_IGroupItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GroupItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::GroupItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGroupItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ImageAutomationPeer impl_IImageAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Image & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ImageAutomationPeer impl_IImageAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Image & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ImageAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IImageAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer impl_IItemsControlAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ItemsControl & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer impl_IItemsControlAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ItemsControl & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IItemsControlAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemsControlAutomationPeer2::CreateItemAutomationPeer(const Windows::IInspectable & item) const +template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemsControlAutomationPeer2::CreateItemAutomationPeer(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateItemAutomationPeer(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControlAutomationPeer2)->abi_CreateItemAutomationPeer(get_abi(item), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemsControlAutomationPeerOverrides2::OnCreateItemAutomationPeer(const Windows::IInspectable & item) const +template Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer impl_IItemsControlAutomationPeerOverrides2::OnCreateItemAutomationPeer(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_OnCreateItemAutomationPeer(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControlAutomationPeerOverrides2)->abi_OnCreateItemAutomationPeer(get_abi(item), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Automation::Peers::ListBoxItemAutomationPeer impl_IListBoxItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListBoxItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListBoxItemAutomationPeer impl_IListBoxItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListBoxItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListBoxItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListBoxItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::MediaTransportControlsAutomationPeer impl_IMediaTransportControlsAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaTransportControls & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::MediaTransportControlsAutomationPeer impl_IMediaTransportControlsAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaTransportControls & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::MediaTransportControlsAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaTransportControlsAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::PasswordBoxAutomationPeer impl_IPasswordBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::PasswordBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::PasswordBoxAutomationPeer impl_IPasswordBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::PasswordBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::PasswordBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IPasswordBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ProgressRingAutomationPeer impl_IProgressRingAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ProgressRing & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ProgressRingAutomationPeer impl_IProgressRingAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ProgressRing & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ProgressRingAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IProgressRingAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RangeBaseAutomationPeer impl_IRangeBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::RangeBase & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RangeBaseAutomationPeer impl_IRangeBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::RangeBase & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RangeBaseAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRangeBaseAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RichEditBoxAutomationPeer impl_IRichEditBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichEditBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RichEditBoxAutomationPeer impl_IRichEditBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichEditBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RichEditBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRichEditBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RichTextBlockAutomationPeer impl_IRichTextBlockAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichTextBlock & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RichTextBlockAutomationPeer impl_IRichTextBlockAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichTextBlock & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RichTextBlockAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRichTextBlockAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RichTextBlockOverflowAutomationPeer impl_IRichTextBlockOverflowAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichTextBlockOverflow & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RichTextBlockOverflowAutomationPeer impl_IRichTextBlockOverflowAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RichTextBlockOverflow & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RichTextBlockOverflowAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflowAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SelectorItemAutomationPeer impl_ISelectorItemAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SelectorItemAutomationPeer impl_ISelectorItemAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SelectorItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISelectorItemAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SemanticZoomAutomationPeer impl_ISemanticZoomAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SemanticZoom & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SemanticZoomAutomationPeer impl_ISemanticZoomAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SemanticZoom & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SemanticZoomAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISemanticZoomAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SettingsFlyoutAutomationPeer impl_ISettingsFlyoutAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SettingsFlyout & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SettingsFlyoutAutomationPeer impl_ISettingsFlyoutAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SettingsFlyout & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SettingsFlyoutAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISettingsFlyoutAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::TextBlockAutomationPeer impl_ITextBlockAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TextBlock & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::TextBlockAutomationPeer impl_ITextBlockAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TextBlock & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::TextBlockAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ITextBlockAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::TextBoxAutomationPeer impl_ITextBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TextBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::TextBoxAutomationPeer impl_ITextBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TextBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::TextBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ITextBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ThumbAutomationPeer impl_IThumbAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::Thumb & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ThumbAutomationPeer impl_IThumbAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::Thumb & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ThumbAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IThumbAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ToggleSwitchAutomationPeer impl_IToggleSwitchAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ToggleSwitch & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ToggleSwitchAutomationPeer impl_IToggleSwitchAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ToggleSwitch & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ToggleSwitchAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IToggleSwitchAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ButtonAutomationPeer impl_IButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Button & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ButtonAutomationPeer impl_IButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Button & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ComboBoxItemDataAutomationPeer impl_IComboBoxItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ComboBoxItemDataAutomationPeer impl_IComboBoxItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ComboBoxItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IComboBoxItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::FlipViewItemDataAutomationPeer impl_IFlipViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::FlipViewItemDataAutomationPeer impl_IFlipViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::FlipViewItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlipViewItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::HyperlinkButtonAutomationPeer impl_IHyperlinkButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::HyperlinkButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::HyperlinkButtonAutomationPeer impl_IHyperlinkButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::HyperlinkButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::HyperlinkButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHyperlinkButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListBoxItemDataAutomationPeer impl_IListBoxItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListBoxItemDataAutomationPeer impl_IListBoxItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListBoxItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListBoxItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ProgressBarAutomationPeer impl_IProgressBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ProgressBar & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ProgressBarAutomationPeer impl_IProgressBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ProgressBar & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ProgressBarAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IProgressBarAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RepeatButtonAutomationPeer impl_IRepeatButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::RepeatButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RepeatButtonAutomationPeer impl_IRepeatButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::RepeatButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RepeatButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRepeatButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ScrollBarAutomationPeer impl_IScrollBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ScrollBar & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ScrollBarAutomationPeer impl_IScrollBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ScrollBar & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ScrollBarAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IScrollBarAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer impl_ISelectorAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::Selector & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer impl_ISelectorAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::Selector & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISelectorAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SliderAutomationPeer impl_ISliderAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Slider & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SliderAutomationPeer impl_ISliderAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Slider & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SliderAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISliderAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ToggleButtonAutomationPeer impl_IToggleButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ToggleButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ToggleButtonAutomationPeer impl_IToggleButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Primitives::ToggleButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ToggleButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IToggleButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::CheckBoxAutomationPeer impl_ICheckBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::CheckBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::CheckBoxAutomationPeer impl_ICheckBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::CheckBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::CheckBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICheckBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer impl_IComboBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ComboBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer impl_IComboBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ComboBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IComboBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer impl_IFlipViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlipView & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer impl_IFlipViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlipView & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlipViewAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer impl_IListBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer impl_IListBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::RadioButtonAutomationPeer impl_IRadioButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RadioButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::RadioButtonAutomationPeer impl_IRadioButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::RadioButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::RadioButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRadioButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::AppBarAutomationPeer impl_IAppBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBar & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::AppBarAutomationPeer impl_IAppBarAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBar & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::AppBarAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAppBarAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::Peers::AutoSuggestBoxAutomationPeer impl_IAutoSuggestBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AutoSuggestBox & owner) const { Windows::UI::Xaml::Automation::Peers::AutoSuggestBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), put(instance))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::DatePickerAutomationPeer impl_IDatePickerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::DatePicker & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::DatePickerAutomationPeer impl_IDatePickerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::DatePicker & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::DatePickerAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDatePickerAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::FlyoutPresenterAutomationPeer impl_IFlyoutPresenterAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlyoutPresenter & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::FlyoutPresenterAutomationPeer impl_IFlyoutPresenterAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::FlyoutPresenter & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::FlyoutPresenterAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlyoutPresenterAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::GridViewItemAutomationPeer impl_IGridViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridViewItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::GridViewItemAutomationPeer impl_IGridViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridViewItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::GridViewItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridViewItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::HubAutomationPeer impl_IHubAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Hub & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::HubAutomationPeer impl_IHubAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Hub & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::HubAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHubAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::HubSectionAutomationPeer impl_IHubSectionAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::HubSection & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::HubSectionAutomationPeer impl_IHubSectionAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::HubSection & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::HubSectionAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHubSectionAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewBaseHeaderItemAutomationPeer impl_IListViewBaseHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewBaseHeaderItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewBaseHeaderItemAutomationPeer impl_IListViewBaseHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewBaseHeaderItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewBaseHeaderItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewBaseHeaderItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewItemAutomationPeer impl_IListViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewItemAutomationPeer impl_IListViewItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::MediaElementAutomationPeer impl_IMediaElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaElement & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::MediaElementAutomationPeer impl_IMediaElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaElement & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::MediaElementAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaElementAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::MediaPlayerElementAutomationPeer impl_IMediaPlayerElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaPlayerElement & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::MediaPlayerElementAutomationPeer impl_IMediaPlayerElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MediaPlayerElement & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::MediaPlayerElementAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaPlayerElementAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::MenuFlyoutItemAutomationPeer impl_IMenuFlyoutItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MenuFlyoutItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::MenuFlyoutItemAutomationPeer impl_IMenuFlyoutItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MenuFlyoutItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::MenuFlyoutItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMenuFlyoutItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ScrollViewerAutomationPeer impl_IScrollViewerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ScrollViewer & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ScrollViewerAutomationPeer impl_IScrollViewerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ScrollViewer & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ScrollViewerAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IScrollViewerAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::SearchBoxAutomationPeer impl_ISearchBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SearchBox & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::SearchBoxAutomationPeer impl_ISearchBoxAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::SearchBox & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::SearchBoxAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISearchBoxAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::TimePickerAutomationPeer impl_ITimePickerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TimePicker & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::TimePickerAutomationPeer impl_ITimePickerAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::TimePicker & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::TimePickerAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ITimePickerAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ToggleMenuFlyoutItemAutomationPeer impl_IToggleMenuFlyoutItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ToggleMenuFlyoutItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ToggleMenuFlyoutItemAutomationPeer impl_IToggleMenuFlyoutItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ToggleMenuFlyoutItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ToggleMenuFlyoutItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IToggleMenuFlyoutItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::GridViewHeaderItemAutomationPeer impl_IGridViewHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridViewHeaderItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::GridViewHeaderItemAutomationPeer impl_IGridViewHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridViewHeaderItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::GridViewHeaderItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridViewHeaderItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::GridViewItemDataAutomationPeer impl_IGridViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::GridViewItemDataAutomationPeer impl_IGridViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::GridViewItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridViewItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewHeaderItemAutomationPeer impl_IListViewHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewHeaderItem & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewHeaderItemAutomationPeer impl_IListViewHeaderItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewHeaderItem & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewHeaderItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewHeaderItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewItemDataAutomationPeer impl_IListViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer & parent, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewItemDataAutomationPeer impl_IListViewItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer & parent, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::MenuFlyoutPresenterAutomationPeer impl_IMenuFlyoutPresenterAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MenuFlyoutPresenter & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::MenuFlyoutPresenterAutomationPeer impl_IMenuFlyoutPresenterAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::MenuFlyoutPresenter & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::MenuFlyoutPresenterAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMenuFlyoutPresenterAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::AppBarButtonAutomationPeer impl_IAppBarButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBarButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::AppBarButtonAutomationPeer impl_IAppBarButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBarButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::AppBarButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAppBarButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::AppBarToggleButtonAutomationPeer impl_IAppBarToggleButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBarToggleButton & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::AppBarToggleButtonAutomationPeer impl_IAppBarToggleButtonAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::AppBarToggleButton & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::AppBarToggleButtonAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAppBarToggleButtonAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer impl_IListViewBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewBase & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer impl_IListViewBaseAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListViewBase & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewBaseAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer impl_IGridViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridView & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer impl_IGridViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::GridView & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridViewAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::ListViewAutomationPeer impl_IListViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListView & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::ListViewAutomationPeer impl_IListViewAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::ListView & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::ListViewAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeer::EventsSource() const { Windows::UI::Xaml::Automation::Peers::AutomationPeer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EventsSource(put(value))); + check_hresult(WINRT_SHIM(IAutomationPeer)->get_EventsSource(put_abi(value))); return value; } template void impl_IAutomationPeer::EventsSource(const Windows::UI::Xaml::Automation::Peers::AutomationPeer & value) const { - check_hresult(static_cast(static_cast(*this))->put_EventsSource(get(value))); + check_hresult(WINRT_SHIM(IAutomationPeer)->put_EventsSource(get_abi(value))); } -template Windows::IInspectable impl_IAutomationPeer::GetPattern(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface) const +template Windows::Foundation::IInspectable impl_IAutomationPeer::GetPattern(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetPattern(patternInterface, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetPattern(patternInterface, put_abi(returnValue))); return returnValue; } template void impl_IAutomationPeer::RaiseAutomationEvent(Windows::UI::Xaml::Automation::Peers::AutomationEvents eventId) const { - check_hresult(static_cast(static_cast(*this))->abi_RaiseAutomationEvent(eventId)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_RaiseAutomationEvent(eventId)); } -template void impl_IAutomationPeer::RaisePropertyChangedEvent(const Windows::UI::Xaml::Automation::AutomationProperty & automationProperty, const Windows::IInspectable & oldValue, const Windows::IInspectable & newValue) const +template void impl_IAutomationPeer::RaisePropertyChangedEvent(const Windows::UI::Xaml::Automation::AutomationProperty & automationProperty, const Windows::Foundation::IInspectable & oldValue, const Windows::Foundation::IInspectable & newValue) const { - check_hresult(static_cast(static_cast(*this))->abi_RaisePropertyChangedEvent(get(automationProperty), get(oldValue), get(newValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_RaisePropertyChangedEvent(get_abi(automationProperty), get_abi(oldValue), get_abi(newValue))); } template hstring impl_IAutomationPeer::GetAcceleratorKey() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAcceleratorKey(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetAcceleratorKey(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetAccessKey() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessKey(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetAccessKey(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationControlType impl_IAutomationPeer::GetAutomationControlType() const { Windows::UI::Xaml::Automation::Peers::AutomationControlType returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAutomationControlType(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetAutomationControlType(&returnValue)); return returnValue; } template hstring impl_IAutomationPeer::GetAutomationId() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAutomationId(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetAutomationId(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Rect impl_IAutomationPeer::GetBoundingRectangle() const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetBoundingRectangle(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetBoundingRectangle(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVector impl_IAutomationPeer::GetChildren() const { Windows::Foundation::Collections::IVector returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetChildren(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetChildren(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetClassName() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetClassName(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetClassName(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Point impl_IAutomationPeer::GetClickablePoint() const { Windows::Foundation::Point returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetClickablePoint(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetClickablePoint(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetHelpText() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetHelpText(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetHelpText(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetItemStatus() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetItemStatus(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetItemStatus(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetItemType() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetItemType(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetItemType(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeer::GetLabeledBy() const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLabeledBy(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetLabeledBy(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetLocalizedControlType() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedControlType(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetLocalizedControlType(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeer::GetName() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetName(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetName(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationOrientation impl_IAutomationPeer::GetOrientation() const { Windows::UI::Xaml::Automation::Peers::AutomationOrientation returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetOrientation(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetOrientation(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::HasKeyboardFocus() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_HasKeyboardFocus(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_HasKeyboardFocus(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsContentElement() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsContentElement(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsContentElement(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsControlElement() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsControlElement(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsControlElement(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsEnabled() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnabled(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsEnabled(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsKeyboardFocusable() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsKeyboardFocusable(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsKeyboardFocusable(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsOffscreen() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsOffscreen(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsOffscreen(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsPassword() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPassword(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsPassword(&returnValue)); return returnValue; } template bool impl_IAutomationPeer::IsRequiredForForm() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsRequiredForForm(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_IsRequiredForForm(&returnValue)); return returnValue; } template void impl_IAutomationPeer::SetFocus() const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocus()); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_SetFocus()); } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeer::GetParent() const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetParent(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetParent(put_abi(returnValue))); return returnValue; } template void impl_IAutomationPeer::InvalidatePeer() const { - check_hresult(static_cast(static_cast(*this))->abi_InvalidatePeer()); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_InvalidatePeer()); } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeer::GetPeerFromPoint(const Windows::Foundation::Point & point) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPeerFromPoint(get(point), put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetPeerFromPoint(get_abi(point), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting impl_IAutomationPeer::GetLiveSetting() const { Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLiveSetting(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer)->abi_GetLiveSetting(&returnValue)); return returnValue; } -template Windows::IInspectable impl_IAutomationPeerOverrides::GetPatternCore(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface) const +template Windows::Foundation::IInspectable impl_IAutomationPeerOverrides::GetPatternCore(Windows::UI::Xaml::Automation::Peers::PatternInterface patternInterface) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetPatternCore(patternInterface, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetPatternCore(patternInterface, put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetAcceleratorKeyCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAcceleratorKeyCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetAcceleratorKeyCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetAccessKeyCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessKeyCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetAccessKeyCore(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationControlType impl_IAutomationPeerOverrides::GetAutomationControlTypeCore() const { Windows::UI::Xaml::Automation::Peers::AutomationControlType returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAutomationControlTypeCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetAutomationControlTypeCore(&returnValue)); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetAutomationIdCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAutomationIdCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetAutomationIdCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Rect impl_IAutomationPeerOverrides::GetBoundingRectangleCore() const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetBoundingRectangleCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetBoundingRectangleCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVector impl_IAutomationPeerOverrides::GetChildrenCore() const { Windows::Foundation::Collections::IVector returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetChildrenCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetChildrenCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetClassNameCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetClassNameCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetClassNameCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Point impl_IAutomationPeerOverrides::GetClickablePointCore() const { Windows::Foundation::Point returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetClickablePointCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetClickablePointCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetHelpTextCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetHelpTextCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetHelpTextCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetItemStatusCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetItemStatusCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetItemStatusCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetItemTypeCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetItemTypeCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetItemTypeCore(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerOverrides::GetLabeledByCore() const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLabeledByCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetLabeledByCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetLocalizedControlTypeCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedControlTypeCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetLocalizedControlTypeCore(put_abi(returnValue))); return returnValue; } template hstring impl_IAutomationPeerOverrides::GetNameCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetNameCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetNameCore(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationOrientation impl_IAutomationPeerOverrides::GetOrientationCore() const { Windows::UI::Xaml::Automation::Peers::AutomationOrientation returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetOrientationCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetOrientationCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::HasKeyboardFocusCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_HasKeyboardFocusCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_HasKeyboardFocusCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsContentElementCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsContentElementCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsContentElementCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsControlElementCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsControlElementCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsControlElementCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsEnabledCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsEnabledCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsEnabledCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsKeyboardFocusableCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsKeyboardFocusableCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsKeyboardFocusableCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsOffscreenCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsOffscreenCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsOffscreenCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsPasswordCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPasswordCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsPasswordCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides::IsRequiredForFormCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsRequiredForFormCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_IsRequiredForFormCore(&returnValue)); return returnValue; } template void impl_IAutomationPeerOverrides::SetFocusCore() const { - check_hresult(static_cast(static_cast(*this))->abi_SetFocusCore()); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_SetFocusCore()); } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerOverrides::GetPeerFromPointCore(const Windows::Foundation::Point & point) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPeerFromPointCore(get(point), put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetPeerFromPointCore(get_abi(point), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting impl_IAutomationPeerOverrides::GetLiveSettingCore() const { Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLiveSettingCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides)->abi_GetLiveSettingCore(&returnValue)); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerProtected::PeerFromProvider(const Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & provider) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_PeerFromProvider(get(provider), put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerProtected)->abi_PeerFromProvider(get_abi(provider), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IAutomationPeerProtected::ProviderFromPeer(const Windows::UI::Xaml::Automation::Peers::AutomationPeer & peer) const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ProviderFromPeer(get(peer), put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerProtected)->abi_ProviderFromPeer(get_abi(peer), put_abi(returnValue))); return returnValue; } template bool impl_IAutomationPeerStatics::ListenerExists(Windows::UI::Xaml::Automation::Peers::AutomationEvents eventId) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_ListenerExists(eventId, &returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerStatics)->abi_ListenerExists(eventId, &returnValue)); return returnValue; } -template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAutomationPeerFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template void impl_IAutomationPeerOverrides2::ShowContextMenuCore() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContextMenuCore()); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides2)->abi_ShowContextMenuCore()); } template Windows::Foundation::Collections::IVectorView impl_IAutomationPeerOverrides2::GetControlledPeersCore() const { Windows::Foundation::Collections::IVectorView returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetControlledPeersCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides2)->abi_GetControlledPeersCore(put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IAutomationPeer3::Navigate(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const +template Windows::Foundation::IInspectable impl_IAutomationPeer3::Navigate(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_Navigate(direction, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_Navigate(direction, put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IAutomationPeer3::GetElementFromPoint(const Windows::Foundation::Point & pointInWindowCoordinates) const +template Windows::Foundation::IInspectable impl_IAutomationPeer3::GetElementFromPoint(const Windows::Foundation::Point & pointInWindowCoordinates) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetElementFromPoint(get(pointInWindowCoordinates), put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetElementFromPoint(get_abi(pointInWindowCoordinates), put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IAutomationPeer3::GetFocusedElement() const +template Windows::Foundation::IInspectable impl_IAutomationPeer3::GetFocusedElement() const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFocusedElement(put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetFocusedElement(put_abi(returnValue))); return returnValue; } template void impl_IAutomationPeer3::ShowContextMenu() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContextMenu()); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_ShowContextMenu()); } template Windows::Foundation::Collections::IVectorView impl_IAutomationPeer3::GetControlledPeers() const { Windows::Foundation::Collections::IVectorView returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetControlledPeers(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetControlledPeers(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVector impl_IAutomationPeer3::GetAnnotations() const { Windows::Foundation::Collections::IVector returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotations(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetAnnotations(put_abi(returnValue))); return returnValue; } template void impl_IAutomationPeer3::SetParent(const Windows::UI::Xaml::Automation::Peers::AutomationPeer & peer) const { - check_hresult(static_cast(static_cast(*this))->abi_SetParent(get(peer))); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_SetParent(get_abi(peer))); } -template void impl_IAutomationPeer3::RaiseTextEditTextChangedEvent(Windows::UI::Xaml::Automation::AutomationTextEditChangeType automationTextEditChangeType, const Windows::Foundation::Collections::IVectorView & changedData) const +template void impl_IAutomationPeer3::RaiseTextEditTextChangedEvent(Windows::UI::Xaml::Automation::AutomationTextEditChangeType automationTextEditChangeType, vector_view changedData) const { - check_hresult(static_cast(static_cast(*this))->abi_RaiseTextEditTextChangedEvent(automationTextEditChangeType, get(changedData))); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_RaiseTextEditTextChangedEvent(automationTextEditChangeType, get_abi(changedData))); } template int32_t impl_IAutomationPeer3::GetPositionInSet() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPositionInSet(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetPositionInSet(&returnValue)); return returnValue; } template int32_t impl_IAutomationPeer3::GetSizeOfSet() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSizeOfSet(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetSizeOfSet(&returnValue)); return returnValue; } template int32_t impl_IAutomationPeer3::GetLevel() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLevel(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_GetLevel(&returnValue)); return returnValue; } template void impl_IAutomationPeer3::RaiseStructureChangedEvent(Windows::UI::Xaml::Automation::Peers::AutomationStructureChangeType structureChangeType, const Windows::UI::Xaml::Automation::Peers::AutomationPeer & child) const { - check_hresult(static_cast(static_cast(*this))->abi_RaiseStructureChangedEvent(structureChangeType, get(child))); + check_hresult(WINRT_SHIM(IAutomationPeer3)->abi_RaiseStructureChangedEvent(structureChangeType, get_abi(child))); } -template Windows::IInspectable impl_IAutomationPeerOverrides3::NavigateCore(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const +template Windows::Foundation::IInspectable impl_IAutomationPeerOverrides3::NavigateCore(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_NavigateCore(direction, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_NavigateCore(direction, put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IAutomationPeerOverrides3::GetElementFromPointCore(const Windows::Foundation::Point & pointInWindowCoordinates) const +template Windows::Foundation::IInspectable impl_IAutomationPeerOverrides3::GetElementFromPointCore(const Windows::Foundation::Point & pointInWindowCoordinates) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetElementFromPointCore(get(pointInWindowCoordinates), put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetElementFromPointCore(get_abi(pointInWindowCoordinates), put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IAutomationPeerOverrides3::GetFocusedElementCore() const +template Windows::Foundation::IInspectable impl_IAutomationPeerOverrides3::GetFocusedElementCore() const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFocusedElementCore(put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetFocusedElementCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IVector impl_IAutomationPeerOverrides3::GetAnnotationsCore() const { Windows::Foundation::Collections::IVector returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotationsCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetAnnotationsCore(put_abi(returnValue))); return returnValue; } template int32_t impl_IAutomationPeerOverrides3::GetPositionInSetCore() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPositionInSetCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetPositionInSetCore(&returnValue)); return returnValue; } template int32_t impl_IAutomationPeerOverrides3::GetSizeOfSetCore() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSizeOfSetCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetSizeOfSetCore(&returnValue)); return returnValue; } template int32_t impl_IAutomationPeerOverrides3::GetLevelCore() const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLevelCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides3)->abi_GetLevelCore(&returnValue)); return returnValue; } template Windows::UI::Xaml::Automation::Peers::RawElementProviderRuntimeId impl_IAutomationPeerStatics3::GenerateRawElementProviderRuntimeId() const { Windows::UI::Xaml::Automation::Peers::RawElementProviderRuntimeId returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GenerateRawElementProviderRuntimeId(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerStatics3)->abi_GenerateRawElementProviderRuntimeId(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType impl_IAutomationPeer4::GetLandmarkType() const { Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLandmarkType(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer4)->abi_GetLandmarkType(&returnValue)); return returnValue; } template hstring impl_IAutomationPeer4::GetLocalizedLandmarkType() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedLandmarkType(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer4)->abi_GetLocalizedLandmarkType(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType impl_IAutomationPeerOverrides4::GetLandmarkTypeCore() const { Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLandmarkTypeCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides4)->abi_GetLandmarkTypeCore(&returnValue)); return returnValue; } template hstring impl_IAutomationPeerOverrides4::GetLocalizedLandmarkTypeCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedLandmarkTypeCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides4)->abi_GetLocalizedLandmarkTypeCore(put_abi(returnValue))); return returnValue; } template bool impl_IAutomationPeer5::IsPeripheral() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPeripheral(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer5)->abi_IsPeripheral(&returnValue)); return returnValue; } template bool impl_IAutomationPeer5::IsDataValidForForm() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsDataValidForForm(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeer5)->abi_IsDataValidForForm(&returnValue)); return returnValue; } template hstring impl_IAutomationPeer5::GetFullDescription() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFullDescription(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeer5)->abi_GetFullDescription(put_abi(returnValue))); return returnValue; } template bool impl_IAutomationPeerOverrides5::IsPeripheralCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsPeripheralCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_IsPeripheralCore(&returnValue)); return returnValue; } template bool impl_IAutomationPeerOverrides5::IsDataValidForFormCore() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsDataValidForFormCore(&returnValue)); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_IsDataValidForFormCore(&returnValue)); return returnValue; } template hstring impl_IAutomationPeerOverrides5::GetFullDescriptionCore() const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFullDescriptionCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_GetFullDescriptionCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IIterable impl_IAutomationPeerOverrides5::GetDescribedByCore() const { Windows::Foundation::Collections::IIterable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetDescribedByCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_GetDescribedByCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IIterable impl_IAutomationPeerOverrides5::GetFlowsToCore() const { Windows::Foundation::Collections::IIterable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFlowsToCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_GetFlowsToCore(put_abi(returnValue))); return returnValue; } template Windows::Foundation::Collections::IIterable impl_IAutomationPeerOverrides5::GetFlowsFromCore() const { Windows::Foundation::Collections::IIterable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetFlowsFromCore(put(returnValue))); + check_hresult(WINRT_SHIM(IAutomationPeerOverrides5)->abi_GetFlowsFromCore(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::AnnotationType impl_IAutomationPeerAnnotation::Type() const { Windows::UI::Xaml::Automation::AnnotationType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotation)->get_Type(&value)); return value; } template void impl_IAutomationPeerAnnotation::Type(Windows::UI::Xaml::Automation::AnnotationType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotation)->put_Type(value)); } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IAutomationPeerAnnotation::Peer() const { Windows::UI::Xaml::Automation::Peers::AutomationPeer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Peer(put(value))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotation)->get_Peer(put_abi(value))); return value; } template void impl_IAutomationPeerAnnotation::Peer(const Windows::UI::Xaml::Automation::Peers::AutomationPeer & value) const { - check_hresult(static_cast(static_cast(*this))->put_Peer(get(value))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotation)->put_Peer(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPeerAnnotationStatics::TypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotationStatics)->get_TypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPeerAnnotationStatics::PeerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PeerProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotationStatics)->get_PeerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::AutomationPeerAnnotation impl_IAutomationPeerAnnotationFactory::CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type) const { Windows::UI::Xaml::Automation::Peers::AutomationPeerAnnotation instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(type, put(instance))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotationFactory)->abi_CreateInstance(type, put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::Peers::AutomationPeerAnnotation impl_IAutomationPeerAnnotationFactory::CreateWithPeerParameter(Windows::UI::Xaml::Automation::AnnotationType type, const Windows::UI::Xaml::Automation::Peers::AutomationPeer & peer) const { Windows::UI::Xaml::Automation::Peers::AutomationPeerAnnotation instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithPeerParameter(type, get(peer), put(instance))); + check_hresult(WINRT_SHIM(IAutomationPeerAnnotationFactory)->abi_CreateWithPeerParameter(type, get_abi(peer), put_abi(instance))); return instance; } template Windows::UI::Xaml::UIElement impl_IFrameworkElementAutomationPeer::Owner() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Owner(put(value))); + check_hresult(WINRT_SHIM(IFrameworkElementAutomationPeer)->get_Owner(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IFrameworkElementAutomationPeerStatics::FromElement(const Windows::UI::Xaml::UIElement & element) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FromElement(get(element), put(returnValue))); + check_hresult(WINRT_SHIM(IFrameworkElementAutomationPeerStatics)->abi_FromElement(get_abi(element), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Peers::AutomationPeer impl_IFrameworkElementAutomationPeerStatics::CreatePeerForElement(const Windows::UI::Xaml::UIElement & element) const { Windows::UI::Xaml::Automation::Peers::AutomationPeer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePeerForElement(get(element), put(returnValue))); + check_hresult(WINRT_SHIM(IFrameworkElementAutomationPeerStatics)->abi_CreatePeerForElement(get_abi(element), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Automation::Peers::FrameworkElementAutomationPeer impl_IFrameworkElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::FrameworkElement & owner, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Automation::Peers::FrameworkElementAutomationPeer impl_IFrameworkElementAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::FrameworkElement & owner, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Automation::Peers::FrameworkElementAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFrameworkElementAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::Peers::PivotItemAutomationPeer impl_IPivotItemAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::PivotItem & owner) const { Windows::UI::Xaml::Automation::Peers::PivotItemAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), put(instance))); + check_hresult(WINRT_SHIM(IPivotItemAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Automation::Peers::PivotItemDataAutomationPeer impl_IPivotItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer & parent) const +template Windows::UI::Xaml::Automation::Peers::PivotItemDataAutomationPeer impl_IPivotItemDataAutomationPeerFactory::CreateInstanceWithParentAndItem(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer & parent) const { Windows::UI::Xaml::Automation::Peers::PivotItemDataAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithParentAndItem(get(item), get(parent), put(instance))); + check_hresult(WINRT_SHIM(IPivotItemDataAutomationPeerFactory)->abi_CreateInstanceWithParentAndItem(get_abi(item), get_abi(parent), put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer impl_IPivotAutomationPeerFactory::CreateInstanceWithOwner(const Windows::UI::Xaml::Controls::Pivot & owner) const { Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithOwner(get(owner), put(instance))); + check_hresult(WINRT_SHIM(IPivotAutomationPeerFactory)->abi_CreateInstanceWithOwner(get_abi(owner), put_abi(instance))); return instance; } inline AppBarAutomationPeer::AppBarAutomationPeer(const Windows::UI::Xaml::Controls::AppBar & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline AppBarButtonAutomationPeer::AppBarButtonAutomationPeer(const Windows::UI::Xaml::Controls::AppBarButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline AppBarToggleButtonAutomationPeer::AppBarToggleButtonAutomationPeer(const Windows::UI::Xaml::Controls::AppBarToggleButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } @@ -4577,73 +4763,73 @@ inline Windows::UI::Xaml::DependencyProperty AutomationPeerAnnotation::PeerPrope inline ButtonAutomationPeer::ButtonAutomationPeer(const Windows::UI::Xaml::Controls::Button & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline CaptureElementAutomationPeer::CaptureElementAutomationPeer(const Windows::UI::Xaml::Controls::CaptureElement & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline CheckBoxAutomationPeer::CheckBoxAutomationPeer(const Windows::UI::Xaml::Controls::CheckBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ComboBoxAutomationPeer::ComboBoxAutomationPeer(const Windows::UI::Xaml::Controls::ComboBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ComboBoxItemAutomationPeer::ComboBoxItemAutomationPeer(const Windows::UI::Xaml::Controls::ComboBoxItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline ComboBoxItemDataAutomationPeer::ComboBoxItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer & parent) +inline ComboBoxItemDataAutomationPeer::ComboBoxItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline DatePickerAutomationPeer::DatePickerAutomationPeer(const Windows::UI::Xaml::Controls::DatePicker & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline FlipViewAutomationPeer::FlipViewAutomationPeer(const Windows::UI::Xaml::Controls::FlipView & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline FlipViewItemAutomationPeer::FlipViewItemAutomationPeer(const Windows::UI::Xaml::Controls::FlipViewItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline FlipViewItemDataAutomationPeer::FlipViewItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer & parent) +inline FlipViewItemDataAutomationPeer::FlipViewItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline FlyoutPresenterAutomationPeer::FlyoutPresenterAutomationPeer(const Windows::UI::Xaml::Controls::FlyoutPresenter & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline FrameworkElementAutomationPeer::FrameworkElementAutomationPeer(const Windows::UI::Xaml::FrameworkElement & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } @@ -4659,151 +4845,151 @@ inline Windows::UI::Xaml::Automation::Peers::AutomationPeer FrameworkElementAuto inline GridViewAutomationPeer::GridViewAutomationPeer(const Windows::UI::Xaml::Controls::GridView & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline GridViewHeaderItemAutomationPeer::GridViewHeaderItemAutomationPeer(const Windows::UI::Xaml::Controls::GridViewHeaderItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline GridViewItemAutomationPeer::GridViewItemAutomationPeer(const Windows::UI::Xaml::Controls::GridViewItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline GridViewItemDataAutomationPeer::GridViewItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer & parent) +inline GridViewItemDataAutomationPeer::GridViewItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline GroupItemAutomationPeer::GroupItemAutomationPeer(const Windows::UI::Xaml::Controls::GroupItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline HubAutomationPeer::HubAutomationPeer(const Windows::UI::Xaml::Controls::Hub & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline HubSectionAutomationPeer::HubSectionAutomationPeer(const Windows::UI::Xaml::Controls::HubSection & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline HyperlinkButtonAutomationPeer::HyperlinkButtonAutomationPeer(const Windows::UI::Xaml::Controls::HyperlinkButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ImageAutomationPeer::ImageAutomationPeer(const Windows::UI::Xaml::Controls::Image & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline ItemAutomationPeer::ItemAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer & parent) +inline ItemAutomationPeer::ItemAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline ItemsControlAutomationPeer::ItemsControlAutomationPeer(const Windows::UI::Xaml::Controls::ItemsControl & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ListBoxAutomationPeer::ListBoxAutomationPeer(const Windows::UI::Xaml::Controls::ListBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ListBoxItemAutomationPeer::ListBoxItemAutomationPeer(const Windows::UI::Xaml::Controls::ListBoxItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline ListBoxItemDataAutomationPeer::ListBoxItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer & parent) +inline ListBoxItemDataAutomationPeer::ListBoxItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline ListViewAutomationPeer::ListViewAutomationPeer(const Windows::UI::Xaml::Controls::ListView & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ListViewBaseAutomationPeer::ListViewBaseAutomationPeer(const Windows::UI::Xaml::Controls::ListViewBase & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ListViewHeaderItemAutomationPeer::ListViewHeaderItemAutomationPeer(const Windows::UI::Xaml::Controls::ListViewHeaderItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ListViewItemAutomationPeer::ListViewItemAutomationPeer(const Windows::UI::Xaml::Controls::ListViewItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline ListViewItemDataAutomationPeer::ListViewItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer & parent) +inline ListViewItemDataAutomationPeer::ListViewItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline MediaElementAutomationPeer::MediaElementAutomationPeer(const Windows::UI::Xaml::Controls::MediaElement & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline MediaPlayerElementAutomationPeer::MediaPlayerElementAutomationPeer(const Windows::UI::Xaml::Controls::MediaPlayerElement & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline MediaTransportControlsAutomationPeer::MediaTransportControlsAutomationPeer(const Windows::UI::Xaml::Controls::MediaTransportControls & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline MenuFlyoutItemAutomationPeer::MenuFlyoutItemAutomationPeer(const Windows::UI::Xaml::Controls::MenuFlyoutItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline MenuFlyoutPresenterAutomationPeer::MenuFlyoutPresenterAutomationPeer(const Windows::UI::Xaml::Controls::MenuFlyoutPresenter & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline PasswordBoxAutomationPeer::PasswordBoxAutomationPeer(const Windows::UI::Xaml::Controls::PasswordBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } @@ -4815,148 +5001,2373 @@ inline PivotItemAutomationPeer::PivotItemAutomationPeer(const Windows::UI::Xaml: PivotItemAutomationPeer(get_activation_factory().CreateInstanceWithOwner(owner)) {} -inline PivotItemDataAutomationPeer::PivotItemDataAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer & parent) : +inline PivotItemDataAutomationPeer::PivotItemDataAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer & parent) : PivotItemDataAutomationPeer(get_activation_factory().CreateInstanceWithParentAndItem(item, parent)) {} inline ProgressBarAutomationPeer::ProgressBarAutomationPeer(const Windows::UI::Xaml::Controls::ProgressBar & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ProgressRingAutomationPeer::ProgressRingAutomationPeer(const Windows::UI::Xaml::Controls::ProgressRing & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RadioButtonAutomationPeer::RadioButtonAutomationPeer(const Windows::UI::Xaml::Controls::RadioButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RangeBaseAutomationPeer::RangeBaseAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::RangeBase & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RepeatButtonAutomationPeer::RepeatButtonAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::RepeatButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RichEditBoxAutomationPeer::RichEditBoxAutomationPeer(const Windows::UI::Xaml::Controls::RichEditBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RichTextBlockAutomationPeer::RichTextBlockAutomationPeer(const Windows::UI::Xaml::Controls::RichTextBlock & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline RichTextBlockOverflowAutomationPeer::RichTextBlockOverflowAutomationPeer(const Windows::UI::Xaml::Controls::RichTextBlockOverflow & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ScrollBarAutomationPeer::ScrollBarAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::ScrollBar & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ScrollViewerAutomationPeer::ScrollViewerAutomationPeer(const Windows::UI::Xaml::Controls::ScrollViewer & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline SearchBoxAutomationPeer::SearchBoxAutomationPeer(const Windows::UI::Xaml::Controls::SearchBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline SelectorAutomationPeer::SelectorAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::Selector & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } -inline SelectorItemAutomationPeer::SelectorItemAutomationPeer(const Windows::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer & parent) +inline SelectorItemAutomationPeer::SelectorItemAutomationPeer(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer & parent) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithParentAndItem(item, parent, outer, inner)); } inline SemanticZoomAutomationPeer::SemanticZoomAutomationPeer(const Windows::UI::Xaml::Controls::SemanticZoom & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline SettingsFlyoutAutomationPeer::SettingsFlyoutAutomationPeer(const Windows::UI::Xaml::Controls::SettingsFlyout & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline SliderAutomationPeer::SliderAutomationPeer(const Windows::UI::Xaml::Controls::Slider & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline TextBlockAutomationPeer::TextBlockAutomationPeer(const Windows::UI::Xaml::Controls::TextBlock & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline TextBoxAutomationPeer::TextBoxAutomationPeer(const Windows::UI::Xaml::Controls::TextBox & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ThumbAutomationPeer::ThumbAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::Thumb & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline TimePickerAutomationPeer::TimePickerAutomationPeer(const Windows::UI::Xaml::Controls::TimePicker & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ToggleButtonAutomationPeer::ToggleButtonAutomationPeer(const Windows::UI::Xaml::Controls::Primitives::ToggleButton & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ToggleMenuFlyoutItemAutomationPeer::ToggleMenuFlyoutItemAutomationPeer(const Windows::UI::Xaml::Controls::ToggleMenuFlyoutItem & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } inline ToggleSwitchAutomationPeer::ToggleSwitchAutomationPeer(const Windows::UI::Xaml::Controls::ToggleSwitch & owner) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithOwner(owner, outer, inner)); } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarToggleButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAppBarToggleButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutoSuggestBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutoSuggestBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeer3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeer4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeer5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerAnnotationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerAnnotationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerOverrides5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerProtected & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IAutomationPeerStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IButtonBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IButtonBaseAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ICaptureElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ICaptureElementAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ICheckBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ICheckBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IComboBoxItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IDatePickerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IDatePickerAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IDatePickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlipViewItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFlyoutPresenterAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFrameworkElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFrameworkElementAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IFrameworkElementAutomationPeerStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewHeaderItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGridViewItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGroupItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IGroupItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHubAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHubAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHubSectionAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHubSectionAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHyperlinkButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IHyperlinkButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IImageAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IImageAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IInkToolbarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemsControlAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemsControlAutomationPeer2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemsControlAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IItemsControlAutomationPeerOverrides2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListBoxItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListPickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewBaseAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewBaseHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewBaseHeaderItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewHeaderItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IListViewItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ILoopingSelectorAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ILoopingSelectorItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ILoopingSelectorItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMapControlAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaElementAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaPlayerElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaPlayerElementAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaTransportControlsAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMediaTransportControlsAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMenuFlyoutItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMenuFlyoutItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMenuFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IMenuFlyoutPresenterAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPasswordBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPasswordBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IPivotItemDataAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IProgressBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IProgressBarAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IProgressRingAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IProgressRingAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRadioButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRadioButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRangeBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRangeBaseAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRepeatButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRepeatButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichEditBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichEditBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichTextBlockAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichTextBlockAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichTextBlockOverflowAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IRichTextBlockOverflowAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IScrollBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IScrollBarAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IScrollViewerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IScrollViewerAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISearchBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISearchBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISelectorAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISelectorAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISelectorItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISelectorItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISemanticZoomAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISemanticZoomAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISettingsFlyoutAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISettingsFlyoutAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISliderAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ISliderAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITextBlockAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITextBlockAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITextBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITextBoxAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IThumbAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IThumbAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITimePickerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITimePickerAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ITimePickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleButtonAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleMenuFlyoutItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleMenuFlyoutItemAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleSwitchAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::IToggleSwitchAutomationPeerFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AppBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AppBarButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AppBarToggleButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AutoSuggestBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::AutomationPeerAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ButtonBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::CaptureElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::CheckBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ComboBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ComboBoxItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ComboBoxItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::DatePickerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::DatePickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::FlipViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::FlipViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::FlipViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::FlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::FrameworkElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::GridViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::GridViewHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::GridViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::GridViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::GroupItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::HubAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::HubSectionAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::HyperlinkButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ImageAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::InkToolbarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ItemsControlAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListBoxItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListBoxItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListPickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewBaseHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewHeaderItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ListViewItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::LoopingSelectorAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::LoopingSelectorItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::LoopingSelectorItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MapControlAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MediaElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MediaPlayerElementAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MediaTransportControlsAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MenuFlyoutItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::MenuFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::PasswordBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::PickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::PivotAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::PivotItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::PivotItemDataAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ProgressBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ProgressRingAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RadioButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RangeBaseAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RepeatButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RichEditBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RichTextBlockAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::RichTextBlockOverflowAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ScrollBarAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ScrollViewerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SearchBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SelectorAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SelectorItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SemanticZoomAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SettingsFlyoutAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::SliderAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::TextBlockAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::TextBoxAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ThumbAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::TimePickerAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::TimePickerFlyoutPresenterAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ToggleButtonAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ToggleMenuFlyoutItemAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Peers::ToggleSwitchAutomationPeer & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Provider.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Provider.h index 0ea5e0254..8df4650bd 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Provider.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Provider.h @@ -1,12 +1,15 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Xaml.Automation.3.h" +#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.3.h" #include "internal/Windows.UI.Xaml.Automation.Text.3.h" -#include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Xaml.Automation.Peers.3.h" #include "internal/Windows.UI.Xaml.Automation.Provider.3.h" #include "Windows.UI.Xaml.Automation.h" @@ -22,7 +25,8 @@ struct produce { try { - *value = detach(this->shim().AnnotationTypeId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationTypeId()); return S_OK; } catch (...) @@ -31,11 +35,12 @@ struct produce } } - HRESULT __stdcall get_AnnotationTypeName(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnnotationTypeName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationTypeName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationTypeName()); return S_OK; } catch (...) @@ -45,11 +50,12 @@ struct produce } } - HRESULT __stdcall get_Author(abi_arg_out value) noexcept override + HRESULT __stdcall get_Author(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Author()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Author()); return S_OK; } catch (...) @@ -59,11 +65,12 @@ struct produce } } - HRESULT __stdcall get_DateTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTime()); return S_OK; } catch (...) @@ -73,11 +80,12 @@ struct produce } } - HRESULT __stdcall get_Target(abi_arg_out value) noexcept override + HRESULT __stdcall get_Target(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Target()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Target()); return S_OK; } catch (...) @@ -91,11 +99,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_NavigateCustom(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_NavigateCustom(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().NavigateCustom(direction)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().NavigateCustom(direction)); return S_OK; } catch (...) @@ -113,7 +122,8 @@ struct produce : prod { try { - *value = detach(this->shim().DockPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DockPosition()); return S_OK; } catch (...) @@ -126,6 +136,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDockPosition(dockPosition); return S_OK; } @@ -143,7 +154,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsGrabbed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGrabbed()); return S_OK; } catch (...) @@ -152,11 +164,12 @@ struct produce : prod } } - HRESULT __stdcall get_DropEffect(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropEffect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropEffect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropEffect()); return S_OK; } catch (...) @@ -166,11 +179,12 @@ struct produce : prod } } - HRESULT __stdcall get_DropEffects(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_DropEffects(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().DropEffects()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().DropEffects()); return S_OK; } catch (...) @@ -181,11 +195,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetGrabbedItems(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetGrabbedItems(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetGrabbedItems()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetGrabbedItems()); return S_OK; } catch (...) @@ -200,11 +215,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DropEffect(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropEffect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropEffect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropEffect()); return S_OK; } catch (...) @@ -214,11 +230,12 @@ struct produce } } - HRESULT __stdcall get_DropEffects(uint32_t * __valueSize, abi_arg_out * value) noexcept override + HRESULT __stdcall get_DropEffects(uint32_t * __valueSize, impl::abi_arg_out * value) noexcept override { try { - std::tie(*__valueSize, *value) = detach(this->shim().DropEffects()); + typename D::abi_guard guard(this->shim()); + std::tie(*__valueSize, *value) = detach_abi(this->shim().DropEffects()); return S_OK; } catch (...) @@ -237,7 +254,8 @@ struct produceshim().ExpandCollapseState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpandCollapseState()); return S_OK; } catch (...) @@ -250,6 +268,7 @@ struct produceshim()); this->shim().Collapse(); return S_OK; } @@ -263,6 +282,7 @@ struct produceshim()); this->shim().Expand(); return S_OK; } @@ -280,7 +300,8 @@ struct produce : { try { - *value = detach(this->shim().Column()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Column()); return S_OK; } catch (...) @@ -293,7 +314,8 @@ struct produce : { try { - *value = detach(this->shim().ColumnSpan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnSpan()); return S_OK; } catch (...) @@ -302,11 +324,12 @@ struct produce : } } - HRESULT __stdcall get_ContainingGrid(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContainingGrid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainingGrid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainingGrid()); return S_OK; } catch (...) @@ -320,7 +343,8 @@ struct produce : { try { - *value = detach(this->shim().Row()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Row()); return S_OK; } catch (...) @@ -333,7 +357,8 @@ struct produce : { try { - *value = detach(this->shim().RowSpan()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowSpan()); return S_OK; } catch (...) @@ -350,7 +375,8 @@ struct produce : prod { try { - *value = detach(this->shim().ColumnCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnCount()); return S_OK; } catch (...) @@ -363,7 +389,8 @@ struct produce : prod { try { - *value = detach(this->shim().RowCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowCount()); return S_OK; } catch (...) @@ -372,11 +399,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetItem(int32_t row, int32_t column, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItem(int32_t row, int32_t column, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItem(row, column)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItem(row, column)); return S_OK; } catch (...) @@ -398,6 +426,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Invoke(); return S_OK; } @@ -411,11 +440,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_FindItemByProperty(abi_arg_in startAfter, abi_arg_in automationProperty, abi_arg_in value, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_FindItemByProperty(impl::abi_arg_in startAfter, impl::abi_arg_in automationProperty, impl::abi_arg_in value, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindItemByProperty(*reinterpret_cast(&startAfter), *reinterpret_cast(&automationProperty), *reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindItemByProperty(*reinterpret_cast(&startAfter), *reinterpret_cast(&automationProperty), *reinterpret_cast(&value))); return S_OK; } catch (...) @@ -433,7 +463,8 @@ struct produceshim().CurrentView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentView()); return S_OK; } catch (...) @@ -442,11 +473,12 @@ struct produce * returnValue) noexcept override + HRESULT __stdcall abi_GetSupportedViews(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetSupportedViews()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetSupportedViews()); return S_OK; } catch (...) @@ -457,11 +489,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetViewName(int32_t viewId, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetViewName(viewId)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetViewName(viewId)); return S_OK; } catch (...) @@ -475,6 +508,7 @@ struct produceshim()); this->shim().SetCurrentView(viewId); return S_OK; } @@ -488,11 +522,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetUnderlyingObjectModel(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetUnderlyingObjectModel(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetUnderlyingObjectModel()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetUnderlyingObjectModel()); return S_OK; } catch (...) @@ -510,7 +545,8 @@ struct produce { try { - *value = detach(this->shim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -523,7 +559,8 @@ struct produce { try { - *value = detach(this->shim().LargeChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeChange()); return S_OK; } catch (...) @@ -536,7 +573,8 @@ struct produce { try { - *value = detach(this->shim().Maximum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maximum()); return S_OK; } catch (...) @@ -549,7 +587,8 @@ struct produce { try { - *value = detach(this->shim().Minimum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Minimum()); return S_OK; } catch (...) @@ -562,7 +601,8 @@ struct produce { try { - *value = detach(this->shim().SmallChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallChange()); return S_OK; } catch (...) @@ -575,7 +615,8 @@ struct produce { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -588,6 +629,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SetValue(value); return S_OK; } @@ -605,6 +647,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ScrollIntoView(); return S_OK; } @@ -622,7 +665,8 @@ struct produce : pr { try { - *value = detach(this->shim().HorizontallyScrollable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontallyScrollable()); return S_OK; } catch (...) @@ -635,7 +679,8 @@ struct produce : pr { try { - *value = detach(this->shim().HorizontalScrollPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollPercent()); return S_OK; } catch (...) @@ -648,7 +693,8 @@ struct produce : pr { try { - *value = detach(this->shim().HorizontalViewSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalViewSize()); return S_OK; } catch (...) @@ -661,7 +707,8 @@ struct produce : pr { try { - *value = detach(this->shim().VerticallyScrollable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticallyScrollable()); return S_OK; } catch (...) @@ -674,7 +721,8 @@ struct produce : pr { try { - *value = detach(this->shim().VerticalScrollPercent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollPercent()); return S_OK; } catch (...) @@ -687,7 +735,8 @@ struct produce : pr { try { - *value = detach(this->shim().VerticalViewSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalViewSize()); return S_OK; } catch (...) @@ -700,6 +749,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Scroll(horizontalAmount, verticalAmount); return S_OK; } @@ -713,6 +763,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().SetScrollPercent(horizontalPercent, verticalPercent); return S_OK; } @@ -730,7 +781,8 @@ struct produceshim().IsSelected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelected()); return S_OK; } catch (...) @@ -739,11 +791,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectionContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionContainer()); return S_OK; } catch (...) @@ -757,6 +810,7 @@ struct produceshim()); this->shim().AddToSelection(); return S_OK; } @@ -770,6 +824,7 @@ struct produceshim()); this->shim().RemoveFromSelection(); return S_OK; } @@ -783,6 +838,7 @@ struct produceshim()); this->shim().Select(); return S_OK; } @@ -800,7 +856,8 @@ struct produce : { try { - *value = detach(this->shim().CanSelectMultiple()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSelectMultiple()); return S_OK; } catch (...) @@ -813,7 +870,8 @@ struct produce : { try { - *value = detach(this->shim().IsSelectionRequired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectionRequired()); return S_OK; } catch (...) @@ -822,11 +880,12 @@ struct produce : } } - HRESULT __stdcall abi_GetSelection(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetSelection(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetSelection()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetSelection()); return S_OK; } catch (...) @@ -841,11 +900,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Formula(abi_arg_out value) noexcept override + HRESULT __stdcall get_Formula(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Formula()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Formula()); return S_OK; } catch (...) @@ -855,11 +915,12 @@ struct produce * returnValue) noexcept override + HRESULT __stdcall abi_GetAnnotationObjects(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetAnnotationObjects()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetAnnotationObjects()); return S_OK; } catch (...) @@ -870,11 +931,12 @@ struct produce * returnValue) noexcept override + HRESULT __stdcall abi_GetAnnotationTypes(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetAnnotationTypes()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetAnnotationTypes()); return S_OK; } catch (...) @@ -889,11 +951,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetItemByName(abi_arg_in name, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItemByName(impl::abi_arg_in name, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemByName(*reinterpret_cast(&name))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemByName(*reinterpret_cast(&name))); return S_OK; } catch (...) @@ -907,11 +970,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_ExtendedProperties(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtendedProperties(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedProperties()); return S_OK; } catch (...) @@ -921,11 +985,12 @@ struct produce : pr } } - HRESULT __stdcall get_FillColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_FillColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillColor()); return S_OK; } catch (...) @@ -934,11 +999,12 @@ struct produce : pr } } - HRESULT __stdcall get_FillPatternColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_FillPatternColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillPatternColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillPatternColor()); return S_OK; } catch (...) @@ -947,11 +1013,12 @@ struct produce : pr } } - HRESULT __stdcall get_FillPatternStyle(abi_arg_out value) noexcept override + HRESULT __stdcall get_FillPatternStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillPatternStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillPatternStyle()); return S_OK; } catch (...) @@ -961,11 +1028,12 @@ struct produce : pr } } - HRESULT __stdcall get_Shape(abi_arg_out value) noexcept override + HRESULT __stdcall get_Shape(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Shape()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Shape()); return S_OK; } catch (...) @@ -979,7 +1047,8 @@ struct produce : pr { try { - *value = detach(this->shim().StyleId()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StyleId()); return S_OK; } catch (...) @@ -988,11 +1057,12 @@ struct produce : pr } } - HRESULT __stdcall get_StyleName(abi_arg_out value) noexcept override + HRESULT __stdcall get_StyleName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StyleName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StyleName()); return S_OK; } catch (...) @@ -1010,6 +1080,7 @@ struct produceshim()); this->shim().Cancel(); return S_OK; } @@ -1023,6 +1094,7 @@ struct produceshim()); this->shim().StartListening(inputType); return S_OK; } @@ -1036,11 +1108,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_GetColumnHeaderItems(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetColumnHeaderItems(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetColumnHeaderItems()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetColumnHeaderItems()); return S_OK; } catch (...) @@ -1051,11 +1124,12 @@ struct produce : } } - HRESULT __stdcall abi_GetRowHeaderItems(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetRowHeaderItems(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetRowHeaderItems()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetRowHeaderItems()); return S_OK; } catch (...) @@ -1074,7 +1148,8 @@ struct produce : pro { try { - *value = detach(this->shim().RowOrColumnMajor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowOrColumnMajor()); return S_OK; } catch (...) @@ -1083,11 +1158,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetColumnHeaders(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetColumnHeaders(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetColumnHeaders()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetColumnHeaders()); return S_OK; } catch (...) @@ -1098,11 +1174,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetRowHeaders(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetRowHeaders(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetRowHeaders()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetRowHeaders()); return S_OK; } catch (...) @@ -1117,11 +1194,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_TextContainer(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextContainer()); return S_OK; } catch (...) @@ -1131,11 +1209,12 @@ struct produce : } } - HRESULT __stdcall get_TextRange(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextRange(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextRange()); return S_OK; } catch (...) @@ -1149,11 +1228,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetActiveComposition(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetActiveComposition(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetActiveComposition()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetActiveComposition()); return S_OK; } catch (...) @@ -1163,11 +1243,12 @@ struct produce : } } - HRESULT __stdcall abi_GetConversionTarget(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetConversionTarget(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetConversionTarget()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetConversionTarget()); return S_OK; } catch (...) @@ -1181,11 +1262,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DocumentRange(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentRange(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentRange()); return S_OK; } catch (...) @@ -1199,7 +1281,8 @@ struct produce : prod { try { - *value = detach(this->shim().SupportedTextSelection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedTextSelection()); return S_OK; } catch (...) @@ -1208,11 +1291,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetSelection(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetSelection(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetSelection()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetSelection()); return S_OK; } catch (...) @@ -1223,11 +1307,12 @@ struct produce : prod } } - HRESULT __stdcall abi_GetVisibleRanges(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetVisibleRanges(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetVisibleRanges()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetVisibleRanges()); return S_OK; } catch (...) @@ -1238,11 +1323,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RangeFromChild(abi_arg_in childElement, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_RangeFromChild(impl::abi_arg_in childElement, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().RangeFromChild(*reinterpret_cast(&childElement))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().RangeFromChild(*reinterpret_cast(&childElement))); return S_OK; } catch (...) @@ -1252,11 +1338,12 @@ struct produce : prod } } - HRESULT __stdcall abi_RangeFromPoint(abi_arg_in screenLocation, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_RangeFromPoint(impl::abi_arg_in screenLocation, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().RangeFromPoint(*reinterpret_cast(&screenLocation))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().RangeFromPoint(*reinterpret_cast(&screenLocation))); return S_OK; } catch (...) @@ -1270,11 +1357,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_RangeFromAnnotation(abi_arg_in annotationElement, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_RangeFromAnnotation(impl::abi_arg_in annotationElement, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().RangeFromAnnotation(*reinterpret_cast(&annotationElement))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().RangeFromAnnotation(*reinterpret_cast(&annotationElement))); return S_OK; } catch (...) @@ -1284,11 +1372,12 @@ struct produce : pro } } - HRESULT __stdcall abi_GetCaretRange(bool * isActive, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetCaretRange(bool * isActive, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetCaretRange(*isActive)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetCaretRange(*isActive)); return S_OK; } catch (...) @@ -1302,11 +1391,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_Clone(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_Clone(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().Clone()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Clone()); return S_OK; } catch (...) @@ -1316,11 +1406,12 @@ struct produce : } } - HRESULT __stdcall abi_Compare(abi_arg_in textRangeProvider, bool * returnValue) noexcept override + HRESULT __stdcall abi_Compare(impl::abi_arg_in textRangeProvider, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().Compare(*reinterpret_cast(&textRangeProvider))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Compare(*reinterpret_cast(&textRangeProvider))); return S_OK; } catch (...) @@ -1329,11 +1420,12 @@ struct produce : } } - HRESULT __stdcall abi_CompareEndpoints(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, abi_arg_in textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint, int32_t * returnValue) noexcept override + HRESULT __stdcall abi_CompareEndpoints(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, impl::abi_arg_in textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint, int32_t * returnValue) noexcept override { try { - *returnValue = detach(this->shim().CompareEndpoints(endpoint, *reinterpret_cast(&textRangeProvider), targetEndpoint)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CompareEndpoints(endpoint, *reinterpret_cast(&textRangeProvider), targetEndpoint)); return S_OK; } catch (...) @@ -1346,6 +1438,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ExpandToEnclosingUnit(unit); return S_OK; } @@ -1355,11 +1448,12 @@ struct produce : } } - HRESULT __stdcall abi_FindAttribute(int32_t attributeId, abi_arg_in value, bool backward, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_FindAttribute(int32_t attributeId, impl::abi_arg_in value, bool backward, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindAttribute(attributeId, *reinterpret_cast(&value), backward)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindAttribute(attributeId, *reinterpret_cast(&value), backward)); return S_OK; } catch (...) @@ -1369,11 +1463,12 @@ struct produce : } } - HRESULT __stdcall abi_FindText(abi_arg_in text, bool backward, bool ignoreCase, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_FindText(impl::abi_arg_in text, bool backward, bool ignoreCase, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindText(*reinterpret_cast(&text), backward, ignoreCase)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindText(*reinterpret_cast(&text), backward, ignoreCase)); return S_OK; } catch (...) @@ -1383,11 +1478,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAttributeValue(int32_t attributeId, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAttributeValue(int32_t attributeId, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAttributeValue(attributeId)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAttributeValue(attributeId)); return S_OK; } catch (...) @@ -1397,11 +1493,12 @@ struct produce : } } - HRESULT __stdcall abi_GetBoundingRectangles(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetBoundingRectangles(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - this->shim().GetBoundingRectangles(detach(__returnValueSize, returnValue)); + typename D::abi_guard guard(this->shim()); + this->shim().GetBoundingRectangles(detach_abi(__returnValueSize, returnValue)); return S_OK; } catch (...) @@ -1412,11 +1509,12 @@ struct produce : } } - HRESULT __stdcall abi_GetEnclosingElement(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetEnclosingElement(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetEnclosingElement()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetEnclosingElement()); return S_OK; } catch (...) @@ -1426,11 +1524,12 @@ struct produce : } } - HRESULT __stdcall abi_GetText(int32_t maxLength, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetText(int32_t maxLength, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetText(maxLength)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetText(maxLength)); return S_OK; } catch (...) @@ -1444,7 +1543,8 @@ struct produce : { try { - *returnValue = detach(this->shim().Move(unit, count)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Move(unit, count)); return S_OK; } catch (...) @@ -1457,7 +1557,8 @@ struct produce : { try { - *returnValue = detach(this->shim().MoveEndpointByUnit(endpoint, unit, count)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MoveEndpointByUnit(endpoint, unit, count)); return S_OK; } catch (...) @@ -1466,10 +1567,11 @@ struct produce : } } - HRESULT __stdcall abi_MoveEndpointByRange(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, abi_arg_in textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint) noexcept override + HRESULT __stdcall abi_MoveEndpointByRange(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, impl::abi_arg_in textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MoveEndpointByRange(endpoint, *reinterpret_cast(&textRangeProvider), targetEndpoint); return S_OK; } @@ -1483,6 +1585,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Select(); return S_OK; } @@ -1496,6 +1599,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().AddToSelection(); return S_OK; } @@ -1509,6 +1613,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveFromSelection(); return S_OK; } @@ -1522,6 +1627,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().ScrollIntoView(alignToTop); return S_OK; } @@ -1531,11 +1637,12 @@ struct produce : } } - HRESULT __stdcall abi_GetChildren(uint32_t * __returnValueSize, abi_arg_out * returnValue) noexcept override + HRESULT __stdcall abi_GetChildren(uint32_t * __returnValueSize, impl::abi_arg_out * returnValue) noexcept override { try { - std::tie(*__returnValueSize, *returnValue) = detach(this->shim().GetChildren()); + typename D::abi_guard guard(this->shim()); + std::tie(*__returnValueSize, *returnValue) = detach_abi(this->shim().GetChildren()); return S_OK; } catch (...) @@ -1554,6 +1661,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowContextMenu(); return S_OK; } @@ -1571,7 +1679,8 @@ struct produce : pr { try { - *value = detach(this->shim().ToggleState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleState()); return S_OK; } catch (...) @@ -1584,6 +1693,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Toggle(); return S_OK; } @@ -1601,7 +1711,8 @@ struct produce : { try { - *value = detach(this->shim().CanMove()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMove()); return S_OK; } catch (...) @@ -1614,7 +1725,8 @@ struct produce : { try { - *value = detach(this->shim().CanResize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanResize()); return S_OK; } catch (...) @@ -1627,7 +1739,8 @@ struct produce : { try { - *value = detach(this->shim().CanRotate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRotate()); return S_OK; } catch (...) @@ -1640,6 +1753,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Move(x, y); return S_OK; } @@ -1653,6 +1767,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Resize(width, height); return S_OK; } @@ -1666,6 +1781,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Rotate(degrees); return S_OK; } @@ -1683,7 +1799,8 @@ struct produce { try { - *value = detach(this->shim().CanZoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanZoom()); return S_OK; } catch (...) @@ -1696,7 +1813,8 @@ struct produce { try { - *value = detach(this->shim().ZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevel()); return S_OK; } catch (...) @@ -1709,7 +1827,8 @@ struct produce { try { - *value = detach(this->shim().MaxZoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxZoom()); return S_OK; } catch (...) @@ -1722,7 +1841,8 @@ struct produce { try { - *value = detach(this->shim().MinZoom()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinZoom()); return S_OK; } catch (...) @@ -1735,6 +1855,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Zoom(zoom); return S_OK; } @@ -1748,6 +1869,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomByUnit(zoomUnit); return S_OK; } @@ -1765,7 +1887,8 @@ struct produce : pro { try { - *value = detach(this->shim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -1774,11 +1897,12 @@ struct produce : pro } } - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -1788,10 +1912,11 @@ struct produce : pro } } - HRESULT __stdcall abi_SetValue(abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetValue(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetValue(*reinterpret_cast(&value)); return S_OK; } @@ -1809,6 +1934,7 @@ struct produceshim()); this->shim().Realize(); return S_OK; } @@ -1826,7 +1952,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsModal()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsModal()); return S_OK; } catch (...) @@ -1839,7 +1966,8 @@ struct produce : pr { try { - *value = detach(this->shim().IsTopmost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTopmost()); return S_OK; } catch (...) @@ -1852,7 +1980,8 @@ struct produce : pr { try { - *value = detach(this->shim().Maximizable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maximizable()); return S_OK; } catch (...) @@ -1865,7 +1994,8 @@ struct produce : pr { try { - *value = detach(this->shim().Minimizable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Minimizable()); return S_OK; } catch (...) @@ -1878,7 +2008,8 @@ struct produce : pr { try { - *value = detach(this->shim().InteractionState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InteractionState()); return S_OK; } catch (...) @@ -1891,7 +2022,8 @@ struct produce : pr { try { - *value = detach(this->shim().VisualState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisualState()); return S_OK; } catch (...) @@ -1904,6 +2036,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Close(); return S_OK; } @@ -1917,6 +2050,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVisualState(state); return S_OK; } @@ -1930,7 +2064,8 @@ struct produce : pr { try { - *returnValue = detach(this->shim().WaitForInputIdle(milliseconds)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().WaitForInputIdle(milliseconds)); return S_OK; } catch (...) @@ -1947,863 +2082,1198 @@ namespace Windows::UI::Xaml::Automation::Provider { template int32_t impl_IAnnotationProvider::AnnotationTypeId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AnnotationTypeId(&value)); + check_hresult(WINRT_SHIM(IAnnotationProvider)->get_AnnotationTypeId(&value)); return value; } template hstring impl_IAnnotationProvider::AnnotationTypeName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_AnnotationTypeName(put(value))); + check_hresult(WINRT_SHIM(IAnnotationProvider)->get_AnnotationTypeName(put_abi(value))); return value; } template hstring impl_IAnnotationProvider::Author() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Author(put(value))); + check_hresult(WINRT_SHIM(IAnnotationProvider)->get_Author(put_abi(value))); return value; } template hstring impl_IAnnotationProvider::DateTime() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DateTime(put(value))); + check_hresult(WINRT_SHIM(IAnnotationProvider)->get_DateTime(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IAnnotationProvider::Target() const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Target(put(value))); + check_hresult(WINRT_SHIM(IAnnotationProvider)->get_Target(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::DockPosition impl_IDockProvider::DockPosition() const { Windows::UI::Xaml::Automation::DockPosition value {}; - check_hresult(static_cast(static_cast(*this))->get_DockPosition(&value)); + check_hresult(WINRT_SHIM(IDockProvider)->get_DockPosition(&value)); return value; } template void impl_IDockProvider::SetDockPosition(Windows::UI::Xaml::Automation::DockPosition dockPosition) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDockPosition(dockPosition)); + check_hresult(WINRT_SHIM(IDockProvider)->abi_SetDockPosition(dockPosition)); } template bool impl_IDragProvider::IsGrabbed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGrabbed(&value)); + check_hresult(WINRT_SHIM(IDragProvider)->get_IsGrabbed(&value)); return value; } template hstring impl_IDragProvider::DropEffect() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DropEffect(put(value))); + check_hresult(WINRT_SHIM(IDragProvider)->get_DropEffect(put_abi(value))); return value; } template com_array impl_IDragProvider::DropEffects() const { com_array value; - check_hresult(static_cast(static_cast(*this))->get_DropEffects(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IDragProvider)->get_DropEffects(impl::put_size_abi(value), put_abi(value))); return value; } template com_array impl_IDragProvider::GetGrabbedItems() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetGrabbedItems(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(IDragProvider)->abi_GetGrabbedItems(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template hstring impl_IDropTargetProvider::DropEffect() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DropEffect(put(value))); + check_hresult(WINRT_SHIM(IDropTargetProvider)->get_DropEffect(put_abi(value))); return value; } template com_array impl_IDropTargetProvider::DropEffects() const { com_array value; - check_hresult(static_cast(static_cast(*this))->get_DropEffects(put_size(value), put(value))); + check_hresult(WINRT_SHIM(IDropTargetProvider)->get_DropEffects(impl::put_size_abi(value), put_abi(value))); return value; } template Windows::UI::Xaml::Automation::ExpandCollapseState impl_IExpandCollapseProvider::ExpandCollapseState() const { Windows::UI::Xaml::Automation::ExpandCollapseState value {}; - check_hresult(static_cast(static_cast(*this))->get_ExpandCollapseState(&value)); + check_hresult(WINRT_SHIM(IExpandCollapseProvider)->get_ExpandCollapseState(&value)); return value; } template void impl_IExpandCollapseProvider::Collapse() const { - check_hresult(static_cast(static_cast(*this))->abi_Collapse()); + check_hresult(WINRT_SHIM(IExpandCollapseProvider)->abi_Collapse()); } template void impl_IExpandCollapseProvider::Expand() const { - check_hresult(static_cast(static_cast(*this))->abi_Expand()); + check_hresult(WINRT_SHIM(IExpandCollapseProvider)->abi_Expand()); } template int32_t impl_IGridItemProvider::Column() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Column(&value)); + check_hresult(WINRT_SHIM(IGridItemProvider)->get_Column(&value)); return value; } template int32_t impl_IGridItemProvider::ColumnSpan() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ColumnSpan(&value)); + check_hresult(WINRT_SHIM(IGridItemProvider)->get_ColumnSpan(&value)); return value; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IGridItemProvider::ContainingGrid() const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContainingGrid(put(value))); + check_hresult(WINRT_SHIM(IGridItemProvider)->get_ContainingGrid(put_abi(value))); return value; } template int32_t impl_IGridItemProvider::Row() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Row(&value)); + check_hresult(WINRT_SHIM(IGridItemProvider)->get_Row(&value)); return value; } template int32_t impl_IGridItemProvider::RowSpan() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RowSpan(&value)); + check_hresult(WINRT_SHIM(IGridItemProvider)->get_RowSpan(&value)); return value; } template int32_t impl_IGridProvider::ColumnCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ColumnCount(&value)); + check_hresult(WINRT_SHIM(IGridProvider)->get_ColumnCount(&value)); return value; } template int32_t impl_IGridProvider::RowCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_RowCount(&value)); + check_hresult(WINRT_SHIM(IGridProvider)->get_RowCount(&value)); return value; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IGridProvider::GetItem(int32_t row, int32_t column) const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetItem(row, column, put(returnValue))); + check_hresult(WINRT_SHIM(IGridProvider)->abi_GetItem(row, column, put_abi(returnValue))); return returnValue; } template void impl_IInvokeProvider::Invoke() const { - check_hresult(static_cast(static_cast(*this))->abi_Invoke()); + check_hresult(WINRT_SHIM(IInvokeProvider)->abi_Invoke()); } -template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IItemContainerProvider::FindItemByProperty(const Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & startAfter, const Windows::UI::Xaml::Automation::AutomationProperty & automationProperty, const Windows::IInspectable & value) const +template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_IItemContainerProvider::FindItemByProperty(const Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & startAfter, const Windows::UI::Xaml::Automation::AutomationProperty & automationProperty, const Windows::Foundation::IInspectable & value) const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_FindItemByProperty(get(startAfter), get(automationProperty), get(value), put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerProvider)->abi_FindItemByProperty(get_abi(startAfter), get_abi(automationProperty), get_abi(value), put_abi(returnValue))); return returnValue; } template int32_t impl_IMultipleViewProvider::CurrentView() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentView(&value)); + check_hresult(WINRT_SHIM(IMultipleViewProvider)->get_CurrentView(&value)); return value; } template com_array impl_IMultipleViewProvider::GetSupportedViews() const { com_array returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSupportedViews(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(IMultipleViewProvider)->abi_GetSupportedViews(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template hstring impl_IMultipleViewProvider::GetViewName(int32_t viewId) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetViewName(viewId, put(returnValue))); + check_hresult(WINRT_SHIM(IMultipleViewProvider)->abi_GetViewName(viewId, put_abi(returnValue))); return returnValue; } template void impl_IMultipleViewProvider::SetCurrentView(int32_t viewId) const { - check_hresult(static_cast(static_cast(*this))->abi_SetCurrentView(viewId)); + check_hresult(WINRT_SHIM(IMultipleViewProvider)->abi_SetCurrentView(viewId)); } -template Windows::IInspectable impl_IObjectModelProvider::GetUnderlyingObjectModel() const +template Windows::Foundation::IInspectable impl_IObjectModelProvider::GetUnderlyingObjectModel() const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetUnderlyingObjectModel(put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IObjectModelProvider)->abi_GetUnderlyingObjectModel(put_abi(returnValue))); return returnValue; } template bool impl_IRangeValueProvider::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_IsReadOnly(&value)); return value; } template double impl_IRangeValueProvider::LargeChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LargeChange(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_LargeChange(&value)); return value; } template double impl_IRangeValueProvider::Maximum() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Maximum(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_Maximum(&value)); return value; } template double impl_IRangeValueProvider::Minimum() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Minimum(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_Minimum(&value)); return value; } template double impl_IRangeValueProvider::SmallChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SmallChange(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_SmallChange(&value)); return value; } template double impl_IRangeValueProvider::Value() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->get_Value(&value)); return value; } template void impl_IRangeValueProvider::SetValue(double value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetValue(value)); + check_hresult(WINRT_SHIM(IRangeValueProvider)->abi_SetValue(value)); } template void impl_IScrollItemProvider::ScrollIntoView() const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoView()); + check_hresult(WINRT_SHIM(IScrollItemProvider)->abi_ScrollIntoView()); } template bool impl_IScrollProvider::HorizontallyScrollable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontallyScrollable(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_HorizontallyScrollable(&value)); return value; } template double impl_IScrollProvider::HorizontalScrollPercent() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalScrollPercent(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_HorizontalScrollPercent(&value)); return value; } template double impl_IScrollProvider::HorizontalViewSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalViewSize(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_HorizontalViewSize(&value)); return value; } template bool impl_IScrollProvider::VerticallyScrollable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticallyScrollable(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_VerticallyScrollable(&value)); return value; } template double impl_IScrollProvider::VerticalScrollPercent() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalScrollPercent(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_VerticalScrollPercent(&value)); return value; } template double impl_IScrollProvider::VerticalViewSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalViewSize(&value)); + check_hresult(WINRT_SHIM(IScrollProvider)->get_VerticalViewSize(&value)); return value; } template void impl_IScrollProvider::Scroll(Windows::UI::Xaml::Automation::ScrollAmount horizontalAmount, Windows::UI::Xaml::Automation::ScrollAmount verticalAmount) const { - check_hresult(static_cast(static_cast(*this))->abi_Scroll(horizontalAmount, verticalAmount)); + check_hresult(WINRT_SHIM(IScrollProvider)->abi_Scroll(horizontalAmount, verticalAmount)); } template void impl_IScrollProvider::SetScrollPercent(double horizontalPercent, double verticalPercent) const { - check_hresult(static_cast(static_cast(*this))->abi_SetScrollPercent(horizontalPercent, verticalPercent)); + check_hresult(WINRT_SHIM(IScrollProvider)->abi_SetScrollPercent(horizontalPercent, verticalPercent)); } template bool impl_ISelectionItemProvider::IsSelected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelected(&value)); + check_hresult(WINRT_SHIM(ISelectionItemProvider)->get_IsSelected(&value)); return value; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_ISelectionItemProvider::SelectionContainer() const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionContainer(put(value))); + check_hresult(WINRT_SHIM(ISelectionItemProvider)->get_SelectionContainer(put_abi(value))); return value; } template void impl_ISelectionItemProvider::AddToSelection() const { - check_hresult(static_cast(static_cast(*this))->abi_AddToSelection()); + check_hresult(WINRT_SHIM(ISelectionItemProvider)->abi_AddToSelection()); } template void impl_ISelectionItemProvider::RemoveFromSelection() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFromSelection()); + check_hresult(WINRT_SHIM(ISelectionItemProvider)->abi_RemoveFromSelection()); } template void impl_ISelectionItemProvider::Select() const { - check_hresult(static_cast(static_cast(*this))->abi_Select()); + check_hresult(WINRT_SHIM(ISelectionItemProvider)->abi_Select()); } template bool impl_ISelectionProvider::CanSelectMultiple() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSelectMultiple(&value)); + check_hresult(WINRT_SHIM(ISelectionProvider)->get_CanSelectMultiple(&value)); return value; } template bool impl_ISelectionProvider::IsSelectionRequired() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelectionRequired(&value)); + check_hresult(WINRT_SHIM(ISelectionProvider)->get_IsSelectionRequired(&value)); return value; } template com_array impl_ISelectionProvider::GetSelection() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetSelection(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ISelectionProvider)->abi_GetSelection(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template hstring impl_ISpreadsheetItemProvider::Formula() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Formula(put(value))); + check_hresult(WINRT_SHIM(ISpreadsheetItemProvider)->get_Formula(put_abi(value))); return value; } template com_array impl_ISpreadsheetItemProvider::GetAnnotationObjects() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotationObjects(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ISpreadsheetItemProvider)->abi_GetAnnotationObjects(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template com_array impl_ISpreadsheetItemProvider::GetAnnotationTypes() const { com_array returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotationTypes(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ISpreadsheetItemProvider)->abi_GetAnnotationTypes(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_ISpreadsheetProvider::GetItemByName(hstring_ref name) const +template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_ISpreadsheetProvider::GetItemByName(hstring_view name) const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetItemByName(get(name), put(returnValue))); + check_hresult(WINRT_SHIM(ISpreadsheetProvider)->abi_GetItemByName(get_abi(name), put_abi(returnValue))); return returnValue; } template hstring impl_IStylesProvider::ExtendedProperties() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ExtendedProperties(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_ExtendedProperties(put_abi(value))); return value; } template Windows::UI::Color impl_IStylesProvider::FillColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_FillColor(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_FillColor(put_abi(value))); return value; } template Windows::UI::Color impl_IStylesProvider::FillPatternColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_FillPatternColor(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_FillPatternColor(put_abi(value))); return value; } template hstring impl_IStylesProvider::FillPatternStyle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_FillPatternStyle(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_FillPatternStyle(put_abi(value))); return value; } template hstring impl_IStylesProvider::Shape() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Shape(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_Shape(put_abi(value))); return value; } template int32_t impl_IStylesProvider::StyleId() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StyleId(&value)); + check_hresult(WINRT_SHIM(IStylesProvider)->get_StyleId(&value)); return value; } template hstring impl_IStylesProvider::StyleName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_StyleName(put(value))); + check_hresult(WINRT_SHIM(IStylesProvider)->get_StyleName(put_abi(value))); return value; } template void impl_ISynchronizedInputProvider::Cancel() const { - check_hresult(static_cast(static_cast(*this))->abi_Cancel()); + check_hresult(WINRT_SHIM(ISynchronizedInputProvider)->abi_Cancel()); } template void impl_ISynchronizedInputProvider::StartListening(Windows::UI::Xaml::Automation::SynchronizedInputType inputType) const { - check_hresult(static_cast(static_cast(*this))->abi_StartListening(inputType)); + check_hresult(WINRT_SHIM(ISynchronizedInputProvider)->abi_StartListening(inputType)); } template com_array impl_ITableItemProvider::GetColumnHeaderItems() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetColumnHeaderItems(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITableItemProvider)->abi_GetColumnHeaderItems(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template com_array impl_ITableItemProvider::GetRowHeaderItems() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetRowHeaderItems(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITableItemProvider)->abi_GetRowHeaderItems(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::RowOrColumnMajor impl_ITableProvider::RowOrColumnMajor() const { Windows::UI::Xaml::Automation::RowOrColumnMajor value {}; - check_hresult(static_cast(static_cast(*this))->get_RowOrColumnMajor(&value)); + check_hresult(WINRT_SHIM(ITableProvider)->get_RowOrColumnMajor(&value)); return value; } template com_array impl_ITableProvider::GetColumnHeaders() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetColumnHeaders(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITableProvider)->abi_GetColumnHeaders(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template com_array impl_ITableProvider::GetRowHeaders() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetRowHeaders(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITableProvider)->abi_GetRowHeaders(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_ITextChildProvider::TextContainer() const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextContainer(put(value))); + check_hresult(WINRT_SHIM(ITextChildProvider)->get_TextContainer(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextChildProvider::TextRange() const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider value; - check_hresult(static_cast(static_cast(*this))->get_TextRange(put(value))); + check_hresult(WINRT_SHIM(ITextChildProvider)->get_TextRange(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextRangeProvider::Clone() const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_Clone(put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_Clone(put_abi(returnValue))); return returnValue; } template bool impl_ITextRangeProvider::Compare(const Windows::UI::Xaml::Automation::Provider::ITextRangeProvider & textRangeProvider) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Compare(get(textRangeProvider), &returnValue)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_Compare(get_abi(textRangeProvider), &returnValue)); return returnValue; } template int32_t impl_ITextRangeProvider::CompareEndpoints(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, const Windows::UI::Xaml::Automation::Provider::ITextRangeProvider & textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_CompareEndpoints(endpoint, get(textRangeProvider), targetEndpoint, &returnValue)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_CompareEndpoints(endpoint, get_abi(textRangeProvider), targetEndpoint, &returnValue)); return returnValue; } template void impl_ITextRangeProvider::ExpandToEnclosingUnit(Windows::UI::Xaml::Automation::Text::TextUnit unit) const { - check_hresult(static_cast(static_cast(*this))->abi_ExpandToEnclosingUnit(unit)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_ExpandToEnclosingUnit(unit)); } -template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextRangeProvider::FindAttribute(int32_t attributeId, const Windows::IInspectable & value, bool backward) const +template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextRangeProvider::FindAttribute(int32_t attributeId, const Windows::Foundation::IInspectable & value, bool backward) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_FindAttribute(attributeId, get(value), backward, put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_FindAttribute(attributeId, get_abi(value), backward, put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextRangeProvider::FindText(hstring_ref text, bool backward, bool ignoreCase) const +template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextRangeProvider::FindText(hstring_view text, bool backward, bool ignoreCase) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_FindText(get(text), backward, ignoreCase, put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_FindText(get_abi(text), backward, ignoreCase, put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_ITextRangeProvider::GetAttributeValue(int32_t attributeId) const +template Windows::Foundation::IInspectable impl_ITextRangeProvider::GetAttributeValue(int32_t attributeId) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAttributeValue(attributeId, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_GetAttributeValue(attributeId, put_abi(returnValue))); return returnValue; } template void impl_ITextRangeProvider::GetBoundingRectangles(com_array & returnValue) const { - check_hresult(static_cast(static_cast(*this))->abi_GetBoundingRectangles(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_GetBoundingRectangles(impl::put_size_abi(returnValue), put_abi(returnValue))); } template Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple impl_ITextRangeProvider::GetEnclosingElement() const { Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetEnclosingElement(put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_GetEnclosingElement(put_abi(returnValue))); return returnValue; } template hstring impl_ITextRangeProvider::GetText(int32_t maxLength) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetText(maxLength, put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_GetText(maxLength, put_abi(returnValue))); return returnValue; } template int32_t impl_ITextRangeProvider::Move(Windows::UI::Xaml::Automation::Text::TextUnit unit, int32_t count) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Move(unit, count, &returnValue)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_Move(unit, count, &returnValue)); return returnValue; } template int32_t impl_ITextRangeProvider::MoveEndpointByUnit(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, Windows::UI::Xaml::Automation::Text::TextUnit unit, int32_t count) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_MoveEndpointByUnit(endpoint, unit, count, &returnValue)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_MoveEndpointByUnit(endpoint, unit, count, &returnValue)); return returnValue; } template void impl_ITextRangeProvider::MoveEndpointByRange(Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint endpoint, const Windows::UI::Xaml::Automation::Provider::ITextRangeProvider & textRangeProvider, Windows::UI::Xaml::Automation::Text::TextPatternRangeEndpoint targetEndpoint) const { - check_hresult(static_cast(static_cast(*this))->abi_MoveEndpointByRange(endpoint, get(textRangeProvider), targetEndpoint)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_MoveEndpointByRange(endpoint, get_abi(textRangeProvider), targetEndpoint)); } template void impl_ITextRangeProvider::Select() const { - check_hresult(static_cast(static_cast(*this))->abi_Select()); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_Select()); } template void impl_ITextRangeProvider::AddToSelection() const { - check_hresult(static_cast(static_cast(*this))->abi_AddToSelection()); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_AddToSelection()); } template void impl_ITextRangeProvider::RemoveFromSelection() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveFromSelection()); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_RemoveFromSelection()); } template void impl_ITextRangeProvider::ScrollIntoView(bool alignToTop) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoView(alignToTop)); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_ScrollIntoView(alignToTop)); } template com_array impl_ITextRangeProvider::GetChildren() const { com_array returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetChildren(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITextRangeProvider)->abi_GetChildren(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextProvider::DocumentRange() const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider value; - check_hresult(static_cast(static_cast(*this))->get_DocumentRange(put(value))); + check_hresult(WINRT_SHIM(ITextProvider)->get_DocumentRange(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::SupportedTextSelection impl_ITextProvider::SupportedTextSelection() const { Windows::UI::Xaml::Automation::SupportedTextSelection value {}; - check_hresult(static_cast(static_cast(*this))->get_SupportedTextSelection(&value)); + check_hresult(WINRT_SHIM(ITextProvider)->get_SupportedTextSelection(&value)); return value; } template com_array impl_ITextProvider::GetSelection() const { com_array returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetSelection(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider)->abi_GetSelection(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template com_array impl_ITextProvider::GetVisibleRanges() const { com_array returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetVisibleRanges(put_size(returnValue), put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider)->abi_GetVisibleRanges(impl::put_size_abi(returnValue), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextProvider::RangeFromChild(const Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & childElement) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_RangeFromChild(get(childElement), put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider)->abi_RangeFromChild(get_abi(childElement), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextProvider::RangeFromPoint(const Windows::Foundation::Point & screenLocation) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_RangeFromPoint(get(screenLocation), put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider)->abi_RangeFromPoint(get_abi(screenLocation), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextProvider2::RangeFromAnnotation(const Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & annotationElement) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_RangeFromAnnotation(get(annotationElement), put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider2)->abi_RangeFromAnnotation(get_abi(annotationElement), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextProvider2::GetCaretRange(bool & isActive) const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetCaretRange(&isActive, put(returnValue))); + check_hresult(WINRT_SHIM(ITextProvider2)->abi_GetCaretRange(&isActive, put_abi(returnValue))); return returnValue; } template void impl_ITextRangeProvider2::ShowContextMenu() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowContextMenu()); + check_hresult(WINRT_SHIM(ITextRangeProvider2)->abi_ShowContextMenu()); } template Windows::UI::Xaml::Automation::ToggleState impl_IToggleProvider::ToggleState() const { Windows::UI::Xaml::Automation::ToggleState value {}; - check_hresult(static_cast(static_cast(*this))->get_ToggleState(&value)); + check_hresult(WINRT_SHIM(IToggleProvider)->get_ToggleState(&value)); return value; } template void impl_IToggleProvider::Toggle() const { - check_hresult(static_cast(static_cast(*this))->abi_Toggle()); + check_hresult(WINRT_SHIM(IToggleProvider)->abi_Toggle()); } template bool impl_ITransformProvider::CanMove() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanMove(&value)); + check_hresult(WINRT_SHIM(ITransformProvider)->get_CanMove(&value)); return value; } template bool impl_ITransformProvider::CanResize() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanResize(&value)); + check_hresult(WINRT_SHIM(ITransformProvider)->get_CanResize(&value)); return value; } template bool impl_ITransformProvider::CanRotate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanRotate(&value)); + check_hresult(WINRT_SHIM(ITransformProvider)->get_CanRotate(&value)); return value; } template void impl_ITransformProvider::Move(double x, double y) const { - check_hresult(static_cast(static_cast(*this))->abi_Move(x, y)); + check_hresult(WINRT_SHIM(ITransformProvider)->abi_Move(x, y)); } template void impl_ITransformProvider::Resize(double width, double height) const { - check_hresult(static_cast(static_cast(*this))->abi_Resize(width, height)); + check_hresult(WINRT_SHIM(ITransformProvider)->abi_Resize(width, height)); } template void impl_ITransformProvider::Rotate(double degrees) const { - check_hresult(static_cast(static_cast(*this))->abi_Rotate(degrees)); + check_hresult(WINRT_SHIM(ITransformProvider)->abi_Rotate(degrees)); } template bool impl_ITransformProvider2::CanZoom() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanZoom(&value)); + check_hresult(WINRT_SHIM(ITransformProvider2)->get_CanZoom(&value)); return value; } template double impl_ITransformProvider2::ZoomLevel() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevel(&value)); + check_hresult(WINRT_SHIM(ITransformProvider2)->get_ZoomLevel(&value)); return value; } template double impl_ITransformProvider2::MaxZoom() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxZoom(&value)); + check_hresult(WINRT_SHIM(ITransformProvider2)->get_MaxZoom(&value)); return value; } template double impl_ITransformProvider2::MinZoom() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinZoom(&value)); + check_hresult(WINRT_SHIM(ITransformProvider2)->get_MinZoom(&value)); return value; } template void impl_ITransformProvider2::Zoom(double zoom) const { - check_hresult(static_cast(static_cast(*this))->abi_Zoom(zoom)); + check_hresult(WINRT_SHIM(ITransformProvider2)->abi_Zoom(zoom)); } template void impl_ITransformProvider2::ZoomByUnit(Windows::UI::Xaml::Automation::ZoomUnit zoomUnit) const { - check_hresult(static_cast(static_cast(*this))->abi_ZoomByUnit(zoomUnit)); + check_hresult(WINRT_SHIM(ITransformProvider2)->abi_ZoomByUnit(zoomUnit)); } template bool impl_IValueProvider::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(IValueProvider)->get_IsReadOnly(&value)); return value; } template hstring impl_IValueProvider::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(IValueProvider)->get_Value(put_abi(value))); return value; } -template void impl_IValueProvider::SetValue(hstring_ref value) const +template void impl_IValueProvider::SetValue(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetValue(get(value))); + check_hresult(WINRT_SHIM(IValueProvider)->abi_SetValue(get_abi(value))); } template void impl_IVirtualizedItemProvider::Realize() const { - check_hresult(static_cast(static_cast(*this))->abi_Realize()); + check_hresult(WINRT_SHIM(IVirtualizedItemProvider)->abi_Realize()); } template bool impl_IWindowProvider::IsModal() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsModal(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_IsModal(&value)); return value; } template bool impl_IWindowProvider::IsTopmost() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTopmost(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_IsTopmost(&value)); return value; } template bool impl_IWindowProvider::Maximizable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Maximizable(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_Maximizable(&value)); return value; } template bool impl_IWindowProvider::Minimizable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Minimizable(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_Minimizable(&value)); return value; } template Windows::UI::Xaml::Automation::WindowInteractionState impl_IWindowProvider::InteractionState() const { Windows::UI::Xaml::Automation::WindowInteractionState value {}; - check_hresult(static_cast(static_cast(*this))->get_InteractionState(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_InteractionState(&value)); return value; } template Windows::UI::Xaml::Automation::WindowVisualState impl_IWindowProvider::VisualState() const { Windows::UI::Xaml::Automation::WindowVisualState value {}; - check_hresult(static_cast(static_cast(*this))->get_VisualState(&value)); + check_hresult(WINRT_SHIM(IWindowProvider)->get_VisualState(&value)); return value; } template void impl_IWindowProvider::Close() const { - check_hresult(static_cast(static_cast(*this))->abi_Close()); + check_hresult(WINRT_SHIM(IWindowProvider)->abi_Close()); } template void impl_IWindowProvider::SetVisualState(Windows::UI::Xaml::Automation::WindowVisualState state) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVisualState(state)); + check_hresult(WINRT_SHIM(IWindowProvider)->abi_SetVisualState(state)); } template bool impl_IWindowProvider::WaitForInputIdle(int32_t milliseconds) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_WaitForInputIdle(milliseconds, &returnValue)); + check_hresult(WINRT_SHIM(IWindowProvider)->abi_WaitForInputIdle(milliseconds, &returnValue)); return returnValue; } -template Windows::IInspectable impl_ICustomNavigationProvider::NavigateCustom(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const +template Windows::Foundation::IInspectable impl_ICustomNavigationProvider::NavigateCustom(Windows::UI::Xaml::Automation::Peers::AutomationNavigationDirection direction) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_NavigateCustom(direction, put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(ICustomNavigationProvider)->abi_NavigateCustom(direction, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextEditProvider::GetActiveComposition() const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetActiveComposition(put(returnValue))); + check_hresult(WINRT_SHIM(ITextEditProvider)->abi_GetActiveComposition(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Automation::Provider::ITextRangeProvider impl_ITextEditProvider::GetConversionTarget() const { Windows::UI::Xaml::Automation::Provider::ITextRangeProvider returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetConversionTarget(put(returnValue))); + check_hresult(WINRT_SHIM(ITextEditProvider)->abi_GetConversionTarget(put_abi(returnValue))); return returnValue; } } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IAnnotationProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ICustomNavigationProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IDockProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IDragProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IDropTargetProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IExpandCollapseProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IGridItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IGridProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IIRawElementProviderSimple & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IInvokeProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IItemContainerProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IMultipleViewProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IObjectModelProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IRangeValueProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IScrollItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IScrollProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ISelectionItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ISelectionProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ISpreadsheetItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ISpreadsheetProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IStylesProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ISynchronizedInputProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITableItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITableProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextChildProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextEditProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IToggleProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITransformProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::ITransformProvider2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IValueProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IVirtualizedItemProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IWindowProvider & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Text.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Text.h index 5630be63c..6e3aa7906 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Text.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.Text.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Xaml.Automation.Text.3.h" #include "Windows.UI.Xaml.Automation.h" @@ -13,3 +16,5 @@ namespace impl { } } + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.h index f6ae602b1..3aae82a24 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Automation.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.UI.Xaml.3.h" #include "internal/Windows.UI.Xaml.Automation.Peers.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -20,11 +23,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_AnnotationTypeIdProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnnotationTypeIdProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationTypeIdProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationTypeIdProperty()); return S_OK; } catch (...) @@ -34,11 +38,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AnnotationTypeNameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationTypeNameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationTypeNameProperty()); return S_OK; } catch (...) @@ -48,11 +53,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AuthorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AuthorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AuthorProperty()); return S_OK; } catch (...) @@ -62,11 +68,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DateTimeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateTimeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateTimeProperty()); return S_OK; } catch (...) @@ -76,11 +83,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_TargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetProperty()); return S_OK; } catch (...) @@ -98,7 +106,8 @@ struct produce : produc { try { - *value = detach(this->shim().Type()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Type()); return S_OK; } catch (...) @@ -111,6 +120,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Type(value); return S_OK; } @@ -120,11 +130,12 @@ struct produce : produc } } - HRESULT __stdcall get_Element(abi_arg_out value) noexcept override + HRESULT __stdcall get_Element(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Element()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Element()); return S_OK; } catch (...) @@ -134,10 +145,11 @@ struct produce : produc } } - HRESULT __stdcall put_Element(abi_arg_in value) noexcept override + HRESULT __stdcall put_Element(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Element(*reinterpret_cast(&value)); return S_OK; } @@ -151,11 +163,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(type)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(type)); return S_OK; } catch (...) @@ -165,11 +178,12 @@ struct produce : } } - HRESULT __stdcall abi_CreateWithElementParameter(Windows::UI::Xaml::Automation::AnnotationType type, abi_arg_in element, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateWithElementParameter(Windows::UI::Xaml::Automation::AnnotationType type, impl::abi_arg_in element, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateWithElementParameter(type, *reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateWithElementParameter(type, *reinterpret_cast(&element))); return S_OK; } catch (...) @@ -183,11 +197,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_TypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TypeProperty()); return S_OK; } catch (...) @@ -197,11 +212,12 @@ struct produce : } } - HRESULT __stdcall get_ElementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ElementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ElementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementProperty()); return S_OK; } catch (...) @@ -219,11 +235,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_AcceleratorKeyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AcceleratorKeyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcceleratorKeyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceleratorKeyProperty()); return S_OK; } catch (...) @@ -233,11 +250,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AccessKeyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccessKeyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessKeyProperty()); return S_OK; } catch (...) @@ -247,11 +265,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AutomationIdProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutomationIdProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomationIdProperty()); return S_OK; } catch (...) @@ -261,11 +280,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BoundingRectangleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundingRectangleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundingRectangleProperty()); return S_OK; } catch (...) @@ -275,11 +295,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClassNameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClassNameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClassNameProperty()); return S_OK; } catch (...) @@ -289,11 +310,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClickablePointProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClickablePointProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClickablePointProperty()); return S_OK; } catch (...) @@ -303,11 +325,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ControlTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlTypeProperty()); return S_OK; } catch (...) @@ -317,11 +340,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HasKeyboardFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasKeyboardFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasKeyboardFocusProperty()); return S_OK; } catch (...) @@ -331,11 +355,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HelpTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HelpTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HelpTextProperty()); return S_OK; } catch (...) @@ -345,11 +370,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsContentElementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsContentElementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsContentElementProperty()); return S_OK; } catch (...) @@ -359,11 +385,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsControlElementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsControlElementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsControlElementProperty()); return S_OK; } catch (...) @@ -373,11 +400,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabledProperty()); return S_OK; } catch (...) @@ -387,11 +415,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsKeyboardFocusableProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsKeyboardFocusableProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsKeyboardFocusableProperty()); return S_OK; } catch (...) @@ -401,11 +430,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsOffscreenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOffscreenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOffscreenProperty()); return S_OK; } catch (...) @@ -415,11 +445,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsPasswordProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPasswordProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPasswordProperty()); return S_OK; } catch (...) @@ -429,11 +460,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsRequiredForFormProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsRequiredForFormProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRequiredForFormProperty()); return S_OK; } catch (...) @@ -443,11 +475,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemStatusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemStatusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemStatusProperty()); return S_OK; } catch (...) @@ -457,11 +490,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTypeProperty()); return S_OK; } catch (...) @@ -471,11 +505,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LabeledByProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabeledByProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabeledByProperty()); return S_OK; } catch (...) @@ -485,11 +520,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalizedControlTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalizedControlTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalizedControlTypeProperty()); return S_OK; } catch (...) @@ -499,11 +535,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_NameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NameProperty()); return S_OK; } catch (...) @@ -513,11 +550,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -527,11 +565,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LiveSettingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LiveSettingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LiveSettingProperty()); return S_OK; } catch (...) @@ -545,11 +584,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ControlledPeersProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlledPeersProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlledPeersProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlledPeersProperty()); return S_OK; } catch (...) @@ -563,11 +603,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PositionInSetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PositionInSetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionInSetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionInSetProperty()); return S_OK; } catch (...) @@ -577,11 +618,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SizeOfSetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SizeOfSetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeOfSetProperty()); return S_OK; } catch (...) @@ -591,11 +633,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LevelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LevelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LevelProperty()); return S_OK; } catch (...) @@ -605,11 +648,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_AnnotationsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationsProperty()); return S_OK; } catch (...) @@ -623,11 +667,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LandmarkTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LandmarkTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LandmarkTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LandmarkTypeProperty()); return S_OK; } catch (...) @@ -637,11 +682,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LocalizedLandmarkTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalizedLandmarkTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalizedLandmarkTypeProperty()); return S_OK; } catch (...) @@ -655,11 +701,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_IsPeripheralProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPeripheralProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPeripheralProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPeripheralProperty()); return S_OK; } catch (...) @@ -669,11 +716,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsDataValidForFormProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDataValidForFormProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataValidForFormProperty()); return S_OK; } catch (...) @@ -683,11 +731,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FullDescriptionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullDescriptionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullDescriptionProperty()); return S_OK; } catch (...) @@ -697,11 +746,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DescribedByProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DescribedByProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DescribedByProperty()); return S_OK; } catch (...) @@ -711,11 +761,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FlowsToProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlowsToProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowsToProperty()); return S_OK; } catch (...) @@ -725,11 +776,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FlowsFromProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlowsFromProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowsFromProperty()); return S_OK; } catch (...) @@ -747,11 +799,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_AcceleratorKeyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AcceleratorKeyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcceleratorKeyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceleratorKeyProperty()); return S_OK; } catch (...) @@ -761,11 +814,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAcceleratorKey(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAcceleratorKey(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAcceleratorKey(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAcceleratorKey(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -775,10 +829,11 @@ struct produce : } } - HRESULT __stdcall abi_SetAcceleratorKey(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAcceleratorKey(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAcceleratorKey(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -788,11 +843,12 @@ struct produce : } } - HRESULT __stdcall get_AccessKeyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccessKeyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccessKeyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessKeyProperty()); return S_OK; } catch (...) @@ -802,11 +858,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAccessKey(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAccessKey(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAccessKey(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAccessKey(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -816,10 +873,11 @@ struct produce : } } - HRESULT __stdcall abi_SetAccessKey(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAccessKey(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAccessKey(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -829,11 +887,12 @@ struct produce : } } - HRESULT __stdcall get_AutomationIdProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutomationIdProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutomationIdProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutomationIdProperty()); return S_OK; } catch (...) @@ -843,11 +902,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAutomationId(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAutomationId(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAutomationId(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAutomationId(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -857,10 +917,11 @@ struct produce : } } - HRESULT __stdcall abi_SetAutomationId(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAutomationId(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAutomationId(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -870,11 +931,12 @@ struct produce : } } - HRESULT __stdcall get_HelpTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HelpTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HelpTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HelpTextProperty()); return S_OK; } catch (...) @@ -884,11 +946,12 @@ struct produce : } } - HRESULT __stdcall abi_GetHelpText(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetHelpText(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetHelpText(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetHelpText(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -898,10 +961,11 @@ struct produce : } } - HRESULT __stdcall abi_SetHelpText(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetHelpText(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHelpText(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -911,11 +975,12 @@ struct produce : } } - HRESULT __stdcall get_IsRequiredForFormProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsRequiredForFormProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsRequiredForFormProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRequiredForFormProperty()); return S_OK; } catch (...) @@ -925,11 +990,12 @@ struct produce : } } - HRESULT __stdcall abi_GetIsRequiredForForm(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetIsRequiredForForm(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetIsRequiredForForm(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIsRequiredForForm(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -938,10 +1004,11 @@ struct produce : } } - HRESULT __stdcall abi_SetIsRequiredForForm(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetIsRequiredForForm(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsRequiredForForm(*reinterpret_cast(&element), value); return S_OK; } @@ -951,11 +1018,12 @@ struct produce : } } - HRESULT __stdcall get_ItemStatusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemStatusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemStatusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemStatusProperty()); return S_OK; } catch (...) @@ -965,11 +1033,12 @@ struct produce : } } - HRESULT __stdcall abi_GetItemStatus(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetItemStatus(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetItemStatus(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetItemStatus(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -979,10 +1048,11 @@ struct produce : } } - HRESULT __stdcall abi_SetItemStatus(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetItemStatus(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetItemStatus(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -992,11 +1062,12 @@ struct produce : } } - HRESULT __stdcall get_ItemTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTypeProperty()); return S_OK; } catch (...) @@ -1006,11 +1077,12 @@ struct produce : } } - HRESULT __stdcall abi_GetItemType(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetItemType(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetItemType(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetItemType(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1020,10 +1092,11 @@ struct produce : } } - HRESULT __stdcall abi_SetItemType(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetItemType(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetItemType(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1033,11 +1106,12 @@ struct produce : } } - HRESULT __stdcall get_LabeledByProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LabeledByProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabeledByProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabeledByProperty()); return S_OK; } catch (...) @@ -1047,11 +1121,12 @@ struct produce : } } - HRESULT __stdcall abi_GetLabeledBy(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLabeledBy(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLabeledBy(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLabeledBy(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1061,10 +1136,11 @@ struct produce : } } - HRESULT __stdcall abi_SetLabeledBy(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetLabeledBy(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLabeledBy(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1074,11 +1150,12 @@ struct produce : } } - HRESULT __stdcall get_NameProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NameProperty()); return S_OK; } catch (...) @@ -1088,11 +1165,12 @@ struct produce : } } - HRESULT __stdcall abi_GetName(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetName(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetName(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetName(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1102,10 +1180,11 @@ struct produce : } } - HRESULT __stdcall abi_SetName(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetName(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetName(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1115,11 +1194,12 @@ struct produce : } } - HRESULT __stdcall get_LiveSettingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LiveSettingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LiveSettingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LiveSettingProperty()); return S_OK; } catch (...) @@ -1129,11 +1209,12 @@ struct produce : } } - HRESULT __stdcall abi_GetLiveSetting(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting * value) noexcept override + HRESULT __stdcall abi_GetLiveSetting(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting * value) noexcept override { try { - *value = detach(this->shim().GetLiveSetting(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLiveSetting(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1142,10 +1223,11 @@ struct produce : } } - HRESULT __stdcall abi_SetLiveSetting(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting value) noexcept override + HRESULT __stdcall abi_SetLiveSetting(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLiveSetting(*reinterpret_cast(&element), value); return S_OK; } @@ -1159,11 +1241,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_AccessibilityViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AccessibilityViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AccessibilityViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AccessibilityViewProperty()); return S_OK; } catch (...) @@ -1173,11 +1256,12 @@ struct produce } } - HRESULT __stdcall abi_GetAccessibilityView(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AccessibilityView * value) noexcept override + HRESULT __stdcall abi_GetAccessibilityView(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AccessibilityView * value) noexcept override { try { - *value = detach(this->shim().GetAccessibilityView(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAccessibilityView(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1186,10 +1270,11 @@ struct produce } } - HRESULT __stdcall abi_SetAccessibilityView(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AccessibilityView value) noexcept override + HRESULT __stdcall abi_SetAccessibilityView(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AccessibilityView value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAccessibilityView(*reinterpret_cast(&element), value); return S_OK; } @@ -1199,11 +1284,12 @@ struct produce } } - HRESULT __stdcall get_ControlledPeersProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ControlledPeersProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ControlledPeersProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ControlledPeersProperty()); return S_OK; } catch (...) @@ -1213,11 +1299,12 @@ struct produce } } - HRESULT __stdcall abi_GetControlledPeers(abi_arg_in element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetControlledPeers(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetControlledPeers(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetControlledPeers(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1231,11 +1318,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_PositionInSetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PositionInSetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionInSetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionInSetProperty()); return S_OK; } catch (...) @@ -1245,11 +1333,12 @@ struct produce } } - HRESULT __stdcall abi_GetPositionInSet(abi_arg_in element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetPositionInSet(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetPositionInSet(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPositionInSet(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1258,10 +1347,11 @@ struct produce } } - HRESULT __stdcall abi_SetPositionInSet(abi_arg_in element, int32_t value) noexcept override + HRESULT __stdcall abi_SetPositionInSet(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPositionInSet(*reinterpret_cast(&element), value); return S_OK; } @@ -1271,11 +1361,12 @@ struct produce } } - HRESULT __stdcall get_SizeOfSetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SizeOfSetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SizeOfSetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SizeOfSetProperty()); return S_OK; } catch (...) @@ -1285,11 +1376,12 @@ struct produce } } - HRESULT __stdcall abi_GetSizeOfSet(abi_arg_in element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetSizeOfSet(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetSizeOfSet(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSizeOfSet(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1298,10 +1390,11 @@ struct produce } } - HRESULT __stdcall abi_SetSizeOfSet(abi_arg_in element, int32_t value) noexcept override + HRESULT __stdcall abi_SetSizeOfSet(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSizeOfSet(*reinterpret_cast(&element), value); return S_OK; } @@ -1311,11 +1404,12 @@ struct produce } } - HRESULT __stdcall get_LevelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LevelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LevelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LevelProperty()); return S_OK; } catch (...) @@ -1325,11 +1419,12 @@ struct produce } } - HRESULT __stdcall abi_GetLevel(abi_arg_in element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetLevel(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetLevel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLevel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1338,10 +1433,11 @@ struct produce } } - HRESULT __stdcall abi_SetLevel(abi_arg_in element, int32_t value) noexcept override + HRESULT __stdcall abi_SetLevel(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLevel(*reinterpret_cast(&element), value); return S_OK; } @@ -1351,11 +1447,12 @@ struct produce } } - HRESULT __stdcall get_AnnotationsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AnnotationsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AnnotationsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnnotationsProperty()); return S_OK; } catch (...) @@ -1365,11 +1462,12 @@ struct produce } } - HRESULT __stdcall abi_GetAnnotations(abi_arg_in element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetAnnotations(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetAnnotations(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAnnotations(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1383,11 +1481,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_LandmarkTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LandmarkTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LandmarkTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LandmarkTypeProperty()); return S_OK; } catch (...) @@ -1397,11 +1496,12 @@ struct produce } } - HRESULT __stdcall abi_GetLandmarkType(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType * value) noexcept override + HRESULT __stdcall abi_GetLandmarkType(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType * value) noexcept override { try { - *value = detach(this->shim().GetLandmarkType(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLandmarkType(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1410,10 +1510,11 @@ struct produce } } - HRESULT __stdcall abi_SetLandmarkType(abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType value) noexcept override + HRESULT __stdcall abi_SetLandmarkType(impl::abi_arg_in element, Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLandmarkType(*reinterpret_cast(&element), value); return S_OK; } @@ -1423,11 +1524,12 @@ struct produce } } - HRESULT __stdcall get_LocalizedLandmarkTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalizedLandmarkTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalizedLandmarkTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalizedLandmarkTypeProperty()); return S_OK; } catch (...) @@ -1437,11 +1539,12 @@ struct produce } } - HRESULT __stdcall abi_GetLocalizedLandmarkType(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLocalizedLandmarkType(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLocalizedLandmarkType(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLocalizedLandmarkType(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1451,10 +1554,11 @@ struct produce } } - HRESULT __stdcall abi_SetLocalizedLandmarkType(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetLocalizedLandmarkType(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocalizedLandmarkType(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1468,11 +1572,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_IsPeripheralProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPeripheralProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPeripheralProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPeripheralProperty()); return S_OK; } catch (...) @@ -1482,11 +1587,12 @@ struct produce } } - HRESULT __stdcall abi_GetIsPeripheral(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetIsPeripheral(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetIsPeripheral(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIsPeripheral(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1495,10 +1601,11 @@ struct produce } } - HRESULT __stdcall abi_SetIsPeripheral(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetIsPeripheral(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsPeripheral(*reinterpret_cast(&element), value); return S_OK; } @@ -1508,11 +1615,12 @@ struct produce } } - HRESULT __stdcall get_IsDataValidForFormProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsDataValidForFormProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDataValidForFormProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDataValidForFormProperty()); return S_OK; } catch (...) @@ -1522,11 +1630,12 @@ struct produce } } - HRESULT __stdcall abi_GetIsDataValidForForm(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetIsDataValidForForm(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetIsDataValidForForm(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIsDataValidForForm(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1535,10 +1644,11 @@ struct produce } } - HRESULT __stdcall abi_SetIsDataValidForForm(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetIsDataValidForForm(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsDataValidForForm(*reinterpret_cast(&element), value); return S_OK; } @@ -1548,11 +1658,12 @@ struct produce } } - HRESULT __stdcall get_FullDescriptionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FullDescriptionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullDescriptionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullDescriptionProperty()); return S_OK; } catch (...) @@ -1562,11 +1673,12 @@ struct produce } } - HRESULT __stdcall abi_GetFullDescription(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetFullDescription(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetFullDescription(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFullDescription(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1576,10 +1688,11 @@ struct produce } } - HRESULT __stdcall abi_SetFullDescription(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetFullDescription(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetFullDescription(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1589,11 +1702,12 @@ struct produce } } - HRESULT __stdcall get_LocalizedControlTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocalizedControlTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocalizedControlTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalizedControlTypeProperty()); return S_OK; } catch (...) @@ -1603,11 +1717,12 @@ struct produce } } - HRESULT __stdcall abi_GetLocalizedControlType(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLocalizedControlType(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLocalizedControlType(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLocalizedControlType(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1617,10 +1732,11 @@ struct produce } } - HRESULT __stdcall abi_SetLocalizedControlType(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetLocalizedControlType(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocalizedControlType(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1630,11 +1746,12 @@ struct produce } } - HRESULT __stdcall get_DescribedByProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DescribedByProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DescribedByProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DescribedByProperty()); return S_OK; } catch (...) @@ -1644,11 +1761,12 @@ struct produce } } - HRESULT __stdcall abi_GetDescribedBy(abi_arg_in element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetDescribedBy(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetDescribedBy(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDescribedBy(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1658,11 +1776,12 @@ struct produce } } - HRESULT __stdcall get_FlowsToProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FlowsToProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlowsToProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowsToProperty()); return S_OK; } catch (...) @@ -1672,11 +1791,12 @@ struct produce } } - HRESULT __stdcall abi_GetFlowsTo(abi_arg_in element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetFlowsTo(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetFlowsTo(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFlowsTo(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1686,11 +1806,12 @@ struct produce } } - HRESULT __stdcall get_FlowsFromProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FlowsFromProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlowsFromProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlowsFromProperty()); return S_OK; } catch (...) @@ -1700,11 +1821,12 @@ struct produce } } - HRESULT __stdcall abi_GetFlowsFrom(abi_arg_in element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetFlowsFrom(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetFlowsFrom(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetFlowsFrom(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1726,11 +1848,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DockPositionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DockPositionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DockPositionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DockPositionProperty()); return S_OK; } catch (...) @@ -1748,11 +1871,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DropEffectProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropEffectProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropEffectProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropEffectProperty()); return S_OK; } catch (...) @@ -1762,11 +1886,12 @@ struct produce } } - HRESULT __stdcall get_DropEffectsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropEffectsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropEffectsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropEffectsProperty()); return S_OK; } catch (...) @@ -1776,11 +1901,12 @@ struct produce } } - HRESULT __stdcall get_GrabbedItemsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GrabbedItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GrabbedItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GrabbedItemsProperty()); return S_OK; } catch (...) @@ -1790,11 +1916,12 @@ struct produce } } - HRESULT __stdcall get_IsGrabbedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsGrabbedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsGrabbedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGrabbedProperty()); return S_OK; } catch (...) @@ -1812,11 +1939,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DropTargetEffectProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropTargetEffectProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropTargetEffectProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropTargetEffectProperty()); return S_OK; } catch (...) @@ -1826,11 +1954,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DropTargetEffectsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropTargetEffectsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropTargetEffectsProperty()); return S_OK; } catch (...) @@ -1848,11 +1977,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ExpandCollapseStateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExpandCollapseStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExpandCollapseStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExpandCollapseStateProperty()); return S_OK; } catch (...) @@ -1870,11 +2000,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ColumnProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColumnProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnProperty()); return S_OK; } catch (...) @@ -1884,11 +2015,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ColumnSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnSpanProperty()); return S_OK; } catch (...) @@ -1898,11 +2030,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContainingGridProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainingGridProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainingGridProperty()); return S_OK; } catch (...) @@ -1912,11 +2045,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowProperty()); return S_OK; } catch (...) @@ -1926,11 +2060,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RowSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowSpanProperty()); return S_OK; } catch (...) @@ -1948,11 +2083,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_ColumnCountProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColumnCountProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnCountProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnCountProperty()); return S_OK; } catch (...) @@ -1962,11 +2098,12 @@ struct produce } } - HRESULT __stdcall get_RowCountProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RowCountProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowCountProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowCountProperty()); return S_OK; } catch (...) @@ -1984,11 +2121,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CurrentViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentViewProperty()); return S_OK; } catch (...) @@ -1998,11 +2136,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SupportedViewsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SupportedViewsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SupportedViewsProperty()); return S_OK; } catch (...) @@ -2020,11 +2159,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_IsReadOnlyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsReadOnlyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsReadOnlyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnlyProperty()); return S_OK; } catch (...) @@ -2034,11 +2174,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LargeChangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LargeChangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeChangeProperty()); return S_OK; } catch (...) @@ -2048,11 +2189,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaximumProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumProperty()); return S_OK; } catch (...) @@ -2062,11 +2204,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinimumProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinimumProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumProperty()); return S_OK; } catch (...) @@ -2076,11 +2219,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SmallChangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmallChangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallChangeProperty()); return S_OK; } catch (...) @@ -2090,11 +2234,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValueProperty()); return S_OK; } catch (...) @@ -2112,11 +2257,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_HorizontallyScrollableProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontallyScrollableProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontallyScrollableProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontallyScrollableProperty()); return S_OK; } catch (...) @@ -2126,11 +2272,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HorizontalScrollPercentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalScrollPercentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollPercentProperty()); return S_OK; } catch (...) @@ -2140,11 +2287,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HorizontalViewSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalViewSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalViewSizeProperty()); return S_OK; } catch (...) @@ -2158,7 +2306,8 @@ struct produceshim().NoScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NoScroll()); return S_OK; } catch (...) @@ -2167,11 +2316,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_VerticallyScrollableProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticallyScrollableProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticallyScrollableProperty()); return S_OK; } catch (...) @@ -2181,11 +2331,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_VerticalScrollPercentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalScrollPercentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollPercentProperty()); return S_OK; } catch (...) @@ -2195,11 +2346,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_VerticalViewSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalViewSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalViewSizeProperty()); return S_OK; } catch (...) @@ -2217,11 +2369,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_IsSelectedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSelectedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSelectedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectedProperty()); return S_OK; } catch (...) @@ -2231,11 +2384,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectionContainerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionContainerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionContainerProperty()); return S_OK; } catch (...) @@ -2253,11 +2407,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_CanSelectMultipleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanSelectMultipleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanSelectMultipleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSelectMultipleProperty()); return S_OK; } catch (...) @@ -2267,11 +2422,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsSelectionRequiredProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSelectionRequiredProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectionRequiredProperty()); return S_OK; } catch (...) @@ -2281,11 +2437,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionProperty()); return S_OK; } catch (...) @@ -2303,11 +2460,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_FormulaProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FormulaProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FormulaProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FormulaProperty()); return S_OK; } catch (...) @@ -2325,11 +2483,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ExtendedPropertiesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtendedPropertiesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtendedPropertiesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtendedPropertiesProperty()); return S_OK; } catch (...) @@ -2339,11 +2498,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FillColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillColorProperty()); return S_OK; } catch (...) @@ -2353,11 +2513,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FillPatternColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillPatternColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillPatternColorProperty()); return S_OK; } catch (...) @@ -2367,11 +2528,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FillPatternStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillPatternStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillPatternStyleProperty()); return S_OK; } catch (...) @@ -2381,11 +2543,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ShapeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShapeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShapeProperty()); return S_OK; } catch (...) @@ -2395,11 +2558,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StyleIdProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StyleIdProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StyleIdProperty()); return S_OK; } catch (...) @@ -2409,11 +2573,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_StyleNameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StyleNameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StyleNameProperty()); return S_OK; } catch (...) @@ -2431,11 +2596,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ColumnHeaderItemsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColumnHeaderItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnHeaderItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnHeaderItemsProperty()); return S_OK; } catch (...) @@ -2445,11 +2611,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RowHeaderItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowHeaderItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowHeaderItemsProperty()); return S_OK; } catch (...) @@ -2467,11 +2634,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_ColumnHeadersProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColumnHeadersProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnHeadersProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnHeadersProperty()); return S_OK; } catch (...) @@ -2481,11 +2649,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RowHeadersProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowHeadersProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowHeadersProperty()); return S_OK; } catch (...) @@ -2495,11 +2664,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_RowOrColumnMajorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowOrColumnMajorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowOrColumnMajorProperty()); return S_OK; } catch (...) @@ -2517,11 +2687,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_ToggleStateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ToggleStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ToggleStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleStateProperty()); return S_OK; } catch (...) @@ -2539,11 +2710,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_CanZoomProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanZoomProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanZoomProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanZoomProperty()); return S_OK; } catch (...) @@ -2553,11 +2725,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ZoomLevelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomLevelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevelProperty()); return S_OK; } catch (...) @@ -2567,11 +2740,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MaxZoomProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxZoomProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxZoomProperty()); return S_OK; } catch (...) @@ -2581,11 +2755,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinZoomProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinZoomProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinZoomProperty()); return S_OK; } catch (...) @@ -2603,11 +2778,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_CanMoveProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanMoveProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanMoveProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMoveProperty()); return S_OK; } catch (...) @@ -2617,11 +2793,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CanResizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanResizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanResizeProperty()); return S_OK; } catch (...) @@ -2631,11 +2808,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CanRotateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanRotateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanRotateProperty()); return S_OK; } catch (...) @@ -2653,11 +2831,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_IsReadOnlyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsReadOnlyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsReadOnlyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnlyProperty()); return S_OK; } catch (...) @@ -2667,11 +2846,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValueProperty()); return S_OK; } catch (...) @@ -2689,11 +2869,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_CanMaximizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanMaximizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanMaximizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMaximizeProperty()); return S_OK; } catch (...) @@ -2703,11 +2884,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CanMinimizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanMinimizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanMinimizeProperty()); return S_OK; } catch (...) @@ -2717,11 +2899,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsModalProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsModalProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsModalProperty()); return S_OK; } catch (...) @@ -2731,11 +2914,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IsTopmostProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTopmostProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTopmostProperty()); return S_OK; } catch (...) @@ -2745,11 +2929,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WindowInteractionStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WindowInteractionStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WindowInteractionStateProperty()); return S_OK; } catch (...) @@ -2759,11 +2944,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WindowVisualStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WindowVisualStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WindowVisualStateProperty()); return S_OK; } catch (...) @@ -2781,1237 +2967,1237 @@ namespace Windows::UI::Xaml::Automation { template Windows::UI::Xaml::Automation::AutomationProperty impl_IAnnotationPatternIdentifiersStatics::AnnotationTypeIdProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AnnotationTypeIdProperty(put(value))); + check_hresult(WINRT_SHIM(IAnnotationPatternIdentifiersStatics)->get_AnnotationTypeIdProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAnnotationPatternIdentifiersStatics::AnnotationTypeNameProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AnnotationTypeNameProperty(put(value))); + check_hresult(WINRT_SHIM(IAnnotationPatternIdentifiersStatics)->get_AnnotationTypeNameProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAnnotationPatternIdentifiersStatics::AuthorProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AuthorProperty(put(value))); + check_hresult(WINRT_SHIM(IAnnotationPatternIdentifiersStatics)->get_AuthorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAnnotationPatternIdentifiersStatics::DateTimeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DateTimeProperty(put(value))); + check_hresult(WINRT_SHIM(IAnnotationPatternIdentifiersStatics)->get_DateTimeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAnnotationPatternIdentifiersStatics::TargetProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetProperty(put(value))); + check_hresult(WINRT_SHIM(IAnnotationPatternIdentifiersStatics)->get_TargetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::AcceleratorKeyProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AcceleratorKeyProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_AcceleratorKeyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::AccessKeyProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AccessKeyProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_AccessKeyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::AutomationIdProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutomationIdProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_AutomationIdProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::BoundingRectangleProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BoundingRectangleProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_BoundingRectangleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::ClassNameProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClassNameProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_ClassNameProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::ClickablePointProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClickablePointProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_ClickablePointProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::ControlTypeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_ControlTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::HasKeyboardFocusProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HasKeyboardFocusProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_HasKeyboardFocusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::HelpTextProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HelpTextProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_HelpTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsContentElementProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsContentElementProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsContentElementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsControlElementProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsControlElementProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsControlElementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsEnabledProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsKeyboardFocusableProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsKeyboardFocusableProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsKeyboardFocusableProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsOffscreenProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOffscreenProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsOffscreenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsPasswordProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPasswordProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsPasswordProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::IsRequiredForFormProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsRequiredForFormProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_IsRequiredForFormProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::ItemStatusProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemStatusProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_ItemStatusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::ItemTypeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_ItemTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::LabeledByProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LabeledByProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_LabeledByProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::LocalizedControlTypeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalizedControlTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_LocalizedControlTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::NameProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NameProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_NameProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::OrientationProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics::LiveSettingProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LiveSettingProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics)->get_LiveSettingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics2::ControlledPeersProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlledPeersProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics2)->get_ControlledPeersProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics3::PositionInSetProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PositionInSetProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics3)->get_PositionInSetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics3::SizeOfSetProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SizeOfSetProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics3)->get_SizeOfSetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics3::LevelProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LevelProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics3)->get_LevelProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics3::AnnotationsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AnnotationsProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics3)->get_AnnotationsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics4::LandmarkTypeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LandmarkTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics4)->get_LandmarkTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics4::LocalizedLandmarkTypeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalizedLandmarkTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics4)->get_LocalizedLandmarkTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::IsPeripheralProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPeripheralProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_IsPeripheralProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::IsDataValidForFormProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsDataValidForFormProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_IsDataValidForFormProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::FullDescriptionProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FullDescriptionProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_FullDescriptionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::DescribedByProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DescribedByProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_DescribedByProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::FlowsToProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlowsToProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_FlowsToProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IAutomationElementIdentifiersStatics5::FlowsFromProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlowsFromProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationElementIdentifiersStatics5)->get_FlowsFromProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::AcceleratorKeyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AcceleratorKeyProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_AcceleratorKeyProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetAcceleratorKey(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetAcceleratorKey(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetAcceleratorKey(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetAcceleratorKey(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetAcceleratorKey(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAcceleratorKey(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetAcceleratorKey(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::AccessKeyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AccessKeyProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_AccessKeyProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetAccessKey(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessKey(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetAccessKey(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetAccessKey(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetAccessKey(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAccessKey(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetAccessKey(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::AutomationIdProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutomationIdProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_AutomationIdProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetAutomationId(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetAutomationId(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetAutomationId(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetAutomationId(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetAutomationId(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAutomationId(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetAutomationId(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::HelpTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HelpTextProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_HelpTextProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetHelpText(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetHelpText(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetHelpText(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetHelpText(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetHelpText(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHelpText(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetHelpText(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::IsRequiredForFormProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsRequiredForFormProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_IsRequiredForFormProperty(put_abi(value))); return value; } template bool impl_IAutomationPropertiesStatics::GetIsRequiredForForm(const Windows::UI::Xaml::DependencyObject & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIsRequiredForForm(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetIsRequiredForForm(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics::SetIsRequiredForForm(const Windows::UI::Xaml::DependencyObject & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetIsRequiredForForm(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetIsRequiredForForm(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::ItemStatusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemStatusProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_ItemStatusProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetItemStatus(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetItemStatus(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetItemStatus(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetItemStatus(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetItemStatus(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetItemStatus(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetItemStatus(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::ItemTypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_ItemTypeProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetItemType(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetItemType(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetItemType(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetItemType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetItemType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetItemType(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetItemType(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::LabeledByProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LabeledByProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_LabeledByProperty(put_abi(value))); return value; } template Windows::UI::Xaml::UIElement impl_IAutomationPropertiesStatics::GetLabeledBy(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLabeledBy(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetLabeledBy(get_abi(element), put_abi(value))); return value; } template void impl_IAutomationPropertiesStatics::SetLabeledBy(const Windows::UI::Xaml::DependencyObject & element, const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLabeledBy(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetLabeledBy(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::NameProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NameProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_NameProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics::GetName(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetName(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetName(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics::SetName(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics::SetName(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetName(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetName(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics::LiveSettingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LiveSettingProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->get_LiveSettingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting impl_IAutomationPropertiesStatics::GetLiveSetting(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLiveSetting(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_GetLiveSetting(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics::SetLiveSetting(const Windows::UI::Xaml::DependencyObject & element, Windows::UI::Xaml::Automation::Peers::AutomationLiveSetting value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLiveSetting(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics)->abi_SetLiveSetting(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics2::AccessibilityViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AccessibilityViewProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics2)->get_AccessibilityViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::AccessibilityView impl_IAutomationPropertiesStatics2::GetAccessibilityView(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Automation::Peers::AccessibilityView value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAccessibilityView(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics2)->abi_GetAccessibilityView(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics2::SetAccessibilityView(const Windows::UI::Xaml::DependencyObject & element, Windows::UI::Xaml::Automation::Peers::AccessibilityView value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAccessibilityView(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics2)->abi_SetAccessibilityView(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics2::ControlledPeersProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ControlledPeersProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics2)->get_ControlledPeersProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAutomationPropertiesStatics2::GetControlledPeers(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetControlledPeers(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics2)->abi_GetControlledPeers(get_abi(element), put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics3::PositionInSetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PositionInSetProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->get_PositionInSetProperty(put_abi(value))); return value; } template int32_t impl_IAutomationPropertiesStatics3::GetPositionInSet(const Windows::UI::Xaml::DependencyObject & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPositionInSet(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_GetPositionInSet(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics3::SetPositionInSet(const Windows::UI::Xaml::DependencyObject & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPositionInSet(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_SetPositionInSet(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics3::SizeOfSetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SizeOfSetProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->get_SizeOfSetProperty(put_abi(value))); return value; } template int32_t impl_IAutomationPropertiesStatics3::GetSizeOfSet(const Windows::UI::Xaml::DependencyObject & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetSizeOfSet(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_GetSizeOfSet(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics3::SetSizeOfSet(const Windows::UI::Xaml::DependencyObject & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSizeOfSet(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_SetSizeOfSet(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics3::LevelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LevelProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->get_LevelProperty(put_abi(value))); return value; } template int32_t impl_IAutomationPropertiesStatics3::GetLevel(const Windows::UI::Xaml::DependencyObject & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLevel(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_GetLevel(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics3::SetLevel(const Windows::UI::Xaml::DependencyObject & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLevel(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_SetLevel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics3::AnnotationsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AnnotationsProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->get_AnnotationsProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAutomationPropertiesStatics3::GetAnnotations(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetAnnotations(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics3)->abi_GetAnnotations(get_abi(element), put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics4::LandmarkTypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LandmarkTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->get_LandmarkTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType impl_IAutomationPropertiesStatics4::GetLandmarkType(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLandmarkType(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->abi_GetLandmarkType(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics4::SetLandmarkType(const Windows::UI::Xaml::DependencyObject & element, Windows::UI::Xaml::Automation::Peers::AutomationLandmarkType value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLandmarkType(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->abi_SetLandmarkType(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics4::LocalizedLandmarkTypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalizedLandmarkTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->get_LocalizedLandmarkTypeProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics4::GetLocalizedLandmarkType(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedLandmarkType(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->abi_GetLocalizedLandmarkType(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics4::SetLocalizedLandmarkType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics4::SetLocalizedLandmarkType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocalizedLandmarkType(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics4)->abi_SetLocalizedLandmarkType(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::IsPeripheralProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPeripheralProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_IsPeripheralProperty(put_abi(value))); return value; } template bool impl_IAutomationPropertiesStatics5::GetIsPeripheral(const Windows::UI::Xaml::DependencyObject & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIsPeripheral(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetIsPeripheral(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics5::SetIsPeripheral(const Windows::UI::Xaml::DependencyObject & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetIsPeripheral(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_SetIsPeripheral(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::IsDataValidForFormProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsDataValidForFormProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_IsDataValidForFormProperty(put_abi(value))); return value; } template bool impl_IAutomationPropertiesStatics5::GetIsDataValidForForm(const Windows::UI::Xaml::DependencyObject & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIsDataValidForForm(get(element), &value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetIsDataValidForForm(get_abi(element), &value)); return value; } template void impl_IAutomationPropertiesStatics5::SetIsDataValidForForm(const Windows::UI::Xaml::DependencyObject & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetIsDataValidForForm(get(element), value)); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_SetIsDataValidForForm(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::FullDescriptionProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FullDescriptionProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_FullDescriptionProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics5::GetFullDescription(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetFullDescription(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetFullDescription(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics5::SetFullDescription(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics5::SetFullDescription(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetFullDescription(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_SetFullDescription(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::LocalizedControlTypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocalizedControlTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_LocalizedControlTypeProperty(put_abi(value))); return value; } template hstring impl_IAutomationPropertiesStatics5::GetLocalizedControlType(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetLocalizedControlType(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetLocalizedControlType(get_abi(element), put_abi(value))); return value; } -template void impl_IAutomationPropertiesStatics5::SetLocalizedControlType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IAutomationPropertiesStatics5::SetLocalizedControlType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocalizedControlType(get(element), get(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_SetLocalizedControlType(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::DescribedByProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DescribedByProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_DescribedByProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAutomationPropertiesStatics5::GetDescribedBy(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetDescribedBy(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetDescribedBy(get_abi(element), put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::FlowsToProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlowsToProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_FlowsToProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAutomationPropertiesStatics5::GetFlowsTo(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetFlowsTo(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetFlowsTo(get_abi(element), put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationPropertiesStatics5::FlowsFromProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlowsFromProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->get_FlowsFromProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IAutomationPropertiesStatics5::GetFlowsFrom(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->abi_GetFlowsFrom(get(element), put(value))); + check_hresult(WINRT_SHIM(IAutomationPropertiesStatics5)->abi_GetFlowsFrom(get_abi(element), put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDockPatternIdentifiersStatics::DockPositionProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DockPositionProperty(put(value))); + check_hresult(WINRT_SHIM(IDockPatternIdentifiersStatics)->get_DockPositionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDragPatternIdentifiersStatics::DropEffectProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DropEffectProperty(put(value))); + check_hresult(WINRT_SHIM(IDragPatternIdentifiersStatics)->get_DropEffectProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDragPatternIdentifiersStatics::DropEffectsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DropEffectsProperty(put(value))); + check_hresult(WINRT_SHIM(IDragPatternIdentifiersStatics)->get_DropEffectsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDragPatternIdentifiersStatics::GrabbedItemsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GrabbedItemsProperty(put(value))); + check_hresult(WINRT_SHIM(IDragPatternIdentifiersStatics)->get_GrabbedItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDragPatternIdentifiersStatics::IsGrabbedProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsGrabbedProperty(put(value))); + check_hresult(WINRT_SHIM(IDragPatternIdentifiersStatics)->get_IsGrabbedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDropTargetPatternIdentifiersStatics::DropTargetEffectProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DropTargetEffectProperty(put(value))); + check_hresult(WINRT_SHIM(IDropTargetPatternIdentifiersStatics)->get_DropTargetEffectProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IDropTargetPatternIdentifiersStatics::DropTargetEffectsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DropTargetEffectsProperty(put(value))); + check_hresult(WINRT_SHIM(IDropTargetPatternIdentifiersStatics)->get_DropTargetEffectsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IExpandCollapsePatternIdentifiersStatics::ExpandCollapseStateProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExpandCollapseStateProperty(put(value))); + check_hresult(WINRT_SHIM(IExpandCollapsePatternIdentifiersStatics)->get_ExpandCollapseStateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridItemPatternIdentifiersStatics::ColumnProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnProperty(put(value))); + check_hresult(WINRT_SHIM(IGridItemPatternIdentifiersStatics)->get_ColumnProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridItemPatternIdentifiersStatics::ColumnSpanProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IGridItemPatternIdentifiersStatics)->get_ColumnSpanProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridItemPatternIdentifiersStatics::ContainingGridProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContainingGridProperty(put(value))); + check_hresult(WINRT_SHIM(IGridItemPatternIdentifiersStatics)->get_ContainingGridProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridItemPatternIdentifiersStatics::RowProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowProperty(put(value))); + check_hresult(WINRT_SHIM(IGridItemPatternIdentifiersStatics)->get_RowProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridItemPatternIdentifiersStatics::RowSpanProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IGridItemPatternIdentifiersStatics)->get_RowSpanProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridPatternIdentifiersStatics::ColumnCountProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnCountProperty(put(value))); + check_hresult(WINRT_SHIM(IGridPatternIdentifiersStatics)->get_ColumnCountProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IGridPatternIdentifiersStatics::RowCountProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowCountProperty(put(value))); + check_hresult(WINRT_SHIM(IGridPatternIdentifiersStatics)->get_RowCountProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IMultipleViewPatternIdentifiersStatics::CurrentViewProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentViewProperty(put(value))); + check_hresult(WINRT_SHIM(IMultipleViewPatternIdentifiersStatics)->get_CurrentViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IMultipleViewPatternIdentifiersStatics::SupportedViewsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SupportedViewsProperty(put(value))); + check_hresult(WINRT_SHIM(IMultipleViewPatternIdentifiersStatics)->get_SupportedViewsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::IsReadOnlyProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnlyProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_IsReadOnlyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::LargeChangeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LargeChangeProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_LargeChangeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::MaximumProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaximumProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_MaximumProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::MinimumProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinimumProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_MinimumProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::SmallChangeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmallChangeProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_SmallChangeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IRangeValuePatternIdentifiersStatics::ValueProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ValueProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeValuePatternIdentifiersStatics)->get_ValueProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::HorizontallyScrollableProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontallyScrollableProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_HorizontallyScrollableProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::HorizontalScrollPercentProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalScrollPercentProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_HorizontalScrollPercentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::HorizontalViewSizeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalViewSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_HorizontalViewSizeProperty(put_abi(value))); return value; } template double impl_IScrollPatternIdentifiersStatics::NoScroll() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NoScroll(&value)); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_NoScroll(&value)); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::VerticallyScrollableProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticallyScrollableProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_VerticallyScrollableProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::VerticalScrollPercentProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalScrollPercentProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_VerticalScrollPercentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IScrollPatternIdentifiersStatics::VerticalViewSizeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalViewSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollPatternIdentifiersStatics)->get_VerticalViewSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISelectionItemPatternIdentifiersStatics::IsSelectedProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSelectedProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectionItemPatternIdentifiersStatics)->get_IsSelectedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISelectionItemPatternIdentifiersStatics::SelectionContainerProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionContainerProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectionItemPatternIdentifiersStatics)->get_SelectionContainerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISelectionPatternIdentifiersStatics::CanSelectMultipleProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanSelectMultipleProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectionPatternIdentifiersStatics)->get_CanSelectMultipleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISelectionPatternIdentifiersStatics::IsSelectionRequiredProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSelectionRequiredProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectionPatternIdentifiersStatics)->get_IsSelectionRequiredProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISelectionPatternIdentifiersStatics::SelectionProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectionPatternIdentifiersStatics)->get_SelectionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ISpreadsheetItemPatternIdentifiersStatics::FormulaProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FormulaProperty(put(value))); + check_hresult(WINRT_SHIM(ISpreadsheetItemPatternIdentifiersStatics)->get_FormulaProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::ExtendedPropertiesProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ExtendedPropertiesProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_ExtendedPropertiesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::FillColorProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FillColorProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_FillColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::FillPatternColorProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FillPatternColorProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_FillPatternColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::FillPatternStyleProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FillPatternStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_FillPatternStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::ShapeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShapeProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_ShapeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::StyleIdProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StyleIdProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_StyleIdProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IStylesPatternIdentifiersStatics::StyleNameProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StyleNameProperty(put(value))); + check_hresult(WINRT_SHIM(IStylesPatternIdentifiersStatics)->get_StyleNameProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITableItemPatternIdentifiersStatics::ColumnHeaderItemsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnHeaderItemsProperty(put(value))); + check_hresult(WINRT_SHIM(ITableItemPatternIdentifiersStatics)->get_ColumnHeaderItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITableItemPatternIdentifiersStatics::RowHeaderItemsProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowHeaderItemsProperty(put(value))); + check_hresult(WINRT_SHIM(ITableItemPatternIdentifiersStatics)->get_RowHeaderItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITablePatternIdentifiersStatics::ColumnHeadersProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnHeadersProperty(put(value))); + check_hresult(WINRT_SHIM(ITablePatternIdentifiersStatics)->get_ColumnHeadersProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITablePatternIdentifiersStatics::RowHeadersProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowHeadersProperty(put(value))); + check_hresult(WINRT_SHIM(ITablePatternIdentifiersStatics)->get_RowHeadersProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITablePatternIdentifiersStatics::RowOrColumnMajorProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowOrColumnMajorProperty(put(value))); + check_hresult(WINRT_SHIM(ITablePatternIdentifiersStatics)->get_RowOrColumnMajorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITogglePatternIdentifiersStatics::ToggleStateProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ToggleStateProperty(put(value))); + check_hresult(WINRT_SHIM(ITogglePatternIdentifiersStatics)->get_ToggleStateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPattern2IdentifiersStatics::CanZoomProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanZoomProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPattern2IdentifiersStatics)->get_CanZoomProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPattern2IdentifiersStatics::ZoomLevelProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevelProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPattern2IdentifiersStatics)->get_ZoomLevelProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPattern2IdentifiersStatics::MaxZoomProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxZoomProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPattern2IdentifiersStatics)->get_MaxZoomProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPattern2IdentifiersStatics::MinZoomProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinZoomProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPattern2IdentifiersStatics)->get_MinZoomProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPatternIdentifiersStatics::CanMoveProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanMoveProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPatternIdentifiersStatics)->get_CanMoveProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPatternIdentifiersStatics::CanResizeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanResizeProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPatternIdentifiersStatics)->get_CanResizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_ITransformPatternIdentifiersStatics::CanRotateProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanRotateProperty(put(value))); + check_hresult(WINRT_SHIM(ITransformPatternIdentifiersStatics)->get_CanRotateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IValuePatternIdentifiersStatics::IsReadOnlyProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnlyProperty(put(value))); + check_hresult(WINRT_SHIM(IValuePatternIdentifiersStatics)->get_IsReadOnlyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IValuePatternIdentifiersStatics::ValueProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ValueProperty(put(value))); + check_hresult(WINRT_SHIM(IValuePatternIdentifiersStatics)->get_ValueProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::CanMaximizeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanMaximizeProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_CanMaximizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::CanMinimizeProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanMinimizeProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_CanMinimizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::IsModalProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsModalProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_IsModalProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::IsTopmostProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTopmostProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_IsTopmostProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::WindowInteractionStateProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WindowInteractionStateProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_WindowInteractionStateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationProperty impl_IWindowPatternIdentifiersStatics::WindowVisualStateProperty() const { Windows::UI::Xaml::Automation::AutomationProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WindowVisualStateProperty(put(value))); + check_hresult(WINRT_SHIM(IWindowPatternIdentifiersStatics)->get_WindowVisualStateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AnnotationType impl_IAutomationAnnotation::Type() const { Windows::UI::Xaml::Automation::AnnotationType value {}; - check_hresult(static_cast(static_cast(*this))->get_Type(&value)); + check_hresult(WINRT_SHIM(IAutomationAnnotation)->get_Type(&value)); return value; } template void impl_IAutomationAnnotation::Type(Windows::UI::Xaml::Automation::AnnotationType value) const { - check_hresult(static_cast(static_cast(*this))->put_Type(value)); + check_hresult(WINRT_SHIM(IAutomationAnnotation)->put_Type(value)); } template Windows::UI::Xaml::UIElement impl_IAutomationAnnotation::Element() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Element(put(value))); + check_hresult(WINRT_SHIM(IAutomationAnnotation)->get_Element(put_abi(value))); return value; } template void impl_IAutomationAnnotation::Element(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Element(get(value))); + check_hresult(WINRT_SHIM(IAutomationAnnotation)->put_Element(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IAutomationAnnotationStatics::TypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TypeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationAnnotationStatics)->get_TypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutomationAnnotationStatics::ElementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ElementProperty(put(value))); + check_hresult(WINRT_SHIM(IAutomationAnnotationStatics)->get_ElementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Automation::AutomationAnnotation impl_IAutomationAnnotationFactory::CreateInstance(Windows::UI::Xaml::Automation::AnnotationType type) const { Windows::UI::Xaml::Automation::AutomationAnnotation instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(type, put(instance))); + check_hresult(WINRT_SHIM(IAutomationAnnotationFactory)->abi_CreateInstance(type, put_abi(instance))); return instance; } template Windows::UI::Xaml::Automation::AutomationAnnotation impl_IAutomationAnnotationFactory::CreateWithElementParameter(Windows::UI::Xaml::Automation::AnnotationType type, const Windows::UI::Xaml::UIElement & element) const { Windows::UI::Xaml::Automation::AutomationAnnotation instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateWithElementParameter(type, get(element), put(instance))); + check_hresult(WINRT_SHIM(IAutomationAnnotationFactory)->abi_CreateWithElementParameter(type, get_abi(element), put_abi(instance))); return instance; } @@ -4252,7 +4438,7 @@ inline hstring AutomationProperties::GetAcceleratorKey(const Windows::UI::Xaml:: return get_activation_factory().GetAcceleratorKey(element); } -inline void AutomationProperties::SetAcceleratorKey(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetAcceleratorKey(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetAcceleratorKey(element, value); } @@ -4267,7 +4453,7 @@ inline hstring AutomationProperties::GetAccessKey(const Windows::UI::Xaml::Depen return get_activation_factory().GetAccessKey(element); } -inline void AutomationProperties::SetAccessKey(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetAccessKey(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetAccessKey(element, value); } @@ -4282,7 +4468,7 @@ inline hstring AutomationProperties::GetAutomationId(const Windows::UI::Xaml::De return get_activation_factory().GetAutomationId(element); } -inline void AutomationProperties::SetAutomationId(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetAutomationId(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetAutomationId(element, value); } @@ -4297,7 +4483,7 @@ inline hstring AutomationProperties::GetHelpText(const Windows::UI::Xaml::Depend return get_activation_factory().GetHelpText(element); } -inline void AutomationProperties::SetHelpText(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetHelpText(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetHelpText(element, value); } @@ -4327,7 +4513,7 @@ inline hstring AutomationProperties::GetItemStatus(const Windows::UI::Xaml::Depe return get_activation_factory().GetItemStatus(element); } -inline void AutomationProperties::SetItemStatus(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetItemStatus(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetItemStatus(element, value); } @@ -4342,7 +4528,7 @@ inline hstring AutomationProperties::GetItemType(const Windows::UI::Xaml::Depend return get_activation_factory().GetItemType(element); } -inline void AutomationProperties::SetItemType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetItemType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetItemType(element, value); } @@ -4372,7 +4558,7 @@ inline hstring AutomationProperties::GetName(const Windows::UI::Xaml::Dependency return get_activation_factory().GetName(element); } -inline void AutomationProperties::SetName(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetName(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetName(element, value); } @@ -4497,7 +4683,7 @@ inline hstring AutomationProperties::GetLocalizedLandmarkType(const Windows::UI: return get_activation_factory().GetLocalizedLandmarkType(element); } -inline void AutomationProperties::SetLocalizedLandmarkType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetLocalizedLandmarkType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetLocalizedLandmarkType(element, value); } @@ -4542,7 +4728,7 @@ inline hstring AutomationProperties::GetFullDescription(const Windows::UI::Xaml: return get_activation_factory().GetFullDescription(element); } -inline void AutomationProperties::SetFullDescription(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetFullDescription(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetFullDescription(element, value); } @@ -4557,7 +4743,7 @@ inline hstring AutomationProperties::GetLocalizedControlType(const Windows::UI:: return get_activation_factory().GetLocalizedControlType(element); } -inline void AutomationProperties::SetLocalizedControlType(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void AutomationProperties::SetLocalizedControlType(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetLocalizedControlType(element, value); } @@ -4915,3 +5101,752 @@ inline Windows::UI::Xaml::Automation::AutomationProperty WindowPatternIdentifier } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAnnotationPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAnnotationPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationAnnotationFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationAnnotationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiersStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiersStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiersStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationElementIdentifiersStatics5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationPropertiesStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationPropertiesStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationPropertiesStatics3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationPropertiesStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationPropertiesStatics5 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IAutomationProperty & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDockPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDockPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDragPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDragPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDropTargetPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IDropTargetPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IExpandCollapsePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IExpandCollapsePatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IGridItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IGridItemPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IGridPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IGridPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IMultipleViewPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IMultipleViewPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IRangeValuePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IRangeValuePatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IScrollPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IScrollPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISelectionItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISelectionItemPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISelectionPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISelectionPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISpreadsheetItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ISpreadsheetItemPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IStylesPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IStylesPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITableItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITableItemPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITablePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITablePatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITogglePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITogglePatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITransformPattern2Identifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITransformPattern2IdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITransformPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ITransformPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IValuePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IValuePatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IWindowPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::IWindowPatternIdentifiersStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::AnnotationPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::AutomationAnnotation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::AutomationElementIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::AutomationProperties & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::AutomationProperty & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::DockPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::DragPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::DropTargetPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ExpandCollapsePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::GridItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::GridPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::MultipleViewPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::RangeValuePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ScrollPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::SelectionItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::SelectionPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::SpreadsheetItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::StylesPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::TableItemPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::TablePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::TogglePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::TransformPattern2Identifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::TransformPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::ValuePatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Automation::WindowPatternIdentifiers & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Maps.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Maps.h index 77b954a28..fc4171867 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Maps.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Maps.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Devices.Geolocation.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -21,11 +24,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall add_BitmapRequested(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BitmapRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BitmapRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BitmapRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -38,6 +42,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().BitmapRequested(token); return S_OK; } @@ -51,11 +56,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -70,11 +76,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UriFormatString(abi_arg_out value) noexcept override + HRESULT __stdcall get_UriFormatString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UriFormatString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UriFormatString()); return S_OK; } catch (...) @@ -84,10 +91,11 @@ struct produce : p } } - HRESULT __stdcall put_UriFormatString(abi_arg_in value) noexcept override + HRESULT __stdcall put_UriFormatString(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UriFormatString(*reinterpret_cast(&value)); return S_OK; } @@ -97,11 +105,12 @@ struct produce : p } } - HRESULT __stdcall get_AdditionalRequestHeaders(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AdditionalRequestHeaders(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AdditionalRequestHeaders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AdditionalRequestHeaders()); return S_OK; } catch (...) @@ -115,7 +124,8 @@ struct produce : p { try { - *value = detach(this->shim().AllowCaching()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowCaching()); return S_OK; } catch (...) @@ -128,6 +138,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowCaching(value); return S_OK; } @@ -137,11 +148,12 @@ struct produce : p } } - HRESULT __stdcall add_UriRequested(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_UriRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UriRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UriRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -154,6 +166,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().UriRequested(token); return S_OK; } @@ -167,11 +180,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -182,11 +196,12 @@ struct produce uriFormatString, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithUriFormatString(impl::abi_arg_in uriFormatString, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithUriFormatString(*reinterpret_cast(&uriFormatString), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithUriFormatString(*reinterpret_cast(&uriFormatString), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -201,11 +216,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_UriFormatString(abi_arg_out value) noexcept override + HRESULT __stdcall get_UriFormatString(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UriFormatString()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UriFormatString()); return S_OK; } catch (...) @@ -215,10 +231,11 @@ struct produce : } } - HRESULT __stdcall put_UriFormatString(abi_arg_in value) noexcept override + HRESULT __stdcall put_UriFormatString(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UriFormatString(*reinterpret_cast(&value)); return S_OK; } @@ -228,11 +245,12 @@ struct produce : } } - HRESULT __stdcall add_UriRequested(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_UriRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UriRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UriRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -245,6 +263,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().UriRequested(token); return S_OK; } @@ -258,11 +277,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -273,11 +293,12 @@ struct produce uriFormatString, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithUriFormatString(impl::abi_arg_in uriFormatString, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithUriFormatString(*reinterpret_cast(&uriFormatString), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithUriFormatString(*reinterpret_cast(&uriFormatString), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -292,11 +313,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Camera(abi_arg_out value) noexcept override + HRESULT __stdcall get_Camera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Camera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Camera()); return S_OK; } catch (...) @@ -314,7 +336,8 @@ struct produceshim().ChangeReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeReason()); return S_OK; } catch (...) @@ -327,11 +350,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Camera(abi_arg_out value) noexcept override + HRESULT __stdcall get_Camera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Camera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Camera()); return S_OK; } catch (...) @@ -349,7 +373,8 @@ struct produceshim().ChangeReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeReason()); return S_OK; } catch (...) @@ -362,11 +387,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -376,10 +402,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Location(abi_arg_in value) noexcept override + HRESULT __stdcall put_Location(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return S_OK; } @@ -393,7 +420,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Heading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Heading()); return S_OK; } catch (...) @@ -406,6 +434,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Heading(value); return S_OK; } @@ -419,7 +448,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Pitch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pitch()); return S_OK; } catch (...) @@ -432,6 +462,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Pitch(value); return S_OK; } @@ -445,7 +476,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Roll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Roll()); return S_OK; } catch (...) @@ -458,6 +490,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Roll(value); return S_OK; } @@ -471,7 +504,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().FieldOfView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FieldOfView()); return S_OK; } catch (...) @@ -484,6 +518,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().FieldOfView(value); return S_OK; } @@ -497,11 +532,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithLocation(abi_arg_in location, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithLocation(impl::abi_arg_in location, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithLocation(*reinterpret_cast(&location))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithLocation(*reinterpret_cast(&location))); return S_OK; } catch (...) @@ -511,11 +547,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateInstanceWithLocationAndHeading(abi_arg_in location, double headingInDegrees, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithLocationAndHeading(impl::abi_arg_in location, double headingInDegrees, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithLocationAndHeading(*reinterpret_cast(&location), headingInDegrees)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithLocationAndHeading(*reinterpret_cast(&location), headingInDegrees)); return S_OK; } catch (...) @@ -525,11 +562,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateInstanceWithLocationHeadingAndPitch(abi_arg_in location, double headingInDegrees, double pitchInDegrees, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithLocationHeadingAndPitch(impl::abi_arg_in location, double headingInDegrees, double pitchInDegrees, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithLocationHeadingAndPitch(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithLocationHeadingAndPitch(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees)); return S_OK; } catch (...) @@ -539,11 +577,12 @@ struct produce : produc } } - HRESULT __stdcall abi_CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(abi_arg_in location, double headingInDegrees, double pitchInDegrees, double rollInDegrees, double fieldOfViewInDegrees, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(impl::abi_arg_in location, double headingInDegrees, double pitchInDegrees, double rollInDegrees, double fieldOfViewInDegrees, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees, rollInDegrees, fieldOfViewInDegrees)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees, rollInDegrees, fieldOfViewInDegrees)); return S_OK; } catch (...) @@ -557,11 +596,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Center(abi_arg_out value) noexcept override + HRESULT __stdcall get_Center(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Center()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Center()); return S_OK; } catch (...) @@ -571,10 +611,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Center(abi_arg_in value) noexcept override + HRESULT __stdcall put_Center(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Center(*reinterpret_cast(&value)); return S_OK; } @@ -584,11 +625,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Children(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Children(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Children()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Children()); return S_OK; } catch (...) @@ -602,7 +644,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ColorScheme()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorScheme()); return S_OK; } catch (...) @@ -615,6 +658,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ColorScheme(value); return S_OK; } @@ -628,7 +672,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().DesiredPitch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredPitch()); return S_OK; } catch (...) @@ -641,6 +686,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().DesiredPitch(value); return S_OK; } @@ -654,7 +700,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Heading()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Heading()); return S_OK; } catch (...) @@ -667,6 +714,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Heading(value); return S_OK; } @@ -680,7 +728,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().LandmarksVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LandmarksVisible()); return S_OK; } catch (...) @@ -693,6 +742,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LandmarksVisible(value); return S_OK; } @@ -706,7 +756,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().LoadingStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LoadingStatus()); return S_OK; } catch (...) @@ -715,11 +766,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MapServiceToken(abi_arg_out value) noexcept override + HRESULT __stdcall get_MapServiceToken(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapServiceToken()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapServiceToken()); return S_OK; } catch (...) @@ -729,10 +781,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_MapServiceToken(abi_arg_in value) noexcept override + HRESULT __stdcall put_MapServiceToken(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MapServiceToken(*reinterpret_cast(&value)); return S_OK; } @@ -746,7 +799,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MaxZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxZoomLevel()); return S_OK; } catch (...) @@ -759,7 +813,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MinZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinZoomLevel()); return S_OK; } catch (...) @@ -772,7 +827,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().PedestrianFeaturesVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PedestrianFeaturesVisible()); return S_OK; } catch (...) @@ -785,6 +841,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PedestrianFeaturesVisible(value); return S_OK; } @@ -798,7 +855,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Pitch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pitch()); return S_OK; } catch (...) @@ -811,7 +869,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Style()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Style()); return S_OK; } catch (...) @@ -824,6 +883,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Style(value); return S_OK; } @@ -837,7 +897,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().TrafficFlowVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrafficFlowVisible()); return S_OK; } catch (...) @@ -850,6 +911,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().TrafficFlowVisible(value); return S_OK; } @@ -859,11 +921,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TransformOrigin(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransformOrigin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransformOrigin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransformOrigin()); return S_OK; } catch (...) @@ -872,10 +935,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_TransformOrigin(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransformOrigin(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransformOrigin(*reinterpret_cast(&value)); return S_OK; } @@ -889,7 +953,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().WatermarkMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WatermarkMode()); return S_OK; } catch (...) @@ -902,6 +967,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().WatermarkMode(value); return S_OK; } @@ -915,7 +981,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevel()); return S_OK; } catch (...) @@ -928,6 +995,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomLevel(value); return S_OK; } @@ -937,11 +1005,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MapElements(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MapElements(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MapElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapElements()); return S_OK; } catch (...) @@ -951,11 +1020,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Routes(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Routes(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Routes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Routes()); return S_OK; } catch (...) @@ -965,11 +1035,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TileSources(abi_arg_out> value) noexcept override + HRESULT __stdcall get_TileSources(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TileSources()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileSources()); return S_OK; } catch (...) @@ -979,11 +1050,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_CenterChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_CenterChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CenterChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CenterChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -996,6 +1068,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CenterChanged(token); return S_OK; } @@ -1005,11 +1078,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_HeadingChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_HeadingChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().HeadingChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HeadingChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1022,6 +1096,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().HeadingChanged(token); return S_OK; } @@ -1031,11 +1106,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_LoadingStatusChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_LoadingStatusChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().LoadingStatusChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LoadingStatusChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1048,6 +1124,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().LoadingStatusChanged(token); return S_OK; } @@ -1057,11 +1134,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_MapDoubleTapped(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapDoubleTapped(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapDoubleTapped(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapDoubleTapped(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1074,6 +1152,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MapDoubleTapped(token); return S_OK; } @@ -1083,11 +1162,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_MapHolding(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapHolding(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapHolding(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapHolding(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1100,6 +1180,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MapHolding(token); return S_OK; } @@ -1109,11 +1190,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_MapTapped(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapTapped(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapTapped(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapTapped(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1126,6 +1208,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MapTapped(token); return S_OK; } @@ -1135,11 +1218,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_PitchChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_PitchChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PitchChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PitchChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1152,6 +1236,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().PitchChanged(token); return S_OK; } @@ -1161,11 +1246,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_TransformOriginChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TransformOriginChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TransformOriginChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TransformOriginChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1178,6 +1264,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().TransformOriginChanged(token); return S_OK; } @@ -1187,11 +1274,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_ZoomLevelChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ZoomLevelChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ZoomLevelChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ZoomLevelChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1204,6 +1292,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomLevelChanged(token); return S_OK; } @@ -1213,11 +1302,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_FindMapElementsAtOffset(abi_arg_in offset, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_FindMapElementsAtOffset(impl::abi_arg_in offset, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindMapElementsAtOffset(*reinterpret_cast(&offset))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindMapElementsAtOffset(*reinterpret_cast(&offset))); return S_OK; } catch (...) @@ -1227,10 +1317,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetLocationFromOffset(abi_arg_in offset, abi_arg_out location) noexcept override + HRESULT __stdcall abi_GetLocationFromOffset(impl::abi_arg_in offset, impl::abi_arg_out location) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetLocationFromOffset(*reinterpret_cast(&offset), *location); return S_OK; } @@ -1241,10 +1332,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetOffsetFromLocation(abi_arg_in location, abi_arg_out offset) noexcept override + HRESULT __stdcall abi_GetOffsetFromLocation(impl::abi_arg_in location, impl::abi_arg_out offset) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetOffsetFromLocation(*reinterpret_cast(&location), *offset); return S_OK; } @@ -1254,10 +1346,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_IsLocationInView(abi_arg_in location, bool * isInView) noexcept override + HRESULT __stdcall abi_IsLocationInView(impl::abi_arg_in location, bool * isInView) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsLocationInView(*reinterpret_cast(&location), *isInView); return S_OK; } @@ -1267,11 +1360,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetViewBoundsAsync(abi_arg_in bounds, abi_arg_in> margin, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetViewBoundsAsync(impl::abi_arg_in bounds, impl::abi_arg_in> margin, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetViewBoundsAsync(*reinterpret_cast(&bounds), *reinterpret_cast *>(&margin), animation)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetViewBoundsAsync(*reinterpret_cast(&bounds), *reinterpret_cast *>(&margin), animation)); return S_OK; } catch (...) @@ -1281,11 +1375,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetViewWithCenterAsync(abi_arg_in center, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetViewWithCenterAsync(impl::abi_arg_in center, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetViewAsync(*reinterpret_cast(¢er))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetViewAsync(*reinterpret_cast(¢er))); return S_OK; } catch (...) @@ -1295,11 +1390,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetViewWithCenterAndZoomAsync(abi_arg_in center, abi_arg_in> zoomLevel, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetViewWithCenterAndZoomAsync(impl::abi_arg_in center, impl::abi_arg_in> zoomLevel, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel))); return S_OK; } catch (...) @@ -1309,11 +1405,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetViewWithCenterZoomHeadingAndPitchAsync(abi_arg_in center, abi_arg_in> zoomLevel, abi_arg_in> heading, abi_arg_in> desiredPitch, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetViewWithCenterZoomHeadingAndPitchAsync(impl::abi_arg_in center, impl::abi_arg_in> zoomLevel, impl::abi_arg_in> heading, impl::abi_arg_in> desiredPitch, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel), *reinterpret_cast *>(&heading), *reinterpret_cast *>(&desiredPitch))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel), *reinterpret_cast *>(&heading), *reinterpret_cast *>(&desiredPitch))); return S_OK; } catch (...) @@ -1323,11 +1420,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync(abi_arg_in center, abi_arg_in> zoomLevel, abi_arg_in> heading, abi_arg_in> desiredPitch, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync(impl::abi_arg_in center, impl::abi_arg_in> zoomLevel, impl::abi_arg_in> heading, impl::abi_arg_in> desiredPitch, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel), *reinterpret_cast *>(&heading), *reinterpret_cast *>(&desiredPitch), animation)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetViewAsync(*reinterpret_cast(¢er), *reinterpret_cast *>(&zoomLevel), *reinterpret_cast *>(&heading), *reinterpret_cast *>(&desiredPitch), animation)); return S_OK; } catch (...) @@ -1345,7 +1443,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().BusinessLandmarksVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusinessLandmarksVisible()); return S_OK; } catch (...) @@ -1358,6 +1457,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarksVisible(value); return S_OK; } @@ -1371,7 +1471,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().TransitFeaturesVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitFeaturesVisible()); return S_OK; } catch (...) @@ -1384,6 +1485,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeaturesVisible(value); return S_OK; } @@ -1397,7 +1499,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().PanInteractionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PanInteractionMode()); return S_OK; } catch (...) @@ -1410,6 +1513,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().PanInteractionMode(value); return S_OK; } @@ -1423,7 +1527,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().RotateInteractionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotateInteractionMode()); return S_OK; } catch (...) @@ -1436,6 +1541,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().RotateInteractionMode(value); return S_OK; } @@ -1449,7 +1555,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().TiltInteractionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltInteractionMode()); return S_OK; } catch (...) @@ -1462,6 +1569,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TiltInteractionMode(value); return S_OK; } @@ -1475,7 +1583,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().ZoomInteractionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomInteractionMode()); return S_OK; } catch (...) @@ -1488,6 +1597,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomInteractionMode(value); return S_OK; } @@ -1501,7 +1611,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().Is3DSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Is3DSupported()); return S_OK; } catch (...) @@ -1514,7 +1625,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsStreetsideSupported()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStreetsideSupported()); return S_OK; } catch (...) @@ -1523,11 +1635,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Scene(abi_arg_out value) noexcept override + HRESULT __stdcall get_Scene(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Scene()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Scene()); return S_OK; } catch (...) @@ -1537,10 +1650,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Scene(abi_arg_in value) noexcept override + HRESULT __stdcall put_Scene(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Scene(*reinterpret_cast(&value)); return S_OK; } @@ -1550,11 +1664,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ActualCamera(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActualCamera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActualCamera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualCamera()); return S_OK; } catch (...) @@ -1564,11 +1679,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_TargetCamera(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetCamera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetCamera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetCamera()); return S_OK; } catch (...) @@ -1578,11 +1694,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_CustomExperience(abi_arg_out value) noexcept override + HRESULT __stdcall get_CustomExperience(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomExperience()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomExperience()); return S_OK; } catch (...) @@ -1592,10 +1709,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_CustomExperience(abi_arg_in value) noexcept override + HRESULT __stdcall put_CustomExperience(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomExperience(*reinterpret_cast(&value)); return S_OK; } @@ -1605,11 +1723,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_MapElementClick(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapElementClick(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapElementClick(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapElementClick(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1622,6 +1741,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MapElementClick(token); return S_OK; } @@ -1631,11 +1751,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_MapElementPointerEntered(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapElementPointerEntered(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapElementPointerEntered(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapElementPointerEntered(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1648,6 +1769,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MapElementPointerEntered(token); return S_OK; } @@ -1657,11 +1779,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_MapElementPointerExited(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapElementPointerExited(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapElementPointerExited(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapElementPointerExited(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1674,6 +1797,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MapElementPointerExited(token); return S_OK; } @@ -1683,11 +1807,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_ActualCameraChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ActualCameraChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ActualCameraChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActualCameraChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1700,6 +1825,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ActualCameraChanged(token); return S_OK; } @@ -1709,11 +1835,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_ActualCameraChanging(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ActualCameraChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ActualCameraChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActualCameraChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1726,6 +1853,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().ActualCameraChanging(token); return S_OK; } @@ -1735,11 +1863,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_TargetCameraChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TargetCameraChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TargetCameraChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TargetCameraChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1752,6 +1881,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetCameraChanged(token); return S_OK; } @@ -1761,11 +1891,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_CustomExperienceChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_CustomExperienceChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CustomExperienceChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CustomExperienceChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1778,6 +1909,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomExperienceChanged(token); return S_OK; } @@ -1791,6 +1923,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StartContinuousRotate(rateInDegreesPerSecond); return S_OK; } @@ -1804,6 +1937,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StopContinuousRotate(); return S_OK; } @@ -1817,6 +1951,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StartContinuousTilt(rateInDegreesPerSecond); return S_OK; } @@ -1830,6 +1965,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StopContinuousTilt(); return S_OK; } @@ -1843,6 +1979,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StartContinuousZoom(rateOfChangePerSecond); return S_OK; } @@ -1856,6 +1993,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StopContinuousZoom(); return S_OK; } @@ -1865,11 +2003,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryRotateAsync(double degrees, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryRotateAsync(double degrees, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryRotateAsync(degrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryRotateAsync(degrees)); return S_OK; } catch (...) @@ -1879,11 +2018,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryRotateToAsync(double angleInDegrees, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryRotateToAsync(double angleInDegrees, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryRotateToAsync(angleInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryRotateToAsync(angleInDegrees)); return S_OK; } catch (...) @@ -1893,11 +2033,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryTiltAsync(double degrees, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryTiltAsync(double degrees, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryTiltAsync(degrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryTiltAsync(degrees)); return S_OK; } catch (...) @@ -1907,11 +2048,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryTiltToAsync(double angleInDegrees, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryTiltToAsync(double angleInDegrees, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryTiltToAsync(angleInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryTiltToAsync(angleInDegrees)); return S_OK; } catch (...) @@ -1921,11 +2063,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryZoomInAsync(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryZoomInAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryZoomInAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryZoomInAsync()); return S_OK; } catch (...) @@ -1935,11 +2078,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryZoomOutAsync(abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryZoomOutAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryZoomOutAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryZoomOutAsync()); return S_OK; } catch (...) @@ -1949,11 +2093,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TryZoomToAsync(double zoomLevel, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TryZoomToAsync(double zoomLevel, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TryZoomToAsync(zoomLevel)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TryZoomToAsync(zoomLevel)); return S_OK; } catch (...) @@ -1963,11 +2108,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TrySetSceneAsync(abi_arg_in scene, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetSceneAsync(impl::abi_arg_in scene, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetSceneAsync(*reinterpret_cast(&scene))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetSceneAsync(*reinterpret_cast(&scene))); return S_OK; } catch (...) @@ -1977,11 +2123,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_TrySetSceneWithAnimationAsync(abi_arg_in scene, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animationKind, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_TrySetSceneWithAnimationAsync(impl::abi_arg_in scene, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animationKind, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().TrySetSceneAsync(*reinterpret_cast(&scene), animationKind)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().TrySetSceneAsync(*reinterpret_cast(&scene), animationKind)); return S_OK; } catch (...) @@ -1995,11 +2142,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall add_MapRightTapped(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_MapRightTapped(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().MapRightTapped(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MapRightTapped(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2012,6 +2160,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MapRightTapped(token); return S_OK; } @@ -2029,7 +2178,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().BusinessLandmarksEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusinessLandmarksEnabled()); return S_OK; } catch (...) @@ -2042,6 +2192,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarksEnabled(value); return S_OK; } @@ -2055,7 +2206,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().TransitFeaturesEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitFeaturesEnabled()); return S_OK; } catch (...) @@ -2068,6 +2220,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeaturesEnabled(value); return S_OK; } @@ -2077,11 +2230,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_GetVisibleRegion(Windows::UI::Xaml::Controls::Maps::MapVisibleRegionKind region, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetVisibleRegion(Windows::UI::Xaml::Controls::Maps::MapVisibleRegionKind region, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetVisibleRegion(region)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetVisibleRegion(region)); return S_OK; } catch (...) @@ -2095,11 +2249,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_LocalLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LocalLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalLocations()); return S_OK; } catch (...) @@ -2113,11 +2268,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LocalLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LocalLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalLocations()); return S_OK; } catch (...) @@ -2131,11 +2287,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LocalLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LocalLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalLocations()); return S_OK; } catch (...) @@ -2149,11 +2306,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_LocalLocations(abi_arg_out> value) noexcept override + HRESULT __stdcall get_LocalLocations(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().LocalLocations()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocalLocations()); return S_OK; } catch (...) @@ -2167,11 +2325,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall add_BusinessLandmarkClick(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BusinessLandmarkClick(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BusinessLandmarkClick(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BusinessLandmarkClick(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2184,6 +2343,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarkClick(token); return S_OK; } @@ -2193,11 +2353,12 @@ struct produce : pr } } - HRESULT __stdcall add_TransitFeatureClick(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TransitFeatureClick(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TransitFeatureClick(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TransitFeatureClick(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2210,6 +2371,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeatureClick(token); return S_OK; } @@ -2219,11 +2381,12 @@ struct produce : pr } } - HRESULT __stdcall add_BusinessLandmarkRightTapped(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BusinessLandmarkRightTapped(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BusinessLandmarkRightTapped(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BusinessLandmarkRightTapped(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2236,6 +2399,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarkRightTapped(token); return S_OK; } @@ -2245,11 +2409,12 @@ struct produce : pr } } - HRESULT __stdcall add_TransitFeatureRightTapped(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TransitFeatureRightTapped(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TransitFeatureRightTapped(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TransitFeatureRightTapped(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2262,6 +2427,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeatureRightTapped(token); return S_OK; } @@ -2275,11 +2441,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall add_BusinessLandmarkPointerEntered(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BusinessLandmarkPointerEntered(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BusinessLandmarkPointerEntered(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BusinessLandmarkPointerEntered(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2292,6 +2459,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarkPointerEntered(token); return S_OK; } @@ -2301,11 +2469,12 @@ struct produce : p } } - HRESULT __stdcall add_TransitFeaturePointerEntered(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TransitFeaturePointerEntered(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TransitFeaturePointerEntered(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TransitFeaturePointerEntered(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2318,6 +2487,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeaturePointerEntered(token); return S_OK; } @@ -2327,11 +2497,12 @@ struct produce : p } } - HRESULT __stdcall add_BusinessLandmarkPointerExited(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_BusinessLandmarkPointerExited(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().BusinessLandmarkPointerExited(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BusinessLandmarkPointerExited(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2344,6 +2515,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().BusinessLandmarkPointerExited(token); return S_OK; } @@ -2353,11 +2525,12 @@ struct produce : p } } - HRESULT __stdcall add_TransitFeaturePointerExited(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TransitFeaturePointerExited(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TransitFeaturePointerExited(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TransitFeaturePointerExited(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2370,6 +2543,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().TransitFeaturePointerExited(token); return S_OK; } @@ -2383,11 +2557,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in map, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in map, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&map))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&map))); return S_OK; } catch (...) @@ -2401,11 +2576,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CenterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CenterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CenterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterProperty()); return S_OK; } catch (...) @@ -2415,11 +2591,12 @@ struct produce : produ } } - HRESULT __stdcall get_ChildrenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChildrenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildrenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildrenProperty()); return S_OK; } catch (...) @@ -2429,11 +2606,12 @@ struct produce : produ } } - HRESULT __stdcall get_ColorSchemeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColorSchemeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColorSchemeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColorSchemeProperty()); return S_OK; } catch (...) @@ -2443,11 +2621,12 @@ struct produce : produ } } - HRESULT __stdcall get_DesiredPitchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesiredPitchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredPitchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredPitchProperty()); return S_OK; } catch (...) @@ -2457,11 +2636,12 @@ struct produce : produ } } - HRESULT __stdcall get_HeadingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeadingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeadingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeadingProperty()); return S_OK; } catch (...) @@ -2471,11 +2651,12 @@ struct produce : produ } } - HRESULT __stdcall get_LandmarksVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LandmarksVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LandmarksVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LandmarksVisibleProperty()); return S_OK; } catch (...) @@ -2485,11 +2666,12 @@ struct produce : produ } } - HRESULT __stdcall get_LoadingStatusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LoadingStatusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LoadingStatusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LoadingStatusProperty()); return S_OK; } catch (...) @@ -2499,11 +2681,12 @@ struct produce : produ } } - HRESULT __stdcall get_MapServiceTokenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MapServiceTokenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapServiceTokenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapServiceTokenProperty()); return S_OK; } catch (...) @@ -2513,11 +2696,12 @@ struct produce : produ } } - HRESULT __stdcall get_PedestrianFeaturesVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PedestrianFeaturesVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PedestrianFeaturesVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PedestrianFeaturesVisibleProperty()); return S_OK; } catch (...) @@ -2527,11 +2711,12 @@ struct produce : produ } } - HRESULT __stdcall get_PitchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PitchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PitchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PitchProperty()); return S_OK; } catch (...) @@ -2541,11 +2726,12 @@ struct produce : produ } } - HRESULT __stdcall get_StyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StyleProperty()); return S_OK; } catch (...) @@ -2555,11 +2741,12 @@ struct produce : produ } } - HRESULT __stdcall get_TrafficFlowVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TrafficFlowVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TrafficFlowVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TrafficFlowVisibleProperty()); return S_OK; } catch (...) @@ -2569,11 +2756,12 @@ struct produce : produ } } - HRESULT __stdcall get_TransformOriginProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransformOriginProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransformOriginProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransformOriginProperty()); return S_OK; } catch (...) @@ -2583,11 +2771,12 @@ struct produce : produ } } - HRESULT __stdcall get_WatermarkModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_WatermarkModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WatermarkModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WatermarkModeProperty()); return S_OK; } catch (...) @@ -2597,11 +2786,12 @@ struct produce : produ } } - HRESULT __stdcall get_ZoomLevelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomLevelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomLevelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevelProperty()); return S_OK; } catch (...) @@ -2611,11 +2801,12 @@ struct produce : produ } } - HRESULT __stdcall get_MapElementsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MapElementsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapElementsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapElementsProperty()); return S_OK; } catch (...) @@ -2625,11 +2816,12 @@ struct produce : produ } } - HRESULT __stdcall get_RoutesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RoutesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RoutesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RoutesProperty()); return S_OK; } catch (...) @@ -2639,11 +2831,12 @@ struct produce : produ } } - HRESULT __stdcall get_TileSourcesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TileSourcesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TileSourcesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TileSourcesProperty()); return S_OK; } catch (...) @@ -2653,11 +2846,12 @@ struct produce : produ } } - HRESULT __stdcall get_LocationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationProperty()); return S_OK; } catch (...) @@ -2667,11 +2861,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetLocation(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLocation(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLocation(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLocation(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -2681,10 +2876,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetLocation(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetLocation(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocation(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -2694,11 +2890,12 @@ struct produce : produ } } - HRESULT __stdcall get_NormalizedAnchorPointProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalizedAnchorPointProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedAnchorPointProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedAnchorPointProperty()); return S_OK; } catch (...) @@ -2708,11 +2905,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetNormalizedAnchorPoint(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetNormalizedAnchorPoint(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetNormalizedAnchorPoint(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetNormalizedAnchorPoint(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -2721,10 +2919,11 @@ struct produce : produ } } - HRESULT __stdcall abi_SetNormalizedAnchorPoint(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetNormalizedAnchorPoint(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetNormalizedAnchorPoint(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -2738,11 +2937,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_BusinessLandmarksVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BusinessLandmarksVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BusinessLandmarksVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusinessLandmarksVisibleProperty()); return S_OK; } catch (...) @@ -2752,11 +2952,12 @@ struct produce : prod } } - HRESULT __stdcall get_TransitFeaturesVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransitFeaturesVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransitFeaturesVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitFeaturesVisibleProperty()); return S_OK; } catch (...) @@ -2766,11 +2967,12 @@ struct produce : prod } } - HRESULT __stdcall get_PanInteractionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PanInteractionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PanInteractionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PanInteractionModeProperty()); return S_OK; } catch (...) @@ -2780,11 +2982,12 @@ struct produce : prod } } - HRESULT __stdcall get_RotateInteractionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RotateInteractionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RotateInteractionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RotateInteractionModeProperty()); return S_OK; } catch (...) @@ -2794,11 +2997,12 @@ struct produce : prod } } - HRESULT __stdcall get_TiltInteractionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TiltInteractionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TiltInteractionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TiltInteractionModeProperty()); return S_OK; } catch (...) @@ -2808,11 +3012,12 @@ struct produce : prod } } - HRESULT __stdcall get_ZoomInteractionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomInteractionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomInteractionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomInteractionModeProperty()); return S_OK; } catch (...) @@ -2822,11 +3027,12 @@ struct produce : prod } } - HRESULT __stdcall get_Is3DSupportedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_Is3DSupportedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Is3DSupportedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Is3DSupportedProperty()); return S_OK; } catch (...) @@ -2836,11 +3042,12 @@ struct produce : prod } } - HRESULT __stdcall get_IsStreetsideSupportedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsStreetsideSupportedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsStreetsideSupportedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStreetsideSupportedProperty()); return S_OK; } catch (...) @@ -2850,11 +3057,12 @@ struct produce : prod } } - HRESULT __stdcall get_SceneProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SceneProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SceneProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SceneProperty()); return S_OK; } catch (...) @@ -2868,11 +3076,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_BusinessLandmarksEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BusinessLandmarksEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BusinessLandmarksEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BusinessLandmarksEnabledProperty()); return S_OK; } catch (...) @@ -2882,11 +3091,12 @@ struct produce : prod } } - HRESULT __stdcall get_TransitFeaturesEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransitFeaturesEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransitFeaturesEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitFeaturesEnabledProperty()); return S_OK; } catch (...) @@ -2900,11 +3110,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2914,11 +3125,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -2928,11 +3140,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TransitProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransitProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitProperties()); return S_OK; } catch (...) @@ -2946,11 +3159,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -2960,11 +3174,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -2974,11 +3189,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TransitProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransitProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitProperties()); return S_OK; } catch (...) @@ -2992,11 +3208,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -3006,11 +3223,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3020,11 +3238,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TransitProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransitProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitProperties()); return S_OK; } catch (...) @@ -3038,11 +3257,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_DisplayName(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayName()); return S_OK; } catch (...) @@ -3052,11 +3272,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3066,11 +3287,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_TransitProperties(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().TransitProperties()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransitProperties()); return S_OK; } catch (...) @@ -3092,11 +3314,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3115,7 +3338,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ZIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndex()); return S_OK; } catch (...) @@ -3128,6 +3352,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ZIndex(value); return S_OK; } @@ -3141,7 +3366,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -3154,6 +3380,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().Visible(value); return S_OK; } @@ -3171,7 +3398,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MapTabIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapTabIndex()); return S_OK; } catch (...) @@ -3184,6 +3412,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MapTabIndex(value); return S_OK; } @@ -3197,11 +3426,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3210,11 +3440,12 @@ struct produce } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3224,11 +3455,12 @@ struct produce } } - HRESULT __stdcall get_MapElements(abi_arg_out> value) noexcept override + HRESULT __stdcall get_MapElements(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().MapElements()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapElements()); return S_OK; } catch (...) @@ -3242,11 +3474,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3261,11 +3494,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3274,11 +3508,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3288,11 +3523,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MapElement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapElement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapElement()); return S_OK; } catch (...) @@ -3306,11 +3542,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3319,11 +3556,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3333,11 +3571,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MapElement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapElement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapElement()); return S_OK; } catch (...) @@ -3351,11 +3590,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ZIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndexProperty()); return S_OK; } catch (...) @@ -3365,11 +3605,12 @@ struct produce : produ } } - HRESULT __stdcall get_VisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisibleProperty()); return S_OK; } catch (...) @@ -3383,11 +3624,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_MapTabIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MapTabIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MapTabIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MapTabIndexProperty()); return S_OK; } catch (...) @@ -3401,11 +3643,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3415,10 +3658,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Location(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return S_OK; } @@ -3428,11 +3672,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -3442,10 +3687,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -3455,11 +3701,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NormalizedAnchorPoint(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedAnchorPoint()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedAnchorPoint()); return S_OK; } catch (...) @@ -3468,10 +3715,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_NormalizedAnchorPoint(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NormalizedAnchorPoint(*reinterpret_cast(&value)); return S_OK; } @@ -3481,11 +3729,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Image(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Image()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Image()); return S_OK; } catch (...) @@ -3495,10 +3744,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Image(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Image(*reinterpret_cast(&value)); return S_OK; } @@ -3516,7 +3766,8 @@ struct produce : produce_baseshim().CollisionBehaviorDesired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CollisionBehaviorDesired()); return S_OK; } catch (...) @@ -3529,6 +3780,7 @@ struct produce : produce_baseshim()); this->shim().CollisionBehaviorDesired(value); return S_OK; } @@ -3542,11 +3794,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LocationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LocationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LocationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LocationProperty()); return S_OK; } catch (...) @@ -3556,11 +3809,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleProperty()); return S_OK; } catch (...) @@ -3570,11 +3824,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_NormalizedAnchorPointProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NormalizedAnchorPointProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NormalizedAnchorPointProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NormalizedAnchorPointProperty()); return S_OK; } catch (...) @@ -3588,11 +3843,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_CollisionBehaviorDesiredProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CollisionBehaviorDesiredProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CollisionBehaviorDesiredProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CollisionBehaviorDesiredProperty()); return S_OK; } catch (...) @@ -3606,11 +3862,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -3619,11 +3876,12 @@ struct produce : produ } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -3637,11 +3895,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_ItemsSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSource()); return S_OK; } catch (...) @@ -3651,11 +3910,12 @@ struct produce : produce } } - HRESULT __stdcall put_ItemsSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemsSource(impl::abi_arg_in value) noexcept override { try { - this->shim().ItemsSource(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ItemsSource(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -3664,11 +3924,12 @@ struct produce : produce } } - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -3678,11 +3939,12 @@ struct produce : produce } } - HRESULT __stdcall get_ItemTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplate()); return S_OK; } catch (...) @@ -3692,10 +3954,11 @@ struct produce : produce } } - HRESULT __stdcall put_ItemTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -3709,11 +3972,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ItemsSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSourceProperty()); return S_OK; } catch (...) @@ -3723,11 +3987,12 @@ struct produce : } } - HRESULT __stdcall get_ItemsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsProperty()); return S_OK; } catch (...) @@ -3737,11 +4002,12 @@ struct produce : } } - HRESULT __stdcall get_ItemTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateProperty()); return S_OK; } catch (...) @@ -3755,11 +4021,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Path(abi_arg_out value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -3769,10 +4036,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Path(abi_arg_in value) noexcept override + HRESULT __stdcall put_Path(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Path(*reinterpret_cast(&value)); return S_OK; } @@ -3782,11 +4050,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_StrokeColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_StrokeColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeColor()); return S_OK; } catch (...) @@ -3795,10 +4064,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_StrokeColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_StrokeColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeColor(*reinterpret_cast(&value)); return S_OK; } @@ -3812,7 +4082,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().StrokeThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeThickness()); return S_OK; } catch (...) @@ -3825,6 +4096,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeThickness(value); return S_OK; } @@ -3838,7 +4110,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().StrokeDashed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeDashed()); return S_OK; } catch (...) @@ -3851,6 +4124,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeDashed(value); return S_OK; } @@ -3860,11 +4134,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FillColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_FillColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillColor()); return S_OK; } catch (...) @@ -3873,10 +4148,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_FillColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_FillColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FillColor(*reinterpret_cast(&value)); return S_OK; } @@ -3890,11 +4166,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Paths(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Paths(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Paths()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Paths()); return S_OK; } catch (...) @@ -3908,11 +4185,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_PathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PathProperty()); return S_OK; } catch (...) @@ -3922,11 +4200,12 @@ struct produce : produ } } - HRESULT __stdcall get_StrokeThicknessProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StrokeThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeThicknessProperty()); return S_OK; } catch (...) @@ -3936,11 +4215,12 @@ struct produce : produ } } - HRESULT __stdcall get_StrokeDashedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StrokeDashedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeDashedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeDashedProperty()); return S_OK; } catch (...) @@ -3954,11 +4234,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Path(abi_arg_out value) noexcept override + HRESULT __stdcall get_Path(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Path()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Path()); return S_OK; } catch (...) @@ -3968,10 +4249,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Path(abi_arg_in value) noexcept override + HRESULT __stdcall put_Path(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Path(*reinterpret_cast(&value)); return S_OK; } @@ -3981,11 +4263,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_StrokeColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_StrokeColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeColor()); return S_OK; } catch (...) @@ -3994,10 +4277,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_StrokeColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_StrokeColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeColor(*reinterpret_cast(&value)); return S_OK; } @@ -4011,7 +4295,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().StrokeThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeThickness()); return S_OK; } catch (...) @@ -4024,6 +4309,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeThickness(value); return S_OK; } @@ -4037,7 +4323,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().StrokeDashed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeDashed()); return S_OK; } catch (...) @@ -4050,6 +4337,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().StrokeDashed(value); return S_OK; } @@ -4063,11 +4351,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_PathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PathProperty()); return S_OK; } catch (...) @@ -4077,11 +4366,12 @@ struct produce : prod } } - HRESULT __stdcall get_StrokeDashedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StrokeDashedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StrokeDashedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StrokeDashedProperty()); return S_OK; } catch (...) @@ -4095,11 +4385,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Position(abi_arg_out value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -4108,11 +4399,12 @@ struct produce : } } - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -4126,11 +4418,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_RouteColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_RouteColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RouteColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RouteColor()); return S_OK; } catch (...) @@ -4139,10 +4432,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_RouteColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_RouteColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RouteColor(*reinterpret_cast(&value)); return S_OK; } @@ -4152,11 +4446,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_OutlineColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutlineColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutlineColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutlineColor()); return S_OK; } catch (...) @@ -4165,10 +4460,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_OutlineColor(abi_arg_in value) noexcept override + HRESULT __stdcall put_OutlineColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutlineColor(*reinterpret_cast(&value)); return S_OK; } @@ -4178,11 +4474,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Route(abi_arg_out value) noexcept override + HRESULT __stdcall get_Route(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Route()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Route()); return S_OK; } catch (...) @@ -4196,11 +4493,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithMapRoute(abi_arg_in route, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithMapRoute(impl::abi_arg_in route, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithMapRoute(*reinterpret_cast(&route), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithMapRoute(*reinterpret_cast(&route), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4215,11 +4513,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_TargetCamera(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetCamera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetCamera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetCamera()); return S_OK; } catch (...) @@ -4229,11 +4528,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TargetCameraChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TargetCameraChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TargetCameraChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -4246,6 +4546,7 @@ struct produce : produce_baseshim()); this->shim().TargetCameraChanged(token); return S_OK; } @@ -4259,11 +4560,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateFromBoundingBox(abi_arg_in bounds, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromBoundingBox(impl::abi_arg_in bounds, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromBoundingBox(*reinterpret_cast(&bounds))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromBoundingBox(*reinterpret_cast(&bounds))); return S_OK; } catch (...) @@ -4273,11 +4575,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromBoundingBoxWithHeadingAndPitch(abi_arg_in bounds, double headingInDegrees, double pitchInDegrees, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromBoundingBoxWithHeadingAndPitch(impl::abi_arg_in bounds, double headingInDegrees, double pitchInDegrees, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromBoundingBox(*reinterpret_cast(&bounds), headingInDegrees, pitchInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromBoundingBox(*reinterpret_cast(&bounds), headingInDegrees, pitchInDegrees)); return S_OK; } catch (...) @@ -4287,11 +4590,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromCamera(abi_arg_in camera, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromCamera(impl::abi_arg_in camera, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromCamera(*reinterpret_cast(&camera))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromCamera(*reinterpret_cast(&camera))); return S_OK; } catch (...) @@ -4301,11 +4605,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocation(abi_arg_in location, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocation(impl::abi_arg_in location, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocation(*reinterpret_cast(&location))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocation(*reinterpret_cast(&location))); return S_OK; } catch (...) @@ -4315,11 +4620,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocationWithHeadingAndPitch(abi_arg_in location, double headingInDegrees, double pitchInDegrees, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocationWithHeadingAndPitch(impl::abi_arg_in location, double headingInDegrees, double pitchInDegrees, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocation(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocation(*reinterpret_cast(&location), headingInDegrees, pitchInDegrees)); return S_OK; } catch (...) @@ -4329,11 +4635,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocationAndRadius(abi_arg_in location, double radiusInMeters, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocationAndRadius(impl::abi_arg_in location, double radiusInMeters, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocationAndRadius(*reinterpret_cast(&location), radiusInMeters)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocationAndRadius(*reinterpret_cast(&location), radiusInMeters)); return S_OK; } catch (...) @@ -4343,11 +4650,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocationAndRadiusWithHeadingAndPitch(abi_arg_in location, double radiusInMeters, double headingInDegrees, double pitchInDegrees, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocationAndRadiusWithHeadingAndPitch(impl::abi_arg_in location, double radiusInMeters, double headingInDegrees, double pitchInDegrees, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocationAndRadius(*reinterpret_cast(&location), radiusInMeters, headingInDegrees, pitchInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocationAndRadius(*reinterpret_cast(&location), radiusInMeters, headingInDegrees, pitchInDegrees)); return S_OK; } catch (...) @@ -4357,11 +4665,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocations(abi_arg_in> locations, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocations(impl::abi_arg_in> locations, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocations(*reinterpret_cast *>(&locations))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocations(*reinterpret_cast *>(&locations))); return S_OK; } catch (...) @@ -4371,11 +4680,12 @@ struct produce : produce } } - HRESULT __stdcall abi_CreateFromLocationsWithHeadingAndPitch(abi_arg_in> locations, double headingInDegrees, double pitchInDegrees, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateFromLocationsWithHeadingAndPitch(impl::abi_arg_in> locations, double headingInDegrees, double pitchInDegrees, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateFromLocations(*reinterpret_cast *>(&locations), headingInDegrees, pitchInDegrees)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateFromLocations(*reinterpret_cast *>(&locations), headingInDegrees, pitchInDegrees)); return S_OK; } catch (...) @@ -4389,11 +4699,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Camera(abi_arg_out value) noexcept override + HRESULT __stdcall get_Camera(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Camera()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Camera()); return S_OK; } catch (...) @@ -4411,7 +4722,8 @@ struct produceshim().ChangeReason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChangeReason()); return S_OK; } catch (...) @@ -4424,11 +4736,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PixelData(abi_arg_out value) noexcept override + HRESULT __stdcall get_PixelData(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PixelData()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PixelData()); return S_OK; } catch (...) @@ -4438,10 +4751,11 @@ struct produce : pr } } - HRESULT __stdcall put_PixelData(abi_arg_in value) noexcept override + HRESULT __stdcall put_PixelData(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PixelData(*reinterpret_cast(&value)); return S_OK; } @@ -4451,11 +4765,12 @@ struct produce : pr } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -4473,6 +4788,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -4490,7 +4806,8 @@ struct produceshim().X()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X()); return S_OK; } catch (...) @@ -4503,7 +4820,8 @@ struct produceshim().Y()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Y()); return S_OK; } catch (...) @@ -4516,7 +4834,8 @@ struct produceshim().ZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevel()); return S_OK; } catch (...) @@ -4525,11 +4844,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -4547,11 +4867,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4566,11 +4887,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_DataSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataSource()); return S_OK; } catch (...) @@ -4580,10 +4902,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_DataSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_DataSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DataSource(*reinterpret_cast(&value)); return S_OK; } @@ -4597,7 +4920,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Layer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Layer()); return S_OK; } catch (...) @@ -4610,6 +4934,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Layer(value); return S_OK; } @@ -4619,11 +4944,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomLevelRange(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomLevelRange(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomLevelRange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevelRange()); return S_OK; } catch (...) @@ -4632,10 +4958,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_ZoomLevelRange(abi_arg_in value) noexcept override + HRESULT __stdcall put_ZoomLevelRange(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomLevelRange(*reinterpret_cast(&value)); return S_OK; } @@ -4645,11 +4972,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Bounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -4659,10 +4987,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Bounds(abi_arg_in value) noexcept override + HRESULT __stdcall put_Bounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return S_OK; } @@ -4676,7 +5005,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().AllowOverstretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowOverstretch()); return S_OK; } catch (...) @@ -4689,6 +5019,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowOverstretch(value); return S_OK; } @@ -4702,7 +5033,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsFadingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFadingEnabled()); return S_OK; } catch (...) @@ -4715,6 +5047,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFadingEnabled(value); return S_OK; } @@ -4728,7 +5061,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsTransparencyEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTransparencyEnabled()); return S_OK; } catch (...) @@ -4741,6 +5075,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsTransparencyEnabled(value); return S_OK; } @@ -4754,7 +5089,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsRetryEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRetryEnabled()); return S_OK; } catch (...) @@ -4767,6 +5103,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsRetryEnabled(value); return S_OK; } @@ -4780,7 +5117,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().ZIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndex()); return S_OK; } catch (...) @@ -4793,6 +5131,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().ZIndex(value); return S_OK; } @@ -4806,7 +5145,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().TilePixelSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TilePixelSize()); return S_OK; } catch (...) @@ -4819,6 +5159,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().TilePixelSize(value); return S_OK; } @@ -4832,7 +5173,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().Visible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Visible()); return S_OK; } catch (...) @@ -4845,6 +5187,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Visible(value); return S_OK; } @@ -4858,11 +5201,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4873,11 +5217,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateInstanceWithDataSource(abi_arg_in dataSource, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithDataSource(impl::abi_arg_in dataSource, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithDataSource(*reinterpret_cast(&dataSource), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithDataSource(*reinterpret_cast(&dataSource), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4888,11 +5233,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateInstanceWithDataSourceAndZoomRange(abi_arg_in dataSource, abi_arg_in zoomLevelRange, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithDataSourceAndZoomRange(impl::abi_arg_in dataSource, impl::abi_arg_in zoomLevelRange, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithDataSourceAndZoomRange(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithDataSourceAndZoomRange(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4903,11 +5249,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateInstanceWithDataSourceZoomRangeAndBounds(abi_arg_in dataSource, abi_arg_in zoomLevelRange, abi_arg_in bounds, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithDataSourceZoomRangeAndBounds(impl::abi_arg_in dataSource, impl::abi_arg_in zoomLevelRange, impl::abi_arg_in bounds, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithDataSourceZoomRangeAndBounds(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&bounds), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithDataSourceZoomRangeAndBounds(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&bounds), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4918,11 +5265,12 @@ struct produce : pr } } - HRESULT __stdcall abi_CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(abi_arg_in dataSource, abi_arg_in zoomLevelRange, abi_arg_in bounds, int32_t tileSizeInPixels, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(impl::abi_arg_in dataSource, impl::abi_arg_in zoomLevelRange, impl::abi_arg_in bounds, int32_t tileSizeInPixels, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&bounds), tileSizeInPixels, *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(*reinterpret_cast(&dataSource), *reinterpret_cast(&zoomLevelRange), *reinterpret_cast(&bounds), tileSizeInPixels, *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4937,11 +5285,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_DataSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataSourceProperty()); return S_OK; } catch (...) @@ -4951,11 +5300,12 @@ struct produce : pr } } - HRESULT __stdcall get_LayerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LayerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LayerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LayerProperty()); return S_OK; } catch (...) @@ -4965,11 +5315,12 @@ struct produce : pr } } - HRESULT __stdcall get_ZoomLevelRangeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomLevelRangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomLevelRangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevelRangeProperty()); return S_OK; } catch (...) @@ -4979,11 +5330,12 @@ struct produce : pr } } - HRESULT __stdcall get_BoundsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BoundsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BoundsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BoundsProperty()); return S_OK; } catch (...) @@ -4993,11 +5345,12 @@ struct produce : pr } } - HRESULT __stdcall get_AllowOverstretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AllowOverstretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllowOverstretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowOverstretchProperty()); return S_OK; } catch (...) @@ -5007,11 +5360,12 @@ struct produce : pr } } - HRESULT __stdcall get_IsFadingEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFadingEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFadingEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFadingEnabledProperty()); return S_OK; } catch (...) @@ -5021,11 +5375,12 @@ struct produce : pr } } - HRESULT __stdcall get_IsTransparencyEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTransparencyEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTransparencyEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTransparencyEnabledProperty()); return S_OK; } catch (...) @@ -5035,11 +5390,12 @@ struct produce : pr } } - HRESULT __stdcall get_IsRetryEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsRetryEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsRetryEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRetryEnabledProperty()); return S_OK; } catch (...) @@ -5049,11 +5405,12 @@ struct produce : pr } } - HRESULT __stdcall get_ZIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndexProperty()); return S_OK; } catch (...) @@ -5063,11 +5420,12 @@ struct produce : pr } } - HRESULT __stdcall get_TilePixelSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TilePixelSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TilePixelSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TilePixelSizeProperty()); return S_OK; } catch (...) @@ -5077,11 +5435,12 @@ struct produce : pr } } - HRESULT __stdcall get_VisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VisibleProperty()); return S_OK; } catch (...) @@ -5095,11 +5454,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -5109,10 +5469,11 @@ struct produce : produ } } - HRESULT __stdcall put_Uri(abi_arg_in value) noexcept override + HRESULT __stdcall put_Uri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return S_OK; } @@ -5122,11 +5483,12 @@ struct produce : produ } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -5144,6 +5506,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -5161,7 +5524,8 @@ struct produceshim().X()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().X()); return S_OK; } catch (...) @@ -5174,7 +5538,8 @@ struct produceshim().Y()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Y()); return S_OK; } catch (...) @@ -5187,7 +5552,8 @@ struct produceshim().ZoomLevel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomLevel()); return S_OK; } catch (...) @@ -5196,11 +5562,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -5218,7 +5585,8 @@ struct produce : pr { try { - *value = detach(this->shim().AddressTextVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddressTextVisible()); return S_OK; } catch (...) @@ -5231,6 +5599,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().AddressTextVisible(value); return S_OK; } @@ -5244,7 +5613,8 @@ struct produce : pr { try { - *value = detach(this->shim().CursorVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CursorVisible()); return S_OK; } catch (...) @@ -5257,6 +5627,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().CursorVisible(value); return S_OK; } @@ -5270,7 +5641,8 @@ struct produce : pr { try { - *value = detach(this->shim().OverviewMapVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverviewMapVisible()); return S_OK; } catch (...) @@ -5283,6 +5655,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().OverviewMapVisible(value); return S_OK; } @@ -5296,7 +5669,8 @@ struct produce : pr { try { - *value = detach(this->shim().StreetLabelsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StreetLabelsVisible()); return S_OK; } catch (...) @@ -5309,6 +5683,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().StreetLabelsVisible(value); return S_OK; } @@ -5322,7 +5697,8 @@ struct produce : pr { try { - *value = detach(this->shim().ExitButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExitButtonVisible()); return S_OK; } catch (...) @@ -5335,6 +5711,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ExitButtonVisible(value); return S_OK; } @@ -5348,7 +5725,8 @@ struct produce : pr { try { - *value = detach(this->shim().ZoomButtonsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomButtonsVisible()); return S_OK; } catch (...) @@ -5361,6 +5739,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomButtonsVisible(value); return S_OK; } @@ -5374,11 +5753,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithPanorama(abi_arg_in panorama, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithPanorama(impl::abi_arg_in panorama, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithPanorama(*reinterpret_cast(&panorama))); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithPanorama(*reinterpret_cast(&panorama))); return S_OK; } catch (...) @@ -5388,11 +5768,12 @@ struct produce panorama, double headingInDegrees, double pitchInDegrees, double fieldOfViewInDegrees, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(impl::abi_arg_in panorama, double headingInDegrees, double pitchInDegrees, double fieldOfViewInDegrees, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(*reinterpret_cast(&panorama), headingInDegrees, pitchInDegrees, fieldOfViewInDegrees)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(*reinterpret_cast(&panorama), headingInDegrees, pitchInDegrees, fieldOfViewInDegrees)); return S_OK; } catch (...) @@ -5406,11 +5787,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Location(abi_arg_out value) noexcept override + HRESULT __stdcall get_Location(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Location()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Location()); return S_OK; } catch (...) @@ -5424,11 +5806,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_FindNearbyWithLocationAsync(abi_arg_in location, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_FindNearbyWithLocationAsync(impl::abi_arg_in location, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindNearbyAsync(*reinterpret_cast(&location))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindNearbyAsync(*reinterpret_cast(&location))); return S_OK; } catch (...) @@ -5438,11 +5821,12 @@ struct produce } } - HRESULT __stdcall abi_FindNearbyWithLocationAndRadiusAsync(abi_arg_in location, double radiusInMeters, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_FindNearbyWithLocationAndRadiusAsync(impl::abi_arg_in location, double radiusInMeters, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().FindNearbyAsync(*reinterpret_cast(&location), radiusInMeters)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FindNearbyAsync(*reinterpret_cast(&location), radiusInMeters)); return S_OK; } catch (...) @@ -5460,500 +5844,500 @@ namespace Windows::UI::Xaml::Controls::Maps { template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapActualCameraChangedEventArgs::Camera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Camera(put(value))); + check_hresult(WINRT_SHIM(IMapActualCameraChangedEventArgs)->get_Camera(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason impl_IMapActualCameraChangedEventArgs2::ChangeReason() const { Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeReason(&value)); + check_hresult(WINRT_SHIM(IMapActualCameraChangedEventArgs2)->get_ChangeReason(&value)); return value; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapActualCameraChangingEventArgs::Camera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Camera(put(value))); + check_hresult(WINRT_SHIM(IMapActualCameraChangingEventArgs)->get_Camera(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason impl_IMapActualCameraChangingEventArgs2::ChangeReason() const { Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeReason(&value)); + check_hresult(WINRT_SHIM(IMapActualCameraChangingEventArgs2)->get_ChangeReason(&value)); return value; } template Windows::Foundation::Point impl_IMapElementClickEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMapElementClickEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapElementClickEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapElementClickEventArgs)->get_Location(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMapElementClickEventArgs::MapElements() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MapElements(put(value))); + check_hresult(WINRT_SHIM(IMapElementClickEventArgs)->get_MapElements(put_abi(value))); return value; } template Windows::Foundation::Point impl_IMapElementPointerEnteredEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerEnteredEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapElementPointerEnteredEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerEnteredEventArgs)->get_Location(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapElement impl_IMapElementPointerEnteredEventArgs::MapElement() const { Windows::UI::Xaml::Controls::Maps::MapElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MapElement(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerEnteredEventArgs)->get_MapElement(put_abi(value))); return value; } template Windows::Foundation::Point impl_IMapElementPointerExitedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerExitedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapElementPointerExitedEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerExitedEventArgs)->get_Location(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapElement impl_IMapElementPointerExitedEventArgs::MapElement() const { Windows::UI::Xaml::Controls::Maps::MapElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MapElement(put(value))); + check_hresult(WINRT_SHIM(IMapElementPointerExitedEventArgs)->get_MapElement(put_abi(value))); return value; } template Windows::Foundation::Point impl_IMapRightTappedEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMapRightTappedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapRightTappedEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapRightTappedEventArgs)->get_Location(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapTargetCameraChangedEventArgs::Camera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Camera(put(value))); + check_hresult(WINRT_SHIM(IMapTargetCameraChangedEventArgs)->get_Camera(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason impl_IMapTargetCameraChangedEventArgs2::ChangeReason() const { Windows::UI::Xaml::Controls::Maps::MapCameraChangeReason value {}; - check_hresult(static_cast(static_cast(*this))->get_ChangeReason(&value)); + check_hresult(WINRT_SHIM(IMapTargetCameraChangedEventArgs2)->get_ChangeReason(&value)); return value; } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IMapTileBitmapRequest::PixelData() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_PixelData(put(value))); + check_hresult(WINRT_SHIM(IMapTileBitmapRequest)->get_PixelData(put_abi(value))); return value; } template void impl_IMapTileBitmapRequest::PixelData(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_PixelData(get(value))); + check_hresult(WINRT_SHIM(IMapTileBitmapRequest)->put_PixelData(get_abi(value))); } template Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequestDeferral impl_IMapTileBitmapRequest::GetDeferral() const { Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequestDeferral returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(returnValue))); + check_hresult(WINRT_SHIM(IMapTileBitmapRequest)->abi_GetDeferral(put_abi(returnValue))); return returnValue; } template void impl_IMapTileBitmapRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IMapTileBitmapRequestDeferral)->abi_Complete()); } template int32_t impl_IMapTileBitmapRequestedEventArgs::X() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_X(&value)); + check_hresult(WINRT_SHIM(IMapTileBitmapRequestedEventArgs)->get_X(&value)); return value; } template int32_t impl_IMapTileBitmapRequestedEventArgs::Y() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Y(&value)); + check_hresult(WINRT_SHIM(IMapTileBitmapRequestedEventArgs)->get_Y(&value)); return value; } template int32_t impl_IMapTileBitmapRequestedEventArgs::ZoomLevel() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevel(&value)); + check_hresult(WINRT_SHIM(IMapTileBitmapRequestedEventArgs)->get_ZoomLevel(&value)); return value; } template Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequest impl_IMapTileBitmapRequestedEventArgs::Request() const { Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMapTileBitmapRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IMapTileUriRequest::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IMapTileUriRequest)->get_Uri(put_abi(value))); return value; } template void impl_IMapTileUriRequest::Uri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Uri(get(value))); + check_hresult(WINRT_SHIM(IMapTileUriRequest)->put_Uri(get_abi(value))); } template Windows::UI::Xaml::Controls::Maps::MapTileUriRequestDeferral impl_IMapTileUriRequest::GetDeferral() const { Windows::UI::Xaml::Controls::Maps::MapTileUriRequestDeferral returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(returnValue))); + check_hresult(WINRT_SHIM(IMapTileUriRequest)->abi_GetDeferral(put_abi(returnValue))); return returnValue; } template void impl_IMapTileUriRequestDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IMapTileUriRequestDeferral)->abi_Complete()); } template int32_t impl_IMapTileUriRequestedEventArgs::X() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_X(&value)); + check_hresult(WINRT_SHIM(IMapTileUriRequestedEventArgs)->get_X(&value)); return value; } template int32_t impl_IMapTileUriRequestedEventArgs::Y() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Y(&value)); + check_hresult(WINRT_SHIM(IMapTileUriRequestedEventArgs)->get_Y(&value)); return value; } template int32_t impl_IMapTileUriRequestedEventArgs::ZoomLevel() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevel(&value)); + check_hresult(WINRT_SHIM(IMapTileUriRequestedEventArgs)->get_ZoomLevel(&value)); return value; } template Windows::UI::Xaml::Controls::Maps::MapTileUriRequest impl_IMapTileUriRequestedEventArgs::Request() const { Windows::UI::Xaml::Controls::Maps::MapTileUriRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(IMapTileUriRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapCamera::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapCamera)->get_Location(put_abi(value))); return value; } template void impl_IMapCamera::Location(const Windows::Devices::Geolocation::Geopoint & value) const { - check_hresult(static_cast(static_cast(*this))->put_Location(get(value))); + check_hresult(WINRT_SHIM(IMapCamera)->put_Location(get_abi(value))); } template double impl_IMapCamera::Heading() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Heading(&value)); + check_hresult(WINRT_SHIM(IMapCamera)->get_Heading(&value)); return value; } template void impl_IMapCamera::Heading(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Heading(value)); + check_hresult(WINRT_SHIM(IMapCamera)->put_Heading(value)); } template double impl_IMapCamera::Pitch() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Pitch(&value)); + check_hresult(WINRT_SHIM(IMapCamera)->get_Pitch(&value)); return value; } template void impl_IMapCamera::Pitch(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Pitch(value)); + check_hresult(WINRT_SHIM(IMapCamera)->put_Pitch(value)); } template double impl_IMapCamera::Roll() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Roll(&value)); + check_hresult(WINRT_SHIM(IMapCamera)->get_Roll(&value)); return value; } template void impl_IMapCamera::Roll(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Roll(value)); + check_hresult(WINRT_SHIM(IMapCamera)->put_Roll(value)); } template double impl_IMapCamera::FieldOfView() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FieldOfView(&value)); + check_hresult(WINRT_SHIM(IMapCamera)->get_FieldOfView(&value)); return value; } template void impl_IMapCamera::FieldOfView(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FieldOfView(value)); + check_hresult(WINRT_SHIM(IMapCamera)->put_FieldOfView(value)); } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapCameraFactory::CreateInstanceWithLocation(const Windows::Devices::Geolocation::Geopoint & location) const { Windows::UI::Xaml::Controls::Maps::MapCamera instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithLocation(get(location), put(instance))); + check_hresult(WINRT_SHIM(IMapCameraFactory)->abi_CreateInstanceWithLocation(get_abi(location), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapCameraFactory::CreateInstanceWithLocationAndHeading(const Windows::Devices::Geolocation::Geopoint & location, double headingInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapCamera instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithLocationAndHeading(get(location), headingInDegrees, put(instance))); + check_hresult(WINRT_SHIM(IMapCameraFactory)->abi_CreateInstanceWithLocationAndHeading(get_abi(location), headingInDegrees, put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapCameraFactory::CreateInstanceWithLocationHeadingAndPitch(const Windows::Devices::Geolocation::Geopoint & location, double headingInDegrees, double pitchInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapCamera instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithLocationHeadingAndPitch(get(location), headingInDegrees, pitchInDegrees, put(instance))); + check_hresult(WINRT_SHIM(IMapCameraFactory)->abi_CreateInstanceWithLocationHeadingAndPitch(get_abi(location), headingInDegrees, pitchInDegrees, put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapCameraFactory::CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(const Windows::Devices::Geolocation::Geopoint & location, double headingInDegrees, double pitchInDegrees, double rollInDegrees, double fieldOfViewInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapCamera instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(get(location), headingInDegrees, pitchInDegrees, rollInDegrees, fieldOfViewInDegrees, put(instance))); + check_hresult(WINRT_SHIM(IMapCameraFactory)->abi_CreateInstanceWithLocationHeadingPitchRollAndFieldOfView(get_abi(location), headingInDegrees, pitchInDegrees, rollInDegrees, fieldOfViewInDegrees, put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::MapCustomExperience impl_IMapCustomExperienceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapCustomExperience impl_IMapCustomExperienceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapCustomExperience instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapCustomExperienceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_IMapElement::ZIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZIndex(&value)); + check_hresult(WINRT_SHIM(IMapElement)->get_ZIndex(&value)); return value; } template void impl_IMapElement::ZIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ZIndex(value)); + check_hresult(WINRT_SHIM(IMapElement)->put_ZIndex(value)); } template bool impl_IMapElement::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IMapElement)->get_Visible(&value)); return value; } template void impl_IMapElement::Visible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Visible(value)); + check_hresult(WINRT_SHIM(IMapElement)->put_Visible(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMapElementStatics::ZIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZIndexProperty(put(value))); + check_hresult(WINRT_SHIM(IMapElementStatics)->get_ZIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapElementStatics::VisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapElementStatics)->get_VisibleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Maps::MapElement impl_IMapElementFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapElement impl_IMapElementFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapElement instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapElementFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_IMapElement2::MapTabIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MapTabIndex(&value)); + check_hresult(WINRT_SHIM(IMapElement2)->get_MapTabIndex(&value)); return value; } template void impl_IMapElement2::MapTabIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MapTabIndex(value)); + check_hresult(WINRT_SHIM(IMapElement2)->put_MapTabIndex(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMapElementStatics2::MapTabIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MapTabIndexProperty(put(value))); + check_hresult(WINRT_SHIM(IMapElementStatics2)->get_MapTabIndexProperty(put_abi(value))); return value; } template Windows::Foundation::Point impl_IMapInputEventArgs::Position() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMapInputEventArgs)->get_Position(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapInputEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapInputEventArgs)->get_Location(put_abi(value))); return value; } -template Windows::IInspectable impl_IMapItemsControl::ItemsSource() const +template Windows::Foundation::IInspectable impl_IMapItemsControl::ItemsSource() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ItemsSource(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IMapItemsControl)->get_ItemsSource(put_abi(value))); return value; } -template void impl_IMapItemsControl::ItemsSource(const Windows::IInspectable & value) const +template void impl_IMapItemsControl::ItemsSource(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemsSource(get(value))); + check_hresult(WINRT_SHIM(IMapItemsControl)->put_ItemsSource(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMapItemsControl::Items() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IMapItemsControl)->get_Items(put_abi(value))); return value; } template Windows::UI::Xaml::DataTemplate impl_IMapItemsControl::ItemTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplate(put(value))); + check_hresult(WINRT_SHIM(IMapItemsControl)->get_ItemTemplate(put_abi(value))); return value; } template void impl_IMapItemsControl::ItemTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemTemplate(get(value))); + check_hresult(WINRT_SHIM(IMapItemsControl)->put_ItemTemplate(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMapItemsControlStatics::ItemsSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMapItemsControlStatics)->get_ItemsSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapItemsControlStatics::ItemsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsProperty(put(value))); + check_hresult(WINRT_SHIM(IMapItemsControlStatics)->get_ItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapItemsControlStatics::ItemTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IMapItemsControlStatics)->get_ItemTemplateProperty(put_abi(value))); return value; } template Windows::UI::Color impl_IMapRouteView::RouteColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_RouteColor(put(value))); + check_hresult(WINRT_SHIM(IMapRouteView)->get_RouteColor(put_abi(value))); return value; } template void impl_IMapRouteView::RouteColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_RouteColor(get(value))); + check_hresult(WINRT_SHIM(IMapRouteView)->put_RouteColor(get_abi(value))); } template Windows::UI::Color impl_IMapRouteView::OutlineColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_OutlineColor(put(value))); + check_hresult(WINRT_SHIM(IMapRouteView)->get_OutlineColor(put_abi(value))); return value; } template void impl_IMapRouteView::OutlineColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutlineColor(get(value))); + check_hresult(WINRT_SHIM(IMapRouteView)->put_OutlineColor(get_abi(value))); } template Windows::Services::Maps::MapRoute impl_IMapRouteView::Route() const { Windows::Services::Maps::MapRoute value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Route(put(value))); + check_hresult(WINRT_SHIM(IMapRouteView)->get_Route(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Maps::MapRouteView impl_IMapRouteViewFactory::CreateInstanceWithMapRoute(const Windows::Services::Maps::MapRoute & route, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapRouteView impl_IMapRouteViewFactory::CreateInstanceWithMapRoute(const Windows::Services::Maps::MapRoute & route, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapRouteView instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithMapRoute(get(route), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapRouteViewFactory)->abi_CreateInstanceWithMapRoute(get_abi(route), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapScene::TargetCamera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetCamera(put(value))); + check_hresult(WINRT_SHIM(IMapScene)->get_TargetCamera(put_abi(value))); return value; } template event_token impl_IMapScene::TargetCameraChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TargetCameraChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapScene)->add_TargetCameraChanged(get_abi(value), &token)); return token; } @@ -5964,348 +6348,348 @@ template event_revoker impl_IMapScene::TargetCameraCh template void impl_IMapScene::TargetCameraChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TargetCameraChanged(token)); + check_hresult(WINRT_SHIM(IMapScene)->remove_TargetCameraChanged(token)); } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromBoundingBox(const Windows::Devices::Geolocation::GeoboundingBox & bounds) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromBoundingBox(get(bounds), put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromBoundingBox(get_abi(bounds), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromBoundingBox(const Windows::Devices::Geolocation::GeoboundingBox & bounds, double headingInDegrees, double pitchInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromBoundingBoxWithHeadingAndPitch(get(bounds), headingInDegrees, pitchInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromBoundingBoxWithHeadingAndPitch(get_abi(bounds), headingInDegrees, pitchInDegrees, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromCamera(const Windows::UI::Xaml::Controls::Maps::MapCamera & camera) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromCamera(get(camera), put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromCamera(get_abi(camera), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocation(const Windows::Devices::Geolocation::Geopoint & location) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocation(get(location), put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocation(get_abi(location), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocation(const Windows::Devices::Geolocation::Geopoint & location, double headingInDegrees, double pitchInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocationWithHeadingAndPitch(get(location), headingInDegrees, pitchInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocationWithHeadingAndPitch(get_abi(location), headingInDegrees, pitchInDegrees, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocationAndRadius(const Windows::Devices::Geolocation::Geopoint & location, double radiusInMeters) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocationAndRadius(get(location), radiusInMeters, put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocationAndRadius(get_abi(location), radiusInMeters, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocationAndRadius(const Windows::Devices::Geolocation::Geopoint & location, double radiusInMeters, double headingInDegrees, double pitchInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocationAndRadiusWithHeadingAndPitch(get(location), radiusInMeters, headingInDegrees, pitchInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocationAndRadiusWithHeadingAndPitch(get_abi(location), radiusInMeters, headingInDegrees, pitchInDegrees, put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocations(const Windows::Foundation::Collections::IIterable & locations) const +template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocations(iterable locations) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocations(get(locations), put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocations(get_abi(locations), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocations(const Windows::Foundation::Collections::IIterable & locations, double headingInDegrees, double pitchInDegrees) const +template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapSceneStatics::CreateFromLocations(iterable locations, double headingInDegrees, double pitchInDegrees) const { Windows::UI::Xaml::Controls::Maps::MapScene returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateFromLocationsWithHeadingAndPitch(get(locations), headingInDegrees, pitchInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapSceneStatics)->abi_CreateFromLocationsWithHeadingAndPitch(get_abi(locations), headingInDegrees, pitchInDegrees, put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::Maps::MapTileDataSource impl_IMapTileDataSourceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileDataSource impl_IMapTileDataSourceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileDataSourceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::MapTileDataSource impl_IMapTileSource::DataSource() const { Windows::UI::Xaml::Controls::Maps::MapTileDataSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataSource(put(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->get_DataSource(put_abi(value))); return value; } template void impl_IMapTileSource::DataSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_DataSource(get(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->put_DataSource(get_abi(value))); } template Windows::UI::Xaml::Controls::Maps::MapTileLayer impl_IMapTileSource::Layer() const { Windows::UI::Xaml::Controls::Maps::MapTileLayer value {}; - check_hresult(static_cast(static_cast(*this))->get_Layer(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_Layer(&value)); return value; } template void impl_IMapTileSource::Layer(Windows::UI::Xaml::Controls::Maps::MapTileLayer value) const { - check_hresult(static_cast(static_cast(*this))->put_Layer(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_Layer(value)); } template Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange impl_IMapTileSource::ZoomLevelRange() const { Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevelRange(put(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->get_ZoomLevelRange(put_abi(value))); return value; } template void impl_IMapTileSource::ZoomLevelRange(const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomLevelRange(get(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->put_ZoomLevelRange(get_abi(value))); } template Windows::Devices::Geolocation::GeoboundingBox impl_IMapTileSource::Bounds() const { Windows::Devices::Geolocation::GeoboundingBox value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->get_Bounds(put_abi(value))); return value; } template void impl_IMapTileSource::Bounds(const Windows::Devices::Geolocation::GeoboundingBox & value) const { - check_hresult(static_cast(static_cast(*this))->put_Bounds(get(value))); + check_hresult(WINRT_SHIM(IMapTileSource)->put_Bounds(get_abi(value))); } template bool impl_IMapTileSource::AllowOverstretch() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowOverstretch(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_AllowOverstretch(&value)); return value; } template void impl_IMapTileSource::AllowOverstretch(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowOverstretch(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_AllowOverstretch(value)); } template bool impl_IMapTileSource::IsFadingEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFadingEnabled(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_IsFadingEnabled(&value)); return value; } template void impl_IMapTileSource::IsFadingEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFadingEnabled(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_IsFadingEnabled(value)); } template bool impl_IMapTileSource::IsTransparencyEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTransparencyEnabled(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_IsTransparencyEnabled(&value)); return value; } template void impl_IMapTileSource::IsTransparencyEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTransparencyEnabled(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_IsTransparencyEnabled(value)); } template bool impl_IMapTileSource::IsRetryEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsRetryEnabled(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_IsRetryEnabled(&value)); return value; } template void impl_IMapTileSource::IsRetryEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsRetryEnabled(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_IsRetryEnabled(value)); } template int32_t impl_IMapTileSource::ZIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ZIndex(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_ZIndex(&value)); return value; } template void impl_IMapTileSource::ZIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ZIndex(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_ZIndex(value)); } template int32_t impl_IMapTileSource::TilePixelSize() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_TilePixelSize(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_TilePixelSize(&value)); return value; } template void impl_IMapTileSource::TilePixelSize(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_TilePixelSize(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_TilePixelSize(value)); } template bool impl_IMapTileSource::Visible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Visible(&value)); + check_hresult(WINRT_SHIM(IMapTileSource)->get_Visible(&value)); return value; } template void impl_IMapTileSource::Visible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Visible(value)); + check_hresult(WINRT_SHIM(IMapTileSource)->put_Visible(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::DataSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_DataSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::LayerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LayerProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_LayerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::ZoomLevelRangeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevelRangeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_ZoomLevelRangeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::BoundsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BoundsProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_BoundsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::AllowOverstretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AllowOverstretchProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_AllowOverstretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::IsFadingEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFadingEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_IsFadingEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::IsTransparencyEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTransparencyEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_IsTransparencyEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::IsRetryEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsRetryEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_IsRetryEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::ZIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZIndexProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_ZIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::TilePixelSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TilePixelSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_TilePixelSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapTileSourceStatics::VisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapTileSourceStatics)->get_VisibleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileSourceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithDataSource(get(dataSource), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileSourceFactory)->abi_CreateInstanceWithDataSource(get_abi(dataSource), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceAndZoomRange(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceAndZoomRange(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithDataSourceAndZoomRange(get(dataSource), get(zoomLevelRange), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileSourceFactory)->abi_CreateInstanceWithDataSourceAndZoomRange(get_abi(dataSource), get_abi(zoomLevelRange), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceZoomRangeAndBounds(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceZoomRangeAndBounds(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithDataSourceZoomRangeAndBounds(get(dataSource), get(zoomLevelRange), get(bounds), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileSourceFactory)->abi_CreateInstanceWithDataSourceZoomRangeAndBounds(get_abi(dataSource), get_abi(zoomLevelRange), get_abi(bounds), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds, int32_t tileSizeInPixels, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::MapTileSource impl_IMapTileSourceFactory::CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds, int32_t tileSizeInPixels, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::MapTileSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(get(dataSource), get(zoomLevelRange), get(bounds), tileSizeInPixels, get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMapTileSourceFactory)->abi_CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(get_abi(dataSource), get_abi(zoomLevelRange), get_abi(bounds), tileSizeInPixels, get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Devices::Geolocation::Geopoint impl_IStreetsidePanorama::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IStreetsidePanorama)->get_Location(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation impl_IStreetsidePanoramaStatics::FindNearbyAsync(const Windows::Devices::Geolocation::Geopoint & location) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_FindNearbyWithLocationAsync(get(location), put(returnValue))); + check_hresult(WINRT_SHIM(IStreetsidePanoramaStatics)->abi_FindNearbyWithLocationAsync(get_abi(location), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IStreetsidePanoramaStatics::FindNearbyAsync(const Windows::Devices::Geolocation::Geopoint & location, double radiusInMeters) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_FindNearbyWithLocationAndRadiusAsync(get(location), radiusInMeters, put(returnValue))); + check_hresult(WINRT_SHIM(IStreetsidePanoramaStatics)->abi_FindNearbyWithLocationAndRadiusAsync(get_abi(location), radiusInMeters, put_abi(returnValue))); return returnValue; } template event_token impl_ICustomMapTileDataSource::BitmapRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BitmapRequested(get(value), &token)); + check_hresult(WINRT_SHIM(ICustomMapTileDataSource)->add_BitmapRequested(get_abi(value), &token)); return token; } @@ -6316,51 +6700,51 @@ template event_revoker impl_ICustomMapTil template void impl_ICustomMapTileDataSource::BitmapRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BitmapRequested(token)); + check_hresult(WINRT_SHIM(ICustomMapTileDataSource)->remove_BitmapRequested(token)); } -template Windows::UI::Xaml::Controls::Maps::CustomMapTileDataSource impl_ICustomMapTileDataSourceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::CustomMapTileDataSource impl_ICustomMapTileDataSourceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::CustomMapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICustomMapTileDataSourceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template hstring impl_IHttpMapTileDataSource::UriFormatString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UriFormatString(put(value))); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->get_UriFormatString(put_abi(value))); return value; } -template void impl_IHttpMapTileDataSource::UriFormatString(hstring_ref value) const +template void impl_IHttpMapTileDataSource::UriFormatString(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UriFormatString(get(value))); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->put_UriFormatString(get_abi(value))); } template Windows::Foundation::Collections::IMap impl_IHttpMapTileDataSource::AdditionalRequestHeaders() const { Windows::Foundation::Collections::IMap value; - check_hresult(static_cast(static_cast(*this))->get_AdditionalRequestHeaders(put(value))); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->get_AdditionalRequestHeaders(put_abi(value))); return value; } template bool impl_IHttpMapTileDataSource::AllowCaching() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowCaching(&value)); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->get_AllowCaching(&value)); return value; } template void impl_IHttpMapTileDataSource::AllowCaching(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowCaching(value)); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->put_AllowCaching(value)); } template event_token impl_IHttpMapTileDataSource::UriRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UriRequested(get(value), &token)); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->add_UriRequested(get_abi(value), &token)); return token; } @@ -6371,39 +6755,39 @@ template event_revoker impl_IHttpMapTileDat template void impl_IHttpMapTileDataSource::UriRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UriRequested(token)); + check_hresult(WINRT_SHIM(IHttpMapTileDataSource)->remove_UriRequested(token)); } -template Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource impl_IHttpMapTileDataSourceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource impl_IHttpMapTileDataSourceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHttpMapTileDataSourceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource impl_IHttpMapTileDataSourceFactory::CreateInstanceWithUriFormatString(hstring_ref uriFormatString, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource impl_IHttpMapTileDataSourceFactory::CreateInstanceWithUriFormatString(hstring_view uriFormatString, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithUriFormatString(get(uriFormatString), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHttpMapTileDataSourceFactory)->abi_CreateInstanceWithUriFormatString(get_abi(uriFormatString), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template hstring impl_ILocalMapTileDataSource::UriFormatString() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_UriFormatString(put(value))); + check_hresult(WINRT_SHIM(ILocalMapTileDataSource)->get_UriFormatString(put_abi(value))); return value; } -template void impl_ILocalMapTileDataSource::UriFormatString(hstring_ref value) const +template void impl_ILocalMapTileDataSource::UriFormatString(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_UriFormatString(get(value))); + check_hresult(WINRT_SHIM(ILocalMapTileDataSource)->put_UriFormatString(get_abi(value))); } template event_token impl_ILocalMapTileDataSource::UriRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UriRequested(get(value), &token)); + check_hresult(WINRT_SHIM(ILocalMapTileDataSource)->add_UriRequested(get_abi(value), &token)); return token; } @@ -6414,602 +6798,602 @@ template event_revoker impl_ILocalMapTileD template void impl_ILocalMapTileDataSource::UriRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UriRequested(token)); + check_hresult(WINRT_SHIM(ILocalMapTileDataSource)->remove_UriRequested(token)); } -template Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource impl_ILocalMapTileDataSourceFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource impl_ILocalMapTileDataSourceFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ILocalMapTileDataSourceFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource impl_ILocalMapTileDataSourceFactory::CreateInstanceWithUriFormatString(hstring_ref uriFormatString, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource impl_ILocalMapTileDataSourceFactory::CreateInstanceWithUriFormatString(hstring_view uriFormatString, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithUriFormatString(get(uriFormatString), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ILocalMapTileDataSourceFactory)->abi_CreateInstanceWithUriFormatString(get_abi(uriFormatString), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Devices::Geolocation::Geopoint impl_IMapIcon::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapIcon)->get_Location(put_abi(value))); return value; } template void impl_IMapIcon::Location(const Windows::Devices::Geolocation::Geopoint & value) const { - check_hresult(static_cast(static_cast(*this))->put_Location(get(value))); + check_hresult(WINRT_SHIM(IMapIcon)->put_Location(get_abi(value))); } template hstring impl_IMapIcon::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(IMapIcon)->get_Title(put_abi(value))); return value; } -template void impl_IMapIcon::Title(hstring_ref value) const +template void impl_IMapIcon::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IMapIcon)->put_Title(get_abi(value))); } template Windows::Foundation::Point impl_IMapIcon::NormalizedAnchorPoint() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_NormalizedAnchorPoint(put(value))); + check_hresult(WINRT_SHIM(IMapIcon)->get_NormalizedAnchorPoint(put_abi(value))); return value; } template void impl_IMapIcon::NormalizedAnchorPoint(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_NormalizedAnchorPoint(get(value))); + check_hresult(WINRT_SHIM(IMapIcon)->put_NormalizedAnchorPoint(get_abi(value))); } template Windows::Storage::Streams::IRandomAccessStreamReference impl_IMapIcon::Image() const { Windows::Storage::Streams::IRandomAccessStreamReference value; - check_hresult(static_cast(static_cast(*this))->get_Image(put(value))); + check_hresult(WINRT_SHIM(IMapIcon)->get_Image(put_abi(value))); return value; } template void impl_IMapIcon::Image(const Windows::Storage::Streams::IRandomAccessStreamReference & value) const { - check_hresult(static_cast(static_cast(*this))->put_Image(get(value))); + check_hresult(WINRT_SHIM(IMapIcon)->put_Image(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMapIconStatics::LocationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocationProperty(put(value))); + check_hresult(WINRT_SHIM(IMapIconStatics)->get_LocationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapIconStatics::TitleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapIconStatics)->get_TitleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapIconStatics::NormalizedAnchorPointProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NormalizedAnchorPointProperty(put(value))); + check_hresult(WINRT_SHIM(IMapIconStatics)->get_NormalizedAnchorPointProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapElementCollisionBehavior impl_IMapIcon2::CollisionBehaviorDesired() const { Windows::UI::Xaml::Controls::Maps::MapElementCollisionBehavior value {}; - check_hresult(static_cast(static_cast(*this))->get_CollisionBehaviorDesired(&value)); + check_hresult(WINRT_SHIM(IMapIcon2)->get_CollisionBehaviorDesired(&value)); return value; } template void impl_IMapIcon2::CollisionBehaviorDesired(Windows::UI::Xaml::Controls::Maps::MapElementCollisionBehavior value) const { - check_hresult(static_cast(static_cast(*this))->put_CollisionBehaviorDesired(value)); + check_hresult(WINRT_SHIM(IMapIcon2)->put_CollisionBehaviorDesired(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMapIconStatics2::CollisionBehaviorDesiredProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CollisionBehaviorDesiredProperty(put(value))); + check_hresult(WINRT_SHIM(IMapIconStatics2)->get_CollisionBehaviorDesiredProperty(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IMapPolygon::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->get_Path(put_abi(value))); return value; } template void impl_IMapPolygon::Path(const Windows::Devices::Geolocation::Geopath & value) const { - check_hresult(static_cast(static_cast(*this))->put_Path(get(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->put_Path(get_abi(value))); } template Windows::UI::Color impl_IMapPolygon::StrokeColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeColor(put(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->get_StrokeColor(put_abi(value))); return value; } template void impl_IMapPolygon::StrokeColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeColor(get(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->put_StrokeColor(get_abi(value))); } template double impl_IMapPolygon::StrokeThickness() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeThickness(&value)); + check_hresult(WINRT_SHIM(IMapPolygon)->get_StrokeThickness(&value)); return value; } template void impl_IMapPolygon::StrokeThickness(double value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeThickness(value)); + check_hresult(WINRT_SHIM(IMapPolygon)->put_StrokeThickness(value)); } template bool impl_IMapPolygon::StrokeDashed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeDashed(&value)); + check_hresult(WINRT_SHIM(IMapPolygon)->get_StrokeDashed(&value)); return value; } template void impl_IMapPolygon::StrokeDashed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeDashed(value)); + check_hresult(WINRT_SHIM(IMapPolygon)->put_StrokeDashed(value)); } template Windows::UI::Color impl_IMapPolygon::FillColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_FillColor(put(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->get_FillColor(put_abi(value))); return value; } template void impl_IMapPolygon::FillColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_FillColor(get(value))); + check_hresult(WINRT_SHIM(IMapPolygon)->put_FillColor(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMapPolygonStatics::PathProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PathProperty(put(value))); + check_hresult(WINRT_SHIM(IMapPolygonStatics)->get_PathProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapPolygonStatics::StrokeThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StrokeThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IMapPolygonStatics)->get_StrokeThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapPolygonStatics::StrokeDashedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StrokeDashedProperty(put(value))); + check_hresult(WINRT_SHIM(IMapPolygonStatics)->get_StrokeDashedProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMapPolygon2::Paths() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Paths(put(value))); + check_hresult(WINRT_SHIM(IMapPolygon2)->get_Paths(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopath impl_IMapPolyline::Path() const { Windows::Devices::Geolocation::Geopath value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Path(put(value))); + check_hresult(WINRT_SHIM(IMapPolyline)->get_Path(put_abi(value))); return value; } template void impl_IMapPolyline::Path(const Windows::Devices::Geolocation::Geopath & value) const { - check_hresult(static_cast(static_cast(*this))->put_Path(get(value))); + check_hresult(WINRT_SHIM(IMapPolyline)->put_Path(get_abi(value))); } template Windows::UI::Color impl_IMapPolyline::StrokeColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeColor(put(value))); + check_hresult(WINRT_SHIM(IMapPolyline)->get_StrokeColor(put_abi(value))); return value; } template void impl_IMapPolyline::StrokeColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeColor(get(value))); + check_hresult(WINRT_SHIM(IMapPolyline)->put_StrokeColor(get_abi(value))); } template double impl_IMapPolyline::StrokeThickness() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeThickness(&value)); + check_hresult(WINRT_SHIM(IMapPolyline)->get_StrokeThickness(&value)); return value; } template void impl_IMapPolyline::StrokeThickness(double value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeThickness(value)); + check_hresult(WINRT_SHIM(IMapPolyline)->put_StrokeThickness(value)); } template bool impl_IMapPolyline::StrokeDashed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StrokeDashed(&value)); + check_hresult(WINRT_SHIM(IMapPolyline)->get_StrokeDashed(&value)); return value; } template void impl_IMapPolyline::StrokeDashed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_StrokeDashed(value)); + check_hresult(WINRT_SHIM(IMapPolyline)->put_StrokeDashed(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMapPolylineStatics::PathProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PathProperty(put(value))); + check_hresult(WINRT_SHIM(IMapPolylineStatics)->get_PathProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapPolylineStatics::StrokeDashedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StrokeDashedProperty(put(value))); + check_hresult(WINRT_SHIM(IMapPolylineStatics)->get_StrokeDashedProperty(put_abi(value))); return value; } template bool impl_IStreetsideExperience::AddressTextVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AddressTextVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_AddressTextVisible(&value)); return value; } template void impl_IStreetsideExperience::AddressTextVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AddressTextVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_AddressTextVisible(value)); } template bool impl_IStreetsideExperience::CursorVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CursorVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_CursorVisible(&value)); return value; } template void impl_IStreetsideExperience::CursorVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CursorVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_CursorVisible(value)); } template bool impl_IStreetsideExperience::OverviewMapVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_OverviewMapVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_OverviewMapVisible(&value)); return value; } template void impl_IStreetsideExperience::OverviewMapVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_OverviewMapVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_OverviewMapVisible(value)); } template bool impl_IStreetsideExperience::StreetLabelsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StreetLabelsVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_StreetLabelsVisible(&value)); return value; } template void impl_IStreetsideExperience::StreetLabelsVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_StreetLabelsVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_StreetLabelsVisible(value)); } template bool impl_IStreetsideExperience::ExitButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ExitButtonVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_ExitButtonVisible(&value)); return value; } template void impl_IStreetsideExperience::ExitButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ExitButtonVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_ExitButtonVisible(value)); } template bool impl_IStreetsideExperience::ZoomButtonsVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomButtonsVisible(&value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->get_ZoomButtonsVisible(&value)); return value; } template void impl_IStreetsideExperience::ZoomButtonsVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomButtonsVisible(value)); + check_hresult(WINRT_SHIM(IStreetsideExperience)->put_ZoomButtonsVisible(value)); } template Windows::UI::Xaml::Controls::Maps::StreetsideExperience impl_IStreetsideExperienceFactory::CreateInstanceWithPanorama(const Windows::UI::Xaml::Controls::Maps::StreetsidePanorama & panorama) const { Windows::UI::Xaml::Controls::Maps::StreetsideExperience instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithPanorama(get(panorama), put(instance))); + check_hresult(WINRT_SHIM(IStreetsideExperienceFactory)->abi_CreateInstanceWithPanorama(get_abi(panorama), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Maps::StreetsideExperience impl_IStreetsideExperienceFactory::CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(const Windows::UI::Xaml::Controls::Maps::StreetsidePanorama & panorama, double headingInDegrees, double pitchInDegrees, double fieldOfViewInDegrees) const { Windows::UI::Xaml::Controls::Maps::StreetsideExperience instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(get(panorama), headingInDegrees, pitchInDegrees, fieldOfViewInDegrees, put(instance))); + check_hresult(WINRT_SHIM(IStreetsideExperienceFactory)->abi_CreateInstanceWithPanoramaHeadingPitchAndFieldOfView(get_abi(panorama), headingInDegrees, pitchInDegrees, fieldOfViewInDegrees, put_abi(instance))); return instance; } template Windows::Devices::Geolocation::Geopoint impl_IMapControl::Center() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Center(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_Center(put_abi(value))); return value; } template void impl_IMapControl::Center(const Windows::Devices::Geolocation::Geopoint & value) const { - check_hresult(static_cast(static_cast(*this))->put_Center(get(value))); + check_hresult(WINRT_SHIM(IMapControl)->put_Center(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IMapControl::Children() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Children(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_Children(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapColorScheme impl_IMapControl::ColorScheme() const { Windows::UI::Xaml::Controls::Maps::MapColorScheme value {}; - check_hresult(static_cast(static_cast(*this))->get_ColorScheme(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_ColorScheme(&value)); return value; } template void impl_IMapControl::ColorScheme(Windows::UI::Xaml::Controls::Maps::MapColorScheme value) const { - check_hresult(static_cast(static_cast(*this))->put_ColorScheme(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_ColorScheme(value)); } template double impl_IMapControl::DesiredPitch() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredPitch(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_DesiredPitch(&value)); return value; } template void impl_IMapControl::DesiredPitch(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredPitch(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_DesiredPitch(value)); } template double impl_IMapControl::Heading() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Heading(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_Heading(&value)); return value; } template void impl_IMapControl::Heading(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Heading(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_Heading(value)); } template bool impl_IMapControl::LandmarksVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_LandmarksVisible(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_LandmarksVisible(&value)); return value; } template void impl_IMapControl::LandmarksVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_LandmarksVisible(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_LandmarksVisible(value)); } template Windows::UI::Xaml::Controls::Maps::MapLoadingStatus impl_IMapControl::LoadingStatus() const { Windows::UI::Xaml::Controls::Maps::MapLoadingStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_LoadingStatus(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_LoadingStatus(&value)); return value; } template hstring impl_IMapControl::MapServiceToken() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MapServiceToken(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_MapServiceToken(put_abi(value))); return value; } -template void impl_IMapControl::MapServiceToken(hstring_ref value) const +template void impl_IMapControl::MapServiceToken(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MapServiceToken(get(value))); + check_hresult(WINRT_SHIM(IMapControl)->put_MapServiceToken(get_abi(value))); } template double impl_IMapControl::MaxZoomLevel() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxZoomLevel(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_MaxZoomLevel(&value)); return value; } template double impl_IMapControl::MinZoomLevel() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinZoomLevel(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_MinZoomLevel(&value)); return value; } template bool impl_IMapControl::PedestrianFeaturesVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PedestrianFeaturesVisible(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_PedestrianFeaturesVisible(&value)); return value; } template void impl_IMapControl::PedestrianFeaturesVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PedestrianFeaturesVisible(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_PedestrianFeaturesVisible(value)); } template double impl_IMapControl::Pitch() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Pitch(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_Pitch(&value)); return value; } template Windows::UI::Xaml::Controls::Maps::MapStyle impl_IMapControl::Style() const { Windows::UI::Xaml::Controls::Maps::MapStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_Style(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_Style(&value)); return value; } template void impl_IMapControl::Style(Windows::UI::Xaml::Controls::Maps::MapStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_Style(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_Style(value)); } template bool impl_IMapControl::TrafficFlowVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TrafficFlowVisible(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_TrafficFlowVisible(&value)); return value; } template void impl_IMapControl::TrafficFlowVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_TrafficFlowVisible(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_TrafficFlowVisible(value)); } template Windows::Foundation::Point impl_IMapControl::TransformOrigin() const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->get_TransformOrigin(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_TransformOrigin(put_abi(value))); return value; } template void impl_IMapControl::TransformOrigin(const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransformOrigin(get(value))); + check_hresult(WINRT_SHIM(IMapControl)->put_TransformOrigin(get_abi(value))); } template Windows::UI::Xaml::Controls::Maps::MapWatermarkMode impl_IMapControl::WatermarkMode() const { Windows::UI::Xaml::Controls::Maps::MapWatermarkMode value {}; - check_hresult(static_cast(static_cast(*this))->get_WatermarkMode(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_WatermarkMode(&value)); return value; } template void impl_IMapControl::WatermarkMode(Windows::UI::Xaml::Controls::Maps::MapWatermarkMode value) const { - check_hresult(static_cast(static_cast(*this))->put_WatermarkMode(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_WatermarkMode(value)); } template double impl_IMapControl::ZoomLevel() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevel(&value)); + check_hresult(WINRT_SHIM(IMapControl)->get_ZoomLevel(&value)); return value; } template void impl_IMapControl::ZoomLevel(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomLevel(value)); + check_hresult(WINRT_SHIM(IMapControl)->put_ZoomLevel(value)); } template Windows::Foundation::Collections::IVector impl_IMapControl::MapElements() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_MapElements(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_MapElements(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMapControl::Routes() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Routes(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_Routes(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IMapControl::TileSources() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_TileSources(put(value))); + check_hresult(WINRT_SHIM(IMapControl)->get_TileSources(put_abi(value))); return value; } -template event_token impl_IMapControl::CenterChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::CenterChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CenterChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_CenterChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::CenterChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::CenterChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_CenterChanged, CenterChanged(value)); } template void impl_IMapControl::CenterChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CenterChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_CenterChanged(token)); } -template event_token impl_IMapControl::HeadingChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::HeadingChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HeadingChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_HeadingChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::HeadingChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::HeadingChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_HeadingChanged, HeadingChanged(value)); } template void impl_IMapControl::HeadingChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HeadingChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_HeadingChanged(token)); } -template event_token impl_IMapControl::LoadingStatusChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::LoadingStatusChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LoadingStatusChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_LoadingStatusChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::LoadingStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::LoadingStatusChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_LoadingStatusChanged, LoadingStatusChanged(value)); } template void impl_IMapControl::LoadingStatusChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LoadingStatusChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_LoadingStatusChanged(token)); } template event_token impl_IMapControl::MapDoubleTapped(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapDoubleTapped(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_MapDoubleTapped(get_abi(value), &token)); return token; } @@ -7020,13 +7404,13 @@ template event_revoker impl_IMapControl::MapDoubleT template void impl_IMapControl::MapDoubleTapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapDoubleTapped(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_MapDoubleTapped(token)); } template event_token impl_IMapControl::MapHolding(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapHolding(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_MapHolding(get_abi(value), &token)); return token; } @@ -7037,13 +7421,13 @@ template event_revoker impl_IMapControl::MapHolding template void impl_IMapControl::MapHolding(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapHolding(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_MapHolding(token)); } template event_token impl_IMapControl::MapTapped(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapTapped(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_MapTapped(get_abi(value), &token)); return token; } @@ -7054,409 +7438,409 @@ template event_revoker impl_IMapControl::MapTapped( template void impl_IMapControl::MapTapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapTapped(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_MapTapped(token)); } -template event_token impl_IMapControl::PitchChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::PitchChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PitchChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_PitchChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::PitchChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::PitchChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_PitchChanged, PitchChanged(value)); } template void impl_IMapControl::PitchChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PitchChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_PitchChanged(token)); } -template event_token impl_IMapControl::TransformOriginChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::TransformOriginChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TransformOriginChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_TransformOriginChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::TransformOriginChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::TransformOriginChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_TransformOriginChanged, TransformOriginChanged(value)); } template void impl_IMapControl::TransformOriginChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TransformOriginChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_TransformOriginChanged(token)); } -template event_token impl_IMapControl::ZoomLevelChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IMapControl::ZoomLevelChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ZoomLevelChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl)->add_ZoomLevelChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IMapControl::ZoomLevelChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IMapControl::ZoomLevelChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Maps::IMapControl::remove_ZoomLevelChanged, ZoomLevelChanged(value)); } template void impl_IMapControl::ZoomLevelChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ZoomLevelChanged(token)); + check_hresult(WINRT_SHIM(IMapControl)->remove_ZoomLevelChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IMapControl::FindMapElementsAtOffset(const Windows::Foundation::Point & offset) const { Windows::Foundation::Collections::IVectorView returnValue; - check_hresult(static_cast(static_cast(*this))->abi_FindMapElementsAtOffset(get(offset), put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_FindMapElementsAtOffset(get_abi(offset), put_abi(returnValue))); return returnValue; } template void impl_IMapControl::GetLocationFromOffset(const Windows::Foundation::Point & offset, Windows::Devices::Geolocation::Geopoint & location) const { - check_hresult(static_cast(static_cast(*this))->abi_GetLocationFromOffset(get(offset), put(location))); + check_hresult(WINRT_SHIM(IMapControl)->abi_GetLocationFromOffset(get_abi(offset), put_abi(location))); } template void impl_IMapControl::GetOffsetFromLocation(const Windows::Devices::Geolocation::Geopoint & location, Windows::Foundation::Point & offset) const { - check_hresult(static_cast(static_cast(*this))->abi_GetOffsetFromLocation(get(location), put(offset))); + check_hresult(WINRT_SHIM(IMapControl)->abi_GetOffsetFromLocation(get_abi(location), put_abi(offset))); } template void impl_IMapControl::IsLocationInView(const Windows::Devices::Geolocation::Geopoint & location, bool & isInView) const { - check_hresult(static_cast(static_cast(*this))->abi_IsLocationInView(get(location), &isInView)); + check_hresult(WINRT_SHIM(IMapControl)->abi_IsLocationInView(get_abi(location), &isInView)); } -template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewBoundsAsync(const Windows::Devices::Geolocation::GeoboundingBox & bounds, const Windows::Foundation::IReference & margin, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation) const +template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewBoundsAsync(const Windows::Devices::Geolocation::GeoboundingBox & bounds, const optional & margin, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetViewBoundsAsync(get(bounds), get(margin), animation, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_TrySetViewBoundsAsync(get_abi(bounds), get_abi(margin), animation, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetViewWithCenterAsync(get(center), put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_TrySetViewWithCenterAsync(get_abi(center), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const Windows::Foundation::IReference & zoomLevel) const +template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const optional & zoomLevel) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetViewWithCenterAndZoomAsync(get(center), get(zoomLevel), put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_TrySetViewWithCenterAndZoomAsync(get_abi(center), get_abi(zoomLevel), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const Windows::Foundation::IReference & zoomLevel, const Windows::Foundation::IReference & heading, const Windows::Foundation::IReference & desiredPitch) const +template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const optional & zoomLevel, const optional & heading, const optional & desiredPitch) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetViewWithCenterZoomHeadingAndPitchAsync(get(center), get(zoomLevel), get(heading), get(desiredPitch), put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_TrySetViewWithCenterZoomHeadingAndPitchAsync(get_abi(center), get_abi(zoomLevel), get_abi(heading), get_abi(desiredPitch), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const Windows::Foundation::IReference & zoomLevel, const Windows::Foundation::IReference & heading, const Windows::Foundation::IReference & desiredPitch, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation) const +template Windows::Foundation::IAsyncOperation impl_IMapControl::TrySetViewAsync(const Windows::Devices::Geolocation::Geopoint & center, const optional & zoomLevel, const optional & heading, const optional & desiredPitch, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animation) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync(get(center), get(zoomLevel), get(heading), get(desiredPitch), animation, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl)->abi_TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync(get_abi(center), get_abi(zoomLevel), get_abi(heading), get_abi(desiredPitch), animation, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::CenterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CenterProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_CenterProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::ChildrenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildrenProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_ChildrenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::ColorSchemeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColorSchemeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_ColorSchemeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::DesiredPitchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DesiredPitchProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_DesiredPitchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::HeadingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeadingProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_HeadingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::LandmarksVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LandmarksVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_LandmarksVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::LoadingStatusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LoadingStatusProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_LoadingStatusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::MapServiceTokenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MapServiceTokenProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_MapServiceTokenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::PedestrianFeaturesVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PedestrianFeaturesVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_PedestrianFeaturesVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::PitchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PitchProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_PitchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::StyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StyleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_StyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::TrafficFlowVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TrafficFlowVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_TrafficFlowVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::TransformOriginProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransformOriginProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_TransformOriginProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::WatermarkModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WatermarkModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_WatermarkModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::ZoomLevelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomLevelProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_ZoomLevelProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::MapElementsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MapElementsProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_MapElementsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::RoutesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RoutesProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_RoutesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::TileSourcesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TileSourcesProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_TileSourcesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::LocationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LocationProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_LocationProperty(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapControlStatics::GetLocation(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLocation(get(element), put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->abi_GetLocation(get_abi(element), put_abi(value))); return value; } template void impl_IMapControlStatics::SetLocation(const Windows::UI::Xaml::DependencyObject & element, const Windows::Devices::Geolocation::Geopoint & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocation(get(element), get(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->abi_SetLocation(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics::NormalizedAnchorPointProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NormalizedAnchorPointProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->get_NormalizedAnchorPointProperty(put_abi(value))); return value; } template Windows::Foundation::Point impl_IMapControlStatics::GetNormalizedAnchorPoint(const Windows::UI::Xaml::DependencyObject & element) const { Windows::Foundation::Point value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetNormalizedAnchorPoint(get(element), put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->abi_GetNormalizedAnchorPoint(get_abi(element), put_abi(value))); return value; } template void impl_IMapControlStatics::SetNormalizedAnchorPoint(const Windows::UI::Xaml::DependencyObject & element, const Windows::Foundation::Point & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetNormalizedAnchorPoint(get(element), get(value))); + check_hresult(WINRT_SHIM(IMapControlStatics)->abi_SetNormalizedAnchorPoint(get_abi(element), get_abi(value))); } template bool impl_IMapControl2::BusinessLandmarksVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BusinessLandmarksVisible(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_BusinessLandmarksVisible(&value)); return value; } template void impl_IMapControl2::BusinessLandmarksVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BusinessLandmarksVisible(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_BusinessLandmarksVisible(value)); } template bool impl_IMapControl2::TransitFeaturesVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TransitFeaturesVisible(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_TransitFeaturesVisible(&value)); return value; } template void impl_IMapControl2::TransitFeaturesVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_TransitFeaturesVisible(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_TransitFeaturesVisible(value)); } template Windows::UI::Xaml::Controls::Maps::MapPanInteractionMode impl_IMapControl2::PanInteractionMode() const { Windows::UI::Xaml::Controls::Maps::MapPanInteractionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PanInteractionMode(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_PanInteractionMode(&value)); return value; } template void impl_IMapControl2::PanInteractionMode(Windows::UI::Xaml::Controls::Maps::MapPanInteractionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PanInteractionMode(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_PanInteractionMode(value)); } template Windows::UI::Xaml::Controls::Maps::MapInteractionMode impl_IMapControl2::RotateInteractionMode() const { Windows::UI::Xaml::Controls::Maps::MapInteractionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_RotateInteractionMode(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_RotateInteractionMode(&value)); return value; } template void impl_IMapControl2::RotateInteractionMode(Windows::UI::Xaml::Controls::Maps::MapInteractionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_RotateInteractionMode(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_RotateInteractionMode(value)); } template Windows::UI::Xaml::Controls::Maps::MapInteractionMode impl_IMapControl2::TiltInteractionMode() const { Windows::UI::Xaml::Controls::Maps::MapInteractionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_TiltInteractionMode(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_TiltInteractionMode(&value)); return value; } template void impl_IMapControl2::TiltInteractionMode(Windows::UI::Xaml::Controls::Maps::MapInteractionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_TiltInteractionMode(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_TiltInteractionMode(value)); } template Windows::UI::Xaml::Controls::Maps::MapInteractionMode impl_IMapControl2::ZoomInteractionMode() const { Windows::UI::Xaml::Controls::Maps::MapInteractionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomInteractionMode(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_ZoomInteractionMode(&value)); return value; } template void impl_IMapControl2::ZoomInteractionMode(Windows::UI::Xaml::Controls::Maps::MapInteractionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomInteractionMode(value)); + check_hresult(WINRT_SHIM(IMapControl2)->put_ZoomInteractionMode(value)); } template bool impl_IMapControl2::Is3DSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Is3DSupported(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_Is3DSupported(&value)); return value; } template bool impl_IMapControl2::IsStreetsideSupported() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStreetsideSupported(&value)); + check_hresult(WINRT_SHIM(IMapControl2)->get_IsStreetsideSupported(&value)); return value; } template Windows::UI::Xaml::Controls::Maps::MapScene impl_IMapControl2::Scene() const { Windows::UI::Xaml::Controls::Maps::MapScene value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Scene(put(value))); + check_hresult(WINRT_SHIM(IMapControl2)->get_Scene(put_abi(value))); return value; } template void impl_IMapControl2::Scene(const Windows::UI::Xaml::Controls::Maps::MapScene & value) const { - check_hresult(static_cast(static_cast(*this))->put_Scene(get(value))); + check_hresult(WINRT_SHIM(IMapControl2)->put_Scene(get_abi(value))); } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapControl2::ActualCamera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActualCamera(put(value))); + check_hresult(WINRT_SHIM(IMapControl2)->get_ActualCamera(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCamera impl_IMapControl2::TargetCamera() const { Windows::UI::Xaml::Controls::Maps::MapCamera value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TargetCamera(put(value))); + check_hresult(WINRT_SHIM(IMapControl2)->get_TargetCamera(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Maps::MapCustomExperience impl_IMapControl2::CustomExperience() const { Windows::UI::Xaml::Controls::Maps::MapCustomExperience value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CustomExperience(put(value))); + check_hresult(WINRT_SHIM(IMapControl2)->get_CustomExperience(put_abi(value))); return value; } template void impl_IMapControl2::CustomExperience(const Windows::UI::Xaml::Controls::Maps::MapCustomExperience & value) const { - check_hresult(static_cast(static_cast(*this))->put_CustomExperience(get(value))); + check_hresult(WINRT_SHIM(IMapControl2)->put_CustomExperience(get_abi(value))); } template event_token impl_IMapControl2::MapElementClick(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapElementClick(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_MapElementClick(get_abi(value), &token)); return token; } @@ -7467,13 +7851,13 @@ template event_revoker impl_IMapControl2::MapEleme template void impl_IMapControl2::MapElementClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapElementClick(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_MapElementClick(token)); } template event_token impl_IMapControl2::MapElementPointerEntered(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapElementPointerEntered(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_MapElementPointerEntered(get_abi(value), &token)); return token; } @@ -7484,13 +7868,13 @@ template event_revoker impl_IMapControl2::MapEleme template void impl_IMapControl2::MapElementPointerEntered(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapElementPointerEntered(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_MapElementPointerEntered(token)); } template event_token impl_IMapControl2::MapElementPointerExited(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapElementPointerExited(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_MapElementPointerExited(get_abi(value), &token)); return token; } @@ -7501,13 +7885,13 @@ template event_revoker impl_IMapControl2::MapEleme template void impl_IMapControl2::MapElementPointerExited(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapElementPointerExited(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_MapElementPointerExited(token)); } template event_token impl_IMapControl2::ActualCameraChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActualCameraChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_ActualCameraChanged(get_abi(value), &token)); return token; } @@ -7518,13 +7902,13 @@ template event_revoker impl_IMapControl2::ActualCa template void impl_IMapControl2::ActualCameraChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActualCameraChanged(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_ActualCameraChanged(token)); } template event_token impl_IMapControl2::ActualCameraChanging(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ActualCameraChanging(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_ActualCameraChanging(get_abi(value), &token)); return token; } @@ -7535,13 +7919,13 @@ template event_revoker impl_IMapControl2::ActualCa template void impl_IMapControl2::ActualCameraChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ActualCameraChanging(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_ActualCameraChanging(token)); } template event_token impl_IMapControl2::TargetCameraChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TargetCameraChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_TargetCameraChanged(get_abi(value), &token)); return token; } @@ -7552,13 +7936,13 @@ template event_revoker impl_IMapControl2::TargetCa template void impl_IMapControl2::TargetCameraChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TargetCameraChanged(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_TargetCameraChanged(token)); } template event_token impl_IMapControl2::CustomExperienceChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CustomExperienceChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl2)->add_CustomExperienceChanged(get_abi(value), &token)); return token; } @@ -7569,169 +7953,169 @@ template event_revoker impl_IMapControl2::CustomEx template void impl_IMapControl2::CustomExperienceChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CustomExperienceChanged(token)); + check_hresult(WINRT_SHIM(IMapControl2)->remove_CustomExperienceChanged(token)); } template void impl_IMapControl2::StartContinuousRotate(double rateInDegreesPerSecond) const { - check_hresult(static_cast(static_cast(*this))->abi_StartContinuousRotate(rateInDegreesPerSecond)); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StartContinuousRotate(rateInDegreesPerSecond)); } template void impl_IMapControl2::StopContinuousRotate() const { - check_hresult(static_cast(static_cast(*this))->abi_StopContinuousRotate()); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StopContinuousRotate()); } template void impl_IMapControl2::StartContinuousTilt(double rateInDegreesPerSecond) const { - check_hresult(static_cast(static_cast(*this))->abi_StartContinuousTilt(rateInDegreesPerSecond)); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StartContinuousTilt(rateInDegreesPerSecond)); } template void impl_IMapControl2::StopContinuousTilt() const { - check_hresult(static_cast(static_cast(*this))->abi_StopContinuousTilt()); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StopContinuousTilt()); } template void impl_IMapControl2::StartContinuousZoom(double rateOfChangePerSecond) const { - check_hresult(static_cast(static_cast(*this))->abi_StartContinuousZoom(rateOfChangePerSecond)); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StartContinuousZoom(rateOfChangePerSecond)); } template void impl_IMapControl2::StopContinuousZoom() const { - check_hresult(static_cast(static_cast(*this))->abi_StopContinuousZoom()); + check_hresult(WINRT_SHIM(IMapControl2)->abi_StopContinuousZoom()); } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryRotateAsync(double degrees) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryRotateAsync(degrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryRotateAsync(degrees, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryRotateToAsync(double angleInDegrees) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryRotateToAsync(angleInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryRotateToAsync(angleInDegrees, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryTiltAsync(double degrees) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryTiltAsync(degrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryTiltAsync(degrees, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryTiltToAsync(double angleInDegrees) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryTiltToAsync(angleInDegrees, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryTiltToAsync(angleInDegrees, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryZoomInAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryZoomInAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryZoomInAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryZoomOutAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryZoomOutAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryZoomOutAsync(put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TryZoomToAsync(double zoomLevel) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TryZoomToAsync(zoomLevel, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TryZoomToAsync(zoomLevel, put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TrySetSceneAsync(const Windows::UI::Xaml::Controls::Maps::MapScene & scene) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetSceneAsync(get(scene), put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TrySetSceneAsync(get_abi(scene), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IMapControl2::TrySetSceneAsync(const Windows::UI::Xaml::Controls::Maps::MapScene & scene, Windows::UI::Xaml::Controls::Maps::MapAnimationKind animationKind) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_TrySetSceneWithAnimationAsync(get(scene), animationKind, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl2)->abi_TrySetSceneWithAnimationAsync(get_abi(scene), animationKind, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::BusinessLandmarksVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BusinessLandmarksVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_BusinessLandmarksVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::TransitFeaturesVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransitFeaturesVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_TransitFeaturesVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::PanInteractionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PanInteractionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_PanInteractionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::RotateInteractionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RotateInteractionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_RotateInteractionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::TiltInteractionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TiltInteractionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_TiltInteractionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::ZoomInteractionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomInteractionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_ZoomInteractionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::Is3DSupportedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Is3DSupportedProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_Is3DSupportedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::IsStreetsideSupportedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsStreetsideSupportedProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_IsStreetsideSupportedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics2::SceneProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SceneProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics2)->get_SceneProperty(put_abi(value))); return value; } template event_token impl_IMapControl3::MapRightTapped(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MapRightTapped(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControl3)->add_MapRightTapped(get_abi(value), &token)); return token; } @@ -7742,58 +8126,58 @@ template event_revoker impl_IMapControl3::MapRight template void impl_IMapControl3::MapRightTapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MapRightTapped(token)); + check_hresult(WINRT_SHIM(IMapControl3)->remove_MapRightTapped(token)); } template bool impl_IMapControl4::BusinessLandmarksEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_BusinessLandmarksEnabled(&value)); + check_hresult(WINRT_SHIM(IMapControl4)->get_BusinessLandmarksEnabled(&value)); return value; } template void impl_IMapControl4::BusinessLandmarksEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_BusinessLandmarksEnabled(value)); + check_hresult(WINRT_SHIM(IMapControl4)->put_BusinessLandmarksEnabled(value)); } template bool impl_IMapControl4::TransitFeaturesEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_TransitFeaturesEnabled(&value)); + check_hresult(WINRT_SHIM(IMapControl4)->get_TransitFeaturesEnabled(&value)); return value; } template void impl_IMapControl4::TransitFeaturesEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_TransitFeaturesEnabled(value)); + check_hresult(WINRT_SHIM(IMapControl4)->put_TransitFeaturesEnabled(value)); } template Windows::Devices::Geolocation::Geopath impl_IMapControl4::GetVisibleRegion(Windows::UI::Xaml::Controls::Maps::MapVisibleRegionKind region) const { Windows::Devices::Geolocation::Geopath returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetVisibleRegion(region, put(returnValue))); + check_hresult(WINRT_SHIM(IMapControl4)->abi_GetVisibleRegion(region, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics4::BusinessLandmarksEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BusinessLandmarksEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics4)->get_BusinessLandmarksEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMapControlStatics4::TransitFeaturesEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransitFeaturesEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMapControlStatics4)->get_TransitFeaturesEnabledProperty(put_abi(value))); return value; } template event_token impl_IMapControlDataHelper::BusinessLandmarkClick(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BusinessLandmarkClick(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->add_BusinessLandmarkClick(get_abi(value), &token)); return token; } @@ -7804,13 +8188,13 @@ template event_revoker impl_IMapControlDataH template void impl_IMapControlDataHelper::BusinessLandmarkClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BusinessLandmarkClick(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->remove_BusinessLandmarkClick(token)); } template event_token impl_IMapControlDataHelper::TransitFeatureClick(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TransitFeatureClick(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->add_TransitFeatureClick(get_abi(value), &token)); return token; } @@ -7821,13 +8205,13 @@ template event_revoker impl_IMapControlDataH template void impl_IMapControlDataHelper::TransitFeatureClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TransitFeatureClick(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->remove_TransitFeatureClick(token)); } template event_token impl_IMapControlDataHelper::BusinessLandmarkRightTapped(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BusinessLandmarkRightTapped(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->add_BusinessLandmarkRightTapped(get_abi(value), &token)); return token; } @@ -7838,13 +8222,13 @@ template event_revoker impl_IMapControlDataH template void impl_IMapControlDataHelper::BusinessLandmarkRightTapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BusinessLandmarkRightTapped(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->remove_BusinessLandmarkRightTapped(token)); } template event_token impl_IMapControlDataHelper::TransitFeatureRightTapped(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TransitFeatureRightTapped(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->add_TransitFeatureRightTapped(get_abi(value), &token)); return token; } @@ -7855,13 +8239,13 @@ template event_revoker impl_IMapControlDataH template void impl_IMapControlDataHelper::TransitFeatureRightTapped(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TransitFeatureRightTapped(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper)->remove_TransitFeatureRightTapped(token)); } template event_token impl_IMapControlDataHelper2::BusinessLandmarkPointerEntered(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BusinessLandmarkPointerEntered(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->add_BusinessLandmarkPointerEntered(get_abi(value), &token)); return token; } @@ -7872,13 +8256,13 @@ template event_revoker impl_IMapControlData template void impl_IMapControlDataHelper2::BusinessLandmarkPointerEntered(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BusinessLandmarkPointerEntered(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->remove_BusinessLandmarkPointerEntered(token)); } template event_token impl_IMapControlDataHelper2::TransitFeaturePointerEntered(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TransitFeaturePointerEntered(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->add_TransitFeaturePointerEntered(get_abi(value), &token)); return token; } @@ -7889,13 +8273,13 @@ template event_revoker impl_IMapControlData template void impl_IMapControlDataHelper2::TransitFeaturePointerEntered(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TransitFeaturePointerEntered(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->remove_TransitFeaturePointerEntered(token)); } template event_token impl_IMapControlDataHelper2::BusinessLandmarkPointerExited(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BusinessLandmarkPointerExited(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->add_BusinessLandmarkPointerExited(get_abi(value), &token)); return token; } @@ -7906,13 +8290,13 @@ template event_revoker impl_IMapControlData template void impl_IMapControlDataHelper2::BusinessLandmarkPointerExited(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BusinessLandmarkPointerExited(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->remove_BusinessLandmarkPointerExited(token)); } template event_token impl_IMapControlDataHelper2::TransitFeaturePointerExited(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TransitFeaturePointerExited(get(value), &token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->add_TransitFeaturePointerExited(get_abi(value), &token)); return token; } @@ -7923,155 +8307,155 @@ template event_revoker impl_IMapControlData template void impl_IMapControlDataHelper2::TransitFeaturePointerExited(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TransitFeaturePointerExited(token)); + check_hresult(WINRT_SHIM(IMapControlDataHelper2)->remove_TransitFeaturePointerExited(token)); } template Windows::UI::Xaml::Controls::Maps::MapControlDataHelper impl_IMapControlDataHelperFactory::CreateInstance(const Windows::UI::Xaml::Controls::Maps::MapControl & map) const { Windows::UI::Xaml::Controls::Maps::MapControlDataHelper instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(map), put(instance))); + check_hresult(WINRT_SHIM(IMapControlDataHelperFactory)->abi_CreateInstance(get_abi(map), put_abi(instance))); return instance; } template Windows::Foundation::Collections::IVectorView impl_IMapControlBusinessLandmarkClickEventArgs::LocalLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LocalLocations(put(value))); + check_hresult(WINRT_SHIM(IMapControlBusinessLandmarkClickEventArgs)->get_LocalLocations(put_abi(value))); return value; } template hstring impl_IMapControlTransitFeatureClickEventArgs::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeatureClickEventArgs)->get_DisplayName(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapControlTransitFeatureClickEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeatureClickEventArgs)->get_Location(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeatureClickEventArgs::TransitProperties() const +template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeatureClickEventArgs::TransitProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_TransitProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMapControlTransitFeatureClickEventArgs)->get_TransitProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapControlBusinessLandmarkRightTappedEventArgs::LocalLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LocalLocations(put(value))); + check_hresult(WINRT_SHIM(IMapControlBusinessLandmarkRightTappedEventArgs)->get_LocalLocations(put_abi(value))); return value; } template hstring impl_IMapControlTransitFeatureRightTappedEventArgs::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeatureRightTappedEventArgs)->get_DisplayName(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapControlTransitFeatureRightTappedEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeatureRightTappedEventArgs)->get_Location(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeatureRightTappedEventArgs::TransitProperties() const +template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeatureRightTappedEventArgs::TransitProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_TransitProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMapControlTransitFeatureRightTappedEventArgs)->get_TransitProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapControlBusinessLandmarkPointerEnteredEventArgs::LocalLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LocalLocations(put(value))); + check_hresult(WINRT_SHIM(IMapControlBusinessLandmarkPointerEnteredEventArgs)->get_LocalLocations(put_abi(value))); return value; } template hstring impl_IMapControlTransitFeaturePointerEnteredEventArgs::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerEnteredEventArgs)->get_DisplayName(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapControlTransitFeaturePointerEnteredEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerEnteredEventArgs)->get_Location(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeaturePointerEnteredEventArgs::TransitProperties() const +template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeaturePointerEnteredEventArgs::TransitProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_TransitProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerEnteredEventArgs)->get_TransitProperties(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IMapControlBusinessLandmarkPointerExitedEventArgs::LocalLocations() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_LocalLocations(put(value))); + check_hresult(WINRT_SHIM(IMapControlBusinessLandmarkPointerExitedEventArgs)->get_LocalLocations(put_abi(value))); return value; } template hstring impl_IMapControlTransitFeaturePointerExitedEventArgs::DisplayName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayName(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerExitedEventArgs)->get_DisplayName(put_abi(value))); return value; } template Windows::Devices::Geolocation::Geopoint impl_IMapControlTransitFeaturePointerExitedEventArgs::Location() const { Windows::Devices::Geolocation::Geopoint value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Location(put(value))); + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerExitedEventArgs)->get_Location(put_abi(value))); return value; } -template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeaturePointerExitedEventArgs::TransitProperties() const +template Windows::Foundation::Collections::IMapView impl_IMapControlTransitFeaturePointerExitedEventArgs::TransitProperties() const { - Windows::Foundation::Collections::IMapView value; - check_hresult(static_cast(static_cast(*this))->get_TransitProperties(put(value))); + Windows::Foundation::Collections::IMapView value; + check_hresult(WINRT_SHIM(IMapControlTransitFeaturePointerExitedEventArgs)->get_TransitProperties(put_abi(value))); return value; } inline CustomMapTileDataSource::CustomMapTileDataSource() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } inline HttpMapTileDataSource::HttpMapTileDataSource() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } -inline HttpMapTileDataSource::HttpMapTileDataSource(hstring_ref uriFormatString) +inline HttpMapTileDataSource::HttpMapTileDataSource(hstring_view uriFormatString) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithUriFormatString(uriFormatString, outer, inner)); } inline LocalMapTileDataSource::LocalMapTileDataSource() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } -inline LocalMapTileDataSource::LocalMapTileDataSource(hstring_ref uriFormatString) +inline LocalMapTileDataSource::LocalMapTileDataSource(hstring_view uriFormatString) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithUriFormatString(uriFormatString, outer, inner)); } @@ -8316,7 +8700,7 @@ inline MapControlTransitFeatureRightTappedEventArgs::MapControlTransitFeatureRig inline MapCustomExperience::MapCustomExperience() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -8326,7 +8710,7 @@ inline MapCustomExperienceChangedEventArgs::MapCustomExperienceChangedEventArgs( inline MapElement::MapElement() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -8443,7 +8827,7 @@ inline MapRightTappedEventArgs::MapRightTappedEventArgs() : inline MapRouteView::MapRouteView(const Windows::Services::Maps::MapRoute & route) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithMapRoute(route, outer, inner)); } @@ -8482,12 +8866,12 @@ inline Windows::UI::Xaml::Controls::Maps::MapScene MapScene::CreateFromLocationA return get_activation_factory().CreateFromLocationAndRadius(location, radiusInMeters, headingInDegrees, pitchInDegrees); } -inline Windows::UI::Xaml::Controls::Maps::MapScene MapScene::CreateFromLocations(const Windows::Foundation::Collections::IIterable & locations) +inline Windows::UI::Xaml::Controls::Maps::MapScene MapScene::CreateFromLocations(iterable locations) { return get_activation_factory().CreateFromLocations(locations); } -inline Windows::UI::Xaml::Controls::Maps::MapScene MapScene::CreateFromLocations(const Windows::Foundation::Collections::IIterable & locations, double headingInDegrees, double pitchInDegrees) +inline Windows::UI::Xaml::Controls::Maps::MapScene MapScene::CreateFromLocations(iterable locations, double headingInDegrees, double pitchInDegrees) { return get_activation_factory().CreateFromLocations(locations, headingInDegrees, pitchInDegrees); } @@ -8510,37 +8894,37 @@ inline MapTileBitmapRequestedEventArgs::MapTileBitmapRequestedEventArgs() : inline MapTileDataSource::MapTileDataSource() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } inline MapTileSource::MapTileSource() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } inline MapTileSource::MapTileSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithDataSource(dataSource, outer, inner)); } inline MapTileSource::MapTileSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithDataSourceAndZoomRange(dataSource, zoomLevelRange, outer, inner)); } inline MapTileSource::MapTileSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithDataSourceZoomRangeAndBounds(dataSource, zoomLevelRange, bounds, outer, inner)); } inline MapTileSource::MapTileSource(const Windows::UI::Xaml::Controls::Maps::MapTileDataSource & dataSource, const Windows::UI::Xaml::Controls::Maps::MapZoomLevelRange & zoomLevelRange, const Windows::Devices::Geolocation::GeoboundingBox & bounds, int32_t tileSizeInPixels) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithDataSourceZoomRangeBoundsAndTileSize(dataSource, zoomLevelRange, bounds, tileSizeInPixels, outer, inner)); } @@ -8632,3 +9016,1049 @@ inline Windows::Foundation::IAsyncOperation +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::ICustomMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::ICustomMapTileDataSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IHttpMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IHttpMapTileDataSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::ILocalMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::ILocalMapTileDataSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapActualCameraChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapActualCameraChangedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapActualCameraChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapActualCameraChangingEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapCamera & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapCameraFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControl2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControl3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControl4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlBusinessLandmarkClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlBusinessLandmarkPointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlBusinessLandmarkPointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlBusinessLandmarkRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlDataHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlDataHelper2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlDataHelperFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlStatics4 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlTransitFeatureClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlTransitFeaturePointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlTransitFeaturePointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapControlTransitFeatureRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapCustomExperience & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapCustomExperienceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapCustomExperienceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElement2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementPointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementPointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapElementStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapIcon2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapIconStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapIconStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapInputEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapItemsControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapItemsControlStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapPolygon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapPolygon2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapPolygonStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapPolyline & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapPolylineStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapRouteView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapRouteViewFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapScene & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapSceneStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTargetCameraChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTargetCameraChangedEventArgs2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileBitmapRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileBitmapRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileBitmapRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileDataSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileSourceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileSourceStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileUriRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileUriRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IMapTileUriRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IStreetsideExperience & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IStreetsideExperienceFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IStreetsidePanorama & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::IStreetsidePanoramaStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::CustomMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::HttpMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::LocalMapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapActualCameraChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapActualCameraChangingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapCamera & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlBusinessLandmarkClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlBusinessLandmarkPointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlBusinessLandmarkPointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlBusinessLandmarkRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlDataHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlTransitFeatureClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlTransitFeaturePointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlTransitFeaturePointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapControlTransitFeatureRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapCustomExperience & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapCustomExperienceChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapElement & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapElementClickEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapElementPointerEnteredEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapElementPointerExitedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapIcon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapInputEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapItemsControl & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapPolygon & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapPolyline & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapRightTappedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapRouteView & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapScene & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTargetCameraChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileBitmapRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileDataSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileSource & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileUriRequest & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileUriRequestDeferral & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::MapTileUriRequestedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::StreetsideExperience & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Maps::StreetsidePanorama & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Primitives.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Primitives.h index 5387898e5..e4d17d3a2 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Primitives.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.Primitives.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Xaml.Controls.3.h" #include "internal/Windows.Foundation.Collections.3.h" @@ -31,9 +34,9 @@ template DragCompletedEventHandler::DragCompletedEventH DragCompletedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void DragCompletedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs & e) const +inline void DragCompletedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template DragDeltaEventHandler::DragDeltaEventHandler(L lambda) : @@ -48,9 +51,9 @@ template DragDeltaEventHandler::DragDeltaEventHandler(O DragDeltaEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void DragDeltaEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs & e) const +inline void DragDeltaEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template DragStartedEventHandler::DragStartedEventHandler(L lambda) : @@ -65,9 +68,9 @@ template DragStartedEventHandler::DragStartedEventHandl DragStartedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void DragStartedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs & e) const +inline void DragStartedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ItemsChangedEventHandler::ItemsChangedEventHandler(L lambda) : @@ -82,9 +85,9 @@ template ItemsChangedEventHandler::ItemsChangedEventHan ItemsChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ItemsChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs & e) const +inline void ItemsChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(L lambda) : @@ -99,9 +102,9 @@ template RangeBaseValueChangedEventHandler::RangeBaseVa RangeBaseValueChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void RangeBaseValueChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs & e) const +inline void RangeBaseValueChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ScrollEventHandler::ScrollEventHandler(L lambda) : @@ -116,9 +119,9 @@ template ScrollEventHandler::ScrollEventHandler(O * obj ScrollEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ScrollEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ScrollEventArgs & e) const +inline void ScrollEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ScrollEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -128,11 +131,12 @@ namespace impl { template struct produce : produce_base { - HRESULT __stdcall get_ClipRect(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClipRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClipRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClipRect()); return S_OK; } catch (...) @@ -145,7 +149,8 @@ struct produceshim().CompactVerticalDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompactVerticalDelta()); return S_OK; } catch (...) @@ -154,11 +159,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CompactRootMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompactRootMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompactRootMargin()); return S_OK; } catch (...) @@ -171,7 +177,8 @@ struct produceshim().MinimalVerticalDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimalVerticalDelta()); return S_OK; } catch (...) @@ -180,11 +187,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_MinimalRootMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinimalRootMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimalRootMargin()); return S_OK; } catch (...) @@ -197,7 +205,8 @@ struct produceshim().HiddenVerticalDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HiddenVerticalDelta()); return S_OK; } catch (...) @@ -206,11 +215,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HiddenRootMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HiddenRootMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HiddenRootMargin()); return S_OK; } catch (...) @@ -227,7 +237,8 @@ struct produce : produc { try { - *value = detach(this->shim().ClickMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClickMode()); return S_OK; } catch (...) @@ -240,6 +251,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ClickMode(value); return S_OK; } @@ -253,7 +265,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsPointerOver()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPointerOver()); return S_OK; } catch (...) @@ -266,7 +279,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsPressed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPressed()); return S_OK; } catch (...) @@ -275,11 +289,12 @@ struct produce : produc } } - HRESULT __stdcall get_Command(abi_arg_out value) noexcept override + HRESULT __stdcall get_Command(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Command()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Command()); return S_OK; } catch (...) @@ -289,10 +304,11 @@ struct produce : produc } } - HRESULT __stdcall put_Command(abi_arg_in value) noexcept override + HRESULT __stdcall put_Command(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Command(*reinterpret_cast(&value)); return S_OK; } @@ -302,11 +318,12 @@ struct produce : produc } } - HRESULT __stdcall get_CommandParameter(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandParameter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandParameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandParameter()); return S_OK; } catch (...) @@ -316,11 +333,12 @@ struct produce : produc } } - HRESULT __stdcall put_CommandParameter(abi_arg_in value) noexcept override + HRESULT __stdcall put_CommandParameter(impl::abi_arg_in value) noexcept override { try { - this->shim().CommandParameter(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().CommandParameter(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -329,11 +347,12 @@ struct produce : produc } } - HRESULT __stdcall add_Click(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_Click(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Click(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Click(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -346,6 +365,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Click(token); return S_OK; } @@ -359,11 +379,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -378,11 +399,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ClickModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClickModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClickModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClickModeProperty()); return S_OK; } catch (...) @@ -392,11 +414,12 @@ struct produce : } } - HRESULT __stdcall get_IsPointerOverProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPointerOverProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPointerOverProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPointerOverProperty()); return S_OK; } catch (...) @@ -406,11 +429,12 @@ struct produce : } } - HRESULT __stdcall get_IsPressedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPressedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPressedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPressedProperty()); return S_OK; } catch (...) @@ -420,11 +444,12 @@ struct produce : } } - HRESULT __stdcall get_CommandProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandProperty()); return S_OK; } catch (...) @@ -434,11 +459,12 @@ struct produce : } } - HRESULT __stdcall get_CommandParameterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandParameterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandParameterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandParameterProperty()); return S_OK; } catch (...) @@ -460,7 +486,8 @@ struct produceshim().MinViewWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinViewWidth()); return S_OK; } catch (...) @@ -469,11 +496,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderText()); return S_OK; } catch (...) @@ -483,11 +511,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay1(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay1()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay1()); return S_OK; } catch (...) @@ -497,11 +526,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay2(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay2()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay2()); return S_OK; } catch (...) @@ -511,11 +541,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay3(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay3()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay3()); return S_OK; } catch (...) @@ -525,11 +556,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay4(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay4()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay4()); return S_OK; } catch (...) @@ -539,11 +571,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay5(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay5()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay5()); return S_OK; } catch (...) @@ -553,11 +586,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay6(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay6()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay6()); return S_OK; } catch (...) @@ -567,11 +601,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_WeekDay7(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WeekDay7()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WeekDay7()); return S_OK; } catch (...) @@ -585,7 +620,8 @@ struct produceshim().HasMoreContentAfter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasMoreContentAfter()); return S_OK; } catch (...) @@ -598,7 +634,8 @@ struct produceshim().HasMoreContentBefore()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasMoreContentBefore()); return S_OK; } catch (...) @@ -611,7 +648,8 @@ struct produceshim().HasMoreViews()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasMoreViews()); return S_OK; } catch (...) @@ -620,11 +658,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ClipRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClipRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClipRect()); return S_OK; } catch (...) @@ -637,7 +676,8 @@ struct produceshim().CenterX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterX()); return S_OK; } catch (...) @@ -650,7 +690,8 @@ struct produceshim().CenterY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CenterY()); return S_OK; } catch (...) @@ -667,7 +708,8 @@ struct produce : pro { try { - *value = detach(this->shim().CanVerticallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanVerticallyScroll()); return S_OK; } catch (...) @@ -680,6 +722,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().CanVerticallyScroll(value); return S_OK; } @@ -693,7 +736,8 @@ struct produce : pro { try { - *value = detach(this->shim().CanHorizontallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanHorizontallyScroll()); return S_OK; } catch (...) @@ -706,6 +750,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().CanHorizontallyScroll(value); return S_OK; } @@ -719,7 +764,8 @@ struct produce : pro { try { - *value = detach(this->shim().ExtentWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentWidth()); return S_OK; } catch (...) @@ -732,7 +778,8 @@ struct produce : pro { try { - *value = detach(this->shim().ExtentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentHeight()); return S_OK; } catch (...) @@ -745,7 +792,8 @@ struct produce : pro { try { - *value = detach(this->shim().ViewportWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportWidth()); return S_OK; } catch (...) @@ -758,7 +806,8 @@ struct produce : pro { try { - *value = detach(this->shim().ViewportHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportHeight()); return S_OK; } catch (...) @@ -771,7 +820,8 @@ struct produce : pro { try { - *value = detach(this->shim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -784,7 +834,8 @@ struct produce : pro { try { - *value = detach(this->shim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -793,11 +844,12 @@ struct produce : pro } } - HRESULT __stdcall get_ScrollOwner(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScrollOwner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollOwner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollOwner()); return S_OK; } catch (...) @@ -807,11 +859,12 @@ struct produce : pro } } - HRESULT __stdcall put_ScrollOwner(abi_arg_in value) noexcept override + HRESULT __stdcall put_ScrollOwner(impl::abi_arg_in value) noexcept override { try { - this->shim().ScrollOwner(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollOwner(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -824,6 +877,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().LineUp(); return S_OK; } @@ -837,6 +891,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().LineDown(); return S_OK; } @@ -850,6 +905,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().LineLeft(); return S_OK; } @@ -863,6 +919,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().LineRight(); return S_OK; } @@ -876,6 +933,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().PageUp(); return S_OK; } @@ -889,6 +947,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().PageDown(); return S_OK; } @@ -902,6 +961,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().PageLeft(); return S_OK; } @@ -915,6 +975,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().PageRight(); return S_OK; } @@ -928,6 +989,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelUp(); return S_OK; } @@ -941,6 +1003,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelDown(); return S_OK; } @@ -954,6 +1017,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelLeft(); return S_OK; } @@ -967,6 +1031,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelRight(); return S_OK; } @@ -980,6 +1045,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHorizontalOffset(offset); return S_OK; } @@ -993,6 +1059,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVerticalOffset(offset); return S_OK; } @@ -1002,11 +1069,12 @@ struct produce : pro } } - HRESULT __stdcall abi_MakeVisible(abi_arg_in visual, abi_arg_in rectangle, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_MakeVisible(impl::abi_arg_in visual, impl::abi_arg_in rectangle, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); return S_OK; } catch (...) @@ -1019,11 +1087,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1042,7 +1111,8 @@ struct produceshim().DropDownOpenedHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropDownOpenedHeight()); return S_OK; } catch (...) @@ -1055,7 +1125,8 @@ struct produceshim().DropDownClosedHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropDownClosedHeight()); return S_OK; } catch (...) @@ -1068,7 +1139,8 @@ struct produceshim().DropDownOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropDownOffset()); return S_OK; } catch (...) @@ -1081,7 +1153,8 @@ struct produceshim().SelectedItemDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItemDirection()); return S_OK; } catch (...) @@ -1098,7 +1171,8 @@ struct produceshim().DropDownContentMinWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropDownContentMinWidth()); return S_OK; } catch (...) @@ -1115,7 +1189,8 @@ struct produceshim().ContentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentHeight()); return S_OK; } catch (...) @@ -1124,11 +1199,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OverflowContentClipRect(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowContentClipRect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentClipRect()); return S_OK; } catch (...) @@ -1141,7 +1217,8 @@ struct produceshim().OverflowContentMinWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentMinWidth()); return S_OK; } catch (...) @@ -1154,7 +1231,8 @@ struct produceshim().OverflowContentMaxHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentMaxHeight()); return S_OK; } catch (...) @@ -1167,7 +1245,8 @@ struct produceshim().OverflowContentHorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentHorizontalOffset()); return S_OK; } catch (...) @@ -1180,7 +1259,8 @@ struct produceshim().OverflowContentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentHeight()); return S_OK; } catch (...) @@ -1193,7 +1273,8 @@ struct produceshim().NegativeOverflowContentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NegativeOverflowContentHeight()); return S_OK; } catch (...) @@ -1210,7 +1291,8 @@ struct produceshim().OverflowContentMaxWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentMaxWidth()); return S_OK; } catch (...) @@ -1227,7 +1309,8 @@ struct produceshim().EffectiveOverflowButtonVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EffectiveOverflowButtonVisibility()); return S_OK; } catch (...) @@ -1244,7 +1327,8 @@ struct produceshim().HorizontalChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChange()); return S_OK; } catch (...) @@ -1257,7 +1341,8 @@ struct produceshim().VerticalChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChange()); return S_OK; } catch (...) @@ -1270,7 +1355,8 @@ struct produceshim().Canceled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Canceled()); return S_OK; } catch (...) @@ -1283,11 +1369,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1306,7 +1393,8 @@ struct produce { try { - *value = detach(this->shim().HorizontalChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChange()); return S_OK; } catch (...) @@ -1319,7 +1407,8 @@ struct produce { try { - *value = detach(this->shim().VerticalChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChange()); return S_OK; } catch (...) @@ -1332,11 +1421,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1355,7 +1445,8 @@ struct produceshim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -1368,7 +1459,8 @@ struct produceshim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -1381,11 +1473,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1404,7 +1497,8 @@ struct produce : produc { try { - *value = detach(this->shim().Placement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Placement()); return S_OK; } catch (...) @@ -1417,6 +1511,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Placement(value); return S_OK; } @@ -1426,11 +1521,12 @@ struct produce : produc } } - HRESULT __stdcall add_Opened(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1443,6 +1539,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Opened(token); return S_OK; } @@ -1452,11 +1549,12 @@ struct produce : produc } } - HRESULT __stdcall add_Closed(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1469,6 +1567,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Closed(token); return S_OK; } @@ -1478,11 +1577,12 @@ struct produce : produc } } - HRESULT __stdcall add_Opening(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Opening(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opening(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opening(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1495,6 +1595,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Opening(token); return S_OK; } @@ -1504,10 +1605,11 @@ struct produce : produc } } - HRESULT __stdcall abi_ShowAt(abi_arg_in placementTarget) noexcept override + HRESULT __stdcall abi_ShowAt(impl::abi_arg_in placementTarget) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowAt(*reinterpret_cast(&placementTarget)); return S_OK; } @@ -1521,6 +1623,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Hide(); return S_OK; } @@ -1534,11 +1637,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Target(abi_arg_out value) noexcept override + HRESULT __stdcall get_Target(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Target()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Target()); return S_OK; } catch (...) @@ -1552,7 +1656,8 @@ struct produce : produ { try { - *value = detach(this->shim().AllowFocusOnInteraction()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowFocusOnInteraction()); return S_OK; } catch (...) @@ -1565,6 +1670,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowFocusOnInteraction(value); return S_OK; } @@ -1578,7 +1684,8 @@ struct produce : produ { try { - *value = detach(this->shim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -1591,6 +1698,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -1604,7 +1712,8 @@ struct produce : produ { try { - *value = detach(this->shim().AllowFocusWhenDisabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowFocusWhenDisabled()); return S_OK; } catch (...) @@ -1617,6 +1726,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowFocusWhenDisabled(value); return S_OK; } @@ -1630,7 +1740,8 @@ struct produce : produ { try { - *value = detach(this->shim().ElementSoundMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementSoundMode()); return S_OK; } catch (...) @@ -1643,6 +1754,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ElementSoundMode(value); return S_OK; } @@ -1652,11 +1764,12 @@ struct produce : produ } } - HRESULT __stdcall add_Closing(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Closing(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closing(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closing(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1669,6 +1782,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().Closing(token); return S_OK; } @@ -1686,7 +1800,8 @@ struct produceshim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -1699,6 +1814,7 @@ struct produceshim()); this->shim().Cancel(value); return S_OK; } @@ -1712,11 +1828,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1731,11 +1848,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreatePresenter(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreatePresenter(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreatePresenter()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreatePresenter()); return S_OK; } catch (...) @@ -1749,11 +1867,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_PlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementProperty()); return S_OK; } catch (...) @@ -1763,11 +1882,12 @@ struct produce : } } - HRESULT __stdcall get_AttachedFlyoutProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AttachedFlyoutProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AttachedFlyoutProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AttachedFlyoutProperty()); return S_OK; } catch (...) @@ -1777,11 +1897,12 @@ struct produce : } } - HRESULT __stdcall abi_GetAttachedFlyout(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAttachedFlyout(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAttachedFlyout(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAttachedFlyout(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -1791,10 +1912,11 @@ struct produce : } } - HRESULT __stdcall abi_SetAttachedFlyout(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAttachedFlyout(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAttachedFlyout(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -1804,10 +1926,11 @@ struct produce : } } - HRESULT __stdcall abi_ShowAttachedFlyout(abi_arg_in flyoutOwner) noexcept override + HRESULT __stdcall abi_ShowAttachedFlyout(impl::abi_arg_in flyoutOwner) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowAttachedFlyout(*reinterpret_cast(&flyoutOwner)); return S_OK; } @@ -1821,11 +1944,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_AllowFocusOnInteractionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AllowFocusOnInteractionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllowFocusOnInteractionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowFocusOnInteractionProperty()); return S_OK; } catch (...) @@ -1835,11 +1959,12 @@ struct produce } } - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -1849,11 +1974,12 @@ struct produce } } - HRESULT __stdcall get_AllowFocusWhenDisabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AllowFocusWhenDisabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllowFocusWhenDisabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowFocusWhenDisabledProperty()); return S_OK; } catch (...) @@ -1863,11 +1989,12 @@ struct produce } } - HRESULT __stdcall get_ElementSoundModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ElementSoundModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ElementSoundModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementSoundModeProperty()); return S_OK; } catch (...) @@ -1885,11 +2012,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_FromIndexAndOffset(int32_t index, int32_t offset, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_FromIndexAndOffset(int32_t index, int32_t offset, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().FromIndexAndOffset(index, offset)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().FromIndexAndOffset(index, offset)); return S_OK; } catch (...) @@ -1906,7 +2034,8 @@ struct produceshim().SelectionCheckMarkVisualEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionCheckMarkVisualEnabled()); return S_OK; } catch (...) @@ -1919,6 +2048,7 @@ struct produceshim()); this->shim().SelectionCheckMarkVisualEnabled(value); return S_OK; } @@ -1928,11 +2058,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckHintBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckHintBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckHintBrush()); return S_OK; } catch (...) @@ -1942,10 +2073,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckHintBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckHintBrush(*reinterpret_cast(&value)); return S_OK; } @@ -1955,11 +2087,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckSelectingBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckSelectingBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckSelectingBrush()); return S_OK; } catch (...) @@ -1969,10 +2102,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckSelectingBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckSelectingBrush(*reinterpret_cast(&value)); return S_OK; } @@ -1982,11 +2116,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBrush()); return S_OK; } catch (...) @@ -1996,10 +2131,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckBrush(*reinterpret_cast(&value)); return S_OK; } @@ -2009,11 +2145,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragBackground()); return S_OK; } catch (...) @@ -2023,10 +2160,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DragBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DragBackground(*reinterpret_cast(&value)); return S_OK; } @@ -2036,11 +2174,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragForeground()); return S_OK; } catch (...) @@ -2050,10 +2189,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DragForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DragForeground(*reinterpret_cast(&value)); return S_OK; } @@ -2063,11 +2203,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrush()); return S_OK; } catch (...) @@ -2077,10 +2218,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FocusBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FocusBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -2090,11 +2232,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PlaceholderBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderBackground()); return S_OK; } catch (...) @@ -2104,10 +2247,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PlaceholderBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderBackground(*reinterpret_cast(&value)); return S_OK; } @@ -2117,11 +2261,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackground()); return S_OK; } catch (...) @@ -2131,10 +2276,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerOverBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerOverBackground(*reinterpret_cast(&value)); return S_OK; } @@ -2144,11 +2290,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBackground()); return S_OK; } catch (...) @@ -2158,10 +2305,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBackground(*reinterpret_cast(&value)); return S_OK; } @@ -2171,11 +2319,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForeground()); return S_OK; } catch (...) @@ -2185,10 +2334,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedForeground(*reinterpret_cast(&value)); return S_OK; } @@ -2198,11 +2348,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBackground()); return S_OK; } catch (...) @@ -2212,10 +2363,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedPointerOverBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPointerOverBackground(*reinterpret_cast(&value)); return S_OK; } @@ -2225,11 +2377,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBorderBrush()); return S_OK; } catch (...) @@ -2239,10 +2392,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedPointerOverBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPointerOverBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -2252,11 +2406,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderThickness()); return S_OK; } catch (...) @@ -2265,10 +2420,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedBorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -2282,7 +2438,8 @@ struct produceshim().DisabledOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledOpacity()); return S_OK; } catch (...) @@ -2295,6 +2452,7 @@ struct produceshim()); this->shim().DisabledOpacity(value); return S_OK; } @@ -2308,7 +2466,8 @@ struct produceshim().DragOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragOpacity()); return S_OK; } catch (...) @@ -2321,6 +2480,7 @@ struct produceshim()); this->shim().DragOpacity(value); return S_OK; } @@ -2334,7 +2494,8 @@ struct produceshim().ReorderHintOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderHintOffset()); return S_OK; } catch (...) @@ -2347,6 +2508,7 @@ struct produceshim()); this->shim().ReorderHintOffset(value); return S_OK; } @@ -2360,7 +2522,8 @@ struct produceshim().GridViewItemPresenterHorizontalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterHorizontalContentAlignment()); return S_OK; } catch (...) @@ -2373,6 +2536,7 @@ struct produceshim()); this->shim().GridViewItemPresenterHorizontalContentAlignment(value); return S_OK; } @@ -2386,7 +2550,8 @@ struct produceshim().GridViewItemPresenterVerticalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterVerticalContentAlignment()); return S_OK; } catch (...) @@ -2399,6 +2564,7 @@ struct produceshim()); this->shim().GridViewItemPresenterVerticalContentAlignment(value); return S_OK; } @@ -2408,11 +2574,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GridViewItemPresenterPadding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GridViewItemPresenterPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterPadding()); return S_OK; } catch (...) @@ -2421,10 +2588,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_GridViewItemPresenterPadding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GridViewItemPresenterPadding(*reinterpret_cast(&value)); return S_OK; } @@ -2434,11 +2602,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundMargin()); return S_OK; } catch (...) @@ -2447,10 +2616,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerOverBackgroundMargin(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerOverBackgroundMargin(*reinterpret_cast(&value)); return S_OK; } @@ -2460,11 +2630,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentMargin()); return S_OK; } catch (...) @@ -2473,10 +2644,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentMargin(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentMargin(*reinterpret_cast(&value)); return S_OK; } @@ -2490,11 +2662,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2509,11 +2682,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SelectionCheckMarkVisualEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionCheckMarkVisualEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionCheckMarkVisualEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionCheckMarkVisualEnabledProperty()); return S_OK; } catch (...) @@ -2523,11 +2697,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckHintBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckHintBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckHintBrushProperty()); return S_OK; } catch (...) @@ -2537,11 +2712,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckSelectingBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckSelectingBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckSelectingBrushProperty()); return S_OK; } catch (...) @@ -2551,11 +2727,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBrushProperty()); return S_OK; } catch (...) @@ -2565,11 +2742,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragBackgroundProperty()); return S_OK; } catch (...) @@ -2579,11 +2757,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragForegroundProperty()); return S_OK; } catch (...) @@ -2593,11 +2772,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrushProperty()); return S_OK; } catch (...) @@ -2607,11 +2787,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PlaceholderBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderBackgroundProperty()); return S_OK; } catch (...) @@ -2621,11 +2802,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundProperty()); return S_OK; } catch (...) @@ -2635,11 +2817,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBackgroundProperty()); return S_OK; } catch (...) @@ -2649,11 +2832,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForegroundProperty()); return S_OK; } catch (...) @@ -2663,11 +2847,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBackgroundProperty()); return S_OK; } catch (...) @@ -2677,11 +2862,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBorderBrushProperty()); return S_OK; } catch (...) @@ -2691,11 +2877,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderThicknessProperty()); return S_OK; } catch (...) @@ -2705,11 +2892,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisabledOpacityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisabledOpacityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledOpacityProperty()); return S_OK; } catch (...) @@ -2719,11 +2907,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragOpacityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragOpacityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragOpacityProperty()); return S_OK; } catch (...) @@ -2733,11 +2922,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReorderHintOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReorderHintOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderHintOffsetProperty()); return S_OK; } catch (...) @@ -2747,11 +2937,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GridViewItemPresenterHorizontalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GridViewItemPresenterHorizontalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterHorizontalContentAlignmentProperty()); return S_OK; } catch (...) @@ -2761,11 +2952,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GridViewItemPresenterVerticalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GridViewItemPresenterVerticalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterVerticalContentAlignmentProperty()); return S_OK; } catch (...) @@ -2775,11 +2967,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_GridViewItemPresenterPaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GridViewItemPresenterPaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GridViewItemPresenterPaddingProperty()); return S_OK; } catch (...) @@ -2789,11 +2982,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundMarginProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundMarginProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundMarginProperty()); return S_OK; } catch (...) @@ -2803,11 +2997,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentMarginProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentMarginProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentMarginProperty()); return S_OK; } catch (...) @@ -2825,7 +3020,8 @@ struct produceshim().DragItemsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragItemsCount()); return S_OK; } catch (...) @@ -2842,7 +3038,8 @@ struct produceshim().Action()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Action()); return S_OK; } catch (...) @@ -2851,11 +3048,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -2864,11 +3062,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OldPosition(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldPosition()); return S_OK; } catch (...) @@ -2881,7 +3080,8 @@ struct produceshim().ItemCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemCount()); return S_OK; } catch (...) @@ -2894,7 +3094,8 @@ struct produceshim().ItemUICount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemUICount()); return S_OK; } catch (...) @@ -2907,11 +3108,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Enabled(abi_arg_out value) noexcept override + HRESULT __stdcall get_Enabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -2921,10 +3123,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Enabled(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(*reinterpret_cast(&value)); return S_OK; } @@ -2934,11 +3137,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Disabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Disabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Disabled()); return S_OK; } catch (...) @@ -2948,10 +3152,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Disabled(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Disabled(*reinterpret_cast(&value)); return S_OK; } @@ -2965,11 +3170,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnabledProperty()); return S_OK; } catch (...) @@ -2979,11 +3185,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledProperty()); return S_OK; } catch (...) @@ -2997,11 +3204,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Enabled(abi_arg_out value) noexcept override + HRESULT __stdcall get_Enabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Enabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Enabled()); return S_OK; } catch (...) @@ -3011,10 +3219,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Enabled(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Enabled(*reinterpret_cast(&value)); return S_OK; } @@ -3024,11 +3233,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Disabled(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Disabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Disabled()); return S_OK; } catch (...) @@ -3038,10 +3248,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_Disabled(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Disabled(*reinterpret_cast(&value)); return S_OK; } @@ -3055,11 +3266,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_EnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_EnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EnabledProperty()); return S_OK; } catch (...) @@ -3069,11 +3281,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledProperty()); return S_OK; } catch (...) @@ -3091,11 +3304,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_GetLayoutExceptionElement(abi_arg_in dispatcher, abi_arg_out element) noexcept override + HRESULT __stdcall abi_GetLayoutExceptionElement(impl::abi_arg_in dispatcher, impl::abi_arg_out element) noexcept override { try { - *element = detach(this->shim().GetLayoutExceptionElement(*reinterpret_cast(&dispatcher))); + typename D::abi_guard guard(this->shim()); + *element = detach_abi(this->shim().GetLayoutExceptionElement(*reinterpret_cast(&dispatcher))); return S_OK; } catch (...) @@ -3105,11 +3319,12 @@ struct produce element, abi_arg_out slot) noexcept override + HRESULT __stdcall abi_GetLayoutSlot(impl::abi_arg_in element, impl::abi_arg_out slot) noexcept override { try { - *slot = detach(this->shim().GetLayoutSlot(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *slot = detach_abi(this->shim().GetLayoutSlot(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -3126,7 +3341,8 @@ struct produceshim().SelectionCheckMarkVisualEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionCheckMarkVisualEnabled()); return S_OK; } catch (...) @@ -3139,6 +3355,7 @@ struct produceshim()); this->shim().SelectionCheckMarkVisualEnabled(value); return S_OK; } @@ -3148,11 +3365,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckHintBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckHintBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckHintBrush()); return S_OK; } catch (...) @@ -3162,10 +3380,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckHintBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckHintBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3175,11 +3394,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckSelectingBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckSelectingBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckSelectingBrush()); return S_OK; } catch (...) @@ -3189,10 +3409,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckSelectingBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckSelectingBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3202,11 +3423,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBrush()); return S_OK; } catch (...) @@ -3216,10 +3438,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3229,11 +3452,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragBackground()); return S_OK; } catch (...) @@ -3243,10 +3467,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DragBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DragBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3256,11 +3481,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragForeground()); return S_OK; } catch (...) @@ -3270,10 +3496,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DragForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DragForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3283,11 +3510,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrush()); return S_OK; } catch (...) @@ -3297,10 +3525,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FocusBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FocusBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3310,11 +3539,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PlaceholderBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderBackground()); return S_OK; } catch (...) @@ -3324,10 +3554,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PlaceholderBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3337,11 +3568,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackground()); return S_OK; } catch (...) @@ -3351,10 +3583,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerOverBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerOverBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3364,11 +3597,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBackground()); return S_OK; } catch (...) @@ -3378,10 +3612,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3391,11 +3626,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForeground()); return S_OK; } catch (...) @@ -3405,10 +3641,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3418,11 +3655,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBackground()); return S_OK; } catch (...) @@ -3432,10 +3670,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedPointerOverBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPointerOverBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3445,11 +3684,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBorderBrush()); return S_OK; } catch (...) @@ -3459,10 +3699,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedPointerOverBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPointerOverBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3472,11 +3713,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderThickness()); return S_OK; } catch (...) @@ -3485,10 +3727,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedBorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -3502,7 +3745,8 @@ struct produceshim().DisabledOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledOpacity()); return S_OK; } catch (...) @@ -3515,6 +3759,7 @@ struct produceshim()); this->shim().DisabledOpacity(value); return S_OK; } @@ -3528,7 +3773,8 @@ struct produceshim().DragOpacity()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragOpacity()); return S_OK; } catch (...) @@ -3541,6 +3787,7 @@ struct produceshim()); this->shim().DragOpacity(value); return S_OK; } @@ -3554,7 +3801,8 @@ struct produceshim().ReorderHintOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderHintOffset()); return S_OK; } catch (...) @@ -3567,6 +3815,7 @@ struct produceshim()); this->shim().ReorderHintOffset(value); return S_OK; } @@ -3580,7 +3829,8 @@ struct produceshim().ListViewItemPresenterHorizontalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterHorizontalContentAlignment()); return S_OK; } catch (...) @@ -3593,6 +3843,7 @@ struct produceshim()); this->shim().ListViewItemPresenterHorizontalContentAlignment(value); return S_OK; } @@ -3606,7 +3857,8 @@ struct produceshim().ListViewItemPresenterVerticalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterVerticalContentAlignment()); return S_OK; } catch (...) @@ -3619,6 +3871,7 @@ struct produceshim()); this->shim().ListViewItemPresenterVerticalContentAlignment(value); return S_OK; } @@ -3628,11 +3881,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ListViewItemPresenterPadding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ListViewItemPresenterPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterPadding()); return S_OK; } catch (...) @@ -3641,10 +3895,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ListViewItemPresenterPadding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ListViewItemPresenterPadding(*reinterpret_cast(&value)); return S_OK; } @@ -3654,11 +3909,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundMargin()); return S_OK; } catch (...) @@ -3667,10 +3923,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerOverBackgroundMargin(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerOverBackgroundMargin(*reinterpret_cast(&value)); return S_OK; } @@ -3680,11 +3937,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentMargin(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentMargin()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentMargin()); return S_OK; } catch (...) @@ -3693,10 +3951,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_ContentMargin(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentMargin(*reinterpret_cast(&value)); return S_OK; } @@ -3710,11 +3969,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SelectedPressedBackground(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedPressedBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPressedBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPressedBackground()); return S_OK; } catch (...) @@ -3724,10 +3984,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SelectedPressedBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPressedBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3737,11 +3998,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PressedBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedBackground()); return S_OK; } catch (...) @@ -3751,10 +4013,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PressedBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PressedBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3764,11 +4027,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBoxBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBoxBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBoxBrush()); return S_OK; } catch (...) @@ -3778,10 +4042,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_CheckBoxBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CheckBoxBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3791,11 +4056,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusSecondaryBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusSecondaryBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusSecondaryBorderBrush()); return S_OK; } catch (...) @@ -3805,10 +4071,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_FocusSecondaryBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FocusSecondaryBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3822,7 +4089,8 @@ struct produceshim().CheckMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckMode()); return S_OK; } catch (...) @@ -3835,6 +4103,7 @@ struct produceshim()); this->shim().CheckMode(value); return S_OK; } @@ -3844,11 +4113,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverForeground()); return S_OK; } catch (...) @@ -3858,10 +4128,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_PointerOverForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PointerOverForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3875,11 +4146,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -3894,11 +4166,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SelectionCheckMarkVisualEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionCheckMarkVisualEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionCheckMarkVisualEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionCheckMarkVisualEnabledProperty()); return S_OK; } catch (...) @@ -3908,11 +4181,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckHintBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckHintBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckHintBrushProperty()); return S_OK; } catch (...) @@ -3922,11 +4196,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckSelectingBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckSelectingBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckSelectingBrushProperty()); return S_OK; } catch (...) @@ -3936,11 +4211,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBrushProperty()); return S_OK; } catch (...) @@ -3950,11 +4226,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragBackgroundProperty()); return S_OK; } catch (...) @@ -3964,11 +4241,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragForegroundProperty()); return S_OK; } catch (...) @@ -3978,11 +4256,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrushProperty()); return S_OK; } catch (...) @@ -3992,11 +4271,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PlaceholderBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderBackgroundProperty()); return S_OK; } catch (...) @@ -4006,11 +4286,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundProperty()); return S_OK; } catch (...) @@ -4020,11 +4301,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBackgroundProperty()); return S_OK; } catch (...) @@ -4034,11 +4316,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForegroundProperty()); return S_OK; } catch (...) @@ -4048,11 +4331,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBackgroundProperty()); return S_OK; } catch (...) @@ -4062,11 +4346,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedPointerOverBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPointerOverBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPointerOverBorderBrushProperty()); return S_OK; } catch (...) @@ -4076,11 +4361,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedBorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderThicknessProperty()); return S_OK; } catch (...) @@ -4090,11 +4376,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DisabledOpacityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisabledOpacityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisabledOpacityProperty()); return S_OK; } catch (...) @@ -4104,11 +4391,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DragOpacityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DragOpacityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragOpacityProperty()); return S_OK; } catch (...) @@ -4118,11 +4406,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ReorderHintOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReorderHintOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderHintOffsetProperty()); return S_OK; } catch (...) @@ -4132,11 +4421,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ListViewItemPresenterHorizontalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ListViewItemPresenterHorizontalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterHorizontalContentAlignmentProperty()); return S_OK; } catch (...) @@ -4146,11 +4436,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ListViewItemPresenterVerticalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ListViewItemPresenterVerticalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterVerticalContentAlignmentProperty()); return S_OK; } catch (...) @@ -4160,11 +4451,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ListViewItemPresenterPaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ListViewItemPresenterPaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ListViewItemPresenterPaddingProperty()); return S_OK; } catch (...) @@ -4174,11 +4466,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverBackgroundMarginProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverBackgroundMarginProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverBackgroundMarginProperty()); return S_OK; } catch (...) @@ -4188,11 +4481,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ContentMarginProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentMarginProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentMarginProperty()); return S_OK; } catch (...) @@ -4206,11 +4500,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SelectedPressedBackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedPressedBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPressedBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPressedBackgroundProperty()); return S_OK; } catch (...) @@ -4220,11 +4515,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PressedBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedBackgroundProperty()); return S_OK; } catch (...) @@ -4234,11 +4530,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckBoxBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckBoxBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckBoxBrushProperty()); return S_OK; } catch (...) @@ -4248,11 +4545,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FocusSecondaryBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusSecondaryBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusSecondaryBorderBrushProperty()); return S_OK; } catch (...) @@ -4262,11 +4560,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CheckModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CheckModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CheckModeProperty()); return S_OK; } catch (...) @@ -4276,11 +4575,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_PointerOverForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PointerOverForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PointerOverForegroundProperty()); return S_OK; } catch (...) @@ -4298,7 +4598,8 @@ struct produceshim().DragItemsCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DragItemsCount()); return S_OK; } catch (...) @@ -4315,7 +4616,8 @@ struct produce : p { try { - *value = detach(this->shim().ShouldLoop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldLoop()); return S_OK; } catch (...) @@ -4328,6 +4630,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ShouldLoop(value); return S_OK; } @@ -4337,11 +4640,12 @@ struct produce : p } } - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -4351,11 +4655,12 @@ struct produce : p } } - HRESULT __stdcall put_Items(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Items(impl::abi_arg_in> value) noexcept override { try { - this->shim().Items(*reinterpret_cast *>(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Items(*reinterpret_cast *>(&value)); return S_OK; } catch (...) @@ -4368,7 +4673,8 @@ struct produce : p { try { - *value = detach(this->shim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -4381,6 +4687,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedIndex(value); return S_OK; } @@ -4390,11 +4697,12 @@ struct produce : p } } - HRESULT __stdcall get_SelectedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -4404,11 +4712,12 @@ struct produce : p } } - HRESULT __stdcall put_SelectedItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedItem(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedItem(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedItem(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -4421,7 +4730,8 @@ struct produce : p { try { - *value = detach(this->shim().ItemWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidth()); return S_OK; } catch (...) @@ -4434,6 +4744,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemWidth(value); return S_OK; } @@ -4447,7 +4758,8 @@ struct produce : p { try { - *value = detach(this->shim().ItemHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeight()); return S_OK; } catch (...) @@ -4460,6 +4772,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemHeight(value); return S_OK; } @@ -4469,11 +4782,12 @@ struct produce : p } } - HRESULT __stdcall get_ItemTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplate()); return S_OK; } catch (...) @@ -4483,10 +4797,11 @@ struct produce : p } } - HRESULT __stdcall put_ItemTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -4496,11 +4811,12 @@ struct produce : p } } - HRESULT __stdcall add_SelectionChanged(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -4513,6 +4829,7 @@ struct produce : p { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionChanged(token); return S_OK; } @@ -4534,11 +4851,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ShouldLoopProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShouldLoopProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShouldLoopProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShouldLoopProperty()); return S_OK; } catch (...) @@ -4548,11 +4866,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsProperty()); return S_OK; } catch (...) @@ -4562,11 +4881,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndexProperty()); return S_OK; } catch (...) @@ -4576,11 +4896,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SelectedItemProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItemProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItemProperty()); return S_OK; } catch (...) @@ -4590,11 +4911,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidthProperty()); return S_OK; } catch (...) @@ -4604,11 +4926,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeightProperty()); return S_OK; } catch (...) @@ -4618,11 +4941,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ItemTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateProperty()); return S_OK; } catch (...) @@ -4640,7 +4964,8 @@ struct produceshim().FlyoutContentMinWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlyoutContentMinWidth()); return S_OK; } catch (...) @@ -4657,7 +4982,8 @@ struct produceshim().CanVerticallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanVerticallyScroll()); return S_OK; } catch (...) @@ -4670,6 +4996,7 @@ struct produceshim()); this->shim().CanVerticallyScroll(value); return S_OK; } @@ -4683,7 +5010,8 @@ struct produceshim().CanHorizontallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanHorizontallyScroll()); return S_OK; } catch (...) @@ -4696,6 +5024,7 @@ struct produceshim()); this->shim().CanHorizontallyScroll(value); return S_OK; } @@ -4709,7 +5038,8 @@ struct produceshim().ExtentWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentWidth()); return S_OK; } catch (...) @@ -4722,7 +5052,8 @@ struct produceshim().ExtentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentHeight()); return S_OK; } catch (...) @@ -4735,7 +5066,8 @@ struct produceshim().ViewportWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportWidth()); return S_OK; } catch (...) @@ -4748,7 +5080,8 @@ struct produceshim().ViewportHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportHeight()); return S_OK; } catch (...) @@ -4761,7 +5094,8 @@ struct produceshim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -4774,7 +5108,8 @@ struct produceshim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -4783,11 +5118,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ScrollOwner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollOwner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollOwner()); return S_OK; } catch (...) @@ -4797,11 +5133,12 @@ struct produce value) noexcept override + HRESULT __stdcall put_ScrollOwner(impl::abi_arg_in value) noexcept override { try { - this->shim().ScrollOwner(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollOwner(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -4814,6 +5151,7 @@ struct produceshim()); this->shim().LineUp(); return S_OK; } @@ -4827,6 +5165,7 @@ struct produceshim()); this->shim().LineDown(); return S_OK; } @@ -4840,6 +5179,7 @@ struct produceshim()); this->shim().LineLeft(); return S_OK; } @@ -4853,6 +5193,7 @@ struct produceshim()); this->shim().LineRight(); return S_OK; } @@ -4866,6 +5207,7 @@ struct produceshim()); this->shim().PageUp(); return S_OK; } @@ -4879,6 +5221,7 @@ struct produceshim()); this->shim().PageDown(); return S_OK; } @@ -4892,6 +5235,7 @@ struct produceshim()); this->shim().PageLeft(); return S_OK; } @@ -4905,6 +5249,7 @@ struct produceshim()); this->shim().PageRight(); return S_OK; } @@ -4918,6 +5263,7 @@ struct produceshim()); this->shim().MouseWheelUp(); return S_OK; } @@ -4931,6 +5277,7 @@ struct produceshim()); this->shim().MouseWheelDown(); return S_OK; } @@ -4944,6 +5291,7 @@ struct produceshim()); this->shim().MouseWheelLeft(); return S_OK; } @@ -4957,6 +5305,7 @@ struct produceshim()); this->shim().MouseWheelRight(); return S_OK; } @@ -4970,6 +5319,7 @@ struct produceshim()); this->shim().SetHorizontalOffset(offset); return S_OK; } @@ -4983,6 +5333,7 @@ struct produceshim()); this->shim().SetVerticalOffset(offset); return S_OK; } @@ -4992,11 +5343,12 @@ struct produce visual, abi_arg_in rectangle, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_MakeVisible(impl::abi_arg_in visual, impl::abi_arg_in rectangle, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); return S_OK; } catch (...) @@ -5017,11 +5369,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -5040,6 +5393,7 @@ struct produceshim()); this->shim().OnConfirmed(); return S_OK; } @@ -5053,7 +5407,8 @@ struct produceshim().ShouldShowConfirmationButtons()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShouldShowConfirmationButtons()); return S_OK; } catch (...) @@ -5066,11 +5421,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_TitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleProperty()); return S_OK; } catch (...) @@ -5080,11 +5436,12 @@ struct produce element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetTitle(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetTitle(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetTitle(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -5094,10 +5451,11 @@ struct produce element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetTitle(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetTitle(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -5115,11 +5473,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -5142,11 +5501,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Child(abi_arg_out value) noexcept override + HRESULT __stdcall get_Child(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Child()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Child()); return S_OK; } catch (...) @@ -5156,10 +5516,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Child(abi_arg_in value) noexcept override + HRESULT __stdcall put_Child(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Child(*reinterpret_cast(&value)); return S_OK; } @@ -5173,7 +5534,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpen()); return S_OK; } catch (...) @@ -5186,6 +5548,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsOpen(value); return S_OK; } @@ -5199,7 +5562,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -5212,6 +5576,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().HorizontalOffset(value); return S_OK; } @@ -5225,7 +5590,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -5238,6 +5604,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().VerticalOffset(value); return S_OK; } @@ -5247,11 +5614,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ChildTransitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ChildTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ChildTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildTransitions()); return S_OK; } catch (...) @@ -5261,10 +5629,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_ChildTransitions(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ChildTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChildTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -5278,7 +5647,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsLightDismissEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLightDismissEnabled()); return S_OK; } catch (...) @@ -5291,6 +5661,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsLightDismissEnabled(value); return S_OK; } @@ -5300,11 +5671,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_Opened(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -5317,6 +5689,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Opened(token); return S_OK; } @@ -5326,11 +5699,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_Closed(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -5343,6 +5717,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().Closed(token); return S_OK; } @@ -5360,7 +5735,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -5373,6 +5749,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -5386,11 +5763,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_ChildProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChildProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildProperty()); return S_OK; } catch (...) @@ -5400,11 +5778,12 @@ struct produce : prod } } - HRESULT __stdcall get_IsOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpenProperty()); return S_OK; } catch (...) @@ -5414,11 +5793,12 @@ struct produce : prod } } - HRESULT __stdcall get_HorizontalOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffsetProperty()); return S_OK; } catch (...) @@ -5428,11 +5808,12 @@ struct produce : prod } } - HRESULT __stdcall get_VerticalOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffsetProperty()); return S_OK; } catch (...) @@ -5442,11 +5823,12 @@ struct produce : prod } } - HRESULT __stdcall get_ChildTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChildTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildTransitionsProperty()); return S_OK; } catch (...) @@ -5456,11 +5838,12 @@ struct produce : prod } } - HRESULT __stdcall get_IsLightDismissEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsLightDismissEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsLightDismissEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLightDismissEnabledProperty()); return S_OK; } catch (...) @@ -5474,11 +5857,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -5496,7 +5880,8 @@ struct produceshim().EllipseDiameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseDiameter()); return S_OK; } catch (...) @@ -5509,7 +5894,8 @@ struct produceshim().EllipseOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseOffset()); return S_OK; } catch (...) @@ -5522,7 +5908,8 @@ struct produceshim().EllipseAnimationWellPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseAnimationWellPosition()); return S_OK; } catch (...) @@ -5535,7 +5922,8 @@ struct produceshim().EllipseAnimationEndPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseAnimationEndPosition()); return S_OK; } catch (...) @@ -5548,7 +5936,8 @@ struct produceshim().ContainerAnimationStartPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerAnimationStartPosition()); return S_OK; } catch (...) @@ -5561,7 +5950,8 @@ struct produceshim().ContainerAnimationEndPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerAnimationEndPosition()); return S_OK; } catch (...) @@ -5574,7 +5964,8 @@ struct produceshim().IndicatorLengthDelta()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndicatorLengthDelta()); return S_OK; } catch (...) @@ -5591,7 +5982,8 @@ struct produceshim().EllipseDiameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseDiameter()); return S_OK; } catch (...) @@ -5600,11 +5992,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_EllipseOffset(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().EllipseOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().EllipseOffset()); return S_OK; } catch (...) @@ -5617,7 +6010,8 @@ struct produceshim().MaxSideLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSideLength()); return S_OK; } catch (...) @@ -5634,7 +6028,8 @@ struct produce : produce { try { - *value = detach(this->shim().Minimum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Minimum()); return S_OK; } catch (...) @@ -5647,6 +6042,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Minimum(value); return S_OK; } @@ -5660,7 +6056,8 @@ struct produce : produce { try { - *value = detach(this->shim().Maximum()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Maximum()); return S_OK; } catch (...) @@ -5673,6 +6070,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Maximum(value); return S_OK; } @@ -5686,7 +6084,8 @@ struct produce : produce { try { - *value = detach(this->shim().SmallChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallChange()); return S_OK; } catch (...) @@ -5699,6 +6098,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().SmallChange(value); return S_OK; } @@ -5712,7 +6112,8 @@ struct produce : produce { try { - *value = detach(this->shim().LargeChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeChange()); return S_OK; } catch (...) @@ -5725,6 +6126,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().LargeChange(value); return S_OK; } @@ -5738,7 +6140,8 @@ struct produce : produce { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -5751,6 +6154,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Value(value); return S_OK; } @@ -5760,11 +6164,12 @@ struct produce : produce } } - HRESULT __stdcall add_ValueChanged(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_ValueChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ValueChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ValueChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -5777,6 +6182,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ValueChanged(token); return S_OK; } @@ -5790,11 +6196,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -5813,6 +6220,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OnMinimumChanged(oldMinimum, newMinimum); return S_OK; } @@ -5826,6 +6234,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OnMaximumChanged(oldMaximum, newMaximum); return S_OK; } @@ -5839,6 +6248,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OnValueChanged(oldValue, newValue); return S_OK; } @@ -5852,11 +6262,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_MinimumProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinimumProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinimumProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinimumProperty()); return S_OK; } catch (...) @@ -5866,11 +6277,12 @@ struct produce : } } - HRESULT __stdcall get_MaximumProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaximumProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumProperty()); return S_OK; } catch (...) @@ -5880,11 +6292,12 @@ struct produce : } } - HRESULT __stdcall get_SmallChangeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SmallChangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SmallChangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SmallChangeProperty()); return S_OK; } catch (...) @@ -5894,11 +6307,12 @@ struct produce : } } - HRESULT __stdcall get_LargeChangeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LargeChangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LargeChangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LargeChangeProperty()); return S_OK; } catch (...) @@ -5908,11 +6322,12 @@ struct produce : } } - HRESULT __stdcall get_ValueProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ValueProperty()); return S_OK; } catch (...) @@ -5930,7 +6345,8 @@ struct produceshim().OldValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldValue()); return S_OK; } catch (...) @@ -5943,7 +6359,8 @@ struct produceshim().NewValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewValue()); return S_OK; } catch (...) @@ -5960,7 +6377,8 @@ struct produce : prod { try { - *value = detach(this->shim().Delay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Delay()); return S_OK; } catch (...) @@ -5973,6 +6391,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Delay(value); return S_OK; } @@ -5986,7 +6405,8 @@ struct produce : prod { try { - *value = detach(this->shim().Interval()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Interval()); return S_OK; } catch (...) @@ -5999,6 +6419,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Interval(value); return S_OK; } @@ -6012,11 +6433,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_DelayProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DelayProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DelayProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DelayProperty()); return S_OK; } catch (...) @@ -6026,11 +6448,12 @@ struct produce } } - HRESULT __stdcall get_IntervalProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IntervalProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IntervalProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntervalProperty()); return S_OK; } catch (...) @@ -6048,7 +6471,8 @@ struct produce : produce { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -6061,6 +6485,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(value); return S_OK; } @@ -6074,7 +6499,8 @@ struct produce : produce { try { - *value = detach(this->shim().ViewportSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportSize()); return S_OK; } catch (...) @@ -6087,6 +6513,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ViewportSize(value); return S_OK; } @@ -6100,7 +6527,8 @@ struct produce : produce { try { - *value = detach(this->shim().IndicatorMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndicatorMode()); return S_OK; } catch (...) @@ -6113,6 +6541,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IndicatorMode(value); return S_OK; } @@ -6122,11 +6551,12 @@ struct produce : produce } } - HRESULT __stdcall add_Scroll(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_Scroll(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Scroll(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Scroll(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -6139,6 +6569,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Scroll(token); return S_OK; } @@ -6152,11 +6583,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -6166,11 +6598,12 @@ struct produce : } } - HRESULT __stdcall get_ViewportSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ViewportSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ViewportSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportSizeProperty()); return S_OK; } catch (...) @@ -6180,11 +6613,12 @@ struct produce : } } - HRESULT __stdcall get_IndicatorModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IndicatorModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IndicatorModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IndicatorModeProperty()); return S_OK; } catch (...) @@ -6202,7 +6636,8 @@ struct produce : p { try { - *value = detach(this->shim().NewValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewValue()); return S_OK; } catch (...) @@ -6215,7 +6650,8 @@ struct produce : p { try { - *value = detach(this->shim().ScrollEventType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollEventType()); return S_OK; } catch (...) @@ -6232,7 +6668,8 @@ struct produceshim().AreHorizontalSnapPointsRegular()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreHorizontalSnapPointsRegular()); return S_OK; } catch (...) @@ -6245,7 +6682,8 @@ struct produceshim().AreVerticalSnapPointsRegular()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreVerticalSnapPointsRegular()); return S_OK; } catch (...) @@ -6254,11 +6692,12 @@ struct produce> value, event_token * token) noexcept override + HRESULT __stdcall add_HorizontalSnapPointsChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().HorizontalSnapPointsChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().HorizontalSnapPointsChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -6271,6 +6710,7 @@ struct produceshim()); this->shim().HorizontalSnapPointsChanged(token); return S_OK; } @@ -6280,11 +6720,12 @@ struct produce> value, event_token * token) noexcept override + HRESULT __stdcall add_VerticalSnapPointsChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().VerticalSnapPointsChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VerticalSnapPointsChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -6297,6 +6738,7 @@ struct produceshim()); this->shim().VerticalSnapPointsChanged(token); return S_OK; } @@ -6306,11 +6748,12 @@ struct produce> returnValue) noexcept override + HRESULT __stdcall abi_GetIrregularSnapPoints(Windows::UI::Xaml::Controls::Orientation orientation, Windows::UI::Xaml::Controls::Primitives::SnapPointsAlignment alignment, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetIrregularSnapPoints(orientation, alignment)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetIrregularSnapPoints(orientation, alignment)); return S_OK; } catch (...) @@ -6324,7 +6767,8 @@ struct produceshim().GetRegularSnapPoints(orientation, alignment, *offset)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetRegularSnapPoints(orientation, alignment, *offset)); return S_OK; } catch (...) @@ -6341,7 +6785,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -6354,6 +6799,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedIndex(value); return S_OK; } @@ -6363,11 +6809,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SelectedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -6377,11 +6824,12 @@ struct produce : produce_ } } - HRESULT __stdcall put_SelectedItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedItem(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedItem(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedItem(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -6390,11 +6838,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SelectedValue(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValue()); return S_OK; } catch (...) @@ -6404,11 +6853,12 @@ struct produce : produce_ } } - HRESULT __stdcall put_SelectedValue(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedValue(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedValue(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedValue(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -6417,11 +6867,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SelectedValuePath(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValuePath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValuePath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValuePath()); return S_OK; } catch (...) @@ -6431,10 +6882,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_SelectedValuePath(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedValuePath(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedValuePath(*reinterpret_cast(&value)); return S_OK; } @@ -6444,11 +6896,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsSynchronizedWithCurrentItem(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsSynchronizedWithCurrentItem(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsSynchronizedWithCurrentItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSynchronizedWithCurrentItem()); return S_OK; } catch (...) @@ -6458,10 +6911,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_IsSynchronizedWithCurrentItem(abi_arg_in> value) noexcept override + HRESULT __stdcall put_IsSynchronizedWithCurrentItem(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSynchronizedWithCurrentItem(*reinterpret_cast *>(&value)); return S_OK; } @@ -6471,11 +6925,12 @@ struct produce : produce_ } } - HRESULT __stdcall add_SelectionChanged(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -6488,6 +6943,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionChanged(token); return S_OK; } @@ -6509,7 +6965,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsSelected()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelected()); return S_OK; } catch (...) @@ -6522,6 +6979,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSelected(value); return S_OK; } @@ -6535,11 +6993,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -6554,11 +7013,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_IsSelectedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSelectedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSelectedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectedProperty()); return S_OK; } catch (...) @@ -6572,11 +7032,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_SelectedIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndexProperty()); return S_OK; } catch (...) @@ -6586,11 +7047,12 @@ struct produce : p } } - HRESULT __stdcall get_SelectedItemProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItemProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItemProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItemProperty()); return S_OK; } catch (...) @@ -6600,11 +7062,12 @@ struct produce : p } } - HRESULT __stdcall get_SelectedValueProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValueProperty()); return S_OK; } catch (...) @@ -6614,11 +7077,12 @@ struct produce : p } } - HRESULT __stdcall get_SelectedValuePathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValuePathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValuePathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValuePathProperty()); return S_OK; } catch (...) @@ -6628,11 +7092,12 @@ struct produce : p } } - HRESULT __stdcall get_IsSynchronizedWithCurrentItemProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSynchronizedWithCurrentItemProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSynchronizedWithCurrentItemProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSynchronizedWithCurrentItemProperty()); return S_OK; } catch (...) @@ -6642,11 +7107,12 @@ struct produce : p } } - HRESULT __stdcall abi_GetIsSelectionActive(abi_arg_in element, bool * returnValue) noexcept override + HRESULT __stdcall abi_GetIsSelectionActive(impl::abi_arg_in element, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetIsSelectionActive(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetIsSelectionActive(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -6659,11 +7125,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_HeaderBackground(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderBackground()); return S_OK; } catch (...) @@ -6673,11 +7140,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_HeaderForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderForeground()); return S_OK; } catch (...) @@ -6687,11 +7155,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -6701,11 +7170,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -6714,11 +7184,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_IconSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconSource()); return S_OK; } catch (...) @@ -6728,11 +7199,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_ContentTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ContentTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTransitions()); return S_OK; } catch (...) @@ -6750,7 +7222,8 @@ struct produceshim().OpenPaneLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenPaneLength()); return S_OK; } catch (...) @@ -6763,7 +7236,8 @@ struct produceshim().NegativeOpenPaneLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NegativeOpenPaneLength()); return S_OK; } catch (...) @@ -6776,7 +7250,8 @@ struct produceshim().OpenPaneLengthMinusCompactLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenPaneLengthMinusCompactLength()); return S_OK; } catch (...) @@ -6789,7 +7264,8 @@ struct produceshim().NegativeOpenPaneLengthMinusCompactLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NegativeOpenPaneLengthMinusCompactLength()); return S_OK; } catch (...) @@ -6798,11 +7274,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_OpenPaneGridLength(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenPaneGridLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenPaneGridLength()); return S_OK; } catch (...) @@ -6811,11 +7288,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_CompactPaneGridLength(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompactPaneGridLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompactPaneGridLength()); return S_OK; } catch (...) @@ -6832,7 +7310,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsDragging()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDragging()); return S_OK; } catch (...) @@ -6841,11 +7320,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DragStarted(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_DragStarted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().DragStarted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DragStarted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -6858,6 +7338,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DragStarted(token); return S_OK; } @@ -6867,11 +7348,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DragDelta(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_DragDelta(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().DragDelta(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DragDelta(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -6884,6 +7366,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DragDelta(token); return S_OK; } @@ -6893,11 +7376,12 @@ struct produce : produce_bas } } - HRESULT __stdcall add_DragCompleted(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_DragCompleted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().DragCompleted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DragCompleted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -6910,6 +7394,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().DragCompleted(token); return S_OK; } @@ -6923,6 +7408,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().CancelDrag(); return S_OK; } @@ -6936,11 +7422,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_IsDraggingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsDraggingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDraggingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDraggingProperty()); return S_OK; } catch (...) @@ -6954,11 +7441,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Fill(abi_arg_out value) noexcept override + HRESULT __stdcall get_Fill(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Fill()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Fill()); return S_OK; } catch (...) @@ -6968,10 +7456,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Fill(abi_arg_in value) noexcept override + HRESULT __stdcall put_Fill(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Fill(*reinterpret_cast(&value)); return S_OK; } @@ -6985,11 +7474,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_FillProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FillProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FillProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FillProperty()); return S_OK; } catch (...) @@ -7003,11 +7493,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_IsChecked(abi_arg_out> value) noexcept override + HRESULT __stdcall get_IsChecked(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().IsChecked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsChecked()); return S_OK; } catch (...) @@ -7017,10 +7508,11 @@ struct produce : prod } } - HRESULT __stdcall put_IsChecked(abi_arg_in> value) noexcept override + HRESULT __stdcall put_IsChecked(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IsChecked(*reinterpret_cast *>(&value)); return S_OK; } @@ -7034,7 +7526,8 @@ struct produce : prod { try { - *value = detach(this->shim().IsThreeState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsThreeState()); return S_OK; } catch (...) @@ -7047,6 +7540,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().IsThreeState(value); return S_OK; } @@ -7056,11 +7550,12 @@ struct produce : prod } } - HRESULT __stdcall add_Checked(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_Checked(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Checked(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Checked(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -7073,6 +7568,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Checked(token); return S_OK; } @@ -7082,11 +7578,12 @@ struct produce : prod } } - HRESULT __stdcall add_Unchecked(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_Unchecked(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Unchecked(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Unchecked(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -7099,6 +7596,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Unchecked(token); return S_OK; } @@ -7108,11 +7606,12 @@ struct produce : prod } } - HRESULT __stdcall add_Indeterminate(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_Indeterminate(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Indeterminate(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Indeterminate(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -7125,6 +7624,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Indeterminate(token); return S_OK; } @@ -7138,11 +7638,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -7161,6 +7662,7 @@ struct produceshim()); this->shim().OnToggle(); return S_OK; } @@ -7174,11 +7676,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_IsCheckedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCheckedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCheckedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCheckedProperty()); return S_OK; } catch (...) @@ -7188,11 +7691,12 @@ struct produce } } - HRESULT __stdcall get_IsThreeStateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsThreeStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsThreeStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsThreeStateProperty()); return S_OK; } catch (...) @@ -7210,7 +7714,8 @@ struct produceshim().KnobCurrentToOnOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KnobCurrentToOnOffset()); return S_OK; } catch (...) @@ -7223,7 +7728,8 @@ struct produceshim().KnobCurrentToOffOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KnobCurrentToOffOffset()); return S_OK; } catch (...) @@ -7236,7 +7742,8 @@ struct produceshim().KnobOnToOffOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KnobOnToOffOffset()); return S_OK; } catch (...) @@ -7249,7 +7756,8 @@ struct produceshim().KnobOffToOnOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KnobOffToOnOffset()); return S_OK; } catch (...) @@ -7262,7 +7770,8 @@ struct produceshim().CurtainCurrentToOnOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurtainCurrentToOnOffset()); return S_OK; } catch (...) @@ -7275,7 +7784,8 @@ struct produceshim().CurtainCurrentToOffOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurtainCurrentToOffOffset()); return S_OK; } catch (...) @@ -7288,7 +7798,8 @@ struct produceshim().CurtainOnToOffOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurtainOnToOffOffset()); return S_OK; } catch (...) @@ -7301,7 +7812,8 @@ struct produceshim().CurtainOffToOnOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurtainOffToOnOffset()); return S_OK; } catch (...) @@ -7318,7 +7830,8 @@ struct produceshim().FromHorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromHorizontalOffset()); return S_OK; } catch (...) @@ -7331,7 +7844,8 @@ struct produceshim().FromVerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FromVerticalOffset()); return S_OK; } catch (...) @@ -7348,700 +7862,700 @@ namespace Windows::UI::Xaml::Controls::Primitives { template bool impl_IScrollSnapPointsInfo::AreHorizontalSnapPointsRegular() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreHorizontalSnapPointsRegular(&value)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->get_AreHorizontalSnapPointsRegular(&value)); return value; } template bool impl_IScrollSnapPointsInfo::AreVerticalSnapPointsRegular() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreVerticalSnapPointsRegular(&value)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->get_AreVerticalSnapPointsRegular(&value)); return value; } -template event_token impl_IScrollSnapPointsInfo::HorizontalSnapPointsChanged(const Windows::Foundation::EventHandler & value) const +template event_token impl_IScrollSnapPointsInfo::HorizontalSnapPointsChanged(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_HorizontalSnapPointsChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->add_HorizontalSnapPointsChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IScrollSnapPointsInfo::HorizontalSnapPointsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IScrollSnapPointsInfo::HorizontalSnapPointsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo::remove_HorizontalSnapPointsChanged, HorizontalSnapPointsChanged(value)); } template void impl_IScrollSnapPointsInfo::HorizontalSnapPointsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_HorizontalSnapPointsChanged(token)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->remove_HorizontalSnapPointsChanged(token)); } -template event_token impl_IScrollSnapPointsInfo::VerticalSnapPointsChanged(const Windows::Foundation::EventHandler & value) const +template event_token impl_IScrollSnapPointsInfo::VerticalSnapPointsChanged(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VerticalSnapPointsChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->add_VerticalSnapPointsChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IScrollSnapPointsInfo::VerticalSnapPointsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IScrollSnapPointsInfo::VerticalSnapPointsChanged(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo::remove_VerticalSnapPointsChanged, VerticalSnapPointsChanged(value)); } template void impl_IScrollSnapPointsInfo::VerticalSnapPointsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VerticalSnapPointsChanged(token)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->remove_VerticalSnapPointsChanged(token)); } template Windows::Foundation::Collections::IVectorView impl_IScrollSnapPointsInfo::GetIrregularSnapPoints(Windows::UI::Xaml::Controls::Orientation orientation, Windows::UI::Xaml::Controls::Primitives::SnapPointsAlignment alignment) const { Windows::Foundation::Collections::IVectorView returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetIrregularSnapPoints(orientation, alignment, put(returnValue))); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->abi_GetIrregularSnapPoints(orientation, alignment, put_abi(returnValue))); return returnValue; } template float impl_IScrollSnapPointsInfo::GetRegularSnapPoints(Windows::UI::Xaml::Controls::Orientation orientation, Windows::UI::Xaml::Controls::Primitives::SnapPointsAlignment alignment, float & offset) const { float returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRegularSnapPoints(orientation, alignment, &offset, &returnValue)); + check_hresult(WINRT_SHIM(IScrollSnapPointsInfo)->abi_GetRegularSnapPoints(orientation, alignment, &offset, &returnValue)); return returnValue; } template int32_t impl_IItemsChangedEventArgs::Action() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Action(&value)); + check_hresult(WINRT_SHIM(IItemsChangedEventArgs)->get_Action(&value)); return value; } template Windows::UI::Xaml::Controls::Primitives::GeneratorPosition impl_IItemsChangedEventArgs::Position() const { Windows::UI::Xaml::Controls::Primitives::GeneratorPosition value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IItemsChangedEventArgs)->get_Position(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::GeneratorPosition impl_IItemsChangedEventArgs::OldPosition() const { Windows::UI::Xaml::Controls::Primitives::GeneratorPosition value {}; - check_hresult(static_cast(static_cast(*this))->get_OldPosition(put(value))); + check_hresult(WINRT_SHIM(IItemsChangedEventArgs)->get_OldPosition(put_abi(value))); return value; } template int32_t impl_IItemsChangedEventArgs::ItemCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemCount(&value)); + check_hresult(WINRT_SHIM(IItemsChangedEventArgs)->get_ItemCount(&value)); return value; } template int32_t impl_IItemsChangedEventArgs::ItemUICount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemUICount(&value)); + check_hresult(WINRT_SHIM(IItemsChangedEventArgs)->get_ItemUICount(&value)); return value; } -template Windows::UI::Xaml::UIElement impl_ILayoutInformationStatics::GetLayoutExceptionElement(const Windows::IInspectable & dispatcher) const +template Windows::UI::Xaml::UIElement impl_ILayoutInformationStatics::GetLayoutExceptionElement(const Windows::Foundation::IInspectable & dispatcher) const { Windows::UI::Xaml::UIElement element { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetLayoutExceptionElement(get(dispatcher), put(element))); + check_hresult(WINRT_SHIM(ILayoutInformationStatics)->abi_GetLayoutExceptionElement(get_abi(dispatcher), put_abi(element))); return element; } template Windows::Foundation::Rect impl_ILayoutInformationStatics::GetLayoutSlot(const Windows::UI::Xaml::FrameworkElement & element) const { Windows::Foundation::Rect slot {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLayoutSlot(get(element), put(slot))); + check_hresult(WINRT_SHIM(ILayoutInformationStatics)->abi_GetLayoutSlot(get_abi(element), put_abi(slot))); return slot; } template double impl_IComboBoxTemplateSettings::DropDownOpenedHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DropDownOpenedHeight(&value)); + check_hresult(WINRT_SHIM(IComboBoxTemplateSettings)->get_DropDownOpenedHeight(&value)); return value; } template double impl_IComboBoxTemplateSettings::DropDownClosedHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DropDownClosedHeight(&value)); + check_hresult(WINRT_SHIM(IComboBoxTemplateSettings)->get_DropDownClosedHeight(&value)); return value; } template double impl_IComboBoxTemplateSettings::DropDownOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DropDownOffset(&value)); + check_hresult(WINRT_SHIM(IComboBoxTemplateSettings)->get_DropDownOffset(&value)); return value; } template Windows::UI::Xaml::Controls::Primitives::AnimationDirection impl_IComboBoxTemplateSettings::SelectedItemDirection() const { Windows::UI::Xaml::Controls::Primitives::AnimationDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedItemDirection(&value)); + check_hresult(WINRT_SHIM(IComboBoxTemplateSettings)->get_SelectedItemDirection(&value)); return value; } template double impl_IComboBoxTemplateSettings2::DropDownContentMinWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DropDownContentMinWidth(&value)); + check_hresult(WINRT_SHIM(IComboBoxTemplateSettings2)->get_DropDownContentMinWidth(&value)); return value; } template double impl_IDragCompletedEventArgs::HorizontalChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalChange(&value)); + check_hresult(WINRT_SHIM(IDragCompletedEventArgs)->get_HorizontalChange(&value)); return value; } template double impl_IDragCompletedEventArgs::VerticalChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalChange(&value)); + check_hresult(WINRT_SHIM(IDragCompletedEventArgs)->get_VerticalChange(&value)); return value; } template bool impl_IDragCompletedEventArgs::Canceled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Canceled(&value)); + check_hresult(WINRT_SHIM(IDragCompletedEventArgs)->get_Canceled(&value)); return value; } -template Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs impl_IDragCompletedEventArgsFactory::CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs impl_IDragCompletedEventArgsFactory::CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDragCompletedEventArgsFactory)->abi_CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template double impl_IDragDeltaEventArgs::HorizontalChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalChange(&value)); + check_hresult(WINRT_SHIM(IDragDeltaEventArgs)->get_HorizontalChange(&value)); return value; } template double impl_IDragDeltaEventArgs::VerticalChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalChange(&value)); + check_hresult(WINRT_SHIM(IDragDeltaEventArgs)->get_VerticalChange(&value)); return value; } -template Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs impl_IDragDeltaEventArgsFactory::CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs impl_IDragDeltaEventArgsFactory::CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDragDeltaEventArgsFactory)->abi_CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template double impl_IDragStartedEventArgs::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IDragStartedEventArgs)->get_HorizontalOffset(&value)); return value; } template double impl_IDragStartedEventArgs::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IDragStartedEventArgs)->get_VerticalOffset(&value)); return value; } -template Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs impl_IDragStartedEventArgsFactory::CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs impl_IDragStartedEventArgsFactory::CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDragStartedEventArgsFactory)->abi_CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_IGridViewItemTemplateSettings::DragItemsCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DragItemsCount(&value)); + check_hresult(WINRT_SHIM(IGridViewItemTemplateSettings)->get_DragItemsCount(&value)); return value; } template int32_t impl_IListViewItemTemplateSettings::DragItemsCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DragItemsCount(&value)); + check_hresult(WINRT_SHIM(IListViewItemTemplateSettings)->get_DragItemsCount(&value)); return value; } template double impl_IMenuFlyoutPresenterTemplateSettings::FlyoutContentMinWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FlyoutContentMinWidth(&value)); + check_hresult(WINRT_SHIM(IMenuFlyoutPresenterTemplateSettings)->get_FlyoutContentMinWidth(&value)); return value; } template double impl_IProgressBarTemplateSettings::EllipseDiameter() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseDiameter(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_EllipseDiameter(&value)); return value; } template double impl_IProgressBarTemplateSettings::EllipseOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseOffset(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_EllipseOffset(&value)); return value; } template double impl_IProgressBarTemplateSettings::EllipseAnimationWellPosition() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseAnimationWellPosition(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_EllipseAnimationWellPosition(&value)); return value; } template double impl_IProgressBarTemplateSettings::EllipseAnimationEndPosition() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseAnimationEndPosition(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_EllipseAnimationEndPosition(&value)); return value; } template double impl_IProgressBarTemplateSettings::ContainerAnimationStartPosition() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ContainerAnimationStartPosition(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_ContainerAnimationStartPosition(&value)); return value; } template double impl_IProgressBarTemplateSettings::ContainerAnimationEndPosition() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ContainerAnimationEndPosition(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_ContainerAnimationEndPosition(&value)); return value; } template double impl_IProgressBarTemplateSettings::IndicatorLengthDelta() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_IndicatorLengthDelta(&value)); + check_hresult(WINRT_SHIM(IProgressBarTemplateSettings)->get_IndicatorLengthDelta(&value)); return value; } template double impl_IProgressRingTemplateSettings::EllipseDiameter() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseDiameter(&value)); + check_hresult(WINRT_SHIM(IProgressRingTemplateSettings)->get_EllipseDiameter(&value)); return value; } template Windows::UI::Xaml::Thickness impl_IProgressRingTemplateSettings::EllipseOffset() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_EllipseOffset(put(value))); + check_hresult(WINRT_SHIM(IProgressRingTemplateSettings)->get_EllipseOffset(put_abi(value))); return value; } template double impl_IProgressRingTemplateSettings::MaxSideLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSideLength(&value)); + check_hresult(WINRT_SHIM(IProgressRingTemplateSettings)->get_MaxSideLength(&value)); return value; } template double impl_IRangeBaseValueChangedEventArgs::OldValue() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OldValue(&value)); + check_hresult(WINRT_SHIM(IRangeBaseValueChangedEventArgs)->get_OldValue(&value)); return value; } template double impl_IRangeBaseValueChangedEventArgs::NewValue() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NewValue(&value)); + check_hresult(WINRT_SHIM(IRangeBaseValueChangedEventArgs)->get_NewValue(&value)); return value; } template double impl_IScrollEventArgs::NewValue() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NewValue(&value)); + check_hresult(WINRT_SHIM(IScrollEventArgs)->get_NewValue(&value)); return value; } template Windows::UI::Xaml::Controls::Primitives::ScrollEventType impl_IScrollEventArgs::ScrollEventType() const { Windows::UI::Xaml::Controls::Primitives::ScrollEventType value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollEventType(&value)); + check_hresult(WINRT_SHIM(IScrollEventArgs)->get_ScrollEventType(&value)); return value; } template Windows::UI::Xaml::Media::Brush impl_ISettingsFlyoutTemplateSettings::HeaderBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderBackground(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_HeaderBackground(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_ISettingsFlyoutTemplateSettings::HeaderForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderForeground(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_HeaderForeground(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_ISettingsFlyoutTemplateSettings::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_BorderBrush(put_abi(value))); return value; } template Windows::UI::Xaml::Thickness impl_ISettingsFlyoutTemplateSettings::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_BorderThickness(put_abi(value))); return value; } template Windows::UI::Xaml::Media::ImageSource impl_ISettingsFlyoutTemplateSettings::IconSource() const { Windows::UI::Xaml::Media::ImageSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IconSource(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_IconSource(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_ISettingsFlyoutTemplateSettings::ContentTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTransitions(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutTemplateSettings)->get_ContentTransitions(put_abi(value))); return value; } template double impl_IToggleSwitchTemplateSettings::KnobCurrentToOnOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_KnobCurrentToOnOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_KnobCurrentToOnOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::KnobCurrentToOffOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_KnobCurrentToOffOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_KnobCurrentToOffOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::KnobOnToOffOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_KnobOnToOffOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_KnobOnToOffOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::KnobOffToOnOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_KnobOffToOnOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_KnobOffToOnOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::CurtainCurrentToOnOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurtainCurrentToOnOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_CurtainCurrentToOnOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::CurtainCurrentToOffOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurtainCurrentToOffOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_CurtainCurrentToOffOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::CurtainOnToOffOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurtainOnToOffOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_CurtainOnToOffOffset(&value)); return value; } template double impl_IToggleSwitchTemplateSettings::CurtainOffToOnOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CurtainOffToOnOffset(&value)); + check_hresult(WINRT_SHIM(IToggleSwitchTemplateSettings)->get_CurtainOffToOnOffset(&value)); return value; } template double impl_IToolTipTemplateSettings::FromHorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FromHorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IToolTipTemplateSettings)->get_FromHorizontalOffset(&value)); return value; } template double impl_IToolTipTemplateSettings::FromVerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FromVerticalOffset(&value)); + check_hresult(WINRT_SHIM(IToolTipTemplateSettings)->get_FromVerticalOffset(&value)); return value; } template Windows::UI::Xaml::UIElement impl_IPopup::Child() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Child(put(value))); + check_hresult(WINRT_SHIM(IPopup)->get_Child(put_abi(value))); return value; } template void impl_IPopup::Child(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Child(get(value))); + check_hresult(WINRT_SHIM(IPopup)->put_Child(get_abi(value))); } template bool impl_IPopup::IsOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOpen(&value)); + check_hresult(WINRT_SHIM(IPopup)->get_IsOpen(&value)); return value; } template void impl_IPopup::IsOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOpen(value)); + check_hresult(WINRT_SHIM(IPopup)->put_IsOpen(value)); } template double impl_IPopup::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IPopup)->get_HorizontalOffset(&value)); return value; } template void impl_IPopup::HorizontalOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalOffset(value)); + check_hresult(WINRT_SHIM(IPopup)->put_HorizontalOffset(value)); } template double impl_IPopup::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IPopup)->get_VerticalOffset(&value)); return value; } template void impl_IPopup::VerticalOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalOffset(value)); + check_hresult(WINRT_SHIM(IPopup)->put_VerticalOffset(value)); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IPopup::ChildTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildTransitions(put(value))); + check_hresult(WINRT_SHIM(IPopup)->get_ChildTransitions(put_abi(value))); return value; } template void impl_IPopup::ChildTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ChildTransitions(get(value))); + check_hresult(WINRT_SHIM(IPopup)->put_ChildTransitions(get_abi(value))); } template bool impl_IPopup::IsLightDismissEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLightDismissEnabled(&value)); + check_hresult(WINRT_SHIM(IPopup)->get_IsLightDismissEnabled(&value)); return value; } template void impl_IPopup::IsLightDismissEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsLightDismissEnabled(value)); + check_hresult(WINRT_SHIM(IPopup)->put_IsLightDismissEnabled(value)); } -template event_token impl_IPopup::Opened(const Windows::Foundation::EventHandler & value) const +template event_token impl_IPopup::Opened(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(IPopup)->add_Opened(get_abi(value), &token)); return token; } -template event_revoker impl_IPopup::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IPopup::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IPopup::remove_Opened, Opened(value)); } template void impl_IPopup::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IPopup)->remove_Opened(token)); } -template event_token impl_IPopup::Closed(const Windows::Foundation::EventHandler & value) const +template event_token impl_IPopup::Closed(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(IPopup)->add_Closed(get_abi(value), &token)); return token; } -template event_revoker impl_IPopup::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IPopup::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IPopup::remove_Closed, Closed(value)); } template void impl_IPopup::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IPopup)->remove_Closed(token)); } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::ChildProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_ChildProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::IsOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOpenProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_IsOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::HorizontalOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_HorizontalOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::VerticalOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_VerticalOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::ChildTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_ChildTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics::IsLightDismissEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsLightDismissEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics)->get_IsLightDismissEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IPopup2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IPopup2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IPopup2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IPopup2)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IPopupStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IPopupStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_ITickBar::Fill() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Fill(put(value))); + check_hresult(WINRT_SHIM(ITickBar)->get_Fill(put_abi(value))); return value; } template void impl_ITickBar::Fill(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Fill(get(value))); + check_hresult(WINRT_SHIM(ITickBar)->put_Fill(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_ITickBarStatics::FillProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FillProperty(put(value))); + check_hresult(WINRT_SHIM(ITickBarStatics)->get_FillProperty(put_abi(value))); return value; } template double impl_IRangeBase::Minimum() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Minimum(&value)); + check_hresult(WINRT_SHIM(IRangeBase)->get_Minimum(&value)); return value; } template void impl_IRangeBase::Minimum(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Minimum(value)); + check_hresult(WINRT_SHIM(IRangeBase)->put_Minimum(value)); } template double impl_IRangeBase::Maximum() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Maximum(&value)); + check_hresult(WINRT_SHIM(IRangeBase)->get_Maximum(&value)); return value; } template void impl_IRangeBase::Maximum(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Maximum(value)); + check_hresult(WINRT_SHIM(IRangeBase)->put_Maximum(value)); } template double impl_IRangeBase::SmallChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_SmallChange(&value)); + check_hresult(WINRT_SHIM(IRangeBase)->get_SmallChange(&value)); return value; } template void impl_IRangeBase::SmallChange(double value) const { - check_hresult(static_cast(static_cast(*this))->put_SmallChange(value)); + check_hresult(WINRT_SHIM(IRangeBase)->put_SmallChange(value)); } template double impl_IRangeBase::LargeChange() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LargeChange(&value)); + check_hresult(WINRT_SHIM(IRangeBase)->get_LargeChange(&value)); return value; } template void impl_IRangeBase::LargeChange(double value) const { - check_hresult(static_cast(static_cast(*this))->put_LargeChange(value)); + check_hresult(WINRT_SHIM(IRangeBase)->put_LargeChange(value)); } template double impl_IRangeBase::Value() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Value(&value)); + check_hresult(WINRT_SHIM(IRangeBase)->get_Value(&value)); return value; } template void impl_IRangeBase::Value(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Value(value)); + check_hresult(WINRT_SHIM(IRangeBase)->put_Value(value)); } template event_token impl_IRangeBase::ValueChanged(const Windows::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ValueChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRangeBase)->add_ValueChanged(get_abi(value), &token)); return token; } @@ -8052,77 +8566,77 @@ template event_revoker impl_IRangeBase::ValueChanged template void impl_IRangeBase::ValueChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ValueChanged(token)); + check_hresult(WINRT_SHIM(IRangeBase)->remove_ValueChanged(token)); } template void impl_IRangeBaseOverrides::OnMinimumChanged(double oldMinimum, double newMinimum) const { - check_hresult(static_cast(static_cast(*this))->abi_OnMinimumChanged(oldMinimum, newMinimum)); + check_hresult(WINRT_SHIM(IRangeBaseOverrides)->abi_OnMinimumChanged(oldMinimum, newMinimum)); } template void impl_IRangeBaseOverrides::OnMaximumChanged(double oldMaximum, double newMaximum) const { - check_hresult(static_cast(static_cast(*this))->abi_OnMaximumChanged(oldMaximum, newMaximum)); + check_hresult(WINRT_SHIM(IRangeBaseOverrides)->abi_OnMaximumChanged(oldMaximum, newMaximum)); } template void impl_IRangeBaseOverrides::OnValueChanged(double oldValue, double newValue) const { - check_hresult(static_cast(static_cast(*this))->abi_OnValueChanged(oldValue, newValue)); + check_hresult(WINRT_SHIM(IRangeBaseOverrides)->abi_OnValueChanged(oldValue, newValue)); } template Windows::UI::Xaml::DependencyProperty impl_IRangeBaseStatics::MinimumProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinimumProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeBaseStatics)->get_MinimumProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRangeBaseStatics::MaximumProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaximumProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeBaseStatics)->get_MaximumProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRangeBaseStatics::SmallChangeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SmallChangeProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeBaseStatics)->get_SmallChangeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRangeBaseStatics::LargeChangeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LargeChangeProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeBaseStatics)->get_LargeChangeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRangeBaseStatics::ValueProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ValueProperty(put(value))); + check_hresult(WINRT_SHIM(IRangeBaseStatics)->get_ValueProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::RangeBase impl_IRangeBaseFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::RangeBase impl_IRangeBaseFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::RangeBase instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRangeBaseFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IThumb::IsDragging() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDragging(&value)); + check_hresult(WINRT_SHIM(IThumb)->get_IsDragging(&value)); return value; } template event_token impl_IThumb::DragStarted(const Windows::UI::Xaml::Controls::Primitives::DragStartedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DragStarted(get(value), &token)); + check_hresult(WINRT_SHIM(IThumb)->add_DragStarted(get_abi(value), &token)); return token; } @@ -8133,13 +8647,13 @@ template event_revoker impl_IThumb::DragStarted(auto_rev template void impl_IThumb::DragStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DragStarted(token)); + check_hresult(WINRT_SHIM(IThumb)->remove_DragStarted(token)); } template event_token impl_IThumb::DragDelta(const Windows::UI::Xaml::Controls::Primitives::DragDeltaEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DragDelta(get(value), &token)); + check_hresult(WINRT_SHIM(IThumb)->add_DragDelta(get_abi(value), &token)); return token; } @@ -8150,13 +8664,13 @@ template event_revoker impl_IThumb::DragDelta(auto_revok template void impl_IThumb::DragDelta(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DragDelta(token)); + check_hresult(WINRT_SHIM(IThumb)->remove_DragDelta(token)); } template event_token impl_IThumb::DragCompleted(const Windows::UI::Xaml::Controls::Primitives::DragCompletedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DragCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IThumb)->add_DragCompleted(get_abi(value), &token)); return token; } @@ -8167,75 +8681,75 @@ template event_revoker impl_IThumb::DragCompleted(auto_r template void impl_IThumb::DragCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DragCompleted(token)); + check_hresult(WINRT_SHIM(IThumb)->remove_DragCompleted(token)); } template void impl_IThumb::CancelDrag() const { - check_hresult(static_cast(static_cast(*this))->abi_CancelDrag()); + check_hresult(WINRT_SHIM(IThumb)->abi_CancelDrag()); } template Windows::UI::Xaml::DependencyProperty impl_IThumbStatics::IsDraggingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsDraggingProperty(put(value))); + check_hresult(WINRT_SHIM(IThumbStatics)->get_IsDraggingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ClickMode impl_IButtonBase::ClickMode() const { Windows::UI::Xaml::Controls::ClickMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ClickMode(&value)); + check_hresult(WINRT_SHIM(IButtonBase)->get_ClickMode(&value)); return value; } template void impl_IButtonBase::ClickMode(Windows::UI::Xaml::Controls::ClickMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ClickMode(value)); + check_hresult(WINRT_SHIM(IButtonBase)->put_ClickMode(value)); } template bool impl_IButtonBase::IsPointerOver() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPointerOver(&value)); + check_hresult(WINRT_SHIM(IButtonBase)->get_IsPointerOver(&value)); return value; } template bool impl_IButtonBase::IsPressed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPressed(&value)); + check_hresult(WINRT_SHIM(IButtonBase)->get_IsPressed(&value)); return value; } template Windows::UI::Xaml::Input::ICommand impl_IButtonBase::Command() const { Windows::UI::Xaml::Input::ICommand value; - check_hresult(static_cast(static_cast(*this))->get_Command(put(value))); + check_hresult(WINRT_SHIM(IButtonBase)->get_Command(put_abi(value))); return value; } template void impl_IButtonBase::Command(const Windows::UI::Xaml::Input::ICommand & value) const { - check_hresult(static_cast(static_cast(*this))->put_Command(get(value))); + check_hresult(WINRT_SHIM(IButtonBase)->put_Command(get_abi(value))); } -template Windows::IInspectable impl_IButtonBase::CommandParameter() const +template Windows::Foundation::IInspectable impl_IButtonBase::CommandParameter() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_CommandParameter(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IButtonBase)->get_CommandParameter(put_abi(value))); return value; } -template void impl_IButtonBase::CommandParameter(const Windows::IInspectable & value) const +template void impl_IButtonBase::CommandParameter(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_CommandParameter(get(value))); + check_hresult(WINRT_SHIM(IButtonBase)->put_CommandParameter(get_abi(value))); } template event_token impl_IButtonBase::Click(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Click(get(value), &token)); + check_hresult(WINRT_SHIM(IButtonBase)->add_Click(get_abi(value), &token)); return token; } @@ -8246,408 +8760,408 @@ template event_revoker impl_IButtonBase::Click(auto template void impl_IButtonBase::Click(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Click(token)); + check_hresult(WINRT_SHIM(IButtonBase)->remove_Click(token)); } template Windows::UI::Xaml::DependencyProperty impl_IButtonBaseStatics::ClickModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClickModeProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonBaseStatics)->get_ClickModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IButtonBaseStatics::IsPointerOverProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPointerOverProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonBaseStatics)->get_IsPointerOverProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IButtonBaseStatics::IsPressedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPressedProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonBaseStatics)->get_IsPressedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IButtonBaseStatics::CommandProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CommandProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonBaseStatics)->get_CommandProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IButtonBaseStatics::CommandParameterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CommandParameterProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonBaseStatics)->get_CommandParameterProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::ButtonBase impl_IButtonBaseFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::ButtonBase impl_IButtonBaseFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::ButtonBase instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IButtonBaseFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_ICarouselPanel::CanVerticallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanVerticallyScroll(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_CanVerticallyScroll(&value)); return value; } template void impl_ICarouselPanel::CanVerticallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanVerticallyScroll(value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->put_CanVerticallyScroll(value)); } template bool impl_ICarouselPanel::CanHorizontallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanHorizontallyScroll(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_CanHorizontallyScroll(&value)); return value; } template void impl_ICarouselPanel::CanHorizontallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanHorizontallyScroll(value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->put_CanHorizontallyScroll(value)); } template double impl_ICarouselPanel::ExtentWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentWidth(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_ExtentWidth(&value)); return value; } template double impl_ICarouselPanel::ExtentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentHeight(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_ExtentHeight(&value)); return value; } template double impl_ICarouselPanel::ViewportWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportWidth(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_ViewportWidth(&value)); return value; } template double impl_ICarouselPanel::ViewportHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportHeight(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_ViewportHeight(&value)); return value; } template double impl_ICarouselPanel::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_HorizontalOffset(&value)); return value; } template double impl_ICarouselPanel::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(ICarouselPanel)->get_VerticalOffset(&value)); return value; } -template Windows::IInspectable impl_ICarouselPanel::ScrollOwner() const +template Windows::Foundation::IInspectable impl_ICarouselPanel::ScrollOwner() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ScrollOwner(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICarouselPanel)->get_ScrollOwner(put_abi(value))); return value; } -template void impl_ICarouselPanel::ScrollOwner(const Windows::IInspectable & value) const +template void impl_ICarouselPanel::ScrollOwner(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_ScrollOwner(get(value))); + check_hresult(WINRT_SHIM(ICarouselPanel)->put_ScrollOwner(get_abi(value))); } template void impl_ICarouselPanel::LineUp() const { - check_hresult(static_cast(static_cast(*this))->abi_LineUp()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_LineUp()); } template void impl_ICarouselPanel::LineDown() const { - check_hresult(static_cast(static_cast(*this))->abi_LineDown()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_LineDown()); } template void impl_ICarouselPanel::LineLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_LineLeft()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_LineLeft()); } template void impl_ICarouselPanel::LineRight() const { - check_hresult(static_cast(static_cast(*this))->abi_LineRight()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_LineRight()); } template void impl_ICarouselPanel::PageUp() const { - check_hresult(static_cast(static_cast(*this))->abi_PageUp()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_PageUp()); } template void impl_ICarouselPanel::PageDown() const { - check_hresult(static_cast(static_cast(*this))->abi_PageDown()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_PageDown()); } template void impl_ICarouselPanel::PageLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_PageLeft()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_PageLeft()); } template void impl_ICarouselPanel::PageRight() const { - check_hresult(static_cast(static_cast(*this))->abi_PageRight()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_PageRight()); } template void impl_ICarouselPanel::MouseWheelUp() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelUp()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_MouseWheelUp()); } template void impl_ICarouselPanel::MouseWheelDown() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelDown()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_MouseWheelDown()); } template void impl_ICarouselPanel::MouseWheelLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelLeft()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_MouseWheelLeft()); } template void impl_ICarouselPanel::MouseWheelRight() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelRight()); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_MouseWheelRight()); } template void impl_ICarouselPanel::SetHorizontalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHorizontalOffset(offset)); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_SetHorizontalOffset(offset)); } template void impl_ICarouselPanel::SetVerticalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVerticalOffset(offset)); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_SetVerticalOffset(offset)); } template Windows::Foundation::Rect impl_ICarouselPanel::MakeVisible(const Windows::UI::Xaml::UIElement & visual, const Windows::Foundation::Rect & rectangle) const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_MakeVisible(get(visual), get(rectangle), put(returnValue))); + check_hresult(WINRT_SHIM(ICarouselPanel)->abi_MakeVisible(get_abi(visual), get_abi(rectangle), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::Primitives::CarouselPanel impl_ICarouselPanelFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::CarouselPanel impl_ICarouselPanelFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::CarouselPanel instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICarouselPanelFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IOrientedVirtualizingPanel::CanVerticallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanVerticallyScroll(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_CanVerticallyScroll(&value)); return value; } template void impl_IOrientedVirtualizingPanel::CanVerticallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanVerticallyScroll(value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->put_CanVerticallyScroll(value)); } template bool impl_IOrientedVirtualizingPanel::CanHorizontallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanHorizontallyScroll(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_CanHorizontallyScroll(&value)); return value; } template void impl_IOrientedVirtualizingPanel::CanHorizontallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanHorizontallyScroll(value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->put_CanHorizontallyScroll(value)); } template double impl_IOrientedVirtualizingPanel::ExtentWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentWidth(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_ExtentWidth(&value)); return value; } template double impl_IOrientedVirtualizingPanel::ExtentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentHeight(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_ExtentHeight(&value)); return value; } template double impl_IOrientedVirtualizingPanel::ViewportWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportWidth(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_ViewportWidth(&value)); return value; } template double impl_IOrientedVirtualizingPanel::ViewportHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportHeight(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_ViewportHeight(&value)); return value; } template double impl_IOrientedVirtualizingPanel::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_HorizontalOffset(&value)); return value; } template double impl_IOrientedVirtualizingPanel::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_VerticalOffset(&value)); return value; } -template Windows::IInspectable impl_IOrientedVirtualizingPanel::ScrollOwner() const +template Windows::Foundation::IInspectable impl_IOrientedVirtualizingPanel::ScrollOwner() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ScrollOwner(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->get_ScrollOwner(put_abi(value))); return value; } -template void impl_IOrientedVirtualizingPanel::ScrollOwner(const Windows::IInspectable & value) const +template void impl_IOrientedVirtualizingPanel::ScrollOwner(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_ScrollOwner(get(value))); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->put_ScrollOwner(get_abi(value))); } template void impl_IOrientedVirtualizingPanel::LineUp() const { - check_hresult(static_cast(static_cast(*this))->abi_LineUp()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_LineUp()); } template void impl_IOrientedVirtualizingPanel::LineDown() const { - check_hresult(static_cast(static_cast(*this))->abi_LineDown()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_LineDown()); } template void impl_IOrientedVirtualizingPanel::LineLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_LineLeft()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_LineLeft()); } template void impl_IOrientedVirtualizingPanel::LineRight() const { - check_hresult(static_cast(static_cast(*this))->abi_LineRight()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_LineRight()); } template void impl_IOrientedVirtualizingPanel::PageUp() const { - check_hresult(static_cast(static_cast(*this))->abi_PageUp()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_PageUp()); } template void impl_IOrientedVirtualizingPanel::PageDown() const { - check_hresult(static_cast(static_cast(*this))->abi_PageDown()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_PageDown()); } template void impl_IOrientedVirtualizingPanel::PageLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_PageLeft()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_PageLeft()); } template void impl_IOrientedVirtualizingPanel::PageRight() const { - check_hresult(static_cast(static_cast(*this))->abi_PageRight()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_PageRight()); } template void impl_IOrientedVirtualizingPanel::MouseWheelUp() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelUp()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_MouseWheelUp()); } template void impl_IOrientedVirtualizingPanel::MouseWheelDown() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelDown()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_MouseWheelDown()); } template void impl_IOrientedVirtualizingPanel::MouseWheelLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelLeft()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_MouseWheelLeft()); } template void impl_IOrientedVirtualizingPanel::MouseWheelRight() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelRight()); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_MouseWheelRight()); } template void impl_IOrientedVirtualizingPanel::SetHorizontalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHorizontalOffset(offset)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_SetHorizontalOffset(offset)); } template void impl_IOrientedVirtualizingPanel::SetVerticalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVerticalOffset(offset)); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_SetVerticalOffset(offset)); } template Windows::Foundation::Rect impl_IOrientedVirtualizingPanel::MakeVisible(const Windows::UI::Xaml::UIElement & visual, const Windows::Foundation::Rect & rectangle) const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_MakeVisible(get(visual), get(rectangle), put(returnValue))); + check_hresult(WINRT_SHIM(IOrientedVirtualizingPanel)->abi_MakeVisible(get_abi(visual), get_abi(rectangle), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::Orientation impl_IScrollBar::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IScrollBar)->get_Orientation(&value)); return value; } template void impl_IScrollBar::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IScrollBar)->put_Orientation(value)); } template double impl_IScrollBar::ViewportSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportSize(&value)); + check_hresult(WINRT_SHIM(IScrollBar)->get_ViewportSize(&value)); return value; } template void impl_IScrollBar::ViewportSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ViewportSize(value)); + check_hresult(WINRT_SHIM(IScrollBar)->put_ViewportSize(value)); } template Windows::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode impl_IScrollBar::IndicatorMode() const { Windows::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode value {}; - check_hresult(static_cast(static_cast(*this))->get_IndicatorMode(&value)); + check_hresult(WINRT_SHIM(IScrollBar)->get_IndicatorMode(&value)); return value; } template void impl_IScrollBar::IndicatorMode(Windows::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode value) const { - check_hresult(static_cast(static_cast(*this))->put_IndicatorMode(value)); + check_hresult(WINRT_SHIM(IScrollBar)->put_IndicatorMode(value)); } template event_token impl_IScrollBar::Scroll(const Windows::UI::Xaml::Controls::Primitives::ScrollEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Scroll(get(value), &token)); + check_hresult(WINRT_SHIM(IScrollBar)->add_Scroll(get_abi(value), &token)); return token; } @@ -8658,94 +9172,94 @@ template event_revoker impl_IScrollBar::Scroll(auto_ template void impl_IScrollBar::Scroll(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Scroll(token)); + check_hresult(WINRT_SHIM(IScrollBar)->remove_Scroll(token)); } template Windows::UI::Xaml::DependencyProperty impl_IScrollBarStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollBarStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IScrollBarStatics::ViewportSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ViewportSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollBarStatics)->get_ViewportSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IScrollBarStatics::IndicatorModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IndicatorModeProperty(put(value))); + check_hresult(WINRT_SHIM(IScrollBarStatics)->get_IndicatorModeProperty(put_abi(value))); return value; } template int32_t impl_ISelector::SelectedIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndex(&value)); + check_hresult(WINRT_SHIM(ISelector)->get_SelectedIndex(&value)); return value; } template void impl_ISelector::SelectedIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedIndex(value)); + check_hresult(WINRT_SHIM(ISelector)->put_SelectedIndex(value)); } -template Windows::IInspectable impl_ISelector::SelectedItem() const +template Windows::Foundation::IInspectable impl_ISelector::SelectedItem() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SelectedItem(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ISelector)->get_SelectedItem(put_abi(value))); return value; } -template void impl_ISelector::SelectedItem(const Windows::IInspectable & value) const +template void impl_ISelector::SelectedItem(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedItem(get(value))); + check_hresult(WINRT_SHIM(ISelector)->put_SelectedItem(get_abi(value))); } -template Windows::IInspectable impl_ISelector::SelectedValue() const +template Windows::Foundation::IInspectable impl_ISelector::SelectedValue() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SelectedValue(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ISelector)->get_SelectedValue(put_abi(value))); return value; } -template void impl_ISelector::SelectedValue(const Windows::IInspectable & value) const +template void impl_ISelector::SelectedValue(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedValue(get(value))); + check_hresult(WINRT_SHIM(ISelector)->put_SelectedValue(get_abi(value))); } template hstring impl_ISelector::SelectedValuePath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SelectedValuePath(put(value))); + check_hresult(WINRT_SHIM(ISelector)->get_SelectedValuePath(put_abi(value))); return value; } -template void impl_ISelector::SelectedValuePath(hstring_ref value) const +template void impl_ISelector::SelectedValuePath(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedValuePath(get(value))); + check_hresult(WINRT_SHIM(ISelector)->put_SelectedValuePath(get_abi(value))); } template Windows::Foundation::IReference impl_ISelector::IsSynchronizedWithCurrentItem() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsSynchronizedWithCurrentItem(put(value))); + check_hresult(WINRT_SHIM(ISelector)->get_IsSynchronizedWithCurrentItem(put_abi(value))); return value; } -template void impl_ISelector::IsSynchronizedWithCurrentItem(const Windows::Foundation::IReference & value) const +template void impl_ISelector::IsSynchronizedWithCurrentItem(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSynchronizedWithCurrentItem(get(value))); + check_hresult(WINRT_SHIM(ISelector)->put_IsSynchronizedWithCurrentItem(get_abi(value))); } template event_token impl_ISelector::SelectionChanged(const Windows::UI::Xaml::Controls::SelectionChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ISelector)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -8756,143 +9270,143 @@ template event_revoker impl_ISelector::SelectionChang template void impl_ISelector::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(ISelector)->remove_SelectionChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_ISelectorStatics::SelectedIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndexProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorStatics)->get_SelectedIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISelectorStatics::SelectedItemProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedItemProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorStatics)->get_SelectedItemProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISelectorStatics::SelectedValueProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedValueProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorStatics)->get_SelectedValueProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISelectorStatics::SelectedValuePathProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedValuePathProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorStatics)->get_SelectedValuePathProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISelectorStatics::IsSynchronizedWithCurrentItemProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSynchronizedWithCurrentItemProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorStatics)->get_IsSynchronizedWithCurrentItemProperty(put_abi(value))); return value; } template bool impl_ISelectorStatics::GetIsSelectionActive(const Windows::UI::Xaml::DependencyObject & element) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIsSelectionActive(get(element), &returnValue)); + check_hresult(WINRT_SHIM(ISelectorStatics)->abi_GetIsSelectionActive(get_abi(element), &returnValue)); return returnValue; } template bool impl_ISelectorItem::IsSelected() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelected(&value)); + check_hresult(WINRT_SHIM(ISelectorItem)->get_IsSelected(&value)); return value; } template void impl_ISelectorItem::IsSelected(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSelected(value)); + check_hresult(WINRT_SHIM(ISelectorItem)->put_IsSelected(value)); } template Windows::UI::Xaml::DependencyProperty impl_ISelectorItemStatics::IsSelectedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSelectedProperty(put(value))); + check_hresult(WINRT_SHIM(ISelectorItemStatics)->get_IsSelectedProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::SelectorItem impl_ISelectorItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::SelectorItem impl_ISelectorItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::SelectorItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISelectorItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_IRepeatButton::Delay() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Delay(&value)); + check_hresult(WINRT_SHIM(IRepeatButton)->get_Delay(&value)); return value; } template void impl_IRepeatButton::Delay(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Delay(value)); + check_hresult(WINRT_SHIM(IRepeatButton)->put_Delay(value)); } template int32_t impl_IRepeatButton::Interval() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Interval(&value)); + check_hresult(WINRT_SHIM(IRepeatButton)->get_Interval(&value)); return value; } template void impl_IRepeatButton::Interval(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_Interval(value)); + check_hresult(WINRT_SHIM(IRepeatButton)->put_Interval(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRepeatButtonStatics::DelayProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DelayProperty(put(value))); + check_hresult(WINRT_SHIM(IRepeatButtonStatics)->get_DelayProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRepeatButtonStatics::IntervalProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IntervalProperty(put(value))); + check_hresult(WINRT_SHIM(IRepeatButtonStatics)->get_IntervalProperty(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IToggleButton::IsChecked() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_IsChecked(put(value))); + check_hresult(WINRT_SHIM(IToggleButton)->get_IsChecked(put_abi(value))); return value; } -template void impl_IToggleButton::IsChecked(const Windows::Foundation::IReference & value) const +template void impl_IToggleButton::IsChecked(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_IsChecked(get(value))); + check_hresult(WINRT_SHIM(IToggleButton)->put_IsChecked(get_abi(value))); } template bool impl_IToggleButton::IsThreeState() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsThreeState(&value)); + check_hresult(WINRT_SHIM(IToggleButton)->get_IsThreeState(&value)); return value; } template void impl_IToggleButton::IsThreeState(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsThreeState(value)); + check_hresult(WINRT_SHIM(IToggleButton)->put_IsThreeState(value)); } template event_token impl_IToggleButton::Checked(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Checked(get(value), &token)); + check_hresult(WINRT_SHIM(IToggleButton)->add_Checked(get_abi(value), &token)); return token; } @@ -8903,13 +9417,13 @@ template event_revoker impl_IToggleButton::Checke template void impl_IToggleButton::Checked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Checked(token)); + check_hresult(WINRT_SHIM(IToggleButton)->remove_Checked(token)); } template event_token impl_IToggleButton::Unchecked(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Unchecked(get(value), &token)); + check_hresult(WINRT_SHIM(IToggleButton)->add_Unchecked(get_abi(value), &token)); return token; } @@ -8920,13 +9434,13 @@ template event_revoker impl_IToggleButton::Unchec template void impl_IToggleButton::Unchecked(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Unchecked(token)); + check_hresult(WINRT_SHIM(IToggleButton)->remove_Unchecked(token)); } template event_token impl_IToggleButton::Indeterminate(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Indeterminate(get(value), &token)); + check_hresult(WINRT_SHIM(IToggleButton)->add_Indeterminate(get_abi(value), &token)); return token; } @@ -8937,1454 +9451,1454 @@ template event_revoker impl_IToggleButton::Indete template void impl_IToggleButton::Indeterminate(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Indeterminate(token)); + check_hresult(WINRT_SHIM(IToggleButton)->remove_Indeterminate(token)); } template void impl_IToggleButtonOverrides::OnToggle() const { - check_hresult(static_cast(static_cast(*this))->abi_OnToggle()); + check_hresult(WINRT_SHIM(IToggleButtonOverrides)->abi_OnToggle()); } template Windows::UI::Xaml::DependencyProperty impl_IToggleButtonStatics::IsCheckedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsCheckedProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleButtonStatics)->get_IsCheckedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleButtonStatics::IsThreeStateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsThreeStateProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleButtonStatics)->get_IsThreeStateProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::ToggleButton impl_IToggleButtonFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::ToggleButton impl_IToggleButtonFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::ToggleButton instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IToggleButtonFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Foundation::Rect impl_IAppBarTemplateSettings::ClipRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ClipRect(put(value))); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_ClipRect(put_abi(value))); return value; } template double impl_IAppBarTemplateSettings::CompactVerticalDelta() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CompactVerticalDelta(&value)); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_CompactVerticalDelta(&value)); return value; } template Windows::UI::Xaml::Thickness impl_IAppBarTemplateSettings::CompactRootMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_CompactRootMargin(put(value))); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_CompactRootMargin(put_abi(value))); return value; } template double impl_IAppBarTemplateSettings::MinimalVerticalDelta() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimalVerticalDelta(&value)); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_MinimalVerticalDelta(&value)); return value; } template Windows::UI::Xaml::Thickness impl_IAppBarTemplateSettings::MinimalRootMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_MinimalRootMargin(put(value))); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_MinimalRootMargin(put_abi(value))); return value; } template double impl_IAppBarTemplateSettings::HiddenVerticalDelta() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HiddenVerticalDelta(&value)); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_HiddenVerticalDelta(&value)); return value; } template Windows::UI::Xaml::Thickness impl_IAppBarTemplateSettings::HiddenRootMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_HiddenRootMargin(put(value))); + check_hresult(WINRT_SHIM(IAppBarTemplateSettings)->get_HiddenRootMargin(put_abi(value))); return value; } template double impl_ICalendarViewTemplateSettings::MinViewWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinViewWidth(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_MinViewWidth(&value)); return value; } template hstring impl_ICalendarViewTemplateSettings::HeaderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_HeaderText(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_HeaderText(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay1() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay1(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay1(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay2() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay2(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay2(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay3() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay3(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay3(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay4() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay4(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay4(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay5() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay5(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay5(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay6() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay6(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay6(put_abi(value))); return value; } template hstring impl_ICalendarViewTemplateSettings::WeekDay7() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_WeekDay7(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_WeekDay7(put_abi(value))); return value; } template bool impl_ICalendarViewTemplateSettings::HasMoreContentAfter() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasMoreContentAfter(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_HasMoreContentAfter(&value)); return value; } template bool impl_ICalendarViewTemplateSettings::HasMoreContentBefore() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasMoreContentBefore(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_HasMoreContentBefore(&value)); return value; } template bool impl_ICalendarViewTemplateSettings::HasMoreViews() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasMoreViews(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_HasMoreViews(&value)); return value; } template Windows::Foundation::Rect impl_ICalendarViewTemplateSettings::ClipRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_ClipRect(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_ClipRect(put_abi(value))); return value; } template double impl_ICalendarViewTemplateSettings::CenterX() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CenterX(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_CenterX(&value)); return value; } template double impl_ICalendarViewTemplateSettings::CenterY() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CenterY(&value)); + check_hresult(WINRT_SHIM(ICalendarViewTemplateSettings)->get_CenterY(&value)); return value; } template double impl_ICommandBarTemplateSettings::ContentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentHeight(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_ContentHeight(&value)); return value; } template Windows::Foundation::Rect impl_ICommandBarTemplateSettings::OverflowContentClipRect() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentClipRect(put(value))); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_OverflowContentClipRect(put_abi(value))); return value; } template double impl_ICommandBarTemplateSettings::OverflowContentMinWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentMinWidth(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_OverflowContentMinWidth(&value)); return value; } template double impl_ICommandBarTemplateSettings::OverflowContentMaxHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentMaxHeight(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_OverflowContentMaxHeight(&value)); return value; } template double impl_ICommandBarTemplateSettings::OverflowContentHorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentHorizontalOffset(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_OverflowContentHorizontalOffset(&value)); return value; } template double impl_ICommandBarTemplateSettings::OverflowContentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentHeight(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_OverflowContentHeight(&value)); return value; } template double impl_ICommandBarTemplateSettings::NegativeOverflowContentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NegativeOverflowContentHeight(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings)->get_NegativeOverflowContentHeight(&value)); return value; } template double impl_ICommandBarTemplateSettings2::OverflowContentMaxWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentMaxWidth(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings2)->get_OverflowContentMaxWidth(&value)); return value; } template Windows::UI::Xaml::Visibility impl_ICommandBarTemplateSettings3::EffectiveOverflowButtonVisibility() const { Windows::UI::Xaml::Visibility value {}; - check_hresult(static_cast(static_cast(*this))->get_EffectiveOverflowButtonVisibility(&value)); + check_hresult(WINRT_SHIM(ICommandBarTemplateSettings3)->get_EffectiveOverflowButtonVisibility(&value)); return value; } template double impl_ISplitViewTemplateSettings::OpenPaneLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OpenPaneLength(&value)); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_OpenPaneLength(&value)); return value; } template double impl_ISplitViewTemplateSettings::NegativeOpenPaneLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NegativeOpenPaneLength(&value)); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_NegativeOpenPaneLength(&value)); return value; } template double impl_ISplitViewTemplateSettings::OpenPaneLengthMinusCompactLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OpenPaneLengthMinusCompactLength(&value)); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_OpenPaneLengthMinusCompactLength(&value)); return value; } template double impl_ISplitViewTemplateSettings::NegativeOpenPaneLengthMinusCompactLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_NegativeOpenPaneLengthMinusCompactLength(&value)); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_NegativeOpenPaneLengthMinusCompactLength(&value)); return value; } template Windows::UI::Xaml::GridLength impl_ISplitViewTemplateSettings::OpenPaneGridLength() const { Windows::UI::Xaml::GridLength value {}; - check_hresult(static_cast(static_cast(*this))->get_OpenPaneGridLength(put(value))); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_OpenPaneGridLength(put_abi(value))); return value; } template Windows::UI::Xaml::GridLength impl_ISplitViewTemplateSettings::CompactPaneGridLength() const { Windows::UI::Xaml::GridLength value {}; - check_hresult(static_cast(static_cast(*this))->get_CompactPaneGridLength(put(value))); + check_hresult(WINRT_SHIM(ISplitViewTemplateSettings)->get_CompactPaneGridLength(put_abi(value))); return value; } template bool impl_IGridViewItemPresenter::SelectionCheckMarkVisualEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionCheckMarkVisualEnabled(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectionCheckMarkVisualEnabled(&value)); return value; } template void impl_IGridViewItemPresenter::SelectionCheckMarkVisualEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionCheckMarkVisualEnabled(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectionCheckMarkVisualEnabled(value)); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::CheckHintBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckHintBrush(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_CheckHintBrush(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::CheckHintBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckHintBrush(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_CheckHintBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::CheckSelectingBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckSelectingBrush(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_CheckSelectingBrush(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::CheckSelectingBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckSelectingBrush(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_CheckSelectingBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::CheckBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBrush(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_CheckBrush(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::CheckBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckBrush(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_CheckBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::DragBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragBackground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_DragBackground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::DragBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_DragBackground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_DragBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::DragForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragForeground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_DragForeground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::DragForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_DragForeground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_DragForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::FocusBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrush(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_FocusBorderBrush(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::FocusBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_FocusBorderBrush(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_FocusBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::PlaceholderBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderBackground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_PlaceholderBackground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::PlaceholderBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderBackground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_PlaceholderBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::PointerOverBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_PointerOverBackground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::PointerOverBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerOverBackground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_PointerOverBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::SelectedBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBackground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectedBackground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::SelectedBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBackground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectedBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::SelectedForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForeground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectedForeground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::SelectedForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedForeground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectedForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::SelectedPointerOverBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBackground(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectedPointerOverBackground(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::SelectedPointerOverBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPointerOverBackground(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectedPointerOverBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IGridViewItemPresenter::SelectedPointerOverBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBorderBrush(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectedPointerOverBorderBrush(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::SelectedPointerOverBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPointerOverBorderBrush(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectedPointerOverBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IGridViewItemPresenter::SelectedBorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderThickness(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_SelectedBorderThickness(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::SelectedBorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBorderThickness(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_SelectedBorderThickness(get_abi(value))); } template double impl_IGridViewItemPresenter::DisabledOpacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DisabledOpacity(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_DisabledOpacity(&value)); return value; } template void impl_IGridViewItemPresenter::DisabledOpacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DisabledOpacity(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_DisabledOpacity(value)); } template double impl_IGridViewItemPresenter::DragOpacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DragOpacity(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_DragOpacity(&value)); return value; } template void impl_IGridViewItemPresenter::DragOpacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DragOpacity(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_DragOpacity(value)); } template double impl_IGridViewItemPresenter::ReorderHintOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ReorderHintOffset(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_ReorderHintOffset(&value)); return value; } template void impl_IGridViewItemPresenter::ReorderHintOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ReorderHintOffset(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_ReorderHintOffset(value)); } template Windows::UI::Xaml::HorizontalAlignment impl_IGridViewItemPresenter::GridViewItemPresenterHorizontalContentAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterHorizontalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_GridViewItemPresenterHorizontalContentAlignment(&value)); return value; } template void impl_IGridViewItemPresenter::GridViewItemPresenterHorizontalContentAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_GridViewItemPresenterHorizontalContentAlignment(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_GridViewItemPresenterHorizontalContentAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_IGridViewItemPresenter::GridViewItemPresenterVerticalContentAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterVerticalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_GridViewItemPresenterVerticalContentAlignment(&value)); return value; } template void impl_IGridViewItemPresenter::GridViewItemPresenterVerticalContentAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_GridViewItemPresenterVerticalContentAlignment(value)); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_GridViewItemPresenterVerticalContentAlignment(value)); } template Windows::UI::Xaml::Thickness impl_IGridViewItemPresenter::GridViewItemPresenterPadding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterPadding(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_GridViewItemPresenterPadding(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::GridViewItemPresenterPadding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_GridViewItemPresenterPadding(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_GridViewItemPresenterPadding(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IGridViewItemPresenter::PointerOverBackgroundMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundMargin(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_PointerOverBackgroundMargin(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::PointerOverBackgroundMargin(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerOverBackgroundMargin(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_PointerOverBackgroundMargin(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IGridViewItemPresenter::ContentMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentMargin(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->get_ContentMargin(put_abi(value))); return value; } template void impl_IGridViewItemPresenter::ContentMargin(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentMargin(get(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenter)->put_ContentMargin(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectionCheckMarkVisualEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionCheckMarkVisualEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectionCheckMarkVisualEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::CheckHintBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckHintBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_CheckHintBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::CheckSelectingBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckSelectingBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_CheckSelectingBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::CheckBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_CheckBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::DragBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_DragBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::DragForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_DragForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::FocusBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_FocusBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::PlaceholderBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_PlaceholderBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::PointerOverBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_PointerOverBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectedBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectedBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectedForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectedForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectedPointerOverBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectedPointerOverBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectedPointerOverBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectedPointerOverBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::SelectedBorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_SelectedBorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::DisabledOpacityProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisabledOpacityProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_DisabledOpacityProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::DragOpacityProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragOpacityProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_DragOpacityProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::ReorderHintOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ReorderHintOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_ReorderHintOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::GridViewItemPresenterHorizontalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterHorizontalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_GridViewItemPresenterHorizontalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::GridViewItemPresenterVerticalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterVerticalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_GridViewItemPresenterVerticalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::GridViewItemPresenterPaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GridViewItemPresenterPaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_GridViewItemPresenterPaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::PointerOverBackgroundMarginProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundMarginProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_PointerOverBackgroundMarginProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridViewItemPresenterStatics::ContentMarginProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentMarginProperty(put(value))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterStatics)->get_ContentMarginProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter impl_IGridViewItemPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter impl_IGridViewItemPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridViewItemPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IListViewItemPresenter::SelectionCheckMarkVisualEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionCheckMarkVisualEnabled(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectionCheckMarkVisualEnabled(&value)); return value; } template void impl_IListViewItemPresenter::SelectionCheckMarkVisualEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionCheckMarkVisualEnabled(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectionCheckMarkVisualEnabled(value)); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::CheckHintBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckHintBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_CheckHintBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter::CheckHintBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckHintBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_CheckHintBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::CheckSelectingBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckSelectingBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_CheckSelectingBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter::CheckSelectingBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckSelectingBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_CheckSelectingBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::CheckBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_CheckBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter::CheckBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_CheckBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::DragBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_DragBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::DragBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_DragBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_DragBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::DragForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragForeground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_DragForeground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::DragForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_DragForeground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_DragForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::FocusBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_FocusBorderBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter::FocusBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_FocusBorderBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_FocusBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::PlaceholderBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_PlaceholderBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::PlaceholderBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_PlaceholderBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::PointerOverBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_PointerOverBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::PointerOverBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerOverBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_PointerOverBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::SelectedBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectedBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::SelectedBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectedBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::SelectedForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForeground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectedForeground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::SelectedForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedForeground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectedForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::SelectedPointerOverBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectedPointerOverBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter::SelectedPointerOverBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPointerOverBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectedPointerOverBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter::SelectedPointerOverBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBorderBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectedPointerOverBorderBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter::SelectedPointerOverBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPointerOverBorderBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectedPointerOverBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IListViewItemPresenter::SelectedBorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderThickness(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_SelectedBorderThickness(put_abi(value))); return value; } template void impl_IListViewItemPresenter::SelectedBorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBorderThickness(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_SelectedBorderThickness(get_abi(value))); } template double impl_IListViewItemPresenter::DisabledOpacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DisabledOpacity(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_DisabledOpacity(&value)); return value; } template void impl_IListViewItemPresenter::DisabledOpacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DisabledOpacity(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_DisabledOpacity(value)); } template double impl_IListViewItemPresenter::DragOpacity() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DragOpacity(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_DragOpacity(&value)); return value; } template void impl_IListViewItemPresenter::DragOpacity(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DragOpacity(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_DragOpacity(value)); } template double impl_IListViewItemPresenter::ReorderHintOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ReorderHintOffset(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_ReorderHintOffset(&value)); return value; } template void impl_IListViewItemPresenter::ReorderHintOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ReorderHintOffset(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_ReorderHintOffset(value)); } template Windows::UI::Xaml::HorizontalAlignment impl_IListViewItemPresenter::ListViewItemPresenterHorizontalContentAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterHorizontalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_ListViewItemPresenterHorizontalContentAlignment(&value)); return value; } template void impl_IListViewItemPresenter::ListViewItemPresenterHorizontalContentAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_ListViewItemPresenterHorizontalContentAlignment(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_ListViewItemPresenterHorizontalContentAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_IListViewItemPresenter::ListViewItemPresenterVerticalContentAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterVerticalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_ListViewItemPresenterVerticalContentAlignment(&value)); return value; } template void impl_IListViewItemPresenter::ListViewItemPresenterVerticalContentAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_ListViewItemPresenterVerticalContentAlignment(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_ListViewItemPresenterVerticalContentAlignment(value)); } template Windows::UI::Xaml::Thickness impl_IListViewItemPresenter::ListViewItemPresenterPadding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterPadding(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_ListViewItemPresenterPadding(put_abi(value))); return value; } template void impl_IListViewItemPresenter::ListViewItemPresenterPadding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_ListViewItemPresenterPadding(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_ListViewItemPresenterPadding(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IListViewItemPresenter::PointerOverBackgroundMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundMargin(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_PointerOverBackgroundMargin(put_abi(value))); return value; } template void impl_IListViewItemPresenter::PointerOverBackgroundMargin(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerOverBackgroundMargin(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_PointerOverBackgroundMargin(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IListViewItemPresenter::ContentMargin() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_ContentMargin(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->get_ContentMargin(put_abi(value))); return value; } template void impl_IListViewItemPresenter::ContentMargin(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentMargin(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter)->put_ContentMargin(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectionCheckMarkVisualEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionCheckMarkVisualEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectionCheckMarkVisualEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::CheckHintBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckHintBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_CheckHintBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::CheckSelectingBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckSelectingBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_CheckSelectingBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::CheckBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_CheckBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::DragBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_DragBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::DragForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_DragForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::FocusBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_FocusBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::PlaceholderBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_PlaceholderBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::PointerOverBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_PointerOverBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectedBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectedBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectedForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectedForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectedPointerOverBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectedPointerOverBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectedPointerOverBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPointerOverBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectedPointerOverBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::SelectedBorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_SelectedBorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::DisabledOpacityProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisabledOpacityProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_DisabledOpacityProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::DragOpacityProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DragOpacityProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_DragOpacityProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::ReorderHintOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ReorderHintOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_ReorderHintOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::ListViewItemPresenterHorizontalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterHorizontalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_ListViewItemPresenterHorizontalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::ListViewItemPresenterVerticalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterVerticalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_ListViewItemPresenterVerticalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::ListViewItemPresenterPaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ListViewItemPresenterPaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_ListViewItemPresenterPaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::PointerOverBackgroundMarginProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverBackgroundMarginProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_PointerOverBackgroundMarginProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics::ContentMarginProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentMarginProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics)->get_ContentMarginProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter impl_IListViewItemPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter impl_IListViewItemPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewItemPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter2::SelectedPressedBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPressedBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_SelectedPressedBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter2::SelectedPressedBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPressedBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_SelectedPressedBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter2::PressedBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedBackground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_PressedBackground(put_abi(value))); return value; } template void impl_IListViewItemPresenter2::PressedBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PressedBackground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_PressedBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter2::CheckBoxBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBoxBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_CheckBoxBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter2::CheckBoxBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckBoxBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_CheckBoxBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter2::FocusSecondaryBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusSecondaryBorderBrush(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_FocusSecondaryBorderBrush(put_abi(value))); return value; } template void impl_IListViewItemPresenter2::FocusSecondaryBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_FocusSecondaryBorderBrush(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_FocusSecondaryBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode impl_IListViewItemPresenter2::CheckMode() const { Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode value {}; - check_hresult(static_cast(static_cast(*this))->get_CheckMode(&value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_CheckMode(&value)); return value; } template void impl_IListViewItemPresenter2::CheckMode(Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode value) const { - check_hresult(static_cast(static_cast(*this))->put_CheckMode(value)); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_CheckMode(value)); } template Windows::UI::Xaml::Media::Brush impl_IListViewItemPresenter2::PointerOverForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverForeground(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->get_PointerOverForeground(put_abi(value))); return value; } template void impl_IListViewItemPresenter2::PointerOverForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PointerOverForeground(get(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenter2)->put_PointerOverForeground(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::SelectedPressedBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPressedBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_SelectedPressedBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::PressedBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_PressedBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::CheckBoxBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckBoxBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_CheckBoxBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::FocusSecondaryBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusSecondaryBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_FocusSecondaryBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::CheckModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CheckModeProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_CheckModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewItemPresenterStatics2::PointerOverForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PointerOverForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewItemPresenterStatics2)->get_PointerOverForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::GeneratorPosition impl_IGeneratorPositionHelperStatics::FromIndexAndOffset(int32_t index, int32_t offset) const { Windows::UI::Xaml::Controls::Primitives::GeneratorPosition returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_FromIndexAndOffset(index, offset, put(returnValue))); + check_hresult(WINRT_SHIM(IGeneratorPositionHelperStatics)->abi_FromIndexAndOffset(index, offset, put_abi(returnValue))); return returnValue; } template bool impl_IFlyoutBaseClosingEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IFlyoutBaseClosingEventArgs)->get_Cancel(&value)); return value; } template void impl_IFlyoutBaseClosingEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IFlyoutBaseClosingEventArgs)->put_Cancel(value)); } template Windows::UI::Xaml::Controls::Primitives::FlyoutPlacementMode impl_IFlyoutBase::Placement() const { Windows::UI::Xaml::Controls::Primitives::FlyoutPlacementMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Placement(&value)); + check_hresult(WINRT_SHIM(IFlyoutBase)->get_Placement(&value)); return value; } template void impl_IFlyoutBase::Placement(Windows::UI::Xaml::Controls::Primitives::FlyoutPlacementMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Placement(value)); + check_hresult(WINRT_SHIM(IFlyoutBase)->put_Placement(value)); } -template event_token impl_IFlyoutBase::Opened(const Windows::Foundation::EventHandler & value) const +template event_token impl_IFlyoutBase::Opened(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->add_Opened(get_abi(value), &token)); return token; } -template event_revoker impl_IFlyoutBase::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IFlyoutBase::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IFlyoutBase::remove_Opened, Opened(value)); } template void impl_IFlyoutBase::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->remove_Opened(token)); } -template event_token impl_IFlyoutBase::Closed(const Windows::Foundation::EventHandler & value) const +template event_token impl_IFlyoutBase::Closed(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->add_Closed(get_abi(value), &token)); return token; } -template event_revoker impl_IFlyoutBase::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IFlyoutBase::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IFlyoutBase::remove_Closed, Closed(value)); } template void impl_IFlyoutBase::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->remove_Closed(token)); } -template event_token impl_IFlyoutBase::Opening(const Windows::Foundation::EventHandler & value) const +template event_token impl_IFlyoutBase::Opening(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opening(get(value), &token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->add_Opening(get_abi(value), &token)); return token; } -template event_revoker impl_IFlyoutBase::Opening(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IFlyoutBase::Opening(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::Primitives::IFlyoutBase::remove_Opening, Opening(value)); } template void impl_IFlyoutBase::Opening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opening(token)); + check_hresult(WINRT_SHIM(IFlyoutBase)->remove_Opening(token)); } template void impl_IFlyoutBase::ShowAt(const Windows::UI::Xaml::FrameworkElement & placementTarget) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowAt(get(placementTarget))); + check_hresult(WINRT_SHIM(IFlyoutBase)->abi_ShowAt(get_abi(placementTarget))); } template void impl_IFlyoutBase::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(IFlyoutBase)->abi_Hide()); } template Windows::UI::Xaml::Controls::Control impl_IFlyoutBaseOverrides::CreatePresenter() const { Windows::UI::Xaml::Controls::Control returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreatePresenter(put(returnValue))); + check_hresult(WINRT_SHIM(IFlyoutBaseOverrides)->abi_CreatePresenter(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics::PlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics)->get_PlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics::AttachedFlyoutProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AttachedFlyoutProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics)->get_AttachedFlyoutProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::FlyoutBase impl_IFlyoutBaseStatics::GetAttachedFlyout(const Windows::UI::Xaml::FrameworkElement & element) const { Windows::UI::Xaml::Controls::Primitives::FlyoutBase value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAttachedFlyout(get(element), put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics)->abi_GetAttachedFlyout(get_abi(element), put_abi(value))); return value; } template void impl_IFlyoutBaseStatics::SetAttachedFlyout(const Windows::UI::Xaml::FrameworkElement & element, const Windows::UI::Xaml::Controls::Primitives::FlyoutBase & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAttachedFlyout(get(element), get(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics)->abi_SetAttachedFlyout(get_abi(element), get_abi(value))); } template void impl_IFlyoutBaseStatics::ShowAttachedFlyout(const Windows::UI::Xaml::FrameworkElement & flyoutOwner) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowAttachedFlyout(get(flyoutOwner))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics)->abi_ShowAttachedFlyout(get_abi(flyoutOwner))); } -template Windows::UI::Xaml::Controls::Primitives::FlyoutBase impl_IFlyoutBaseFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::FlyoutBase impl_IFlyoutBaseFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::FlyoutBase instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlyoutBaseFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::FrameworkElement impl_IFlyoutBase2::Target() const { Windows::UI::Xaml::FrameworkElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Target(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBase2)->get_Target(put_abi(value))); return value; } template bool impl_IFlyoutBase2::AllowFocusOnInteraction() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowFocusOnInteraction(&value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->get_AllowFocusOnInteraction(&value)); return value; } template void impl_IFlyoutBase2::AllowFocusOnInteraction(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowFocusOnInteraction(value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->put_AllowFocusOnInteraction(value)); } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IFlyoutBase2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IFlyoutBase2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->put_LightDismissOverlayMode(value)); } template bool impl_IFlyoutBase2::AllowFocusWhenDisabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AllowFocusWhenDisabled(&value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->get_AllowFocusWhenDisabled(&value)); return value; } template void impl_IFlyoutBase2::AllowFocusWhenDisabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowFocusWhenDisabled(value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->put_AllowFocusWhenDisabled(value)); } template Windows::UI::Xaml::ElementSoundMode impl_IFlyoutBase2::ElementSoundMode() const { Windows::UI::Xaml::ElementSoundMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ElementSoundMode(&value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->get_ElementSoundMode(&value)); return value; } template void impl_IFlyoutBase2::ElementSoundMode(Windows::UI::Xaml::ElementSoundMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ElementSoundMode(value)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->put_ElementSoundMode(value)); } template event_token impl_IFlyoutBase2::Closing(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closing(get(value), &token)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->add_Closing(get_abi(value), &token)); return token; } @@ -10395,239 +10909,239 @@ template event_revoker impl_IFlyoutBase2::Closing( template void impl_IFlyoutBase2::Closing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closing(token)); + check_hresult(WINRT_SHIM(IFlyoutBase2)->remove_Closing(token)); } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics2::AllowFocusOnInteractionProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AllowFocusOnInteractionProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics2)->get_AllowFocusOnInteractionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics2::AllowFocusWhenDisabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AllowFocusWhenDisabledProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics2)->get_AllowFocusWhenDisabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutBaseStatics2::ElementSoundModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ElementSoundModeProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutBaseStatics2)->get_ElementSoundModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_IJumpListItemBackgroundConverter::Enabled() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Enabled(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverter)->get_Enabled(put_abi(value))); return value; } template void impl_IJumpListItemBackgroundConverter::Enabled(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(get(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverter)->put_Enabled(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IJumpListItemBackgroundConverter::Disabled() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Disabled(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverter)->get_Disabled(put_abi(value))); return value; } template void impl_IJumpListItemBackgroundConverter::Disabled(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Disabled(get(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverter)->put_Disabled(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IJumpListItemBackgroundConverterStatics::EnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverterStatics)->get_EnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IJumpListItemBackgroundConverterStatics::DisabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisabledProperty(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemBackgroundConverterStatics)->get_DisabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_IJumpListItemForegroundConverter::Enabled() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Enabled(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverter)->get_Enabled(put_abi(value))); return value; } template void impl_IJumpListItemForegroundConverter::Enabled(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Enabled(get(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverter)->put_Enabled(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IJumpListItemForegroundConverter::Disabled() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Disabled(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverter)->get_Disabled(put_abi(value))); return value; } template void impl_IJumpListItemForegroundConverter::Disabled(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Disabled(get(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverter)->put_Disabled(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IJumpListItemForegroundConverterStatics::EnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_EnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverterStatics)->get_EnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IJumpListItemForegroundConverterStatics::DisabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisabledProperty(put(value))); + check_hresult(WINRT_SHIM(IJumpListItemForegroundConverterStatics)->get_DisabledProperty(put_abi(value))); return value; } template void impl_IPickerFlyoutBaseOverrides::OnConfirmed() const { - check_hresult(static_cast(static_cast(*this))->abi_OnConfirmed()); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseOverrides)->abi_OnConfirmed()); } template bool impl_IPickerFlyoutBaseOverrides::ShouldShowConfirmationButtons() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_ShouldShowConfirmationButtons(&returnValue)); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseOverrides)->abi_ShouldShowConfirmationButtons(&returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IPickerFlyoutBaseStatics::TitleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleProperty(put(value))); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseStatics)->get_TitleProperty(put_abi(value))); return value; } template hstring impl_IPickerFlyoutBaseStatics::GetTitle(const Windows::UI::Xaml::DependencyObject & element) const { hstring value; - check_hresult(static_cast(static_cast(*this))->abi_GetTitle(get(element), put(value))); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseStatics)->abi_GetTitle(get_abi(element), put_abi(value))); return value; } -template void impl_IPickerFlyoutBaseStatics::SetTitle(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) const +template void impl_IPickerFlyoutBaseStatics::SetTitle(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetTitle(get(element), get(value))); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseStatics)->abi_SetTitle(get_abi(element), get_abi(value))); } -template Windows::UI::Xaml::Controls::Primitives::PickerFlyoutBase impl_IPickerFlyoutBaseFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::PickerFlyoutBase impl_IPickerFlyoutBaseFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::PickerFlyoutBase instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IPickerFlyoutBaseFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_ILoopingSelector::ShouldLoop() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShouldLoop(&value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->get_ShouldLoop(&value)); return value; } template void impl_ILoopingSelector::ShouldLoop(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShouldLoop(value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_ShouldLoop(value)); } -template Windows::Foundation::Collections::IVector impl_ILoopingSelector::Items() const +template Windows::Foundation::Collections::IVector impl_ILoopingSelector::Items() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(ILoopingSelector)->get_Items(put_abi(value))); return value; } -template void impl_ILoopingSelector::Items(const Windows::Foundation::Collections::IVector & value) const +template void impl_ILoopingSelector::Items(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_Items(get(value))); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_Items(get_abi(value))); } template int32_t impl_ILoopingSelector::SelectedIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndex(&value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->get_SelectedIndex(&value)); return value; } template void impl_ILoopingSelector::SelectedIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedIndex(value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_SelectedIndex(value)); } -template Windows::IInspectable impl_ILoopingSelector::SelectedItem() const +template Windows::Foundation::IInspectable impl_ILoopingSelector::SelectedItem() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SelectedItem(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ILoopingSelector)->get_SelectedItem(put_abi(value))); return value; } -template void impl_ILoopingSelector::SelectedItem(const Windows::IInspectable & value) const +template void impl_ILoopingSelector::SelectedItem(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedItem(get(value))); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_SelectedItem(get_abi(value))); } template int32_t impl_ILoopingSelector::ItemWidth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemWidth(&value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->get_ItemWidth(&value)); return value; } template void impl_ILoopingSelector::ItemWidth(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemWidth(value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_ItemWidth(value)); } template int32_t impl_ILoopingSelector::ItemHeight() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemHeight(&value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->get_ItemHeight(&value)); return value; } template void impl_ILoopingSelector::ItemHeight(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemHeight(value)); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_ItemHeight(value)); } template Windows::UI::Xaml::DataTemplate impl_ILoopingSelector::ItemTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplate(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelector)->get_ItemTemplate(put_abi(value))); return value; } template void impl_ILoopingSelector::ItemTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemTemplate(get(value))); + check_hresult(WINRT_SHIM(ILoopingSelector)->put_ItemTemplate(get_abi(value))); } template event_token impl_ILoopingSelector::SelectionChanged(const Windows::UI::Xaml::Controls::SelectionChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ILoopingSelector)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -10638,62 +11152,62 @@ template event_revoker impl_ILoopingSelector:: template void impl_ILoopingSelector::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(ILoopingSelector)->remove_SelectionChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::ShouldLoopProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShouldLoopProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_ShouldLoopProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::ItemsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_ItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::SelectedIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedIndexProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_SelectedIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::SelectedItemProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedItemProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_SelectedItemProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::ItemWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemWidthProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_ItemWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::ItemHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemHeightProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_ItemHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ILoopingSelectorStatics::ItemTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(ILoopingSelectorStatics)->get_ItemTemplateProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem impl_IPivotHeaderItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem impl_IPivotHeaderItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IPivotHeaderItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } @@ -10728,25 +11242,25 @@ inline CalendarPanel::CalendarPanel() : inline CarouselPanel::CarouselPanel() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } inline DragCompletedEventArgs::DragCompletedEventArgs(double horizontalChange, double verticalChange, bool canceled) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, outer, inner)); } inline DragDeltaEventArgs::DragDeltaEventArgs(double horizontalChange, double verticalChange) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, outer, inner)); } inline DragStartedEventArgs::DragStartedEventArgs(double horizontalOffset, double verticalOffset) { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, outer, inner)); } @@ -10802,7 +11316,7 @@ inline Windows::UI::Xaml::Controls::Primitives::GeneratorPosition GeneratorPosit inline GridViewItemPresenter::GridViewItemPresenter() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -10944,7 +11458,7 @@ inline Windows::UI::Xaml::DependencyProperty JumpListItemForegroundConverter::Di return get_activation_factory().DisabledProperty(); } -inline Windows::UI::Xaml::UIElement LayoutInformation::GetLayoutExceptionElement(const Windows::IInspectable & dispatcher) +inline Windows::UI::Xaml::UIElement LayoutInformation::GetLayoutExceptionElement(const Windows::Foundation::IInspectable & dispatcher) { return get_activation_factory().GetLayoutExceptionElement(dispatcher); } @@ -10956,7 +11470,7 @@ inline Windows::Foundation::Rect LayoutInformation::GetLayoutSlot(const Windows: inline ListViewItemPresenter::ListViewItemPresenter() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -11145,14 +11659,14 @@ inline hstring PickerFlyoutBase::GetTitle(const Windows::UI::Xaml::DependencyObj return get_activation_factory().GetTitle(element); } -inline void PickerFlyoutBase::SetTitle(const Windows::UI::Xaml::DependencyObject & element, hstring_ref value) +inline void PickerFlyoutBase::SetTitle(const Windows::UI::Xaml::DependencyObject & element, hstring_view value) { get_activation_factory().SetTitle(element, value); } inline PivotHeaderItem::PivotHeaderItem() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -11320,7 +11834,7 @@ inline Windows::UI::Xaml::DependencyProperty TickBar::FillProperty() inline ToggleButton::ToggleButton() { - Windows::IInspectable outer, inner; + Windows::Foundation::IInspectable outer, inner; impl_move(get_activation_factory().CreateInstance(outer, inner)); } @@ -11337,3 +11851,1283 @@ inline Windows::UI::Xaml::DependencyProperty ToggleButton::IsThreeStateProperty( } } + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IButtonBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IButtonBaseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IButtonBaseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICalendarPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICarouselPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICarouselPanelFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings3 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBase2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBaseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGeneratorPositionHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGridViewItemPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGridViewItemPresenterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILayoutInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILayoutInformationStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemPresenter2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemPresenterFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILoopingSelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILoopingSelectorItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILoopingSelectorPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanelFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPickerFlyoutBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPivotHeaderItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPivotHeaderPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPivotPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPopup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPopup2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPopupStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IPopupStatics2 & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IProgressBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IProgressRingTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRangeBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRangeBaseFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRangeBaseOverrides & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRangeBaseStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRepeatButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IRepeatButtonStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IScrollBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IScrollBarStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IScrollEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelectorFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelectorItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelectorItemFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelectorItemStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISelectorStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISettingsFlyoutTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IThumb & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IThumbStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ITickBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ITickBarStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToggleButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToggleButtonFactory & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToggleButtonOverrides & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToggleButtonStatics & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::AppBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ButtonBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::CalendarPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::CarouselPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::CommandBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::DragCompletedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::DragDeltaEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::DragStartedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::FlyoutBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::GeneratorPositionHelper & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::GridViewItemTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::JumpListItemBackgroundConverter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::JumpListItemForegroundConverter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::LayoutInformation & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ListViewItemTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::LoopingSelector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::LoopingSelectorItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::LoopingSelectorPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::MenuFlyoutPresenterTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::OrientedVirtualizingPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::PickerFlyoutBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::PivotHeaderPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::PivotPanel & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::Popup & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ProgressBarTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ProgressRingTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::RangeBase & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::RepeatButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ScrollBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ScrollEventArgs & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::Selector & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::SelectorItem & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::SettingsFlyoutTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::Thumb & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::TickBar & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ToggleButton & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +template<> +struct std::hash +{ + size_t operator()(const winrt::Windows::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings & value) const noexcept + { + return winrt::impl::hash_unknown(value); + } +}; + +WINRT_WARNING_POP diff --git a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.h b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.h index b6aa9d4a8..7a28aca04 100644 --- a/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.h +++ b/10.0.14393.0/winrt/Windows.UI.Xaml.Controls.h @@ -1,8 +1,11 @@ -// C++ for the Windows Runtime v1.0.161012.5 -// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// C++ for the Windows Runtime v1.0.170301.3 +// Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once +#include "base.h" +WINRT_WARNING_PUSH + #include "internal/Windows.Foundation.3.h" #include "internal/Windows.UI.Xaml.3.h" #include "internal/Windows.UI.Xaml.Interop.3.h" @@ -57,9 +60,9 @@ template BackClickEventHandler::BackClickEventHandler(O BackClickEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void BackClickEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::BackClickEventArgs & e) const +inline void BackClickEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::BackClickEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(L lambda) : @@ -76,7 +79,7 @@ template CalendarViewDayItemChangingEventHandler::Calen inline void CalendarViewDayItemChangingEventHandler::operator()(const Windows::UI::Xaml::Controls::CalendarView & sender, const Windows::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(L lambda) : @@ -91,9 +94,9 @@ template CleanUpVirtualizedItemEventHandler::CleanUpVir CleanUpVirtualizedItemEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void CleanUpVirtualizedItemEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs & e) const +inline void CleanUpVirtualizedItemEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(L lambda) : @@ -108,9 +111,9 @@ template ContextMenuOpeningEventHandler::ContextMenuOpe ContextMenuOpeningEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ContextMenuOpeningEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::ContextMenuEventArgs & e) const +inline void ContextMenuOpeningEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::ContextMenuEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template DragItemsStartingEventHandler::DragItemsStartingEventHandler(L lambda) : @@ -125,9 +128,9 @@ template DragItemsStartingEventHandler::DragItemsStarti DragItemsStartingEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void DragItemsStartingEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::DragItemsStartingEventArgs & e) const +inline void DragItemsStartingEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::DragItemsStartingEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(L lambda) : @@ -142,9 +145,9 @@ template HubSectionHeaderClickEventHandler::HubSectionH HubSectionHeaderClickEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void HubSectionHeaderClickEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::HubSectionHeaderClickEventArgs & e) const +inline void HubSectionHeaderClickEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::HubSectionHeaderClickEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ItemClickEventHandler::ItemClickEventHandler(L lambda) : @@ -159,9 +162,9 @@ template ItemClickEventHandler::ItemClickEventHandler(O ItemClickEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void ItemClickEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::ItemClickEventArgs & e) const +inline void ItemClickEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::ItemClickEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template ListViewItemToKeyHandler::ListViewItemToKeyHandler(L lambda) : @@ -176,10 +179,10 @@ template ListViewItemToKeyHandler::ListViewItemToKeyHan ListViewItemToKeyHandler([=](auto && ... args) { return ((*object).*(method))(args ...); }) {} -inline hstring ListViewItemToKeyHandler::operator()(const Windows::IInspectable & item) const +inline hstring ListViewItemToKeyHandler::operator()(const Windows::Foundation::IInspectable & item) const { hstring returnValue; - check_hresult((*this)->abi_Invoke(get(item), put(returnValue))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(item), put_abi(returnValue))); return returnValue; } @@ -195,10 +198,10 @@ template ListViewKeyToItemHandler::ListViewKeyToItemHan ListViewKeyToItemHandler([=](auto && ... args) { return ((*object).*(method))(args ...); }) {} -inline Windows::Foundation::IAsyncOperation ListViewKeyToItemHandler::operator()(hstring_ref key) const +inline Windows::Foundation::IAsyncOperation ListViewKeyToItemHandler::operator()(hstring_view key) const { - Windows::Foundation::IAsyncOperation returnValue; - check_hresult((*this)->abi_Invoke(get(key), put(returnValue))); + Windows::Foundation::IAsyncOperation returnValue; + check_hresult((*(abi **)this)->abi_Invoke(get_abi(key), put_abi(returnValue))); return returnValue; } @@ -214,9 +217,9 @@ template NotifyEventHandler::NotifyEventHandler(O * obj NotifyEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void NotifyEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::NotifyEventArgs & e) const +inline void NotifyEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::NotifyEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(L lambda) : @@ -231,9 +234,9 @@ template SectionsInViewChangedEventHandler::SectionsInV SectionsInViewChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void SectionsInViewChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::SectionsInViewChangedEventArgs & e) const +inline void SectionsInViewChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::SectionsInViewChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template SelectionChangedEventHandler::SelectionChangedEventHandler(L lambda) : @@ -248,9 +251,9 @@ template SelectionChangedEventHandler::SelectionChanged SelectionChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void SelectionChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::SelectionChangedEventArgs & e) const +inline void SelectionChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::SelectionChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(L lambda) : @@ -265,9 +268,9 @@ template SemanticZoomViewChangedEventHandler::SemanticZ SemanticZoomViewChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void SemanticZoomViewChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs & e) const +inline void SemanticZoomViewChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template TextChangedEventHandler::TextChangedEventHandler(L lambda) : @@ -282,9 +285,9 @@ template TextChangedEventHandler::TextChangedEventHandl TextChangedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void TextChangedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::TextChangedEventArgs & e) const +inline void TextChangedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::TextChangedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template TextControlPasteEventHandler::TextControlPasteEventHandler(L lambda) : @@ -299,9 +302,9 @@ template TextControlPasteEventHandler::TextControlPaste TextControlPasteEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void TextControlPasteEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::TextControlPasteEventArgs & e) const +inline void TextControlPasteEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::TextControlPasteEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } template WebViewNavigationFailedEventHandler::WebViewNavigationFailedEventHandler(L lambda) : @@ -316,9 +319,9 @@ template WebViewNavigationFailedEventHandler::WebViewNa WebViewNavigationFailedEventHandler([=](auto && ... args) { ((*object).*(method))(args ...); }) {} -inline void WebViewNavigationFailedEventHandler::operator()(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::WebViewNavigationFailedEventArgs & e) const +inline void WebViewNavigationFailedEventHandler::operator()(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::WebViewNavigationFailedEventArgs & e) const { - check_hresult((*this)->abi_Invoke(get(sender), get(e))); + check_hresult((*(abi **)this)->abi_Invoke(get_abi(sender), get_abi(e))); } } @@ -332,7 +335,8 @@ struct produce : produce_baseshim().IsOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpen()); return S_OK; } catch (...) @@ -345,6 +349,7 @@ struct produce : produce_baseshim()); this->shim().IsOpen(value); return S_OK; } @@ -358,7 +363,8 @@ struct produce : produce_baseshim().IsSticky()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSticky()); return S_OK; } catch (...) @@ -371,6 +377,7 @@ struct produce : produce_baseshim()); this->shim().IsSticky(value); return S_OK; } @@ -380,11 +387,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -397,6 +405,7 @@ struct produce : produce_baseshim()); this->shim().Opened(token); return S_OK; } @@ -406,11 +415,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -423,6 +433,7 @@ struct produce : produce_baseshim()); this->shim().Closed(token); return S_OK; } @@ -440,7 +451,8 @@ struct produce : produce_baseshim().ClosedDisplayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClosedDisplayMode()); return S_OK; } catch (...) @@ -453,6 +465,7 @@ struct produce : produce_baseshim()); this->shim().ClosedDisplayMode(value); return S_OK; } @@ -466,11 +479,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TemplateSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -480,11 +494,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Opening(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opening(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opening(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -497,6 +512,7 @@ struct produce : produce_baseshim()); this->shim().Opening(token); return S_OK; } @@ -506,11 +522,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Closing(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closing(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closing(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -523,6 +540,7 @@ struct produce : produce_baseshim()); this->shim().Closing(token); return S_OK; } @@ -540,7 +558,8 @@ struct produce : produce_baseshim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -553,6 +572,7 @@ struct produce : produce_baseshim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -566,11 +586,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Label(abi_arg_out value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -580,10 +601,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -593,11 +615,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -607,10 +630,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Icon(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Icon(*reinterpret_cast(&value)); return S_OK; } @@ -628,7 +652,8 @@ struct produce : produce_baseshim().LabelPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelPosition()); return S_OK; } catch (...) @@ -641,6 +666,7 @@ struct produce : produce_baseshim()); this->shim().LabelPosition(value); return S_OK; } @@ -654,11 +680,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -673,11 +700,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_LabelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LabelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelProperty()); return S_OK; } catch (...) @@ -687,11 +715,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IconProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IconProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconProperty()); return S_OK; } catch (...) @@ -701,11 +730,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsCompactProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCompactProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCompactProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompactProperty()); return S_OK; } catch (...) @@ -719,11 +749,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_LabelPositionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LabelPositionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabelPositionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelPositionProperty()); return S_OK; } catch (...) @@ -733,11 +764,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsInOverflowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsInOverflowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsInOverflowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInOverflowProperty()); return S_OK; } catch (...) @@ -747,11 +779,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_DynamicOverflowOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DynamicOverflowOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DynamicOverflowOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DynamicOverflowOrderProperty()); return S_OK; } catch (...) @@ -765,11 +798,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -784,11 +818,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OnClosed(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnClosed(impl::abi_arg_in e) noexcept override { try { - this->shim().OnClosed(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnClosed(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -797,11 +832,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_OnOpened(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnOpened(impl::abi_arg_in e) noexcept override { try { - this->shim().OnOpened(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnOpened(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -814,11 +850,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_OnClosing(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnClosing(impl::abi_arg_in e) noexcept override { try { - this->shim().OnClosing(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnClosing(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -827,11 +864,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnOpening(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnOpening(impl::abi_arg_in e) noexcept override { try { - this->shim().OnOpening(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnOpening(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -848,11 +886,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -867,11 +906,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_IsCompactProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCompactProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCompactProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompactProperty()); return S_OK; } catch (...) @@ -885,11 +925,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_IsInOverflowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsInOverflowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsInOverflowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInOverflowProperty()); return S_OK; } catch (...) @@ -899,11 +940,12 @@ struct produce : produ } } - HRESULT __stdcall get_DynamicOverflowOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DynamicOverflowOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DynamicOverflowOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DynamicOverflowOrderProperty()); return S_OK; } catch (...) @@ -917,11 +959,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_IsOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpenProperty()); return S_OK; } catch (...) @@ -931,11 +974,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsStickyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsStickyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStickyProperty()); return S_OK; } catch (...) @@ -949,11 +993,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ClosedDisplayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClosedDisplayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClosedDisplayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClosedDisplayModeProperty()); return S_OK; } catch (...) @@ -967,11 +1012,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -985,11 +1031,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Label(abi_arg_out value) noexcept override + HRESULT __stdcall get_Label(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Label()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Label()); return S_OK; } catch (...) @@ -999,10 +1046,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Label(abi_arg_in value) noexcept override + HRESULT __stdcall put_Label(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return S_OK; } @@ -1012,11 +1060,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Icon(abi_arg_out value) noexcept override + HRESULT __stdcall get_Icon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Icon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Icon()); return S_OK; } catch (...) @@ -1026,10 +1075,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Icon(abi_arg_in value) noexcept override + HRESULT __stdcall put_Icon(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Icon(*reinterpret_cast(&value)); return S_OK; } @@ -1047,7 +1097,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().LabelPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelPosition()); return S_OK; } catch (...) @@ -1060,6 +1111,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().LabelPosition(value); return S_OK; } @@ -1073,11 +1125,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1092,11 +1145,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_LabelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LabelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelProperty()); return S_OK; } catch (...) @@ -1106,11 +1160,12 @@ struct produce : pro } } - HRESULT __stdcall get_IconProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IconProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconProperty()); return S_OK; } catch (...) @@ -1120,11 +1175,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsCompactProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCompactProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCompactProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompactProperty()); return S_OK; } catch (...) @@ -1138,11 +1194,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_LabelPositionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LabelPositionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LabelPositionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LabelPositionProperty()); return S_OK; } catch (...) @@ -1152,11 +1209,12 @@ struct produce : pr } } - HRESULT __stdcall get_IsInOverflowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsInOverflowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsInOverflowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInOverflowProperty()); return S_OK; } catch (...) @@ -1166,11 +1224,12 @@ struct produce : pr } } - HRESULT __stdcall get_DynamicOverflowOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DynamicOverflowOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DynamicOverflowOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DynamicOverflowOrderProperty()); return S_OK; } catch (...) @@ -1188,7 +1247,8 @@ struct produce : produce_baseshim().MaxSuggestionListHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSuggestionListHeight()); return S_OK; } catch (...) @@ -1201,6 +1261,7 @@ struct produce : produce_baseshim()); this->shim().MaxSuggestionListHeight(value); return S_OK; } @@ -1214,7 +1275,8 @@ struct produce : produce_baseshim().IsSuggestionListOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuggestionListOpen()); return S_OK; } catch (...) @@ -1227,6 +1289,7 @@ struct produce : produce_baseshim()); this->shim().IsSuggestionListOpen(value); return S_OK; } @@ -1236,11 +1299,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TextMemberPath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextMemberPath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextMemberPath()); return S_OK; } catch (...) @@ -1250,10 +1314,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TextMemberPath(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextMemberPath(*reinterpret_cast(&value)); return S_OK; } @@ -1263,11 +1328,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -1277,10 +1343,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -1294,7 +1361,8 @@ struct produce : produce_baseshim().UpdateTextOnSelect()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTextOnSelect()); return S_OK; } catch (...) @@ -1307,6 +1375,7 @@ struct produce : produce_baseshim()); this->shim().UpdateTextOnSelect(value); return S_OK; } @@ -1316,11 +1385,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -1330,10 +1400,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -1343,11 +1414,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -1357,11 +1429,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -1374,7 +1447,8 @@ struct produce : produce_baseshim().AutoMaximizeSuggestionArea()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoMaximizeSuggestionArea()); return S_OK; } catch (...) @@ -1387,6 +1461,7 @@ struct produce : produce_baseshim()); this->shim().AutoMaximizeSuggestionArea(value); return S_OK; } @@ -1396,11 +1471,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TextBoxStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextBoxStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextBoxStyle()); return S_OK; } catch (...) @@ -1410,10 +1486,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TextBoxStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TextBoxStyle(*reinterpret_cast(&value)); return S_OK; } @@ -1423,11 +1500,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SuggestionChosen(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SuggestionChosen(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SuggestionChosen(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1440,6 +1518,7 @@ struct produce : produce_baseshim()); this->shim().SuggestionChosen(token); return S_OK; } @@ -1449,11 +1528,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1466,6 +1546,7 @@ struct produce : produce_baseshim()); this->shim().TextChanged(token); return S_OK; } @@ -1479,11 +1560,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_QueryIcon(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryIcon(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryIcon()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryIcon()); return S_OK; } catch (...) @@ -1493,10 +1575,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_QueryIcon(abi_arg_in value) noexcept override + HRESULT __stdcall put_QueryIcon(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().QueryIcon(*reinterpret_cast(&value)); return S_OK; } @@ -1506,11 +1589,12 @@ struct produce : produce_base< } } - HRESULT __stdcall add_QuerySubmitted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_QuerySubmitted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().QuerySubmitted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuerySubmitted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -1523,6 +1607,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().QuerySubmitted(token); return S_OK; } @@ -1540,7 +1625,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -1553,6 +1639,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -1566,11 +1653,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -1580,11 +1668,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ChosenSuggestion(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChosenSuggestion()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChosenSuggestion()); return S_OK; } catch (...) @@ -1598,11 +1687,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MaxSuggestionListHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxSuggestionListHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxSuggestionListHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxSuggestionListHeightProperty()); return S_OK; } catch (...) @@ -1612,11 +1702,12 @@ struct produce : produce } } - HRESULT __stdcall get_IsSuggestionListOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSuggestionListOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSuggestionListOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuggestionListOpenProperty()); return S_OK; } catch (...) @@ -1626,11 +1717,12 @@ struct produce : produce } } - HRESULT __stdcall get_TextMemberPathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextMemberPathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextMemberPathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextMemberPathProperty()); return S_OK; } catch (...) @@ -1640,11 +1732,12 @@ struct produce : produce } } - HRESULT __stdcall get_TextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextProperty()); return S_OK; } catch (...) @@ -1654,11 +1747,12 @@ struct produce : produce } } - HRESULT __stdcall get_UpdateTextOnSelectProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_UpdateTextOnSelectProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UpdateTextOnSelectProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UpdateTextOnSelectProperty()); return S_OK; } catch (...) @@ -1668,11 +1762,12 @@ struct produce : produce } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -1682,11 +1777,12 @@ struct produce : produce } } - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -1696,11 +1792,12 @@ struct produce : produce } } - HRESULT __stdcall get_AutoMaximizeSuggestionAreaProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoMaximizeSuggestionAreaProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoMaximizeSuggestionAreaProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoMaximizeSuggestionAreaProperty()); return S_OK; } catch (...) @@ -1710,11 +1807,12 @@ struct produce : produce } } - HRESULT __stdcall get_TextBoxStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextBoxStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextBoxStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextBoxStyleProperty()); return S_OK; } catch (...) @@ -1728,11 +1826,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_QueryIconProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryIconProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryIconProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryIconProperty()); return S_OK; } catch (...) @@ -1746,11 +1845,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -1764,11 +1864,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_SelectedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -1786,7 +1887,8 @@ struct produceshim().Reason()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Reason()); return S_OK; } catch (...) @@ -1799,6 +1901,7 @@ struct produceshim()); this->shim().Reason(value); return S_OK; } @@ -1812,7 +1915,8 @@ struct produceshim().CheckCurrent()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CheckCurrent()); return S_OK; } catch (...) @@ -1825,11 +1929,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ReasonProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReasonProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReasonProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReasonProperty()); return S_OK; } catch (...) @@ -1847,7 +1952,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -1860,6 +1966,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return S_OK; } @@ -1873,11 +1980,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_UriSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_UriSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UriSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UriSource()); return S_OK; } catch (...) @@ -1887,10 +1995,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_UriSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().UriSource(*reinterpret_cast(&value)); return S_OK; } @@ -1904,11 +2013,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -1923,11 +2033,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_UriSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_UriSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UriSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UriSourceProperty()); return S_OK; } catch (...) @@ -1941,11 +2052,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_BorderBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -1955,10 +2067,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -1968,11 +2081,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -1981,10 +2095,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -1994,11 +2109,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -2008,10 +2124,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -2021,11 +2138,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadius()); return S_OK; } catch (...) @@ -2034,10 +2152,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CornerRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CornerRadius(*reinterpret_cast(&value)); return S_OK; } @@ -2047,11 +2166,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -2060,10 +2180,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -2073,11 +2194,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Child(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Child()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Child()); return S_OK; } catch (...) @@ -2087,10 +2209,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Child(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Child(*reinterpret_cast(&value)); return S_OK; } @@ -2100,11 +2223,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ChildTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ChildTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildTransitions()); return S_OK; } catch (...) @@ -2114,10 +2238,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ChildTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChildTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -2131,11 +2256,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -2145,11 +2271,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -2159,11 +2286,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundProperty()); return S_OK; } catch (...) @@ -2173,11 +2301,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadiusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadiusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadiusProperty()); return S_OK; } catch (...) @@ -2187,11 +2316,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -2201,11 +2331,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ChildTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildTransitionsProperty()); return S_OK; } catch (...) @@ -2223,11 +2354,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2242,11 +2374,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FlyoutProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FlyoutProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlyoutProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlyoutProperty()); return S_OK; } catch (...) @@ -2260,11 +2393,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Flyout(abi_arg_out value) noexcept override + HRESULT __stdcall get_Flyout(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Flyout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Flyout()); return S_OK; } catch (...) @@ -2274,10 +2408,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Flyout(abi_arg_in value) noexcept override + HRESULT __stdcall put_Flyout(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Flyout(*reinterpret_cast(&value)); return S_OK; } @@ -2291,11 +2426,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Date(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -2305,10 +2441,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Date(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Date(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Date(*reinterpret_cast *>(&value)); return S_OK; } @@ -2322,7 +2459,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsCalendarOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCalendarOpen()); return S_OK; } catch (...) @@ -2335,6 +2473,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCalendarOpen(value); return S_OK; } @@ -2344,11 +2483,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DateFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateFormat()); return S_OK; } catch (...) @@ -2358,10 +2498,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_DateFormat(abi_arg_in value) noexcept override + HRESULT __stdcall put_DateFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DateFormat(*reinterpret_cast(&value)); return S_OK; } @@ -2371,11 +2512,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_PlaceholderText(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -2385,10 +2527,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_PlaceholderText(abi_arg_in value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -2398,11 +2541,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -2412,11 +2556,12 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Header(abi_arg_in value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -2425,11 +2570,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_HeaderTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -2439,10 +2585,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_HeaderTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -2452,11 +2599,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_CalendarViewStyle(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarViewStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarViewStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarViewStyle()); return S_OK; } catch (...) @@ -2466,10 +2614,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_CalendarViewStyle(abi_arg_in value) noexcept override + HRESULT __stdcall put_CalendarViewStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarViewStyle(*reinterpret_cast(&value)); return S_OK; } @@ -2479,11 +2628,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MinDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDate()); return S_OK; } catch (...) @@ -2492,10 +2642,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_MinDate(abi_arg_in value) noexcept override + HRESULT __stdcall put_MinDate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinDate(*reinterpret_cast(&value)); return S_OK; } @@ -2505,11 +2656,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MaxDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDate()); return S_OK; } catch (...) @@ -2518,10 +2670,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_MaxDate(abi_arg_in value) noexcept override + HRESULT __stdcall put_MaxDate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxDate(*reinterpret_cast(&value)); return S_OK; } @@ -2535,7 +2688,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsTodayHighlighted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTodayHighlighted()); return S_OK; } catch (...) @@ -2548,6 +2702,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsTodayHighlighted(value); return S_OK; } @@ -2561,7 +2716,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().DisplayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMode()); return S_OK; } catch (...) @@ -2574,6 +2730,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMode(value); return S_OK; } @@ -2587,7 +2744,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().FirstDayOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstDayOfWeek()); return S_OK; } catch (...) @@ -2600,6 +2758,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstDayOfWeek(value); return S_OK; } @@ -2609,11 +2768,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_DayOfWeekFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayOfWeekFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayOfWeekFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeekFormat()); return S_OK; } catch (...) @@ -2623,10 +2783,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_DayOfWeekFormat(abi_arg_in value) noexcept override + HRESULT __stdcall put_DayOfWeekFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayOfWeekFormat(*reinterpret_cast(&value)); return S_OK; } @@ -2636,11 +2797,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_CalendarIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifier()); return S_OK; } catch (...) @@ -2650,10 +2812,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_CalendarIdentifier(abi_arg_in value) noexcept override + HRESULT __stdcall put_CalendarIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -2667,7 +2830,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsOutOfScopeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutOfScopeEnabled()); return S_OK; } catch (...) @@ -2680,6 +2844,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsOutOfScopeEnabled(value); return S_OK; } @@ -2693,7 +2858,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsGroupLabelVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupLabelVisible()); return S_OK; } catch (...) @@ -2706,6 +2872,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsGroupLabelVisible(value); return S_OK; } @@ -2715,11 +2882,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_CalendarViewDayItemChanging(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_CalendarViewDayItemChanging(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().CalendarViewDayItemChanging(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CalendarViewDayItemChanging(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -2732,6 +2900,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarViewDayItemChanging(token); return S_OK; } @@ -2741,11 +2910,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_DateChanged(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_DateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2758,6 +2928,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DateChanged(token); return S_OK; } @@ -2767,11 +2938,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_Opened(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2784,6 +2956,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Opened(token); return S_OK; } @@ -2793,11 +2966,12 @@ struct produce : produce_ba } } - HRESULT __stdcall add_Closed(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -2810,6 +2984,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Closed(token); return S_OK; } @@ -2819,10 +2994,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetDisplayDate(abi_arg_in date) noexcept override + HRESULT __stdcall abi_SetDisplayDate(impl::abi_arg_in date) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDisplayDate(*reinterpret_cast(&date)); return S_OK; } @@ -2836,6 +3012,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().SetYearDecadeDisplayDimensions(columns, rows); return S_OK; } @@ -2853,7 +3030,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -2866,6 +3044,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -2879,11 +3058,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_NewDate(abi_arg_out> value) noexcept override + HRESULT __stdcall get_NewDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().NewDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDate()); return S_OK; } catch (...) @@ -2893,11 +3073,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_OldDate(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().OldDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldDate()); return S_OK; } catch (...) @@ -2911,11 +3092,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -2930,11 +3112,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_DateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateProperty()); return S_OK; } catch (...) @@ -2944,11 +3127,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsCalendarOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCalendarOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCalendarOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCalendarOpenProperty()); return S_OK; } catch (...) @@ -2958,11 +3142,12 @@ struct produce : pro } } - HRESULT __stdcall get_DateFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateFormatProperty()); return S_OK; } catch (...) @@ -2972,11 +3157,12 @@ struct produce : pro } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -2986,11 +3172,12 @@ struct produce : pro } } - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -3000,11 +3187,12 @@ struct produce : pro } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -3014,11 +3202,12 @@ struct produce : pro } } - HRESULT __stdcall get_CalendarViewStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarViewStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarViewStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarViewStyleProperty()); return S_OK; } catch (...) @@ -3028,11 +3217,12 @@ struct produce : pro } } - HRESULT __stdcall get_MinDateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinDateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinDateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDateProperty()); return S_OK; } catch (...) @@ -3042,11 +3232,12 @@ struct produce : pro } } - HRESULT __stdcall get_MaxDateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxDateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDateProperty()); return S_OK; } catch (...) @@ -3056,11 +3247,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsTodayHighlightedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTodayHighlightedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTodayHighlightedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTodayHighlightedProperty()); return S_OK; } catch (...) @@ -3070,11 +3262,12 @@ struct produce : pro } } - HRESULT __stdcall get_DisplayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayModeProperty()); return S_OK; } catch (...) @@ -3084,11 +3277,12 @@ struct produce : pro } } - HRESULT __stdcall get_FirstDayOfWeekProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstDayOfWeekProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstDayOfWeekProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstDayOfWeekProperty()); return S_OK; } catch (...) @@ -3098,11 +3292,12 @@ struct produce : pro } } - HRESULT __stdcall get_DayOfWeekFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayOfWeekFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayOfWeekFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeekFormatProperty()); return S_OK; } catch (...) @@ -3112,11 +3307,12 @@ struct produce : pro } } - HRESULT __stdcall get_CalendarIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifierProperty()); return S_OK; } catch (...) @@ -3126,11 +3322,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsOutOfScopeEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOutOfScopeEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOutOfScopeEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutOfScopeEnabledProperty()); return S_OK; } catch (...) @@ -3140,11 +3337,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsGroupLabelVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsGroupLabelVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsGroupLabelVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupLabelVisibleProperty()); return S_OK; } catch (...) @@ -3158,11 +3356,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -3176,11 +3375,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_CalendarIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifier()); return S_OK; } catch (...) @@ -3190,10 +3390,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -3203,11 +3404,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DayOfWeekFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayOfWeekFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeekFormat()); return S_OK; } catch (...) @@ -3217,10 +3419,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DayOfWeekFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayOfWeekFormat(*reinterpret_cast(&value)); return S_OK; } @@ -3234,7 +3437,8 @@ struct produce : produce_baseshim().IsGroupLabelVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupLabelVisible()); return S_OK; } catch (...) @@ -3247,6 +3451,7 @@ struct produce : produce_baseshim()); this->shim().IsGroupLabelVisible(value); return S_OK; } @@ -3260,7 +3465,8 @@ struct produce : produce_baseshim().DisplayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMode()); return S_OK; } catch (...) @@ -3273,6 +3479,7 @@ struct produce : produce_baseshim()); this->shim().DisplayMode(value); return S_OK; } @@ -3286,7 +3493,8 @@ struct produce : produce_baseshim().FirstDayOfWeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstDayOfWeek()); return S_OK; } catch (...) @@ -3299,6 +3507,7 @@ struct produce : produce_baseshim()); this->shim().FirstDayOfWeek(value); return S_OK; } @@ -3312,7 +3521,8 @@ struct produce : produce_baseshim().IsOutOfScopeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutOfScopeEnabled()); return S_OK; } catch (...) @@ -3325,6 +3535,7 @@ struct produce : produce_baseshim()); this->shim().IsOutOfScopeEnabled(value); return S_OK; } @@ -3338,7 +3549,8 @@ struct produce : produce_baseshim().IsTodayHighlighted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTodayHighlighted()); return S_OK; } catch (...) @@ -3351,6 +3563,7 @@ struct produce : produce_baseshim()); this->shim().IsTodayHighlighted(value); return S_OK; } @@ -3360,11 +3573,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaxDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDate()); return S_OK; } catch (...) @@ -3373,10 +3587,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MaxDate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxDate(*reinterpret_cast(&value)); return S_OK; } @@ -3386,11 +3601,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MinDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDate()); return S_OK; } catch (...) @@ -3399,10 +3615,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MinDate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinDate(*reinterpret_cast(&value)); return S_OK; } @@ -3416,7 +3633,8 @@ struct produce : produce_baseshim().NumberOfWeeksInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfWeeksInView()); return S_OK; } catch (...) @@ -3429,6 +3647,7 @@ struct produce : produce_baseshim()); this->shim().NumberOfWeeksInView(value); return S_OK; } @@ -3438,11 +3657,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SelectedDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectedDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedDates()); return S_OK; } catch (...) @@ -3456,7 +3676,8 @@ struct produce : produce_baseshim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -3469,6 +3690,7 @@ struct produce : produce_baseshim()); this->shim().SelectionMode(value); return S_OK; } @@ -3478,11 +3700,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -3492,11 +3715,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FocusBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrush()); return S_OK; } catch (...) @@ -3506,10 +3730,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FocusBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FocusBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3519,11 +3744,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedHoverBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedHoverBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedHoverBorderBrush()); return S_OK; } catch (...) @@ -3533,10 +3759,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedHoverBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedHoverBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3546,11 +3773,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedPressedBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPressedBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPressedBorderBrush()); return S_OK; } catch (...) @@ -3560,10 +3788,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedPressedBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedPressedBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3573,11 +3802,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderBrush()); return S_OK; } catch (...) @@ -3587,10 +3817,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3600,11 +3831,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HoverBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HoverBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HoverBorderBrush()); return S_OK; } catch (...) @@ -3614,10 +3846,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HoverBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HoverBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3627,11 +3860,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PressedBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedBorderBrush()); return S_OK; } catch (...) @@ -3641,10 +3875,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PressedBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PressedBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3654,11 +3889,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarItemBorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBorderBrush()); return S_OK; } catch (...) @@ -3668,10 +3904,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarItemBorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarItemBorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -3681,11 +3918,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutOfScopeBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutOfScopeBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfScopeBackground()); return S_OK; } catch (...) @@ -3695,10 +3933,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OutOfScopeBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutOfScopeBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3708,11 +3947,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarItemBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBackground()); return S_OK; } catch (...) @@ -3722,10 +3962,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarItemBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarItemBackground(*reinterpret_cast(&value)); return S_OK; } @@ -3735,11 +3976,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PressedForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedForeground()); return S_OK; } catch (...) @@ -3749,10 +3991,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PressedForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PressedForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3762,11 +4005,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TodayForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TodayForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TodayForeground()); return S_OK; } catch (...) @@ -3776,10 +4020,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TodayForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TodayForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3789,11 +4034,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BlackoutForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BlackoutForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlackoutForeground()); return S_OK; } catch (...) @@ -3803,10 +4049,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BlackoutForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BlackoutForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3816,11 +4063,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForeground()); return S_OK; } catch (...) @@ -3830,10 +4078,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3843,11 +4092,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OutOfScopeForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutOfScopeForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfScopeForeground()); return S_OK; } catch (...) @@ -3857,10 +4107,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OutOfScopeForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OutOfScopeForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3870,11 +4121,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarItemForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemForeground()); return S_OK; } catch (...) @@ -3884,10 +4136,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarItemForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarItemForeground(*reinterpret_cast(&value)); return S_OK; } @@ -3897,11 +4150,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DayItemFontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontFamily()); return S_OK; } catch (...) @@ -3911,10 +4165,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DayItemFontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayItemFontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -3928,7 +4183,8 @@ struct produce : produce_baseshim().DayItemFontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontSize()); return S_OK; } catch (...) @@ -3941,6 +4197,7 @@ struct produce : produce_baseshim()); this->shim().DayItemFontSize(value); return S_OK; } @@ -3954,7 +4211,8 @@ struct produce : produce_baseshim().DayItemFontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontStyle()); return S_OK; } catch (...) @@ -3967,6 +4225,7 @@ struct produce : produce_baseshim()); this->shim().DayItemFontStyle(value); return S_OK; } @@ -3976,11 +4235,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DayItemFontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontWeight()); return S_OK; } catch (...) @@ -3989,10 +4249,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DayItemFontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayItemFontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -4002,11 +4263,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TodayFontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TodayFontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TodayFontWeight()); return S_OK; } catch (...) @@ -4015,10 +4277,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TodayFontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TodayFontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -4028,11 +4291,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontFamily()); return S_OK; } catch (...) @@ -4042,10 +4306,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FirstOfMonthLabelFontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstOfMonthLabelFontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -4059,7 +4324,8 @@ struct produce : produce_baseshim().FirstOfMonthLabelFontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontSize()); return S_OK; } catch (...) @@ -4072,6 +4338,7 @@ struct produce : produce_baseshim()); this->shim().FirstOfMonthLabelFontSize(value); return S_OK; } @@ -4085,7 +4352,8 @@ struct produce : produce_baseshim().FirstOfMonthLabelFontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontStyle()); return S_OK; } catch (...) @@ -4098,6 +4366,7 @@ struct produce : produce_baseshim()); this->shim().FirstOfMonthLabelFontStyle(value); return S_OK; } @@ -4107,11 +4376,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontWeight()); return S_OK; } catch (...) @@ -4120,10 +4390,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FirstOfMonthLabelFontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstOfMonthLabelFontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -4133,11 +4404,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MonthYearItemFontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontFamily()); return S_OK; } catch (...) @@ -4147,10 +4419,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MonthYearItemFontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MonthYearItemFontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -4164,7 +4437,8 @@ struct produce : produce_baseshim().MonthYearItemFontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontSize()); return S_OK; } catch (...) @@ -4177,6 +4451,7 @@ struct produce : produce_baseshim()); this->shim().MonthYearItemFontSize(value); return S_OK; } @@ -4190,7 +4465,8 @@ struct produce : produce_baseshim().MonthYearItemFontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontStyle()); return S_OK; } catch (...) @@ -4203,6 +4479,7 @@ struct produce : produce_baseshim()); this->shim().MonthYearItemFontStyle(value); return S_OK; } @@ -4212,11 +4489,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MonthYearItemFontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontWeight()); return S_OK; } catch (...) @@ -4225,10 +4503,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MonthYearItemFontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MonthYearItemFontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -4238,11 +4517,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontFamily()); return S_OK; } catch (...) @@ -4252,10 +4532,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FirstOfYearDecadeLabelFontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstOfYearDecadeLabelFontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -4269,7 +4550,8 @@ struct produce : produce_baseshim().FirstOfYearDecadeLabelFontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontSize()); return S_OK; } catch (...) @@ -4282,6 +4564,7 @@ struct produce : produce_baseshim()); this->shim().FirstOfYearDecadeLabelFontSize(value); return S_OK; } @@ -4295,7 +4578,8 @@ struct produce : produce_baseshim().FirstOfYearDecadeLabelFontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontStyle()); return S_OK; } catch (...) @@ -4308,6 +4592,7 @@ struct produce : produce_baseshim()); this->shim().FirstOfYearDecadeLabelFontStyle(value); return S_OK; } @@ -4317,11 +4602,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontWeight()); return S_OK; } catch (...) @@ -4330,10 +4616,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FirstOfYearDecadeLabelFontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FirstOfYearDecadeLabelFontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -4347,7 +4634,8 @@ struct produce : produce_baseshim().HorizontalDayItemAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalDayItemAlignment()); return S_OK; } catch (...) @@ -4360,6 +4648,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalDayItemAlignment(value); return S_OK; } @@ -4373,7 +4662,8 @@ struct produce : produce_baseshim().VerticalDayItemAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalDayItemAlignment()); return S_OK; } catch (...) @@ -4386,6 +4676,7 @@ struct produce : produce_baseshim()); this->shim().VerticalDayItemAlignment(value); return S_OK; } @@ -4399,7 +4690,8 @@ struct produce : produce_baseshim().HorizontalFirstOfMonthLabelAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalFirstOfMonthLabelAlignment()); return S_OK; } catch (...) @@ -4412,6 +4704,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalFirstOfMonthLabelAlignment(value); return S_OK; } @@ -4425,7 +4718,8 @@ struct produce : produce_baseshim().VerticalFirstOfMonthLabelAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalFirstOfMonthLabelAlignment()); return S_OK; } catch (...) @@ -4438,6 +4732,7 @@ struct produce : produce_baseshim()); this->shim().VerticalFirstOfMonthLabelAlignment(value); return S_OK; } @@ -4447,11 +4742,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarItemBorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBorderThickness()); return S_OK; } catch (...) @@ -4460,10 +4756,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarItemBorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarItemBorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -4473,11 +4770,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarViewDayItemStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarViewDayItemStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarViewDayItemStyle()); return S_OK; } catch (...) @@ -4487,10 +4785,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarViewDayItemStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarViewDayItemStyle(*reinterpret_cast(&value)); return S_OK; } @@ -4500,11 +4799,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_CalendarViewDayItemChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CalendarViewDayItemChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CalendarViewDayItemChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -4517,6 +4817,7 @@ struct produce : produce_baseshim()); this->shim().CalendarViewDayItemChanging(token); return S_OK; } @@ -4526,11 +4827,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SelectedDatesChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectedDatesChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectedDatesChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -4543,6 +4845,7 @@ struct produce : produce_baseshim()); this->shim().SelectedDatesChanged(token); return S_OK; } @@ -4552,10 +4855,11 @@ struct produce : produce_base date) noexcept override + HRESULT __stdcall abi_SetDisplayDate(impl::abi_arg_in date) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDisplayDate(*reinterpret_cast(&date)); return S_OK; } @@ -4569,6 +4873,7 @@ struct produce : produce_baseshim()); this->shim().SetYearDecadeDisplayDimensions(columns, rows); return S_OK; } @@ -4586,7 +4891,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().IsBlackout()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBlackout()); return S_OK; } catch (...) @@ -4599,6 +4905,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().IsBlackout(value); return S_OK; } @@ -4608,11 +4915,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Date(abi_arg_out value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -4621,10 +4929,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetDensityColors(abi_arg_in> colors) noexcept override + HRESULT __stdcall abi_SetDensityColors(impl::abi_arg_in> colors) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDensityColors(*reinterpret_cast *>(&colors)); return S_OK; } @@ -4642,7 +4951,8 @@ struct produceshim().InRecycleQueue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InRecycleQueue()); return S_OK; } catch (...) @@ -4651,11 +4961,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -4669,7 +4980,8 @@ struct produceshim().Phase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Phase()); return S_OK; } catch (...) @@ -4678,10 +4990,11 @@ struct produce> callback) noexcept override + HRESULT __stdcall abi_RegisterUpdateCallback(impl::abi_arg_in> callback) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterUpdateCallback(*reinterpret_cast *>(&callback)); return S_OK; } @@ -4691,10 +5004,11 @@ struct produce> callback) noexcept override + HRESULT __stdcall abi_RegisterUpdateCallbackWithPhase(uint32_t callbackPhase, impl::abi_arg_in> callback) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterUpdateCallback(callbackPhase, *reinterpret_cast *>(&callback)); return S_OK; } @@ -4708,11 +5022,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4727,11 +5042,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_IsBlackoutProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsBlackoutProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsBlackoutProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsBlackoutProperty()); return S_OK; } catch (...) @@ -4741,11 +5057,12 @@ struct produce : pr } } - HRESULT __stdcall get_DateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateProperty()); return S_OK; } catch (...) @@ -4759,11 +5076,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -4778,11 +5096,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_AddedDates(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AddedDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddedDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddedDates()); return S_OK; } catch (...) @@ -4792,11 +5111,12 @@ struct produce> value) noexcept override + HRESULT __stdcall get_RemovedDates(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemovedDates()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedDates()); return S_OK; } catch (...) @@ -4810,11 +5130,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CalendarIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifierProperty()); return S_OK; } catch (...) @@ -4824,11 +5145,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DayOfWeekFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayOfWeekFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayOfWeekFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayOfWeekFormatProperty()); return S_OK; } catch (...) @@ -4838,11 +5160,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsGroupLabelVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsGroupLabelVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsGroupLabelVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupLabelVisibleProperty()); return S_OK; } catch (...) @@ -4852,11 +5175,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DisplayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayModeProperty()); return S_OK; } catch (...) @@ -4866,11 +5190,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstDayOfWeekProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstDayOfWeekProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstDayOfWeekProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstDayOfWeekProperty()); return S_OK; } catch (...) @@ -4880,11 +5205,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsOutOfScopeEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOutOfScopeEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOutOfScopeEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOutOfScopeEnabledProperty()); return S_OK; } catch (...) @@ -4894,11 +5220,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsTodayHighlightedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTodayHighlightedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTodayHighlightedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTodayHighlightedProperty()); return S_OK; } catch (...) @@ -4908,11 +5235,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MaxDateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxDateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDateProperty()); return S_OK; } catch (...) @@ -4922,11 +5250,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MinDateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinDateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinDateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinDateProperty()); return S_OK; } catch (...) @@ -4936,11 +5265,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NumberOfWeeksInViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NumberOfWeeksInViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NumberOfWeeksInViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NumberOfWeeksInViewProperty()); return S_OK; } catch (...) @@ -4950,11 +5280,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedDatesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedDatesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedDatesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedDatesProperty()); return S_OK; } catch (...) @@ -4964,11 +5295,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionModeProperty()); return S_OK; } catch (...) @@ -4978,11 +5310,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TemplateSettingsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettingsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettingsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettingsProperty()); return S_OK; } catch (...) @@ -4992,11 +5325,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FocusBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FocusBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusBorderBrushProperty()); return S_OK; } catch (...) @@ -5006,11 +5340,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedHoverBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedHoverBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedHoverBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedHoverBorderBrushProperty()); return S_OK; } catch (...) @@ -5020,11 +5355,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedPressedBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedPressedBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedPressedBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedPressedBorderBrushProperty()); return S_OK; } catch (...) @@ -5034,11 +5370,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBorderBrushProperty()); return S_OK; } catch (...) @@ -5048,11 +5385,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HoverBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HoverBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HoverBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HoverBorderBrushProperty()); return S_OK; } catch (...) @@ -5062,11 +5400,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PressedBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PressedBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedBorderBrushProperty()); return S_OK; } catch (...) @@ -5076,11 +5415,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CalendarItemBorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarItemBorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBorderBrushProperty()); return S_OK; } catch (...) @@ -5090,11 +5430,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OutOfScopeBackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutOfScopeBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutOfScopeBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfScopeBackgroundProperty()); return S_OK; } catch (...) @@ -5104,11 +5445,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CalendarItemBackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarItemBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBackgroundProperty()); return S_OK; } catch (...) @@ -5118,11 +5460,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PressedForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PressedForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PressedForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PressedForegroundProperty()); return S_OK; } catch (...) @@ -5132,11 +5475,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TodayForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TodayForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TodayForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TodayForegroundProperty()); return S_OK; } catch (...) @@ -5146,11 +5490,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_BlackoutForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BlackoutForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BlackoutForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BlackoutForegroundProperty()); return S_OK; } catch (...) @@ -5160,11 +5505,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedForegroundProperty()); return S_OK; } catch (...) @@ -5174,11 +5520,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OutOfScopeForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OutOfScopeForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OutOfScopeForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OutOfScopeForegroundProperty()); return S_OK; } catch (...) @@ -5188,11 +5535,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CalendarItemForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarItemForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemForegroundProperty()); return S_OK; } catch (...) @@ -5202,11 +5550,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DayItemFontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayItemFontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontFamilyProperty()); return S_OK; } catch (...) @@ -5216,11 +5565,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DayItemFontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayItemFontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontSizeProperty()); return S_OK; } catch (...) @@ -5230,11 +5580,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DayItemFontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayItemFontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontStyleProperty()); return S_OK; } catch (...) @@ -5244,11 +5595,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DayItemFontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayItemFontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayItemFontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayItemFontWeightProperty()); return S_OK; } catch (...) @@ -5258,11 +5610,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TodayFontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TodayFontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TodayFontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TodayFontWeightProperty()); return S_OK; } catch (...) @@ -5272,11 +5625,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfMonthLabelFontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontFamilyProperty()); return S_OK; } catch (...) @@ -5286,11 +5640,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfMonthLabelFontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontSizeProperty()); return S_OK; } catch (...) @@ -5300,11 +5655,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfMonthLabelFontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontStyleProperty()); return S_OK; } catch (...) @@ -5314,11 +5670,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfMonthLabelFontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfMonthLabelFontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfMonthLabelFontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfMonthLabelFontWeightProperty()); return S_OK; } catch (...) @@ -5328,11 +5685,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MonthYearItemFontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthYearItemFontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontFamilyProperty()); return S_OK; } catch (...) @@ -5342,11 +5700,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MonthYearItemFontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthYearItemFontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontSizeProperty()); return S_OK; } catch (...) @@ -5356,11 +5715,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MonthYearItemFontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthYearItemFontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontStyleProperty()); return S_OK; } catch (...) @@ -5370,11 +5730,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MonthYearItemFontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthYearItemFontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthYearItemFontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthYearItemFontWeightProperty()); return S_OK; } catch (...) @@ -5384,11 +5745,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfYearDecadeLabelFontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontFamilyProperty()); return S_OK; } catch (...) @@ -5398,11 +5760,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfYearDecadeLabelFontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontSizeProperty()); return S_OK; } catch (...) @@ -5412,11 +5775,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfYearDecadeLabelFontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontStyleProperty()); return S_OK; } catch (...) @@ -5426,11 +5790,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_FirstOfYearDecadeLabelFontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FirstOfYearDecadeLabelFontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FirstOfYearDecadeLabelFontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstOfYearDecadeLabelFontWeightProperty()); return S_OK; } catch (...) @@ -5440,11 +5805,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalDayItemAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalDayItemAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalDayItemAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalDayItemAlignmentProperty()); return S_OK; } catch (...) @@ -5454,11 +5820,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalDayItemAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalDayItemAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalDayItemAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalDayItemAlignmentProperty()); return S_OK; } catch (...) @@ -5468,11 +5835,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalFirstOfMonthLabelAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalFirstOfMonthLabelAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalFirstOfMonthLabelAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalFirstOfMonthLabelAlignmentProperty()); return S_OK; } catch (...) @@ -5482,11 +5850,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalFirstOfMonthLabelAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalFirstOfMonthLabelAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalFirstOfMonthLabelAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalFirstOfMonthLabelAlignmentProperty()); return S_OK; } catch (...) @@ -5496,11 +5865,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CalendarItemBorderThicknessProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarItemBorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarItemBorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarItemBorderThicknessProperty()); return S_OK; } catch (...) @@ -5510,11 +5880,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CalendarViewDayItemStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarViewDayItemStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarViewDayItemStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarViewDayItemStyleProperty()); return S_OK; } catch (...) @@ -5528,11 +5899,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Bounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -5549,11 +5921,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -5568,11 +5941,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LeftProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LeftProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftProperty()); return S_OK; } catch (...) @@ -5582,11 +5956,12 @@ struct produce : produce_base element, double * length) noexcept override + HRESULT __stdcall abi_GetLeft(impl::abi_arg_in element, double * length) noexcept override { try { - *length = detach(this->shim().GetLeft(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *length = detach_abi(this->shim().GetLeft(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -5595,10 +5970,11 @@ struct produce : produce_base element, double length) noexcept override + HRESULT __stdcall abi_SetLeft(impl::abi_arg_in element, double length) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLeft(*reinterpret_cast(&element), length); return S_OK; } @@ -5608,11 +5984,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TopProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopProperty()); return S_OK; } catch (...) @@ -5622,11 +5999,12 @@ struct produce : produce_base element, double * length) noexcept override + HRESULT __stdcall abi_GetTop(impl::abi_arg_in element, double * length) noexcept override { try { - *length = detach(this->shim().GetTop(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *length = detach_abi(this->shim().GetTop(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -5635,10 +6013,11 @@ struct produce : produce_base element, double length) noexcept override + HRESULT __stdcall abi_SetTop(impl::abi_arg_in element, double length) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetTop(*reinterpret_cast(&element), length); return S_OK; } @@ -5648,11 +6027,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ZIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZIndexProperty()); return S_OK; } catch (...) @@ -5662,11 +6042,12 @@ struct produce : produce_base element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetZIndex(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetZIndex(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetZIndex(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -5675,10 +6056,11 @@ struct produce : produce_base element, int32_t value) noexcept override + HRESULT __stdcall abi_SetZIndex(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetZIndex(*reinterpret_cast(&element), value); return S_OK; } @@ -5692,11 +6074,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -5706,10 +6089,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -5723,7 +6107,8 @@ struct produce : produce_baseshim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -5736,6 +6121,7 @@ struct produce : produce_baseshim()); this->shim().Stretch(value); return S_OK; } @@ -5749,11 +6135,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceProperty()); return S_OK; } catch (...) @@ -5763,11 +6150,12 @@ struct produce : produce } } - HRESULT __stdcall get_StretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -5785,11 +6173,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -5804,11 +6193,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_GroupHeaderContainer(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupHeaderContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupHeaderContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupHeaderContainer()); return S_OK; } catch (...) @@ -5818,10 +6208,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_GroupHeaderContainer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupHeaderContainer(*reinterpret_cast(&value)); return S_OK; } @@ -5835,7 +6226,8 @@ struct produceshim().GroupIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupIndex()); return S_OK; } catch (...) @@ -5844,11 +6236,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Group(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Group()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Group()); return S_OK; } catch (...) @@ -5866,7 +6259,8 @@ struct produce { try { - *value = detach(this->shim().ItemIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemIndex()); return S_OK; } catch (...) @@ -5875,11 +6269,12 @@ struct produce } } - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -5889,11 +6284,12 @@ struct produce } } - HRESULT __stdcall get_ItemContainer(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainer()); return S_OK; } catch (...) @@ -5903,10 +6299,11 @@ struct produce } } - HRESULT __stdcall put_ItemContainer(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemContainer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemContainer(*reinterpret_cast(&value)); return S_OK; } @@ -5920,7 +6317,8 @@ struct produce { try { - *value = detach(this->shim().IsContainerPrepared()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsContainerPrepared()); return S_OK; } catch (...) @@ -5933,6 +6331,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().IsContainerPrepared(value); return S_OK; } @@ -5946,11 +6345,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -5960,11 +6360,12 @@ struct produce } } - HRESULT __stdcall get_UIElement(abi_arg_out value) noexcept override + HRESULT __stdcall get_UIElement(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UIElement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UIElement()); return S_OK; } catch (...) @@ -5978,7 +6379,8 @@ struct produce { try { - *value = detach(this->shim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -5991,6 +6393,7 @@ struct produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return S_OK; } @@ -6004,11 +6407,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Width(abi_arg_out value) noexcept override + HRESULT __stdcall get_Width(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Width()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Width()); return S_OK; } catch (...) @@ -6017,10 +6421,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Width(abi_arg_in value) noexcept override + HRESULT __stdcall put_Width(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Width(*reinterpret_cast(&value)); return S_OK; } @@ -6034,7 +6439,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MaxWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWidth()); return S_OK; } catch (...) @@ -6047,6 +6453,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxWidth(value); return S_OK; } @@ -6060,7 +6467,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MinWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinWidth()); return S_OK; } catch (...) @@ -6073,6 +6481,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MinWidth(value); return S_OK; } @@ -6086,7 +6495,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ActualWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualWidth()); return S_OK; } catch (...) @@ -6099,11 +6509,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_WidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_WidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().WidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WidthProperty()); return S_OK; } catch (...) @@ -6113,11 +6524,12 @@ struct produce : produ } } - HRESULT __stdcall get_MaxWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxWidthProperty()); return S_OK; } catch (...) @@ -6127,11 +6539,12 @@ struct produce : produ } } - HRESULT __stdcall get_MinWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinWidthProperty()); return S_OK; } catch (...) @@ -6149,7 +6562,8 @@ struct produce : produce_baseshim().IsDropDownOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDropDownOpen()); return S_OK; } catch (...) @@ -6162,6 +6576,7 @@ struct produce : produce_baseshim()); this->shim().IsDropDownOpen(value); return S_OK; } @@ -6175,7 +6590,8 @@ struct produce : produce_baseshim().IsEditable()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEditable()); return S_OK; } catch (...) @@ -6188,7 +6604,8 @@ struct produce : produce_baseshim().IsSelectionBoxHighlighted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSelectionBoxHighlighted()); return S_OK; } catch (...) @@ -6201,7 +6618,8 @@ struct produce : produce_baseshim().MaxDropDownHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDropDownHeight()); return S_OK; } catch (...) @@ -6214,6 +6632,7 @@ struct produce : produce_baseshim()); this->shim().MaxDropDownHeight(value); return S_OK; } @@ -6223,11 +6642,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionBoxItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionBoxItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionBoxItem()); return S_OK; } catch (...) @@ -6237,11 +6657,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionBoxItemTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionBoxItemTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionBoxItemTemplate()); return S_OK; } catch (...) @@ -6251,11 +6672,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -6265,11 +6687,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DropDownClosed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DropDownClosed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DropDownClosed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -6282,6 +6705,7 @@ struct produce : produce_baseshim()); this->shim().DropDownClosed(token); return S_OK; } @@ -6291,11 +6715,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DropDownOpened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DropDownOpened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DropDownOpened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -6308,6 +6733,7 @@ struct produce : produce_baseshim()); this->shim().DropDownOpened(token); return S_OK; } @@ -6321,11 +6747,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -6335,11 +6762,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -6348,11 +6776,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -6362,10 +6791,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -6375,11 +6805,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -6389,10 +6820,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -6410,7 +6842,8 @@ struct produce : produce_baseshim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -6423,6 +6856,7 @@ struct produce : produce_baseshim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -6436,7 +6870,8 @@ struct produce : produce_baseshim().IsTextSearchEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSearchEnabled()); return S_OK; } catch (...) @@ -6449,6 +6884,7 @@ struct produce : produce_baseshim()); this->shim().IsTextSearchEnabled(value); return S_OK; } @@ -6462,11 +6898,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -6485,11 +6922,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -6504,11 +6942,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_OnDropDownClosed(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDropDownClosed(impl::abi_arg_in e) noexcept override { try { - this->shim().OnDropDownClosed(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnDropDownClosed(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -6517,11 +6956,12 @@ struct produce : produce_bas } } - HRESULT __stdcall abi_OnDropDownOpened(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDropDownOpened(impl::abi_arg_in e) noexcept override { try { - this->shim().OnDropDownOpened(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnDropDownOpened(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -6534,11 +6974,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_IsDropDownOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsDropDownOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDropDownOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDropDownOpenProperty()); return S_OK; } catch (...) @@ -6548,11 +6989,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_MaxDropDownHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxDropDownHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxDropDownHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxDropDownHeightProperty()); return S_OK; } catch (...) @@ -6566,11 +7008,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -6580,11 +7023,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -6594,11 +7038,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -6612,11 +7057,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -6626,11 +7072,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_IsTextSearchEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextSearchEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextSearchEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSearchEnabledProperty()); return S_OK; } catch (...) @@ -6644,11 +7091,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_PrimaryCommands(abi_arg_out> value) noexcept override + HRESULT __stdcall get_PrimaryCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().PrimaryCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryCommands()); return S_OK; } catch (...) @@ -6658,11 +7106,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SecondaryCommands(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SecondaryCommands()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryCommands()); return S_OK; } catch (...) @@ -6676,11 +7125,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CommandBarOverflowPresenterStyle(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandBarOverflowPresenterStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandBarOverflowPresenterStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandBarOverflowPresenterStyle()); return S_OK; } catch (...) @@ -6690,10 +7140,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CommandBarOverflowPresenterStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CommandBarOverflowPresenterStyle(*reinterpret_cast(&value)); return S_OK; } @@ -6703,11 +7154,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommandBarTemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandBarTemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandBarTemplateSettings()); return S_OK; } catch (...) @@ -6725,7 +7177,8 @@ struct produce : produce_baseshim().DefaultLabelPosition()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultLabelPosition()); return S_OK; } catch (...) @@ -6738,6 +7191,7 @@ struct produce : produce_baseshim()); this->shim().DefaultLabelPosition(value); return S_OK; } @@ -6751,7 +7205,8 @@ struct produce : produce_baseshim().OverflowButtonVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowButtonVisibility()); return S_OK; } catch (...) @@ -6764,6 +7219,7 @@ struct produce : produce_baseshim()); this->shim().OverflowButtonVisibility(value); return S_OK; } @@ -6777,7 +7233,8 @@ struct produce : produce_baseshim().IsDynamicOverflowEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDynamicOverflowEnabled()); return S_OK; } catch (...) @@ -6790,6 +7247,7 @@ struct produce : produce_baseshim()); this->shim().IsDynamicOverflowEnabled(value); return S_OK; } @@ -6799,11 +7257,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DynamicOverflowItemsChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DynamicOverflowItemsChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DynamicOverflowItemsChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -6816,6 +7275,7 @@ struct produce : produce_baseshim()); this->shim().DynamicOverflowItemsChanging(token); return S_OK; } @@ -6833,7 +7293,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsCompact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompact()); return S_OK; } catch (...) @@ -6846,6 +7307,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCompact(value); return S_OK; } @@ -6863,7 +7325,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsInOverflow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInOverflow()); return S_OK; } catch (...) @@ -6876,7 +7339,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().DynamicOverflowOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DynamicOverflowOrder()); return S_OK; } catch (...) @@ -6889,6 +7353,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().DynamicOverflowOrder(value); return S_OK; } @@ -6902,11 +7367,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -6925,11 +7391,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -6944,11 +7411,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PrimaryCommandsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryCommandsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryCommandsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryCommandsProperty()); return S_OK; } catch (...) @@ -6958,11 +7426,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_SecondaryCommandsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryCommandsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryCommandsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryCommandsProperty()); return S_OK; } catch (...) @@ -6976,11 +7445,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_CommandBarOverflowPresenterStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandBarOverflowPresenterStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandBarOverflowPresenterStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandBarOverflowPresenterStyleProperty()); return S_OK; } catch (...) @@ -6994,11 +7464,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_DefaultLabelPositionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultLabelPositionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultLabelPositionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultLabelPositionProperty()); return S_OK; } catch (...) @@ -7008,11 +7479,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_OverflowButtonVisibilityProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OverflowButtonVisibilityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowButtonVisibilityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowButtonVisibilityProperty()); return S_OK; } catch (...) @@ -7022,11 +7494,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_IsDynamicOverflowEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsDynamicOverflowEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDynamicOverflowEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDynamicOverflowEnabledProperty()); return S_OK; } catch (...) @@ -7040,11 +7513,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_ItemContainer(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainer()); return S_OK; } catch (...) @@ -7058,7 +7532,8 @@ struct produceshim().InRecycleQueue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InRecycleQueue()); return S_OK; } catch (...) @@ -7071,7 +7546,8 @@ struct produceshim().ItemIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemIndex()); return S_OK; } catch (...) @@ -7080,11 +7556,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -7098,7 +7575,8 @@ struct produceshim().Phase()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Phase()); return S_OK; } catch (...) @@ -7111,7 +7589,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -7124,6 +7603,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -7133,10 +7613,11 @@ struct produce> callback) noexcept override + HRESULT __stdcall abi_RegisterUpdateCallback(impl::abi_arg_in> callback) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterUpdateCallback(*reinterpret_cast *>(&callback)); return S_OK; } @@ -7146,10 +7627,11 @@ struct produce> callback) noexcept override + HRESULT __stdcall abi_RegisterUpdateCallbackWithPhase(uint32_t callbackPhase, impl::abi_arg_in> callback) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RegisterUpdateCallback(callbackPhase, *reinterpret_cast *>(&callback)); return S_OK; } @@ -7163,11 +7645,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -7177,11 +7660,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { - this->shim().Content(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Content(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -7190,11 +7674,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplate()); return S_OK; } catch (...) @@ -7204,10 +7689,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContentTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -7217,11 +7703,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentTemplateSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateSelector()); return S_OK; } catch (...) @@ -7231,10 +7718,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContentTemplateSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTemplateSelector(*reinterpret_cast(&value)); return S_OK; } @@ -7244,11 +7732,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ContentTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ContentTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTransitions()); return S_OK; } catch (...) @@ -7258,10 +7747,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ContentTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -7275,11 +7765,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ContentTemplateRoot(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateRoot(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateRoot()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateRoot()); return S_OK; } catch (...) @@ -7293,11 +7784,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -7312,11 +7804,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_OnContentChanged(abi_arg_in oldContent, abi_arg_in newContent) noexcept override + HRESULT __stdcall abi_OnContentChanged(impl::abi_arg_in oldContent, impl::abi_arg_in newContent) noexcept override { try { - this->shim().OnContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); + typename D::abi_guard guard(this->shim()); + this->shim().OnContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); return S_OK; } catch (...) @@ -7325,10 +7818,11 @@ struct produce : produ } } - HRESULT __stdcall abi_OnContentTemplateChanged(abi_arg_in oldContentTemplate, abi_arg_in newContentTemplate) noexcept override + HRESULT __stdcall abi_OnContentTemplateChanged(impl::abi_arg_in oldContentTemplate, impl::abi_arg_in newContentTemplate) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentTemplateChanged(*reinterpret_cast(&oldContentTemplate), *reinterpret_cast(&newContentTemplate)); return S_OK; } @@ -7338,10 +7832,11 @@ struct produce : produ } } - HRESULT __stdcall abi_OnContentTemplateSelectorChanged(abi_arg_in oldContentTemplateSelector, abi_arg_in newContentTemplateSelector) noexcept override + HRESULT __stdcall abi_OnContentTemplateSelectorChanged(impl::abi_arg_in oldContentTemplateSelector, impl::abi_arg_in newContentTemplateSelector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentTemplateSelectorChanged(*reinterpret_cast(&oldContentTemplateSelector), *reinterpret_cast(&newContentTemplateSelector)); return S_OK; } @@ -7355,11 +7850,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -7369,11 +7865,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateProperty()); return S_OK; } catch (...) @@ -7383,11 +7880,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentTemplateSelectorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateSelectorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateSelectorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateSelectorProperty()); return S_OK; } catch (...) @@ -7397,11 +7895,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTransitionsProperty()); return S_OK; } catch (...) @@ -7415,11 +7914,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -7429,11 +7929,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { - this->shim().Title(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Title(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -7442,11 +7943,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TitleTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleTemplate()); return S_OK; } catch (...) @@ -7456,10 +7958,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TitleTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TitleTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -7473,7 +7976,8 @@ struct produce : produce_baseshim().FullSizeDesired()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullSizeDesired()); return S_OK; } catch (...) @@ -7486,6 +7990,7 @@ struct produce : produce_baseshim()); this->shim().FullSizeDesired(value); return S_OK; } @@ -7495,11 +8000,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrimaryButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonText()); return S_OK; } catch (...) @@ -7509,10 +8015,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PrimaryButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrimaryButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -7522,11 +8029,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SecondaryButtonText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonText()); return S_OK; } catch (...) @@ -7536,10 +8044,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SecondaryButtonText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SecondaryButtonText(*reinterpret_cast(&value)); return S_OK; } @@ -7549,11 +8058,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrimaryButtonCommand(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonCommand()); return S_OK; } catch (...) @@ -7563,10 +8073,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PrimaryButtonCommand(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrimaryButtonCommand(*reinterpret_cast(&value)); return S_OK; } @@ -7576,11 +8087,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SecondaryButtonCommand(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonCommand()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonCommand()); return S_OK; } catch (...) @@ -7590,10 +8102,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SecondaryButtonCommand(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SecondaryButtonCommand(*reinterpret_cast(&value)); return S_OK; } @@ -7603,11 +8116,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PrimaryButtonCommandParameter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonCommandParameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonCommandParameter()); return S_OK; } catch (...) @@ -7617,11 +8131,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PrimaryButtonCommandParameter(impl::abi_arg_in value) noexcept override { try { - this->shim().PrimaryButtonCommandParameter(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().PrimaryButtonCommandParameter(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -7630,11 +8145,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SecondaryButtonCommandParameter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonCommandParameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonCommandParameter()); return S_OK; } catch (...) @@ -7644,11 +8160,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SecondaryButtonCommandParameter(impl::abi_arg_in value) noexcept override { try { - this->shim().SecondaryButtonCommandParameter(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SecondaryButtonCommandParameter(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -7661,7 +8178,8 @@ struct produce : produce_baseshim().IsPrimaryButtonEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrimaryButtonEnabled()); return S_OK; } catch (...) @@ -7674,6 +8192,7 @@ struct produce : produce_baseshim()); this->shim().IsPrimaryButtonEnabled(value); return S_OK; } @@ -7687,7 +8206,8 @@ struct produce : produce_baseshim().IsSecondaryButtonEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSecondaryButtonEnabled()); return S_OK; } catch (...) @@ -7700,6 +8220,7 @@ struct produce : produce_baseshim()); this->shim().IsSecondaryButtonEnabled(value); return S_OK; } @@ -7709,11 +8230,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Closing(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closing(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closing(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -7726,6 +8248,7 @@ struct produce : produce_baseshim()); this->shim().Closing(token); return S_OK; } @@ -7735,11 +8258,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -7752,6 +8276,7 @@ struct produce : produce_baseshim()); this->shim().Closed(token); return S_OK; } @@ -7761,11 +8286,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -7778,6 +8304,7 @@ struct produce : produce_baseshim()); this->shim().Opened(token); return S_OK; } @@ -7787,11 +8314,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PrimaryButtonClick(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PrimaryButtonClick(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PrimaryButtonClick(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -7804,6 +8332,7 @@ struct produce : produce_baseshim()); this->shim().PrimaryButtonClick(token); return S_OK; } @@ -7813,11 +8342,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SecondaryButtonClick(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SecondaryButtonClick(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SecondaryButtonClick(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -7830,6 +8360,7 @@ struct produce : produce_baseshim()); this->shim().SecondaryButtonClick(token); return S_OK; } @@ -7843,6 +8374,7 @@ struct produce : produce_baseshim()); this->shim().Hide(); return S_OK; } @@ -7852,11 +8384,12 @@ struct produce : produce_base> returnValue) noexcept override + HRESULT __stdcall abi_ShowAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAsync()); return S_OK; } catch (...) @@ -7874,6 +8407,7 @@ struct produceshim()); this->shim().Complete(); return S_OK; } @@ -7891,7 +8425,8 @@ struct produceshim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -7904,6 +8439,7 @@ struct produceshim()); this->shim().Cancel(value); return S_OK; } @@ -7913,11 +8449,12 @@ struct produce returnValue) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -7935,7 +8472,8 @@ struct produce : { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -7952,6 +8490,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Complete(); return S_OK; } @@ -7969,7 +8508,8 @@ struct produce : { try { - *value = detach(this->shim().Result()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Result()); return S_OK; } catch (...) @@ -7982,7 +8522,8 @@ struct produce : { try { - *value = detach(this->shim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -7995,6 +8536,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return S_OK; } @@ -8004,11 +8546,12 @@ struct produce : } } - HRESULT __stdcall abi_GetDeferral(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetDeferral(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetDeferral()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetDeferral()); return S_OK; } catch (...) @@ -8022,11 +8565,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -8045,11 +8589,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_TitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleProperty()); return S_OK; } catch (...) @@ -8059,11 +8604,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TitleTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleTemplateProperty()); return S_OK; } catch (...) @@ -8073,11 +8619,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FullSizeDesiredProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FullSizeDesiredProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FullSizeDesiredProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FullSizeDesiredProperty()); return S_OK; } catch (...) @@ -8087,11 +8634,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PrimaryButtonTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryButtonTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonTextProperty()); return S_OK; } catch (...) @@ -8101,11 +8649,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SecondaryButtonTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryButtonTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonTextProperty()); return S_OK; } catch (...) @@ -8115,11 +8664,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PrimaryButtonCommandProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryButtonCommandProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonCommandProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonCommandProperty()); return S_OK; } catch (...) @@ -8129,11 +8679,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SecondaryButtonCommandProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryButtonCommandProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonCommandProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonCommandProperty()); return S_OK; } catch (...) @@ -8143,11 +8694,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PrimaryButtonCommandParameterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryButtonCommandParameterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryButtonCommandParameterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryButtonCommandParameterProperty()); return S_OK; } catch (...) @@ -8157,11 +8709,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SecondaryButtonCommandParameterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryButtonCommandParameterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryButtonCommandParameterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryButtonCommandParameterProperty()); return S_OK; } catch (...) @@ -8171,11 +8724,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsPrimaryButtonEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPrimaryButtonEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPrimaryButtonEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPrimaryButtonEnabledProperty()); return S_OK; } catch (...) @@ -8185,11 +8739,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsSecondaryButtonEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSecondaryButtonEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSecondaryButtonEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSecondaryButtonEnabledProperty()); return S_OK; } catch (...) @@ -8203,11 +8758,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -8217,11 +8773,12 @@ struct produce : produce_base } } - HRESULT __stdcall put_Content(abi_arg_in value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { - this->shim().Content(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Content(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -8230,11 +8787,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ContentTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplate()); return S_OK; } catch (...) @@ -8244,10 +8802,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ContentTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContentTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -8257,11 +8816,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ContentTemplateSelector(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateSelector()); return S_OK; } catch (...) @@ -8271,10 +8831,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ContentTemplateSelector(abi_arg_in value) noexcept override + HRESULT __stdcall put_ContentTemplateSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTemplateSelector(*reinterpret_cast(&value)); return S_OK; } @@ -8284,11 +8845,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ContentTransitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_ContentTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ContentTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTransitions()); return S_OK; } catch (...) @@ -8298,10 +8860,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ContentTransitions(abi_arg_in> value) noexcept override + HRESULT __stdcall put_ContentTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -8315,7 +8878,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -8328,6 +8892,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().FontSize(value); return S_OK; } @@ -8337,11 +8902,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontFamily(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -8351,10 +8917,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_FontFamily(abi_arg_in value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -8364,11 +8931,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontWeight(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -8377,10 +8945,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_FontWeight(abi_arg_in value) noexcept override + HRESULT __stdcall put_FontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -8394,7 +8963,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -8407,6 +8977,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().FontStyle(value); return S_OK; } @@ -8420,7 +8991,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -8433,6 +9005,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().FontStretch(value); return S_OK; } @@ -8446,7 +9019,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().CharacterSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacing()); return S_OK; } catch (...) @@ -8459,6 +9033,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().CharacterSpacing(value); return S_OK; } @@ -8468,11 +9043,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Foreground(abi_arg_out value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -8482,10 +9058,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Foreground(abi_arg_in value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -8503,7 +9080,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().OpticalMarginAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignment()); return S_OK; } catch (...) @@ -8516,6 +9094,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().OpticalMarginAlignment(value); return S_OK; } @@ -8529,7 +9108,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().TextLineBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBounds()); return S_OK; } catch (...) @@ -8542,6 +9122,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TextLineBounds(value); return S_OK; } @@ -8559,7 +9140,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().IsTextScaleFactorEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabled()); return S_OK; } catch (...) @@ -8572,6 +9154,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().IsTextScaleFactorEnabled(value); return S_OK; } @@ -8589,7 +9172,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -8602,6 +9186,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().TextWrapping(value); return S_OK; } @@ -8615,7 +9200,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -8628,6 +9214,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxLines(value); return S_OK; } @@ -8641,7 +9228,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().LineStackingStrategy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategy()); return S_OK; } catch (...) @@ -8654,6 +9242,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().LineStackingStrategy(value); return S_OK; } @@ -8667,7 +9256,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().LineHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeight()); return S_OK; } catch (...) @@ -8680,6 +9270,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().LineHeight(value); return S_OK; } @@ -8689,11 +9280,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_BorderBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -8703,10 +9295,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_BorderBrush(abi_arg_in value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -8716,11 +9309,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_BorderThickness(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -8729,10 +9323,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_BorderThickness(abi_arg_in value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -8742,11 +9337,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_CornerRadius(abi_arg_out value) noexcept override + HRESULT __stdcall get_CornerRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadius()); return S_OK; } catch (...) @@ -8755,10 +9351,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_CornerRadius(abi_arg_in value) noexcept override + HRESULT __stdcall put_CornerRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CornerRadius(*reinterpret_cast(&value)); return S_OK; } @@ -8768,11 +9365,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Padding(abi_arg_out value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -8781,10 +9379,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Padding(abi_arg_in value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -8794,11 +9393,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Background(abi_arg_out value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -8808,10 +9408,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Background(abi_arg_in value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -8825,7 +9426,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().HorizontalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalContentAlignment()); return S_OK; } catch (...) @@ -8838,6 +9440,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().HorizontalContentAlignment(value); return S_OK; } @@ -8851,7 +9454,8 @@ struct produce : produce_bas { try { - *value = detach(this->shim().VerticalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalContentAlignment()); return S_OK; } catch (...) @@ -8864,6 +9468,7 @@ struct produce : produce_bas { try { + typename D::abi_guard guard(this->shim()); this->shim().VerticalContentAlignment(value); return S_OK; } @@ -8877,11 +9482,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -8896,10 +9502,11 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_OnContentTemplateChanged(abi_arg_in oldContentTemplate, abi_arg_in newContentTemplate) noexcept override + HRESULT __stdcall abi_OnContentTemplateChanged(impl::abi_arg_in oldContentTemplate, impl::abi_arg_in newContentTemplate) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentTemplateChanged(*reinterpret_cast(&oldContentTemplate), *reinterpret_cast(&newContentTemplate)); return S_OK; } @@ -8909,10 +9516,11 @@ struct produce : pro } } - HRESULT __stdcall abi_OnContentTemplateSelectorChanged(abi_arg_in oldContentTemplateSelector, abi_arg_in newContentTemplateSelector) noexcept override + HRESULT __stdcall abi_OnContentTemplateSelectorChanged(impl::abi_arg_in oldContentTemplateSelector, impl::abi_arg_in newContentTemplateSelector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentTemplateSelectorChanged(*reinterpret_cast(&oldContentTemplateSelector), *reinterpret_cast(&newContentTemplateSelector)); return S_OK; } @@ -8926,11 +9534,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -8940,11 +9549,12 @@ struct produce : produ } } - HRESULT __stdcall get_ContentTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateProperty()); return S_OK; } catch (...) @@ -8954,11 +9564,12 @@ struct produce : produ } } - HRESULT __stdcall get_ContentTemplateSelectorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateSelectorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateSelectorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateSelectorProperty()); return S_OK; } catch (...) @@ -8968,11 +9579,12 @@ struct produce : produ } } - HRESULT __stdcall get_ContentTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTransitionsProperty()); return S_OK; } catch (...) @@ -8982,11 +9594,12 @@ struct produce : produ } } - HRESULT __stdcall get_FontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSizeProperty()); return S_OK; } catch (...) @@ -8996,11 +9609,12 @@ struct produce : produ } } - HRESULT __stdcall get_FontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamilyProperty()); return S_OK; } catch (...) @@ -9010,11 +9624,12 @@ struct produce : produ } } - HRESULT __stdcall get_FontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeightProperty()); return S_OK; } catch (...) @@ -9024,11 +9639,12 @@ struct produce : produ } } - HRESULT __stdcall get_FontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyleProperty()); return S_OK; } catch (...) @@ -9038,11 +9654,12 @@ struct produce : produ } } - HRESULT __stdcall get_FontStretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretchProperty()); return S_OK; } catch (...) @@ -9052,11 +9669,12 @@ struct produce : produ } } - HRESULT __stdcall get_CharacterSpacingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CharacterSpacingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacterSpacingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacingProperty()); return S_OK; } catch (...) @@ -9066,11 +9684,12 @@ struct produce : produ } } - HRESULT __stdcall get_ForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundProperty()); return S_OK; } catch (...) @@ -9084,11 +9703,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_OpticalMarginAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OpticalMarginAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpticalMarginAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignmentProperty()); return S_OK; } catch (...) @@ -9098,11 +9718,12 @@ struct produce : prod } } - HRESULT __stdcall get_TextLineBoundsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextLineBoundsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLineBoundsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBoundsProperty()); return S_OK; } catch (...) @@ -9116,11 +9737,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextScaleFactorEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabledProperty()); return S_OK; } catch (...) @@ -9134,11 +9756,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_TextWrappingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextWrappingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextWrappingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrappingProperty()); return S_OK; } catch (...) @@ -9148,11 +9771,12 @@ struct produce : prod } } - HRESULT __stdcall get_MaxLinesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxLinesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLinesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLinesProperty()); return S_OK; } catch (...) @@ -9162,11 +9786,12 @@ struct produce : prod } } - HRESULT __stdcall get_LineStackingStrategyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineStackingStrategyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineStackingStrategyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategyProperty()); return S_OK; } catch (...) @@ -9176,11 +9801,12 @@ struct produce : prod } } - HRESULT __stdcall get_LineHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeightProperty()); return S_OK; } catch (...) @@ -9190,11 +9816,12 @@ struct produce : prod } } - HRESULT __stdcall get_BorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -9204,11 +9831,12 @@ struct produce : prod } } - HRESULT __stdcall get_BorderThicknessProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -9218,11 +9846,12 @@ struct produce : prod } } - HRESULT __stdcall get_CornerRadiusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CornerRadiusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadiusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadiusProperty()); return S_OK; } catch (...) @@ -9232,11 +9861,12 @@ struct produce : prod } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -9246,11 +9876,12 @@ struct produce : prod } } - HRESULT __stdcall get_BackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundProperty()); return S_OK; } catch (...) @@ -9260,11 +9891,12 @@ struct produce : prod } } - HRESULT __stdcall get_HorizontalContentAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalContentAlignmentProperty()); return S_OK; } catch (...) @@ -9274,11 +9906,12 @@ struct produce : prod } } - HRESULT __stdcall get_VerticalContentAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalContentAlignmentProperty()); return S_OK; } catch (...) @@ -9296,7 +9929,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -9309,6 +9943,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return S_OK; } @@ -9322,7 +9957,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().CursorLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CursorLeft()); return S_OK; } catch (...) @@ -9335,7 +9971,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().CursorTop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CursorTop()); return S_OK; } catch (...) @@ -9352,7 +9989,8 @@ struct produce : produce_baseshim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -9365,6 +10003,7 @@ struct produce : produce_baseshim()); this->shim().FontSize(value); return S_OK; } @@ -9374,11 +10013,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -9388,10 +10028,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -9401,11 +10042,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -9414,10 +10056,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -9431,7 +10074,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -9444,6 +10088,7 @@ struct produce : produce_baseshim()); this->shim().FontStyle(value); return S_OK; } @@ -9457,7 +10102,8 @@ struct produce : produce_baseshim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -9470,6 +10116,7 @@ struct produce : produce_baseshim()); this->shim().FontStretch(value); return S_OK; } @@ -9483,7 +10130,8 @@ struct produce : produce_baseshim().CharacterSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacing()); return S_OK; } catch (...) @@ -9496,6 +10144,7 @@ struct produce : produce_baseshim()); this->shim().CharacterSpacing(value); return S_OK; } @@ -9505,11 +10154,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -9519,10 +10169,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -9536,7 +10187,8 @@ struct produce : produce_baseshim().IsTabStop()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTabStop()); return S_OK; } catch (...) @@ -9549,6 +10201,7 @@ struct produce : produce_baseshim()); this->shim().IsTabStop(value); return S_OK; } @@ -9562,7 +10215,8 @@ struct produce : produce_baseshim().IsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabled()); return S_OK; } catch (...) @@ -9575,6 +10229,7 @@ struct produce : produce_baseshim()); this->shim().IsEnabled(value); return S_OK; } @@ -9588,7 +10243,8 @@ struct produce : produce_baseshim().TabIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TabIndex()); return S_OK; } catch (...) @@ -9601,6 +10257,7 @@ struct produce : produce_baseshim()); this->shim().TabIndex(value); return S_OK; } @@ -9614,7 +10271,8 @@ struct produce : produce_baseshim().TabNavigation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TabNavigation()); return S_OK; } catch (...) @@ -9627,6 +10285,7 @@ struct produce : produce_baseshim()); this->shim().TabNavigation(value); return S_OK; } @@ -9636,11 +10295,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Template(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Template()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Template()); return S_OK; } catch (...) @@ -9650,10 +10310,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Template(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Template(*reinterpret_cast(&value)); return S_OK; } @@ -9663,11 +10324,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -9676,10 +10338,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -9693,7 +10356,8 @@ struct produce : produce_baseshim().HorizontalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalContentAlignment()); return S_OK; } catch (...) @@ -9706,6 +10370,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalContentAlignment(value); return S_OK; } @@ -9719,7 +10384,8 @@ struct produce : produce_baseshim().VerticalContentAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalContentAlignment()); return S_OK; } catch (...) @@ -9732,6 +10398,7 @@ struct produce : produce_baseshim()); this->shim().VerticalContentAlignment(value); return S_OK; } @@ -9741,11 +10408,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -9755,10 +10423,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -9768,11 +10437,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -9781,10 +10451,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -9794,11 +10465,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -9808,10 +10480,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -9825,7 +10498,8 @@ struct produce : produce_baseshim().FocusState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusState()); return S_OK; } catch (...) @@ -9834,11 +10508,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_IsEnabledChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().IsEnabledChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsEnabledChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -9851,6 +10526,7 @@ struct produce : produce_baseshim()); this->shim().IsEnabledChanged(token); return S_OK; } @@ -9864,7 +10540,8 @@ struct produce : produce_baseshim().ApplyTemplate()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ApplyTemplate()); return S_OK; } catch (...) @@ -9877,7 +10554,8 @@ struct produce : produce_baseshim().Focus(value)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Focus(value)); return S_OK; } catch (...) @@ -9894,7 +10572,8 @@ struct produce : produce_baseshim().IsTextScaleFactorEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabled()); return S_OK; } catch (...) @@ -9907,6 +10586,7 @@ struct produce : produce_baseshim()); this->shim().IsTextScaleFactorEnabled(value); return S_OK; } @@ -9924,7 +10604,8 @@ struct produce : produce_baseshim().UseSystemFocusVisuals()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseSystemFocusVisuals()); return S_OK; } catch (...) @@ -9937,6 +10618,7 @@ struct produce : produce_baseshim()); this->shim().UseSystemFocusVisuals(value); return S_OK; } @@ -9954,7 +10636,8 @@ struct produce : produce_baseshim().IsFocusEngagementEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFocusEngagementEnabled()); return S_OK; } catch (...) @@ -9967,6 +10650,7 @@ struct produce : produce_baseshim()); this->shim().IsFocusEngagementEnabled(value); return S_OK; } @@ -9980,7 +10664,8 @@ struct produce : produce_baseshim().IsFocusEngaged()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFocusEngaged()); return S_OK; } catch (...) @@ -9993,6 +10678,7 @@ struct produce : produce_baseshim()); this->shim().IsFocusEngaged(value); return S_OK; } @@ -10006,7 +10692,8 @@ struct produce : produce_baseshim().RequiresPointer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiresPointer()); return S_OK; } catch (...) @@ -10019,6 +10706,7 @@ struct produce : produce_baseshim()); this->shim().RequiresPointer(value); return S_OK; } @@ -10028,11 +10716,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusLeft(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusLeft()); return S_OK; } catch (...) @@ -10042,10 +10731,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusLeft(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusLeft(*reinterpret_cast(&value)); return S_OK; } @@ -10055,11 +10745,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusRight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusRight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusRight()); return S_OK; } catch (...) @@ -10069,10 +10760,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusRight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusRight(*reinterpret_cast(&value)); return S_OK; } @@ -10082,11 +10774,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusUp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusUp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusUp()); return S_OK; } catch (...) @@ -10096,10 +10789,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusUp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusUp(*reinterpret_cast(&value)); return S_OK; } @@ -10109,11 +10803,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusDown(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusDown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusDown()); return S_OK; } catch (...) @@ -10123,10 +10818,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusDown(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusDown(*reinterpret_cast(&value)); return S_OK; } @@ -10140,7 +10836,8 @@ struct produce : produce_baseshim().ElementSoundMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementSoundMode()); return S_OK; } catch (...) @@ -10153,6 +10850,7 @@ struct produce : produce_baseshim()); this->shim().ElementSoundMode(value); return S_OK; } @@ -10162,11 +10860,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FocusEngaged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FocusEngaged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FocusEngaged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -10179,6 +10878,7 @@ struct produce : produce_baseshim()); this->shim().FocusEngaged(token); return S_OK; } @@ -10188,11 +10888,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FocusDisengaged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FocusDisengaged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FocusDisengaged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -10205,6 +10906,7 @@ struct produce : produce_baseshim()); this->shim().FocusDisengaged(token); return S_OK; } @@ -10218,6 +10920,7 @@ struct produce : produce_baseshim()); this->shim().RemoveFocusEngagement(); return S_OK; } @@ -10231,11 +10934,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -10250,10 +10954,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OnPointerEntered(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerEntered(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerEntered(*reinterpret_cast(&e)); return S_OK; } @@ -10263,10 +10968,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerPressed(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerPressed(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerPressed(*reinterpret_cast(&e)); return S_OK; } @@ -10276,10 +10982,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerMoved(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerMoved(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerMoved(*reinterpret_cast(&e)); return S_OK; } @@ -10289,10 +10996,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerReleased(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerReleased(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerReleased(*reinterpret_cast(&e)); return S_OK; } @@ -10302,10 +11010,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerExited(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerExited(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerExited(*reinterpret_cast(&e)); return S_OK; } @@ -10315,10 +11024,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerCaptureLost(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerCaptureLost(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerCaptureLost(*reinterpret_cast(&e)); return S_OK; } @@ -10328,10 +11038,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerCanceled(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerCanceled(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerCanceled(*reinterpret_cast(&e)); return S_OK; } @@ -10341,10 +11052,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnPointerWheelChanged(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnPointerWheelChanged(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnPointerWheelChanged(*reinterpret_cast(&e)); return S_OK; } @@ -10354,10 +11066,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnTapped(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnTapped(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnTapped(*reinterpret_cast(&e)); return S_OK; } @@ -10367,10 +11080,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnDoubleTapped(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDoubleTapped(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnDoubleTapped(*reinterpret_cast(&e)); return S_OK; } @@ -10380,10 +11094,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnHolding(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnHolding(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnHolding(*reinterpret_cast(&e)); return S_OK; } @@ -10393,10 +11108,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnRightTapped(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnRightTapped(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnRightTapped(*reinterpret_cast(&e)); return S_OK; } @@ -10406,10 +11122,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnManipulationStarting(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnManipulationStarting(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnManipulationStarting(*reinterpret_cast(&e)); return S_OK; } @@ -10419,10 +11136,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnManipulationInertiaStarting(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnManipulationInertiaStarting(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnManipulationInertiaStarting(*reinterpret_cast(&e)); return S_OK; } @@ -10432,10 +11150,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnManipulationStarted(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnManipulationStarted(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnManipulationStarted(*reinterpret_cast(&e)); return S_OK; } @@ -10445,10 +11164,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnManipulationDelta(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnManipulationDelta(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnManipulationDelta(*reinterpret_cast(&e)); return S_OK; } @@ -10458,10 +11178,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnManipulationCompleted(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnManipulationCompleted(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnManipulationCompleted(*reinterpret_cast(&e)); return S_OK; } @@ -10471,10 +11192,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnKeyUp(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnKeyUp(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnKeyUp(*reinterpret_cast(&e)); return S_OK; } @@ -10484,10 +11206,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnKeyDown(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnKeyDown(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnKeyDown(*reinterpret_cast(&e)); return S_OK; } @@ -10497,10 +11220,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnGotFocus(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnGotFocus(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnGotFocus(*reinterpret_cast(&e)); return S_OK; } @@ -10510,10 +11234,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnLostFocus(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnLostFocus(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnLostFocus(*reinterpret_cast(&e)); return S_OK; } @@ -10523,10 +11248,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnDragEnter(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDragEnter(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnDragEnter(*reinterpret_cast(&e)); return S_OK; } @@ -10536,10 +11262,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnDragLeave(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDragLeave(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnDragLeave(*reinterpret_cast(&e)); return S_OK; } @@ -10549,10 +11276,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnDragOver(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDragOver(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnDragOver(*reinterpret_cast(&e)); return S_OK; } @@ -10562,10 +11290,11 @@ struct produce : produce_base } } - HRESULT __stdcall abi_OnDrop(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnDrop(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnDrop(*reinterpret_cast(&e)); return S_OK; } @@ -10579,11 +11308,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_DefaultStyleKey(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultStyleKey(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultStyleKey()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultStyleKey()); return S_OK; } catch (...) @@ -10593,11 +11323,12 @@ struct produce : produce_base } } - HRESULT __stdcall put_DefaultStyleKey(abi_arg_in value) noexcept override + HRESULT __stdcall put_DefaultStyleKey(impl::abi_arg_in value) noexcept override { try { - this->shim().DefaultStyleKey(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().DefaultStyleKey(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -10606,11 +11337,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_GetTemplateChild(abi_arg_in childName, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetTemplateChild(impl::abi_arg_in childName, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetTemplateChild(*reinterpret_cast(&childName))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetTemplateChild(*reinterpret_cast(&childName))); return S_OK; } catch (...) @@ -10624,11 +11356,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_FontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSizeProperty()); return S_OK; } catch (...) @@ -10638,11 +11371,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamilyProperty()); return S_OK; } catch (...) @@ -10652,11 +11386,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeightProperty()); return S_OK; } catch (...) @@ -10666,11 +11401,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyleProperty()); return S_OK; } catch (...) @@ -10680,11 +11416,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontStretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretchProperty()); return S_OK; } catch (...) @@ -10694,11 +11431,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CharacterSpacingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacterSpacingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacingProperty()); return S_OK; } catch (...) @@ -10708,11 +11446,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundProperty()); return S_OK; } catch (...) @@ -10722,11 +11461,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsTabStopProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTabStopProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTabStopProperty()); return S_OK; } catch (...) @@ -10736,11 +11476,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsEnabledProperty()); return S_OK; } catch (...) @@ -10750,11 +11491,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TabIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TabIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TabIndexProperty()); return S_OK; } catch (...) @@ -10764,11 +11506,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TabNavigationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TabNavigationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TabNavigationProperty()); return S_OK; } catch (...) @@ -10778,11 +11521,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateProperty()); return S_OK; } catch (...) @@ -10792,11 +11536,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -10806,11 +11551,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HorizontalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalContentAlignmentProperty()); return S_OK; } catch (...) @@ -10820,11 +11566,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VerticalContentAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalContentAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalContentAlignmentProperty()); return S_OK; } catch (...) @@ -10834,11 +11581,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundProperty()); return S_OK; } catch (...) @@ -10848,11 +11596,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -10862,11 +11611,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -10876,11 +11626,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultStyleKeyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultStyleKeyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultStyleKeyProperty()); return S_OK; } catch (...) @@ -10890,11 +11641,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FocusStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusStateProperty()); return S_OK; } catch (...) @@ -10908,11 +11660,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextScaleFactorEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabledProperty()); return S_OK; } catch (...) @@ -10926,11 +11679,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_UseSystemFocusVisualsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_UseSystemFocusVisualsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UseSystemFocusVisualsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseSystemFocusVisualsProperty()); return S_OK; } catch (...) @@ -10940,11 +11694,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_IsTemplateFocusTargetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTemplateFocusTargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTemplateFocusTargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTemplateFocusTargetProperty()); return S_OK; } catch (...) @@ -10954,11 +11709,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_GetIsTemplateFocusTarget(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetIsTemplateFocusTarget(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetIsTemplateFocusTarget(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIsTemplateFocusTarget(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -10967,10 +11723,11 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_SetIsTemplateFocusTarget(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetIsTemplateFocusTarget(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsTemplateFocusTarget(*reinterpret_cast(&element), value); return S_OK; } @@ -10984,11 +11741,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_IsFocusEngagementEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFocusEngagementEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFocusEngagementEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFocusEngagementEnabledProperty()); return S_OK; } catch (...) @@ -10998,11 +11756,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_IsFocusEngagedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFocusEngagedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFocusEngagedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFocusEngagedProperty()); return S_OK; } catch (...) @@ -11012,11 +11771,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_RequiresPointerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RequiresPointerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RequiresPointerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RequiresPointerProperty()); return S_OK; } catch (...) @@ -11026,11 +11786,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusLeftProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusLeftProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusLeftProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusLeftProperty()); return S_OK; } catch (...) @@ -11040,11 +11801,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusRightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusRightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusRightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusRightProperty()); return S_OK; } catch (...) @@ -11054,11 +11816,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusUpProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusUpProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusUpProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusUpProperty()); return S_OK; } catch (...) @@ -11068,11 +11831,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusDownProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusDownProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusDownProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusDownProperty()); return S_OK; } catch (...) @@ -11082,11 +11846,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ElementSoundModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ElementSoundModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ElementSoundModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ElementSoundModeProperty()); return S_OK; } catch (...) @@ -11100,11 +11865,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_TargetType(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetType()); return S_OK; } catch (...) @@ -11113,10 +11879,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_TargetType(abi_arg_in value) noexcept override + HRESULT __stdcall put_TargetType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetType(*reinterpret_cast(&value)); return S_OK; } @@ -11130,11 +11897,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_SelectTemplate(abi_arg_in item, abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectTemplate(impl::abi_arg_in item, impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectTemplate(*reinterpret_cast(&item), *reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectTemplate(*reinterpret_cast(&item), *reinterpret_cast(&container))); return S_OK; } catch (...) @@ -11148,11 +11916,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_SelectTemplateForItem(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectTemplateForItem(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectTemplate(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectTemplate(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -11166,11 +11935,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -11185,11 +11955,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_SelectTemplateCore(abi_arg_in item, abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectTemplateCore(impl::abi_arg_in item, impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectTemplateCore(*reinterpret_cast(&item), *reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectTemplateCore(*reinterpret_cast(&item), *reinterpret_cast(&container))); return S_OK; } catch (...) @@ -11203,11 +11974,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_SelectTemplateForItemCore(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectTemplateForItemCore(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectTemplateCore(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectTemplateCore(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -11221,11 +11993,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_OldDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldDate()); return S_OK; } catch (...) @@ -11234,11 +12007,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NewDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDate()); return S_OK; } catch (...) @@ -11251,11 +12025,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -11265,11 +12040,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -11278,11 +12054,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -11292,10 +12069,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -11305,11 +12083,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CalendarIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifier()); return S_OK; } catch (...) @@ -11319,10 +12098,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CalendarIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -11332,11 +12112,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -11345,10 +12126,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Date(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Date(*reinterpret_cast(&value)); return S_OK; } @@ -11362,7 +12144,8 @@ struct produce : produce_baseshim().DayVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayVisible()); return S_OK; } catch (...) @@ -11375,6 +12158,7 @@ struct produce : produce_baseshim()); this->shim().DayVisible(value); return S_OK; } @@ -11388,7 +12172,8 @@ struct produce : produce_baseshim().MonthVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthVisible()); return S_OK; } catch (...) @@ -11401,6 +12186,7 @@ struct produce : produce_baseshim()); this->shim().MonthVisible(value); return S_OK; } @@ -11414,7 +12200,8 @@ struct produce : produce_baseshim().YearVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearVisible()); return S_OK; } catch (...) @@ -11427,6 +12214,7 @@ struct produce : produce_baseshim()); this->shim().YearVisible(value); return S_OK; } @@ -11436,11 +12224,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DayFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayFormat()); return S_OK; } catch (...) @@ -11450,10 +12239,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DayFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11463,11 +12253,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MonthFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthFormat()); return S_OK; } catch (...) @@ -11477,10 +12268,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MonthFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MonthFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11490,11 +12282,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_YearFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearFormat()); return S_OK; } catch (...) @@ -11504,10 +12297,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_YearFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().YearFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11517,11 +12311,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MinYear(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinYear()); return S_OK; } catch (...) @@ -11530,10 +12325,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MinYear(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinYear(*reinterpret_cast(&value)); return S_OK; } @@ -11543,11 +12339,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaxYear(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxYear()); return S_OK; } catch (...) @@ -11556,10 +12353,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MaxYear(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxYear(*reinterpret_cast(&value)); return S_OK; } @@ -11573,7 +12371,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -11586,6 +12385,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -11595,11 +12395,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DateChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DateChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DateChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -11612,6 +12413,7 @@ struct produce : produce_baseshim()); this->shim().DateChanged(token); return S_OK; } @@ -11629,7 +12431,8 @@ struct produce : produce_baseshim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -11642,6 +12445,7 @@ struct produce : produce_baseshim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -11655,11 +12459,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -11674,11 +12479,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_CalendarIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifier()); return S_OK; } catch (...) @@ -11688,10 +12494,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_CalendarIdentifier(abi_arg_in value) noexcept override + HRESULT __stdcall put_CalendarIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CalendarIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -11701,11 +12508,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Date(abi_arg_out value) noexcept override + HRESULT __stdcall get_Date(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Date()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Date()); return S_OK; } catch (...) @@ -11714,10 +12522,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Date(abi_arg_in value) noexcept override + HRESULT __stdcall put_Date(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Date(*reinterpret_cast(&value)); return S_OK; } @@ -11731,7 +12540,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().DayVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayVisible()); return S_OK; } catch (...) @@ -11744,6 +12554,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().DayVisible(value); return S_OK; } @@ -11757,7 +12568,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MonthVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthVisible()); return S_OK; } catch (...) @@ -11770,6 +12582,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MonthVisible(value); return S_OK; } @@ -11783,7 +12596,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().YearVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearVisible()); return S_OK; } catch (...) @@ -11796,6 +12610,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().YearVisible(value); return S_OK; } @@ -11805,11 +12620,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MinYear(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinYear(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinYear()); return S_OK; } catch (...) @@ -11818,10 +12634,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_MinYear(abi_arg_in value) noexcept override + HRESULT __stdcall put_MinYear(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MinYear(*reinterpret_cast(&value)); return S_OK; } @@ -11831,11 +12648,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_MaxYear(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxYear(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxYear()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxYear()); return S_OK; } catch (...) @@ -11844,10 +12662,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_MaxYear(abi_arg_in value) noexcept override + HRESULT __stdcall put_MaxYear(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxYear(*reinterpret_cast(&value)); return S_OK; } @@ -11857,11 +12676,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_DatePicked(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_DatePicked(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DatePicked(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DatePicked(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -11874,6 +12694,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().DatePicked(token); return S_OK; } @@ -11883,11 +12704,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_ShowAtAsync(abi_arg_in target, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_ShowAtAsync(impl::abi_arg_in target, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAtAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAtAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -11901,11 +12723,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_DayFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayFormat()); return S_OK; } catch (...) @@ -11915,10 +12738,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_DayFormat(abi_arg_in value) noexcept override + HRESULT __stdcall put_DayFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DayFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11928,11 +12752,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MonthFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthFormat()); return S_OK; } catch (...) @@ -11942,10 +12767,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_MonthFormat(abi_arg_in value) noexcept override + HRESULT __stdcall put_MonthFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MonthFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11955,11 +12781,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_YearFormat(abi_arg_out value) noexcept override + HRESULT __stdcall get_YearFormat(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearFormat()); return S_OK; } catch (...) @@ -11969,10 +12796,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_YearFormat(abi_arg_in value) noexcept override + HRESULT __stdcall put_YearFormat(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().YearFormat(*reinterpret_cast(&value)); return S_OK; } @@ -11986,11 +12814,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_PrimaryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryText()); return S_OK; } catch (...) @@ -12000,10 +12829,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_PrimaryText(abi_arg_in value) noexcept override + HRESULT __stdcall put_PrimaryText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrimaryText(*reinterpret_cast(&value)); return S_OK; } @@ -12013,11 +12843,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SecondaryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryText()); return S_OK; } catch (...) @@ -12027,10 +12858,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_SecondaryText(abi_arg_in value) noexcept override + HRESULT __stdcall put_SecondaryText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SecondaryText(*reinterpret_cast(&value)); return S_OK; } @@ -12044,11 +12876,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_PrimaryTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PrimaryTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PrimaryTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PrimaryTextProperty()); return S_OK; } catch (...) @@ -12058,11 +12891,12 @@ struct produce : p } } - HRESULT __stdcall get_SecondaryTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SecondaryTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SecondaryTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SecondaryTextProperty()); return S_OK; } catch (...) @@ -12080,11 +12914,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_CalendarIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifierProperty()); return S_OK; } catch (...) @@ -12094,11 +12929,12 @@ struct produce : produ } } - HRESULT __stdcall get_DateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateProperty()); return S_OK; } catch (...) @@ -12108,11 +12944,12 @@ struct produce : produ } } - HRESULT __stdcall get_DayVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayVisibleProperty()); return S_OK; } catch (...) @@ -12122,11 +12959,12 @@ struct produce : produ } } - HRESULT __stdcall get_MonthVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthVisibleProperty()); return S_OK; } catch (...) @@ -12136,11 +12974,12 @@ struct produce : produ } } - HRESULT __stdcall get_YearVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_YearVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearVisibleProperty()); return S_OK; } catch (...) @@ -12150,11 +12989,12 @@ struct produce : produ } } - HRESULT __stdcall get_MinYearProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinYearProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinYearProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinYearProperty()); return S_OK; } catch (...) @@ -12164,11 +13004,12 @@ struct produce : produ } } - HRESULT __stdcall get_MaxYearProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxYearProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxYearProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxYearProperty()); return S_OK; } catch (...) @@ -12182,11 +13023,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_DayFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayFormatProperty()); return S_OK; } catch (...) @@ -12196,11 +13038,12 @@ struct produce : prod } } - HRESULT __stdcall get_MonthFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthFormatProperty()); return S_OK; } catch (...) @@ -12210,11 +13053,12 @@ struct produce : prod } } - HRESULT __stdcall get_YearFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_YearFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearFormatProperty()); return S_OK; } catch (...) @@ -12228,11 +13072,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -12242,11 +13087,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -12256,11 +13102,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_CalendarIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CalendarIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CalendarIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CalendarIdentifierProperty()); return S_OK; } catch (...) @@ -12270,11 +13117,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DateProperty()); return S_OK; } catch (...) @@ -12284,11 +13132,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DayVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayVisibleProperty()); return S_OK; } catch (...) @@ -12298,11 +13147,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MonthVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthVisibleProperty()); return S_OK; } catch (...) @@ -12312,11 +13162,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_YearVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_YearVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearVisibleProperty()); return S_OK; } catch (...) @@ -12326,11 +13177,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_DayFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DayFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DayFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DayFormatProperty()); return S_OK; } catch (...) @@ -12340,11 +13192,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MonthFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MonthFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MonthFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MonthFormatProperty()); return S_OK; } catch (...) @@ -12354,11 +13207,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_YearFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_YearFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().YearFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().YearFormatProperty()); return S_OK; } catch (...) @@ -12368,11 +13222,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MinYearProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinYearProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinYearProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinYearProperty()); return S_OK; } catch (...) @@ -12382,11 +13237,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MaxYearProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxYearProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxYearProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxYearProperty()); return S_OK; } catch (...) @@ -12396,11 +13252,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -12414,11 +13271,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -12432,11 +13290,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_OldDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldDate()); return S_OK; } catch (...) @@ -12445,11 +13304,12 @@ struct produce } } - HRESULT __stdcall get_NewDate(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewDate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewDate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewDate()); return S_OK; } catch (...) @@ -12462,11 +13322,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -12480,7 +13341,8 @@ struct produce : p { try { - *value = detach(this->shim().DropResult()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropResult()); return S_OK; } catch (...) @@ -12497,7 +13359,8 @@ struct produce : pr { try { - *value = detach(this->shim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -12510,6 +13373,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return S_OK; } @@ -12519,11 +13383,12 @@ struct produce : pr } } - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -12533,11 +13398,12 @@ struct produce : pr } } - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -12555,7 +13421,8 @@ struct produceshim().Action()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Action()); return S_OK; } catch (...) @@ -12576,7 +13443,8 @@ struct produce : produce_baseshim().UseTouchAnimationsForAllNavigation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseTouchAnimationsForAllNavigation()); return S_OK; } catch (...) @@ -12589,6 +13457,7 @@ struct produce : produce_baseshim()); this->shim().UseTouchAnimationsForAllNavigation(value); return S_OK; } @@ -12602,11 +13471,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -12625,11 +13495,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -12644,11 +13515,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_UseTouchAnimationsForAllNavigationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_UseTouchAnimationsForAllNavigationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().UseTouchAnimationsForAllNavigationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().UseTouchAnimationsForAllNavigationProperty()); return S_OK; } catch (...) @@ -12662,11 +13534,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -12676,10 +13549,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return S_OK; } @@ -12689,11 +13563,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FlyoutPresenterStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlyoutPresenterStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlyoutPresenterStyle()); return S_OK; } catch (...) @@ -12703,10 +13578,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FlyoutPresenterStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FlyoutPresenterStyle(*reinterpret_cast(&value)); return S_OK; } @@ -12720,11 +13596,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -12743,11 +13620,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -12762,11 +13640,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -12776,11 +13655,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FlyoutPresenterStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FlyoutPresenterStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FlyoutPresenterStyleProperty()); return S_OK; } catch (...) @@ -12802,11 +13682,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Glyph(abi_arg_out value) noexcept override + HRESULT __stdcall get_Glyph(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Glyph()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Glyph()); return S_OK; } catch (...) @@ -12816,10 +13697,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Glyph(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Glyph(*reinterpret_cast(&value)); return S_OK; } @@ -12833,7 +13715,8 @@ struct produce : produce_baseshim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -12846,6 +13729,7 @@ struct produce : produce_baseshim()); this->shim().FontSize(value); return S_OK; } @@ -12855,11 +13739,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -12869,10 +13754,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -12882,11 +13768,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -12895,10 +13782,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -12912,7 +13800,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -12925,6 +13814,7 @@ struct produce : produce_baseshim()); this->shim().FontStyle(value); return S_OK; } @@ -12942,7 +13832,8 @@ struct produce : produce_baseshim().IsTextScaleFactorEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabled()); return S_OK; } catch (...) @@ -12955,6 +13846,7 @@ struct produce : produce_baseshim()); this->shim().IsTextScaleFactorEnabled(value); return S_OK; } @@ -12972,7 +13864,8 @@ struct produce : produce_baseshim().MirroredWhenRightToLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MirroredWhenRightToLeft()); return S_OK; } catch (...) @@ -12985,6 +13878,7 @@ struct produce : produce_baseshim()); this->shim().MirroredWhenRightToLeft(value); return S_OK; } @@ -12998,11 +13892,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -13017,11 +13912,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_GlyphProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GlyphProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GlyphProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GlyphProperty()); return S_OK; } catch (...) @@ -13031,11 +13927,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSizeProperty()); return S_OK; } catch (...) @@ -13045,11 +13942,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamilyProperty()); return S_OK; } catch (...) @@ -13059,11 +13957,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeightProperty()); return S_OK; } catch (...) @@ -13073,11 +13972,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyleProperty()); return S_OK; } catch (...) @@ -13091,11 +13991,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextScaleFactorEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabledProperty()); return S_OK; } catch (...) @@ -13109,11 +14010,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_MirroredWhenRightToLeftProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MirroredWhenRightToLeftProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MirroredWhenRightToLeftProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MirroredWhenRightToLeftProperty()); return S_OK; } catch (...) @@ -13131,7 +14033,8 @@ struct produce : produce_baseshim().CacheSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheSize()); return S_OK; } catch (...) @@ -13144,6 +14047,7 @@ struct produce : produce_baseshim()); this->shim().CacheSize(value); return S_OK; } @@ -13157,7 +14061,8 @@ struct produce : produce_baseshim().CanGoBack()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoBack()); return S_OK; } catch (...) @@ -13170,7 +14075,8 @@ struct produce : produce_baseshim().CanGoForward()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoForward()); return S_OK; } catch (...) @@ -13179,11 +14085,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrentSourcePageType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentSourcePageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentSourcePageType()); return S_OK; } catch (...) @@ -13192,11 +14099,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourcePageType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePageType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePageType()); return S_OK; } catch (...) @@ -13205,10 +14113,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SourcePageType(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourcePageType(*reinterpret_cast(&value)); return S_OK; } @@ -13222,7 +14131,8 @@ struct produce : produce_baseshim().BackStackDepth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackStackDepth()); return S_OK; } catch (...) @@ -13231,11 +14141,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Navigated(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Navigated(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Navigated(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -13248,6 +14159,7 @@ struct produce : produce_baseshim()); this->shim().Navigated(token); return S_OK; } @@ -13257,11 +14169,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Navigating(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Navigating(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Navigating(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -13274,6 +14187,7 @@ struct produce : produce_baseshim()); this->shim().Navigating(token); return S_OK; } @@ -13283,11 +14197,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_NavigationFailed(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationFailed(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationFailed(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -13300,6 +14215,7 @@ struct produce : produce_baseshim()); this->shim().NavigationFailed(token); return S_OK; } @@ -13309,11 +14225,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_NavigationStopped(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationStopped(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationStopped(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -13326,6 +14243,7 @@ struct produce : produce_baseshim()); this->shim().NavigationStopped(token); return S_OK; } @@ -13339,6 +14257,7 @@ struct produce : produce_baseshim()); this->shim().GoBack(); return S_OK; } @@ -13352,6 +14271,7 @@ struct produce : produce_baseshim()); this->shim().GoForward(); return S_OK; } @@ -13361,11 +14281,12 @@ struct produce : produce_base sourcePageType, abi_arg_in parameter, bool * returnValue) noexcept override + HRESULT __stdcall abi_Navigate(impl::abi_arg_in sourcePageType, impl::abi_arg_in parameter, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().Navigate(*reinterpret_cast(&sourcePageType), *reinterpret_cast(¶meter))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Navigate(*reinterpret_cast(&sourcePageType), *reinterpret_cast(¶meter))); return S_OK; } catch (...) @@ -13374,11 +14295,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetNavigationState(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetNavigationState()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetNavigationState()); return S_OK; } catch (...) @@ -13388,10 +14310,11 @@ struct produce : produce_base navigationState) noexcept override + HRESULT __stdcall abi_SetNavigationState(impl::abi_arg_in navigationState) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetNavigationState(*reinterpret_cast(&navigationState)); return S_OK; } @@ -13405,11 +14328,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BackStack(abi_arg_out> value) noexcept override + HRESULT __stdcall get_BackStack(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().BackStack()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackStack()); return S_OK; } catch (...) @@ -13419,11 +14343,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ForwardStack(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ForwardStack()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardStack()); return S_OK; } catch (...) @@ -13433,11 +14358,12 @@ struct produce : produce_base sourcePageType, abi_arg_in parameter, abi_arg_in infoOverride, bool * returnValue) noexcept override + HRESULT __stdcall abi_Navigate(impl::abi_arg_in sourcePageType, impl::abi_arg_in parameter, impl::abi_arg_in infoOverride, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().Navigate(*reinterpret_cast(&sourcePageType), *reinterpret_cast(¶meter), *reinterpret_cast(&infoOverride))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Navigate(*reinterpret_cast(&sourcePageType), *reinterpret_cast(¶meter), *reinterpret_cast(&infoOverride))); return S_OK; } catch (...) @@ -13450,10 +14376,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GoBack(abi_arg_in transitionInfoOverride) noexcept override + HRESULT __stdcall abi_GoBack(impl::abi_arg_in transitionInfoOverride) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GoBack(*reinterpret_cast(&transitionInfoOverride)); return S_OK; } @@ -13467,11 +14394,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -13486,11 +14414,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CacheSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CacheSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CacheSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheSizeProperty()); return S_OK; } catch (...) @@ -13500,11 +14429,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CanGoBackProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanGoBackProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoBackProperty()); return S_OK; } catch (...) @@ -13514,11 +14444,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CanGoForwardProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanGoForwardProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoForwardProperty()); return S_OK; } catch (...) @@ -13528,11 +14459,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CurrentSourcePageTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentSourcePageTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentSourcePageTypeProperty()); return S_OK; } catch (...) @@ -13542,11 +14474,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourcePageTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourcePageTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourcePageTypeProperty()); return S_OK; } catch (...) @@ -13556,11 +14489,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BackStackDepthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackStackDepthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackStackDepthProperty()); return S_OK; } catch (...) @@ -13574,11 +14508,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BackStackProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackStackProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackStackProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackStackProperty()); return S_OK; } catch (...) @@ -13588,11 +14523,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ForwardStackProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForwardStackProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForwardStackProperty()); return S_OK; } catch (...) @@ -13606,11 +14542,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_RowDefinitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RowDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RowDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowDefinitions()); return S_OK; } catch (...) @@ -13620,11 +14557,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ColumnDefinitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ColumnDefinitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnDefinitions()); return S_OK; } catch (...) @@ -13638,11 +14576,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BorderBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -13652,10 +14591,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -13665,11 +14605,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -13678,10 +14619,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -13691,11 +14633,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadius()); return S_OK; } catch (...) @@ -13704,10 +14647,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CornerRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CornerRadius(*reinterpret_cast(&value)); return S_OK; } @@ -13717,11 +14661,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -13730,10 +14675,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -13747,11 +14693,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -13766,11 +14713,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_RowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowProperty()); return S_OK; } catch (...) @@ -13780,11 +14728,12 @@ struct produce : produce_base element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetRow(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetRow(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRow(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -13793,10 +14742,11 @@ struct produce : produce_base element, int32_t value) noexcept override + HRESULT __stdcall abi_SetRow(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRow(*reinterpret_cast(&element), value); return S_OK; } @@ -13806,11 +14756,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ColumnProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnProperty()); return S_OK; } catch (...) @@ -13820,11 +14771,12 @@ struct produce : produce_base element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetColumn(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetColumn(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetColumn(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -13833,10 +14785,11 @@ struct produce : produce_base element, int32_t value) noexcept override + HRESULT __stdcall abi_SetColumn(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetColumn(*reinterpret_cast(&element), value); return S_OK; } @@ -13846,11 +14799,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RowSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowSpanProperty()); return S_OK; } catch (...) @@ -13860,11 +14814,12 @@ struct produce : produce_base element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetRowSpan(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetRowSpan(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRowSpan(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -13873,10 +14828,11 @@ struct produce : produce_base element, int32_t value) noexcept override + HRESULT __stdcall abi_SetRowSpan(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRowSpan(*reinterpret_cast(&element), value); return S_OK; } @@ -13886,11 +14842,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ColumnSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnSpanProperty()); return S_OK; } catch (...) @@ -13900,11 +14857,12 @@ struct produce : produce_base element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetColumnSpan(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetColumnSpan(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetColumnSpan(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -13913,10 +14871,11 @@ struct produce : produce_base element, int32_t value) noexcept override + HRESULT __stdcall abi_SetColumnSpan(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetColumnSpan(*reinterpret_cast(&element), value); return S_OK; } @@ -13930,11 +14889,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -13944,11 +14904,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -13958,11 +14919,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadiusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadiusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadiusProperty()); return S_OK; } catch (...) @@ -13972,11 +14934,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -13994,11 +14957,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14017,11 +14981,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14036,11 +15001,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_TemplateSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -14054,11 +15020,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14077,11 +15044,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14096,11 +15064,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Panel(abi_arg_out value) noexcept override + HRESULT __stdcall get_Panel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Panel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Panel()); return S_OK; } catch (...) @@ -14110,10 +15079,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Panel(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Panel(*reinterpret_cast(&value)); return S_OK; } @@ -14123,11 +15093,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContainerStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainerStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerStyle()); return S_OK; } catch (...) @@ -14137,10 +15108,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContainerStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContainerStyle(*reinterpret_cast(&value)); return S_OK; } @@ -14150,11 +15122,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContainerStyleSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainerStyleSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainerStyleSelector()); return S_OK; } catch (...) @@ -14164,10 +15137,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContainerStyleSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContainerStyleSelector(*reinterpret_cast(&value)); return S_OK; } @@ -14177,11 +15151,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -14191,10 +15166,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -14204,11 +15180,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplateSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateSelector()); return S_OK; } catch (...) @@ -14218,10 +15195,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplateSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplateSelector(*reinterpret_cast(&value)); return S_OK; } @@ -14235,7 +15213,8 @@ struct produce : produce_baseshim().HidesIfEmpty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HidesIfEmpty()); return S_OK; } catch (...) @@ -14248,6 +15227,7 @@ struct produce : produce_baseshim()); this->shim().HidesIfEmpty(value); return S_OK; } @@ -14261,11 +15241,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HeaderContainerStyle(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderContainerStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderContainerStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderContainerStyle()); return S_OK; } catch (...) @@ -14275,10 +15256,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderContainerStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderContainerStyle(*reinterpret_cast(&value)); return S_OK; } @@ -14292,11 +15274,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14311,11 +15294,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall abi_SelectGroupStyle(abi_arg_in group, uint32_t level, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectGroupStyle(impl::abi_arg_in group, uint32_t level, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectGroupStyle(*reinterpret_cast(&group), level)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectGroupStyle(*reinterpret_cast(&group), level)); return S_OK; } catch (...) @@ -14329,11 +15313,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14348,11 +15333,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_SelectGroupStyleCore(abi_arg_in group, uint32_t level, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectGroupStyleCore(impl::abi_arg_in group, uint32_t level, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectGroupStyleCore(*reinterpret_cast(&group), level)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectGroupStyleCore(*reinterpret_cast(&group), level)); return S_OK; } catch (...) @@ -14366,11 +15352,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -14380,11 +15367,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -14393,11 +15381,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -14407,10 +15396,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -14424,7 +15414,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -14437,6 +15428,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -14450,7 +15442,8 @@ struct produce : produce_baseshim().DefaultSectionIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultSectionIndex()); return S_OK; } catch (...) @@ -14463,6 +15456,7 @@ struct produce : produce_baseshim()); this->shim().DefaultSectionIndex(value); return S_OK; } @@ -14472,11 +15466,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Sections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Sections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Sections()); return S_OK; } catch (...) @@ -14486,11 +15481,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SectionsInView(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SectionsInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SectionsInView()); return S_OK; } catch (...) @@ -14500,11 +15496,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_SectionHeaders(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SectionHeaders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SectionHeaders()); return S_OK; } catch (...) @@ -14514,11 +15511,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SectionHeaderClick(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SectionHeaderClick(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SectionHeaderClick(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -14531,6 +15529,7 @@ struct produce : produce_baseshim()); this->shim().SectionHeaderClick(token); return S_OK; } @@ -14540,11 +15539,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SectionsInViewChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SectionsInViewChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SectionsInViewChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -14557,6 +15557,7 @@ struct produce : produce_baseshim()); this->shim().SectionsInViewChanged(token); return S_OK; } @@ -14566,10 +15567,11 @@ struct produce : produce_base section) noexcept override + HRESULT __stdcall abi_ScrollToSection(impl::abi_arg_in section) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ScrollToSection(*reinterpret_cast(§ion)); return S_OK; } @@ -14583,11 +15585,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14602,11 +15605,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -14616,11 +15620,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -14629,11 +15634,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -14643,10 +15649,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -14656,11 +15663,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplate()); return S_OK; } catch (...) @@ -14670,10 +15678,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ContentTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ContentTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -14687,7 +15696,8 @@ struct produce : produce_baseshim().IsHeaderInteractive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHeaderInteractive()); return S_OK; } catch (...) @@ -14700,6 +15710,7 @@ struct produce : produce_baseshim()); this->shim().IsHeaderInteractive(value); return S_OK; } @@ -14713,11 +15724,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14732,11 +15744,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Section(abi_arg_out value) noexcept override + HRESULT __stdcall get_Section(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Section()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Section()); return S_OK; } catch (...) @@ -14750,11 +15763,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -14764,11 +15778,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -14778,11 +15793,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ContentTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentTemplateProperty()); return S_OK; } catch (...) @@ -14792,11 +15808,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_IsHeaderInteractiveProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsHeaderInteractiveProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsHeaderInteractiveProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHeaderInteractiveProperty()); return S_OK; } catch (...) @@ -14810,11 +15827,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -14824,11 +15842,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -14838,11 +15857,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -14852,11 +15872,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultSectionIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultSectionIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultSectionIndexProperty()); return S_OK; } catch (...) @@ -14866,11 +15887,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SemanticZoomOwnerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemanticZoomOwnerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemanticZoomOwnerProperty()); return S_OK; } catch (...) @@ -14880,11 +15902,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsActiveViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsActiveViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActiveViewProperty()); return S_OK; } catch (...) @@ -14894,11 +15917,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsZoomedInViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomedInViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomedInViewProperty()); return S_OK; } catch (...) @@ -14912,11 +15936,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_NavigateUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_NavigateUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NavigateUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NavigateUri()); return S_OK; } catch (...) @@ -14926,10 +15951,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_NavigateUri(abi_arg_in value) noexcept override + HRESULT __stdcall put_NavigateUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigateUri(*reinterpret_cast(&value)); return S_OK; } @@ -14943,11 +15969,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -14962,11 +15989,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_NavigateUriProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NavigateUriProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NavigateUriProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NavigateUriProperty()); return S_OK; } catch (...) @@ -14980,11 +16008,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_Foreground(abi_arg_out value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -14994,10 +16023,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -15015,11 +16045,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_ForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundProperty()); return S_OK; } catch (...) @@ -15033,11 +16064,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -15047,10 +16079,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -15064,7 +16097,8 @@ struct produce : produce_baseshim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -15077,6 +16111,7 @@ struct produce : produce_baseshim()); this->shim().Stretch(value); return S_OK; } @@ -15086,11 +16121,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NineGrid(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NineGrid()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NineGrid()); return S_OK; } catch (...) @@ -15099,10 +16135,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_NineGrid(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NineGrid(*reinterpret_cast(&value)); return S_OK; } @@ -15112,11 +16149,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlayToSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToSource()); return S_OK; } catch (...) @@ -15126,11 +16164,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ImageFailed(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ImageFailed(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ImageFailed(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -15143,6 +16182,7 @@ struct produce : produce_baseshim()); this->shim().ImageFailed(token); return S_OK; } @@ -15152,11 +16192,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ImageOpened(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ImageOpened(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ImageOpened(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -15169,6 +16210,7 @@ struct produce : produce_baseshim()); this->shim().ImageOpened(token); return S_OK; } @@ -15182,11 +16224,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetAsCastingSource(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAsCastingSource(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAsCastingSource()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAsCastingSource()); return S_OK; } catch (...) @@ -15200,11 +16243,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetAlphaMask(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAlphaMask(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAlphaMask()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAlphaMask()); return S_OK; } catch (...) @@ -15218,11 +16262,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceProperty()); return S_OK; } catch (...) @@ -15232,11 +16277,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -15246,11 +16292,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NineGridProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NineGridProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NineGridProperty()); return S_OK; } catch (...) @@ -15260,11 +16307,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlayToSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToSourceProperty()); return S_OK; } catch (...) @@ -15278,11 +16326,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_InkPresenter(abi_arg_out value) noexcept override + HRESULT __stdcall get_InkPresenter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkPresenter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkPresenter()); return S_OK; } catch (...) @@ -15296,11 +16345,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15319,7 +16369,8 @@ struct produce : produce_baseshim().InitialControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialControls()); return S_OK; } catch (...) @@ -15332,6 +16383,7 @@ struct produce : produce_baseshim()); this->shim().InitialControls(value); return S_OK; } @@ -15341,11 +16393,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Children(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Children()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Children()); return S_OK; } catch (...) @@ -15355,11 +16408,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ActiveTool(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActiveTool()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveTool()); return S_OK; } catch (...) @@ -15369,10 +16423,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ActiveTool(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ActiveTool(*reinterpret_cast(&value)); return S_OK; } @@ -15382,11 +16437,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InkDrawingAttributes(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkDrawingAttributes()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkDrawingAttributes()); return S_OK; } catch (...) @@ -15400,7 +16456,8 @@ struct produce : produce_baseshim().IsRulerButtonChecked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRulerButtonChecked()); return S_OK; } catch (...) @@ -15413,6 +16470,7 @@ struct produce : produce_baseshim()); this->shim().IsRulerButtonChecked(value); return S_OK; } @@ -15422,11 +16480,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TargetInkCanvas(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetInkCanvas()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetInkCanvas()); return S_OK; } catch (...) @@ -15436,10 +16495,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TargetInkCanvas(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TargetInkCanvas(*reinterpret_cast(&value)); return S_OK; } @@ -15449,11 +16509,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ActiveToolChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ActiveToolChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ActiveToolChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -15466,6 +16527,7 @@ struct produce : produce_baseshim()); this->shim().ActiveToolChanged(token); return S_OK; } @@ -15475,11 +16537,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_InkDrawingAttributesChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().InkDrawingAttributesChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().InkDrawingAttributesChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -15492,6 +16555,7 @@ struct produce : produce_baseshim()); this->shim().InkDrawingAttributesChanged(token); return S_OK; } @@ -15501,11 +16565,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_EraseAllClicked(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().EraseAllClicked(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().EraseAllClicked(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -15518,6 +16583,7 @@ struct produce : produce_baseshim()); this->shim().EraseAllClicked(token); return S_OK; } @@ -15527,11 +16593,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_IsRulerButtonCheckedChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().IsRulerButtonCheckedChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().IsRulerButtonCheckedChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -15544,6 +16611,7 @@ struct produce : produce_baseshim()); this->shim().IsRulerButtonCheckedChanged(token); return S_OK; } @@ -15553,11 +16621,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetToolButton(Windows::UI::Xaml::Controls::InkToolbarTool tool, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetToolButton(tool)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetToolButton(tool)); return S_OK; } catch (...) @@ -15567,11 +16636,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetToggleButton(Windows::UI::Xaml::Controls::InkToolbarToggle tool, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetToggleButton(tool)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetToggleButton(tool)); return S_OK; } catch (...) @@ -15589,11 +16659,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15608,11 +16679,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInkDrawingAttributes(abi_arg_in brush, double strokeWidth, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateInkDrawingAttributes(impl::abi_arg_in brush, double strokeWidth, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateInkDrawingAttributes(*reinterpret_cast(&brush), strokeWidth)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateInkDrawingAttributes(*reinterpret_cast(&brush), strokeWidth)); return S_OK; } catch (...) @@ -15626,11 +16698,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_CustomPen(abi_arg_out value) noexcept override + HRESULT __stdcall get_CustomPen(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomPen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomPen()); return S_OK; } catch (...) @@ -15640,10 +16713,11 @@ struct produce : pro } } - HRESULT __stdcall put_CustomPen(abi_arg_in value) noexcept override + HRESULT __stdcall put_CustomPen(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CustomPen(*reinterpret_cast(&value)); return S_OK; } @@ -15653,11 +16727,12 @@ struct produce : pro } } - HRESULT __stdcall get_ConfigurationContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConfigurationContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfigurationContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationContent()); return S_OK; } catch (...) @@ -15667,10 +16742,11 @@ struct produce : pro } } - HRESULT __stdcall put_ConfigurationContent(abi_arg_in value) noexcept override + HRESULT __stdcall put_ConfigurationContent(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigurationContent(*reinterpret_cast(&value)); return S_OK; } @@ -15684,11 +16760,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15703,11 +16780,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_CustomPenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CustomPenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CustomPenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CustomPenProperty()); return S_OK; } catch (...) @@ -15717,11 +16795,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_ConfigurationContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfigurationContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationContentProperty()); return S_OK; } catch (...) @@ -15735,11 +16814,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15754,11 +16834,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateInkDrawingAttributesCore(abi_arg_in brush, double strokeWidth, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateInkDrawingAttributesCore(impl::abi_arg_in brush, double strokeWidth, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateInkDrawingAttributesCore(*reinterpret_cast(&brush), strokeWidth)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateInkDrawingAttributesCore(*reinterpret_cast(&brush), strokeWidth)); return S_OK; } catch (...) @@ -15776,11 +16857,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15795,11 +16877,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ConfigurationContent(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConfigurationContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfigurationContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationContent()); return S_OK; } catch (...) @@ -15809,10 +16892,11 @@ struct produce : pr } } - HRESULT __stdcall put_ConfigurationContent(abi_arg_in value) noexcept override + HRESULT __stdcall put_ConfigurationContent(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ConfigurationContent(*reinterpret_cast(&value)); return S_OK; } @@ -15826,11 +16910,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15845,11 +16930,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ConfigurationContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConfigurationContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfigurationContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfigurationContentProperty()); return S_OK; } catch (...) @@ -15867,11 +16953,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15886,11 +16973,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15909,11 +16997,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -15928,11 +17017,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Palette(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Palette(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Palette()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Palette()); return S_OK; } catch (...) @@ -15942,10 +17032,11 @@ struct produce : produce_b } } - HRESULT __stdcall put_Palette(abi_arg_in> value) noexcept override + HRESULT __stdcall put_Palette(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Palette(*reinterpret_cast *>(&value)); return S_OK; } @@ -15959,7 +17050,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MinStrokeWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinStrokeWidth()); return S_OK; } catch (...) @@ -15972,6 +17064,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().MinStrokeWidth(value); return S_OK; } @@ -15985,7 +17078,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().MaxStrokeWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxStrokeWidth()); return S_OK; } catch (...) @@ -15998,6 +17092,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxStrokeWidth(value); return S_OK; } @@ -16007,11 +17102,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectedBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBrush()); return S_OK; } catch (...) @@ -16025,7 +17121,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SelectedBrushIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBrushIndex()); return S_OK; } catch (...) @@ -16038,6 +17135,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedBrushIndex(value); return S_OK; } @@ -16051,7 +17149,8 @@ struct produce : produce_b { try { - *value = detach(this->shim().SelectedStrokeWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedStrokeWidth()); return S_OK; } catch (...) @@ -16064,6 +17163,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedStrokeWidth(value); return S_OK; } @@ -16081,11 +17181,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_PaletteProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaletteProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaletteProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaletteProperty()); return S_OK; } catch (...) @@ -16095,11 +17196,12 @@ struct produce : pr } } - HRESULT __stdcall get_MinStrokeWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinStrokeWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinStrokeWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinStrokeWidthProperty()); return S_OK; } catch (...) @@ -16109,11 +17211,12 @@ struct produce : pr } } - HRESULT __stdcall get_MaxStrokeWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxStrokeWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxStrokeWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxStrokeWidthProperty()); return S_OK; } catch (...) @@ -16123,11 +17226,12 @@ struct produce : pr } } - HRESULT __stdcall get_SelectedBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBrushProperty()); return S_OK; } catch (...) @@ -16137,11 +17241,12 @@ struct produce : pr } } - HRESULT __stdcall get_SelectedBrushIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedBrushIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedBrushIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedBrushIndexProperty()); return S_OK; } catch (...) @@ -16151,11 +17256,12 @@ struct produce : pr } } - HRESULT __stdcall get_SelectedStrokeWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedStrokeWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedStrokeWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedStrokeWidthProperty()); return S_OK; } catch (...) @@ -16169,11 +17275,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_PenButton(abi_arg_out value) noexcept override + HRESULT __stdcall get_PenButton(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PenButton()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenButton()); return S_OK; } catch (...) @@ -16187,11 +17294,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -16206,11 +17314,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PenButtonProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PenButtonProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PenButtonProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PenButtonProperty()); return S_OK; } catch (...) @@ -16228,11 +17337,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -16247,11 +17357,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Ruler(abi_arg_out value) noexcept override + HRESULT __stdcall get_Ruler(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Ruler()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Ruler()); return S_OK; } catch (...) @@ -16265,11 +17376,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -16284,11 +17396,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_RulerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RulerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RulerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RulerProperty()); return S_OK; } catch (...) @@ -16302,11 +17415,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_InitialControlsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_InitialControlsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InitialControlsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InitialControlsProperty()); return S_OK; } catch (...) @@ -16316,11 +17430,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ChildrenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChildrenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildrenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildrenProperty()); return S_OK; } catch (...) @@ -16330,11 +17445,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ActiveToolProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActiveToolProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActiveToolProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActiveToolProperty()); return S_OK; } catch (...) @@ -16344,11 +17460,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_InkDrawingAttributesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_InkDrawingAttributesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InkDrawingAttributesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InkDrawingAttributesProperty()); return S_OK; } catch (...) @@ -16358,11 +17475,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_IsRulerButtonCheckedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsRulerButtonCheckedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsRulerButtonCheckedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsRulerButtonCheckedProperty()); return S_OK; } catch (...) @@ -16372,11 +17490,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_TargetInkCanvasProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TargetInkCanvasProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TargetInkCanvasProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TargetInkCanvasProperty()); return S_OK; } catch (...) @@ -16394,7 +17513,8 @@ struct produce : produc { try { - *value = detach(this->shim().ToggleKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToggleKind()); return S_OK; } catch (...) @@ -16415,7 +17535,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().ToolKind()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToolKind()); return S_OK; } catch (...) @@ -16428,7 +17549,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsExtensionGlyphShown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsExtensionGlyphShown()); return S_OK; } catch (...) @@ -16441,6 +17563,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsExtensionGlyphShown(value); return S_OK; } @@ -16458,11 +17581,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_IsExtensionGlyphShownProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsExtensionGlyphShownProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsExtensionGlyphShownProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsExtensionGlyphShownProperty()); return S_OK; } catch (...) @@ -16476,10 +17600,11 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall abi_GetInsertionIndexes(abi_arg_in position, int32_t * first, int32_t * second) noexcept override + HRESULT __stdcall abi_GetInsertionIndexes(impl::abi_arg_in position, int32_t * first, int32_t * second) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GetInsertionIndexes(*reinterpret_cast(&position), *first, *second); return S_OK; } @@ -16493,11 +17618,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ClickedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClickedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClickedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClickedItem()); return S_OK; } catch (...) @@ -16511,11 +17637,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall add_ItemsChanged(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_ItemsChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemsChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemsChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -16528,6 +17655,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemsChanged(token); return S_OK; } @@ -16537,11 +17665,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ItemFromContainer(abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ItemFromContainer(impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ItemFromContainer(*reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ItemFromContainer(*reinterpret_cast(&container))); return S_OK; } catch (...) @@ -16551,11 +17680,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ContainerFromItem(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ContainerFromItem(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContainerFromItem(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContainerFromItem(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -16565,11 +17695,12 @@ struct produce : produc } } - HRESULT __stdcall abi_IndexFromContainer(abi_arg_in container, int32_t * returnValue) noexcept override + HRESULT __stdcall abi_IndexFromContainer(impl::abi_arg_in container, int32_t * returnValue) noexcept override { try { - *returnValue = detach(this->shim().IndexFromContainer(*reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IndexFromContainer(*reinterpret_cast(&container))); return S_OK; } catch (...) @@ -16578,11 +17709,12 @@ struct produce : produc } } - HRESULT __stdcall abi_ContainerFromIndex(int32_t index, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ContainerFromIndex(int32_t index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContainerFromIndex(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContainerFromIndex(index)); return S_OK; } catch (...) @@ -16592,11 +17724,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GetItemContainerGeneratorForPanel(abi_arg_in panel, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItemContainerGeneratorForPanel(impl::abi_arg_in panel, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemContainerGeneratorForPanel(*reinterpret_cast(&panel))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemContainerGeneratorForPanel(*reinterpret_cast(&panel))); return S_OK; } catch (...) @@ -16606,10 +17739,11 @@ struct produce : produc } } - HRESULT __stdcall abi_StartAt(abi_arg_in position, Windows::UI::Xaml::Controls::Primitives::GeneratorDirection direction, bool allowStartAtRealizedItem) noexcept override + HRESULT __stdcall abi_StartAt(impl::abi_arg_in position, Windows::UI::Xaml::Controls::Primitives::GeneratorDirection direction, bool allowStartAtRealizedItem) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartAt(*reinterpret_cast(&position), direction, allowStartAtRealizedItem); return S_OK; } @@ -16623,6 +17757,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Stop(); return S_OK; } @@ -16632,11 +17767,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GenerateNext(bool * isNewlyRealized, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GenerateNext(bool * isNewlyRealized, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GenerateNext(*isNewlyRealized)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GenerateNext(*isNewlyRealized)); return S_OK; } catch (...) @@ -16646,10 +17782,11 @@ struct produce : produc } } - HRESULT __stdcall abi_PrepareItemContainer(abi_arg_in container) noexcept override + HRESULT __stdcall abi_PrepareItemContainer(impl::abi_arg_in container) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PrepareItemContainer(*reinterpret_cast(&container)); return S_OK; } @@ -16663,6 +17800,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveAll(); return S_OK; } @@ -16672,10 +17810,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Remove(abi_arg_in position, int32_t count) noexcept override + HRESULT __stdcall abi_Remove(impl::abi_arg_in position, int32_t count) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&position), count); return S_OK; } @@ -16685,11 +17824,12 @@ struct produce : produc } } - HRESULT __stdcall abi_GeneratorPositionFromIndex(int32_t itemIndex, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GeneratorPositionFromIndex(int32_t itemIndex, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GeneratorPositionFromIndex(itemIndex)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GeneratorPositionFromIndex(itemIndex)); return S_OK; } catch (...) @@ -16698,11 +17838,12 @@ struct produce : produc } } - HRESULT __stdcall abi_IndexFromGeneratorPosition(abi_arg_in position, int32_t * returnValue) noexcept override + HRESULT __stdcall abi_IndexFromGeneratorPosition(impl::abi_arg_in position, int32_t * returnValue) noexcept override { try { - *returnValue = detach(this->shim().IndexFromGeneratorPosition(*reinterpret_cast(&position))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IndexFromGeneratorPosition(*reinterpret_cast(&position))); return S_OK; } catch (...) @@ -16711,10 +17852,11 @@ struct produce : produc } } - HRESULT __stdcall abi_Recycle(abi_arg_in position, int32_t count) noexcept override + HRESULT __stdcall abi_Recycle(impl::abi_arg_in position, int32_t count) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Recycle(*reinterpret_cast(&position), count); return S_OK; } @@ -16728,11 +17870,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_ItemFromContainer(abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ItemFromContainer(impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ItemFromContainer(*reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ItemFromContainer(*reinterpret_cast(&container))); return S_OK; } catch (...) @@ -16742,11 +17885,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ContainerFromItem(abi_arg_in item, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ContainerFromItem(impl::abi_arg_in item, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContainerFromItem(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContainerFromItem(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -16756,11 +17900,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_IndexFromContainer(abi_arg_in container, int32_t * returnValue) noexcept override + HRESULT __stdcall abi_IndexFromContainer(impl::abi_arg_in container, int32_t * returnValue) noexcept override { try { - *returnValue = detach(this->shim().IndexFromContainer(*reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IndexFromContainer(*reinterpret_cast(&container))); return S_OK; } catch (...) @@ -16769,11 +17914,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_ContainerFromIndex(int32_t index, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ContainerFromIndex(int32_t index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ContainerFromIndex(index)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ContainerFromIndex(index)); return S_OK; } catch (...) @@ -16787,11 +17933,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ItemsSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSource()); return S_OK; } catch (...) @@ -16801,11 +17948,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemsSource(impl::abi_arg_in value) noexcept override { try { - this->shim().ItemsSource(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ItemsSource(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -16814,11 +17962,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -16828,11 +17977,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplate()); return S_OK; } catch (...) @@ -16842,10 +17992,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -16855,11 +18006,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemTemplateSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateSelector()); return S_OK; } catch (...) @@ -16869,10 +18021,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemTemplateSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemTemplateSelector(*reinterpret_cast(&value)); return S_OK; } @@ -16882,11 +18035,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemsPanel(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsPanel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsPanel()); return S_OK; } catch (...) @@ -16896,10 +18050,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemsPanel(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemsPanel(*reinterpret_cast(&value)); return S_OK; } @@ -16909,11 +18064,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DisplayMemberPath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMemberPath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMemberPath()); return S_OK; } catch (...) @@ -16923,10 +18079,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DisplayMemberPath(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMemberPath(*reinterpret_cast(&value)); return S_OK; } @@ -16936,11 +18093,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemContainerStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerStyle()); return S_OK; } catch (...) @@ -16950,10 +18108,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemContainerStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemContainerStyle(*reinterpret_cast(&value)); return S_OK; } @@ -16963,11 +18122,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemContainerStyleSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerStyleSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerStyleSelector()); return S_OK; } catch (...) @@ -16977,10 +18137,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ItemContainerStyleSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemContainerStyleSelector(*reinterpret_cast(&value)); return S_OK; } @@ -16990,11 +18151,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ItemContainerGenerator(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerGenerator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerGenerator()); return S_OK; } catch (...) @@ -17004,11 +18166,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ItemContainerTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ItemContainerTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerTransitions()); return S_OK; } catch (...) @@ -17018,10 +18181,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ItemContainerTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemContainerTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -17031,11 +18195,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_GroupStyle(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GroupStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupStyle()); return S_OK; } catch (...) @@ -17045,11 +18210,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_GroupStyleSelector(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupStyleSelector()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupStyleSelector()); return S_OK; } catch (...) @@ -17059,10 +18225,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_GroupStyleSelector(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupStyleSelector(*reinterpret_cast(&value)); return S_OK; } @@ -17076,7 +18243,8 @@ struct produce : produce_baseshim().IsGrouping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGrouping()); return S_OK; } catch (...) @@ -17089,11 +18257,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ItemsPanelRoot(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsPanelRoot(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsPanelRoot()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsPanelRoot()); return S_OK; } catch (...) @@ -17107,11 +18276,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GroupHeaderContainerFromItemContainer(abi_arg_in itemContainer, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GroupHeaderContainerFromItemContainer(impl::abi_arg_in itemContainer, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GroupHeaderContainerFromItemContainer(*reinterpret_cast(&itemContainer))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GroupHeaderContainerFromItemContainer(*reinterpret_cast(&itemContainer))); return S_OK; } catch (...) @@ -17125,11 +18295,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -17144,11 +18315,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_IsItemItsOwnContainerOverride(abi_arg_in item, bool * returnValue) noexcept override + HRESULT __stdcall abi_IsItemItsOwnContainerOverride(impl::abi_arg_in item, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().IsItemItsOwnContainerOverride(*reinterpret_cast(&item))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsItemItsOwnContainerOverride(*reinterpret_cast(&item))); return S_OK; } catch (...) @@ -17157,11 +18329,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetContainerForItemOverride(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetContainerForItemOverride(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetContainerForItemOverride()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetContainerForItemOverride()); return S_OK; } catch (...) @@ -17171,11 +18344,12 @@ struct produce : produce } } - HRESULT __stdcall abi_ClearContainerForItemOverride(abi_arg_in element, abi_arg_in item) noexcept override + HRESULT __stdcall abi_ClearContainerForItemOverride(impl::abi_arg_in element, impl::abi_arg_in item) noexcept override { try { - this->shim().ClearContainerForItemOverride(*reinterpret_cast(&element), *reinterpret_cast(&item)); + typename D::abi_guard guard(this->shim()); + this->shim().ClearContainerForItemOverride(*reinterpret_cast(&element), *reinterpret_cast(&item)); return S_OK; } catch (...) @@ -17184,11 +18358,12 @@ struct produce : produce } } - HRESULT __stdcall abi_PrepareContainerForItemOverride(abi_arg_in element, abi_arg_in item) noexcept override + HRESULT __stdcall abi_PrepareContainerForItemOverride(impl::abi_arg_in element, impl::abi_arg_in item) noexcept override { try { - this->shim().PrepareContainerForItemOverride(*reinterpret_cast(&element), *reinterpret_cast(&item)); + typename D::abi_guard guard(this->shim()); + this->shim().PrepareContainerForItemOverride(*reinterpret_cast(&element), *reinterpret_cast(&item)); return S_OK; } catch (...) @@ -17197,11 +18372,12 @@ struct produce : produce } } - HRESULT __stdcall abi_OnItemsChanged(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnItemsChanged(impl::abi_arg_in e) noexcept override { try { - this->shim().OnItemsChanged(*reinterpret_cast(&e)); + typename D::abi_guard guard(this->shim()); + this->shim().OnItemsChanged(*reinterpret_cast(&e)); return S_OK; } catch (...) @@ -17210,10 +18386,11 @@ struct produce : produce } } - HRESULT __stdcall abi_OnItemContainerStyleChanged(abi_arg_in oldItemContainerStyle, abi_arg_in newItemContainerStyle) noexcept override + HRESULT __stdcall abi_OnItemContainerStyleChanged(impl::abi_arg_in oldItemContainerStyle, impl::abi_arg_in newItemContainerStyle) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnItemContainerStyleChanged(*reinterpret_cast(&oldItemContainerStyle), *reinterpret_cast(&newItemContainerStyle)); return S_OK; } @@ -17223,10 +18400,11 @@ struct produce : produce } } - HRESULT __stdcall abi_OnItemContainerStyleSelectorChanged(abi_arg_in oldItemContainerStyleSelector, abi_arg_in newItemContainerStyleSelector) noexcept override + HRESULT __stdcall abi_OnItemContainerStyleSelectorChanged(impl::abi_arg_in oldItemContainerStyleSelector, impl::abi_arg_in newItemContainerStyleSelector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnItemContainerStyleSelectorChanged(*reinterpret_cast(&oldItemContainerStyleSelector), *reinterpret_cast(&newItemContainerStyleSelector)); return S_OK; } @@ -17236,10 +18414,11 @@ struct produce : produce } } - HRESULT __stdcall abi_OnItemTemplateChanged(abi_arg_in oldItemTemplate, abi_arg_in newItemTemplate) noexcept override + HRESULT __stdcall abi_OnItemTemplateChanged(impl::abi_arg_in oldItemTemplate, impl::abi_arg_in newItemTemplate) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnItemTemplateChanged(*reinterpret_cast(&oldItemTemplate), *reinterpret_cast(&newItemTemplate)); return S_OK; } @@ -17249,10 +18428,11 @@ struct produce : produce } } - HRESULT __stdcall abi_OnItemTemplateSelectorChanged(abi_arg_in oldItemTemplateSelector, abi_arg_in newItemTemplateSelector) noexcept override + HRESULT __stdcall abi_OnItemTemplateSelectorChanged(impl::abi_arg_in oldItemTemplateSelector, impl::abi_arg_in newItemTemplateSelector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnItemTemplateSelectorChanged(*reinterpret_cast(&oldItemTemplateSelector), *reinterpret_cast(&newItemTemplateSelector)); return S_OK; } @@ -17262,10 +18442,11 @@ struct produce : produce } } - HRESULT __stdcall abi_OnGroupStyleSelectorChanged(abi_arg_in oldGroupStyleSelector, abi_arg_in newGroupStyleSelector) noexcept override + HRESULT __stdcall abi_OnGroupStyleSelectorChanged(impl::abi_arg_in oldGroupStyleSelector, impl::abi_arg_in newGroupStyleSelector) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnGroupStyleSelectorChanged(*reinterpret_cast(&oldGroupStyleSelector), *reinterpret_cast(&newGroupStyleSelector)); return S_OK; } @@ -17279,11 +18460,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ItemsSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSourceProperty()); return S_OK; } catch (...) @@ -17293,11 +18475,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateProperty()); return S_OK; } catch (...) @@ -17307,11 +18490,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemTemplateSelectorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplateSelectorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateSelectorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateSelectorProperty()); return S_OK; } catch (...) @@ -17321,11 +18505,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemsPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsPanelProperty()); return S_OK; } catch (...) @@ -17335,11 +18520,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DisplayMemberPathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMemberPathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMemberPathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMemberPathProperty()); return S_OK; } catch (...) @@ -17349,11 +18535,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemContainerStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainerStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerStyleProperty()); return S_OK; } catch (...) @@ -17363,11 +18550,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemContainerStyleSelectorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainerStyleSelectorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerStyleSelectorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerStyleSelectorProperty()); return S_OK; } catch (...) @@ -17377,11 +18565,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ItemContainerTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainerTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerTransitionsProperty()); return S_OK; } catch (...) @@ -17391,11 +18580,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_GroupStyleSelectorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupStyleSelectorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupStyleSelectorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupStyleSelectorProperty()); return S_OK; } catch (...) @@ -17405,11 +18595,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsGroupingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsGroupingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsGroupingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsGroupingProperty()); return S_OK; } catch (...) @@ -17419,11 +18610,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetItemsOwner(abi_arg_in element, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetItemsOwner(impl::abi_arg_in element, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetItemsOwner(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetItemsOwner(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -17433,11 +18625,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_ItemsControlFromItemContainer(abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ItemsControlFromItemContainer(impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ItemsControlFromItemContainer(*reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ItemsControlFromItemContainer(*reinterpret_cast(&container))); return S_OK; } catch (...) @@ -17455,11 +18648,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_AddedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AddedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddedItems()); return S_OK; } catch (...) @@ -17469,11 +18663,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_RemovedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemovedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemovedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedItems()); return S_OK; } catch (...) @@ -17487,11 +18682,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -17501,11 +18697,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -17514,11 +18711,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -17528,10 +18726,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -17541,11 +18740,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_HeaderTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().HeaderTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTransitions()); return S_OK; } catch (...) @@ -17555,10 +18755,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_HeaderTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -17568,11 +18769,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -17581,10 +18783,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -17598,11 +18801,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Footer(abi_arg_out value) noexcept override + HRESULT __stdcall get_Footer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Footer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Footer()); return S_OK; } catch (...) @@ -17612,11 +18816,12 @@ struct produce : produce_base< } } - HRESULT __stdcall put_Footer(abi_arg_in value) noexcept override + HRESULT __stdcall put_Footer(impl::abi_arg_in value) noexcept override { try { - this->shim().Footer(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Footer(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -17625,11 +18830,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FooterTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTemplate()); return S_OK; } catch (...) @@ -17639,10 +18845,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_FooterTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_FooterTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FooterTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -17652,11 +18859,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_FooterTransitions(abi_arg_out> value) noexcept override + HRESULT __stdcall get_FooterTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FooterTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTransitions()); return S_OK; } catch (...) @@ -17666,10 +18874,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_FooterTransitions(abi_arg_in> value) noexcept override + HRESULT __stdcall put_FooterTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FooterTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -17683,11 +18892,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -17697,11 +18907,12 @@ struct produce : produce } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -17711,11 +18922,12 @@ struct produce : produce } } - HRESULT __stdcall get_HeaderTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTransitionsProperty()); return S_OK; } catch (...) @@ -17725,11 +18937,12 @@ struct produce : produce } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -17743,11 +18956,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_FooterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterProperty()); return S_OK; } catch (...) @@ -17757,11 +18971,12 @@ struct produce : produc } } - HRESULT __stdcall get_FooterTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTemplateProperty()); return S_OK; } catch (...) @@ -17771,11 +18986,12 @@ struct produce : produc } } - HRESULT __stdcall get_FooterTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTransitionsProperty()); return S_OK; } catch (...) @@ -17789,11 +19005,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_GroupPadding(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupPadding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupPadding()); return S_OK; } catch (...) @@ -17802,10 +19019,11 @@ struct produce : produce_base< } } - HRESULT __stdcall put_GroupPadding(abi_arg_in value) noexcept override + HRESULT __stdcall put_GroupPadding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupPadding(*reinterpret_cast(&value)); return S_OK; } @@ -17819,7 +19037,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -17832,6 +19051,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(value); return S_OK; } @@ -17845,7 +19065,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().FirstCacheIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstCacheIndex()); return S_OK; } catch (...) @@ -17858,7 +19079,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().FirstVisibleIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstVisibleIndex()); return S_OK; } catch (...) @@ -17871,7 +19093,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().LastVisibleIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastVisibleIndex()); return S_OK; } catch (...) @@ -17884,7 +19107,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().LastCacheIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastCacheIndex()); return S_OK; } catch (...) @@ -17897,7 +19121,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ScrollingDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollingDirection()); return S_OK; } catch (...) @@ -17910,7 +19135,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().GroupHeaderPlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupHeaderPlacement()); return S_OK; } catch (...) @@ -17923,6 +19149,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupHeaderPlacement(value); return S_OK; } @@ -17936,7 +19163,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().ItemsUpdatingScrollMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsUpdatingScrollMode()); return S_OK; } catch (...) @@ -17949,6 +19177,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemsUpdatingScrollMode(value); return S_OK; } @@ -17962,7 +19191,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().CacheLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheLength()); return S_OK; } catch (...) @@ -17975,6 +19205,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().CacheLength(value); return S_OK; } @@ -17992,7 +19223,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().AreStickyGroupHeadersEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreStickyGroupHeadersEnabled()); return S_OK; } catch (...) @@ -18005,6 +19237,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().AreStickyGroupHeadersEnabled(value); return S_OK; } @@ -18018,11 +19251,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_GroupPaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupPaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupPaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupPaddingProperty()); return S_OK; } catch (...) @@ -18032,11 +19266,12 @@ struct produce : produc } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -18046,11 +19281,12 @@ struct produce : produc } } - HRESULT __stdcall get_GroupHeaderPlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupHeaderPlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupHeaderPlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupHeaderPlacementProperty()); return S_OK; } catch (...) @@ -18060,11 +19296,12 @@ struct produce : produc } } - HRESULT __stdcall get_CacheLengthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CacheLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CacheLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheLengthProperty()); return S_OK; } catch (...) @@ -18078,11 +19315,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_AreStickyGroupHeadersEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreStickyGroupHeadersEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreStickyGroupHeadersEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreStickyGroupHeadersEnabledProperty()); return S_OK; } catch (...) @@ -18096,11 +19334,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_GroupPadding(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupPadding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupPadding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupPadding()); return S_OK; } catch (...) @@ -18109,10 +19348,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_GroupPadding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupPadding(*reinterpret_cast(&value)); return S_OK; } @@ -18126,7 +19366,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -18139,6 +19380,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -18152,7 +19394,8 @@ struct produce : produce_baseshim().MaximumRowsOrColumns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumns()); return S_OK; } catch (...) @@ -18165,6 +19408,7 @@ struct produce : produce_baseshim()); this->shim().MaximumRowsOrColumns(value); return S_OK; } @@ -18178,7 +19422,8 @@ struct produce : produce_baseshim().ItemWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidth()); return S_OK; } catch (...) @@ -18191,6 +19436,7 @@ struct produce : produce_baseshim()); this->shim().ItemWidth(value); return S_OK; } @@ -18204,7 +19450,8 @@ struct produce : produce_baseshim().ItemHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeight()); return S_OK; } catch (...) @@ -18217,6 +19464,7 @@ struct produce : produce_baseshim()); this->shim().ItemHeight(value); return S_OK; } @@ -18230,7 +19478,8 @@ struct produce : produce_baseshim().FirstCacheIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstCacheIndex()); return S_OK; } catch (...) @@ -18243,7 +19492,8 @@ struct produce : produce_baseshim().FirstVisibleIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FirstVisibleIndex()); return S_OK; } catch (...) @@ -18256,7 +19506,8 @@ struct produce : produce_baseshim().LastVisibleIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastVisibleIndex()); return S_OK; } catch (...) @@ -18269,7 +19520,8 @@ struct produce : produce_baseshim().LastCacheIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LastCacheIndex()); return S_OK; } catch (...) @@ -18282,7 +19534,8 @@ struct produce : produce_baseshim().ScrollingDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollingDirection()); return S_OK; } catch (...) @@ -18295,7 +19548,8 @@ struct produce : produce_baseshim().GroupHeaderPlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupHeaderPlacement()); return S_OK; } catch (...) @@ -18308,6 +19562,7 @@ struct produce : produce_baseshim()); this->shim().GroupHeaderPlacement(value); return S_OK; } @@ -18321,7 +19576,8 @@ struct produce : produce_baseshim().CacheLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheLength()); return S_OK; } catch (...) @@ -18334,6 +19590,7 @@ struct produce : produce_baseshim()); this->shim().CacheLength(value); return S_OK; } @@ -18351,7 +19608,8 @@ struct produce : produce_baseshim().AreStickyGroupHeadersEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreStickyGroupHeadersEnabled()); return S_OK; } catch (...) @@ -18364,6 +19622,7 @@ struct produce : produce_baseshim()); this->shim().AreStickyGroupHeadersEnabled(value); return S_OK; } @@ -18377,11 +19636,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_GroupPaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupPaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupPaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupPaddingProperty()); return S_OK; } catch (...) @@ -18391,11 +19651,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -18405,11 +19666,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MaximumRowsOrColumnsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaximumRowsOrColumnsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumRowsOrColumnsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumnsProperty()); return S_OK; } catch (...) @@ -18419,11 +19681,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ItemWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidthProperty()); return S_OK; } catch (...) @@ -18433,11 +19696,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ItemHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeightProperty()); return S_OK; } catch (...) @@ -18447,11 +19711,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_GroupHeaderPlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupHeaderPlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupHeaderPlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupHeaderPlacementProperty()); return S_OK; } catch (...) @@ -18461,11 +19726,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CacheLengthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CacheLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CacheLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CacheLengthProperty()); return S_OK; } catch (...) @@ -18479,11 +19745,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_AreStickyGroupHeadersEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreStickyGroupHeadersEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreStickyGroupHeadersEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreStickyGroupHeadersEnabledProperty()); return S_OK; } catch (...) @@ -18497,11 +19764,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_SelectedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SelectedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItems()); return S_OK; } catch (...) @@ -18515,7 +19783,8 @@ struct produce : produce_baseshim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -18528,6 +19797,7 @@ struct produce : produce_baseshim()); this->shim().SelectionMode(value); return S_OK; } @@ -18537,11 +19807,12 @@ struct produce : produce_base item) noexcept override + HRESULT __stdcall abi_ScrollIntoView(impl::abi_arg_in item) noexcept override { try { - this->shim().ScrollIntoView(*reinterpret_cast(&item)); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollIntoView(*reinterpret_cast(&item)); return S_OK; } catch (...) @@ -18554,6 +19825,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -18571,7 +19843,8 @@ struct produce : produce_baseshim().SingleSelectionFollowsFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SingleSelectionFollowsFocus()); return S_OK; } catch (...) @@ -18584,6 +19857,7 @@ struct produce : produce_baseshim()); this->shim().SingleSelectionFollowsFocus(value); return S_OK; } @@ -18597,11 +19871,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -18620,11 +19895,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -18639,11 +19915,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_SelectionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionModeProperty()); return S_OK; } catch (...) @@ -18657,11 +19934,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SingleSelectionFollowsFocusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SingleSelectionFollowsFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SingleSelectionFollowsFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SingleSelectionFollowsFocusProperty()); return S_OK; } catch (...) @@ -18675,11 +19953,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_ItemsSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSource()); return S_OK; } catch (...) @@ -18689,11 +19968,12 @@ struct produce : produce_base } } - HRESULT __stdcall put_ItemsSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemsSource(impl::abi_arg_in value) noexcept override { try { - this->shim().ItemsSource(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ItemsSource(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -18702,11 +19982,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ItemTemplate(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplate()); return S_OK; } catch (...) @@ -18716,10 +19997,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ItemTemplate(abi_arg_in value) noexcept override + HRESULT __stdcall put_ItemTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -18729,11 +20011,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayMemberPath(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMemberPath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMemberPath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMemberPath()); return S_OK; } catch (...) @@ -18743,10 +20026,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_DisplayMemberPath(abi_arg_in value) noexcept override + HRESULT __stdcall put_DisplayMemberPath(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DisplayMemberPath(*reinterpret_cast(&value)); return S_OK; } @@ -18760,7 +20044,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -18773,6 +20058,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionMode(value); return S_OK; } @@ -18786,7 +20072,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -18799,6 +20086,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedIndex(value); return S_OK; } @@ -18808,11 +20096,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SelectedItem(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -18822,11 +20111,12 @@ struct produce : produce_base } } - HRESULT __stdcall put_SelectedItem(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedItem(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedItem(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedItem(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -18835,11 +20125,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SelectedValue(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValue(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValue()); return S_OK; } catch (...) @@ -18849,11 +20140,12 @@ struct produce : produce_base } } - HRESULT __stdcall put_SelectedValue(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedValue(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedValue(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedValue(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -18862,11 +20154,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SelectedValuePath(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValuePath(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValuePath()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValuePath()); return S_OK; } catch (...) @@ -18876,10 +20169,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_SelectedValuePath(abi_arg_in value) noexcept override + HRESULT __stdcall put_SelectedValuePath(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedValuePath(*reinterpret_cast(&value)); return S_OK; } @@ -18889,11 +20183,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SelectedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SelectedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItems()); return S_OK; } catch (...) @@ -18903,11 +20198,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_ItemsPicked(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ItemsPicked(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemsPicked(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemsPicked(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -18920,6 +20216,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemsPicked(token); return S_OK; } @@ -18929,11 +20226,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_ShowAtAsync(abi_arg_in target, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_ShowAtAsync(impl::abi_arg_in target, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAtAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAtAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -18951,11 +20249,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_ItemsSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemsSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemsSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemsSourceProperty()); return S_OK; } catch (...) @@ -18965,11 +20264,12 @@ struct produce : produ } } - HRESULT __stdcall get_ItemTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemTemplateProperty()); return S_OK; } catch (...) @@ -18979,11 +20279,12 @@ struct produce : produ } } - HRESULT __stdcall get_DisplayMemberPathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayMemberPathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayMemberPathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMemberPathProperty()); return S_OK; } catch (...) @@ -18993,11 +20294,12 @@ struct produce : produ } } - HRESULT __stdcall get_SelectionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionModeProperty()); return S_OK; } catch (...) @@ -19007,11 +20309,12 @@ struct produce : produ } } - HRESULT __stdcall get_SelectedIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndexProperty()); return S_OK; } catch (...) @@ -19021,11 +20324,12 @@ struct produce : produ } } - HRESULT __stdcall get_SelectedItemProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedItemProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItemProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItemProperty()); return S_OK; } catch (...) @@ -19035,11 +20339,12 @@ struct produce : produ } } - HRESULT __stdcall get_SelectedValueProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValueProperty()); return S_OK; } catch (...) @@ -19049,11 +20354,12 @@ struct produce : produ } } - HRESULT __stdcall get_SelectedValuePathProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedValuePathProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedValuePathProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedValuePathProperty()); return S_OK; } catch (...) @@ -19071,11 +20377,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SelectedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SelectedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItems()); return S_OK; } catch (...) @@ -19089,7 +20396,8 @@ struct produce : produce_baseshim().SelectionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionMode()); return S_OK; } catch (...) @@ -19102,6 +20410,7 @@ struct produce : produce_baseshim()); this->shim().SelectionMode(value); return S_OK; } @@ -19115,7 +20424,8 @@ struct produce : produce_baseshim().IsSwipeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSwipeEnabled()); return S_OK; } catch (...) @@ -19128,6 +20438,7 @@ struct produce : produce_baseshim()); this->shim().IsSwipeEnabled(value); return S_OK; } @@ -19141,7 +20452,8 @@ struct produce : produce_baseshim().CanDragItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanDragItems()); return S_OK; } catch (...) @@ -19154,6 +20466,7 @@ struct produce : produce_baseshim()); this->shim().CanDragItems(value); return S_OK; } @@ -19167,7 +20480,8 @@ struct produce : produce_baseshim().CanReorderItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanReorderItems()); return S_OK; } catch (...) @@ -19180,6 +20494,7 @@ struct produce : produce_baseshim()); this->shim().CanReorderItems(value); return S_OK; } @@ -19193,7 +20508,8 @@ struct produce : produce_baseshim().IsItemClickEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsItemClickEnabled()); return S_OK; } catch (...) @@ -19206,6 +20522,7 @@ struct produce : produce_baseshim()); this->shim().IsItemClickEnabled(value); return S_OK; } @@ -19219,7 +20536,8 @@ struct produce : produce_baseshim().DataFetchSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataFetchSize()); return S_OK; } catch (...) @@ -19232,6 +20550,7 @@ struct produce : produce_baseshim()); this->shim().DataFetchSize(value); return S_OK; } @@ -19245,7 +20564,8 @@ struct produce : produce_baseshim().IncrementalLoadingThreshold()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncrementalLoadingThreshold()); return S_OK; } catch (...) @@ -19258,6 +20578,7 @@ struct produce : produce_baseshim()); this->shim().IncrementalLoadingThreshold(value); return S_OK; } @@ -19271,7 +20592,8 @@ struct produce : produce_baseshim().IncrementalLoadingTrigger()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncrementalLoadingTrigger()); return S_OK; } catch (...) @@ -19284,6 +20606,7 @@ struct produce : produce_baseshim()); this->shim().IncrementalLoadingTrigger(value); return S_OK; } @@ -19293,11 +20616,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ItemClick(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ItemClick(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ItemClick(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -19310,6 +20634,7 @@ struct produce : produce_baseshim()); this->shim().ItemClick(token); return S_OK; } @@ -19319,11 +20644,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_DragItemsStarting(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().DragItemsStarting(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DragItemsStarting(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -19336,6 +20662,7 @@ struct produce : produce_baseshim()); this->shim().DragItemsStarting(token); return S_OK; } @@ -19345,11 +20672,12 @@ struct produce : produce_base item) noexcept override + HRESULT __stdcall abi_ScrollIntoView(impl::abi_arg_in item) noexcept override { try { - this->shim().ScrollIntoView(*reinterpret_cast(&item)); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollIntoView(*reinterpret_cast(&item)); return S_OK; } catch (...) @@ -19362,6 +20690,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -19371,11 +20700,12 @@ struct produce : produce_base> returnValue) noexcept override + HRESULT __stdcall abi_LoadMoreItemsAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().LoadMoreItemsAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().LoadMoreItemsAsync()); return S_OK; } catch (...) @@ -19385,11 +20715,12 @@ struct produce : produce_base item, Windows::UI::Xaml::Controls::ScrollIntoViewAlignment alignment) noexcept override + HRESULT __stdcall abi_ScrollIntoViewWithAlignment(impl::abi_arg_in item, Windows::UI::Xaml::Controls::ScrollIntoViewAlignment alignment) noexcept override { try { - this->shim().ScrollIntoView(*reinterpret_cast(&item), alignment); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollIntoView(*reinterpret_cast(&item), alignment); return S_OK; } catch (...) @@ -19398,11 +20729,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -19412,11 +20744,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -19425,11 +20758,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -19439,10 +20773,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -19452,11 +20787,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_HeaderTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().HeaderTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTransitions()); return S_OK; } catch (...) @@ -19466,10 +20802,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_HeaderTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -19487,7 +20824,8 @@ struct produce : produce_baseshim().ShowsScrollingPlaceholders()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowsScrollingPlaceholders()); return S_OK; } catch (...) @@ -19500,6 +20838,7 @@ struct produce : produce_baseshim()); this->shim().ShowsScrollingPlaceholders(value); return S_OK; } @@ -19509,11 +20848,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ContainerContentChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContainerContentChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContainerContentChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -19526,6 +20866,7 @@ struct produce : produce_baseshim()); this->shim().ContainerContentChanging(token); return S_OK; } @@ -19535,10 +20876,11 @@ struct produce : produce_base duration) noexcept override + HRESULT __stdcall abi_SetDesiredContainerUpdateDuration(impl::abi_arg_in duration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDesiredContainerUpdateDuration(*reinterpret_cast(&duration)); return S_OK; } @@ -19548,11 +20890,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Footer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Footer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Footer()); return S_OK; } catch (...) @@ -19562,11 +20905,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Footer(impl::abi_arg_in value) noexcept override { try { - this->shim().Footer(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Footer(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -19575,11 +20919,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FooterTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTemplate()); return S_OK; } catch (...) @@ -19589,10 +20934,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FooterTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FooterTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -19602,11 +20948,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_FooterTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().FooterTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTransitions()); return S_OK; } catch (...) @@ -19616,10 +20963,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_FooterTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FooterTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -19637,7 +20985,8 @@ struct produce : produce_baseshim().ReorderMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderMode()); return S_OK; } catch (...) @@ -19650,6 +20999,7 @@ struct produce : produce_baseshim()); this->shim().ReorderMode(value); return S_OK; } @@ -19663,11 +21013,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SelectedRanges(abi_arg_out> value) noexcept override + HRESULT __stdcall get_SelectedRanges(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().SelectedRanges()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedRanges()); return S_OK; } catch (...) @@ -19681,7 +21032,8 @@ struct produce : produce_baseshim().IsMultiSelectCheckBoxEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMultiSelectCheckBoxEnabled()); return S_OK; } catch (...) @@ -19694,6 +21046,7 @@ struct produce : produce_baseshim()); this->shim().IsMultiSelectCheckBoxEnabled(value); return S_OK; } @@ -19703,11 +21056,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DragItemsCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DragItemsCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DragItemsCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -19720,6 +21074,7 @@ struct produce : produce_baseshim()); this->shim().DragItemsCompleted(token); return S_OK; } @@ -19729,11 +21084,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ChoosingItemContainer(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ChoosingItemContainer(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ChoosingItemContainer(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -19746,6 +21102,7 @@ struct produce : produce_baseshim()); this->shim().ChoosingItemContainer(token); return S_OK; } @@ -19755,11 +21112,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ChoosingGroupHeaderContainer(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ChoosingGroupHeaderContainer(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ChoosingGroupHeaderContainer(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -19772,6 +21130,7 @@ struct produce : produce_baseshim()); this->shim().ChoosingGroupHeaderContainer(token); return S_OK; } @@ -19781,10 +21140,11 @@ struct produce : produce_base itemIndexRange) noexcept override + HRESULT __stdcall abi_SelectRange(impl::abi_arg_in itemIndexRange) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectRange(*reinterpret_cast(&itemIndexRange)); return S_OK; } @@ -19794,10 +21154,11 @@ struct produce : produce_base itemIndexRange) noexcept override + HRESULT __stdcall abi_DeselectRange(impl::abi_arg_in itemIndexRange) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DeselectRange(*reinterpret_cast(&itemIndexRange)); return S_OK; } @@ -19815,7 +21176,8 @@ struct produce : produce_baseshim().SingleSelectionFollowsFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SingleSelectionFollowsFocus()); return S_OK; } catch (...) @@ -19828,6 +21190,7 @@ struct produce : produce_baseshim()); this->shim().SingleSelectionFollowsFocus(value); return S_OK; } @@ -19841,7 +21204,8 @@ struct produce : produce_baseshim().IsDragSource()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().IsDragSource()); return S_OK; } catch (...) @@ -19854,11 +21218,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -19881,11 +21246,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_SelectionModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionModeProperty()); return S_OK; } catch (...) @@ -19895,11 +21261,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsSwipeEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSwipeEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSwipeEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSwipeEnabledProperty()); return S_OK; } catch (...) @@ -19909,11 +21276,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CanDragItemsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanDragItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanDragItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanDragItemsProperty()); return S_OK; } catch (...) @@ -19923,11 +21291,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CanReorderItemsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanReorderItemsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanReorderItemsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanReorderItemsProperty()); return S_OK; } catch (...) @@ -19937,11 +21306,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsItemClickEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsItemClickEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsItemClickEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsItemClickEnabledProperty()); return S_OK; } catch (...) @@ -19951,11 +21321,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DataFetchSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataFetchSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataFetchSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataFetchSizeProperty()); return S_OK; } catch (...) @@ -19965,11 +21336,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IncrementalLoadingThresholdProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IncrementalLoadingThresholdProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncrementalLoadingThresholdProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncrementalLoadingThresholdProperty()); return S_OK; } catch (...) @@ -19979,11 +21351,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IncrementalLoadingTriggerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IncrementalLoadingTriggerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IncrementalLoadingTriggerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IncrementalLoadingTriggerProperty()); return S_OK; } catch (...) @@ -19993,11 +21366,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SemanticZoomOwnerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SemanticZoomOwnerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemanticZoomOwnerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemanticZoomOwnerProperty()); return S_OK; } catch (...) @@ -20007,11 +21381,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsActiveViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsActiveViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsActiveViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActiveViewProperty()); return S_OK; } catch (...) @@ -20021,11 +21396,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsZoomedInViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomedInViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomedInViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomedInViewProperty()); return S_OK; } catch (...) @@ -20035,11 +21411,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -20049,11 +21426,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -20063,11 +21441,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTransitionsProperty()); return S_OK; } catch (...) @@ -20081,11 +21460,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_ShowsScrollingPlaceholdersProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShowsScrollingPlaceholdersProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowsScrollingPlaceholdersProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowsScrollingPlaceholdersProperty()); return S_OK; } catch (...) @@ -20095,11 +21475,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FooterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterProperty()); return S_OK; } catch (...) @@ -20109,11 +21490,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FooterTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTemplateProperty()); return S_OK; } catch (...) @@ -20123,11 +21505,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FooterTransitionsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FooterTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FooterTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FooterTransitionsProperty()); return S_OK; } catch (...) @@ -20141,11 +21524,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ReorderModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ReorderModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ReorderModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ReorderModeProperty()); return S_OK; } catch (...) @@ -20159,11 +21543,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_IsMultiSelectCheckBoxEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsMultiSelectCheckBoxEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsMultiSelectCheckBoxEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMultiSelectCheckBoxEnabledProperty()); return S_OK; } catch (...) @@ -20177,11 +21562,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_SingleSelectionFollowsFocusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SingleSelectionFollowsFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SingleSelectionFollowsFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SingleSelectionFollowsFocusProperty()); return S_OK; } catch (...) @@ -20195,11 +21581,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -20218,11 +21605,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -20237,11 +21625,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_TemplateSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -20255,11 +21644,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -20278,11 +21668,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_GetRelativeScrollPosition(abi_arg_in listViewBase, abi_arg_in itemToKeyHandler, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetRelativeScrollPosition(impl::abi_arg_in listViewBase, impl::abi_arg_in itemToKeyHandler, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetRelativeScrollPosition(*reinterpret_cast(&listViewBase), *reinterpret_cast(&itemToKeyHandler))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetRelativeScrollPosition(*reinterpret_cast(&listViewBase), *reinterpret_cast(&itemToKeyHandler))); return S_OK; } catch (...) @@ -20292,11 +21683,12 @@ struct produce listViewBase, abi_arg_in relativeScrollPosition, abi_arg_in keyToItemHandler, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SetRelativeScrollPositionAsync(impl::abi_arg_in listViewBase, impl::abi_arg_in relativeScrollPosition, impl::abi_arg_in keyToItemHandler, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SetRelativeScrollPositionAsync(*reinterpret_cast(&listViewBase), *reinterpret_cast(&relativeScrollPosition), *reinterpret_cast(&keyToItemHandler))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SetRelativeScrollPositionAsync(*reinterpret_cast(&listViewBase), *reinterpret_cast(&relativeScrollPosition), *reinterpret_cast(&keyToItemHandler))); return S_OK; } catch (...) @@ -20310,11 +21702,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_PosterSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_PosterSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PosterSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PosterSource()); return S_OK; } catch (...) @@ -20324,10 +21717,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PosterSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PosterSource(*reinterpret_cast(&value)); return S_OK; } @@ -20337,11 +21731,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -20351,10 +21746,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -20368,7 +21764,8 @@ struct produce : produce_baseshim().IsMuted()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMuted()); return S_OK; } catch (...) @@ -20381,6 +21778,7 @@ struct produce : produce_baseshim()); this->shim().IsMuted(value); return S_OK; } @@ -20394,7 +21792,8 @@ struct produce : produce_baseshim().IsAudioOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAudioOnly()); return S_OK; } catch (...) @@ -20407,7 +21806,8 @@ struct produce : produce_baseshim().AutoPlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoPlay()); return S_OK; } catch (...) @@ -20420,6 +21820,7 @@ struct produce : produce_baseshim()); this->shim().AutoPlay(value); return S_OK; } @@ -20433,7 +21834,8 @@ struct produce : produce_baseshim().Volume()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Volume()); return S_OK; } catch (...) @@ -20446,6 +21848,7 @@ struct produce : produce_baseshim()); this->shim().Volume(value); return S_OK; } @@ -20459,7 +21862,8 @@ struct produce : produce_baseshim().Balance()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Balance()); return S_OK; } catch (...) @@ -20472,6 +21876,7 @@ struct produce : produce_baseshim()); this->shim().Balance(value); return S_OK; } @@ -20485,7 +21890,8 @@ struct produce : produce_baseshim().NaturalVideoHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoHeight()); return S_OK; } catch (...) @@ -20498,7 +21904,8 @@ struct produce : produce_baseshim().NaturalVideoWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoWidth()); return S_OK; } catch (...) @@ -20507,11 +21914,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_NaturalDuration(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalDuration()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalDuration()); return S_OK; } catch (...) @@ -20520,11 +21928,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Position(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Position()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Position()); return S_OK; } catch (...) @@ -20533,10 +21942,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Position(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return S_OK; } @@ -20550,7 +21960,8 @@ struct produce : produce_baseshim().DownloadProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadProgress()); return S_OK; } catch (...) @@ -20563,7 +21974,8 @@ struct produce : produce_baseshim().BufferingProgress()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferingProgress()); return S_OK; } catch (...) @@ -20576,7 +21988,8 @@ struct produce : produce_baseshim().DownloadProgressOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadProgressOffset()); return S_OK; } catch (...) @@ -20589,7 +22002,8 @@ struct produce : produce_baseshim().CurrentState()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentState()); return S_OK; } catch (...) @@ -20598,11 +22012,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Markers(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Markers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Markers()); return S_OK; } catch (...) @@ -20616,7 +22031,8 @@ struct produce : produce_baseshim().CanSeek()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSeek()); return S_OK; } catch (...) @@ -20629,7 +22045,8 @@ struct produce : produce_baseshim().CanPause()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPause()); return S_OK; } catch (...) @@ -20642,7 +22059,8 @@ struct produce : produce_baseshim().AudioStreamCount()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioStreamCount()); return S_OK; } catch (...) @@ -20651,11 +22069,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AudioStreamIndex(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AudioStreamIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioStreamIndex()); return S_OK; } catch (...) @@ -20665,10 +22084,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_AudioStreamIndex(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AudioStreamIndex(*reinterpret_cast *>(&value)); return S_OK; } @@ -20682,7 +22102,8 @@ struct produce : produce_baseshim().PlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRate()); return S_OK; } catch (...) @@ -20695,6 +22116,7 @@ struct produce : produce_baseshim()); this->shim().PlaybackRate(value); return S_OK; } @@ -20708,7 +22130,8 @@ struct produce : produce_baseshim().IsLooping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLooping()); return S_OK; } catch (...) @@ -20721,6 +22144,7 @@ struct produce : produce_baseshim()); this->shim().IsLooping(value); return S_OK; } @@ -20730,11 +22154,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlayToSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToSource()); return S_OK; } catch (...) @@ -20748,7 +22173,8 @@ struct produce : produce_baseshim().DefaultPlaybackRate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultPlaybackRate()); return S_OK; } catch (...) @@ -20761,6 +22187,7 @@ struct produce : produce_baseshim()); this->shim().DefaultPlaybackRate(value); return S_OK; } @@ -20774,7 +22201,8 @@ struct produce : produce_baseshim().AspectRatioWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AspectRatioWidth()); return S_OK; } catch (...) @@ -20787,7 +22215,8 @@ struct produce : produce_baseshim().AspectRatioHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AspectRatioHeight()); return S_OK; } catch (...) @@ -20800,7 +22229,8 @@ struct produce : produce_baseshim().RealTimePlayback()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RealTimePlayback()); return S_OK; } catch (...) @@ -20813,6 +22243,7 @@ struct produce : produce_baseshim()); this->shim().RealTimePlayback(value); return S_OK; } @@ -20826,7 +22257,8 @@ struct produce : produce_baseshim().AudioCategory()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioCategory()); return S_OK; } catch (...) @@ -20839,6 +22271,7 @@ struct produce : produce_baseshim()); this->shim().AudioCategory(value); return S_OK; } @@ -20852,7 +22285,8 @@ struct produce : produce_baseshim().AudioDeviceType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceType()); return S_OK; } catch (...) @@ -20865,6 +22299,7 @@ struct produce : produce_baseshim()); this->shim().AudioDeviceType(value); return S_OK; } @@ -20874,11 +22309,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ProtectionManager(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectionManager()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionManager()); return S_OK; } catch (...) @@ -20888,10 +22324,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ProtectionManager(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ProtectionManager(*reinterpret_cast(&value)); return S_OK; } @@ -20905,7 +22342,8 @@ struct produce : produce_baseshim().Stereo3DVideoPackingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stereo3DVideoPackingMode()); return S_OK; } catch (...) @@ -20918,6 +22356,7 @@ struct produce : produce_baseshim()); this->shim().Stereo3DVideoPackingMode(value); return S_OK; } @@ -20931,7 +22370,8 @@ struct produce : produce_baseshim().Stereo3DVideoRenderMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stereo3DVideoRenderMode()); return S_OK; } catch (...) @@ -20944,6 +22384,7 @@ struct produce : produce_baseshim()); this->shim().Stereo3DVideoRenderMode(value); return S_OK; } @@ -20957,7 +22398,8 @@ struct produce : produce_baseshim().IsStereo3DVideo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStereo3DVideo()); return S_OK; } catch (...) @@ -20966,11 +22408,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_MediaOpened(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaOpened(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaOpened(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -20983,6 +22426,7 @@ struct produce : produce_baseshim()); this->shim().MediaOpened(token); return S_OK; } @@ -20992,11 +22436,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_MediaEnded(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaEnded(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaEnded(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21009,6 +22454,7 @@ struct produce : produce_baseshim()); this->shim().MediaEnded(token); return S_OK; } @@ -21018,11 +22464,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_MediaFailed(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().MediaFailed(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MediaFailed(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21035,6 +22482,7 @@ struct produce : produce_baseshim()); this->shim().MediaFailed(token); return S_OK; } @@ -21044,11 +22492,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_DownloadProgressChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().DownloadProgressChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DownloadProgressChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21061,6 +22510,7 @@ struct produce : produce_baseshim()); this->shim().DownloadProgressChanged(token); return S_OK; } @@ -21070,11 +22520,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_BufferingProgressChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().BufferingProgressChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BufferingProgressChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21087,6 +22538,7 @@ struct produce : produce_baseshim()); this->shim().BufferingProgressChanged(token); return S_OK; } @@ -21096,11 +22548,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_CurrentStateChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().CurrentStateChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CurrentStateChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21113,6 +22566,7 @@ struct produce : produce_baseshim()); this->shim().CurrentStateChanged(token); return S_OK; } @@ -21122,11 +22576,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_MarkerReached(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().MarkerReached(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().MarkerReached(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21139,6 +22594,7 @@ struct produce : produce_baseshim()); this->shim().MarkerReached(token); return S_OK; } @@ -21148,11 +22604,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_RateChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().RateChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().RateChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21165,6 +22622,7 @@ struct produce : produce_baseshim()); this->shim().RateChanged(token); return S_OK; } @@ -21174,11 +22632,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_VolumeChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().VolumeChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().VolumeChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21191,6 +22650,7 @@ struct produce : produce_baseshim()); this->shim().VolumeChanged(token); return S_OK; } @@ -21200,11 +22660,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SeekCompleted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SeekCompleted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SeekCompleted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -21217,6 +22678,7 @@ struct produce : produce_baseshim()); this->shim().SeekCompleted(token); return S_OK; } @@ -21230,6 +22692,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -21243,6 +22706,7 @@ struct produce : produce_baseshim()); this->shim().Play(); return S_OK; } @@ -21256,6 +22720,7 @@ struct produce : produce_baseshim()); this->shim().Pause(); return S_OK; } @@ -21265,11 +22730,12 @@ struct produce : produce_base type, Windows::UI::Xaml::Media::MediaCanPlayResponse * returnValue) noexcept override + HRESULT __stdcall abi_CanPlayType(impl::abi_arg_in type, Windows::UI::Xaml::Media::MediaCanPlayResponse * returnValue) noexcept override { try { - *returnValue = detach(this->shim().CanPlayType(*reinterpret_cast(&type))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CanPlayType(*reinterpret_cast(&type))); return S_OK; } catch (...) @@ -21278,10 +22744,11 @@ struct produce : produce_base stream, abi_arg_in mimeType) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in stream, impl::abi_arg_in mimeType) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&stream), *reinterpret_cast(&mimeType)); return S_OK; } @@ -21291,11 +22758,12 @@ struct produce : produce_base> index, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAudioStreamLanguage(impl::abi_arg_in> index, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAudioStreamLanguage(*reinterpret_cast *>(&index))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAudioStreamLanguage(*reinterpret_cast *>(&index))); return S_OK; } catch (...) @@ -21305,10 +22773,11 @@ struct produce : produce_base effectID, bool effectOptional, abi_arg_in effectConfiguration) noexcept override + HRESULT __stdcall abi_AddAudioEffect(impl::abi_arg_in effectID, bool effectOptional, impl::abi_arg_in effectConfiguration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddAudioEffect(*reinterpret_cast(&effectID), effectOptional, *reinterpret_cast(&effectConfiguration)); return S_OK; } @@ -21318,10 +22787,11 @@ struct produce : produce_base effectID, bool effectOptional, abi_arg_in effectConfiguration) noexcept override + HRESULT __stdcall abi_AddVideoEffect(impl::abi_arg_in effectID, bool effectOptional, impl::abi_arg_in effectConfiguration) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddVideoEffect(*reinterpret_cast(&effectID), effectOptional, *reinterpret_cast(&effectConfiguration)); return S_OK; } @@ -21335,6 +22805,7 @@ struct produce : produce_baseshim()); this->shim().RemoveAllEffects(); return S_OK; } @@ -21348,7 +22819,8 @@ struct produce : produce_baseshim().ActualStereo3DVideoPackingMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualStereo3DVideoPackingMode()); return S_OK; } catch (...) @@ -21365,7 +22837,8 @@ struct produce : produce_baseshim().AreTransportControlsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreTransportControlsEnabled()); return S_OK; } catch (...) @@ -21378,6 +22851,7 @@ struct produce : produce_baseshim()); this->shim().AreTransportControlsEnabled(value); return S_OK; } @@ -21391,7 +22865,8 @@ struct produce : produce_baseshim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -21404,6 +22879,7 @@ struct produce : produce_baseshim()); this->shim().Stretch(value); return S_OK; } @@ -21417,7 +22893,8 @@ struct produce : produce_baseshim().IsFullWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindow()); return S_OK; } catch (...) @@ -21430,6 +22907,7 @@ struct produce : produce_baseshim()); this->shim().IsFullWindow(value); return S_OK; } @@ -21439,10 +22917,11 @@ struct produce : produce_base source) noexcept override + HRESULT __stdcall abi_SetMediaStreamSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMediaStreamSource(*reinterpret_cast(&source)); return S_OK; } @@ -21452,11 +22931,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlayToPreferredSourceUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToPreferredSourceUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToPreferredSourceUri()); return S_OK; } catch (...) @@ -21466,10 +22946,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlayToPreferredSourceUri(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlayToPreferredSourceUri(*reinterpret_cast(&value)); return S_OK; } @@ -21483,11 +22964,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TransportControls(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportControls(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportControls()); return S_OK; } catch (...) @@ -21497,10 +22979,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TransportControls(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransportControls(*reinterpret_cast(&value)); return S_OK; } @@ -21510,11 +22993,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PartialMediaFailureDetected(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PartialMediaFailureDetected(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PartialMediaFailureDetected(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -21527,6 +23011,7 @@ struct produce : produce_baseshim()); this->shim().PartialMediaFailureDetected(token); return S_OK; } @@ -21536,10 +23021,11 @@ struct produce : produce_base source) noexcept override + HRESULT __stdcall abi_SetPlaybackSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPlaybackSource(*reinterpret_cast(&source)); return S_OK; } @@ -21549,11 +23035,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetAsCastingSource(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAsCastingSource()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAsCastingSource()); return S_OK; } catch (...) @@ -21567,11 +23054,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PosterSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PosterSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PosterSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PosterSourceProperty()); return S_OK; } catch (...) @@ -21581,11 +23069,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceProperty()); return S_OK; } catch (...) @@ -21595,11 +23084,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsMutedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsMutedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsMutedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsMutedProperty()); return S_OK; } catch (...) @@ -21609,11 +23099,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsAudioOnlyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsAudioOnlyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsAudioOnlyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsAudioOnlyProperty()); return S_OK; } catch (...) @@ -21623,11 +23114,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AutoPlayProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoPlayProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoPlayProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoPlayProperty()); return S_OK; } catch (...) @@ -21637,11 +23129,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VolumeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VolumeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VolumeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VolumeProperty()); return S_OK; } catch (...) @@ -21651,11 +23144,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_BalanceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BalanceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BalanceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BalanceProperty()); return S_OK; } catch (...) @@ -21665,11 +23159,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NaturalVideoHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalVideoHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalVideoHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoHeightProperty()); return S_OK; } catch (...) @@ -21679,11 +23174,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NaturalVideoWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalVideoWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalVideoWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalVideoWidthProperty()); return S_OK; } catch (...) @@ -21693,11 +23189,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NaturalDurationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_NaturalDurationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NaturalDurationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NaturalDurationProperty()); return S_OK; } catch (...) @@ -21707,11 +23204,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PositionProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PositionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PositionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PositionProperty()); return S_OK; } catch (...) @@ -21721,11 +23219,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DownloadProgressProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DownloadProgressProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DownloadProgressProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadProgressProperty()); return S_OK; } catch (...) @@ -21735,11 +23234,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_BufferingProgressProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BufferingProgressProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BufferingProgressProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BufferingProgressProperty()); return S_OK; } catch (...) @@ -21749,11 +23249,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DownloadProgressOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DownloadProgressOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DownloadProgressOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DownloadProgressOffsetProperty()); return S_OK; } catch (...) @@ -21763,11 +23264,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CurrentStateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CurrentStateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CurrentStateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CurrentStateProperty()); return S_OK; } catch (...) @@ -21777,11 +23279,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CanSeekProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanSeekProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanSeekProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanSeekProperty()); return S_OK; } catch (...) @@ -21791,11 +23294,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CanPauseProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanPauseProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanPauseProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanPauseProperty()); return S_OK; } catch (...) @@ -21805,11 +23309,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AudioStreamCountProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioStreamCountProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioStreamCountProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioStreamCountProperty()); return S_OK; } catch (...) @@ -21819,11 +23324,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AudioStreamIndexProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioStreamIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioStreamIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioStreamIndexProperty()); return S_OK; } catch (...) @@ -21833,11 +23339,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PlaybackRateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaybackRateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaybackRateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaybackRateProperty()); return S_OK; } catch (...) @@ -21847,11 +23354,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsLoopingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsLoopingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsLoopingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLoopingProperty()); return S_OK; } catch (...) @@ -21861,11 +23369,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PlayToSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlayToSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToSourceProperty()); return S_OK; } catch (...) @@ -21875,11 +23384,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_DefaultPlaybackRateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultPlaybackRateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultPlaybackRateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultPlaybackRateProperty()); return S_OK; } catch (...) @@ -21889,11 +23399,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AspectRatioWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AspectRatioWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AspectRatioWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AspectRatioWidthProperty()); return S_OK; } catch (...) @@ -21903,11 +23414,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AspectRatioHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AspectRatioHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AspectRatioHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AspectRatioHeightProperty()); return S_OK; } catch (...) @@ -21917,11 +23429,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_RealTimePlaybackProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RealTimePlaybackProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RealTimePlaybackProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RealTimePlaybackProperty()); return S_OK; } catch (...) @@ -21931,11 +23444,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AudioCategoryProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioCategoryProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioCategoryProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioCategoryProperty()); return S_OK; } catch (...) @@ -21945,11 +23459,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_AudioDeviceTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AudioDeviceTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AudioDeviceTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AudioDeviceTypeProperty()); return S_OK; } catch (...) @@ -21959,11 +23474,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ProtectionManagerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ProtectionManagerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ProtectionManagerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ProtectionManagerProperty()); return S_OK; } catch (...) @@ -21973,11 +23489,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Stereo3DVideoPackingModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_Stereo3DVideoPackingModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stereo3DVideoPackingModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stereo3DVideoPackingModeProperty()); return S_OK; } catch (...) @@ -21987,11 +23504,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_Stereo3DVideoRenderModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_Stereo3DVideoRenderModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Stereo3DVideoRenderModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stereo3DVideoRenderModeProperty()); return S_OK; } catch (...) @@ -22001,11 +23519,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsStereo3DVideoProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsStereo3DVideoProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsStereo3DVideoProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStereo3DVideoProperty()); return S_OK; } catch (...) @@ -22015,11 +23534,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ActualStereo3DVideoPackingModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ActualStereo3DVideoPackingModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ActualStereo3DVideoPackingModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualStereo3DVideoPackingModeProperty()); return S_OK; } catch (...) @@ -22033,11 +23553,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_AreTransportControlsEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreTransportControlsEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreTransportControlsEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreTransportControlsEnabledProperty()); return S_OK; } catch (...) @@ -22047,11 +23568,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_StretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -22061,11 +23583,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsFullWindowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFullWindowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFullWindowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowProperty()); return S_OK; } catch (...) @@ -22075,11 +23598,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PlayToPreferredSourceUriProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlayToPreferredSourceUriProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlayToPreferredSourceUriProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlayToPreferredSourceUriProperty()); return S_OK; } catch (...) @@ -22093,11 +23617,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -22107,10 +23632,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Source(abi_arg_in value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -22120,11 +23646,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_TransportControls(abi_arg_out value) noexcept override + HRESULT __stdcall get_TransportControls(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TransportControls()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TransportControls()); return S_OK; } catch (...) @@ -22134,10 +23661,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_TransportControls(abi_arg_in value) noexcept override + HRESULT __stdcall put_TransportControls(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TransportControls(*reinterpret_cast(&value)); return S_OK; } @@ -22151,7 +23679,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AreTransportControlsEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreTransportControlsEnabled()); return S_OK; } catch (...) @@ -22164,6 +23693,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().AreTransportControlsEnabled(value); return S_OK; } @@ -22173,11 +23703,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_PosterSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_PosterSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PosterSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PosterSource()); return S_OK; } catch (...) @@ -22187,10 +23718,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_PosterSource(abi_arg_in value) noexcept override + HRESULT __stdcall put_PosterSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PosterSource(*reinterpret_cast(&value)); return S_OK; } @@ -22204,7 +23736,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -22217,6 +23750,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().Stretch(value); return S_OK; } @@ -22230,7 +23764,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().AutoPlay()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoPlay()); return S_OK; } catch (...) @@ -22243,6 +23778,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().AutoPlay(value); return S_OK; } @@ -22256,7 +23792,8 @@ struct produce : produce_ba { try { - *value = detach(this->shim().IsFullWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindow()); return S_OK; } catch (...) @@ -22269,6 +23806,7 @@ struct produce : produce_ba { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFullWindow(value); return S_OK; } @@ -22278,11 +23816,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MediaPlayer(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -22292,10 +23831,11 @@ struct produce : produce_ba } } - HRESULT __stdcall abi_SetMediaPlayer(abi_arg_in mediaPlayer) noexcept override + HRESULT __stdcall abi_SetMediaPlayer(impl::abi_arg_in mediaPlayer) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetMediaPlayer(*reinterpret_cast(&mediaPlayer)); return S_OK; } @@ -22309,11 +23849,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -22328,11 +23869,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_SourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceProperty()); return S_OK; } catch (...) @@ -22342,11 +23884,12 @@ struct produce : pro } } - HRESULT __stdcall get_AreTransportControlsEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreTransportControlsEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreTransportControlsEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreTransportControlsEnabledProperty()); return S_OK; } catch (...) @@ -22356,11 +23899,12 @@ struct produce : pro } } - HRESULT __stdcall get_PosterSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PosterSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PosterSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PosterSourceProperty()); return S_OK; } catch (...) @@ -22370,11 +23914,12 @@ struct produce : pro } } - HRESULT __stdcall get_StretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -22384,11 +23929,12 @@ struct produce : pro } } - HRESULT __stdcall get_AutoPlayProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AutoPlayProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AutoPlayProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AutoPlayProperty()); return S_OK; } catch (...) @@ -22398,11 +23944,12 @@ struct produce : pro } } - HRESULT __stdcall get_IsFullWindowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFullWindowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFullWindowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowProperty()); return S_OK; } catch (...) @@ -22412,11 +23959,12 @@ struct produce : pro } } - HRESULT __stdcall get_MediaPlayerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayerProperty()); return S_OK; } catch (...) @@ -22430,11 +23978,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_MediaPlayer(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayer()); return S_OK; } catch (...) @@ -22444,10 +23993,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_MediaPlayer(abi_arg_in value) noexcept override + HRESULT __stdcall put_MediaPlayer(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MediaPlayer(*reinterpret_cast(&value)); return S_OK; } @@ -22461,7 +24011,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -22474,6 +24025,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().Stretch(value); return S_OK; } @@ -22487,7 +24039,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsFullWindow()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindow()); return S_OK; } catch (...) @@ -22500,6 +24053,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFullWindow(value); return S_OK; } @@ -22513,11 +24067,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -22532,11 +24087,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_MediaPlayerProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaPlayerProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaPlayerProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaPlayerProperty()); return S_OK; } catch (...) @@ -22546,11 +24102,12 @@ struct produce : p } } - HRESULT __stdcall get_StretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -22560,11 +24117,12 @@ struct produce : p } } - HRESULT __stdcall get_IsFullWindowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFullWindowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFullWindowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowProperty()); return S_OK; } catch (...) @@ -22582,7 +24140,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFullWindowButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowButtonVisible()); return S_OK; } catch (...) @@ -22595,6 +24154,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFullWindowButtonVisible(value); return S_OK; } @@ -22608,7 +24168,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFullWindowEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowEnabled()); return S_OK; } catch (...) @@ -22621,6 +24182,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFullWindowEnabled(value); return S_OK; } @@ -22634,7 +24196,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsZoomButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomButtonVisible()); return S_OK; } catch (...) @@ -22647,6 +24210,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsZoomButtonVisible(value); return S_OK; } @@ -22660,7 +24224,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsZoomEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomEnabled()); return S_OK; } catch (...) @@ -22673,6 +24238,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsZoomEnabled(value); return S_OK; } @@ -22686,7 +24252,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFastForwardButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastForwardButtonVisible()); return S_OK; } catch (...) @@ -22699,6 +24266,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFastForwardButtonVisible(value); return S_OK; } @@ -22712,7 +24280,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFastForwardEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastForwardEnabled()); return S_OK; } catch (...) @@ -22725,6 +24294,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFastForwardEnabled(value); return S_OK; } @@ -22738,7 +24308,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFastRewindButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastRewindButtonVisible()); return S_OK; } catch (...) @@ -22751,6 +24322,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFastRewindButtonVisible(value); return S_OK; } @@ -22764,7 +24336,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsFastRewindEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastRewindEnabled()); return S_OK; } catch (...) @@ -22777,6 +24350,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsFastRewindEnabled(value); return S_OK; } @@ -22790,7 +24364,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsStopButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStopButtonVisible()); return S_OK; } catch (...) @@ -22803,6 +24378,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsStopButtonVisible(value); return S_OK; } @@ -22816,7 +24392,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsStopEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStopEnabled()); return S_OK; } catch (...) @@ -22829,6 +24406,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsStopEnabled(value); return S_OK; } @@ -22842,7 +24420,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsVolumeButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVolumeButtonVisible()); return S_OK; } catch (...) @@ -22855,6 +24434,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsVolumeButtonVisible(value); return S_OK; } @@ -22868,7 +24448,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsVolumeEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVolumeEnabled()); return S_OK; } catch (...) @@ -22881,6 +24462,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsVolumeEnabled(value); return S_OK; } @@ -22894,7 +24476,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsPlaybackRateButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlaybackRateButtonVisible()); return S_OK; } catch (...) @@ -22907,6 +24490,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPlaybackRateButtonVisible(value); return S_OK; } @@ -22920,7 +24504,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsPlaybackRateEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlaybackRateEnabled()); return S_OK; } catch (...) @@ -22933,6 +24518,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPlaybackRateEnabled(value); return S_OK; } @@ -22946,7 +24532,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsSeekBarVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeekBarVisible()); return S_OK; } catch (...) @@ -22959,6 +24546,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSeekBarVisible(value); return S_OK; } @@ -22972,7 +24560,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsSeekEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeekEnabled()); return S_OK; } catch (...) @@ -22985,6 +24574,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSeekEnabled(value); return S_OK; } @@ -22998,7 +24588,8 @@ struct produce : produc { try { - *value = detach(this->shim().IsCompact()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompact()); return S_OK; } catch (...) @@ -23011,6 +24602,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().IsCompact(value); return S_OK; } @@ -23028,7 +24620,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsSkipForwardButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipForwardButtonVisible()); return S_OK; } catch (...) @@ -23041,6 +24634,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSkipForwardButtonVisible(value); return S_OK; } @@ -23054,7 +24648,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsSkipForwardEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipForwardEnabled()); return S_OK; } catch (...) @@ -23067,6 +24662,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSkipForwardEnabled(value); return S_OK; } @@ -23080,7 +24676,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsSkipBackwardButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipBackwardButtonVisible()); return S_OK; } catch (...) @@ -23093,6 +24690,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSkipBackwardButtonVisible(value); return S_OK; } @@ -23106,7 +24704,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsSkipBackwardEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipBackwardEnabled()); return S_OK; } catch (...) @@ -23119,6 +24718,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsSkipBackwardEnabled(value); return S_OK; } @@ -23132,7 +24732,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsNextTrackButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNextTrackButtonVisible()); return S_OK; } catch (...) @@ -23145,6 +24746,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsNextTrackButtonVisible(value); return S_OK; } @@ -23158,7 +24760,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsPreviousTrackButtonVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPreviousTrackButtonVisible()); return S_OK; } catch (...) @@ -23171,6 +24774,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsPreviousTrackButtonVisible(value); return S_OK; } @@ -23184,7 +24788,8 @@ struct produce : produ { try { - *value = detach(this->shim().FastPlayFallbackBehaviour()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FastPlayFallbackBehaviour()); return S_OK; } catch (...) @@ -23197,6 +24802,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().FastPlayFallbackBehaviour(value); return S_OK; } @@ -23206,11 +24812,12 @@ struct produce : produ } } - HRESULT __stdcall add_ThumbnailRequested(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_ThumbnailRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ThumbnailRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ThumbnailRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -23223,6 +24830,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().ThumbnailRequested(token); return S_OK; } @@ -23236,11 +24844,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -23259,11 +24868,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_DropoutOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DropoutOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DropoutOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DropoutOrderProperty()); return S_OK; } catch (...) @@ -23273,11 +24883,12 @@ struct produce element, abi_arg_out> value) noexcept override + HRESULT __stdcall abi_GetDropoutOrder(impl::abi_arg_in element, impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().GetDropoutOrder(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetDropoutOrder(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -23287,10 +24898,11 @@ struct produce element, abi_arg_in> value) noexcept override + HRESULT __stdcall abi_SetDropoutOrder(impl::abi_arg_in element, impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetDropoutOrder(*reinterpret_cast(&element), *reinterpret_cast *>(&value)); return S_OK; } @@ -23304,11 +24916,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_IsFullWindowButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFullWindowButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFullWindowButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowButtonVisibleProperty()); return S_OK; } catch (...) @@ -23318,11 +24931,12 @@ struct produce : } } - HRESULT __stdcall get_IsFullWindowEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFullWindowEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFullWindowEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFullWindowEnabledProperty()); return S_OK; } catch (...) @@ -23332,11 +24946,12 @@ struct produce : } } - HRESULT __stdcall get_IsZoomButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomButtonVisibleProperty()); return S_OK; } catch (...) @@ -23346,11 +24961,12 @@ struct produce : } } - HRESULT __stdcall get_IsZoomEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomEnabledProperty()); return S_OK; } catch (...) @@ -23360,11 +24976,12 @@ struct produce : } } - HRESULT __stdcall get_IsFastForwardButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFastForwardButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFastForwardButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastForwardButtonVisibleProperty()); return S_OK; } catch (...) @@ -23374,11 +24991,12 @@ struct produce : } } - HRESULT __stdcall get_IsFastForwardEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFastForwardEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFastForwardEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastForwardEnabledProperty()); return S_OK; } catch (...) @@ -23388,11 +25006,12 @@ struct produce : } } - HRESULT __stdcall get_IsFastRewindButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFastRewindButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFastRewindButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastRewindButtonVisibleProperty()); return S_OK; } catch (...) @@ -23402,11 +25021,12 @@ struct produce : } } - HRESULT __stdcall get_IsFastRewindEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsFastRewindEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsFastRewindEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsFastRewindEnabledProperty()); return S_OK; } catch (...) @@ -23416,11 +25036,12 @@ struct produce : } } - HRESULT __stdcall get_IsStopButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsStopButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsStopButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStopButtonVisibleProperty()); return S_OK; } catch (...) @@ -23430,11 +25051,12 @@ struct produce : } } - HRESULT __stdcall get_IsStopEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsStopEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsStopEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsStopEnabledProperty()); return S_OK; } catch (...) @@ -23444,11 +25066,12 @@ struct produce : } } - HRESULT __stdcall get_IsVolumeButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsVolumeButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsVolumeButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVolumeButtonVisibleProperty()); return S_OK; } catch (...) @@ -23458,11 +25081,12 @@ struct produce : } } - HRESULT __stdcall get_IsVolumeEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsVolumeEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsVolumeEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVolumeEnabledProperty()); return S_OK; } catch (...) @@ -23472,11 +25096,12 @@ struct produce : } } - HRESULT __stdcall get_IsPlaybackRateButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPlaybackRateButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPlaybackRateButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlaybackRateButtonVisibleProperty()); return S_OK; } catch (...) @@ -23486,11 +25111,12 @@ struct produce : } } - HRESULT __stdcall get_IsPlaybackRateEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPlaybackRateEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPlaybackRateEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPlaybackRateEnabledProperty()); return S_OK; } catch (...) @@ -23500,11 +25126,12 @@ struct produce : } } - HRESULT __stdcall get_IsSeekBarVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSeekBarVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSeekBarVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeekBarVisibleProperty()); return S_OK; } catch (...) @@ -23514,11 +25141,12 @@ struct produce : } } - HRESULT __stdcall get_IsSeekEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSeekEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSeekEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSeekEnabledProperty()); return S_OK; } catch (...) @@ -23528,11 +25156,12 @@ struct produce : } } - HRESULT __stdcall get_IsCompactProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCompactProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCompactProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCompactProperty()); return S_OK; } catch (...) @@ -23546,11 +25175,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_IsSkipForwardButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSkipForwardButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSkipForwardButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipForwardButtonVisibleProperty()); return S_OK; } catch (...) @@ -23560,11 +25190,12 @@ struct produce } } - HRESULT __stdcall get_IsSkipForwardEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSkipForwardEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSkipForwardEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipForwardEnabledProperty()); return S_OK; } catch (...) @@ -23574,11 +25205,12 @@ struct produce } } - HRESULT __stdcall get_IsSkipBackwardButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSkipBackwardButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSkipBackwardButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipBackwardButtonVisibleProperty()); return S_OK; } catch (...) @@ -23588,11 +25220,12 @@ struct produce } } - HRESULT __stdcall get_IsSkipBackwardEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSkipBackwardEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSkipBackwardEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSkipBackwardEnabledProperty()); return S_OK; } catch (...) @@ -23602,11 +25235,12 @@ struct produce } } - HRESULT __stdcall get_IsNextTrackButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsNextTrackButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsNextTrackButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsNextTrackButtonVisibleProperty()); return S_OK; } catch (...) @@ -23616,11 +25250,12 @@ struct produce } } - HRESULT __stdcall get_IsPreviousTrackButtonVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPreviousTrackButtonVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPreviousTrackButtonVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPreviousTrackButtonVisibleProperty()); return S_OK; } catch (...) @@ -23630,11 +25265,12 @@ struct produce } } - HRESULT __stdcall get_FastPlayFallbackBehaviourProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FastPlayFallbackBehaviourProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FastPlayFallbackBehaviourProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FastPlayFallbackBehaviourProperty()); return S_OK; } catch (...) @@ -23648,11 +25284,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -23662,11 +25299,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MenuFlyoutPresenterStyle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MenuFlyoutPresenterStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MenuFlyoutPresenterStyle()); return S_OK; } catch (...) @@ -23676,10 +25314,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_MenuFlyoutPresenterStyle(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MenuFlyoutPresenterStyle(*reinterpret_cast(&value)); return S_OK; } @@ -23693,10 +25332,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_ShowAt(abi_arg_in targetElement, abi_arg_in point) noexcept override + HRESULT __stdcall abi_ShowAt(impl::abi_arg_in targetElement, impl::abi_arg_in point) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ShowAt(*reinterpret_cast(&targetElement), *reinterpret_cast(&point)); return S_OK; } @@ -23710,11 +25350,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -23729,11 +25370,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -23743,10 +25385,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -23756,11 +25399,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Command(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Command()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Command()); return S_OK; } catch (...) @@ -23770,10 +25414,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Command(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Command(*reinterpret_cast(&value)); return S_OK; } @@ -23783,11 +25428,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CommandParameter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandParameter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandParameter()); return S_OK; } catch (...) @@ -23797,11 +25443,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CommandParameter(impl::abi_arg_in value) noexcept override { try { - this->shim().CommandParameter(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().CommandParameter(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -23810,11 +25457,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Click(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Click(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Click(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -23827,6 +25475,7 @@ struct produce : produce_baseshim()); this->shim().Click(token); return S_OK; } @@ -23848,11 +25497,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -23867,11 +25517,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_TextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextProperty()); return S_OK; } catch (...) @@ -23881,11 +25532,12 @@ struct produce : produce } } - HRESULT __stdcall get_CommandProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandProperty()); return S_OK; } catch (...) @@ -23895,11 +25547,12 @@ struct produce : produce } } - HRESULT __stdcall get_CommandParameterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CommandParameterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CommandParameterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CommandParameterProperty()); return S_OK; } catch (...) @@ -23917,11 +25570,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_TemplateSettings(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -23935,11 +25589,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -23958,11 +25613,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -23977,11 +25633,12 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall get_MenuFlyoutPresenterStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MenuFlyoutPresenterStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MenuFlyoutPresenterStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MenuFlyoutPresenterStyleProperty()); return S_OK; } catch (...) @@ -23995,11 +25652,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Items(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Items(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Items()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Items()); return S_OK; } catch (...) @@ -24009,11 +25667,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -24023,10 +25682,11 @@ struct produce : produce_bas } } - HRESULT __stdcall put_Text(abi_arg_in value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -24040,11 +25700,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_TextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextProperty()); return S_OK; } catch (...) @@ -24058,11 +25719,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_Navigate(abi_arg_in sourcePageType, bool * returnValue) noexcept override + HRESULT __stdcall abi_Navigate(impl::abi_arg_in sourcePageType, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().Navigate(*reinterpret_cast(&sourcePageType))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Navigate(*reinterpret_cast(&sourcePageType))); return S_OK; } catch (...) @@ -24075,11 +25737,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Value(abi_arg_out value) noexcept override + HRESULT __stdcall get_Value(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Value()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Value()); return S_OK; } catch (...) @@ -24093,11 +25756,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_CallingUri(abi_arg_out value) noexcept override + HRESULT __stdcall get_CallingUri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CallingUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CallingUri()); return S_OK; } catch (...) @@ -24111,11 +25775,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_Frame(abi_arg_out value) noexcept override + HRESULT __stdcall get_Frame(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Frame()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Frame()); return S_OK; } catch (...) @@ -24129,7 +25794,8 @@ struct produce : produce_baseshim().NavigationCacheMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NavigationCacheMode()); return S_OK; } catch (...) @@ -24142,6 +25808,7 @@ struct produce : produce_baseshim()); this->shim().NavigationCacheMode(value); return S_OK; } @@ -24151,11 +25818,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TopAppBar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopAppBar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopAppBar()); return S_OK; } catch (...) @@ -24165,10 +25833,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TopAppBar(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TopAppBar(*reinterpret_cast(&value)); return S_OK; } @@ -24178,11 +25847,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BottomAppBar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BottomAppBar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomAppBar()); return S_OK; } catch (...) @@ -24192,10 +25862,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BottomAppBar(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BottomAppBar(*reinterpret_cast(&value)); return S_OK; } @@ -24209,11 +25880,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -24228,10 +25900,11 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_OnNavigatedFrom(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnNavigatedFrom(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnNavigatedFrom(*reinterpret_cast(&e)); return S_OK; } @@ -24241,10 +25914,11 @@ struct produce : produce_base e) noexcept override + HRESULT __stdcall abi_OnNavigatedTo(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnNavigatedTo(*reinterpret_cast(&e)); return S_OK; } @@ -24254,10 +25928,11 @@ struct produce : produce_base e) noexcept override + HRESULT __stdcall abi_OnNavigatingFrom(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnNavigatingFrom(*reinterpret_cast(&e)); return S_OK; } @@ -24271,11 +25946,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FrameProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FrameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FrameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FrameProperty()); return S_OK; } catch (...) @@ -24285,11 +25961,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TopAppBarProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopAppBarProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopAppBarProperty()); return S_OK; } catch (...) @@ -24299,11 +25976,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BottomAppBarProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BottomAppBarProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BottomAppBarProperty()); return S_OK; } catch (...) @@ -24317,11 +25995,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Children(abi_arg_out> value) noexcept override + HRESULT __stdcall get_Children(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Children()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Children()); return S_OK; } catch (...) @@ -24331,11 +26010,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Background(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Background()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Background()); return S_OK; } catch (...) @@ -24345,10 +26025,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Background(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Background(*reinterpret_cast(&value)); return S_OK; } @@ -24362,7 +26043,8 @@ struct produce : produce_baseshim().IsItemsHost()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsItemsHost()); return S_OK; } catch (...) @@ -24371,11 +26053,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ChildrenTransitions(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ChildrenTransitions()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildrenTransitions()); return S_OK; } catch (...) @@ -24385,10 +26068,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_ChildrenTransitions(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ChildrenTransitions(*reinterpret_cast(&value)); return S_OK; } @@ -24402,11 +26086,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -24421,11 +26106,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BackgroundProperty()); return S_OK; } catch (...) @@ -24435,11 +26121,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsItemsHostProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsItemsHostProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsItemsHostProperty()); return S_OK; } catch (...) @@ -24449,11 +26136,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ChildrenTransitionsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChildrenTransitionsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChildrenTransitionsProperty()); return S_OK; } catch (...) @@ -24467,11 +26155,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Password(abi_arg_out value) noexcept override + HRESULT __stdcall get_Password(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Password()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Password()); return S_OK; } catch (...) @@ -24481,10 +26170,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Password(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&value)); return S_OK; } @@ -24494,11 +26184,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PasswordChar(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordChar()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordChar()); return S_OK; } catch (...) @@ -24508,10 +26199,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PasswordChar(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PasswordChar(*reinterpret_cast(&value)); return S_OK; } @@ -24525,7 +26217,8 @@ struct produce : produce_baseshim().IsPasswordRevealButtonEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPasswordRevealButtonEnabled()); return S_OK; } catch (...) @@ -24538,6 +26231,7 @@ struct produce : produce_baseshim()); this->shim().IsPasswordRevealButtonEnabled(value); return S_OK; } @@ -24551,7 +26245,8 @@ struct produce : produce_baseshim().MaxLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLength()); return S_OK; } catch (...) @@ -24564,6 +26259,7 @@ struct produce : produce_baseshim()); this->shim().MaxLength(value); return S_OK; } @@ -24573,11 +26269,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_PasswordChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().PasswordChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PasswordChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -24590,6 +26287,7 @@ struct produce : produce_baseshim()); this->shim().PasswordChanged(token); return S_OK; } @@ -24599,11 +26297,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ContextMenuOpening(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -24616,6 +26315,7 @@ struct produce : produce_baseshim()); this->shim().ContextMenuOpening(token); return S_OK; } @@ -24629,6 +26329,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -24642,11 +26343,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -24656,11 +26358,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -24669,11 +26372,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -24683,10 +26387,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -24696,11 +26401,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -24710,10 +26416,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -24723,11 +26430,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionHighlightColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColor()); return S_OK; } catch (...) @@ -24737,10 +26445,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectionHighlightColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionHighlightColor(*reinterpret_cast(&value)); return S_OK; } @@ -24754,7 +26463,8 @@ struct produce : produce_baseshim().PreventKeyboardDisplayOnProgrammaticFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocus()); return S_OK; } catch (...) @@ -24767,6 +26477,7 @@ struct produce : produce_baseshim()); this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value); return S_OK; } @@ -24776,11 +26487,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Paste(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Paste(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Paste(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -24793,6 +26505,7 @@ struct produce : produce_baseshim()); this->shim().Paste(token); return S_OK; } @@ -24810,7 +26523,8 @@ struct produce : produce_baseshim().PasswordRevealMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordRevealMode()); return S_OK; } catch (...) @@ -24823,6 +26537,7 @@ struct produce : produce_baseshim()); this->shim().PasswordRevealMode(value); return S_OK; } @@ -24836,7 +26551,8 @@ struct produce : produce_baseshim().TextReadingOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrder()); return S_OK; } catch (...) @@ -24849,6 +26565,7 @@ struct produce : produce_baseshim()); this->shim().TextReadingOrder(value); return S_OK; } @@ -24858,11 +26575,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputScope(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScope()); return S_OK; } catch (...) @@ -24872,10 +26590,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_InputScope(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InputScope(*reinterpret_cast(&value)); return S_OK; } @@ -24889,11 +26608,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PasswordProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasswordProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordProperty()); return S_OK; } catch (...) @@ -24903,11 +26623,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_PasswordCharProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasswordCharProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordCharProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordCharProperty()); return S_OK; } catch (...) @@ -24917,11 +26638,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_IsPasswordRevealButtonEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPasswordRevealButtonEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPasswordRevealButtonEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPasswordRevealButtonEnabledProperty()); return S_OK; } catch (...) @@ -24931,11 +26653,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_MaxLengthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLengthProperty()); return S_OK; } catch (...) @@ -24949,11 +26672,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -24963,11 +26687,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -24977,11 +26702,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -24991,11 +26717,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectionHighlightColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColorProperty()); return S_OK; } catch (...) @@ -25005,11 +26732,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); return S_OK; } catch (...) @@ -25023,11 +26751,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_PasswordRevealModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PasswordRevealModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PasswordRevealModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PasswordRevealModeProperty()); return S_OK; } catch (...) @@ -25037,11 +26766,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TextReadingOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextReadingOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextReadingOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrderProperty()); return S_OK; } catch (...) @@ -25051,11 +26781,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_InputScopeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputScopeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScopeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScopeProperty()); return S_OK; } catch (...) @@ -25069,11 +26800,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Data(abi_arg_out value) noexcept override + HRESULT __stdcall get_Data(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Data()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Data()); return S_OK; } catch (...) @@ -25083,10 +26815,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Data(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return S_OK; } @@ -25100,11 +26833,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -25119,11 +26853,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_DataProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DataProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataProperty()); return S_OK; } catch (...) @@ -25141,11 +26876,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -25155,10 +26891,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return S_OK; } @@ -25172,7 +26909,8 @@ struct produce : produce_baseshim().ConfirmationButtonsVisible()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfirmationButtonsVisible()); return S_OK; } catch (...) @@ -25185,6 +26923,7 @@ struct produce : produce_baseshim()); this->shim().ConfirmationButtonsVisible(value); return S_OK; } @@ -25194,11 +26933,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_Confirmed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().Confirmed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Confirmed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -25211,6 +26951,7 @@ struct produce : produce_baseshim()); this->shim().Confirmed(token); return S_OK; } @@ -25220,11 +26961,12 @@ struct produce : produce_base target, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_ShowAtAsync(impl::abi_arg_in target, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAtAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAtAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -25242,11 +26984,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -25256,11 +26999,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ConfirmationButtonsVisibleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ConfirmationButtonsVisibleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ConfirmationButtonsVisibleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ConfirmationButtonsVisibleProperty()); return S_OK; } catch (...) @@ -25274,11 +27018,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -25288,11 +27033,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { - this->shim().Title(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Title(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -25301,11 +27047,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TitleTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleTemplate()); return S_OK; } catch (...) @@ -25315,10 +27062,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TitleTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TitleTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -25328,11 +27076,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -25342,10 +27091,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -25359,7 +27109,8 @@ struct produce : produce_baseshim().SelectedIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndex()); return S_OK; } catch (...) @@ -25372,6 +27123,7 @@ struct produce : produce_baseshim()); this->shim().SelectedIndex(value); return S_OK; } @@ -25381,11 +27133,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItem()); return S_OK; } catch (...) @@ -25395,11 +27148,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedItem(impl::abi_arg_in value) noexcept override { try { - this->shim().SelectedItem(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SelectedItem(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -25412,7 +27166,8 @@ struct produce : produce_baseshim().IsLocked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLocked()); return S_OK; } catch (...) @@ -25425,6 +27180,7 @@ struct produce : produce_baseshim()); this->shim().IsLocked(value); return S_OK; } @@ -25434,11 +27190,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -25451,6 +27208,7 @@ struct produce : produce_baseshim()); this->shim().SelectionChanged(token); return S_OK; } @@ -25460,11 +27218,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PivotItemLoading(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PivotItemLoading(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PivotItemLoading(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -25477,6 +27236,7 @@ struct produce : produce_baseshim()); this->shim().PivotItemLoading(token); return S_OK; } @@ -25486,11 +27246,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PivotItemLoaded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PivotItemLoaded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PivotItemLoaded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -25503,6 +27264,7 @@ struct produce : produce_baseshim()); this->shim().PivotItemLoaded(token); return S_OK; } @@ -25512,11 +27274,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PivotItemUnloading(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PivotItemUnloading(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PivotItemUnloading(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -25529,6 +27292,7 @@ struct produce : produce_baseshim()); this->shim().PivotItemUnloading(token); return S_OK; } @@ -25538,11 +27302,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PivotItemUnloaded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PivotItemUnloaded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PivotItemUnloaded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -25555,6 +27320,7 @@ struct produce : produce_baseshim()); this->shim().PivotItemUnloaded(token); return S_OK; } @@ -25568,11 +27334,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LeftHeader(abi_arg_out value) noexcept override + HRESULT __stdcall get_LeftHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeader()); return S_OK; } catch (...) @@ -25582,11 +27349,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LeftHeader(impl::abi_arg_in value) noexcept override { try { - this->shim().LeftHeader(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().LeftHeader(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -25595,11 +27363,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LeftHeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeaderTemplate()); return S_OK; } catch (...) @@ -25609,10 +27378,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LeftHeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LeftHeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -25622,11 +27392,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RightHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RightHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightHeader()); return S_OK; } catch (...) @@ -25636,11 +27407,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RightHeader(impl::abi_arg_in value) noexcept override { try { - this->shim().RightHeader(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().RightHeader(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -25649,11 +27421,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RightHeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RightHeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightHeaderTemplate()); return S_OK; } catch (...) @@ -25663,10 +27436,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_RightHeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().RightHeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -25684,7 +27458,8 @@ struct produce : produce_baseshim().HeaderFocusVisualPlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderFocusVisualPlacement()); return S_OK; } catch (...) @@ -25697,6 +27472,7 @@ struct produce : produce_baseshim()); this->shim().HeaderFocusVisualPlacement(value); return S_OK; } @@ -25710,7 +27486,8 @@ struct produce : produce_baseshim().IsHeaderItemsCarouselEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHeaderItemsCarouselEnabled()); return S_OK; } catch (...) @@ -25723,6 +27500,7 @@ struct produce : produce_baseshim()); this->shim().IsHeaderItemsCarouselEnabled(value); return S_OK; } @@ -25736,11 +27514,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -25755,11 +27534,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -25769,11 +27549,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -25786,11 +27567,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -25800,10 +27582,11 @@ struct produce : produce_ba } } - HRESULT __stdcall put_Item(abi_arg_in value) noexcept override + HRESULT __stdcall put_Item(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Item(*reinterpret_cast(&value)); return S_OK; } @@ -25817,11 +27600,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -25836,11 +27620,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -25854,11 +27639,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_TitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleProperty()); return S_OK; } catch (...) @@ -25868,11 +27654,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TitleTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleTemplateProperty()); return S_OK; } catch (...) @@ -25882,11 +27669,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -25896,11 +27684,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedIndexProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedIndexProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedIndexProperty()); return S_OK; } catch (...) @@ -25910,11 +27699,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedItemProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedItemProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedItemProperty()); return S_OK; } catch (...) @@ -25924,11 +27714,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsLockedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsLockedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsLockedProperty()); return S_OK; } catch (...) @@ -25938,11 +27729,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SlideInAnimationGroupProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SlideInAnimationGroupProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SlideInAnimationGroupProperty()); return S_OK; } catch (...) @@ -25952,11 +27744,12 @@ struct produce : produce_base element, Windows::UI::Xaml::Controls::PivotSlideInAnimationGroup * value) noexcept override + HRESULT __stdcall abi_GetSlideInAnimationGroup(impl::abi_arg_in element, Windows::UI::Xaml::Controls::PivotSlideInAnimationGroup * value) noexcept override { try { - *value = detach(this->shim().GetSlideInAnimationGroup(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetSlideInAnimationGroup(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -25965,10 +27758,11 @@ struct produce : produce_base element, Windows::UI::Xaml::Controls::PivotSlideInAnimationGroup value) noexcept override + HRESULT __stdcall abi_SetSlideInAnimationGroup(impl::abi_arg_in element, Windows::UI::Xaml::Controls::PivotSlideInAnimationGroup value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSlideInAnimationGroup(*reinterpret_cast(&element), value); return S_OK; } @@ -25982,11 +27776,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_LeftHeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LeftHeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeaderProperty()); return S_OK; } catch (...) @@ -25996,11 +27791,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LeftHeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeaderTemplateProperty()); return S_OK; } catch (...) @@ -26010,11 +27806,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RightHeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RightHeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightHeaderProperty()); return S_OK; } catch (...) @@ -26024,11 +27821,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_RightHeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RightHeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightHeaderTemplateProperty()); return S_OK; } catch (...) @@ -26042,11 +27840,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HeaderFocusVisualPlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderFocusVisualPlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderFocusVisualPlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderFocusVisualPlacementProperty()); return S_OK; } catch (...) @@ -26056,11 +27855,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsHeaderItemsCarouselEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsHeaderItemsCarouselEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHeaderItemsCarouselEnabledProperty()); return S_OK; } catch (...) @@ -26078,7 +27878,8 @@ struct produce : produce_baseshim().IsIndeterminate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIndeterminate()); return S_OK; } catch (...) @@ -26091,6 +27892,7 @@ struct produce : produce_baseshim()); this->shim().IsIndeterminate(value); return S_OK; } @@ -26104,7 +27906,8 @@ struct produce : produce_baseshim().ShowError()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowError()); return S_OK; } catch (...) @@ -26117,6 +27920,7 @@ struct produce : produce_baseshim()); this->shim().ShowError(value); return S_OK; } @@ -26130,7 +27934,8 @@ struct produce : produce_baseshim().ShowPaused()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowPaused()); return S_OK; } catch (...) @@ -26143,6 +27948,7 @@ struct produce : produce_baseshim()); this->shim().ShowPaused(value); return S_OK; } @@ -26152,11 +27958,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -26170,11 +27977,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -26189,11 +27997,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_IsIndeterminateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsIndeterminateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsIndeterminateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIndeterminateProperty()); return S_OK; } catch (...) @@ -26203,11 +28012,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ShowErrorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShowErrorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowErrorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowErrorProperty()); return S_OK; } catch (...) @@ -26217,11 +28027,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_ShowPausedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ShowPausedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ShowPausedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ShowPausedProperty()); return S_OK; } catch (...) @@ -26239,7 +28050,8 @@ struct produce : produce_baseshim().IsActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActive()); return S_OK; } catch (...) @@ -26252,6 +28064,7 @@ struct produce : produce_baseshim()); this->shim().IsActive(value); return S_OK; } @@ -26261,11 +28074,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -26279,11 +28093,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_IsActiveProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsActiveProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsActiveProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActiveProperty()); return S_OK; } catch (...) @@ -26297,11 +28112,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_GroupName(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupName()); return S_OK; } catch (...) @@ -26311,10 +28127,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_GroupName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().GroupName(*reinterpret_cast(&value)); return S_OK; } @@ -26328,11 +28145,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -26347,11 +28165,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_GroupNameProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_GroupNameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GroupNameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GroupNameProperty()); return S_OK; } catch (...) @@ -26365,11 +28184,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_BorderBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -26379,10 +28199,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -26392,11 +28213,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -26405,10 +28227,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -26418,11 +28241,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadius()); return S_OK; } catch (...) @@ -26431,10 +28255,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CornerRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CornerRadius(*reinterpret_cast(&value)); return S_OK; } @@ -26444,11 +28269,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -26457,10 +28283,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -26474,11 +28301,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -26493,11 +28321,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_LeftOfProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LeftOfProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftOfProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftOfProperty()); return S_OK; } catch (...) @@ -26507,11 +28336,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetLeftOf(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetLeftOf(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetLeftOf(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetLeftOf(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26521,11 +28351,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetLeftOf(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetLeftOf(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetLeftOf(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetLeftOf(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26534,11 +28365,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AboveProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AboveProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AboveProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AboveProperty()); return S_OK; } catch (...) @@ -26548,11 +28380,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAbove(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAbove(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAbove(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAbove(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26562,11 +28395,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAbove(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAbove(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAbove(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAbove(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26575,11 +28409,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_RightOfProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RightOfProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RightOfProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RightOfProperty()); return S_OK; } catch (...) @@ -26589,11 +28424,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetRightOf(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetRightOf(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetRightOf(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRightOf(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26603,11 +28439,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetRightOf(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetRightOf(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetRightOf(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetRightOf(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26616,11 +28453,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_BelowProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BelowProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BelowProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BelowProperty()); return S_OK; } catch (...) @@ -26630,11 +28468,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetBelow(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetBelow(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetBelow(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetBelow(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26644,11 +28483,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetBelow(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetBelow(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetBelow(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetBelow(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26657,11 +28497,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignHorizontalCenterWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignHorizontalCenterWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignHorizontalCenterWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignHorizontalCenterWithProperty()); return S_OK; } catch (...) @@ -26671,11 +28512,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignHorizontalCenterWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignHorizontalCenterWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignHorizontalCenterWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignHorizontalCenterWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26685,11 +28527,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignHorizontalCenterWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignHorizontalCenterWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignHorizontalCenterWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignHorizontalCenterWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26698,11 +28541,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignVerticalCenterWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignVerticalCenterWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignVerticalCenterWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignVerticalCenterWithProperty()); return S_OK; } catch (...) @@ -26712,11 +28556,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignVerticalCenterWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignVerticalCenterWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignVerticalCenterWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignVerticalCenterWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26726,11 +28571,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignVerticalCenterWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignVerticalCenterWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignVerticalCenterWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignVerticalCenterWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26739,11 +28585,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignLeftWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignLeftWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignLeftWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignLeftWithProperty()); return S_OK; } catch (...) @@ -26753,11 +28600,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignLeftWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignLeftWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignLeftWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignLeftWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26767,11 +28615,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignLeftWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignLeftWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignLeftWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignLeftWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26780,11 +28629,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignTopWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignTopWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignTopWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignTopWithProperty()); return S_OK; } catch (...) @@ -26794,11 +28644,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignTopWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignTopWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignTopWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignTopWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26808,11 +28659,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignTopWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignTopWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignTopWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignTopWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26821,11 +28673,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignRightWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignRightWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignRightWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignRightWithProperty()); return S_OK; } catch (...) @@ -26835,11 +28688,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignRightWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignRightWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignRightWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignRightWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26849,11 +28703,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignRightWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignRightWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignRightWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignRightWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26862,11 +28717,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignBottomWithProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignBottomWithProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignBottomWithProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignBottomWithProperty()); return S_OK; } catch (...) @@ -26876,11 +28732,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignBottomWith(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetAlignBottomWith(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetAlignBottomWith(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignBottomWith(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26890,11 +28747,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignBottomWith(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetAlignBottomWith(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetAlignBottomWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetAlignBottomWith(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -26903,11 +28761,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignLeftWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignLeftWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignLeftWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignLeftWithPanelProperty()); return S_OK; } catch (...) @@ -26917,11 +28776,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignLeftWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignLeftWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignLeftWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignLeftWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26930,10 +28790,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignLeftWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignLeftWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignLeftWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -26943,11 +28804,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignTopWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignTopWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignTopWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignTopWithPanelProperty()); return S_OK; } catch (...) @@ -26957,11 +28819,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignTopWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignTopWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignTopWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignTopWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -26970,10 +28833,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignTopWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignTopWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignTopWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -26983,11 +28847,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignRightWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignRightWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignRightWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignRightWithPanelProperty()); return S_OK; } catch (...) @@ -26997,11 +28862,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignRightWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignRightWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignRightWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignRightWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -27010,10 +28876,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignRightWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignRightWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignRightWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -27023,11 +28890,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignBottomWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignBottomWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignBottomWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignBottomWithPanelProperty()); return S_OK; } catch (...) @@ -27037,11 +28905,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignBottomWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignBottomWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignBottomWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignBottomWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -27050,10 +28919,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignBottomWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignBottomWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignBottomWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -27063,11 +28933,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignHorizontalCenterWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignHorizontalCenterWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignHorizontalCenterWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignHorizontalCenterWithPanelProperty()); return S_OK; } catch (...) @@ -27077,11 +28948,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignHorizontalCenterWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignHorizontalCenterWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignHorizontalCenterWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignHorizontalCenterWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -27090,10 +28962,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignHorizontalCenterWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignHorizontalCenterWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignHorizontalCenterWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -27103,11 +28976,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_AlignVerticalCenterWithPanelProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AlignVerticalCenterWithPanelProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AlignVerticalCenterWithPanelProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AlignVerticalCenterWithPanelProperty()); return S_OK; } catch (...) @@ -27117,11 +28991,12 @@ struct produce : produce_ } } - HRESULT __stdcall abi_GetAlignVerticalCenterWithPanel(abi_arg_in element, bool * value) noexcept override + HRESULT __stdcall abi_GetAlignVerticalCenterWithPanel(impl::abi_arg_in element, bool * value) noexcept override { try { - *value = detach(this->shim().GetAlignVerticalCenterWithPanel(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetAlignVerticalCenterWithPanel(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -27130,10 +29005,11 @@ struct produce : produce_ } } - HRESULT __stdcall abi_SetAlignVerticalCenterWithPanel(abi_arg_in element, bool value) noexcept override + HRESULT __stdcall abi_SetAlignVerticalCenterWithPanel(impl::abi_arg_in element, bool value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetAlignVerticalCenterWithPanel(*reinterpret_cast(&element), value); return S_OK; } @@ -27143,11 +29019,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_BorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -27157,11 +29034,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_BorderThicknessProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -27171,11 +29049,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CornerRadiusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CornerRadiusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadiusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadiusProperty()); return S_OK; } catch (...) @@ -27185,11 +29064,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -27207,7 +29087,8 @@ struct produce : produce_baseshim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -27220,6 +29101,7 @@ struct produce : produce_baseshim()); this->shim().IsReadOnly(value); return S_OK; } @@ -27233,7 +29115,8 @@ struct produce : produce_baseshim().AcceptsReturn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptsReturn()); return S_OK; } catch (...) @@ -27246,6 +29129,7 @@ struct produce : produce_baseshim()); this->shim().AcceptsReturn(value); return S_OK; } @@ -27259,7 +29143,8 @@ struct produce : produce_baseshim().TextAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignment()); return S_OK; } catch (...) @@ -27272,6 +29157,7 @@ struct produce : produce_baseshim()); this->shim().TextAlignment(value); return S_OK; } @@ -27285,7 +29171,8 @@ struct produce : produce_baseshim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -27298,6 +29185,7 @@ struct produce : produce_baseshim()); this->shim().TextWrapping(value); return S_OK; } @@ -27311,7 +29199,8 @@ struct produce : produce_baseshim().IsSpellCheckEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSpellCheckEnabled()); return S_OK; } catch (...) @@ -27324,6 +29213,7 @@ struct produce : produce_baseshim()); this->shim().IsSpellCheckEnabled(value); return S_OK; } @@ -27337,7 +29227,8 @@ struct produce : produce_baseshim().IsTextPredictionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextPredictionEnabled()); return S_OK; } catch (...) @@ -27350,6 +29241,7 @@ struct produce : produce_baseshim()); this->shim().IsTextPredictionEnabled(value); return S_OK; } @@ -27359,11 +29251,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Document(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Document()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Document()); return S_OK; } catch (...) @@ -27373,11 +29266,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputScope(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScope()); return S_OK; } catch (...) @@ -27387,10 +29281,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_InputScope(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InputScope(*reinterpret_cast(&value)); return S_OK; } @@ -27400,11 +29295,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_TextChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -27417,6 +29313,7 @@ struct produce : produce_baseshim()); this->shim().TextChanged(token); return S_OK; } @@ -27426,11 +29323,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -27443,6 +29341,7 @@ struct produce : produce_baseshim()); this->shim().SelectionChanged(token); return S_OK; } @@ -27452,11 +29351,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ContextMenuOpening(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -27469,6 +29369,7 @@ struct produce : produce_baseshim()); this->shim().ContextMenuOpening(token); return S_OK; } @@ -27482,11 +29383,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -27496,11 +29398,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -27509,11 +29412,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -27523,10 +29427,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -27536,11 +29441,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -27550,10 +29456,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -27563,11 +29470,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionHighlightColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColor()); return S_OK; } catch (...) @@ -27577,10 +29485,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectionHighlightColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionHighlightColor(*reinterpret_cast(&value)); return S_OK; } @@ -27594,7 +29503,8 @@ struct produce : produce_baseshim().PreventKeyboardDisplayOnProgrammaticFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocus()); return S_OK; } catch (...) @@ -27607,6 +29517,7 @@ struct produce : produce_baseshim()); this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value); return S_OK; } @@ -27620,7 +29531,8 @@ struct produce : produce_baseshim().IsColorFontEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabled()); return S_OK; } catch (...) @@ -27633,6 +29545,7 @@ struct produce : produce_baseshim()); this->shim().IsColorFontEnabled(value); return S_OK; } @@ -27642,11 +29555,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Paste(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Paste(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Paste(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -27659,6 +29573,7 @@ struct produce : produce_baseshim()); this->shim().Paste(token); return S_OK; } @@ -27672,11 +29587,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_TextCompositionStarted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionStarted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionStarted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionStarted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -27689,6 +29605,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionStarted(token); return S_OK; } @@ -27698,11 +29615,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -27715,6 +29633,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionChanged(token); return S_OK; } @@ -27724,11 +29643,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionEnded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionEnded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionEnded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -27741,6 +29661,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionEnded(token); return S_OK; } @@ -27754,7 +29675,8 @@ struct produce : produce_baseshim().TextReadingOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrder()); return S_OK; } catch (...) @@ -27767,6 +29689,7 @@ struct produce : produce_baseshim()); this->shim().TextReadingOrder(value); return S_OK; } @@ -27780,7 +29703,8 @@ struct produce : produce_baseshim().DesiredCandidateWindowAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredCandidateWindowAlignment()); return S_OK; } catch (...) @@ -27793,6 +29717,7 @@ struct produce : produce_baseshim()); this->shim().DesiredCandidateWindowAlignment(value); return S_OK; } @@ -27802,11 +29727,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_CandidateWindowBoundsChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -27819,6 +29745,7 @@ struct produce : produce_baseshim()); this->shim().CandidateWindowBoundsChanged(token); return S_OK; } @@ -27828,11 +29755,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -27845,6 +29773,7 @@ struct produce : produce_baseshim()); this->shim().TextChanging(token); return S_OK; } @@ -27858,11 +29787,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetLinguisticAlternativesAsync(abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_GetLinguisticAlternativesAsync(impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLinguisticAlternativesAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLinguisticAlternativesAsync()); return S_OK; } catch (...) @@ -27876,7 +29806,8 @@ struct produce : produce_baseshim().ClipboardCopyFormat()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClipboardCopyFormat()); return S_OK; } catch (...) @@ -27889,6 +29820,7 @@ struct produce : produce_baseshim()); this->shim().ClipboardCopyFormat(value); return S_OK; } @@ -27902,11 +29834,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -27921,11 +29854,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_IsReadOnlyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsReadOnlyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsReadOnlyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnlyProperty()); return S_OK; } catch (...) @@ -27935,11 +29869,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_AcceptsReturnProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AcceptsReturnProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcceptsReturnProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptsReturnProperty()); return S_OK; } catch (...) @@ -27949,11 +29884,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_TextAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignmentProperty()); return S_OK; } catch (...) @@ -27963,11 +29899,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_TextWrappingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextWrappingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextWrappingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrappingProperty()); return S_OK; } catch (...) @@ -27977,11 +29914,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_IsSpellCheckEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsSpellCheckEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSpellCheckEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSpellCheckEnabledProperty()); return S_OK; } catch (...) @@ -27991,11 +29929,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_IsTextPredictionEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextPredictionEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextPredictionEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextPredictionEnabledProperty()); return S_OK; } catch (...) @@ -28005,11 +29944,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_InputScopeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_InputScopeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScopeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScopeProperty()); return S_OK; } catch (...) @@ -28023,11 +29963,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -28037,11 +29978,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -28051,11 +29993,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -28065,11 +30008,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_SelectionHighlightColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColorProperty()); return S_OK; } catch (...) @@ -28079,11 +30023,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); return S_OK; } catch (...) @@ -28093,11 +30038,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsColorFontEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsColorFontEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsColorFontEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabledProperty()); return S_OK; } catch (...) @@ -28111,11 +30057,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_DesiredCandidateWindowAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesiredCandidateWindowAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredCandidateWindowAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredCandidateWindowAlignmentProperty()); return S_OK; } catch (...) @@ -28125,11 +30072,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_TextReadingOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextReadingOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextReadingOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrderProperty()); return S_OK; } catch (...) @@ -28143,11 +30091,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_ClipboardCopyFormatProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClipboardCopyFormatProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClipboardCopyFormatProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClipboardCopyFormatProperty()); return S_OK; } catch (...) @@ -28169,7 +30118,8 @@ struct produce : produce_baseshim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -28182,6 +30132,7 @@ struct produce : produce_baseshim()); this->shim().FontSize(value); return S_OK; } @@ -28191,11 +30142,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -28205,10 +30157,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -28218,11 +30171,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -28231,10 +30185,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -28248,7 +30203,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -28261,6 +30217,7 @@ struct produce : produce_baseshim()); this->shim().FontStyle(value); return S_OK; } @@ -28274,7 +30231,8 @@ struct produce : produce_baseshim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -28287,6 +30245,7 @@ struct produce : produce_baseshim()); this->shim().FontStretch(value); return S_OK; } @@ -28296,11 +30255,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -28310,10 +30270,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -28327,7 +30288,8 @@ struct produce : produce_baseshim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -28340,6 +30302,7 @@ struct produce : produce_baseshim()); this->shim().TextWrapping(value); return S_OK; } @@ -28353,7 +30316,8 @@ struct produce : produce_baseshim().TextTrimming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextTrimming()); return S_OK; } catch (...) @@ -28366,6 +30330,7 @@ struct produce : produce_baseshim()); this->shim().TextTrimming(value); return S_OK; } @@ -28379,7 +30344,8 @@ struct produce : produce_baseshim().TextAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignment()); return S_OK; } catch (...) @@ -28392,6 +30358,7 @@ struct produce : produce_baseshim()); this->shim().TextAlignment(value); return S_OK; } @@ -28401,11 +30368,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Blocks(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Blocks()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Blocks()); return S_OK; } catch (...) @@ -28415,11 +30383,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -28428,10 +30397,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -28445,7 +30415,8 @@ struct produce : produce_baseshim().LineHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeight()); return S_OK; } catch (...) @@ -28458,6 +30429,7 @@ struct produce : produce_baseshim()); this->shim().LineHeight(value); return S_OK; } @@ -28471,7 +30443,8 @@ struct produce : produce_baseshim().LineStackingStrategy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategy()); return S_OK; } catch (...) @@ -28484,6 +30457,7 @@ struct produce : produce_baseshim()); this->shim().LineStackingStrategy(value); return S_OK; } @@ -28497,7 +30471,8 @@ struct produce : produce_baseshim().CharacterSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacing()); return S_OK; } catch (...) @@ -28510,6 +30485,7 @@ struct produce : produce_baseshim()); this->shim().CharacterSpacing(value); return S_OK; } @@ -28519,11 +30495,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OverflowContentTarget(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowContentTarget()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentTarget()); return S_OK; } catch (...) @@ -28533,10 +30510,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OverflowContentTarget(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OverflowContentTarget(*reinterpret_cast(&value)); return S_OK; } @@ -28550,7 +30528,8 @@ struct produce : produce_baseshim().IsTextSelectionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSelectionEnabled()); return S_OK; } catch (...) @@ -28563,6 +30542,7 @@ struct produce : produce_baseshim()); this->shim().IsTextSelectionEnabled(value); return S_OK; } @@ -28576,7 +30556,8 @@ struct produce : produce_baseshim().HasOverflowContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasOverflowContent()); return S_OK; } catch (...) @@ -28585,11 +30566,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedText()); return S_OK; } catch (...) @@ -28599,11 +30581,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentStart()); return S_OK; } catch (...) @@ -28613,11 +30596,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentEnd()); return S_OK; } catch (...) @@ -28627,11 +30611,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionStart()); return S_OK; } catch (...) @@ -28641,11 +30626,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionEnd()); return S_OK; } catch (...) @@ -28659,7 +30645,8 @@ struct produce : produce_baseshim().BaselineOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaselineOffset()); return S_OK; } catch (...) @@ -28668,11 +30655,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -28685,6 +30673,7 @@ struct produce : produce_baseshim()); this->shim().SelectionChanged(token); return S_OK; } @@ -28694,11 +30683,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ContextMenuOpening(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -28711,6 +30701,7 @@ struct produce : produce_baseshim()); this->shim().ContextMenuOpening(token); return S_OK; } @@ -28724,6 +30715,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -28733,10 +30725,11 @@ struct produce : produce_base start, abi_arg_in end) noexcept override + HRESULT __stdcall abi_Select(impl::abi_arg_in start, impl::abi_arg_in end) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Select(*reinterpret_cast(&start), *reinterpret_cast(&end)); return S_OK; } @@ -28746,11 +30739,12 @@ struct produce : produce_base point, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPositionFromPoint(impl::abi_arg_in point, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPositionFromPoint(*reinterpret_cast(&point))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPositionFromPoint(*reinterpret_cast(&point))); return S_OK; } catch (...) @@ -28764,7 +30758,8 @@ struct produce : produce_baseshim().Focus(value)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Focus(value)); return S_OK; } catch (...) @@ -28777,7 +30772,8 @@ struct produce : produce_baseshim().TextIndent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextIndent()); return S_OK; } catch (...) @@ -28790,6 +30786,7 @@ struct produce : produce_baseshim()); this->shim().TextIndent(value); return S_OK; } @@ -28807,7 +30804,8 @@ struct produce : produce_baseshim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -28820,6 +30818,7 @@ struct produce : produce_baseshim()); this->shim().MaxLines(value); return S_OK; } @@ -28833,7 +30832,8 @@ struct produce : produce_baseshim().TextLineBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBounds()); return S_OK; } catch (...) @@ -28846,6 +30846,7 @@ struct produce : produce_baseshim()); this->shim().TextLineBounds(value); return S_OK; } @@ -28855,11 +30856,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionHighlightColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColor()); return S_OK; } catch (...) @@ -28869,10 +30871,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectionHighlightColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionHighlightColor(*reinterpret_cast(&value)); return S_OK; } @@ -28886,7 +30889,8 @@ struct produce : produce_baseshim().OpticalMarginAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignment()); return S_OK; } catch (...) @@ -28899,6 +30903,7 @@ struct produce : produce_baseshim()); this->shim().OpticalMarginAlignment(value); return S_OK; } @@ -28912,7 +30917,8 @@ struct produce : produce_baseshim().IsColorFontEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabled()); return S_OK; } catch (...) @@ -28925,6 +30931,7 @@ struct produce : produce_baseshim()); this->shim().IsColorFontEnabled(value); return S_OK; } @@ -28938,7 +30945,8 @@ struct produce : produce_baseshim().TextReadingOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrder()); return S_OK; } catch (...) @@ -28951,6 +30959,7 @@ struct produce : produce_baseshim()); this->shim().TextReadingOrder(value); return S_OK; } @@ -28968,7 +30977,8 @@ struct produce : produce_baseshim().IsTextScaleFactorEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabled()); return S_OK; } catch (...) @@ -28981,6 +30991,7 @@ struct produce : produce_baseshim()); this->shim().IsTextScaleFactorEnabled(value); return S_OK; } @@ -28994,11 +31005,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_OverflowContentTarget(abi_arg_out value) noexcept override + HRESULT __stdcall get_OverflowContentTarget(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowContentTarget()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentTarget()); return S_OK; } catch (...) @@ -29008,10 +31020,11 @@ struct produce : produce } } - HRESULT __stdcall put_OverflowContentTarget(abi_arg_in value) noexcept override + HRESULT __stdcall put_OverflowContentTarget(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OverflowContentTarget(*reinterpret_cast(&value)); return S_OK; } @@ -29021,11 +31034,12 @@ struct produce : produce } } - HRESULT __stdcall get_Padding(abi_arg_out value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -29034,10 +31048,11 @@ struct produce : produce } } - HRESULT __stdcall put_Padding(abi_arg_in value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -29047,11 +31062,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentSource(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentSource()); return S_OK; } catch (...) @@ -29065,7 +31081,8 @@ struct produce : produce { try { - *value = detach(this->shim().HasOverflowContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasOverflowContent()); return S_OK; } catch (...) @@ -29074,11 +31091,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentStart(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentStart()); return S_OK; } catch (...) @@ -29088,11 +31106,12 @@ struct produce : produce } } - HRESULT __stdcall get_ContentEnd(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentEnd()); return S_OK; } catch (...) @@ -29106,7 +31125,8 @@ struct produce : produce { try { - *value = detach(this->shim().BaselineOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaselineOffset()); return S_OK; } catch (...) @@ -29115,11 +31135,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetPositionFromPoint(abi_arg_in point, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetPositionFromPoint(impl::abi_arg_in point, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetPositionFromPoint(*reinterpret_cast(&point))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetPositionFromPoint(*reinterpret_cast(&point))); return S_OK; } catch (...) @@ -29133,7 +31154,8 @@ struct produce : produce { try { - *returnValue = detach(this->shim().Focus(value)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Focus(value)); return S_OK; } catch (...) @@ -29150,7 +31172,8 @@ struct produce : produc { try { - *value = detach(this->shim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -29163,6 +31186,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MaxLines(value); return S_OK; } @@ -29176,11 +31200,12 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall get_OverflowContentTargetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OverflowContentTargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowContentTargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentTargetProperty()); return S_OK; } catch (...) @@ -29190,11 +31215,12 @@ struct produce : } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -29204,11 +31230,12 @@ struct produce : } } - HRESULT __stdcall get_HasOverflowContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HasOverflowContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasOverflowContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasOverflowContentProperty()); return S_OK; } catch (...) @@ -29222,11 +31249,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_MaxLinesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxLinesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLinesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLinesProperty()); return S_OK; } catch (...) @@ -29240,11 +31268,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_FontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSizeProperty()); return S_OK; } catch (...) @@ -29254,11 +31283,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamilyProperty()); return S_OK; } catch (...) @@ -29268,11 +31298,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeightProperty()); return S_OK; } catch (...) @@ -29282,11 +31313,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyleProperty()); return S_OK; } catch (...) @@ -29296,11 +31328,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_FontStretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretchProperty()); return S_OK; } catch (...) @@ -29310,11 +31343,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_ForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundProperty()); return S_OK; } catch (...) @@ -29324,11 +31358,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TextWrappingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextWrappingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextWrappingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrappingProperty()); return S_OK; } catch (...) @@ -29338,11 +31373,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TextTrimmingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextTrimmingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextTrimmingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextTrimmingProperty()); return S_OK; } catch (...) @@ -29352,11 +31388,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TextAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignmentProperty()); return S_OK; } catch (...) @@ -29366,11 +31403,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -29380,11 +31418,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_LineHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeightProperty()); return S_OK; } catch (...) @@ -29394,11 +31433,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_LineStackingStrategyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineStackingStrategyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineStackingStrategyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategyProperty()); return S_OK; } catch (...) @@ -29408,11 +31448,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_CharacterSpacingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CharacterSpacingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacterSpacingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacingProperty()); return S_OK; } catch (...) @@ -29422,11 +31463,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_OverflowContentTargetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OverflowContentTargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OverflowContentTargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OverflowContentTargetProperty()); return S_OK; } catch (...) @@ -29436,11 +31478,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_IsTextSelectionEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextSelectionEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextSelectionEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSelectionEnabledProperty()); return S_OK; } catch (...) @@ -29450,11 +31493,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_HasOverflowContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HasOverflowContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HasOverflowContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HasOverflowContentProperty()); return S_OK; } catch (...) @@ -29464,11 +31508,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_SelectedTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedTextProperty()); return S_OK; } catch (...) @@ -29478,11 +31523,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TextIndentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextIndentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextIndentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextIndentProperty()); return S_OK; } catch (...) @@ -29496,11 +31542,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_MaxLinesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxLinesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLinesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLinesProperty()); return S_OK; } catch (...) @@ -29510,11 +31557,12 @@ struct produce : produce } } - HRESULT __stdcall get_TextLineBoundsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextLineBoundsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLineBoundsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBoundsProperty()); return S_OK; } catch (...) @@ -29524,11 +31572,12 @@ struct produce : produce } } - HRESULT __stdcall get_SelectionHighlightColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColorProperty()); return S_OK; } catch (...) @@ -29538,11 +31587,12 @@ struct produce : produce } } - HRESULT __stdcall get_OpticalMarginAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OpticalMarginAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpticalMarginAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignmentProperty()); return S_OK; } catch (...) @@ -29552,11 +31602,12 @@ struct produce : produce } } - HRESULT __stdcall get_IsColorFontEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsColorFontEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsColorFontEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabledProperty()); return S_OK; } catch (...) @@ -29566,11 +31617,12 @@ struct produce : produce } } - HRESULT __stdcall get_TextReadingOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextReadingOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextReadingOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrderProperty()); return S_OK; } catch (...) @@ -29584,11 +31636,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextScaleFactorEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabledProperty()); return S_OK; } catch (...) @@ -29602,11 +31655,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_Height(abi_arg_out value) noexcept override + HRESULT __stdcall get_Height(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Height()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Height()); return S_OK; } catch (...) @@ -29615,10 +31669,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Height(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Height(*reinterpret_cast(&value)); return S_OK; } @@ -29632,7 +31687,8 @@ struct produce : produce_baseshim().MaxHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxHeight()); return S_OK; } catch (...) @@ -29645,6 +31701,7 @@ struct produce : produce_baseshim()); this->shim().MaxHeight(value); return S_OK; } @@ -29658,7 +31715,8 @@ struct produce : produce_baseshim().MinHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinHeight()); return S_OK; } catch (...) @@ -29671,6 +31729,7 @@ struct produce : produce_baseshim()); this->shim().MinHeight(value); return S_OK; } @@ -29684,7 +31743,8 @@ struct produce : produce_baseshim().ActualHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ActualHeight()); return S_OK; } catch (...) @@ -29697,11 +31757,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeightProperty()); return S_OK; } catch (...) @@ -29711,11 +31772,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MaxHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxHeightProperty()); return S_OK; } catch (...) @@ -29725,11 +31787,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_MinHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinHeightProperty()); return S_OK; } catch (...) @@ -29747,7 +31810,8 @@ struct produce : produc { try { - *value = detach(this->shim().CanVerticallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanVerticallyScroll()); return S_OK; } catch (...) @@ -29760,6 +31824,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().CanVerticallyScroll(value); return S_OK; } @@ -29773,7 +31838,8 @@ struct produce : produc { try { - *value = detach(this->shim().CanHorizontallyScroll()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanHorizontallyScroll()); return S_OK; } catch (...) @@ -29786,6 +31852,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().CanHorizontallyScroll(value); return S_OK; } @@ -29799,7 +31866,8 @@ struct produce : produc { try { - *value = detach(this->shim().ExtentWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentWidth()); return S_OK; } catch (...) @@ -29812,7 +31880,8 @@ struct produce : produc { try { - *value = detach(this->shim().ExtentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentHeight()); return S_OK; } catch (...) @@ -29825,7 +31894,8 @@ struct produce : produc { try { - *value = detach(this->shim().ViewportWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportWidth()); return S_OK; } catch (...) @@ -29838,7 +31908,8 @@ struct produce : produc { try { - *value = detach(this->shim().ViewportHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportHeight()); return S_OK; } catch (...) @@ -29851,7 +31922,8 @@ struct produce : produc { try { - *value = detach(this->shim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -29864,7 +31936,8 @@ struct produce : produc { try { - *value = detach(this->shim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -29873,11 +31946,12 @@ struct produce : produc } } - HRESULT __stdcall get_ScrollOwner(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScrollOwner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollOwner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollOwner()); return S_OK; } catch (...) @@ -29887,11 +31961,12 @@ struct produce : produc } } - HRESULT __stdcall put_ScrollOwner(abi_arg_in value) noexcept override + HRESULT __stdcall put_ScrollOwner(impl::abi_arg_in value) noexcept override { try { - this->shim().ScrollOwner(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().ScrollOwner(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -29904,6 +31979,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().LineUp(); return S_OK; } @@ -29917,6 +31993,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().LineDown(); return S_OK; } @@ -29930,6 +32007,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().LineLeft(); return S_OK; } @@ -29943,6 +32021,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().LineRight(); return S_OK; } @@ -29956,6 +32035,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PageUp(); return S_OK; } @@ -29969,6 +32049,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PageDown(); return S_OK; } @@ -29982,6 +32063,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PageLeft(); return S_OK; } @@ -29995,6 +32077,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().PageRight(); return S_OK; } @@ -30008,6 +32091,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelUp(); return S_OK; } @@ -30021,6 +32105,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelDown(); return S_OK; } @@ -30034,6 +32119,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelLeft(); return S_OK; } @@ -30047,6 +32133,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().MouseWheelRight(); return S_OK; } @@ -30060,6 +32147,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHorizontalOffset(offset); return S_OK; } @@ -30073,6 +32161,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVerticalOffset(offset); return S_OK; } @@ -30082,11 +32171,12 @@ struct produce : produc } } - HRESULT __stdcall abi_MakeVisible(abi_arg_in visual, abi_arg_in rectangle, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_MakeVisible(impl::abi_arg_in visual, impl::abi_arg_in rectangle, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().MakeVisible(*reinterpret_cast(&visual), *reinterpret_cast(&rectangle))); return S_OK; } catch (...) @@ -30103,7 +32193,8 @@ struct produce : produce_baseshim().HorizontalScrollBarVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollBarVisibility()); return S_OK; } catch (...) @@ -30116,6 +32207,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalScrollBarVisibility(value); return S_OK; } @@ -30129,7 +32221,8 @@ struct produce : produce_baseshim().VerticalScrollBarVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollBarVisibility()); return S_OK; } catch (...) @@ -30142,6 +32235,7 @@ struct produce : produce_baseshim()); this->shim().VerticalScrollBarVisibility(value); return S_OK; } @@ -30155,7 +32249,8 @@ struct produce : produce_baseshim().IsHorizontalRailEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHorizontalRailEnabled()); return S_OK; } catch (...) @@ -30168,6 +32263,7 @@ struct produce : produce_baseshim()); this->shim().IsHorizontalRailEnabled(value); return S_OK; } @@ -30181,7 +32277,8 @@ struct produce : produce_baseshim().IsVerticalRailEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVerticalRailEnabled()); return S_OK; } catch (...) @@ -30194,6 +32291,7 @@ struct produce : produce_baseshim()); this->shim().IsVerticalRailEnabled(value); return S_OK; } @@ -30207,7 +32305,8 @@ struct produce : produce_baseshim().IsHorizontalScrollChainingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHorizontalScrollChainingEnabled()); return S_OK; } catch (...) @@ -30220,6 +32319,7 @@ struct produce : produce_baseshim()); this->shim().IsHorizontalScrollChainingEnabled(value); return S_OK; } @@ -30233,7 +32333,8 @@ struct produce : produce_baseshim().IsVerticalScrollChainingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVerticalScrollChainingEnabled()); return S_OK; } catch (...) @@ -30246,6 +32347,7 @@ struct produce : produce_baseshim()); this->shim().IsVerticalScrollChainingEnabled(value); return S_OK; } @@ -30259,7 +32361,8 @@ struct produce : produce_baseshim().IsZoomChainingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomChainingEnabled()); return S_OK; } catch (...) @@ -30272,6 +32375,7 @@ struct produce : produce_baseshim()); this->shim().IsZoomChainingEnabled(value); return S_OK; } @@ -30285,7 +32389,8 @@ struct produce : produce_baseshim().IsScrollInertiaEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsScrollInertiaEnabled()); return S_OK; } catch (...) @@ -30298,6 +32403,7 @@ struct produce : produce_baseshim()); this->shim().IsScrollInertiaEnabled(value); return S_OK; } @@ -30311,7 +32417,8 @@ struct produce : produce_baseshim().IsZoomInertiaEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomInertiaEnabled()); return S_OK; } catch (...) @@ -30324,6 +32431,7 @@ struct produce : produce_baseshim()); this->shim().IsZoomInertiaEnabled(value); return S_OK; } @@ -30337,7 +32445,8 @@ struct produce : produce_baseshim().HorizontalScrollMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollMode()); return S_OK; } catch (...) @@ -30350,6 +32459,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalScrollMode(value); return S_OK; } @@ -30363,7 +32473,8 @@ struct produce : produce_baseshim().VerticalScrollMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollMode()); return S_OK; } catch (...) @@ -30376,6 +32487,7 @@ struct produce : produce_baseshim()); this->shim().VerticalScrollMode(value); return S_OK; } @@ -30389,7 +32501,8 @@ struct produce : produce_baseshim().ZoomMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomMode()); return S_OK; } catch (...) @@ -30402,6 +32515,7 @@ struct produce : produce_baseshim()); this->shim().ZoomMode(value); return S_OK; } @@ -30415,7 +32529,8 @@ struct produce : produce_baseshim().HorizontalSnapPointsAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalSnapPointsAlignment()); return S_OK; } catch (...) @@ -30428,6 +32543,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalSnapPointsAlignment(value); return S_OK; } @@ -30441,7 +32557,8 @@ struct produce : produce_baseshim().VerticalSnapPointsAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalSnapPointsAlignment()); return S_OK; } catch (...) @@ -30454,6 +32571,7 @@ struct produce : produce_baseshim()); this->shim().VerticalSnapPointsAlignment(value); return S_OK; } @@ -30467,7 +32585,8 @@ struct produce : produce_baseshim().HorizontalSnapPointsType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalSnapPointsType()); return S_OK; } catch (...) @@ -30480,6 +32599,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalSnapPointsType(value); return S_OK; } @@ -30493,7 +32613,8 @@ struct produce : produce_baseshim().VerticalSnapPointsType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalSnapPointsType()); return S_OK; } catch (...) @@ -30506,6 +32627,7 @@ struct produce : produce_baseshim()); this->shim().VerticalSnapPointsType(value); return S_OK; } @@ -30519,7 +32641,8 @@ struct produce : produce_baseshim().ZoomSnapPointsType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomSnapPointsType()); return S_OK; } catch (...) @@ -30532,6 +32655,7 @@ struct produce : produce_baseshim()); this->shim().ZoomSnapPointsType(value); return S_OK; } @@ -30545,7 +32669,8 @@ struct produce : produce_baseshim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -30558,7 +32683,8 @@ struct produce : produce_baseshim().ViewportWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportWidth()); return S_OK; } catch (...) @@ -30571,7 +32697,8 @@ struct produce : produce_baseshim().ScrollableWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollableWidth()); return S_OK; } catch (...) @@ -30584,7 +32711,8 @@ struct produce : produce_baseshim().ComputedHorizontalScrollBarVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedHorizontalScrollBarVisibility()); return S_OK; } catch (...) @@ -30597,7 +32725,8 @@ struct produce : produce_baseshim().ExtentWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentWidth()); return S_OK; } catch (...) @@ -30610,7 +32739,8 @@ struct produce : produce_baseshim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -30623,7 +32753,8 @@ struct produce : produce_baseshim().ViewportHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportHeight()); return S_OK; } catch (...) @@ -30636,7 +32767,8 @@ struct produce : produce_baseshim().ScrollableHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollableHeight()); return S_OK; } catch (...) @@ -30649,7 +32781,8 @@ struct produce : produce_baseshim().ComputedVerticalScrollBarVisibility()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedVerticalScrollBarVisibility()); return S_OK; } catch (...) @@ -30662,7 +32795,8 @@ struct produce : produce_baseshim().ExtentHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentHeight()); return S_OK; } catch (...) @@ -30675,7 +32809,8 @@ struct produce : produce_baseshim().MinZoomFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinZoomFactor()); return S_OK; } catch (...) @@ -30688,6 +32823,7 @@ struct produce : produce_baseshim()); this->shim().MinZoomFactor(value); return S_OK; } @@ -30701,7 +32837,8 @@ struct produce : produce_baseshim().MaxZoomFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxZoomFactor()); return S_OK; } catch (...) @@ -30714,6 +32851,7 @@ struct produce : produce_baseshim()); this->shim().MaxZoomFactor(value); return S_OK; } @@ -30727,7 +32865,8 @@ struct produce : produce_baseshim().ZoomFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomFactor()); return S_OK; } catch (...) @@ -30736,11 +32875,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_ZoomSnapPoints(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().ZoomSnapPoints()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomSnapPoints()); return S_OK; } catch (...) @@ -30750,11 +32890,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ViewChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ViewChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ViewChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -30767,6 +32908,7 @@ struct produce : produce_baseshim()); this->shim().ViewChanged(token); return S_OK; } @@ -30780,6 +32922,7 @@ struct produce : produce_baseshim()); this->shim().ScrollToHorizontalOffset(offset); return S_OK; } @@ -30793,6 +32936,7 @@ struct produce : produce_baseshim()); this->shim().ScrollToVerticalOffset(offset); return S_OK; } @@ -30806,6 +32950,7 @@ struct produce : produce_baseshim()); this->shim().ZoomToFactor(factor); return S_OK; } @@ -30819,6 +32964,7 @@ struct produce : produce_baseshim()); this->shim().InvalidateScrollInfo(); return S_OK; } @@ -30832,7 +32978,8 @@ struct produce : produce_baseshim().IsDeferredScrollingEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeferredScrollingEnabled()); return S_OK; } catch (...) @@ -30845,6 +32992,7 @@ struct produce : produce_baseshim()); this->shim().IsDeferredScrollingEnabled(value); return S_OK; } @@ -30858,7 +33006,8 @@ struct produce : produce_baseshim().BringIntoViewOnFocusChange()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BringIntoViewOnFocusChange()); return S_OK; } catch (...) @@ -30871,6 +33020,7 @@ struct produce : produce_baseshim()); this->shim().BringIntoViewOnFocusChange(value); return S_OK; } @@ -30884,11 +33034,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TopLeftHeader(abi_arg_out value) noexcept override + HRESULT __stdcall get_TopLeftHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopLeftHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopLeftHeader()); return S_OK; } catch (...) @@ -30898,10 +33049,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TopLeftHeader(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TopLeftHeader(*reinterpret_cast(&value)); return S_OK; } @@ -30911,11 +33063,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_LeftHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeader()); return S_OK; } catch (...) @@ -30925,10 +33078,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_LeftHeader(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().LeftHeader(*reinterpret_cast(&value)); return S_OK; } @@ -30938,11 +33092,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TopHeader(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopHeader()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopHeader()); return S_OK; } catch (...) @@ -30952,10 +33107,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_TopHeader(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().TopHeader(*reinterpret_cast(&value)); return S_OK; } @@ -30965,11 +33121,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ViewChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ViewChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ViewChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -30982,6 +33139,7 @@ struct produce : produce_baseshim()); this->shim().ViewChanging(token); return S_OK; } @@ -30991,11 +33149,12 @@ struct produce : produce_base> horizontalOffset, abi_arg_in> verticalOffset, abi_arg_in> zoomFactor, bool * returnValue) noexcept override + HRESULT __stdcall abi_ChangeView(impl::abi_arg_in> horizontalOffset, impl::abi_arg_in> verticalOffset, impl::abi_arg_in> zoomFactor, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().ChangeView(*reinterpret_cast *>(&horizontalOffset), *reinterpret_cast *>(&verticalOffset), *reinterpret_cast *>(&zoomFactor))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ChangeView(*reinterpret_cast *>(&horizontalOffset), *reinterpret_cast *>(&verticalOffset), *reinterpret_cast *>(&zoomFactor))); return S_OK; } catch (...) @@ -31004,11 +33163,12 @@ struct produce : produce_base> horizontalOffset, abi_arg_in> verticalOffset, abi_arg_in> zoomFactor, bool disableAnimation, bool * returnValue) noexcept override + HRESULT __stdcall abi_ChangeViewWithOptionalAnimation(impl::abi_arg_in> horizontalOffset, impl::abi_arg_in> verticalOffset, impl::abi_arg_in> zoomFactor, bool disableAnimation, bool * returnValue) noexcept override { try { - *returnValue = detach(this->shim().ChangeView(*reinterpret_cast *>(&horizontalOffset), *reinterpret_cast *>(&verticalOffset), *reinterpret_cast *>(&zoomFactor), disableAnimation)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ChangeView(*reinterpret_cast *>(&horizontalOffset), *reinterpret_cast *>(&verticalOffset), *reinterpret_cast *>(&zoomFactor), disableAnimation)); return S_OK; } catch (...) @@ -31021,11 +33181,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_DirectManipulationStarted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_DirectManipulationStarted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DirectManipulationStarted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DirectManipulationStarted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -31038,6 +33199,7 @@ struct produce : produce_baseshim()); this->shim().DirectManipulationStarted(token); return S_OK; } @@ -31047,11 +33209,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DirectManipulationCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DirectManipulationCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DirectManipulationCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -31064,6 +33227,7 @@ struct produce : produce_baseshim()); this->shim().DirectManipulationCompleted(token); return S_OK; } @@ -31077,11 +33241,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HorizontalSnapPointsAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalSnapPointsAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalSnapPointsAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalSnapPointsAlignmentProperty()); return S_OK; } catch (...) @@ -31091,11 +33256,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalSnapPointsAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalSnapPointsAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalSnapPointsAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalSnapPointsAlignmentProperty()); return S_OK; } catch (...) @@ -31105,11 +33271,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalSnapPointsTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalSnapPointsTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalSnapPointsTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalSnapPointsTypeProperty()); return S_OK; } catch (...) @@ -31119,11 +33286,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalSnapPointsTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalSnapPointsTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalSnapPointsTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalSnapPointsTypeProperty()); return S_OK; } catch (...) @@ -31133,11 +33301,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomSnapPointsTypeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomSnapPointsTypeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomSnapPointsTypeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomSnapPointsTypeProperty()); return S_OK; } catch (...) @@ -31147,11 +33316,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffsetProperty()); return S_OK; } catch (...) @@ -31161,11 +33331,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ViewportWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ViewportWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ViewportWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportWidthProperty()); return S_OK; } catch (...) @@ -31175,11 +33346,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ScrollableWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScrollableWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollableWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollableWidthProperty()); return S_OK; } catch (...) @@ -31189,11 +33361,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ComputedHorizontalScrollBarVisibilityProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ComputedHorizontalScrollBarVisibilityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ComputedHorizontalScrollBarVisibilityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedHorizontalScrollBarVisibilityProperty()); return S_OK; } catch (...) @@ -31203,11 +33376,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ExtentWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtentWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtentWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentWidthProperty()); return S_OK; } catch (...) @@ -31217,11 +33391,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffsetProperty()); return S_OK; } catch (...) @@ -31231,11 +33406,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ViewportHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ViewportHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ViewportHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ViewportHeightProperty()); return S_OK; } catch (...) @@ -31245,11 +33421,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ScrollableHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ScrollableHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ScrollableHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ScrollableHeightProperty()); return S_OK; } catch (...) @@ -31259,11 +33436,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ComputedVerticalScrollBarVisibilityProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ComputedVerticalScrollBarVisibilityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ComputedVerticalScrollBarVisibilityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ComputedVerticalScrollBarVisibilityProperty()); return S_OK; } catch (...) @@ -31273,11 +33451,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ExtentHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExtentHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExtentHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExtentHeightProperty()); return S_OK; } catch (...) @@ -31287,11 +33466,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MinZoomFactorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinZoomFactorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinZoomFactorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinZoomFactorProperty()); return S_OK; } catch (...) @@ -31301,11 +33481,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_MaxZoomFactorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxZoomFactorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxZoomFactorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxZoomFactorProperty()); return S_OK; } catch (...) @@ -31315,11 +33496,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomFactorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomFactorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomFactorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomFactorProperty()); return S_OK; } catch (...) @@ -31329,11 +33511,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomSnapPointsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomSnapPointsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomSnapPointsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomSnapPointsProperty()); return S_OK; } catch (...) @@ -31343,11 +33526,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalScrollBarVisibilityProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalScrollBarVisibilityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalScrollBarVisibilityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollBarVisibilityProperty()); return S_OK; } catch (...) @@ -31357,11 +33541,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetHorizontalScrollBarVisibility(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility * horizontalScrollBarVisibility) noexcept override + HRESULT __stdcall abi_GetHorizontalScrollBarVisibility(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility * horizontalScrollBarVisibility) noexcept override { try { - *horizontalScrollBarVisibility = detach(this->shim().GetHorizontalScrollBarVisibility(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *horizontalScrollBarVisibility = detach_abi(this->shim().GetHorizontalScrollBarVisibility(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31370,10 +33555,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetHorizontalScrollBarVisibility(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility horizontalScrollBarVisibility) noexcept override + HRESULT __stdcall abi_SetHorizontalScrollBarVisibility(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility horizontalScrollBarVisibility) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHorizontalScrollBarVisibility(*reinterpret_cast(&element), horizontalScrollBarVisibility); return S_OK; } @@ -31383,11 +33569,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalScrollBarVisibilityProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalScrollBarVisibilityProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalScrollBarVisibilityProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollBarVisibilityProperty()); return S_OK; } catch (...) @@ -31397,11 +33584,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetVerticalScrollBarVisibility(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility * verticalScrollBarVisibility) noexcept override + HRESULT __stdcall abi_GetVerticalScrollBarVisibility(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility * verticalScrollBarVisibility) noexcept override { try { - *verticalScrollBarVisibility = detach(this->shim().GetVerticalScrollBarVisibility(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *verticalScrollBarVisibility = detach_abi(this->shim().GetVerticalScrollBarVisibility(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31410,10 +33598,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetVerticalScrollBarVisibility(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility verticalScrollBarVisibility) noexcept override + HRESULT __stdcall abi_SetVerticalScrollBarVisibility(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollBarVisibility verticalScrollBarVisibility) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVerticalScrollBarVisibility(*reinterpret_cast(&element), verticalScrollBarVisibility); return S_OK; } @@ -31423,11 +33612,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsHorizontalRailEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsHorizontalRailEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsHorizontalRailEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHorizontalRailEnabledProperty()); return S_OK; } catch (...) @@ -31437,11 +33627,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsHorizontalRailEnabled(abi_arg_in element, bool * isHorizontalRailEnabled) noexcept override + HRESULT __stdcall abi_GetIsHorizontalRailEnabled(impl::abi_arg_in element, bool * isHorizontalRailEnabled) noexcept override { try { - *isHorizontalRailEnabled = detach(this->shim().GetIsHorizontalRailEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isHorizontalRailEnabled = detach_abi(this->shim().GetIsHorizontalRailEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31450,10 +33641,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsHorizontalRailEnabled(abi_arg_in element, bool isHorizontalRailEnabled) noexcept override + HRESULT __stdcall abi_SetIsHorizontalRailEnabled(impl::abi_arg_in element, bool isHorizontalRailEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsHorizontalRailEnabled(*reinterpret_cast(&element), isHorizontalRailEnabled); return S_OK; } @@ -31463,11 +33655,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsVerticalRailEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsVerticalRailEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsVerticalRailEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVerticalRailEnabledProperty()); return S_OK; } catch (...) @@ -31477,11 +33670,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsVerticalRailEnabled(abi_arg_in element, bool * isVerticalRailEnabled) noexcept override + HRESULT __stdcall abi_GetIsVerticalRailEnabled(impl::abi_arg_in element, bool * isVerticalRailEnabled) noexcept override { try { - *isVerticalRailEnabled = detach(this->shim().GetIsVerticalRailEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isVerticalRailEnabled = detach_abi(this->shim().GetIsVerticalRailEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31490,10 +33684,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsVerticalRailEnabled(abi_arg_in element, bool isVerticalRailEnabled) noexcept override + HRESULT __stdcall abi_SetIsVerticalRailEnabled(impl::abi_arg_in element, bool isVerticalRailEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsVerticalRailEnabled(*reinterpret_cast(&element), isVerticalRailEnabled); return S_OK; } @@ -31503,11 +33698,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsHorizontalScrollChainingEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsHorizontalScrollChainingEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsHorizontalScrollChainingEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsHorizontalScrollChainingEnabledProperty()); return S_OK; } catch (...) @@ -31517,11 +33713,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsHorizontalScrollChainingEnabled(abi_arg_in element, bool * isHorizontalScrollChainingEnabled) noexcept override + HRESULT __stdcall abi_GetIsHorizontalScrollChainingEnabled(impl::abi_arg_in element, bool * isHorizontalScrollChainingEnabled) noexcept override { try { - *isHorizontalScrollChainingEnabled = detach(this->shim().GetIsHorizontalScrollChainingEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isHorizontalScrollChainingEnabled = detach_abi(this->shim().GetIsHorizontalScrollChainingEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31530,10 +33727,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsHorizontalScrollChainingEnabled(abi_arg_in element, bool isHorizontalScrollChainingEnabled) noexcept override + HRESULT __stdcall abi_SetIsHorizontalScrollChainingEnabled(impl::abi_arg_in element, bool isHorizontalScrollChainingEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsHorizontalScrollChainingEnabled(*reinterpret_cast(&element), isHorizontalScrollChainingEnabled); return S_OK; } @@ -31543,11 +33741,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsVerticalScrollChainingEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsVerticalScrollChainingEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsVerticalScrollChainingEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVerticalScrollChainingEnabledProperty()); return S_OK; } catch (...) @@ -31557,11 +33756,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsVerticalScrollChainingEnabled(abi_arg_in element, bool * isVerticalScrollChainingEnabled) noexcept override + HRESULT __stdcall abi_GetIsVerticalScrollChainingEnabled(impl::abi_arg_in element, bool * isVerticalScrollChainingEnabled) noexcept override { try { - *isVerticalScrollChainingEnabled = detach(this->shim().GetIsVerticalScrollChainingEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isVerticalScrollChainingEnabled = detach_abi(this->shim().GetIsVerticalScrollChainingEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31570,10 +33770,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsVerticalScrollChainingEnabled(abi_arg_in element, bool isVerticalScrollChainingEnabled) noexcept override + HRESULT __stdcall abi_SetIsVerticalScrollChainingEnabled(impl::abi_arg_in element, bool isVerticalScrollChainingEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsVerticalScrollChainingEnabled(*reinterpret_cast(&element), isVerticalScrollChainingEnabled); return S_OK; } @@ -31583,11 +33784,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsZoomChainingEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomChainingEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomChainingEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomChainingEnabledProperty()); return S_OK; } catch (...) @@ -31597,11 +33799,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsZoomChainingEnabled(abi_arg_in element, bool * isZoomChainingEnabled) noexcept override + HRESULT __stdcall abi_GetIsZoomChainingEnabled(impl::abi_arg_in element, bool * isZoomChainingEnabled) noexcept override { try { - *isZoomChainingEnabled = detach(this->shim().GetIsZoomChainingEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isZoomChainingEnabled = detach_abi(this->shim().GetIsZoomChainingEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31610,10 +33813,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsZoomChainingEnabled(abi_arg_in element, bool isZoomChainingEnabled) noexcept override + HRESULT __stdcall abi_SetIsZoomChainingEnabled(impl::abi_arg_in element, bool isZoomChainingEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsZoomChainingEnabled(*reinterpret_cast(&element), isZoomChainingEnabled); return S_OK; } @@ -31623,11 +33827,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsScrollInertiaEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsScrollInertiaEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsScrollInertiaEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsScrollInertiaEnabledProperty()); return S_OK; } catch (...) @@ -31637,11 +33842,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsScrollInertiaEnabled(abi_arg_in element, bool * isScrollInertiaEnabled) noexcept override + HRESULT __stdcall abi_GetIsScrollInertiaEnabled(impl::abi_arg_in element, bool * isScrollInertiaEnabled) noexcept override { try { - *isScrollInertiaEnabled = detach(this->shim().GetIsScrollInertiaEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isScrollInertiaEnabled = detach_abi(this->shim().GetIsScrollInertiaEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31650,10 +33856,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsScrollInertiaEnabled(abi_arg_in element, bool isScrollInertiaEnabled) noexcept override + HRESULT __stdcall abi_SetIsScrollInertiaEnabled(impl::abi_arg_in element, bool isScrollInertiaEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsScrollInertiaEnabled(*reinterpret_cast(&element), isScrollInertiaEnabled); return S_OK; } @@ -31663,11 +33870,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsZoomInertiaEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomInertiaEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomInertiaEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomInertiaEnabledProperty()); return S_OK; } catch (...) @@ -31677,11 +33885,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsZoomInertiaEnabled(abi_arg_in element, bool * isZoomInertiaEnabled) noexcept override + HRESULT __stdcall abi_GetIsZoomInertiaEnabled(impl::abi_arg_in element, bool * isZoomInertiaEnabled) noexcept override { try { - *isZoomInertiaEnabled = detach(this->shim().GetIsZoomInertiaEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isZoomInertiaEnabled = detach_abi(this->shim().GetIsZoomInertiaEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31690,10 +33899,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsZoomInertiaEnabled(abi_arg_in element, bool isZoomInertiaEnabled) noexcept override + HRESULT __stdcall abi_SetIsZoomInertiaEnabled(impl::abi_arg_in element, bool isZoomInertiaEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsZoomInertiaEnabled(*reinterpret_cast(&element), isZoomInertiaEnabled); return S_OK; } @@ -31703,11 +33913,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HorizontalScrollModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalScrollModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalScrollModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalScrollModeProperty()); return S_OK; } catch (...) @@ -31717,11 +33928,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetHorizontalScrollMode(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode * horizontalScrollMode) noexcept override + HRESULT __stdcall abi_GetHorizontalScrollMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode * horizontalScrollMode) noexcept override { try { - *horizontalScrollMode = detach(this->shim().GetHorizontalScrollMode(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *horizontalScrollMode = detach_abi(this->shim().GetHorizontalScrollMode(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31730,10 +33942,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetHorizontalScrollMode(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode horizontalScrollMode) noexcept override + HRESULT __stdcall abi_SetHorizontalScrollMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode horizontalScrollMode) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetHorizontalScrollMode(*reinterpret_cast(&element), horizontalScrollMode); return S_OK; } @@ -31743,11 +33956,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_VerticalScrollModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalScrollModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalScrollModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalScrollModeProperty()); return S_OK; } catch (...) @@ -31757,11 +33971,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetVerticalScrollMode(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode * verticalScrollMode) noexcept override + HRESULT __stdcall abi_GetVerticalScrollMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode * verticalScrollMode) noexcept override { try { - *verticalScrollMode = detach(this->shim().GetVerticalScrollMode(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *verticalScrollMode = detach_abi(this->shim().GetVerticalScrollMode(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31770,10 +33985,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetVerticalScrollMode(abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode verticalScrollMode) noexcept override + HRESULT __stdcall abi_SetVerticalScrollMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ScrollMode verticalScrollMode) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVerticalScrollMode(*reinterpret_cast(&element), verticalScrollMode); return S_OK; } @@ -31783,11 +33999,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomModeProperty()); return S_OK; } catch (...) @@ -31797,11 +34014,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetZoomMode(abi_arg_in element, Windows::UI::Xaml::Controls::ZoomMode * zoomMode) noexcept override + HRESULT __stdcall abi_GetZoomMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ZoomMode * zoomMode) noexcept override { try { - *zoomMode = detach(this->shim().GetZoomMode(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *zoomMode = detach_abi(this->shim().GetZoomMode(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31810,10 +34028,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetZoomMode(abi_arg_in element, Windows::UI::Xaml::Controls::ZoomMode zoomMode) noexcept override + HRESULT __stdcall abi_SetZoomMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::ZoomMode zoomMode) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetZoomMode(*reinterpret_cast(&element), zoomMode); return S_OK; } @@ -31823,11 +34042,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsDeferredScrollingEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsDeferredScrollingEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDeferredScrollingEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDeferredScrollingEnabledProperty()); return S_OK; } catch (...) @@ -31837,11 +34057,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetIsDeferredScrollingEnabled(abi_arg_in element, bool * isDeferredScrollingEnabled) noexcept override + HRESULT __stdcall abi_GetIsDeferredScrollingEnabled(impl::abi_arg_in element, bool * isDeferredScrollingEnabled) noexcept override { try { - *isDeferredScrollingEnabled = detach(this->shim().GetIsDeferredScrollingEnabled(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *isDeferredScrollingEnabled = detach_abi(this->shim().GetIsDeferredScrollingEnabled(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31850,10 +34071,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetIsDeferredScrollingEnabled(abi_arg_in element, bool isDeferredScrollingEnabled) noexcept override + HRESULT __stdcall abi_SetIsDeferredScrollingEnabled(impl::abi_arg_in element, bool isDeferredScrollingEnabled) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetIsDeferredScrollingEnabled(*reinterpret_cast(&element), isDeferredScrollingEnabled); return S_OK; } @@ -31863,11 +34085,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_BringIntoViewOnFocusChangeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BringIntoViewOnFocusChangeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BringIntoViewOnFocusChangeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BringIntoViewOnFocusChangeProperty()); return S_OK; } catch (...) @@ -31877,11 +34100,12 @@ struct produce : produce_b } } - HRESULT __stdcall abi_GetBringIntoViewOnFocusChange(abi_arg_in element, bool * bringIntoViewOnFocusChange) noexcept override + HRESULT __stdcall abi_GetBringIntoViewOnFocusChange(impl::abi_arg_in element, bool * bringIntoViewOnFocusChange) noexcept override { try { - *bringIntoViewOnFocusChange = detach(this->shim().GetBringIntoViewOnFocusChange(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *bringIntoViewOnFocusChange = detach_abi(this->shim().GetBringIntoViewOnFocusChange(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -31890,10 +34114,11 @@ struct produce : produce_b } } - HRESULT __stdcall abi_SetBringIntoViewOnFocusChange(abi_arg_in element, bool bringIntoViewOnFocusChange) noexcept override + HRESULT __stdcall abi_SetBringIntoViewOnFocusChange(impl::abi_arg_in element, bool bringIntoViewOnFocusChange) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetBringIntoViewOnFocusChange(*reinterpret_cast(&element), bringIntoViewOnFocusChange); return S_OK; } @@ -31907,11 +34132,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_TopLeftHeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TopLeftHeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopLeftHeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopLeftHeaderProperty()); return S_OK; } catch (...) @@ -31921,11 +34147,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_LeftHeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LeftHeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LeftHeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LeftHeaderProperty()); return S_OK; } catch (...) @@ -31935,11 +34162,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_TopHeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TopHeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TopHeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TopHeaderProperty()); return S_OK; } catch (...) @@ -31957,7 +34185,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -31970,7 +34199,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -31983,7 +34213,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().ZoomFactor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomFactor()); return S_OK; } catch (...) @@ -32000,7 +34231,8 @@ struct produceshim().IsIntermediate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIntermediate()); return S_OK; } catch (...) @@ -32013,11 +34245,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_NextView(abi_arg_out value) noexcept override + HRESULT __stdcall get_NextView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NextView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NextView()); return S_OK; } catch (...) @@ -32027,11 +34260,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_FinalView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FinalView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FinalView()); return S_OK; } catch (...) @@ -32045,7 +34279,8 @@ struct produceshim().IsInertial()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsInertial()); return S_OK; } catch (...) @@ -32062,7 +34297,8 @@ struct produce : produce_baseshim().SearchHistoryEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryEnabled()); return S_OK; } catch (...) @@ -32075,6 +34311,7 @@ struct produce : produce_baseshim()); this->shim().SearchHistoryEnabled(value); return S_OK; } @@ -32084,11 +34321,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SearchHistoryContext(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchHistoryContext()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryContext()); return S_OK; } catch (...) @@ -32098,10 +34336,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SearchHistoryContext(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SearchHistoryContext(*reinterpret_cast(&value)); return S_OK; } @@ -32111,11 +34350,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -32125,10 +34365,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -32138,11 +34379,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -32152,10 +34394,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_QueryText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().QueryText(*reinterpret_cast(&value)); return S_OK; } @@ -32169,7 +34412,8 @@ struct produce : produce_baseshim().FocusOnKeyboardInput()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusOnKeyboardInput()); return S_OK; } catch (...) @@ -32182,6 +34426,7 @@ struct produce : produce_baseshim()); this->shim().FocusOnKeyboardInput(value); return S_OK; } @@ -32195,7 +34440,8 @@ struct produce : produce_baseshim().ChooseSuggestionOnEnter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChooseSuggestionOnEnter()); return S_OK; } catch (...) @@ -32208,6 +34454,7 @@ struct produce : produce_baseshim()); this->shim().ChooseSuggestionOnEnter(value); return S_OK; } @@ -32217,11 +34464,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_QueryChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().QueryChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QueryChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -32234,6 +34482,7 @@ struct produce : produce_baseshim()); this->shim().QueryChanged(token); return S_OK; } @@ -32243,11 +34492,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_SuggestionsRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().SuggestionsRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SuggestionsRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -32260,6 +34510,7 @@ struct produce : produce_baseshim()); this->shim().SuggestionsRequested(token); return S_OK; } @@ -32269,11 +34520,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_QuerySubmitted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().QuerySubmitted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().QuerySubmitted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -32286,6 +34538,7 @@ struct produce : produce_baseshim()); this->shim().QuerySubmitted(token); return S_OK; } @@ -32295,11 +34548,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ResultSuggestionChosen(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ResultSuggestionChosen(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ResultSuggestionChosen(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -32312,6 +34566,7 @@ struct produce : produce_baseshim()); this->shim().ResultSuggestionChosen(token); return S_OK; } @@ -32321,11 +34576,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PrepareForFocusOnKeyboardInput(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PrepareForFocusOnKeyboardInput(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PrepareForFocusOnKeyboardInput(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -32338,6 +34594,7 @@ struct produce : produce_baseshim()); this->shim().PrepareForFocusOnKeyboardInput(token); return S_OK; } @@ -32347,10 +34604,11 @@ struct produce : produce_base settings) noexcept override + HRESULT __stdcall abi_SetLocalContentSuggestionSettings(impl::abi_arg_in settings) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetLocalContentSuggestionSettings(*reinterpret_cast(&settings)); return S_OK; } @@ -32364,11 +34622,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -32383,11 +34642,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -32397,11 +34657,12 @@ struct produce } } - HRESULT __stdcall get_Language(abi_arg_out value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -32411,11 +34672,12 @@ struct produce } } - HRESULT __stdcall get_LinguisticDetails(abi_arg_out value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -32429,11 +34691,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -32443,11 +34706,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -32457,11 +34721,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -32475,7 +34740,8 @@ struct produceshim().KeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyModifiers()); return S_OK; } catch (...) @@ -32488,11 +34754,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Tag(abi_arg_out value) noexcept override + HRESULT __stdcall get_Tag(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Tag()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Tag()); return S_OK; } catch (...) @@ -32506,7 +34773,8 @@ struct produceshim().KeyModifiers()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().KeyModifiers()); return S_OK; } catch (...) @@ -32519,11 +34787,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_SearchHistoryEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SearchHistoryEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchHistoryEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryEnabledProperty()); return S_OK; } catch (...) @@ -32533,11 +34802,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SearchHistoryContextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SearchHistoryContextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SearchHistoryContextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SearchHistoryContextProperty()); return S_OK; } catch (...) @@ -32547,11 +34817,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -32561,11 +34832,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_QueryTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryTextProperty()); return S_OK; } catch (...) @@ -32575,11 +34847,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FocusOnKeyboardInputProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FocusOnKeyboardInputProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FocusOnKeyboardInputProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FocusOnKeyboardInputProperty()); return S_OK; } catch (...) @@ -32589,11 +34862,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ChooseSuggestionOnEnterProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ChooseSuggestionOnEnterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ChooseSuggestionOnEnterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ChooseSuggestionOnEnterProperty()); return S_OK; } catch (...) @@ -32607,11 +34881,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_QueryText(abi_arg_out value) noexcept override + HRESULT __stdcall get_QueryText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().QueryText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().QueryText()); return S_OK; } catch (...) @@ -32621,11 +34896,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Language(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Language()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Language()); return S_OK; } catch (...) @@ -32635,11 +34911,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_LinguisticDetails(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LinguisticDetails()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LinguisticDetails()); return S_OK; } catch (...) @@ -32649,11 +34926,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Request(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Request()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Request()); return S_OK; } catch (...) @@ -32667,11 +34945,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AddedSections(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AddedSections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddedSections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddedSections()); return S_OK; } catch (...) @@ -32681,11 +34960,12 @@ struct produce } } - HRESULT __stdcall get_RemovedSections(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemovedSections(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemovedSections()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedSections()); return S_OK; } catch (...) @@ -32703,11 +34983,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_AddedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AddedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AddedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AddedItems()); return S_OK; } catch (...) @@ -32717,11 +34998,12 @@ struct produce : pro } } - HRESULT __stdcall get_RemovedItems(abi_arg_out> value) noexcept override + HRESULT __stdcall get_RemovedItems(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().RemovedItems()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RemovedItems()); return S_OK; } catch (...) @@ -32735,11 +35017,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithRemovedItemsAndAddedItems(abi_arg_in> removedItems, abi_arg_in> addedItems, abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithRemovedItemsAndAddedItems(impl::abi_arg_in> removedItems, impl::abi_arg_in> addedItems, impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithRemovedItemsAndAddedItems(*reinterpret_cast *>(&removedItems), *reinterpret_cast *>(&addedItems), *reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithRemovedItemsAndAddedItems(*reinterpret_cast *>(&removedItems), *reinterpret_cast *>(&addedItems), *reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -32754,11 +35037,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_ZoomedInView(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomedInView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomedInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomedInView()); return S_OK; } catch (...) @@ -32768,10 +35052,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ZoomedInView(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomedInView(*reinterpret_cast(&value)); return S_OK; } @@ -32781,11 +35066,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ZoomedOutView(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomedOutView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomedOutView()); return S_OK; } catch (...) @@ -32795,10 +35081,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ZoomedOutView(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ZoomedOutView(*reinterpret_cast(&value)); return S_OK; } @@ -32812,7 +35099,8 @@ struct produce : produce_baseshim().IsZoomedInViewActive()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomedInViewActive()); return S_OK; } catch (...) @@ -32825,6 +35113,7 @@ struct produce : produce_baseshim()); this->shim().IsZoomedInViewActive(value); return S_OK; } @@ -32838,7 +35127,8 @@ struct produce : produce_baseshim().CanChangeViews()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanChangeViews()); return S_OK; } catch (...) @@ -32851,6 +35141,7 @@ struct produce : produce_baseshim()); this->shim().CanChangeViews(value); return S_OK; } @@ -32860,11 +35151,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ViewChangeStarted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ViewChangeStarted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ViewChangeStarted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -32877,6 +35169,7 @@ struct produce : produce_baseshim()); this->shim().ViewChangeStarted(token); return S_OK; } @@ -32886,11 +35179,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ViewChangeCompleted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ViewChangeCompleted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ViewChangeCompleted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -32903,6 +35197,7 @@ struct produce : produce_baseshim()); this->shim().ViewChangeCompleted(token); return S_OK; } @@ -32916,6 +35211,7 @@ struct produce : produce_baseshim()); this->shim().ToggleActiveView(); return S_OK; } @@ -32929,7 +35225,8 @@ struct produce : produce_baseshim().IsZoomOutButtonEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomOutButtonEnabled()); return S_OK; } catch (...) @@ -32942,6 +35239,7 @@ struct produce : produce_baseshim()); this->shim().IsZoomOutButtonEnabled(value); return S_OK; } @@ -32955,11 +35253,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SemanticZoomOwner(abi_arg_out value) noexcept override + HRESULT __stdcall get_SemanticZoomOwner(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SemanticZoomOwner()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SemanticZoomOwner()); return S_OK; } catch (...) @@ -32969,10 +35268,11 @@ struct produce : produ } } - HRESULT __stdcall put_SemanticZoomOwner(abi_arg_in value) noexcept override + HRESULT __stdcall put_SemanticZoomOwner(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SemanticZoomOwner(*reinterpret_cast(&value)); return S_OK; } @@ -32986,7 +35286,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsActiveView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsActiveView()); return S_OK; } catch (...) @@ -32999,6 +35300,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsActiveView(value); return S_OK; } @@ -33012,7 +35314,8 @@ struct produce : produ { try { - *value = detach(this->shim().IsZoomedInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomedInView()); return S_OK; } catch (...) @@ -33025,6 +35328,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsZoomedInView(value); return S_OK; } @@ -33038,6 +35342,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().InitializeViewChange(); return S_OK; } @@ -33051,6 +35356,7 @@ struct produce : produ { try { + typename D::abi_guard guard(this->shim()); this->shim().CompleteViewChange(); return S_OK; } @@ -33060,10 +35366,11 @@ struct produce : produ } } - HRESULT __stdcall abi_MakeVisible(abi_arg_in item) noexcept override + HRESULT __stdcall abi_MakeVisible(impl::abi_arg_in item) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().MakeVisible(*reinterpret_cast(&item)); return S_OK; } @@ -33073,10 +35380,11 @@ struct produce : produ } } - HRESULT __stdcall abi_StartViewChangeFrom(abi_arg_in source, abi_arg_in destination) noexcept override + HRESULT __stdcall abi_StartViewChangeFrom(impl::abi_arg_in source, impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartViewChangeFrom(*reinterpret_cast(&source), *reinterpret_cast(&destination)); return S_OK; } @@ -33086,10 +35394,11 @@ struct produce : produ } } - HRESULT __stdcall abi_StartViewChangeTo(abi_arg_in source, abi_arg_in destination) noexcept override + HRESULT __stdcall abi_StartViewChangeTo(impl::abi_arg_in source, impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().StartViewChangeTo(*reinterpret_cast(&source), *reinterpret_cast(&destination)); return S_OK; } @@ -33099,10 +35408,11 @@ struct produce : produ } } - HRESULT __stdcall abi_CompleteViewChangeFrom(abi_arg_in source, abi_arg_in destination) noexcept override + HRESULT __stdcall abi_CompleteViewChangeFrom(impl::abi_arg_in source, impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompleteViewChangeFrom(*reinterpret_cast(&source), *reinterpret_cast(&destination)); return S_OK; } @@ -33112,10 +35422,11 @@ struct produce : produ } } - HRESULT __stdcall abi_CompleteViewChangeTo(abi_arg_in source, abi_arg_in destination) noexcept override + HRESULT __stdcall abi_CompleteViewChangeTo(impl::abi_arg_in source, impl::abi_arg_in destination) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CompleteViewChangeTo(*reinterpret_cast(&source), *reinterpret_cast(&destination)); return S_OK; } @@ -33129,11 +35440,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_Item(abi_arg_out value) noexcept override + HRESULT __stdcall get_Item(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Item()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Item()); return S_OK; } catch (...) @@ -33143,11 +35455,12 @@ struct produce : produce_ } } - HRESULT __stdcall put_Item(abi_arg_in value) noexcept override + HRESULT __stdcall put_Item(impl::abi_arg_in value) noexcept override { try { - this->shim().Item(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Item(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -33156,11 +35469,12 @@ struct produce : produce_ } } - HRESULT __stdcall get_Bounds(abi_arg_out value) noexcept override + HRESULT __stdcall get_Bounds(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Bounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Bounds()); return S_OK; } catch (...) @@ -33169,10 +35483,11 @@ struct produce : produce_ } } - HRESULT __stdcall put_Bounds(abi_arg_in value) noexcept override + HRESULT __stdcall put_Bounds(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return S_OK; } @@ -33186,11 +35501,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall get_ZoomedInViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomedInViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomedInViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomedInViewProperty()); return S_OK; } catch (...) @@ -33200,11 +35516,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_ZoomedOutViewProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ZoomedOutViewProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ZoomedOutViewProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ZoomedOutViewProperty()); return S_OK; } catch (...) @@ -33214,11 +35531,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsZoomedInViewActiveProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomedInViewActiveProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomedInViewActiveProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomedInViewActiveProperty()); return S_OK; } catch (...) @@ -33228,11 +35546,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_CanChangeViewsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanChangeViewsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanChangeViewsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanChangeViewsProperty()); return S_OK; } catch (...) @@ -33242,11 +35561,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_IsZoomOutButtonEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsZoomOutButtonEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsZoomOutButtonEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsZoomOutButtonEnabledProperty()); return S_OK; } catch (...) @@ -33264,7 +35584,8 @@ struct produceshim().IsSourceZoomedInView()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSourceZoomedInView()); return S_OK; } catch (...) @@ -33277,6 +35598,7 @@ struct produceshim()); this->shim().IsSourceZoomedInView(value); return S_OK; } @@ -33286,11 +35608,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_SourceItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceItem()); return S_OK; } catch (...) @@ -33300,10 +35623,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_SourceItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceItem(*reinterpret_cast(&value)); return S_OK; } @@ -33313,11 +35637,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_DestinationItem(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DestinationItem()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DestinationItem()); return S_OK; } catch (...) @@ -33327,10 +35652,11 @@ struct produce value) noexcept override + HRESULT __stdcall put_DestinationItem(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DestinationItem(*reinterpret_cast(&value)); return S_OK; } @@ -33344,11 +35670,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Title(abi_arg_out value) noexcept override + HRESULT __stdcall get_Title(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Title()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Title()); return S_OK; } catch (...) @@ -33358,10 +35685,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Title(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return S_OK; } @@ -33371,11 +35699,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderBackground()); return S_OK; } catch (...) @@ -33385,10 +35714,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderBackground(*reinterpret_cast(&value)); return S_OK; } @@ -33398,11 +35728,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderForeground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderForeground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderForeground()); return S_OK; } catch (...) @@ -33412,10 +35743,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderForeground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderForeground(*reinterpret_cast(&value)); return S_OK; } @@ -33425,11 +35757,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IconSource(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconSource()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconSource()); return S_OK; } catch (...) @@ -33439,10 +35772,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_IconSource(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().IconSource(*reinterpret_cast(&value)); return S_OK; } @@ -33452,11 +35786,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -33466,11 +35801,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_BackClick(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().BackClick(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().BackClick(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -33483,6 +35819,7 @@ struct produce : produce_baseshim()); this->shim().BackClick(token); return S_OK; } @@ -33496,6 +35833,7 @@ struct produce : produce_baseshim()); this->shim().Show(); return S_OK; } @@ -33509,6 +35847,7 @@ struct produce : produce_baseshim()); this->shim().ShowIndependent(); return S_OK; } @@ -33522,6 +35861,7 @@ struct produce : produce_baseshim()); this->shim().Hide(); return S_OK; } @@ -33535,11 +35875,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -33554,11 +35895,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_TitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TitleProperty()); return S_OK; } catch (...) @@ -33568,11 +35910,12 @@ struct produce : produce } } - HRESULT __stdcall get_HeaderBackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderBackgroundProperty()); return S_OK; } catch (...) @@ -33582,11 +35925,12 @@ struct produce : produce } } - HRESULT __stdcall get_HeaderForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderForegroundProperty()); return S_OK; } catch (...) @@ -33596,11 +35940,12 @@ struct produce : produce } } - HRESULT __stdcall get_IconSourceProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IconSourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IconSourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IconSourceProperty()); return S_OK; } catch (...) @@ -33618,7 +35963,8 @@ struct produce : produce_baseshim().IntermediateValue()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateValue()); return S_OK; } catch (...) @@ -33631,6 +35977,7 @@ struct produce : produce_baseshim()); this->shim().IntermediateValue(value); return S_OK; } @@ -33644,7 +35991,8 @@ struct produce : produce_baseshim().StepFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StepFrequency()); return S_OK; } catch (...) @@ -33657,6 +36005,7 @@ struct produce : produce_baseshim()); this->shim().StepFrequency(value); return S_OK; } @@ -33670,7 +36019,8 @@ struct produce : produce_baseshim().SnapsTo()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SnapsTo()); return S_OK; } catch (...) @@ -33683,6 +36033,7 @@ struct produce : produce_baseshim()); this->shim().SnapsTo(value); return S_OK; } @@ -33696,7 +36047,8 @@ struct produce : produce_baseshim().TickFrequency()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TickFrequency()); return S_OK; } catch (...) @@ -33709,6 +36061,7 @@ struct produce : produce_baseshim()); this->shim().TickFrequency(value); return S_OK; } @@ -33722,7 +36075,8 @@ struct produce : produce_baseshim().TickPlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TickPlacement()); return S_OK; } catch (...) @@ -33735,6 +36089,7 @@ struct produce : produce_baseshim()); this->shim().TickPlacement(value); return S_OK; } @@ -33748,7 +36103,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -33761,6 +36117,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -33774,7 +36131,8 @@ struct produce : produce_baseshim().IsDirectionReversed()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDirectionReversed()); return S_OK; } catch (...) @@ -33787,6 +36145,7 @@ struct produce : produce_baseshim()); this->shim().IsDirectionReversed(value); return S_OK; } @@ -33800,7 +36159,8 @@ struct produce : produce_baseshim().IsThumbToolTipEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsThumbToolTipEnabled()); return S_OK; } catch (...) @@ -33813,6 +36173,7 @@ struct produce : produce_baseshim()); this->shim().IsThumbToolTipEnabled(value); return S_OK; } @@ -33822,11 +36183,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ThumbToolTipValueConverter(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ThumbToolTipValueConverter()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbToolTipValueConverter()); return S_OK; } catch (...) @@ -33836,10 +36198,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ThumbToolTipValueConverter(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ThumbToolTipValueConverter(*reinterpret_cast(&value)); return S_OK; } @@ -33853,11 +36216,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -33867,11 +36231,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -33880,11 +36245,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -33894,10 +36260,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -33911,11 +36278,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -33930,11 +36298,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_IntermediateValueProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IntermediateValueProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IntermediateValueProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IntermediateValueProperty()); return S_OK; } catch (...) @@ -33944,11 +36313,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StepFrequencyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StepFrequencyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StepFrequencyProperty()); return S_OK; } catch (...) @@ -33958,11 +36328,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SnapsToProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SnapsToProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SnapsToProperty()); return S_OK; } catch (...) @@ -33972,11 +36343,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TickFrequencyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TickFrequencyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TickFrequencyProperty()); return S_OK; } catch (...) @@ -33986,11 +36358,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TickPlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TickPlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TickPlacementProperty()); return S_OK; } catch (...) @@ -34000,11 +36373,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -34014,11 +36388,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsDirectionReversedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsDirectionReversedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsDirectionReversedProperty()); return S_OK; } catch (...) @@ -34028,11 +36403,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsThumbToolTipEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsThumbToolTipEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsThumbToolTipEnabledProperty()); return S_OK; } catch (...) @@ -34042,11 +36418,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ThumbToolTipValueConverterProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ThumbToolTipValueConverterProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ThumbToolTipValueConverterProperty()); return S_OK; } catch (...) @@ -34060,11 +36437,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -34074,11 +36452,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -34092,11 +36471,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -34106,10 +36486,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return S_OK; } @@ -34119,11 +36500,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Pane(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Pane()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Pane()); return S_OK; } catch (...) @@ -34133,10 +36515,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Pane(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Pane(*reinterpret_cast(&value)); return S_OK; } @@ -34150,7 +36533,8 @@ struct produce : produce_baseshim().IsPaneOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaneOpen()); return S_OK; } catch (...) @@ -34163,6 +36547,7 @@ struct produce : produce_baseshim()); this->shim().IsPaneOpen(value); return S_OK; } @@ -34176,7 +36561,8 @@ struct produce : produce_baseshim().OpenPaneLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenPaneLength()); return S_OK; } catch (...) @@ -34189,6 +36575,7 @@ struct produce : produce_baseshim()); this->shim().OpenPaneLength(value); return S_OK; } @@ -34202,7 +36589,8 @@ struct produce : produce_baseshim().CompactPaneLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompactPaneLength()); return S_OK; } catch (...) @@ -34215,6 +36603,7 @@ struct produce : produce_baseshim()); this->shim().CompactPaneLength(value); return S_OK; } @@ -34228,7 +36617,8 @@ struct produce : produce_baseshim().PanePlacement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PanePlacement()); return S_OK; } catch (...) @@ -34241,6 +36631,7 @@ struct produce : produce_baseshim()); this->shim().PanePlacement(value); return S_OK; } @@ -34254,7 +36645,8 @@ struct produce : produce_baseshim().DisplayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayMode()); return S_OK; } catch (...) @@ -34267,6 +36659,7 @@ struct produce : produce_baseshim()); this->shim().DisplayMode(value); return S_OK; } @@ -34276,11 +36669,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -34290,11 +36684,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PaneBackground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaneBackground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaneBackground()); return S_OK; } catch (...) @@ -34304,10 +36699,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PaneBackground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PaneBackground(*reinterpret_cast(&value)); return S_OK; } @@ -34317,11 +36713,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PaneClosing(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PaneClosing(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PaneClosing(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -34334,6 +36731,7 @@ struct produce : produce_baseshim()); this->shim().PaneClosing(token); return S_OK; } @@ -34343,11 +36741,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PaneClosed(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PaneClosed(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PaneClosed(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -34360,6 +36759,7 @@ struct produce : produce_baseshim()); this->shim().PaneClosed(token); return S_OK; } @@ -34377,7 +36777,8 @@ struct produce : produce_baseshim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -34390,6 +36791,7 @@ struct produce : produce_baseshim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -34403,11 +36805,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -34426,7 +36829,8 @@ struct produce : { try { - *value = detach(this->shim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -34439,6 +36843,7 @@ struct produce : { try { + typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return S_OK; } @@ -34452,11 +36857,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -34466,11 +36872,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PaneProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaneProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaneProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaneProperty()); return S_OK; } catch (...) @@ -34480,11 +36887,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_IsPaneOpenProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsPaneOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsPaneOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsPaneOpenProperty()); return S_OK; } catch (...) @@ -34494,11 +36902,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_OpenPaneLengthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OpenPaneLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpenPaneLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpenPaneLengthProperty()); return S_OK; } catch (...) @@ -34508,11 +36917,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_CompactPaneLengthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompactPaneLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompactPaneLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompactPaneLengthProperty()); return S_OK; } catch (...) @@ -34522,11 +36932,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PanePlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PanePlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PanePlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PanePlacementProperty()); return S_OK; } catch (...) @@ -34536,11 +36947,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_DisplayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DisplayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DisplayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DisplayModeProperty()); return S_OK; } catch (...) @@ -34550,11 +36962,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TemplateSettingsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TemplateSettingsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettingsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettingsProperty()); return S_OK; } catch (...) @@ -34564,11 +36977,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PaneBackgroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaneBackgroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaneBackgroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaneBackgroundProperty()); return S_OK; } catch (...) @@ -34582,11 +36996,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -34604,7 +37019,8 @@ struct produce : produce_baseshim().AreScrollSnapPointsRegular()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreScrollSnapPointsRegular()); return S_OK; } catch (...) @@ -34617,6 +37033,7 @@ struct produce : produce_baseshim()); this->shim().AreScrollSnapPointsRegular(value); return S_OK; } @@ -34630,7 +37047,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -34643,6 +37061,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -34656,11 +37075,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_BorderBrush(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrush(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrush()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrush()); return S_OK; } catch (...) @@ -34670,10 +37090,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderBrush(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderBrush(*reinterpret_cast(&value)); return S_OK; } @@ -34683,11 +37104,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_BorderThickness(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThickness()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThickness()); return S_OK; } catch (...) @@ -34696,10 +37118,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_BorderThickness(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().BorderThickness(*reinterpret_cast(&value)); return S_OK; } @@ -34709,11 +37132,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_CornerRadius(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadius()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadius()); return S_OK; } catch (...) @@ -34722,10 +37146,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_CornerRadius(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().CornerRadius(*reinterpret_cast(&value)); return S_OK; } @@ -34735,11 +37160,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -34748,10 +37174,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -34765,11 +37192,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -34784,11 +37212,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_AreScrollSnapPointsRegularProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreScrollSnapPointsRegularProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreScrollSnapPointsRegularProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreScrollSnapPointsRegularProperty()); return S_OK; } catch (...) @@ -34798,11 +37227,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -34816,11 +37246,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_BorderBrushProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderBrushProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderBrushProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderBrushProperty()); return S_OK; } catch (...) @@ -34830,11 +37261,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_BorderThicknessProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_BorderThicknessProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().BorderThicknessProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BorderThicknessProperty()); return S_OK; } catch (...) @@ -34844,11 +37276,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_CornerRadiusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CornerRadiusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CornerRadiusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CornerRadiusProperty()); return S_OK; } catch (...) @@ -34858,11 +37291,12 @@ struct produce : produce_ba } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -34876,11 +37310,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall abi_SelectStyle(abi_arg_in item, abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectStyle(impl::abi_arg_in item, impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectStyle(*reinterpret_cast(&item), *reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectStyle(*reinterpret_cast(&item), *reinterpret_cast(&container))); return S_OK; } catch (...) @@ -34894,11 +37329,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -34913,11 +37349,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_SelectStyleCore(abi_arg_in item, abi_arg_in container, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_SelectStyleCore(impl::abi_arg_in item, impl::abi_arg_in container, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().SelectStyleCore(*reinterpret_cast(&item), *reinterpret_cast(&container))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().SelectStyleCore(*reinterpret_cast(&item), *reinterpret_cast(&container))); return S_OK; } catch (...) @@ -34935,11 +37372,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_CreateCoreIndependentInputSource(Windows::UI::Core::CoreInputDeviceTypes deviceTypes, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CreateCoreIndependentInputSource(Windows::UI::Core::CoreInputDeviceTypes deviceTypes, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateCoreIndependentInputSource(deviceTypes)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateCoreIndependentInputSource(deviceTypes)); return S_OK; } catch (...) @@ -34953,11 +37391,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -34976,7 +37415,8 @@ struct produce : produce_baseshim().CompositionScaleX()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionScaleX()); return S_OK; } catch (...) @@ -34989,7 +37429,8 @@ struct produce : produce_baseshim().CompositionScaleY()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionScaleY()); return S_OK; } catch (...) @@ -34998,11 +37439,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_CompositionScaleChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CompositionScaleChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CompositionScaleChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -35015,6 +37457,7 @@ struct produce : produce_baseshim()); this->shim().CompositionScaleChanged(token); return S_OK; } @@ -35024,11 +37467,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_CreateCoreIndependentInputSource(Windows::UI::Core::CoreInputDeviceTypes deviceTypes, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CreateCoreIndependentInputSource(deviceTypes)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CreateCoreIndependentInputSource(deviceTypes)); return S_OK; } catch (...) @@ -35042,11 +37486,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -35061,11 +37506,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_CompositionScaleXProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompositionScaleXProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompositionScaleXProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionScaleXProperty()); return S_OK; } catch (...) @@ -35075,11 +37521,12 @@ struct produce : produce } } - HRESULT __stdcall get_CompositionScaleYProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CompositionScaleYProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CompositionScaleYProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CompositionScaleYProperty()); return S_OK; } catch (...) @@ -35097,7 +37544,8 @@ struct produce : produce_baseshim().Symbol()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Symbol()); return S_OK; } catch (...) @@ -35110,6 +37558,7 @@ struct produce : produce_baseshim()); this->shim().Symbol(value); return S_OK; } @@ -35123,11 +37572,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithSymbol(Windows::UI::Xaml::Controls::Symbol symbol, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithSymbol(Windows::UI::Xaml::Controls::Symbol symbol, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithSymbol(symbol)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithSymbol(symbol)); return S_OK; } catch (...) @@ -35141,11 +37591,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_SymbolProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SymbolProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SymbolProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SymbolProperty()); return S_OK; } catch (...) @@ -35163,7 +37614,8 @@ struct produce : produce_baseshim().FontSize()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSize()); return S_OK; } catch (...) @@ -35176,6 +37628,7 @@ struct produce : produce_baseshim()); this->shim().FontSize(value); return S_OK; } @@ -35185,11 +37638,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontFamily(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamily()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamily()); return S_OK; } catch (...) @@ -35199,10 +37653,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontFamily(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontFamily(*reinterpret_cast(&value)); return S_OK; } @@ -35212,11 +37667,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_FontWeight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeight()); return S_OK; } catch (...) @@ -35225,10 +37681,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_FontWeight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().FontWeight(*reinterpret_cast(&value)); return S_OK; } @@ -35242,7 +37699,8 @@ struct produce : produce_baseshim().FontStyle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyle()); return S_OK; } catch (...) @@ -35255,6 +37713,7 @@ struct produce : produce_baseshim()); this->shim().FontStyle(value); return S_OK; } @@ -35268,7 +37727,8 @@ struct produce : produce_baseshim().FontStretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretch()); return S_OK; } catch (...) @@ -35281,6 +37741,7 @@ struct produce : produce_baseshim()); this->shim().FontStretch(value); return S_OK; } @@ -35294,7 +37755,8 @@ struct produce : produce_baseshim().CharacterSpacing()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacing()); return S_OK; } catch (...) @@ -35307,6 +37769,7 @@ struct produce : produce_baseshim()); this->shim().CharacterSpacing(value); return S_OK; } @@ -35316,11 +37779,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Foreground(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Foreground()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Foreground()); return S_OK; } catch (...) @@ -35330,10 +37794,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Foreground(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Foreground(*reinterpret_cast(&value)); return S_OK; } @@ -35347,7 +37812,8 @@ struct produce : produce_baseshim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -35360,6 +37826,7 @@ struct produce : produce_baseshim()); this->shim().TextWrapping(value); return S_OK; } @@ -35373,7 +37840,8 @@ struct produce : produce_baseshim().TextTrimming()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextTrimming()); return S_OK; } catch (...) @@ -35386,6 +37854,7 @@ struct produce : produce_baseshim()); this->shim().TextTrimming(value); return S_OK; } @@ -35399,7 +37868,8 @@ struct produce : produce_baseshim().TextAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignment()); return S_OK; } catch (...) @@ -35412,6 +37882,7 @@ struct produce : produce_baseshim()); this->shim().TextAlignment(value); return S_OK; } @@ -35421,11 +37892,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -35435,10 +37907,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -35448,11 +37921,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_Inlines(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().Inlines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Inlines()); return S_OK; } catch (...) @@ -35462,11 +37936,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Padding(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Padding()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Padding()); return S_OK; } catch (...) @@ -35475,10 +37950,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Padding(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Padding(*reinterpret_cast(&value)); return S_OK; } @@ -35492,7 +37968,8 @@ struct produce : produce_baseshim().LineHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeight()); return S_OK; } catch (...) @@ -35505,6 +37982,7 @@ struct produce : produce_baseshim()); this->shim().LineHeight(value); return S_OK; } @@ -35518,7 +37996,8 @@ struct produce : produce_baseshim().LineStackingStrategy()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategy()); return S_OK; } catch (...) @@ -35531,6 +38010,7 @@ struct produce : produce_baseshim()); this->shim().LineStackingStrategy(value); return S_OK; } @@ -35544,7 +38024,8 @@ struct produce : produce_baseshim().IsTextSelectionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSelectionEnabled()); return S_OK; } catch (...) @@ -35557,6 +38038,7 @@ struct produce : produce_baseshim()); this->shim().IsTextSelectionEnabled(value); return S_OK; } @@ -35566,11 +38048,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedText()); return S_OK; } catch (...) @@ -35580,11 +38063,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentStart()); return S_OK; } catch (...) @@ -35594,11 +38078,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ContentEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentEnd()); return S_OK; } catch (...) @@ -35608,11 +38093,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionStart(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionStart()); return S_OK; } catch (...) @@ -35622,11 +38108,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionEnd(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionEnd()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionEnd()); return S_OK; } catch (...) @@ -35640,7 +38127,8 @@ struct produce : produce_baseshim().BaselineOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().BaselineOffset()); return S_OK; } catch (...) @@ -35649,11 +38137,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -35666,6 +38155,7 @@ struct produce : produce_baseshim()); this->shim().SelectionChanged(token); return S_OK; } @@ -35675,11 +38165,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ContextMenuOpening(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -35692,6 +38183,7 @@ struct produce : produce_baseshim()); this->shim().ContextMenuOpening(token); return S_OK; } @@ -35705,6 +38197,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -35714,10 +38207,11 @@ struct produce : produce_base start, abi_arg_in end) noexcept override + HRESULT __stdcall abi_Select(impl::abi_arg_in start, impl::abi_arg_in end) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Select(*reinterpret_cast(&start), *reinterpret_cast(&end)); return S_OK; } @@ -35731,7 +38225,8 @@ struct produce : produce_baseshim().Focus(value)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Focus(value)); return S_OK; } catch (...) @@ -35744,11 +38239,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SelectionHighlightColor(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColor()); return S_OK; } catch (...) @@ -35758,10 +38254,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectionHighlightColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionHighlightColor(*reinterpret_cast(&value)); return S_OK; } @@ -35775,7 +38272,8 @@ struct produce : produce_baseshim().MaxLines()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLines()); return S_OK; } catch (...) @@ -35788,6 +38286,7 @@ struct produce : produce_baseshim()); this->shim().MaxLines(value); return S_OK; } @@ -35801,7 +38300,8 @@ struct produce : produce_baseshim().TextLineBounds()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBounds()); return S_OK; } catch (...) @@ -35814,6 +38314,7 @@ struct produce : produce_baseshim()); this->shim().TextLineBounds(value); return S_OK; } @@ -35827,7 +38328,8 @@ struct produce : produce_baseshim().OpticalMarginAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignment()); return S_OK; } catch (...) @@ -35840,6 +38342,7 @@ struct produce : produce_baseshim()); this->shim().OpticalMarginAlignment(value); return S_OK; } @@ -35853,7 +38356,8 @@ struct produce : produce_baseshim().IsColorFontEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabled()); return S_OK; } catch (...) @@ -35866,6 +38370,7 @@ struct produce : produce_baseshim()); this->shim().IsColorFontEnabled(value); return S_OK; } @@ -35879,7 +38384,8 @@ struct produce : produce_baseshim().TextReadingOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrder()); return S_OK; } catch (...) @@ -35892,6 +38398,7 @@ struct produce : produce_baseshim()); this->shim().TextReadingOrder(value); return S_OK; } @@ -35909,7 +38416,8 @@ struct produce : produce_baseshim().IsTextScaleFactorEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabled()); return S_OK; } catch (...) @@ -35922,6 +38430,7 @@ struct produce : produce_baseshim()); this->shim().IsTextScaleFactorEnabled(value); return S_OK; } @@ -35935,11 +38444,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetAlphaMask(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_GetAlphaMask(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetAlphaMask()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetAlphaMask()); return S_OK; } catch (...) @@ -35953,11 +38463,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_FontSizeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontSizeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontSizeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontSizeProperty()); return S_OK; } catch (...) @@ -35967,11 +38478,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontFamilyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontFamilyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontFamilyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontFamilyProperty()); return S_OK; } catch (...) @@ -35981,11 +38493,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontWeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontWeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontWeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontWeightProperty()); return S_OK; } catch (...) @@ -35995,11 +38508,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontStyleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStyleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStyleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStyleProperty()); return S_OK; } catch (...) @@ -36009,11 +38523,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_FontStretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_FontStretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().FontStretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().FontStretchProperty()); return S_OK; } catch (...) @@ -36023,11 +38538,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_CharacterSpacingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CharacterSpacingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CharacterSpacingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CharacterSpacingProperty()); return S_OK; } catch (...) @@ -36037,11 +38553,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_ForegroundProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ForegroundProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ForegroundProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ForegroundProperty()); return S_OK; } catch (...) @@ -36051,11 +38568,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TextWrappingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextWrappingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextWrappingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrappingProperty()); return S_OK; } catch (...) @@ -36065,11 +38583,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TextTrimmingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextTrimmingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextTrimmingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextTrimmingProperty()); return S_OK; } catch (...) @@ -36079,11 +38598,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TextAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignmentProperty()); return S_OK; } catch (...) @@ -36093,11 +38613,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_TextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextProperty()); return S_OK; } catch (...) @@ -36107,11 +38628,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_PaddingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PaddingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PaddingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PaddingProperty()); return S_OK; } catch (...) @@ -36121,11 +38643,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LineHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineHeightProperty()); return S_OK; } catch (...) @@ -36135,11 +38658,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_LineStackingStrategyProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LineStackingStrategyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LineStackingStrategyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LineStackingStrategyProperty()); return S_OK; } catch (...) @@ -36149,11 +38673,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_IsTextSelectionEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextSelectionEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextSelectionEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextSelectionEnabledProperty()); return S_OK; } catch (...) @@ -36163,11 +38688,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_SelectedTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectedTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedTextProperty()); return S_OK; } catch (...) @@ -36181,11 +38707,12 @@ struct produce : produce_base template struct produce : produce_base { - HRESULT __stdcall get_SelectionHighlightColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColorProperty()); return S_OK; } catch (...) @@ -36195,11 +38722,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MaxLinesProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaxLinesProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLinesProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLinesProperty()); return S_OK; } catch (...) @@ -36209,11 +38737,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_TextLineBoundsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextLineBoundsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextLineBoundsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextLineBoundsProperty()); return S_OK; } catch (...) @@ -36223,11 +38752,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_OpticalMarginAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OpticalMarginAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OpticalMarginAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OpticalMarginAlignmentProperty()); return S_OK; } catch (...) @@ -36237,11 +38767,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_IsColorFontEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsColorFontEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsColorFontEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabledProperty()); return S_OK; } catch (...) @@ -36251,11 +38782,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_TextReadingOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextReadingOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextReadingOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrderProperty()); return S_OK; } catch (...) @@ -36269,11 +38801,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsTextScaleFactorEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextScaleFactorEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextScaleFactorEnabledProperty()); return S_OK; } catch (...) @@ -36287,11 +38820,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_Text(abi_arg_out value) noexcept override + HRESULT __stdcall get_Text(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Text()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Text()); return S_OK; } catch (...) @@ -36301,10 +38835,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Text(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Text(*reinterpret_cast(&value)); return S_OK; } @@ -36314,11 +38849,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectedText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectedText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectedText()); return S_OK; } catch (...) @@ -36328,10 +38864,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectedText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectedText(*reinterpret_cast(&value)); return S_OK; } @@ -36345,7 +38882,8 @@ struct produce : produce_baseshim().SelectionLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionLength()); return S_OK; } catch (...) @@ -36358,6 +38896,7 @@ struct produce : produce_baseshim()); this->shim().SelectionLength(value); return S_OK; } @@ -36371,7 +38910,8 @@ struct produce : produce_baseshim().SelectionStart()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionStart()); return S_OK; } catch (...) @@ -36384,6 +38924,7 @@ struct produce : produce_baseshim()); this->shim().SelectionStart(value); return S_OK; } @@ -36397,7 +38938,8 @@ struct produce : produce_baseshim().MaxLength()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLength()); return S_OK; } catch (...) @@ -36410,6 +38952,7 @@ struct produce : produce_baseshim()); this->shim().MaxLength(value); return S_OK; } @@ -36423,7 +38966,8 @@ struct produce : produce_baseshim().IsReadOnly()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnly()); return S_OK; } catch (...) @@ -36436,6 +38980,7 @@ struct produce : produce_baseshim()); this->shim().IsReadOnly(value); return S_OK; } @@ -36449,7 +38994,8 @@ struct produce : produce_baseshim().AcceptsReturn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptsReturn()); return S_OK; } catch (...) @@ -36462,6 +39008,7 @@ struct produce : produce_baseshim()); this->shim().AcceptsReturn(value); return S_OK; } @@ -36475,7 +39022,8 @@ struct produce : produce_baseshim().TextAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignment()); return S_OK; } catch (...) @@ -36488,6 +39036,7 @@ struct produce : produce_baseshim()); this->shim().TextAlignment(value); return S_OK; } @@ -36501,7 +39050,8 @@ struct produce : produce_baseshim().TextWrapping()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrapping()); return S_OK; } catch (...) @@ -36514,6 +39064,7 @@ struct produce : produce_baseshim()); this->shim().TextWrapping(value); return S_OK; } @@ -36527,7 +39078,8 @@ struct produce : produce_baseshim().IsSpellCheckEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSpellCheckEnabled()); return S_OK; } catch (...) @@ -36540,6 +39092,7 @@ struct produce : produce_baseshim()); this->shim().IsSpellCheckEnabled(value); return S_OK; } @@ -36553,7 +39106,8 @@ struct produce : produce_baseshim().IsTextPredictionEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextPredictionEnabled()); return S_OK; } catch (...) @@ -36566,6 +39120,7 @@ struct produce : produce_baseshim()); this->shim().IsTextPredictionEnabled(value); return S_OK; } @@ -36575,11 +39130,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputScope(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScope()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScope()); return S_OK; } catch (...) @@ -36589,10 +39145,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_InputScope(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InputScope(*reinterpret_cast(&value)); return S_OK; } @@ -36602,11 +39159,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_TextChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -36619,6 +39177,7 @@ struct produce : produce_baseshim()); this->shim().TextChanged(token); return S_OK; } @@ -36628,11 +39187,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_SelectionChanged(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().SelectionChanged(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().SelectionChanged(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -36645,6 +39205,7 @@ struct produce : produce_baseshim()); this->shim().SelectionChanged(token); return S_OK; } @@ -36654,11 +39215,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ContextMenuOpening(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContextMenuOpening(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -36671,6 +39233,7 @@ struct produce : produce_baseshim()); this->shim().ContextMenuOpening(token); return S_OK; } @@ -36684,6 +39247,7 @@ struct produce : produce_baseshim()); this->shim().Select(start, length); return S_OK; } @@ -36697,6 +39261,7 @@ struct produce : produce_baseshim()); this->shim().SelectAll(); return S_OK; } @@ -36706,11 +39271,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_GetRectFromCharacterIndex(int32_t charIndex, bool trailingEdge, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetRectFromCharacterIndex(charIndex, trailingEdge)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetRectFromCharacterIndex(charIndex, trailingEdge)); return S_OK; } catch (...) @@ -36723,11 +39289,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -36737,11 +39304,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -36750,11 +39318,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -36764,10 +39333,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -36777,11 +39347,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlaceholderText(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderText()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderText()); return S_OK; } catch (...) @@ -36791,10 +39362,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlaceholderText(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlaceholderText(*reinterpret_cast(&value)); return S_OK; } @@ -36804,11 +39376,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SelectionHighlightColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColor()); return S_OK; } catch (...) @@ -36818,10 +39391,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SelectionHighlightColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SelectionHighlightColor(*reinterpret_cast(&value)); return S_OK; } @@ -36835,7 +39409,8 @@ struct produce : produce_baseshim().PreventKeyboardDisplayOnProgrammaticFocus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocus()); return S_OK; } catch (...) @@ -36848,6 +39423,7 @@ struct produce : produce_baseshim()); this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value); return S_OK; } @@ -36861,7 +39437,8 @@ struct produce : produce_baseshim().IsColorFontEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabled()); return S_OK; } catch (...) @@ -36874,6 +39451,7 @@ struct produce : produce_baseshim()); this->shim().IsColorFontEnabled(value); return S_OK; } @@ -36883,11 +39461,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Paste(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Paste(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Paste(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -36900,6 +39479,7 @@ struct produce : produce_baseshim()); this->shim().Paste(token); return S_OK; } @@ -36913,11 +39493,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall add_TextCompositionStarted(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionStarted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionStarted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionStarted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -36930,6 +39511,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionStarted(token); return S_OK; } @@ -36939,11 +39521,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -36956,6 +39539,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionChanged(token); return S_OK; } @@ -36965,11 +39549,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextCompositionEnded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextCompositionEnded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextCompositionEnded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -36982,6 +39567,7 @@ struct produce : produce_baseshim()); this->shim().TextCompositionEnded(token); return S_OK; } @@ -36995,7 +39581,8 @@ struct produce : produce_baseshim().TextReadingOrder()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrder()); return S_OK; } catch (...) @@ -37008,6 +39595,7 @@ struct produce : produce_baseshim()); this->shim().TextReadingOrder(value); return S_OK; } @@ -37021,7 +39609,8 @@ struct produce : produce_baseshim().DesiredCandidateWindowAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredCandidateWindowAlignment()); return S_OK; } catch (...) @@ -37034,6 +39623,7 @@ struct produce : produce_baseshim()); this->shim().DesiredCandidateWindowAlignment(value); return S_OK; } @@ -37043,11 +39633,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_CandidateWindowBoundsChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -37060,6 +39651,7 @@ struct produce : produce_baseshim()); this->shim().CandidateWindowBoundsChanged(token); return S_OK; } @@ -37069,11 +39661,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TextChanging(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TextChanging(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TextChanging(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -37086,6 +39679,7 @@ struct produce : produce_baseshim()); this->shim().TextChanging(token); return S_OK; } @@ -37099,11 +39693,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_GetLinguisticAlternativesAsync(abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_GetLinguisticAlternativesAsync(impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().GetLinguisticAlternativesAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().GetLinguisticAlternativesAsync()); return S_OK; } catch (...) @@ -37117,11 +39712,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -37136,11 +39732,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_TextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextProperty()); return S_OK; } catch (...) @@ -37150,11 +39747,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_MaxLengthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaxLengthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaxLengthProperty()); return S_OK; } catch (...) @@ -37164,11 +39762,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsReadOnlyProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsReadOnlyProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsReadOnlyProperty()); return S_OK; } catch (...) @@ -37178,11 +39777,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AcceptsReturnProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AcceptsReturnProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AcceptsReturnProperty()); return S_OK; } catch (...) @@ -37192,11 +39792,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TextAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextAlignmentProperty()); return S_OK; } catch (...) @@ -37206,11 +39807,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TextWrappingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextWrappingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextWrappingProperty()); return S_OK; } catch (...) @@ -37220,11 +39822,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsSpellCheckEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsSpellCheckEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSpellCheckEnabledProperty()); return S_OK; } catch (...) @@ -37234,11 +39837,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsTextPredictionEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsTextPredictionEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsTextPredictionEnabledProperty()); return S_OK; } catch (...) @@ -37248,11 +39852,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_InputScopeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().InputScopeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().InputScopeProperty()); return S_OK; } catch (...) @@ -37266,11 +39871,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -37280,11 +39886,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -37294,11 +39901,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_PlaceholderTextProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlaceholderTextProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlaceholderTextProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlaceholderTextProperty()); return S_OK; } catch (...) @@ -37308,11 +39916,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_SelectionHighlightColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SelectionHighlightColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SelectionHighlightColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SelectionHighlightColorProperty()); return S_OK; } catch (...) @@ -37322,11 +39931,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty()); return S_OK; } catch (...) @@ -37336,11 +39946,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_IsColorFontEnabledProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsColorFontEnabledProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsColorFontEnabledProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsColorFontEnabledProperty()); return S_OK; } catch (...) @@ -37354,11 +39965,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_DesiredCandidateWindowAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DesiredCandidateWindowAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DesiredCandidateWindowAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DesiredCandidateWindowAlignmentProperty()); return S_OK; } catch (...) @@ -37368,11 +39980,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_TextReadingOrderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TextReadingOrderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TextReadingOrderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TextReadingOrderProperty()); return S_OK; } catch (...) @@ -37398,7 +40011,8 @@ struct produce { try { - *value = detach(this->shim().StartIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartIndex()); return S_OK; } catch (...) @@ -37411,7 +40025,8 @@ struct produce { try { - *value = detach(this->shim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -37428,7 +40043,8 @@ struct produce : { try { - *value = detach(this->shim().StartIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartIndex()); return S_OK; } catch (...) @@ -37441,7 +40057,8 @@ struct produce : { try { - *value = detach(this->shim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -37458,7 +40075,8 @@ struct produce { try { - *value = detach(this->shim().StartIndex()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StartIndex()); return S_OK; } catch (...) @@ -37471,7 +40089,8 @@ struct produce { try { - *value = detach(this->shim().Length()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Length()); return S_OK; } catch (...) @@ -37488,7 +40107,8 @@ struct produce : pro { try { - *value = detach(this->shim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -37501,6 +40121,7 @@ struct produce : pro { try { + typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return S_OK; } @@ -37514,11 +40135,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_OldTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldTime()); return S_OK; } catch (...) @@ -37527,11 +40149,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_NewTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewTime()); return S_OK; } catch (...) @@ -37544,11 +40167,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Header(abi_arg_out value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -37558,11 +40182,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -37571,11 +40196,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -37585,10 +40211,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -37598,11 +40225,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_ClockIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClockIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockIdentifier()); return S_OK; } catch (...) @@ -37612,10 +40240,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_ClockIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClockIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -37629,7 +40258,8 @@ struct produce : produce_baseshim().MinuteIncrement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinuteIncrement()); return S_OK; } catch (...) @@ -37642,6 +40272,7 @@ struct produce : produce_baseshim()); this->shim().MinuteIncrement(value); return S_OK; } @@ -37651,11 +40282,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Time(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Time()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Time()); return S_OK; } catch (...) @@ -37664,10 +40296,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Time(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Time(*reinterpret_cast(&value)); return S_OK; } @@ -37677,11 +40310,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_TimeChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TimeChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TimeChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -37694,6 +40328,7 @@ struct produce : produce_baseshim()); this->shim().TimeChanged(token); return S_OK; } @@ -37711,7 +40346,8 @@ struct produce : produce_baseshim().LightDismissOverlayMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayMode()); return S_OK; } catch (...) @@ -37724,6 +40360,7 @@ struct produce : produce_baseshim()); this->shim().LightDismissOverlayMode(value); return S_OK; } @@ -37737,11 +40374,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -37756,11 +40394,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_ClockIdentifier(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClockIdentifier(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClockIdentifier()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockIdentifier()); return S_OK; } catch (...) @@ -37770,10 +40409,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_ClockIdentifier(abi_arg_in value) noexcept override + HRESULT __stdcall put_ClockIdentifier(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().ClockIdentifier(*reinterpret_cast(&value)); return S_OK; } @@ -37783,11 +40423,12 @@ struct produce : produce_base } } - HRESULT __stdcall get_Time(abi_arg_out value) noexcept override + HRESULT __stdcall get_Time(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Time()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Time()); return S_OK; } catch (...) @@ -37796,10 +40437,11 @@ struct produce : produce_base } } - HRESULT __stdcall put_Time(abi_arg_in value) noexcept override + HRESULT __stdcall put_Time(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Time(*reinterpret_cast(&value)); return S_OK; } @@ -37813,7 +40455,8 @@ struct produce : produce_base { try { - *value = detach(this->shim().MinuteIncrement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinuteIncrement()); return S_OK; } catch (...) @@ -37826,6 +40469,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().MinuteIncrement(value); return S_OK; } @@ -37835,11 +40479,12 @@ struct produce : produce_base } } - HRESULT __stdcall add_TimePicked(abi_arg_in> value, event_token * token) noexcept override + HRESULT __stdcall add_TimePicked(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().TimePicked(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().TimePicked(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -37852,6 +40497,7 @@ struct produce : produce_base { try { + typename D::abi_guard guard(this->shim()); this->shim().TimePicked(token); return S_OK; } @@ -37861,11 +40507,12 @@ struct produce : produce_base } } - HRESULT __stdcall abi_ShowAtAsync(abi_arg_in target, abi_arg_out>> returnValue) noexcept override + HRESULT __stdcall abi_ShowAtAsync(impl::abi_arg_in target, impl::abi_arg_out>> returnValue) noexcept override { try { - *returnValue = detach(this->shim().ShowAtAsync(*reinterpret_cast(&target))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ShowAtAsync(*reinterpret_cast(&target))); return S_OK; } catch (...) @@ -37883,11 +40530,12 @@ struct produce : pro template struct produce : produce_base { - HRESULT __stdcall get_ClockIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClockIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClockIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockIdentifierProperty()); return S_OK; } catch (...) @@ -37897,11 +40545,12 @@ struct produce : produ } } - HRESULT __stdcall get_TimeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeProperty()); return S_OK; } catch (...) @@ -37911,11 +40560,12 @@ struct produce : produ } } - HRESULT __stdcall get_MinuteIncrementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinuteIncrementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinuteIncrementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinuteIncrementProperty()); return S_OK; } catch (...) @@ -37929,11 +40579,12 @@ struct produce : produ template struct produce : produce_base { - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -37943,11 +40594,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -37957,11 +40609,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_ClockIdentifierProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ClockIdentifierProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ClockIdentifierProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ClockIdentifierProperty()); return S_OK; } catch (...) @@ -37971,11 +40624,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_MinuteIncrementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MinuteIncrementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MinuteIncrementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MinuteIncrementProperty()); return S_OK; } catch (...) @@ -37985,11 +40639,12 @@ struct produce : produce_bas } } - HRESULT __stdcall get_TimeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_TimeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TimeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TimeProperty()); return S_OK; } catch (...) @@ -38003,11 +40658,12 @@ struct produce : produce_bas template struct produce : produce_base { - HRESULT __stdcall get_LightDismissOverlayModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_LightDismissOverlayModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().LightDismissOverlayModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().LightDismissOverlayModeProperty()); return S_OK; } catch (...) @@ -38021,11 +40677,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_OldTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_OldTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OldTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OldTime()); return S_OK; } catch (...) @@ -38034,11 +40691,12 @@ struct produce } } - HRESULT __stdcall get_NewTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_NewTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().NewTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().NewTime()); return S_OK; } catch (...) @@ -38055,7 +40713,8 @@ struct produce : produce_ { try { - *value = detach(this->shim().IsChecked()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsChecked()); return S_OK; } catch (...) @@ -38068,6 +40727,7 @@ struct produce : produce_ { try { + typename D::abi_guard guard(this->shim()); this->shim().IsChecked(value); return S_OK; } @@ -38081,11 +40741,12 @@ struct produce : produce_ template struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -38100,11 +40761,12 @@ struct produce : p template struct produce : produce_base { - HRESULT __stdcall get_IsCheckedProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsCheckedProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsCheckedProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsCheckedProperty()); return S_OK; } catch (...) @@ -38122,7 +40784,8 @@ struct produce : produce_baseshim().IsOn()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOn()); return S_OK; } catch (...) @@ -38135,6 +40798,7 @@ struct produce : produce_baseshim()); this->shim().IsOn(value); return S_OK; } @@ -38144,11 +40808,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Header(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Header()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Header()); return S_OK; } catch (...) @@ -38158,11 +40823,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Header(impl::abi_arg_in value) noexcept override { try { - this->shim().Header(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().Header(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -38171,11 +40837,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_HeaderTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplate()); return S_OK; } catch (...) @@ -38185,10 +40852,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_HeaderTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().HeaderTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -38198,11 +40866,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OnContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnContent()); return S_OK; } catch (...) @@ -38212,11 +40881,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OnContent(impl::abi_arg_in value) noexcept override { try { - this->shim().OnContent(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().OnContent(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -38225,11 +40895,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OnContentTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnContentTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnContentTemplate()); return S_OK; } catch (...) @@ -38239,10 +40910,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OnContentTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnContentTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -38252,11 +40924,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OffContent(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OffContent()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OffContent()); return S_OK; } catch (...) @@ -38266,11 +40939,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OffContent(impl::abi_arg_in value) noexcept override { try { - this->shim().OffContent(*reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().OffContent(*reinterpret_cast(&value)); return S_OK; } catch (...) @@ -38279,11 +40953,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_OffContentTemplate(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OffContentTemplate()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OffContentTemplate()); return S_OK; } catch (...) @@ -38293,10 +40968,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_OffContentTemplate(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OffContentTemplate(*reinterpret_cast(&value)); return S_OK; } @@ -38306,11 +40982,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -38320,11 +40997,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Toggled(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Toggled(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Toggled(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -38337,6 +41015,7 @@ struct produce : produce_baseshim()); this->shim().Toggled(token); return S_OK; } @@ -38354,6 +41033,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().OnToggled(); return S_OK; } @@ -38363,11 +41043,12 @@ struct produce : produce } } - HRESULT __stdcall abi_OnOnContentChanged(abi_arg_in oldContent, abi_arg_in newContent) noexcept override + HRESULT __stdcall abi_OnOnContentChanged(impl::abi_arg_in oldContent, impl::abi_arg_in newContent) noexcept override { try { - this->shim().OnOnContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); + typename D::abi_guard guard(this->shim()); + this->shim().OnOnContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); return S_OK; } catch (...) @@ -38376,11 +41057,12 @@ struct produce : produce } } - HRESULT __stdcall abi_OnOffContentChanged(abi_arg_in oldContent, abi_arg_in newContent) noexcept override + HRESULT __stdcall abi_OnOffContentChanged(impl::abi_arg_in oldContent, impl::abi_arg_in newContent) noexcept override { try { - this->shim().OnOffContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); + typename D::abi_guard guard(this->shim()); + this->shim().OnOffContentChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); return S_OK; } catch (...) @@ -38389,11 +41071,12 @@ struct produce : produce } } - HRESULT __stdcall abi_OnHeaderChanged(abi_arg_in oldContent, abi_arg_in newContent) noexcept override + HRESULT __stdcall abi_OnHeaderChanged(impl::abi_arg_in oldContent, impl::abi_arg_in newContent) noexcept override { try { - this->shim().OnHeaderChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); + typename D::abi_guard guard(this->shim()); + this->shim().OnHeaderChanged(*reinterpret_cast(&oldContent), *reinterpret_cast(&newContent)); return S_OK; } catch (...) @@ -38406,11 +41089,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_IsOnProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsOnProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOnProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOnProperty()); return S_OK; } catch (...) @@ -38420,11 +41104,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderProperty()); return S_OK; } catch (...) @@ -38434,11 +41119,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_HeaderTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HeaderTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HeaderTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HeaderTemplateProperty()); return S_OK; } catch (...) @@ -38448,11 +41134,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OnContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OnContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnContentProperty()); return S_OK; } catch (...) @@ -38462,11 +41149,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OnContentTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OnContentTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OnContentTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OnContentTemplateProperty()); return S_OK; } catch (...) @@ -38476,11 +41164,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OffContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OffContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OffContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OffContentProperty()); return S_OK; } catch (...) @@ -38490,11 +41179,12 @@ struct produce : produce_b } } - HRESULT __stdcall get_OffContentTemplateProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OffContentTemplateProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OffContentTemplateProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OffContentTemplateProperty()); return S_OK; } catch (...) @@ -38512,7 +41202,8 @@ struct produce : produce_baseshim().HorizontalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffset()); return S_OK; } catch (...) @@ -38525,6 +41216,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalOffset(value); return S_OK; } @@ -38538,7 +41230,8 @@ struct produce : produce_baseshim().IsOpen()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpen()); return S_OK; } catch (...) @@ -38551,6 +41244,7 @@ struct produce : produce_baseshim()); this->shim().IsOpen(value); return S_OK; } @@ -38564,7 +41258,8 @@ struct produce : produce_baseshim().Placement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Placement()); return S_OK; } catch (...) @@ -38577,6 +41272,7 @@ struct produce : produce_baseshim()); this->shim().Placement(value); return S_OK; } @@ -38586,11 +41282,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlacementTarget(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementTarget()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementTarget()); return S_OK; } catch (...) @@ -38600,10 +41297,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_PlacementTarget(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().PlacementTarget(*reinterpret_cast(&value)); return S_OK; } @@ -38617,7 +41315,8 @@ struct produce : produce_baseshim().VerticalOffset()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffset()); return S_OK; } catch (...) @@ -38630,6 +41329,7 @@ struct produce : produce_baseshim()); this->shim().VerticalOffset(value); return S_OK; } @@ -38639,11 +41339,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_TemplateSettings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().TemplateSettings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().TemplateSettings()); return S_OK; } catch (...) @@ -38653,11 +41354,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Closed(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Closed(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Closed(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -38670,6 +41372,7 @@ struct produce : produce_baseshim()); this->shim().Closed(token); return S_OK; } @@ -38679,11 +41382,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_Opened(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().Opened(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().Opened(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -38696,6 +41400,7 @@ struct produce : produce_baseshim()); this->shim().Opened(token); return S_OK; } @@ -38709,11 +41414,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -38732,11 +41438,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_PlacementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementProperty()); return S_OK; } catch (...) @@ -38746,11 +41453,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetPlacement(abi_arg_in element, Windows::UI::Xaml::Controls::Primitives::PlacementMode * value) noexcept override + HRESULT __stdcall abi_GetPlacement(impl::abi_arg_in element, Windows::UI::Xaml::Controls::Primitives::PlacementMode * value) noexcept override { try { - *value = detach(this->shim().GetPlacement(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPlacement(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -38759,10 +41467,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetPlacement(abi_arg_in element, Windows::UI::Xaml::Controls::Primitives::PlacementMode value) noexcept override + HRESULT __stdcall abi_SetPlacement(impl::abi_arg_in element, Windows::UI::Xaml::Controls::Primitives::PlacementMode value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPlacement(*reinterpret_cast(&element), value); return S_OK; } @@ -38772,11 +41481,12 @@ struct produce : produce } } - HRESULT __stdcall get_PlacementTargetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_PlacementTargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementTargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementTargetProperty()); return S_OK; } catch (...) @@ -38786,11 +41496,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetPlacementTarget(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetPlacementTarget(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetPlacementTarget(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetPlacementTarget(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -38800,10 +41511,11 @@ struct produce : produce } } - HRESULT __stdcall abi_SetPlacementTarget(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetPlacementTarget(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetPlacementTarget(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } @@ -38813,11 +41525,12 @@ struct produce : produce } } - HRESULT __stdcall get_ToolTipProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ToolTipProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ToolTipProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ToolTipProperty()); return S_OK; } catch (...) @@ -38827,11 +41540,12 @@ struct produce : produce } } - HRESULT __stdcall abi_GetToolTip(abi_arg_in element, abi_arg_out value) noexcept override + HRESULT __stdcall abi_GetToolTip(impl::abi_arg_in element, impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().GetToolTip(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetToolTip(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -38841,11 +41555,12 @@ struct produce : produce } } - HRESULT __stdcall abi_SetToolTip(abi_arg_in element, abi_arg_in value) noexcept override + HRESULT __stdcall abi_SetToolTip(impl::abi_arg_in element, impl::abi_arg_in value) noexcept override { try { - this->shim().SetToolTip(*reinterpret_cast(&element), *reinterpret_cast(&value)); + typename D::abi_guard guard(this->shim()); + this->shim().SetToolTip(*reinterpret_cast(&element), *reinterpret_cast(&value)); return S_OK; } catch (...) @@ -38858,11 +41573,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_HorizontalOffsetProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalOffsetProperty()); return S_OK; } catch (...) @@ -38872,11 +41588,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_IsOpenProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsOpenProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsOpenProperty()); return S_OK; } catch (...) @@ -38886,11 +41603,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlacementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementProperty()); return S_OK; } catch (...) @@ -38900,11 +41618,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_PlacementTargetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PlacementTargetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PlacementTargetProperty()); return S_OK; } catch (...) @@ -38914,11 +41633,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_VerticalOffsetProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalOffsetProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalOffsetProperty()); return S_OK; } catch (...) @@ -38936,6 +41656,7 @@ struct produce : produce_b { try { + typename D::abi_guard guard(this->shim()); this->shim().Move(oldIndex, newIndex); return S_OK; } @@ -38949,11 +41670,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Content(abi_arg_out value) noexcept override + HRESULT __stdcall get_Content(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Content()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Content()); return S_OK; } catch (...) @@ -38963,10 +41685,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Content(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return S_OK; } @@ -38980,11 +41703,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall abi_CreateInstance(abi_arg_in outer, abi_arg_out inner, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstance(impl::abi_arg_in outer, impl::abi_arg_out inner, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstance(*reinterpret_cast(&outer), *inner)); return S_OK; } catch (...) @@ -38999,11 +41723,12 @@ struct produce : produce_ba template struct produce : produce_base { - HRESULT __stdcall get_ContentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContentProperty()); return S_OK; } catch (...) @@ -39021,7 +41746,8 @@ struct produce : produce { try { - *value = detach(this->shim().ItemHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeight()); return S_OK; } catch (...) @@ -39034,6 +41760,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemHeight(value); return S_OK; } @@ -39047,7 +41774,8 @@ struct produce : produce { try { - *value = detach(this->shim().ItemWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidth()); return S_OK; } catch (...) @@ -39060,6 +41788,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().ItemWidth(value); return S_OK; } @@ -39073,7 +41802,8 @@ struct produce : produce { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -39086,6 +41816,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(value); return S_OK; } @@ -39099,7 +41830,8 @@ struct produce : produce { try { - *value = detach(this->shim().HorizontalChildrenAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChildrenAlignment()); return S_OK; } catch (...) @@ -39112,6 +41844,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().HorizontalChildrenAlignment(value); return S_OK; } @@ -39125,7 +41858,8 @@ struct produce : produce { try { - *value = detach(this->shim().VerticalChildrenAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChildrenAlignment()); return S_OK; } catch (...) @@ -39138,6 +41872,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().VerticalChildrenAlignment(value); return S_OK; } @@ -39151,7 +41886,8 @@ struct produce : produce { try { - *value = detach(this->shim().MaximumRowsOrColumns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumns()); return S_OK; } catch (...) @@ -39164,6 +41900,7 @@ struct produce : produce { try { + typename D::abi_guard guard(this->shim()); this->shim().MaximumRowsOrColumns(value); return S_OK; } @@ -39177,11 +41914,12 @@ struct produce : produce template struct produce : produce_base { - HRESULT __stdcall get_ItemHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeightProperty()); return S_OK; } catch (...) @@ -39191,11 +41929,12 @@ struct produce : } } - HRESULT __stdcall get_ItemWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidthProperty()); return S_OK; } catch (...) @@ -39205,11 +41944,12 @@ struct produce : } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -39219,11 +41959,12 @@ struct produce : } } - HRESULT __stdcall get_HorizontalChildrenAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalChildrenAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalChildrenAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChildrenAlignmentProperty()); return S_OK; } catch (...) @@ -39233,11 +41974,12 @@ struct produce : } } - HRESULT __stdcall get_VerticalChildrenAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalChildrenAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalChildrenAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChildrenAlignmentProperty()); return S_OK; } catch (...) @@ -39247,11 +41989,12 @@ struct produce : } } - HRESULT __stdcall get_MaximumRowsOrColumnsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaximumRowsOrColumnsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumRowsOrColumnsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumnsProperty()); return S_OK; } catch (...) @@ -39261,11 +42004,12 @@ struct produce : } } - HRESULT __stdcall get_RowSpanProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_RowSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().RowSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().RowSpanProperty()); return S_OK; } catch (...) @@ -39275,11 +42019,12 @@ struct produce : } } - HRESULT __stdcall abi_GetRowSpan(abi_arg_in element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetRowSpan(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetRowSpan(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetRowSpan(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -39288,10 +42033,11 @@ struct produce : } } - HRESULT __stdcall abi_SetRowSpan(abi_arg_in element, int32_t value) noexcept override + HRESULT __stdcall abi_SetRowSpan(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetRowSpan(*reinterpret_cast(&element), value); return S_OK; } @@ -39301,11 +42047,12 @@ struct produce : } } - HRESULT __stdcall get_ColumnSpanProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ColumnSpanProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ColumnSpanProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ColumnSpanProperty()); return S_OK; } catch (...) @@ -39315,11 +42062,12 @@ struct produce : } } - HRESULT __stdcall abi_GetColumnSpan(abi_arg_in element, int32_t * value) noexcept override + HRESULT __stdcall abi_GetColumnSpan(impl::abi_arg_in element, int32_t * value) noexcept override { try { - *value = detach(this->shim().GetColumnSpan(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetColumnSpan(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -39328,10 +42076,11 @@ struct produce : } } - HRESULT __stdcall abi_SetColumnSpan(abi_arg_in element, int32_t value) noexcept override + HRESULT __stdcall abi_SetColumnSpan(impl::abi_arg_in element, int32_t value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetColumnSpan(*reinterpret_cast(&element), value); return S_OK; } @@ -39345,11 +42094,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Child(abi_arg_out value) noexcept override + HRESULT __stdcall get_Child(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Child()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Child()); return S_OK; } catch (...) @@ -39359,10 +42109,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Child(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Child(*reinterpret_cast(&value)); return S_OK; } @@ -39376,7 +42127,8 @@ struct produce : produce_baseshim().Stretch()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Stretch()); return S_OK; } catch (...) @@ -39389,6 +42141,7 @@ struct produce : produce_baseshim()); this->shim().Stretch(value); return S_OK; } @@ -39402,7 +42155,8 @@ struct produce : produce_baseshim().StretchDirection()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchDirection()); return S_OK; } catch (...) @@ -39415,6 +42169,7 @@ struct produce : produce_baseshim()); this->shim().StretchDirection(value); return S_OK; } @@ -39428,11 +42183,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_StretchProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_StretchProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchProperty()); return S_OK; } catch (...) @@ -39442,11 +42198,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_StretchDirectionProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().StretchDirectionProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StretchDirectionProperty()); return S_OK; } catch (...) @@ -39460,11 +42217,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ItemContainerGenerator(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemContainerGenerator(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemContainerGenerator()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemContainerGenerator()); return S_OK; } catch (...) @@ -39482,11 +42240,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall abi_OnItemsChanged(abi_arg_in sender, abi_arg_in args) noexcept override + HRESULT __stdcall abi_OnItemsChanged(impl::abi_arg_in sender, impl::abi_arg_in args) noexcept override { try { - this->shim().OnItemsChanged(*reinterpret_cast(&sender), *reinterpret_cast(&args)); + typename D::abi_guard guard(this->shim()); + this->shim().OnItemsChanged(*reinterpret_cast(&sender), *reinterpret_cast(&args)); return S_OK; } catch (...) @@ -39499,6 +42258,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().OnClearChildren(); return S_OK; } @@ -39512,6 +42272,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().BringIndexIntoView(index); return S_OK; } @@ -39525,10 +42286,11 @@ struct produce : pr template struct produce : produce_base { - HRESULT __stdcall abi_AddInternalChild(abi_arg_in child) noexcept override + HRESULT __stdcall abi_AddInternalChild(impl::abi_arg_in child) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AddInternalChild(*reinterpret_cast(&child)); return S_OK; } @@ -39538,10 +42300,11 @@ struct produce : pr } } - HRESULT __stdcall abi_InsertInternalChild(int32_t index, abi_arg_in child) noexcept override + HRESULT __stdcall abi_InsertInternalChild(int32_t index, impl::abi_arg_in child) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().InsertInternalChild(index, *reinterpret_cast(&child)); return S_OK; } @@ -39555,6 +42318,7 @@ struct produce : pr { try { + typename D::abi_guard guard(this->shim()); this->shim().RemoveInternalChildRange(index, range); return S_OK; } @@ -39572,7 +42336,8 @@ struct produce : produc { try { - *value = detach(this->shim().AreScrollSnapPointsRegular()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreScrollSnapPointsRegular()); return S_OK; } catch (...) @@ -39585,6 +42350,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().AreScrollSnapPointsRegular(value); return S_OK; } @@ -39598,7 +42364,8 @@ struct produce : produc { try { - *value = detach(this->shim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -39611,6 +42378,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().Orientation(value); return S_OK; } @@ -39620,11 +42388,12 @@ struct produce : produc } } - HRESULT __stdcall add_CleanUpVirtualizedItemEvent(abi_arg_in value, event_token * token) noexcept override + HRESULT __stdcall add_CleanUpVirtualizedItemEvent(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().CleanUpVirtualizedItemEvent(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().CleanUpVirtualizedItemEvent(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -39637,6 +42406,7 @@ struct produce : produc { try { + typename D::abi_guard guard(this->shim()); this->shim().CleanUpVirtualizedItemEvent(token); return S_OK; } @@ -39650,10 +42420,11 @@ struct produce : produc template struct produce : produce_base { - HRESULT __stdcall abi_OnCleanUpVirtualizedItem(abi_arg_in e) noexcept override + HRESULT __stdcall abi_OnCleanUpVirtualizedItem(impl::abi_arg_in e) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().OnCleanUpVirtualizedItem(*reinterpret_cast(&e)); return S_OK; } @@ -39667,11 +42438,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_AreScrollSnapPointsRegularProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_AreScrollSnapPointsRegularProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AreScrollSnapPointsRegularProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AreScrollSnapPointsRegularProperty()); return S_OK; } catch (...) @@ -39681,11 +42453,12 @@ struct produce : } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -39695,11 +42468,12 @@ struct produce : } } - HRESULT __stdcall get_VirtualizationModeProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VirtualizationModeProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VirtualizationModeProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VirtualizationModeProperty()); return S_OK; } catch (...) @@ -39709,11 +42483,12 @@ struct produce : } } - HRESULT __stdcall abi_GetVirtualizationMode(abi_arg_in element, Windows::UI::Xaml::Controls::VirtualizationMode * value) noexcept override + HRESULT __stdcall abi_GetVirtualizationMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::VirtualizationMode * value) noexcept override { try { - *value = detach(this->shim().GetVirtualizationMode(*reinterpret_cast(&element))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetVirtualizationMode(*reinterpret_cast(&element))); return S_OK; } catch (...) @@ -39722,10 +42497,11 @@ struct produce : } } - HRESULT __stdcall abi_SetVirtualizationMode(abi_arg_in element, Windows::UI::Xaml::Controls::VirtualizationMode value) noexcept override + HRESULT __stdcall abi_SetVirtualizationMode(impl::abi_arg_in element, Windows::UI::Xaml::Controls::VirtualizationMode value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetVirtualizationMode(*reinterpret_cast(&element), value); return S_OK; } @@ -39735,11 +42511,12 @@ struct produce : } } - HRESULT __stdcall get_IsVirtualizingProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_IsVirtualizingProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().IsVirtualizingProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsVirtualizingProperty()); return S_OK; } catch (...) @@ -39749,11 +42526,12 @@ struct produce : } } - HRESULT __stdcall abi_GetIsVirtualizing(abi_arg_in o, bool * value) noexcept override + HRESULT __stdcall abi_GetIsVirtualizing(impl::abi_arg_in o, bool * value) noexcept override { try { - *value = detach(this->shim().GetIsVirtualizing(*reinterpret_cast(&o))); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().GetIsVirtualizing(*reinterpret_cast(&o))); return S_OK; } catch (...) @@ -39766,11 +42544,12 @@ struct produce : template struct produce : produce_base { - HRESULT __stdcall get_Source(abi_arg_out value) noexcept override + HRESULT __stdcall get_Source(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Source()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Source()); return S_OK; } catch (...) @@ -39780,10 +42559,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_Source(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return S_OK; } @@ -39793,11 +42573,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_AllowedScriptNotifyUris(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AllowedScriptNotifyUris()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedScriptNotifyUris()); return S_OK; } catch (...) @@ -39807,10 +42588,11 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall put_AllowedScriptNotifyUris(impl::abi_arg_in> value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().AllowedScriptNotifyUris(*reinterpret_cast *>(&value)); return S_OK; } @@ -39820,11 +42602,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DataTransferPackage(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataTransferPackage()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataTransferPackage()); return S_OK; } catch (...) @@ -39834,11 +42617,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_LoadCompleted(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().LoadCompleted(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LoadCompleted(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -39851,6 +42635,7 @@ struct produce : produce_baseshim()); this->shim().LoadCompleted(token); return S_OK; } @@ -39860,11 +42645,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_ScriptNotify(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().ScriptNotify(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ScriptNotify(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -39877,6 +42663,7 @@ struct produce : produce_baseshim()); this->shim().ScriptNotify(token); return S_OK; } @@ -39886,11 +42673,12 @@ struct produce : produce_base value, event_token * token) noexcept override + HRESULT __stdcall add_NavigationFailed(impl::abi_arg_in value, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationFailed(*reinterpret_cast(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationFailed(*reinterpret_cast(&value))); return S_OK; } catch (...) @@ -39903,6 +42691,7 @@ struct produce : produce_baseshim()); this->shim().NavigationFailed(token); return S_OK; } @@ -39912,11 +42701,12 @@ struct produce : produce_base scriptName, uint32_t __argumentsSize, abi_arg_in * arguments, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_InvokeScript(impl::abi_arg_in scriptName, uint32_t __argumentsSize, impl::abi_arg_in * arguments, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().InvokeScript(*reinterpret_cast(&scriptName), *reinterpret_cast(&arguments))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().InvokeScript(*reinterpret_cast(&scriptName), *reinterpret_cast(&arguments))); return S_OK; } catch (...) @@ -39927,10 +42717,11 @@ struct produce : produce_base source) noexcept override + HRESULT __stdcall abi_Navigate(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().Navigate(*reinterpret_cast(&source)); return S_OK; } @@ -39940,10 +42731,11 @@ struct produce : produce_base text) noexcept override + HRESULT __stdcall abi_NavigateToString(impl::abi_arg_in text) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigateToString(*reinterpret_cast(&text)); return S_OK; } @@ -39961,7 +42753,8 @@ struct produce : produce_baseshim().CanGoBack()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoBack()); return S_OK; } catch (...) @@ -39974,7 +42767,8 @@ struct produce : produce_baseshim().CanGoForward()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoForward()); return S_OK; } catch (...) @@ -39983,11 +42777,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DocumentTitle(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentTitle()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentTitle()); return S_OK; } catch (...) @@ -39997,11 +42792,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_NavigationStarting(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationStarting(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationStarting(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40014,6 +42810,7 @@ struct produce : produce_baseshim()); this->shim().NavigationStarting(token); return S_OK; } @@ -40023,11 +42820,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ContentLoading(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContentLoading(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContentLoading(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40040,6 +42838,7 @@ struct produce : produce_baseshim()); this->shim().ContentLoading(token); return S_OK; } @@ -40049,11 +42848,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_DOMContentLoaded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().DOMContentLoaded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().DOMContentLoaded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40066,6 +42866,7 @@ struct produce : produce_baseshim()); this->shim().DOMContentLoaded(token); return S_OK; } @@ -40079,6 +42880,7 @@ struct produce : produce_baseshim()); this->shim().GoForward(); return S_OK; } @@ -40092,6 +42894,7 @@ struct produce : produce_baseshim()); this->shim().GoBack(); return S_OK; } @@ -40105,6 +42908,7 @@ struct produce : produce_baseshim()); this->shim().Refresh(); return S_OK; } @@ -40118,6 +42922,7 @@ struct produce : produce_baseshim()); this->shim().Stop(); return S_OK; } @@ -40127,11 +42932,12 @@ struct produce : produce_base stream, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_CapturePreviewToStreamAsync(impl::abi_arg_in stream, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().CapturePreviewToStreamAsync(*reinterpret_cast(&stream))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CapturePreviewToStreamAsync(*reinterpret_cast(&stream))); return S_OK; } catch (...) @@ -40141,11 +42947,12 @@ struct produce : produce_base scriptName, abi_arg_in> arguments, abi_arg_out> returnValue) noexcept override + HRESULT __stdcall abi_InvokeScriptAsync(impl::abi_arg_in scriptName, impl::abi_arg_in> arguments, impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().InvokeScriptAsync(*reinterpret_cast(&scriptName), *reinterpret_cast *>(&arguments))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().InvokeScriptAsync(*reinterpret_cast(&scriptName), *reinterpret_cast *>(&arguments))); return S_OK; } catch (...) @@ -40155,11 +42962,12 @@ struct produce : produce_base> returnValue) noexcept override + HRESULT __stdcall abi_CaptureSelectedContentToDataPackageAsync(impl::abi_arg_out> returnValue) noexcept override { try { - *returnValue = detach(this->shim().CaptureSelectedContentToDataPackageAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().CaptureSelectedContentToDataPackageAsync()); return S_OK; } catch (...) @@ -40169,10 +42977,11 @@ struct produce : produce_base source, abi_arg_in streamResolver) noexcept override + HRESULT __stdcall abi_NavigateToLocalStreamUri(impl::abi_arg_in source, impl::abi_arg_in streamResolver) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigateToLocalStreamUri(*reinterpret_cast(&source), *reinterpret_cast(&streamResolver)); return S_OK; } @@ -40182,11 +42991,12 @@ struct produce : produce_base contentIdentifier, abi_arg_in relativePath, abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_BuildLocalStreamUri(impl::abi_arg_in contentIdentifier, impl::abi_arg_in relativePath, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().BuildLocalStreamUri(*reinterpret_cast(&contentIdentifier), *reinterpret_cast(&relativePath))); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().BuildLocalStreamUri(*reinterpret_cast(&contentIdentifier), *reinterpret_cast(&relativePath))); return S_OK; } catch (...) @@ -40196,11 +43006,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DefaultBackgroundColor(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultBackgroundColor()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultBackgroundColor()); return S_OK; } catch (...) @@ -40209,10 +43020,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_DefaultBackgroundColor(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().DefaultBackgroundColor(*reinterpret_cast(&value)); return S_OK; } @@ -40222,11 +43034,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_NavigationCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().NavigationCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NavigationCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40239,6 +43052,7 @@ struct produce : produce_baseshim()); this->shim().NavigationCompleted(token); return S_OK; } @@ -40248,11 +43062,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FrameNavigationStarting(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameNavigationStarting(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameNavigationStarting(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40265,6 +43080,7 @@ struct produce : produce_baseshim()); this->shim().FrameNavigationStarting(token); return S_OK; } @@ -40274,11 +43090,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FrameContentLoading(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameContentLoading(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameContentLoading(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40291,6 +43108,7 @@ struct produce : produce_baseshim()); this->shim().FrameContentLoading(token); return S_OK; } @@ -40300,11 +43118,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FrameDOMContentLoaded(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameDOMContentLoaded(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameDOMContentLoaded(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40317,6 +43136,7 @@ struct produce : produce_baseshim()); this->shim().FrameDOMContentLoaded(token); return S_OK; } @@ -40326,11 +43146,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_FrameNavigationCompleted(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().FrameNavigationCompleted(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().FrameNavigationCompleted(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40343,6 +43164,7 @@ struct produce : produce_baseshim()); this->shim().FrameNavigationCompleted(token); return S_OK; } @@ -40352,11 +43174,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_LongRunningScriptDetected(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().LongRunningScriptDetected(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().LongRunningScriptDetected(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40369,6 +43192,7 @@ struct produce : produce_baseshim()); this->shim().LongRunningScriptDetected(token); return S_OK; } @@ -40378,11 +43202,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_UnsafeContentWarningDisplaying(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UnsafeContentWarningDisplaying(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UnsafeContentWarningDisplaying(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40395,6 +43220,7 @@ struct produce : produce_baseshim()); this->shim().UnsafeContentWarningDisplaying(token); return S_OK; } @@ -40404,11 +43230,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_UnviewableContentIdentified(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UnviewableContentIdentified(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UnviewableContentIdentified(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40421,6 +43248,7 @@ struct produce : produce_baseshim()); this->shim().UnviewableContentIdentified(token); return S_OK; } @@ -40430,10 +43258,11 @@ struct produce : produce_base requestMessage) noexcept override + HRESULT __stdcall abi_NavigateWithHttpRequestMessage(impl::abi_arg_in requestMessage) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().NavigateWithHttpRequestMessage(*reinterpret_cast(&requestMessage)); return S_OK; } @@ -40447,7 +43276,8 @@ struct produce : produce_baseshim().Focus(value)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().Focus(value)); return S_OK; } catch (...) @@ -40464,7 +43294,8 @@ struct produce : produce_baseshim().ContainsFullScreenElement()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainsFullScreenElement()); return S_OK; } catch (...) @@ -40473,11 +43304,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_ContainsFullScreenElementChanged(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().ContainsFullScreenElementChanged(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().ContainsFullScreenElementChanged(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40490,6 +43322,7 @@ struct produce : produce_baseshim()); this->shim().ContainsFullScreenElementChanged(token); return S_OK; } @@ -40507,7 +43340,8 @@ struct produce : produce_baseshim().ExecutionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExecutionMode()); return S_OK; } catch (...) @@ -40516,11 +43350,12 @@ struct produce : produce_base> value) noexcept override + HRESULT __stdcall get_DeferredPermissionRequests(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().DeferredPermissionRequests()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DeferredPermissionRequests()); return S_OK; } catch (...) @@ -40530,11 +43365,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_Settings(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Settings()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Settings()); return S_OK; } catch (...) @@ -40544,11 +43380,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_UnsupportedUriSchemeIdentified(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().UnsupportedUriSchemeIdentified(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().UnsupportedUriSchemeIdentified(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40561,6 +43398,7 @@ struct produce : produce_baseshim()); this->shim().UnsupportedUriSchemeIdentified(token); return S_OK; } @@ -40570,11 +43408,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_NewWindowRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().NewWindowRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().NewWindowRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40587,6 +43426,7 @@ struct produce : produce_baseshim()); this->shim().NewWindowRequested(token); return S_OK; } @@ -40596,11 +43436,12 @@ struct produce : produce_base> value, event_token * token) noexcept override + HRESULT __stdcall add_PermissionRequested(impl::abi_arg_in> value, event_token * token) noexcept override { try { - *token = detach(this->shim().PermissionRequested(*reinterpret_cast *>(&value))); + typename D::abi_guard guard(this->shim()); + *token = detach_abi(this->shim().PermissionRequested(*reinterpret_cast *>(&value))); return S_OK; } catch (...) @@ -40613,6 +43454,7 @@ struct produce : produce_baseshim()); this->shim().PermissionRequested(token); return S_OK; } @@ -40622,11 +43464,12 @@ struct produce : produce_base name, abi_arg_in pObject) noexcept override + HRESULT __stdcall abi_AddWebAllowedObject(impl::abi_arg_in name, impl::abi_arg_in pObject) noexcept override { try { - this->shim().AddWebAllowedObject(*reinterpret_cast(&name), *reinterpret_cast(&pObject)); + typename D::abi_guard guard(this->shim()); + this->shim().AddWebAllowedObject(*reinterpret_cast(&name), *reinterpret_cast(&pObject)); return S_OK; } catch (...) @@ -40635,11 +43478,12 @@ struct produce : produce_base returnValue) noexcept override + HRESULT __stdcall abi_DeferredPermissionRequestById(uint32_t id, impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().DeferredPermissionRequestById(id)); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().DeferredPermissionRequestById(id)); return S_OK; } catch (...) @@ -40653,11 +43497,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_XYFocusLeft(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusLeft(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusLeft()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusLeft()); return S_OK; } catch (...) @@ -40667,10 +43512,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusLeft(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusLeft(*reinterpret_cast(&value)); return S_OK; } @@ -40680,11 +43526,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusRight(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusRight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusRight()); return S_OK; } catch (...) @@ -40694,10 +43541,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusRight(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusRight(*reinterpret_cast(&value)); return S_OK; } @@ -40707,11 +43555,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusUp(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusUp()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusUp()); return S_OK; } catch (...) @@ -40721,10 +43570,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusUp(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusUp(*reinterpret_cast(&value)); return S_OK; } @@ -40734,11 +43584,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_XYFocusDown(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusDown()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusDown()); return S_OK; } catch (...) @@ -40748,10 +43599,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_XYFocusDown(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().XYFocusDown(*reinterpret_cast(&value)); return S_OK; } @@ -40765,11 +43617,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceName(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceName(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceName()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceName()); return S_OK; } catch (...) @@ -40779,10 +43632,11 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall put_SourceName(impl::abi_arg_in value) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SourceName(*reinterpret_cast(&value)); return S_OK; } @@ -40796,6 +43650,7 @@ struct produce : produce_baseshim()); this->shim().Redraw(); return S_OK; } @@ -40805,10 +43660,11 @@ struct produce : produce_base source) noexcept override + HRESULT __stdcall abi_SetSource(impl::abi_arg_in source) noexcept override { try { + typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&source)); return S_OK; } @@ -40822,11 +43678,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_SourceNameProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_SourceNameProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceNameProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceNameProperty()); return S_OK; } catch (...) @@ -40840,11 +43697,12 @@ struct produce : produce_b template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -40858,11 +43716,12 @@ struct produce template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -40876,11 +43735,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -40894,7 +43754,8 @@ struct produceshim().PermissionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PermissionType()); return S_OK; } catch (...) @@ -40907,7 +43768,8 @@ struct produceshim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -40920,6 +43782,7 @@ struct produceshim()); this->shim().Allow(); return S_OK; } @@ -40933,6 +43796,7 @@ struct produceshim()); this->shim().Deny(); return S_OK; } @@ -40946,11 +43810,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall abi_CreateInstanceWithExecutionMode(Windows::UI::Xaml::Controls::WebViewExecutionMode executionMode, abi_arg_out instance) noexcept override + HRESULT __stdcall abi_CreateInstanceWithExecutionMode(Windows::UI::Xaml::Controls::WebViewExecutionMode executionMode, impl::abi_arg_out instance) noexcept override { try { - *instance = detach(this->shim().CreateInstanceWithExecutionMode(executionMode)); + typename D::abi_guard guard(this->shim()); + *instance = detach_abi(this->shim().CreateInstanceWithExecutionMode(executionMode)); return S_OK; } catch (...) @@ -40964,11 +43829,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_ExecutionTime(abi_arg_out value) noexcept override + HRESULT __stdcall get_ExecutionTime(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ExecutionTime()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ExecutionTime()); return S_OK; } catch (...) @@ -40981,7 +43847,8 @@ struct produceshim().StopPageScriptExecution()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().StopPageScriptExecution()); return S_OK; } catch (...) @@ -40994,6 +43861,7 @@ struct produceshim()); this->shim().StopPageScriptExecution(value); return S_OK; } @@ -41007,11 +43875,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41025,7 +43894,8 @@ struct produceshim().IsSuccess()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsSuccess()); return S_OK; } catch (...) @@ -41038,7 +43908,8 @@ struct produceshim().WebErrorStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebErrorStatus()); return S_OK; } catch (...) @@ -41051,11 +43922,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41069,7 +43941,8 @@ struct produceshim().WebErrorStatus()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().WebErrorStatus()); return S_OK; } catch (...) @@ -41082,11 +43955,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41100,7 +43974,8 @@ struct produceshim().Cancel()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Cancel()); return S_OK; } catch (...) @@ -41113,6 +43988,7 @@ struct produceshim()); this->shim().Cancel(value); return S_OK; } @@ -41126,11 +44002,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41140,11 +44017,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Referrer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Referrer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Referrer()); return S_OK; } catch (...) @@ -41158,7 +44036,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -41171,6 +44050,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -41184,11 +44064,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41202,7 +44083,8 @@ struct produce : prod { try { - *value = detach(this->shim().PermissionType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PermissionType()); return S_OK; } catch (...) @@ -41215,7 +44097,8 @@ struct produce : prod { try { - *value = detach(this->shim().Id()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Id()); return S_OK; } catch (...) @@ -41228,7 +44111,8 @@ struct produce : prod { try { - *value = detach(this->shim().State()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().State()); return S_OK; } catch (...) @@ -41241,6 +44125,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Defer(); return S_OK; } @@ -41254,6 +44139,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Allow(); return S_OK; } @@ -41267,6 +44153,7 @@ struct produce : prod { try { + typename D::abi_guard guard(this->shim()); this->shim().Deny(); return S_OK; } @@ -41280,11 +44167,12 @@ struct produce : prod template struct produce : produce_base { - HRESULT __stdcall get_PermissionRequest(abi_arg_out value) noexcept override + HRESULT __stdcall get_PermissionRequest(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().PermissionRequest()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().PermissionRequest()); return S_OK; } catch (...) @@ -41302,7 +44190,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsJavaScriptEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsJavaScriptEnabled()); return S_OK; } catch (...) @@ -41315,6 +44204,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsJavaScriptEnabled(value); return S_OK; } @@ -41328,7 +44218,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().IsIndexedDBEnabled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().IsIndexedDBEnabled()); return S_OK; } catch (...) @@ -41341,6 +44232,7 @@ struct produce : produce_base< { try { + typename D::abi_guard guard(this->shim()); this->shim().IsIndexedDBEnabled(value); return S_OK; } @@ -41354,11 +44246,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_AnyScriptNotifyUri(abi_arg_out> value) noexcept override + HRESULT __stdcall get_AnyScriptNotifyUri(impl::abi_arg_out> value) noexcept override { try { - *value = detach(this->shim().AnyScriptNotifyUri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AnyScriptNotifyUri()); return S_OK; } catch (...) @@ -41368,11 +44261,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_SourceProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().SourceProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().SourceProperty()); return S_OK; } catch (...) @@ -41382,11 +44276,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_AllowedScriptNotifyUrisProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().AllowedScriptNotifyUrisProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().AllowedScriptNotifyUrisProperty()); return S_OK; } catch (...) @@ -41396,11 +44291,12 @@ struct produce : produce_base value) noexcept override + HRESULT __stdcall get_DataTransferPackageProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DataTransferPackageProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DataTransferPackageProperty()); return S_OK; } catch (...) @@ -41414,11 +44310,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_CanGoBackProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanGoBackProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanGoBackProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoBackProperty()); return S_OK; } catch (...) @@ -41428,11 +44325,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_CanGoForwardProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_CanGoForwardProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().CanGoForwardProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().CanGoForwardProperty()); return S_OK; } catch (...) @@ -41442,11 +44340,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_DocumentTitleProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DocumentTitleProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DocumentTitleProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DocumentTitleProperty()); return S_OK; } catch (...) @@ -41456,11 +44355,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_DefaultBackgroundColorProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_DefaultBackgroundColorProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().DefaultBackgroundColorProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultBackgroundColorProperty()); return S_OK; } catch (...) @@ -41474,11 +44374,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_ContainsFullScreenElementProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ContainsFullScreenElementProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ContainsFullScreenElementProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ContainsFullScreenElementProperty()); return S_OK; } catch (...) @@ -41496,7 +44397,8 @@ struct produce : produce_base< { try { - *value = detach(this->shim().DefaultExecutionMode()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().DefaultExecutionMode()); return S_OK; } catch (...) @@ -41505,11 +44407,12 @@ struct produce : produce_base< } } - HRESULT __stdcall abi_ClearTemporaryWebDataAsync(abi_arg_out returnValue) noexcept override + HRESULT __stdcall abi_ClearTemporaryWebDataAsync(impl::abi_arg_out returnValue) noexcept override { try { - *returnValue = detach(this->shim().ClearTemporaryWebDataAsync()); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_abi(this->shim().ClearTemporaryWebDataAsync()); return S_OK; } catch (...) @@ -41523,11 +44426,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_XYFocusLeftProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusLeftProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusLeftProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusLeftProperty()); return S_OK; } catch (...) @@ -41537,11 +44441,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusRightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusRightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusRightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusRightProperty()); return S_OK; } catch (...) @@ -41551,11 +44456,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusUpProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusUpProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusUpProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusUpProperty()); return S_OK; } catch (...) @@ -41565,11 +44471,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_XYFocusDownProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_XYFocusDownProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().XYFocusDownProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().XYFocusDownProperty()); return S_OK; } catch (...) @@ -41583,11 +44490,12 @@ struct produce : produce_base< template struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41601,7 +44509,8 @@ struct produceshim().Handled()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Handled()); return S_OK; } catch (...) @@ -41614,6 +44523,7 @@ struct produceshim()); this->shim().Handled(value); return S_OK; } @@ -41627,11 +44537,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_Uri(abi_arg_out value) noexcept override + HRESULT __stdcall get_Uri(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Uri()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Uri()); return S_OK; } catch (...) @@ -41641,11 +44552,12 @@ struct produce value) noexcept override + HRESULT __stdcall get_Referrer(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().Referrer()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Referrer()); return S_OK; } catch (...) @@ -41659,11 +44571,12 @@ struct produce struct produce : produce_base { - HRESULT __stdcall get_MediaType(abi_arg_out value) noexcept override + HRESULT __stdcall get_MediaType(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MediaType()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MediaType()); return S_OK; } catch (...) @@ -41681,7 +44594,8 @@ struct produce : produce_baseshim().ItemWidth()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidth()); return S_OK; } catch (...) @@ -41694,6 +44608,7 @@ struct produce : produce_baseshim()); this->shim().ItemWidth(value); return S_OK; } @@ -41707,7 +44622,8 @@ struct produce : produce_baseshim().ItemHeight()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeight()); return S_OK; } catch (...) @@ -41720,6 +44636,7 @@ struct produce : produce_baseshim()); this->shim().ItemHeight(value); return S_OK; } @@ -41733,7 +44650,8 @@ struct produce : produce_baseshim().Orientation()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().Orientation()); return S_OK; } catch (...) @@ -41746,6 +44664,7 @@ struct produce : produce_baseshim()); this->shim().Orientation(value); return S_OK; } @@ -41759,7 +44678,8 @@ struct produce : produce_baseshim().HorizontalChildrenAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChildrenAlignment()); return S_OK; } catch (...) @@ -41772,6 +44692,7 @@ struct produce : produce_baseshim()); this->shim().HorizontalChildrenAlignment(value); return S_OK; } @@ -41785,7 +44706,8 @@ struct produce : produce_baseshim().VerticalChildrenAlignment()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChildrenAlignment()); return S_OK; } catch (...) @@ -41798,6 +44720,7 @@ struct produce : produce_baseshim()); this->shim().VerticalChildrenAlignment(value); return S_OK; } @@ -41811,7 +44734,8 @@ struct produce : produce_baseshim().MaximumRowsOrColumns()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumns()); return S_OK; } catch (...) @@ -41824,6 +44748,7 @@ struct produce : produce_baseshim()); this->shim().MaximumRowsOrColumns(value); return S_OK; } @@ -41837,11 +44762,12 @@ struct produce : produce_base struct produce : produce_base { - HRESULT __stdcall get_ItemWidthProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemWidthProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemWidthProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemWidthProperty()); return S_OK; } catch (...) @@ -41851,11 +44777,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_ItemHeightProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_ItemHeightProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().ItemHeightProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().ItemHeightProperty()); return S_OK; } catch (...) @@ -41865,11 +44792,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_OrientationProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_OrientationProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().OrientationProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().OrientationProperty()); return S_OK; } catch (...) @@ -41879,11 +44807,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_HorizontalChildrenAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_HorizontalChildrenAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().HorizontalChildrenAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().HorizontalChildrenAlignmentProperty()); return S_OK; } catch (...) @@ -41893,11 +44822,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_VerticalChildrenAlignmentProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_VerticalChildrenAlignmentProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().VerticalChildrenAlignmentProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().VerticalChildrenAlignmentProperty()); return S_OK; } catch (...) @@ -41907,11 +44837,12 @@ struct produce : produce_base< } } - HRESULT __stdcall get_MaximumRowsOrColumnsProperty(abi_arg_out value) noexcept override + HRESULT __stdcall get_MaximumRowsOrColumnsProperty(impl::abi_arg_out value) noexcept override { try { - *value = detach(this->shim().MaximumRowsOrColumnsProperty()); + typename D::abi_guard guard(this->shim()); + *value = detach_abi(this->shim().MaximumRowsOrColumnsProperty()); return S_OK; } catch (...) @@ -41928,446 +44859,446 @@ namespace Windows::UI::Xaml::Controls { template void impl_IInsertionPanel::GetInsertionIndexes(const Windows::Foundation::Point & position, int32_t & first, int32_t & second) const { - check_hresult(static_cast(static_cast(*this))->abi_GetInsertionIndexes(get(position), &first, &second)); + check_hresult(WINRT_SHIM(IInsertionPanel)->abi_GetInsertionIndexes(get_abi(position), &first, &second)); } -template Windows::IInspectable impl_IItemContainerMapping::ItemFromContainer(const Windows::UI::Xaml::DependencyObject & container) const +template Windows::Foundation::IInspectable impl_IItemContainerMapping::ItemFromContainer(const Windows::UI::Xaml::DependencyObject & container) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ItemFromContainer(get(container), put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IItemContainerMapping)->abi_ItemFromContainer(get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::DependencyObject impl_IItemContainerMapping::ContainerFromItem(const Windows::IInspectable & item) const +template Windows::UI::Xaml::DependencyObject impl_IItemContainerMapping::ContainerFromItem(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ContainerFromItem(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerMapping)->abi_ContainerFromItem(get_abi(item), put_abi(returnValue))); return returnValue; } template int32_t impl_IItemContainerMapping::IndexFromContainer(const Windows::UI::Xaml::DependencyObject & container) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IndexFromContainer(get(container), &returnValue)); + check_hresult(WINRT_SHIM(IItemContainerMapping)->abi_IndexFromContainer(get_abi(container), &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyObject impl_IItemContainerMapping::ContainerFromIndex(int32_t index) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ContainerFromIndex(index, put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerMapping)->abi_ContainerFromIndex(index, put_abi(returnValue))); return returnValue; } template bool impl_INavigate::Navigate(const Windows::UI::Xaml::Interop::TypeName & sourcePageType) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Navigate(get(sourcePageType), &returnValue)); + check_hresult(WINRT_SHIM(INavigate)->abi_Navigate(get_abi(sourcePageType), &returnValue)); return returnValue; } template Windows::UI::Xaml::Controls::SemanticZoom impl_ISemanticZoomInformation::SemanticZoomOwner() const { Windows::UI::Xaml::Controls::SemanticZoom value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SemanticZoomOwner(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->get_SemanticZoomOwner(put_abi(value))); return value; } template void impl_ISemanticZoomInformation::SemanticZoomOwner(const Windows::UI::Xaml::Controls::SemanticZoom & value) const { - check_hresult(static_cast(static_cast(*this))->put_SemanticZoomOwner(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->put_SemanticZoomOwner(get_abi(value))); } template bool impl_ISemanticZoomInformation::IsActiveView() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActiveView(&value)); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->get_IsActiveView(&value)); return value; } template void impl_ISemanticZoomInformation::IsActiveView(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsActiveView(value)); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->put_IsActiveView(value)); } template bool impl_ISemanticZoomInformation::IsZoomedInView() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZoomedInView(&value)); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->get_IsZoomedInView(&value)); return value; } template void impl_ISemanticZoomInformation::IsZoomedInView(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZoomedInView(value)); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->put_IsZoomedInView(value)); } template void impl_ISemanticZoomInformation::InitializeViewChange() const { - check_hresult(static_cast(static_cast(*this))->abi_InitializeViewChange()); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_InitializeViewChange()); } template void impl_ISemanticZoomInformation::CompleteViewChange() const { - check_hresult(static_cast(static_cast(*this))->abi_CompleteViewChange()); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_CompleteViewChange()); } template void impl_ISemanticZoomInformation::MakeVisible(const Windows::UI::Xaml::Controls::SemanticZoomLocation & item) const { - check_hresult(static_cast(static_cast(*this))->abi_MakeVisible(get(item))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_MakeVisible(get_abi(item))); } template void impl_ISemanticZoomInformation::StartViewChangeFrom(const Windows::UI::Xaml::Controls::SemanticZoomLocation & source, const Windows::UI::Xaml::Controls::SemanticZoomLocation & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_StartViewChangeFrom(get(source), get(destination))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_StartViewChangeFrom(get_abi(source), get_abi(destination))); } template void impl_ISemanticZoomInformation::StartViewChangeTo(const Windows::UI::Xaml::Controls::SemanticZoomLocation & source, const Windows::UI::Xaml::Controls::SemanticZoomLocation & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_StartViewChangeTo(get(source), get(destination))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_StartViewChangeTo(get_abi(source), get_abi(destination))); } template void impl_ISemanticZoomInformation::CompleteViewChangeFrom(const Windows::UI::Xaml::Controls::SemanticZoomLocation & source, const Windows::UI::Xaml::Controls::SemanticZoomLocation & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_CompleteViewChangeFrom(get(source), get(destination))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_CompleteViewChangeFrom(get_abi(source), get_abi(destination))); } template void impl_ISemanticZoomInformation::CompleteViewChangeTo(const Windows::UI::Xaml::Controls::SemanticZoomLocation & source, const Windows::UI::Xaml::Controls::SemanticZoomLocation & destination) const { - check_hresult(static_cast(static_cast(*this))->abi_CompleteViewChangeTo(get(source), get(destination))); + check_hresult(WINRT_SHIM(ISemanticZoomInformation)->abi_CompleteViewChangeTo(get_abi(source), get_abi(destination))); } template bool impl_IBackClickEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IBackClickEventArgs)->get_Handled(&value)); return value; } template void impl_IBackClickEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IBackClickEventArgs)->put_Handled(value)); } template Windows::Foundation::Rect impl_ICandidateWindowBoundsChangedEventArgs::Bounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(ICandidateWindowBoundsChangedEventArgs)->get_Bounds(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ListViewBaseHeaderItem impl_IChoosingGroupHeaderContainerEventArgs::GroupHeaderContainer() const { Windows::UI::Xaml::Controls::ListViewBaseHeaderItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupHeaderContainer(put(value))); + check_hresult(WINRT_SHIM(IChoosingGroupHeaderContainerEventArgs)->get_GroupHeaderContainer(put_abi(value))); return value; } template void impl_IChoosingGroupHeaderContainerEventArgs::GroupHeaderContainer(const Windows::UI::Xaml::Controls::ListViewBaseHeaderItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupHeaderContainer(get(value))); + check_hresult(WINRT_SHIM(IChoosingGroupHeaderContainerEventArgs)->put_GroupHeaderContainer(get_abi(value))); } template int32_t impl_IChoosingGroupHeaderContainerEventArgs::GroupIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupIndex(&value)); + check_hresult(WINRT_SHIM(IChoosingGroupHeaderContainerEventArgs)->get_GroupIndex(&value)); return value; } -template Windows::IInspectable impl_IChoosingGroupHeaderContainerEventArgs::Group() const +template Windows::Foundation::IInspectable impl_IChoosingGroupHeaderContainerEventArgs::Group() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Group(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IChoosingGroupHeaderContainerEventArgs)->get_Group(put_abi(value))); return value; } template int32_t impl_IChoosingItemContainerEventArgs::ItemIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemIndex(&value)); + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->get_ItemIndex(&value)); return value; } -template Windows::IInspectable impl_IChoosingItemContainerEventArgs::Item() const +template Windows::Foundation::IInspectable impl_IChoosingItemContainerEventArgs::Item() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->get_Item(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::SelectorItem impl_IChoosingItemContainerEventArgs::ItemContainer() const { Windows::UI::Xaml::Controls::Primitives::SelectorItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainer(put(value))); + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->get_ItemContainer(put_abi(value))); return value; } template void impl_IChoosingItemContainerEventArgs::ItemContainer(const Windows::UI::Xaml::Controls::Primitives::SelectorItem & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemContainer(get(value))); + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->put_ItemContainer(get_abi(value))); } template bool impl_IChoosingItemContainerEventArgs::IsContainerPrepared() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsContainerPrepared(&value)); + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->get_IsContainerPrepared(&value)); return value; } template void impl_IChoosingItemContainerEventArgs::IsContainerPrepared(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsContainerPrepared(value)); + check_hresult(WINRT_SHIM(IChoosingItemContainerEventArgs)->put_IsContainerPrepared(value)); } template Windows::UI::Xaml::Controls::Primitives::SelectorItem impl_IContainerContentChangingEventArgs::ItemContainer() const { Windows::UI::Xaml::Controls::Primitives::SelectorItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainer(put(value))); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_ItemContainer(put_abi(value))); return value; } template bool impl_IContainerContentChangingEventArgs::InRecycleQueue() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InRecycleQueue(&value)); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_InRecycleQueue(&value)); return value; } template int32_t impl_IContainerContentChangingEventArgs::ItemIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemIndex(&value)); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_ItemIndex(&value)); return value; } -template Windows::IInspectable impl_IContainerContentChangingEventArgs::Item() const +template Windows::Foundation::IInspectable impl_IContainerContentChangingEventArgs::Item() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_Item(put_abi(value))); return value; } template uint32_t impl_IContainerContentChangingEventArgs::Phase() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Phase(&value)); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_Phase(&value)); return value; } template bool impl_IContainerContentChangingEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->get_Handled(&value)); return value; } template void impl_IContainerContentChangingEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->put_Handled(value)); } template void impl_IContainerContentChangingEventArgs::RegisterUpdateCallback(const Windows::Foundation::TypedEventHandler & callback) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterUpdateCallback(get(callback))); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->abi_RegisterUpdateCallback(get_abi(callback))); } template void impl_IContainerContentChangingEventArgs::RegisterUpdateCallback(uint32_t callbackPhase, const Windows::Foundation::TypedEventHandler & callback) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterUpdateCallbackWithPhase(callbackPhase, get(callback))); + check_hresult(WINRT_SHIM(IContainerContentChangingEventArgs)->abi_RegisterUpdateCallbackWithPhase(callbackPhase, get_abi(callback))); } -template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelector::SelectTemplate(const Windows::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const +template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelector::SelectTemplate(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const { Windows::UI::Xaml::DataTemplate returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectTemplate(get(item), get(container), put(returnValue))); + check_hresult(WINRT_SHIM(IDataTemplateSelector)->abi_SelectTemplate(get_abi(item), get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelectorOverrides::SelectTemplateCore(const Windows::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const +template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelectorOverrides::SelectTemplateCore(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const { Windows::UI::Xaml::DataTemplate returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectTemplateCore(get(item), get(container), put(returnValue))); + check_hresult(WINRT_SHIM(IDataTemplateSelectorOverrides)->abi_SelectTemplateCore(get_abi(item), get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IDataTemplateSelectorFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IDataTemplateSelectorFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::DataTemplateSelector instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDataTemplateSelectorFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelector2::SelectTemplate(const Windows::IInspectable & item) const +template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelector2::SelectTemplate(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::DataTemplate returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectTemplateForItem(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IDataTemplateSelector2)->abi_SelectTemplateForItem(get_abi(item), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelectorOverrides2::SelectTemplateCore(const Windows::IInspectable & item) const +template Windows::UI::Xaml::DataTemplate impl_IDataTemplateSelectorOverrides2::SelectTemplateCore(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::DataTemplate returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectTemplateForItemCore(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IDataTemplateSelectorOverrides2)->abi_SelectTemplateForItemCore(get_abi(item), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::Collections::IVectorView impl_IDragItemsCompletedEventArgs::Items() const +template Windows::Foundation::Collections::IVectorView impl_IDragItemsCompletedEventArgs::Items() const { - Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + Windows::Foundation::Collections::IVectorView value; + check_hresult(WINRT_SHIM(IDragItemsCompletedEventArgs)->get_Items(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackageOperation impl_IDragItemsCompletedEventArgs::DropResult() const { Windows::ApplicationModel::DataTransfer::DataPackageOperation value {}; - check_hresult(static_cast(static_cast(*this))->get_DropResult(&value)); + check_hresult(WINRT_SHIM(IDragItemsCompletedEventArgs)->get_DropResult(&value)); return value; } template bool impl_IDragItemsStartingEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IDragItemsStartingEventArgs)->get_Cancel(&value)); return value; } template void impl_IDragItemsStartingEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IDragItemsStartingEventArgs)->put_Cancel(value)); } -template Windows::Foundation::Collections::IVector impl_IDragItemsStartingEventArgs::Items() const +template Windows::Foundation::Collections::IVector impl_IDragItemsStartingEventArgs::Items() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(IDragItemsStartingEventArgs)->get_Items(put_abi(value))); return value; } template Windows::ApplicationModel::DataTransfer::DataPackage impl_IDragItemsStartingEventArgs::Data() const { Windows::ApplicationModel::DataTransfer::DataPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IDragItemsStartingEventArgs)->get_Data(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ItemsPanelTemplate impl_IGroupStyle::Panel() const { Windows::UI::Xaml::Controls::ItemsPanelTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Panel(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->get_Panel(put_abi(value))); return value; } template void impl_IGroupStyle::Panel(const Windows::UI::Xaml::Controls::ItemsPanelTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_Panel(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->put_Panel(get_abi(value))); } template Windows::UI::Xaml::Style impl_IGroupStyle::ContainerStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContainerStyle(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->get_ContainerStyle(put_abi(value))); return value; } template void impl_IGroupStyle::ContainerStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContainerStyle(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->put_ContainerStyle(get_abi(value))); } template Windows::UI::Xaml::Controls::StyleSelector impl_IGroupStyle::ContainerStyleSelector() const { Windows::UI::Xaml::Controls::StyleSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContainerStyleSelector(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->get_ContainerStyleSelector(put_abi(value))); return value; } template void impl_IGroupStyle::ContainerStyleSelector(const Windows::UI::Xaml::Controls::StyleSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContainerStyleSelector(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->put_ContainerStyleSelector(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IGroupStyle::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IGroupStyle::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IGroupStyle::HeaderTemplateSelector() const { Windows::UI::Xaml::Controls::DataTemplateSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateSelector(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->get_HeaderTemplateSelector(put_abi(value))); return value; } template void impl_IGroupStyle::HeaderTemplateSelector(const Windows::UI::Xaml::Controls::DataTemplateSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplateSelector(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle)->put_HeaderTemplateSelector(get_abi(value))); } template bool impl_IGroupStyle::HidesIfEmpty() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HidesIfEmpty(&value)); + check_hresult(WINRT_SHIM(IGroupStyle)->get_HidesIfEmpty(&value)); return value; } template void impl_IGroupStyle::HidesIfEmpty(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_HidesIfEmpty(value)); + check_hresult(WINRT_SHIM(IGroupStyle)->put_HidesIfEmpty(value)); } -template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::GroupStyle instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGroupStyleFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Style impl_IGroupStyle2::HeaderContainerStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderContainerStyle(put(value))); + check_hresult(WINRT_SHIM(IGroupStyle2)->get_HeaderContainerStyle(put_abi(value))); return value; } template void impl_IGroupStyle2::HeaderContainerStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderContainerStyle(get(value))); + check_hresult(WINRT_SHIM(IGroupStyle2)->put_HeaderContainerStyle(get_abi(value))); } -template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleSelector::SelectGroupStyle(const Windows::IInspectable & group, uint32_t level) const +template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleSelector::SelectGroupStyle(const Windows::Foundation::IInspectable & group, uint32_t level) const { Windows::UI::Xaml::Controls::GroupStyle returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectGroupStyle(get(group), level, put(returnValue))); + check_hresult(WINRT_SHIM(IGroupStyleSelector)->abi_SelectGroupStyle(get_abi(group), level, put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleSelectorOverrides::SelectGroupStyleCore(const Windows::IInspectable & group, uint32_t level) const +template Windows::UI::Xaml::Controls::GroupStyle impl_IGroupStyleSelectorOverrides::SelectGroupStyleCore(const Windows::Foundation::IInspectable & group, uint32_t level) const { Windows::UI::Xaml::Controls::GroupStyle returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectGroupStyleCore(get(group), level, put(returnValue))); + check_hresult(WINRT_SHIM(IGroupStyleSelectorOverrides)->abi_SelectGroupStyleCore(get_abi(group), level, put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::GroupStyleSelector impl_IGroupStyleSelectorFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::GroupStyleSelector impl_IGroupStyleSelectorFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::GroupStyleSelector instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGroupStyleSelectorFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template event_token impl_IItemContainerGenerator::ItemsChanged(const Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemsChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->add_ItemsChanged(get_abi(value), &token)); return token; } @@ -42378,1236 +45309,1236 @@ template event_revoker impl_IItemContainer template void impl_IItemContainerGenerator::ItemsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemsChanged(token)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->remove_ItemsChanged(token)); } -template Windows::IInspectable impl_IItemContainerGenerator::ItemFromContainer(const Windows::UI::Xaml::DependencyObject & container) const +template Windows::Foundation::IInspectable impl_IItemContainerGenerator::ItemFromContainer(const Windows::UI::Xaml::DependencyObject & container) const { - Windows::IInspectable returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ItemFromContainer(get(container), put(returnValue))); + Windows::Foundation::IInspectable returnValue; + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_ItemFromContainer(get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::DependencyObject impl_IItemContainerGenerator::ContainerFromItem(const Windows::IInspectable & item) const +template Windows::UI::Xaml::DependencyObject impl_IItemContainerGenerator::ContainerFromItem(const Windows::Foundation::IInspectable & item) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ContainerFromItem(get(item), put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_ContainerFromItem(get_abi(item), put_abi(returnValue))); return returnValue; } template int32_t impl_IItemContainerGenerator::IndexFromContainer(const Windows::UI::Xaml::DependencyObject & container) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IndexFromContainer(get(container), &returnValue)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_IndexFromContainer(get_abi(container), &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyObject impl_IItemContainerGenerator::ContainerFromIndex(int32_t index) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ContainerFromIndex(index, put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_ContainerFromIndex(index, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::ItemContainerGenerator impl_IItemContainerGenerator::GetItemContainerGeneratorForPanel(const Windows::UI::Xaml::Controls::Panel & panel) const { Windows::UI::Xaml::Controls::ItemContainerGenerator returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetItemContainerGeneratorForPanel(get(panel), put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_GetItemContainerGeneratorForPanel(get_abi(panel), put_abi(returnValue))); return returnValue; } template void impl_IItemContainerGenerator::StartAt(const Windows::UI::Xaml::Controls::Primitives::GeneratorPosition & position, Windows::UI::Xaml::Controls::Primitives::GeneratorDirection direction, bool allowStartAtRealizedItem) const { - check_hresult(static_cast(static_cast(*this))->abi_StartAt(get(position), direction, allowStartAtRealizedItem)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_StartAt(get_abi(position), direction, allowStartAtRealizedItem)); } template void impl_IItemContainerGenerator::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_Stop()); } template Windows::UI::Xaml::DependencyObject impl_IItemContainerGenerator::GenerateNext(bool & isNewlyRealized) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GenerateNext(&isNewlyRealized, put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_GenerateNext(&isNewlyRealized, put_abi(returnValue))); return returnValue; } template void impl_IItemContainerGenerator::PrepareItemContainer(const Windows::UI::Xaml::DependencyObject & container) const { - check_hresult(static_cast(static_cast(*this))->abi_PrepareItemContainer(get(container))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_PrepareItemContainer(get_abi(container))); } template void impl_IItemContainerGenerator::RemoveAll() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAll()); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_RemoveAll()); } template void impl_IItemContainerGenerator::Remove(const Windows::UI::Xaml::Controls::Primitives::GeneratorPosition & position, int32_t count) const { - check_hresult(static_cast(static_cast(*this))->abi_Remove(get(position), count)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_Remove(get_abi(position), count)); } template Windows::UI::Xaml::Controls::Primitives::GeneratorPosition impl_IItemContainerGenerator::GeneratorPositionFromIndex(int32_t itemIndex) const { Windows::UI::Xaml::Controls::Primitives::GeneratorPosition returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GeneratorPositionFromIndex(itemIndex, put(returnValue))); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_GeneratorPositionFromIndex(itemIndex, put_abi(returnValue))); return returnValue; } template int32_t impl_IItemContainerGenerator::IndexFromGeneratorPosition(const Windows::UI::Xaml::Controls::Primitives::GeneratorPosition & position) const { int32_t returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IndexFromGeneratorPosition(get(position), &returnValue)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_IndexFromGeneratorPosition(get_abi(position), &returnValue)); return returnValue; } template void impl_IItemContainerGenerator::Recycle(const Windows::UI::Xaml::Controls::Primitives::GeneratorPosition & position, int32_t count) const { - check_hresult(static_cast(static_cast(*this))->abi_Recycle(get(position), count)); + check_hresult(WINRT_SHIM(IItemContainerGenerator)->abi_Recycle(get_abi(position), count)); } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsHelperStatics::DropoutOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DropoutOrderProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsHelperStatics)->get_DropoutOrderProperty(put_abi(value))); return value; } template Windows::Foundation::IReference impl_IMediaTransportControlsHelperStatics::GetDropoutOrder(const Windows::UI::Xaml::UIElement & element) const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->abi_GetDropoutOrder(get(element), put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsHelperStatics)->abi_GetDropoutOrder(get_abi(element), put_abi(value))); return value; } -template void impl_IMediaTransportControlsHelperStatics::SetDropoutOrder(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IReference & value) const +template void impl_IMediaTransportControlsHelperStatics::SetDropoutOrder(const Windows::UI::Xaml::UIElement & element, const optional & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDropoutOrder(get(element), get(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsHelperStatics)->abi_SetDropoutOrder(get_abi(element), get_abi(value))); } template hstring impl_INotifyEventArgs::Value() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + check_hresult(WINRT_SHIM(INotifyEventArgs)->get_Value(put_abi(value))); return value; } template Windows::Foundation::Uri impl_INotifyEventArgs2::CallingUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CallingUri(put(value))); + check_hresult(WINRT_SHIM(INotifyEventArgs2)->get_CallingUri(put_abi(value))); return value; } -template Windows::IInspectable impl_ISemanticZoomLocation::Item() const +template Windows::Foundation::IInspectable impl_ISemanticZoomLocation::Item() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ISemanticZoomLocation)->get_Item(put_abi(value))); return value; } -template void impl_ISemanticZoomLocation::Item(const Windows::IInspectable & value) const +template void impl_ISemanticZoomLocation::Item(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Item(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoomLocation)->put_Item(get_abi(value))); } template Windows::Foundation::Rect impl_ISemanticZoomLocation::Bounds() const { Windows::Foundation::Rect value {}; - check_hresult(static_cast(static_cast(*this))->get_Bounds(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomLocation)->get_Bounds(put_abi(value))); return value; } template void impl_ISemanticZoomLocation::Bounds(const Windows::Foundation::Rect & value) const { - check_hresult(static_cast(static_cast(*this))->put_Bounds(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoomLocation)->put_Bounds(get_abi(value))); } template bool impl_ISemanticZoomViewChangedEventArgs::IsSourceZoomedInView() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSourceZoomedInView(&value)); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->get_IsSourceZoomedInView(&value)); return value; } template void impl_ISemanticZoomViewChangedEventArgs::IsSourceZoomedInView(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSourceZoomedInView(value)); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->put_IsSourceZoomedInView(value)); } template Windows::UI::Xaml::Controls::SemanticZoomLocation impl_ISemanticZoomViewChangedEventArgs::SourceItem() const { Windows::UI::Xaml::Controls::SemanticZoomLocation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceItem(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->get_SourceItem(put_abi(value))); return value; } template void impl_ISemanticZoomViewChangedEventArgs::SourceItem(const Windows::UI::Xaml::Controls::SemanticZoomLocation & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceItem(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->put_SourceItem(get_abi(value))); } template Windows::UI::Xaml::Controls::SemanticZoomLocation impl_ISemanticZoomViewChangedEventArgs::DestinationItem() const { Windows::UI::Xaml::Controls::SemanticZoomLocation value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DestinationItem(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->get_DestinationItem(put_abi(value))); return value; } template void impl_ISemanticZoomViewChangedEventArgs::DestinationItem(const Windows::UI::Xaml::Controls::SemanticZoomLocation & value) const { - check_hresult(static_cast(static_cast(*this))->put_DestinationItem(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoomViewChangedEventArgs)->put_DestinationItem(get_abi(value))); } -template Windows::UI::Xaml::Style impl_IStyleSelector::SelectStyle(const Windows::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const +template Windows::UI::Xaml::Style impl_IStyleSelector::SelectStyle(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const { Windows::UI::Xaml::Style returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectStyle(get(item), get(container), put(returnValue))); + check_hresult(WINRT_SHIM(IStyleSelector)->abi_SelectStyle(get_abi(item), get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Style impl_IStyleSelectorOverrides::SelectStyleCore(const Windows::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const +template Windows::UI::Xaml::Style impl_IStyleSelectorOverrides::SelectStyleCore(const Windows::Foundation::IInspectable & item, const Windows::UI::Xaml::DependencyObject & container) const { Windows::UI::Xaml::Style returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_SelectStyleCore(get(item), get(container), put(returnValue))); + check_hresult(WINRT_SHIM(IStyleSelectorOverrides)->abi_SelectStyleCore(get_abi(item), get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::StyleSelector impl_IStyleSelectorFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::StyleSelector impl_IStyleSelectorFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::StyleSelector instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IStyleSelectorFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_ITextCompositionChangedEventArgs::StartIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartIndex(&value)); + check_hresult(WINRT_SHIM(ITextCompositionChangedEventArgs)->get_StartIndex(&value)); return value; } template int32_t impl_ITextCompositionChangedEventArgs::Length() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(ITextCompositionChangedEventArgs)->get_Length(&value)); return value; } template int32_t impl_ITextCompositionEndedEventArgs::StartIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartIndex(&value)); + check_hresult(WINRT_SHIM(ITextCompositionEndedEventArgs)->get_StartIndex(&value)); return value; } template int32_t impl_ITextCompositionEndedEventArgs::Length() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(ITextCompositionEndedEventArgs)->get_Length(&value)); return value; } template int32_t impl_ITextCompositionStartedEventArgs::StartIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_StartIndex(&value)); + check_hresult(WINRT_SHIM(ITextCompositionStartedEventArgs)->get_StartIndex(&value)); return value; } template int32_t impl_ITextCompositionStartedEventArgs::Length() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Length(&value)); + check_hresult(WINRT_SHIM(ITextCompositionStartedEventArgs)->get_Length(&value)); return value; } template bool impl_ITextControlPasteEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(ITextControlPasteEventArgs)->get_Handled(&value)); return value; } template void impl_ITextControlPasteEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(ITextControlPasteEventArgs)->put_Handled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IToolTipServiceStatics::PlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->get_PlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::PlacementMode impl_IToolTipServiceStatics::GetPlacement(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Controls::Primitives::PlacementMode value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetPlacement(get(element), &value)); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_GetPlacement(get_abi(element), &value)); return value; } template void impl_IToolTipServiceStatics::SetPlacement(const Windows::UI::Xaml::DependencyObject & element, Windows::UI::Xaml::Controls::Primitives::PlacementMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPlacement(get(element), value)); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_SetPlacement(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IToolTipServiceStatics::PlacementTargetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementTargetProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->get_PlacementTargetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::UIElement impl_IToolTipServiceStatics::GetPlacementTarget(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPlacementTarget(get(element), put(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_GetPlacementTarget(get_abi(element), put_abi(value))); return value; } template void impl_IToolTipServiceStatics::SetPlacementTarget(const Windows::UI::Xaml::DependencyObject & element, const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPlacementTarget(get(element), get(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_SetPlacementTarget(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IToolTipServiceStatics::ToolTipProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ToolTipProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->get_ToolTipProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IToolTipServiceStatics::GetToolTip(const Windows::UI::Xaml::DependencyObject & element) const +template Windows::Foundation::IInspectable impl_IToolTipServiceStatics::GetToolTip(const Windows::UI::Xaml::DependencyObject & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetToolTip(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_GetToolTip(get_abi(element), put_abi(value))); return value; } -template void impl_IToolTipServiceStatics::SetToolTip(const Windows::UI::Xaml::DependencyObject & element, const Windows::IInspectable & value) const +template void impl_IToolTipServiceStatics::SetToolTip(const Windows::UI::Xaml::DependencyObject & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetToolTip(get(element), get(value))); + check_hresult(WINRT_SHIM(IToolTipServiceStatics)->abi_SetToolTip(get_abi(element), get_abi(value))); } template void impl_IUIElementCollection::Move(uint32_t oldIndex, uint32_t newIndex) const { - check_hresult(static_cast(static_cast(*this))->abi_Move(oldIndex, newIndex)); + check_hresult(WINRT_SHIM(IUIElementCollection)->abi_Move(oldIndex, newIndex)); } -template Windows::IInspectable impl_ICleanUpVirtualizedItemEventArgs::Value() const +template Windows::Foundation::IInspectable impl_ICleanUpVirtualizedItemEventArgs::Value() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Value(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICleanUpVirtualizedItemEventArgs)->get_Value(put_abi(value))); return value; } template Windows::UI::Xaml::UIElement impl_ICleanUpVirtualizedItemEventArgs::UIElement() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UIElement(put(value))); + check_hresult(WINRT_SHIM(ICleanUpVirtualizedItemEventArgs)->get_UIElement(put_abi(value))); return value; } template bool impl_ICleanUpVirtualizedItemEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(ICleanUpVirtualizedItemEventArgs)->get_Cancel(&value)); return value; } template void impl_ICleanUpVirtualizedItemEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(ICleanUpVirtualizedItemEventArgs)->put_Cancel(value)); } template Windows::UI::Xaml::GridLength impl_IColumnDefinition::Width() const { Windows::UI::Xaml::GridLength value {}; - check_hresult(static_cast(static_cast(*this))->get_Width(put(value))); + check_hresult(WINRT_SHIM(IColumnDefinition)->get_Width(put_abi(value))); return value; } template void impl_IColumnDefinition::Width(const Windows::UI::Xaml::GridLength & value) const { - check_hresult(static_cast(static_cast(*this))->put_Width(get(value))); + check_hresult(WINRT_SHIM(IColumnDefinition)->put_Width(get_abi(value))); } template double impl_IColumnDefinition::MaxWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxWidth(&value)); + check_hresult(WINRT_SHIM(IColumnDefinition)->get_MaxWidth(&value)); return value; } template void impl_IColumnDefinition::MaxWidth(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxWidth(value)); + check_hresult(WINRT_SHIM(IColumnDefinition)->put_MaxWidth(value)); } template double impl_IColumnDefinition::MinWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinWidth(&value)); + check_hresult(WINRT_SHIM(IColumnDefinition)->get_MinWidth(&value)); return value; } template void impl_IColumnDefinition::MinWidth(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MinWidth(value)); + check_hresult(WINRT_SHIM(IColumnDefinition)->put_MinWidth(value)); } template double impl_IColumnDefinition::ActualWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualWidth(&value)); + check_hresult(WINRT_SHIM(IColumnDefinition)->get_ActualWidth(&value)); return value; } template Windows::UI::Xaml::DependencyProperty impl_IColumnDefinitionStatics::WidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_WidthProperty(put(value))); + check_hresult(WINRT_SHIM(IColumnDefinitionStatics)->get_WidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IColumnDefinitionStatics::MaxWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IColumnDefinitionStatics)->get_MaxWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IColumnDefinitionStatics::MinWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IColumnDefinitionStatics)->get_MinWidthProperty(put_abi(value))); return value; } template bool impl_IContextMenuEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IContextMenuEventArgs)->get_Handled(&value)); return value; } template void impl_IContextMenuEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IContextMenuEventArgs)->put_Handled(value)); } template double impl_IContextMenuEventArgs::CursorLeft() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CursorLeft(&value)); + check_hresult(WINRT_SHIM(IContextMenuEventArgs)->get_CursorLeft(&value)); return value; } template double impl_IContextMenuEventArgs::CursorTop() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CursorTop(&value)); + check_hresult(WINRT_SHIM(IContextMenuEventArgs)->get_CursorTop(&value)); return value; } -template Windows::IInspectable impl_IItemClickEventArgs::ClickedItem() const +template Windows::Foundation::IInspectable impl_IItemClickEventArgs::ClickedItem() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ClickedItem(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IItemClickEventArgs)->get_ClickedItem(put_abi(value))); return value; } template Windows::UI::Xaml::GridLength impl_IRowDefinition::Height() const { Windows::UI::Xaml::GridLength value {}; - check_hresult(static_cast(static_cast(*this))->get_Height(put(value))); + check_hresult(WINRT_SHIM(IRowDefinition)->get_Height(put_abi(value))); return value; } template void impl_IRowDefinition::Height(const Windows::UI::Xaml::GridLength & value) const { - check_hresult(static_cast(static_cast(*this))->put_Height(get(value))); + check_hresult(WINRT_SHIM(IRowDefinition)->put_Height(get_abi(value))); } template double impl_IRowDefinition::MaxHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxHeight(&value)); + check_hresult(WINRT_SHIM(IRowDefinition)->get_MaxHeight(&value)); return value; } template void impl_IRowDefinition::MaxHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxHeight(value)); + check_hresult(WINRT_SHIM(IRowDefinition)->put_MaxHeight(value)); } template double impl_IRowDefinition::MinHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MinHeight(&value)); + check_hresult(WINRT_SHIM(IRowDefinition)->get_MinHeight(&value)); return value; } template void impl_IRowDefinition::MinHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MinHeight(value)); + check_hresult(WINRT_SHIM(IRowDefinition)->put_MinHeight(value)); } template double impl_IRowDefinition::ActualHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualHeight(&value)); + check_hresult(WINRT_SHIM(IRowDefinition)->get_ActualHeight(&value)); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRowDefinitionStatics::HeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeightProperty(put(value))); + check_hresult(WINRT_SHIM(IRowDefinitionStatics)->get_HeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRowDefinitionStatics::MaxHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IRowDefinitionStatics)->get_MaxHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRowDefinitionStatics::MinHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IRowDefinitionStatics)->get_MinHeightProperty(put_abi(value))); return value; } -template Windows::Foundation::Collections::IVector impl_ISelectionChangedEventArgs::AddedItems() const +template Windows::Foundation::Collections::IVector impl_ISelectionChangedEventArgs::AddedItems() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AddedItems(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(ISelectionChangedEventArgs)->get_AddedItems(put_abi(value))); return value; } -template Windows::Foundation::Collections::IVector impl_ISelectionChangedEventArgs::RemovedItems() const +template Windows::Foundation::Collections::IVector impl_ISelectionChangedEventArgs::RemovedItems() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RemovedItems(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(ISelectionChangedEventArgs)->get_RemovedItems(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::SelectionChangedEventArgs impl_ISelectionChangedEventArgsFactory::CreateInstanceWithRemovedItemsAndAddedItems(const Windows::Foundation::Collections::IVector & removedItems, const Windows::Foundation::Collections::IVector & addedItems, const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::SelectionChangedEventArgs impl_ISelectionChangedEventArgsFactory::CreateInstanceWithRemovedItemsAndAddedItems(const Windows::Foundation::Collections::IVector & removedItems, const Windows::Foundation::Collections::IVector & addedItems, const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::SelectionChangedEventArgs instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithRemovedItemsAndAddedItems(get(removedItems), get(addedItems), get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISelectionChangedEventArgsFactory)->abi_CreateInstanceWithRemovedItemsAndAddedItems(get_abi(removedItems), get_abi(addedItems), get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::Brush impl_IBorder::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_BorderBrush(put_abi(value))); return value; } template void impl_IBorder::BorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderBrush(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_BorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IBorder::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_BorderThickness(put_abi(value))); return value; } template void impl_IBorder::BorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderThickness(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_BorderThickness(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IBorder::Background() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Background(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_Background(put_abi(value))); return value; } template void impl_IBorder::Background(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Background(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_Background(get_abi(value))); } template Windows::UI::Xaml::CornerRadius impl_IBorder::CornerRadius() const { Windows::UI::Xaml::CornerRadius value {}; - check_hresult(static_cast(static_cast(*this))->get_CornerRadius(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_CornerRadius(put_abi(value))); return value; } template void impl_IBorder::CornerRadius(const Windows::UI::Xaml::CornerRadius & value) const { - check_hresult(static_cast(static_cast(*this))->put_CornerRadius(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_CornerRadius(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IBorder::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_Padding(put_abi(value))); return value; } template void impl_IBorder::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::UIElement impl_IBorder::Child() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Child(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_Child(put_abi(value))); return value; } template void impl_IBorder::Child(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Child(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_Child(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IBorder::ChildTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildTransitions(put(value))); + check_hresult(WINRT_SHIM(IBorder)->get_ChildTransitions(put_abi(value))); return value; } template void impl_IBorder::ChildTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ChildTransitions(get(value))); + check_hresult(WINRT_SHIM(IBorder)->put_ChildTransitions(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::BorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_BorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::BorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_BorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::BackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_BackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::CornerRadiusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CornerRadiusProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_CornerRadiusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_PaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IBorderStatics::ChildTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IBorderStatics)->get_ChildTransitionsProperty(put_abi(value))); return value; } template Windows::Media::Capture::MediaCapture impl_ICaptureElement::Source() const { Windows::Media::Capture::MediaCapture value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(ICaptureElement)->get_Source(put_abi(value))); return value; } template void impl_ICaptureElement::Source(const Windows::Media::Capture::MediaCapture & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(ICaptureElement)->put_Source(get_abi(value))); } template Windows::UI::Xaml::Media::Stretch impl_ICaptureElement::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(ICaptureElement)->get_Stretch(&value)); return value; } template void impl_ICaptureElement::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(ICaptureElement)->put_Stretch(value)); } template Windows::UI::Xaml::DependencyProperty impl_ICaptureElementStatics::SourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceProperty(put(value))); + check_hresult(WINRT_SHIM(ICaptureElementStatics)->get_SourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICaptureElementStatics::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(ICaptureElementStatics)->get_StretchProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IContentPresenter::Content() const +template Windows::Foundation::IInspectable impl_IContentPresenter::Content() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContentPresenter)->get_Content(put_abi(value))); return value; } -template void impl_IContentPresenter::Content(const Windows::IInspectable & value) const +template void impl_IContentPresenter::Content(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_Content(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IContentPresenter::ContentTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplate(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_ContentTemplate(put_abi(value))); return value; } template void impl_IContentPresenter::ContentTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTemplate(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_ContentTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IContentPresenter::ContentTemplateSelector() const { Windows::UI::Xaml::Controls::DataTemplateSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateSelector(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_ContentTemplateSelector(put_abi(value))); return value; } template void impl_IContentPresenter::ContentTemplateSelector(const Windows::UI::Xaml::Controls::DataTemplateSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTemplateSelector(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_ContentTemplateSelector(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IContentPresenter::ContentTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTransitions(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_ContentTransitions(put_abi(value))); return value; } template void impl_IContentPresenter::ContentTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTransitions(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_ContentTransitions(get_abi(value))); } template double impl_IContentPresenter::FontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(&value)); + check_hresult(WINRT_SHIM(IContentPresenter)->get_FontSize(&value)); return value; } template void impl_IContentPresenter::FontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FontSize(value)); + check_hresult(WINRT_SHIM(IContentPresenter)->put_FontSize(value)); } template Windows::UI::Xaml::Media::FontFamily impl_IContentPresenter::FontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_FontFamily(put_abi(value))); return value; } template void impl_IContentPresenter::FontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontFamily(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_FontFamily(get_abi(value))); } template Windows::UI::Text::FontWeight impl_IContentPresenter::FontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_FontWeight(put_abi(value))); return value; } template void impl_IContentPresenter::FontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontWeight(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_FontWeight(get_abi(value))); } template Windows::UI::Text::FontStyle impl_IContentPresenter::FontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(IContentPresenter)->get_FontStyle(&value)); return value; } template void impl_IContentPresenter::FontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStyle(value)); + check_hresult(WINRT_SHIM(IContentPresenter)->put_FontStyle(value)); } template Windows::UI::Text::FontStretch impl_IContentPresenter::FontStretch() const { Windows::UI::Text::FontStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStretch(&value)); + check_hresult(WINRT_SHIM(IContentPresenter)->get_FontStretch(&value)); return value; } template void impl_IContentPresenter::FontStretch(Windows::UI::Text::FontStretch value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStretch(value)); + check_hresult(WINRT_SHIM(IContentPresenter)->put_FontStretch(value)); } template int32_t impl_IContentPresenter::CharacterSpacing() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacing(&value)); + check_hresult(WINRT_SHIM(IContentPresenter)->get_CharacterSpacing(&value)); return value; } template void impl_IContentPresenter::CharacterSpacing(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CharacterSpacing(value)); + check_hresult(WINRT_SHIM(IContentPresenter)->put_CharacterSpacing(value)); } template Windows::UI::Xaml::Media::Brush impl_IContentPresenter::Foreground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Foreground(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->get_Foreground(put_abi(value))); return value; } template void impl_IContentPresenter::Foreground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Foreground(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter)->put_Foreground(get_abi(value))); } template void impl_IContentPresenterOverrides::OnContentTemplateChanged(const Windows::UI::Xaml::DataTemplate & oldContentTemplate, const Windows::UI::Xaml::DataTemplate & newContentTemplate) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentTemplateChanged(get(oldContentTemplate), get(newContentTemplate))); + check_hresult(WINRT_SHIM(IContentPresenterOverrides)->abi_OnContentTemplateChanged(get_abi(oldContentTemplate), get_abi(newContentTemplate))); } template void impl_IContentPresenterOverrides::OnContentTemplateSelectorChanged(const Windows::UI::Xaml::Controls::DataTemplateSelector & oldContentTemplateSelector, const Windows::UI::Xaml::Controls::DataTemplateSelector & newContentTemplateSelector) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentTemplateSelectorChanged(get(oldContentTemplateSelector), get(newContentTemplateSelector))); + check_hresult(WINRT_SHIM(IContentPresenterOverrides)->abi_OnContentTemplateSelectorChanged(get_abi(oldContentTemplateSelector), get_abi(newContentTemplateSelector))); } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::ContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_ContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::ContentTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_ContentTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::ContentTemplateSelectorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateSelectorProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_ContentTemplateSelectorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::ContentTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_ContentTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::FontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_FontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::FontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_FontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::FontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_FontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::FontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_FontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::FontStretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStretchProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_FontStretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::CharacterSpacingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacingProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_CharacterSpacingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics::ForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics)->get_ForegroundProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ContentPresenter impl_IContentPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ContentPresenter impl_IContentPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ContentPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IContentPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::OpticalMarginAlignment impl_IContentPresenter2::OpticalMarginAlignment() const { Windows::UI::Xaml::OpticalMarginAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignment(&value)); + check_hresult(WINRT_SHIM(IContentPresenter2)->get_OpticalMarginAlignment(&value)); return value; } template void impl_IContentPresenter2::OpticalMarginAlignment(Windows::UI::Xaml::OpticalMarginAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_OpticalMarginAlignment(value)); + check_hresult(WINRT_SHIM(IContentPresenter2)->put_OpticalMarginAlignment(value)); } template Windows::UI::Xaml::TextLineBounds impl_IContentPresenter2::TextLineBounds() const { Windows::UI::Xaml::TextLineBounds value {}; - check_hresult(static_cast(static_cast(*this))->get_TextLineBounds(&value)); + check_hresult(WINRT_SHIM(IContentPresenter2)->get_TextLineBounds(&value)); return value; } template void impl_IContentPresenter2::TextLineBounds(Windows::UI::Xaml::TextLineBounds value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLineBounds(value)); + check_hresult(WINRT_SHIM(IContentPresenter2)->put_TextLineBounds(value)); } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics2::OpticalMarginAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics2)->get_OpticalMarginAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics2::TextLineBoundsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextLineBoundsProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics2)->get_TextLineBoundsProperty(put_abi(value))); return value; } template bool impl_IContentPresenter3::IsTextScaleFactorEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabled(&value)); + check_hresult(WINRT_SHIM(IContentPresenter3)->get_IsTextScaleFactorEnabled(&value)); return value; } template void impl_IContentPresenter3::IsTextScaleFactorEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextScaleFactorEnabled(value)); + check_hresult(WINRT_SHIM(IContentPresenter3)->put_IsTextScaleFactorEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics3::IsTextScaleFactorEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics3)->get_IsTextScaleFactorEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::TextWrapping impl_IContentPresenter4::TextWrapping() const { Windows::UI::Xaml::TextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_TextWrapping(&value)); return value; } template void impl_IContentPresenter4::TextWrapping(Windows::UI::Xaml::TextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_TextWrapping(value)); } template int32_t impl_IContentPresenter4::MaxLines() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_MaxLines(&value)); return value; } template void impl_IContentPresenter4::MaxLines(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLines(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_MaxLines(value)); } template Windows::UI::Xaml::LineStackingStrategy impl_IContentPresenter4::LineStackingStrategy() const { Windows::UI::Xaml::LineStackingStrategy value {}; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategy(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_LineStackingStrategy(&value)); return value; } template void impl_IContentPresenter4::LineStackingStrategy(Windows::UI::Xaml::LineStackingStrategy value) const { - check_hresult(static_cast(static_cast(*this))->put_LineStackingStrategy(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_LineStackingStrategy(value)); } template double impl_IContentPresenter4::LineHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LineHeight(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_LineHeight(&value)); return value; } template void impl_IContentPresenter4::LineHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_LineHeight(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_LineHeight(value)); } template Windows::UI::Xaml::Media::Brush impl_IContentPresenter4::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_BorderBrush(put_abi(value))); return value; } template void impl_IContentPresenter4::BorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderBrush(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_BorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IContentPresenter4::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_BorderThickness(put_abi(value))); return value; } template void impl_IContentPresenter4::BorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderThickness(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_BorderThickness(get_abi(value))); } template Windows::UI::Xaml::CornerRadius impl_IContentPresenter4::CornerRadius() const { Windows::UI::Xaml::CornerRadius value {}; - check_hresult(static_cast(static_cast(*this))->get_CornerRadius(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_CornerRadius(put_abi(value))); return value; } template void impl_IContentPresenter4::CornerRadius(const Windows::UI::Xaml::CornerRadius & value) const { - check_hresult(static_cast(static_cast(*this))->put_CornerRadius(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_CornerRadius(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IContentPresenter4::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_Padding(put_abi(value))); return value; } template void impl_IContentPresenter4::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_IContentPresenter4::Background() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Background(put(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_Background(put_abi(value))); return value; } template void impl_IContentPresenter4::Background(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Background(get(value))); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_Background(get_abi(value))); } template Windows::UI::Xaml::HorizontalAlignment impl_IContentPresenter4::HorizontalContentAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_HorizontalContentAlignment(&value)); return value; } template void impl_IContentPresenter4::HorizontalContentAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalContentAlignment(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_HorizontalContentAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_IContentPresenter4::VerticalContentAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalContentAlignment(&value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->get_VerticalContentAlignment(&value)); return value; } template void impl_IContentPresenter4::VerticalContentAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalContentAlignment(value)); + check_hresult(WINRT_SHIM(IContentPresenter4)->put_VerticalContentAlignment(value)); } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::TextWrappingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextWrappingProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_TextWrappingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::MaxLinesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLinesProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_MaxLinesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::LineStackingStrategyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategyProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_LineStackingStrategyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::LineHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_LineHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::BorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_BorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::BorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_BorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::CornerRadiusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CornerRadiusProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_CornerRadiusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_PaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::BackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_BackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::HorizontalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_HorizontalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentPresenterStatics4::VerticalContentAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalContentAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IContentPresenterStatics4)->get_VerticalContentAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::ImageSource impl_IImage::Source() const { Windows::UI::Xaml::Media::ImageSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IImage)->get_Source(put_abi(value))); return value; } template void impl_IImage::Source(const Windows::UI::Xaml::Media::ImageSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(IImage)->put_Source(get_abi(value))); } template Windows::UI::Xaml::Media::Stretch impl_IImage::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(IImage)->get_Stretch(&value)); return value; } template void impl_IImage::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(IImage)->put_Stretch(value)); } template Windows::UI::Xaml::Thickness impl_IImage::NineGrid() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_NineGrid(put(value))); + check_hresult(WINRT_SHIM(IImage)->get_NineGrid(put_abi(value))); return value; } template void impl_IImage::NineGrid(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_NineGrid(get(value))); + check_hresult(WINRT_SHIM(IImage)->put_NineGrid(get_abi(value))); } template Windows::Media::PlayTo::PlayToSource impl_IImage::PlayToSource() const { Windows::Media::PlayTo::PlayToSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToSource(put(value))); + check_hresult(WINRT_SHIM(IImage)->get_PlayToSource(put_abi(value))); return value; } template event_token impl_IImage::ImageFailed(const Windows::UI::Xaml::ExceptionRoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ImageFailed(get(value), &token)); + check_hresult(WINRT_SHIM(IImage)->add_ImageFailed(get_abi(value), &token)); return token; } @@ -43618,13 +46549,13 @@ template event_revoker impl_IImage::ImageFailed(auto_rev template void impl_IImage::ImageFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ImageFailed(token)); + check_hresult(WINRT_SHIM(IImage)->remove_ImageFailed(token)); } template event_token impl_IImage::ImageOpened(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ImageOpened(get(value), &token)); + check_hresult(WINRT_SHIM(IImage)->add_ImageOpened(get_abi(value), &token)); return token; } @@ -43635,490 +46566,490 @@ template event_revoker impl_IImage::ImageOpened(auto_rev template void impl_IImage::ImageOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ImageOpened(token)); + check_hresult(WINRT_SHIM(IImage)->remove_ImageOpened(token)); } template Windows::UI::Xaml::DependencyProperty impl_IImageStatics::SourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceProperty(put(value))); + check_hresult(WINRT_SHIM(IImageStatics)->get_SourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IImageStatics::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(IImageStatics)->get_StretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IImageStatics::NineGridProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NineGridProperty(put(value))); + check_hresult(WINRT_SHIM(IImageStatics)->get_NineGridProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IImageStatics::PlayToSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IImageStatics)->get_PlayToSourceProperty(put_abi(value))); return value; } template Windows::Media::Casting::CastingSource impl_IImage2::GetAsCastingSource() const { Windows::Media::Casting::CastingSource returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAsCastingSource(put(returnValue))); + check_hresult(WINRT_SHIM(IImage2)->abi_GetAsCastingSource(put_abi(returnValue))); return returnValue; } template Windows::UI::Composition::CompositionBrush impl_IImage3::GetAlphaMask() const { Windows::UI::Composition::CompositionBrush returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAlphaMask(put(returnValue))); + check_hresult(WINRT_SHIM(IImage3)->abi_GetAlphaMask(put_abi(returnValue))); return returnValue; } -template Windows::IInspectable impl_IItemsPresenter::Header() const +template Windows::Foundation::IInspectable impl_IItemsPresenter::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IItemsPresenter)->get_Header(put_abi(value))); return value; } -template void impl_IItemsPresenter::Header(const Windows::IInspectable & value) const +template void impl_IItemsPresenter::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IItemsPresenter::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IItemsPresenter::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IItemsPresenter::HeaderTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTransitions(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->get_HeaderTransitions(put_abi(value))); return value; } template void impl_IItemsPresenter::HeaderTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTransitions(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->put_HeaderTransitions(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IItemsPresenter::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->get_Padding(put_abi(value))); return value; } template void impl_IItemsPresenter::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics::HeaderTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics)->get_HeaderTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics)->get_PaddingProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IItemsPresenter2::Footer() const +template Windows::Foundation::IInspectable impl_IItemsPresenter2::Footer() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Footer(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IItemsPresenter2)->get_Footer(put_abi(value))); return value; } -template void impl_IItemsPresenter2::Footer(const Windows::IInspectable & value) const +template void impl_IItemsPresenter2::Footer(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Footer(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter2)->put_Footer(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IItemsPresenter2::FooterTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTemplate(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenter2)->get_FooterTemplate(put_abi(value))); return value; } template void impl_IItemsPresenter2::FooterTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_FooterTemplate(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter2)->put_FooterTemplate(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IItemsPresenter2::FooterTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTransitions(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenter2)->get_FooterTransitions(put_abi(value))); return value; } template void impl_IItemsPresenter2::FooterTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_FooterTransitions(get(value))); + check_hresult(WINRT_SHIM(IItemsPresenter2)->put_FooterTransitions(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics2::FooterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics2)->get_FooterProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics2::FooterTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics2)->get_FooterTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsPresenterStatics2::FooterTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsPresenterStatics2)->get_FooterTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::UIElementCollection impl_IPanel::Children() const { Windows::UI::Xaml::Controls::UIElementCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Children(put(value))); + check_hresult(WINRT_SHIM(IPanel)->get_Children(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_IPanel::Background() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Background(put(value))); + check_hresult(WINRT_SHIM(IPanel)->get_Background(put_abi(value))); return value; } template void impl_IPanel::Background(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Background(get(value))); + check_hresult(WINRT_SHIM(IPanel)->put_Background(get_abi(value))); } template bool impl_IPanel::IsItemsHost() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsItemsHost(&value)); + check_hresult(WINRT_SHIM(IPanel)->get_IsItemsHost(&value)); return value; } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IPanel::ChildrenTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildrenTransitions(put(value))); + check_hresult(WINRT_SHIM(IPanel)->get_ChildrenTransitions(put_abi(value))); return value; } template void impl_IPanel::ChildrenTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ChildrenTransitions(get(value))); + check_hresult(WINRT_SHIM(IPanel)->put_ChildrenTransitions(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IPanelStatics::BackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(IPanelStatics)->get_BackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPanelStatics::IsItemsHostProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsItemsHostProperty(put(value))); + check_hresult(WINRT_SHIM(IPanelStatics)->get_IsItemsHostProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPanelStatics::ChildrenTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChildrenTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IPanelStatics)->get_ChildrenTransitionsProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Panel impl_IPanelFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Panel impl_IPanelFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Panel instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IPanelFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template double impl_IRichTextBlock::FontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_FontSize(&value)); return value; } template void impl_IRichTextBlock::FontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FontSize(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_FontSize(value)); } template Windows::UI::Xaml::Media::FontFamily impl_IRichTextBlock::FontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_FontFamily(put_abi(value))); return value; } template void impl_IRichTextBlock::FontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontFamily(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_FontFamily(get_abi(value))); } template Windows::UI::Text::FontWeight impl_IRichTextBlock::FontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_FontWeight(put_abi(value))); return value; } template void impl_IRichTextBlock::FontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontWeight(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_FontWeight(get_abi(value))); } template Windows::UI::Text::FontStyle impl_IRichTextBlock::FontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_FontStyle(&value)); return value; } template void impl_IRichTextBlock::FontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStyle(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_FontStyle(value)); } template Windows::UI::Text::FontStretch impl_IRichTextBlock::FontStretch() const { Windows::UI::Text::FontStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStretch(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_FontStretch(&value)); return value; } template void impl_IRichTextBlock::FontStretch(Windows::UI::Text::FontStretch value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStretch(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_FontStretch(value)); } template Windows::UI::Xaml::Media::Brush impl_IRichTextBlock::Foreground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Foreground(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_Foreground(put_abi(value))); return value; } template void impl_IRichTextBlock::Foreground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Foreground(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_Foreground(get_abi(value))); } template Windows::UI::Xaml::TextWrapping impl_IRichTextBlock::TextWrapping() const { Windows::UI::Xaml::TextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_TextWrapping(&value)); return value; } template void impl_IRichTextBlock::TextWrapping(Windows::UI::Xaml::TextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_TextWrapping(value)); } template Windows::UI::Xaml::TextTrimming impl_IRichTextBlock::TextTrimming() const { Windows::UI::Xaml::TextTrimming value {}; - check_hresult(static_cast(static_cast(*this))->get_TextTrimming(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_TextTrimming(&value)); return value; } template void impl_IRichTextBlock::TextTrimming(Windows::UI::Xaml::TextTrimming value) const { - check_hresult(static_cast(static_cast(*this))->put_TextTrimming(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_TextTrimming(value)); } template Windows::UI::Xaml::TextAlignment impl_IRichTextBlock::TextAlignment() const { Windows::UI::Xaml::TextAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_TextAlignment(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_TextAlignment(&value)); return value; } template void impl_IRichTextBlock::TextAlignment(Windows::UI::Xaml::TextAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_TextAlignment(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_TextAlignment(value)); } template Windows::UI::Xaml::Documents::BlockCollection impl_IRichTextBlock::Blocks() const { Windows::UI::Xaml::Documents::BlockCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Blocks(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_Blocks(put_abi(value))); return value; } template Windows::UI::Xaml::Thickness impl_IRichTextBlock::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_Padding(put_abi(value))); return value; } template void impl_IRichTextBlock::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_Padding(get_abi(value))); } template double impl_IRichTextBlock::LineHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LineHeight(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_LineHeight(&value)); return value; } template void impl_IRichTextBlock::LineHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_LineHeight(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_LineHeight(value)); } template Windows::UI::Xaml::LineStackingStrategy impl_IRichTextBlock::LineStackingStrategy() const { Windows::UI::Xaml::LineStackingStrategy value {}; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategy(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_LineStackingStrategy(&value)); return value; } template void impl_IRichTextBlock::LineStackingStrategy(Windows::UI::Xaml::LineStackingStrategy value) const { - check_hresult(static_cast(static_cast(*this))->put_LineStackingStrategy(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_LineStackingStrategy(value)); } template int32_t impl_IRichTextBlock::CharacterSpacing() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacing(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_CharacterSpacing(&value)); return value; } template void impl_IRichTextBlock::CharacterSpacing(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CharacterSpacing(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_CharacterSpacing(value)); } template Windows::UI::Xaml::Controls::RichTextBlockOverflow impl_IRichTextBlock::OverflowContentTarget() const { Windows::UI::Xaml::Controls::RichTextBlockOverflow value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentTarget(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_OverflowContentTarget(put_abi(value))); return value; } template void impl_IRichTextBlock::OverflowContentTarget(const Windows::UI::Xaml::Controls::RichTextBlockOverflow & value) const { - check_hresult(static_cast(static_cast(*this))->put_OverflowContentTarget(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_OverflowContentTarget(get_abi(value))); } template bool impl_IRichTextBlock::IsTextSelectionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextSelectionEnabled(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_IsTextSelectionEnabled(&value)); return value; } template void impl_IRichTextBlock::IsTextSelectionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextSelectionEnabled(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_IsTextSelectionEnabled(value)); } template bool impl_IRichTextBlock::HasOverflowContent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasOverflowContent(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_HasOverflowContent(&value)); return value; } template hstring impl_IRichTextBlock::SelectedText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SelectedText(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_SelectedText(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlock::ContentStart() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentStart(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_ContentStart(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlock::ContentEnd() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentEnd(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_ContentEnd(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlock::SelectionStart() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionStart(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_SelectionStart(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlock::SelectionEnd() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionEnd(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_SelectionEnd(put_abi(value))); return value; } template double impl_IRichTextBlock::BaselineOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BaselineOffset(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_BaselineOffset(&value)); return value; } template event_token impl_IRichTextBlock::SelectionChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRichTextBlock)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -44129,13 +47060,13 @@ template event_revoker impl_IRichTextBlock::Sele template void impl_IRichTextBlock::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(IRichTextBlock)->remove_SelectionChanged(token)); } template event_token impl_IRichTextBlock::ContextMenuOpening(const Windows::UI::Xaml::Controls::ContextMenuOpeningEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContextMenuOpening(get(value), &token)); + check_hresult(WINRT_SHIM(IRichTextBlock)->add_ContextMenuOpening(get_abi(value), &token)); return token; } @@ -44146,650 +47077,650 @@ template event_revoker impl_IRichTextBlock::Cont template void impl_IRichTextBlock::ContextMenuOpening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContextMenuOpening(token)); + check_hresult(WINRT_SHIM(IRichTextBlock)->remove_ContextMenuOpening(token)); } template void impl_IRichTextBlock::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(IRichTextBlock)->abi_SelectAll()); } template void impl_IRichTextBlock::Select(const Windows::UI::Xaml::Documents::TextPointer & start, const Windows::UI::Xaml::Documents::TextPointer & end) const { - check_hresult(static_cast(static_cast(*this))->abi_Select(get(start), get(end))); + check_hresult(WINRT_SHIM(IRichTextBlock)->abi_Select(get_abi(start), get_abi(end))); } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlock::GetPositionFromPoint(const Windows::Foundation::Point & point) const { Windows::UI::Xaml::Documents::TextPointer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPositionFromPoint(get(point), put(returnValue))); + check_hresult(WINRT_SHIM(IRichTextBlock)->abi_GetPositionFromPoint(get_abi(point), put_abi(returnValue))); return returnValue; } template bool impl_IRichTextBlock::Focus(Windows::UI::Xaml::FocusState value) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Focus(value, &returnValue)); + check_hresult(WINRT_SHIM(IRichTextBlock)->abi_Focus(value, &returnValue)); return returnValue; } template double impl_IRichTextBlock::TextIndent() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_TextIndent(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->get_TextIndent(&value)); return value; } template void impl_IRichTextBlock::TextIndent(double value) const { - check_hresult(static_cast(static_cast(*this))->put_TextIndent(value)); + check_hresult(WINRT_SHIM(IRichTextBlock)->put_TextIndent(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::FontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_FontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::FontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_FontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::FontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_FontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::FontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_FontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::FontStretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStretchProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_FontStretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::ForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_ForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::TextWrappingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextWrappingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_TextWrappingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::TextTrimmingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextTrimmingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_TextTrimmingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::TextAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_TextAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_PaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::LineHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_LineHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::LineStackingStrategyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategyProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_LineStackingStrategyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::CharacterSpacingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_CharacterSpacingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::OverflowContentTargetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentTargetProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_OverflowContentTargetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::IsTextSelectionEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextSelectionEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_IsTextSelectionEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::HasOverflowContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HasOverflowContentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_HasOverflowContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::SelectedTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedTextProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_SelectedTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics::TextIndentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextIndentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics)->get_TextIndentProperty(put_abi(value))); return value; } template int32_t impl_IRichTextBlock2::MaxLines() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_MaxLines(&value)); return value; } template void impl_IRichTextBlock2::MaxLines(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLines(value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_MaxLines(value)); } template Windows::UI::Xaml::TextLineBounds impl_IRichTextBlock2::TextLineBounds() const { Windows::UI::Xaml::TextLineBounds value {}; - check_hresult(static_cast(static_cast(*this))->get_TextLineBounds(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_TextLineBounds(&value)); return value; } template void impl_IRichTextBlock2::TextLineBounds(Windows::UI::Xaml::TextLineBounds value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLineBounds(value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_TextLineBounds(value)); } template Windows::UI::Xaml::Media::SolidColorBrush impl_IRichTextBlock2::SelectionHighlightColor() const { Windows::UI::Xaml::Media::SolidColorBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColor(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_SelectionHighlightColor(put_abi(value))); return value; } template void impl_IRichTextBlock2::SelectionHighlightColor(const Windows::UI::Xaml::Media::SolidColorBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionHighlightColor(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_SelectionHighlightColor(get_abi(value))); } template Windows::UI::Xaml::OpticalMarginAlignment impl_IRichTextBlock2::OpticalMarginAlignment() const { Windows::UI::Xaml::OpticalMarginAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignment(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_OpticalMarginAlignment(&value)); return value; } template void impl_IRichTextBlock2::OpticalMarginAlignment(Windows::UI::Xaml::OpticalMarginAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_OpticalMarginAlignment(value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_OpticalMarginAlignment(value)); } template bool impl_IRichTextBlock2::IsColorFontEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabled(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_IsColorFontEnabled(&value)); return value; } template void impl_IRichTextBlock2::IsColorFontEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsColorFontEnabled(value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_IsColorFontEnabled(value)); } template Windows::UI::Xaml::TextReadingOrder impl_IRichTextBlock2::TextReadingOrder() const { Windows::UI::Xaml::TextReadingOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrder(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->get_TextReadingOrder(&value)); return value; } template void impl_IRichTextBlock2::TextReadingOrder(Windows::UI::Xaml::TextReadingOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_TextReadingOrder(value)); + check_hresult(WINRT_SHIM(IRichTextBlock2)->put_TextReadingOrder(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::MaxLinesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLinesProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_MaxLinesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::TextLineBoundsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextLineBoundsProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_TextLineBoundsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::SelectionHighlightColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColorProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_SelectionHighlightColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::OpticalMarginAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_OpticalMarginAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::IsColorFontEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_IsColorFontEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics2::TextReadingOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrderProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics2)->get_TextReadingOrderProperty(put_abi(value))); return value; } template bool impl_IRichTextBlock3::IsTextScaleFactorEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabled(&value)); + check_hresult(WINRT_SHIM(IRichTextBlock3)->get_IsTextScaleFactorEnabled(&value)); return value; } template void impl_IRichTextBlock3::IsTextScaleFactorEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextScaleFactorEnabled(value)); + check_hresult(WINRT_SHIM(IRichTextBlock3)->put_IsTextScaleFactorEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockStatics3::IsTextScaleFactorEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockStatics3)->get_IsTextScaleFactorEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::RichTextBlockOverflow impl_IRichTextBlockOverflow::OverflowContentTarget() const { Windows::UI::Xaml::Controls::RichTextBlockOverflow value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentTarget(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_OverflowContentTarget(put_abi(value))); return value; } template void impl_IRichTextBlockOverflow::OverflowContentTarget(const Windows::UI::Xaml::Controls::RichTextBlockOverflow & value) const { - check_hresult(static_cast(static_cast(*this))->put_OverflowContentTarget(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->put_OverflowContentTarget(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IRichTextBlockOverflow::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_Padding(put_abi(value))); return value; } template void impl_IRichTextBlockOverflow::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::Controls::RichTextBlock impl_IRichTextBlockOverflow::ContentSource() const { Windows::UI::Xaml::Controls::RichTextBlock value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentSource(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_ContentSource(put_abi(value))); return value; } template bool impl_IRichTextBlockOverflow::HasOverflowContent() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_HasOverflowContent(&value)); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_HasOverflowContent(&value)); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlockOverflow::ContentStart() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentStart(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_ContentStart(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlockOverflow::ContentEnd() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentEnd(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_ContentEnd(put_abi(value))); return value; } template double impl_IRichTextBlockOverflow::BaselineOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BaselineOffset(&value)); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->get_BaselineOffset(&value)); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_IRichTextBlockOverflow::GetPositionFromPoint(const Windows::Foundation::Point & point) const { Windows::UI::Xaml::Documents::TextPointer returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetPositionFromPoint(get(point), put(returnValue))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->abi_GetPositionFromPoint(get_abi(point), put_abi(returnValue))); return returnValue; } template bool impl_IRichTextBlockOverflow::Focus(Windows::UI::Xaml::FocusState value) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Focus(value, &returnValue)); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow)->abi_Focus(value, &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockOverflowStatics::OverflowContentTargetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OverflowContentTargetProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflowStatics)->get_OverflowContentTargetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockOverflowStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflowStatics)->get_PaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockOverflowStatics::HasOverflowContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HasOverflowContentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflowStatics)->get_HasOverflowContentProperty(put_abi(value))); return value; } template int32_t impl_IRichTextBlockOverflow2::MaxLines() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(&value)); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow2)->get_MaxLines(&value)); return value; } template void impl_IRichTextBlockOverflow2::MaxLines(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLines(value)); + check_hresult(WINRT_SHIM(IRichTextBlockOverflow2)->put_MaxLines(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRichTextBlockOverflowStatics2::MaxLinesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLinesProperty(put(value))); + check_hresult(WINRT_SHIM(IRichTextBlockOverflowStatics2)->get_MaxLinesProperty(put_abi(value))); return value; } template double impl_ITextBlock::FontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_FontSize(&value)); return value; } template void impl_ITextBlock::FontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FontSize(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_FontSize(value)); } template Windows::UI::Xaml::Media::FontFamily impl_ITextBlock::FontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_FontFamily(put_abi(value))); return value; } template void impl_ITextBlock::FontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontFamily(get(value))); + check_hresult(WINRT_SHIM(ITextBlock)->put_FontFamily(get_abi(value))); } template Windows::UI::Text::FontWeight impl_ITextBlock::FontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_FontWeight(put_abi(value))); return value; } template void impl_ITextBlock::FontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontWeight(get(value))); + check_hresult(WINRT_SHIM(ITextBlock)->put_FontWeight(get_abi(value))); } template Windows::UI::Text::FontStyle impl_ITextBlock::FontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_FontStyle(&value)); return value; } template void impl_ITextBlock::FontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStyle(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_FontStyle(value)); } template Windows::UI::Text::FontStretch impl_ITextBlock::FontStretch() const { Windows::UI::Text::FontStretch value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStretch(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_FontStretch(&value)); return value; } template void impl_ITextBlock::FontStretch(Windows::UI::Text::FontStretch value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStretch(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_FontStretch(value)); } template int32_t impl_ITextBlock::CharacterSpacing() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacing(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_CharacterSpacing(&value)); return value; } template void impl_ITextBlock::CharacterSpacing(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CharacterSpacing(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_CharacterSpacing(value)); } template Windows::UI::Xaml::Media::Brush impl_ITextBlock::Foreground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Foreground(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_Foreground(put_abi(value))); return value; } template void impl_ITextBlock::Foreground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Foreground(get(value))); + check_hresult(WINRT_SHIM(ITextBlock)->put_Foreground(get_abi(value))); } template Windows::UI::Xaml::TextWrapping impl_ITextBlock::TextWrapping() const { Windows::UI::Xaml::TextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_TextWrapping(&value)); return value; } template void impl_ITextBlock::TextWrapping(Windows::UI::Xaml::TextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_TextWrapping(value)); } template Windows::UI::Xaml::TextTrimming impl_ITextBlock::TextTrimming() const { Windows::UI::Xaml::TextTrimming value {}; - check_hresult(static_cast(static_cast(*this))->get_TextTrimming(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_TextTrimming(&value)); return value; } template void impl_ITextBlock::TextTrimming(Windows::UI::Xaml::TextTrimming value) const { - check_hresult(static_cast(static_cast(*this))->put_TextTrimming(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_TextTrimming(value)); } template Windows::UI::Xaml::TextAlignment impl_ITextBlock::TextAlignment() const { Windows::UI::Xaml::TextAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_TextAlignment(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_TextAlignment(&value)); return value; } template void impl_ITextBlock::TextAlignment(Windows::UI::Xaml::TextAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_TextAlignment(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_TextAlignment(value)); } template hstring impl_ITextBlock::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_Text(put_abi(value))); return value; } -template void impl_ITextBlock::Text(hstring_ref value) const +template void impl_ITextBlock::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(ITextBlock)->put_Text(get_abi(value))); } template Windows::UI::Xaml::Documents::InlineCollection impl_ITextBlock::Inlines() const { Windows::UI::Xaml::Documents::InlineCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Inlines(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_Inlines(put_abi(value))); return value; } template Windows::UI::Xaml::Thickness impl_ITextBlock::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_Padding(put_abi(value))); return value; } template void impl_ITextBlock::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(ITextBlock)->put_Padding(get_abi(value))); } template double impl_ITextBlock::LineHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_LineHeight(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_LineHeight(&value)); return value; } template void impl_ITextBlock::LineHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_LineHeight(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_LineHeight(value)); } template Windows::UI::Xaml::LineStackingStrategy impl_ITextBlock::LineStackingStrategy() const { Windows::UI::Xaml::LineStackingStrategy value {}; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategy(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_LineStackingStrategy(&value)); return value; } template void impl_ITextBlock::LineStackingStrategy(Windows::UI::Xaml::LineStackingStrategy value) const { - check_hresult(static_cast(static_cast(*this))->put_LineStackingStrategy(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_LineStackingStrategy(value)); } template bool impl_ITextBlock::IsTextSelectionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextSelectionEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_IsTextSelectionEnabled(&value)); return value; } template void impl_ITextBlock::IsTextSelectionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextSelectionEnabled(value)); + check_hresult(WINRT_SHIM(ITextBlock)->put_IsTextSelectionEnabled(value)); } template hstring impl_ITextBlock::SelectedText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SelectedText(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_SelectedText(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_ITextBlock::ContentStart() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentStart(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_ContentStart(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_ITextBlock::ContentEnd() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentEnd(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_ContentEnd(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_ITextBlock::SelectionStart() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionStart(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_SelectionStart(put_abi(value))); return value; } template Windows::UI::Xaml::Documents::TextPointer impl_ITextBlock::SelectionEnd() const { Windows::UI::Xaml::Documents::TextPointer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionEnd(put(value))); + check_hresult(WINRT_SHIM(ITextBlock)->get_SelectionEnd(put_abi(value))); return value; } template double impl_ITextBlock::BaselineOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BaselineOffset(&value)); + check_hresult(WINRT_SHIM(ITextBlock)->get_BaselineOffset(&value)); return value; } template event_token impl_ITextBlock::SelectionChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBlock)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -44800,13 +47731,13 @@ template event_revoker impl_ITextBlock::SelectionCha template void impl_ITextBlock::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(ITextBlock)->remove_SelectionChanged(token)); } template event_token impl_ITextBlock::ContextMenuOpening(const Windows::UI::Xaml::Controls::ContextMenuOpeningEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContextMenuOpening(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBlock)->add_ContextMenuOpening(get_abi(value), &token)); return token; } @@ -44817,1383 +47748,1383 @@ template event_revoker impl_ITextBlock::ContextMenuO template void impl_ITextBlock::ContextMenuOpening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContextMenuOpening(token)); + check_hresult(WINRT_SHIM(ITextBlock)->remove_ContextMenuOpening(token)); } template void impl_ITextBlock::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(ITextBlock)->abi_SelectAll()); } template void impl_ITextBlock::Select(const Windows::UI::Xaml::Documents::TextPointer & start, const Windows::UI::Xaml::Documents::TextPointer & end) const { - check_hresult(static_cast(static_cast(*this))->abi_Select(get(start), get(end))); + check_hresult(WINRT_SHIM(ITextBlock)->abi_Select(get_abi(start), get_abi(end))); } template bool impl_ITextBlock::Focus(Windows::UI::Xaml::FocusState value) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Focus(value, &returnValue)); + check_hresult(WINRT_SHIM(ITextBlock)->abi_Focus(value, &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::FontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_FontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::FontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_FontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::FontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_FontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::FontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_FontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::FontStretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStretchProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_FontStretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::CharacterSpacingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CharacterSpacingProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_CharacterSpacingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::ForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_ForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::TextWrappingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextWrappingProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_TextWrappingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::TextTrimmingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextTrimmingProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_TextTrimmingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::TextAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_TextAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::TextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_TextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_PaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::LineHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineHeightProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_LineHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::LineStackingStrategyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LineStackingStrategyProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_LineStackingStrategyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::IsTextSelectionEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextSelectionEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_IsTextSelectionEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics::SelectedTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedTextProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics)->get_SelectedTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::SolidColorBrush impl_ITextBlock2::SelectionHighlightColor() const { Windows::UI::Xaml::Media::SolidColorBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColor(put(value))); + check_hresult(WINRT_SHIM(ITextBlock2)->get_SelectionHighlightColor(put_abi(value))); return value; } template void impl_ITextBlock2::SelectionHighlightColor(const Windows::UI::Xaml::Media::SolidColorBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionHighlightColor(get(value))); + check_hresult(WINRT_SHIM(ITextBlock2)->put_SelectionHighlightColor(get_abi(value))); } template int32_t impl_ITextBlock2::MaxLines() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLines(&value)); + check_hresult(WINRT_SHIM(ITextBlock2)->get_MaxLines(&value)); return value; } template void impl_ITextBlock2::MaxLines(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLines(value)); + check_hresult(WINRT_SHIM(ITextBlock2)->put_MaxLines(value)); } template Windows::UI::Xaml::TextLineBounds impl_ITextBlock2::TextLineBounds() const { Windows::UI::Xaml::TextLineBounds value {}; - check_hresult(static_cast(static_cast(*this))->get_TextLineBounds(&value)); + check_hresult(WINRT_SHIM(ITextBlock2)->get_TextLineBounds(&value)); return value; } template void impl_ITextBlock2::TextLineBounds(Windows::UI::Xaml::TextLineBounds value) const { - check_hresult(static_cast(static_cast(*this))->put_TextLineBounds(value)); + check_hresult(WINRT_SHIM(ITextBlock2)->put_TextLineBounds(value)); } template Windows::UI::Xaml::OpticalMarginAlignment impl_ITextBlock2::OpticalMarginAlignment() const { Windows::UI::Xaml::OpticalMarginAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignment(&value)); + check_hresult(WINRT_SHIM(ITextBlock2)->get_OpticalMarginAlignment(&value)); return value; } template void impl_ITextBlock2::OpticalMarginAlignment(Windows::UI::Xaml::OpticalMarginAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_OpticalMarginAlignment(value)); + check_hresult(WINRT_SHIM(ITextBlock2)->put_OpticalMarginAlignment(value)); } template bool impl_ITextBlock2::IsColorFontEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBlock2)->get_IsColorFontEnabled(&value)); return value; } template void impl_ITextBlock2::IsColorFontEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsColorFontEnabled(value)); + check_hresult(WINRT_SHIM(ITextBlock2)->put_IsColorFontEnabled(value)); } template Windows::UI::Xaml::TextReadingOrder impl_ITextBlock2::TextReadingOrder() const { Windows::UI::Xaml::TextReadingOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrder(&value)); + check_hresult(WINRT_SHIM(ITextBlock2)->get_TextReadingOrder(&value)); return value; } template void impl_ITextBlock2::TextReadingOrder(Windows::UI::Xaml::TextReadingOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_TextReadingOrder(value)); + check_hresult(WINRT_SHIM(ITextBlock2)->put_TextReadingOrder(value)); } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::SelectionHighlightColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColorProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_SelectionHighlightColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::MaxLinesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLinesProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_MaxLinesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::TextLineBoundsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextLineBoundsProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_TextLineBoundsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::OpticalMarginAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OpticalMarginAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_OpticalMarginAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::IsColorFontEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_IsColorFontEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics2::TextReadingOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrderProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics2)->get_TextReadingOrderProperty(put_abi(value))); return value; } template bool impl_ITextBlock3::IsTextScaleFactorEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBlock3)->get_IsTextScaleFactorEnabled(&value)); return value; } template void impl_ITextBlock3::IsTextScaleFactorEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextScaleFactorEnabled(value)); + check_hresult(WINRT_SHIM(ITextBlock3)->put_IsTextScaleFactorEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_ITextBlockStatics3::IsTextScaleFactorEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBlockStatics3)->get_IsTextScaleFactorEnabledProperty(put_abi(value))); return value; } template Windows::UI::Composition::CompositionBrush impl_ITextBlock4::GetAlphaMask() const { Windows::UI::Composition::CompositionBrush returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAlphaMask(put(returnValue))); + check_hresult(WINRT_SHIM(ITextBlock4)->abi_GetAlphaMask(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::UIElement impl_IViewbox::Child() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Child(put(value))); + check_hresult(WINRT_SHIM(IViewbox)->get_Child(put_abi(value))); return value; } template void impl_IViewbox::Child(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Child(get(value))); + check_hresult(WINRT_SHIM(IViewbox)->put_Child(get_abi(value))); } template Windows::UI::Xaml::Media::Stretch impl_IViewbox::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(IViewbox)->get_Stretch(&value)); return value; } template void impl_IViewbox::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(IViewbox)->put_Stretch(value)); } template Windows::UI::Xaml::Controls::StretchDirection impl_IViewbox::StretchDirection() const { Windows::UI::Xaml::Controls::StretchDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_StretchDirection(&value)); + check_hresult(WINRT_SHIM(IViewbox)->get_StretchDirection(&value)); return value; } template void impl_IViewbox::StretchDirection(Windows::UI::Xaml::Controls::StretchDirection value) const { - check_hresult(static_cast(static_cast(*this))->put_StretchDirection(value)); + check_hresult(WINRT_SHIM(IViewbox)->put_StretchDirection(value)); } template Windows::UI::Xaml::DependencyProperty impl_IViewboxStatics::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(IViewboxStatics)->get_StretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IViewboxStatics::StretchDirectionProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchDirectionProperty(put(value))); + check_hresult(WINRT_SHIM(IViewboxStatics)->get_StretchDirectionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICanvasStatics::LeftProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LeftProperty(put(value))); + check_hresult(WINRT_SHIM(ICanvasStatics)->get_LeftProperty(put_abi(value))); return value; } template double impl_ICanvasStatics::GetLeft(const Windows::UI::Xaml::UIElement & element) const { double length {}; - check_hresult(static_cast(static_cast(*this))->abi_GetLeft(get(element), &length)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_GetLeft(get_abi(element), &length)); return length; } template void impl_ICanvasStatics::SetLeft(const Windows::UI::Xaml::UIElement & element, double length) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLeft(get(element), length)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_SetLeft(get_abi(element), length)); } template Windows::UI::Xaml::DependencyProperty impl_ICanvasStatics::TopProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TopProperty(put(value))); + check_hresult(WINRT_SHIM(ICanvasStatics)->get_TopProperty(put_abi(value))); return value; } template double impl_ICanvasStatics::GetTop(const Windows::UI::Xaml::UIElement & element) const { double length {}; - check_hresult(static_cast(static_cast(*this))->abi_GetTop(get(element), &length)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_GetTop(get_abi(element), &length)); return length; } template void impl_ICanvasStatics::SetTop(const Windows::UI::Xaml::UIElement & element, double length) const { - check_hresult(static_cast(static_cast(*this))->abi_SetTop(get(element), length)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_SetTop(get_abi(element), length)); } template Windows::UI::Xaml::DependencyProperty impl_ICanvasStatics::ZIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZIndexProperty(put(value))); + check_hresult(WINRT_SHIM(ICanvasStatics)->get_ZIndexProperty(put_abi(value))); return value; } template int32_t impl_ICanvasStatics::GetZIndex(const Windows::UI::Xaml::UIElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetZIndex(get(element), &value)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_GetZIndex(get_abi(element), &value)); return value; } template void impl_ICanvasStatics::SetZIndex(const Windows::UI::Xaml::UIElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetZIndex(get(element), value)); + check_hresult(WINRT_SHIM(ICanvasStatics)->abi_SetZIndex(get_abi(element), value)); } -template Windows::UI::Xaml::Controls::Canvas impl_ICanvasFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Canvas impl_ICanvasFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Canvas instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICanvasFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IContentControl::Content() const +template Windows::Foundation::IInspectable impl_IContentControl::Content() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContentControl)->get_Content(put_abi(value))); return value; } -template void impl_IContentControl::Content(const Windows::IInspectable & value) const +template void impl_IContentControl::Content(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(IContentControl)->put_Content(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IContentControl::ContentTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplate(put(value))); + check_hresult(WINRT_SHIM(IContentControl)->get_ContentTemplate(put_abi(value))); return value; } template void impl_IContentControl::ContentTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTemplate(get(value))); + check_hresult(WINRT_SHIM(IContentControl)->put_ContentTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IContentControl::ContentTemplateSelector() const { Windows::UI::Xaml::Controls::DataTemplateSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateSelector(put(value))); + check_hresult(WINRT_SHIM(IContentControl)->get_ContentTemplateSelector(put_abi(value))); return value; } template void impl_IContentControl::ContentTemplateSelector(const Windows::UI::Xaml::Controls::DataTemplateSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTemplateSelector(get(value))); + check_hresult(WINRT_SHIM(IContentControl)->put_ContentTemplateSelector(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IContentControl::ContentTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTransitions(put(value))); + check_hresult(WINRT_SHIM(IContentControl)->get_ContentTransitions(put_abi(value))); return value; } template void impl_IContentControl::ContentTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTransitions(get(value))); + check_hresult(WINRT_SHIM(IContentControl)->put_ContentTransitions(get_abi(value))); } -template void impl_IContentControlOverrides::OnContentChanged(const Windows::IInspectable & oldContent, const Windows::IInspectable & newContent) const +template void impl_IContentControlOverrides::OnContentChanged(const Windows::Foundation::IInspectable & oldContent, const Windows::Foundation::IInspectable & newContent) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentChanged(get(oldContent), get(newContent))); + check_hresult(WINRT_SHIM(IContentControlOverrides)->abi_OnContentChanged(get_abi(oldContent), get_abi(newContent))); } template void impl_IContentControlOverrides::OnContentTemplateChanged(const Windows::UI::Xaml::DataTemplate & oldContentTemplate, const Windows::UI::Xaml::DataTemplate & newContentTemplate) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentTemplateChanged(get(oldContentTemplate), get(newContentTemplate))); + check_hresult(WINRT_SHIM(IContentControlOverrides)->abi_OnContentTemplateChanged(get_abi(oldContentTemplate), get_abi(newContentTemplate))); } template void impl_IContentControlOverrides::OnContentTemplateSelectorChanged(const Windows::UI::Xaml::Controls::DataTemplateSelector & oldContentTemplateSelector, const Windows::UI::Xaml::Controls::DataTemplateSelector & newContentTemplateSelector) const { - check_hresult(static_cast(static_cast(*this))->abi_OnContentTemplateSelectorChanged(get(oldContentTemplateSelector), get(newContentTemplateSelector))); + check_hresult(WINRT_SHIM(IContentControlOverrides)->abi_OnContentTemplateSelectorChanged(get_abi(oldContentTemplateSelector), get_abi(newContentTemplateSelector))); } template Windows::UI::Xaml::DependencyProperty impl_IContentControlStatics::ContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentProperty(put(value))); + check_hresult(WINRT_SHIM(IContentControlStatics)->get_ContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentControlStatics::ContentTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IContentControlStatics)->get_ContentTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentControlStatics::ContentTemplateSelectorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateSelectorProperty(put(value))); + check_hresult(WINRT_SHIM(IContentControlStatics)->get_ContentTemplateSelectorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentControlStatics::ContentTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IContentControlStatics)->get_ContentTransitionsProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ContentControl impl_IContentControlFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ContentControl impl_IContentControlFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ContentControl instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IContentControlFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::UIElement impl_IContentControl2::ContentTemplateRoot() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateRoot(put(value))); + check_hresult(WINRT_SHIM(IContentControl2)->get_ContentTemplateRoot(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::RowDefinitionCollection impl_IGrid::RowDefinitions() const { Windows::UI::Xaml::Controls::RowDefinitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowDefinitions(put(value))); + check_hresult(WINRT_SHIM(IGrid)->get_RowDefinitions(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ColumnDefinitionCollection impl_IGrid::ColumnDefinitions() const { Windows::UI::Xaml::Controls::ColumnDefinitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnDefinitions(put(value))); + check_hresult(WINRT_SHIM(IGrid)->get_ColumnDefinitions(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics::RowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics)->get_RowProperty(put_abi(value))); return value; } template int32_t impl_IGridStatics::GetRow(const Windows::UI::Xaml::FrameworkElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRow(get(element), &value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_GetRow(get_abi(element), &value)); return value; } template void impl_IGridStatics::SetRow(const Windows::UI::Xaml::FrameworkElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRow(get(element), value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_SetRow(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics::ColumnProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics)->get_ColumnProperty(put_abi(value))); return value; } template int32_t impl_IGridStatics::GetColumn(const Windows::UI::Xaml::FrameworkElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetColumn(get(element), &value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_GetColumn(get_abi(element), &value)); return value; } template void impl_IGridStatics::SetColumn(const Windows::UI::Xaml::FrameworkElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetColumn(get(element), value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_SetColumn(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics::RowSpanProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics)->get_RowSpanProperty(put_abi(value))); return value; } template int32_t impl_IGridStatics::GetRowSpan(const Windows::UI::Xaml::FrameworkElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRowSpan(get(element), &value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_GetRowSpan(get_abi(element), &value)); return value; } template void impl_IGridStatics::SetRowSpan(const Windows::UI::Xaml::FrameworkElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRowSpan(get(element), value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_SetRowSpan(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics::ColumnSpanProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics)->get_ColumnSpanProperty(put_abi(value))); return value; } template int32_t impl_IGridStatics::GetColumnSpan(const Windows::UI::Xaml::FrameworkElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetColumnSpan(get(element), &value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_GetColumnSpan(get_abi(element), &value)); return value; } template void impl_IGridStatics::SetColumnSpan(const Windows::UI::Xaml::FrameworkElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetColumnSpan(get(element), value)); + check_hresult(WINRT_SHIM(IGridStatics)->abi_SetColumnSpan(get_abi(element), value)); } -template Windows::UI::Xaml::Controls::Grid impl_IGridFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Grid impl_IGridFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Grid instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGridFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::Brush impl_IGrid2::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(IGrid2)->get_BorderBrush(put_abi(value))); return value; } template void impl_IGrid2::BorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderBrush(get(value))); + check_hresult(WINRT_SHIM(IGrid2)->put_BorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IGrid2::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(IGrid2)->get_BorderThickness(put_abi(value))); return value; } template void impl_IGrid2::BorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderThickness(get(value))); + check_hresult(WINRT_SHIM(IGrid2)->put_BorderThickness(get_abi(value))); } template Windows::UI::Xaml::CornerRadius impl_IGrid2::CornerRadius() const { Windows::UI::Xaml::CornerRadius value {}; - check_hresult(static_cast(static_cast(*this))->get_CornerRadius(put(value))); + check_hresult(WINRT_SHIM(IGrid2)->get_CornerRadius(put_abi(value))); return value; } template void impl_IGrid2::CornerRadius(const Windows::UI::Xaml::CornerRadius & value) const { - check_hresult(static_cast(static_cast(*this))->put_CornerRadius(get(value))); + check_hresult(WINRT_SHIM(IGrid2)->put_CornerRadius(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IGrid2::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IGrid2)->get_Padding(put_abi(value))); return value; } template void impl_IGrid2::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IGrid2)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics2::BorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics2)->get_BorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics2::BorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics2)->get_BorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics2::CornerRadiusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CornerRadiusProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics2)->get_CornerRadiusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IGridStatics2::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IGridStatics2)->get_PaddingProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IItemsControl::ItemsSource() const +template Windows::Foundation::IInspectable impl_IItemsControl::ItemsSource() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ItemsSource(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemsSource(put_abi(value))); return value; } -template void impl_IItemsControl::ItemsSource(const Windows::IInspectable & value) const +template void impl_IItemsControl::ItemsSource(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemsSource(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemsSource(get_abi(value))); } template Windows::UI::Xaml::Controls::ItemCollection impl_IItemsControl::Items() const { Windows::UI::Xaml::Controls::ItemCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_Items(put_abi(value))); return value; } template Windows::UI::Xaml::DataTemplate impl_IItemsControl::ItemTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplate(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemTemplate(put_abi(value))); return value; } template void impl_IItemsControl::ItemTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemTemplate(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::DataTemplateSelector impl_IItemsControl::ItemTemplateSelector() const { Windows::UI::Xaml::Controls::DataTemplateSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplateSelector(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemTemplateSelector(put_abi(value))); return value; } template void impl_IItemsControl::ItemTemplateSelector(const Windows::UI::Xaml::Controls::DataTemplateSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemTemplateSelector(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemTemplateSelector(get_abi(value))); } template Windows::UI::Xaml::Controls::ItemsPanelTemplate impl_IItemsControl::ItemsPanel() const { Windows::UI::Xaml::Controls::ItemsPanelTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsPanel(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemsPanel(put_abi(value))); return value; } template void impl_IItemsControl::ItemsPanel(const Windows::UI::Xaml::Controls::ItemsPanelTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemsPanel(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemsPanel(get_abi(value))); } template hstring impl_IItemsControl::DisplayMemberPath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DisplayMemberPath(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_DisplayMemberPath(put_abi(value))); return value; } -template void impl_IItemsControl::DisplayMemberPath(hstring_ref value) const +template void impl_IItemsControl::DisplayMemberPath(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMemberPath(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_DisplayMemberPath(get_abi(value))); } template Windows::UI::Xaml::Style impl_IItemsControl::ItemContainerStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerStyle(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemContainerStyle(put_abi(value))); return value; } template void impl_IItemsControl::ItemContainerStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemContainerStyle(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemContainerStyle(get_abi(value))); } template Windows::UI::Xaml::Controls::StyleSelector impl_IItemsControl::ItemContainerStyleSelector() const { Windows::UI::Xaml::Controls::StyleSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerStyleSelector(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemContainerStyleSelector(put_abi(value))); return value; } template void impl_IItemsControl::ItemContainerStyleSelector(const Windows::UI::Xaml::Controls::StyleSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemContainerStyleSelector(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemContainerStyleSelector(get_abi(value))); } template Windows::UI::Xaml::Controls::ItemContainerGenerator impl_IItemsControl::ItemContainerGenerator() const { Windows::UI::Xaml::Controls::ItemContainerGenerator value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerGenerator(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemContainerGenerator(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IItemsControl::ItemContainerTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerTransitions(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_ItemContainerTransitions(put_abi(value))); return value; } template void impl_IItemsControl::ItemContainerTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemContainerTransitions(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_ItemContainerTransitions(get_abi(value))); } template Windows::Foundation::Collections::IObservableVector impl_IItemsControl::GroupStyle() const { Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_GroupStyle(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_GroupStyle(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::GroupStyleSelector impl_IItemsControl::GroupStyleSelector() const { Windows::UI::Xaml::Controls::GroupStyleSelector value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupStyleSelector(put(value))); + check_hresult(WINRT_SHIM(IItemsControl)->get_GroupStyleSelector(put_abi(value))); return value; } template void impl_IItemsControl::GroupStyleSelector(const Windows::UI::Xaml::Controls::GroupStyleSelector & value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupStyleSelector(get(value))); + check_hresult(WINRT_SHIM(IItemsControl)->put_GroupStyleSelector(get_abi(value))); } template bool impl_IItemsControl::IsGrouping() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGrouping(&value)); + check_hresult(WINRT_SHIM(IItemsControl)->get_IsGrouping(&value)); return value; } -template bool impl_IItemsControlOverrides::IsItemItsOwnContainerOverride(const Windows::IInspectable & item) const +template bool impl_IItemsControlOverrides::IsItemItsOwnContainerOverride(const Windows::Foundation::IInspectable & item) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsItemItsOwnContainerOverride(get(item), &returnValue)); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_IsItemItsOwnContainerOverride(get_abi(item), &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyObject impl_IItemsControlOverrides::GetContainerForItemOverride() const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetContainerForItemOverride(put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_GetContainerForItemOverride(put_abi(returnValue))); return returnValue; } -template void impl_IItemsControlOverrides::ClearContainerForItemOverride(const Windows::UI::Xaml::DependencyObject & element, const Windows::IInspectable & item) const +template void impl_IItemsControlOverrides::ClearContainerForItemOverride(const Windows::UI::Xaml::DependencyObject & element, const Windows::Foundation::IInspectable & item) const { - check_hresult(static_cast(static_cast(*this))->abi_ClearContainerForItemOverride(get(element), get(item))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_ClearContainerForItemOverride(get_abi(element), get_abi(item))); } -template void impl_IItemsControlOverrides::PrepareContainerForItemOverride(const Windows::UI::Xaml::DependencyObject & element, const Windows::IInspectable & item) const +template void impl_IItemsControlOverrides::PrepareContainerForItemOverride(const Windows::UI::Xaml::DependencyObject & element, const Windows::Foundation::IInspectable & item) const { - check_hresult(static_cast(static_cast(*this))->abi_PrepareContainerForItemOverride(get(element), get(item))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_PrepareContainerForItemOverride(get_abi(element), get_abi(item))); } -template void impl_IItemsControlOverrides::OnItemsChanged(const Windows::IInspectable & e) const +template void impl_IItemsControlOverrides::OnItemsChanged(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemsChanged(get(e))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnItemsChanged(get_abi(e))); } template void impl_IItemsControlOverrides::OnItemContainerStyleChanged(const Windows::UI::Xaml::Style & oldItemContainerStyle, const Windows::UI::Xaml::Style & newItemContainerStyle) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemContainerStyleChanged(get(oldItemContainerStyle), get(newItemContainerStyle))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnItemContainerStyleChanged(get_abi(oldItemContainerStyle), get_abi(newItemContainerStyle))); } template void impl_IItemsControlOverrides::OnItemContainerStyleSelectorChanged(const Windows::UI::Xaml::Controls::StyleSelector & oldItemContainerStyleSelector, const Windows::UI::Xaml::Controls::StyleSelector & newItemContainerStyleSelector) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemContainerStyleSelectorChanged(get(oldItemContainerStyleSelector), get(newItemContainerStyleSelector))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnItemContainerStyleSelectorChanged(get_abi(oldItemContainerStyleSelector), get_abi(newItemContainerStyleSelector))); } template void impl_IItemsControlOverrides::OnItemTemplateChanged(const Windows::UI::Xaml::DataTemplate & oldItemTemplate, const Windows::UI::Xaml::DataTemplate & newItemTemplate) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemTemplateChanged(get(oldItemTemplate), get(newItemTemplate))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnItemTemplateChanged(get_abi(oldItemTemplate), get_abi(newItemTemplate))); } template void impl_IItemsControlOverrides::OnItemTemplateSelectorChanged(const Windows::UI::Xaml::Controls::DataTemplateSelector & oldItemTemplateSelector, const Windows::UI::Xaml::Controls::DataTemplateSelector & newItemTemplateSelector) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemTemplateSelectorChanged(get(oldItemTemplateSelector), get(newItemTemplateSelector))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnItemTemplateSelectorChanged(get_abi(oldItemTemplateSelector), get_abi(newItemTemplateSelector))); } template void impl_IItemsControlOverrides::OnGroupStyleSelectorChanged(const Windows::UI::Xaml::Controls::GroupStyleSelector & oldGroupStyleSelector, const Windows::UI::Xaml::Controls::GroupStyleSelector & newGroupStyleSelector) const { - check_hresult(static_cast(static_cast(*this))->abi_OnGroupStyleSelectorChanged(get(oldGroupStyleSelector), get(newGroupStyleSelector))); + check_hresult(WINRT_SHIM(IItemsControlOverrides)->abi_OnGroupStyleSelectorChanged(get_abi(oldGroupStyleSelector), get_abi(newGroupStyleSelector))); } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemsSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemsSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemTemplateSelectorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemTemplateSelectorProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemTemplateSelectorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemsPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemsPanelProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::DisplayMemberPathProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayMemberPathProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_DisplayMemberPathProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemContainerStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemContainerStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemContainerStyleSelectorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerStyleSelectorProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemContainerStyleSelectorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::ItemContainerTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_ItemContainerTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::GroupStyleSelectorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupStyleSelectorProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_GroupStyleSelectorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsControlStatics::IsGroupingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsGroupingProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->get_IsGroupingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ItemsControl impl_IItemsControlStatics::GetItemsOwner(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Controls::ItemsControl returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetItemsOwner(get(element), put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->abi_GetItemsOwner(get_abi(element), put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::ItemsControl impl_IItemsControlStatics::ItemsControlFromItemContainer(const Windows::UI::Xaml::DependencyObject & container) const { Windows::UI::Xaml::Controls::ItemsControl returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_ItemsControlFromItemContainer(get(container), put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControlStatics)->abi_ItemsControlFromItemContainer(get_abi(container), put_abi(returnValue))); return returnValue; } -template Windows::UI::Xaml::Controls::ItemsControl impl_IItemsControlFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ItemsControl impl_IItemsControlFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ItemsControl instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IItemsControlFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Panel impl_IItemsControl2::ItemsPanelRoot() const { Windows::UI::Xaml::Controls::Panel value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemsPanelRoot(put(value))); + check_hresult(WINRT_SHIM(IItemsControl2)->get_ItemsPanelRoot(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyObject impl_IItemsControl3::GroupHeaderContainerFromItemContainer(const Windows::UI::Xaml::DependencyObject & itemContainer) const { Windows::UI::Xaml::DependencyObject returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GroupHeaderContainerFromItemContainer(get(itemContainer), put(returnValue))); + check_hresult(WINRT_SHIM(IItemsControl3)->abi_GroupHeaderContainerFromItemContainer(get_abi(itemContainer), put_abi(returnValue))); return returnValue; } template bool impl_IMediaTransportControls::IsFullWindowButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFullWindowButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsFullWindowButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFullWindowButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFullWindowButtonVisible(value)); } template bool impl_IMediaTransportControls::IsFullWindowEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFullWindowEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsFullWindowEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFullWindowEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFullWindowEnabled(value)); } template bool impl_IMediaTransportControls::IsZoomButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZoomButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsZoomButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsZoomButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZoomButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsZoomButtonVisible(value)); } template bool impl_IMediaTransportControls::IsZoomEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZoomEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsZoomEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsZoomEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZoomEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsZoomEnabled(value)); } template bool impl_IMediaTransportControls::IsFastForwardButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFastForwardButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFastForwardButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsFastForwardButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFastForwardButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFastForwardButtonVisible(value)); } template bool impl_IMediaTransportControls::IsFastForwardEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFastForwardEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFastForwardEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsFastForwardEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFastForwardEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFastForwardEnabled(value)); } template bool impl_IMediaTransportControls::IsFastRewindButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFastRewindButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFastRewindButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsFastRewindButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFastRewindButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFastRewindButtonVisible(value)); } template bool impl_IMediaTransportControls::IsFastRewindEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFastRewindEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsFastRewindEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsFastRewindEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFastRewindEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsFastRewindEnabled(value)); } template bool impl_IMediaTransportControls::IsStopButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStopButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsStopButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsStopButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsStopButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsStopButtonVisible(value)); } template bool impl_IMediaTransportControls::IsStopEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStopEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsStopEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsStopEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsStopEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsStopEnabled(value)); } template bool impl_IMediaTransportControls::IsVolumeButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVolumeButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsVolumeButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsVolumeButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsVolumeButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsVolumeButtonVisible(value)); } template bool impl_IMediaTransportControls::IsVolumeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsVolumeEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsVolumeEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsVolumeEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsVolumeEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsVolumeEnabled(value)); } template bool impl_IMediaTransportControls::IsPlaybackRateButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPlaybackRateButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsPlaybackRateButtonVisible(&value)); return value; } template void impl_IMediaTransportControls::IsPlaybackRateButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPlaybackRateButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsPlaybackRateButtonVisible(value)); } template bool impl_IMediaTransportControls::IsPlaybackRateEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPlaybackRateEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsPlaybackRateEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsPlaybackRateEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPlaybackRateEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsPlaybackRateEnabled(value)); } template bool impl_IMediaTransportControls::IsSeekBarVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSeekBarVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsSeekBarVisible(&value)); return value; } template void impl_IMediaTransportControls::IsSeekBarVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSeekBarVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsSeekBarVisible(value)); } template bool impl_IMediaTransportControls::IsSeekEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSeekEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsSeekEnabled(&value)); return value; } template void impl_IMediaTransportControls::IsSeekEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSeekEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsSeekEnabled(value)); } template bool impl_IMediaTransportControls::IsCompact() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCompact(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->get_IsCompact(&value)); return value; } template void impl_IMediaTransportControls::IsCompact(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCompact(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls)->put_IsCompact(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFullWindowButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFullWindowButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFullWindowEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFullWindowEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsZoomButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsZoomButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsZoomEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsZoomEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFastForwardButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFastForwardButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFastForwardButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFastForwardEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFastForwardEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFastForwardEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFastRewindButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFastRewindButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFastRewindButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsFastRewindEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFastRewindEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsFastRewindEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsStopButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsStopButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsStopButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsStopEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsStopEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsStopEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsVolumeButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsVolumeButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsVolumeButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsVolumeEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsVolumeEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsVolumeEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsPlaybackRateButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPlaybackRateButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsPlaybackRateButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsPlaybackRateEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPlaybackRateEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsPlaybackRateEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsSeekBarVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSeekBarVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsSeekBarVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsSeekEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSeekEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsSeekEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics::IsCompactProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsCompactProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics)->get_IsCompactProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::MediaTransportControls impl_IMediaTransportControlsFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::MediaTransportControls impl_IMediaTransportControlsFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::MediaTransportControls instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaTransportControlsFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IMediaTransportControls2::IsSkipForwardButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSkipForwardButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsSkipForwardButtonVisible(&value)); return value; } template void impl_IMediaTransportControls2::IsSkipForwardButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSkipForwardButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsSkipForwardButtonVisible(value)); } template bool impl_IMediaTransportControls2::IsSkipForwardEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSkipForwardEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsSkipForwardEnabled(&value)); return value; } template void impl_IMediaTransportControls2::IsSkipForwardEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSkipForwardEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsSkipForwardEnabled(value)); } template bool impl_IMediaTransportControls2::IsSkipBackwardButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSkipBackwardButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsSkipBackwardButtonVisible(&value)); return value; } template void impl_IMediaTransportControls2::IsSkipBackwardButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSkipBackwardButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsSkipBackwardButtonVisible(value)); } template bool impl_IMediaTransportControls2::IsSkipBackwardEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSkipBackwardEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsSkipBackwardEnabled(&value)); return value; } template void impl_IMediaTransportControls2::IsSkipBackwardEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSkipBackwardEnabled(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsSkipBackwardEnabled(value)); } template bool impl_IMediaTransportControls2::IsNextTrackButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsNextTrackButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsNextTrackButtonVisible(&value)); return value; } template void impl_IMediaTransportControls2::IsNextTrackButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsNextTrackButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsNextTrackButtonVisible(value)); } template bool impl_IMediaTransportControls2::IsPreviousTrackButtonVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPreviousTrackButtonVisible(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_IsPreviousTrackButtonVisible(&value)); return value; } template void impl_IMediaTransportControls2::IsPreviousTrackButtonVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPreviousTrackButtonVisible(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_IsPreviousTrackButtonVisible(value)); } template Windows::UI::Xaml::Media::FastPlayFallbackBehaviour impl_IMediaTransportControls2::FastPlayFallbackBehaviour() const { Windows::UI::Xaml::Media::FastPlayFallbackBehaviour value {}; - check_hresult(static_cast(static_cast(*this))->get_FastPlayFallbackBehaviour(&value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->get_FastPlayFallbackBehaviour(&value)); return value; } template void impl_IMediaTransportControls2::FastPlayFallbackBehaviour(Windows::UI::Xaml::Media::FastPlayFallbackBehaviour value) const { - check_hresult(static_cast(static_cast(*this))->put_FastPlayFallbackBehaviour(value)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->put_FastPlayFallbackBehaviour(value)); } template event_token impl_IMediaTransportControls2::ThumbnailRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ThumbnailRequested(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->add_ThumbnailRequested(get_abi(value), &token)); return token; } @@ -46204,110 +49135,110 @@ template event_revoker impl_IMediaTranspo template void impl_IMediaTransportControls2::ThumbnailRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ThumbnailRequested(token)); + check_hresult(WINRT_SHIM(IMediaTransportControls2)->remove_ThumbnailRequested(token)); } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsSkipForwardButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSkipForwardButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsSkipForwardButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsSkipForwardEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSkipForwardEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsSkipForwardEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsSkipBackwardButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSkipBackwardButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsSkipBackwardButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsSkipBackwardEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSkipBackwardEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsSkipBackwardEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsNextTrackButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsNextTrackButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsNextTrackButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::IsPreviousTrackButtonVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPreviousTrackButtonVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_IsPreviousTrackButtonVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaTransportControlsStatics2::FastPlayFallbackBehaviourProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FastPlayFallbackBehaviourProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaTransportControlsStatics2)->get_FastPlayFallbackBehaviourProperty(put_abi(value))); return value; } template hstring impl_IPasswordBox::Password() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Password(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox)->get_Password(put_abi(value))); return value; } -template void impl_IPasswordBox::Password(hstring_ref value) const +template void impl_IPasswordBox::Password(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Password(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox)->put_Password(get_abi(value))); } template hstring impl_IPasswordBox::PasswordChar() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PasswordChar(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox)->get_PasswordChar(put_abi(value))); return value; } -template void impl_IPasswordBox::PasswordChar(hstring_ref value) const +template void impl_IPasswordBox::PasswordChar(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PasswordChar(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox)->put_PasswordChar(get_abi(value))); } template bool impl_IPasswordBox::IsPasswordRevealButtonEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPasswordRevealButtonEnabled(&value)); + check_hresult(WINRT_SHIM(IPasswordBox)->get_IsPasswordRevealButtonEnabled(&value)); return value; } template void impl_IPasswordBox::IsPasswordRevealButtonEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPasswordRevealButtonEnabled(value)); + check_hresult(WINRT_SHIM(IPasswordBox)->put_IsPasswordRevealButtonEnabled(value)); } template int32_t impl_IPasswordBox::MaxLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLength(&value)); + check_hresult(WINRT_SHIM(IPasswordBox)->get_MaxLength(&value)); return value; } template void impl_IPasswordBox::MaxLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLength(value)); + check_hresult(WINRT_SHIM(IPasswordBox)->put_MaxLength(value)); } template event_token impl_IPasswordBox::PasswordChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PasswordChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IPasswordBox)->add_PasswordChanged(get_abi(value), &token)); return token; } @@ -46318,13 +49249,13 @@ template event_revoker impl_IPasswordBox::Password template void impl_IPasswordBox::PasswordChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PasswordChanged(token)); + check_hresult(WINRT_SHIM(IPasswordBox)->remove_PasswordChanged(token)); } template event_token impl_IPasswordBox::ContextMenuOpening(const Windows::UI::Xaml::Controls::ContextMenuOpeningEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContextMenuOpening(get(value), &token)); + check_hresult(WINRT_SHIM(IPasswordBox)->add_ContextMenuOpening(get_abi(value), &token)); return token; } @@ -46335,106 +49266,106 @@ template event_revoker impl_IPasswordBox::ContextM template void impl_IPasswordBox::ContextMenuOpening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContextMenuOpening(token)); + check_hresult(WINRT_SHIM(IPasswordBox)->remove_ContextMenuOpening(token)); } template void impl_IPasswordBox::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(IPasswordBox)->abi_SelectAll()); } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics::PasswordProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasswordProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics)->get_PasswordProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics::PasswordCharProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasswordCharProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics)->get_PasswordCharProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics::IsPasswordRevealButtonEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPasswordRevealButtonEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics)->get_IsPasswordRevealButtonEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics::MaxLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLengthProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics)->get_MaxLengthProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IPasswordBox2::Header() const +template Windows::Foundation::IInspectable impl_IPasswordBox2::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IPasswordBox2)->get_Header(put_abi(value))); return value; } -template void impl_IPasswordBox2::Header(const Windows::IInspectable & value) const +template void impl_IPasswordBox2::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IPasswordBox2::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IPasswordBox2::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->put_HeaderTemplate(get_abi(value))); } template hstring impl_IPasswordBox2::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_IPasswordBox2::PlaceholderText(hstring_ref value) const +template void impl_IPasswordBox2::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->put_PlaceholderText(get_abi(value))); } template Windows::UI::Xaml::Media::SolidColorBrush impl_IPasswordBox2::SelectionHighlightColor() const { Windows::UI::Xaml::Media::SolidColorBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColor(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->get_SelectionHighlightColor(put_abi(value))); return value; } template void impl_IPasswordBox2::SelectionHighlightColor(const Windows::UI::Xaml::Media::SolidColorBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionHighlightColor(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox2)->put_SelectionHighlightColor(get_abi(value))); } template bool impl_IPasswordBox2::PreventKeyboardDisplayOnProgrammaticFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); + check_hresult(WINRT_SHIM(IPasswordBox2)->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); return value; } template void impl_IPasswordBox2::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); + check_hresult(WINRT_SHIM(IPasswordBox2)->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); } template event_token impl_IPasswordBox2::Paste(const Windows::UI::Xaml::Controls::TextControlPasteEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Paste(get(value), &token)); + check_hresult(WINRT_SHIM(IPasswordBox2)->add_Paste(get_abi(value), &token)); return token; } @@ -46445,609 +49376,609 @@ template event_revoker impl_IPasswordBox2::Paste( template void impl_IPasswordBox2::Paste(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Paste(token)); + check_hresult(WINRT_SHIM(IPasswordBox2)->remove_Paste(token)); } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics2::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics2)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics2::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics2)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics2::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics2)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics2::SelectionHighlightColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColorProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics2)->get_SelectionHighlightColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics2::PreventKeyboardDisplayOnProgrammaticFocusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics2)->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::PasswordRevealMode impl_IPasswordBox3::PasswordRevealMode() const { Windows::UI::Xaml::Controls::PasswordRevealMode value {}; - check_hresult(static_cast(static_cast(*this))->get_PasswordRevealMode(&value)); + check_hresult(WINRT_SHIM(IPasswordBox3)->get_PasswordRevealMode(&value)); return value; } template void impl_IPasswordBox3::PasswordRevealMode(Windows::UI::Xaml::Controls::PasswordRevealMode value) const { - check_hresult(static_cast(static_cast(*this))->put_PasswordRevealMode(value)); + check_hresult(WINRT_SHIM(IPasswordBox3)->put_PasswordRevealMode(value)); } template Windows::UI::Xaml::TextReadingOrder impl_IPasswordBox3::TextReadingOrder() const { Windows::UI::Xaml::TextReadingOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrder(&value)); + check_hresult(WINRT_SHIM(IPasswordBox3)->get_TextReadingOrder(&value)); return value; } template void impl_IPasswordBox3::TextReadingOrder(Windows::UI::Xaml::TextReadingOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_TextReadingOrder(value)); + check_hresult(WINRT_SHIM(IPasswordBox3)->put_TextReadingOrder(value)); } template Windows::UI::Xaml::Input::InputScope impl_IPasswordBox3::InputScope() const { Windows::UI::Xaml::Input::InputScope value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScope(put(value))); + check_hresult(WINRT_SHIM(IPasswordBox3)->get_InputScope(put_abi(value))); return value; } template void impl_IPasswordBox3::InputScope(const Windows::UI::Xaml::Input::InputScope & value) const { - check_hresult(static_cast(static_cast(*this))->put_InputScope(get(value))); + check_hresult(WINRT_SHIM(IPasswordBox3)->put_InputScope(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics3::PasswordRevealModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PasswordRevealModeProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics3)->get_PasswordRevealModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics3::TextReadingOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrderProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics3)->get_TextReadingOrderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IPasswordBoxStatics3::InputScopeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScopeProperty(put(value))); + check_hresult(WINRT_SHIM(IPasswordBoxStatics3)->get_InputScopeProperty(put_abi(value))); return value; } template bool impl_IProgressRing::IsActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsActive(&value)); + check_hresult(WINRT_SHIM(IProgressRing)->get_IsActive(&value)); return value; } template void impl_IProgressRing::IsActive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsActive(value)); + check_hresult(WINRT_SHIM(IProgressRing)->put_IsActive(value)); } template Windows::UI::Xaml::Controls::Primitives::ProgressRingTemplateSettings impl_IProgressRing::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::ProgressRingTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IProgressRing)->get_TemplateSettings(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IProgressRingStatics::IsActiveProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsActiveProperty(put(value))); + check_hresult(WINRT_SHIM(IProgressRingStatics)->get_IsActiveProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_IRelativePanel::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->get_BorderBrush(put_abi(value))); return value; } template void impl_IRelativePanel::BorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderBrush(get(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->put_BorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IRelativePanel::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->get_BorderThickness(put_abi(value))); return value; } template void impl_IRelativePanel::BorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderThickness(get(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->put_BorderThickness(get_abi(value))); } template Windows::UI::Xaml::CornerRadius impl_IRelativePanel::CornerRadius() const { Windows::UI::Xaml::CornerRadius value {}; - check_hresult(static_cast(static_cast(*this))->get_CornerRadius(put(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->get_CornerRadius(put_abi(value))); return value; } template void impl_IRelativePanel::CornerRadius(const Windows::UI::Xaml::CornerRadius & value) const { - check_hresult(static_cast(static_cast(*this))->put_CornerRadius(get(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->put_CornerRadius(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IRelativePanel::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->get_Padding(put_abi(value))); return value; } template void impl_IRelativePanel::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IRelativePanel)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::LeftOfProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LeftOfProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_LeftOfProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetLeftOf(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetLeftOf(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetLeftOf(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetLeftOf(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetLeftOf(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetLeftOf(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLeftOf(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetLeftOf(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AboveProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AboveProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AboveProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAbove(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAbove(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAbove(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAbove(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAbove(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAbove(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAbove(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAbove(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::RightOfProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RightOfProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_RightOfProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetRightOf(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetRightOf(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetRightOf(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetRightOf(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetRightOf(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetRightOf(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRightOf(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetRightOf(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::BelowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BelowProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_BelowProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetBelow(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetBelow(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetBelow(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetBelow(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetBelow(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetBelow(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetBelow(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetBelow(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignHorizontalCenterWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignHorizontalCenterWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignHorizontalCenterWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignHorizontalCenterWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignHorizontalCenterWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignHorizontalCenterWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignHorizontalCenterWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignHorizontalCenterWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignHorizontalCenterWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignHorizontalCenterWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignHorizontalCenterWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignVerticalCenterWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignVerticalCenterWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignVerticalCenterWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignVerticalCenterWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignVerticalCenterWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignVerticalCenterWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignVerticalCenterWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignVerticalCenterWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignVerticalCenterWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignVerticalCenterWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignVerticalCenterWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignLeftWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignLeftWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignLeftWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignLeftWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignLeftWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignLeftWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignLeftWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignLeftWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignLeftWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignLeftWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignLeftWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignTopWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignTopWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignTopWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignTopWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignTopWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignTopWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignTopWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignTopWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignTopWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignTopWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignTopWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignRightWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignRightWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignRightWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignRightWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignRightWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignRightWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignRightWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignRightWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignRightWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignRightWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignRightWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignBottomWithProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignBottomWithProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignBottomWithProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IRelativePanelStatics::GetAlignBottomWith(const Windows::UI::Xaml::UIElement & element) const +template Windows::Foundation::IInspectable impl_IRelativePanelStatics::GetAlignBottomWith(const Windows::UI::Xaml::UIElement & element) const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignBottomWith(get(element), put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignBottomWith(get_abi(element), put_abi(value))); return value; } -template void impl_IRelativePanelStatics::SetAlignBottomWith(const Windows::UI::Xaml::UIElement & element, const Windows::IInspectable & value) const +template void impl_IRelativePanelStatics::SetAlignBottomWith(const Windows::UI::Xaml::UIElement & element, const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignBottomWith(get(element), get(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignBottomWith(get_abi(element), get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignLeftWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignLeftWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignLeftWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignLeftWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignLeftWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignLeftWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignLeftWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignLeftWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignLeftWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignTopWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignTopWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignTopWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignTopWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignTopWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignTopWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignTopWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignTopWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignTopWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignRightWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignRightWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignRightWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignRightWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignRightWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignRightWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignRightWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignRightWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignRightWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignBottomWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignBottomWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignBottomWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignBottomWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignBottomWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignBottomWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignBottomWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignBottomWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignBottomWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignHorizontalCenterWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignHorizontalCenterWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignHorizontalCenterWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignHorizontalCenterWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignHorizontalCenterWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignHorizontalCenterWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignHorizontalCenterWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignHorizontalCenterWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignHorizontalCenterWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::AlignVerticalCenterWithPanelProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AlignVerticalCenterWithPanelProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_AlignVerticalCenterWithPanelProperty(put_abi(value))); return value; } template bool impl_IRelativePanelStatics::GetAlignVerticalCenterWithPanel(const Windows::UI::Xaml::UIElement & element) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetAlignVerticalCenterWithPanel(get(element), &value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_GetAlignVerticalCenterWithPanel(get_abi(element), &value)); return value; } template void impl_IRelativePanelStatics::SetAlignVerticalCenterWithPanel(const Windows::UI::Xaml::UIElement & element, bool value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetAlignVerticalCenterWithPanel(get(element), value)); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->abi_SetAlignVerticalCenterWithPanel(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::BorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_BorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::BorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_BorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::CornerRadiusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CornerRadiusProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_CornerRadiusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRelativePanelStatics::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IRelativePanelStatics)->get_PaddingProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::RelativePanel impl_IRelativePanelFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::RelativePanel impl_IRelativePanelFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::RelativePanel instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRelativePanelFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IRichEditBox::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_IsReadOnly(&value)); return value; } template void impl_IRichEditBox::IsReadOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsReadOnly(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_IsReadOnly(value)); } template bool impl_IRichEditBox::AcceptsReturn() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AcceptsReturn(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_AcceptsReturn(&value)); return value; } template void impl_IRichEditBox::AcceptsReturn(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AcceptsReturn(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_AcceptsReturn(value)); } template Windows::UI::Xaml::TextAlignment impl_IRichEditBox::TextAlignment() const { Windows::UI::Xaml::TextAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_TextAlignment(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_TextAlignment(&value)); return value; } template void impl_IRichEditBox::TextAlignment(Windows::UI::Xaml::TextAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_TextAlignment(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_TextAlignment(value)); } template Windows::UI::Xaml::TextWrapping impl_IRichEditBox::TextWrapping() const { Windows::UI::Xaml::TextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_TextWrapping(&value)); return value; } template void impl_IRichEditBox::TextWrapping(Windows::UI::Xaml::TextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_TextWrapping(value)); } template bool impl_IRichEditBox::IsSpellCheckEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSpellCheckEnabled(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_IsSpellCheckEnabled(&value)); return value; } template void impl_IRichEditBox::IsSpellCheckEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSpellCheckEnabled(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_IsSpellCheckEnabled(value)); } template bool impl_IRichEditBox::IsTextPredictionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextPredictionEnabled(&value)); + check_hresult(WINRT_SHIM(IRichEditBox)->get_IsTextPredictionEnabled(&value)); return value; } template void impl_IRichEditBox::IsTextPredictionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextPredictionEnabled(value)); + check_hresult(WINRT_SHIM(IRichEditBox)->put_IsTextPredictionEnabled(value)); } template Windows::UI::Text::ITextDocument impl_IRichEditBox::Document() const { Windows::UI::Text::ITextDocument value; - check_hresult(static_cast(static_cast(*this))->get_Document(put(value))); + check_hresult(WINRT_SHIM(IRichEditBox)->get_Document(put_abi(value))); return value; } template Windows::UI::Xaml::Input::InputScope impl_IRichEditBox::InputScope() const { Windows::UI::Xaml::Input::InputScope value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScope(put(value))); + check_hresult(WINRT_SHIM(IRichEditBox)->get_InputScope(put_abi(value))); return value; } template void impl_IRichEditBox::InputScope(const Windows::UI::Xaml::Input::InputScope & value) const { - check_hresult(static_cast(static_cast(*this))->put_InputScope(get(value))); + check_hresult(WINRT_SHIM(IRichEditBox)->put_InputScope(get_abi(value))); } template event_token impl_IRichEditBox::TextChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox)->add_TextChanged(get_abi(value), &token)); return token; } @@ -47058,13 +49989,13 @@ template event_revoker impl_IRichEditBox::TextChan template void impl_IRichEditBox::TextChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextChanged(token)); + check_hresult(WINRT_SHIM(IRichEditBox)->remove_TextChanged(token)); } template event_token impl_IRichEditBox::SelectionChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -47075,13 +50006,13 @@ template event_revoker impl_IRichEditBox::Selectio template void impl_IRichEditBox::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(IRichEditBox)->remove_SelectionChanged(token)); } template event_token impl_IRichEditBox::ContextMenuOpening(const Windows::UI::Xaml::Controls::ContextMenuOpeningEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContextMenuOpening(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox)->add_ContextMenuOpening(get_abi(value), &token)); return token; } @@ -47092,141 +50023,141 @@ template event_revoker impl_IRichEditBox::ContextM template void impl_IRichEditBox::ContextMenuOpening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContextMenuOpening(token)); + check_hresult(WINRT_SHIM(IRichEditBox)->remove_ContextMenuOpening(token)); } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::IsReadOnlyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnlyProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_IsReadOnlyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::AcceptsReturnProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AcceptsReturnProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_AcceptsReturnProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::TextAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_TextAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::TextWrappingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextWrappingProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_TextWrappingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::IsSpellCheckEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSpellCheckEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_IsSpellCheckEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::IsTextPredictionEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextPredictionEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_IsTextPredictionEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics::InputScopeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScopeProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics)->get_InputScopeProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::RichEditBox impl_IRichEditBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::RichEditBox impl_IRichEditBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::RichEditBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRichEditBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IRichEditBox2::Header() const +template Windows::Foundation::IInspectable impl_IRichEditBox2::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IRichEditBox2)->get_Header(put_abi(value))); return value; } -template void impl_IRichEditBox2::Header(const Windows::IInspectable & value) const +template void impl_IRichEditBox2::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IRichEditBox2::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IRichEditBox2::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_HeaderTemplate(get_abi(value))); } template hstring impl_IRichEditBox2::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_IRichEditBox2::PlaceholderText(hstring_ref value) const +template void impl_IRichEditBox2::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_PlaceholderText(get_abi(value))); } template Windows::UI::Xaml::Media::SolidColorBrush impl_IRichEditBox2::SelectionHighlightColor() const { Windows::UI::Xaml::Media::SolidColorBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColor(put(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->get_SelectionHighlightColor(put_abi(value))); return value; } template void impl_IRichEditBox2::SelectionHighlightColor(const Windows::UI::Xaml::Media::SolidColorBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionHighlightColor(get(value))); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_SelectionHighlightColor(get_abi(value))); } template bool impl_IRichEditBox2::PreventKeyboardDisplayOnProgrammaticFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); + check_hresult(WINRT_SHIM(IRichEditBox2)->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); return value; } template void impl_IRichEditBox2::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); } template bool impl_IRichEditBox2::IsColorFontEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabled(&value)); + check_hresult(WINRT_SHIM(IRichEditBox2)->get_IsColorFontEnabled(&value)); return value; } template void impl_IRichEditBox2::IsColorFontEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsColorFontEnabled(value)); + check_hresult(WINRT_SHIM(IRichEditBox2)->put_IsColorFontEnabled(value)); } template event_token impl_IRichEditBox2::Paste(const Windows::UI::Xaml::Controls::TextControlPasteEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Paste(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox2)->add_Paste(get_abi(value), &token)); return token; } @@ -47237,55 +50168,55 @@ template event_revoker impl_IRichEditBox2::Paste( template void impl_IRichEditBox2::Paste(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Paste(token)); + check_hresult(WINRT_SHIM(IRichEditBox2)->remove_Paste(token)); } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::SelectionHighlightColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColorProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_SelectionHighlightColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::PreventKeyboardDisplayOnProgrammaticFocusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics2::IsColorFontEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics2)->get_IsColorFontEnabledProperty(put_abi(value))); return value; } template event_token impl_IRichEditBox3::TextCompositionStarted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionStarted(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->add_TextCompositionStarted(get_abi(value), &token)); return token; } @@ -47296,13 +50227,13 @@ template event_revoker impl_IRichEditBox3::TextCo template void impl_IRichEditBox3::TextCompositionStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionStarted(token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->remove_TextCompositionStarted(token)); } template event_token impl_IRichEditBox3::TextCompositionChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->add_TextCompositionChanged(get_abi(value), &token)); return token; } @@ -47313,13 +50244,13 @@ template event_revoker impl_IRichEditBox3::TextCo template void impl_IRichEditBox3::TextCompositionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionChanged(token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->remove_TextCompositionChanged(token)); } template event_token impl_IRichEditBox3::TextCompositionEnded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionEnded(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->add_TextCompositionEnded(get_abi(value), &token)); return token; } @@ -47330,37 +50261,37 @@ template event_revoker impl_IRichEditBox3::TextCo template void impl_IRichEditBox3::TextCompositionEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionEnded(token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->remove_TextCompositionEnded(token)); } template Windows::UI::Xaml::TextReadingOrder impl_IRichEditBox3::TextReadingOrder() const { Windows::UI::Xaml::TextReadingOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrder(&value)); + check_hresult(WINRT_SHIM(IRichEditBox3)->get_TextReadingOrder(&value)); return value; } template void impl_IRichEditBox3::TextReadingOrder(Windows::UI::Xaml::TextReadingOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_TextReadingOrder(value)); + check_hresult(WINRT_SHIM(IRichEditBox3)->put_TextReadingOrder(value)); } template Windows::UI::Xaml::Controls::CandidateWindowAlignment impl_IRichEditBox3::DesiredCandidateWindowAlignment() const { Windows::UI::Xaml::Controls::CandidateWindowAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredCandidateWindowAlignment(&value)); + check_hresult(WINRT_SHIM(IRichEditBox3)->get_DesiredCandidateWindowAlignment(&value)); return value; } template void impl_IRichEditBox3::DesiredCandidateWindowAlignment(Windows::UI::Xaml::Controls::CandidateWindowAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredCandidateWindowAlignment(value)); + check_hresult(WINRT_SHIM(IRichEditBox3)->put_DesiredCandidateWindowAlignment(value)); } template event_token impl_IRichEditBox3::CandidateWindowBoundsChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CandidateWindowBoundsChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->add_CandidateWindowBoundsChanged(get_abi(value), &token)); return token; } @@ -47371,13 +50302,13 @@ template event_revoker impl_IRichEditBox3::Candid template void impl_IRichEditBox3::CandidateWindowBoundsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CandidateWindowBoundsChanged(token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->remove_CandidateWindowBoundsChanged(token)); } template event_token impl_IRichEditBox3::TextChanging(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextChanging(get(value), &token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->add_TextChanging(get_abi(value), &token)); return token; } @@ -47388,101 +50319,101 @@ template event_revoker impl_IRichEditBox3::TextCh template void impl_IRichEditBox3::TextChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextChanging(token)); + check_hresult(WINRT_SHIM(IRichEditBox3)->remove_TextChanging(token)); } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics3::DesiredCandidateWindowAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DesiredCandidateWindowAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics3)->get_DesiredCandidateWindowAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics3::TextReadingOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrderProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics3)->get_TextReadingOrderProperty(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_IRichEditBox4::GetLinguisticAlternativesAsync() const { Windows::Foundation::IAsyncOperation> returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLinguisticAlternativesAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IRichEditBox4)->abi_GetLinguisticAlternativesAsync(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::RichEditClipboardFormat impl_IRichEditBox4::ClipboardCopyFormat() const { Windows::UI::Xaml::Controls::RichEditClipboardFormat value {}; - check_hresult(static_cast(static_cast(*this))->get_ClipboardCopyFormat(&value)); + check_hresult(WINRT_SHIM(IRichEditBox4)->get_ClipboardCopyFormat(&value)); return value; } template void impl_IRichEditBox4::ClipboardCopyFormat(Windows::UI::Xaml::Controls::RichEditClipboardFormat value) const { - check_hresult(static_cast(static_cast(*this))->put_ClipboardCopyFormat(value)); + check_hresult(WINRT_SHIM(IRichEditBox4)->put_ClipboardCopyFormat(value)); } template Windows::UI::Xaml::DependencyProperty impl_IRichEditBoxStatics4::ClipboardCopyFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClipboardCopyFormatProperty(put(value))); + check_hresult(WINRT_SHIM(IRichEditBoxStatics4)->get_ClipboardCopyFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ISemanticZoomInformation impl_ISemanticZoom::ZoomedInView() const { Windows::UI::Xaml::Controls::ISemanticZoomInformation value; - check_hresult(static_cast(static_cast(*this))->get_ZoomedInView(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoom)->get_ZoomedInView(put_abi(value))); return value; } template void impl_ISemanticZoom::ZoomedInView(const Windows::UI::Xaml::Controls::ISemanticZoomInformation & value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomedInView(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoom)->put_ZoomedInView(get_abi(value))); } template Windows::UI::Xaml::Controls::ISemanticZoomInformation impl_ISemanticZoom::ZoomedOutView() const { Windows::UI::Xaml::Controls::ISemanticZoomInformation value; - check_hresult(static_cast(static_cast(*this))->get_ZoomedOutView(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoom)->get_ZoomedOutView(put_abi(value))); return value; } template void impl_ISemanticZoom::ZoomedOutView(const Windows::UI::Xaml::Controls::ISemanticZoomInformation & value) const { - check_hresult(static_cast(static_cast(*this))->put_ZoomedOutView(get(value))); + check_hresult(WINRT_SHIM(ISemanticZoom)->put_ZoomedOutView(get_abi(value))); } template bool impl_ISemanticZoom::IsZoomedInViewActive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZoomedInViewActive(&value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->get_IsZoomedInViewActive(&value)); return value; } template void impl_ISemanticZoom::IsZoomedInViewActive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZoomedInViewActive(value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->put_IsZoomedInViewActive(value)); } template bool impl_ISemanticZoom::CanChangeViews() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanChangeViews(&value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->get_CanChangeViews(&value)); return value; } template void impl_ISemanticZoom::CanChangeViews(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanChangeViews(value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->put_CanChangeViews(value)); } template event_token impl_ISemanticZoom::ViewChangeStarted(const Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ViewChangeStarted(get(value), &token)); + check_hresult(WINRT_SHIM(ISemanticZoom)->add_ViewChangeStarted(get_abi(value), &token)); return token; } @@ -47493,13 +50424,13 @@ template event_revoker impl_ISemanticZoom::ViewCh template void impl_ISemanticZoom::ViewChangeStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ViewChangeStarted(token)); + check_hresult(WINRT_SHIM(ISemanticZoom)->remove_ViewChangeStarted(token)); } template event_token impl_ISemanticZoom::ViewChangeCompleted(const Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ViewChangeCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(ISemanticZoom)->add_ViewChangeCompleted(get_abi(value), &token)); return token; } @@ -47510,330 +50441,330 @@ template event_revoker impl_ISemanticZoom::ViewCh template void impl_ISemanticZoom::ViewChangeCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ViewChangeCompleted(token)); + check_hresult(WINRT_SHIM(ISemanticZoom)->remove_ViewChangeCompleted(token)); } template void impl_ISemanticZoom::ToggleActiveView() const { - check_hresult(static_cast(static_cast(*this))->abi_ToggleActiveView()); + check_hresult(WINRT_SHIM(ISemanticZoom)->abi_ToggleActiveView()); } template bool impl_ISemanticZoom::IsZoomOutButtonEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsZoomOutButtonEnabled(&value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->get_IsZoomOutButtonEnabled(&value)); return value; } template void impl_ISemanticZoom::IsZoomOutButtonEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsZoomOutButtonEnabled(value)); + check_hresult(WINRT_SHIM(ISemanticZoom)->put_IsZoomOutButtonEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_ISemanticZoomStatics::ZoomedInViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomedInViewProperty(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomStatics)->get_ZoomedInViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISemanticZoomStatics::ZoomedOutViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ZoomedOutViewProperty(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomStatics)->get_ZoomedOutViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISemanticZoomStatics::IsZoomedInViewActiveProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomedInViewActiveProperty(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomStatics)->get_IsZoomedInViewActiveProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISemanticZoomStatics::CanChangeViewsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanChangeViewsProperty(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomStatics)->get_CanChangeViewsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISemanticZoomStatics::IsZoomOutButtonEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomOutButtonEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ISemanticZoomStatics)->get_IsZoomOutButtonEnabledProperty(put_abi(value))); return value; } template bool impl_IStackPanel::AreScrollSnapPointsRegular() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreScrollSnapPointsRegular(&value)); + check_hresult(WINRT_SHIM(IStackPanel)->get_AreScrollSnapPointsRegular(&value)); return value; } template void impl_IStackPanel::AreScrollSnapPointsRegular(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreScrollSnapPointsRegular(value)); + check_hresult(WINRT_SHIM(IStackPanel)->put_AreScrollSnapPointsRegular(value)); } template Windows::UI::Xaml::Controls::Orientation impl_IStackPanel::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IStackPanel)->get_Orientation(&value)); return value; } template void impl_IStackPanel::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IStackPanel)->put_Orientation(value)); } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics::AreScrollSnapPointsRegularProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreScrollSnapPointsRegularProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics)->get_AreScrollSnapPointsRegularProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics)->get_OrientationProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::StackPanel impl_IStackPanelFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::StackPanel impl_IStackPanelFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::StackPanel instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IStackPanelFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::Brush impl_IStackPanel2::BorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrush(put(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->get_BorderBrush(put_abi(value))); return value; } template void impl_IStackPanel2::BorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderBrush(get(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->put_BorderBrush(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IStackPanel2::BorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_BorderThickness(put(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->get_BorderThickness(put_abi(value))); return value; } template void impl_IStackPanel2::BorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_BorderThickness(get(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->put_BorderThickness(get_abi(value))); } template Windows::UI::Xaml::CornerRadius impl_IStackPanel2::CornerRadius() const { Windows::UI::Xaml::CornerRadius value {}; - check_hresult(static_cast(static_cast(*this))->get_CornerRadius(put(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->get_CornerRadius(put_abi(value))); return value; } template void impl_IStackPanel2::CornerRadius(const Windows::UI::Xaml::CornerRadius & value) const { - check_hresult(static_cast(static_cast(*this))->put_CornerRadius(get(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->put_CornerRadius(get_abi(value))); } template Windows::UI::Xaml::Thickness impl_IStackPanel2::Padding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_Padding(put(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->get_Padding(put_abi(value))); return value; } template void impl_IStackPanel2::Padding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_Padding(get(value))); + check_hresult(WINRT_SHIM(IStackPanel2)->put_Padding(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics2::BorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics2)->get_BorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics2::BorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics2)->get_BorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics2::CornerRadiusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CornerRadiusProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics2)->get_CornerRadiusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IStackPanelStatics2::PaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IStackPanelStatics2)->get_PaddingProperty(put_abi(value))); return value; } template hstring impl_ITextBox::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(ITextBox)->get_Text(put_abi(value))); return value; } -template void impl_ITextBox::Text(hstring_ref value) const +template void impl_ITextBox::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(ITextBox)->put_Text(get_abi(value))); } template hstring impl_ITextBox::SelectedText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SelectedText(put(value))); + check_hresult(WINRT_SHIM(ITextBox)->get_SelectedText(put_abi(value))); return value; } -template void impl_ITextBox::SelectedText(hstring_ref value) const +template void impl_ITextBox::SelectedText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedText(get(value))); + check_hresult(WINRT_SHIM(ITextBox)->put_SelectedText(get_abi(value))); } template int32_t impl_ITextBox::SelectionLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionLength(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_SelectionLength(&value)); return value; } template void impl_ITextBox::SelectionLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionLength(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_SelectionLength(value)); } template int32_t impl_ITextBox::SelectionStart() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionStart(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_SelectionStart(&value)); return value; } template void impl_ITextBox::SelectionStart(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionStart(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_SelectionStart(value)); } template int32_t impl_ITextBox::MaxLength() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxLength(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_MaxLength(&value)); return value; } template void impl_ITextBox::MaxLength(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxLength(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_MaxLength(value)); } template bool impl_ITextBox::IsReadOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnly(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_IsReadOnly(&value)); return value; } template void impl_ITextBox::IsReadOnly(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsReadOnly(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_IsReadOnly(value)); } template bool impl_ITextBox::AcceptsReturn() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AcceptsReturn(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_AcceptsReturn(&value)); return value; } template void impl_ITextBox::AcceptsReturn(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AcceptsReturn(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_AcceptsReturn(value)); } template Windows::UI::Xaml::TextAlignment impl_ITextBox::TextAlignment() const { Windows::UI::Xaml::TextAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_TextAlignment(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_TextAlignment(&value)); return value; } template void impl_ITextBox::TextAlignment(Windows::UI::Xaml::TextAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_TextAlignment(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_TextAlignment(value)); } template Windows::UI::Xaml::TextWrapping impl_ITextBox::TextWrapping() const { Windows::UI::Xaml::TextWrapping value {}; - check_hresult(static_cast(static_cast(*this))->get_TextWrapping(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_TextWrapping(&value)); return value; } template void impl_ITextBox::TextWrapping(Windows::UI::Xaml::TextWrapping value) const { - check_hresult(static_cast(static_cast(*this))->put_TextWrapping(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_TextWrapping(value)); } template bool impl_ITextBox::IsSpellCheckEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSpellCheckEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_IsSpellCheckEnabled(&value)); return value; } template void impl_ITextBox::IsSpellCheckEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSpellCheckEnabled(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_IsSpellCheckEnabled(value)); } template bool impl_ITextBox::IsTextPredictionEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextPredictionEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBox)->get_IsTextPredictionEnabled(&value)); return value; } template void impl_ITextBox::IsTextPredictionEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextPredictionEnabled(value)); + check_hresult(WINRT_SHIM(ITextBox)->put_IsTextPredictionEnabled(value)); } template Windows::UI::Xaml::Input::InputScope impl_ITextBox::InputScope() const { Windows::UI::Xaml::Input::InputScope value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScope(put(value))); + check_hresult(WINRT_SHIM(ITextBox)->get_InputScope(put_abi(value))); return value; } template void impl_ITextBox::InputScope(const Windows::UI::Xaml::Input::InputScope & value) const { - check_hresult(static_cast(static_cast(*this))->put_InputScope(get(value))); + check_hresult(WINRT_SHIM(ITextBox)->put_InputScope(get_abi(value))); } template event_token impl_ITextBox::TextChanged(const Windows::UI::Xaml::Controls::TextChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox)->add_TextChanged(get_abi(value), &token)); return token; } @@ -47844,13 +50775,13 @@ template event_revoker impl_ITextBox::TextChanged(auto template void impl_ITextBox::TextChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextChanged(token)); + check_hresult(WINRT_SHIM(ITextBox)->remove_TextChanged(token)); } template event_token impl_ITextBox::SelectionChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox)->add_SelectionChanged(get_abi(value), &token)); return token; } @@ -47861,13 +50792,13 @@ template event_revoker impl_ITextBox::SelectionChanged template void impl_ITextBox::SelectionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectionChanged(token)); + check_hresult(WINRT_SHIM(ITextBox)->remove_SelectionChanged(token)); } template event_token impl_ITextBox::ContextMenuOpening(const Windows::UI::Xaml::Controls::ContextMenuOpeningEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContextMenuOpening(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox)->add_ContextMenuOpening(get_abi(value), &token)); return token; } @@ -47878,172 +50809,172 @@ template event_revoker impl_ITextBox::ContextMenuOpeni template void impl_ITextBox::ContextMenuOpening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContextMenuOpening(token)); + check_hresult(WINRT_SHIM(ITextBox)->remove_ContextMenuOpening(token)); } template void impl_ITextBox::Select(int32_t start, int32_t length) const { - check_hresult(static_cast(static_cast(*this))->abi_Select(start, length)); + check_hresult(WINRT_SHIM(ITextBox)->abi_Select(start, length)); } template void impl_ITextBox::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(ITextBox)->abi_SelectAll()); } template Windows::Foundation::Rect impl_ITextBox::GetRectFromCharacterIndex(int32_t charIndex, bool trailingEdge) const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRectFromCharacterIndex(charIndex, trailingEdge, put(returnValue))); + check_hresult(WINRT_SHIM(ITextBox)->abi_GetRectFromCharacterIndex(charIndex, trailingEdge, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::TextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_TextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::MaxLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxLengthProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_MaxLengthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::IsReadOnlyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsReadOnlyProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_IsReadOnlyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::AcceptsReturnProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AcceptsReturnProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_AcceptsReturnProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::TextAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_TextAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::TextWrappingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextWrappingProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_TextWrappingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::IsSpellCheckEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSpellCheckEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_IsSpellCheckEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::IsTextPredictionEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextPredictionEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_IsTextPredictionEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics::InputScopeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InputScopeProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics)->get_InputScopeProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::TextBox impl_ITextBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::TextBox impl_ITextBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::TextBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ITextBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_ITextBox2::Header() const +template Windows::Foundation::IInspectable impl_ITextBox2::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ITextBox2)->get_Header(put_abi(value))); return value; } -template void impl_ITextBox2::Header(const Windows::IInspectable & value) const +template void impl_ITextBox2::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(ITextBox2)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_ITextBox2::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(ITextBox2)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_ITextBox2::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(ITextBox2)->put_HeaderTemplate(get_abi(value))); } template hstring impl_ITextBox2::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(ITextBox2)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_ITextBox2::PlaceholderText(hstring_ref value) const +template void impl_ITextBox2::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(ITextBox2)->put_PlaceholderText(get_abi(value))); } template Windows::UI::Xaml::Media::SolidColorBrush impl_ITextBox2::SelectionHighlightColor() const { Windows::UI::Xaml::Media::SolidColorBrush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColor(put(value))); + check_hresult(WINRT_SHIM(ITextBox2)->get_SelectionHighlightColor(put_abi(value))); return value; } template void impl_ITextBox2::SelectionHighlightColor(const Windows::UI::Xaml::Media::SolidColorBrush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionHighlightColor(get(value))); + check_hresult(WINRT_SHIM(ITextBox2)->put_SelectionHighlightColor(get_abi(value))); } template bool impl_ITextBox2::PreventKeyboardDisplayOnProgrammaticFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); + check_hresult(WINRT_SHIM(ITextBox2)->get_PreventKeyboardDisplayOnProgrammaticFocus(&value)); return value; } template void impl_ITextBox2::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); + check_hresult(WINRT_SHIM(ITextBox2)->put_PreventKeyboardDisplayOnProgrammaticFocus(value)); } template bool impl_ITextBox2::IsColorFontEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabled(&value)); + check_hresult(WINRT_SHIM(ITextBox2)->get_IsColorFontEnabled(&value)); return value; } template void impl_ITextBox2::IsColorFontEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsColorFontEnabled(value)); + check_hresult(WINRT_SHIM(ITextBox2)->put_IsColorFontEnabled(value)); } template event_token impl_ITextBox2::Paste(const Windows::UI::Xaml::Controls::TextControlPasteEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Paste(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox2)->add_Paste(get_abi(value), &token)); return token; } @@ -48054,55 +50985,55 @@ template event_revoker impl_ITextBox2::Paste(auto_rev template void impl_ITextBox2::Paste(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Paste(token)); + check_hresult(WINRT_SHIM(ITextBox2)->remove_Paste(token)); } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::SelectionHighlightColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionHighlightColorProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_SelectionHighlightColorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::PreventKeyboardDisplayOnProgrammaticFocusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics2::IsColorFontEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsColorFontEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics2)->get_IsColorFontEnabledProperty(put_abi(value))); return value; } template event_token impl_ITextBox3::TextCompositionStarted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionStarted(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox3)->add_TextCompositionStarted(get_abi(value), &token)); return token; } @@ -48113,13 +51044,13 @@ template event_revoker impl_ITextBox3::TextCompositio template void impl_ITextBox3::TextCompositionStarted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionStarted(token)); + check_hresult(WINRT_SHIM(ITextBox3)->remove_TextCompositionStarted(token)); } template event_token impl_ITextBox3::TextCompositionChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox3)->add_TextCompositionChanged(get_abi(value), &token)); return token; } @@ -48130,13 +51061,13 @@ template event_revoker impl_ITextBox3::TextCompositio template void impl_ITextBox3::TextCompositionChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionChanged(token)); + check_hresult(WINRT_SHIM(ITextBox3)->remove_TextCompositionChanged(token)); } template event_token impl_ITextBox3::TextCompositionEnded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextCompositionEnded(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox3)->add_TextCompositionEnded(get_abi(value), &token)); return token; } @@ -48147,37 +51078,37 @@ template event_revoker impl_ITextBox3::TextCompositio template void impl_ITextBox3::TextCompositionEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextCompositionEnded(token)); + check_hresult(WINRT_SHIM(ITextBox3)->remove_TextCompositionEnded(token)); } template Windows::UI::Xaml::TextReadingOrder impl_ITextBox3::TextReadingOrder() const { Windows::UI::Xaml::TextReadingOrder value {}; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrder(&value)); + check_hresult(WINRT_SHIM(ITextBox3)->get_TextReadingOrder(&value)); return value; } template void impl_ITextBox3::TextReadingOrder(Windows::UI::Xaml::TextReadingOrder value) const { - check_hresult(static_cast(static_cast(*this))->put_TextReadingOrder(value)); + check_hresult(WINRT_SHIM(ITextBox3)->put_TextReadingOrder(value)); } template Windows::UI::Xaml::Controls::CandidateWindowAlignment impl_ITextBox3::DesiredCandidateWindowAlignment() const { Windows::UI::Xaml::Controls::CandidateWindowAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_DesiredCandidateWindowAlignment(&value)); + check_hresult(WINRT_SHIM(ITextBox3)->get_DesiredCandidateWindowAlignment(&value)); return value; } template void impl_ITextBox3::DesiredCandidateWindowAlignment(Windows::UI::Xaml::Controls::CandidateWindowAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_DesiredCandidateWindowAlignment(value)); + check_hresult(WINRT_SHIM(ITextBox3)->put_DesiredCandidateWindowAlignment(value)); } template event_token impl_ITextBox3::CandidateWindowBoundsChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CandidateWindowBoundsChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox3)->add_CandidateWindowBoundsChanged(get_abi(value), &token)); return token; } @@ -48188,13 +51119,13 @@ template event_revoker impl_ITextBox3::CandidateWindo template void impl_ITextBox3::CandidateWindowBoundsChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CandidateWindowBoundsChanged(token)); + check_hresult(WINRT_SHIM(ITextBox3)->remove_CandidateWindowBoundsChanged(token)); } template event_token impl_ITextBox3::TextChanging(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextChanging(get(value), &token)); + check_hresult(WINRT_SHIM(ITextBox3)->add_TextChanging(get_abi(value), &token)); return token; } @@ -48205,125 +51136,125 @@ template event_revoker impl_ITextBox3::TextChanging(a template void impl_ITextBox3::TextChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextChanging(token)); + check_hresult(WINRT_SHIM(ITextBox3)->remove_TextChanging(token)); } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics3::DesiredCandidateWindowAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DesiredCandidateWindowAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics3)->get_DesiredCandidateWindowAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITextBoxStatics3::TextReadingOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextReadingOrderProperty(put(value))); + check_hresult(WINRT_SHIM(ITextBoxStatics3)->get_TextReadingOrderProperty(put_abi(value))); return value; } template Windows::Foundation::IAsyncOperation> impl_ITextBox4::GetLinguisticAlternativesAsync() const { Windows::Foundation::IAsyncOperation> returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetLinguisticAlternativesAsync(put(returnValue))); + check_hresult(WINRT_SHIM(ITextBox4)->abi_GetLinguisticAlternativesAsync(put_abi(returnValue))); return returnValue; } template bool impl_IToggleSwitch::IsOn() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOn(&value)); + check_hresult(WINRT_SHIM(IToggleSwitch)->get_IsOn(&value)); return value; } template void impl_IToggleSwitch::IsOn(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOn(value)); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_IsOn(value)); } -template Windows::IInspectable impl_IToggleSwitch::Header() const +template Windows::Foundation::IInspectable impl_IToggleSwitch::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IToggleSwitch)->get_Header(put_abi(value))); return value; } -template void impl_IToggleSwitch::Header(const Windows::IInspectable & value) const +template void impl_IToggleSwitch::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IToggleSwitch::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IToggleSwitch::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_HeaderTemplate(get_abi(value))); } -template Windows::IInspectable impl_IToggleSwitch::OnContent() const +template Windows::Foundation::IInspectable impl_IToggleSwitch::OnContent() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_OnContent(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IToggleSwitch)->get_OnContent(put_abi(value))); return value; } -template void impl_IToggleSwitch::OnContent(const Windows::IInspectable & value) const +template void impl_IToggleSwitch::OnContent(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_OnContent(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_OnContent(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IToggleSwitch::OnContentTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OnContentTemplate(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->get_OnContentTemplate(put_abi(value))); return value; } template void impl_IToggleSwitch::OnContentTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_OnContentTemplate(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_OnContentTemplate(get_abi(value))); } -template Windows::IInspectable impl_IToggleSwitch::OffContent() const +template Windows::Foundation::IInspectable impl_IToggleSwitch::OffContent() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_OffContent(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IToggleSwitch)->get_OffContent(put_abi(value))); return value; } -template void impl_IToggleSwitch::OffContent(const Windows::IInspectable & value) const +template void impl_IToggleSwitch::OffContent(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_OffContent(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_OffContent(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IToggleSwitch::OffContentTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OffContentTemplate(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->get_OffContentTemplate(put_abi(value))); return value; } template void impl_IToggleSwitch::OffContentTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_OffContentTemplate(get(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->put_OffContentTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings impl_IToggleSwitch::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitch)->get_TemplateSettings(put_abi(value))); return value; } template event_token impl_IToggleSwitch::Toggled(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Toggled(get(value), &token)); + check_hresult(WINRT_SHIM(IToggleSwitch)->add_Toggled(get_abi(value), &token)); return token; } @@ -48334,430 +51265,430 @@ template event_revoker impl_IToggleSwitch::Toggle template void impl_IToggleSwitch::Toggled(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Toggled(token)); + check_hresult(WINRT_SHIM(IToggleSwitch)->remove_Toggled(token)); } template void impl_IToggleSwitchOverrides::OnToggled() const { - check_hresult(static_cast(static_cast(*this))->abi_OnToggled()); + check_hresult(WINRT_SHIM(IToggleSwitchOverrides)->abi_OnToggled()); } -template void impl_IToggleSwitchOverrides::OnOnContentChanged(const Windows::IInspectable & oldContent, const Windows::IInspectable & newContent) const +template void impl_IToggleSwitchOverrides::OnOnContentChanged(const Windows::Foundation::IInspectable & oldContent, const Windows::Foundation::IInspectable & newContent) const { - check_hresult(static_cast(static_cast(*this))->abi_OnOnContentChanged(get(oldContent), get(newContent))); + check_hresult(WINRT_SHIM(IToggleSwitchOverrides)->abi_OnOnContentChanged(get_abi(oldContent), get_abi(newContent))); } -template void impl_IToggleSwitchOverrides::OnOffContentChanged(const Windows::IInspectable & oldContent, const Windows::IInspectable & newContent) const +template void impl_IToggleSwitchOverrides::OnOffContentChanged(const Windows::Foundation::IInspectable & oldContent, const Windows::Foundation::IInspectable & newContent) const { - check_hresult(static_cast(static_cast(*this))->abi_OnOffContentChanged(get(oldContent), get(newContent))); + check_hresult(WINRT_SHIM(IToggleSwitchOverrides)->abi_OnOffContentChanged(get_abi(oldContent), get_abi(newContent))); } -template void impl_IToggleSwitchOverrides::OnHeaderChanged(const Windows::IInspectable & oldContent, const Windows::IInspectable & newContent) const +template void impl_IToggleSwitchOverrides::OnHeaderChanged(const Windows::Foundation::IInspectable & oldContent, const Windows::Foundation::IInspectable & newContent) const { - check_hresult(static_cast(static_cast(*this))->abi_OnHeaderChanged(get(oldContent), get(newContent))); + check_hresult(WINRT_SHIM(IToggleSwitchOverrides)->abi_OnHeaderChanged(get_abi(oldContent), get_abi(newContent))); } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::IsOnProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOnProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_IsOnProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::OnContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OnContentProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_OnContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::OnContentTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OnContentTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_OnContentTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::OffContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OffContentProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_OffContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToggleSwitchStatics::OffContentTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OffContentTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IToggleSwitchStatics)->get_OffContentTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::UIElement impl_IUserControl::Content() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IUserControl)->get_Content(put_abi(value))); return value; } template void impl_IUserControl::Content(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(IUserControl)->put_Content(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IUserControlStatics::ContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentProperty(put(value))); + check_hresult(WINRT_SHIM(IUserControlStatics)->get_ContentProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::UserControl impl_IUserControlFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::UserControl impl_IUserControlFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::UserControl instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IUserControlFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template double impl_IVariableSizedWrapGrid::ItemHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemHeight(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_ItemHeight(&value)); return value; } template void impl_IVariableSizedWrapGrid::ItemHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemHeight(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_ItemHeight(value)); } template double impl_IVariableSizedWrapGrid::ItemWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemWidth(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_ItemWidth(&value)); return value; } template void impl_IVariableSizedWrapGrid::ItemWidth(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemWidth(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_ItemWidth(value)); } template Windows::UI::Xaml::Controls::Orientation impl_IVariableSizedWrapGrid::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_Orientation(&value)); return value; } template void impl_IVariableSizedWrapGrid::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_Orientation(value)); } template Windows::UI::Xaml::HorizontalAlignment impl_IVariableSizedWrapGrid::HorizontalChildrenAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalChildrenAlignment(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_HorizontalChildrenAlignment(&value)); return value; } template void impl_IVariableSizedWrapGrid::HorizontalChildrenAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalChildrenAlignment(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_HorizontalChildrenAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_IVariableSizedWrapGrid::VerticalChildrenAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalChildrenAlignment(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_VerticalChildrenAlignment(&value)); return value; } template void impl_IVariableSizedWrapGrid::VerticalChildrenAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalChildrenAlignment(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_VerticalChildrenAlignment(value)); } template int32_t impl_IVariableSizedWrapGrid::MaximumRowsOrColumns() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaximumRowsOrColumns(&value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->get_MaximumRowsOrColumns(&value)); return value; } template void impl_IVariableSizedWrapGrid::MaximumRowsOrColumns(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaximumRowsOrColumns(value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGrid)->put_MaximumRowsOrColumns(value)); } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::ItemHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_ItemHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::ItemWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_ItemWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::HorizontalChildrenAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalChildrenAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_HorizontalChildrenAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::VerticalChildrenAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalChildrenAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_VerticalChildrenAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::MaximumRowsOrColumnsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaximumRowsOrColumnsProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_MaximumRowsOrColumnsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::RowSpanProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RowSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_RowSpanProperty(put_abi(value))); return value; } template int32_t impl_IVariableSizedWrapGridStatics::GetRowSpan(const Windows::UI::Xaml::UIElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetRowSpan(get(element), &value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->abi_GetRowSpan(get_abi(element), &value)); return value; } template void impl_IVariableSizedWrapGridStatics::SetRowSpan(const Windows::UI::Xaml::UIElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetRowSpan(get(element), value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->abi_SetRowSpan(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IVariableSizedWrapGridStatics::ColumnSpanProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ColumnSpanProperty(put(value))); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->get_ColumnSpanProperty(put_abi(value))); return value; } template int32_t impl_IVariableSizedWrapGridStatics::GetColumnSpan(const Windows::UI::Xaml::UIElement & element) const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetColumnSpan(get(element), &value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->abi_GetColumnSpan(get_abi(element), &value)); return value; } template void impl_IVariableSizedWrapGridStatics::SetColumnSpan(const Windows::UI::Xaml::UIElement & element, int32_t value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetColumnSpan(get(element), value)); + check_hresult(WINRT_SHIM(IVariableSizedWrapGridStatics)->abi_SetColumnSpan(get_abi(element), value)); } template Windows::UI::Xaml::Controls::ItemContainerGenerator impl_IVirtualizingPanel::ItemContainerGenerator() const { Windows::UI::Xaml::Controls::ItemContainerGenerator value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemContainerGenerator(put(value))); + check_hresult(WINRT_SHIM(IVirtualizingPanel)->get_ItemContainerGenerator(put_abi(value))); return value; } -template void impl_IVirtualizingPanelOverrides::OnItemsChanged(const Windows::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs & args) const +template void impl_IVirtualizingPanelOverrides::OnItemsChanged(const Windows::Foundation::IInspectable & sender, const Windows::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs & args) const { - check_hresult(static_cast(static_cast(*this))->abi_OnItemsChanged(get(sender), get(args))); + check_hresult(WINRT_SHIM(IVirtualizingPanelOverrides)->abi_OnItemsChanged(get_abi(sender), get_abi(args))); } template void impl_IVirtualizingPanelOverrides::OnClearChildren() const { - check_hresult(static_cast(static_cast(*this))->abi_OnClearChildren()); + check_hresult(WINRT_SHIM(IVirtualizingPanelOverrides)->abi_OnClearChildren()); } template void impl_IVirtualizingPanelOverrides::BringIndexIntoView(int32_t index) const { - check_hresult(static_cast(static_cast(*this))->abi_BringIndexIntoView(index)); + check_hresult(WINRT_SHIM(IVirtualizingPanelOverrides)->abi_BringIndexIntoView(index)); } template void impl_IVirtualizingPanelProtected::AddInternalChild(const Windows::UI::Xaml::UIElement & child) const { - check_hresult(static_cast(static_cast(*this))->abi_AddInternalChild(get(child))); + check_hresult(WINRT_SHIM(IVirtualizingPanelProtected)->abi_AddInternalChild(get_abi(child))); } template void impl_IVirtualizingPanelProtected::InsertInternalChild(int32_t index, const Windows::UI::Xaml::UIElement & child) const { - check_hresult(static_cast(static_cast(*this))->abi_InsertInternalChild(index, get(child))); + check_hresult(WINRT_SHIM(IVirtualizingPanelProtected)->abi_InsertInternalChild(index, get_abi(child))); } template void impl_IVirtualizingPanelProtected::RemoveInternalChildRange(int32_t index, int32_t range) const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveInternalChildRange(index, range)); + check_hresult(WINRT_SHIM(IVirtualizingPanelProtected)->abi_RemoveInternalChildRange(index, range)); } -template Windows::UI::Xaml::Controls::GroupItem impl_IGroupItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::GroupItem impl_IGroupItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::GroupItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IGroupItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IProgressBar::IsIndeterminate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIndeterminate(&value)); + check_hresult(WINRT_SHIM(IProgressBar)->get_IsIndeterminate(&value)); return value; } template void impl_IProgressBar::IsIndeterminate(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIndeterminate(value)); + check_hresult(WINRT_SHIM(IProgressBar)->put_IsIndeterminate(value)); } template bool impl_IProgressBar::ShowError() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowError(&value)); + check_hresult(WINRT_SHIM(IProgressBar)->get_ShowError(&value)); return value; } template void impl_IProgressBar::ShowError(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowError(value)); + check_hresult(WINRT_SHIM(IProgressBar)->put_ShowError(value)); } template bool impl_IProgressBar::ShowPaused() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowPaused(&value)); + check_hresult(WINRT_SHIM(IProgressBar)->get_ShowPaused(&value)); return value; } template void impl_IProgressBar::ShowPaused(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowPaused(value)); + check_hresult(WINRT_SHIM(IProgressBar)->put_ShowPaused(value)); } template Windows::UI::Xaml::Controls::Primitives::ProgressBarTemplateSettings impl_IProgressBar::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::ProgressBarTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IProgressBar)->get_TemplateSettings(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IProgressBarStatics::IsIndeterminateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsIndeterminateProperty(put(value))); + check_hresult(WINRT_SHIM(IProgressBarStatics)->get_IsIndeterminateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IProgressBarStatics::ShowErrorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShowErrorProperty(put(value))); + check_hresult(WINRT_SHIM(IProgressBarStatics)->get_ShowErrorProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IProgressBarStatics::ShowPausedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShowPausedProperty(put(value))); + check_hresult(WINRT_SHIM(IProgressBarStatics)->get_ShowPausedProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ProgressBar impl_IProgressBarFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ProgressBar impl_IProgressBarFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ProgressBar instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IProgressBarFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template hstring impl_ISettingsFlyout::Title() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->get_Title(put_abi(value))); return value; } -template void impl_ISettingsFlyout::Title(hstring_ref value) const +template void impl_ISettingsFlyout::Title(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->put_Title(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ISettingsFlyout::HeaderBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderBackground(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->get_HeaderBackground(put_abi(value))); return value; } template void impl_ISettingsFlyout::HeaderBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderBackground(get(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->put_HeaderBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ISettingsFlyout::HeaderForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderForeground(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->get_HeaderForeground(put_abi(value))); return value; } template void impl_ISettingsFlyout::HeaderForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderForeground(get(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->put_HeaderForeground(get_abi(value))); } template Windows::UI::Xaml::Media::ImageSource impl_ISettingsFlyout::IconSource() const { Windows::UI::Xaml::Media::ImageSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IconSource(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->get_IconSource(put_abi(value))); return value; } template void impl_ISettingsFlyout::IconSource(const Windows::UI::Xaml::Media::ImageSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_IconSource(get(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->put_IconSource(get_abi(value))); } template Windows::UI::Xaml::Controls::Primitives::SettingsFlyoutTemplateSettings impl_ISettingsFlyout::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::SettingsFlyoutTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyout)->get_TemplateSettings(put_abi(value))); return value; } template event_token impl_ISettingsFlyout::BackClick(const Windows::UI::Xaml::Controls::BackClickEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BackClick(get(value), &token)); + check_hresult(WINRT_SHIM(ISettingsFlyout)->add_BackClick(get_abi(value), &token)); return token; } @@ -48768,346 +51699,346 @@ template event_revoker impl_ISettingsFlyout::Ba template void impl_ISettingsFlyout::BackClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BackClick(token)); + check_hresult(WINRT_SHIM(ISettingsFlyout)->remove_BackClick(token)); } template void impl_ISettingsFlyout::Show() const { - check_hresult(static_cast(static_cast(*this))->abi_Show()); + check_hresult(WINRT_SHIM(ISettingsFlyout)->abi_Show()); } template void impl_ISettingsFlyout::ShowIndependent() const { - check_hresult(static_cast(static_cast(*this))->abi_ShowIndependent()); + check_hresult(WINRT_SHIM(ISettingsFlyout)->abi_ShowIndependent()); } template void impl_ISettingsFlyout::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(ISettingsFlyout)->abi_Hide()); } template Windows::UI::Xaml::DependencyProperty impl_ISettingsFlyoutStatics::TitleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleProperty(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutStatics)->get_TitleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISettingsFlyoutStatics::HeaderBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutStatics)->get_HeaderBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISettingsFlyoutStatics::HeaderForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutStatics)->get_HeaderForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISettingsFlyoutStatics::IconSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IconSourceProperty(put(value))); + check_hresult(WINRT_SHIM(ISettingsFlyoutStatics)->get_IconSourceProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::SettingsFlyout impl_ISettingsFlyoutFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::SettingsFlyout impl_ISettingsFlyoutFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::SettingsFlyout instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISettingsFlyoutFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template double impl_ISlider::IntermediateValue() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_IntermediateValue(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_IntermediateValue(&value)); return value; } template void impl_ISlider::IntermediateValue(double value) const { - check_hresult(static_cast(static_cast(*this))->put_IntermediateValue(value)); + check_hresult(WINRT_SHIM(ISlider)->put_IntermediateValue(value)); } template double impl_ISlider::StepFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_StepFrequency(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_StepFrequency(&value)); return value; } template void impl_ISlider::StepFrequency(double value) const { - check_hresult(static_cast(static_cast(*this))->put_StepFrequency(value)); + check_hresult(WINRT_SHIM(ISlider)->put_StepFrequency(value)); } template Windows::UI::Xaml::Controls::Primitives::SliderSnapsTo impl_ISlider::SnapsTo() const { Windows::UI::Xaml::Controls::Primitives::SliderSnapsTo value {}; - check_hresult(static_cast(static_cast(*this))->get_SnapsTo(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_SnapsTo(&value)); return value; } template void impl_ISlider::SnapsTo(Windows::UI::Xaml::Controls::Primitives::SliderSnapsTo value) const { - check_hresult(static_cast(static_cast(*this))->put_SnapsTo(value)); + check_hresult(WINRT_SHIM(ISlider)->put_SnapsTo(value)); } template double impl_ISlider::TickFrequency() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_TickFrequency(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_TickFrequency(&value)); return value; } template void impl_ISlider::TickFrequency(double value) const { - check_hresult(static_cast(static_cast(*this))->put_TickFrequency(value)); + check_hresult(WINRT_SHIM(ISlider)->put_TickFrequency(value)); } template Windows::UI::Xaml::Controls::Primitives::TickPlacement impl_ISlider::TickPlacement() const { Windows::UI::Xaml::Controls::Primitives::TickPlacement value {}; - check_hresult(static_cast(static_cast(*this))->get_TickPlacement(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_TickPlacement(&value)); return value; } template void impl_ISlider::TickPlacement(Windows::UI::Xaml::Controls::Primitives::TickPlacement value) const { - check_hresult(static_cast(static_cast(*this))->put_TickPlacement(value)); + check_hresult(WINRT_SHIM(ISlider)->put_TickPlacement(value)); } template Windows::UI::Xaml::Controls::Orientation impl_ISlider::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_Orientation(&value)); return value; } template void impl_ISlider::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(ISlider)->put_Orientation(value)); } template bool impl_ISlider::IsDirectionReversed() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDirectionReversed(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_IsDirectionReversed(&value)); return value; } template void impl_ISlider::IsDirectionReversed(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDirectionReversed(value)); + check_hresult(WINRT_SHIM(ISlider)->put_IsDirectionReversed(value)); } template bool impl_ISlider::IsThumbToolTipEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsThumbToolTipEnabled(&value)); + check_hresult(WINRT_SHIM(ISlider)->get_IsThumbToolTipEnabled(&value)); return value; } template void impl_ISlider::IsThumbToolTipEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsThumbToolTipEnabled(value)); + check_hresult(WINRT_SHIM(ISlider)->put_IsThumbToolTipEnabled(value)); } template Windows::UI::Xaml::Data::IValueConverter impl_ISlider::ThumbToolTipValueConverter() const { Windows::UI::Xaml::Data::IValueConverter value; - check_hresult(static_cast(static_cast(*this))->get_ThumbToolTipValueConverter(put(value))); + check_hresult(WINRT_SHIM(ISlider)->get_ThumbToolTipValueConverter(put_abi(value))); return value; } template void impl_ISlider::ThumbToolTipValueConverter(const Windows::UI::Xaml::Data::IValueConverter & value) const { - check_hresult(static_cast(static_cast(*this))->put_ThumbToolTipValueConverter(get(value))); + check_hresult(WINRT_SHIM(ISlider)->put_ThumbToolTipValueConverter(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::IntermediateValueProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IntermediateValueProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_IntermediateValueProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::StepFrequencyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StepFrequencyProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_StepFrequencyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::SnapsToProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SnapsToProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_SnapsToProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::TickFrequencyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TickFrequencyProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_TickFrequencyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::TickPlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TickPlacementProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_TickPlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::IsDirectionReversedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsDirectionReversedProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_IsDirectionReversedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::IsThumbToolTipEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsThumbToolTipEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_IsThumbToolTipEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics::ThumbToolTipValueConverterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ThumbToolTipValueConverterProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics)->get_ThumbToolTipValueConverterProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Slider impl_ISliderFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Slider impl_ISliderFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Slider instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISliderFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_ISlider2::Header() const +template Windows::Foundation::IInspectable impl_ISlider2::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ISlider2)->get_Header(put_abi(value))); return value; } -template void impl_ISlider2::Header(const Windows::IInspectable & value) const +template void impl_ISlider2::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(ISlider2)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_ISlider2::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(ISlider2)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_ISlider2::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(ISlider2)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics2::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics2)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISliderStatics2::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(ISliderStatics2)->get_HeaderTemplateProperty(put_abi(value))); return value; } template double impl_IToolTip::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IToolTip)->get_HorizontalOffset(&value)); return value; } template void impl_IToolTip::HorizontalOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalOffset(value)); + check_hresult(WINRT_SHIM(IToolTip)->put_HorizontalOffset(value)); } template bool impl_IToolTip::IsOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOpen(&value)); + check_hresult(WINRT_SHIM(IToolTip)->get_IsOpen(&value)); return value; } template void impl_IToolTip::IsOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOpen(value)); + check_hresult(WINRT_SHIM(IToolTip)->put_IsOpen(value)); } template Windows::UI::Xaml::Controls::Primitives::PlacementMode impl_IToolTip::Placement() const { Windows::UI::Xaml::Controls::Primitives::PlacementMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Placement(&value)); + check_hresult(WINRT_SHIM(IToolTip)->get_Placement(&value)); return value; } template void impl_IToolTip::Placement(Windows::UI::Xaml::Controls::Primitives::PlacementMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Placement(value)); + check_hresult(WINRT_SHIM(IToolTip)->put_Placement(value)); } template Windows::UI::Xaml::UIElement impl_IToolTip::PlacementTarget() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementTarget(put(value))); + check_hresult(WINRT_SHIM(IToolTip)->get_PlacementTarget(put_abi(value))); return value; } template void impl_IToolTip::PlacementTarget(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_PlacementTarget(get(value))); + check_hresult(WINRT_SHIM(IToolTip)->put_PlacementTarget(get_abi(value))); } template double impl_IToolTip::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IToolTip)->get_VerticalOffset(&value)); return value; } template void impl_IToolTip::VerticalOffset(double value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalOffset(value)); + check_hresult(WINRT_SHIM(IToolTip)->put_VerticalOffset(value)); } template Windows::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings impl_IToolTip::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IToolTip)->get_TemplateSettings(put_abi(value))); return value; } template event_token impl_IToolTip::Closed(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(IToolTip)->add_Closed(get_abi(value), &token)); return token; } @@ -49118,13 +52049,13 @@ template event_revoker impl_IToolTip::Closed(auto_revo template void impl_IToolTip::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IToolTip)->remove_Closed(token)); } template event_token impl_IToolTip::Opened(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(IToolTip)->add_Opened(get_abi(value), &token)); return token; } @@ -49135,538 +52066,538 @@ template event_revoker impl_IToolTip::Opened(auto_revo template void impl_IToolTip::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IToolTip)->remove_Opened(token)); } template Windows::UI::Xaml::DependencyProperty impl_IToolTipStatics::HorizontalOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipStatics)->get_HorizontalOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToolTipStatics::IsOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOpenProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipStatics)->get_IsOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToolTipStatics::PlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipStatics)->get_PlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToolTipStatics::PlacementTargetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlacementTargetProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipStatics)->get_PlacementTargetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IToolTipStatics::VerticalOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IToolTipStatics)->get_VerticalOffsetProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ToolTip impl_IToolTipFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ToolTip impl_IToolTipFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ToolTip instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IToolTipFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::Button impl_IButtonFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Button impl_IButtonFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Button instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IButtonFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::Primitives::FlyoutBase impl_IButtonWithFlyout::Flyout() const { Windows::UI::Xaml::Controls::Primitives::FlyoutBase value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Flyout(put(value))); + check_hresult(WINRT_SHIM(IButtonWithFlyout)->get_Flyout(put_abi(value))); return value; } template void impl_IButtonWithFlyout::Flyout(const Windows::UI::Xaml::Controls::Primitives::FlyoutBase & value) const { - check_hresult(static_cast(static_cast(*this))->put_Flyout(get(value))); + check_hresult(WINRT_SHIM(IButtonWithFlyout)->put_Flyout(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IButtonStaticsWithFlyout::FlyoutProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlyoutProperty(put(value))); + check_hresult(WINRT_SHIM(IButtonStaticsWithFlyout)->get_FlyoutProperty(put_abi(value))); return value; } template bool impl_IComboBox::IsDropDownOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsDropDownOpen(&value)); + check_hresult(WINRT_SHIM(IComboBox)->get_IsDropDownOpen(&value)); return value; } template void impl_IComboBox::IsDropDownOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsDropDownOpen(value)); + check_hresult(WINRT_SHIM(IComboBox)->put_IsDropDownOpen(value)); } template bool impl_IComboBox::IsEditable() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsEditable(&value)); + check_hresult(WINRT_SHIM(IComboBox)->get_IsEditable(&value)); return value; } template bool impl_IComboBox::IsSelectionBoxHighlighted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSelectionBoxHighlighted(&value)); + check_hresult(WINRT_SHIM(IComboBox)->get_IsSelectionBoxHighlighted(&value)); return value; } template double impl_IComboBox::MaxDropDownHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDropDownHeight(&value)); + check_hresult(WINRT_SHIM(IComboBox)->get_MaxDropDownHeight(&value)); return value; } template void impl_IComboBox::MaxDropDownHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDropDownHeight(value)); + check_hresult(WINRT_SHIM(IComboBox)->put_MaxDropDownHeight(value)); } -template Windows::IInspectable impl_IComboBox::SelectionBoxItem() const +template Windows::Foundation::IInspectable impl_IComboBox::SelectionBoxItem() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SelectionBoxItem(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IComboBox)->get_SelectionBoxItem(put_abi(value))); return value; } template Windows::UI::Xaml::DataTemplate impl_IComboBox::SelectionBoxItemTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionBoxItemTemplate(put(value))); + check_hresult(WINRT_SHIM(IComboBox)->get_SelectionBoxItemTemplate(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings impl_IComboBox::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IComboBox)->get_TemplateSettings(put_abi(value))); return value; } -template event_token impl_IComboBox::DropDownClosed(const Windows::Foundation::EventHandler & value) const +template event_token impl_IComboBox::DropDownClosed(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DropDownClosed(get(value), &token)); + check_hresult(WINRT_SHIM(IComboBox)->add_DropDownClosed(get_abi(value), &token)); return token; } -template event_revoker impl_IComboBox::DropDownClosed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IComboBox::DropDownClosed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IComboBox::remove_DropDownClosed, DropDownClosed(value)); } template void impl_IComboBox::DropDownClosed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DropDownClosed(token)); + check_hresult(WINRT_SHIM(IComboBox)->remove_DropDownClosed(token)); } -template event_token impl_IComboBox::DropDownOpened(const Windows::Foundation::EventHandler & value) const +template event_token impl_IComboBox::DropDownOpened(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DropDownOpened(get(value), &token)); + check_hresult(WINRT_SHIM(IComboBox)->add_DropDownOpened(get_abi(value), &token)); return token; } -template event_revoker impl_IComboBox::DropDownOpened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IComboBox::DropDownOpened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IComboBox::remove_DropDownOpened, DropDownOpened(value)); } template void impl_IComboBox::DropDownOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DropDownOpened(token)); + check_hresult(WINRT_SHIM(IComboBox)->remove_DropDownOpened(token)); } -template void impl_IComboBoxOverrides::OnDropDownClosed(const Windows::IInspectable & e) const +template void impl_IComboBoxOverrides::OnDropDownClosed(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnDropDownClosed(get(e))); + check_hresult(WINRT_SHIM(IComboBoxOverrides)->abi_OnDropDownClosed(get_abi(e))); } -template void impl_IComboBoxOverrides::OnDropDownOpened(const Windows::IInspectable & e) const +template void impl_IComboBoxOverrides::OnDropDownOpened(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnDropDownOpened(get(e))); + check_hresult(WINRT_SHIM(IComboBoxOverrides)->abi_OnDropDownOpened(get_abi(e))); } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics::IsDropDownOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsDropDownOpenProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics)->get_IsDropDownOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics::MaxDropDownHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxDropDownHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics)->get_MaxDropDownHeightProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ComboBox impl_IComboBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ComboBox impl_IComboBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ComboBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IComboBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IComboBox2::Header() const +template Windows::Foundation::IInspectable impl_IComboBox2::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IComboBox2)->get_Header(put_abi(value))); return value; } -template void impl_IComboBox2::Header(const Windows::IInspectable & value) const +template void impl_IComboBox2::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IComboBox2)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IComboBox2::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IComboBox2)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IComboBox2::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IComboBox2)->put_HeaderTemplate(get_abi(value))); } template hstring impl_IComboBox2::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(IComboBox2)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_IComboBox2::PlaceholderText(hstring_ref value) const +template void impl_IComboBox2::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(IComboBox2)->put_PlaceholderText(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics2::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics2)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics2::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics2)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics2::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics2)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IComboBox3::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IComboBox3)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IComboBox3::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IComboBox3)->put_LightDismissOverlayMode(value)); } template bool impl_IComboBox3::IsTextSearchEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextSearchEnabled(&value)); + check_hresult(WINRT_SHIM(IComboBox3)->get_IsTextSearchEnabled(&value)); return value; } template void impl_IComboBox3::IsTextSearchEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextSearchEnabled(value)); + check_hresult(WINRT_SHIM(IComboBox3)->put_IsTextSearchEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics3::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics3)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IComboBoxStatics3::IsTextSearchEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextSearchEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IComboBoxStatics3)->get_IsTextSearchEnabledProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ComboBoxItem impl_IComboBoxItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ComboBoxItem impl_IComboBoxItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ComboBoxItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IComboBoxItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::FlipView impl_IFlipViewFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::FlipView impl_IFlipViewFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::FlipView instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlipViewFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IFlipView2::UseTouchAnimationsForAllNavigation() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UseTouchAnimationsForAllNavigation(&value)); + check_hresult(WINRT_SHIM(IFlipView2)->get_UseTouchAnimationsForAllNavigation(&value)); return value; } template void impl_IFlipView2::UseTouchAnimationsForAllNavigation(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_UseTouchAnimationsForAllNavigation(value)); + check_hresult(WINRT_SHIM(IFlipView2)->put_UseTouchAnimationsForAllNavigation(value)); } template Windows::UI::Xaml::DependencyProperty impl_IFlipViewStatics2::UseTouchAnimationsForAllNavigationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UseTouchAnimationsForAllNavigationProperty(put(value))); + check_hresult(WINRT_SHIM(IFlipViewStatics2)->get_UseTouchAnimationsForAllNavigationProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::FlipViewItem impl_IFlipViewItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::FlipViewItem impl_IFlipViewItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::FlipViewItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlipViewItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Foundation::Uri impl_IHyperlinkButton::NavigateUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NavigateUri(put(value))); + check_hresult(WINRT_SHIM(IHyperlinkButton)->get_NavigateUri(put_abi(value))); return value; } template void impl_IHyperlinkButton::NavigateUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_NavigateUri(get(value))); + check_hresult(WINRT_SHIM(IHyperlinkButton)->put_NavigateUri(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IHyperlinkButtonStatics::NavigateUriProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NavigateUriProperty(put(value))); + check_hresult(WINRT_SHIM(IHyperlinkButtonStatics)->get_NavigateUriProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::HyperlinkButton impl_IHyperlinkButtonFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::HyperlinkButton impl_IHyperlinkButtonFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::HyperlinkButton instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHyperlinkButtonFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::Foundation::Collections::IVector impl_IListBox::SelectedItems() const +template Windows::Foundation::Collections::IVector impl_IListBox::SelectedItems() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SelectedItems(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(IListBox)->get_SelectedItems(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::SelectionMode impl_IListBox::SelectionMode() const { Windows::UI::Xaml::Controls::SelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(IListBox)->get_SelectionMode(&value)); return value; } template void impl_IListBox::SelectionMode(Windows::UI::Xaml::Controls::SelectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionMode(value)); + check_hresult(WINRT_SHIM(IListBox)->put_SelectionMode(value)); } -template void impl_IListBox::ScrollIntoView(const Windows::IInspectable & item) const +template void impl_IListBox::ScrollIntoView(const Windows::Foundation::IInspectable & item) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoView(get(item))); + check_hresult(WINRT_SHIM(IListBox)->abi_ScrollIntoView(get_abi(item))); } template void impl_IListBox::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(IListBox)->abi_SelectAll()); } template Windows::UI::Xaml::DependencyProperty impl_IListBoxStatics::SelectionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IListBoxStatics)->get_SelectionModeProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ListBox impl_IListBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ListBox impl_IListBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ListBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IListBox2::SingleSelectionFollowsFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SingleSelectionFollowsFocus(&value)); + check_hresult(WINRT_SHIM(IListBox2)->get_SingleSelectionFollowsFocus(&value)); return value; } template void impl_IListBox2::SingleSelectionFollowsFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SingleSelectionFollowsFocus(value)); + check_hresult(WINRT_SHIM(IListBox2)->put_SingleSelectionFollowsFocus(value)); } template Windows::UI::Xaml::DependencyProperty impl_IListBoxStatics2::SingleSelectionFollowsFocusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SingleSelectionFollowsFocusProperty(put(value))); + check_hresult(WINRT_SHIM(IListBoxStatics2)->get_SingleSelectionFollowsFocusProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ListBoxItem impl_IListBoxItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ListBoxItem impl_IListBoxItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ListBoxItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListBoxItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::Foundation::Collections::IVector impl_IListViewBase::SelectedItems() const +template Windows::Foundation::Collections::IVector impl_IListViewBase::SelectedItems() const { - Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SelectedItems(put(value))); + Windows::Foundation::Collections::IVector value; + check_hresult(WINRT_SHIM(IListViewBase)->get_SelectedItems(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ListViewSelectionMode impl_IListViewBase::SelectionMode() const { Windows::UI::Xaml::Controls::ListViewSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_SelectionMode(&value)); return value; } template void impl_IListViewBase::SelectionMode(Windows::UI::Xaml::Controls::ListViewSelectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionMode(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_SelectionMode(value)); } template bool impl_IListViewBase::IsSwipeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSwipeEnabled(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_IsSwipeEnabled(&value)); return value; } template void impl_IListViewBase::IsSwipeEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSwipeEnabled(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_IsSwipeEnabled(value)); } template bool impl_IListViewBase::CanDragItems() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanDragItems(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_CanDragItems(&value)); return value; } template void impl_IListViewBase::CanDragItems(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanDragItems(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_CanDragItems(value)); } template bool impl_IListViewBase::CanReorderItems() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanReorderItems(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_CanReorderItems(&value)); return value; } template void impl_IListViewBase::CanReorderItems(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanReorderItems(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_CanReorderItems(value)); } template bool impl_IListViewBase::IsItemClickEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsItemClickEnabled(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_IsItemClickEnabled(&value)); return value; } template void impl_IListViewBase::IsItemClickEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsItemClickEnabled(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_IsItemClickEnabled(value)); } template double impl_IListViewBase::DataFetchSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DataFetchSize(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_DataFetchSize(&value)); return value; } template void impl_IListViewBase::DataFetchSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DataFetchSize(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_DataFetchSize(value)); } template double impl_IListViewBase::IncrementalLoadingThreshold() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_IncrementalLoadingThreshold(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_IncrementalLoadingThreshold(&value)); return value; } template void impl_IListViewBase::IncrementalLoadingThreshold(double value) const { - check_hresult(static_cast(static_cast(*this))->put_IncrementalLoadingThreshold(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_IncrementalLoadingThreshold(value)); } template Windows::UI::Xaml::Controls::IncrementalLoadingTrigger impl_IListViewBase::IncrementalLoadingTrigger() const { Windows::UI::Xaml::Controls::IncrementalLoadingTrigger value {}; - check_hresult(static_cast(static_cast(*this))->get_IncrementalLoadingTrigger(&value)); + check_hresult(WINRT_SHIM(IListViewBase)->get_IncrementalLoadingTrigger(&value)); return value; } template void impl_IListViewBase::IncrementalLoadingTrigger(Windows::UI::Xaml::Controls::IncrementalLoadingTrigger value) const { - check_hresult(static_cast(static_cast(*this))->put_IncrementalLoadingTrigger(value)); + check_hresult(WINRT_SHIM(IListViewBase)->put_IncrementalLoadingTrigger(value)); } template event_token impl_IListViewBase::ItemClick(const Windows::UI::Xaml::Controls::ItemClickEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ItemClick(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase)->add_ItemClick(get_abi(value), &token)); return token; } @@ -49677,13 +52608,13 @@ template event_revoker impl_IListViewBase::ItemCl template void impl_IListViewBase::ItemClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ItemClick(token)); + check_hresult(WINRT_SHIM(IListViewBase)->remove_ItemClick(token)); } template event_token impl_IListViewBase::DragItemsStarting(const Windows::UI::Xaml::Controls::DragItemsStartingEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DragItemsStarting(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase)->add_DragItemsStarting(get_abi(value), &token)); return token; } @@ -49694,188 +52625,188 @@ template event_revoker impl_IListViewBase::DragIt template void impl_IListViewBase::DragItemsStarting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DragItemsStarting(token)); + check_hresult(WINRT_SHIM(IListViewBase)->remove_DragItemsStarting(token)); } -template void impl_IListViewBase::ScrollIntoView(const Windows::IInspectable & item) const +template void impl_IListViewBase::ScrollIntoView(const Windows::Foundation::IInspectable & item) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoView(get(item))); + check_hresult(WINRT_SHIM(IListViewBase)->abi_ScrollIntoView(get_abi(item))); } template void impl_IListViewBase::SelectAll() const { - check_hresult(static_cast(static_cast(*this))->abi_SelectAll()); + check_hresult(WINRT_SHIM(IListViewBase)->abi_SelectAll()); } template Windows::Foundation::IAsyncOperation impl_IListViewBase::LoadMoreItemsAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_LoadMoreItemsAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IListViewBase)->abi_LoadMoreItemsAsync(put_abi(returnValue))); return returnValue; } -template void impl_IListViewBase::ScrollIntoView(const Windows::IInspectable & item, Windows::UI::Xaml::Controls::ScrollIntoViewAlignment alignment) const +template void impl_IListViewBase::ScrollIntoView(const Windows::Foundation::IInspectable & item, Windows::UI::Xaml::Controls::ScrollIntoViewAlignment alignment) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollIntoViewWithAlignment(get(item), alignment)); + check_hresult(WINRT_SHIM(IListViewBase)->abi_ScrollIntoViewWithAlignment(get_abi(item), alignment)); } -template Windows::IInspectable impl_IListViewBase::Header() const +template Windows::Foundation::IInspectable impl_IListViewBase::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IListViewBase)->get_Header(put_abi(value))); return value; } -template void impl_IListViewBase::Header(const Windows::IInspectable & value) const +template void impl_IListViewBase::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IListViewBase)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IListViewBase::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IListViewBase)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IListViewBase::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IListViewBase)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IListViewBase::HeaderTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTransitions(put(value))); + check_hresult(WINRT_SHIM(IListViewBase)->get_HeaderTransitions(put_abi(value))); return value; } template void impl_IListViewBase::HeaderTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTransitions(get(value))); + check_hresult(WINRT_SHIM(IListViewBase)->put_HeaderTransitions(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::SelectionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionModeProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_SelectionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IsSwipeEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSwipeEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IsSwipeEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::CanDragItemsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanDragItemsProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_CanDragItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::CanReorderItemsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanReorderItemsProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_CanReorderItemsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IsItemClickEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsItemClickEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IsItemClickEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::DataFetchSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataFetchSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_DataFetchSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IncrementalLoadingThresholdProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IncrementalLoadingThresholdProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IncrementalLoadingThresholdProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IncrementalLoadingTriggerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IncrementalLoadingTriggerProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IncrementalLoadingTriggerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::SemanticZoomOwnerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SemanticZoomOwnerProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_SemanticZoomOwnerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IsActiveViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsActiveViewProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IsActiveViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::IsZoomedInViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomedInViewProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_IsZoomedInViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics::HeaderTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics)->get_HeaderTransitionsProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ListViewBase impl_IListViewBaseFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ListViewBase impl_IListViewBaseFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ListViewBase instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IListViewBaseFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IListViewBase2::ShowsScrollingPlaceholders() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ShowsScrollingPlaceholders(&value)); + check_hresult(WINRT_SHIM(IListViewBase2)->get_ShowsScrollingPlaceholders(&value)); return value; } template void impl_IListViewBase2::ShowsScrollingPlaceholders(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ShowsScrollingPlaceholders(value)); + check_hresult(WINRT_SHIM(IListViewBase2)->put_ShowsScrollingPlaceholders(value)); } template event_token impl_IListViewBase2::ContainerContentChanging(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContainerContentChanging(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase2)->add_ContainerContentChanging(get_abi(value), &token)); return token; } @@ -49886,120 +52817,120 @@ template event_revoker impl_IListViewBase2::Cont template void impl_IListViewBase2::ContainerContentChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContainerContentChanging(token)); + check_hresult(WINRT_SHIM(IListViewBase2)->remove_ContainerContentChanging(token)); } template void impl_IListViewBase2::SetDesiredContainerUpdateDuration(const Windows::Foundation::TimeSpan & duration) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDesiredContainerUpdateDuration(get(duration))); + check_hresult(WINRT_SHIM(IListViewBase2)->abi_SetDesiredContainerUpdateDuration(get_abi(duration))); } -template Windows::IInspectable impl_IListViewBase2::Footer() const +template Windows::Foundation::IInspectable impl_IListViewBase2::Footer() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Footer(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IListViewBase2)->get_Footer(put_abi(value))); return value; } -template void impl_IListViewBase2::Footer(const Windows::IInspectable & value) const +template void impl_IListViewBase2::Footer(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Footer(get(value))); + check_hresult(WINRT_SHIM(IListViewBase2)->put_Footer(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IListViewBase2::FooterTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTemplate(put(value))); + check_hresult(WINRT_SHIM(IListViewBase2)->get_FooterTemplate(put_abi(value))); return value; } template void impl_IListViewBase2::FooterTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_FooterTemplate(get(value))); + check_hresult(WINRT_SHIM(IListViewBase2)->put_FooterTemplate(get_abi(value))); } template Windows::UI::Xaml::Media::Animation::TransitionCollection impl_IListViewBase2::FooterTransitions() const { Windows::UI::Xaml::Media::Animation::TransitionCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTransitions(put(value))); + check_hresult(WINRT_SHIM(IListViewBase2)->get_FooterTransitions(put_abi(value))); return value; } template void impl_IListViewBase2::FooterTransitions(const Windows::UI::Xaml::Media::Animation::TransitionCollection & value) const { - check_hresult(static_cast(static_cast(*this))->put_FooterTransitions(get(value))); + check_hresult(WINRT_SHIM(IListViewBase2)->put_FooterTransitions(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics2::ShowsScrollingPlaceholdersProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ShowsScrollingPlaceholdersProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics2)->get_ShowsScrollingPlaceholdersProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics2::FooterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics2)->get_FooterProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics2::FooterTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics2)->get_FooterTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics2::FooterTransitionsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FooterTransitionsProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics2)->get_FooterTransitionsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ListViewReorderMode impl_IListViewBase3::ReorderMode() const { Windows::UI::Xaml::Controls::ListViewReorderMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ReorderMode(&value)); + check_hresult(WINRT_SHIM(IListViewBase3)->get_ReorderMode(&value)); return value; } template void impl_IListViewBase3::ReorderMode(Windows::UI::Xaml::Controls::ListViewReorderMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ReorderMode(value)); + check_hresult(WINRT_SHIM(IListViewBase3)->put_ReorderMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics3::ReorderModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ReorderModeProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics3)->get_ReorderModeProperty(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_IListViewBase4::SelectedRanges() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_SelectedRanges(put(value))); + check_hresult(WINRT_SHIM(IListViewBase4)->get_SelectedRanges(put_abi(value))); return value; } template bool impl_IListViewBase4::IsMultiSelectCheckBoxEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMultiSelectCheckBoxEnabled(&value)); + check_hresult(WINRT_SHIM(IListViewBase4)->get_IsMultiSelectCheckBoxEnabled(&value)); return value; } template void impl_IListViewBase4::IsMultiSelectCheckBoxEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMultiSelectCheckBoxEnabled(value)); + check_hresult(WINRT_SHIM(IListViewBase4)->put_IsMultiSelectCheckBoxEnabled(value)); } template event_token impl_IListViewBase4::DragItemsCompleted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DragItemsCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase4)->add_DragItemsCompleted(get_abi(value), &token)); return token; } @@ -50010,13 +52941,13 @@ template event_revoker impl_IListViewBase4::Drag template void impl_IListViewBase4::DragItemsCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DragItemsCompleted(token)); + check_hresult(WINRT_SHIM(IListViewBase4)->remove_DragItemsCompleted(token)); } template event_token impl_IListViewBase4::ChoosingItemContainer(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ChoosingItemContainer(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase4)->add_ChoosingItemContainer(get_abi(value), &token)); return token; } @@ -50027,13 +52958,13 @@ template event_revoker impl_IListViewBase4::Choo template void impl_IListViewBase4::ChoosingItemContainer(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ChoosingItemContainer(token)); + check_hresult(WINRT_SHIM(IListViewBase4)->remove_ChoosingItemContainer(token)); } template event_token impl_IListViewBase4::ChoosingGroupHeaderContainer(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ChoosingGroupHeaderContainer(get(value), &token)); + check_hresult(WINRT_SHIM(IListViewBase4)->add_ChoosingGroupHeaderContainer(get_abi(value), &token)); return token; } @@ -50044,80 +52975,80 @@ template event_revoker impl_IListViewBase4::Choo template void impl_IListViewBase4::ChoosingGroupHeaderContainer(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ChoosingGroupHeaderContainer(token)); + check_hresult(WINRT_SHIM(IListViewBase4)->remove_ChoosingGroupHeaderContainer(token)); } template void impl_IListViewBase4::SelectRange(const Windows::UI::Xaml::Data::ItemIndexRange & itemIndexRange) const { - check_hresult(static_cast(static_cast(*this))->abi_SelectRange(get(itemIndexRange))); + check_hresult(WINRT_SHIM(IListViewBase4)->abi_SelectRange(get_abi(itemIndexRange))); } template void impl_IListViewBase4::DeselectRange(const Windows::UI::Xaml::Data::ItemIndexRange & itemIndexRange) const { - check_hresult(static_cast(static_cast(*this))->abi_DeselectRange(get(itemIndexRange))); + check_hresult(WINRT_SHIM(IListViewBase4)->abi_DeselectRange(get_abi(itemIndexRange))); } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics4::IsMultiSelectCheckBoxEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsMultiSelectCheckBoxEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics4)->get_IsMultiSelectCheckBoxEnabledProperty(put_abi(value))); return value; } template bool impl_IListViewBase5::SingleSelectionFollowsFocus() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SingleSelectionFollowsFocus(&value)); + check_hresult(WINRT_SHIM(IListViewBase5)->get_SingleSelectionFollowsFocus(&value)); return value; } template void impl_IListViewBase5::SingleSelectionFollowsFocus(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SingleSelectionFollowsFocus(value)); + check_hresult(WINRT_SHIM(IListViewBase5)->put_SingleSelectionFollowsFocus(value)); } template bool impl_IListViewBase5::IsDragSource() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_IsDragSource(&returnValue)); + check_hresult(WINRT_SHIM(IListViewBase5)->abi_IsDragSource(&returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IListViewBaseStatics5::SingleSelectionFollowsFocusProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SingleSelectionFollowsFocusProperty(put(value))); + check_hresult(WINRT_SHIM(IListViewBaseStatics5)->get_SingleSelectionFollowsFocusProperty(put_abi(value))); return value; } template bool impl_IVirtualizingStackPanel::AreScrollSnapPointsRegular() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreScrollSnapPointsRegular(&value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->get_AreScrollSnapPointsRegular(&value)); return value; } template void impl_IVirtualizingStackPanel::AreScrollSnapPointsRegular(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreScrollSnapPointsRegular(value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->put_AreScrollSnapPointsRegular(value)); } template Windows::UI::Xaml::Controls::Orientation impl_IVirtualizingStackPanel::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->get_Orientation(&value)); return value; } template void impl_IVirtualizingStackPanel::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->put_Orientation(value)); } template event_token impl_IVirtualizingStackPanel::CleanUpVirtualizedItemEvent(const Windows::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CleanUpVirtualizedItemEvent(get(value), &token)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->add_CleanUpVirtualizedItemEvent(get_abi(value), &token)); return token; } @@ -50128,1209 +53059,1209 @@ template event_revoker impl_IVirtualizingS template void impl_IVirtualizingStackPanel::CleanUpVirtualizedItemEvent(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CleanUpVirtualizedItemEvent(token)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanel)->remove_CleanUpVirtualizedItemEvent(token)); } template void impl_IVirtualizingStackPanelOverrides::OnCleanUpVirtualizedItem(const Windows::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnCleanUpVirtualizedItem(get(e))); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelOverrides)->abi_OnCleanUpVirtualizedItem(get_abi(e))); } template Windows::UI::Xaml::DependencyProperty impl_IVirtualizingStackPanelStatics::AreScrollSnapPointsRegularProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreScrollSnapPointsRegularProperty(put(value))); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->get_AreScrollSnapPointsRegularProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVirtualizingStackPanelStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IVirtualizingStackPanelStatics::VirtualizationModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VirtualizationModeProperty(put(value))); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->get_VirtualizationModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::VirtualizationMode impl_IVirtualizingStackPanelStatics::GetVirtualizationMode(const Windows::UI::Xaml::DependencyObject & element) const { Windows::UI::Xaml::Controls::VirtualizationMode value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetVirtualizationMode(get(element), &value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->abi_GetVirtualizationMode(get_abi(element), &value)); return value; } template void impl_IVirtualizingStackPanelStatics::SetVirtualizationMode(const Windows::UI::Xaml::DependencyObject & element, Windows::UI::Xaml::Controls::VirtualizationMode value) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVirtualizationMode(get(element), value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->abi_SetVirtualizationMode(get_abi(element), value)); } template Windows::UI::Xaml::DependencyProperty impl_IVirtualizingStackPanelStatics::IsVirtualizingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsVirtualizingProperty(put(value))); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->get_IsVirtualizingProperty(put_abi(value))); return value; } template bool impl_IVirtualizingStackPanelStatics::GetIsVirtualizing(const Windows::UI::Xaml::DependencyObject & o) const { bool value {}; - check_hresult(static_cast(static_cast(*this))->abi_GetIsVirtualizing(get(o), &value)); + check_hresult(WINRT_SHIM(IVirtualizingStackPanelStatics)->abi_GetIsVirtualizing(get_abi(o), &value)); return value; } -template Windows::UI::Xaml::Controls::CheckBox impl_ICheckBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::CheckBox impl_ICheckBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::CheckBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICheckBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template hstring impl_IRadioButton::GroupName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_GroupName(put(value))); + check_hresult(WINRT_SHIM(IRadioButton)->get_GroupName(put_abi(value))); return value; } -template void impl_IRadioButton::GroupName(hstring_ref value) const +template void impl_IRadioButton::GroupName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupName(get(value))); + check_hresult(WINRT_SHIM(IRadioButton)->put_GroupName(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IRadioButtonStatics::GroupNameProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupNameProperty(put(value))); + check_hresult(WINRT_SHIM(IRadioButtonStatics)->get_GroupNameProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::RadioButton impl_IRadioButtonFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::RadioButton impl_IRadioButtonFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::RadioButton instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IRadioButtonFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_ICommandBarElement::IsCompact() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCompact(&value)); + check_hresult(WINRT_SHIM(ICommandBarElement)->get_IsCompact(&value)); return value; } template void impl_ICommandBarElement::IsCompact(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCompact(value)); + check_hresult(WINRT_SHIM(ICommandBarElement)->put_IsCompact(value)); } template bool impl_ICommandBarElement2::IsInOverflow() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInOverflow(&value)); + check_hresult(WINRT_SHIM(ICommandBarElement2)->get_IsInOverflow(&value)); return value; } template int32_t impl_ICommandBarElement2::DynamicOverflowOrder() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DynamicOverflowOrder(&value)); + check_hresult(WINRT_SHIM(ICommandBarElement2)->get_DynamicOverflowOrder(&value)); return value; } template void impl_ICommandBarElement2::DynamicOverflowOrder(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DynamicOverflowOrder(value)); + check_hresult(WINRT_SHIM(ICommandBarElement2)->put_DynamicOverflowOrder(value)); } template Windows::Foundation::IReference impl_ICalendarDatePickerDateChangedEventArgs::NewDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_NewDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerDateChangedEventArgs)->get_NewDate(put_abi(value))); return value; } template Windows::Foundation::IReference impl_ICalendarDatePickerDateChangedEventArgs::OldDate() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_OldDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerDateChangedEventArgs)->get_OldDate(put_abi(value))); return value; } template bool impl_ICalendarViewDayItemChangingEventArgs::InRecycleQueue() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_InRecycleQueue(&value)); + check_hresult(WINRT_SHIM(ICalendarViewDayItemChangingEventArgs)->get_InRecycleQueue(&value)); return value; } template Windows::UI::Xaml::Controls::CalendarViewDayItem impl_ICalendarViewDayItemChangingEventArgs::Item() const { Windows::UI::Xaml::Controls::CalendarViewDayItem value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Item(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemChangingEventArgs)->get_Item(put_abi(value))); return value; } template uint32_t impl_ICalendarViewDayItemChangingEventArgs::Phase() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Phase(&value)); + check_hresult(WINRT_SHIM(ICalendarViewDayItemChangingEventArgs)->get_Phase(&value)); return value; } template void impl_ICalendarViewDayItemChangingEventArgs::RegisterUpdateCallback(const Windows::Foundation::TypedEventHandler & callback) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterUpdateCallback(get(callback))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemChangingEventArgs)->abi_RegisterUpdateCallback(get_abi(callback))); } template void impl_ICalendarViewDayItemChangingEventArgs::RegisterUpdateCallback(uint32_t callbackPhase, const Windows::Foundation::TypedEventHandler & callback) const { - check_hresult(static_cast(static_cast(*this))->abi_RegisterUpdateCallbackWithPhase(callbackPhase, get(callback))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemChangingEventArgs)->abi_RegisterUpdateCallbackWithPhase(callbackPhase, get_abi(callback))); } template Windows::Foundation::Collections::IVectorView impl_ICalendarViewSelectedDatesChangedEventArgs::AddedDates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_AddedDates(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewSelectedDatesChangedEventArgs)->get_AddedDates(put_abi(value))); return value; } template Windows::Foundation::Collections::IVectorView impl_ICalendarViewSelectedDatesChangedEventArgs::RemovedDates() const { Windows::Foundation::Collections::IVectorView value; - check_hresult(static_cast(static_cast(*this))->get_RemovedDates(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewSelectedDatesChangedEventArgs)->get_RemovedDates(put_abi(value))); return value; } template void impl_IContentDialogButtonClickDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IContentDialogButtonClickDeferral)->abi_Complete()); } template bool impl_IContentDialogButtonClickEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IContentDialogButtonClickEventArgs)->get_Cancel(&value)); return value; } template void impl_IContentDialogButtonClickEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IContentDialogButtonClickEventArgs)->put_Cancel(value)); } template Windows::UI::Xaml::Controls::ContentDialogButtonClickDeferral impl_IContentDialogButtonClickEventArgs::GetDeferral() const { Windows::UI::Xaml::Controls::ContentDialogButtonClickDeferral returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(returnValue))); + check_hresult(WINRT_SHIM(IContentDialogButtonClickEventArgs)->abi_GetDeferral(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::ContentDialogResult impl_IContentDialogClosedEventArgs::Result() const { Windows::UI::Xaml::Controls::ContentDialogResult value {}; - check_hresult(static_cast(static_cast(*this))->get_Result(&value)); + check_hresult(WINRT_SHIM(IContentDialogClosedEventArgs)->get_Result(&value)); return value; } template void impl_IContentDialogClosingDeferral::Complete() const { - check_hresult(static_cast(static_cast(*this))->abi_Complete()); + check_hresult(WINRT_SHIM(IContentDialogClosingDeferral)->abi_Complete()); } template Windows::UI::Xaml::Controls::ContentDialogResult impl_IContentDialogClosingEventArgs::Result() const { Windows::UI::Xaml::Controls::ContentDialogResult value {}; - check_hresult(static_cast(static_cast(*this))->get_Result(&value)); + check_hresult(WINRT_SHIM(IContentDialogClosingEventArgs)->get_Result(&value)); return value; } template bool impl_IContentDialogClosingEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IContentDialogClosingEventArgs)->get_Cancel(&value)); return value; } template void impl_IContentDialogClosingEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IContentDialogClosingEventArgs)->put_Cancel(value)); } template Windows::UI::Xaml::Controls::ContentDialogClosingDeferral impl_IContentDialogClosingEventArgs::GetDeferral() const { Windows::UI::Xaml::Controls::ContentDialogClosingDeferral returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetDeferral(put(returnValue))); + check_hresult(WINRT_SHIM(IContentDialogClosingEventArgs)->abi_GetDeferral(put_abi(returnValue))); return returnValue; } template Windows::Foundation::DateTime impl_IDatePickerValueChangedEventArgs::OldDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_OldDate(put(value))); + check_hresult(WINRT_SHIM(IDatePickerValueChangedEventArgs)->get_OldDate(put_abi(value))); return value; } template Windows::Foundation::DateTime impl_IDatePickerValueChangedEventArgs::NewDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_NewDate(put(value))); + check_hresult(WINRT_SHIM(IDatePickerValueChangedEventArgs)->get_NewDate(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::CommandBarDynamicOverflowAction impl_IDynamicOverflowItemsChangingEventArgs::Action() const { Windows::UI::Xaml::Controls::CommandBarDynamicOverflowAction value {}; - check_hresult(static_cast(static_cast(*this))->get_Action(&value)); + check_hresult(WINRT_SHIM(IDynamicOverflowItemsChangingEventArgs)->get_Action(&value)); return value; } template Windows::UI::Xaml::Controls::HubSection impl_IHubSectionHeaderClickEventArgs::Section() const { Windows::UI::Xaml::Controls::HubSection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Section(put(value))); + check_hresult(WINRT_SHIM(IHubSectionHeaderClickEventArgs)->get_Section(put_abi(value))); return value; } template hstring impl_IListViewPersistenceHelperStatics::GetRelativeScrollPosition(const Windows::UI::Xaml::Controls::ListViewBase & listViewBase, const Windows::UI::Xaml::Controls::ListViewItemToKeyHandler & itemToKeyHandler) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetRelativeScrollPosition(get(listViewBase), get(itemToKeyHandler), put(returnValue))); + check_hresult(WINRT_SHIM(IListViewPersistenceHelperStatics)->abi_GetRelativeScrollPosition(get_abi(listViewBase), get_abi(itemToKeyHandler), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncAction impl_IListViewPersistenceHelperStatics::SetRelativeScrollPositionAsync(const Windows::UI::Xaml::Controls::ListViewBase & listViewBase, hstring_ref relativeScrollPosition, const Windows::UI::Xaml::Controls::ListViewKeyToItemHandler & keyToItemHandler) const +template Windows::Foundation::IAsyncAction impl_IListViewPersistenceHelperStatics::SetRelativeScrollPositionAsync(const Windows::UI::Xaml::Controls::ListViewBase & listViewBase, hstring_view relativeScrollPosition, const Windows::UI::Xaml::Controls::ListViewKeyToItemHandler & keyToItemHandler) const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_SetRelativeScrollPositionAsync(get(listViewBase), get(relativeScrollPosition), get(keyToItemHandler), put(returnValue))); + check_hresult(WINRT_SHIM(IListViewPersistenceHelperStatics)->abi_SetRelativeScrollPositionAsync(get_abi(listViewBase), get_abi(relativeScrollPosition), get_abi(keyToItemHandler), put_abi(returnValue))); return returnValue; } template double impl_IScrollViewerView::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IScrollViewerView)->get_HorizontalOffset(&value)); return value; } template double impl_IScrollViewerView::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IScrollViewerView)->get_VerticalOffset(&value)); return value; } template float impl_IScrollViewerView::ZoomFactor() const { float value {}; - check_hresult(static_cast(static_cast(*this))->get_ZoomFactor(&value)); + check_hresult(WINRT_SHIM(IScrollViewerView)->get_ZoomFactor(&value)); return value; } template bool impl_IScrollViewerViewChangedEventArgs::IsIntermediate() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIntermediate(&value)); + check_hresult(WINRT_SHIM(IScrollViewerViewChangedEventArgs)->get_IsIntermediate(&value)); return value; } template Windows::UI::Xaml::Controls::ScrollViewerView impl_IScrollViewerViewChangingEventArgs::NextView() const { Windows::UI::Xaml::Controls::ScrollViewerView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NextView(put(value))); + check_hresult(WINRT_SHIM(IScrollViewerViewChangingEventArgs)->get_NextView(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::ScrollViewerView impl_IScrollViewerViewChangingEventArgs::FinalView() const { Windows::UI::Xaml::Controls::ScrollViewerView value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FinalView(put(value))); + check_hresult(WINRT_SHIM(IScrollViewerViewChangingEventArgs)->get_FinalView(put_abi(value))); return value; } template bool impl_IScrollViewerViewChangingEventArgs::IsInertial() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsInertial(&value)); + check_hresult(WINRT_SHIM(IScrollViewerViewChangingEventArgs)->get_IsInertial(&value)); return value; } template hstring impl_ISearchBoxQueryChangedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQueryChangedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchBoxQueryChangedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQueryChangedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchBoxQueryChangedEventArgs::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQueryChangedEventArgs)->get_LinguisticDetails(put_abi(value))); return value; } template hstring impl_ISearchBoxQuerySubmittedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQuerySubmittedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchBoxQuerySubmittedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQuerySubmittedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchBoxQuerySubmittedEventArgs::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxQuerySubmittedEventArgs)->get_LinguisticDetails(put_abi(value))); return value; } template Windows::System::VirtualKeyModifiers impl_ISearchBoxQuerySubmittedEventArgs::KeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyModifiers(&value)); + check_hresult(WINRT_SHIM(ISearchBoxQuerySubmittedEventArgs)->get_KeyModifiers(&value)); return value; } template hstring impl_ISearchBoxResultSuggestionChosenEventArgs::Tag() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Tag(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxResultSuggestionChosenEventArgs)->get_Tag(put_abi(value))); return value; } template Windows::System::VirtualKeyModifiers impl_ISearchBoxResultSuggestionChosenEventArgs::KeyModifiers() const { Windows::System::VirtualKeyModifiers value {}; - check_hresult(static_cast(static_cast(*this))->get_KeyModifiers(&value)); + check_hresult(WINRT_SHIM(ISearchBoxResultSuggestionChosenEventArgs)->get_KeyModifiers(&value)); return value; } template hstring impl_ISearchBoxSuggestionsRequestedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxSuggestionsRequestedEventArgs)->get_QueryText(put_abi(value))); return value; } template hstring impl_ISearchBoxSuggestionsRequestedEventArgs::Language() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Language(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxSuggestionsRequestedEventArgs)->get_Language(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchQueryLinguisticDetails impl_ISearchBoxSuggestionsRequestedEventArgs::LinguisticDetails() const { Windows::ApplicationModel::Search::SearchQueryLinguisticDetails value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LinguisticDetails(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxSuggestionsRequestedEventArgs)->get_LinguisticDetails(put_abi(value))); return value; } template Windows::ApplicationModel::Search::SearchSuggestionsRequest impl_ISearchBoxSuggestionsRequestedEventArgs::Request() const { Windows::ApplicationModel::Search::SearchSuggestionsRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Request(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxSuggestionsRequestedEventArgs)->get_Request(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISectionsInViewChangedEventArgs::AddedSections() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AddedSections(put(value))); + check_hresult(WINRT_SHIM(ISectionsInViewChangedEventArgs)->get_AddedSections(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_ISectionsInViewChangedEventArgs::RemovedSections() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_RemovedSections(put(value))); + check_hresult(WINRT_SHIM(ISectionsInViewChangedEventArgs)->get_RemovedSections(put_abi(value))); return value; } template bool impl_ISplitViewPaneClosingEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(ISplitViewPaneClosingEventArgs)->get_Cancel(&value)); return value; } template void impl_ISplitViewPaneClosingEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(ISplitViewPaneClosingEventArgs)->put_Cancel(value)); } template Windows::Foundation::TimeSpan impl_ITimePickerValueChangedEventArgs::OldTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_OldTime(put(value))); + check_hresult(WINRT_SHIM(ITimePickerValueChangedEventArgs)->get_OldTime(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_ITimePickerValueChangedEventArgs::NewTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_NewTime(put(value))); + check_hresult(WINRT_SHIM(ITimePickerValueChangedEventArgs)->get_NewTime(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebViewContentLoadingEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewContentLoadingEventArgs)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebViewDeferredPermissionRequest::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewDeferredPermissionRequest)->get_Uri(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::WebViewPermissionType impl_IWebViewDeferredPermissionRequest::PermissionType() const { Windows::UI::Xaml::Controls::WebViewPermissionType value {}; - check_hresult(static_cast(static_cast(*this))->get_PermissionType(&value)); + check_hresult(WINRT_SHIM(IWebViewDeferredPermissionRequest)->get_PermissionType(&value)); return value; } template uint32_t impl_IWebViewDeferredPermissionRequest::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IWebViewDeferredPermissionRequest)->get_Id(&value)); return value; } template void impl_IWebViewDeferredPermissionRequest::Allow() const { - check_hresult(static_cast(static_cast(*this))->abi_Allow()); + check_hresult(WINRT_SHIM(IWebViewDeferredPermissionRequest)->abi_Allow()); } template void impl_IWebViewDeferredPermissionRequest::Deny() const { - check_hresult(static_cast(static_cast(*this))->abi_Deny()); + check_hresult(WINRT_SHIM(IWebViewDeferredPermissionRequest)->abi_Deny()); } template Windows::Foundation::Uri impl_IWebViewDOMContentLoadedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewDOMContentLoadedEventArgs)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IWebViewLongRunningScriptDetectedEventArgs::ExecutionTime() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_ExecutionTime(put(value))); + check_hresult(WINRT_SHIM(IWebViewLongRunningScriptDetectedEventArgs)->get_ExecutionTime(put_abi(value))); return value; } template bool impl_IWebViewLongRunningScriptDetectedEventArgs::StopPageScriptExecution() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_StopPageScriptExecution(&value)); + check_hresult(WINRT_SHIM(IWebViewLongRunningScriptDetectedEventArgs)->get_StopPageScriptExecution(&value)); return value; } template void impl_IWebViewLongRunningScriptDetectedEventArgs::StopPageScriptExecution(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_StopPageScriptExecution(value)); + check_hresult(WINRT_SHIM(IWebViewLongRunningScriptDetectedEventArgs)->put_StopPageScriptExecution(value)); } template Windows::Foundation::Uri impl_IWebViewNavigationCompletedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewNavigationCompletedEventArgs)->get_Uri(put_abi(value))); return value; } template bool impl_IWebViewNavigationCompletedEventArgs::IsSuccess() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSuccess(&value)); + check_hresult(WINRT_SHIM(IWebViewNavigationCompletedEventArgs)->get_IsSuccess(&value)); return value; } template Windows::Web::WebErrorStatus impl_IWebViewNavigationCompletedEventArgs::WebErrorStatus() const { Windows::Web::WebErrorStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_WebErrorStatus(&value)); + check_hresult(WINRT_SHIM(IWebViewNavigationCompletedEventArgs)->get_WebErrorStatus(&value)); return value; } template Windows::Foundation::Uri impl_IWebViewNavigationFailedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewNavigationFailedEventArgs)->get_Uri(put_abi(value))); return value; } template Windows::Web::WebErrorStatus impl_IWebViewNavigationFailedEventArgs::WebErrorStatus() const { Windows::Web::WebErrorStatus value {}; - check_hresult(static_cast(static_cast(*this))->get_WebErrorStatus(&value)); + check_hresult(WINRT_SHIM(IWebViewNavigationFailedEventArgs)->get_WebErrorStatus(&value)); return value; } template Windows::Foundation::Uri impl_IWebViewNavigationStartingEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewNavigationStartingEventArgs)->get_Uri(put_abi(value))); return value; } template bool impl_IWebViewNavigationStartingEventArgs::Cancel() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Cancel(&value)); + check_hresult(WINRT_SHIM(IWebViewNavigationStartingEventArgs)->get_Cancel(&value)); return value; } template void impl_IWebViewNavigationStartingEventArgs::Cancel(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Cancel(value)); + check_hresult(WINRT_SHIM(IWebViewNavigationStartingEventArgs)->put_Cancel(value)); } template Windows::Foundation::Uri impl_IWebViewNewWindowRequestedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewNewWindowRequestedEventArgs)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebViewNewWindowRequestedEventArgs::Referrer() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Referrer(put(value))); + check_hresult(WINRT_SHIM(IWebViewNewWindowRequestedEventArgs)->get_Referrer(put_abi(value))); return value; } template bool impl_IWebViewNewWindowRequestedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IWebViewNewWindowRequestedEventArgs)->get_Handled(&value)); return value; } template void impl_IWebViewNewWindowRequestedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IWebViewNewWindowRequestedEventArgs)->put_Handled(value)); } template Windows::Foundation::Uri impl_IWebViewPermissionRequest::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->get_Uri(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::WebViewPermissionType impl_IWebViewPermissionRequest::PermissionType() const { Windows::UI::Xaml::Controls::WebViewPermissionType value {}; - check_hresult(static_cast(static_cast(*this))->get_PermissionType(&value)); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->get_PermissionType(&value)); return value; } template uint32_t impl_IWebViewPermissionRequest::Id() const { uint32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_Id(&value)); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->get_Id(&value)); return value; } template Windows::UI::Xaml::Controls::WebViewPermissionState impl_IWebViewPermissionRequest::State() const { Windows::UI::Xaml::Controls::WebViewPermissionState value {}; - check_hresult(static_cast(static_cast(*this))->get_State(&value)); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->get_State(&value)); return value; } template void impl_IWebViewPermissionRequest::Defer() const { - check_hresult(static_cast(static_cast(*this))->abi_Defer()); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->abi_Defer()); } template void impl_IWebViewPermissionRequest::Allow() const { - check_hresult(static_cast(static_cast(*this))->abi_Allow()); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->abi_Allow()); } template void impl_IWebViewPermissionRequest::Deny() const { - check_hresult(static_cast(static_cast(*this))->abi_Deny()); + check_hresult(WINRT_SHIM(IWebViewPermissionRequest)->abi_Deny()); } template Windows::UI::Xaml::Controls::WebViewPermissionRequest impl_IWebViewPermissionRequestedEventArgs::PermissionRequest() const { Windows::UI::Xaml::Controls::WebViewPermissionRequest value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PermissionRequest(put(value))); + check_hresult(WINRT_SHIM(IWebViewPermissionRequestedEventArgs)->get_PermissionRequest(put_abi(value))); return value; } template bool impl_IWebViewSettings::IsJavaScriptEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsJavaScriptEnabled(&value)); + check_hresult(WINRT_SHIM(IWebViewSettings)->get_IsJavaScriptEnabled(&value)); return value; } template void impl_IWebViewSettings::IsJavaScriptEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsJavaScriptEnabled(value)); + check_hresult(WINRT_SHIM(IWebViewSettings)->put_IsJavaScriptEnabled(value)); } template bool impl_IWebViewSettings::IsIndexedDBEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsIndexedDBEnabled(&value)); + check_hresult(WINRT_SHIM(IWebViewSettings)->get_IsIndexedDBEnabled(&value)); return value; } template void impl_IWebViewSettings::IsIndexedDBEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsIndexedDBEnabled(value)); + check_hresult(WINRT_SHIM(IWebViewSettings)->put_IsIndexedDBEnabled(value)); } template Windows::Foundation::Uri impl_IWebViewUnsupportedUriSchemeIdentifiedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewUnsupportedUriSchemeIdentifiedEventArgs)->get_Uri(put_abi(value))); return value; } template bool impl_IWebViewUnsupportedUriSchemeIdentifiedEventArgs::Handled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_Handled(&value)); + check_hresult(WINRT_SHIM(IWebViewUnsupportedUriSchemeIdentifiedEventArgs)->get_Handled(&value)); return value; } template void impl_IWebViewUnsupportedUriSchemeIdentifiedEventArgs::Handled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_Handled(value)); + check_hresult(WINRT_SHIM(IWebViewUnsupportedUriSchemeIdentifiedEventArgs)->put_Handled(value)); } template Windows::Foundation::Uri impl_IWebViewUnviewableContentIdentifiedEventArgs::Uri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Uri(put(value))); + check_hresult(WINRT_SHIM(IWebViewUnviewableContentIdentifiedEventArgs)->get_Uri(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IWebViewUnviewableContentIdentifiedEventArgs::Referrer() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Referrer(put(value))); + check_hresult(WINRT_SHIM(IWebViewUnviewableContentIdentifiedEventArgs)->get_Referrer(put_abi(value))); return value; } template hstring impl_IWebViewUnviewableContentIdentifiedEventArgs2::MediaType() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MediaType(put(value))); + check_hresult(WINRT_SHIM(IWebViewUnviewableContentIdentifiedEventArgs2)->get_MediaType(put_abi(value))); return value; } template hstring impl_IAutoSuggestBoxQuerySubmittedEventArgs::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxQuerySubmittedEventArgs)->get_QueryText(put_abi(value))); return value; } -template Windows::IInspectable impl_IAutoSuggestBoxQuerySubmittedEventArgs::ChosenSuggestion() const +template Windows::Foundation::IInspectable impl_IAutoSuggestBoxQuerySubmittedEventArgs::ChosenSuggestion() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ChosenSuggestion(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IAutoSuggestBoxQuerySubmittedEventArgs)->get_ChosenSuggestion(put_abi(value))); return value; } -template Windows::IInspectable impl_IAutoSuggestBoxSuggestionChosenEventArgs::SelectedItem() const +template Windows::Foundation::IInspectable impl_IAutoSuggestBoxSuggestionChosenEventArgs::SelectedItem() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SelectedItem(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IAutoSuggestBoxSuggestionChosenEventArgs)->get_SelectedItem(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason impl_IAutoSuggestBoxTextChangedEventArgs::Reason() const { Windows::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason value {}; - check_hresult(static_cast(static_cast(*this))->get_Reason(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBoxTextChangedEventArgs)->get_Reason(&value)); return value; } template void impl_IAutoSuggestBoxTextChangedEventArgs::Reason(Windows::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason value) const { - check_hresult(static_cast(static_cast(*this))->put_Reason(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBoxTextChangedEventArgs)->put_Reason(value)); } template bool impl_IAutoSuggestBoxTextChangedEventArgs::CheckCurrent() const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_CheckCurrent(&returnValue)); + check_hresult(WINRT_SHIM(IAutoSuggestBoxTextChangedEventArgs)->abi_CheckCurrent(&returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxTextChangedEventArgsStatics::ReasonProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ReasonProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxTextChangedEventArgsStatics)->get_ReasonProperty(put_abi(value))); return value; } template Windows::UI::Xaml::UIElement impl_IFlyout::Content() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(IFlyout)->get_Content(put_abi(value))); return value; } template void impl_IFlyout::Content(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(IFlyout)->put_Content(get_abi(value))); } template Windows::UI::Xaml::Style impl_IFlyout::FlyoutPresenterStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlyoutPresenterStyle(put(value))); + check_hresult(WINRT_SHIM(IFlyout)->get_FlyoutPresenterStyle(put_abi(value))); return value; } template void impl_IFlyout::FlyoutPresenterStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_FlyoutPresenterStyle(get(value))); + check_hresult(WINRT_SHIM(IFlyout)->put_FlyoutPresenterStyle(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutStatics::ContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutStatics)->get_ContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFlyoutStatics::FlyoutPresenterStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FlyoutPresenterStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IFlyoutStatics)->get_FlyoutPresenterStyleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Flyout impl_IFlyoutFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Flyout impl_IFlyoutFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Flyout instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlyoutFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Foundation::Collections::IVector impl_IMenuFlyout::Items() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Items(put(value))); + check_hresult(WINRT_SHIM(IMenuFlyout)->get_Items(put_abi(value))); return value; } template Windows::UI::Xaml::Style impl_IMenuFlyout::MenuFlyoutPresenterStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MenuFlyoutPresenterStyle(put(value))); + check_hresult(WINRT_SHIM(IMenuFlyout)->get_MenuFlyoutPresenterStyle(put_abi(value))); return value; } template void impl_IMenuFlyout::MenuFlyoutPresenterStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_MenuFlyoutPresenterStyle(get(value))); + check_hresult(WINRT_SHIM(IMenuFlyout)->put_MenuFlyoutPresenterStyle(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMenuFlyoutStatics::MenuFlyoutPresenterStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MenuFlyoutPresenterStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IMenuFlyoutStatics)->get_MenuFlyoutPresenterStyleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::MenuFlyout impl_IMenuFlyoutFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::MenuFlyout impl_IMenuFlyoutFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::MenuFlyout instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMenuFlyoutFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template void impl_IMenuFlyout2::ShowAt(const Windows::UI::Xaml::UIElement & targetElement, const Windows::Foundation::Point & point) const { - check_hresult(static_cast(static_cast(*this))->abi_ShowAt(get(targetElement), get(point))); + check_hresult(WINRT_SHIM(IMenuFlyout2)->abi_ShowAt(get_abi(targetElement), get_abi(point))); } template Windows::UI::Xaml::Media::Brush impl_IIconElement::Foreground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Foreground(put(value))); + check_hresult(WINRT_SHIM(IIconElement)->get_Foreground(put_abi(value))); return value; } template void impl_IIconElement::Foreground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_Foreground(get(value))); + check_hresult(WINRT_SHIM(IIconElement)->put_Foreground(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IIconElementStatics::ForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(IIconElementStatics)->get_ForegroundProperty(put_abi(value))); return value; } template Windows::UI::Input::Inking::InkPresenter impl_IInkCanvas::InkPresenter() const { Windows::UI::Input::Inking::InkPresenter value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_InkPresenter(put(value))); + check_hresult(WINRT_SHIM(IInkCanvas)->get_InkPresenter(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::InkCanvas impl_IInkCanvasFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::InkCanvas impl_IInkCanvasFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::InkCanvas instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IInkCanvasFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::ImageSource impl_IMediaElement::PosterSource() const { Windows::UI::Xaml::Media::ImageSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PosterSource(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_PosterSource(put_abi(value))); return value; } template void impl_IMediaElement::PosterSource(const Windows::UI::Xaml::Media::ImageSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_PosterSource(get(value))); + check_hresult(WINRT_SHIM(IMediaElement)->put_PosterSource(get_abi(value))); } template Windows::Foundation::Uri impl_IMediaElement::Source() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_Source(put_abi(value))); return value; } template void impl_IMediaElement::Source(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(IMediaElement)->put_Source(get_abi(value))); } template bool impl_IMediaElement::IsMuted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsMuted(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_IsMuted(&value)); return value; } template void impl_IMediaElement::IsMuted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsMuted(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_IsMuted(value)); } template bool impl_IMediaElement::IsAudioOnly() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsAudioOnly(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_IsAudioOnly(&value)); return value; } template bool impl_IMediaElement::AutoPlay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoPlay(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AutoPlay(&value)); return value; } template void impl_IMediaElement::AutoPlay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoPlay(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_AutoPlay(value)); } template double impl_IMediaElement::Volume() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Volume(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_Volume(&value)); return value; } template void impl_IMediaElement::Volume(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Volume(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_Volume(value)); } template double impl_IMediaElement::Balance() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_Balance(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_Balance(&value)); return value; } template void impl_IMediaElement::Balance(double value) const { - check_hresult(static_cast(static_cast(*this))->put_Balance(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_Balance(value)); } template int32_t impl_IMediaElement::NaturalVideoHeight() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoHeight(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_NaturalVideoHeight(&value)); return value; } template int32_t impl_IMediaElement::NaturalVideoWidth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoWidth(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_NaturalVideoWidth(&value)); return value; } template Windows::UI::Xaml::Duration impl_IMediaElement::NaturalDuration() const { Windows::UI::Xaml::Duration value {}; - check_hresult(static_cast(static_cast(*this))->get_NaturalDuration(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_NaturalDuration(put_abi(value))); return value; } template Windows::Foundation::TimeSpan impl_IMediaElement::Position() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Position(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_Position(put_abi(value))); return value; } template void impl_IMediaElement::Position(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Position(get(value))); + check_hresult(WINRT_SHIM(IMediaElement)->put_Position(get_abi(value))); } template double impl_IMediaElement::DownloadProgress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadProgress(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_DownloadProgress(&value)); return value; } template double impl_IMediaElement::BufferingProgress() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_BufferingProgress(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_BufferingProgress(&value)); return value; } template double impl_IMediaElement::DownloadProgressOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DownloadProgressOffset(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_DownloadProgressOffset(&value)); return value; } template Windows::UI::Xaml::Media::MediaElementState impl_IMediaElement::CurrentState() const { Windows::UI::Xaml::Media::MediaElementState value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentState(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_CurrentState(&value)); return value; } template Windows::UI::Xaml::Media::TimelineMarkerCollection impl_IMediaElement::Markers() const { Windows::UI::Xaml::Media::TimelineMarkerCollection value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Markers(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_Markers(put_abi(value))); return value; } template bool impl_IMediaElement::CanSeek() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanSeek(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_CanSeek(&value)); return value; } template bool impl_IMediaElement::CanPause() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanPause(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_CanPause(&value)); return value; } template int32_t impl_IMediaElement::AudioStreamCount() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioStreamCount(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AudioStreamCount(&value)); return value; } template Windows::Foundation::IReference impl_IMediaElement::AudioStreamIndex() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_AudioStreamIndex(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_AudioStreamIndex(put_abi(value))); return value; } -template void impl_IMediaElement::AudioStreamIndex(const Windows::Foundation::IReference & value) const +template void impl_IMediaElement::AudioStreamIndex(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioStreamIndex(get(value))); + check_hresult(WINRT_SHIM(IMediaElement)->put_AudioStreamIndex(get_abi(value))); } template double impl_IMediaElement::PlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRate(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_PlaybackRate(&value)); return value; } template void impl_IMediaElement::PlaybackRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaybackRate(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_PlaybackRate(value)); } template bool impl_IMediaElement::IsLooping() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsLooping(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_IsLooping(&value)); return value; } template void impl_IMediaElement::IsLooping(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsLooping(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_IsLooping(value)); } template Windows::Media::PlayTo::PlayToSource impl_IMediaElement::PlayToSource() const { Windows::Media::PlayTo::PlayToSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToSource(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_PlayToSource(put_abi(value))); return value; } template double impl_IMediaElement::DefaultPlaybackRate() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultPlaybackRate(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_DefaultPlaybackRate(&value)); return value; } template void impl_IMediaElement::DefaultPlaybackRate(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultPlaybackRate(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_DefaultPlaybackRate(value)); } template int32_t impl_IMediaElement::AspectRatioWidth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AspectRatioWidth(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AspectRatioWidth(&value)); return value; } template int32_t impl_IMediaElement::AspectRatioHeight() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_AspectRatioHeight(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AspectRatioHeight(&value)); return value; } template bool impl_IMediaElement::RealTimePlayback() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_RealTimePlayback(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_RealTimePlayback(&value)); return value; } template void impl_IMediaElement::RealTimePlayback(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_RealTimePlayback(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_RealTimePlayback(value)); } template Windows::UI::Xaml::Media::AudioCategory impl_IMediaElement::AudioCategory() const { Windows::UI::Xaml::Media::AudioCategory value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioCategory(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AudioCategory(&value)); return value; } template void impl_IMediaElement::AudioCategory(Windows::UI::Xaml::Media::AudioCategory value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioCategory(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_AudioCategory(value)); } template Windows::UI::Xaml::Media::AudioDeviceType impl_IMediaElement::AudioDeviceType() const { Windows::UI::Xaml::Media::AudioDeviceType value {}; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceType(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_AudioDeviceType(&value)); return value; } template void impl_IMediaElement::AudioDeviceType(Windows::UI::Xaml::Media::AudioDeviceType value) const { - check_hresult(static_cast(static_cast(*this))->put_AudioDeviceType(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_AudioDeviceType(value)); } template Windows::Media::Protection::MediaProtectionManager impl_IMediaElement::ProtectionManager() const { Windows::Media::Protection::MediaProtectionManager value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtectionManager(put(value))); + check_hresult(WINRT_SHIM(IMediaElement)->get_ProtectionManager(put_abi(value))); return value; } template void impl_IMediaElement::ProtectionManager(const Windows::Media::Protection::MediaProtectionManager & value) const { - check_hresult(static_cast(static_cast(*this))->put_ProtectionManager(get(value))); + check_hresult(WINRT_SHIM(IMediaElement)->put_ProtectionManager(get_abi(value))); } template Windows::UI::Xaml::Media::Stereo3DVideoPackingMode impl_IMediaElement::Stereo3DVideoPackingMode() const { Windows::UI::Xaml::Media::Stereo3DVideoPackingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Stereo3DVideoPackingMode(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_Stereo3DVideoPackingMode(&value)); return value; } template void impl_IMediaElement::Stereo3DVideoPackingMode(Windows::UI::Xaml::Media::Stereo3DVideoPackingMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Stereo3DVideoPackingMode(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_Stereo3DVideoPackingMode(value)); } template Windows::UI::Xaml::Media::Stereo3DVideoRenderMode impl_IMediaElement::Stereo3DVideoRenderMode() const { Windows::UI::Xaml::Media::Stereo3DVideoRenderMode value {}; - check_hresult(static_cast(static_cast(*this))->get_Stereo3DVideoRenderMode(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_Stereo3DVideoRenderMode(&value)); return value; } template void impl_IMediaElement::Stereo3DVideoRenderMode(Windows::UI::Xaml::Media::Stereo3DVideoRenderMode value) const { - check_hresult(static_cast(static_cast(*this))->put_Stereo3DVideoRenderMode(value)); + check_hresult(WINRT_SHIM(IMediaElement)->put_Stereo3DVideoRenderMode(value)); } template bool impl_IMediaElement::IsStereo3DVideo() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsStereo3DVideo(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_IsStereo3DVideo(&value)); return value; } template event_token impl_IMediaElement::MediaOpened(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaOpened(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_MediaOpened(get_abi(value), &token)); return token; } @@ -51341,13 +54272,13 @@ template event_revoker impl_IMediaElement::MediaO template void impl_IMediaElement::MediaOpened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaOpened(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_MediaOpened(token)); } template event_token impl_IMediaElement::MediaEnded(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaEnded(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_MediaEnded(get_abi(value), &token)); return token; } @@ -51358,13 +54289,13 @@ template event_revoker impl_IMediaElement::MediaE template void impl_IMediaElement::MediaEnded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaEnded(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_MediaEnded(token)); } template event_token impl_IMediaElement::MediaFailed(const Windows::UI::Xaml::ExceptionRoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MediaFailed(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_MediaFailed(get_abi(value), &token)); return token; } @@ -51375,13 +54306,13 @@ template event_revoker impl_IMediaElement::MediaF template void impl_IMediaElement::MediaFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MediaFailed(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_MediaFailed(token)); } template event_token impl_IMediaElement::DownloadProgressChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DownloadProgressChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_DownloadProgressChanged(get_abi(value), &token)); return token; } @@ -51392,13 +54323,13 @@ template event_revoker impl_IMediaElement::Downlo template void impl_IMediaElement::DownloadProgressChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DownloadProgressChanged(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_DownloadProgressChanged(token)); } template event_token impl_IMediaElement::BufferingProgressChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_BufferingProgressChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_BufferingProgressChanged(get_abi(value), &token)); return token; } @@ -51409,13 +54340,13 @@ template event_revoker impl_IMediaElement::Buffer template void impl_IMediaElement::BufferingProgressChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_BufferingProgressChanged(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_BufferingProgressChanged(token)); } template event_token impl_IMediaElement::CurrentStateChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CurrentStateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_CurrentStateChanged(get_abi(value), &token)); return token; } @@ -51426,13 +54357,13 @@ template event_revoker impl_IMediaElement::Curren template void impl_IMediaElement::CurrentStateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CurrentStateChanged(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_CurrentStateChanged(token)); } template event_token impl_IMediaElement::MarkerReached(const Windows::UI::Xaml::Media::TimelineMarkerRoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_MarkerReached(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_MarkerReached(get_abi(value), &token)); return token; } @@ -51443,13 +54374,13 @@ template event_revoker impl_IMediaElement::Marker template void impl_IMediaElement::MarkerReached(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_MarkerReached(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_MarkerReached(token)); } template event_token impl_IMediaElement::RateChanged(const Windows::UI::Xaml::Media::RateChangedRoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_RateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_RateChanged(get_abi(value), &token)); return token; } @@ -51460,13 +54391,13 @@ template event_revoker impl_IMediaElement::RateCh template void impl_IMediaElement::RateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_RateChanged(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_RateChanged(token)); } template event_token impl_IMediaElement::VolumeChanged(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_VolumeChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_VolumeChanged(get_abi(value), &token)); return token; } @@ -51477,13 +54408,13 @@ template event_revoker impl_IMediaElement::Volume template void impl_IMediaElement::VolumeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_VolumeChanged(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_VolumeChanged(token)); } template event_token impl_IMediaElement::SeekCompleted(const Windows::UI::Xaml::RoutedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SeekCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement)->add_SeekCompleted(get_abi(value), &token)); return token; } @@ -51494,393 +54425,393 @@ template event_revoker impl_IMediaElement::SeekCo template void impl_IMediaElement::SeekCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SeekCompleted(token)); + check_hresult(WINRT_SHIM(IMediaElement)->remove_SeekCompleted(token)); } template void impl_IMediaElement::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IMediaElement)->abi_Stop()); } template void impl_IMediaElement::Play() const { - check_hresult(static_cast(static_cast(*this))->abi_Play()); + check_hresult(WINRT_SHIM(IMediaElement)->abi_Play()); } template void impl_IMediaElement::Pause() const { - check_hresult(static_cast(static_cast(*this))->abi_Pause()); + check_hresult(WINRT_SHIM(IMediaElement)->abi_Pause()); } -template Windows::UI::Xaml::Media::MediaCanPlayResponse impl_IMediaElement::CanPlayType(hstring_ref type) const +template Windows::UI::Xaml::Media::MediaCanPlayResponse impl_IMediaElement::CanPlayType(hstring_view type) const { Windows::UI::Xaml::Media::MediaCanPlayResponse returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_CanPlayType(get(type), &returnValue)); + check_hresult(WINRT_SHIM(IMediaElement)->abi_CanPlayType(get_abi(type), &returnValue)); return returnValue; } -template void impl_IMediaElement::SetSource(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_ref mimeType) const +template void impl_IMediaElement::SetSource(const Windows::Storage::Streams::IRandomAccessStream & stream, hstring_view mimeType) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(stream), get(mimeType))); + check_hresult(WINRT_SHIM(IMediaElement)->abi_SetSource(get_abi(stream), get_abi(mimeType))); } -template hstring impl_IMediaElement::GetAudioStreamLanguage(const Windows::Foundation::IReference & index) const +template hstring impl_IMediaElement::GetAudioStreamLanguage(const optional & index) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_GetAudioStreamLanguage(get(index), put(returnValue))); + check_hresult(WINRT_SHIM(IMediaElement)->abi_GetAudioStreamLanguage(get_abi(index), put_abi(returnValue))); return returnValue; } -template void impl_IMediaElement::AddAudioEffect(hstring_ref effectID, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const +template void impl_IMediaElement::AddAudioEffect(hstring_view effectID, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddAudioEffect(get(effectID), effectOptional, get(effectConfiguration))); + check_hresult(WINRT_SHIM(IMediaElement)->abi_AddAudioEffect(get_abi(effectID), effectOptional, get_abi(effectConfiguration))); } -template void impl_IMediaElement::AddVideoEffect(hstring_ref effectID, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const +template void impl_IMediaElement::AddVideoEffect(hstring_view effectID, bool effectOptional, const Windows::Foundation::Collections::IPropertySet & effectConfiguration) const { - check_hresult(static_cast(static_cast(*this))->abi_AddVideoEffect(get(effectID), effectOptional, get(effectConfiguration))); + check_hresult(WINRT_SHIM(IMediaElement)->abi_AddVideoEffect(get_abi(effectID), effectOptional, get_abi(effectConfiguration))); } template void impl_IMediaElement::RemoveAllEffects() const { - check_hresult(static_cast(static_cast(*this))->abi_RemoveAllEffects()); + check_hresult(WINRT_SHIM(IMediaElement)->abi_RemoveAllEffects()); } template Windows::UI::Xaml::Media::Stereo3DVideoPackingMode impl_IMediaElement::ActualStereo3DVideoPackingMode() const { Windows::UI::Xaml::Media::Stereo3DVideoPackingMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ActualStereo3DVideoPackingMode(&value)); + check_hresult(WINRT_SHIM(IMediaElement)->get_ActualStereo3DVideoPackingMode(&value)); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::PosterSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PosterSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_PosterSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::SourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_SourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::IsMutedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsMutedProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_IsMutedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::IsAudioOnlyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsAudioOnlyProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_IsAudioOnlyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AutoPlayProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoPlayProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AutoPlayProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::VolumeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VolumeProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_VolumeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::BalanceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BalanceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_BalanceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::NaturalVideoHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_NaturalVideoHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::NaturalVideoWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NaturalVideoWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_NaturalVideoWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::NaturalDurationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NaturalDurationProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_NaturalDurationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::PositionProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PositionProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_PositionProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::DownloadProgressProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DownloadProgressProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_DownloadProgressProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::BufferingProgressProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BufferingProgressProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_BufferingProgressProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::DownloadProgressOffsetProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DownloadProgressOffsetProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_DownloadProgressOffsetProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::CurrentStateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CurrentStateProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_CurrentStateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::CanSeekProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanSeekProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_CanSeekProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::CanPauseProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanPauseProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_CanPauseProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AudioStreamCountProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioStreamCountProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AudioStreamCountProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AudioStreamIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioStreamIndexProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AudioStreamIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::PlaybackRateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaybackRateProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_PlaybackRateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::IsLoopingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsLoopingProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_IsLoopingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::PlayToSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_PlayToSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::DefaultPlaybackRateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultPlaybackRateProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_DefaultPlaybackRateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AspectRatioWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AspectRatioWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AspectRatioWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AspectRatioHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AspectRatioHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AspectRatioHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::RealTimePlaybackProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_RealTimePlaybackProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_RealTimePlaybackProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AudioCategoryProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioCategoryProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AudioCategoryProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::AudioDeviceTypeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AudioDeviceTypeProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_AudioDeviceTypeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::ProtectionManagerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ProtectionManagerProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_ProtectionManagerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::Stereo3DVideoPackingModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Stereo3DVideoPackingModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_Stereo3DVideoPackingModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::Stereo3DVideoRenderModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Stereo3DVideoRenderModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_Stereo3DVideoRenderModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::IsStereo3DVideoProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsStereo3DVideoProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_IsStereo3DVideoProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics::ActualStereo3DVideoPackingModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ActualStereo3DVideoPackingModeProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics)->get_ActualStereo3DVideoPackingModeProperty(put_abi(value))); return value; } template bool impl_IMediaElement2::AreTransportControlsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreTransportControlsEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaElement2)->get_AreTransportControlsEnabled(&value)); return value; } template void impl_IMediaElement2::AreTransportControlsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreTransportControlsEnabled(value)); + check_hresult(WINRT_SHIM(IMediaElement2)->put_AreTransportControlsEnabled(value)); } template Windows::UI::Xaml::Media::Stretch impl_IMediaElement2::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(IMediaElement2)->get_Stretch(&value)); return value; } template void impl_IMediaElement2::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(IMediaElement2)->put_Stretch(value)); } template bool impl_IMediaElement2::IsFullWindow() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindow(&value)); + check_hresult(WINRT_SHIM(IMediaElement2)->get_IsFullWindow(&value)); return value; } template void impl_IMediaElement2::IsFullWindow(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFullWindow(value)); + check_hresult(WINRT_SHIM(IMediaElement2)->put_IsFullWindow(value)); } template void impl_IMediaElement2::SetMediaStreamSource(const Windows::Media::Core::IMediaSource & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMediaStreamSource(get(source))); + check_hresult(WINRT_SHIM(IMediaElement2)->abi_SetMediaStreamSource(get_abi(source))); } template Windows::Foundation::Uri impl_IMediaElement2::PlayToPreferredSourceUri() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToPreferredSourceUri(put(value))); + check_hresult(WINRT_SHIM(IMediaElement2)->get_PlayToPreferredSourceUri(put_abi(value))); return value; } template void impl_IMediaElement2::PlayToPreferredSourceUri(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_PlayToPreferredSourceUri(get(value))); + check_hresult(WINRT_SHIM(IMediaElement2)->put_PlayToPreferredSourceUri(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics2::AreTransportControlsEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreTransportControlsEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics2)->get_AreTransportControlsEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics2::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics2)->get_StretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics2::IsFullWindowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics2)->get_IsFullWindowProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaElementStatics2::PlayToPreferredSourceUriProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlayToPreferredSourceUriProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaElementStatics2)->get_PlayToPreferredSourceUriProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::MediaTransportControls impl_IMediaElement3::TransportControls() const { Windows::UI::Xaml::Controls::MediaTransportControls value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransportControls(put(value))); + check_hresult(WINRT_SHIM(IMediaElement3)->get_TransportControls(put_abi(value))); return value; } template void impl_IMediaElement3::TransportControls(const Windows::UI::Xaml::Controls::MediaTransportControls & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransportControls(get(value))); + check_hresult(WINRT_SHIM(IMediaElement3)->put_TransportControls(get_abi(value))); } template event_token impl_IMediaElement3::PartialMediaFailureDetected(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PartialMediaFailureDetected(get(value), &token)); + check_hresult(WINRT_SHIM(IMediaElement3)->add_PartialMediaFailureDetected(get_abi(value), &token)); return token; } @@ -51891,120 +54822,120 @@ template event_revoker impl_IMediaElement3::Part template void impl_IMediaElement3::PartialMediaFailureDetected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PartialMediaFailureDetected(token)); + check_hresult(WINRT_SHIM(IMediaElement3)->remove_PartialMediaFailureDetected(token)); } template void impl_IMediaElement3::SetPlaybackSource(const Windows::Media::Playback::IMediaPlaybackSource & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetPlaybackSource(get(source))); + check_hresult(WINRT_SHIM(IMediaElement3)->abi_SetPlaybackSource(get_abi(source))); } template Windows::Media::Casting::CastingSource impl_IMediaElement3::GetAsCastingSource() const { Windows::Media::Casting::CastingSource returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_GetAsCastingSource(put(returnValue))); + check_hresult(WINRT_SHIM(IMediaElement3)->abi_GetAsCastingSource(put_abi(returnValue))); return returnValue; } template Windows::Media::Playback::MediaPlayer impl_IMediaPlayerPresenter::MediaPlayer() const { Windows::Media::Playback::MediaPlayer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->get_MediaPlayer(put_abi(value))); return value; } template void impl_IMediaPlayerPresenter::MediaPlayer(const Windows::Media::Playback::MediaPlayer & value) const { - check_hresult(static_cast(static_cast(*this))->put_MediaPlayer(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->put_MediaPlayer(get_abi(value))); } template Windows::UI::Xaml::Media::Stretch impl_IMediaPlayerPresenter::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->get_Stretch(&value)); return value; } template void impl_IMediaPlayerPresenter::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->put_Stretch(value)); } template bool impl_IMediaPlayerPresenter::IsFullWindow() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindow(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->get_IsFullWindow(&value)); return value; } template void impl_IMediaPlayerPresenter::IsFullWindow(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFullWindow(value)); + check_hresult(WINRT_SHIM(IMediaPlayerPresenter)->put_IsFullWindow(value)); } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerPresenterStatics::MediaPlayerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayerProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenterStatics)->get_MediaPlayerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerPresenterStatics::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenterStatics)->get_StretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerPresenterStatics::IsFullWindowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenterStatics)->get_IsFullWindowProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::MediaPlayerPresenter impl_IMediaPlayerPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::MediaPlayerPresenter impl_IMediaPlayerPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::MediaPlayerPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaPlayerPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Foundation::Uri impl_IWebView::Source() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IWebView)->get_Source(put_abi(value))); return value; } template void impl_IWebView::Source(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(IWebView)->put_Source(get_abi(value))); } template Windows::Foundation::Collections::IVector impl_IWebView::AllowedScriptNotifyUris() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AllowedScriptNotifyUris(put(value))); + check_hresult(WINRT_SHIM(IWebView)->get_AllowedScriptNotifyUris(put_abi(value))); return value; } template void impl_IWebView::AllowedScriptNotifyUris(const Windows::Foundation::Collections::IVector & value) const { - check_hresult(static_cast(static_cast(*this))->put_AllowedScriptNotifyUris(get(value))); + check_hresult(WINRT_SHIM(IWebView)->put_AllowedScriptNotifyUris(get_abi(value))); } template Windows::ApplicationModel::DataTransfer::DataPackage impl_IWebView::DataTransferPackage() const { Windows::ApplicationModel::DataTransfer::DataPackage value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataTransferPackage(put(value))); + check_hresult(WINRT_SHIM(IWebView)->get_DataTransferPackage(put_abi(value))); return value; } template event_token impl_IWebView::LoadCompleted(const Windows::UI::Xaml::Navigation::LoadCompletedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LoadCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView)->add_LoadCompleted(get_abi(value), &token)); return token; } @@ -52015,13 +54946,13 @@ template event_revoker impl_IWebView::LoadCompleted(au template void impl_IWebView::LoadCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LoadCompleted(token)); + check_hresult(WINRT_SHIM(IWebView)->remove_LoadCompleted(token)); } template event_token impl_IWebView::ScriptNotify(const Windows::UI::Xaml::Controls::NotifyEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ScriptNotify(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView)->add_ScriptNotify(get_abi(value), &token)); return token; } @@ -52032,13 +54963,13 @@ template event_revoker impl_IWebView::ScriptNotify(aut template void impl_IWebView::ScriptNotify(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ScriptNotify(token)); + check_hresult(WINRT_SHIM(IWebView)->remove_ScriptNotify(token)); } template event_token impl_IWebView::NavigationFailed(const Windows::UI::Xaml::Controls::WebViewNavigationFailedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationFailed(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView)->add_NavigationFailed(get_abi(value), &token)); return token; } @@ -52049,79 +54980,79 @@ template event_revoker impl_IWebView::NavigationFailed template void impl_IWebView::NavigationFailed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationFailed(token)); + check_hresult(WINRT_SHIM(IWebView)->remove_NavigationFailed(token)); } -template hstring impl_IWebView::InvokeScript(hstring_ref scriptName, array_ref arguments) const +template hstring impl_IWebView::InvokeScript(hstring_view scriptName, array_view arguments) const { hstring returnValue; - check_hresult(static_cast(static_cast(*this))->abi_InvokeScript(get(scriptName), arguments.size(), get(arguments), put(returnValue))); + check_hresult(WINRT_SHIM(IWebView)->abi_InvokeScript(get_abi(scriptName), arguments.size(), get_abi(arguments), put_abi(returnValue))); return returnValue; } template void impl_IWebView::Navigate(const Windows::Foundation::Uri & source) const { - check_hresult(static_cast(static_cast(*this))->abi_Navigate(get(source))); + check_hresult(WINRT_SHIM(IWebView)->abi_Navigate(get_abi(source))); } -template void impl_IWebView::NavigateToString(hstring_ref text) const +template void impl_IWebView::NavigateToString(hstring_view text) const { - check_hresult(static_cast(static_cast(*this))->abi_NavigateToString(get(text))); + check_hresult(WINRT_SHIM(IWebView)->abi_NavigateToString(get_abi(text))); } template Windows::Foundation::Collections::IVector impl_IWebViewStatics::AnyScriptNotifyUri() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_AnyScriptNotifyUri(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics)->get_AnyScriptNotifyUri(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics::SourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics)->get_SourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics::AllowedScriptNotifyUrisProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AllowedScriptNotifyUrisProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics)->get_AllowedScriptNotifyUrisProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics::DataTransferPackageProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataTransferPackageProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics)->get_DataTransferPackageProperty(put_abi(value))); return value; } template bool impl_IWebView2::CanGoBack() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGoBack(&value)); + check_hresult(WINRT_SHIM(IWebView2)->get_CanGoBack(&value)); return value; } template bool impl_IWebView2::CanGoForward() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGoForward(&value)); + check_hresult(WINRT_SHIM(IWebView2)->get_CanGoForward(&value)); return value; } template hstring impl_IWebView2::DocumentTitle() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DocumentTitle(put(value))); + check_hresult(WINRT_SHIM(IWebView2)->get_DocumentTitle(put_abi(value))); return value; } template event_token impl_IWebView2::NavigationStarting(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationStarting(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_NavigationStarting(get_abi(value), &token)); return token; } @@ -52132,13 +55063,13 @@ template event_revoker impl_IWebView2::NavigationStar template void impl_IWebView2::NavigationStarting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationStarting(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_NavigationStarting(token)); } template event_token impl_IWebView2::ContentLoading(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContentLoading(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_ContentLoading(get_abi(value), &token)); return token; } @@ -52149,13 +55080,13 @@ template event_revoker impl_IWebView2::ContentLoading template void impl_IWebView2::ContentLoading(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContentLoading(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_ContentLoading(token)); } template event_token impl_IWebView2::DOMContentLoaded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DOMContentLoaded(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_DOMContentLoaded(get_abi(value), &token)); return token; } @@ -52166,78 +55097,78 @@ template event_revoker impl_IWebView2::DOMContentLoad template void impl_IWebView2::DOMContentLoaded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DOMContentLoaded(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_DOMContentLoaded(token)); } template void impl_IWebView2::GoForward() const { - check_hresult(static_cast(static_cast(*this))->abi_GoForward()); + check_hresult(WINRT_SHIM(IWebView2)->abi_GoForward()); } template void impl_IWebView2::GoBack() const { - check_hresult(static_cast(static_cast(*this))->abi_GoBack()); + check_hresult(WINRT_SHIM(IWebView2)->abi_GoBack()); } template void impl_IWebView2::Refresh() const { - check_hresult(static_cast(static_cast(*this))->abi_Refresh()); + check_hresult(WINRT_SHIM(IWebView2)->abi_Refresh()); } template void impl_IWebView2::Stop() const { - check_hresult(static_cast(static_cast(*this))->abi_Stop()); + check_hresult(WINRT_SHIM(IWebView2)->abi_Stop()); } template Windows::Foundation::IAsyncAction impl_IWebView2::CapturePreviewToStreamAsync(const Windows::Storage::Streams::IRandomAccessStream & stream) const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_CapturePreviewToStreamAsync(get(stream), put(returnValue))); + check_hresult(WINRT_SHIM(IWebView2)->abi_CapturePreviewToStreamAsync(get_abi(stream), put_abi(returnValue))); return returnValue; } -template Windows::Foundation::IAsyncOperation impl_IWebView2::InvokeScriptAsync(hstring_ref scriptName, const Windows::Foundation::Collections::IIterable & arguments) const +template Windows::Foundation::IAsyncOperation impl_IWebView2::InvokeScriptAsync(hstring_view scriptName, iterable arguments) const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_InvokeScriptAsync(get(scriptName), get(arguments), put(returnValue))); + check_hresult(WINRT_SHIM(IWebView2)->abi_InvokeScriptAsync(get_abi(scriptName), get_abi(arguments), put_abi(returnValue))); return returnValue; } template Windows::Foundation::IAsyncOperation impl_IWebView2::CaptureSelectedContentToDataPackageAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_CaptureSelectedContentToDataPackageAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IWebView2)->abi_CaptureSelectedContentToDataPackageAsync(put_abi(returnValue))); return returnValue; } template void impl_IWebView2::NavigateToLocalStreamUri(const Windows::Foundation::Uri & source, const Windows::Web::IUriToStreamResolver & streamResolver) const { - check_hresult(static_cast(static_cast(*this))->abi_NavigateToLocalStreamUri(get(source), get(streamResolver))); + check_hresult(WINRT_SHIM(IWebView2)->abi_NavigateToLocalStreamUri(get_abi(source), get_abi(streamResolver))); } -template Windows::Foundation::Uri impl_IWebView2::BuildLocalStreamUri(hstring_ref contentIdentifier, hstring_ref relativePath) const +template Windows::Foundation::Uri impl_IWebView2::BuildLocalStreamUri(hstring_view contentIdentifier, hstring_view relativePath) const { Windows::Foundation::Uri returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_BuildLocalStreamUri(get(contentIdentifier), get(relativePath), put(returnValue))); + check_hresult(WINRT_SHIM(IWebView2)->abi_BuildLocalStreamUri(get_abi(contentIdentifier), get_abi(relativePath), put_abi(returnValue))); return returnValue; } template Windows::UI::Color impl_IWebView2::DefaultBackgroundColor() const { Windows::UI::Color value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultBackgroundColor(put(value))); + check_hresult(WINRT_SHIM(IWebView2)->get_DefaultBackgroundColor(put_abi(value))); return value; } template void impl_IWebView2::DefaultBackgroundColor(const Windows::UI::Color & value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultBackgroundColor(get(value))); + check_hresult(WINRT_SHIM(IWebView2)->put_DefaultBackgroundColor(get_abi(value))); } template event_token impl_IWebView2::NavigationCompleted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NavigationCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_NavigationCompleted(get_abi(value), &token)); return token; } @@ -52248,13 +55179,13 @@ template event_revoker impl_IWebView2::NavigationComp template void impl_IWebView2::NavigationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NavigationCompleted(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_NavigationCompleted(token)); } template event_token impl_IWebView2::FrameNavigationStarting(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameNavigationStarting(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_FrameNavigationStarting(get_abi(value), &token)); return token; } @@ -52265,13 +55196,13 @@ template event_revoker impl_IWebView2::FrameNavigatio template void impl_IWebView2::FrameNavigationStarting(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameNavigationStarting(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_FrameNavigationStarting(token)); } template event_token impl_IWebView2::FrameContentLoading(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameContentLoading(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_FrameContentLoading(get_abi(value), &token)); return token; } @@ -52282,13 +55213,13 @@ template event_revoker impl_IWebView2::FrameContentLo template void impl_IWebView2::FrameContentLoading(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameContentLoading(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_FrameContentLoading(token)); } template event_token impl_IWebView2::FrameDOMContentLoaded(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameDOMContentLoaded(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_FrameDOMContentLoaded(get_abi(value), &token)); return token; } @@ -52299,13 +55230,13 @@ template event_revoker impl_IWebView2::FrameDOMConten template void impl_IWebView2::FrameDOMContentLoaded(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameDOMContentLoaded(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_FrameDOMContentLoaded(token)); } template event_token impl_IWebView2::FrameNavigationCompleted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_FrameNavigationCompleted(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_FrameNavigationCompleted(get_abi(value), &token)); return token; } @@ -52316,13 +55247,13 @@ template event_revoker impl_IWebView2::FrameNavigatio template void impl_IWebView2::FrameNavigationCompleted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_FrameNavigationCompleted(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_FrameNavigationCompleted(token)); } template event_token impl_IWebView2::LongRunningScriptDetected(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_LongRunningScriptDetected(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_LongRunningScriptDetected(get_abi(value), &token)); return token; } @@ -52333,30 +55264,30 @@ template event_revoker impl_IWebView2::LongRunningScr template void impl_IWebView2::LongRunningScriptDetected(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_LongRunningScriptDetected(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_LongRunningScriptDetected(token)); } -template event_token impl_IWebView2::UnsafeContentWarningDisplaying(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IWebView2::UnsafeContentWarningDisplaying(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UnsafeContentWarningDisplaying(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_UnsafeContentWarningDisplaying(get_abi(value), &token)); return token; } -template event_revoker impl_IWebView2::UnsafeContentWarningDisplaying(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IWebView2::UnsafeContentWarningDisplaying(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IWebView2::remove_UnsafeContentWarningDisplaying, UnsafeContentWarningDisplaying(value)); } template void impl_IWebView2::UnsafeContentWarningDisplaying(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UnsafeContentWarningDisplaying(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_UnsafeContentWarningDisplaying(token)); } template event_token impl_IWebView2::UnviewableContentIdentified(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UnviewableContentIdentified(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView2)->add_UnviewableContentIdentified(get_abi(value), &token)); return token; } @@ -52367,105 +55298,105 @@ template event_revoker impl_IWebView2::UnviewableCont template void impl_IWebView2::UnviewableContentIdentified(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UnviewableContentIdentified(token)); + check_hresult(WINRT_SHIM(IWebView2)->remove_UnviewableContentIdentified(token)); } template void impl_IWebView2::NavigateWithHttpRequestMessage(const Windows::Web::Http::HttpRequestMessage & requestMessage) const { - check_hresult(static_cast(static_cast(*this))->abi_NavigateWithHttpRequestMessage(get(requestMessage))); + check_hresult(WINRT_SHIM(IWebView2)->abi_NavigateWithHttpRequestMessage(get_abi(requestMessage))); } template bool impl_IWebView2::Focus(Windows::UI::Xaml::FocusState value) const { bool returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_Focus(value, &returnValue)); + check_hresult(WINRT_SHIM(IWebView2)->abi_Focus(value, &returnValue)); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics2::CanGoBackProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanGoBackProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics2)->get_CanGoBackProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics2::CanGoForwardProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CanGoForwardProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics2)->get_CanGoForwardProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics2::DocumentTitleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DocumentTitleProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics2)->get_DocumentTitleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics2::DefaultBackgroundColorProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultBackgroundColorProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics2)->get_DefaultBackgroundColorProperty(put_abi(value))); return value; } template bool impl_IWebView3::ContainsFullScreenElement() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ContainsFullScreenElement(&value)); + check_hresult(WINRT_SHIM(IWebView3)->get_ContainsFullScreenElement(&value)); return value; } -template event_token impl_IWebView3::ContainsFullScreenElementChanged(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_IWebView3::ContainsFullScreenElementChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ContainsFullScreenElementChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView3)->add_ContainsFullScreenElementChanged(get_abi(value), &token)); return token; } -template event_revoker impl_IWebView3::ContainsFullScreenElementChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_IWebView3::ContainsFullScreenElementChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IWebView3::remove_ContainsFullScreenElementChanged, ContainsFullScreenElementChanged(value)); } template void impl_IWebView3::ContainsFullScreenElementChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ContainsFullScreenElementChanged(token)); + check_hresult(WINRT_SHIM(IWebView3)->remove_ContainsFullScreenElementChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics3::ContainsFullScreenElementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContainsFullScreenElementProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics3)->get_ContainsFullScreenElementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::WebViewExecutionMode impl_IWebView4::ExecutionMode() const { Windows::UI::Xaml::Controls::WebViewExecutionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ExecutionMode(&value)); + check_hresult(WINRT_SHIM(IWebView4)->get_ExecutionMode(&value)); return value; } template Windows::Foundation::Collections::IVector impl_IWebView4::DeferredPermissionRequests() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_DeferredPermissionRequests(put(value))); + check_hresult(WINRT_SHIM(IWebView4)->get_DeferredPermissionRequests(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::WebViewSettings impl_IWebView4::Settings() const { Windows::UI::Xaml::Controls::WebViewSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Settings(put(value))); + check_hresult(WINRT_SHIM(IWebView4)->get_Settings(put_abi(value))); return value; } template event_token impl_IWebView4::UnsupportedUriSchemeIdentified(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_UnsupportedUriSchemeIdentified(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView4)->add_UnsupportedUriSchemeIdentified(get_abi(value), &token)); return token; } @@ -52476,13 +55407,13 @@ template event_revoker impl_IWebView4::UnsupportedUri template void impl_IWebView4::UnsupportedUriSchemeIdentified(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_UnsupportedUriSchemeIdentified(token)); + check_hresult(WINRT_SHIM(IWebView4)->remove_UnsupportedUriSchemeIdentified(token)); } template event_token impl_IWebView4::NewWindowRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_NewWindowRequested(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView4)->add_NewWindowRequested(get_abi(value), &token)); return token; } @@ -52493,13 +55424,13 @@ template event_revoker impl_IWebView4::NewWindowReque template void impl_IWebView4::NewWindowRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_NewWindowRequested(token)); + check_hresult(WINRT_SHIM(IWebView4)->remove_NewWindowRequested(token)); } template event_token impl_IWebView4::PermissionRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PermissionRequested(get(value), &token)); + check_hresult(WINRT_SHIM(IWebView4)->add_PermissionRequested(get_abi(value), &token)); return token; } @@ -52510,397 +55441,397 @@ template event_revoker impl_IWebView4::PermissionRequ template void impl_IWebView4::PermissionRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PermissionRequested(token)); + check_hresult(WINRT_SHIM(IWebView4)->remove_PermissionRequested(token)); } -template void impl_IWebView4::AddWebAllowedObject(hstring_ref name, const Windows::IInspectable & pObject) const +template void impl_IWebView4::AddWebAllowedObject(hstring_view name, const Windows::Foundation::IInspectable & pObject) const { - check_hresult(static_cast(static_cast(*this))->abi_AddWebAllowedObject(get(name), get(pObject))); + check_hresult(WINRT_SHIM(IWebView4)->abi_AddWebAllowedObject(get_abi(name), get_abi(pObject))); } template Windows::UI::Xaml::Controls::WebViewDeferredPermissionRequest impl_IWebView4::DeferredPermissionRequestById(uint32_t id) const { Windows::UI::Xaml::Controls::WebViewDeferredPermissionRequest returnValue { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_DeferredPermissionRequestById(id, put(returnValue))); + check_hresult(WINRT_SHIM(IWebView4)->abi_DeferredPermissionRequestById(id, put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::WebViewExecutionMode impl_IWebViewStatics4::DefaultExecutionMode() const { Windows::UI::Xaml::Controls::WebViewExecutionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultExecutionMode(&value)); + check_hresult(WINRT_SHIM(IWebViewStatics4)->get_DefaultExecutionMode(&value)); return value; } template Windows::Foundation::IAsyncAction impl_IWebViewStatics4::ClearTemporaryWebDataAsync() const { Windows::Foundation::IAsyncAction returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ClearTemporaryWebDataAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IWebViewStatics4)->abi_ClearTemporaryWebDataAsync(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::Controls::WebView impl_IWebViewFactory4::CreateInstanceWithExecutionMode(Windows::UI::Xaml::Controls::WebViewExecutionMode executionMode) const { Windows::UI::Xaml::Controls::WebView instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithExecutionMode(executionMode, put(instance))); + check_hresult(WINRT_SHIM(IWebViewFactory4)->abi_CreateInstanceWithExecutionMode(executionMode, put_abi(instance))); return instance; } template Windows::UI::Xaml::DependencyObject impl_IWebView5::XYFocusLeft() const { Windows::UI::Xaml::DependencyObject value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusLeft(put(value))); + check_hresult(WINRT_SHIM(IWebView5)->get_XYFocusLeft(put_abi(value))); return value; } template void impl_IWebView5::XYFocusLeft(const Windows::UI::Xaml::DependencyObject & value) const { - check_hresult(static_cast(static_cast(*this))->put_XYFocusLeft(get(value))); + check_hresult(WINRT_SHIM(IWebView5)->put_XYFocusLeft(get_abi(value))); } template Windows::UI::Xaml::DependencyObject impl_IWebView5::XYFocusRight() const { Windows::UI::Xaml::DependencyObject value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusRight(put(value))); + check_hresult(WINRT_SHIM(IWebView5)->get_XYFocusRight(put_abi(value))); return value; } template void impl_IWebView5::XYFocusRight(const Windows::UI::Xaml::DependencyObject & value) const { - check_hresult(static_cast(static_cast(*this))->put_XYFocusRight(get(value))); + check_hresult(WINRT_SHIM(IWebView5)->put_XYFocusRight(get_abi(value))); } template Windows::UI::Xaml::DependencyObject impl_IWebView5::XYFocusUp() const { Windows::UI::Xaml::DependencyObject value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusUp(put(value))); + check_hresult(WINRT_SHIM(IWebView5)->get_XYFocusUp(put_abi(value))); return value; } template void impl_IWebView5::XYFocusUp(const Windows::UI::Xaml::DependencyObject & value) const { - check_hresult(static_cast(static_cast(*this))->put_XYFocusUp(get(value))); + check_hresult(WINRT_SHIM(IWebView5)->put_XYFocusUp(get_abi(value))); } template Windows::UI::Xaml::DependencyObject impl_IWebView5::XYFocusDown() const { Windows::UI::Xaml::DependencyObject value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusDown(put(value))); + check_hresult(WINRT_SHIM(IWebView5)->get_XYFocusDown(put_abi(value))); return value; } template void impl_IWebView5::XYFocusDown(const Windows::UI::Xaml::DependencyObject & value) const { - check_hresult(static_cast(static_cast(*this))->put_XYFocusDown(get(value))); + check_hresult(WINRT_SHIM(IWebView5)->put_XYFocusDown(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics5::XYFocusLeftProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusLeftProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics5)->get_XYFocusLeftProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics5::XYFocusRightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusRightProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics5)->get_XYFocusRightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics5::XYFocusUpProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusUpProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics5)->get_XYFocusUpProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IWebViewStatics5::XYFocusDownProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_XYFocusDownProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewStatics5)->get_XYFocusDownProperty(put_abi(value))); return value; } template hstring impl_IWebViewBrush::SourceName() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SourceName(put(value))); + check_hresult(WINRT_SHIM(IWebViewBrush)->get_SourceName(put_abi(value))); return value; } -template void impl_IWebViewBrush::SourceName(hstring_ref value) const +template void impl_IWebViewBrush::SourceName(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SourceName(get(value))); + check_hresult(WINRT_SHIM(IWebViewBrush)->put_SourceName(get_abi(value))); } template void impl_IWebViewBrush::Redraw() const { - check_hresult(static_cast(static_cast(*this))->abi_Redraw()); + check_hresult(WINRT_SHIM(IWebViewBrush)->abi_Redraw()); } template void impl_IWebViewBrush::SetSource(const Windows::UI::Xaml::Controls::WebView & source) const { - check_hresult(static_cast(static_cast(*this))->abi_SetSource(get(source))); + check_hresult(WINRT_SHIM(IWebViewBrush)->abi_SetSource(get_abi(source))); } template Windows::UI::Xaml::DependencyProperty impl_IWebViewBrushStatics::SourceNameProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceNameProperty(put(value))); + check_hresult(WINRT_SHIM(IWebViewBrushStatics)->get_SourceNameProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAppBarSeparatorStatics::IsCompactProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsCompactProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarSeparatorStatics)->get_IsCompactProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::AppBarSeparator impl_IAppBarSeparatorFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::AppBarSeparator impl_IAppBarSeparatorFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::AppBarSeparator instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAppBarSeparatorFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::DependencyProperty impl_IAppBarSeparatorStatics3::IsInOverflowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsInOverflowProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarSeparatorStatics3)->get_IsInOverflowProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAppBarSeparatorStatics3::DynamicOverflowOrderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DynamicOverflowOrderProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarSeparatorStatics3)->get_DynamicOverflowOrderProperty(put_abi(value))); return value; } template Windows::Foundation::Uri impl_IBitmapIcon::UriSource() const { Windows::Foundation::Uri value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UriSource(put(value))); + check_hresult(WINRT_SHIM(IBitmapIcon)->get_UriSource(put_abi(value))); return value; } template void impl_IBitmapIcon::UriSource(const Windows::Foundation::Uri & value) const { - check_hresult(static_cast(static_cast(*this))->put_UriSource(get(value))); + check_hresult(WINRT_SHIM(IBitmapIcon)->put_UriSource(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IBitmapIconStatics::UriSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UriSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IBitmapIconStatics)->get_UriSourceProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::BitmapIcon impl_IBitmapIconFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::BitmapIcon impl_IBitmapIconFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::BitmapIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IBitmapIconFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::Foundation::IReference impl_ICalendarDatePicker::Date() const { Windows::Foundation::IReference value; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_Date(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::Date(const Windows::Foundation::IReference & value) const +template void impl_ICalendarDatePicker::Date(const optional & value) const { - check_hresult(static_cast(static_cast(*this))->put_Date(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_Date(get_abi(value))); } template bool impl_ICalendarDatePicker::IsCalendarOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsCalendarOpen(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_IsCalendarOpen(&value)); return value; } template void impl_ICalendarDatePicker::IsCalendarOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsCalendarOpen(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_IsCalendarOpen(value)); } template hstring impl_ICalendarDatePicker::DateFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DateFormat(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_DateFormat(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::DateFormat(hstring_ref value) const +template void impl_ICalendarDatePicker::DateFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DateFormat(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_DateFormat(get_abi(value))); } template hstring impl_ICalendarDatePicker::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::PlaceholderText(hstring_ref value) const +template void impl_ICalendarDatePicker::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_PlaceholderText(get_abi(value))); } -template Windows::IInspectable impl_ICalendarDatePicker::Header() const +template Windows::Foundation::IInspectable impl_ICalendarDatePicker::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_Header(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::Header(const Windows::IInspectable & value) const +template void impl_ICalendarDatePicker::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_ICalendarDatePicker::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_ICalendarDatePicker::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::Style impl_ICalendarDatePicker::CalendarViewStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarViewStyle(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_CalendarViewStyle(put_abi(value))); return value; } template void impl_ICalendarDatePicker::CalendarViewStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarViewStyle(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_CalendarViewStyle(get_abi(value))); } template Windows::Foundation::DateTime impl_ICalendarDatePicker::MinDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MinDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_MinDate(put_abi(value))); return value; } template void impl_ICalendarDatePicker::MinDate(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinDate(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_MinDate(get_abi(value))); } template Windows::Foundation::DateTime impl_ICalendarDatePicker::MaxDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_MaxDate(put_abi(value))); return value; } template void impl_ICalendarDatePicker::MaxDate(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDate(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_MaxDate(get_abi(value))); } template bool impl_ICalendarDatePicker::IsTodayHighlighted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTodayHighlighted(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_IsTodayHighlighted(&value)); return value; } template void impl_ICalendarDatePicker::IsTodayHighlighted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTodayHighlighted(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_IsTodayHighlighted(value)); } template Windows::UI::Xaml::Controls::CalendarViewDisplayMode impl_ICalendarDatePicker::DisplayMode() const { Windows::UI::Xaml::Controls::CalendarViewDisplayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayMode(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_DisplayMode(&value)); return value; } template void impl_ICalendarDatePicker::DisplayMode(Windows::UI::Xaml::Controls::CalendarViewDisplayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMode(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_DisplayMode(value)); } template Windows::Globalization::DayOfWeek impl_ICalendarDatePicker::FirstDayOfWeek() const { Windows::Globalization::DayOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstDayOfWeek(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_FirstDayOfWeek(&value)); return value; } template void impl_ICalendarDatePicker::FirstDayOfWeek(Windows::Globalization::DayOfWeek value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstDayOfWeek(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_FirstDayOfWeek(value)); } template hstring impl_ICalendarDatePicker::DayOfWeekFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeekFormat(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_DayOfWeekFormat(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::DayOfWeekFormat(hstring_ref value) const +template void impl_ICalendarDatePicker::DayOfWeekFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DayOfWeekFormat(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_DayOfWeekFormat(get_abi(value))); } template hstring impl_ICalendarDatePicker::CalendarIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifier(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_CalendarIdentifier(put_abi(value))); return value; } -template void impl_ICalendarDatePicker::CalendarIdentifier(hstring_ref value) const +template void impl_ICalendarDatePicker::CalendarIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarIdentifier(get(value))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_CalendarIdentifier(get_abi(value))); } template bool impl_ICalendarDatePicker::IsOutOfScopeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOutOfScopeEnabled(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_IsOutOfScopeEnabled(&value)); return value; } template void impl_ICalendarDatePicker::IsOutOfScopeEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOutOfScopeEnabled(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_IsOutOfScopeEnabled(value)); } template bool impl_ICalendarDatePicker::IsGroupLabelVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGroupLabelVisible(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->get_IsGroupLabelVisible(&value)); return value; } template void impl_ICalendarDatePicker::IsGroupLabelVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsGroupLabelVisible(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->put_IsGroupLabelVisible(value)); } template event_token impl_ICalendarDatePicker::CalendarViewDayItemChanging(const Windows::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CalendarViewDayItemChanging(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->add_CalendarViewDayItemChanging(get_abi(value), &token)); return token; } @@ -52911,13 +55842,13 @@ template event_revoker impl_ICalendarDatePicke template void impl_ICalendarDatePicker::CalendarViewDayItemChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CalendarViewDayItemChanging(token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->remove_CalendarViewDayItemChanging(token)); } template event_token impl_ICalendarDatePicker::DateChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->add_DateChanged(get_abi(value), &token)); return token; } @@ -52928,797 +55859,797 @@ template event_revoker impl_ICalendarDatePicke template void impl_ICalendarDatePicker::DateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DateChanged(token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->remove_DateChanged(token)); } -template event_token impl_ICalendarDatePicker::Opened(const Windows::Foundation::EventHandler & value) const +template event_token impl_ICalendarDatePicker::Opened(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->add_Opened(get_abi(value), &token)); return token; } -template event_revoker impl_ICalendarDatePicker::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_ICalendarDatePicker::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::ICalendarDatePicker::remove_Opened, Opened(value)); } template void impl_ICalendarDatePicker::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->remove_Opened(token)); } -template event_token impl_ICalendarDatePicker::Closed(const Windows::Foundation::EventHandler & value) const +template event_token impl_ICalendarDatePicker::Closed(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->add_Closed(get_abi(value), &token)); return token; } -template event_revoker impl_ICalendarDatePicker::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_ICalendarDatePicker::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::ICalendarDatePicker::remove_Closed, Closed(value)); } template void impl_ICalendarDatePicker::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->remove_Closed(token)); } template void impl_ICalendarDatePicker::SetDisplayDate(const Windows::Foundation::DateTime & date) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDisplayDate(get(date))); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->abi_SetDisplayDate(get_abi(date))); } template void impl_ICalendarDatePicker::SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) const { - check_hresult(static_cast(static_cast(*this))->abi_SetYearDecadeDisplayDimensions(columns, rows)); + check_hresult(WINRT_SHIM(ICalendarDatePicker)->abi_SetYearDecadeDisplayDimensions(columns, rows)); } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::DateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_DateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::IsCalendarOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsCalendarOpenProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_IsCalendarOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::DateFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DateFormatProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_DateFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::CalendarViewStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarViewStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_CalendarViewStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::MinDateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinDateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_MinDateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::MaxDateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxDateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_MaxDateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::IsTodayHighlightedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTodayHighlightedProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_IsTodayHighlightedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::DisplayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_DisplayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::FirstDayOfWeekProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstDayOfWeekProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_FirstDayOfWeekProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::DayOfWeekFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeekFormatProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_DayOfWeekFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::CalendarIdentifierProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifierProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_CalendarIdentifierProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::IsOutOfScopeEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOutOfScopeEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_IsOutOfScopeEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics::IsGroupLabelVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsGroupLabelVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics)->get_IsGroupLabelVisibleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::CalendarDatePicker impl_ICalendarDatePickerFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::CalendarDatePicker impl_ICalendarDatePickerFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::CalendarDatePicker instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICalendarDatePickerFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_ICalendarDatePicker2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_ICalendarDatePicker2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(ICalendarDatePicker2)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_ICalendarDatePickerStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarDatePickerStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template hstring impl_ICalendarView::CalendarIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifier(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarIdentifier(put_abi(value))); return value; } -template void impl_ICalendarView::CalendarIdentifier(hstring_ref value) const +template void impl_ICalendarView::CalendarIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarIdentifier(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarIdentifier(get_abi(value))); } template hstring impl_ICalendarView::DayOfWeekFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeekFormat(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_DayOfWeekFormat(put_abi(value))); return value; } -template void impl_ICalendarView::DayOfWeekFormat(hstring_ref value) const +template void impl_ICalendarView::DayOfWeekFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DayOfWeekFormat(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_DayOfWeekFormat(get_abi(value))); } template bool impl_ICalendarView::IsGroupLabelVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsGroupLabelVisible(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_IsGroupLabelVisible(&value)); return value; } template void impl_ICalendarView::IsGroupLabelVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsGroupLabelVisible(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_IsGroupLabelVisible(value)); } template Windows::UI::Xaml::Controls::CalendarViewDisplayMode impl_ICalendarView::DisplayMode() const { Windows::UI::Xaml::Controls::CalendarViewDisplayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayMode(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_DisplayMode(&value)); return value; } template void impl_ICalendarView::DisplayMode(Windows::UI::Xaml::Controls::CalendarViewDisplayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMode(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_DisplayMode(value)); } template Windows::Globalization::DayOfWeek impl_ICalendarView::FirstDayOfWeek() const { Windows::Globalization::DayOfWeek value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstDayOfWeek(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstDayOfWeek(&value)); return value; } template void impl_ICalendarView::FirstDayOfWeek(Windows::Globalization::DayOfWeek value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstDayOfWeek(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstDayOfWeek(value)); } template bool impl_ICalendarView::IsOutOfScopeEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOutOfScopeEnabled(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_IsOutOfScopeEnabled(&value)); return value; } template void impl_ICalendarView::IsOutOfScopeEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOutOfScopeEnabled(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_IsOutOfScopeEnabled(value)); } template bool impl_ICalendarView::IsTodayHighlighted() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTodayHighlighted(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_IsTodayHighlighted(&value)); return value; } template void impl_ICalendarView::IsTodayHighlighted(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTodayHighlighted(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_IsTodayHighlighted(value)); } template Windows::Foundation::DateTime impl_ICalendarView::MaxDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_MaxDate(put_abi(value))); return value; } template void impl_ICalendarView::MaxDate(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxDate(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_MaxDate(get_abi(value))); } template Windows::Foundation::DateTime impl_ICalendarView::MinDate() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MinDate(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_MinDate(put_abi(value))); return value; } template void impl_ICalendarView::MinDate(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinDate(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_MinDate(get_abi(value))); } template int32_t impl_ICalendarView::NumberOfWeeksInView() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_NumberOfWeeksInView(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_NumberOfWeeksInView(&value)); return value; } template void impl_ICalendarView::NumberOfWeeksInView(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_NumberOfWeeksInView(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_NumberOfWeeksInView(value)); } template Windows::Foundation::Collections::IVector impl_ICalendarView::SelectedDates() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SelectedDates(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectedDates(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::CalendarViewSelectionMode impl_ICalendarView::SelectionMode() const { Windows::UI::Xaml::Controls::CalendarViewSelectionMode value {}; - check_hresult(static_cast(static_cast(*this))->get_SelectionMode(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectionMode(&value)); return value; } template void impl_ICalendarView::SelectionMode(Windows::UI::Xaml::Controls::CalendarViewSelectionMode value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectionMode(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_SelectionMode(value)); } template Windows::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings impl_ICalendarView::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_TemplateSettings(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::FocusBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_FocusBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::FocusBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_FocusBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_FocusBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::SelectedHoverBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedHoverBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectedHoverBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::SelectedHoverBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedHoverBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_SelectedHoverBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::SelectedPressedBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPressedBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectedPressedBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::SelectedPressedBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedPressedBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_SelectedPressedBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::SelectedBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectedBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::SelectedBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_SelectedBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::HoverBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HoverBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_HoverBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::HoverBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_HoverBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_HoverBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::PressedBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_PressedBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::PressedBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PressedBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_PressedBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::CalendarItemBorderBrush() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBorderBrush(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarItemBorderBrush(put_abi(value))); return value; } template void impl_ICalendarView::CalendarItemBorderBrush(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarItemBorderBrush(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarItemBorderBrush(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::OutOfScopeBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutOfScopeBackground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_OutOfScopeBackground(put_abi(value))); return value; } template void impl_ICalendarView::OutOfScopeBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutOfScopeBackground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_OutOfScopeBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::CalendarItemBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBackground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarItemBackground(put_abi(value))); return value; } template void impl_ICalendarView::CalendarItemBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarItemBackground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarItemBackground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::PressedForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_PressedForeground(put_abi(value))); return value; } template void impl_ICalendarView::PressedForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PressedForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_PressedForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::TodayForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TodayForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_TodayForeground(put_abi(value))); return value; } template void impl_ICalendarView::TodayForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_TodayForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_TodayForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::BlackoutForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BlackoutForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_BlackoutForeground(put_abi(value))); return value; } template void impl_ICalendarView::BlackoutForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_BlackoutForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_BlackoutForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::SelectedForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_SelectedForeground(put_abi(value))); return value; } template void impl_ICalendarView::SelectedForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_SelectedForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_SelectedForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::OutOfScopeForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutOfScopeForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_OutOfScopeForeground(put_abi(value))); return value; } template void impl_ICalendarView::OutOfScopeForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_OutOfScopeForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_OutOfScopeForeground(get_abi(value))); } template Windows::UI::Xaml::Media::Brush impl_ICalendarView::CalendarItemForeground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemForeground(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarItemForeground(put_abi(value))); return value; } template void impl_ICalendarView::CalendarItemForeground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarItemForeground(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarItemForeground(get_abi(value))); } template Windows::UI::Xaml::Media::FontFamily impl_ICalendarView::DayItemFontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontFamily(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_DayItemFontFamily(put_abi(value))); return value; } template void impl_ICalendarView::DayItemFontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_DayItemFontFamily(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_DayItemFontFamily(get_abi(value))); } template double impl_ICalendarView::DayItemFontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontSize(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_DayItemFontSize(&value)); return value; } template void impl_ICalendarView::DayItemFontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_DayItemFontSize(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_DayItemFontSize(value)); } template Windows::UI::Text::FontStyle impl_ICalendarView::DayItemFontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontStyle(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_DayItemFontStyle(&value)); return value; } template void impl_ICalendarView::DayItemFontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_DayItemFontStyle(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_DayItemFontStyle(value)); } template Windows::UI::Text::FontWeight impl_ICalendarView::DayItemFontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontWeight(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_DayItemFontWeight(put_abi(value))); return value; } template void impl_ICalendarView::DayItemFontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_DayItemFontWeight(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_DayItemFontWeight(get_abi(value))); } template Windows::UI::Text::FontWeight impl_ICalendarView::TodayFontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_TodayFontWeight(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_TodayFontWeight(put_abi(value))); return value; } template void impl_ICalendarView::TodayFontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_TodayFontWeight(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_TodayFontWeight(get_abi(value))); } template Windows::UI::Xaml::Media::FontFamily impl_ICalendarView::FirstOfMonthLabelFontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontFamily(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfMonthLabelFontFamily(put_abi(value))); return value; } template void impl_ICalendarView::FirstOfMonthLabelFontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfMonthLabelFontFamily(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfMonthLabelFontFamily(get_abi(value))); } template double impl_ICalendarView::FirstOfMonthLabelFontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontSize(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfMonthLabelFontSize(&value)); return value; } template void impl_ICalendarView::FirstOfMonthLabelFontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfMonthLabelFontSize(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfMonthLabelFontSize(value)); } template Windows::UI::Text::FontStyle impl_ICalendarView::FirstOfMonthLabelFontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontStyle(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfMonthLabelFontStyle(&value)); return value; } template void impl_ICalendarView::FirstOfMonthLabelFontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfMonthLabelFontStyle(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfMonthLabelFontStyle(value)); } template Windows::UI::Text::FontWeight impl_ICalendarView::FirstOfMonthLabelFontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontWeight(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfMonthLabelFontWeight(put_abi(value))); return value; } template void impl_ICalendarView::FirstOfMonthLabelFontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfMonthLabelFontWeight(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfMonthLabelFontWeight(get_abi(value))); } template Windows::UI::Xaml::Media::FontFamily impl_ICalendarView::MonthYearItemFontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontFamily(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_MonthYearItemFontFamily(put_abi(value))); return value; } template void impl_ICalendarView::MonthYearItemFontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthYearItemFontFamily(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_MonthYearItemFontFamily(get_abi(value))); } template double impl_ICalendarView::MonthYearItemFontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontSize(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_MonthYearItemFontSize(&value)); return value; } template void impl_ICalendarView::MonthYearItemFontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthYearItemFontSize(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_MonthYearItemFontSize(value)); } template Windows::UI::Text::FontStyle impl_ICalendarView::MonthYearItemFontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontStyle(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_MonthYearItemFontStyle(&value)); return value; } template void impl_ICalendarView::MonthYearItemFontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthYearItemFontStyle(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_MonthYearItemFontStyle(value)); } template Windows::UI::Text::FontWeight impl_ICalendarView::MonthYearItemFontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontWeight(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_MonthYearItemFontWeight(put_abi(value))); return value; } template void impl_ICalendarView::MonthYearItemFontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthYearItemFontWeight(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_MonthYearItemFontWeight(get_abi(value))); } template Windows::UI::Xaml::Media::FontFamily impl_ICalendarView::FirstOfYearDecadeLabelFontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontFamily(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfYearDecadeLabelFontFamily(put_abi(value))); return value; } template void impl_ICalendarView::FirstOfYearDecadeLabelFontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfYearDecadeLabelFontFamily(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfYearDecadeLabelFontFamily(get_abi(value))); } template double impl_ICalendarView::FirstOfYearDecadeLabelFontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontSize(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfYearDecadeLabelFontSize(&value)); return value; } template void impl_ICalendarView::FirstOfYearDecadeLabelFontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfYearDecadeLabelFontSize(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfYearDecadeLabelFontSize(value)); } template Windows::UI::Text::FontStyle impl_ICalendarView::FirstOfYearDecadeLabelFontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontStyle(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfYearDecadeLabelFontStyle(&value)); return value; } template void impl_ICalendarView::FirstOfYearDecadeLabelFontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfYearDecadeLabelFontStyle(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfYearDecadeLabelFontStyle(value)); } template Windows::UI::Text::FontWeight impl_ICalendarView::FirstOfYearDecadeLabelFontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontWeight(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_FirstOfYearDecadeLabelFontWeight(put_abi(value))); return value; } template void impl_ICalendarView::FirstOfYearDecadeLabelFontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FirstOfYearDecadeLabelFontWeight(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_FirstOfYearDecadeLabelFontWeight(get_abi(value))); } template Windows::UI::Xaml::HorizontalAlignment impl_ICalendarView::HorizontalDayItemAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalDayItemAlignment(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_HorizontalDayItemAlignment(&value)); return value; } template void impl_ICalendarView::HorizontalDayItemAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalDayItemAlignment(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_HorizontalDayItemAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_ICalendarView::VerticalDayItemAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalDayItemAlignment(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_VerticalDayItemAlignment(&value)); return value; } template void impl_ICalendarView::VerticalDayItemAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalDayItemAlignment(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_VerticalDayItemAlignment(value)); } template Windows::UI::Xaml::HorizontalAlignment impl_ICalendarView::HorizontalFirstOfMonthLabelAlignment() const { Windows::UI::Xaml::HorizontalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalFirstOfMonthLabelAlignment(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_HorizontalFirstOfMonthLabelAlignment(&value)); return value; } template void impl_ICalendarView::HorizontalFirstOfMonthLabelAlignment(Windows::UI::Xaml::HorizontalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_HorizontalFirstOfMonthLabelAlignment(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_HorizontalFirstOfMonthLabelAlignment(value)); } template Windows::UI::Xaml::VerticalAlignment impl_ICalendarView::VerticalFirstOfMonthLabelAlignment() const { Windows::UI::Xaml::VerticalAlignment value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalFirstOfMonthLabelAlignment(&value)); + check_hresult(WINRT_SHIM(ICalendarView)->get_VerticalFirstOfMonthLabelAlignment(&value)); return value; } template void impl_ICalendarView::VerticalFirstOfMonthLabelAlignment(Windows::UI::Xaml::VerticalAlignment value) const { - check_hresult(static_cast(static_cast(*this))->put_VerticalFirstOfMonthLabelAlignment(value)); + check_hresult(WINRT_SHIM(ICalendarView)->put_VerticalFirstOfMonthLabelAlignment(value)); } template Windows::UI::Xaml::Thickness impl_ICalendarView::CalendarItemBorderThickness() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBorderThickness(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarItemBorderThickness(put_abi(value))); return value; } template void impl_ICalendarView::CalendarItemBorderThickness(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarItemBorderThickness(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarItemBorderThickness(get_abi(value))); } template Windows::UI::Xaml::Style impl_ICalendarView::CalendarViewDayItemStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarViewDayItemStyle(put(value))); + check_hresult(WINRT_SHIM(ICalendarView)->get_CalendarViewDayItemStyle(put_abi(value))); return value; } template void impl_ICalendarView::CalendarViewDayItemStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarViewDayItemStyle(get(value))); + check_hresult(WINRT_SHIM(ICalendarView)->put_CalendarViewDayItemStyle(get_abi(value))); } template event_token impl_ICalendarView::CalendarViewDayItemChanging(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_CalendarViewDayItemChanging(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarView)->add_CalendarViewDayItemChanging(get_abi(value), &token)); return token; } @@ -53729,13 +56660,13 @@ template event_revoker impl_ICalendarView::Calend template void impl_ICalendarView::CalendarViewDayItemChanging(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_CalendarViewDayItemChanging(token)); + check_hresult(WINRT_SHIM(ICalendarView)->remove_CalendarViewDayItemChanging(token)); } template event_token impl_ICalendarView::SelectedDatesChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SelectedDatesChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ICalendarView)->add_SelectedDatesChanged(get_abi(value), &token)); return token; } @@ -53746,588 +56677,588 @@ template event_revoker impl_ICalendarView::Select template void impl_ICalendarView::SelectedDatesChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SelectedDatesChanged(token)); + check_hresult(WINRT_SHIM(ICalendarView)->remove_SelectedDatesChanged(token)); } template void impl_ICalendarView::SetDisplayDate(const Windows::Foundation::DateTime & date) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDisplayDate(get(date))); + check_hresult(WINRT_SHIM(ICalendarView)->abi_SetDisplayDate(get_abi(date))); } template void impl_ICalendarView::SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) const { - check_hresult(static_cast(static_cast(*this))->abi_SetYearDecadeDisplayDimensions(columns, rows)); + check_hresult(WINRT_SHIM(ICalendarView)->abi_SetYearDecadeDisplayDimensions(columns, rows)); } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarIdentifierProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifierProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarIdentifierProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DayOfWeekFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayOfWeekFormatProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DayOfWeekFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::IsGroupLabelVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsGroupLabelVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_IsGroupLabelVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DisplayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DisplayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstDayOfWeekProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstDayOfWeekProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstDayOfWeekProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::IsOutOfScopeEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOutOfScopeEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_IsOutOfScopeEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::IsTodayHighlightedProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTodayHighlightedProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_IsTodayHighlightedProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MaxDateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxDateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MaxDateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MinDateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinDateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MinDateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::NumberOfWeeksInViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_NumberOfWeeksInViewProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_NumberOfWeeksInViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectedDatesProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedDatesProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectedDatesProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectionModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectionModeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectionModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::TemplateSettingsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettingsProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_TemplateSettingsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FocusBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FocusBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectedHoverBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedHoverBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectedHoverBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectedPressedBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedPressedBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectedPressedBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectedBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectedBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::HoverBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HoverBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_HoverBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::PressedBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_PressedBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarItemBorderBrushProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBorderBrushProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarItemBorderBrushProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::OutOfScopeBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutOfScopeBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_OutOfScopeBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarItemBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarItemBackgroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::PressedForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PressedForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_PressedForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::TodayForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TodayForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_TodayForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::BlackoutForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_BlackoutForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_BlackoutForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::SelectedForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SelectedForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_SelectedForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::OutOfScopeForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OutOfScopeForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_OutOfScopeForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarItemForegroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemForegroundProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarItemForegroundProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DayItemFontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DayItemFontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DayItemFontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DayItemFontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DayItemFontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DayItemFontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::DayItemFontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayItemFontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_DayItemFontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::TodayFontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TodayFontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_TodayFontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfMonthLabelFontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfMonthLabelFontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfMonthLabelFontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfMonthLabelFontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfMonthLabelFontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfMonthLabelFontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfMonthLabelFontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfMonthLabelFontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfMonthLabelFontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MonthYearItemFontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MonthYearItemFontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MonthYearItemFontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MonthYearItemFontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MonthYearItemFontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MonthYearItemFontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::MonthYearItemFontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthYearItemFontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_MonthYearItemFontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfYearDecadeLabelFontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfYearDecadeLabelFontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfYearDecadeLabelFontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfYearDecadeLabelFontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfYearDecadeLabelFontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfYearDecadeLabelFontStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::FirstOfYearDecadeLabelFontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FirstOfYearDecadeLabelFontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_FirstOfYearDecadeLabelFontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::HorizontalDayItemAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalDayItemAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_HorizontalDayItemAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::VerticalDayItemAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalDayItemAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_VerticalDayItemAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::HorizontalFirstOfMonthLabelAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HorizontalFirstOfMonthLabelAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_HorizontalFirstOfMonthLabelAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::VerticalFirstOfMonthLabelAlignmentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_VerticalFirstOfMonthLabelAlignmentProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_VerticalFirstOfMonthLabelAlignmentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarItemBorderThicknessProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarItemBorderThicknessProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarItemBorderThicknessProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewStatics::CalendarViewDayItemStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarViewDayItemStyleProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewStatics)->get_CalendarViewDayItemStyleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::CalendarView impl_ICalendarViewFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::CalendarView impl_ICalendarViewFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::CalendarView instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICalendarViewFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_ICalendarViewDayItem::IsBlackout() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsBlackout(&value)); + check_hresult(WINRT_SHIM(ICalendarViewDayItem)->get_IsBlackout(&value)); return value; } template void impl_ICalendarViewDayItem::IsBlackout(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsBlackout(value)); + check_hresult(WINRT_SHIM(ICalendarViewDayItem)->put_IsBlackout(value)); } template Windows::Foundation::DateTime impl_ICalendarViewDayItem::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewDayItem)->get_Date(put_abi(value))); return value; } -template void impl_ICalendarViewDayItem::SetDensityColors(const Windows::Foundation::Collections::IIterable & colors) const +template void impl_ICalendarViewDayItem::SetDensityColors(iterable colors) const { - check_hresult(static_cast(static_cast(*this))->abi_SetDensityColors(get(colors))); + check_hresult(WINRT_SHIM(ICalendarViewDayItem)->abi_SetDensityColors(get_abi(colors))); } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewDayItemStatics::IsBlackoutProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsBlackoutProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemStatics)->get_IsBlackoutProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ICalendarViewDayItemStatics::DateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DateProperty(put(value))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemStatics)->get_DateProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::CalendarViewDayItem impl_ICalendarViewDayItemFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::CalendarViewDayItem impl_ICalendarViewDayItemFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::CalendarViewDayItem instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICalendarViewDayItemFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IDatePicker::Header() const +template Windows::Foundation::IInspectable impl_IDatePicker::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IDatePicker)->get_Header(put_abi(value))); return value; } -template void impl_IDatePicker::Header(const Windows::IInspectable & value) const +template void impl_IDatePicker::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IDatePicker::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IDatePicker::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_HeaderTemplate(get_abi(value))); } template hstring impl_IDatePicker::CalendarIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifier(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_CalendarIdentifier(put_abi(value))); return value; } -template void impl_IDatePicker::CalendarIdentifier(hstring_ref value) const +template void impl_IDatePicker::CalendarIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_CalendarIdentifier(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_CalendarIdentifier(get_abi(value))); } template Windows::Foundation::DateTime impl_IDatePicker::Date() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_Date(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_Date(put_abi(value))); return value; } template void impl_IDatePicker::Date(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_Date(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_Date(get_abi(value))); } template bool impl_IDatePicker::DayVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_DayVisible(&value)); + check_hresult(WINRT_SHIM(IDatePicker)->get_DayVisible(&value)); return value; } template void impl_IDatePicker::DayVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_DayVisible(value)); + check_hresult(WINRT_SHIM(IDatePicker)->put_DayVisible(value)); } template bool impl_IDatePicker::MonthVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MonthVisible(&value)); + check_hresult(WINRT_SHIM(IDatePicker)->get_MonthVisible(&value)); return value; } template void impl_IDatePicker::MonthVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthVisible(value)); + check_hresult(WINRT_SHIM(IDatePicker)->put_MonthVisible(value)); } template bool impl_IDatePicker::YearVisible() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_YearVisible(&value)); + check_hresult(WINRT_SHIM(IDatePicker)->get_YearVisible(&value)); return value; } template void impl_IDatePicker::YearVisible(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_YearVisible(value)); + check_hresult(WINRT_SHIM(IDatePicker)->put_YearVisible(value)); } template hstring impl_IDatePicker::DayFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_DayFormat(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_DayFormat(put_abi(value))); return value; } -template void impl_IDatePicker::DayFormat(hstring_ref value) const +template void impl_IDatePicker::DayFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_DayFormat(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_DayFormat(get_abi(value))); } template hstring impl_IDatePicker::MonthFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_MonthFormat(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_MonthFormat(put_abi(value))); return value; } -template void impl_IDatePicker::MonthFormat(hstring_ref value) const +template void impl_IDatePicker::MonthFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_MonthFormat(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_MonthFormat(get_abi(value))); } template hstring impl_IDatePicker::YearFormat() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_YearFormat(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_YearFormat(put_abi(value))); return value; } -template void impl_IDatePicker::YearFormat(hstring_ref value) const +template void impl_IDatePicker::YearFormat(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_YearFormat(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_YearFormat(get_abi(value))); } template Windows::Foundation::DateTime impl_IDatePicker::MinYear() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MinYear(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_MinYear(put_abi(value))); return value; } template void impl_IDatePicker::MinYear(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MinYear(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_MinYear(get_abi(value))); } template Windows::Foundation::DateTime impl_IDatePicker::MaxYear() const { Windows::Foundation::DateTime value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxYear(put(value))); + check_hresult(WINRT_SHIM(IDatePicker)->get_MaxYear(put_abi(value))); return value; } template void impl_IDatePicker::MaxYear(const Windows::Foundation::DateTime & value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxYear(get(value))); + check_hresult(WINRT_SHIM(IDatePicker)->put_MaxYear(get_abi(value))); } template Windows::UI::Xaml::Controls::Orientation impl_IDatePicker::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IDatePicker)->get_Orientation(&value)); return value; } template void impl_IDatePicker::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IDatePicker)->put_Orientation(value)); } template event_token impl_IDatePicker::DateChanged(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_DateChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IDatePicker)->add_DateChanged(get_abi(value), &token)); return token; } @@ -54338,339 +57269,339 @@ template event_revoker impl_IDatePicker::DateChange template void impl_IDatePicker::DateChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_DateChanged(token)); + check_hresult(WINRT_SHIM(IDatePicker)->remove_DateChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::CalendarIdentifierProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CalendarIdentifierProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_CalendarIdentifierProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::DateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DateProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_DateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::DayVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_DayVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::MonthVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_MonthVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::YearVisibleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_YearVisibleProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_YearVisibleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::DayFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DayFormatProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_DayFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::MonthFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MonthFormatProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_MonthFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::YearFormatProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_YearFormatProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_YearFormatProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::MinYearProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinYearProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_MinYearProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::MaxYearProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxYearProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_MaxYearProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics)->get_OrientationProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::DatePicker impl_IDatePickerFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::DatePicker impl_IDatePickerFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::DatePicker instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IDatePickerFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IDatePicker2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IDatePicker2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IDatePicker2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IDatePicker2)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IDatePickerStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IDatePickerStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template hstring impl_IFontIcon::Glyph() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Glyph(put(value))); + check_hresult(WINRT_SHIM(IFontIcon)->get_Glyph(put_abi(value))); return value; } -template void impl_IFontIcon::Glyph(hstring_ref value) const +template void impl_IFontIcon::Glyph(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Glyph(get(value))); + check_hresult(WINRT_SHIM(IFontIcon)->put_Glyph(get_abi(value))); } template double impl_IFontIcon::FontSize() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_FontSize(&value)); + check_hresult(WINRT_SHIM(IFontIcon)->get_FontSize(&value)); return value; } template void impl_IFontIcon::FontSize(double value) const { - check_hresult(static_cast(static_cast(*this))->put_FontSize(value)); + check_hresult(WINRT_SHIM(IFontIcon)->put_FontSize(value)); } template Windows::UI::Xaml::Media::FontFamily impl_IFontIcon::FontFamily() const { Windows::UI::Xaml::Media::FontFamily value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamily(put(value))); + check_hresult(WINRT_SHIM(IFontIcon)->get_FontFamily(put_abi(value))); return value; } template void impl_IFontIcon::FontFamily(const Windows::UI::Xaml::Media::FontFamily & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontFamily(get(value))); + check_hresult(WINRT_SHIM(IFontIcon)->put_FontFamily(get_abi(value))); } template Windows::UI::Text::FontWeight impl_IFontIcon::FontWeight() const { Windows::UI::Text::FontWeight value {}; - check_hresult(static_cast(static_cast(*this))->get_FontWeight(put(value))); + check_hresult(WINRT_SHIM(IFontIcon)->get_FontWeight(put_abi(value))); return value; } template void impl_IFontIcon::FontWeight(const Windows::UI::Text::FontWeight & value) const { - check_hresult(static_cast(static_cast(*this))->put_FontWeight(get(value))); + check_hresult(WINRT_SHIM(IFontIcon)->put_FontWeight(get_abi(value))); } template Windows::UI::Text::FontStyle impl_IFontIcon::FontStyle() const { Windows::UI::Text::FontStyle value {}; - check_hresult(static_cast(static_cast(*this))->get_FontStyle(&value)); + check_hresult(WINRT_SHIM(IFontIcon)->get_FontStyle(&value)); return value; } template void impl_IFontIcon::FontStyle(Windows::UI::Text::FontStyle value) const { - check_hresult(static_cast(static_cast(*this))->put_FontStyle(value)); + check_hresult(WINRT_SHIM(IFontIcon)->put_FontStyle(value)); } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics::GlyphProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GlyphProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics)->get_GlyphProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics::FontSizeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontSizeProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics)->get_FontSizeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics::FontFamilyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontFamilyProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics)->get_FontFamilyProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics::FontWeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontWeightProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics)->get_FontWeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics::FontStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FontStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics)->get_FontStyleProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::FontIcon impl_IFontIconFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::FontIcon impl_IFontIconFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::FontIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFontIconFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IFontIcon2::IsTextScaleFactorEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabled(&value)); + check_hresult(WINRT_SHIM(IFontIcon2)->get_IsTextScaleFactorEnabled(&value)); return value; } template void impl_IFontIcon2::IsTextScaleFactorEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsTextScaleFactorEnabled(value)); + check_hresult(WINRT_SHIM(IFontIcon2)->put_IsTextScaleFactorEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics2::IsTextScaleFactorEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsTextScaleFactorEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics2)->get_IsTextScaleFactorEnabledProperty(put_abi(value))); return value; } template bool impl_IFontIcon3::MirroredWhenRightToLeft() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_MirroredWhenRightToLeft(&value)); + check_hresult(WINRT_SHIM(IFontIcon3)->get_MirroredWhenRightToLeft(&value)); return value; } template void impl_IFontIcon3::MirroredWhenRightToLeft(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_MirroredWhenRightToLeft(value)); + check_hresult(WINRT_SHIM(IFontIcon3)->put_MirroredWhenRightToLeft(value)); } template Windows::UI::Xaml::DependencyProperty impl_IFontIconStatics3::MirroredWhenRightToLeftProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MirroredWhenRightToLeftProperty(put(value))); + check_hresult(WINRT_SHIM(IFontIconStatics3)->get_MirroredWhenRightToLeftProperty(put_abi(value))); return value; } -template Windows::IInspectable impl_IHub::Header() const +template Windows::Foundation::IInspectable impl_IHub::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IHub)->get_Header(put_abi(value))); return value; } -template void impl_IHub::Header(const Windows::IInspectable & value) const +template void impl_IHub::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IHub)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IHub::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IHub)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IHub::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IHub)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::Controls::Orientation impl_IHub::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IHub)->get_Orientation(&value)); return value; } template void impl_IHub::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IHub)->put_Orientation(value)); } template int32_t impl_IHub::DefaultSectionIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_DefaultSectionIndex(&value)); + check_hresult(WINRT_SHIM(IHub)->get_DefaultSectionIndex(&value)); return value; } template void impl_IHub::DefaultSectionIndex(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_DefaultSectionIndex(value)); + check_hresult(WINRT_SHIM(IHub)->put_DefaultSectionIndex(value)); } template Windows::Foundation::Collections::IVector impl_IHub::Sections() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_Sections(put(value))); + check_hresult(WINRT_SHIM(IHub)->get_Sections(put_abi(value))); return value; } template Windows::Foundation::Collections::IVector impl_IHub::SectionsInView() const { Windows::Foundation::Collections::IVector value; - check_hresult(static_cast(static_cast(*this))->get_SectionsInView(put(value))); + check_hresult(WINRT_SHIM(IHub)->get_SectionsInView(put_abi(value))); return value; } -template Windows::Foundation::Collections::IObservableVector impl_IHub::SectionHeaders() const +template Windows::Foundation::Collections::IObservableVector impl_IHub::SectionHeaders() const { - Windows::Foundation::Collections::IObservableVector value; - check_hresult(static_cast(static_cast(*this))->get_SectionHeaders(put(value))); + Windows::Foundation::Collections::IObservableVector value; + check_hresult(WINRT_SHIM(IHub)->get_SectionHeaders(put_abi(value))); return value; } template event_token impl_IHub::SectionHeaderClick(const Windows::UI::Xaml::Controls::HubSectionHeaderClickEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SectionHeaderClick(get(value), &token)); + check_hresult(WINRT_SHIM(IHub)->add_SectionHeaderClick(get_abi(value), &token)); return token; } @@ -54681,13 +57612,13 @@ template event_revoker impl_IHub::SectionHeaderClick(auto_ template void impl_IHub::SectionHeaderClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SectionHeaderClick(token)); + check_hresult(WINRT_SHIM(IHub)->remove_SectionHeaderClick(token)); } template event_token impl_IHub::SectionsInViewChanged(const Windows::UI::Xaml::Controls::SectionsInViewChangedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SectionsInViewChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IHub)->add_SectionsInViewChanged(get_abi(value), &token)); return token; } @@ -54698,891 +57629,891 @@ template event_revoker impl_IHub::SectionsInViewChanged(au template void impl_IHub::SectionsInViewChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SectionsInViewChanged(token)); + check_hresult(WINRT_SHIM(IHub)->remove_SectionsInViewChanged(token)); } template void impl_IHub::ScrollToSection(const Windows::UI::Xaml::Controls::HubSection & section) const { - check_hresult(static_cast(static_cast(*this))->abi_ScrollToSection(get(section))); + check_hresult(WINRT_SHIM(IHub)->abi_ScrollToSection(get_abi(section))); } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::DefaultSectionIndexProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DefaultSectionIndexProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_DefaultSectionIndexProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::SemanticZoomOwnerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SemanticZoomOwnerProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_SemanticZoomOwnerProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::IsActiveViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsActiveViewProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_IsActiveViewProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubStatics::IsZoomedInViewProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsZoomedInViewProperty(put(value))); + check_hresult(WINRT_SHIM(IHubStatics)->get_IsZoomedInViewProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::Hub impl_IHubFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::Hub impl_IHubFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::Hub instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHubFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IHubSection::Header() const +template Windows::Foundation::IInspectable impl_IHubSection::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IHubSection)->get_Header(put_abi(value))); return value; } -template void impl_IHubSection::Header(const Windows::IInspectable & value) const +template void impl_IHubSection::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IHubSection)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IHubSection::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(IHubSection)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_IHubSection::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(IHubSection)->put_HeaderTemplate(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IHubSection::ContentTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplate(put(value))); + check_hresult(WINRT_SHIM(IHubSection)->get_ContentTemplate(put_abi(value))); return value; } template void impl_IHubSection::ContentTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_ContentTemplate(get(value))); + check_hresult(WINRT_SHIM(IHubSection)->put_ContentTemplate(get_abi(value))); } template bool impl_IHubSection::IsHeaderInteractive() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsHeaderInteractive(&value)); + check_hresult(WINRT_SHIM(IHubSection)->get_IsHeaderInteractive(&value)); return value; } template void impl_IHubSection::IsHeaderInteractive(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsHeaderInteractive(value)); + check_hresult(WINRT_SHIM(IHubSection)->put_IsHeaderInteractive(value)); } template Windows::UI::Xaml::DependencyProperty impl_IHubSectionStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IHubSectionStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubSectionStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IHubSectionStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubSectionStatics::ContentTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IHubSectionStatics)->get_ContentTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IHubSectionStatics::IsHeaderInteractiveProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsHeaderInteractiveProperty(put(value))); + check_hresult(WINRT_SHIM(IHubSectionStatics)->get_IsHeaderInteractiveProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::HubSection impl_IHubSectionFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::HubSection impl_IHubSectionFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::HubSection instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IHubSectionFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Thickness impl_IItemsStackPanel::GroupPadding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupPadding(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_GroupPadding(put_abi(value))); return value; } template void impl_IItemsStackPanel::GroupPadding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupPadding(get(value))); + check_hresult(WINRT_SHIM(IItemsStackPanel)->put_GroupPadding(get_abi(value))); } template Windows::UI::Xaml::Controls::Orientation impl_IItemsStackPanel::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_Orientation(&value)); return value; } template void impl_IItemsStackPanel::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->put_Orientation(value)); } template int32_t impl_IItemsStackPanel::FirstCacheIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstCacheIndex(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_FirstCacheIndex(&value)); return value; } template int32_t impl_IItemsStackPanel::FirstVisibleIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstVisibleIndex(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_FirstVisibleIndex(&value)); return value; } template int32_t impl_IItemsStackPanel::LastVisibleIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastVisibleIndex(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_LastVisibleIndex(&value)); return value; } template int32_t impl_IItemsStackPanel::LastCacheIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastCacheIndex(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_LastCacheIndex(&value)); return value; } template Windows::UI::Xaml::Controls::PanelScrollingDirection impl_IItemsStackPanel::ScrollingDirection() const { Windows::UI::Xaml::Controls::PanelScrollingDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollingDirection(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_ScrollingDirection(&value)); return value; } template Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement impl_IItemsStackPanel::GroupHeaderPlacement() const { Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupHeaderPlacement(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_GroupHeaderPlacement(&value)); return value; } template void impl_IItemsStackPanel::GroupHeaderPlacement(Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupHeaderPlacement(value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->put_GroupHeaderPlacement(value)); } template Windows::UI::Xaml::Controls::ItemsUpdatingScrollMode impl_IItemsStackPanel::ItemsUpdatingScrollMode() const { Windows::UI::Xaml::Controls::ItemsUpdatingScrollMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemsUpdatingScrollMode(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_ItemsUpdatingScrollMode(&value)); return value; } template void impl_IItemsStackPanel::ItemsUpdatingScrollMode(Windows::UI::Xaml::Controls::ItemsUpdatingScrollMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemsUpdatingScrollMode(value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->put_ItemsUpdatingScrollMode(value)); } template double impl_IItemsStackPanel::CacheLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CacheLength(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->get_CacheLength(&value)); return value; } template void impl_IItemsStackPanel::CacheLength(double value) const { - check_hresult(static_cast(static_cast(*this))->put_CacheLength(value)); + check_hresult(WINRT_SHIM(IItemsStackPanel)->put_CacheLength(value)); } template Windows::UI::Xaml::DependencyProperty impl_IItemsStackPanelStatics::GroupPaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupPaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanelStatics)->get_GroupPaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsStackPanelStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanelStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsStackPanelStatics::GroupHeaderPlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupHeaderPlacementProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanelStatics)->get_GroupHeaderPlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsStackPanelStatics::CacheLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CacheLengthProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanelStatics)->get_CacheLengthProperty(put_abi(value))); return value; } template bool impl_IItemsStackPanel2::AreStickyGroupHeadersEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreStickyGroupHeadersEnabled(&value)); + check_hresult(WINRT_SHIM(IItemsStackPanel2)->get_AreStickyGroupHeadersEnabled(&value)); return value; } template void impl_IItemsStackPanel2::AreStickyGroupHeadersEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreStickyGroupHeadersEnabled(value)); + check_hresult(WINRT_SHIM(IItemsStackPanel2)->put_AreStickyGroupHeadersEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IItemsStackPanelStatics2::AreStickyGroupHeadersEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreStickyGroupHeadersEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsStackPanelStatics2)->get_AreStickyGroupHeadersEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Thickness impl_IItemsWrapGrid::GroupPadding() const { Windows::UI::Xaml::Thickness value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupPadding(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_GroupPadding(put_abi(value))); return value; } template void impl_IItemsWrapGrid::GroupPadding(const Windows::UI::Xaml::Thickness & value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupPadding(get(value))); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_GroupPadding(get_abi(value))); } template Windows::UI::Xaml::Controls::Orientation impl_IItemsWrapGrid::Orientation() const { Windows::UI::Xaml::Controls::Orientation value {}; - check_hresult(static_cast(static_cast(*this))->get_Orientation(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_Orientation(&value)); return value; } template void impl_IItemsWrapGrid::Orientation(Windows::UI::Xaml::Controls::Orientation value) const { - check_hresult(static_cast(static_cast(*this))->put_Orientation(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_Orientation(value)); } template int32_t impl_IItemsWrapGrid::MaximumRowsOrColumns() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MaximumRowsOrColumns(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_MaximumRowsOrColumns(&value)); return value; } template void impl_IItemsWrapGrid::MaximumRowsOrColumns(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MaximumRowsOrColumns(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_MaximumRowsOrColumns(value)); } template double impl_IItemsWrapGrid::ItemWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemWidth(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_ItemWidth(&value)); return value; } template void impl_IItemsWrapGrid::ItemWidth(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemWidth(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_ItemWidth(value)); } template double impl_IItemsWrapGrid::ItemHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ItemHeight(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_ItemHeight(&value)); return value; } template void impl_IItemsWrapGrid::ItemHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_ItemHeight(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_ItemHeight(value)); } template int32_t impl_IItemsWrapGrid::FirstCacheIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstCacheIndex(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_FirstCacheIndex(&value)); return value; } template int32_t impl_IItemsWrapGrid::FirstVisibleIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_FirstVisibleIndex(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_FirstVisibleIndex(&value)); return value; } template int32_t impl_IItemsWrapGrid::LastVisibleIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastVisibleIndex(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_LastVisibleIndex(&value)); return value; } template int32_t impl_IItemsWrapGrid::LastCacheIndex() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_LastCacheIndex(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_LastCacheIndex(&value)); return value; } template Windows::UI::Xaml::Controls::PanelScrollingDirection impl_IItemsWrapGrid::ScrollingDirection() const { Windows::UI::Xaml::Controls::PanelScrollingDirection value {}; - check_hresult(static_cast(static_cast(*this))->get_ScrollingDirection(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_ScrollingDirection(&value)); return value; } template Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement impl_IItemsWrapGrid::GroupHeaderPlacement() const { Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value {}; - check_hresult(static_cast(static_cast(*this))->get_GroupHeaderPlacement(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_GroupHeaderPlacement(&value)); return value; } template void impl_IItemsWrapGrid::GroupHeaderPlacement(Windows::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value) const { - check_hresult(static_cast(static_cast(*this))->put_GroupHeaderPlacement(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_GroupHeaderPlacement(value)); } template double impl_IItemsWrapGrid::CacheLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CacheLength(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->get_CacheLength(&value)); return value; } template void impl_IItemsWrapGrid::CacheLength(double value) const { - check_hresult(static_cast(static_cast(*this))->put_CacheLength(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid)->put_CacheLength(value)); } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::GroupPaddingProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupPaddingProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_GroupPaddingProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::OrientationProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OrientationProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_OrientationProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::MaximumRowsOrColumnsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaximumRowsOrColumnsProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_MaximumRowsOrColumnsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::ItemWidthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemWidthProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_ItemWidthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::ItemHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ItemHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_ItemHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::GroupHeaderPlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_GroupHeaderPlacementProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_GroupHeaderPlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics::CacheLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CacheLengthProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics)->get_CacheLengthProperty(put_abi(value))); return value; } template bool impl_IItemsWrapGrid2::AreStickyGroupHeadersEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreStickyGroupHeadersEnabled(&value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid2)->get_AreStickyGroupHeadersEnabled(&value)); return value; } template void impl_IItemsWrapGrid2::AreStickyGroupHeadersEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreStickyGroupHeadersEnabled(value)); + check_hresult(WINRT_SHIM(IItemsWrapGrid2)->put_AreStickyGroupHeadersEnabled(value)); } template Windows::UI::Xaml::DependencyProperty impl_IItemsWrapGridStatics2::AreStickyGroupHeadersEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreStickyGroupHeadersEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IItemsWrapGridStatics2)->get_AreStickyGroupHeadersEnabledProperty(put_abi(value))); return value; } template Windows::Media::Playback::IMediaPlaybackSource impl_IMediaPlayerElement::Source() const { Windows::Media::Playback::IMediaPlaybackSource value; - check_hresult(static_cast(static_cast(*this))->get_Source(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_Source(put_abi(value))); return value; } template void impl_IMediaPlayerElement::Source(const Windows::Media::Playback::IMediaPlaybackSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_Source(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_Source(get_abi(value))); } template Windows::UI::Xaml::Controls::MediaTransportControls impl_IMediaPlayerElement::TransportControls() const { Windows::UI::Xaml::Controls::MediaTransportControls value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TransportControls(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_TransportControls(put_abi(value))); return value; } template void impl_IMediaPlayerElement::TransportControls(const Windows::UI::Xaml::Controls::MediaTransportControls & value) const { - check_hresult(static_cast(static_cast(*this))->put_TransportControls(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_TransportControls(get_abi(value))); } template bool impl_IMediaPlayerElement::AreTransportControlsEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AreTransportControlsEnabled(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_AreTransportControlsEnabled(&value)); return value; } template void impl_IMediaPlayerElement::AreTransportControlsEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AreTransportControlsEnabled(value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_AreTransportControlsEnabled(value)); } template Windows::UI::Xaml::Media::ImageSource impl_IMediaPlayerElement::PosterSource() const { Windows::UI::Xaml::Media::ImageSource value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PosterSource(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_PosterSource(put_abi(value))); return value; } template void impl_IMediaPlayerElement::PosterSource(const Windows::UI::Xaml::Media::ImageSource & value) const { - check_hresult(static_cast(static_cast(*this))->put_PosterSource(get(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_PosterSource(get_abi(value))); } template Windows::UI::Xaml::Media::Stretch impl_IMediaPlayerElement::Stretch() const { Windows::UI::Xaml::Media::Stretch value {}; - check_hresult(static_cast(static_cast(*this))->get_Stretch(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_Stretch(&value)); return value; } template void impl_IMediaPlayerElement::Stretch(Windows::UI::Xaml::Media::Stretch value) const { - check_hresult(static_cast(static_cast(*this))->put_Stretch(value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_Stretch(value)); } template bool impl_IMediaPlayerElement::AutoPlay() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoPlay(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_AutoPlay(&value)); return value; } template void impl_IMediaPlayerElement::AutoPlay(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoPlay(value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_AutoPlay(value)); } template bool impl_IMediaPlayerElement::IsFullWindow() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindow(&value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_IsFullWindow(&value)); return value; } template void impl_IMediaPlayerElement::IsFullWindow(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsFullWindow(value)); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->put_IsFullWindow(value)); } template Windows::Media::Playback::MediaPlayer impl_IMediaPlayerElement::MediaPlayer() const { Windows::Media::Playback::MediaPlayer value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayer(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->get_MediaPlayer(put_abi(value))); return value; } template void impl_IMediaPlayerElement::SetMediaPlayer(const Windows::Media::Playback::MediaPlayer & mediaPlayer) const { - check_hresult(static_cast(static_cast(*this))->abi_SetMediaPlayer(get(mediaPlayer))); + check_hresult(WINRT_SHIM(IMediaPlayerElement)->abi_SetMediaPlayer(get_abi(mediaPlayer))); } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::SourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_SourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::AreTransportControlsEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AreTransportControlsEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_AreTransportControlsEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::PosterSourceProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PosterSourceProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_PosterSourceProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::StretchProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_StretchProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_StretchProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::AutoPlayProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoPlayProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_AutoPlayProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::IsFullWindowProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsFullWindowProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_IsFullWindowProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IMediaPlayerElementStatics::MediaPlayerProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MediaPlayerProperty(put(value))); + check_hresult(WINRT_SHIM(IMediaPlayerElementStatics)->get_MediaPlayerProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::MediaPlayerElement impl_IMediaPlayerElementFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::MediaPlayerElement impl_IMediaPlayerElementFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::MediaPlayerElement instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IMediaPlayerElementFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Media::Geometry impl_IPathIcon::Data() const { Windows::UI::Xaml::Media::Geometry value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Data(put(value))); + check_hresult(WINRT_SHIM(IPathIcon)->get_Data(put_abi(value))); return value; } template void impl_IPathIcon::Data(const Windows::UI::Xaml::Media::Geometry & value) const { - check_hresult(static_cast(static_cast(*this))->put_Data(get(value))); + check_hresult(WINRT_SHIM(IPathIcon)->put_Data(get_abi(value))); } template Windows::UI::Xaml::DependencyProperty impl_IPathIconStatics::DataProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DataProperty(put(value))); + check_hresult(WINRT_SHIM(IPathIconStatics)->get_DataProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::PathIcon impl_IPathIconFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::PathIcon impl_IPathIconFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::PathIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IPathIconFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template bool impl_IScrollContentPresenter::CanVerticallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanVerticallyScroll(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_CanVerticallyScroll(&value)); return value; } template void impl_IScrollContentPresenter::CanVerticallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanVerticallyScroll(value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->put_CanVerticallyScroll(value)); } template bool impl_IScrollContentPresenter::CanHorizontallyScroll() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanHorizontallyScroll(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_CanHorizontallyScroll(&value)); return value; } template void impl_IScrollContentPresenter::CanHorizontallyScroll(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_CanHorizontallyScroll(value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->put_CanHorizontallyScroll(value)); } template double impl_IScrollContentPresenter::ExtentWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentWidth(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_ExtentWidth(&value)); return value; } template double impl_IScrollContentPresenter::ExtentHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ExtentHeight(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_ExtentHeight(&value)); return value; } template double impl_IScrollContentPresenter::ViewportWidth() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportWidth(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_ViewportWidth(&value)); return value; } template double impl_IScrollContentPresenter::ViewportHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_ViewportHeight(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_ViewportHeight(&value)); return value; } template double impl_IScrollContentPresenter::HorizontalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_HorizontalOffset(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_HorizontalOffset(&value)); return value; } template double impl_IScrollContentPresenter::VerticalOffset() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_VerticalOffset(&value)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_VerticalOffset(&value)); return value; } -template Windows::IInspectable impl_IScrollContentPresenter::ScrollOwner() const +template Windows::Foundation::IInspectable impl_IScrollContentPresenter::ScrollOwner() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_ScrollOwner(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IScrollContentPresenter)->get_ScrollOwner(put_abi(value))); return value; } -template void impl_IScrollContentPresenter::ScrollOwner(const Windows::IInspectable & value) const +template void impl_IScrollContentPresenter::ScrollOwner(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_ScrollOwner(get(value))); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->put_ScrollOwner(get_abi(value))); } template void impl_IScrollContentPresenter::LineUp() const { - check_hresult(static_cast(static_cast(*this))->abi_LineUp()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_LineUp()); } template void impl_IScrollContentPresenter::LineDown() const { - check_hresult(static_cast(static_cast(*this))->abi_LineDown()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_LineDown()); } template void impl_IScrollContentPresenter::LineLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_LineLeft()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_LineLeft()); } template void impl_IScrollContentPresenter::LineRight() const { - check_hresult(static_cast(static_cast(*this))->abi_LineRight()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_LineRight()); } template void impl_IScrollContentPresenter::PageUp() const { - check_hresult(static_cast(static_cast(*this))->abi_PageUp()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_PageUp()); } template void impl_IScrollContentPresenter::PageDown() const { - check_hresult(static_cast(static_cast(*this))->abi_PageDown()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_PageDown()); } template void impl_IScrollContentPresenter::PageLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_PageLeft()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_PageLeft()); } template void impl_IScrollContentPresenter::PageRight() const { - check_hresult(static_cast(static_cast(*this))->abi_PageRight()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_PageRight()); } template void impl_IScrollContentPresenter::MouseWheelUp() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelUp()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_MouseWheelUp()); } template void impl_IScrollContentPresenter::MouseWheelDown() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelDown()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_MouseWheelDown()); } template void impl_IScrollContentPresenter::MouseWheelLeft() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelLeft()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_MouseWheelLeft()); } template void impl_IScrollContentPresenter::MouseWheelRight() const { - check_hresult(static_cast(static_cast(*this))->abi_MouseWheelRight()); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_MouseWheelRight()); } template void impl_IScrollContentPresenter::SetHorizontalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetHorizontalOffset(offset)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_SetHorizontalOffset(offset)); } template void impl_IScrollContentPresenter::SetVerticalOffset(double offset) const { - check_hresult(static_cast(static_cast(*this))->abi_SetVerticalOffset(offset)); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_SetVerticalOffset(offset)); } template Windows::Foundation::Rect impl_IScrollContentPresenter::MakeVisible(const Windows::UI::Xaml::UIElement & visual, const Windows::Foundation::Rect & rectangle) const { Windows::Foundation::Rect returnValue {}; - check_hresult(static_cast(static_cast(*this))->abi_MakeVisible(get(visual), get(rectangle), put(returnValue))); + check_hresult(WINRT_SHIM(IScrollContentPresenter)->abi_MakeVisible(get_abi(visual), get_abi(rectangle), put_abi(returnValue))); return returnValue; } template bool impl_ISearchBox::SearchHistoryEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryEnabled(&value)); + check_hresult(WINRT_SHIM(ISearchBox)->get_SearchHistoryEnabled(&value)); return value; } template void impl_ISearchBox::SearchHistoryEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryEnabled(value)); + check_hresult(WINRT_SHIM(ISearchBox)->put_SearchHistoryEnabled(value)); } template hstring impl_ISearchBox::SearchHistoryContext() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryContext(put(value))); + check_hresult(WINRT_SHIM(ISearchBox)->get_SearchHistoryContext(put_abi(value))); return value; } -template void impl_ISearchBox::SearchHistoryContext(hstring_ref value) const +template void impl_ISearchBox::SearchHistoryContext(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SearchHistoryContext(get(value))); + check_hresult(WINRT_SHIM(ISearchBox)->put_SearchHistoryContext(get_abi(value))); } template hstring impl_ISearchBox::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(ISearchBox)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_ISearchBox::PlaceholderText(hstring_ref value) const +template void impl_ISearchBox::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(ISearchBox)->put_PlaceholderText(get_abi(value))); } template hstring impl_ISearchBox::QueryText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_QueryText(put(value))); + check_hresult(WINRT_SHIM(ISearchBox)->get_QueryText(put_abi(value))); return value; } -template void impl_ISearchBox::QueryText(hstring_ref value) const +template void impl_ISearchBox::QueryText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_QueryText(get(value))); + check_hresult(WINRT_SHIM(ISearchBox)->put_QueryText(get_abi(value))); } template bool impl_ISearchBox::FocusOnKeyboardInput() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_FocusOnKeyboardInput(&value)); + check_hresult(WINRT_SHIM(ISearchBox)->get_FocusOnKeyboardInput(&value)); return value; } template void impl_ISearchBox::FocusOnKeyboardInput(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_FocusOnKeyboardInput(value)); + check_hresult(WINRT_SHIM(ISearchBox)->put_FocusOnKeyboardInput(value)); } template bool impl_ISearchBox::ChooseSuggestionOnEnter() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_ChooseSuggestionOnEnter(&value)); + check_hresult(WINRT_SHIM(ISearchBox)->get_ChooseSuggestionOnEnter(&value)); return value; } template void impl_ISearchBox::ChooseSuggestionOnEnter(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_ChooseSuggestionOnEnter(value)); + check_hresult(WINRT_SHIM(ISearchBox)->put_ChooseSuggestionOnEnter(value)); } template event_token impl_ISearchBox::QueryChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QueryChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ISearchBox)->add_QueryChanged(get_abi(value), &token)); return token; } @@ -55593,13 +58524,13 @@ template event_revoker impl_ISearchBox::QueryChanged template void impl_ISearchBox::QueryChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QueryChanged(token)); + check_hresult(WINRT_SHIM(ISearchBox)->remove_QueryChanged(token)); } template event_token impl_ISearchBox::SuggestionsRequested(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SuggestionsRequested(get(value), &token)); + check_hresult(WINRT_SHIM(ISearchBox)->add_SuggestionsRequested(get_abi(value), &token)); return token; } @@ -55610,13 +58541,13 @@ template event_revoker impl_ISearchBox::SuggestionsR template void impl_ISearchBox::SuggestionsRequested(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SuggestionsRequested(token)); + check_hresult(WINRT_SHIM(ISearchBox)->remove_SuggestionsRequested(token)); } template event_token impl_ISearchBox::QuerySubmitted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuerySubmitted(get(value), &token)); + check_hresult(WINRT_SHIM(ISearchBox)->add_QuerySubmitted(get_abi(value), &token)); return token; } @@ -55627,13 +58558,13 @@ template event_revoker impl_ISearchBox::QuerySubmitt template void impl_ISearchBox::QuerySubmitted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuerySubmitted(token)); + check_hresult(WINRT_SHIM(ISearchBox)->remove_QuerySubmitted(token)); } template event_token impl_ISearchBox::ResultSuggestionChosen(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_ResultSuggestionChosen(get(value), &token)); + check_hresult(WINRT_SHIM(ISearchBox)->add_ResultSuggestionChosen(get_abi(value), &token)); return token; } @@ -55644,13 +58575,13 @@ template event_revoker impl_ISearchBox::ResultSugges template void impl_ISearchBox::ResultSuggestionChosen(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_ResultSuggestionChosen(token)); + check_hresult(WINRT_SHIM(ISearchBox)->remove_ResultSuggestionChosen(token)); } template event_token impl_ISearchBox::PrepareForFocusOnKeyboardInput(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PrepareForFocusOnKeyboardInput(get(value), &token)); + check_hresult(WINRT_SHIM(ISearchBox)->add_PrepareForFocusOnKeyboardInput(get_abi(value), &token)); return token; } @@ -55661,170 +58592,170 @@ template event_revoker impl_ISearchBox::PrepareForFo template void impl_ISearchBox::PrepareForFocusOnKeyboardInput(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PrepareForFocusOnKeyboardInput(token)); + check_hresult(WINRT_SHIM(ISearchBox)->remove_PrepareForFocusOnKeyboardInput(token)); } template void impl_ISearchBox::SetLocalContentSuggestionSettings(const Windows::ApplicationModel::Search::LocalContentSuggestionSettings & settings) const { - check_hresult(static_cast(static_cast(*this))->abi_SetLocalContentSuggestionSettings(get(settings))); + check_hresult(WINRT_SHIM(ISearchBox)->abi_SetLocalContentSuggestionSettings(get_abi(settings))); } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::SearchHistoryEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_SearchHistoryEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::SearchHistoryContextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SearchHistoryContextProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_SearchHistoryContextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::QueryTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_QueryTextProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_QueryTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::FocusOnKeyboardInputProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FocusOnKeyboardInputProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_FocusOnKeyboardInputProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISearchBoxStatics::ChooseSuggestionOnEnterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ChooseSuggestionOnEnterProperty(put(value))); + check_hresult(WINRT_SHIM(ISearchBoxStatics)->get_ChooseSuggestionOnEnterProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::SearchBox impl_ISearchBoxFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::SearchBox impl_ISearchBoxFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::SearchBox instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISearchBoxFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::UIElement impl_ISplitView::Content() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Content(put(value))); + check_hresult(WINRT_SHIM(ISplitView)->get_Content(put_abi(value))); return value; } template void impl_ISplitView::Content(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Content(get(value))); + check_hresult(WINRT_SHIM(ISplitView)->put_Content(get_abi(value))); } template Windows::UI::Xaml::UIElement impl_ISplitView::Pane() const { Windows::UI::Xaml::UIElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_Pane(put(value))); + check_hresult(WINRT_SHIM(ISplitView)->get_Pane(put_abi(value))); return value; } template void impl_ISplitView::Pane(const Windows::UI::Xaml::UIElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_Pane(get(value))); + check_hresult(WINRT_SHIM(ISplitView)->put_Pane(get_abi(value))); } template bool impl_ISplitView::IsPaneOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPaneOpen(&value)); + check_hresult(WINRT_SHIM(ISplitView)->get_IsPaneOpen(&value)); return value; } template void impl_ISplitView::IsPaneOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPaneOpen(value)); + check_hresult(WINRT_SHIM(ISplitView)->put_IsPaneOpen(value)); } template double impl_ISplitView::OpenPaneLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_OpenPaneLength(&value)); + check_hresult(WINRT_SHIM(ISplitView)->get_OpenPaneLength(&value)); return value; } template void impl_ISplitView::OpenPaneLength(double value) const { - check_hresult(static_cast(static_cast(*this))->put_OpenPaneLength(value)); + check_hresult(WINRT_SHIM(ISplitView)->put_OpenPaneLength(value)); } template double impl_ISplitView::CompactPaneLength() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_CompactPaneLength(&value)); + check_hresult(WINRT_SHIM(ISplitView)->get_CompactPaneLength(&value)); return value; } template void impl_ISplitView::CompactPaneLength(double value) const { - check_hresult(static_cast(static_cast(*this))->put_CompactPaneLength(value)); + check_hresult(WINRT_SHIM(ISplitView)->put_CompactPaneLength(value)); } template Windows::UI::Xaml::Controls::SplitViewPanePlacement impl_ISplitView::PanePlacement() const { Windows::UI::Xaml::Controls::SplitViewPanePlacement value {}; - check_hresult(static_cast(static_cast(*this))->get_PanePlacement(&value)); + check_hresult(WINRT_SHIM(ISplitView)->get_PanePlacement(&value)); return value; } template void impl_ISplitView::PanePlacement(Windows::UI::Xaml::Controls::SplitViewPanePlacement value) const { - check_hresult(static_cast(static_cast(*this))->put_PanePlacement(value)); + check_hresult(WINRT_SHIM(ISplitView)->put_PanePlacement(value)); } template Windows::UI::Xaml::Controls::SplitViewDisplayMode impl_ISplitView::DisplayMode() const { Windows::UI::Xaml::Controls::SplitViewDisplayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_DisplayMode(&value)); + check_hresult(WINRT_SHIM(ISplitView)->get_DisplayMode(&value)); return value; } template void impl_ISplitView::DisplayMode(Windows::UI::Xaml::Controls::SplitViewDisplayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_DisplayMode(value)); + check_hresult(WINRT_SHIM(ISplitView)->put_DisplayMode(value)); } template Windows::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings impl_ISplitView::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(ISplitView)->get_TemplateSettings(put_abi(value))); return value; } template Windows::UI::Xaml::Media::Brush impl_ISplitView::PaneBackground() const { Windows::UI::Xaml::Media::Brush value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaneBackground(put(value))); + check_hresult(WINRT_SHIM(ISplitView)->get_PaneBackground(put_abi(value))); return value; } template void impl_ISplitView::PaneBackground(const Windows::UI::Xaml::Media::Brush & value) const { - check_hresult(static_cast(static_cast(*this))->put_PaneBackground(get(value))); + check_hresult(WINRT_SHIM(ISplitView)->put_PaneBackground(get_abi(value))); } template event_token impl_ISplitView::PaneClosing(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PaneClosing(get(value), &token)); + check_hresult(WINRT_SHIM(ISplitView)->add_PaneClosing(get_abi(value), &token)); return token; } @@ -55835,205 +58766,205 @@ template event_revoker impl_ISplitView::PaneClosing( template void impl_ISplitView::PaneClosing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PaneClosing(token)); + check_hresult(WINRT_SHIM(ISplitView)->remove_PaneClosing(token)); } -template event_token impl_ISplitView::PaneClosed(const Windows::Foundation::TypedEventHandler & value) const +template event_token impl_ISplitView::PaneClosed(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PaneClosed(get(value), &token)); + check_hresult(WINRT_SHIM(ISplitView)->add_PaneClosed(get_abi(value), &token)); return token; } -template event_revoker impl_ISplitView::PaneClosed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const +template event_revoker impl_ISplitView::PaneClosed(auto_revoke_t, const Windows::Foundation::TypedEventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::ISplitView::remove_PaneClosed, PaneClosed(value)); } template void impl_ISplitView::PaneClosed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PaneClosed(token)); + check_hresult(WINRT_SHIM(ISplitView)->remove_PaneClosed(token)); } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::ContentProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ContentProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_ContentProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::PaneProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaneProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_PaneProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::IsPaneOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPaneOpenProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_IsPaneOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::OpenPaneLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_OpenPaneLengthProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_OpenPaneLengthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::CompactPaneLengthProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_CompactPaneLengthProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_CompactPaneLengthProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::PanePlacementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PanePlacementProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_PanePlacementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::DisplayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_DisplayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_DisplayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::TemplateSettingsProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettingsProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_TemplateSettingsProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics::PaneBackgroundProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PaneBackgroundProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics)->get_PaneBackgroundProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::SplitView impl_ISplitViewFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::SplitView impl_ISplitViewFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::SplitView instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ISplitViewFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_ISplitView2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(ISplitView2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_ISplitView2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(ISplitView2)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_ISplitViewStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ISplitViewStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Symbol impl_ISymbolIcon::Symbol() const { Windows::UI::Xaml::Controls::Symbol value {}; - check_hresult(static_cast(static_cast(*this))->get_Symbol(&value)); + check_hresult(WINRT_SHIM(ISymbolIcon)->get_Symbol(&value)); return value; } template void impl_ISymbolIcon::Symbol(Windows::UI::Xaml::Controls::Symbol value) const { - check_hresult(static_cast(static_cast(*this))->put_Symbol(value)); + check_hresult(WINRT_SHIM(ISymbolIcon)->put_Symbol(value)); } template Windows::UI::Xaml::DependencyProperty impl_ISymbolIconStatics::SymbolProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SymbolProperty(put(value))); + check_hresult(WINRT_SHIM(ISymbolIconStatics)->get_SymbolProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::SymbolIcon impl_ISymbolIconFactory::CreateInstanceWithSymbol(Windows::UI::Xaml::Controls::Symbol symbol) const { Windows::UI::Xaml::Controls::SymbolIcon instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstanceWithSymbol(symbol, put(instance))); + check_hresult(WINRT_SHIM(ISymbolIconFactory)->abi_CreateInstanceWithSymbol(symbol, put_abi(instance))); return instance; } -template Windows::IInspectable impl_ITimePicker::Header() const +template Windows::Foundation::IInspectable impl_ITimePicker::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(ITimePicker)->get_Header(put_abi(value))); return value; } -template void impl_ITimePicker::Header(const Windows::IInspectable & value) const +template void impl_ITimePicker::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(ITimePicker)->put_Header(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_ITimePicker::HeaderTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplate(put(value))); + check_hresult(WINRT_SHIM(ITimePicker)->get_HeaderTemplate(put_abi(value))); return value; } template void impl_ITimePicker::HeaderTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_HeaderTemplate(get(value))); + check_hresult(WINRT_SHIM(ITimePicker)->put_HeaderTemplate(get_abi(value))); } template hstring impl_ITimePicker::ClockIdentifier() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_ClockIdentifier(put(value))); + check_hresult(WINRT_SHIM(ITimePicker)->get_ClockIdentifier(put_abi(value))); return value; } -template void impl_ITimePicker::ClockIdentifier(hstring_ref value) const +template void impl_ITimePicker::ClockIdentifier(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_ClockIdentifier(get(value))); + check_hresult(WINRT_SHIM(ITimePicker)->put_ClockIdentifier(get_abi(value))); } template int32_t impl_ITimePicker::MinuteIncrement() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_MinuteIncrement(&value)); + check_hresult(WINRT_SHIM(ITimePicker)->get_MinuteIncrement(&value)); return value; } template void impl_ITimePicker::MinuteIncrement(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_MinuteIncrement(value)); + check_hresult(WINRT_SHIM(ITimePicker)->put_MinuteIncrement(value)); } template Windows::Foundation::TimeSpan impl_ITimePicker::Time() const { Windows::Foundation::TimeSpan value {}; - check_hresult(static_cast(static_cast(*this))->get_Time(put(value))); + check_hresult(WINRT_SHIM(ITimePicker)->get_Time(put_abi(value))); return value; } template void impl_ITimePicker::Time(const Windows::Foundation::TimeSpan & value) const { - check_hresult(static_cast(static_cast(*this))->put_Time(get(value))); + check_hresult(WINRT_SHIM(ITimePicker)->put_Time(get_abi(value))); } template event_token impl_ITimePicker::TimeChanged(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TimeChanged(get(value), &token)); + check_hresult(WINRT_SHIM(ITimePicker)->add_TimeChanged(get_abi(value), &token)); return token; } @@ -56044,360 +58975,360 @@ template event_revoker impl_ITimePicker::TimeChange template void impl_ITimePicker::TimeChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TimeChanged(token)); + check_hresult(WINRT_SHIM(ITimePicker)->remove_TimeChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics::HeaderTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics)->get_HeaderTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics::ClockIdentifierProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClockIdentifierProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics)->get_ClockIdentifierProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics::MinuteIncrementProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MinuteIncrementProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics)->get_MinuteIncrementProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics::TimeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TimeProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics)->get_TimeProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::TimePicker impl_ITimePickerFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::TimePicker impl_ITimePickerFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::TimePicker instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ITimePickerFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_ITimePicker2::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(ITimePicker2)->get_LightDismissOverlayMode(&value)); return value; } template void impl_ITimePicker2::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(ITimePicker2)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_ITimePickerStatics2::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(ITimePickerStatics2)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template bool impl_IAppBar::IsOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsOpen(&value)); + check_hresult(WINRT_SHIM(IAppBar)->get_IsOpen(&value)); return value; } template void impl_IAppBar::IsOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsOpen(value)); + check_hresult(WINRT_SHIM(IAppBar)->put_IsOpen(value)); } template bool impl_IAppBar::IsSticky() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSticky(&value)); + check_hresult(WINRT_SHIM(IAppBar)->get_IsSticky(&value)); return value; } template void impl_IAppBar::IsSticky(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSticky(value)); + check_hresult(WINRT_SHIM(IAppBar)->put_IsSticky(value)); } -template event_token impl_IAppBar::Opened(const Windows::Foundation::EventHandler & value) const +template event_token impl_IAppBar::Opened(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(IAppBar)->add_Opened(get_abi(value), &token)); return token; } -template event_revoker impl_IAppBar::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IAppBar::Opened(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IAppBar::remove_Opened, Opened(value)); } template void impl_IAppBar::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IAppBar)->remove_Opened(token)); } -template event_token impl_IAppBar::Closed(const Windows::Foundation::EventHandler & value) const +template event_token impl_IAppBar::Closed(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(IAppBar)->add_Closed(get_abi(value), &token)); return token; } -template event_revoker impl_IAppBar::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IAppBar::Closed(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IAppBar::remove_Closed, Closed(value)); } template void impl_IAppBar::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IAppBar)->remove_Closed(token)); } -template void impl_IAppBarOverrides::OnClosed(const Windows::IInspectable & e) const +template void impl_IAppBarOverrides::OnClosed(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnClosed(get(e))); + check_hresult(WINRT_SHIM(IAppBarOverrides)->abi_OnClosed(get_abi(e))); } -template void impl_IAppBarOverrides::OnOpened(const Windows::IInspectable & e) const +template void impl_IAppBarOverrides::OnOpened(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnOpened(get(e))); + check_hresult(WINRT_SHIM(IAppBarOverrides)->abi_OnOpened(get_abi(e))); } template Windows::UI::Xaml::DependencyProperty impl_IAppBarStatics::IsOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsOpenProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarStatics)->get_IsOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAppBarStatics::IsStickyProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsStickyProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarStatics)->get_IsStickyProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::AppBar impl_IAppBarFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::AppBar impl_IAppBarFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::AppBar instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IAppBarFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template Windows::UI::Xaml::Controls::AppBarClosedDisplayMode impl_IAppBar2::ClosedDisplayMode() const { Windows::UI::Xaml::Controls::AppBarClosedDisplayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_ClosedDisplayMode(&value)); + check_hresult(WINRT_SHIM(IAppBar2)->get_ClosedDisplayMode(&value)); return value; } template void impl_IAppBar2::ClosedDisplayMode(Windows::UI::Xaml::Controls::AppBarClosedDisplayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_ClosedDisplayMode(value)); + check_hresult(WINRT_SHIM(IAppBar2)->put_ClosedDisplayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IAppBarStatics2::ClosedDisplayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_ClosedDisplayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarStatics2)->get_ClosedDisplayModeProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::Primitives::AppBarTemplateSettings impl_IAppBar3::TemplateSettings() const { Windows::UI::Xaml::Controls::Primitives::AppBarTemplateSettings value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TemplateSettings(put(value))); + check_hresult(WINRT_SHIM(IAppBar3)->get_TemplateSettings(put_abi(value))); return value; } -template event_token impl_IAppBar3::Opening(const Windows::Foundation::EventHandler & value) const +template event_token impl_IAppBar3::Opening(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opening(get(value), &token)); + check_hresult(WINRT_SHIM(IAppBar3)->add_Opening(get_abi(value), &token)); return token; } -template event_revoker impl_IAppBar3::Opening(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IAppBar3::Opening(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IAppBar3::remove_Opening, Opening(value)); } template void impl_IAppBar3::Opening(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opening(token)); + check_hresult(WINRT_SHIM(IAppBar3)->remove_Opening(token)); } -template event_token impl_IAppBar3::Closing(const Windows::Foundation::EventHandler & value) const +template event_token impl_IAppBar3::Closing(const Windows::Foundation::EventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closing(get(value), &token)); + check_hresult(WINRT_SHIM(IAppBar3)->add_Closing(get_abi(value), &token)); return token; } -template event_revoker impl_IAppBar3::Closing(auto_revoke_t, const Windows::Foundation::EventHandler & value) const +template event_revoker impl_IAppBar3::Closing(auto_revoke_t, const Windows::Foundation::EventHandler & value) const { return impl::make_event_revoker(this, &ABI::Windows::UI::Xaml::Controls::IAppBar3::remove_Closing, Closing(value)); } template void impl_IAppBar3::Closing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closing(token)); + check_hresult(WINRT_SHIM(IAppBar3)->remove_Closing(token)); } -template void impl_IAppBarOverrides3::OnClosing(const Windows::IInspectable & e) const +template void impl_IAppBarOverrides3::OnClosing(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnClosing(get(e))); + check_hresult(WINRT_SHIM(IAppBarOverrides3)->abi_OnClosing(get_abi(e))); } -template void impl_IAppBarOverrides3::OnOpening(const Windows::IInspectable & e) const +template void impl_IAppBarOverrides3::OnOpening(const Windows::Foundation::IInspectable & e) const { - check_hresult(static_cast(static_cast(*this))->abi_OnOpening(get(e))); + check_hresult(WINRT_SHIM(IAppBarOverrides3)->abi_OnOpening(get_abi(e))); } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IAppBar4::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IAppBar4)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IAppBar4::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IAppBar4)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IAppBarStatics4::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IAppBarStatics4)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } template double impl_IAutoSuggestBox::MaxSuggestionListHeight() const { double value {}; - check_hresult(static_cast(static_cast(*this))->get_MaxSuggestionListHeight(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_MaxSuggestionListHeight(&value)); return value; } template void impl_IAutoSuggestBox::MaxSuggestionListHeight(double value) const { - check_hresult(static_cast(static_cast(*this))->put_MaxSuggestionListHeight(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_MaxSuggestionListHeight(value)); } template bool impl_IAutoSuggestBox::IsSuggestionListOpen() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSuggestionListOpen(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_IsSuggestionListOpen(&value)); return value; } template void impl_IAutoSuggestBox::IsSuggestionListOpen(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSuggestionListOpen(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_IsSuggestionListOpen(value)); } template hstring impl_IAutoSuggestBox::TextMemberPath() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_TextMemberPath(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_TextMemberPath(put_abi(value))); return value; } -template void impl_IAutoSuggestBox::TextMemberPath(hstring_ref value) const +template void impl_IAutoSuggestBox::TextMemberPath(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_TextMemberPath(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_TextMemberPath(get_abi(value))); } template hstring impl_IAutoSuggestBox::Text() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_Text(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_Text(put_abi(value))); return value; } -template void impl_IAutoSuggestBox::Text(hstring_ref value) const +template void impl_IAutoSuggestBox::Text(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_Text(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_Text(get_abi(value))); } template bool impl_IAutoSuggestBox::UpdateTextOnSelect() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_UpdateTextOnSelect(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_UpdateTextOnSelect(&value)); return value; } template void impl_IAutoSuggestBox::UpdateTextOnSelect(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_UpdateTextOnSelect(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_UpdateTextOnSelect(value)); } template hstring impl_IAutoSuggestBox::PlaceholderText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderText(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_PlaceholderText(put_abi(value))); return value; } -template void impl_IAutoSuggestBox::PlaceholderText(hstring_ref value) const +template void impl_IAutoSuggestBox::PlaceholderText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PlaceholderText(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_PlaceholderText(get_abi(value))); } -template Windows::IInspectable impl_IAutoSuggestBox::Header() const +template Windows::Foundation::IInspectable impl_IAutoSuggestBox::Header() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Header(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_Header(put_abi(value))); return value; } -template void impl_IAutoSuggestBox::Header(const Windows::IInspectable & value) const +template void impl_IAutoSuggestBox::Header(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Header(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_Header(get_abi(value))); } template bool impl_IAutoSuggestBox::AutoMaximizeSuggestionArea() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_AutoMaximizeSuggestionArea(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_AutoMaximizeSuggestionArea(&value)); return value; } template void impl_IAutoSuggestBox::AutoMaximizeSuggestionArea(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_AutoMaximizeSuggestionArea(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_AutoMaximizeSuggestionArea(value)); } template Windows::UI::Xaml::Style impl_IAutoSuggestBox::TextBoxStyle() const { Windows::UI::Xaml::Style value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextBoxStyle(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->get_TextBoxStyle(put_abi(value))); return value; } template void impl_IAutoSuggestBox::TextBoxStyle(const Windows::UI::Xaml::Style & value) const { - check_hresult(static_cast(static_cast(*this))->put_TextBoxStyle(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->put_TextBoxStyle(get_abi(value))); } template event_token impl_IAutoSuggestBox::SuggestionChosen(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SuggestionChosen(get(value), &token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->add_SuggestionChosen(get_abi(value), &token)); return token; } @@ -56408,13 +59339,13 @@ template event_revoker impl_IAutoSuggestBox::Su template void impl_IAutoSuggestBox::SuggestionChosen(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SuggestionChosen(token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->remove_SuggestionChosen(token)); } template event_token impl_IAutoSuggestBox::TextChanged(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_TextChanged(get(value), &token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->add_TextChanged(get_abi(value), &token)); return token; } @@ -56425,88 +59356,88 @@ template event_revoker impl_IAutoSuggestBox::Te template void impl_IAutoSuggestBox::TextChanged(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_TextChanged(token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox)->remove_TextChanged(token)); } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::MaxSuggestionListHeightProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_MaxSuggestionListHeightProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_MaxSuggestionListHeightProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::IsSuggestionListOpenProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSuggestionListOpenProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_IsSuggestionListOpenProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::TextMemberPathProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextMemberPathProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_TextMemberPathProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::TextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_TextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::UpdateTextOnSelectProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_UpdateTextOnSelectProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_UpdateTextOnSelectProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::PlaceholderTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PlaceholderTextProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_PlaceholderTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::HeaderProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_HeaderProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_HeaderProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::AutoMaximizeSuggestionAreaProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_AutoMaximizeSuggestionAreaProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_AutoMaximizeSuggestionAreaProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics::TextBoxStyleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TextBoxStyleProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics)->get_TextBoxStyleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::IconElement impl_IAutoSuggestBox2::QueryIcon() const { Windows::UI::Xaml::Controls::IconElement value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_QueryIcon(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox2)->get_QueryIcon(put_abi(value))); return value; } template void impl_IAutoSuggestBox2::QueryIcon(const Windows::UI::Xaml::Controls::IconElement & value) const { - check_hresult(static_cast(static_cast(*this))->put_QueryIcon(get(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBox2)->put_QueryIcon(get_abi(value))); } template event_token impl_IAutoSuggestBox2::QuerySubmitted(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_QuerySubmitted(get(value), &token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox2)->add_QuerySubmitted(get_abi(value), &token)); return token; } @@ -56517,178 +59448,178 @@ template event_revoker impl_IAutoSuggestBox2:: template void impl_IAutoSuggestBox2::QuerySubmitted(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_QuerySubmitted(token)); + check_hresult(WINRT_SHIM(IAutoSuggestBox2)->remove_QuerySubmitted(token)); } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics2::QueryIconProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_QueryIconProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics2)->get_QueryIconProperty(put_abi(value))); return value; } template Windows::UI::Xaml::Controls::LightDismissOverlayMode impl_IAutoSuggestBox3::LightDismissOverlayMode() const { Windows::UI::Xaml::Controls::LightDismissOverlayMode value {}; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayMode(&value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox3)->get_LightDismissOverlayMode(&value)); return value; } template void impl_IAutoSuggestBox3::LightDismissOverlayMode(Windows::UI::Xaml::Controls::LightDismissOverlayMode value) const { - check_hresult(static_cast(static_cast(*this))->put_LightDismissOverlayMode(value)); + check_hresult(WINRT_SHIM(IAutoSuggestBox3)->put_LightDismissOverlayMode(value)); } template Windows::UI::Xaml::DependencyProperty impl_IAutoSuggestBoxStatics3::LightDismissOverlayModeProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_LightDismissOverlayModeProperty(put(value))); + check_hresult(WINRT_SHIM(IAutoSuggestBoxStatics3)->get_LightDismissOverlayModeProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::CommandBarOverflowPresenter impl_ICommandBarOverflowPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::CommandBarOverflowPresenter impl_ICommandBarOverflowPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::CommandBarOverflowPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(ICommandBarOverflowPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::IInspectable impl_IContentDialog::Title() const +template Windows::Foundation::IInspectable impl_IContentDialog::Title() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_Title(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContentDialog)->get_Title(put_abi(value))); return value; } -template void impl_IContentDialog::Title(const Windows::IInspectable & value) const +template void impl_IContentDialog::Title(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_Title(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_Title(get_abi(value))); } template Windows::UI::Xaml::DataTemplate impl_IContentDialog::TitleTemplate() const { Windows::UI::Xaml::DataTemplate value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleTemplate(put(value))); + check_hresult(WINRT_SHIM(IContentDialog)->get_TitleTemplate(put_abi(value))); return value; } template void impl_IContentDialog::TitleTemplate(const Windows::UI::Xaml::DataTemplate & value) const { - check_hresult(static_cast(static_cast(*this))->put_TitleTemplate(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_TitleTemplate(get_abi(value))); } template bool impl_IContentDialog::FullSizeDesired() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_FullSizeDesired(&value)); + check_hresult(WINRT_SHIM(IContentDialog)->get_FullSizeDesired(&value)); return value; } template void impl_IContentDialog::FullSizeDesired(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_FullSizeDesired(value)); + check_hresult(WINRT_SHIM(IContentDialog)->put_FullSizeDesired(value)); } template hstring impl_IContentDialog::PrimaryButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonText(put(value))); + check_hresult(WINRT_SHIM(IContentDialog)->get_PrimaryButtonText(put_abi(value))); return value; } -template void impl_IContentDialog::PrimaryButtonText(hstring_ref value) const +template void impl_IContentDialog::PrimaryButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryButtonText(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_PrimaryButtonText(get_abi(value))); } template hstring impl_IContentDialog::SecondaryButtonText() const { hstring value; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonText(put(value))); + check_hresult(WINRT_SHIM(IContentDialog)->get_SecondaryButtonText(put_abi(value))); return value; } -template void impl_IContentDialog::SecondaryButtonText(hstring_ref value) const +template void impl_IContentDialog::SecondaryButtonText(hstring_view value) const { - check_hresult(static_cast(static_cast(*this))->put_SecondaryButtonText(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_SecondaryButtonText(get_abi(value))); } template Windows::UI::Xaml::Input::ICommand impl_IContentDialog::PrimaryButtonCommand() const { Windows::UI::Xaml::Input::ICommand value; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonCommand(put(value))); + check_hresult(WINRT_SHIM(IContentDialog)->get_PrimaryButtonCommand(put_abi(value))); return value; } template void impl_IContentDialog::PrimaryButtonCommand(const Windows::UI::Xaml::Input::ICommand & value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryButtonCommand(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_PrimaryButtonCommand(get_abi(value))); } template Windows::UI::Xaml::Input::ICommand impl_IContentDialog::SecondaryButtonCommand() const { Windows::UI::Xaml::Input::ICommand value; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonCommand(put(value))); + check_hresult(WINRT_SHIM(IContentDialog)->get_SecondaryButtonCommand(put_abi(value))); return value; } template void impl_IContentDialog::SecondaryButtonCommand(const Windows::UI::Xaml::Input::ICommand & value) const { - check_hresult(static_cast(static_cast(*this))->put_SecondaryButtonCommand(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_SecondaryButtonCommand(get_abi(value))); } -template Windows::IInspectable impl_IContentDialog::PrimaryButtonCommandParameter() const +template Windows::Foundation::IInspectable impl_IContentDialog::PrimaryButtonCommandParameter() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonCommandParameter(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContentDialog)->get_PrimaryButtonCommandParameter(put_abi(value))); return value; } -template void impl_IContentDialog::PrimaryButtonCommandParameter(const Windows::IInspectable & value) const +template void impl_IContentDialog::PrimaryButtonCommandParameter(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_PrimaryButtonCommandParameter(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_PrimaryButtonCommandParameter(get_abi(value))); } -template Windows::IInspectable impl_IContentDialog::SecondaryButtonCommandParameter() const +template Windows::Foundation::IInspectable impl_IContentDialog::SecondaryButtonCommandParameter() const { - Windows::IInspectable value; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonCommandParameter(put(value))); + Windows::Foundation::IInspectable value; + check_hresult(WINRT_SHIM(IContentDialog)->get_SecondaryButtonCommandParameter(put_abi(value))); return value; } -template void impl_IContentDialog::SecondaryButtonCommandParameter(const Windows::IInspectable & value) const +template void impl_IContentDialog::SecondaryButtonCommandParameter(const Windows::Foundation::IInspectable & value) const { - check_hresult(static_cast(static_cast(*this))->put_SecondaryButtonCommandParameter(get(value))); + check_hresult(WINRT_SHIM(IContentDialog)->put_SecondaryButtonCommandParameter(get_abi(value))); } template bool impl_IContentDialog::IsPrimaryButtonEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsPrimaryButtonEnabled(&value)); + check_hresult(WINRT_SHIM(IContentDialog)->get_IsPrimaryButtonEnabled(&value)); return value; } template void impl_IContentDialog::IsPrimaryButtonEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsPrimaryButtonEnabled(value)); + check_hresult(WINRT_SHIM(IContentDialog)->put_IsPrimaryButtonEnabled(value)); } template bool impl_IContentDialog::IsSecondaryButtonEnabled() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_IsSecondaryButtonEnabled(&value)); + check_hresult(WINRT_SHIM(IContentDialog)->get_IsSecondaryButtonEnabled(&value)); return value; } template void impl_IContentDialog::IsSecondaryButtonEnabled(bool value) const { - check_hresult(static_cast(static_cast(*this))->put_IsSecondaryButtonEnabled(value)); + check_hresult(WINRT_SHIM(IContentDialog)->put_IsSecondaryButtonEnabled(value)); } template event_token impl_IContentDialog::Closing(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closing(get(value), &token)); + check_hresult(WINRT_SHIM(IContentDialog)->add_Closing(get_abi(value), &token)); return token; } @@ -56699,13 +59630,13 @@ template event_revoker impl_IContentDialog::Clos template void impl_IContentDialog::Closing(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closing(token)); + check_hresult(WINRT_SHIM(IContentDialog)->remove_Closing(token)); } template event_token impl_IContentDialog::Closed(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Closed(get(value), &token)); + check_hresult(WINRT_SHIM(IContentDialog)->add_Closed(get_abi(value), &token)); return token; } @@ -56716,13 +59647,13 @@ template event_revoker impl_IContentDialog::Clos template void impl_IContentDialog::Closed(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Closed(token)); + check_hresult(WINRT_SHIM(IContentDialog)->remove_Closed(token)); } template event_token impl_IContentDialog::Opened(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Opened(get(value), &token)); + check_hresult(WINRT_SHIM(IContentDialog)->add_Opened(get_abi(value), &token)); return token; } @@ -56733,13 +59664,13 @@ template event_revoker impl_IContentDialog::Open template void impl_IContentDialog::Opened(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_Opened(token)); + check_hresult(WINRT_SHIM(IContentDialog)->remove_Opened(token)); } template event_token impl_IContentDialog::PrimaryButtonClick(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_PrimaryButtonClick(get(value), &token)); + check_hresult(WINRT_SHIM(IContentDialog)->add_PrimaryButtonClick(get_abi(value), &token)); return token; } @@ -56750,13 +59681,13 @@ template event_revoker impl_IContentDialog::Prim template void impl_IContentDialog::PrimaryButtonClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_PrimaryButtonClick(token)); + check_hresult(WINRT_SHIM(IContentDialog)->remove_PrimaryButtonClick(token)); } template event_token impl_IContentDialog::SecondaryButtonClick(const Windows::Foundation::TypedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_SecondaryButtonClick(get(value), &token)); + check_hresult(WINRT_SHIM(IContentDialog)->add_SecondaryButtonClick(get_abi(value), &token)); return token; } @@ -56767,168 +59698,168 @@ template event_revoker impl_IContentDialog::Seco template void impl_IContentDialog::SecondaryButtonClick(event_token token) const { - check_hresult(static_cast(static_cast(*this))->remove_SecondaryButtonClick(token)); + check_hresult(WINRT_SHIM(IContentDialog)->remove_SecondaryButtonClick(token)); } template void impl_IContentDialog::Hide() const { - check_hresult(static_cast(static_cast(*this))->abi_Hide()); + check_hresult(WINRT_SHIM(IContentDialog)->abi_Hide()); } template Windows::Foundation::IAsyncOperation impl_IContentDialog::ShowAsync() const { Windows::Foundation::IAsyncOperation returnValue; - check_hresult(static_cast(static_cast(*this))->abi_ShowAsync(put(returnValue))); + check_hresult(WINRT_SHIM(IContentDialog)->abi_ShowAsync(put_abi(returnValue))); return returnValue; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::TitleProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_TitleProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::TitleTemplateProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_TitleTemplateProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_TitleTemplateProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::FullSizeDesiredProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_FullSizeDesiredProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_FullSizeDesiredProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::PrimaryButtonTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonTextProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_PrimaryButtonTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::SecondaryButtonTextProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonTextProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_SecondaryButtonTextProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::PrimaryButtonCommandProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonCommandProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_PrimaryButtonCommandProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::SecondaryButtonCommandProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonCommandProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_SecondaryButtonCommandProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::PrimaryButtonCommandParameterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_PrimaryButtonCommandParameterProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_PrimaryButtonCommandParameterProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::SecondaryButtonCommandParameterProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_SecondaryButtonCommandParameterProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_SecondaryButtonCommandParameterProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::IsPrimaryButtonEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsPrimaryButtonEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_IsPrimaryButtonEnabledProperty(put_abi(value))); return value; } template Windows::UI::Xaml::DependencyProperty impl_IContentDialogStatics::IsSecondaryButtonEnabledProperty() const { Windows::UI::Xaml::DependencyProperty value { nullptr }; - check_hresult(static_cast(static_cast(*this))->get_IsSecondaryButtonEnabledProperty(put(value))); + check_hresult(WINRT_SHIM(IContentDialogStatics)->get_IsSecondaryButtonEnabledProperty(put_abi(value))); return value; } -template Windows::UI::Xaml::Controls::ContentDialog impl_IContentDialogFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::ContentDialog impl_IContentDialogFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::ContentDialog instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IContentDialogFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } -template Windows::UI::Xaml::Controls::FlyoutPresenter impl_IFlyoutPresenterFactory::CreateInstance(const Windows::IInspectable & outer, Windows::IInspectable & inner) const +template Windows::UI::Xaml::Controls::FlyoutPresenter impl_IFlyoutPresenterFactory::CreateInstance(const Windows::Foundation::IInspectable & outer, Windows::Foundation::IInspectable & inner) const { Windows::UI::Xaml::Controls::FlyoutPresenter instance { nullptr }; - check_hresult(static_cast(static_cast(*this))->abi_CreateInstance(get(outer), put(inner), put(instance))); + check_hresult(WINRT_SHIM(IFlyoutPresenterFactory)->abi_CreateInstance(get_abi(outer), put_abi(inner), put_abi(instance))); return instance; } template int32_t impl_IFrame::CacheSize() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_CacheSize(&value)); + check_hresult(WINRT_SHIM(IFrame)->get_CacheSize(&value)); return value; } template void impl_IFrame::CacheSize(int32_t value) const { - check_hresult(static_cast(static_cast(*this))->put_CacheSize(value)); + check_hresult(WINRT_SHIM(IFrame)->put_CacheSize(value)); } template bool impl_IFrame::CanGoBack() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGoBack(&value)); + check_hresult(WINRT_SHIM(IFrame)->get_CanGoBack(&value)); return value; } template bool impl_IFrame::CanGoForward() const { bool value {}; - check_hresult(static_cast(static_cast(*this))->get_CanGoForward(&value)); + check_hresult(WINRT_SHIM(IFrame)->get_CanGoForward(&value)); return value; } template Windows::UI::Xaml::Interop::TypeName impl_IFrame::CurrentSourcePageType() const { Windows::UI::Xaml::Interop::TypeName value {}; - check_hresult(static_cast(static_cast(*this))->get_CurrentSourcePageType(put(value))); + check_hresult(WINRT_SHIM(IFrame)->get_CurrentSourcePageType(put_abi(value))); return value; } template Windows::UI::Xaml::Interop::TypeName impl_IFrame::SourcePageType() const { Windows::UI::Xaml::Interop::TypeName value {}; - check_hresult(static_cast(static_cast(*this))->get_SourcePageType(put(value))); + check_hresult(WINRT_SHIM(IFrame)->get_SourcePageType(put_abi(value))); return value; } template void impl_IFrame::SourcePageType(const Windows::UI::Xaml::Interop::TypeName & value) const { - check_hresult(static_cast(static_cast(*this))->put_SourcePageType(get(value))); + check_hresult(WINRT_SHIM(IFrame)->put_SourcePageType(get_abi(value))); } template int32_t impl_IFrame::BackStackDepth() const { int32_t value {}; - check_hresult(static_cast(static_cast(*this))->get_BackStackDepth(&value)); + check_hresult(WINRT_SHIM(IFrame)->get_BackStackDepth(&value)); return value; } template event_token impl_IFrame::Navigated(const Windows::UI::Xaml::Navigation::NavigatedEventHandler & value) const { event_token token {}; - check_hresult(static_cast(static_cast(*this))->add_Navigated(get(value), &token)); + check_hresult(WINRT_SHIM(IFrame)->add_Navigated(get_abi(value), &token)); return token; } @@ -56939,13 +59870,13 @@ template event_revoker